xnn.ffnn.models.oplslib.to_forcefield#
- xnn.ffnn.models.oplslib.to_forcefield(lib, name=None, version='1.0')[source]#
Write an
OPLSLibraryas an in-memory.frcfile.The inverse of
from_forcefield(): atom types, equivalences, charges,nonbond(12-6)(sigma-eps, geometric), the four bonded tables, the templates and fragments, a#metadataand a#define. DihedralV0constants are not representable intorsion_oplsand are dropped (they do not affect forces or energy differences).- Parameters:
lib (OPLSLibrary) – The library.
name (str, optional) – The
#definename; defaultlib.name.version (str, optional) – Version stamp of every row.
- Returns:
Save it with
.write(path).- Return type: