User Guide
System Types Understanding mixed box, bilayer, and LNP simulations
MDFactory supports three system-building strategies. Each uses different Pydantic composition models and build functions.
Creates a homogeneous mixture of molecules in a rectangular box. Molecules are packed to a target density using OpenMM compression.
Solution simulations (solvent + solute)
Polymer blends
Small molecule mixtures
Bulk liquid properties
engine : gromacs
simulation_type : mixedbox
parametrization : smirnoff
system :
species :
- smiles : "O"
resname : SOL
count : 900
- smiles : "CCO"
resname : ETH
count : 100
target_density : 1.0
ionization :
neutralize : true
concentration : 0.15
Field Type Default Description specieslist of SingleMoleculeSpecies — Molecules in the system total_countint | null null Total molecule count (used with fractions) target_densityfloat 1.0 Target density in g/cm³ ionizationIonizationConfig see below Ion placement settings
Use count for absolute molecule numbers or fraction for molar ratios (with total_count)
target_density determines the box size — no need to specify box dimensions
Fractions must sum to 1.0 across all species
Builds lipid bilayer systems with water on both sides. Uses OpenMM compression to assemble the bilayer structure, then solvates and ionizes.
Membrane simulations
Lipid phase behavior
Drug permeation studies
Bilayer property calculations (APL, order parameters, thickness)
engine : gromacs
simulation_type : bilayer
parametrization : cgenff
system :
species :
- smiles : "CCCCCCCCCCCCCCCC(=O)OC[C@H](COP(=O)([O-])OCC[N+](C)(C)C)OC(=O)CCCCCCC/C=C \\ CCCCCCCC"
resname : POPC
count : 128
head_atoms : [ 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 ]
tail_atoms : []
z_padding : 20.0
monolayer : false
ionization :
neutralize : true
concentration : 0.15
Field Type Default Description specieslist of LipidSpecies — Lipid molecules (uses LipidSpecies with head/tail atom indices) total_countint | null null Total lipid count (used with fractions) z_paddingfloat 20.0 Water padding above/below bilayer in Å monolayerbool false Build a monolayer instead of bilayer ionizationIonizationConfig see below Ion placement settings
Field Type Default Description smilesstring — Canonical SMILES resnamestring — Residue name (max 4 chars) count or fractionint or float — Number or molar fraction head_atomslist of int [] 0-based atom indices for headgroup (auto-detected if empty) tail_atomslist of int [] 0-based atom indices for tail (auto-detected if empty) branch_atomslist of int [] 0-based atom indices for branch points (auto-detected if empty)
Lipid count must be even for bilayers (split between leaflets)
head_atoms and tail_atoms are auto-detected from SMILES if not provided
Use monolayer: true for monolayer systems
Builds spherical lipid nanoparticle systems with a hydrophobic core and lipid monolayer shell. The build process creates the core and shell separately, merges them, then solvates with spherical exclusion and ionizes.
mRNA vaccine delivery vehicles
Drug encapsulation and delivery
Ionizable lipid formulations
PEGylated nanoparticle systems
engine : gromacs
simulation_type : lnp
parametrization : smirnoff
system :
radius : 60.0
shell_thickness : 28.0
padding : 25.0
core :
species :
- smiles : "IONIZABLE_LIPID_SMILES"
resname : ILN
fraction : 0.4
- smiles : "CHOLESTEROL_SMILES"
resname : CHL
fraction : 0.6
target_density : 0.95
replication_factor : 1
shell :
species :
- smiles : "DSPC_SMILES"
resname : DSP
fraction : 0.5
- smiles : "PEG_LIPID_SMILES"
resname : PEG
fraction : 0.5
z0 : 10.0
area_per_lipid : 65.0
ionization :
neutralize : true
concentration : 0.15
Field Type Default Description radiusfloat — Total LNP radius in Å shell_thicknessfloat 28.0 Lipid monolayer thickness in Å paddingfloat 25.0 Water padding around the nanoparticle in Å coreCoreComposition — Core composition shellShellComposition — Shell composition ionizationIonizationConfig see below Ion placement settings
Field Type Default Description specieslist of SingleMoleculeSpecies — Core molecules (must use fraction) target_densityfloat 0.95 Target density for core packing in g/cm³ replication_factorint 1 Unit cell replication factor
Field Type Default Description specieslist of LipidSpecies — Shell lipids (must use fraction) z0float 10.0 Pivotal plane offset in Å area_per_lipidfloat 65.0 Area per lipid in shell in Ų
Core species must all use fraction (not count), and fractions must sum to 1.0
Shell species must also use fraction summing to 1.0
core_radius is computed as radius - shell_thickness
Molecule counts are calculated automatically from the geometry and density
Include both neutral and protonated forms of ionizable lipids as separate species
All system types support ionization configuration:
Field Type Default Description neutralizebool true Add counter-ions to neutralize system charge concentrationfloat 0.15 Ion concentration in mol/L min_distancefloat 5.0 Minimum distance between ions in Å seedint | null null Random seed for ion placement
Field Type Default Description smilesstring — Canonical isomeric SMILES resnamestring — Residue name (max 4 chars) countint | null null Absolute molecule count fractionfloat | null null Molar fraction (0 to 1)
Either count or fraction must be provided (not both).
System Type Best For Complexity mixedboxSolution chemistry, bulk properties Low bilayerMembrane systems, lipid studies Medium lnpDrug delivery, mRNA vaccines High
All system types use the same parametrization and topology generation workflows. Switch between them by changing the simulation_type field.