atomistics.calculators.lammps.helpers.lammps_thermal_expansion_loop

atomistics.calculators.lammps.helpers.lammps_thermal_expansion_loop#

atomistics.calculators.lammps.helpers.lammps_thermal_expansion_loop(structure: Atoms, potential_dataframe: DataFrame, init_str: str, run_str: str, temperature_lst: list[float], run: int = 100, thermo: int = 100, timestep: float = 0.001, Tdamp: float = 0.1, Pstart: float = 0.0, Pstop: float = 0.0, Pdamp: float = 1.0, seed: int = 4928459, dist: str = 'gaussian', velocity_rescale_factor: float = 2.0, lmp=None, output_keys=('temperatures', 'volumes'), **kwargs) dict[source]#

Run NPT molecular dynamics at a sequence of temperatures to compute thermal expansion.

Initialises a LAMMPS simulation once using init_str and then iterates through temperature_lst, running run steps at each temperature via run_str. The equilibrium volume and temperature are recorded after each segment.

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

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

  • init_str (str) – Jinja2 template for the LAMMPS initialisation commands (thermostat setup etc.).

  • run_str (str) – Jinja2 template for the per-temperature run commands.

  • temperature_lst (list[float]) – Ordered list of target temperatures in K.

  • run (int) – Number of MD timesteps per temperature point. Defaults to 100.

  • thermo (int) – Thermo output frequency in timesteps. Defaults to 100.

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

  • Tdamp (float) – Thermostat damping parameter in ps. Defaults to 0.1.

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

  • Pstop (float) – Ending pressure in bar. 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 ("gaussian" or "uniform"). Defaults to "gaussian".

  • velocity_rescale_factor (float) – Scaling factor applied during velocity initialisation. Defaults to 2.0.

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

  • output_keys – Output quantities to return. Defaults to all OutputThermalExpansion keys.

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

Returns:

Thermal expansion output quantities (temperatures and volumes) keyed by name.

Return type:

dict