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