IMP logo
Classes | Typedefs | Functions
IMP::example Namespace Reference

Detailed Description

This module provides example showing how to implement various types of objects and functionality in IMP.

The overview section of the module page can contain any doxygen markup as well as references to IMP classes such as IMP::Model. See the doxygen web site for a full description of what can be done in doxygen.

Remember to escape characters to keep python happy.

Examples:

Author(s): Daniel Russel

Version: SVN.r14091

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:

Classes

class  ExampleComplexRestraint
 Restrain the diameter of a set of points. More...
class  ExampleConstraint
 A trivial constraint that just increments a counter. More...
class  ExampleDecorator
 A simple decorator which adds a name to a particle. More...
class  ExamplePairScore
 Apply a harmonic to the distance between two particles. More...
class  ExampleRefCounted
 An example simple object which is reference counted. More...
class  ExampleRestraint
 Restrain a particle to be in the x,y plane. More...
class  ExampleSingletonModifier
 An example singleton modifer. More...
class  ExampleSubsetFilterTable
class  ExampleTemplateClassD
 A line segment templated on the dimension. More...
class  ExampleUnaryFunction
 A simple unary function. More...

Typedefs

typedef base::Vector< Pointer
< ExampleRefCounted > > 
ExampleRefCounteds
typedef base::Vector
< WeakPointer
< ExampleRefCounted > > 
ExampleRefCountedsTemp
typedef ExampleTemplateClassD< 3 > ExampleTemplateClass3D
typedef base::Vector
< ExampleTemplateClassD< 3 > > 
ExampleTemplateClass3Ds

Functions

Restraintcreate_chain_restraint (const ParticlesTemp &ps, double length_factor, double k, std::string name)
container::ClosePairContainercreate_excluded_volume (const ParticlesTemp &ps, double k, std::string name)
core::Movercreate_serial_mover (const ParticlesTemp &ps)
unsigned int get_number_of_incidences (const ParticlesTemp &psa, const ParticlesTemp &psb, double point_distance)
void optimize_assembly (Model *m, const ParticlesTemp &components, const RestraintsTemp &interactions, const RestraintsTemp &other_restraints, const algebra::BoundingBox3D &bb, PairScore *ev, double cutoff, const PairPredicates &excluded=PairPredicates())
void optimize_balls (const ParticlesTemp &ps, const RestraintsTemp &rs=RestraintsTemp(), const PairPredicates &excluded=PairPredicates(), const OptimizerStates &opt_states=OptimizerStates(), base::LogLevel ll=DEFAULT)
template<class ParticlesList , class BoundingVolume >
void randomize_particles (const ParticlesList &ps, const BoundingVolume &bv)
template<class RigidBody , class BoundingVolume >
void randomize_rigid_body (RigidBody rbi, const BoundingVolume &bv)

Function Documentation

Restraint* IMP::example::create_chain_restraint ( const ParticlesTemp &  ps,
double  length_factor,
double  k,
std::string  name 
)

Restraint the passed particles to be connected in a chain. The distance between consecutive particles is length_factor*the sum of the radii.

Note, this assumes that all such chains will be disjoint and so you can use the container::ExclusiveConsecutivePairFilter if you want to filter out all pairs of particles connected by such chain restraints.

The restraint is not added to the model.

container::ClosePairContainer* IMP::example::create_excluded_volume ( const ParticlesTemp &  ps,
double  k,
std::string  name 
)

Create an excluded-volume style ClosePairsContainer based score.

core::Mover* IMP::example::create_serial_mover ( const ParticlesTemp &  ps)

Create a serial mover from a list of core::XYZR particles.

unsigned int IMP::example::get_number_of_incidences ( const ParticlesTemp &  psa,
const ParticlesTemp &  psb,
double  point_distance 
)

Return the number of times particles from one set are close to those from another set.

Note:
This method uses the distance between the centers of the particles and does not use their radii.
void IMP::example::optimize_assembly ( Model *  m,
const ParticlesTemp &  components,
const RestraintsTemp &  interactions,
const RestraintsTemp &  other_restraints,
const algebra::BoundingBox3D &  bb,
PairScore *  ev,
double  cutoff,
const PairPredicates &  excluded = PairPredicates() 
)

Provide an example of a more involved protocol for assembly a complex. The protocol adds the particles one at a time based on how well connected they are to the already added particles (in the interaction graph). After each addition, the assembly is optimized. The protocol seems to work at assembling the residues of a protein from a truncated distance matrix.

void IMP::example::optimize_balls ( const ParticlesTemp &  ps,
const RestraintsTemp &  rs = RestraintsTemp(),
const PairPredicates &  excluded = PairPredicates(),
const OptimizerStates &  opt_states = OptimizerStates(),
base::LogLevel  ll = DEFAULT 
)

Take a set of core::XYZR particles and relax them relative to a set of restraints. Excluded volume is handle separately, so don't include it in the passed list of restraints.

template<class ParticlesList , class BoundingVolume >
void IMP::example::randomize_particles ( const ParticlesList &  ps,
const BoundingVolume &  bv 
)

Randomize the positions of a set of particles within a bounding volume. Rigid bodies have their orientation randomized too.


Generated on Tue May 22 2012 23:33:35 for IMP by doxygen 1.8.1