IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
automatic_parameters.h
Go to the documentation of this file.
1 /**
2  * \file automatic_parameters.h
3  * \brief description
4  *
5  * Copyright 2007-2018 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPNPCTRANSPORT_AUTOMATIC_PARAMETERS_H
9 #define IMPNPCTRANSPORT_AUTOMATIC_PARAMETERS_H
10 
11 #include "npctransport_config.h"
12 #ifndef SWIG
13 namespace npctransport_proto {
14 class Assignment;
15 }
16 #endif
17 
18 IMPNPCTRANSPORT_BEGIN_NAMESPACE
19 IMPNPCTRANSPORTEXPORT
20 double get_close_pairs_range(double max_range, double max_range_factor);
21 
22 /** returns an upper bound on the contact range (maximal sphere-sphere distance
23  that enables a contact) between any two particles in the
24  system */
25 IMPNPCTRANSPORTEXPORT
26 double get_close_pairs_range(const ::npctransport_proto::Assignment& config);
27 
28 /** Computes the time step size that is required for a stable
29  simulation.
30  Formally, first computes the time step size that restricts the
31  estimated translation size of any particle, at any given simulation step
32  to [max_trans_relative_to_radius * min_radius], given the simulation
33  parameters max_d_factor and max_k. This base time step is then multiplied by
34  time_step_factor.
35 
36  @param max_d_factor the maximal diffusion factor of any particle
37  in the system, which factors the Einstein diffusion
38  coefficient)
39  @param max_k the maximal force applied on any particle
40  in the simulation
41  @param min_radius the minimal radius of any interaction in the system
42  @param min_range the minimal range of any interaction
43  @param max_trans_relative_to_radius the maximal estimated translation
44  allowed for any particle as fraction of
45  min_radius (before factoring by
46  time_step_factor)
47  @param time_step_factor multiply final time step in this factor
48 
49  @return time step size in femtoseconds required for stable simulation
50 */
51 IMPNPCTRANSPORTEXPORT // TODO: is max_k also correct for springs?
52  double
53 get_time_step(double max_d_factor, double max_k, double min_radius, double min_range,
54  double max_trans_relative_to_radius = 0.1,
55  double time_step_factor = 1.0);
56 
57 /** computes the time step size that is required for a stable simulation,
58  where the translation of any particle at any simulation time step is
59  restricted, based on the simulation parameters in config.
60 
61  @param config the simulation parameters used to compute the time step size
62  @param max_trans_relative_to_radius the maximal estimated translation
63  allowed for any particle as fraction of
64  its radius (before factoring by
65  time step factor, specified in config)
66 
67  @return time step size in femtoseconds required for stable simulation
68 */
69 IMPNPCTRANSPORTEXPORT
70 double get_time_step(const ::npctransport_proto::Assignment& config,
71  double max_trans_relative_to_radius = 0.1);
72 
73 /**
74  computes the number of frames that approximate a certain number of nanoseconds
75  using the specified time_step per step in fs
76 
77  @param ns time in ns
78  @param time_step step in fs per frame
79 */
80 IMPNPCTRANSPORTEXPORT
81 int get_frames_from_ns(double ns, double time_step);
82 
83 /**
84  computes the number of frames needed to achieve simulation time
85  required in the configuration time, with time step computed from
86  config.
87 
88  @param config the simulation parameters
89  @param time_step the time step in femtoseconds
90 
91  @throw ValueException if maximum number of frames specified in
92  config is exceeded */
93 IMPNPCTRANSPORTEXPORT
94 int get_number_of_frames(const ::npctransport_proto::Assignment& config,
95  double time_step);
96 
97 /**
98  computes the number of frames for the specified dump_interval,
99  which is normalized by the time step if the interval is specified in ns
100 
101  @param config the simulation parameters
102  @param time_step the time step in femtoseconds
103 */
104 IMPNPCTRANSPORTEXPORT
105 int get_dump_interval_in_frames(const ::npctransport_proto::Assignment& config,
106  double time_step);
107 
108 /**
109  computes the number of frames for the specified statistics_interval,
110  normalized by the time step if the interval is specified in ns
111 
112  @param assign the simulation assignment parameters
113  @param time_step the time step in femtoseconds
114  @param default_value_ns interval in ns to use if none specified in
115  assignment parameters
116 */
117 IMPNPCTRANSPORTEXPORT
119 ( const ::npctransport_proto::Assignment& assign,
120  double time_step,
121  double default_value_ns = 0.1);
122 
123 /**
124  computes the maximal interval for outputting statistics to output file
125  (and to dump order params) in frames, for the output_statistics_interval_ns
126  param in assignment, based on specified time_step
127 
128  @param assign the simulation assignment parameters
129  @param time_step the time step in femtoseconds
130  @param default_value_ns interval in ns to use if none specified in
131  assignment parameters
132 */
133 IMPNPCTRANSPORTEXPORT
135 ( const ::npctransport_proto::Assignment& assign,
136  double time_step,
137  double default_value_ns = 1.0);
138 
139 IMPNPCTRANSPORT_END_NAMESPACE
140 
141 #endif /* IMPNPCTRANSPORT_AUTOMATIC_PARAMETERS_H */
double get_time_step(const ::npctransport_proto::Assignment &config, double max_trans_relative_to_radius=0.1)
int get_output_statistics_interval_in_frames(const ::npctransport_proto::Assignment &assign, double time_step, double default_value_ns=1.0)
int get_statistics_interval_in_frames(const ::npctransport_proto::Assignment &assign, double time_step, double default_value_ns=0.1)
int get_number_of_frames(const ::npctransport_proto::Assignment &config, double time_step)
int get_frames_from_ns(double ns, double time_step)
int get_dump_interval_in_frames(const ::npctransport_proto::Assignment &config, double time_step)
double get_close_pairs_range(const ::npctransport_proto::Assignment &config)