Lammps Data File class¶
-
class
pylam.LammpsDataFile(filename=None, atom_style='full')[source]¶ Class supporting LAMMPS data file.
Parameters: - filename (str) – data file to read initially
- atom_style (str) – supported: atomic, charge, molecular and full
Returns: Lammps data file object
Return type: -
header= None¶ Header section data ->
LammpsDataHeader
-
masses= None¶ Masses section data ->
LammpsDataMasses
-
coeffs= None¶ Coefficients section data ->
LammpsDataCoeffs
-
atoms= None¶ Atoms section data ->
LammpsDataAtoms
-
velos= None¶ Velocities section data ->
LammpsDataVelocities
-
bonds= None¶ Bonds section data ->
LammpsDataBonds
-
angles= None¶ Angles section data ->
LammpsDataAngles
-
dihedrals= None¶ Dihedrals section data ->
LammpsDataDihedrals
-
impropers= None¶ Impropers section data ->
LammpsDataImpropers
-
Lx¶ Box length in X dim.
-
Ly¶ Box length in Y dim.
-
Lz¶ Box length in Z dim.
-
Vol¶ Box volume
Header¶
Masses¶
Coefficients¶
-
class
pylam.LammpsDataCoeffs[source]¶ Class for storage & administration of the Coefficients sections in the LAMMPS data file.
Each individual section is stored in a
LammpsDataCoeffsSectionobject.-
coeffsSections= ['Pair Coeffs', 'PairIJ Coeffs', 'Bond Coeffs', 'Angle Coeffs', 'Dihedral Coeffs', 'Improper Coeffs', 'BondBond Coeffs', 'BondAngle Coeffs', 'MiddleBondTorsion Coeffs', 'EndBondTorsion Coeffs', 'AngleTorsion Coeffs', 'AngleAngleTorsion Coeffs', 'BondBond13 Coeffs', 'AngleAngle Coeffs']¶ List of supported Coefficients section names
Note
This is the only position where a section name needs to be declared!
-
-
class
pylam.LammpsDataCoeffsSection(coeffsType)[source]¶ Class for parsing, storage & administration of a Coefficients section in the LAMMPS data file.
Parameters: coeffsType (str) – Coeffs section name (see LammpsDataCoeffs.coeffsSections)
Atoms¶
-
class
pylam.LammpsDataAtoms(atom_style)[source]¶ Class for parsing, storage & administration of the Atoms section in the LAMMPS data file.
Each individual atom is stored in an object, like
LammpsDataAtomAtomic, which type depends on the atom_style, and is derived fromLammpsDataAtomTemplate.Parameters: atom_style (str) – supported: atomic, charge, molecular and full -
parseLine(line)[source]¶ Creates a new atom by parsing a string.
Parameters: line (str) – data line of the Atoms section
-
ids¶ Returns a list of all atom IDs.
-
-
class
pylam.LammpsDataAtomAtomic(line=None)[source]¶ Basis:
LammpsDataAtomTemplateStorage class for an atom of style atomic.
Supported properties: id, atom-type, x, y, z