Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong placement of added hydrogens. #179

Open
niko97320 opened this issue Oct 16, 2018 · 9 comments
Open

Wrong placement of added hydrogens. #179

niko97320 opened this issue Oct 16, 2018 · 9 comments

Comments

@niko97320
Copy link

niko97320 commented Oct 16, 2018

Dear all,

I have noticed a problem when adding hydrogens to a structure resolved in Xray and pre-processed with Maestro. Sadly I cannot share the details of the structure but here is a snapshot of one of the many misplaced hydrogen atoms.

pb_h_pdbfixer

The code which leads to the aforementioned artefact is as follows :

from pdbfixer import PDBFixer
from simtk.openmm.app import PDBFile
from simtk.unit import *
from simtk.openmm.vec3 import Vec3

inpPdb = 'XXX.pdb'

fileName  = inpPdb.split('.')[0]
extension = inpPdb.split('.')[-1]

fixer = PDBFixer(filename=inpPdb)
fixer.findMissingResidues()
fixer.findNonstandardResidues()
fixer.replaceNonstandardResidues()
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.addMissingHydrogens(7.4)
PDBFile.writeFile(fixer.topology, fixer.positions, open(str(fileName)+"_vac."+str(extension), 'w'))

Hope this helps, cheers
NM

@nitroamos
Copy link

A user of my tool reported this problem to me, too, in his case from Arginine, which I haven't bothered trying to resolve with PDBFixer.

@peastman
Copy link
Member

Adding hydrogens is done in two steps. First, it just sticks the hydrogens at mostly random positions, not worrying about whether they're realistic. Then it runs a local energy minimization to move them into more reasonable positions. In your case, it looks like the local energy minimization is failing. I can't tell why without access to your file. Usually it means there's some piece of the system that's producing huge forces, a severe clash between atoms or something like that, that causes the minimizer to give up without doing anything.

@peastman
Copy link
Member

If you're using OpenMM 7.2.2, you might try installing the beta of 7.3. It includes a change to make the minimizer a bit more robust in the presence of very large forces.

@nitroamos
Copy link

In my case, I think I'm using post-7.2.2, although I haven't updated since July I think. According to conda list, I'm using

openmm                    7.3.2                    py36_0    omnia/label/dev

However, if I dig into site-packages, my version.py says full_version = '7.2.1.dev-f9106dd' so unless version.py is only regenerated for official releases maybe I'm not sure what I've got.

@peastman
Copy link
Member

If you updated in July you have the changes to LocalEnergyMinimizer. They were made longer ago than that.

@niko97320
Copy link
Author

Hi all !

Thank you for you answers. I will try to install the beta version. Is it the one on the GitHub? I couldn't find the version.

I should also report that the hydrogens already present in my input PDB files are either removed and added back by openMM or are somehow minimized since they have moved.
It is particularly harmful in my case where I have crystallographic water that I wish to keep still.

Nevertheless, I don't know if similarly to what opennMM.Modeller it should keep the already described hydrogens.

@peastman
Copy link
Member

You can install the beta with

conda install -c omnia/label/beta openmm

Give that a try.

@niko97320
Copy link
Author

It seems that the 7.3 solves most of the problems indeed !
However the hydrogens of several water molecules have moved compared to the input PDB, probably because of the minimization steps. Would it be feasible to keep them restrained?
It would be nice to have an output somewhere mentioning the minimization of the hydrogens crashed though.

@peastman
Copy link
Member

It seems that the 7.3 solves most of the problems indeed !

Great!

However the hydrogens of several water molecules have moved compared to the input PDB, probably because of the minimization steps. Would it be feasible to keep them restrained?

Good idea. Currently it performs minimization of all hydrogens. It would be better to only minimize the ones that have just been added. I'll mark this issue as a feature request to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants