[MMTK] Importing electrostatic potential to MMTK
Pentti Frondelius
pofronde at cc.jyu.fi
Sun Oct 7 14:27:04 UTC 2007
Thanks very much for your advice,
Furhermore, I would like to ask if it is possible to calculate an Ewald
sum for a given point charge system with given periodicity? I'm aware of
the fact that MMTK can calculate Ewald sums in molecular dynamics, but can
I directly do it for a given system, which is not related to any dynamic
simulation? Ofcourse one could implement the summation with own Python
code, but naturally it is faster to use already implemented and tested
code.
Regards,
Pentti
> On Oct 5, 2007, at 17:33, Pentti Frondelius wrote:
>
>> functional theory calculation done with an another package. However, I
>> only found the example script showing, how fit can be done to
>> elecrostatic
>> potential of point charges, a potential generated with MMTK. So,
>> what is
>> the exact form of an object to which I can fit the point charges.
>> How can
>> I make the right kind of object from my 3D-potential array?
>
> You launch the fit using a line like
>
> fit = ChargeFit(system, points)
>
> The argument "points" must be a list of (r, p) tuples, where r is a
> Vector object specifying the coordinates of the point (in nm) and p
> is the associated electrostatic energy.
>
> You can generate such a list easily from your data using a few lines
> of Python code. The details obviously depend on the format of your
> file. Assuming that you have one point per line using four numbers
> [x, y, z, p], the following code would read it and construct a
> suitable list:
>
> from Scientific.Geometry import Vector
> points = ""
> for line in file("my_data.txt"):
> x, y, z, p = [float(x) for x in line.split()]
> points.add((Vector(x, y, z), p))
>
> You might have to add unit conversions, depending on your data.
>
> 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
> ---------------------------------------------------------------------
>
>
>
More information about the mmtk
mailing list