[MMTK] Problems in Dynamics Examples (cont.)
Victor Manuel Rosas-García
quimico69@yahoo.com
Mon, 26 Jul 1999 14:08:45 -0400 (EDT)
A few days ago I asked about a problem with the argon.py example, the
answer was:
>> eps, sigma, mix = self._ljParameters(t, global_data)
>> ValueError: unpack tuple of wrong size
>>
>> any ideas as to what could be wrong?
>That's fixed in the current version (2.0a9). Either get that one,
>or as a quick hack replace the line above by
> eps, sigma = self._ljParameters(t, global_data)
> mix = 0
>Konrad.
I downloaded version 2.0a9 of MMTK and 2.0b1 of ScientificPython and
reinstalled both. The problem in argon.py is still there, so I did the
quick hack recommended by Konrad. It fixed the problem. Now the
strange behavior is in solvent.py (not that it worked before, I just
focused first on argon.py).
(To speed up things, I multiplied the initial universe size by 2,
instead of by 5, and reduced all minimization and integration steps to
1 tenth of their original values.)
With the "mix = 0" hack:
>>> import solvent
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "solvent.py", line 53, in ?
minimizer(steps = 10)
File "/usr/local/lib/python1.5/site-packages/MMTK/Minimization.py",
line 46, in __call__
evaluator = self.universe.energyEvaluator().evaluator.CEvaluator()
File "/usr/local/lib/python1.5/site-packages/MMTK/Universe.py", line
324, in energyEvaluator
eval = ForceField.EnergyEvaluator(self, self._forcefield,
File
"/usr/local/lib/python1.5/site-packages/MMTK/ForceFields/ForceField.py",
line 208, in __init__
self.evaluator = self.ff.evaluator(self.universe,
File
"/usr/local/lib/python1.5/site-packages/MMTK/ForceFields/MMForceField.py",
line 342, in evaluator
return CompoundForceField.evaluator(self, universe, subset1,
subset2,
File
"/usr/local/lib/python1.5/site-packages/MMTK/ForceFields/ForceField.py",
line 99, in evaluator
eval_objects.append(ff.evaluator(system, subset1, subset2,
File
"/usr/local/lib/python1.5/site-packages/MMTK/ForceFields/MMForceField.py",
line 325, in evaluator
return CompoundForceField(lj, es).evaluator(universe, subset1,
File
"/usr/local/lib/python1.5/site-packages/MMTK/ForceFields/ForceField.py",
line 99, in evaluator
eval_objects.append(ff.evaluator(system, subset1, subset2,
File
"/usr/local/lib/python1.5/site-packages/MMTK/ForceFields/MMForceField.py",
line 191, in evaluator
return LJForceField.evaluator(self, universe, subset1, subset2,
File
"/usr/local/lib/python1.5/site-packages/MMTK/ForceFields/NonBondedInteractions.py",
line 126, in evaluator
eps, sigma = self._ljParameters(t, global_data)
ValueError: unpack tuple of wrong size
_______________________________________________________
Without the mix = 0 hack:
>>> import solvent
Current size: 1.60100816842
Current size: 1.52095776
Current size: 1.444909872
Current size: 1.3726643784
Current size: 1.30403115948
Current size: 1.2388296015
Current size: 1.17688812143
Current size: 1.11804371536
Current size: 1.06214152959
Current size: 1.00903445311
Current size: 0.958582730454
Current size: 0.910653593931
Current size: 0.865120914235
Current size: 0.842635878115
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "solvent.py", line 81, in ?
integrator(steps = 100,
File "/usr/local/lib/python1.5/site-packages/MMTK/Dynamics.py", line
87, in __call__
MMTK_dynamics.integrateVV(self.universe,
File "/usr/local/lib/python1.5/site-packages/MMTK/Trajectory.py",
line 388, in getActions
return map(lambda a, t=self, s=steps: a.getSpecificationList(t, s),
File "/usr/local/lib/python1.5/site-packages/MMTK/Trajectory.py",
line 388, in <lambda>
return map(lambda a, t=self, s=steps: a.getSpecificationList(t, s),
File "/usr/local/lib/python1.5/site-packages/MMTK/Trajectory.py",
line 471, in getSpecificationList
raise ValueError, \
ValueError: Data item temperature is not available.
From what I can tell, "temperature" is correctly specified in
solvent.py. Is "t=self"--see line 388 in Trajectory.py--a correct way
to pass the value of temperature to getSpecificationList(t, s)?
As you can see, I'm not really experienced on either Python nor the
MMTK, but I'm working on that.
I hope this message catches you Konrad, before you leave on vacation.
In addition, have a safe trip and enjoy!
Victor
===
Victor M. Rosas García
Computational Chemistry Apprentice
e-mail: quimico69@yahoo.com
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com