[MMTK] Solvation example

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Thu Oct 16 18:01:03 CEST 2003


Thank you again for your answer. This problem occurs with the 
solvation.py that is in Examples/MolecularDynamics; I only added 
universe.view() at the end. I looked some more to find out where 
universe.view() first causes problems. This function works correctly 
until the thermostat is set in line 71:

universe.setForceField(Amber94ForceField(1.4, {'method': 'ewald'}))
universe.view() # works OK
universe.thermostat = NoseThermostat(temperature) # Line 71
universe.view() # results in an error; traceback is below

I am not sure how to solve this.

--Michiel


Konrad Hinsen wrote:

> On Tuesday 14 October 2003 11:51, Michiel Jan Laurens de Hoon wrote:
> 
>> 2) If I try to view the universe after running solvation.py, I get
>> the error message "Universe version numbers do not agree" (complete
>>  traceback is printed below).
> 
> This is hard to analyze without the script that produced the
> traceback. In general, the message means that two different
> quantities referring to a universe were created before and after the
> addition or removal of objects (molecules or environment objects like
> thermostats).

30 water molecules will be added
Solvent molecules have been added, now shrinking universe...
Universe has been compressed, now equilibrating...
Traceback (most recent call last):
   File "solvation.py", line 72, in ?
     universe.view()
   File 
"/home/samma/mdehoon/lib/python2.2/site-packages/MMTK/Collection.py", 
line 359, in view configuration)
   File 
"/home/samma/mdehoon/lib/python2.2/site-packages/MMTK/Universe.py", line
745, in contiguousObjectConfiguration
     return conf + offset
   File 
"/home/samma/mdehoon/lib/python2.2/site-packages/MMTK/ParticleProperties.
py", line 330, in __add__
  value = ParticleVector.__add__(self, other)
   File 
"/home/samma/mdehoon/lib/python2.2/site-packages/MMTK/ParticleProperties.
py", line 95, in __add__
     return self._arithmetic(other, Numeric.add)
   File 
"/home/samma/mdehoon/lib/python2.2/site-packages/MMTK/ParticleProperties.
py", line 82, in _arithmetic
     return_class, a2 = self._checkCompatibility(other, allow_scalar)
   File 
"/home/samma/mdehoon/lib/python2.2/site-packages/MMTK/ParticleProperties.
py", line 54, in _checkCompatibility
     raise ValueError, "Universe version numbers do not agree"


-- 
Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Japan
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon




More information about the mmtk mailing list