SkillAgentSearch skills...

Openmmforcefields

CHARMM and AMBER forcefields for OpenMM (with small molecule support)

Install / Use

/learn @openmm/Openmmforcefields
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

CI Conda Version Conda Downloads DOI

AMBER, CHARMM, OpenFF, and Espaloma force fields for OpenMM

This repository provides support for AMBER, CHARMM, OpenFF, and Espaloma force fields and small molecule parameterization with GAFF, Espaloma, and Open Force Field Toolkit for OpenMM.

Supported force fields

AMBER: All major AMBER force fields distributed with AmberTools 24.8 from conda-forge, as well as all released GAFF small molecule force fields through 1.81 (GAFF 1.x) and 2.2.20 (GAFF 2.x).

CHARMM: Non-polarizable protein, nucleic acid, and pre-parameterized small molecule force fields available in in the July 2024 CHARMM36 force field release from the Mackerell website. Note that this conversion has not yet been fully validated.

Open Force Field Initiative force fields: All distributed Open Force Field Initiative force fields, including the openff-2.x.y ("Sage") and smirnoff99Frosst series of force fields available through the openff-forcefields package. This is now supported in OpenMM 7.5.0 and later.

Espaloma: Currently espaloma-0.3.2 is supported. See our first espaloma paper and our second paper which focuses on protein-ligand systems and beyond.

Using the force fields

Installation

The openmmforcefields package provides additional AMBER and CHARMM biopolymer force fields, small molecule support through GAFF and the Open Force Field toolkit, and force field conversion tools.

The easiest way to install this package and its requisite dependencies is via conda:

conda install --yes -c conda-forge openmmforcefields

If you optionally have the OpenEye Toolkits installed, openmmforcefields will use these to accelerate small molecule parameterization. Free academic licenses are available for bona fide academic research, while licenses for IP generation are available for a fee.

Support for the SMIRNOFF residue template or system generators requires OpenMM 7.4.2 or later.

Using the AMBER and CHARMM biopolymer force fields

This repository contains force fields for use with the OpenMM ForceField class for parameterizing biomolecular systems. If you're not familiar with this approach to applying parameters to biomolecular systems, please see the OpenMM User Guide.

Using the AMBER force fields

Once installed, the AMBER force fields will be registered in the amber/ relative path searched by openmm.app.ForceField.

For example, to specify the newer recommended ff14SB force field and accompanying recommended ions and solvent models (corresponding to force fields loaded in LEaP with leaprc.protein.ff14SB), prepend the amber prefix and the .xml suffix:

forcefield = ForceField("amber/protein.ff14SB.xml")

To access just the ff14SB force field converted from oldff/leaprc.ff14SB:

forcefield = ForceField("amber/ff14SB.xml")

or to specifically access the older (now outdated) ff99SBildn force field converted from oldff/leaprc.ff14SB:

forcefield = ForceField("amber/ff99SBildn.xml")

The TIP3P conversion also includes the Joung and Cheatham recommended salt models (parm/frcmod.ionsjc_tip3p) and recommended divalent counterion parameters (parm/frcmod.ions234lm_126_tip3p):

forcefield = ForceField(
    "amber/protein.ff14SB.xml",
    "amber/tip3p_standard.xml",
    "amber/tip3p_HFE_multivalent.xml",
)

Using the CHARMM force fields

Similarly, the CHARMM force fields will be registered in the charmm/ relative path:

forcefield = ForceField("charmm/charmm36.xml")

Using AMBER GAFF 1.x and 2.x for small molecules

The openmmforcefields package includes a residue template generator for the OpenMM ForceField class that automatically generates OpenMM residue templates for small molecules lacking parameters using GAFF versions 1 or 2.

Cheminformatics toolkits

The openff-toolkit is used to provide an interface with cheminformatics toolkits to interact with antechamber from the AmberTools package to generate parameters for small molecules. By default, the openff-toolkit will make use of the free and open source RDKit cheminformatics toolkit that is installed automatically, but will optionally use the OpenEye toolkit if it is installed and licensed. The OpenEye toolkit is available for free for academics for non-IP-generating academic research.

On-the-fly template generation for small molecules

Generation of OpenMM-compatible parameters for small molecules encountered in an OpenMM Topology is handled through openmmforcefields.generators.GAFFTemplateGenerator. Because the OpenMM Topology object used by the OpenMM ForceField class does not know the precise chemical identity of molecules represented in the topology---which contain only elements and bonds between them, without stereochemical or bond order information---it is necessary to instruct GAFFTemplateGenerator which small molecules it will encounter in processing the Topology object ahead of time; it then matches these by element and bond pattern.

Specifying molecules

To do this, it is necessary to specify one or more openff.toolkit.topology.Molecule objects which can easily be created from many different representations of small molecules, including SMILES strings and common molecule storage formats. There are many ways to create an OpenFF Molecule object from various file formats as well---see the API docs for more details.

Partial charges for small molecules

If the provided molecule(s) contain nonzero (user-specified) partial charges (stored in the Molecule.partial_charges attribute), those partial charges will be used. If they do not contain partial charges, the OpenFF Toolkit is used to generate them.

  • In GAFFTemplateGenerator, Antechamber from the AmberTools distribution (which uses the sqm semiempirical quantum chemical package) is used to assign AM1-BCC charges (antechamber -c bcc). The conformers used in charge assignment are generated by RDKit.
  • In SMIRNOFFTemplateGenerator, the charges are assigned by the OpenFF software according to the AM1-BCC settings of the SMIRNOFF specification.
    • If OpenEye Toolkits are installed and licensed, OpenEye's Quacpac Toolkit is used to generate AM1-BCC-ELF10 charges. In this case, the conformers used to generate charges are generated by OpenEye's Omega Toolkit.
    • If OpenEye Toolkits are not installed or not licensed, AmberTools's Antechamber/sqm is used to generate AM1-BCC charges in the same way that it is used in GAFFTemplateGenerator. In this case, the conformers used to generate charges are generated by RDKit.

Note: The Molecule object must have the all protons and stereochemistry explicitly specified, and must match the exact protonation and tautomeric

View on GitHub
GitHub Stars353
CategoryCustomer
Updated1d ago
Forks85

Languages

Rich Text Format

Security Score

80/100

Audited on Mar 27, 2026

No findings