matcalc._lammps module
Calculator for MD properties using LAMMPS.
- class LAMMPSMDCalc(calculator: str, *, temperature: int = 300, ensemble: Literal['nve', 'nvt', 'npt', 'nvt_nose_hoover', 'npt_nose_hoover'] = 'nvt', timestep: float = 0.001, steps: int = 100, pressure: float = 1, taut: float | None = None, taup: float | None = None, infile: str = 'in.md', trajfile: str = 'md.lammpstrj', logfile: str = 'log.lammps', loginterval: int = 1, relax_structure: bool = True, fmax: float = 0.1, optimizer: str = 'FIRE', frames: int = 10, settings: dict | None = None, relax_calc_kwargs: dict | None = None)[source]
Bases:
PropCalcClass to manage molecular dynamics simulations using LAMMPS.
- taut, taup
Thermo/barostat time constants (ps).
- infile, trajfile, logfile
LAMMPS IO paths.
- fmax, optimizer
Relaxation settings.
Initialize LAMMPSMDCalc with simulation parameters.
- calc(structure: Structure | Atoms | dict[str, Any]) dict[source]
Run the MD calculation using LAMMPS.
- write_inputs(structure: Structure | Atoms | dict[str, Any], script_template: str | Path = PosixPath('/home/runner/work/matcalc/matcalc/src/matcalc/lammps_templates/md.template')) LammpsRun[source]
Write LAMMPS input files based on a given structure.
- Parameters:
structure – Structure, atoms, or dict accepted by
PropCalc.calc.script_template – Path or string content of the LAMMPS script template.
- Returns:
LammpsRunwith inputs written to the current working directory.