IMP logo

IMP::container::TripletsRestraint Class Reference


Detailed Description

Applies a TripletScore to each ParticleTriplet in a list.

This restraint stores the used particles in a ParticleTriplets. The container used can be set so that the list can be shared with other containers (or a nonbonded list can be used). By default a ListTripletContainer is used and the {add_, set_, clear_}particle_triplet{s} methodas can be used.

Examples using various multiplicity containers:

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)
import IMP
import IMP.core
import IMP.atom
import IMP.container

# This example addes a restraint on nonbonded interactions
# after excluding a set of bonded interactions.

m= IMP.Model()
# The set of particles
ps = IMP.container.ListSingletonContainer(IMP.core.create_xyzr_particles(m, 20, 1.0))

# create a bond between two particles
bd0= IMP.atom.Bonded.setup_particle(ps.get_particle(0))
bd1= IMP.atom.Bonded.setup_particle(ps.get_particle(1))
IMP.atom.create_custom_bond(bd0, bd1, 2.0)

# Set up the nonbonded list for all pairs at are touching
# and let things move 3 before updating the list
nbl= IMP.container.ClosePairContainer(ps, 0.0, 3.0)
nbl.add_pair_filter(IMP.atom.BondedPairFilter())

# Set up excluded volume
sdps= IMP.core.SphereDistancePairScore(IMP.core.HarmonicLowerBound(0,1))
evr= IMP.container.PairsRestraint(sdps, nbl)
m.add_restraint(evr)

# Set up optimizer
o= IMP.core.ConjugateGradients()
o.set_model(m)

o.optimize(1000)

See also:
TripletRestraint
Inheritance diagram for IMP::container::TripletsRestraint:

Inheritance graph
[legend]

Public Member Functions

ContainersTemp get_input_containers () const
ParticlesTemp get_input_particles () const
ParticlesList get_interacting_particles () const
virtual bool get_is_incremental () const
TripletContainerget_triplet_container ()
 Get the container used to store Particles.
TripletScoreget_triplet_score () const
virtual std::string get_type_name () const
virtual ::IMP::VersionInfo get_version_info () const
 TripletsRestraint (TripletScore *ss, TripletContainer *pc, std::string name="TripletsRestraint %1%")
 Create the restraint with a shared container.
virtual double unprotected_evaluate (DerivativeAccumulator *accum) const
virtual double unprotected_incremental_evaluate (DerivativeAccumulator *accum) const

Friends

template<class T >
void IMP::internal::unref (T *)

Constructor & Destructor Documentation

IMP::container::TripletsRestraint::TripletsRestraint ( TripletScore ss,
TripletContainer pc,
std::string  name = "TripletsRestraint %1%" 
)

Create the restraint with a shared container.

Parameters:
[in] ss The function to apply to each particle.
[in] pc The container containing the stored particles. This container is not copied.
[in] name The object name


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

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