atomistics.calculators.lammps.filecalculator.optimize_positions_and_volume_with_lammpsfile

atomistics.calculators.lammps.filecalculator.optimize_positions_and_volume_with_lammpsfile#

atomistics.calculators.lammps.filecalculator.optimize_positions_and_volume_with_lammpsfile(structure: Atoms, potential_dataframe: DataFrame, working_directory: str, executable_function: Callable[[str], Any], min_style: str = 'cg', etol: float = 0.0, ftol: float = 0.0001, maxiter: int = 100000, maxeval: int = 10000000, thermo: int = 10, pressure: float | Iterable[float | None] = 0.0, vmax: float | None = None) Atoms[source]#

Relax atomic positions and cell with LAMMPS using file-based I/O.

Writes LAMMPS input files, executes the calculator, parses the output, and returns a structure with the relaxed positions and cell.

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

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

  • working_directory (str) – Directory for LAMMPS input/output files.

  • executable_function (Callable[[str], Any]) – Callable that runs LAMMPS in the given directory.

  • min_style (str) – LAMMPS minimisation style (e.g. "cg"). Defaults to "cg".

  • etol (float) – Energy tolerance for minimisation. Defaults to 0.0.

  • ftol (float) – Force tolerance for minimisation in eV/Å. Defaults to 0.0001.

  • maxiter (int) – Maximum number of minimisation iterations. Defaults to 100000.

  • maxeval (int) – Maximum number of force evaluations. Defaults to 10000000.

  • thermo (int) – Thermo output frequency. Defaults to 10.

  • pressure (float | Iterable[float | None]) – Target pressure for box/relax in bar.

  • vmax (float | None) – Maximum fractional volume change per step for box/relax.

Returns:

A copy of the input structure with relaxed positions and cell.

Return type:

Atoms