[MMTK] setConfiguration -> frames are not aligned

Ralf Biehl ra.biehl at fz-juelich.de
Mon Apr 20 12:11:05 UTC 2009


Hi Konrad

i solved my Problem

I upgraded to the newest Versions but still had this Problem.
I found org+new gives the error and new+org is just fine

So the Problem was the __add__ method
This lead me to find that still Numeric was used instead of numpy
reinstalling Scientific with the option
python setup.py build --numpy      (as given in the readme)
solved the problem

So finally Numeric (24.2) isnt anymore fully compatible with Scientific 
or MMTK?
This numeric is installed as standard in Ubuntu, i didnt change to the 
addvised in your

By the way
Thanks for all your work on Scientific and MMTK
I do a lot of work with this and it saved me a lot of work
Great job

Best
Ralf
 


Konrad Hinsen schrieb:
> On 16.04.2009, at 19:04, Ralf Biehl wrote:
>
>> r_[something] is a shorthand in numpy for array(something) and 
>> produces and numpy array of shape (N,3) in r_[[a.position() for a in 
>> universe.atomList()]]
>
> Then your example should work, and in fact it works for me:
>
> In [16]: universe = InfiniteUniverse()
>
> In [17]: universe.addObject(Molecule('water'))
>
> In [18]: universe.addObject(Molecule('water'))
>
> In [19]: org=universe.copyConfiguration()
>
> In [20]: new=ParticleVector(universe, numpy.r_[[a.position() for a in 
> universe.atomList()]])
>
> In [21]: org+new
> Out[21]: <MMTK.ParticleProperties.Configuration object at 0x2533330>
>
> Since I use MMTK 2.5.24 as well, I wonder if the difference comes from 
> somewhere else. Which versions of Python and NumPy are you using?
>
>> As the output is an array, order of atoms should not matter
>
> Not for getting an answer, but it does matter if you want the answer 
> to make sense.
>
>> I want to fit Small angle neutron scattering data with a standard 
>> fitting routine.
>> My goal was to modify the configuration  by some  small  vector (for 
>> each atom) like in the energy minimization.
>> The result should be a new configuration that describe my SANS data.
>> Therefore i need a particleVector of the universe that gives the 
>> direction for the configurational change.
>
> If your change is a random vector, then you can in fact ignore atom 
> order. But if it depends on some property of the atom, such as its 
> current position, the change should better be calculated in terms of 
> the ParticleVectors that MMTK already provides, to be sure to get the 
> right atom order. BTW, even for random displacements, you can use 
> MMTK.Random.randomParticleVector if a Gaussian distribution is fine 
> for your needs.
>
> Konrad.
> -- 
> ---------------------------------------------------------------------
> 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
> ---------------------------------------------------------------------
>
>
>

-- 

Dr. Ralf Biehl
Institut für Festkörerforschung
Forschungszentrum Jülich
D-52425 Jülich
Germany

Tel.:   +49-(0)2461-61-4685
Fax:    +49-(0)2461-61-2610



-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Jülich GmbH
52425 Jülich

Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Bärbel Brumme-Bothe
Geschäftsführung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------



More information about the mmtk mailing list