atomistics.calculators.lammps.libcalculator.calc_molecular_dynamics_nph_with_lammpslib

atomistics.calculators.lammps.libcalculator.calc_molecular_dynamics_nph_with_lammpslib#

atomistics.calculators.lammps.libcalculator.calc_molecular_dynamics_nph_with_lammpslib(structure: Atoms, potential_dataframe: pandas.DataFrame, run: int = 100, thermo: int = 100, timestep: float = 0.001, Tstart: float = 100.0, Pstart: float = 0.0, Pstop: float = 0.0, Pdamp: float = 1.0, seed: int = 4928459, dist: str = 'gaussian', velocity_rescale_factor: float | None = 2.0, lmp=None, output_keys=('positions', 'cell', 'forces', 'temperature', 'energy_pot', 'energy_tot', 'pressure', 'velocities', 'volume'), **kwargs) dict[source]#

Run NPH (isoenthalpic-isobaric ensemble) molecular dynamics using the LAMMPS library interface.

Parameters:
  • structure (Atoms) – The input structure.

  • potential_dataframe (pandas.DataFrame) – DataFrame with "Species" and "Config" columns.

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

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

  • timestep (float) – MD timestep in ps. Defaults to 0.001.

  • Tstart (float) – Initial temperature in K used for velocity initialisation. Defaults to 100.0.

  • Pstart (float) – Starting pressure in bar. Defaults to 0.0.

  • Pstop (float) – Target pressure in bar at the end of the run. Defaults to 0.0.

  • Pdamp (float) – Barostat damping parameter in ps. Defaults to 1.0.

  • seed (int) – Random seed for velocity initialisation. Defaults to 4928459.

  • dist (str) – Velocity distribution type. Defaults to "gaussian".

  • velocity_rescale_factor (float | None) – Scaling factor for initial velocity rescaling. No rescaling is applied when None. Defaults to 2.0.

  • lmp – Existing LAMMPS library instance to reuse. A new instance is created if None.

  • output_keys – Which output quantities to return. Defaults to all OutputMolecularDynamics keys.

  • **kwargs – Additional keyword arguments forwarded to lammps_run.

Returns:

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

Return type:

dict