Electrostatics / pdb2pqr

PDB2PQR - determining titration states, adding missing atoms, and assigning charges/radii to biomolecules.
http://www.poissonboltzmann.org/
Other
117 stars 34 forks source link

Adding hydrogens to residue with charged first atom creates charged hydrogens #296

Open stefdoerr opened 2 years ago

stefdoerr commented 2 years ago

image It can probably fixed by telling it not to copy the charge of the template atom when creating hydrogens (done here: https://github.com/Electrostatics/pdb2pqr/blob/master/pdb2pqr/structures.py#L135) But I'm a bit afraid to remove that line since I'm not sure what else that templating is used for.

Generally I have a feeling that this templating of atoms is an issue, it has also been in the past. Practically when adding hydrogens you should know their formal charge from the AA database and the only thing which ought to be copied is resname/resid/insertion/chain/segid and nothing else.

stefdoerr commented 2 years ago

From what I can see however there are only names, coordinates and bonds in the DB and no formal charges. Still it might be safer to assume 0 charge.

ipdb> residue.reference.map["HA"].__dict__
{'name': 'HA', 'x': 0.0, 'y': -0.557, 'z': -0.831, 'bonds': ['CA']}