iphasimulator.system_builder_packmol

Advanced Packmol-based solvated-system builder.

This module is intentionally separate from the simple GROMACS solvate/genion route. It prepares Packmol inputs for future realistic polymer simulations while keeping the quick validation workflow lightweight.

Attributes

AVOGADRO_CONSTANT

LITERS_PER_NM3

TIP3P_WATER_DENSITY_PER_NM3

TIP3P_WATER_PDB

SODIUM_PDB

CHLORIDE_PDB

Classes

PackmolBuildResult

Files and counts produced by the Packmol solvated-system builder.

Functions

estimate_tip3p_water_count(→ int)

Estimate the number of TIP3P waters for a cubic box at bulk density.

estimate_ion_pairs(→ int)

Estimate NaCl ion pairs from molarity and cubic box volume.

build_packmol_solvated_system(→ PackmolBuildResult)

Build an advanced solvated PHA/TIP3P/NaCl initial PDB using Packmol.

Module Contents

iphasimulator.system_builder_packmol.AVOGADRO_CONSTANT = 6.02214076e+23
iphasimulator.system_builder_packmol.LITERS_PER_NM3 = 1e-24
iphasimulator.system_builder_packmol.TIP3P_WATER_DENSITY_PER_NM3 = 33.367
iphasimulator.system_builder_packmol.TIP3P_WATER_PDB = Multiline-String
Show Value
"""HETATM    1  O   WAT A   1       0.000   0.000   0.000  1.00  0.00           O
HETATM    2  H1  WAT A   1       0.096   0.000   0.000  1.00  0.00           H
HETATM    3  H2  WAT A   1      -0.024   0.093   0.000  1.00  0.00           H
END
"""
iphasimulator.system_builder_packmol.SODIUM_PDB = Multiline-String
Show Value
"""HETATM    1 NA   NA  A   1       0.000   0.000   0.000  1.00  0.00          Na
END
"""
iphasimulator.system_builder_packmol.CHLORIDE_PDB = Multiline-String
Show Value
"""HETATM    1 CL   CL  A   1       0.000   0.000   0.000  1.00  0.00          Cl
END
"""
class iphasimulator.system_builder_packmol.PackmolBuildResult

Files and counts produced by the Packmol solvated-system builder.

output_dir: pathlib.Path
solvated_pdb_path: pathlib.Path
packmol_input_path: pathlib.Path
packmol_log_path: pathlib.Path
copied_polymer_paths: tuple[pathlib.Path, ...]
support_structure_paths: tuple[pathlib.Path, ...]
box_size_nm: float
water_count: int
sodium_count: int
chloride_count: int
polymer_counts: tuple[int, ...]
iphasimulator.system_builder_packmol.estimate_tip3p_water_count(box_size_nm: float) → int

Estimate the number of TIP3P waters for a cubic box at bulk density.

iphasimulator.system_builder_packmol.estimate_ion_pairs(box_size_nm: float, nacl_concentration_molar: float) → int

Estimate NaCl ion pairs from molarity and cubic box volume.

iphasimulator.system_builder_packmol.build_packmol_solvated_system(polymer_structures: collections.abc.Sequence[str | pathlib.Path], output_dir: str | pathlib.Path, *, box_size_nm: float, water_model: str = 'tip3p', nacl_concentration_molar: float = 0.15, num_polymers: int | collections.abc.Sequence[int] = 1, polymer_spacing_nm: float = 1.0, packmol_command: str = 'packmol', run_packmol: bool = True, runner=subprocess.run) → PackmolBuildResult

Build an advanced solvated PHA/TIP3P/NaCl initial PDB using Packmol.

This route does not replace the standard GROMACS solvate/genion workflow. It is an advanced builder for future realistic polymer simulations and can later be extended to enzyme/polymer systems. Membranes are intentionally not implemented here yet.