IMP  2.0.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 dynamics simulation. You can use the statistics to determine if the time step is likely to be sufficiently short given the forces and particle sizes involved.
3 
4 from IMP.atom import *
5 
6 # fs
7 time_step=1000
8 # angstrom
9 minimum_particle_radius=10
10 # kCal/mol/A
11 maximum_spring_constant=1
12 
13 maximum_diffusion_coefficient=\
14  get_einstein_diffusion_coefficient(minimum_particle_radius)
15 expected_delta= get_diffusion_length(maximum_diffusion_coefficient,
16  time_step)
17 
18 expected_rotational_delta=\
19  get_diffusion_angle(maximum_diffusion_coefficient,
20  time_step) * minimum_particle_radius
21 
22 expected_spring_diffusion_length=\
23  get_diffusion_length(maximum_diffusion_coefficient,
24  .5*maximum_spring_constant*4*expected_delta**2,
25  time_step)
26 
27 print "with a time step of", time_step, "fs"
28 print "an object of radius", minimum_particle_radius, "A will move",\
29  expected_delta, "A and a point on its surface will move",\
30  expected_rotational_delta,"A more"
31 print "the motion from fluctuations in the spring compression will be",\
32  expected_spring_diffusion_length, "A"
33 print "and a compression of 10% of the radius will induce a motion of",\
34  get_diffusion_length(maximum_diffusion_coefficient,
35  .5*maximum_spring_constant*\
36  (.1*minimum_particle_radius)**2,
37  time_step), "A"