Initialization

The initialization is the first section of viperleed.calc that is run. It is always inserted at the beginning of any viperleed.calc calculation, even if not explicitly specified via the RUN parameter. To test out symmetry recognition, generation of phase shifts, detection of bulk, etc., the initialization can be invoked without a subsequent calculation by specifying RUN = 0.

Note

The settings from the PARAMETERS file and, in a single-domain calculation, the structure from the POSCAR file are read and interpreted before the initialization. This is important for the ASE API where structure and settings can be passed programmatically to viperleed.calc in the form of ase.Atoms objects.

A large number of tasks and checks are performed during initialization. The major steps are listed below in order of execution.

  1. If found, read an EXPBEAMS.csv or EXBEAMS file containing experimental data. If THEO_ENERGIES is not defined explicitly, pick a slightly expanded version of the energy range of the experimental data for use in all calculations.

  2. Check whether the calculation involves multiple structural domains. If so, perform steps 4–9 separately for each domain.

  3. For a domain calculation, read the individual PARAMETERS and POSCAR files for each domain.

  4. If necessary, determine the symmetry and minimal unit cell of the input structure.

  5. Generate a new POSCAR file with the symmetry applied. Write the original structure to POSCAR_oricell.

  6. If not specified, try to determine the bulk repeat vector and the bulk plane group. Write POSCAR_bulk and POSCAR_bulk_appended.

  7. Check whether a PHASESHIFTS file is present and consistent with the structure and settings. If not, and a phase-shifts calculation utility is available, generate new phase shifts automatically.

  8. Generate the BEAMLIST, experiment_symmetry.ini, and, if not provided by the user, IVBEAMS files.

  9. Create the original_inputs directory in which all files used to

    start the calculation are stored. This way it is possible to look up the used settings, even if, for example, the PARAMETERS file was altered by the user during the run.