iphasimulator.naming

Canonical PHA naming helpers.

Attributes

ResidueRole

MONOMER_TO_POLYMER

POLYMER_TO_MONOMER

LEGACY_MONOMER_ALIASES

RESIDUE_ROLE_SUFFIXES

Functions

canonical_monomer_code(→ str)

Return the canonical monomer/residue code, accepting legacy aliases.

validate_monomer_code(→ str)

Validate and return a canonical monomer/residue code such as 3HB.

monomer_to_polymer_code(→ str)

Convert a monomer/residue code such as 3HB to P3HB.

validate_polymer_code(→ str)

Validate and return a polymer code such as P3HB.

oligomer_name(→ str)

Return a single-chain oligomer name such as P3HB_4.

validate_oligomer_name(→ str)

Validate and return a single-chain oligomer name such as P3HO_8.

multi_chain_system_name(→ str)

Return a multi-chain system name such as 25_P3HB_3.

validate_system_name(→ str)

Validate and return a multi-chain system name such as 25_P3HB_3.

residue_variant_name(→ str)

Return a head/main/tail residue name such as 3HB_H.

residue_variant_names(→ tuple[str, str, str])

Return head, main, and tail residue names for one monomer code.

validate_pha_name(→ str)

Validate any canonical PHA monomer, polymer, oligomer, or system name.

Module Contents

iphasimulator.naming.ResidueRole
iphasimulator.naming.MONOMER_TO_POLYMER: dict[str, str]
iphasimulator.naming.POLYMER_TO_MONOMER: dict[str, str]
iphasimulator.naming.LEGACY_MONOMER_ALIASES: dict[str, str]
iphasimulator.naming.RESIDUE_ROLE_SUFFIXES: tuple[str, str, str] = ('H', 'M', 'T')
iphasimulator.naming.canonical_monomer_code(code: str) → str

Return the canonical monomer/residue code, accepting legacy aliases.

iphasimulator.naming.validate_monomer_code(code: str) → str

Validate and return a canonical monomer/residue code such as 3HB.

iphasimulator.naming.monomer_to_polymer_code(monomer_code: str) → str

Convert a monomer/residue code such as 3HB to P3HB.

iphasimulator.naming.validate_polymer_code(code: str) → str

Validate and return a polymer code such as P3HB.

iphasimulator.naming.oligomer_name(monomer_code: str, repeat_units: int) → str

Return a single-chain oligomer name such as P3HB_4.

iphasimulator.naming.validate_oligomer_name(name: str) → str

Validate and return a single-chain oligomer name such as P3HO_8.

iphasimulator.naming.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.

iphasimulator.naming.validate_system_name(name: str) → str

Validate and return a multi-chain system name such as 25_P3HB_3.

iphasimulator.naming.residue_variant_name(monomer_code: str, role: ResidueRole) → str

Return a head/main/tail residue name such as 3HB_H.

iphasimulator.naming.residue_variant_names(monomer_code: str) → tuple[str, str, str]

Return head, main, and tail residue names for one monomer code.

iphasimulator.naming.validate_pha_name(name: str) → str

Validate any canonical PHA monomer, polymer, oligomer, or system name.