xnn.ffnn.models.lammps_input#

xnn.ffnn.models.lammps_input(model, pos, cell=None, atomic_numbers=None)[source]#

The LAMMPS data file, the commands, the energy offset and the further files of a classical force field.

Parameters:
  • model (nn.Module) – An OPLS, Amber, Charmm, Dreiding or classical ReaxFF model, or a model with its own lammps_input(pos, cell) method (ByteFF).

  • pos (array_like) – Positions (n, 3) in Angstrom, in the order of the bound topology.

  • cell (array_like, optional) – An orthorhombic cell (3, 3) in Angstrom (lattice vectors as rows); None for a cluster.

  • atomic_numbers (array_like, optional) – The atomic numbers (n,) (ReaxFF, which has no bound topology).

Returns:

The data file text, the commands (read_data DATAFILE names the data file, FFIELD the ReaxFF field file), the energy in kcal/mol that LAMMPS leaves out (the OPLS series constants V0; 0 otherwise) and the further files {"ffield": text} (ReaxFF; empty otherwise).

Return type:

tuple