Skip to content

Force Fields and Strain Energy (UFF)

sci-form implements the Universal Force Field (UFF) for molecular energy evaluation and geometry optimization. The force field describes the potential energy surface as a sum of bonded and non-bonded interaction terms.

UFF Energy Terms

Total Energy

Etotal=Estretch+Ebend+Etorsion+EvdW+Eoop+Eelec

1. Bond Stretch (Harmonic)

Estretch=12kij(rr0)2

Force constant from UFF:

kij=664.12ZiZjr03(kcal/mol/Å2)

Natural bond length:

r0=ri+rjrij(EN)rij(BO)

where rij(EN) is the electronegativity correction and rij(BO) is the bond-order correction.

2. Angle Bend (Cosine Fourier)

Ebend=kθ(C0+C1cosθ+C2cos2θ)

The Fourier coefficients C0,C1,C2 are derived from the natural angle θ0:

Hybridizationθ0Notes
sp³109.47°Tetrahedral
sp²120°Trigonal planar
sp180°Linear

3. Torsion (Cosine)

Etorsion=12Vφ(1cos(nφ0)cos(nφ))
Central bondnVφ
sp³–sp³3VjVk
sp²–sp²25.0 kcal/mol
sp²–sp³61.0 kcal/mol

4. Van der Waals (Lennard-Jones 12-6)

EvdW=εij[(xijr)122(xijr)6]

Geometric combining rules:

xij=xixj,εij=εiεj

5. Inversion (Out-of-Plane)

For sp² centers with three neighbors:

Eoop=kω(C0+C1cosω+C2cos2ω)

where ω is the angle the central atom makes with the plane of its three neighbors. For ideal sp² centers, ω0=0° (planar).

6. Electrostatic (Coulomb)

Eelec=332.0637qiqjεrij

where 332.0637 converts from elementary charges and Ångströms to kcal/mol.

Geometry Optimization

sci-form uses L-BFGS for energy minimization:

  1. Compute energy E(x) and gradient E(x)
  2. Approximate inverse Hessian from history of positions and gradients
  3. Line search along descent direction
  4. Repeat until |E|<tolerance

The gradient for each energy term is computed analytically, not numerically.

Strain Energy

The strain energy is the total potential energy of the molecule in its current geometry. Higher strain energy indicates a geometry further from the force field's ideal.

Distorting bonds, angles, or torsions from their equilibrium values increases strain energy. This is useful for:

  • Conformer quality assessment (lower energy → better conformer)
  • Ring strain analysis
  • Post-embedding refinement

API

Rust

rust
use sci_form::compute_uff_energy;

let energy = compute_uff_energy("CCO", None);
// energy: f64 in kcal/mol

CLI

bash
sci-form energy "CCO"
# Output: total UFF energy in kcal/mol

Python

python
import sci_form
energy = sci_form.uff_energy("CCO")
print(energy)  # kcal/mol

Validation

  • Finite energies: All molecules produce finite (non-NaN, non-infinite) energies
  • Distortion increases energy: Stretching bonds increases Estretch
  • Finite gradients: All gradient components are finite
  • Optimization convergence: L-BFGS converges within max iterations for well-formed molecules

Released under the MIT License.