ferrodispcalc.io package#
Submodules#
ferrodispcalc.io.core module#
ferrodispcalc.io.lammps module#
- class ferrodispcalc.io.lammps.LAMMPSdump(file_name: str, type_map: list[str] = None)[source]#
Bases:
object
LAMMPSdump calss is used to read the lammps dump file.
Attributes:#
- file_name: str
The name of the lammps dump file.
- type_map: list[str]
The list of atom types. The index of the list is the atom type in the lammps dump file.
Example:#
>>> from ferrodispcalc.io import LAMMPSdump >>> from ferrodispcalc.type_map import UniPero >>> lmp = LAMMPSdump('dump.lammpstrj', UniPero) >>> stru = lmp.get_first_frame() # get the first frame, in pymatgen format. >>> nframes = lmp.get_nframes() # get the number of frames in the lammps dump file.
Methods:#
- get_first_frame():
get the first frame, in pymatgen format.
- get_nframes():
get the number of frames.
- get_natoms():
get the number of atoms.
- get_first_frame() Atoms [source]#
Get the first frame in the lammps dump file. Return the structure in ASE/atoms format.
Parameters:#
None
Returns:#
- Structure:
The structure in pymatgen format.