xnn.ffnn.models.amoeba_lammps.write_lammps_amoeba_input#
- xnn.ffnn.models.amoeba_lammps.write_lammps_amoeba_input(model, pos, cell=None, directory='.', name='system', drop=())[source]#
Write the inputs of an AMOEBA or HIPPO model for LAMMPS’s AMOEBA package into
directory.The files are
<name>.prm(the model’s current parameters, see the module notes),<name>.xyz(Tinker coordinates),<name>.key(the model’s settings) andin.<name>(the LAMMPS commands, ending inrun 0with the energy terms in the thermo output). Make the data file with LAMMPS’s converter first; the script’s header names the command.- Parameters:
model (nn.Module) – An
AmoebaorHippomodel (or a wrapper of one).pos (array_like) – Positions
(n, 3)in Angstrom, in the order of the bound topology.cell (array_like, optional) – The cell
(3, 3)in Angstrom, lattice vectors as rows;Nonefor a cluster.directory (str or Path, optional) – Where the files go (created if needed).
name (str, optional) – The stem of the file names.
drop (sequence of str, optional) – Terms of the library that LAMMPS lacks and that may be left out, with a warning:
"cflux"(the charge flux),"exchpol"(the exchange polarization). A library with one of them is refused otherwise.
- Returns:
The path of the input script.
- Return type:
Path
- Raises:
ValueError – For a library with ion terms, or with charge flux or exchange polarization not in
drop.