MDFactoryMDFactory

CoreComposition

Configuration for the LNP core (internal) sphere.

Attributes

attributemodel_config
= ConfigDict(extra='forbid')
attributespecieslist[SingleMoleculeSpecies]
attributetarget_densityfloat
= Field(0.95, description='Packing density in g/cm^3.', gt=0)
attributereplication_factorint
= Field(1, description='Number of times to replicate unit cell in each dimension.')
attributeinput_fractionsdict[str, float]
= Field(default_factory=dict, description='Original input fractions by resname (preserved for reporting).')

Functions

funcvalidate_fractions(self)CoreComposition

Ensure all species use fractions and they sum to 1.0.

paramself
funccalculate_counts(self, radius, min_count=5)None

Calculate molecule counts for a unit cell that will be replicated.

We pack only 1/n³ of the required molecules (where n = 2, 3, 4, ...) and then replicate the compressed box n times in each dimension. This dramatically speeds up packmol for large systems.

The smallest n is chosen such that all species have at least min_count molecules in the unit cell.

paramself
paramradiusfloat

Core radius in Angstroms.

parammin_countint
= 5

Minimum count per species to ensure representation in unit cell.

Returns

None

On this page