xnn.ffnn.models.charmmlib#

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

A CHARMM model (MacKerell et al., J. Phys. Chem. B 102, 3586, 1998) is specified by the parameter tables of its .prm file and the residue definitions of its .rtf file. Both live in one .frc file (xnn.ffnn.common.frc): quadratic_bond, quadratic_angle, urey_bradley, torsion_fourier, improper_harmonic, nonbond(12-6) (Rmin/2 and epsilon per type), nonbond_1-4(12-6) (the types with their own 1,4 values) and nonbond_pair(12-6) (the NBFIX pair overrides) sections, and the residues as #fragments whose SMARTS carry atom maps in topology order together with atom names, atom types, charges and the residue’s impropers (atom names; a - or + prefix names the atom of the previous or next residue bonded to the improper’s central atom). charmm22 ships with xnn as charmm22.frc.

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

Functions

builtin_library([name, strict])

Return one of the CHARMM parameter sets shipped with xnn.

from_forcefield(ff[, strict])

Build a CharmmLibrary from a resolved .frc force field.

place_impropers(topology, fragments, elements)

The improper quadruples of a topology from its residue templates.

read_charmm(source[, strict])

Read a CHARMM parameter library.

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

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

to_forcefield(lib[, name, version])

Write a CharmmLibrary as an in-memory .frc file.

Classes

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

A parsed CHARMM parameter library, in CHARMM units.