8 #ifndef IMPNPCTRANSPORT_SCORING_H
9 #define IMPNPCTRANSPORT_SCORING_H
11 #include "npctransport_config.h"
24 #include <boost/unordered_map.hpp>
33 #include "boost/tuple/tuple.hpp"
35 #include <boost/timer.hpp>
39 IMPNPCTRANSPORT_BEGIN_NAMESPACE
42 class LinearWellPairScore;
43 class HarmonicSpringSingletonScore;
50 Parameter<int> box_is_on_;
51 Parameter<double> interaction_k_;
52 Parameter<double> interaction_range_;
53 Parameter<double> backbone_k_;
54 Parameter<bool> is_backbone_harmonic_;
55 Parameter<double> slack_;
56 Parameter<double> nonspecific_k_;
57 Parameter<double> nonspecific_range_;
58 Parameter<double> excluded_volume_k_;
59 Parameter<double> range_;
61 boost::unordered_map<core::ParticleType, double> interaction_range_factors_;
62 boost::unordered_map<core::ParticleType, double> interaction_k_factors_;
88 typedef boost::unordered_map< int, PointerMember<IMP::PairScore > >
89 t_map_pair_type_to_pair_score;
93 t_map_pair_type_to_pair_score
94 interaction_pair_scores_;
111 typedef boost::unordered_set
113 FGChainsSet chains_set_;
117 typedef boost::unordered_map
119 t_particle_index_to_fg_chain_map;
120 t_particle_index_to_fg_chain_map bead_to_chain_map_;
124 typedef boost::unordered_map<double, ParticlesTemp> t_z_bias_particles_map;
125 t_z_bias_particles_map z_bias_particles_map_;
143 const ::npctransport_proto::Assignment &data);
171 get_scoring_function_restraints(
bool force_update=
false);
196 get_custom_scoring_function
200 bool is_attr_interactions_on =
true )
const;
208 get_custom_scoring_function
212 bool is_attr_interactions_on =
true )
const
216 (get_model(), non_optimizable_beads));
217 return get_custom_scoring_function(extra_restraints,
220 is_attr_interactions_on);
293 Restraint *get_bounding_volume_restraint(
bool update=
false);
309 Restraint *get_slab_restraint(
bool update=
false);
329 ( const ::npctransport_proto::Assignment_InteractionAssignment &idata);
370 (get_model(), non_optimizable_beads));
371 return create_close_beads_container(nob_lsc,
388 bool is_attr_interactions_on =
true)
const;
403 Restraint* create_bounding_volume_restraint
431 Model* get_model()
const;
449 return box_is_on_==1;
454 return box_is_on_==2;
459 return get_has_bounding_box() || get_has_bounding_sphere();
468 bool get_is_backbone_harmonic()
const {
return is_backbone_harmonic_; }
484 boost::tuple< Restraint*, Object*>
485 create_backbone_restraint
486 (
double rest_length_factor,
489 std::string name)
const;
521 double get_interaction_range_for
523 bool site_specific =
true,
524 bool non_specific =
false)
const;
538 boost::tuple<
unsigned int,
539 std::vector<unsigned int>,
540 std::vector<unsigned int>,
542 get_site_interactions_statistics
555 boost::tuple< unsigned int, std::vector<unsigned int>, std::vector<unsigned int>,
bool >
556 get_site_interactions_statistics
560 get_site_interactions_statistics
591 void add_chain_restraints(FGChain* chain);
607 ( SingletonContainerAdaptor beads )
const;
631 void add_z_bias_restraint(SingletonContainerAdaptor ps,
double k);
642 void add_z_bias_restraint(Particle* p,
double k);
658 IMP::Restraint* create_z_bias_restraint(SingletonContainerAdaptor ps,
662 { custom_restraints_.push_back(r); }
665 { custom_restraints_ += R; }
667 void clear_custom_restraints()
668 { custom_restraints_.clear(); }
671 {
return custom_restraints_; }
683 Restraint* get_pore_radius_restraint()
const;
692 return FGChains(chains_set_.begin(), chains_set_.end());
696 double get_range()
const {
return range_; }
703 void set_interaction_range_factor
708 interaction_range_factors_[type] = value;
716 void set_interaction_k_factor
721 interaction_k_factors_[type] = value;
733 IMPNPCTRANSPORT_END_NAMESPACE
Abstract class for scoring object(s) of type ParticleIndexPair.
A shared container for Pairs.
Apply a PairScore to each Pair in a list.
SimulationData const * get_sd() const
IMP::Vector< IMP::Pointer< Restraint > > Restraints
Store a list of ParticleIndexes.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Store a set of PairContainers.
Storage of a model, its restraints, constraints and particles.
Applies a PairScore to each Pair in a list based on a predicate.
Index< ParticleIndexTag > ParticleIndex
bool get_has_bounding_sphere() const
returns true if simulation has a bounding simulation sphere ('cell-like')
Score particles based on a bounding box.
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
Create a scoring function on a list of restraints.
A weak pointer to an Object or RefCountedObject.
A particle with a user-defined type.
double get_excluded_volume_k() const
#define IMP_NEW(Typename, varname, args)
Declare a ref counted pointer to a new object.
Class for storing model, its restraints, constraints, and particles.
Decorator for helping deal with a hierarchy of molecules.
bool get_has_bounding_box() const
returns true if simulation has a bounding simulation box
Scoring associated with a SimulationData object.
Common base class for heavy weight IMP objects.
Store a list of ParticleIndexes.
Return all pairs from a SingletonContainer.
SimulationData * get_sd()
IMP::Vector< IMP::Pointer< FGChain > > FGChains
A smart pointer to a ref-counted Object that is a class member.
double get_default_backbone_k() const
A weak pointer to an Object or RefCountedObject.
Store all parameters for a simulation.
A nullptr-initialized pointer to an IMP Object.
Represents a scoring function on the model.
double get_interaction_k() const
Represents a scoring function on the model.
Class to handle individual particles of a Model object.
bool get_has_bounding_volume() const
returns true if simulation has any bounding volume (box or sphere are supported)
ParticleIndex get_index() const
returns the particle index of this particle in its model
A scoring function on a list of restraints.
#define IMP_ALWAYS_CHECK(condition, message, exception_name)
Throw an exception if a check fails.
An exception for an invalid value being passed to IMP.
A restraint is a term in an IMP ScoringFunction.
forward declaration of incomplete protobuf files for the main data structures used ...