[MMTK] object or module for molecule-centered grid
Andrew D. Fant
fant at pobox.com
Thu Mar 23 21:23:19 CET 2006
konrad.hinsen at cea.fr wrote:
> On 10.03.2006, at 21:00, Andrew D. Fant wrote:
>
>> Is there code in MMTK, or has anyone written any, that will take
>> a molecule,
>> orient it to the usual standards (center of gravity, aligned to
>> principal
>> moments of inertia) and generate a uniformly-spaced set of grid
>> points to
>> surround it? I'll admit to being a novice, so I apologize if this is
>> already in
>
>
> The first part is straightforward:
>
> molecule.normalizeConfiguration()
>
> will do the alignment that you want to have. As for generating a
> uniformly spaces set of grid points around the molecule, it all depends
> on what exactly you need and what you want to do with it. Here is one
> approach that should be fine:
>
> from MMTK.Geometry import SCLattice
> cell_size = 0.1*Units.nm
> grid_size = 10 # 10 cells in each direction
> grid_origin = -(grid_size/2) * cell_size
> for point in SCLattice(cell_size, grid_size):
> print point + origin
>
> You could also calculate the grid size as a function of
> molecule.boundingBox(), for example.
Konrad,
Thanks for the pointers. This is beginning to make sense to me now. I do
have a follow-on question in 2 parts.
Are there any special routines to allow a set of points from that lattice to be
accessed as a single entity? For example to treat the set of grid points that
are within the VdW radius of the nearest atom (plus or minus some reasonable
epsilon) as a "surface" that can be used for further computation.
Alternately, is there a good way to use the surface objects that are defined
elsewhere as the basis for a lattice as defined above? Most of the interesting
things I am reading on molecular superposition seem to be happiest working on
grids/lattices approximating the steric boundaries.
Thanks again,
Andy
--
Andrew Fant | And when the night is cloudy | This space to let
Molecular Geek | There is still a light |----------------------
fant at pobox.com | That shines on me | Disclaimer: I don't
Boston, MA | Shine until tomorrow, Let it be | even speak for myself
More information about the mmtk
mailing list