xnn.ffnn.models.charmmlib.from_forcefield#

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

Build a CharmmLibrary from a resolved .frc force field.

Parameters:
  • ff (xnn.ffnn.common.frc.ForceField) – A force field of the CHARMM functional form (see the module docstring); the reader already normalised the nonbond sections to sigma/epsilon, and Rmin/2 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:

CharmmLibrary

Raises:

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