pymatgen.io.lammps.output module¶
-
class
LammpsDump(timesteps, natoms, box_bounds, atoms_data)[source]¶ Bases:
monty.json.MSONableParse lammps dump file.
-
class
LammpsLog(log_file='log.lammps')[source]¶ Bases:
monty.json.MSONableParser for LAMMPS log file.
Parameters: log_file (string) – path to the log file
-
class
LammpsRun(data_file, trajectory_file, log_file='log.lammps', is_forcefield=False)[source]¶ Bases:
monty.json.MSONableParse the lammps data file, trajectory(dump) file and the log file to extract useful info about the system.
- Note: In order to parse trajectory or dump file, the first 2 fields must be
- the id and the atom type. There can be arbitrary number of fields after that and they all will be treated as floats.
Parameters: - data_file (str) – path to the data file
- trajectory_file (str) – path to the trajectory file or dump file
- log_file (str) – path to the log file
-
box_lengths¶
-
get_diffusion_analyzer(specie, temperature, time_step, step_skip, **kwargs)[source]¶ Parameters: - specie (Element/Specie) – Specie to calculate diffusivity for as a String. E.g., “Li”.
- temperature (float) – Temperature of the diffusion run in Kelvin.
- time_step (int) – Time step between measurements.
- step_skip (int) – Sampling frequency of the displacements ( time_step is multiplied by this number to get the real time between measurements)
- the other parameters please see the (For) –
- documentation. (pymatgen.analysis.diffusion_analyzer.DiffusionAnalyzer) –
Returns: DiffusionAnalyzer
-
get_displacements()[source]¶ Return the initial structure and displacements for each time step. Used to interface with the DiffusionAnalyzer.
Returns: Structure object, numpy array of displacements
-
get_structures_from_trajectory()[source]¶ Convert the coordinates in each time step to a structure(boxed molecule). Used to construct DiffusionAnalyzer object.
Returns: list of Structure objects
-
mol_trajectory¶ Compute the weighted average trajectory of each molecule at each timestep
Returns: 2D numpy array ((n_timesteps*mols_number) x 3)
-
mol_velocity¶ Compute the weighted average velcoity of each molecule at each timestep.
Returns: 2D numpy array ((n_timesteps*mols_number) x 3)
-
natoms¶
-
traj_timesteps¶ trajectory time steps in time units. e.g. for units = real, time units = fmsec