xnn.ffnn.models.terms#

Classical energy terms evaluated with per-term parameters.

The library force fields of this family (OPLS, AMBER, …) look parameters up by atom type. A force field whose parameters are predicted per bond, angle, torsion and atom (ByteFF and ByteFF-Pol in xnn.hybnn) evaluates the same functional forms with one parameter row per term; these functions take those rows. They are unit-agnostic: the energies come out in the units of the parameters.

Polarization follows the induced-point-dipole model with Thole damping of the AMOEBA force field (Ren & Ponder, J. Comput. Chem. 23, 1497 (2002), https://doi.org/10.1002/jcc.10127): permanent point charges polarize isotropic atomic polarizabilities, the dipoles interact through the damped dipole field tensor and are solved for directly (Cholesky factorization).

Functions

bond_angle(u, v)

The angle (M,) between the vectors u and v (M, 3) from both of its projections (well conditioned at 0 and 180 degrees).

charge_transfer(r, epsilon, lam, r0)

-eps r^-4 exp[-(lam r / r0)^3].

damped_dispersion(r, c6, r0, damping)

-C6 / (s r0^6 + r^6): the rational damping of the C6 term.

exp_repulsion(r, epsilon, lam, r0[, ...])

a eps exp[lam (1 - r/r0)] + (s12/r)^12: Born-Mayer repulsion with a short-range wall (s12 = 0 drops the wall).

fourier_series(cos1, k, n, sign)

sum_m k_m [1 + s_m cos(n_m phi)] per torsion, the phases zero (s = 1) or pi (s = -1).

harmonic(x, k, x0)

k / 2 (x - x0)^2.

induced_dipoles(pos, q, alpha, damp, scale, ...)

Induced point dipoles of isolated structures by a direct linear solve.

lennard_jones(r2, sigma, epsilon)

4 eps [(sigma/r)^12 - (sigma/r)^6] from the squared distances.

polarization_system(pos, q, alpha, damp, ...)

The linear system of induced point dipoles A mu = E of isolated structures.

solve_dipoles(A, field)

The induced dipoles (B, n, 3) of the system A mu = E of polarization_system().

torsion_cos(b1, b2, b3)

cos phi (M,) of the torsions along the bond vectors b1, b2, b3 (M, 3) (phi = 0 at cis; undefined for collinear atoms).