atomistics.calculators.lammps.helpers.lammps_calc_md

Contents

atomistics.calculators.lammps.helpers.lammps_calc_md#

atomistics.calculators.lammps.helpers.lammps_calc_md(lmp_instance: LammpsASELibrary, run_str: str, run: int, thermo: int, output_keys: Iterable[str] = ('positions', 'cell', 'forces', 'temperature', 'energy_pot', 'energy_tot', 'pressure', 'velocities', 'volume')) dict[source]#

Run a full MD simulation by collecting output every thermo steps.

Calls lammps_calc_md_step run // thermo times, each advancing thermo timesteps, and stacks the per-step results into numpy arrays.

Parameters:
  • lmp_instance (LammpsASELibrary) – An active LAMMPS library instance.

  • run_str (str) – Jinja2 template string for the LAMMPS run command (receives run).

  • run (int) – Total number of MD timesteps to execute.

  • thermo (int) – Number of timesteps between output snapshots.

  • output_keys (Iterable[str]) – Names of the output quantities to collect.

Returns:

Output quantities as numpy arrays with one entry per snapshot, keyed by quantity name.

Return type:

dict