clipper::MAtomNonBond Class Reference

Find atoms in the vicinity of some coordinate in real space. More...

#include <minimol_utils.h>

List of all members.

Public Member Functions

 MAtomNonBond ()
 null constructor
 MAtomNonBond (const clipper::MiniMol &mol, double rad=5.0)
 constructor: from MiniMol and grid radius
std::vector< MAtomIndexSymmetryatoms_near (const clipper::Coord_orth &co, double rad) const
 get a list of atoms in the rough vicinity of a coordinate
std::vector< MAtomIndexSymmetryoperator() (const clipper::Coord_orth &co, double rad) const
void debug () const

Detailed Description

Find atoms in the vicinity of some coordinate in real space.

Uses a fast non-bonded atom search.


Constructor & Destructor Documentation

clipper::MAtomNonBond::MAtomNonBond ( const clipper::MiniMol mol,
double  rad = 5.0 
)

constructor: from MiniMol and grid radius

Set up a non-bonding type search database to allow fast access to a list of atoms within a given radius of a given coordinate. Setting up the class takes a litle (but not a great deal) of time, returning coordinates is very fast indeed. You can also specify a radius to the constructor, which determines memory use as (24*cell volume/rad^3) bytes. For small radii, set this to the search radius or larger. For large radii, a smaller value may improve performance.

Parameters:
mol The MiniMol object containing the atoms.
rad A radius for sampling crystal space.

References clipper::Cell::a_star(), clipper::Cell::b_star(), clipper::Cell::c_star(), clipper::MiniMol::cell(), clipper::Coord_frac::coord_grid(), clipper::Coord_grid::index(), clipper::Util::intc(), clipper::Spacegroup::num_symops(), clipper::Grid_sampling::size(), clipper::MModel::size(), clipper::MiniMol::spacegroup(), clipper::Spacegroup::symop(), and clipper::Coord_grid::unit().


Member Function Documentation

std::vector< MAtomIndexSymmetry > clipper::MAtomNonBond::atoms_near ( const clipper::Coord_orth co,
double  rad 
) const

get a list of atoms in the rough vicinity of a coordinate

Return a list of atom indices in the MiniMol objects, and symop numbers, of atoms within the previously specified radius of the given coordinate. The function always returns all atoms within the specified radius, but also some beyond it. This function is very fast.

Parameters:
co The coordinate about which to search.
rad The radius to search.
Returns:
A vector of atom indices near the given coordinate.

References clipper::Coord_orth::coord_frac(), clipper::Coord_frac::coord_grid(), clipper::Util::intc(), clipper::Coord_grid::u(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().

Referenced by operator()().

std::vector< MAtomIndexSymmetry > clipper::MAtomNonBond::operator() ( const clipper::Coord_orth co,
double  rad 
) const

Return a list of atom indices in the MiniMol objects, and symop numbers, of atoms within the previously specified radius of the given coordinate. The function only returns atoms within the specified radius. This function is very fast.

Parameters:
co The coordinate about which to search.
rad The radius to search.
Returns:
A vector of atom indices near the given coordinate.

References atoms_near(), clipper::Coord_orth::coord_frac(), clipper::Coord_frac::lattice_copy_near(), and clipper::Spacegroup::symop().


The documentation for this class was generated from the following files:

Generated on 4 Jan 2010 for Clipper_minimol by  doxygen 1.6.1