shirtsgroup / InterMol

Conversion tool for molecular simulations
MIT License
191 stars 55 forks source link

Conversion from Desmond cms to Gromacs #330

Open yingyang90 opened 7 years ago

yingyang90 commented 7 years ago

Hi,

I got an error (below) when converting from desmond cms to gromacs files. The cms file (attached) was created with OPLS_2005 force field and desmond version4.5. Is this the reason why desmond_parser.py complains?

The cms file I have been using can be downloaded: https://transfer.sh/FqaAP/desmond_setup_2-out.cms

--------------------Error message-------------------
cresset@cresset-Alienware-15-R3:intermol$ python convert.py --des_in desmond_setup_2-out.cms --gromacs
INFO 2017-04-05 16:56:56 Beginning InterMol conversion

INFO 2017-04-05 16:56:56 InterMol is research software. If you make use of InterMol in scientific publications please cite the following reference:
Shirts, M.R., Klein, C., Swails, J.M. et al. J Comput Aided Mol Des (2016). doi:10.1007/s10822-016-9977-1

Traceback (most recent call last):
  File "convert.py", line 807, in <module>
    main()
  File "convert.py", line 226, in main
    system, prefix = _load_desmond(cms_in=cms_in)
  File "convert.py", line 589, in _load_desmond
    system = des.load(cms_file=cms_in)
  File "/home/cresset/anaconda2/lib/python2.7/site-packages/intermol/desmond/desmond_parser.py", line 39, in load
    return parser.read()
  File "/home/cresset/anaconda2/lib/python2.7/site-packages/intermol/desmond/desmond_parser.py", line 1141, in read
    self.load_ffio_block(molname, self.ffio_blockpos[i], self.fmct_blockpos[i+1]-1)
  File "/home/cresset/anaconda2/lib/python2.7/site-packages/intermol/desmond/desmond_parser.py", line 903, in load_ffio_block
    self.sysDirective[type](*params)
  File "/home/cresset/anaconda2/lib/python2.7/site-packages/intermol/desmond/desmond_parser.py", line 794, in parse_constraints
    if dHH != float(split[9]):
IndexError: list index out of range
------------------End error message-------------------
mrshirts commented 7 years ago

This appears to be an issue in the way the water constraints are parsed in InterMol, which is a known area where there is poor coverage. What water model was this generated with?

I will try to take a look soon, though I am at a meeting the next couple of days, so there may be some delay.

yingyang90 commented 7 years ago

We tried both spc and tip3p, and got the same error.

mrshirts commented 7 years ago

Interesting. OK, I will try to take a look again in the next couple of days (Grant deadline coming up so some time limitations).

mrshirts commented 7 years ago

It's an issue with the constraints on three particular water molecules that Desmond is considering part of the protein (the ones with "HOH" in the m_atoms record. Because of that the constraints section. If you can get Maestro to recognize them as SPC water (like the other water molecules), and not part of the protein, then it should work without any intervention -- I'm not exactly sure how to do that, but it should be possible.

I took a look, and implementing a robust fix may take a couple of days to find time to figure out the logic for what it is doing now; it's combining constrain records in sort of a weird way.

For anyone that cares more about the details, the documentation block for the constraint data for the protein is:

ffio_constraints[1899] { i_ffio_ai i_ffio_aj i_ffio_ak s_ffio_funct r_ffio_c1 r_ffio_c2 i_ffio_al r_ffio_c3

Which goes back and forth between constants and atom indices, which I didn't realize was valid .cms file behavior (I've never seen it before in our tests). So it may take a bit of time to make it handle both setups.

amrhamedp commented 7 years ago

I have the same problem too.....I was not able to solve this and I am not sure how to get compatible cms files even. I tried both schrodinger 2017 and 2016 but in vain

mrshirts commented 7 years ago

Still haven't had time to recode a solution, but it fundamentally has to do with the water molecules being treated as part of the protein. If they CAN be removed safely from the pdb (i.e. they are in places that water would be likely to move into easily once the simulation starts), then that should resolve the problem.

amrhamedp commented 7 years ago

I suspected in the beginning that there were some crystal waters in maestro before adding water to the protein but I removed all of them and still the same error appears.

mrshirts commented 7 years ago

It's possible your files are different from yingyang90's files. If you send me them (michael.shirts@colorado.edu) I can take a look.

mrshirts commented 7 years ago

yingyang90, let me know if the fix I describe above works.

yingyang90 commented 7 years ago

I first tried to replace HOH by SPC, and maestro does recognize them as SPC water. I also tried to delete all crystal waters. However, I kept having the same error.

mrshirts commented 7 years ago

Can you send update files with deleted crystal waters?