[MMTK] Vectorfield and normal modes

Ramon Crehuet rcrehuet at gmail.com
Mon May 7 08:31:11 UTC 2007


I'll try to be more precise:
Executing this script I get the displacements of two arbitrary atoms (150
and 100) for the same normal mode.

uni.setConfiguration(origin)
p0=uni.protein[1][150].position()
uni.setConfiguration(origin+mode)
p1m=uni.protein[1][150].position()
uni.setConfiguration(origin+field.particleValues())
p1f=uni.protein[1][150].position()
map(lambda x,y: x/y,p1f-p0, p1m-p0)
uni.setConfiguration(origin)
p0=uni.protein[1][100].position()
uni.setConfiguration(origin+mode)
p1m=uni.protein[1][100].position()
uni.setConfiguration(origin+field.particleValues())
p1f=uni.protein[1][100].position()
map(lambda x,y: x/y,p1f-p0, p1m-p0)

The output of this script is:
[0.30839457344851323, 0.30839457344831123, 0.30839457344907556]
[0.4687606011104602, 0.46876060111040707, 0.46876060111033602]
So for both atoms the displacements have the same direction (ok) but
different scaling. But the scaling depends on the atom, so I don't know how
to recover the displacements obtained by origin+mode. (which probably means
I am mixing some concepts...)
Thanks in advance,
Ramon












2007/5/5, Ramon Crehuet <rcrehuet at gmail.com>:
>
>
>
> 2007/5/5, Konrad Hinsen <hinsen at cnrs-orleans.fr>:
> >
> > On 04.05.2007, at 18:43, Ramon Crehuet wrote:
> >
> > > Before trying that I experimented a little with AtomicVectorField
> > > and the Calpha model for which I have calculated the modes. I
> > > expected these two setConfiguration to correspond do the same but
> > > they don't:
> > >
> > > origin = uni.copyConfiguration()
> > > field = AtomicVectorField(uni, 0.1, mode)
> > > uni.setConfiguration(origin+field.particleValues()*delta/
> > > mode.frequency)
> > > uni.setConfiguration(origin+mode*i*delta/mode.frequency)
> >
> > A VectorField is defined on a regular grid. When the VectorField
> > object is created, its values at the grid points are calculated as a
> > weighted combination of the atomic vectors. When a value is requested
> > at another point, it is calculated through linear interpolation. In
> > general this does not yield exactly the same values at the positions
> > of the atoms.
>
>
> Surely I understand this, but both operations give results quite different
> (the VMD images are quite different). Maybe the scale of mode and field is
> different?
>
>
>
> > So how can I get the same desplacements that originate from the
> > > mode using the AtomicVectorField? (then I'll be able to apply it to
> > > the all atom model)
> >
> > I don't see any way to obtain exactly the same values and still get
> > reasonable values at other points. If you need to retrieve the exact
> > values for each input atom, then you should use an interpolation
> > algorithm that is not grid based. You could for example assign to
> > each atom the average value of its three nearest C-alpha neighbours,
> > weighted by the distance from each C-alpha. This can be implemented
> > efficiently by using the nonbonded list object from the force field
> > module, with a cutoff of about 5 Ang. This is a bit tricky to use;
> > see Tests/energy_tests.py for an example.
>
>
> I don't need an exact result, I was just comparing the results for my
> understanding of the operations. Anyway, reducing the grid space should make
> the field value tend to the mode value, isn't it?
>
> Cheers,
> Ramon
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://starship.python.net/pipermail/mmtk/attachments/20070507/72bd5e78/attachment.htm 


More information about the mmtk mailing list