IMP  2.1.1
The Integrative Modeling Platform
atom/brownian_statistics.py

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.

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 IMP.atom import *
8 
9 # fs
10 time_step = 1000
11 # angstrom
12 minimum_particle_radius = 10
13 # kCal/mol/A
14 maximum_spring_constant = 1
15 
16 maximum_diffusion_coefficient =\
17  get_einstein_diffusion_coefficient(minimum_particle_radius)
18 expected_delta = get_diffusion_length(maximum_diffusion_coefficient,
19  time_step)
20 
21 expected_rotational_delta =\
22  get_diffusion_angle(maximum_diffusion_coefficient,
23  time_step) * minimum_particle_radius
24 
25 expected_spring_diffusion_length =\
26  get_diffusion_length(maximum_diffusion_coefficient,
27  .5 * maximum_spring_constant *
28  4 * expected_delta ** 2,
29  time_step)
30 
31 print "with a time step of", time_step, "fs"
32 print "an object of radius", minimum_particle_radius, "A will move",\
33  expected_delta, "A and a point on its surface will move",\
34  expected_rotational_delta, "A more"
35 print "the motion from fluctuations in the spring compression will be",\
36  expected_spring_diffusion_length, "A"
37 print "and a compression of 10% of the radius will induce a motion of",\
38  get_diffusion_length(maximum_diffusion_coefficient,
39  .5 * maximum_spring_constant *
40  (.1 * minimum_particle_radius) ** 2,
41  time_step), "A"