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

ValueError: No template found for residue 37 (TYR). The set of atoms is similar to TTHY, but it is missing 2 atoms. #3108

Closed
nataliaszulc opened this issue May 8, 2021 · 10 comments

Comments

@nataliaszulc
Copy link

nataliaszulc commented May 8, 2021

Hi everyone, I am new to openmm. When I use it to run molecular simulations, there is problem with the last residue in the peptide, which is amidated, the 37 TYR (see: https://www.rcsb.org/structure/2L86):

File "/home/ebam/niedziel1p/Desktop/insert_openmm/openmm_run.py", line 41, in
hydrogenMass=4*amu, patches=patches)
File "/home/ebam/niedziel1p/miniconda3/envs/openmm/lib/python3.6/site-packages/simtk/openmm/app/forcefield.py", line 1179, in createSystem
templateForResidue = self._matchAllResiduesToTemplates(data, topology, residueTemplates, ignoreExternalBonds)
File "/home/ebam/niedziel1p/miniconda3/envs/openmm/lib/python3.6/site-packages/simtk/openmm/app/forcefield.py", line 1393, in _matchAllResiduesToTemplates
raise ValueError('No template found for residue %d (%s). %s' % (res.index+1, res.name, _findMatchErrors(self, res)))
ValueError: No template found for residue 37 (TYR). The set of atoms is similar to TTHY, but it is missing 2 atoms.

I would be grateful for help.

@peastman
Copy link
Member

peastman commented May 8, 2021

Take a look at https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template and see if it answers your question.

@nataliaszulc
Copy link
Author

Take a look at https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template and see if it answers your question.

A chain is terminated incorrectly. Proteins, and nucleic acids to an even greater extent, can be terminated in different ways. The residues at the ends of the chain are different from those in the middle and require different templates. Often a force field will only support one or two ways of terminating each chain. If your Topology has them terminated in a different way, they will not match.

Does it mean that I can't use the amidated terminal amino acid in openmm with CHARMM36?

@peastman
Copy link
Member

I'm not sure exactly what terminal forms CHARMM36 supports. If you're trying to use a form it doesn't support then no, it isn't possible.

@nataliaszulc
Copy link
Author

It was generated by using CHARMM-GUI, where terminal group patching is CT2.
According to the documentation:
charmm_gui

@peastman
Copy link
Member

It's possible CHARMM-GUI has just set up the PDB file incorrectly. CHARMM works differently from most other force fields. In most force fields, the NME group at the end is considered a separate residue. That's also how the original PDB file describes it: it's residue 38. But CHARMM instead treats it as a modification to residue 37, which means the extra atoms need to be marked as being part of residue 37. Otherwise, it won't match the template.

@jchodera
Copy link
Member

@nataliaszulc Could you attach a ZIP file containing the problematic protein PDB? We can take a look at what is causing this error specifically.

@nataliaszulc
Copy link
Author

Of course, the sturcture below:
files_amylin.zip

@jchodera
Copy link
Member

jchodera commented May 31, 2021

Thanks for sending this along!

Residue 37 seems to be a standard TYR with carboxylate C-terminus:
image
The corresponding PSF file seems to match this.

When I attempt to create a System object with ForceField using charmm36.xml, I instead run into the issue that the PDB is missing CONECT records required by the PDB format specification for molecules like POPC:

>>> from simtk.openmm import app
>>> ff = app.ForceField('charmm36.xml')
>>> pdbfile = app.PDBFile('step5_input.pdb')
>>> system = ff.createSystem(pdbfile.topology)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/choderaj/miniconda/envs/perses-fah-0.9.0/lib/python3.7/site-packages/simtk/openmm/app/forcefield.py", line 1174, in createSystem
    raise ValueError('No template found for residue %d (%s).  %s' % (res.index+1, res.name, _findMatchErrors(self, res)))
ValueError: No template found for residue 38 (POPC).  The set of atoms matches POPC, but the bonds are different.  Perhaps the chain is missing a terminal group?

Were you using a different scheme to load the structure and apply parameters?

@nataliaszulc
Copy link
Author

Yes, sorry, I sent the wrong setup without amidation on the C-terminus, below the correct one:
amylin_amidation.zip

@DanielWicz
Copy link

DanielWicz commented Aug 13, 2021

I have the same problem without any lipid membrane. The file is a NMR PDB formated by CHARMM PDB reader (through CHARMM-GUI) with CT2 cap included. I add the file here:
2L86.zip

The error is fallowing:

  File "/home/wiczew1/phd_files/molecularcuriositysampling/CuriousNatalia_CS_selu/curiositcalc_rep20.py", line 49, in getNewInstance
    modeller.addHydrogens(forcefield, pH=7.4)
  File "/home/wiczew1/.local/anaconda3/envs/openmmenv/lib/python3.8/site-packages/simtk/openmm/app/modeller.py", line 947, in addHydrogens
    system = forcefield.createSystem(newTopology, rigidWater=False, nonbondedMethod=CutoffNonPeriodic)
  File "/home/wiczew1/.local/anaconda3/envs/openmmenv/lib/python3.8/site-packages/simtk/openmm/app/forcefield.py", line 1179, in createSystem
    templateForResidue = self._matchAllResiduesToTemplates(data, topology, residueTemplates, ignoreExternalBonds)
  File "/home/wiczew1/.local/anaconda3/envs/openmmenv/lib/python3.8/site-packages/simtk/openmm/app/forcefield.py", line 1393, in _matchAllResiduesToTemplates
    raise ValueError('No template found for residue %d (%s).  %s' % (res.index+1, res.name, _findMatchErrors(self, res)))
ValueError: No template found for residue 37 (TYR).  The set of atoms is similar to TTHY, but it is missing 2 atoms.

This is the part of PDB that makes problems:

517 ATOM    514  N   TYR P  37      14.222   0.856  -2.804  1.00  0.00      PROA
518 ATOM    515  HN  TYR P  37      13.500   1.546  -2.793  1.00  0.00      PROA
519 ATOM    516  CA  TYR P  37      15.204   0.989  -1.734  1.00  0.00      PROA
520 ATOM    517  HA  TYR P  37      16.056   0.376  -1.987  1.00  0.00      PROA
521 ATOM    518  CB  TYR P  37      15.660   2.445  -1.612  1.00  0.00      PROA
522 ATOM    519  HB1 TYR P  37      14.811   3.115  -1.870  1.00  0.00      PROA
523 ATOM    520  HB2 TYR P  37      14.812   3.092  -1.837  1.00  0.00      PROA
524 ATOM    521  CG  TYR P  37      16.796   2.804  -2.545  1.00  0.00      PROA
525 ATOM    522  CD1 TYR P  37      16.687   2.600  -3.914  1.00  0.00      PROA
526 ATOM    523  HD1 TYR P  37      15.775   2.179  -4.311  1.00  0.00      PROA
527 ATOM    524  CE1 TYR P  37      17.722   2.926  -4.770  1.00  0.00      PROA
528 ATOM    525  HE1 TYR P  37      17.619   2.760  -5.831  1.00  0.00      PROA
529 ATOM    526  CZ  TYR P  37      18.885   3.464  -4.259  1.00  0.00      PROA
530 ATOM    527  OH  TYR P  37      19.918   3.791  -5.107  1.00  0.00      PROA
531 ATOM    528  HH  TYR P  37      19.975   4.746  -5.188  1.00  0.00      PROA
532 ATOM    529  CD2 TYR P  37      17.977   3.347  -2.054  1.00  0.00      PROA
533 ATOM    530  HD2 TYR P  37      18.078   3.513  -0.992  1.00  0.00      PROA
534 ATOM    531  CE2 TYR P  37      19.017   3.678  -2.902  1.00  0.00      PROA
535 ATOM    532  HE2 TYR P  37      19.928   4.098  -2.503  1.00  0.00      PROA
536 ATOM    533  C   TYR P  37      14.629   0.512  -0.404  1.00  0.00      PROA
537 ATOM    534  O   TYR P  37      14.708  -0.669  -0.072  1.00  0.00      PROA
**538 ATOM    535  NT  TYR P  37      14.036   1.457   0.374  1.00  0.00      PROA
539 ATOM    536  HT1 TYR P  37      13.642   1.201   1.257  1.00  0.00      PROA
540 ATOM    537  HT2 TYR P  37      13.995   2.406   0.064  1.00  0.00      PROA**
541 TER     538      TYR     37

I think the problem the problem is the same as reffered here #2103 (comment) by @peastman

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

No branches or pull requests

4 participants