site_analysis.atom¶
-
class
Atom
(index: int, species_string: Optional[str] = None)[source]¶ Bases:
object
Represents a single persistent atom during a simulation.
-
index
¶ Unique numeric index identifying this atom.
Type: int
-
in_site
¶ Site index for the site this atom currently occupies.
Type: int
-
frac_coords
¶ Numpy array containing the current fractional coordinates for this atom.
Type: np.array
-
trajectory
¶ List of site indices occupied at each timestep.
Type: list
Note
The atom index is used to identify it when parsing structures, so needs to be e.g. the corresponding Site index in a Pymatgen Structure.
-
assign_coords
(structure: pymatgen.core.structure.Structure) → None[source]¶ Assign fractional coordinates to this atom from a pymatgen Structure.
Parameters: structure (pymatgen.Structure) – The Structure to use for this atom’s fractional coordinates. Returns: None
-
frac_coords
Getter for the fractional coordinates of this atom.
Raises: AttributeError
– if the fractional coordinates for this atom have not been set.
-
classmethod
from_str
(input_string: str) → site_analysis.atom.Atom[source]¶ Initiate an Atom object from a JSON-formatted string.
Parameters: input_string (str) – JSON-formatted string. Returns: (Atom)
-