INNER CODE UNIT · Python
pka_switchstate
Electrostatics/pdb2pqr · pdb2pqr/hydrogens/__init__.py:181
def pka_switchstate(cls, amb, state_id_):
"""Switch a residue to a new state by first removing all hydrogens.
This routine is used in pKa calculations only!
:param amb: the amibiguity to switch
:type amb: tup
:param state_id_: the state id to switch to
:type state_id_: int
"""
titrationdict = TITRATION_DICT
state_id = titrationdict[state_id_]
state_id = state_id.split("+")
new_state_id = [int(i) for i in state_id]
residue = amb.residue
hdef = amb.hdef
for conf in hdef.conformations:
hname = conf.hname