ase/structure format

Class: ASEStructureFormat

Format for the Atomic Simulation Environment (ase).

ASE supports parsing a few dozen of data formats. As described in i the documentation, many of these formats can be determined automatically. Use the ase_fmt keyword argument to supply the format if automatic detection fails.

Conversions

Convert from this format to System

dpdata.System(atoms: 'ase.Atoms', fmt: Literal['ase/structure'] = None) dpdata.system.System
dpdata.System.from_ase_structure(atoms: 'ase.Atoms') dpdata.system.System

Convert ase.Atoms to a System.

Parameters:
atomsase.Atoms

an ASE Atoms, containing a structure

Returns:
System

converted system

Convert from System to this format

dpdata.System.to(fmt: Literal['ase/structure'])
dpdata.System.to_ase_structure()

Convert System to ASE Atom obj.

Convert from LabeledSystem to this format

dpdata.LabeledSystem.to(fmt: Literal['ase/structure'])
dpdata.LabeledSystem.to_ase_structure()

Convert System to ASE Atoms object.

Convert from this format to LabeledSystem

dpdata.LabeledSystem(atoms: 'ase.Atoms', fmt: Literal['ase/structure'] = None) dpdata.system.LabeledSystem
dpdata.LabeledSystem.from_ase_structure(atoms: 'ase.Atoms') dpdata.system.LabeledSystem

Convert ase.Atoms to a LabeledSystem. Energies and forces are calculated by the calculator.

Parameters:
atomsase.Atoms

an ASE Atoms, containing a structure

Returns:
LabeledSystem

converted system

Raises:
RuntimeError

ASE will raise RuntimeError if the atoms does not have a calculator

Convert from this format to MultiSystems

dpdata.MultiSystems.from_ase_structure(file_name: str, begin: int | None = None, end: int | None = None, step: int | None = None, ase_fmt: str | None = None) dpdata.system.MultiSystems

Convert a ASE supported file to ASE Atoms.

It will finally be converted to MultiSystems.

Parameters:
file_namestr

path to file

beginint, optional

begin frame index

endint, optional

end frame index

stepint, optional

frame index step

ase_fmtstr, optional

ASE format. See the ASE documentation about supported formats

Returns:
MultiSystems

converted system