[MMTK] ParticleVectors and __float__ attributes

Dr. Seth Olsen seth.olsen at gmail.com
Tue Sep 19 01:03:38 CEST 2006


Hi Alex,

Thanks very much, that did solve the float problem....  but... it seems the
real problem is that I haven't found a version of numeric (or numpy) that
will both allow float casting of particle vectors for Subspace.getBasis()
and successfully perform the diagonalization required by
Collection.findTransformation().  The float casting problem had appeared
after I upgraded my Numeric module to try to fix the eigensolver problem.
At present, the call to lapack by numeric seems to send my laptop into an
endless spin (the fan is going like crazy right now, and will until I kill
the interpreter).   I am not totally sure that the new installs of numeric
actually solved this at all, since the float cast appears before the
invocation of the eigensolver in the script.  I'm a bit humbled by the fact
that I haven't been able to work around the float casting problem, since I
thought I understood what Subspace.getBasis() was doing...

Cheers,

Seth


On 9/19/06, Alexander D. Wissner-Gross <alexwg at physics.harvard.edu> wrote:
>
> Hi Seth,
>
> If you use Numeric 23.8 instead of 24.2 that should fix your problem.
>
> Best,
> Alex Wissner-Gross
>
> Dr. Seth Olsen wrote:
> >
> > Hi MMTKers,
> >
> > I had a try at working around the error I was getting from
> > Subspace.getBasis(), namely:
> >
> >   Traceback (most recent call last):
> >   File "<stdin>", line 67, in ?
> >   File "/usr/lib/python2.4/site-packages/MMTK/Subspace.py", line 79, in
> > getBasis
> >     basis = Numeric.array(self.vectors, Numeric.Float)
> > AttributeError: ParticleVector instance has no attribute '__float__'
> >
> > by adding a __float__ attribute to the ParticleVector class as such:
> >
> >    def __float__(self):
> >         return Numeric.array(self.array,Numeric.Float)
> >
> > but this doesn't work, giving instead a different error:
> >   File "<stdin>", line 67, in ?
> >   File "/usr/lib/python2.4/site-packages/MMTK/Subspace.py", line 79, in
> > getBasis
> >     basis = Numeric.array(self.vectors, Numeric.Float)
> > TypeError: nb_float should return float object
> >
> > This is quite perplexing, as I can't be the first one to run into this
> > bug.  I'm giving up for the evening.  I will try again tomorrow.
> >
> > Cheers,
> >
> > Seth
> >
> >
> > ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms
> >
> > Dr Seth Olsen, PhD
> > Postdoctoral Fellow, Biomolecular Modeling Group
> > Centre for Computational Molecular Science
> > Australian Institute for Bioengineering and Nanotechnology (Bldg. 75)
> > The University of Queensland
> > Qld 4072, Brisbane, Australia
> >
> > tel (617) 3346 3976
> > fax (617) 33654623
> > email: s.olsen1 at uq.edu.au <mailto:s.olsen1 at uq.edu.au>
> > Web: www.ccms.uq.edu.au <http://www.ccms.uq.edu.au>
> >
> > ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms
> > The opinions expressed here are my own and do not reflect the positions
> > of the University of Queensland.
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > mmtk maillist  -  mmtk at starship.python.net
> > http://starship.python.net/mailman/listinfo/mmtk
>
>
> _______________________________________________
> mmtk maillist  -  mmtk at starship.python.net
> http://starship.python.net/mailman/listinfo/mmtk
>



-- 
ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms

Dr Seth Olsen, PhD
Postdoctoral Fellow, Biomolecular Modeling Group
Centre for Computational Molecular Science
Australian Institute for Bioengineering and Nanotechnology (Bldg. 75)
The University of Queensland
Qld 4072, Brisbane, Australia

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

ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms
The opinions expressed here are my own and do not reflect the positions of
the University of Queensland.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://starship.python.net/pipermail/mmtk/attachments/20060919/fd7f350a/attachment.htm


More information about the mmtk mailing list