# propka.conformation_container

## Molecular data structures

Container data structure for molecular conformations.

Module Attributes

`UNICODE_MULTIPLIER` | A large number that gets multipled with the integer obtained from applying `ord()` to the atom chain ID.
`RESIDUE_MULTIPLIER` | A number that gets mutiplied with an atom's residue number.

Classes

`ConformationContainer`(name, parameters, ...) | Container for molecular conformations

class propka.conformation_container.ConformationContainer(name: str, parameters: Parameters, molecular_container: MolecularContainer)

  Container for molecular conformations

  Changed in version 3.4.0: Removed `additional_setup_when_reading_input_files()` as reading PROPKA inputs is no longer supported.

  add_atom(atom: Atom)

    Add atom to container.

    Parameters:

      atom – atom to add

  calculate_charge(parameters: Parameters, ph: float)

    Calculate charge for folded and unfolded states.

    Parameters:

      - parameters – parameters for calculation

      - ph – pH for calculation

    Returns:

      1. charge for unfolded state

      2. charge for folded state

  calculate_folding_energy(ph=None, reference=None)

    Calculate folding energy over all groups in conformation container.

    Parameters:

      - ph – pH for calculation

      - reference – reference state

    Returns:

      folding energy TODO - need units

  calculate_pka(version: Version, options: Options)

    Calculate pKas for conformation container.

    Parameters:

      - version – version object

      - options – option object

  copy_atom(atom)

    Add a copy of the atom to container.

    Parameters:

      atom – atom to copy and add

  coupling_effects()

    Penalize groups based on coupling effects.

    Bases: The group with the highest pKa (the most stable one in the charged form) will be the first one to adopt a proton as pH is lowered and this group is allowed to titrate. The remaining groups are penalised.

    Acids: The group with the highest pKa (the least stable one in the charged form) will be the last group to loose the proton as pH is raised and will be penalised. The remaining groups are allowed to titrate.

  extract_groups()

    Generate molecular groups needed for calculating pKa values.

  find_bonded_titratable_groups(atom: Atom, num_bonds: int, original_atom: Atom)

    Find bonded titrable groups.

    Parameters:

      - atom – atom to check for bonds

      - num_bonds – number of bonds for coupling

      - original_atom – another atom to check for bonds

    Returns:

      a set of bonded atom groups

  find_covalently_coupled_groups()

    Find covalently coupled groups and set common charge centres.

  find_group(group)

    Find a group in the container.

    Parameters:

      group – group to find

    Returns:

      False (if group not found) or group

  find_non_covalently_coupled_groups(verbose=False)

    Find non-covalently coupled groups and set common charge centres.

    Parameters:

      verbose – verbose output

  get_a_coupled_system_of_groups(new_group: Group, coupled_groups: Set[Group], get_coupled_groups: Callable[[Group], List[Group]])

    Set up coupled systems of groups.

    Parameters:

      - new_group – added to coupled_groups

      - coupled_groups – existing coupled groups

      - get_coupled_groups – TODO - I don’t know what this

  get_acids()

    Get acid groups needed for pKa calculations.

    Returns:

      list of groups

  get_backbone_co_groups()

    Get CO backbone groups needed for pKa calculations.

    Returns:

      list of groups

  get_backbone_groups() → List[Group]

    Get backbone groups needed for the pKa calculations.

    Returns:

      list of groups

  get_backbone_nh_groups()

    Get NH backbone groups needed for pKa calculations.

    Returns:

      list of groups

  get_backbone_reorganisation_groups()

    Get groups involved with backbone reorganization.

    Returns:

      list of groups

  get_chain(chain: str) → List[Atom]

    Get atoms associated with a specific chain.

    Parameters:

      chain – chain to select

    Returns:

      list of atoms

  get_coupled_systems(groups: Iterable[Group], get_coupled_groups: Callable[[Group], List[Group]]) → Iterator[Set[Group]]

    A generator that yields covalently coupled systems.

    Parameters:

      - groups – groups for generating coupled systems

      - get_coupled_groups – TODO - I don’t know what this is

    Yields:

      covalently coupled systems

  get_covalently_coupled_groups()

    Get covalently coupled groups needed for pKa calculations.

    Returns:

      list of groups

  get_group_names(group_list: NoReturn) → NoReturn

    Get names of groups in list.

    Parameters:

      group_list – list to check

    Returns:

      list of groups

  get_groups_for_calculations()

    Get a list of groups that should be included in results report.

    If –titrate_only option is specified, only residues that are titratable and are in that list are included; otherwise all titratable residues and CYS residues are included.

    Returns:

      list of groups

  get_groups_in_residue(residue)

    Get residue groups needed for pKa calculations.

    Parameters:

      residue – specific residue with groups

    Returns:

      list of groups

  get_heavy_ligand_atoms() → List[Atom]

    Get heavy atoms associated with ligands.

    Returns:

      list of atoms

  get_ions()

    Get ion groups.

    Returns:

      list of groups

  get_ligand_atoms() → List[Atom]

    Get atoms associated with ligands.

    Returns:

      list of atoms

  get_non_covalently_coupled_groups()

    Get non-covalently coupled groups needed for pKa calculations.

    Returns:

      list of groups

  get_non_hydrogen_atoms()

    Get atoms that are not hydrogens.

    Returns:

      list of atoms

  get_sidechain_groups()

    Get sidechain groups needed for the pKa calculations.

    Returns:

      list of groups

  get_titratable_groups()

    Get all titratable groups needed for pKa calculations.

    Returns:

      list of groups

  init_group(group: Group)

    Initialize the given Group object.

    Parameters:

      group – group object to initialize

  set_common_charge_centres()

    Assign charge centers to groups.

  set_ligand_atom_names()

    Set names for atoms in ligands.

  setup_and_add_group(group: Group | None)

    Check if we want to include this group in the calculations.

    Parameters:

      group – group to check

  static share_determinants(groups: Iterable[Group])

    Share sidechain, backbone, and Coloumb determinants between groups.

    Parameters:

      groups – groups to share between

  sort_atoms()

    Sort atoms by self.sort_atoms_key() and renumber.

  static sort_atoms_key(atom: Atom) → float

    Generate key for atom sorting.

    Parameters:

      atom – atom for key generation.

    Returns:

      key for atom

  top_up(other)

    Adds any atoms found in other but not in this container.

    Tops up self with all atoms found in other but not in self.

    Parameters:

      other – conformation container with atoms to add

  top_up_from_atoms(other_atoms: Iterable[Atom])

    Adds atoms which are missing from this container.

    Parameters:

      other_atoms – Reference atoms

propka.conformation_container.RESIDUE_MULTIPLIER = 1000

  A number that gets mutiplied with an atom’s residue number. Used in calculating keys for atom sorting.

propka.conformation_container.UNICODE_MULTIPLIER = 10000000.0

  A large number that gets multipled with the integer obtained from applying `ord()` to the atom chain ID. Used in calculating atom keys for sorting.