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
Virtual site and DCD reporter error
- Gaetano Calabro'
- Posts: 24
- Joined: Fri Feb 24, 2012 11:48 am
Virtual site and DCD reporter error
- Attachments
-
- system.tar
- (20 KiB) Downloaded 8 times
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Virtual site and DCD reporter error
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
Peter
- Gaetano Calabro'
- Posts: 24
- Joined: Fri Feb 24, 2012 11:48 am
Re: Virtual site and DCD reporter error
Hi Peter,
Thanks a lot for your help...everything works now!
Gaetano
Thanks a lot for your help...everything works now!
Gaetano