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
I'm seeing an error when I attempt to implement RadiusOfGyrationSq
# Add custom CV for radius of gyrationnum_atoms=system.getNumParticles()
print(f"Number of atoms in system: {num_atoms}")
rgsq=cvpack.RadiusOfGyrationSq(list(range(num_atoms)),pbc=False ,weighByMass=False, name="RadiusOfGyrationSq")
rgsq.addToSystem(system)
# Create integratortimestep=0.001*picosecondsprint(f"Using timestep: {timestep}")
integrator=VerletIntegrator(timestep)
# Load previous state (restart)withopen(os.path.join( heat_dir, heated_restart_file_name), encoding="utf-8") asf:
state=XmlSerializer.deserialize(f.read())
# Create simulationsimulation=Simulation(modeller.topology, system, integrator)
simulation.context.setState(state)
and this is the error:
Number of atoms in system: 8234
Using timestep: 0.001 ps
Traceback (most recent call last):
File "/Users/classen/projects/openmm-test/scripts/md.py", line 81, in <module>
simulation = Simulation(modeller.topology, system, integrator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/classen/miniconda3/envs/openmm/lib/python3.12/site-packages/openmm/app/simulation.py", line 102, in __init__
self.context = mm.Context(self.system, self.integrator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/classen/miniconda3/envs/openmm/lib/python3.12/site-packages/openmm/openmm.py", line 2488, in __init__
_openmm.Context_swiginit(self, _openmm.new_Context(*args))
^^^^^^^^^^^^^^^^^^^^^^^^^^
openmm.OpenMMException: CustomCentroidBondForce: Weights for group 3132 add to 0
I am defining other restraints earlier in the md.py file, but if I comment out rgsq.addToSystem(system) then the simulation runs without error.
p.s. I am using a version of this Rigid Body code which may be interfering with cvpack?
Uh oh!
There was an error while loading. Please reload this page.
I'm seeing an error when I attempt to implement
RadiusOfGyrationSq
and this is the error:
I am defining other restraints earlier in the
md.py
file, but if I comment outrgsq.addToSystem(system)
then the simulation runs without error.p.s. I am using a version of this Rigid Body code which may be interfering with
cvpack
?https://github.com/openmm/openmm/blob/master/examples/extras/rigid.py
The text was updated successfully, but these errors were encountered: