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.ptConfiguration options
| Option | Default | Description |
|---|---|---|
forcefield | openff-2.2.0.offxml | OpenFF force field file. Options include openff-2.2.0.offxml, openff_unconstrained-2.2.0.offxml |
water_model | opc3.offxml | Water model. Options: opc3.offxml, tip3p_fb.offxml, tip4p_fb.offxml |
charge_method | openff-gnn-am1bcc-0.1.0-rc.3.pt | Partial 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.ptOr use the shorthand alias:
parametrization_config:
charge_method: naglTypical performance: ~0.1 seconds per molecule.
Standard AM1-BCC uses semi-empirical quantum mechanics for charge assignment.
parametrization_config:
charge_method: am1bccFor better conformer handling:
parametrization_config:
charge_method: am1bccelf10Typical 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
SILCSBIODIRinconfig.ini)
Configuration:
engine: gromacs
parametrization: cgenffCGenFF does not require additional configuration options as it uses the global installation settings.
Choosing a parametrization method
| Use Case | Recommended Method |
|---|---|
| General small molecules | SMIRNOFF |
| Drug discovery workflows | SMIRNOFF or CGenFF |
| Lipid bilayer simulations | CGenFF (CHARMM36 compatible) |
| Quick prototyping | SMIRNOFF (faster, no license) |
| Compatibility with existing CHARMM systems | CGenFF |
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}.itpParameters are cached by:
- MD engine (
gromacs) - Parametrization method (
cgenfforsmirnoff) - 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:
| Field | Description |
|---|---|
moleculetype | GROMACS molecule type name (hash or standard name for water/ions) |
smiles | Canonical SMILES string |
parametrization | Method used (cgenff or smirnoff) |
parametrization_config | Full configuration used for parametrization |
itp | Path to the molecule's ITP file |
parameter_itp | Path to extra parameters ITP (generated by both CGenFF and SMIRNOFF) |
forcefield_itp | Path 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/silcsbioHigh penalty scores
CGenFF penalty scores indicate parameter quality. Scores > 50 may indicate unreliable parameters.
