Dear all,
I want to do a targeted MD simulation based on RMSD in openMM-plumed. I write a python code like below:
from simtk.openmm import *
from simtk.unit import *
from sys import stdout
import openmmplumed
from openmmplumed import PlumedForce
pdb = PDBFile('6n7n_modeller_final.pdb')
forcefield = ForceField('amber14-all.xml', 'amber14/tip3pfb.xml')
system = forcefield.createSystem(pdb.topology, nonbondedMethod=NoCutoff,
nonbondedCutoff=1*nanometer, constraints=HBonds)
tmd_script = """
rmsd: RMSD REFERENCE=6n7t_modeller_final.pdb TYPE=OPTIMAL
RESTRAINT ARG=rmsd AT=0 KAPPA=150.0 LABEL=restraint
PRINT ARG=restraint.bias,t FILE=COLVAR
ENDPLUMED
"""
system.addForce(PlumedForce(tmd_script))
integrator = LangevinIntegrator(300*kelvin, 1/picosecond, 0.002*picoseconds)
platform = Platform.getPlatformByName('OpenCL')
simulation = Simulation(pdb.topology, system, integrator, platform)
simulation.context.setPositions(pdb.positions)
simulation.minimizeEnergy()
simulation.reporters.append(PDBReporter('output.pdb', 1000))
simulation.reporters.append(StateDataReporter(stdout, 1000, step=True,
potentialEnergy=True, temperature=True))
simulation.step(50000)
The reference pdb "6n7t_modeller_final.pdb" has same atoms to the system "6n7n_modeller_final.pdb". But I get a problem like below:
Exception:
+++ PLUMED error
+++ at SingleDomainRMSD.cpp:39, function void PLMD::SingleDomainRMSD::readReference(const PLMD::PDB&)
+++ assertion failed: wd>epsilon
+++ message follows +++
It looks like weights used for displacement are zero. Check your reference PDB file.
Could anyone give some suggestions on how to fix this? I tried to search this error in the Google group but get no useful information.
Best wishes,
Shikai