xnn.ffnn.models.amberlib#

AMBER parameter libraries: the SEAMM .frc format and native JSON.

An AMBER model (Cornell et al., J. Am. Chem. Soc. 117, 5179, 1995) is specified by two kinds of information:

  • per-atom-type parameters – the van der Waals well depth epsilon and radius R* (half the like-pair minimum distance), plus the bonded tables keyed by atom types: harmonic bonds and angles, periodic torsions with one or more Fourier terms K [1 + cos(n phi - gamma)] per quadruple, and impropers of the same periodic form centred on the third atom (Table 14 of the paper, parm94.dat in the AMBER distribution);

  • residue templates – the atom names, atom types and RESP partial charges of every amino acid, nucleotide, capping group, ion and water (Figures 4-6 of the paper, the .lib residue libraries of AMBER). Charges belong to the residue, not to the atom type, which is what sets AMBER apart from OPLS or DREIDING.

Both live in one .frc file (xnn.ffnn.common.frc): the parameter tables as quadratic_bond / quadratic_angle / torsion_fourier / improper_fourier / nonbond(12-6) sections, and the residue templates as #fragments whose SMARTS carry atom maps in template order together with atom names, atom types and charges lists. #templates (per-type SMARTS) type small organic molecules outside the residue libraries, which then need charges from the user. ff94 ships with xnn as amber.frc. A library can also be round-tripped through the native JSON of this module (AmberLibrary.save() / read_amber()).

Energies are converted from kcal/mol to eV only when the model assembles its parameter tensors, as for OPLS.

Functions

builtin_library([name, strict])

Return one of the AMBER parameter sets shipped with xnn.

from_forcefield(ff[, strict])

Build an AmberLibrary from a resolved .frc force field.

match_improper(improper_types, center, outer)

Pick the improper parameter and atom order for one trigonal center.

place_impropers(topology, type_cls, ...)

Generate the improper list of a topology the AMBER way.

read_amber(source[, strict])

Read an AMBER parameter library.

resolve_improper_type(improper_types, i, j, k, l)

Find the improper key for atom types already in evaluation order.

to_forcefield(lib[, name, version])

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

Classes

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

A parsed AMBER parameter library, in AMBER units.