LOOS  v2.3.2
loos::DensityTools Namespace Reference

Namespace for Density package. More...

Classes

class  BulkedWaterFilter
 Add bulk water back into the mask/map. More...
 
class  BulkEstimator
 
class  DensityGrid
 A simple 3D grid class of arbitrary types. More...
 
class  DensityGridIterator
 Random access iterator using the BOOST facade. More...
 
class  DensityGridPlane
 Encapsulates an i,j-plane from an DensityGrid. More...
 
class  DensityGridRow
 Encapsulates a j-row from an DensityGrid. More...
 
class  NonzeroDensity
 Functor that is true for any non-zero density. More...
 
class  NullEstimator
 
class  SimpleMeta
 Simple class for handling metadata. More...
 
class  Threshold
 Functor that is true if value is greater than or equal to threshold. More...
 
class  ThresholdRange
 Functor that is true if value is between low and hi, inclusive. More...
 
class  WaterFilterAxis
 Pick waters that are within a radius of the principal axis for a molecule. More...
 
class  WaterFilterBase
 Base interface for water filter/picker. More...
 
class  WaterFilterBlob
 Pick waters based on a grid-mask. More...
 
class  WaterFilterBox
 Pick waters inside a bounding box. More...
 
class  WaterFilterCore
 Pick waters that are within a radius of the core axis for a molecule. More...
 
class  WaterFilterDecorator
 Decorator base class for "decorating" the core water filters... More...
 
class  WaterFilterRadius
 Pick waters within a given radius of a group of atoms. More...
 
class  WaterHistogrammer
 
struct  XEDMWriter
 Functor for writing out ASCII formatted X-Plor electron density maps. More...
 
class  ZClipEstimator
 
class  ZClippedWaterFilter
 Restrict waters to be within a given z-range. More...
 
class  ZSliceEstimator
 

Typedefs

typedef Coord< int > DensityGridpoint
 

Functions

std::vector< double > gaussian1d (const int, const double)
 Construct a 1D gaussian.
 
template<typename T , class Functor >
std::vector< DensityGridpointfloodFill (const DensityGridpoint seed, const DensityGrid< T > &data_grid, const int id, DensityGrid< int > &blob_grid, const Functor &op)
 Flood-fill a grid. More...
 
template<typename T , class Functor >
int floodFill (const DensityGridpoint seed, const DensityGrid< T > &data_grid, const Functor &op)
 Flood-fill a grid, returning a list of points filled in.
 
template<typename T , class Functor >
std::vector< loos::GCoordfindPeaks (const DensityGrid< T > &grid, DensityGrid< int > &blobs, const Functor &op)
 Find peaks in a grid given the criteria defined by the passed functor. More...
 
template<typename T , class Functor >
std::vector< loos::GCoordfindPeaks (const DensityGrid< T > &grid, const Functor &op)
 Find peaks in a grid based on the functor.
 
template<class T , class Functor >
loos::AtomicGroup gridToAtomicGroup (const DensityGrid< T > &grid, const Functor &op)
 Converts grid points (determined by functor) into an AtomicGroup of pseudo-atoms.
 
template<class T >
void gridConvolve (DensityGrid< T > &grid, DensityGrid< T > &kernel)
 Convolve a grid with another grid (kernel)
 
template<class T >
void gridConvolve (DensityGrid< T > &grid, std::vector< T > &kernel)
 Convolve a grid with a 1D kernel stored in a vector.
 
std::vector< GCoordgetBounds (pTraj &traj, AtomicGroup &group, const std::vector< uint > &frames)
 Get the max bounding box for a group over the trajectory.
 
template<class T >
void writeXplorEDM (std::ostream &os, DensityTools::DensityGrid< T > &grid)
 Write out an DensityTools::DensityGrid as an ASCII formatted X-PLOR electron density map.
 

Detailed Description

Namespace for Density package.

Function Documentation

template<typename T , class Functor >
std::vector<loos::GCoord> loos::DensityTools::findPeaks ( const DensityGrid< T > &  grid,
DensityGrid< int > &  blobs,
const Functor &  op 
)

Find peaks in a grid given the criteria defined by the passed functor.

Requires a data-grid, a grid to contain the flood-filled assignments, and a functor that determines what points in the data-grid to operate on.

This function segments the grid into a blobs based on the functor. For each unique blob, it returns the center of mass of the blob as a vector of GCoords. The vector index corresponds to the blob_id - 1 in the blobs grid.

Definition at line 136 of file GridUtils.hpp.

template<typename T , class Functor >
std::vector<DensityGridpoint> loos::DensityTools::floodFill ( const DensityGridpoint  seed,
const DensityGrid< T > &  data_grid,
const int  id,
DensityGrid< int > &  blob_grid,
const Functor &  op 
)

Flood-fill a grid.

Requires a seed-point to start the grid at. The data_grid is untouched by the fill. Instead, a grid of ints (id's) is filled it using the passed id value. The functor op determines the criteria for filling (i.e. using a threshold, range, or non-zero points).

Returns a list of grindpoints that were filled in.

Definition at line 81 of file GridUtils.hpp.