iphasimulator.docking_inputs

Polymer-only PDB for docking, from a GROMACS .gro and its topology (notebook 11).

Only the polymer is written: the atoms with one residue name, PHA for systems built with 06A (and the polymer benchmark) or LIG for CHARMM-GUI systems. Before writing, the polymer must be whole: a molecule split across the periodic box would give the docking program a broken structure.

Attributes

MAX_BOND_NM

HYDROGEN_MAX_MASS

WHOLE_MOLECULE_ADVICE

Classes

PolymerWholeCheck

Bonded heavy-atom distances of the polymer (nm).

PolymerPdbExport

Functions

check_polymer_whole(→ PolymerWholeCheck)

Measure every bonded heavy-atom pair of the polymer; whole if all are < max_bond_nm.

export_polymer_pdb(→ PolymerPdbExport)

Write the polymer only (residue_name) as a PDB, after checking it is whole.

Module Contents

iphasimulator.docking_inputs.MAX_BOND_NM = 0.3
iphasimulator.docking_inputs.HYDROGEN_MAX_MASS = 4.0
iphasimulator.docking_inputs.WHOLE_MOLECULE_ADVICE = 'Use a whole-molecule frame instead, e.g. the representative frame from notebook 08 or a frame...
class iphasimulator.docking_inputs.PolymerWholeCheck

Bonded heavy-atom distances of the polymer (nm).

residue_name: str
atoms: int
heavy_bonds: int
longest_bond: tuple[str, str, float]
broken_bonds: tuple[tuple[str, str, float], ...]
max_bond_nm: float = 0.3
property is_whole: bool
class iphasimulator.docking_inputs.PolymerPdbExport
pdb_path: pathlib.Path
atoms: int
check: PolymerWholeCheck
iphasimulator.docking_inputs.check_polymer_whole(gro_path: str | pathlib.Path, topology_path: str | pathlib.Path, residue_name: str = 'PHA', max_bond_nm: float = MAX_BOND_NM) → PolymerWholeCheck

Measure every bonded heavy-atom pair of the polymer; whole if all are < max_bond_nm.

Bonds come from the polymer’s [ moleculetype ] (named like its residue) in the topology or its #include files; coordinates come from the .gro file.

iphasimulator.docking_inputs.export_polymer_pdb(gro_path: str | pathlib.Path, topology_path: str | pathlib.Path, pdb_path: str | pathlib.Path, *, residue_name: str = 'PHA', max_bond_nm: float = MAX_BOND_NM) → PolymerPdbExport

Write the polymer only (residue_name) as a PDB, after checking it is whole.

Raises ValueError without writing anything when a bonded heavy-atom pair is max_bond_nm or longer. Atoms and residues are renumbered from 1, in chain A; coordinates are converted from nm to Å; no box (CRYST1) record is written.