IMP logo

IMP::core::SphereDistanceToSingletonScore Class Reference


Detailed Description

Apply a function to the distance to a fixed point.

A particle is scored based on the distance between it and a constant point as passed to a UnaryFunction. This is useful for anchoring constraining particles within a sphere.

To restrain a set of particles store in SingletonContainer pc in a sphere do the following: import IMP.example radius=10 stiffness=2 center= IMP.algebra.Vector3D(1,2,3) (m,c)=IMP.example.create_model_and_particles() ub= IMP.core.HarmonicUpperBound(radius, stiffness) ss= IMP.core.DistanceToSingletonScore(ub, center) r= IMP.container.SingletonsRestraint(ss, c) m.add_restraint(r) m.evaluate(False)

Inheritance diagram for IMP::core::SphereDistanceToSingletonScore:

Inheritance graph
[legend]

Public Member Functions

ContainersTemp get_input_containers (Particle *) const
ParticlesTemp get_input_particles (Particle *p) const
ParticlesList get_interacting_particles (Particle *) const
bool get_is_changed (Particle *p) const
 IMP_SINGLETON_SCORE_BASE (SphereDistanceToSingletonScore)
 SphereDistanceToSingletonScore (UnaryFunction *f, const algebra::VectorD< 3 > &pt)

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

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