xnn.ffnn.models.amoebalib#

AMOEBA and HIPPO parameter libraries: .frc bridge and Tinker file formats.

The polarizable multipole force fields of the Ponder group are specified by two kinds of atom labels: atom types carry the electrostatic parameters (permanent multipoles with their local-frame definitions, polarizabilities and polarization groups, the HIPPO density parameters), atom classes carry the valence and van der Waals parameters (several types share one class). An AmoebaLibrary keeps both, in the units of the papers and of the Tinker parameter files (kcal/mol, Angstrom, degrees, e), together with the force-field definition settings (anharmonic coefficients, combining rules, scale factors) that the functional form needs.

Libraries live in the MolSSI/SEAMM .frc format (xnn.ffnn.common.frc) like every other field of the ffnn family: the valence tables are the amoeba_bond / amoeba_angle / amoeba_angle_inplane / stretch_bend / urey_bradley / amoeba_out_of_plane / torsion_fourier / pi_torsion sections and the JSON torsion_torsion grids, the nonbonded ones buffered_14-7 (with pair overrides), atomic_multipole, polarizability, charge_penetration, charge_transfer, pauli_repulsion, damped_dispersion, exchange_polarization and the two charge-flux kinds; the settings are #metadata rows and the type-to-class map is the #equivalence section. amoeba-water-2003 (Ren and Ponder 2003), hippo-water-2021 (Rackers et al. 2021) and amoebapro13 (Shi et al. 2013) ship with xnn.

Because Tinker’s text formats are the lingua franca of these force fields, the module also reads Tinker parameter files (read_tinker_prm()), reads Tinker coordinate files with their types and connectivity (read_tinker_xyz()), and writes a library as a Tinker parameter file (write_tinker_prm()) that Tinker and the LAMMPS AMOEBA package read as is, which is how the fidelity notebooks drive both reference codes from one set of xnn parameters.

Functions

builtin_library([name, strict])

Return one of the AMOEBA / HIPPO parameter sets shipped with xnn.

from_forcefield(ff[, strict])

Build an AmoebaLibrary from a resolved .frc force field.

read_amoeba(source[, strict])

Read an AMOEBA / HIPPO parameter library.

read_tinker_prm(path)

Read a Tinker parameter file of the AMOEBA or HIPPO force field.

read_tinker_xyz(path[, library, type_map])

Read a Tinker .xyz coordinate file (atoms with types and bonds).

to_forcefield(lib[, name, version])

Write an AmoebaLibrary as an in-memory .frc file.

write_tinker_prm(lib, path[, title, ...])

Write a library as a Tinker parameter file.

write_tinker_xyz(path, positions, types, ...)

Write a Tinker .xyz coordinate file.

Classes

AmoebaLibrary([atom_types, bond_types, ...])

A parsed AMOEBA / HIPPO parameter library, in Tinker units.