You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have been trying to parametrize a small molecule using OpenMM. I have tried looking in the FQA section, but I still haven't been able to find a solution to my problem. Every time I try to run, I fall into the following error:
Did not recognize residue MOL; did you forget to call .add_molecules() to add it? Traceback (most recent call last): File "/oscar/home/ggramire/Polyelectrolyte/nonpolarizableff/polye_gaff2_amber/OPC/dimer_IE/openff-2.1.0/test.py", line 19, in <module> system = forcefield.createSystem(pdbfile.topology) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/users/ggramire/anaconda/openmm/lib/python3.11/site-packages/openmm/app/forcefield.py", line 1218, in createSystem templateForResidue = self._matchAllResiduesToTemplates(data, topology, residueTemplates, ignoreExternalBonds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/users/ggramire/anaconda/openmm/lib/python3.11/site-packages/openmm/app/forcefield.py", line 1433, in _matchAllResiduesToTemplates raise ValueError('No template found for residue %d (%s). %s For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template' % (res.index+1, res.name, _findMatchErrors(self, res))) ValueError: No template found for residue 1 (MOL). This might mean your input topology is missing some atoms or bonds, or possibly that you are using the wrong force field. For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template
I attached the pdb file at the end. This is the script used, any help would be highly appreciated. Thank you in advance.
``
Create an OpenFF Molecule object for benzene from SMILES
from openff.toolkit.topology import Molecule
molecule = Molecule.from_smiles('CC(=O)OCCN+(C)CC1=CC=CC=C1')
###Create the SMIRNOFF template generator with the default installed force field (openff-1.0.0)
from openmmforcefields.generators import SMIRNOFFTemplateGenerator
smirnoff = SMIRNOFFTemplateGenerator(molecules=molecule)
smirnoff.add_molecules(molecule)
Create an OpenMM ForceField object with AMBER ff14SB and TIP3P with compatible ions
Hi, I have been trying to parametrize a small molecule using OpenMM. I have tried looking in the FQA section, but I still haven't been able to find a solution to my problem. Every time I try to run, I fall into the following error:
Did not recognize residue MOL; did you forget to call .add_molecules() to add it? Traceback (most recent call last): File "/oscar/home/ggramire/Polyelectrolyte/nonpolarizableff/polye_gaff2_amber/OPC/dimer_IE/openff-2.1.0/test.py", line 19, in <module> system = forcefield.createSystem(pdbfile.topology) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/users/ggramire/anaconda/openmm/lib/python3.11/site-packages/openmm/app/forcefield.py", line 1218, in createSystem templateForResidue = self._matchAllResiduesToTemplates(data, topology, residueTemplates, ignoreExternalBonds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/users/ggramire/anaconda/openmm/lib/python3.11/site-packages/openmm/app/forcefield.py", line 1433, in _matchAllResiduesToTemplates raise ValueError('No template found for residue %d (%s). %s For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template' % (res.index+1, res.name, _findMatchErrors(self, res))) ValueError: No template found for residue 1 (MOL). This might mean your input topology is missing some atoms or bonds, or possibly that you are using the wrong force field. For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template
I attached the pdb file at the end. This is the script used, any help would be highly appreciated. Thank you in advance.
``
Create an OpenFF Molecule object for benzene from SMILES
from openff.toolkit.topology import Molecule
molecule = Molecule.from_smiles('CC(=O)OCCN+(C)CC1=CC=CC=C1')
###Create the SMIRNOFF template generator with the default installed force field (openff-1.0.0)
from openmmforcefields.generators import SMIRNOFFTemplateGenerator
smirnoff = SMIRNOFFTemplateGenerator(molecules=molecule)
smirnoff.add_molecules(molecule)
Create an OpenMM ForceField object with AMBER ff14SB and TIP3P with compatible ions
from openmm.app import ForceField
forcefield = ForceField('amber14/protein.ff14SB.xml')
forcefield = ForceField('amoeba2018.xml')
Register the SMIRNOFF template generator
forcefield.registerTemplateGenerator(smirnoff.generator)
from openmm.app import PDBFile
pdbfile = PDBFile('monomer.pdb')
system = forcefield.createSystem(pdbfile.topology)
print("Parametrization successful")
``
monomer.txt
The text was updated successfully, but these errors were encountered: