IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
SimulationData.h
Go to the documentation of this file.
1 /**
2  * \file npctransport/SimulationData.h
3  * \brief description
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPNPCTRANSPORT_SIMULATION_DATA_H
9 #define IMPNPCTRANSPORT_SIMULATION_DATA_H
10 
11 
12 #include "npctransport_config.h"
13 #include <IMP/Model.h>
14 #include <IMP/PairContainer.h>
16 #include <IMP/atom/Hierarchy.h>
17 #include <IMP/SingletonContainer.h>
19 //#include <IMP/container/DynamicListSingletonContainer.h>
24 #include <IMP/core/Typed.h>
27 #include <IMP/Pointer.h>
28 #include <IMP/algebra/Vector3D.h>
29 #include <IMP/algebra/Sphere3D.h>
30 #include <boost/unordered_map.hpp>
31 #include <boost/unordered_set.hpp>
32 #include "io.h"
33 #include "Parameter.h"
34 #include "Scoring.h"
35 #include "Statistics.h"
36 #include "npctransport_proto.fwd.h"
37 #include <string>
38 
39 IMPNPCTRANSPORT_BEGIN_NAMESPACE
40 
41 // Version 2.5 - turned slab into a particle
42 // Version 3.0 - added harmonic bond with proper tau
43 // Version 4.0 - more properly handle various suffixes of FG chains (=different types of beads)
44 #define IMPNPCTRANSPORT_VERSION 4.0
45 
46 //! Store all parameters for a simulation
47 class IMPNPCTRANSPORTEXPORT SimulationData : public Object {
48  private:
49  // params
50  Parameter<double> output_npctransport_version_;
51  Parameter<double> box_side_;
52  Parameter<double> tunnel_radius_; // note this is the initial pore radius (major radius if toroidal pore)
53  Parameter<double> tunnel_radius_k_; // k for harmonic restraint on pore radius
54  Parameter<double> pore_anchored_beads_k_; // k for harmonic restraint on beads anchored to pore
55  Parameter<double> slab_thickness_; // note this is the initial thickness (also minor vertical radius if toroidal pore)
56  Parameter<int> box_is_on_;
57  Parameter<int> slab_is_on_;
58  Parameter<int> number_of_trials_;
59  Parameter<int> number_of_frames_;
60  Parameter<int> dump_interval_frames_;
61  Parameter<bool> is_backbone_harmonic_;
62  Parameter<double> backbone_tau_ns_;
63  Parameter<double> angular_d_factor_;
64  Parameter<double> range_;
65  Parameter<double> statistics_fraction_;
66  Parameter<int> statistics_interval_frames_;
67  Parameter<int> output_statistics_interval_frames_;
68  Parameter<int> full_output_statistics_interval_factor_;
69  Parameter<int> is_multiple_hdf5s_;
70  Parameter<double> time_step_;
71  Parameter<double> time_step_wave_factor_;
72  Parameter<double> maximum_number_of_minutes_;
73  Parameter<double> fg_anchor_inflate_factor_; // By how much to inflate static
74  // anchors of FG nups.
75  Parameter<int> is_exclude_floaters_from_slab_initially_;
76  Parameter<double> are_floaters_on_one_slab_side_;
77  Parameter<int> is_xyz_hist_stats_;
78  Parameter<double> xyz_stats_crop_factor_;
79  Parameter<double> xyz_stats_voxel_size_a_;
80  Parameter<double> xyz_stats_max_box_size_a_;
81  // time when simulation has started for this process
82  Parameter<double> initial_simulation_time_ns_;
83  Parameter<double> temperature_k_;
84 
85  public:
86  double get_output_npctransport_version() const { return output_npctransport_version_; }
87 
88  /** returns the maximal interaction range between particles */
89  double get_range() const { return range_; }
90 
91  int get_output_statistics_interval_frames() const
92  { return output_statistics_interval_frames_; }
93 
94  int get_full_output_statistics_interval_factor() const
95  { return full_output_statistics_interval_factor_; }
96 
97  // if true, hdf5s are generated every get_output_statistics_interval_frames() frames
98  bool get_is_multiple_hdf5s()
99  {
100  return is_multiple_hdf5s_;
101  }
102 
103  /** returns whether should exclude floaters from slab during initialization */
105  { return is_exclude_floaters_from_slab_initially_; }
106 
107  /** returns whether should exclude floaters from one slab side,
108  if excluded at all
109  */
111  { return are_floaters_on_one_slab_side_;}
112 
113  //! whether xyz histogram statistics are on (into HDF5 file)
115  { return is_xyz_hist_stats_; }
116 
117  //! return the factor by which the XYZ histogram is cropped on each axis
118  //! (symmetrically), up to the maximal size
120  { return xyz_stats_crop_factor_; }
121 
122  //! return the voxel size in angstroms for the XYZ histogram
124  { return xyz_stats_voxel_size_a_; }
125 
126  //! returns the maximal box size in angstroms for the XYZ histogram
127  //! i.e. crop at most this many angstroms from each dimension
129  { return xyz_stats_max_box_size_a_; }
130 
131  /** returns the simulation angular d factor */
132  double get_angular_d_factor() const
133  { return angular_d_factor_; }
134 
135 
136  private:
137  // the model on which the simulation is run
139 
140  // The BrownianDynamic simulator
142 
143  // The scoring function wrapper for the simulation
145  scoring_;
146 
147  // The statistics manager for this simulation
149  statistics_;
150 
151  // all beads in the simulation (=fine-level particles)
152  Particles beads_;
153 
154  // a writer to an RMF (Rich Molecular Format) type file
156 
157  // the root of the model hierarchy
159 
160  // Membrane slab, if exists (mutable but is expected to be accessed only from get_slab_particle()
161  mutable PointerMember<Particle> slab_particle_;
162 
163  // fg bead types - a set of all fg/floater/obstacle types that were
164  // added via create_fgs/floaters/obstacles(), including
165  // the suffixes of individual beads in a chain added to their chain root name
166  ParticleTypeSet fg_bead_types_;
167  // fg chain types - same as fg_bead_types but just for the root particles
168  // without the suffixes
169  ParticleTypeSet fg_chain_types_;
170  ParticleTypeSet floater_types_;
171  ParticleTypeSet obstacle_types_;
172 
174 
175  boost::unordered_map<core::ParticleType, algebra::Sphere3Ds> sites_;
176 
177  boost::unordered_map<core::ParticleType, double> ranges_;
178 
179  // the RMF format file to which simulation output is dumped:
180  std::string rmf_file_name_;
181 
182  // whether to save restraints to rmf when
183  // calling get_rmf_sos_writer()
184  bool is_save_restraints_to_rmf_;
185 
186  private:
187 
188  //! initialize slab_particle_ based on current parameters
189  void create_slab_particle();
190 
191  /**
192  Adds the FG Nup chains to the model hierarchy,
193  based on the settings in data
194 
195  @param fg_data data for fgs of this type in protobuf format as specified
196  in data/npctransport.proto
197  */
198  void create_fgs
199  ( const ::npctransport_proto::Assignment_FGAssignment &fg_data );
200 
201  /**
202  Adds the 'floaters' (free diffusing particles) to the model hierarchy,
203  based on the settings in data
204 
205  @param f_data data for floater in protobuf format as specified
206  in data/npctransport.proto
207  @param color a color for all floaters of this type
208  */
209  void create_floaters(
210  const ::npctransport_proto::Assignment_FloaterAssignment &f_data,
211  display::Color color);
212 
213  /**
214  Adds the 'obstacles' (possibly static e.g. nups that make the pore)
215  to the model hierarchy, based on the settings in data
216 
217  @param o_data data for obstacles in protobuf format as specified in
218  data/npctransport.proto
219  */
220  void create_obstacles
221  ( const ::npctransport_proto::Assignment_ObstacleAssignment &o_data);
222 
223  /** Initializes the simulation based on the specified assignment file
224 
225  @param prev_output_file protobuf file with the current assignment, and
226  possibly previous progress and statistics info
227  @param[in] new_output_file new protobuf file for subsequent output and
228  statistics.
229  If it is "", then prev_output_file is being
230  rewritten.
231  @param quick whether to perform a quick simulation with a small number
232  of iterations
233  */
234  void initialize(std::string prev_output_file,
235  std::string new_output_file,
236  bool quick);
237 
238  public:
239  /**
240  @param[in] prev_output_file name of protobuf file that encapsulates the
241  assignment data for initializing the
242  simulation params and the output
243  statistics file. The output file is
244  assumed to already exist at this
245  point and contain the assignment.
246  If it contains an rmf_conformation
247  or conformation field, it will be
248  used to initialize particle
249  positions, in that priority.
250  @param[in] quick if true, perform a very short simulation,
251  typically for calibration or for initial testing
252  @param[out] rmf_file_name RMF file to which simulation trajectory
253  is recorded (if empty, no RMF file is created
254  upon construction)
255  \see set_rmf_file()
256  @param[in] new_output_file new protobuf file for subsequent output and statistics
257  If it is "", then prev_output_file is being rewritten
258  (= default).
259  */
260  SimulationData(std::string prev_output_file, bool quick,
261  std::string rmf_file_name = std::string(),
262  std::string new_output_file = "");
263 
264  Model *get_model();
265 #ifndef SWIG
266  Model * get_model() const {
267  IMP_USAGE_CHECK(m_, "model not initialized in get_model()");
268  return m_;
269  }
270 #endif
271 
272  /** returns a scoring object that is updated with the current particles
273  hierarch and associated with this sd
274  */
275  Scoring * get_scoring();
276 
277  /** returns a Statistics object that is updated by this simulation data
278  */
279  Statistics* get_statistics();
280 
281 #ifndef SWIG
282  /** returns a scoring object that is updated with the current particles
283  hierarchy and associated with this sd
284  */
285  Scoring const* get_scoring() const;
286 
287  /** returns a Statistics object that is updated by this simulation data
288  */
289  Statistics const* get_statistics() const;
290 
291 #endif
292 
293  /** gets the Brownian Dynamics object that is capable of simulating
294  this data. Statistics are not yet active for the simulation.
295 
296  @param recreate if true, forces recreation of the bd object
297  */
298  atom::BrownianDynamics *get_bd(bool recreate = false);
299 
300  //! activates Brownian Dynamics statistics tracking
301  //! by adding all appropriate optimizer states, if they weren't already
302  void activate_statistics();
303 
304  /** returns the requested fraction of time for taking statistics */
305  double get_statistics_fraction() const { return statistics_fraction_; }
306 
307  /** returns true if bead has an fg type
308  that is, particle was added within create_fgs()
309  */
310  bool get_is_fg_bead(ParticleIndex pi) const;
311 
312 
313  /** returns true if particle type is of fg type
314  (that is, it is one of the types added via create_fgs())
315  */
317  return fg_bead_types_.find(pt) != fg_bead_types_.end();
318  }
319 
320  /** returns true if particle has an fg chain type
321  that is, particle has the same type as the root of an
322  fg chain that was added via create_fgs()
323  */
324  bool get_is_fg_chain(ParticleIndex pi) const;
325 
326 
327  /** returns true if particle type is an fg chain type
328  (that is, it is one of the types of a chain added
329  via create_fgs())
330  */
332  return fg_chain_types_.find(pt) != fg_chain_types_.end();
333  }
334 
335 
336  /** return all the types of fg beads that were added
337  via create_fgs() including the suffix appended to their
338  chain type name */
339  ParticleTypeSet const& get_fg_bead_types() const {
340  return fg_bead_types_;
341  }
342 
343  /** return all the types of fg chains that were added
344  via create_fgs(), i.e. the types of chain roots */
345  ParticleTypeSet const& get_fg_chain_types() const {
346  return fg_chain_types_;
347  }
348 
349 
350  /** return all the types of floaters that were added
351  via create_floaters() */
352  ParticleTypeSet const& get_floater_types() const {
353  return floater_types_;
354  }
355 
356  /** return all the types of obstacles that were added
357  via create_obstacles() */
358  ParticleTypeSet const& get_obstacle_types() const {
359  return obstacle_types_;
360  }
361 
362  /**
363  retrieve fg chain hierarchies
364 
365  @return all the fg hierarchies in the simulation data object
366  that stand for individual FG chains
367  */
368  atom::Hierarchies get_fg_chain_roots() const;
369 
370  /** \deprecated_at{2.2}, use get_fg_chain_roots() instead */
371  IMPCORE_DEPRECATED_METHOD_DECL(2.2)
372  atom::Hierarchies get_fg_chains() const
373  { return get_fg_chain_roots(); }
374 
375 
376  /** return all the obstacle particles */
377  ParticlesTemp get_obstacle_particles() const;
378 
379 
380 #ifndef SWIG
381 
382  /**
383  returns all diffusing fine-level beads in this
384  simulation data object (or an empty list if none exists)
385  @note efficient - returns an existing container by ref
386  */
387  Particles& get_beads_byref(){ return beads_; }
388 #endif
389 
390  /**
391  returns all diffusing fine-level beads in this
392  simulation data object (or an empty list if none exists)
393  */
394  ParticlesTemp get_beads(){ return beads_; }
395 
396 
397  /**
398  returns all fine-level beads that currently exist in
399  this simulation data object get_sd(), which are also optimizable
400  (or an empty list if no such bead exists)
401  */
402  ParticlesTemp get_optimizable_beads();
403 
404  /**
405  returns all fine-level beads that currently exist in
406  this simulation data object get_sd(), which are also non-optimizable
407  (or an empty list if no such bead exists)
408  */
409  ParticlesTemp get_non_optimizable_beads();
410 
411  bool get_is_backbone_harmonic() const
412  { return is_backbone_harmonic_; }
413 
414  double get_backbone_tau_ns() const {
415  return backbone_tau_ns_;
416  }
417 
418  double get_temperature_k() const
419  { return temperature_k_; }
420 
421  /** get time from which simulation begins */
423  {return initial_simulation_time_ns_; }
424 
425  /**
426  Create n interaction sites spread around the surface of a ball of
427  radius r, and associate these sites with all particles of type t0
428 
429  If n==-1, creates a single site, centered at the bead, and r is ignored
430 
431  @param t0 type of particle to associate with sites
432  @param n number of sites
433  @param r radius at which to position sites relative to t0 origin
434  @param sr radius from site center within which site
435  has maximal interaction energy
436  */
437  void set_sites(core::ParticleType t0, int n, double r, double sr);
438 
439  /**
440  returns a list of 3D coordinates for the interaction sites associated
441  with particles of type t0. The site coordinates are in the
442  particles local reference frame
443  */
445  algebra::Vector3Ds ret;
446  if (sites_.find(t0) != sites_.end()) {
447  algebra::Sphere3Ds sites = sites_.find(t0)->second;
448  for(unsigned int i = 0; i < sites.size(); i++){
449  ret.push_back(sites[i].get_center());
450  }
451  return ret;
452  } else {
453  return algebra::Vector3Ds();
454  }
455  }
456 
457  /**
458  returns a list of Spheres3D for the interaction sites associated
459  with particles of type t0. The site coordinates are in the
460  particles local reference frame.
461  */
463  if (sites_.find(t0) != sites_.end()) {
464  return sites_.find(t0)->second;
465  } else {
466  return algebra::Sphere3Ds();
467  }
468  }
469 
470  /** Set the sites explicitly. */
472  IMP_USAGE_CHECK(sites.size()>0, "trying to set zero sites for particle type"
473  << t0.get_string() );
474  sites_[t0] = sites;
475  }
476 
477  /**
478  Returns the effective interaction range radius of a
479  site on a floater */
480  // TODO: this is not the true value - the true one might depend on the
481  // specific range of each interaction type, so range_ is more
482  // like an upper bound
483  double get_site_display_radius(core::ParticleType) const { return std::max(range_ / 2, 6.0); }
484 
485  //! Return the maximum number of minutes the simulation can run
486  /** Or 0 for no limit. */
488  return maximum_number_of_minutes_;
489  }
490 
491  //! remove particle of type pt from simulation, including all
492  //! model particles, statistics and interactions associated with it
493  //! \note this does not update the protobuf assignment or protobuf statistics
494  //! \see remove_fgs_with_prefix
495  void remove_particle_type(core::ParticleType pt);
496 
497  //! remove all FGs of specified type.
498  /**
499  Remove any FG chain if the prefix of its string representation matches s_fg_type
500  (= begins with s_fg_type, followed by an empty string or a non-digit
501  character) from the simulation, including model particles, statistics and
502  associated interaction, as well as related assignment and statistics data
503  from the output protobuf file
504 
505  @param s_fg_type The FG type prefix (chain name, to which a suffix could
506  be added for children beads)
507 
508  \see remove_particle_type
509  */
510  void remove_fgs_with_prefix(std::string s_fg_type);
511 
512 // swig doesn't equate the two protobuf types
513 #ifndef SWIG
514  /**
515  add the specified interaction to the scoring.
516  In additions, adds statistics optimizer state about pairs of this type.
517 
518  @param idata the protobuf data about the interaction (particle types,
519  interaction coefficients, etc.)
520  */
521  void add_interaction(
522  const ::npctransport_proto::Assignment_InteractionAssignment &idata);
523 #endif
524 
525  // get the bounding box for this simulation
526  algebra::BoundingBox3D get_bounding_box() const;
527 
528  // get the bounding box for this simulation
529  algebra::Sphere3D get_bounding_sphere() const;
530 
531  //! returns the length in A of one side of the box
532  //! (valid only if get_has_bounding_box() is true)
533  double get_bounding_box_size() const;
534 
535  //! sets the length in A of one side of the box
536  //! (valid only if get_has_bounding_box() is true)
537  void set_bounding_box_size(double box_size);
538 
539  //! get the radius of the bounding sphere
540  //! (valid only if get_has_bounding_sphere() is true)
541  double get_bounding_sphere_radius() const;
542 
543  //! set radius of bounding sphere in angstrom
544  //! (valid only if get_has_bounding_sphere() is true)
545  void set_bounding_sphere_radius(double sphere_radius);
546 
547  double get_bounding_volume() const;
548 
549  //! sets the volume of the bounding box or sphere in A^3
550  //! (box side or sphere radius are adjusted accordingly)
551  void set_bounding_volume(double volume_A3);
552 
553  //* returns true if a slab is defnied */
554  bool get_has_slab() const { return slab_is_on_!=0; }
555 
556  /** returns true if a slab is defined and has a cylindrical pore */
558  { return slab_is_on_==1; }
559 
560  /** returns true if a slab is defined and has a toroidal pore */
562  { return slab_is_on_==2; }
563 
564  /** returns the slab particle, initializing it based on current parameters
565  if needed
566  */
568  if(!slab_particle_ && get_has_slab()){
569  // Const cast below - cause the initialization of slab_particle_ is transparent when
570  // using get_slab_particle(), and it should only be accessed from this method
571  const_cast<SimulationData*>(this)->create_slab_particle();
572  }
573  return slab_particle_.get();
574  }
575 
576  // get the cylinder in the slab for this simulation
577  algebra::Cylinder3D get_cylinder() const;
578 
579  //! returns true if simulation has a bounding simulation box
580  bool get_has_bounding_box() const {
581  return box_is_on_==1;
582  }
583 
584  //! returns true if simulation has a bounding simulation sphere ('cell-like')
585  bool get_has_bounding_sphere() const {
586  return box_is_on_==2;
587  }
588 
589  //! returns true if simulation has any bounding volume (box or sphere are supported)
590  bool get_has_bounding_volume() const {
591  bool has_bounding_volume= (box_is_on_ != 0);
593  if(has_bounding_volume){
594  IMP_USAGE_CHECK(get_has_bounding_box() || get_has_bounding_sphere(),
595  "Invalid box_is_on value (typically defined in protobuf)");
596  }
597  return has_bounding_volume;
598 
599  }
600 
601  /**
602  Open the specified RMF file, links it to the hierarchies of this object, and
603  copy
604  the XYZ coordinates from its last frame into the particles of this object.
605 
606  @note this method assumes that the hierarchies that are stored in the RMF
607  file
608  was constructed in the same way as the hierarchies within this SimulationData
609  object. The only major difference between the two is assumed to be the
610  coordinates of
611  the various particles. Otherwise, results might be unexpected, and it is not
612  guaranteed
613  that a mismatch would be detected at runtime.
614  \see IMP::rmf::link_hierarchies()
615  \see IMP::rmf::load_frame()
616 
617  The frame number is the frame in the file to use, if, eg, there are several
618  initial frames to use. If it is -1, the last frame is used.
619 
620  @exception RMF::IOException if couldn't open RMF file, or unsupported file
621  format
622  */
623  void initialize_positions_from_rmf(RMF::FileConstHandle fh,
624  int frame_number = -1);
625 
626  /** Links a handle to an open rmf file with the
627  hierarchy and constraints of this simulation data,
628  so that writing frames into this handle will write
629  the updated state of the simulation
630 
631  @param fh the handle to be linked
632  @param is_restraints if true, save restraints to RMF
633 
634  \exception RMF::IOException IO error with RMF file handle
635  */
636  void link_rmf_file_handle(RMF::FileHandle fh, bool is_restraints = true);
637 
638  /**
639  Returns the internal periodic SaveOptimizerState writer that
640  periodically outputs the particles hierarchy and restraints,
641  using the file name returned by SimulationData::get_rmf_file_name(), which is
642  assumed to be non empty. If the writer does not exist, then
643  it is constructed first.
644 
645  \exception RMF::IOException couldn't create RMF file
646  */
647  rmf::SaveOptimizerState *get_rmf_sos_writer();
648 
649  /**
650  Resets the RMF file to which the internal periodic SaveOptimizerState
651  writer dumps the output. If it does not exist, create it.
652 
653  \exception RMF::IOException couldn't create RMF file or other IO related
654  problems with RMF
655  */
656  void reset_rmf();
657 
658 
659  /*
660  temporarily suspend output to RMF file
661 
662  @param suspend if true, suspend an existing rmf save optimizer state,
663  associated with the bd, otherwise restores an old one, if it
664  exists or was created.
665  @note the suspension will expire when calling get_bd(true)
666  */
667  void switch_suspend_rmf(bool suspend);
668 
669  /**
670  Write the geometry to the file path 'out'
671  */
672  void write_geometry(std::string out);
673 
674  void dump_geometry();
675 
676  /**
677  Returns the root of all chains of type 'type'
678  */
679  atom::Hierarchy get_root_of_type(core::ParticleType type) const;
680 
681  unsigned int get_number_of_frames() const { return number_of_frames_; }
682 
683  unsigned int get_number_of_trials() const { return number_of_trials_; }
684 
685  atom::Hierarchy get_root() const { return atom::Hierarchy(root_); }
686 
687  double get_slab_thickness() const;
688 
689  //! returns the current tunnel radius
690  double get_tunnel_radius() const;
691 
692  //! alias to get_tunnel_radius
693  double get_pore_radius() const{
694  return get_tunnel_radius();
695  }
696 
697  //! returns the force coefficient for keeping the tunnel radius in
698  //! equilibrium (radius is dynamic only if this coefficient is positive)
699  double get_tunnel_radius_k() const {
700  return tunnel_radius_k_;
701  }
702 
703  //! alias to get_tunnel_radius_k
704  double get_pore_radius_k() const {
705  return get_tunnel_radius_k();
706  }
707 
708  //! returns true if pore radius can change dynamically
710  return get_has_slab() && get_tunnel_radius_k()>0.0;
711  }
712 
713  double get_pore_anchored_beads_k() const {
714  return pore_anchored_beads_k_;
715  }
716 
717  display::Geometry *get_static_geometry();
718 
719  int get_rmf_dump_interval_frames() const { return dump_interval_frames_; }
720 
721  std::string get_rmf_file_name() const { return rmf_file_name_; }
722 
723  /**
724  resets the name of the RMF file that records the simulation. If
725  an old one exists from a previous call with a different name and
726  different restraints settings, then the previous RMF
727  writer is invalidated by this action (closed and flushed). If
728  the Brownian Dynamics object has already been initialized, a new
729  writer with the new name is added as an optimizer state to it
730  instead of the existing one.
731  TODO: make sure the old writer is indeed closed and flushed
732 
733  @param new_name the new name of the rmf file
734  @param is_save_restraints_to_rmf whether to save restraints to this
735  rmf file
736  @param is_force_reset if true, force reset even if new_name and
737  is_save_restraints_to_rmf are equal to their
738  old values.
739  */
740  void set_rmf_file(const std::string &new_name,
741  bool is_save_restraints_to_rmf = true,
742  bool is_force_restart= false);
743 
745 
746 };
747 
748 
749 inline WeakObjectKey get_simulation_data_key() {
750  static WeakObjectKey simdata("simulation data");
751  return simdata;
752 }
753 
754 IMPNPCTRANSPORT_END_NAMESPACE
755 
756 #endif /* IMPNPCTRANSPORT_SIMULATION_DATA_H */
Apply a PairScore to each Pair in a list.
Represent an RGB color.
Definition: Color.h:25
Particle * get_slab_particle() const
Simple Brownian dynamics optimizer.
#define IMP_IF_CHECK(level)
Execute the code block if a certain level checks are on.
Definition: check_macros.h:104
double get_xyz_stats_max_box_size_A() const
void set_sites(core::ParticleType t0, const algebra::Sphere3Ds &sites)
algebra::Vector3Ds get_site_centers(core::ParticleType t0) const
scoring associated with a SimulationData object
A container for Singletons.
Vector< VectorD< 3 > > Vector3Ds
Definition: VectorD.h:410
The base class for geometry.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
double get_xyz_stats_voxel_size_A() const
return the voxel size in angstroms for the XYZ histogram
Store a set of PairContainers.
Storage of a model, its restraints, constraints and particles.
bool get_has_bounding_sphere() const
returns true if simulation has a bounding simulation sphere ('cell-like')
double get_maximum_number_of_minutes() const
Return the maximum number of minutes the simulation can run.
statistics and order parameters about the simulations that is associated with a SimulationData object...
Represent a cylinder in 3D.
Definition: Cylinder3D.h:27
bool get_is_pore_radius_dynamic() const
returns true if pore radius can change dynamically
Score particles based on a bounding box.
Dump the state of all associated objects into the RMF file.
description
ParticleTypeSet const & get_fg_bead_types() const
Implement geometry for the basic shapes from IMP.algebra.
A particle with a user-defined type.
const std::string get_string() const
Turn a key into a pretty string.
Definition: Key.h:181
double get_site_display_radius(core::ParticleType) const
double get_initial_simulation_time_ns() const
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Decorator for helping deal with a hierarchy of molecules.
bool get_are_floaters_on_one_slab_side() const
A container for Pairs.
Simple Brownian dynamics simulator.
bool get_is_slab_with_cylindrical_pore() const
bool get_has_bounding_volume() const
returns true if simulation has any bounding volume (box or sphere are supported)
The standard decorator for manipulating molecular structures.
Common base class for heavy weight IMP objects.
Definition: Object.h:111
int get_number_of_frames(const ::npctransport_proto::Assignment &config, double time_step)
Return all pairs from a SingletonContainer.
bool get_is_exclude_floaters_from_slab_initially() const
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:143
algebra::Sphere3Ds get_sites(core::ParticleType t0) const
IMP::Vector< Sphere3D > Sphere3Ds
Definition: SphereD.h:104
ParticleTypeSet const & get_floater_types() const
Store all parameters for a simulation.
ParticleTypeSet const & get_obstacle_types() const
double get_pore_radius() const
alias to get_tunnel_radius
bool get_is_fg_chain(core::ParticleType pt) const
double get_pore_radius_k() const
alias to get_tunnel_radius_k
A nullptr-initialized pointer to an IMP Object.
Periodically dump the state of all associated objects into the RMF file.
bool get_is_xyz_hist_stats() const
whether xyz histogram statistics are on (into HDF5 file)
Define some predicates.
Hierarchy get_root(Hierarchy h)
Return the root of the hierarchy.
Simple 3D vector class.
Class to handle individual particles of a Model object.
Definition: Particle.h:43
ParticleTypeSet const & get_fg_chain_types() const
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Definition: check_macros.h:168
description
Simple 3D sphere class.
bool get_has_bounding_box() const
returns true if simulation has a bounding simulation box
bool get_is_fg_bead(core::ParticleType pt) const
forward declaration of incomplete protobuf files for the main data structures used ...