IMP logo

IMP::core Namespace Reference


Detailed Description

This module contains basic functionality that is expected to be used by a wide variety of IMP users.

Author:
Daniel Russel, Ben Webb
Version:
1.0
Overview:
This module contains basic functionality that is expected to be used by a wide variety of IMP users. The classes in it should not directly incorporate experimental data and instead should provide basic building blocks for making restraints and manipulating Particle objects. Typical classes are IMP::core::Harmonic, IMP::DistancePairScore, IMP::VolumeRestraint etc.
See the IMP::helper module for a higher level layer built on top of this module (and other modules).

Examples
Examples can be found on the IMP.core examples page.
License:
LGPL. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Publications:
  • Daniel Russel, Keren Lasker, Ben Webb, Dina Schneidman, Javier Velazquez-Muriel, Andrej Sali, “Integrative assembly modeling using IMP”, submitted, 2010. This paper provides an overview of the key concepts in IMP and how to apply them to biological problems.
  • Frank Alber, Friedrich Foerster, Dmitry Korkin, Maya Topf, Andrej Sali, “Integrating diverse data for structure determination of macromolecular assemblies”, Annual Review of Biochemistry, 2008. This paper provides a review of the integrative structure determination methodology and various data sources that can be used.


Data Structures

class  AngleRestraint
 Angle restraint between three particles. More...
class  AngleTripletScore
 Apply a function to the angle between three particles. More...
class  AttributeSingletonScore
 Apply a function to an attribute. More...
class  BallMover
 Modify a set of continuous variables by perturbing them within a ball. More...
class  BoundingBox3DSingletonScore
 Score particles based on how far outside a box they are. More...
class  Centroid
 A particle that is the centroid of other particles. More...
class  CentroidOfRefined
 Set the coordinates of the particle to be the centoid of the particles. More...
class  Centroids
class  CentroidsTemp
class  ChecksScoreState
class  ChildrenRefiner
 Return the hierarchy children of a particle. More...
class  ClosedCubicSpline
 Closed cubic spline function. More...
class  ClosePairsFinder
 A base class for algorithms to find spatial proximities. More...
class  ClosePairsPairScore
 Traverse the Refiner hierarchy to find all pairs which are close. More...
class  ConjugateGradients
 Simple conjugate gradients optimizer. More...
class  ConnectingPairContainer
 A container which keeps a set of pairs that connect a set of spheres. More...
class  ConnectivityRestraint
 Ensure that a set of particles remains connected with one another. More...
class  ConstantRestraint
 Return a constant value. More...
class  Cosine
 Cosine function. More...
class  Cover
 A particle which covers a set of other particles. More...
class  CoverRefined
 This class sets the position and radius of each particle to enclose the refined. More...
class  Covers
class  CoversTemp
class  DerivativesFromRefined
 Accumulate the derivatives of the refined particles. More...
class  DerivativesToRefined
 Copy the derivatives from the particle to its refined particles. More...
class  DiameterRestraint
 Restrain the diameter of a set of points. More...
class  DihedralRestraint
 Dihedral restraint between four particles. More...
class  DistancePairScore
 Apply a function to the distance between two particles. More...
class  DistanceRestraint
 Distance restraint between two particles. More...
class  DistanceToSingletonScore
 Apply a function to the distance to a fixed point. More...
class  EditGuard
 RAII class for objects with batch editing modes. More...
class  ExcludedVolumeRestraint
 Prevent a set of particles and rigid bodies from inter-penetrating. More...
class  FixedRefiner
 The refiner can refine any particle by returning a fixed set. More...
class  GenericHierarchies
class  GenericHierarchiesTemp
class  GridClosePairsFinder
 Find all nearby pairs by testing all pairs. More...
class  Harmonic
 Harmonic function (symmetric about the mean) More...
class  HarmonicLowerBound
 Lower bound harmonic function (non-zero when feature < mean). More...
class  HarmonicUpperBound
 Upper bound harmonic function (non-zero when feature > mean). More...
class  Hierarchy
 A decorator for helping deal with a hierarchy. More...
class  HierarchyCounter
 A simple functor to count the number of particles in a hierarchy. More...
struct  HierarchyPrinter
 A simple visitor which pretty-prints the hierarchy. More...
class  HierarchyTraits
 Define the type for a type of hierarchy. More...
class  HierarchyVisitor
 A visitor for traversal of a hierarchy. More...
class  IncrementalBallMover
 Modify a set of continuous variables by perturbing them within a ball. More...
class  LeavesRefiner
 Return the hierarchy leaves under a particle. More...
class  Linear
 Linear function More...
class  MCCGSampler
 A simple sampler. More...
class  ModifierVisitor
 A which applies a singleton modifier to each Particle in a hierarchy. More...
class  MonteCarlo
 A Monte Carlo optimizer. More...
class  Mover
 A base class for classes which pertub particles. More...
class  MoverBase
 A class to help implement movers. More...
class  Movers
class  MoversTemp
class  NormalizedSphereDistancePairScore
 A score on the normalized distance between the surfaces of two spheres. More...
class  NormalMover
 Modify a set of continuous variables using a normal distribution. More...
class  OpenCubicSpline
 Open cubic spline function. More...
class  PairConstraint
 Apply a PairFunction to a Pair. More...
class  PairRestraint
 Applies a PairScore to a ParticlePair. More...
class  QuadConstraint
 Apply a QuadFunction to a Quad. More...
class  QuadraticClosePairsFinder
 Find all nearby pairs by testing all pairs. More...
class  QuadRestraint
 Applies a QuadScore to a ParticleQuad. More...
class  RefinedPairsPairScore
 Generate pairs to score by applying a Refiner. More...
class  RigidBody
 A decorator for a rigid body. More...
class  RigidBodyDistancePairScore
 Accelerated computation of the distance between two rigid bodies. More...
class  RigidBodyMover
 Modify the transformation of a rigid body. More...
class  RigidClosePairsFinder
 Peform more efficient close pair finding when rigid bodies are involved. More...
class  RigidMember
 A decorator for a particle that is part of a rigid body. More...
class  RigidMembers
class  RigidMembersTemp
class  SingletonConstraint
 Apply a SingletonFunction to a Singleton. More...
class  SingletonRestraint
 Applies a SingletonScore to a Particle. More...
class  SphereDistancePairScore
 A score on the distance between the surfaces of two spheres. More...
class  SphereDistanceToSingletonScore
 Apply a function to the distance to a fixed point. More...
class  SteepestDescent
 A simple steepest descent optimizer. More...
class  TableRefiner
 A lookup based particle refiner. More...
class  Transform
 Apply a transformation to a passed particle. More...
class  TransformedDistancePairScore
 Apply a function to the distance between two particles after transforming the first. More...
class  TripletConstraint
 Apply a TripletFunction to a Triplet. More...
class  TripletRestraint
 Applies a TripletScore to a ParticleTriplet. More...
class  TruncatedHarmonic
 A function that is harmonic over an interval. More...
class  TypedPairScore
 Delegate to another PairScore depending on particle types. More...
class  VolumeRestraint
 Restraint the volume of a set of spheres. More...
class  WeightedSphereDistancePairScore
 A score on a weighted distance between the surfaces of two spheres. More...
class  XYZ
 A a decorator for a particle with x,y,z coordinates. More...
class  XYZR
 A decorator for a particle with x,y,z coordinates and a radius. More...
class  XYZRs
class  XYZRsTemp
class  XYZs
class  XYZsTemp

Typedefs

typedef IMP::Decorators
< RigidBody, XYZs
RigidBodies
typedef IMP::Decorators
< RigidBody, XYZsTemp
RigidBodiesTemp
typedef TruncatedHarmonic< BOTH > TruncatedHarmonicBound
 A specialization.
typedef TruncatedHarmonic< LOWER > TruncatedHarmonicLowerBound
 A specialization for the lower bound.
typedef TruncatedHarmonic< UPPER > TruncatedHarmonicUpperBound
 A specialization for the upper bound.

Enumerations

enum  BoundDirection { LOWER, BOTH, UPPER }

Functions

template<class HD , class F >
HD breadth_first_find (HD h, F f)
 Find the first node which matches some criteria.
template<class HD , class F >
breadth_first_traversal (HD d, F f)
 Apply the visitor to each particle, breadth first.
template<class HD , class F >
breadth_first_traversal_with_data (HD d, F f, typename F::result_type i)
 Apply functor F to each particle, traversing the hierarchy breadth first.
XYZRs create_xyzr_particles (Model *m, unsigned int num, Float radius, Float box_side=10)
 Create a set of particles which random coordinates.
template<class HD , class F >
depth_first_traversal (HD d, F f)
 Apply functor F to each particle, traversing the hierarchy depth first.
template<class HD , class F >
depth_first_traversal_with_data (HD d, F f, typename F::result_type i)
 Apply functor F to each particle, traversing the hierarchy depth first.
template<class Out , class F >
Out gather (Hierarchy h, F f, Out out)
 Gather all the particles in the hierarchy which meet some criteria.
template<class Out , class K , class V >
Out gather_by_attribute (Hierarchy h, K k, V v, Out out)
 Gather all the particles in the hierarchy which match on an attribute.
template<class Out , class K0 , class V0 , class K1 , class V1 >
Out gather_by_attributes (Hierarchy h, K0 k0, V0 v0, K1 k1, V1 v1, Out out)
 Gather all the particles in the hierarchy which match on two attributes.
GenericHierarchiesTemp get_all_descendants (Hierarchy mhd)
 Get all the particles in the subtree.
algebra::VectorD< 3 > get_centroid (const XYZsTemp &ps)
 Get the centroid.
std::string get_data_path (std::string file_name)
 Return the path to installed data for this module.
double get_distance (XYZR a, XYZR b)
 Compute the distance between a pair of particles.
double get_distance (XYZ a, XYZ b)
 Compute the distance between a pair of particles.
algebra::SphereD< 3 > get_enclosing_sphere (const XYZsTemp &v, FloatKey rk=XYZR::get_default_radius_key())
 Get a sphere enclosing the set of XYZRs.
std::string get_example_path (std::string file_name)
 Return the path to installed example data for this module.
const algebra::SphereD< 3 > & get_geometry (const algebra::SphereD< 3 > &v)
const algebra::SphereD< 3 > get_geometry (XYZR d)
const algebra::VectorD< 3 > & get_geometry (const algebra::VectorD< 3 > &v)
const algebra::VectorD< 3 > get_geometry (XYZ d)
GenericHierarchiesTemp get_internal (Hierarchy mhd)
 Get all the non-leaves of the bit of hierarchy.
GenericHierarchiesTemp get_leaves (Hierarchy mhd)
 Get all the leaves of the bit of hierarchy.
std::string get_module_name ()
const VersionInfoget_module_version_info ()
Hierarchy get_root (Hierarchy h)
 Return the root of the hierarchy.
void set_enclosing_radius (XYZR b, const XYZsTemp &v)
 Set the radius of the first to enclose the list.
void set_enclosing_sphere (XYZR b, const XYZsTemp &v, double slack=0)
 Set the coordinates and radius of the first to enclose the list.
void set_geometry (algebra::SphereD< 3 > &vbase, const algebra::SphereD< 3 > &v)
void set_geometry (XYZR d, const algebra::SphereD< 3 > &v)
void set_geometry (algebra::VectorD< 3 > &vbase, const algebra::VectorD< 3 > &v)
void set_geometry (XYZ d, const algebra::VectorD< 3 > &v)
template<class ND >
std::ostream & show (Hierarchy h, std::ostream &out=std::cout, unsigned int max_depth=std::numeric_limits< unsigned int >::max())
 Print the hierarchy using a given decorator as to display each node.
void transform (RigidBody a, const algebra::Transformation3D &tr)
 Transform a rigid body.
void transform (XYZ a, const algebra::Transformation3D &tr)
 Apply a transformation to the particle.

Function Documentation

XYZRs create_xyzr_particles ( Model *  m,
unsigned int  num,
Float  radius,
Float  box_side = 10 
)

Create a set of particles which random coordinates.

This function is mostly to be used to keep demo code brief.

Parameters:
[in] m The model to add them to.
[in] num The number of particles to create.
[in] radius The radius to give them.
[in] box_side The particles have coordinates from -box_side to box_side.
The particles coordinates are optimized.

algebra::VectorD<3> IMP::core::get_centroid ( const XYZsTemp &  ps  ) 

Get the centroid.

Compute the centroid (mean) of a set of particles.

std::string IMP::core::get_data_path ( std::string  file_name  ) 

Return the path to installed data for this module.

Each module has its own data directory, so be sure to use the version of this function in the correct module. To read the data file "data_library" that was placed in the data directory of module "mymodule", do something like

    std::ifstream in(IMP::mymodule::get_data_path("data_library"));
This will ensure that the code works when IMP is installed or used via the tools/imppy.sh script.

algebra::SphereD< 3 > get_enclosing_sphere ( const XYZsTemp &  v,
FloatKey  rk = XYZR::get_default_radius_key() 
)

Get a sphere enclosing the set of XYZRs.

Parameters:
[in] v The one whose radius should be set
[in] rk The radius key to use Any particle which does not have the attribute b.get_radius() is assumed to have a radius of 0.

std::string IMP::core::get_example_path ( std::string  file_name  ) 

Return the path to installed example data for this module.

Each module has its own example directory, so be sure to use the version of this function in the correct module. For example to read the file example_protein.pdb located in the examples directory of the IMP::atom module, do

    IMP::atom::read_pdb(IMP::atom::get_example_path("example_protein.pdb", model));
This will ensure that the code works when IMP is installed or used via the tools/imppy.sh script.

const algebra::SphereD<3>& IMP::core::get_geometry ( const algebra::SphereD< 3 > &  v  ) 

const algebra::SphereD<3> IMP::core::get_geometry ( XYZR  d  ) 

const algebra::VectorD<3>& IMP::core::get_geometry ( const algebra::VectorD< 3 > &  v  ) 

const algebra::VectorD<3> IMP::core::get_geometry ( XYZ  d  ) 

Hierarchy get_root ( Hierarchy  h  ) 

Return the root of the hierarchy.

void set_enclosing_radius ( XYZR  b,
const XYZsTemp &  v 
)

Set the radius of the first to enclose the list.

Parameters:
[in] v The vector of XYZ or XYZR particles to enclose
[out] b The one whose radius should be set Any particle which does not have the attribute b.get_radius() is assumed to have a radius of 0.

void set_enclosing_sphere ( XYZR  b,
const XYZsTemp &  v,
double  slack = 0 
)

Set the coordinates and radius of the first to enclose the list.

Parameters:
[in] v The vector of XYZ or XYZR particles to enclose
[out] b The one whose values should be set
[in] slack An amount to add to the radius. Any particle which does not have the attribute b.get_radius() is assumed to have a radius of 0.
Note:
This function produces tighter bounds if the CGAL library is available.

void IMP::core::set_geometry ( algebra::SphereD< 3 > &  vbase,
const algebra::SphereD< 3 > &  v 
)

void IMP::core::set_geometry ( XYZR  d,
const algebra::SphereD< 3 > &  v 
)

void IMP::core::set_geometry ( algebra::VectorD< 3 > &  vbase,
const algebra::VectorD< 3 > &  v 
)

void IMP::core::set_geometry ( XYZ  d,
const algebra::VectorD< 3 > &  v 
)

void transform ( RigidBody  a,
const algebra::Transformation3D &  tr 
)

Transform a rigid body.

The transformation is applied current conformation of the rigid body, as opposed to replacing the current conformation, as in RigidBody::set_transformation().

algebra::Transformation3D


Generated on Mon Mar 8 23:08:54 2010 for IMP by doxygen 1.5.8