IMP logo
IMP Reference Guide  2.12.0
The Integrative Modeling Platform
brownian_statistics.py
1 ## \example atom/brownian_statistics.py
2 # This example prints out various statistics about a prospective Brownian
3 # dynamics simulation. You can use the statistics to determine if the time
4 # step is likely to be sufficiently short given the forces and particle
5 # sizes involved.
6 
7 from __future__ import print_function
8 import IMP.atom
9 import sys
10 
11 IMP.setup_from_argv(sys.argv, "brownian statistics")
12 
13 # fs
14 time_step = 1000
15 # angstrom
16 minimum_particle_radius = 10
17 # kCal/mol/A
18 maximum_spring_constant = 1
19 
20 maximum_diffusion_coefficient =\
21  IMP.atom.get_einstein_diffusion_coefficient(minimum_particle_radius)
22 expected_delta = IMP.atom.get_diffusion_length(maximum_diffusion_coefficient,
23  time_step)
24 
25 expected_rotational_delta =\
26  IMP.atom.get_diffusion_angle(maximum_diffusion_coefficient,
27  time_step) * minimum_particle_radius
28 
29 expected_spring_diffusion_length =\
30  IMP.atom.get_diffusion_length(maximum_diffusion_coefficient,
31  .5 * maximum_spring_constant *
32  4 * expected_delta ** 2, time_step)
33 
34 print("with a time step of", time_step, "fs")
35 print("an object of radius", minimum_particle_radius, "A will move",\
36  expected_delta, "A and a point on its surface will move",\
37  expected_rotational_delta, "A more")
38 print("the motion from fluctuations in the spring compression will be",\
39  expected_spring_diffusion_length, "A")
40 print("and a compression of 10% of the radius will induce a motion of",\
41  IMP.atom.get_diffusion_length(maximum_diffusion_coefficient,
42  .5 * maximum_spring_constant *
43  (.1 * minimum_particle_radius) ** 2,
44  time_step), "A")
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
double get_diffusion_length(double D, double force, double t, double temp=-1)
double get_diffusion_angle(double D, double dtfs)
Functionality for loading, creating, manipulating and scoring atomic structures.
double get_einstein_diffusion_coefficient(double r, double temp=-1)