iphasimulator.naming ==================== .. py:module:: iphasimulator.naming .. autoapi-nested-parse:: Canonical PHA naming helpers. Attributes ---------- .. autoapisummary:: iphasimulator.naming.ResidueRole iphasimulator.naming.MONOMER_TO_POLYMER iphasimulator.naming.POLYMER_TO_MONOMER iphasimulator.naming.LEGACY_MONOMER_ALIASES iphasimulator.naming.RESIDUE_ROLE_SUFFIXES Functions --------- .. autoapisummary:: iphasimulator.naming.canonical_monomer_code iphasimulator.naming.validate_monomer_code iphasimulator.naming.monomer_to_polymer_code iphasimulator.naming.validate_polymer_code iphasimulator.naming.oligomer_name iphasimulator.naming.validate_oligomer_name iphasimulator.naming.multi_chain_system_name iphasimulator.naming.validate_system_name iphasimulator.naming.residue_variant_name iphasimulator.naming.residue_variant_names iphasimulator.naming.validate_pha_name Module Contents --------------- .. py:data:: ResidueRole .. py:data:: MONOMER_TO_POLYMER :type: dict[str, str] .. py:data:: POLYMER_TO_MONOMER :type: dict[str, str] .. py:data:: LEGACY_MONOMER_ALIASES :type: dict[str, str] .. py:data:: RESIDUE_ROLE_SUFFIXES :type: tuple[str, str, str] :value: ('H', 'M', 'T') .. py:function:: canonical_monomer_code(code: str) -> str Return the canonical monomer/residue code, accepting legacy aliases. .. py:function:: validate_monomer_code(code: str) -> str Validate and return a canonical monomer/residue code such as ``3HB``. .. py:function:: monomer_to_polymer_code(monomer_code: str) -> str Convert a monomer/residue code such as ``3HB`` to ``P3HB``. .. py:function:: validate_polymer_code(code: str) -> str Validate and return a polymer code such as ``P3HB``. .. py:function:: oligomer_name(monomer_code: str, repeat_units: int) -> str Return a single-chain oligomer name such as ``P3HB_4``. .. py:function:: validate_oligomer_name(name: str) -> str Validate and return a single-chain oligomer name such as ``P3HO_8``. .. py:function:: multi_chain_system_name(chain_count: int, monomer_code: str | None = None, repeat_units: int | None = None, *, oligomer: str | None = None) -> str Return a multi-chain system name such as ``25_P3HB_3``. .. py:function:: validate_system_name(name: str) -> str Validate and return a multi-chain system name such as ``25_P3HB_3``. .. py:function:: residue_variant_name(monomer_code: str, role: ResidueRole) -> str Return a head/main/tail residue name such as ``3HB_H``. .. py:function:: residue_variant_names(monomer_code: str) -> tuple[str, str, str] Return head, main, and tail residue names for one monomer code. .. py:function:: validate_pha_name(name: str) -> str Validate any canonical PHA monomer, polymer, oligomer, or system name.