xnn.ffnn.models.amberlib.AmberLibrary#
- class xnn.ffnn.models.amberlib.AmberLibrary(atom_types=<factory>, bond_types=<factory>, angle_types=<factory>, dihedral_types=<factory>, improper_types=<factory>, fudge_lj=0.5, fudge_qq=0.8333333333333334, name='amber', references=<factory>, templates=<factory>, fragments=<factory>, metadata=<factory>, notes=<factory>)[source]#
Bases:
objectA parsed AMBER parameter library, in AMBER units.
Energies are kcal/mol, lengths Angstrom, angles degrees. Bonded parameters are keyed by the atom types of the term joined with
-("CT-CT","X-CT-CT-X");Xis the wildcard.Parameters and attributes#
- atom_typesdict[str, dict]
name -> {"element", "mass", "rstar", "epsilon", "cls_nonbond", "cls_bond", "cls_angle", "cls_torsion", "cls_oop", "connections", "comment"};rstaris the van der Waals radiusR*(half the like-pair minimum distance) in Angstrom andepsilonthe well depth in kcal/mol.- bond_typesdict[str, dict]
"A-B" -> {"k", "r0"}forE = k (r - r0)^2.- angle_typesdict[str, dict]
"A-B-C" -> {"k", "theta0"}forE = k (theta - theta0)^2,theta0in degrees.- dihedral_typesdict[str, dict]
"A-B-C-D" -> {"terms": [[K, n, gamma], ...]}forE = sum K [1 + cos(n phi - gamma)]per dihedral (Kalready divided by the number of paths of the AMBER file).- improper_typesdict[str, dict]
"I-J-K-L" -> {"terms": [[K, n, gamma], ...]}withKthe central atom andLthe distinguished outer atom, in the order written (the positions carry meaning, seematch_improper()).- fudge_lj, fudge_qqfloat
Scaling factors of the 1,4 van der Waals and Coulomb interactions (1/2 and 1/1.2 for AMBER).
- namestr
A short label for the parameter set.
- referenceslist[str]
Literature provenance of the parameters.
- templatesdict
Per-type SMARTS templates (
type -> {"smarts": [...], ...}).- fragmentsdict
Residue templates (
name -> {"SMARTS", "atom names", "atom types", "charges", ...}), consumed byassign_atom_types().- metadatadict
The
#metadataentries.- noteslist[str]
Anything the reader had to fill in.
- torsion(key)[source]#
The torsion entry whose key is
"A-B-C-D"or its reverse, exactly (no wildcard matching;Noneif absent).
- improper(key)[source]#
The improper entry of
"I-J-K-L"(first two positions in either order;Noneif absent).
- save(path)[source]#
Write the library as native JSON (read back by
read_amber()).- Parameters:
path (str or Path) – Output file path (conventionally
*.json).- Return type:
None