IMP Reference Guide
2.20.0
The Integrative Modeling Platform
|
Scoring associated with a SimulationData object. More...
#include <IMP/npctransport/Scoring.h>
Scoring associated with a SimulationData object.
Public Member Functions | |
Scoring (SimulationData *owner_sd, const ::npctransport_proto::Assignment &data) | |
void | add_chain_restraints (FGChain *chain) |
void | add_custom_restraint (IMP::Restraint *r) |
void | add_custom_restraints (IMP::Restraints R) |
void | add_interaction (const ::npctransport_proto::Assignment_InteractionAssignment &idata) |
void | add_restrained_anchor_bead (IMP::Particle *p) |
void | add_z_bias_restraint (SingletonContainerAdaptor ps, double k) |
void | add_z_bias_restraint (Particle *p, double k) |
void | clear_custom_restraints () |
boost::tuple< Restraint *, Object * > | create_backbone_restraint (double rest_length_factor, double backbone_k, ParticlesTemp beads, std::string name) const |
Create a backbone bond restraint over beads according to class flags. More... | |
Restraint * | create_bounding_volume_restraint (SingletonContainerAdaptor beads) const |
IMP::PairContainer * | create_close_beads_container (SingletonContainerAdaptor non_optimiziable_beads, SingletonContainerAdaptor optimizable_beads) const |
IMP::PairContainer * | create_close_beads_container (ParticleIndexes non_optimizable_beads, SingletonContainerAdaptor optimizable_beads) const |
container::PredicatePairsRestraint * | create_predicates_pair_restraint (PairContainer *bead_pairs, bool is_attr_interactions_on=true) const |
Restraint * | create_slab_restraint (SingletonContainerAdaptor beads) const |
IMP::Restraint * | create_z_bias_restraint (SingletonContainerAdaptor ps, double k) const |
Restraints | get_all_chain_restraints () const |
Restraint * | get_bounding_volume_restraint (bool update=false) |
Restraints | get_chain_restraints_on (SingletonContainerAdaptor beads) const |
IMP::PairContainer * | get_close_beads_container (bool update=false) |
IMP::Restraints | get_custom_restraints () const |
IMP::ScoringFunction * | get_custom_scoring_function (const RestraintsTemp &extra_restraints, SingletonContainerAdaptor non_optimizable_beads, SingletonContainerAdaptor optimizable_beads, bool is_attr_interactions_on=true) const |
IMP::ScoringFunction * | get_custom_scoring_function (const RestraintsTemp &extra_restraints, ParticleIndexes non_optimizable_beads, SingletonContainerAdaptor optimizable_beads, bool is_attr_interactions_on=true) const |
double | get_default_backbone_k () const |
double | get_excluded_volume_k () const |
FGChains | get_fg_chains () |
bool | get_has_bounding_box () const |
returns true if simulation has a bounding simulation box More... | |
bool | get_has_bounding_sphere () const |
returns true if simulation has a bounding simulation sphere ('cell-like') More... | |
bool | get_has_bounding_volume () const |
returns true if simulation has any bounding volume (box or sphere are supported) More... | |
double | get_interaction_k () const |
double | get_interaction_range_for (core::ParticleType t1, core::ParticleType t2, bool site_specific=true, bool non_specific=false) const |
bool | get_is_backbone_harmonic () const |
Model * | get_model () |
Model * | get_model () const |
core::OrderedTypePairPredicate * | get_ordered_type_pair_predicate () |
core::OrderedTypePairPredicate const * | get_ordered_type_pair_predicate () const |
Restraint * | get_pore_radius_restraint () const |
IMP::PairScore const * | get_predicate_pair_score (core::ParticleType t1, core::ParticleType t2) const |
returns the pair score for particles of types t1 and t2 */ More... | |
IMP::PairScore * | get_predicate_pair_score (core::ParticleType t1, core::ParticleType t2) |
returns the pair score for particles of types t1 and t2 */ More... | |
container::PredicatePairsRestraint * | get_predicates_pair_restraint (bool update=false) |
double | get_range () const |
IMP::ScoringFunction * | get_scoring_function (bool force_update=false) |
IMP::Restraints | get_scoring_function_restraints (bool force_update=false) |
SimulationData * | get_sd () |
SimulationData const * | get_sd () const |
boost::tuple< unsigned int, std::vector< unsigned int > , std::vector< unsigned int > , bool > | get_site_interactions_statistics (ParticleIndex pi1, ParticleIndex pi2) const |
boost::tuple< unsigned int, std::vector< unsigned int > , std::vector< unsigned int > , bool > | get_site_interactions_statistics (Particle const *p1, Particle const *p2) const |
Restraint * | get_slab_restraint (bool update=false) |
virtual std::string | get_type_name () const override |
virtual ::IMP::VersionInfo | get_version_info () const override |
Get information about the module and version of the object. More... | |
IMP::Restraints | get_z_bias_restraints () |
void | remove_particle_type (core::ParticleType pt) |
void | set_interaction_k_factor (IMP::core::ParticleType type, double value) |
void | set_interaction_range_factor (IMP::core::ParticleType type, double value) |
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 | |
Protected Member Functions inherited from IMP::Object | |
Object (std::string name) | |
Construct an object with the given name. More... | |
virtual void | do_destroy () |
IMP::npctransport::Scoring::Scoring | ( | SimulationData * | owner_sd, |
const ::npctransport_proto::Assignment & | data | ||
) |
[in] | owner_sd | npc simulation data object that owns this scoring object |
[out] | data | protobuf data with parameters for this assignment, used to parameterize the scoring function |
void IMP::npctransport::Scoring::add_chain_restraints | ( | FGChain * | chain | ) |
add FG chain to this scoring object, using the chain->get_chain_restraints() method to retrieve the restraints upon a call to get_scoring_function() or create_scoring_function(), etc.
chain | an FG chain associated with internal scoring |
void IMP::npctransport::Scoring::add_interaction | ( | const ::npctransport_proto::Assignment_InteractionAssignment & | idata | ) |
add a SitesPairScore restraint that applies to particles of types t0 and t1 (specified in idata) to the PredicatePairsRestraint object that is returned by get_predr(). The restraint is symmetric, and applies to both (t0,t1) and (t1,t0).
A SitesPairScore restraint means site-specific attractive forces between surface binding sites on each particle + non-specific attraction and soft repulsion between the entire particles.
idata | the protobuf data about the interaction (particle types, interaction coefficients, etc.) |
void IMP::npctransport::Scoring::add_restrained_anchor_bead | ( | IMP::Particle * | p | ) |
add anchor bead to scoring function, using current position of p as equilibrium position relative to pore
p | anchored particle |
void IMP::npctransport::Scoring::add_z_bias_restraint | ( | SingletonContainerAdaptor | ps, |
double | k | ||
) |
adds a biasing potential for particles ps towards z, to the restraints returned by get_z_bias_restraints(), and for the scoring function generated by get_scoring_function()
ps | container for the particles to be biased |
k | force constant |
void IMP::npctransport::Scoring::add_z_bias_restraint | ( | Particle * | p, |
double | k | ||
) |
adds a biasing potential for particle p towards z, to the restraints returned by get_z_bias_restraints(), and for the scoring function generated by get_scoring_function()
p | the particle to be biased |
k | force constant |
boost::tuple< Restraint*, Object*> IMP::npctransport::Scoring::create_backbone_restraint | ( | double | rest_length_factor, |
double | backbone_k, | ||
ParticlesTemp | beads, | ||
std::string | name | ||
) | const |
Create a backbone bond restraint over beads according to class flags.
create a backbone bond restraint with specified rest_length_factor (relative to sum of spheres radii) and backbone k over beads. The restraint score type is according to the class flags - either a linear or harmonic potential, with k in units of kcal/mol/A or kcal/mol/A^2, respectively, with the harmonic potential corresponding to a relaxing spring.
returns both the restraint and the linear well pair score or harmonic singleton score that is used in it (which one depends on the IMP version, assigns nullptr to the other), as a pointer to a generic object (= common ancestor class)
Restraint* IMP::npctransport::Scoring::create_bounding_volume_restraint | ( | SingletonContainerAdaptor | beads | ) | const |
Creates bounding volume (box or sphere) restraint based on the box_size_ class variable and get_has_bounding_sphere() and get_has_bounding_box() variables (typically based on box_is_on_), , and apply it to all beads returned by get_sd()->get_beads()
beads | beads on which to apply the constraint |
IMP::PairContainer* IMP::npctransport::Scoring::create_close_beads_container | ( | SingletonContainerAdaptor | non_optimiziable_beads, |
SingletonContainerAdaptor | optimizable_beads | ||
) | const |
creates a new pair container that returns all pairs of particles (a,b) such that: 1) a is any particle from 'non_optimizable_beads' or 'optimizable beads', and b is any particle in 'optimizable_beads' 2) a and b are close (sphere surfaces within range get_range()) 3) a and b do not appear consecutively within the model (e.g., fg repeats) 4) a is not b 5) b and a do not appear in the list (effectively, a list of unordered pairs)
non_optimizable_beads | a container for particles that are assumed to be non-optimizable and therefore are not paired among themselves |
optimizable_beads | A container for particles that are assumed to be optimizable, and may be paired among themselves or with non_optimizable_beads |
IMP::PairContainer* IMP::npctransport::Scoring::create_close_beads_container | ( | ParticleIndexes | non_optimizable_beads, |
SingletonContainerAdaptor | optimizable_beads | ||
) | const |
same as other create_close_beads_container variant but based on a list of particle indexes and allowing an empty vector of non-optimizable beads as input. The optimizable beads are still treated dynamically (e.g. if they're associated with a dynamic container)
container::PredicatePairsRestraint* IMP::npctransport::Scoring::create_predicates_pair_restraint | ( | PairContainer * | bead_pairs, |
bool | is_attr_interactions_on = true |
||
) | const |
Creates a new container for restraints over pairs of beads. Different scores are used for beads of different (ordered) particle types based on interaction_pair_scores, or just a default linear repulsive with k=get_excluded_volume_k() force on all other pairs in bead_pairs.
bead_pairs | a container for the pairs of beads to be restrained |
is_attr_interactions_on | whether to include attractive interactions that were added by add_interaction() |
Restraint* IMP::npctransport::Scoring::create_slab_restraint | ( | SingletonContainerAdaptor | beads | ) | const |
Creates slab bounding volume restraint, based on the slab_thickness_ and tunnel_radius_ class variables, and apply it to all beads returned by get_sd()->get_beads()
beads | beads on which to apply the constraint |
IMP::Restraint* IMP::npctransport::Scoring::create_z_bias_restraint | ( | SingletonContainerAdaptor | ps, |
double | k | ||
) | const |
create a z bias restraint pulling along z-axis for the particles in ps. If a slab is present, the force acts only within tunnel radius distance from its central axis.
ps | the particles container |
k | force constant for biasing ps |
Restraints IMP::npctransport::Scoring::get_all_chain_restraints | ( | ) | const |
Restraint* IMP::npctransport::Scoring::get_bounding_volume_restraint | ( | bool | update = false | ) |
returns the box/sphere restraint on >get_sd()->get_beads() which will be used in the next call to get_scoring_function(false) (so manipulating it might affect the scoring function). If update is false, then it is guaranteed that these are the same restraints used by the last call to get_scoring_function.
update | if true, forces recreation of the cached container, o/w cached version that was used in last call to get_scoring_function(), if applicable |
Restraints IMP::npctransport::Scoring::get_chain_restraints_on | ( | SingletonContainerAdaptor | beads | ) | const |
returns restraints on all fg nup chains that were added by add_chain_restraints() so far and contain any bead in 'beads'. The restraints are updated directly from the original chain objects chain->get_chain_restraints() object.
beads | a least of chain fine beads over which restraints are collected |
IMP::PairContainer* IMP::npctransport::Scoring::get_close_beads_container | ( | bool | update = false | ) |
a pair container that was used to define interaction particles that will be used in the next call to get_scoring_function(false) (so manipulating it might affect the scoring function)
update | if true, forces recreation of the cached container, o/w cached version that was used in last call to get_scoring_function() or to this function will be used |
IMP::ScoringFunction* IMP::npctransport::Scoring::get_custom_scoring_function | ( | const RestraintsTemp & | extra_restraints, |
SingletonContainerAdaptor | non_optimizable_beads, | ||
SingletonContainerAdaptor | optimizable_beads, | ||
bool | is_attr_interactions_on = true |
||
) | const |
returns a custom scoring function for the NPC simulation, based on: 1) the chain restraints added by add_chain_restraints() that overlap with 'particles' 2) default repulsive interactions between particles in particles and optimizable particles 3) attractive interactions that depend on pair types, as added by add_interaction() 4) the slab or bounding box restraints if relevant on all particles in 'particles'
extra_restraints | ad-hoc restraints to be added to scoring function |
non_optimizable_beads | particles container on which to apply bounding volume and pair constraints only if they also involve optimizable beads |
optimizable_beads | particles container on which to apply bounding volume and pair contstraints, either with other optimizable beads or with non-optimizable ones. |
is_attr_interactions_on | if false, only repulsive interactions will be computed between pairs of particles |
IMP::ScoringFunction* IMP::npctransport::Scoring::get_custom_scoring_function | ( | const RestraintsTemp & | extra_restraints, |
ParticleIndexes | non_optimizable_beads, | ||
SingletonContainerAdaptor | optimizable_beads, | ||
bool | is_attr_interactions_on = true |
||
) | const |
same as other get_custom_scoring_function variant but based on a list of particle indexes and allowing an empty vector of non-optimizable beads as input
double IMP::npctransport::Scoring::get_default_backbone_k | ( | ) | const |
double IMP::npctransport::Scoring::get_excluded_volume_k | ( | ) | const |
FGChains IMP::npctransport::Scoring::get_fg_chains | ( | ) |
bool IMP::npctransport::Scoring::get_has_bounding_box | ( | ) | const |
bool IMP::npctransport::Scoring::get_has_bounding_sphere | ( | ) | const |
bool IMP::npctransport::Scoring::get_has_bounding_volume | ( | ) | const |
double IMP::npctransport::Scoring::get_interaction_k | ( | ) | const |
double IMP::npctransport::Scoring::get_interaction_range_for | ( | core::ParticleType | t1, |
core::ParticleType | t2, | ||
bool | site_specific = true , |
||
bool | non_specific = false |
||
) | const |
t1,t2 | the types of beads in this interaction |
site_specific | include site-site ranges |
non_specific | include non-specific sphere interaction ranges |
Model* IMP::npctransport::Scoring::get_model | ( | ) |
returns the model associated with the owned SimulationData
Model* IMP::npctransport::Scoring::get_model | ( | ) | const |
returns the model associated with the owned SimulationData
IMP::PairScore const* IMP::npctransport::Scoring::get_predicate_pair_score | ( | core::ParticleType | t1, |
core::ParticleType | t2 | ||
) | const |
returns the pair score for particles of types t1 and t2 */
IMP::PairScore* IMP::npctransport::Scoring::get_predicate_pair_score | ( | core::ParticleType | t1, |
core::ParticleType | t2 | ||
) |
returns the pair score for particles of types t1 and t2 */
container::PredicatePairsRestraint* IMP::npctransport::Scoring::get_predicates_pair_restraint | ( | bool | update = false | ) |
Returns the restraints over pairs of particles based on their type, which will be used in the next call to get_scoring_function(false) (so manipulating it might affect the scoring function). Also, if update is false, then it is guaranteed that these are the same restraints used by the last call to get_scoring_function()
Different scores are used for particles of different (ordered) particle types. When called for the first time, returns a new PredicatePairsRestraints over all diffusing particles and sets a default linear repulsion restraint between all pairs returned by get_close_beads_container()
update | if true, forces recreation of the cached container, o/w cached version that was used in last call to get_scoring_function(), if applicable |
IMP::ScoringFunction* IMP::npctransport::Scoring::get_scoring_function | ( | bool | force_update = false | ) |
returns a scoring function for the NPC simulation, based on: 1) the chain restraints added by add_chain_restraints() 2) default repulsive interactions on particles in get_beads() 3) attractive interactions that depend on pair types, as added by add_interaction() 4) the slab or bounding box restraints if relevant on all particles in get_beads() 5) z-biasing potential if add_z_bias_restraint() was called for any particles
if | force_update is true, forces recreation of the scoring function, o/w cached version may be retrieved if available, which may not be completely up to date. |
IMP::Restraints IMP::npctransport::Scoring::get_scoring_function_restraints | ( | bool | force_update = false | ) |
returns the restrains associated with the scoring function return by get_scoring_function(force_update)
SimulationData* IMP::npctransport::Scoring::get_sd | ( | ) |
return the SimulationData object that owns this ScoringFunction
SimulationData const* IMP::npctransport::Scoring::get_sd | ( | ) | const |
return the SimulationData object that owns this ScoringFunction
boost::tuple< unsigned int, std::vector<unsigned int>, std::vector<unsigned int>, bool > IMP::npctransport::Scoring::get_site_interactions_statistics | ( | ParticleIndex | pi1, |
ParticleIndex | pi2 | ||
) | const |
return various statistics about site-site interactions between pi1 and pi2 return a tuple with: a - number of site-site interaction that contribute to the score between pi1 and pi2 in the model, based on their current coordinates and their particle types b - vector of occupied pi1 sites counts (count number of interactions per site) c - vector of occupied pi2 sites counts (count number of interactions per site) d - true if particles are interacting non-specifically (a non-zero contribution of non-specific terms)
boost::tuple< unsigned int, std::vector<unsigned int>, std::vector<unsigned int>, bool > IMP::npctransport::Scoring::get_site_interactions_statistics | ( | Particle const * | p1, |
Particle const * | p2 | ||
) | const |
return various statistics about site-site interactions between p1 and p2 return a tuple with: a) number of site-site interaction that contribute to the score between p1 and p2 in the model, based on their current coordinates and their particle types b) vector of occupied pi1 sites counts (count number of interactions per site) c) vector of occupied pi2 sites counts (count number of interactions per site)
Definition at line 557 of file Scoring.h.
Restraint* IMP::npctransport::Scoring::get_slab_restraint | ( | bool | update = false | ) |
returns the slab restraint on >get_sd()->get_beads() which will be used in the next call to get_scoring_function(false) (so manipulating it might affect the scoring function). Also, if update is false, then it is guaranteed that these are the same restraints used by the last call to get_scoring_function()
update | if true, forces recreation of the cached container, o/w cached version that was used in last call to get_scoring_function(), if applicable |
|
overridevirtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
IMP::Restraints IMP::npctransport::Scoring::get_z_bias_restraints | ( | ) |
return z_bias restraints for all particles that were added using add_z_bias_restraint()
void IMP::npctransport::Scoring::remove_particle_type | ( | core::ParticleType | pt | ) |
remove all scoring function elements related to particle type pt NOTE: a few aspects of the scoring function do not support this function as of 2018-06-19 - namely anchor restraints and z coordinate bias
void IMP::npctransport::Scoring::set_interaction_k_factor | ( | IMP::core::ParticleType | type, |
double | value | ||
) |
sets the multiplicative scaling of the interaction k constants for pair interactions involving a particle of this type, for all future calls to add_interaction()
void IMP::npctransport::Scoring::set_interaction_range_factor | ( | IMP::core::ParticleType | type, |
double | value | ||
) |
sets the multiplicative scaling of the interaction range for pair interactions involving a particle of this type, for all future calls to add_interaction()