# propka.iterative

## Working with Determinants

Iterative functions for pKa calculations. These appear to mostly involve `propka.determinant.Determinant` instances.

Functions

`add_determinants`(iterative_interactions, version) | Add determinants iteratively.
`add_iterative_acid_pair`(object1, object2, ...) | Add the Coulomb 'iterative' interaction (an acid pair).
`add_iterative_base_pair`(object1, object2, ...) | Add the Coulomb 'iterative' interaction (a base pair).
`add_iterative_ion_pair`(object1, object2, ...) | Add the Coulomb 'iterative' interaction (an acid-base pair)
`add_to_determinant_list`(group1, group2, ...) | Add iterative determinantes to the list.
`find_iterative`(pair, iteratives) | Find the 'iteratives' that correspond to the groups in 'pair'.

Classes

`Iterative`(group) | Iterative class - pKa values and references of iterative groups.

class propka.iterative.Iterative(group: Group)

  Iterative class - pKa values and references of iterative groups.

  NOTE - this class has a fake determinant list, true determinants are made after the iterations are finished.

propka.iterative.add_determinants(iterative_interactions: List[list], version: Version, _=None)

  Add determinants iteratively.

  The iterative pKa scheme. Later it is all added in ‘calculateTotalPKA’

  Parameters:

    - iterative_interactions – list of iterative interactions

    - version – version object

    - _ – options object

propka.iterative.add_iterative_acid_pair(object1: Iterative, object2: Iterative, interaction: list)

  Add the Coulomb ‘iterative’ interaction (an acid pair).

  The higher pKa is raised with QQ+HB The lower pKa is lowered with HB

  Parameters:

    - object1 – first object in pair

    - object2 – second object in pair

    - interaction – list with [values, annihilation]

propka.iterative.add_iterative_base_pair(object1: Iterative, object2: Iterative, interaction: list)

  Add the Coulomb ‘iterative’ interaction (a base pair).

  The lower pKa is lowered

  Parameters:

    - object1 – first object in pair

    - object2 – second object in pair

    - interaction – list with [values, annihilation]

propka.iterative.add_iterative_ion_pair(object1: Iterative, object2: Iterative, interaction: list, version: Version)

  Add the Coulomb ‘iterative’ interaction (an acid-base pair)

  the pKa of the acid is lowered & the pKa of the base is raised

  Parameters:

    - object1 – first object in pair

    - object2 – second object in pair

    - interaction – list with [values, annihilation]

    - version – version object

propka.iterative.add_to_determinant_list(group1: Group, group2: Group, distance: float, iterative_interactions: List[list], version: Version)

  Add iterative determinantes to the list.

  [[R1, R2], [side-chain, coulomb], [A1, A2]], …

  NOTE - sign is determined when the interaction is added to the iterative

    object!

  NOTE - distance < coulomb_cutoff here

  Parameters:

    - group1 – first group in pair

    - group2 – second group in pair

    - distance – distance between groups

    - iterative_interactions – interaction list to modify

    - version – version object

propka.iterative.find_iterative(pair: Sequence[Group], iteratives: Iterable[Iterative]) → Tuple[Iterative, Iterative]

  Find the ‘iteratives’ that correspond to the groups in ‘pair’.

  Parameters:

    - pair – groups to match

    - iteratives – list of iteratives to search

  Returns:

    1. first matched iterative

    2. second matched iterative