template residue error

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Omar Abuyaman
Posts: 10
Joined: Mon Apr 22, 2019 11:12 am

template residue error

Post by Omar Abuyaman » Sun Jun 09, 2019 9:33 pm

I have no or very limited knowledge in programming
I started a project to do MD for Cobalamin (vitamin b12) with its receptor and transporter.
as you may expect, I got error for no template for residues for the ligand vitamin b12.
luckily there is a published article where they made parameter and topology file for vitamin b12 in its different forms, these files in the links bellow and have txt file type.
I tried a lot for like a month to implement these files to run my MD on OPENMM with no success, so I wonder if there is a possible way that suite my limited knowledge in programming to convert these files to force field in XML that openmm can recognize and so solve my issue.

http://pubs.acs.org/doi/suppl/10.1021/a ... si_002.txt
http://pubs.acs.org/doi/suppl/10.1021/a ... si_003.txt

All the best
Omar

User avatar
Peter Eastman
Posts: 1789
Joined: Thu Aug 09, 2007 1:25 pm

Re: template residue error

Post by Peter Eastman » Mon Jun 10, 2019 8:39 am

Those files are in CHARMM format. Although they've been given the .txt extension, one is actually a .rtf file and the other is a .prm file. There are a couple of options.

First, you could use ParmEd (https://github.com/ParmEd/ParmEd) to convert the files to an OpenMM force field file. You could then build the system directly in OpenMM, specifying that file along with whatever force field you use for the rest of the system.

Another option is to use the CHARMM utilities to build your model. That will produce a .psf file which OpenMM can load using the CharmmPsfFile class.

Either way, check the article those parameters came from to find out what force field they're supposed to be used with. Using them with any other force field probably won't produce good results.

User avatar
Omar Abuyaman
Posts: 10
Joined: Mon Apr 22, 2019 11:12 am

Re: template residue error

Post by Omar Abuyaman » Mon Jun 10, 2019 10:49 pm

Thanks a lot Peter , i will try my best based on your instruction and come back to tell if i succeed or fail.

User avatar
Omar Abuyaman
Posts: 10
Joined: Mon Apr 22, 2019 11:12 am

Re: template residue error

Post by Omar Abuyaman » Thu Jun 13, 2019 12:42 am

peastman wrote:
Mon Jun 10, 2019 8:39 am
Those files are in CHARMM format. Although they've been given the .txt extension, one is actually a .rtf file and the other is a .prm file. There are a couple of options.

First, you could use ParmEd (https://github.com/ParmEd/ParmEd) to convert the files to an OpenMM force field file. You could then build the system directly in OpenMM, specifying that file along with whatever force field you use for the rest of the system.

Another option is to use the CHARMM utilities to build your model. That will produce a .psf file which OpenMM can load using the CharmmPsfFile class.

Either way, check the article those parameters came from to find out what force field they're supposed to be used with. Using them with any other force field probably won't produce good results.
I installed parmed using anaconda install but I have no clue about how to convert the charmm rtf and prm files to openmm ff files using parmed so I went to the second option that you suggest and did the following
1. I convert b12 PDB to psf and crd files using discovery studio 2016,
2. from the openmm-setup , i choose simulation by charmm files and upload the psf and crd files and in the field of parameters files I upload the rtf and prm files and then click run simulation
3. I got the following error:

The simulation failed with the following error:

Could not parse dihedrals.

Details:

Traceback (most recent call last):
File "C:\Users\Fun\Anaconda3\lib\site-packages\simtk\openmm\app\charmmparameterset.py", line 346, in readParameterFile
phase = conv(words[6], float, 'dihedral phase')
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Fun\Anaconda3\lib\site-packages\openmmsetup\openmmsetup.py", line 396, in simulate
exec(script, {"output":output, "outputDir":outputDir})
File "<string>", line 23, in <module>
File "C:\Users\Fun\Anaconda3\lib\site-packages\simtk\openmm\app\charmmparameterset.py", line 147, in __init__
for par in pars: self.readParameterFile(par, permissive=permissive)
File "C:\Users\Fun\Anaconda3\lib\site-packages\simtk\openmm\app\charmmparameterset.py", line 348, in readParameterFile
raise CharmmFileError('Could not parse dihedrals.')
simtk.openmm.app.internal.charmm.exceptions.CharmmFileError: Could not parse dihedrals.

I hope I am now closer to resolve the issue, any kind advice about what to do from here?

User avatar
Peter Eastman
Posts: 1789
Joined: Thu Aug 09, 2007 1:25 pm

Re: template residue error

Post by Peter Eastman » Fri Jun 14, 2019 11:17 am

Could you post your files? I can take a look and see what's happening.

User avatar
Omar Abuyaman
Posts: 10
Joined: Mon Apr 22, 2019 11:12 am

Re: template residue error

Post by Omar Abuyaman » Fri Jun 14, 2019 9:20 pm

Hi Peter
really appreciate your time looking into this.
Kindly remove the .TXT from files name as i was unable to upload them without adding TXT to there name.
the topology file is the same as found in publication except that i rename the residue CO3 to CNC by simply edit the txt file and replaced CO3 with CNC.
the crd and psf are generated by discovery studio by simply open the attached pdb file and save them as psf or crd after applying force-field.
the b12.pdb is coming from 4zrp RCSB where i removed the protein and other components and kept the b12 itself using discovery studio.
please let me know if you need more info from me so you can resolve this issue
Attachments
Parameter file for cobalamins.prm.TXT
(89.43 KiB) Downloaded 12 times
b12.psf.TXT
(58.11 KiB) Downloaded 10 times
b12.crd.TXT
(25.2 KiB) Downloaded 8 times
b12.pdb.TXT
(9.65 KiB) Downloaded 12 times
Topology file for cobalamins.rtf
(38.55 KiB) Downloaded 5 times

User avatar
Peter Eastman
Posts: 1789
Joined: Thu Aug 09, 2007 1:25 pm

Re: template residue error

Post by Peter Eastman » Mon Jun 17, 2019 10:07 am

Your prm file has an error in it:

Code: Select all

CPH2  NG2R5C  CPH1    HR3    3.0000  2   180.00 ! from HGR52  CG2R51 NG2R50 CG2R53 in CGenFF
HR1   CPH2    NG2R5C  CO6     0.0000   1  0.00  ! set to 0 to avoid overfitting
HR1   CPH2    NG2R5C  CPH1    2   180.00 ! from HGR52  CG2R53 NG2R50 CG2R51   in CGenFF
CPH1  NG2R5C  CO6     NCO6A    0.3720   4  0.00 ! from fitted NCO6A   CO6     NG2R5C  CG2R51
CPH1  NG2R5C  CO6     NCO6A    7.5460   2  180.00 ! from fitted NCO6A   CO6     NG2R5C  CG2R51
The error is in the third line above. Notice how each line lists four atom types, followed by three numbers (the strength of the interaction, the multiplicity, and the phase offset). But the third line only has two numbers. It's missing the interaction strength. They made a mistake when creating their file.

Fortunately, they included a comment telling us where the parameters came from. I looked up that definition in the CGenFF force field to find out what the correct parameters are.

Code: Select all

HGR52  CG2R53 NG2R50 CG2R51     2.0000  2   180.00 ! NA bases
So I edited that line of the prm file to read

Code: Select all

HR1   CPH2    NG2R5C  CPH1    2.0000  2   180.00 ! from HGR52  CG2R53 NG2R50 CG2R51   in CGenFF
With that change, it loads correctly.

User avatar
Omar Abuyaman
Posts: 10
Joined: Mon Apr 22, 2019 11:12 am

Re: template residue error

Post by Omar Abuyaman » Wed Jun 19, 2019 9:12 pm

thanks a lot , u saved my day.

POST REPLY