xnn.ffnn.models.amberlib.from_forcefield#

xnn.ffnn.models.amberlib.from_forcefield(ff, strict=True)[source]#

Build an AmberLibrary from a resolved .frc force field.

Parameters:
  • ff (xnn.ffnn.common.frc.ForceField) – A force field of the AMBER functional form: quadratic_bond, quadratic_angle, torsion_fourier, improper_fourier and a nonbond(12-6) section with arithmetic combination (the reader already normalised its @type to sigma/epsilon; R* is recovered as sigma 2^(1/6) / 2).

  • strict (bool, optional) – If True (default) refuse a force field that carries functional forms this model does not implement; if False ignore those sections and record them in notes.

Returns:

The library, including the file’s templates and residue fragments.

Return type:

AmberLibrary

Raises:

ValueError – If the nonbond combination rule is not arithmetic, or an unsupported section is present under strict.