xnn.ffnn.models.dreidinglib.DreidingLibrary#

class xnn.ffnn.models.dreidinglib.DreidingLibrary(atom_types=<factory>, radius=<factory>, theta0=<factory>, vdw_r0=<factory>, vdw_d0=<factory>, x6_zeta=<factory>, oop=<factory>, form='lj', combination='arithmetic', delta=0.01, bond_k1=700.0, bond_d1=70.0, angle_k=100.0, torsion_v=<factory>, hbond_d0=9.0, hbond_r0=2.75, hb_donor_types=<factory>, templates=<factory>, fragments=<factory>, name='dreiding')[source]#

Bases: object

The per-atom-type generators of a DREIDING parameter set.

Values are stored in the paper’s units (kcal/mol, Angstrom, degree); the model converts to eV / radians when it assembles tensors.

Variables:
  • atom_types (dict) – type -> {"element", "mass", "connections", "comment"}.

  • radius (dict) – Bond radius R0 per type, Angstrom (Table I).

  • theta0 (dict) – Equilibrium angle per type as an angle center, degrees (Table I).

  • vdw_d0 (vdw_r0,) – van der Waals minimum distance (Angstrom) and well depth (kcal/mol) per type (Table II).

  • x6_zeta (dict) – Dimensionless exponential-6 scaling parameter zeta per type (Table II); empty for a Lennard-Jones library.

  • oop (dict) – central type -> (K [kcal/mol/rad^2], Psi0 [deg]) inversion rows.

  • form (str) – "lj" or "x6": which nonbond form the library was defined with.

  • combination (str) – Combination rule for the LJ R0 ("arithmetic", the DREIDING default of eq 36c, or "geometric"); well depths always combine geometrically.

  • angle_k (delta, bond_k1, bond_d1,) – The global valence generators (eqs 6-12).

  • torsion_v (dict) – Total torsion barrier per rule id, kcal/mol (eqs 14-23).

  • hbond_r0 (hbond_d0,) – Hydrogen-bond well depth (kcal/mol) and distance (Angstrom) of eq 38.

  • hb_donor_types (set) – Atom types marking hydrogen-bonding hydrogens.

  • fragments (templates,) – SMARTS typing templates (see xnn.ffnn.common.typing).

  • name (str) – Library name.

Parameters:
hybrid(type_name)[source]#

Hybridization class of a type (see hybridization()).

Parameters:

type_name (str)

Return type:

str

element(type_name)[source]#

Element of a type (the atom_types entry, else the mnemonic).

Parameters:

type_name (str)

Return type:

str

oxygen_column(type_name)[source]#

Whether the type’s element sits in the oxygen column.

Parameters:

type_name (str)

Return type:

bool

is_acceptor(type_name)[source]#

Whether the type can accept a hydrogen bond (N, O, F).

Parameters:

type_name (str)

Return type:

bool

save(path)[source]#

Write the library as JSON (read back by read_dreiding()).

Parameters:

path (str or Path) – Output file path.

Returns:

The written path.

Return type:

Path