# propka.group

## Data structures for groups

Routines and classes for storing groups important to PROPKA calculations.

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

Module Attributes

`EXPECTED_ATOMS_ACID_INTERACTIONS` | acids
`EXPECTED_ATOMS_BASE_INTERACTIONS` | bases

Functions

`is_group`(parameters, atom) | Identify whether the atom belongs to a group.
`is_ion_group`(parameters, atom) | Identify whether the atom belongs to an ion group.
`is_ligand_group_by_groups`(_, atom) | Identify whether the atom belongs to a ligand group by checking groups.
`is_ligand_group_by_marvin_pkas`(parameters, atom) | Identify whether the atom belongs to a ligand group by calculating 'Marvin pKas'.
`is_protein_group`(parameters, atom) | Identify whether the atom belongs to a protein group.

Classes

`AMDGroup`(atom) | Amide group.
`ARGGroup`(atom) | Arginine group.
`BBCGroup`(atom) | Backbone carbon group.
`BBNGroup`(atom) | Backbone nitrogen group.
`C2NGroup`(atom) | Amidinium group.
`CGGroup`(atom) | Guadinium group.
`COOGroup`(atom) | Carboxyl group.
`CYSGroup`(atom) | Cysteine group.
`ClGroup`(atom) | Chloride group.
`CtermGroup`(atom) | C-terminus group.
`FGroup`(atom) | Fluoride group.
`Group`(atom) | Class for storing groups important to pKa calculations.
`HISGroup`(atom) | Histidine group.
`IonGroup`(atom) | Ion group.
`LYSGroup`(atom) | Lysine group.
`N1Group`(atom) | Unknown group.
`N30Group`(atom) | Unknown group.
`N31Group`(atom) | Unknown group.
`N32Group`(atom) | Unknown group.
`N33Group`(atom) | Unknown group.
`NAMGroup`(atom) | Unknown group.
`NARGroup`(atom) | Unknown group.
`NP1Group`(atom) | Unknown group.
`NonTitratableLigandGroup`(atom) | Non-titratable ligand group.
`NtermGroup`(atom) | N-terminus group.
`O2Group`(atom) | Unknown group.
`O3Group`(atom) | Unknown group.
`OCOGroup`(atom) | Carboxyl group.
`OHGroup`(atom) | Hydroxide group.
`OPGroup`(atom) | Phosphate group.
`ROHGroup`(atom) | Alcohol group.
`SERGroup`(atom) | Serine group.
`SHGroup`(atom) | Sulfhydryl group.
`TRPGroup`(atom) | Tryptophan group.
`TYRGroup`(atom) | Tyrosine group.
`TitratableLigandGroup`(atom) | Titratable ligand group.

class propka.group.AMDGroup(atom)

  Amide group.

  setup_atoms()

    Setup group.

class propka.group.ARGGroup(atom)

  Arginine group.

  setup_atoms()

    Set up group.

class propka.group.BBCGroup(atom)

  Backbone carbon group.

  setup_atoms()

    Set up atoms in group.

class propka.group.BBNGroup(atom)

  Backbone nitrogen group.

  setup_atoms()

    Set up atoms in group.

class propka.group.C2NGroup(atom)

  Amidinium group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.CGGroup(atom)

  Guadinium group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.COOGroup(atom)

  Carboxyl group.

  setup_atoms()

    Set up group.

class propka.group.CYSGroup(atom)

  Cysteine group.

class propka.group.ClGroup(atom)

  Chloride group.

class propka.group.CtermGroup(atom)

  C-terminus group.

  setup_atoms()

    Set up atoms in group.

propka.group.EXPECTED_ATOMS_ACID_INTERACTIONS = {'AMD': {'H': 2, 'N': 1}, 'ARG': {'H': 5, 'N': 3}, 'BBC': {'O': 1}, 'BBN': {'H': 1, 'N': 1}, 'C-': {'O': 2}, 'C2N': {'H': 4, 'N': 2}, 'CG': {'H': 5, 'N': 3}, 'COO': {'O': 2}, 'CYS': {'S': 1}, 'Cl': {'Cl': 1}, 'F': {'F': 1}, 'HIS': {'H': 2, 'N': 2}, 'LYS': {'N': 1}, 'N+': {'N': 1}, 'N1': {'N': 1}, 'N30': {'H': 4, 'N': 1}, 'N31': {'H': 3, 'N': 1}, 'N32': {'H': 2, 'N': 1}, 'N33': {'H': 1, 'N': 1}, 'NAM': {'H': 1, 'N': 1}, 'NAR': {'H': 1, 'N': 1}, 'NP1': {'H': 2, 'N': 1}, 'O2': {'O': 1}, 'O3': {'O': 1}, 'OCO': {'O': 2}, 'OH': {'H': 1, 'O': 1}, 'OP': {'O': 1}, 'ROH': {'O': 1}, 'SH': {'S': 1}, 'TRP': {'H': 1, 'N': 1}, 'TYR': {'O': 1}}

  acids

propka.group.EXPECTED_ATOMS_BASE_INTERACTIONS = {'AMD': {'O': 1}, 'ARG': {'N': 3}, 'BBC': {'O': 1}, 'BBN': {'H': 1, 'N': 1}, 'C-': {'O': 2}, 'C2N': {'N': 2}, 'CG': {'N': 3}, 'COO': {'O': 2}, 'CYS': {'S': 1}, 'Cl': {'Cl': 1}, 'F': {'F': 1}, 'HIS': {'N': 2}, 'LYS': {'N': 1}, 'N+': {'N': 1}, 'N1': {'N': 1}, 'N30': {'N': 1}, 'N31': {'N': 1}, 'N32': {'N': 1}, 'N33': {'N': 1}, 'NAM': {'H': 1, 'N': 1}, 'NAR': {'H': 1, 'N': 1}, 'NP1': {'N': 1}, 'O2': {'O': 1}, 'O3': {'O': 1}, 'OCO': {'O': 2}, 'OH': {'H': 1, 'O': 1}, 'OP': {'O': 1}, 'ROH': {'O': 1}, 'SH': {'S': 1}, 'TRP': {'N': 1}, 'TYR': {'O': 1}}

  bases

class propka.group.FGroup(atom)

  Fluoride group.

class propka.group.Group(atom: Atom)

  Class for storing groups important to pKa calculations.

  Changed in version 3.4.0: Removed `make_covalently_coupled_line()` and `make_non_covalently_coupled_line()` as writing PROPKA inputs is no longer supported.

  add_determinant(new_determinant: Determinant, type_: str) → None

    Add to current and creates non-present determinants.

    Parameters:

      - new_determinant – new determinant to add

      - type – determinant type

  calculate_charge(_, ph: float = 7.0, state: str = 'folded') → float

    Calculate the charge of the specified state at the specified pH.

    Parameters:

      - _ – parameters for calculation

      - ph – pH value

      - state – “folded” or “unfolded”

    Returns:

      float with charge

  calculate_folding_energy(parameters, ph=None, reference=None)

    Return the electrostatic energy of this residue at specified pH.

    Parameters:

      - parameters – parameters for energy calculation

      - ph – pH value for calculation

      - reference – reference state for calculation

    Returns:

      float describing energy

  calculate_intrinsic_pka()

    Calculate the intrinsic pKa values from the desolvation determinants, back-bone hydrogen bonds, and side-chain hydrogen bonds to non-titratable residues.

  calculate_total_pka()

    Calculate total pKa based on determinants associated with this group.

  clone()

    Create a copy of this group.

    Returns:

      Copy of this group.

  couple_covalently(other: Group) → None

    Couple this group with another group.

    Parameters:

      other – other group for coupling

  couple_non_covalently(other: Group) → None

    Non-covalenthly couple this group with another group.

    Parameters:

      other – other group for coupling

  get_covalently_coupled_groups()

    Get covalently coupled groups.

    Returns:

      list of covalently coupled groups.

  get_determinant_for_string(type_, number)

    Return a string describing determinant.

    Parameters:

      - type – determinant type

      - number – determinant index number

    Returns:

      string

  get_determinant_string(remove_penalised_group=False)

    Create a string to identify this determinant.

    Parameters:

      remove_penalised_group – Boolean flag to remove penalized groups

    Returns:

      string

  get_interaction_atoms(interacting_group: Group) → List[Atom]

    Get atoms involved in interaction with other group.

    Parameters:

      interacting_group – other group

    Returns:

      list of atoms

  get_non_covalently_coupled_groups()

    Get non-covalently coupled groups.

    Returns:

      list of covalently coupled groups.

  get_summary_string(remove_penalised_group: bool = False) → str

    Create summary string for this group.

    Parameters:

      remove_penalised_group – Boolean to ignore penalized groups

    Returns:

      string

  remove_determinants(labels)

    Remove all determinants with specified labels.

    Parameters:

      labels – list of labels to remove

  set_center(atoms)

    Set center of group based on atoms.

    Parameters:

      atoms – list of atoms

  set_determinant(new_determinant: Determinant, type_: str) → None

    Overwrite current and create non-present determinants.

    Parameters:

      - new_determinant – new determinant to add

      - type – determinant type

  set_interaction_atoms(interaction_atoms_for_acids: List[Atom], interaction_atoms_for_bases: List[Atom])

    Set interacting atoms and group types.

    Parameters:

      - interaction_atoms_for_acids – list of atoms for acid interactions

      - interaction_atoms_for_base – list of atoms for base interactions

  setup()

    Set up a group.

  setup_atoms()

    Set up atoms in group.

    This method is overwritten for some types of groups

  share_determinant(new_determinant: Determinant, type_: str) → None

    Add determinant to this group’s list of determinants.

    Parameters:

      - new_determinant – determinant to add

      - type – type of determinant

  share_determinants(others: Iterable[Group]) → None

    Share determinants between this group and others.

    Parameters:

      others – list of other groups

  use_in_calculations() → bool

    Indicate whether group 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.

class propka.group.HISGroup(atom)

  Histidine group.

  setup_atoms()

    Set up atoms in group.

class propka.group.IonGroup(atom)

  Ion group.

class propka.group.LYSGroup(atom)

  Lysine group.

class propka.group.N1Group(atom)

  Unknown group.

  TODO - identify this group.

class propka.group.N30Group(atom)

  Unknown group.

  TODO - identify this group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.N31Group(atom)

  Unknown group.

  TODO - identify this group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.N32Group(atom)

  Unknown group.

  TODO - identify this group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.N33Group(atom)

  Unknown group.

  TODO - identify this group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.NAMGroup(atom)

  Unknown group.

  TODO - identify this group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.NARGroup(atom)

  Unknown group.

  TODO - identify this group.

  setup_atoms()

    Set up atoms in group.

class propka.group.NP1Group(atom)

  Unknown group.

  TODO - identify this group.

  setup_atoms()

    Set up atoms in group.

class propka.group.NonTitratableLigandGroup(atom)

  Non-titratable ligand group.

class propka.group.NtermGroup(atom)

  N-terminus group.

class propka.group.O2Group(atom)

  Unknown group.

  TODO - identify this group.

class propka.group.O3Group(atom)

  Unknown group.

  TODO - identify this group.

class propka.group.OCOGroup(atom)

  Carboxyl group.

  setup_atoms()

    Set up atoms in group.

class propka.group.OHGroup(atom)

  Hydroxide group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.OPGroup(atom)

  Phosphate group.

  setup_atoms()

    Set up atoms in this group.

class propka.group.ROHGroup(atom)

  Alcohol group.

class propka.group.SERGroup(atom)

  Serine group.

class propka.group.SHGroup(atom)

  Sulfhydryl group.

class propka.group.TRPGroup(atom)

  Tryptophan group.

  setup_atoms()

    Set up atoms in group.

class propka.group.TYRGroup(atom)

  Tyrosine group.

class propka.group.TitratableLigandGroup(atom)

  Titratable ligand group.

propka.group.is_group(parameters: Parameters, atom: Atom) → Group | None

  Identify whether the atom belongs to a group.

  Parameters:

    - parameters – parameters for check

    - atom – atom to check

  Returns:

    group for atom or None

propka.group.is_ion_group(parameters, atom: Atom) → Group | None

  Identify whether the atom belongs to an ion group.

  Parameters:

    - parameters – parameters for check

    - atom – atom to check

  Returns:

    group for atom or None

propka.group.is_ligand_group_by_groups(_, atom: Atom) → Group | None

  Identify whether the atom belongs to a ligand group by checking groups.

  Parameters:

    - _ – parameters for check

    - atom – atom to check

  Returns:

    group for atom or None

propka.group.is_ligand_group_by_marvin_pkas(parameters: Parameters, atom: Atom) → Group | None

  Identify whether the atom belongs to a ligand group by calculating ‘Marvin pKas’.

  Parameters:

    - parameters – parameters for check

    - atom – atom to check

  Returns:

    group for atom or None

propka.group.is_protein_group(parameters, atom: Atom) → Group | None

  Identify whether the atom belongs to a protein group.

  Parameters:

    - parameters – parameters for check

    - atom – atom to check

  Returns:

    group for atom or None