IMP Reference Guide
2.10.0
The Integrative Modeling Platform
|
Store all parameters for a simulation. More...
#include <IMP/npctransport/SimulationData.h>
Store all parameters for a simulation.
Definition at line 47 of file SimulationData.h.
Public Member Functions | |
SimulationData (std::string prev_output_file, bool quick, std::string rmf_file_name=std::string(), std::string new_output_file="") | |
void | activate_statistics () |
by adding all appropriate optimizer states, if they weren't already More... | |
void | add_interaction (const ::npctransport_proto::Assignment_InteractionAssignment &idata) |
void | dump_geometry () |
double | get_angular_d_factor () const |
bool | get_are_floaters_on_one_slab_side () |
double | get_backbone_tau_ns () const |
atom::BrownianDynamics * | get_bd (bool recreate=false) |
ParticlesTemp | get_beads () |
Particles & | get_beads_byref () |
algebra::BoundingBox3D | get_box () const |
double | get_box_size () const |
algebra::Cylinder3D | get_cylinder () const |
ParticleTypeSet const & | get_fg_bead_types () const |
atom::Hierarchies | get_fg_chain_roots () const |
ParticleTypeSet const & | get_fg_chain_types () const |
atom::Hierarchies | get_fg_chains () const |
ParticleTypeSet const & | get_floater_types () const |
bool | get_has_bounding_box () const |
bool | get_has_slab () const |
double | get_initial_simulation_time_ns () const |
bool | get_is_backbone_harmonic () const |
bool | get_is_exclude_floaters_from_slab_initially () |
bool | get_is_fg_bead (ParticleIndex pi) const |
bool | get_is_fg_bead (core::ParticleType pt) const |
bool | get_is_fg_chain (ParticleIndex pi) const |
bool | get_is_fg_chain (core::ParticleType pt) const |
bool | get_is_pore_radius_dynamic () const |
returns true if pore radius can change dynamically More... | |
bool | get_is_slab_with_cylindrical_pore () const |
bool | get_is_slab_with_toroidal_pore () const |
bool | get_is_xyz_hist_stats () |
double | get_maximum_number_of_minutes () const |
Return the maximum number of minutes the simulation can run. More... | |
Model * | get_model () |
Model * | get_model () const |
ParticlesTemp | get_non_optimizable_beads () |
unsigned int | get_number_of_frames () const |
unsigned int | get_number_of_trials () const |
ParticlesTemp | get_obstacle_particles () const |
ParticleTypeSet const & | get_obstacle_types () const |
ParticlesTemp | get_optimizable_beads () |
double | get_output_npctransport_version () const |
int | get_output_statistics_interval_frames () |
double | get_pore_anchored_beads_k () const |
double | get_pore_radius () const |
alias to get_tunnel_radius More... | |
double | get_pore_radius_k () const |
alias to get_tunnel_radius_k More... | |
double | get_range () const |
int | get_rmf_dump_interval_frames () const |
std::string | get_rmf_file_name () const |
rmf::SaveOptimizerState * | get_rmf_sos_writer () |
atom::Hierarchy | get_root () const |
atom::Hierarchy | get_root_of_type (core::ParticleType type) const |
Scoring * | get_scoring () |
Scoring const * | get_scoring () const |
algebra::Vector3Ds | get_site_centers (core::ParticleType t0) const |
double | get_site_display_radius (core::ParticleType) const |
algebra::Sphere3Ds | get_sites (core::ParticleType t0) const |
Particle * | get_slab_particle () const |
double | get_slab_thickness () const |
display::Geometry * | get_static_geometry () |
Statistics * | get_statistics () |
Statistics const * | get_statistics () const |
double | get_statistics_fraction () const |
double | get_temperature_k () const |
double | get_tunnel_radius () const |
returns te current tunnel radius More... | |
double | get_tunnel_radius_k () const |
virtual std::string | get_type_name () const |
virtual ::IMP::VersionInfo | get_version_info () const |
Get information about the module and version of the object. More... | |
void | initialize_positions_from_rmf (RMF::FileConstHandle fh, int frame_number=-1) |
void | link_rmf_file_handle (RMF::FileHandle fh, bool is_restraints=true) |
void | remove_fgs_with_prefix (std::string s_fg_type) |
remove all FGs of specified type. More... | |
void | remove_particle_type (core::ParticleType pt) |
void | reset_rmf () |
void | set_box_size (double box_size) |
void | set_rmf_file (const std::string &new_name, bool is_save_restraints_to_rmf=true, bool is_force_restart=false) |
void | set_sites (core::ParticleType t0, int n, double r, double sr) |
void | set_sites (core::ParticleType t0, const algebra::Sphere3Ds &sites) |
void | switch_suspend_rmf (bool suspend) |
void | write_geometry (std::string out) |
Public Member Functions inherited from IMP::Object | |
virtual void | clear_caches () |
CheckLevel | get_check_level () const |
LogLevel | get_log_level () const |
void | set_check_level (CheckLevel l) |
void | set_log_level (LogLevel l) |
Set the logging level used in this object. More... | |
void | set_was_used (bool tf) const |
void | show (std::ostream &out=std::cout) const |
const std::string & | get_name () const |
void | set_name (std::string name) |
Additional Inherited Members | |
Protected Member Functions inherited from IMP::Object | |
Object (std::string name) | |
Construct an object with the given name. More... | |
virtual void | do_destroy () |
IMP::npctransport::SimulationData::SimulationData | ( | std::string | prev_output_file, |
bool | quick, | ||
std::string | rmf_file_name = std::string() , |
||
std::string | new_output_file = "" |
||
) |
[in] | prev_output_file | name of protobuf file that encapsulates the assignment data for initializing the simulation params and the output statistics file. The output file is assumed to already exist at this point and contain the assignment. If it contains an rmf_conformation or conformation field, it will be used to initialize particle positions, in that priority. |
[in] | quick | if true, perform a very short simulation, typically for calibration or for initial testing |
[out] | rmf_file_name | RMF file to which simulation trajectory is recorded (if empty, no RMF file is created upon construction) |
[in] | new_output_file | new protobuf file for subsequent output and statistics If it is "", then prev_output_file is being rewritten (= default). |
void IMP::npctransport::SimulationData::activate_statistics | ( | ) |
by adding all appropriate optimizer states, if they weren't already
activates Brownian Dynamics statistics tracking
void IMP::npctransport::SimulationData::add_interaction | ( | const ::npctransport_proto::Assignment_InteractionAssignment & | idata | ) |
add the specified interaction to the scoring. In additions, adds statistics optimizer state about pairs of this type.
idata | the protobuf data about the interaction (particle types, interaction coefficients, etc.) |
double IMP::npctransport::SimulationData::get_angular_d_factor | ( | ) | const |
returns the simulation angular d factor
Definition at line 104 of file SimulationData.h.
bool IMP::npctransport::SimulationData::get_are_floaters_on_one_slab_side | ( | ) |
returns whether should exclude floaters from one slab side, if excluded at all
Definition at line 97 of file SimulationData.h.
atom::BrownianDynamics* IMP::npctransport::SimulationData::get_bd | ( | bool | recreate = false | ) |
gets the Brownian Dynamics object that is capable of simulating this data. Statistics are not yet active for the simulation.
recreate | if true, forces recreation of the bd object |
ParticlesTemp IMP::npctransport::SimulationData::get_beads | ( | ) |
returns all diffusing fine-level beads in this simulation data object (or an empty list if none exists)
Definition at line 366 of file SimulationData.h.
Particles& IMP::npctransport::SimulationData::get_beads_byref | ( | ) |
returns all diffusing fine-level beads in this simulation data object (or an empty list if none exists)
Definition at line 359 of file SimulationData.h.
ParticleTypeSet const& IMP::npctransport::SimulationData::get_fg_bead_types | ( | ) | const |
return all the types of fg beads that were added via create_fgs() including the suffix appended to their chain type name
Definition at line 311 of file SimulationData.h.
atom::Hierarchies IMP::npctransport::SimulationData::get_fg_chain_roots | ( | ) | const |
retrieve fg chain hierarchies
ParticleTypeSet const& IMP::npctransport::SimulationData::get_fg_chain_types | ( | ) | const |
return all the types of fg chains that were added via create_fgs(), i.e. the types of chain roots
Definition at line 317 of file SimulationData.h.
atom::Hierarchies IMP::npctransport::SimulationData::get_fg_chains | ( | ) | const |
Definition at line 344 of file SimulationData.h.
ParticleTypeSet const& IMP::npctransport::SimulationData::get_floater_types | ( | ) | const |
return all the types of floaters that were added via create_floaters()
Definition at line 324 of file SimulationData.h.
double IMP::npctransport::SimulationData::get_initial_simulation_time_ns | ( | ) | const |
get time from which simulation begins
Definition at line 394 of file SimulationData.h.
bool IMP::npctransport::SimulationData::get_is_exclude_floaters_from_slab_initially | ( | ) |
returns whether should exclude floaters from slab during initialization
Definition at line 91 of file SimulationData.h.
bool IMP::npctransport::SimulationData::get_is_fg_bead | ( | ParticleIndex | pi | ) | const |
returns true if bead has an fg type that is, particle was added within create_fgs()
bool IMP::npctransport::SimulationData::get_is_fg_bead | ( | core::ParticleType | pt | ) | const |
returns true if particle type is of fg type (that is, it is one of the types added via create_fgs())
Definition at line 288 of file SimulationData.h.
bool IMP::npctransport::SimulationData::get_is_fg_chain | ( | ParticleIndex | pi | ) | const |
returns true if particle has an fg chain type that is, particle has the same type as the root of an fg chain that was added via create_fgs()
bool IMP::npctransport::SimulationData::get_is_fg_chain | ( | core::ParticleType | pt | ) | const |
returns true if particle type is an fg chain type (that is, it is one of the types of a chain added via create_fgs())
Definition at line 303 of file SimulationData.h.
bool IMP::npctransport::SimulationData::get_is_pore_radius_dynamic | ( | ) | const |
returns true if pore radius can change dynamically
Definition at line 640 of file SimulationData.h.
bool IMP::npctransport::SimulationData::get_is_slab_with_cylindrical_pore | ( | ) | const |
returns true if a slab is defined and has a cylindrical pore
Definition at line 508 of file SimulationData.h.
bool IMP::npctransport::SimulationData::get_is_slab_with_toroidal_pore | ( | ) | const |
returns true if a slab is defined and has a toroidal pore
Definition at line 512 of file SimulationData.h.
double IMP::npctransport::SimulationData::get_maximum_number_of_minutes | ( | ) | const |
Return the maximum number of minutes the simulation can run.
Or 0 for no limit.
Definition at line 459 of file SimulationData.h.
ParticlesTemp IMP::npctransport::SimulationData::get_non_optimizable_beads | ( | ) |
returns all fine-level beads that currently exist in this simulation data object get_sd(), which are also non-optimizable (or an empty list if no such bead exists)
ParticlesTemp IMP::npctransport::SimulationData::get_obstacle_particles | ( | ) | const |
return all the obstacle particles
ParticleTypeSet const& IMP::npctransport::SimulationData::get_obstacle_types | ( | ) | const |
return all the types of obstacles that were added via create_obstacles()
Definition at line 330 of file SimulationData.h.
ParticlesTemp IMP::npctransport::SimulationData::get_optimizable_beads | ( | ) |
returns all fine-level beads that currently exist in this simulation data object get_sd(), which are also optimizable (or an empty list if no such bead exists)
double IMP::npctransport::SimulationData::get_pore_radius | ( | ) | const |
alias to get_tunnel_radius
Definition at line 624 of file SimulationData.h.
double IMP::npctransport::SimulationData::get_pore_radius_k | ( | ) | const |
alias to get_tunnel_radius_k
Definition at line 635 of file SimulationData.h.
double IMP::npctransport::SimulationData::get_range | ( | ) | const |
returns the maximal interaction range between particles
Definition at line 85 of file SimulationData.h.
rmf::SaveOptimizerState* IMP::npctransport::SimulationData::get_rmf_sos_writer | ( | ) |
Returns the internal periodic SaveOptimizerState writer that periodically outputs the particles hierarchy and restraints, using the file name returned by SimulationData::get_rmf_file_name(), which is assumed to be non empty. If the writer does not exist, then it is constructed first.
RMF::IOException | couldn't create RMF file |
atom::Hierarchy IMP::npctransport::SimulationData::get_root_of_type | ( | core::ParticleType | type | ) | const |
Returns the root of all chains of type 'type'
Scoring* IMP::npctransport::SimulationData::get_scoring | ( | ) |
returns a scoring object that is updated with the current particles hierarch and associated with this sd
Scoring const* IMP::npctransport::SimulationData::get_scoring | ( | ) | const |
returns a scoring object that is updated with the current particles hierarchy and associated with this sd
algebra::Vector3Ds IMP::npctransport::SimulationData::get_site_centers | ( | core::ParticleType | t0 | ) | const |
returns a list of 3D coordinates for the interaction sites associated with particles of type t0. The site coordinates are in the particles local reference frame
Definition at line 416 of file SimulationData.h.
double IMP::npctransport::SimulationData::get_site_display_radius | ( | core::ParticleType | ) | const |
Returns the effective interaction range radius of a site on a floater
Definition at line 455 of file SimulationData.h.
algebra::Sphere3Ds IMP::npctransport::SimulationData::get_sites | ( | core::ParticleType | t0 | ) | const |
returns a list of Spheres3D for the interaction sites associated with particles of type t0. The site coordinates are in the particles local reference frame.
Definition at line 434 of file SimulationData.h.
Particle* IMP::npctransport::SimulationData::get_slab_particle | ( | ) | const |
returns the slab particle, initializing it based on current parameters if needed
Definition at line 518 of file SimulationData.h.
Statistics* IMP::npctransport::SimulationData::get_statistics | ( | ) |
returns a Statistics object that is updated by this simulation data
Statistics const* IMP::npctransport::SimulationData::get_statistics | ( | ) | const |
returns a Statistics object that is updated by this simulation data
double IMP::npctransport::SimulationData::get_statistics_fraction | ( | ) | const |
returns the requested fraction of time for taking statistics
Definition at line 277 of file SimulationData.h.
double IMP::npctransport::SimulationData::get_tunnel_radius | ( | ) | const |
returns te current tunnel radius
double IMP::npctransport::SimulationData::get_tunnel_radius_k | ( | ) | const |
returns the force coefficient for keeping the tunnel radius in equilibrium (radius is dynamic only if this coefficient is positive)
Definition at line 630 of file SimulationData.h.
|
virtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
Definition at line 675 of file SimulationData.h.
void IMP::npctransport::SimulationData::initialize_positions_from_rmf | ( | RMF::FileConstHandle | fh, |
int | frame_number = -1 |
||
) |
Open the specified RMF file, links it to the hierarchies of this object, and copy the XYZ coordinates from its last frame into the particles of this object.
The frame number is the frame in the file to use, if, eg, there are several initial frames to use. If it is -1, the last frame is used.
RMF::IOException | if couldn't open RMF file, or unsupported file format |
void IMP::npctransport::SimulationData::link_rmf_file_handle | ( | RMF::FileHandle | fh, |
bool | is_restraints = true |
||
) |
Links a handle to an open rmf file with the hierarchy and constraints of this simulation data, so that writing frames into this handle will write the updated state of the simulation
fh | the handle to be linked |
is_restraints | if true, save restraints to RMF |
RMF::IOException | IO error with RMF file handle |
void IMP::npctransport::SimulationData::remove_fgs_with_prefix | ( | std::string | s_fg_type | ) |
remove all FGs of specified type.
Remove any FG chain if the prefix of its string representation matches s_fg_type (= begins with s_fg_type, followed by an empty string or a non-digit character) from the simulation, including model particles, statistics and associated interaction, as well as related assignemnt and statistics data from the output protobuf file
s_fg_type | The FG type prefix (chain name, to which a suffix could be added for children beads) |
void IMP::npctransport::SimulationData::remove_particle_type | ( | core::ParticleType | pt | ) |
remove particle of type pt from simulation, including all model particles, statistics and interactions associated with it
void IMP::npctransport::SimulationData::reset_rmf | ( | ) |
Resets the RMF file to which the internal periodic SaveOptimizerState writer dumps the output. If it does not exist, create it.
RMF::IOException | couldn't create RMF file or other IO related problems with RMF |
void IMP::npctransport::SimulationData::set_rmf_file | ( | const std::string & | new_name, |
bool | is_save_restraints_to_rmf = true , |
||
bool | is_force_restart = false |
||
) |
resets the name of the RMF file that records the simulation. If an old one exists from a previous call with a different name and different restraints settings, then the previous RMF writer is invalidated by this action (closed and flushed). If the Brownian Dynamics object has already been initialized, a new writer with the new name is added as an optimizer state to it instead of the existing one. TODO: make sure the old writer is indeed closed and flushed
new_name | the new name of the rmf file |
is_save_restraints_to_rmf | whether to save restraints to this rmf file |
is_force_reset | if true, force reset even if new_name and is_save_restraints_to_rmf are equal to their old values. |
void IMP::npctransport::SimulationData::set_sites | ( | core::ParticleType | t0, |
int | n, | ||
double | r, | ||
double | sr | ||
) |
Create n interaction sites spread around the surface of a ball of radius r, and associate these sites with all particles of type t0
If n==-1, creates a single site, centered at the bead, and r is ignored
t0 | type of particle to associate with sites |
n | number of sites |
r | radius at which to position sites relative to t0 origin |
sr | radius from site center within which site has maximal interaction energy |
void IMP::npctransport::SimulationData::set_sites | ( | core::ParticleType | t0, |
const algebra::Sphere3Ds & | sites | ||
) |
Set the sites explicitly.
Definition at line 443 of file SimulationData.h.
void IMP::npctransport::SimulationData::write_geometry | ( | std::string | out | ) |
Write the geometry to the file path 'out'