Guides / Molecular dynamics

force-fieldambergafflennard-jonesparametrisation

Force fields explained, from bonds and angles to Lennard-Jones

A force field is the set of simple equations and parameters that turns atomic positions into an energy. Here is what each term does and where it fails.

Updated 5 min read

A force field is a recipe for turning atomic positions into an energy. It sums a handful of simple terms: springs for bond lengths and angles, cosine series for torsions, a Lennard-Jones term for van der Waals contacts and Coulomb's law between fixed partial charges. Each term has parameters that depend on the atom types involved, fitted once to quantum chemistry and experiment. Molecular dynamics then differentiates that energy to get forces. The whole simulation inherits the quality of the force field, so knowing what the terms assume is the first skill of a careful user.

The bonded terms, springs and cosines

Bonds are modelled as harmonic springs. The energy rises with the square of the deviation from an equilibrium length, with a stiffness set by the two atom types. The same form applies to angles between three bonded atoms. These terms are stiff, which is why bond vibrations are the fastest motions in the system and why hydrogen bonds to heavy atoms are usually constrained, as explained in timestep and constraints.

Torsions describe rotation about a bond, using four bonded atoms. The energy is a sum of cosine terms with different periodicities, which reproduces the familiar staggered and eclipsed preferences of an alkane or the planarity of an amide. Torsion parameters are the ones most often refitted when a force field is revised, because they control backbone and side-chain conformational preferences, and small errors shift populations noticeably.

Improper torsions keep groups planar or chiral centres from inverting. They are a correction, not a physical interaction. Force-field terms are a convenient fit, not a derivation from first principles.

The non-bonded terms, Lennard-Jones and Coulomb

Atoms that are not bonded interact through two terms. The Lennard-Jones potential has a steep repulsive wall at short range and a weak attractive tail. Two parameters per atom type, a radius and a well depth, describe it, and pairs of unlike atoms use combination rules such as Lorentz-Berthelot. This term carries dispersion and steric packing, so it decides how snugly a ligand fits a pocket.

Coulomb's law acts between partial charges fixed on each atom. These charges stand in for the electron distribution, and because they never change during a run the model cannot polarise. A carbonyl oxygen next to a cation keeps the same charge as one in bulk water. Polarisable force fields exist, but the common production choices for drug discovery remain fixed-charge.

Non-bonded terms are computed between all pairs within a cutoff, usually about one nanometre. Electrostatics decay too slowly to truncate safely, so the long-range part is handled by particle mesh Ewald, described in the solvation box, periodic boundaries and counter-ions. The Lennard-Jones tail beyond the cutoff is small and is usually corrected analytically.

Protein force fields and the AMBER family

Proteins contain only twenty residue types, so their parameters can be tabulated once and reused. The AMBER family, with ff14SB as a widely used member and ff19SB as a newer one, is the default in OpenMM's bundled files. CHARMM36 is another mature family with its own water model conventions. Each family is internally consistent, and parameters should not be mixed across families without evidence.

Water is its own small force field. TIP3P is a three-site rigid model, one oxygen with negative charge and two hydrogens with positive charge, with Lennard-Jones only on the oxygen. It was fitted alongside the AMBER protein parameters, which is why they are paired. Four-site models such as TIP4P-Ew or OPC reproduce some bulk properties better, at slightly higher cost, and need matching protein parameters.

Small molecules, GAFF and the charge problem

A drug candidate is not in any table. The General AMBER Force Field, GAFF, and its revision GAFF2 solve this with generic atom types defined by element, hybridisation and chemical environment. A perception step assigns types to each atom of the ligand, and bonded and Lennard-Jones parameters follow from the types.

Charges cannot be tabulated this way, because they depend on the whole molecule. The standard route is AM1-BCC, a fast semi-empirical calculation followed by a bond-charge correction fitted to reproduce higher-level electrostatics. A slower alternative is to fit charges to a quantum-chemical electrostatic potential. The Open Force Field initiative provides a different scheme, SMIRNOFF, that assigns parameters by SMARTS patterns rather than atom types. In OpenMM, the openmmforcefields package wraps both.

Take ibuprofen as the worked example. It is a carboxylic acid, ionised at physiological pH, so the input must be the carboxylate, not the neutral acid. The charge assignment differs by a full unit and so does every electrostatic interaction with the protein. The protonation question is the same one that decides ligand preparation for docking, and the rules of pKa and ionisation apply before any parameter is assigned.

from openff.toolkit import Molecule
from openmmforcefields.generators import GAFFTemplateGenerator
from openmm.app import ForceField

ibuprofen = Molecule.from_smiles("CC(C)Cc1ccc(cc1)C(C)C(=O)[O-]")
ibuprofen.generate_conformers(n_conformers=1)
gaff = GAFFTemplateGenerator(molecules=[ibuprofen], forcefield="gaff-2.11")

ff = ForceField("amber14-all.xml", "amber14/tip3p.xml")
ff.registerTemplateGenerator(gaff.generator)
# ff.createSystem(...) now knows protein, water, ions and the ligand

Where force fields fail and how to notice

Fixed charges miss polarisation, so cation-π interactions, halogen bonds and metal coordination are weak points. Harmonic bonds never break, so covalent inhibitors must be built as the final adduct. Generic atom types lose detail for unusual rings, hypervalent sulfur or boron. Torsion parameters for a new scaffold may have been fitted on molecules that look nothing like it, so a ligand may prefer a wrong conformation for reasons unrelated to the protein.

Practical checks catch most problems. Minimise the ligand alone and confirm that its geometry stays sensible. Run a short simulation of the ligand in water and check that rings remain planar and chiral centres keep their configuration. Compare the ligand's preferred torsions with its crystal structure if one exists. None of these checks proves the parameters right, but each can prove them wrong cheaply, before a long run is wasted. On the Advanced Modeling page the same force-field families power the dynamics, and the same limits apply to what comes out.

Key points

Questions people ask

What is a force field in molecular dynamics?
A force field is a potential-energy function plus a table of parameters. The function sums harmonic bond and angle terms, periodic torsion terms, Lennard-Jones terms for van der Waals contacts and Coulomb terms between fixed partial charges. The parameters, such as equilibrium bond lengths and atomic charges, are fitted to quantum chemistry and experiment for classes of atoms called atom types.
What is the difference between AMBER and GAFF?
AMBER protein force fields such as ff14SB are parametrised for the twenty amino acids and nucleic acids, with one well-tested parameter set per residue. GAFF, the General AMBER Force Field, covers arbitrary organic molecules such as drug candidates by assigning generic atom types and computing partial charges per molecule. They are designed to be used together in one system.
Why are partial charges computed for every new ligand?
Protein residues always have the same atoms in the same arrangement, so their charges can be tabulated once. A new ligand has a unique electron distribution, so its charges must be derived for that molecule, usually by a semi-empirical calculation with a bond-charge correction such as AM1-BCC or by a quantum-chemistry fit. Wrong charges give wrong hydrogen bonds and wrong solvation.
Can a classical force field model a chemical reaction?
No. Bond terms are harmonic springs that never break, and atom types never change during a run. Covalent inhibitors, proton transfers and metal coordination chemistry need quantum or hybrid quantum-classical methods, or careful custom parameters that freeze the chemistry at one state.

Further reading

In practice: Advanced Modeling runs molecular dynamics with OpenMM. Nanosecond runs answer narrow questions, such as whether a pose holds; the guides say which questions they cannot answer.

← All guides