atomistics.calculators.lammps.helpers.lammps_run#
- atomistics.calculators.lammps.helpers.lammps_run(structure: Atoms, potential_dataframe: DataFrame, input_template: str | None = None, lmp: LammpsASELibrary | None = None, **kwargs) LammpsASELibrary[source]#
Initialise a LAMMPS instance, load the structure and potential, and run an input template.
If no
lmpinstance is provided a new one is created using**kwargs. The structure is written to LAMMPS via the interactive interface, the potential commands are applied, and each line ofinput_templateis sent as a library command.- Parameters:
structure (Atoms) – The ASE structure to load into LAMMPS.
potential_dataframe (pandas.DataFrame) – DataFrame with
"Species"and"Config"columns describing the interatomic potential.input_template (str | None) – Multi-line string of LAMMPS commands to execute after loading the structure and potential. No commands are sent if
None.lmp (LammpsASELibrary | None) – An existing LAMMPS library instance to reuse. A new instance is created if
None.**kwargs – Additional keyword arguments forwarded to
LammpsASELibrarywhen creating a new instance.
- Returns:
The LAMMPS library instance after executing all commands.
- Return type:
LammpsASELibrary