AtomicStructure¶
-
class
hdnnpy.dataset.atomic_structure.
AtomicStructure
(atoms)[source]¶ Bases:
object
Wrapper class of ase.Atoms.
It wrapsase.Atoms
object to define additional methods and attributes.Before wrapping, it sorts atoms by element alphabetically.It stores calculated neighbor information such as distance, indices.Parameters: atoms (Atoms) – an object to wrap. -
clear_cache
(cutoff_distance=None)[source]¶ Clear up cached neighbor information in this instance.
Parameters: cutoff_distance (float, optional) – It clears the corresponding cached data if specified, otherwise it clears all cached data.
-
get_neighbor_info
(cutoff_distance, geometry_keys)[source]¶ Calculate or return cached data.
If there is no cached data, calculate it as necessary.The calculated result is cached, and retained unless you useclear_cache()
method.Parameters: Returns: Neighbor information required by
geometry_keys
for each atom in a cell.Return type: Iterator [tuple]
-
classmethod
read_xyz
(file_path)[source]¶ Read .xyz format file and make a list of instances.
Parses .xyz format file using
ase.io.iread()
and wraps it by this class.Parameters: file_path (Path) – File path to read atomic structures. Returns: Initialized instances. Return type: list [AtomicStructure]
-