IMP Reference Guide
2.20.1
The Integrative Modeling Platform
|
A particle that is the center of mass of other particles. More...
#include <IMP/atom/CenterOfMass.h>
A particle that is the center of mass of other particles.
A decorator which constrains a particle to be the center of mass of a set of other particles, and whose mass is the sum of their masses. The c.o.m. is updated before model evaluation and its derivatives are copied to its children, using a constraint that is created at setup time. The derivatives propagated to each particle are scaled based on its mass relative to the total mass.
Definition at line 33 of file CenterOfMass.h.
Public Member Functions | |
CenterOfMass (::IMP::Model *m,::IMP::ParticleIndex id) | |
CenterOfMass (const IMP::ParticleAdaptor &d) | |
Constraint * | get_constraint () const |
Float | get_coordinate (int i) const |
const algebra::Vector3D & | get_coordinates () const |
Float | get_mass () const |
void | show (std::ostream &out=std::cout) const |
Public Member Functions inherited from IMP::Decorator | |
bool | get_is_valid () const |
Returns true if constructed with a non-default constructor. More... | |
Model * | get_model () const |
Returns the Model containing the particle. More... | |
Particle * | get_particle () const |
Returns the particle decorated by this decorator. More... | |
ParticleIndex | get_particle_index () const |
Returns the particle index decorated by this decorator. More... | |
operator Particle * () const | |
operator ParticleIndex () const | |
Particle * | operator-> () const |
Static Public Member Functions | |
static bool | get_is_setup (const IMP::ParticleAdaptor &p) |
static bool | get_is_setup (Model *m, ParticleIndex pi) |
static CenterOfMass | setup_particle (Model *m, ParticleIndex pi, ParticleIndexesAdaptor members) |
static CenterOfMass | setup_particle (IMP::ParticleAdaptor pa, ParticleIndexesAdaptor members) |
static CenterOfMass | setup_particle (Model *m, ParticleIndex pi, Refiner *refiner) |
static CenterOfMass | setup_particle (IMP::ParticleAdaptor pa, Refiner *refiner) |
static void | teardown_particle (CenterOfMass com) |
Make the particle no longer a center of mass. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from IMP::Decorator | |
Decorator (Model *m, ParticleIndex pi) | |
Decorator (ParticleAdaptor p) | |
|
static |
Definition at line 81 of file CenterOfMass.h.
|
static |
Sets up CenterOfMass over members, and constrains CenterOfMass to be computed before model evaluation and to propagate derivatives following model evaluation.
pi is decorated with core::XYZ and atom::Mass decorators, its coordinates are set to the current center of mass of pis, and its mass is set to the sum of their masses.
Definition at line 81 of file CenterOfMass.h.
|
static |
Definition at line 93 of file CenterOfMass.h.
|
static |
Sets up CenterOfMass over particles passed by applying the refiner over the particle pi, and constrains CenterOfMass to be computed before model evaluation and to propagate derivatives following model evaluation.
pi is decorated with the core::XYZ and atom::Mass decorators, its coordinates are set to the current center of mass of refiner->get_refined_indexes(m, pi), and its mass is set to the sum of their masses.
Definition at line 93 of file CenterOfMass.h.
|
static |
Make the particle no longer a center of mass.