# propka.hydrogens

## Hydrogens

Calculations related to hydrogen placement.

Functions

`add_amd_hydrogen`(residue) | Adds Gln & Asn hydrogen atoms to residues according to the 'old way'.
`add_arg_hydrogen`(residue) | Adds Arg hydrogen atoms to residues according to the 'old way'.
`add_backbone_hydrogen`(residue, o_atom, c_atom) | Adds hydrogen backbone atoms to residues according to the old way.
`add_his_hydrogen`(residue) | Adds His hydrogen atoms to residues according to the 'old way'.
`add_trp_hydrogen`(residue) | Adds Trp hydrogen atoms to residues according to the 'old way'.
`make_new_h`(atom, x, y, z) | Add a new hydrogen to an atom at the specified position.
`protonate_30_style`(molecular_container) | Protonate the molecule.
`protonate_average_direction`(x1_atom, ...) | Protonates an atom, x1_atom, given a direction.
`protonate_direction`(x1_atom, x2_atom, x3_atom) | Protonates an atom, x1_atom, given a direction.
`protonate_sp2`(x1_atom, x2_atom, x3_atom) | Protonates a SP2 atom, given a list of atoms
`set_ligand_atom_names`(molecular_container) | Set names for ligands in molecular container.
`setup_bonding`(molecular_container) | Set up bonding for a molecular container.
`setup_bonding_and_protonation`(...) | Set up bonding and protonation for a molecule.
`setup_bonding_and_protonation_30_style`(...) | Set up bonding for a molecular container.

propka.hydrogens.add_amd_hydrogen(residue: List[Atom]) → None

  Adds Gln & Asn hydrogen atoms to residues according to the ‘old way’.

  Parameters:

    residue – glutamine or asparagine residue to protonate

propka.hydrogens.add_arg_hydrogen(residue: List[Atom]) → List[Atom]

  Adds Arg hydrogen atoms to residues according to the ‘old way’.

  Parameters:

    residue – arginine residue to protonate

  Returns:

    list of hydrogen atoms

propka.hydrogens.add_backbone_hydrogen(residue: List[Atom], o_atom: Atom | None, c_atom: Atom | None) → Tuple[Atom | None, Atom | None]

  Adds hydrogen backbone atoms to residues according to the old way.

  dR is wrong for the N-terminus (i.e. first residue) but it doesn’t affect anything at the moment. Could be improved, but works for now.

  Parameters:

    - residue – residue to protonate

    - o_atom – backbone oxygen atom

    - c_atom – backbone carbon atom

  Returns:

    [new backbone oxygen atom, new backbone carbon atom]

propka.hydrogens.add_his_hydrogen(residue: List[Atom]) → None

  Adds His hydrogen atoms to residues according to the ‘old way’.

  Parameters:

    residue – histidine residue to protonate

propka.hydrogens.add_trp_hydrogen(residue: List[Atom]) → None

  Adds Trp hydrogen atoms to residues according to the ‘old way’.

  Parameters:

    residue – tryptophan residue to protonate

propka.hydrogens.make_new_h(atom: Atom, x: float, y: float, z: float) → Atom

  Add a new hydrogen to an atom at the specified position.

  Parameters:

    - atom – atom to protonate

    - x – x position of hydrogen

    - y – y position of hydrogen

    - z – z position of hydrogen

  Returns:

    new hydrogen atom

propka.hydrogens.protonate_30_style(molecular_container: MolecularContainer) → None

  Protonate the molecule.

  Parameters:

    molecular_container – molecule

propka.hydrogens.protonate_average_direction(x1_atom: Atom, x2_atom: Atom, x3_atom: Atom) → Atom

  Protonates an atom, x1_atom, given a direction.

  New direction for x1_atom is (x1_atom/x2_atom -> x3_atom). Note, this one uses the average of x1_atom & x2_atom (N & O) unlike the previous N - C = O

  Parameters:

    - x1_atom – atom to be protonated

    - x2_atom – atom for direction

    - x3_atom – other atom for direction

  Returns:

    new hydrogen atom

propka.hydrogens.protonate_direction(x1_atom: Atom, x2_atom: Atom, x3_atom: Atom) → Atom

  Protonates an atom, x1_atom, given a direction.

  New direction for x1_atom proton is (x2_atom -> x3_atom).

  Parameters:

    - x1_atom – atom to be protonated

    - x2_atom – atom for direction

    - x3_atom – other atom for direction

  Returns:

    new hydrogen atom

propka.hydrogens.protonate_sp2(x1_atom: Atom, x2_atom: Atom, x3_atom: Atom) → Atom

  Protonates a SP2 atom, given a list of atoms

  Parameters:

    - x1_atom – atom to set direction

    - x2_atom – atom to be protonated

    - x3_atom – other atom to set direction

  Returns:

    new hydrogen atom

propka.hydrogens.set_ligand_atom_names(molecular_container: MolecularContainer) → None

  Set names for ligands in molecular container.

  Parameters:

    molecular_container – molecular container for ligand names

propka.hydrogens.setup_bonding(molecular_container: MolecularContainer) → BondMaker

  Set up bonding for a molecular container.

  Parameters:

    molecular_container – the molecular container in question

  Returns:

    BondMaker object

propka.hydrogens.setup_bonding_and_protonation(molecular_container: MolecularContainer) → None

  Set up bonding and protonation for a molecule.

  Parameters:

    - parameters – not used

    - molecular_container – molecule container.

propka.hydrogens.setup_bonding_and_protonation_30_style(molecular_container: MolecularContainer) → BondMaker

  Set up bonding for a molecular container.

  Parameters:

    molecular_container – the molecular container in question

  Returns:

    BondMaker object