[MMTK] (no subject)

khinsen at cea.fr khinsen at cea.fr
Tue Aug 2 16:36:04 CEST 2005


On 02.08.2005, at 05:02, Dr. Seth Olsen wrote:

> run into a problem: when I attempt to use the
> GroupOfAtoms.centerAndMomentOfInertia method (and also
> GroupOfAtoms.centerOfMass) the following error is raised:
>
> Traceback (most recent call last):
>   File "./parsecentraldiffgrad.py", line 27, in ?
>     molecule=molprotools.makeMMTKgroup(names,geo,verbose=1)
>   File "/home/seth/Pyscripts/molprotools.py", line 1045, in  
> makeMMTKgroup
>     print molecule.centerAndMomentOfInertia()
>   File "/usr/local/lib/python2.3/site-packages/MMTK/Collection.py",
> line 112, in centerAndMomentOfInertia
>     mr = mr + ma*r
>   File  
> "/usr/local/lib/python2.3/site-packages/Scientific/Geometry/ 
> VectorModule.py",
> line 70, in __add__
>     return Vector(self.array+other.array)
> AttributeError: array

This just says that something is wrong with the object referred to by  
"molecule" in molprotools.py, the cause of the error is most likely in  
the construction of that object. To check what's going wrong, do

	print molecule.atomList()

and check the printout for suspect entries.

Konrad.
--
------------------------------------------------------------------------ 
-------
Konrad Hinsen
Laboratoire Leon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
------------------------------------------------------------------------ 
-------




More information about the mmtk mailing list