[MMTK] (no subject)

Dr. Seth Olsen seth.olsen at gmail.com
Wed Aug 3 05:37:44 CEST 2005


Hi MMTKers,

Thank you Konrad, for your help.  The problem was that I assumed that
the Atom type would make a vector out of a position given as a Numeric
Array or list.  I see that this is not true, and the position must be
a vector object at the time of assignment to the position property of
the atom type.  This is, of course, in the Scientific manual, I just
did not read it carefully enough when writing the script.

Cheers,

Seth



On 8/3/05, khinsen at cea.fr <khinsen at cea.fr> wrote:
> 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
> ------------------------------------------------------------------------
> -------
> 
> 


-- 
ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms

Dr Seth Olsen, PhD
Postdoctoral Fellow, Biomolecular Modeling Group
Centre for Computational Molecular Science
Chemistry Building,
The University of Queensland
Qld 4072, Brisbane, Australia

tel (617) 33653732
fax (617) 33654623
email: s.olsen1 at uq.edu.au
Web: www.ccms.uq.edu.au 

ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms



More information about the mmtk mailing list