8 #ifndef IMPNPCTRANSPORT_SIMULATION_DATA_H
9 #define IMPNPCTRANSPORT_SIMULATION_DATA_H
12 #include "npctransport_config.h"
30 #include <boost/unordered_map.hpp>
31 #include <boost/unordered_set.hpp>
39 IMPNPCTRANSPORT_BEGIN_NAMESPACE
44 #define IMPNPCTRANSPORT_VERSION 4.0
50 Parameter<double> output_npctransport_version_;
51 Parameter<double> box_side_;
52 Parameter<double> tunnel_radius_;
53 Parameter<double> tunnel_radius_k_;
54 Parameter<double> pore_anchored_beads_k_;
55 Parameter<double> slab_thickness_;
56 Parameter<bool> 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<double> time_step_;
69 Parameter<double> time_step_wave_factor_;
70 Parameter<double> maximum_number_of_minutes_;
71 Parameter<double> fg_anchor_inflate_factor_;
73 Parameter<int> is_exclude_floaters_from_slab_initially_;
74 Parameter<double> are_floaters_on_one_slab_side_;
75 Parameter<int> is_xyz_hist_stats_;
78 Parameter<double> initial_simulation_time_ns_;
79 Parameter<double> temperature_k_;
82 double get_output_npctransport_version()
const {
return output_npctransport_version_; }
87 int get_output_statistics_interval_frames()
88 {
return output_statistics_interval_frames_; }
92 {
return is_exclude_floaters_from_slab_initially_; }
98 {
return are_floaters_on_one_slab_side_;}
100 bool get_is_xyz_hist_stats()
101 {
return is_xyz_hist_stats_; }
105 {
return angular_d_factor_; }
138 ParticleTypeSet fg_bead_types_;
141 ParticleTypeSet fg_chain_types_;
142 ParticleTypeSet floater_types_;
143 ParticleTypeSet obstacle_types_;
147 boost::unordered_map<core::ParticleType, algebra::Sphere3Ds> sites_;
149 boost::unordered_map<core::ParticleType, double> ranges_;
152 std::string rmf_file_name_;
156 bool is_save_restraints_to_rmf_;
161 void create_slab_particle();
171 ( const ::npctransport_proto::Assignment_FGAssignment &fg_data );
181 void create_floaters(
182 const ::npctransport_proto::Assignment_FloaterAssignment &f_data,
192 void create_obstacles
193 ( const ::npctransport_proto::Assignment_ObstacleAssignment &o_data);
206 void initialize(std::string prev_output_file,
207 std::string new_output_file,
233 std::string rmf_file_name = std::string(),
234 std::string new_output_file =
"");
238 Model * get_model()
const {
247 Scoring * get_scoring();
251 Statistics* get_statistics();
257 Scoring
const* get_scoring()
const;
261 Statistics
const* get_statistics()
const;
274 void activate_statistics();
289 return fg_bead_types_.find(pt) != fg_bead_types_.end();
304 return fg_chain_types_.find(pt) != fg_chain_types_.end();
312 return fg_bead_types_;
318 return fg_chain_types_;
325 return floater_types_;
331 return obstacle_types_;
343 IMPCORE_DEPRECATED_METHOD_DECL(2.2)
344 atom::Hierarchies get_fg_chains()
const
345 {
return get_fg_chain_roots(); }
383 bool get_is_backbone_harmonic()
const
384 {
return is_backbone_harmonic_; }
386 double get_backbone_tau_ns()
const {
387 return backbone_tau_ns_;
390 double get_temperature_k()
const
391 {
return temperature_k_; }
395 {
return initial_simulation_time_ns_; }
418 if (sites_.find(t0) != sites_.end()) {
420 for(
unsigned int i = 0; i < sites.size(); i++){
421 ret.push_back(sites[i].get_center());
435 if (sites_.find(t0) != sites_.end()) {
436 return sites_.find(t0)->second;
444 IMP_USAGE_CHECK(sites.size()>0,
"trying to set zero sites for particle type"
460 return maximum_number_of_minutes_;
472 void add_interaction(
473 const ::npctransport_proto::Assignment_InteractionAssignment &idata);
479 double get_box_size()
const;
481 void set_box_size(
double box_size);
484 bool get_has_slab()
const {
return slab_is_on_!=0; }
488 {
return slab_is_on_==1; }
492 {
return slab_is_on_==2; }
498 if(!slab_particle_ && get_has_slab()){
503 return slab_particle_.get();
509 bool get_has_bounding_box()
const {
return box_is_on_; }
533 void initialize_positions_from_rmf(RMF::FileConstHandle fh,
534 int frame_number = -1);
546 void link_rmf_file_handle(RMF::FileHandle fh,
bool is_restraints =
true);
577 void switch_suspend_rmf(
bool suspend);
582 void write_geometry(std::string out);
584 void dump_geometry();
593 unsigned int get_number_of_trials()
const {
return number_of_trials_; }
595 atom::Hierarchy
get_root()
const {
return atom::Hierarchy(root_); }
597 double get_slab_thickness()
const;
600 double get_tunnel_radius()
const;
604 return get_tunnel_radius();
610 return tunnel_radius_k_;
615 return get_tunnel_radius_k();
620 return get_has_slab() && get_tunnel_radius_k()>0.0;
623 double get_pore_anchored_beads_k()
const {
624 return pore_anchored_beads_k_;
629 int get_rmf_dump_interval_frames()
const {
return dump_interval_frames_; }
631 std::string get_rmf_file_name()
const {
return rmf_file_name_; }
646 void set_rmf_file(
const std::string &new_name,
647 bool is_save_restraints_to_rmf =
true);
659 IMPNPCTRANSPORT_END_NAMESPACE
Apply a PairScore to each Pair in a list.
Particle * get_slab_particle() const
Simple molecular dynamics optimizer.
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.
Particles & get_beads_byref()
bool get_is_exclude_floaters_from_slab_initially()
Vector< VectorD< 3 > > Vector3Ds
The base class for geometry.
bool get_is_slab_with_toroidal_pore() const
bool get_are_floaters_on_one_slab_side()
#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.
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.
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.
double get_tunnel_radius_k() const
ParticleTypeSet const & get_fg_bead_types() const
ParticlesTemp get_beads()
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.
double get_angular_d_factor() const
double get_site_display_radius(core::ParticleType) const
double get_initial_simulation_time_ns() const
Class for storing model, its restraints, constraints, and particles.
Decorator for helping deal with a hierarchy of molecules.
Simple Brownian dynamics simulator.
bool get_is_slab_with_cylindrical_pore() const
The standard decorator for manipulating molecular structures.
Common base class for heavy weight IMP objects.
int get_number_of_frames(const ::npctransport_proto::Assignment &config, double time_step)
Return all pairs from a SingletonContainer.
A smart pointer to a ref-counted Object that is a class member.
algebra::Sphere3Ds get_sites(core::ParticleType t0) const
IMP::Vector< Sphere3D > Sphere3Ds
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.
double get_statistics_fraction() const
Hierarchy get_root(Hierarchy h)
Return the root of the hierarchy.
Class to handle individual particles of a Model object.
ParticleTypeSet const & get_fg_chain_types() const
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
bool get_is_fg_bead(core::ParticleType pt) const
forward declaration of incomplete protobuf files for the main data structures used ...