[MMTK] Bug in MMTK.Collections.rotationalConstants()?
Andreas Kring
akring1729 at gmail.com
Tue Feb 12 12:23:18 UTC 2008
Hello,
I think there is a bug in MMTK.Collections.rotationalConstants()... or
rather it looks as if the bug is in MMTK.Units. When I run the script
below, I get the error:
------ Script begin ------
from MMTK import *
from MMTK.Trajectory import Trajectory
tr = Trajectory(None,'data/solvation.nc')
print 'len(tr) = ',len(tr)
u = tr.universe
u.setFromTrajectory(tr,29)
tr.close()
c = u[0].rotationalConstants()
------ Script end ------
------ Error message ------
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/MMTK/Collections.py", line
124, in rotationalConstants
from Units import h, pi
ImportError: cannot import name pi
---------------------------
In MMTK.Units there are references to Numeric, but I have set up my MMTK
installation to work with Numpy. I guess the easiest way to fix this is
just to add pi manually in MMTK.Units?
Kind regards
Andreas
More information about the mmtk
mailing list