A class for representing a function of 3D Cartesian coordinates
discretize onto a grid. Numpy arrays are used extensively, and are
returned by most methods.
|
__init__(self,
origin=[ 0.0, 0.0, 0.0] ,
spacing=[ 1.0, 1.0, 1.0] ,
length=[ 1.0, 1.0, 1.0] ,
default_radius=1.5)
arguments:
origin => a list containing the Cartesian coordinates of the grid's
origin in the lab frame
spacing => a list (a,b,c) containing the spacing between grid points
length => a list (l,m,n) containing the absolute lengths of the grid
in each direction |
|
|
|
setOrigin(self,
origin)
Reposition the origin of the grid in the lab frame |
|
|
|
normalize(self)
Normalize the grid values |
|
|
|
pointIsOutOfBounds(self,
point)
Returns True if the point (x,y,z) is outside the space represented by
the grid. |
|
|
|
pointForIndex(self,
index)
Given grid index (a,b,c), return the corresponding point in 3D space |
|
|
|
nearestIndexToPoint(self,
point)
Returns the grid indices (a,b,c) that are closest to the point
(x,y,z). |
|
|
|
writeCNS(self,
filename=None,
norm=True) |
|
|
|
mapAtomToGrid(self,
atom,
scale_radius=1.0)
Assigns atom density to the grid based on the atom's position. |
|
|
|
mapPointToGrid(self,
point)
Maps a single point to the grid, assuming a default radius |
|
|
|
mapAtomListToGrid(self,
st,
atom_list=[ ] ,
scale_radii=1.0)
Given a Structure object and a list of atom indices, map atoms in
the list to the grid. |
|
|
|
_evaluateGaussian(self,
center,
point,
coeff,
prefactor=1.0)
Returns the value of a Gaussian evaulated at a particular point. |
|
|
|
mapPointsToGrid(self,
points)
maps a numpy array of points (shape n,3) to the grid. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|