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

No template found for residue 645 (G) and Error on using gromacs inputs #4512

Open
leosv123 opened this issue Apr 14, 2024 · 4 comments
Open

Comments

@leosv123
Copy link

ValueError: No template found for residue 645 (G). The set of atoms matches G3, but the bonds are different. Perhaps the chain is missing a terminal group? For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template

May I know how to resolve this issue why is it occurring?

Any help please

test_cif_fixed_pH_7.pdb.zip

@peastman
Copy link
Member

Did you follow the link in the error message and read the explanation? It describes the possible causes pretty well.

@leosv123
Copy link
Author

leosv123 commented Apr 14, 2024

Yeah I check through the link and tried fixing some issues using PDBFixer, changed some residue names too at last ended up with this issue trying to figure it out. This works good in gromacs using AMBER99SB and AMBER94 forcefield

ATOM 10447 P G A 645 184.542 282.747 268.948 1.00 0.00 P
ATOM 10448 OP1 G A 645 183.829 283.905 268.336 1.00 0.00 O
ATOM 10449 OP2 G A 645 184.082 282.111 270.216 1.00 0.00 O
ATOM 10450 O5' G A 645 186.045 283.195 269.195 1.00 0.00 O
ATOM 10451 HO5' G A 645 186.803 282.883 269.767 1.00 0.00 H
ATOM 10452 C5' G A 645 186.489 284.490 268.824 1.00 0.00 C
ATOM 10453 H5' G A 645 186.183 285.326 268.368 1.00 0.00 H
ATOM 10454 H5'' G A 645 186.100 285.408 268.751 1.00 0.00 H
ATOM 10455 C4' G A 645 187.866 284.772 269.371 1.00 0.00 C
ATOM 10456 H4' G A 645 188.324 285.640 269.180 1.00 0.00 H
ATOM 10457 O4' G A 645 187.811 284.886 270.816 1.00 0.00 O
ATOM 10458 C3' G A 645 188.908 283.690 269.118 1.00 0.00 C
ATOM 10459 H3' G A 645 188.594 282.746 269.214 1.00 0.00 H
ATOM 10460 O3' G A 645 189.485 283.775 267.834 1.00 0.00 O
ATOM 10461 C2' G A 645 189.899 283.892 270.257 1.00 0.00 C
ATOM 10462 H2' G A 645 190.489 283.260 270.759 1.00 0.00 H
ATOM 10463 O2' G A 645 190.811 284.944 269.986 1.00 0.00 O
ATOM 10464 HO2' G A 645 191.411 285.722 270.172 1.00 0.00 H
ATOM 10465 C1' G A 645 188.972 284.315 271.389 1.00 0.00 C
ATOM 10466 H1' G A 645 189.387 285.041 271.937 1.00 0.00 H
ATOM 10467 N9 G A 645 188.576 283.183 272.241 1.00 0.00 N
ATOM 10468 C8 G A 645 187.326 282.639 272.454 1.00 0.00 C
ATOM 10469 H8 G A 645 186.733 283.360 272.096 1.00 0.00 H
ATOM 10470 N7 G A 645 187.353 281.642 273.305 1.00 0.00 N
ATOM 10471 C5 G A 645 188.696 281.537 273.666 1.00 0.00 C
ATOM 10472 C6 G A 645 189.364 280.655 274.552 1.00 0.00 C
ATOM 10473 O6 G A 645 188.887 279.739 275.232 1.00 0.00 O
ATOM 10474 N1 G A 645 190.730 280.919 274.607 1.00 0.00 N
ATOM 10475 H1 G A 645 191.282 280.525 275.342 1.00 0.00 H
ATOM 10476 C2 G A 645 191.378 281.907 273.910 1.00 0.00 C
ATOM 10477 N2 G A 645 192.702 282.011 274.089 1.00 0.00 N
ATOM 10478 H21 G A 645 193.595 282.417 274.283 1.00 0.00 H
ATOM 10479 H22 G A 645 193.672 282.114 274.309 1.00 0.00 H
ATOM 10480 N3 G A 645 190.778 282.728 273.076 1.00 0.00 N

The file is ribosome structure 6i0y id
here I am using

`
from openmm.app import *
from openmm import *
from openmm.unit import *
from sys import stdout

pdb = PDBFile(test_cif_fixed_pH_7.pdb')

forcefield = ForceField('amber14-all.xml', 'amber14/tip3pfb.xml')
system = forcefield.createSystem(pdb.topology, nonbondedMethod=PME,
nonbondedCutoff=1*nanometer, constraints=HBonds)`

@leosv123
Copy link
Author

leosv123 commented Apr 14, 2024

As I am still facing issue in loading Pdb in OpenMM directly

And since My pdb is loading perfectly in gromacs, I used the gro and top files as input to the Openmm system, it works
but I want to do some modifications like remove some water molecules and then run the MD simulation. But after the removal of water molecules I am not able to save the updated system

from openmm.app import GromacsTopFile, GromacsGroFile, PDBFile, Simulation
from openmm import LangevinMiddleIntegrator, VerletIntegrator
import openmm.unit as unit
import openmm as mm
from openmm.app import *
from openmm import *
from openmm.unit import *
from sys import stdout

Load the GROMACS files

gro_file = 'solvated.gro'
top_file = 'topol.top'

gro = GromacsGroFile(gro_file)
top = GromacsTopFile(top_file, periodicBoxVectors=gro.getPeriodicBoxVectors())

Create the system

system = top.createSystem(nonbondedMethod=PME, nonbondedCutoff=1.0*nanometer, constraints=HBonds)
modeller = Modeller(top.topology, gro.positions)

make some modifications and delete few water moelcules

modeller.delete(list(water_to_delete))

Now how to use the updated modeller to run the simulation as I need to build a updated system to run simulation correct? But I am not able to save in gro or top format to and create updated system. This is raising problem too.

@leosv123 leosv123 changed the title No template found for residue 645 (G) No template found for residue 645 (G) and error on using gromacs inputs Apr 14, 2024
@leosv123 leosv123 changed the title No template found for residue 645 (G) and error on using gromacs inputs No template found for residue 645 (G) and Error on using gromacs inputs Apr 14, 2024
@peastman
Copy link
Member

The chain is terminated incorrectly. The Amber force field expects the phosphate to be missing at the 5' end, replaced with just a hydrogen on O5'. Your file includes both the phosphate and the hydrogen, meaning that you have O5' bonded to three other atoms.

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

2 participants