xnn.ffnn.models.charmmlib.from_forcefield#
- xnn.ffnn.models.charmmlib.from_forcefield(ff, strict=True)[source]#
Build a
CharmmLibraryfrom a resolved.frcforce 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/2is recovered assigma 2^(1/6) / 2.strict (bool, optional) – If
True(default) refuse a force field that carries functional forms this model does not implement; ifFalseignore those sections and record them innotes.
- Returns:
The library, including the file’s templates and residue fragments.
- Return type:
- Raises:
ValueError – If the nonbond combination rule is not arithmetic, or an unsupported section is present under
strict.