MDFactoryMDFactory
User Guide

Parametrization

Force field parametrization methods in MDFactory

MDFactory supports two force field parametrization methods for generating molecular mechanics parameters from SMILES strings. Both generate GROMACS-compatible ITP files.

Available parametrization methods

SMIRNOFF (OpenFF)

The SMIRNOFF parametrization uses the Open Force Field ecosystem to generate parameters. This is the recommended method for most applications.

Advantages:

  • Modern, well-maintained force field (OpenFF 2.x "Sage")
  • Automatic atom typing from SMILES
  • Fast neural network-based partial charge assignment (NAGL)
  • No external license required
  • Parameters embedded directly in ITP files

Configuration:

engine: gromacs
parametrization: smirnoff
parametrization_config:
  forcefield: openff-2.2.0.offxml
  water_model: opc3.offxml
  charge_method: openff-gnn-am1bcc-0.1.0-rc.3.pt

Configuration options

OptionDefaultDescription
forcefieldopenff-2.2.0.offxmlOpenFF force field file. Options include openff-2.2.0.offxml, openff_unconstrained-2.2.0.offxml
water_modelopc3.offxmlWater model. Options: opc3.offxml, tip3p_fb.offxml, tip4p_fb.offxml
charge_methodopenff-gnn-am1bcc-0.1.0-rc.3.ptPartial charge method. NAGL models are fast; am1bcc or am1bccelf10 are slower but standard. nagl is an alias for the default NAGL model.

Charge methods

NAGL uses a graph neural network trained on AM1-BCC charges. It's significantly faster than quantum-mechanical methods.

parametrization_config:
  charge_method: openff-gnn-am1bcc-0.1.0-rc.3.pt

Or use the shorthand alias:

parametrization_config:
  charge_method: nagl

Typical performance: ~0.1 seconds per molecule.

Standard AM1-BCC uses semi-empirical quantum mechanics for charge assignment.

parametrization_config:
  charge_method: am1bcc

For better conformer handling:

parametrization_config:
  charge_method: am1bccelf10

Typical performance: 1-30 seconds per molecule depending on size.

CGenFF

The CGenFF (CHARMM General Force Field) parametrization uses the CGenFF program to generate CHARMM36-compatible parameters.

Third-party software

CGenFF is third-party software developed by SilcsBio / University of Maryland and is not included with MDFactory. A separate CGenFF license is required.

Advantages:

  • Well-validated for drug-like molecules
  • Compatible with CHARMM36 lipid and protein force fields
  • Extensive validation data available

Requirements:

  • CGenFF license and installation (configure SILCSBIODIR in config.ini)

Configuration:

engine: gromacs
parametrization: cgenff

CGenFF does not require additional configuration options as it uses the global installation settings.

Choosing a parametrization method

Use CaseRecommended Method
General small moleculesSMIRNOFF
Drug discovery workflowsSMIRNOFF or CGenFF
Lipid bilayer simulationsCGenFF (CHARMM36 compatible)
Quick prototypingSMIRNOFF (faster, no license)
Compatibility with existing CHARMM systemsCGenFF

Parameter caching

MDFactory automatically caches generated parameters to avoid redundant calculations:

~/.mdfactory/parameters/
└── gromacs/
    ├── cgenff/
    │   └── {molecule_hash}/
    │       ├── {hash}.itp
    │       └── {hash}_extra_params.itp
    └── smirnoff/
        └── {ff_config_hash}/
            └── {molecule_hash}/
                └── {hash}.itp

Parameters are cached by:

  • MD engine (gromacs)
  • Parametrization method (cgenff or smirnoff)
  • Force field configuration hash (for SMIRNOFF — includes forcefield, water model, and charge method)
  • Molecule hash (derived from canonical SMILES)

Parameter set structure

Each parametrized molecule produces a GromacsSingleMoleculeParameterSet containing:

FieldDescription
moleculetypeGROMACS molecule type name (hash or standard name for water/ions)
smilesCanonical SMILES string
parametrizationMethod used (cgenff or smirnoff)
parametrization_configFull configuration used for parametrization
itpPath to the molecule's ITP file
parameter_itpPath to extra parameters ITP (generated by both CGenFF and SMIRNOFF)
forcefield_itpPath to force field ITP (CGenFF only)

Special molecules

Water

Water is handled specially by both parametrization methods:

  • SMIRNOFF: Uses the configured water model (default: OPC3)
  • CGenFF: Uses TIP3P from CHARMM36

Ions

Currently supported ions:

  • Sodium: [Na+]
  • Chloride: [Cl-]

Ions use formal charges and standard ion parameters from the respective force fields.

Troubleshooting

SMIRNOFF issues

"No conformer available"

The molecule needs a 3D conformer for charge assignment. This is handled automatically during parametrization, but may fail for very large or unusual molecules.

"Unsupported atom type"

Some exotic atoms may not be covered by OpenFF. Check the OpenFF coverage.

CGenFF issues

"SILCSBIODIR not set"

Configure the CGenFF installation path in config.ini:

[cgenff]
SILCSBIODIR = /path/to/silcsbio

High penalty scores

CGenFF penalty scores indicate parameter quality. Scores > 50 may indicate unreliable parameters.

Next steps

On this page