IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
IMP::npctransport::SitesPairScore Class Reference

Apply a function to the distance between two particles with a set of specific binding sites. More...

#include <IMP/npctransport/SitesPairScore.h>

+ Inheritance diagram for IMP::npctransport::SitesPairScore:

Detailed Description

Apply a function to the distance between two particles with a set of specific binding sites.

The sites are expressed in the local reference frame of the two rigid bodies. Care must be taken to pass the bodies in the appropriate order. See construction documentation for more details.

Definition at line 45 of file SitesPairScore.h.

Public Member Functions

 SitesPairScore (double range, double k, double sigma0_deg, double sigma1_deg, double range_nonspec_attraction, double k_nonspec_attraction, double k_nonspec_repulsion, const algebra::Sphere3Ds &sites0, const algebra::Sphere3Ds &sites1)
 
virtual ModelObjectsTemp do_get_inputs (Model *m, const ParticleIndexes &pis) const
 Overload this method to specify the inputs. More...
 
double evaluate_if_good_indexes (Model *m, const ParticleIndexPairs &p, DerivativeAccumulator *da, double max, unsigned int lower_bound, unsigned int upper_bound) const
 
virtual double evaluate_index (Model *m, const ParticleIndexPair &p, DerivativeAccumulator *da) const
 
virtual double evaluate_indexes (Model *m, const ParticleIndexPairs &p, DerivativeAccumulator *da, unsigned int lower_bound, unsigned int upper_bound) const
 
double evaluate_site_contributions (Model *m, const ParticleIndexPair &pip, DerivativeAccumulator *da, boost::tuple< unsigned int, std::vector< unsigned int >, std::vector< unsigned int >, bool >(*contacts_accumulator)) const
 
double evaluate_site_contributions_with_internal_tables (algebra::Sphere3D const *spheres_table, double const **quaternions_tables, algebra::Sphere3D *sphere_derivatives_table, double **torques_tables, const ParticleIndexPair &pip, DerivativeAccumulator *da, boost::tuple< unsigned int, std::vector< unsigned int >, std::vector< unsigned int >, bool >(*contacts_accumulator)=nullptr) const
 
SitesPairScoreParameters get_parameters () const
 
double get_sites_k () const
 return the k for site-site attraction More...
 
double get_sites_range () const
 return the range for site-site attraction More...
 
virtual std::string get_type_name () const
 
virtual ::IMP::VersionInfo get_version_info () const
 Get information about the module and version of the object. More...
 
void set_sites (const algebra::Sphere3Ds &sites0, const algebra::Sphere3Ds &sites1)
 
void set_sites0 (const algebra::Sphere3Ds &sites0)
 
void set_sites1 (const algebra::Sphere3Ds &sites1)
 
- Public Member Functions inherited from IMP::npctransport::LinearInteractionPairScore
 LinearInteractionPairScore (double k_rep, double range_attr, double k_attr, std::string name="LinearIDPairScore%1%")
 
double evaluate_if_good_index (Model *m, const ParticleIndexPairs &p, DerivativeAccumulator *da, double max, unsigned int lower_bound, unsigned int upper_bound) const
 
EvaluationCache const & get_evaluation_cache () const
 
double get_k_attraction () const
 returns the k for sphere-sphere attraction in kcal/mol/A units More...
 
double get_k_repulsion () const
 returns the k for sphere-sphere repulsion in kcal/mol/A units More...
 
double get_range_attraction () const
 returns the range for sphere-sphere attraction in A More...
 
void set_k_attraction (double k_attr)
 set k for sphere-sphere attraction in kcal/mol/A units More...
 
void set_k_repulsion (double k_rep)
 set k for sphere-sphere repulsion in kcal/mol/A units More...
 
- Public Member Functions inherited from IMP::PairScore
 PairScore (std::string name="PairScore %1%")
 
Restraints create_current_decomposition (Model *m, const ParticleIndexPair &vt) const
 
virtual double evaluate_if_good_index (Model *m, const ParticleIndexPair &vt, DerivativeAccumulator *da, double max) const
 Compute the score and the derivative if needed, only if "good". More...
 
- Public Member Functions inherited from IMP::ParticleInputs
ModelObjectsTemp get_inputs (Model *m, const ParticleIndexes &pis) const
 Get the ModelObjects read when the given list of particles is used. More...
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Additional Inherited Members

- Public Types inherited from IMP::PairScore
typedef ParticlePair Argument
 
typedef ParticleIndexPair IndexArgument
 
typedef PairModifier Modifier
 
typedef const ParticlePairPassArgument
 
typedef const ParticleIndexPairPassIndexArgument
 
- Protected Member Functions inherited from IMP::npctransport::LinearInteractionPairScore
double evaluate_index (algebra::Sphere3D const &s0, algebra::Sphere3D const &s1, algebra::Sphere3D &ds0, algebra::Sphere3D &ds1, DerivativeAccumulator *da) const
 
- Protected Member Functions inherited from IMP::PairScore
virtual Restraints do_create_current_decomposition (Model *m, const ParticleIndexPair &vt) const
 Override this to return your own decomposition. More...
 
- Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

Constructor & Destructor Documentation

IMP::npctransport::SitesPairScore::SitesPairScore ( double  range,
double  k,
double  sigma0_deg,
double  sigma1_deg,
double  range_nonspec_attraction,
double  k_nonspec_attraction,
double  k_nonspec_repulsion,
const algebra::Sphere3Ds sites0,
const algebra::Sphere3Ds sites1 
)

For positive sigmas, this is an orientation dependent score between two spherical particles that contain a fixed set of interaction sites, sites0 and sites1 (for first and second particle, resp.).

The interaction is composed of a non-specific interaction term between the bead spheres, and the sum of interactions between specific interactions sites of each bead.

If {0} and {1} are positive, the attractive force between pairs of sites at an optimal orientation (sites facing each other) depends on their distance x. The attraction force magnitude is k*x when x<=0.5*range and k*(range-x) when x is between 0.5*range and range. When site0 is rotated by < {0}, this force decays further by a factor (cos{}-cos{}0)/(1.0-cos{}). The force decays similarly when site1 is rotated by < {1}. The maximal potential energy difference due to such pair of interacting sites is: max{U}_{site_site} = 0.25 * k * range^2 [kcal/mol]

If sigma0_deg or sigma1_deg are non-positive, the attractive force between pairs of sites within the attraction range is a constant k, and the maximal interaction energy is instead: max{U}_{site-site} = k * range [kCal/mol]

In addition to site-site interaction, there is a constant attractive force k_nonspec_attraction between the sphere surfaces up to a range range_nonspec_attraction, with maximal energy contribution: max{U}_{non-specific} = 0.5 * k_nonspec_attraction * range_nonspec_attraction [kcal/mol]

Note that for a specific pair of particles, each particle might have a different reference frame (rigid body translation and rotation), which is applied to the sites list upon score evaluation.

Parameters
rangeMaximal range of site specific attraction in any direction of specific sites placed on particles
kMaximal site specific attraction coefficient (in kcal/mol/A^2 when sigma0_deg and sigma1_deg are positive, or kcal/mol/A otherwise, i.e., for orientation-independent interactions)
sigma0_deg,sigma1_degMaximal rotational range of sites 0 and 1, respectively, on the particle surface, specified in degrees. If either is 0, the pair score between site centers is used with a constant k.
range_nonspec_attractionRange for non-specific attraction term between particles that contain the sites
k_nonspec_attractionNon-specific attraction coefficient between particles (constant force in kCal/mol/A within specified range)
k_nonspec_repulsionRepulsion coefficient between particles (constant force applied when particle spheres overlap in kCal/mol/A)
sites0List of sites on the first particle, in its local reference frame
sites1List of sites on the second particle, in its local reference frame

Member Function Documentation

virtual ModelObjectsTemp IMP::npctransport::SitesPairScore::do_get_inputs ( Model m,
const ParticleIndexes pis 
) const
virtual

Overload this method to specify the inputs.

Reimplemented from IMP::npctransport::LinearInteractionPairScore.

double IMP::npctransport::SitesPairScore::evaluate_if_good_indexes ( Model m,
const ParticleIndexPairs p,
DerivativeAccumulator da,
double  max,
unsigned int  lower_bound,
unsigned int  upper_bound 
) const
virtual

evaluated indexes for the range from lower_bound to upper_bound in p, if score>max then return max value of double

Reimplemented from IMP::PairScore.

Definition at line 144 of file SitesPairScore.h.

double IMP::npctransport::SitesPairScore::evaluate_index ( Model m,
const ParticleIndexPair p,
DerivativeAccumulator da 
) const
virtual

evaluate the score for the pair of model particle indexes in p, updating score derivatives to da

Implements IMP::PairScore.

Definition at line 315 of file SitesPairScore.h.

virtual double IMP::npctransport::SitesPairScore::evaluate_indexes ( Model m,
const ParticleIndexPairs pips,
DerivativeAccumulator da,
unsigned int  lower_bound,
unsigned int  upper_bound 
) const
virtual

evaluate all index pairs between pips[lower_bound] and pis[upper_bound] and update their coordinate derivatives scaled by da, if da is not null

Reimplemented from IMP::npctransport::LinearInteractionPairScore.

double IMP::npctransport::SitesPairScore::evaluate_site_contributions ( Model m,
const ParticleIndexPair pip,
DerivativeAccumulator da,
boost::tuple< unsigned int, std::vector< unsigned int >, std::vector< unsigned int >, bool > *  contacts_accumulator 
) const

EvaluatE all site-site interactions for evaluate_index() for the pair pip in model m. If da is not nullptr, it accumulated appropriate derivatives. If contacts_accumulator is not null, then the number of individual contacts and occupied sites is asscumulated there.

Parameters
mthe model
pipthe pair of particle indexes in m
daoptional accumulator for force and torque derivatives
contacts_accumulatorA pointer to a tuple of output values [num-contacts, sites0-bound, sites1-bound, is_nonspec]. num-contacts is the total number of site-site contacts between pip. sites0-bound and sites1-bound are vectors of contact counts for each site of pip[0] and pip[1], resp. is_nonspec is true if the spheres have non-zero non-specific interactions Ignored if Null
Returns
the site-site contributions for the score for the pair pip in model m.

Definition at line 531 of file SitesPairScore.h.

double IMP::npctransport::SitesPairScore::evaluate_site_contributions_with_internal_tables ( algebra::Sphere3D const *  spheres_table,
double const **  quaternions_tables,
algebra::Sphere3D sphere_derivatives_table,
double **  torques_tables,
const ParticleIndexPair pip,
DerivativeAccumulator da,
boost::tuple< unsigned int, std::vector< unsigned int >, std::vector< unsigned int >, bool > *  contacts_accumulator = nullptr 
) const

EvaluatE all site-site interactions for evaluate_index() for the pair pip in model m. If da is not nullptr, it accumulated appropriate derivatives. If contacts_accumulator is not null, then the number of individual contacts and occupied sites is asscumulated there.

Parameters
sphere_tableAn array storing of sphere coordinates by particle index
quaternions_tablesAn array of quaternions by particle index
sphere_tableAn array storing of sphere coordinate derivatives by particle index
torque_tablesAn array of torques by particle index
pipthe pair of particle indexes in m
daoptional accumulator for force and torque derivatives
contacts_accumulatorA pointer to a tuple of output values [num-contacts, sites0-bound, sites1-bound, is_nonspec]. num-contacts is the total number of site-site contacts between pip. sites0-bound and sites1-bound are vectors of contact counts for each site of pip[0] and pip[1], resp, with one entry per site. is_nonspec is true if the molecules have non-zero nonspecific interactions Ignored if Null
Returns
the site-site contributions for the score for the pair pip in model m.

Definition at line 394 of file SitesPairScore.h.

+ Here is the call graph for this function:

double IMP::npctransport::SitesPairScore::get_sites_k ( ) const

return the k for site-site attraction

Definition at line 243 of file SitesPairScore.h.

double IMP::npctransport::SitesPairScore::get_sites_range ( ) const

return the range for site-site attraction

Definition at line 240 of file SitesPairScore.h.

virtual ::IMP::VersionInfo IMP::npctransport::SitesPairScore::get_version_info ( ) const
virtual

Get information about the module and version of the object.

Reimplemented from IMP::npctransport::LinearInteractionPairScore.

Definition at line 248 of file SitesPairScore.h.


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