[MMTK] setConfiguration -> frames are not aligned

Konrad Hinsen hinsen at cnrs-orleans.fr
Thu Apr 16 16:37:28 UTC 2009

On Apr 16, 2009, at 13:38, Ralf Biehl wrote:

> Hi all
> Following sequence produces an error as shown in the code below
> __MMTK.__version__
> '2.5.24'
> org=universe.copyConfiguration()
> new=ParticleVector(universe,r_[[a.position() for a in  
> universe.atomList()]])
> org+new
> .....

The second argument to ParticleVector must be an array of shape (N,  
3), where N is the number of atoms in the universe. I don't  
understand the syntax r_[...] you are using, is that perhaps some  
IPython abbreviation? Anyway, I suppose it does not create an array  
of the required shape.

Note also that the order of the atoms in the array is the one defined  
by the attribute atom.index of each atom object. This is in general  
NOT the same as the order of the atoms in universe.atomList(). Do you  
have a specific reason for creating a ParticleVector by looping over  
universe.atomList()? Perhaps your goal can be reached more easily.

Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen at cnrs-orleans.fr
Web: http://dirac.cnrs-orleans.fr/~hinsen/

More information about the mmtk mailing list