SitesSection
- class ase2sprkkr.potentials.definitions.sections.sites.SitesSection(definition, container=None)[source]
This section retrieves the atomic positions and it creates (during reading) the ASE Atoms object
Class hierarchy
Constructor
- __init__(definition, container=None)
Create the container and its members, according to the definition
- _set_from_atoms(atoms, write_io_data)[source]
This function should be called before potential file writing to set the propper values to the section.
- Parameters
atoms (SPRKKRAtoms) – Atoms that will be used to create
write_io_data (WriteIoData) – Object for storing values generated by one section to be (reused in another) - e.g. scaling constants or numbering of meshes etc…
- _update_atoms(atoms, read_io_data)[source]
This function should be called after potential file reading to set the values of Atoms object to the ones from the readed file.
- Parameters
atoms (SPRKKRAtoms) – Atoms, whose properties should be set to the values from readed file. Can be None in some sections, then the object will be created
read_io_data (ReadIoData) – Object for storing values from one section to be used in another one. This mechanism is used to be the sections as independent (and independently testable) as they can be.
- Returns
atoms – If the function creates a new Atoms obejct (either when None has been passed to the atoms args, or when the atoms cannot be adapted to the values readed from the file - e.g. when number of atoms differs) it should return it.
- Return type
None or SPRKKRAtoms