[MMTK] setConfiguration -> frames are not aligned
Ralf Biehl
ra.biehl at fz-juelich.de
Thu Apr 16 17:04:10 UTC 2009
Hi Konrad
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()]]
In that way it guaranties that i have an array with the same dimension
as the universe.configuration() (tested with shape() )
As the output is an array, order of atoms should not matter
ParticleVector(universe,array ) should then create a particleVector for
the universe.
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.
Best
Ralf
Konrad Hinsen schrieb:
> 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.
> --
> ---------------------------------------------------------------------
> 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/
> ---------------------------------------------------------------------
>
>
>
--
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,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
More information about the mmtk
mailing list