leeping / forcebalance

Systematic force field optimization.
Other
145 stars 75 forks source link

OpenMM loading PDB error matching water residue #106

Open yudongqiu opened 6 years ago

yudongqiu commented 6 years ago

Description: When parameterizing water model using Liquid targets, OpenMM engine gives error when loading liquid.pdb: ValueError: Residue 4 (HOH) does not match any template defined by the ForceField.

To reproduce error: Decompress zip file, go into the folder openmm_residue_match_issue, run python npt.py openmm 273.15 1.00. Will call this folder "debug folder" below.

Initial investigation on source of error: 3 versions of liquid.pdb are compared.

  1. First is provided in the targets/Liquid folder, same as /forcebalance/studies/005_iamoeba/targets/Liquid/liquid.pdb, renamed to orig_liquid.pdb in debug folder. Using this file as liquid.pdb will triggle residue matching error from Residue 1.
  2. Second one is generated by the new ForceBalance molecule.py, renamed to backup.pdb in debug folder, this version of liquid.pdb uses HETATM entry and deleted CONECT for water, which I think is not the cause of error. Using this file as liquid.pdb will triggle residue matching error from Residue 1.
  3. Third one is a mixed version for finding the cause of error, named liquid.pdb in the debug folder. Here the residue match error occurs at the 4th residue. Compare it to the 3rd residue, the only difference is the atomnames are changed, from O H1 H2 to O1 H2 H3, and despite the provided CONECT record, the residue matching error is still triggered.

An walk around of this error would be to avoid the atomnames O1 H2 H3 for water residue in PDB file. Further investigation is needed to fully understand this error. This error did not occur when I used previous version of OpenMM (7.0) but happens when using the current version OpenMM 7.2

openmm_residue_match_issue.zip

leeping commented 6 years ago

Hi Yudong, do you think the issue would be resolved simply by renaming all the atom names in the PDB to O H1 H2? If so, maybe we should just do that.

yudongqiu commented 6 years ago

@leeping Yes, I did that as a walk around for this error. I feel that this error might be confusing to other people, so I created the issue for potential further investigation on this error.