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<bool> 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);
290 Restraint *get_bounding_box_restraint(
bool update=
false);
306 Restraint *get_slab_restraint(
bool update=
false);
326 ( const ::npctransport_proto::Assignment_InteractionAssignment &idata);
367 (get_model(), non_optimizable_beads));
368 return create_close_beads_container(nob_lsc,
385 bool is_attr_interactions_on =
true)
const;
427 Model* get_model()
const;
444 bool get_has_bounding_box()
const
445 {
return box_is_on_; }
453 bool get_is_backbone_harmonic()
const {
return is_backbone_harmonic_; }
469 boost::tuple< Restraint*, Object*>
470 create_backbone_restraint
471 (
double rest_length_factor,
474 std::string name)
const;
506 double get_interaction_range_for
508 bool site_specific =
true,
509 bool non_specific =
false)
const;
522 boost::tuple< unsigned int, std::vector<unsigned int>, std::vector<unsigned int> >
523 get_site_interactions_statistics
536 boost::tuple< unsigned int, std::vector<unsigned int>, std::vector<unsigned int> >
537 get_site_interactions_statistics
541 get_site_interactions_statistics
572 void add_chain_restraints(FGChain* chain);
588 ( SingletonContainerAdaptor beads )
const;
612 void add_z_bias_restraint(SingletonContainerAdaptor ps,
double k);
623 void add_z_bias_restraint(Particle* p,
double k);
639 IMP::Restraint* create_z_bias_restraint(SingletonContainerAdaptor ps,
643 { custom_restraints_.push_back(r); }
646 { custom_restraints_ += R; }
648 void clear_custom_restraints()
649 { custom_restraints_.clear(); }
652 {
return custom_restraints_; }
664 Restraint* get_pore_radius_restraint()
const;
673 return FGChains(chains_set_.begin(), chains_set_.end());
677 double get_range()
const {
return range_; }
684 void set_interaction_range_factor
689 interaction_range_factors_[type] = value;
697 void set_interaction_k_factor
702 interaction_k_factors_[type] = value;
714 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
Score particles based on a bounding box.
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
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.
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 nullptr-initialized pointer to an Object.
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.
ParticleIndex get_index() const
returns the particle index of this particle in its model
Storage of a model, its restraints, constraints and particles.
#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 ...