openmm / pdbfixer

PDBFixer fixes problems in PDB files
Other
461 stars 115 forks source link

wild/unminimized hydrogen placement #162

Closed nitroamos closed 6 years ago

nitroamos commented 6 years ago

Hi, I'm trying to run PDBFixer on 2x2v. I think I'm using the latest of OpenMM and PDBFixer. I downloaded a fresh pdb from rcsb and then ran this script (as recommended by your manual):

print("\nOpening",args.pdb.name)
if args.pdb.name.endswith(".cif"):
   fixer = PDBFixer(pdbxfile=args.pdb)
else:
   fixer = PDBFixer(filename=args.pdb.name)

fixer.findMissingResidues()
fixer.findNonstandardResidues()
fixer.replaceNonstandardResidues()
fixer.removeHeterogens(True)
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.addMissingHydrogens(7.0)
PDBFile.writeFile(fixer.topology, fixer.positions, open('output.pdb', 'w'))

sometimes hydrogen placement appears ok, other times it's wild, e.g. (full pdb below):

REMARK   1 CREATED WITH OPENMM 7.2.1, 2018-04-17
CRYST1   74.180   97.340  117.255  90.00  90.00  90.00 P 1           1 
ATOM      1  N   MET A   1      34.088 -25.409   2.687  1.00  0.00           N  
ATOM      2  H   MET A   1     165.619 246.377-245.653  1.00  0.00           H  
ATOM      3  H2  MET A   1     -95.455-303.419 239.889  1.00  0.00           H  
ATOM      4  H3  MET A   1      34.335 -21.088  13.490  1.00  0.00           H  
ATOM      5  CA  MET A   1      33.627 -24.102   3.121  1.00  0.00           C  
ATOM      6  HA  MET A   1      33.810 -23.673   4.010  1.00  0.00           H  
ATOM      7  CB  MET A   1      34.264 -23.025   2.252  1.00  0.00           C  
ATOM      8  HB2 MET A   1      34.298 -23.177   1.076  1.00  0.00           H  
ATOM      9  HB3 MET A   1      35.148 -22.421   1.742  1.00  0.00           H  
ATOM     10  CG  MET A   1      34.834 -21.888   3.102  1.00  0.00           C  
ATOM     11  HG2 MET A   1      34.529 -20.941   3.417  1.00  0.00           H  
ATOM     12  HG3 MET A   1      34.996 -20.894   2.829  1.00  0.00           H  
ATOM     13  SD  MET A   1      35.946 -22.446   4.355  1.00  0.00           S  
ATOM     14  CE  MET A   1      36.224 -21.138   5.502  1.00  0.00           C  
ATOM     15  HE1 MET A   1    -585.240-641.834-615.669  1.00  0.00           H  
ATOM     16  HE2 MET A   1    -578.859 599.985 626.635  1.00  0.00           H  
ATOM     17  HE3 MET A   1      22.417 -17.340   9.046  1.00  0.00           H  

If it matters, I think the machine I'm running on has a GPU (based on a stack trace I saw from PDBFixer on this system when adding a membrane).

Any ideas on what I might try?

output.pdb.tar.gz

peastman commented 6 years ago

This might be related to https://github.com/pandegroup/openmm/issues/2025. I was never able to reproduce it in that case, but maybe I'll be able to with your files.

nitroamos commented 6 years ago

it's not consistent, you may have to try a couple times...

also, since there's a random number generator involved, you might consider (if practical) exposing the seed as a parameter. not sure how portable that would be, but it might help with debugging.

peastman commented 6 years ago

I tried four times, but wasn't able to reproduce the problem. It sounds like something is going wrong in the energy minimization step.

You said yesterday in #163 you had installed the latest dev build. By any chance did that fix this problem? I recently made some changes to make energy minimization a bit more robust, so it's possible that's why I'm not seeing it.

nitroamos commented 6 years ago

Yes, I wrote up this issue before switching to the dev branch. I've run the test many times now and haven't seen a problem (and even did a switch back to prod for positive control) so I think you fixed it. Thanks!

peastman commented 6 years ago

Great! For future reference, this is the change that I think probably fixed it: https://github.com/pandegroup/openmm/pull/1984