Virtual site and DCD reporter error

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Gaetano Calabro'
Posts: 24
Joined: Fri Feb 24, 2012 11:48 am

Virtual site and DCD reporter error

Post by Gaetano Calabro' » Wed Dec 07, 2016 5:36 pm

Hi there,

I was trying to understand how virtual site works in OpenMM but I'm not sure if I'm doing the correct setting. I have an ethylene molecule than I would like to simulate in vacuum. The system has been created with Amber and I have attached the topology, coordinate files and the script that I'm using for testing. After loading the system in OpenMM I defined the virtual site between the two ethylene carbons. The system seems to correctly run but if I tried to save a dcd trajectory the system crashes with the following error:

File "/home/gac/local/openmm-7.0.1/lib/python2.7/site-packages/simtk/openmm/app/dcdfile.py", line 110, in writeModel
raise ValueError('The number of positions must match the number of atoms')

I would appreciate help,

All the Best
Attachments
system.tar
(20 KiB) Downloaded 8 times

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: Virtual site and DCD reporter error

Post by Peter Eastman » Wed Dec 07, 2016 5:50 pm

If you call addParticle() on your System, you also need to call addAtom() on your Topology. The DCD writer expects that the number of positions it's asked to write will match the number of atoms in the Topology. This error message is telling you that isn't the case.

Peter

User avatar
Gaetano Calabro'
Posts: 24
Joined: Fri Feb 24, 2012 11:48 am

Re: Virtual site and DCD reporter error

Post by Gaetano Calabro' » Thu Dec 08, 2016 4:43 pm

Hi Peter,

Thanks a lot for your help...everything works now!

Gaetano

POST REPLY