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

T019: ValueError: No template found for residue 444 (03P) #307

Closed
dominiquesydow opened this issue Dec 28, 2022 · 2 comments · Fixed by #308
Closed

T019: ValueError: No template found for residue 444 (03P) #307

dominiquesydow opened this issue Dec 28, 2022 · 2 comments · Fixed by #308

Comments

@dominiquesydow
Copy link
Collaborator

T019 runs into the following error (seen in CI and locally):

____ teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb::Cell 14 ____
[gw0] darwin -- Python 3.8.15 /usr/local/miniconda/envs/teachopencadd/bin/python
Notebook cell execution failed
Cell 14: Cell outputs differ

Input:
complex_topology, complex_positions = merge_protein_and_ligand(prepared_protein, omm_ligand)
print("Complex topology has", complex_topology.getNumAtoms(), "atoms.")
# NBVAL_CHECK_OUTPUT

Traceback:
Unexpected output fields from running code: {'stderr'}

____ teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb::Cell 17 ____
[gw0] darwin -- Python 3.8.15 /usr/local/miniconda/envs/teachopencadd/bin/python
Notebook cell execution failed
Cell 17: Cell execution caused an exception

Input:
modeller = app.Modeller(complex_topology, complex_positions)
modeller.addSolvent(forcefield, padding=1.0 * unit.nanometers, ionicStrength=0.15 * unit.molar)

Traceback:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[18], line 2
      1 modeller = app.Modeller(complex_topology, complex_positions)
----> 2 modeller.addSolvent(forcefield,padding=1.0*unit.nanometers,ionicStrength=0.15*unit.molar)

File /usr/local/miniconda/envs/teachopencadd/lib/python3.8/site-packages/openmm/app/modeller.py:483, in Modeller.addSolvent(self, forcefield, model, boxSize, boxVectors, padding, numAdded, positiveIon, negativeIon, ionicStrength, neutralize)
    479         raise ValueError('Neither the box size, box vectors, nor padding was specified, and the Topology does not define unit cell dimensions')
    481 # Have the ForceField build a System for the solute from which we can determine van der Waals radii.
--> 483 system = forcefield.createSystem(self.topology)
    484 nonbonded = None
    485 for i in range(system.getNumForces()):

File /usr/local/miniconda/envs/teachopencadd/lib/python3.8/site-packages/openmm/app/forcefield.py:1212, in ForceField.createSystem(self, topology, nonbondedMethod, nonbondedCutoff, constraints, rigidWater, removeCMMotion, hydrogenMass, residueTemplates, ignoreExternalBonds, switchDistance, flexibleConstraints, drudeMass, **args)
   1208 rigidResidue = [False]*topology.getNumResidues()
   1210 # Find the template matching each residue and assign atom types.
-> 1212 templateForResidue = self._matchAllResiduesToTemplates(data,topology,residueTemplates,ignoreExternalBonds)
   1213 for res in topology.residues():
   1214     if res.name == 'HOH':
   1215         # Determine whether this should be a rigid water.

File /usr/local/miniconda/envs/teachopencadd/lib/python3.8/site-packages/openmm/app/forcefield.py:1[42](https://github.com/volkamerlab/teachopencadd/actions/runs/3796013276/jobs/6455699818#step:8:43)7, in ForceField._matchAllResiduesToTemplates(self, data, topology, residueTemplates, ignoreExternalBonds, ignoreExtraParticles, recordParameters)
   1425                 break
   1426 if matches is None:
-> 1427     raise ValueError('No template found for residue %d (%s).  %s' % (res.index+1, res.name, _findMatchErrors(self, res)))
   1428 else:
   1429     if recordParameters:

ValueError: No template found for residue 444 (03P).  This might mean your input topology is missing some atoms or bonds, or possibly that you are using the wrong force field.
`
``
@dominiquesydow dominiquesydow linked a pull request Dec 28, 2022 that will close this issue
16 tasks
@dominiquesydow dominiquesydow linked a pull request Dec 29, 2022 that will close this issue
4 tasks
@dominiquesydow dominiquesydow removed a link to a pull request Dec 31, 2022
16 tasks
@dominiquesydow dominiquesydow pinned this issue Dec 31, 2022
@dominiquesydow
Copy link
Collaborator Author

Hi @AndreaVolkamer, is there anyone in your group who could take a look at this issue?

@mbackenkoehler
Copy link
Collaborator

Solved by #308

@dominiquesydow dominiquesydow unpinned this issue May 24, 2023
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

Successfully merging a pull request may close this issue.

2 participants