iphasimulator.docking_inputs ============================ .. py:module:: iphasimulator.docking_inputs .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: iphasimulator.docking_inputs.MAX_BOND_NM iphasimulator.docking_inputs.HYDROGEN_MAX_MASS iphasimulator.docking_inputs.WHOLE_MOLECULE_ADVICE Classes ------- .. autoapisummary:: iphasimulator.docking_inputs.PolymerWholeCheck iphasimulator.docking_inputs.PolymerPdbExport Functions --------- .. autoapisummary:: iphasimulator.docking_inputs.check_polymer_whole iphasimulator.docking_inputs.export_polymer_pdb Module Contents --------------- .. py:data:: MAX_BOND_NM :value: 0.3 .. py:data:: HYDROGEN_MAX_MASS :value: 4.0 .. py:data:: WHOLE_MOLECULE_ADVICE :value: 'Use a whole-molecule frame instead, e.g. the representative frame from notebook 08 or a frame... .. py:class:: PolymerWholeCheck Bonded heavy-atom distances of the polymer (nm). .. py:attribute:: residue_name :type: str .. py:attribute:: atoms :type: int .. py:attribute:: heavy_bonds :type: int .. py:attribute:: longest_bond :type: tuple[str, str, float] .. py:attribute:: broken_bonds :type: tuple[tuple[str, str, float], ...] .. py:attribute:: max_bond_nm :type: float :value: 0.3 .. py:property:: is_whole :type: bool .. py:class:: PolymerPdbExport .. py:attribute:: pdb_path :type: pathlib.Path .. py:attribute:: atoms :type: int .. py:attribute:: check :type: PolymerWholeCheck .. py:function:: 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. .. py:function:: 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.