IMP logo
IMP Reference Guide  2.9.0
The Integrative Modeling Platform
Scoring.h
Go to the documentation of this file.
1 /**
2  * \file npctransport/Scoring.h
3  * \brief scoring associated with a SimulationData object
4  *
5  * Copyright 2007-2018 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPNPCTRANSPORT_SCORING_H
9 #define IMPNPCTRANSPORT_SCORING_H
10 
11 #include "npctransport_config.h"
12 
13 #include "FGChain.h"
14 #include "npctransport_proto.fwd.h"
15 #include "Parameter.h"
16 // #include "SimulationData.h"
17 
18 #include <IMP/Model.h>
19 #include <IMP/PairContainer.h>
20 #include <IMP/ScoringFunction.h>
21 #include <IMP/atom/Hierarchy.h>
22 #include <IMP/Pointer.h>
23 #include <IMP/WeakPointer.h>
24 #include <boost/unordered_map.hpp>
31 #include <IMP/core/Typed.h>
33 #include "boost/tuple/tuple.hpp"
34 
35 #include <boost/timer.hpp>
36 #include <string>
37 
38 
39 IMPNPCTRANSPORT_BEGIN_NAMESPACE
40 
41 class SimulationData;
42 class LinearWellPairScore;
43 class HarmonicSpringSingletonScore;
44 //class FGChain;
45 
46 //! Scoring associated with a SimulationData object
47 class IMPNPCTRANSPORTEXPORT Scoring: public Object
48 {
49  private:
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_;
60  // Per type scaling factors for the interaction parameters
61  boost::unordered_map<core::ParticleType, double> interaction_range_factors_;
62  boost::unordered_map<core::ParticleType, double> interaction_k_factors_;
63 
64  private:
65 
66  // the sim-data that uses this scoring object
68 
69  /***************** Cache only variables ************/
70 
71  // see get_close_beads_container()
73  <IMP::PairContainer> close_beads_container_;
74 
75  // generates hash values ('predicates') for ordered types pairs
76  // (e.g., pairs of ParticleTypes)
79 
81  <IMP::core::RestraintsScoringFunction> scoring_function_;
82  IMP::Restraints scoring_function_rs_; // the restraints associated with the last created scoring_function_, valid only when it is not null
83 
84  // contains all restraints between pairs of particle types
87 
88  typedef boost::unordered_map< int, PointerMember<IMP::PairScore > >
89  t_map_pair_type_to_pair_score;
90  // scores between particle, mapped by their interaction id,
91  // where interaction id is from OrderedTypePairPredicate otpp_
92  // applied on each interacting particle type
93  t_map_pair_type_to_pair_score
94  interaction_pair_scores_;
95 
97  <IMP::Restraint> box_restraint_;
98 
100  <IMP::Restraint> slab_restraint_;
101 
102  // scores on anchor resiudes
103  IMP::Restraints anchor_restraints_;
104 
105  // pore radius restraint
107  <IMP::Restraint> pore_radius_restraint_;
108 
109  // a map from particle indexes of chain identifiers to corresponding
110  // chain backbone restraints (see chain_ids_map)
111  typedef boost::unordered_set
112  < PointerMember<FGChain> > FGChainsSet;
113  FGChainsSet chains_set_;
114  // a map from particle indexes of chain beads to the chain objects that they
115  // represent (TODO: probably can be obliterated by adding appropriate
116  // decorators)
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_;
121 
122  // particles to be z-biased on call to get_z_bias_restraints()
123  // with key being the k value of each particle subset
124  typedef boost::unordered_map<double, ParticlesTemp> t_z_bias_particles_map;
125  t_z_bias_particles_map z_bias_particles_map_;
126 
127  // restraints for z-biasing particles (plural for different k force constants)
128  IMP::Restraints z_bias_restraints_;
129 
130  // custom restraints that are added to the scoring function
131  IMP::Restraints custom_restraints_;
132 
133 
134  public:
135  /**
136  @param[in] owner_sd npc simulation data object that owns this scoring
137  object
138  @param[out] data protobuf data with parameters for
139  this assignment, used to parameterize
140  the scoring function
141  */
142  Scoring(SimulationData* owner_sd,
143  const ::npctransport_proto::Assignment &data);
144 
145 
146  /**
147  returns a scoring function for the NPC simulation, based on:
148  1) the chain restraints added by add_chain_restraints()
149  2) default repulsive interactions on particles in get_beads()
150  3) attractive interactions that depend on pair types, as added by
151  add_interaction()
152  4) the slab or bounding box restraints if relevant on all particles
153  in get_beads()
154  5) z-biasing potential if add_z_bias_restraint() was called for any
155  particles
156 
157  @param if force_update is true, forces recreation of the scoring function,
158  o/w cached version may be retrieved if available, which may not
159  be completely up to date.
160 
161  @note if force_udpate=false, might fail to include e.g., new particles
162  or new interactions that were added after the last call
163  */
164  IMP::ScoringFunction* get_scoring_function(bool force_update=false);
165 
166  /**
167  returns the restrains associated with the scoring function return by
168  get_scoring_function(force_update)
169  */
171  get_scoring_function_restraints(bool force_update=false);
172 
173 
174  /**
175  returns a custom scoring function for the NPC simulation, based on:
176  1) the chain restraints added by add_chain_restraints()
177  that overlap with 'particles'
178  2) default repulsive interactions between particles in particles
179  and optimizable particles
180  3) attractive interactions that depend on pair types, as added by
181  add_interaction()
182  4) the slab or bounding box restraints if relevant on all particles
183  in 'particles'
184 
185  @param extra_restraints ad-hoc restraints to be added to scoring function
186  @param non_optimizable_beads particles container on which to apply bounding volume
187  and pair constraints only if they also involve optimizable beads
188  @param optimizable_beads particles container on which to apply bounding volume
189  and pair contstraints, either with other optimizable beads or with
190  non-optimizable ones.
191  @param is_attr_interactions_on if false, only repulsive interactions will be
192  computed between pairs of particles
193  @note it is assumed the two sets of beads are disjoint
194  */
196  get_custom_scoring_function
197  ( const RestraintsTemp& extra_restraints,
198  SingletonContainerAdaptor non_optimizable_beads,
199  SingletonContainerAdaptor optimizable_beads,
200  bool is_attr_interactions_on = true ) const;
201 
202  //! same as other get_custom_scoring_function variant but
203  //! based on a list of particle indexes and allowing an empty vector
204  //! of non-optimizable beads as input
205  //! @note The optimizable beads are still
206  //! treated dynamically (e.g. if they're associated with a dynamic container)
208  get_custom_scoring_function
209  ( const RestraintsTemp& extra_restraints,
210  ParticleIndexes non_optimizable_beads,
211  SingletonContainerAdaptor optimizable_beads,
212  bool is_attr_interactions_on = true ) const
213  {
215  nob_lsc,
216  (get_model(), non_optimizable_beads));
217  return get_custom_scoring_function(extra_restraints,
218  nob_lsc,
219  optimizable_beads,
220  is_attr_interactions_on);
221  }
222 
223 
224  /**
225  a pair container that was used to define interaction particles
226  that will be used in the next call to get_scoring_function(false)
227  (so manipulating it might affect the scoring function)
228 
229  @param update if true, forces recreation of the cached container,
230  o/w cached version that was used in last call to
231  get_scoring_function() or to this function will
232  be used
233 
234  @return a container with all pairs of particles (a,b) such that:
235  1) a is an optimizable bead particle and b is any bead
236  particle (static or not).
237  2) a and b are close (sphere surfaces within range get_range()+some slack)
238  3) a and b do not appear consecutively within the model (e.g., bonded fg motifs)
239  4) a and b are not the same particles
240  5) b and a do not appear on the list (= unordered list)
241 
242  @note if udpate=false, might fail to include e.g., new particles
243  or new interactions that were added after the last call
244  @note TODO: right now will not return any consecutive particles - that's
245  erroneous (e.g., last particle of one chain and first particle
246  of next chain) though may be negligible in practice
247  @note supposed to be robust to dynamic changes to the beads list,
248  though need to double check (TODO)
249  */
250  IMP::PairContainer *get_close_beads_container(bool update=false);
251 
252  /**
253  Returns the restraints over pairs of particles based on their type,
254  which will be used in the next call to get_scoring_function(false)
255  (so manipulating it might affect the scoring function). Also, if update
256  is false, then it is guaranteed that these are the same restraints
257  used by the last call to get_scoring_function()
258 
259  Different scores are used for particles of different (ordered)
260  particle types. When called for the first time, returns a new
261  PredicatePairsRestraints over all diffusing particles and sets a
262  default linear repulsion restraint between all pairs returned by
263  get_close_beads_container()
264 
265  @param update if true, forces recreation of the cached container,
266  o/w cached version that was used in last call to
267  get_scoring_function(), if applicable
268 
269  @note if udpate=false, might fail to include e.g., new particles
270  or new interactions that were added to the simulation
271  after the last call
272  */
273  container::PredicatePairsRestraint *get_predicates_pair_restraint
274  (bool update=false);
275 
276 
277  /** returns the box restraint on >get_sd()->get_beads()
278  which will be used in the next call to get_scoring_function(false)
279  (so manipulating it might affect the scoring function). Also, if update
280  is false, then it is guaranteed that these are the same restraints
281  used by the last call to get_scoring_function
282 
283  @param update if true, forces recreation of the cached container,
284  o/w cached version that was used in last call to
285  get_scoring_function(), if applicable
286 
287  @note if udpate=false, might fail to include e.g., new particles
288  that were added after the last call
289  */
290  Restraint *get_bounding_box_restraint(bool update=false);
291 
292 
293  /** returns the slab restraint on >get_sd()->get_beads()
294  which will be used in the next call to get_scoring_function(false)
295  (so manipulating it might affect the scoring function). Also, if update
296  is false, then it is guaranteed that these are the same restraints
297  used by the last call to get_scoring_function()
298 
299  @param update if true, forces recreation of the cached container,
300  o/w cached version that was used in last call to
301  get_scoring_function(), if applicable
302 
303  @note if udpate=false, might fail to include e.g., new particles
304  that were added after the last call
305  */
306  Restraint *get_slab_restraint(bool update=false);
307 
308 
309  // swig doesn't equate the two protobuf types
310  /**
311  add a SitesPairScore restraint that applies to particles of
312  types t0 and t1 (specified in idata) to the PredicatePairsRestraint
313  object that is returned by get_predr().
314  The restraint is symmetric, and applies to both (t0,t1) and (t1,t0).
315 
316  A SitesPairScore restraint means site-specific
317  attractive forces between surface binding sites on each particle +
318  non-specific attraction and soft repulsion between the entire particles.
319 
320  @param idata the protobuf data about the interaction (particle types,
321  interaction coefficients, etc.)
322 
323  \see SitesPairScore
324  */
325  void add_interaction
326  ( const ::npctransport_proto::Assignment_InteractionAssignment &idata);
327 
328 
329 
330 
331 
332  /***************************************************************/
333  /***************************** Creators ************************/
334  /***************************************************************/
335 
336  /**
337  creates a new pair container that returns all pairs of particles (a,b) such that:
338  1) a is any particle from 'non_optimizable_beads' or 'optimizable beads',
339  and b is any particle in 'optimizable_beads'
340  2) a and b are close (sphere surfaces within range get_range())
341  3) a and b do not appear consecutively within the model (e.g., fg repeats)
342  4) a is not b
343  5) b and a do not appear in the list (effectively, a list of unordered pairs)
344 
345  @param non_optimizable_beads a container for particles that are assumed to be non-optimizable
346  and therefore are not paired among themselves
347  @param optimizable_beads A container for particles that are assumed to be optimizable, and may
348  be paired among themselves or with non_optimizable_beads
349  @note it is assumed the two sets of beads are disjoint
350  */
351  IMP::PairContainer *create_close_beads_container
352  ( SingletonContainerAdaptor non_optimiziable_beads,
353  SingletonContainerAdaptor optimizable_beads)
354  const;
355 
356  //! same as other create_close_beads_container variant but
357  //! based on a list of particle indexes and allowing an empty vector
358  //! of non-optimizable beads as input. The optimizable beads are still
359  //! treated dynamically (e.g. if they're associated with a dynamic container)
360  IMP::PairContainer *create_close_beads_container
361  ( ParticleIndexes non_optimizable_beads,
362  SingletonContainerAdaptor optimizable_beads)
363  const
364  {
366  nob_lsc,
367  (get_model(), non_optimizable_beads));
368  return create_close_beads_container(nob_lsc,
369  optimizable_beads);
370  }
371 
372 
373  /**
374  Creates a new container for restraints over pairs of beads. Different
375  scores are used for beads of different (ordered) particle types
376  based on interaction_pair_scores, or just a default linear repulsive
377  with k=get_excluded_volume_k() force on all other pairs in bead_pairs.
378 
379  @param bead_pairs a container for the pairs of beads to be restrained
380  @param is_attr_interactions_on whether to include attractive interactions
381  that were added by add_interaction()
382  */
383  container::PredicatePairsRestraint *create_predicates_pair_restraint
384  ( PairContainer* bead_pairs,
385  bool is_attr_interactions_on = true) const;
386 
387  /**
388  Creates bounding box restraint based on the box_size_
389  class variable, and apply it to all beads returned
390  by get_sd()->get_beads()
391 
392  @param beads beads on which to apply the constraint
393 
394  @note this restraint is (supposed to) guarantee to be always
395  updated with the list inside the container
396 
397  @return a newly created box restraint
398  */
399  Restraint* create_bounding_box_restraint
400  ( SingletonContainerAdaptor beads ) const;
401 
402  /**
403  Creates slab bounding volume restraint, based on the slab_thickness_
404  and tunnel_radius_ class variables, and apply it to all beads
405  returned by get_sd()->get_beads()
406 
407  @param beads beads on which to apply the constraint
408 
409  @note this restraint is (supposed to) guarantee to be always
410  updated with the list inside the container
411 
412  @return a newly created slab restraint
413  */
414  Restraint* create_slab_restraint
415  ( SingletonContainerAdaptor beads ) const;
416 
417 
418  /************************************************************/
419  /************* various simple getters and setters *******************/
420  /************************************************************/
421 
422  /** returns the model associated with the owned SimulationData */
423  Model* get_model();
424 
425 #ifndef SWIG
426  /** returns the model associated with the owned SimulationData */
427  Model* get_model() const;
428 #endif
429 
430 
431  /** return the SimulationData object that owns this ScoringFunction */
433  return owner_sd_;
434  }
435 
436 #ifndef SWIG
437  /** return the SimulationData object that owns this ScoringFunction */
438  SimulationData const* get_sd() const{
439  return owner_sd_;
440  }
441 #endif
442 
443  // returns true if a bounding box restraint is defined */
444  bool get_has_bounding_box() const
445  { return box_is_on_; }
446 
447  /** returns the default spring constant between consecutive beads
448  in a chain of beads - this is used for chains whose k
449  is non-positive
450  */
451  double get_default_backbone_k() const { return backbone_k_; }
452 
453  bool get_is_backbone_harmonic() const { return is_backbone_harmonic_; }
454 
455 #ifndef SWIG
456  //! Create a backbone bond restraint over beads according to class flags
457  /** create a backbone bond restraint with specified rest_length_factor
458  (relative to sum of spheres radii) and backbone k over beads. The restraint score
459  type is according to the class flags - either a linear or
460  harmonic potential, with k in units of kcal/mol/A or kcal/mol/A^2,
461  respectively, with the harmonic potential corresponding to a relaxing
462  spring.
463 
464  returns both the restraint and the linear well pair score or harmonic
465  singleton score that is used in it (which one depends on the IMP version,
466  assigns nullptr to the other), as a pointer to a generic object (= common
467  ancestor class)
468  */
469  boost::tuple< Restraint*, Object*>
470  create_backbone_restraint
471  ( double rest_length_factor,
472  double backbone_k,
473  ParticlesTemp beads,
474  std::string name) const;
475 #endif
476 
477  /** returns the constant force applied by overlapping spheres on each
478  other
479  */
480  double get_excluded_volume_k() const { return excluded_volume_k_; }
481 
482  /** returns the default interaction constant, which is used
483  only if interaction_k is not specified for a certain interaction */
484  double get_interaction_k() const { return interaction_k_; }
485 
486  //! returns the pair score for particles of types t1 and t2 */
487  IMP::PairScore const* get_predicate_pair_score
488  ( core::ParticleType t1, core::ParticleType t2) const;
489 
490  //! returns the pair score for particles of types t1 and t2 */
491  IMP::PairScore* get_predicate_pair_score
493 
494 
495  /** @return maximal actual interaction range (normalized by
496  range factors) for a given interaction type, as set by
497  add_interaction(), over site-site and/or non-specific
498  interactions if applicable. If not applicable, returns -1.0
499 
500  @param t1,t2 the types of beads in this interaction
501  @param site_specific include site-site ranges
502  @param non_specific include non-specific sphere interaction ranges
503  @note if both site_specific and non_specific are true, takes a
504  maximum over both.
505  */
506  double get_interaction_range_for
508  bool site_specific = true,
509  bool non_specific = false) const;
510 
511 #ifndef SWIG
512  //! return various statistics about site-site interactions
513  //! between pi1 and pi2
514  /**
515  return a tuple with:
516  a - number of site-site interaction that contribute
517  to the score between pi1 and pi2 in the model, based on their
518  current coordinates and their particle types
519  b - vector of occupied pi1 sites counts (count number of interactions per site)
520  c - vector of occupied pi2 sites counts (count number of interactions per site)
521  */
522  boost::tuple< unsigned int, std::vector<unsigned int>, std::vector<unsigned int> >
523  get_site_interactions_statistics
524  ( ParticleIndex pi1, ParticleIndex pi2) const;
525 
526  //! return various statistics about site-site interactions
527  //! between p1 and p2
528  /**
529  return a tuple with:
530  a) number of site-site interaction that contribute
531  to the score between p1 and p2 in the model, based on their
532  current coordinates and their particle types
533  b) vector of occupied pi1 sites counts (count number of interactions per site)
534  c) vector of occupied pi2 sites counts (count number of interactions per site)
535  */
536  boost::tuple< unsigned int, std::vector<unsigned int>, std::vector<unsigned int> >
537  get_site_interactions_statistics
538  ( Particle const* p1, Particle const* p2) const
539  {
540  return
541  get_site_interactions_statistics
542  (p1->get_index(), p2->get_index());
543  }
544 #endif
545 
546 
547  core::OrderedTypePairPredicate* get_ordered_type_pair_predicate()
548  { return otpp_; }
549 
550 #ifndef SWIG
551  core::OrderedTypePairPredicate const* get_ordered_type_pair_predicate() const
552  { return otpp_; }
553 #endif
554 
555  /** add FG chain to this scoring object, using the
556  chain->get_chain_restraints() method to retrieve the restraints
557  upon a call to get_scoring_function() or create_scoring_function(),
558  etc.
559 
560  @param chain an FG chain associated with internal scoring
561 
562  @return pointer to the newly created restraint
563 
564  @note if the chain->get_backbone_k() is non-positive, it is reset to
565  this->get_default_backbone_k()
566 
567  @note this method assumes that all such chains will be disjoint
568  and so it is later possible to use
569  container::ExclusiveConsecutivePairFilter to filter out all
570  pairs of particles connected by such chain restraints.
571  */
572  void add_chain_restraints(FGChain* chain);
573 
574 
575  /**
576  returns restraints on all fg nup chains that were added by
577  add_chain_restraints() so far and contain any bead in 'beads'.
578  The restraints are updated directly from the original chain objects
579  chain->get_chain_restraints() object.
580 
581  @param beads a least of chain fine beads over which restraints are
582  collected
583 
584  @return a list of all chain restraints that have been added so far
585  and contain beads in 'beads'
586  */
587  Restraints get_chain_restraints_on
588  ( SingletonContainerAdaptor beads ) const;
589 
590  /**
591  @return all restraints of fg nup chains that were added by
592  add_chain_restraints() so far
593  */
594  Restraints get_all_chain_restraints() const;
595 
596  /**
597  adds a biasing potential for particles ps towards z, to the restraints
598  returned by get_z_bias_restraints(), and for the scoring function
599  generated by get_scoring_function()
600 
601  @param ps container for the particles to be biased
602  @param k force constant
603 
604  \see get_z_bias_restraints()
605  \see get_scoring_function()
606  */
607  void add_z_bias_restraint(SingletonContainerAdaptor ps, double k);
608 
609  /**
610  adds a biasing potential for particle p towards z, to the restraints
611  returned by get_z_bias_restraints(), and for the scoring function
612  generated by get_scoring_function()
613 
614 
615  @param p the particle to be biased
616  @param k force constant
617  */
618  void add_z_bias_restraint(Particle* p, double k);
619 
620  /**
621  return z_bias restraints for all particles that were added using
622  add_z_bias_restraint()
623  */
624  IMP::Restraints get_z_bias_restraints();
625 
626  /**
627  create a z bias restraint pulling along z-axis for the particles
628  in ps. If a slab is present, the force acts only within tunnel radius
629  distance from its central axis.
630 
631  @param ps the particles container
632  @param k force constant for biasing ps
633  */
634  IMP::Restraint* create_z_bias_restraint(SingletonContainerAdaptor ps,
635  double k) const;
636 
637  void add_custom_restraint(IMP::Restraint* r)
638  { custom_restraints_.push_back(r); }
639 
640  void add_custom_restraints(IMP::Restraints R)
641  { custom_restraints_ += R; }
642 
643  void clear_custom_restraints()
644  { custom_restraints_.clear(); }
645 
646  IMP::Restraints get_custom_restraints() const
647  { return custom_restraints_; }
648 
649  /**
650  add anchor bead to scoring function, using current position of p
651  as equilibrium position relative to pore
652 
653  @param p anchored particle
654 
655  @note currently only cylindrical pore case is supported
656  */
657  void add_restrained_anchor_bead(IMP::Particle* p);
658 
659  Restraint* get_pore_radius_restraint() const;
660 
661 #ifndef SWIG
662  /**
663  returns pointers to the collection of the FG Chains stored in
664  this scoring object (can be used to e.g. scale scoring
665  information up or down during optimization)
666  */
668  return FGChains(chains_set_.begin(), chains_set_.end());
669  }
670 #endif
671 
672  double get_range() const { return range_; }
673 
674  /**
675  sets the multiplicative scaling of the interaction range for
676  pair interactions involving a particle of this type, for all
677  future calls to add_interaction()
678  */
679  void set_interaction_range_factor
680  ( IMP::core::ParticleType type, double value )
681  {
682  IMP_ALWAYS_CHECK(value>0, "interaction_range_factor must be positive",
684  interaction_range_factors_[type] = value;
685  }
686 
687  /**
688  sets the multiplicative scaling of the interaction k constants for
689  pair interactions involving a particle of this type, for all future
690  calls to add_interaction()
691  */
692  void set_interaction_k_factor
693  ( IMP::core::ParticleType type, double value )
694  {
695  IMP_ALWAYS_CHECK(value>0, "interaction_k_factor must be positive",
697  interaction_k_factors_[type] = value;
698  }
699 
700  private:
701 
702  public:
704 };
705 
706 
707 
708 
709 IMPNPCTRANSPORT_END_NAMESPACE
710 
711 #endif /* IMPNPCTRANSPORT_SCORING_H */
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:37
A shared container for Pairs.
Definition: PairContainer.h:37
Apply a PairScore to each Pair in a list.
SimulationData const * get_sd() const
Definition: Scoring.h:438
IMP::Vector< IMP::Pointer< Restraint > > Restraints
Definition: base_types.h:79
Store a list of ParticleIndexes.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
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
Definition: base_types.h:154
Score particles based on a bounding box.
creating TAMD chains
A weak pointer to an Object or RefCountedObject.
Definition: WeakPointer.h:32
description
A particle with a user-defined type.
double get_excluded_volume_k() const
Definition: Scoring.h:480
#define IMP_NEW(Typename, varname, args)
Declare a ref counted pointer to a new object.
Definition: object_macros.h:64
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Decorator for helping deal with a hierarchy of molecules.
A container for Pairs.
Scoring associated with a SimulationData object.
Definition: Scoring.h:47
Common base class for heavy weight IMP objects.
Definition: Object.h:106
Store a list of ParticleIndexes.
Return all pairs from a SingletonContainer.
SimulationData * get_sd()
Definition: Scoring.h:432
IMP::Vector< IMP::Pointer< FGChain > > FGChains
Definition: FGChain.h:190
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
double get_default_backbone_k() const
Definition: Scoring.h:451
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
Definition: Scoring.h:484
Represents a scoring function on the model.
Define some predicates.
Class to handle individual particles of a Model object.
Definition: Particle.h:41
ParticleIndex get_index() const
returns the particle index of this particle in its model
FGChains get_fg_chains()
Definition: Scoring.h:667
Storage of a model, its restraints, constraints and particles.
#define IMP_ALWAYS_CHECK(condition, message, exception_name)
Throw an exception if a check fails.
Definition: check_macros.h:61
An exception for an invalid value being passed to IMP.
Definition: exception.h:137
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:54
forward declaration of incomplete protobuf files for the main data structures used ...