IMP logo
IMP Reference Guide  2.13.0
The Integrative Modeling Platform
BrownianDynamicsTAMDWithSlabSupport.h
1 /**
2  * \file IMP/atom/BrownianDynamicsTAMDWithSlabSupport.h
3  * \brief Simple molecular dynamics optimizer.
4  *
5  * Copyright 2007-2020 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPNPCTRANPORT_BROWNIAN_DYNAMICS_TAMD_WITH_SLAB_SUPPORT_H
10 #define IMPNPCTRANPORT_BROWNIAN_DYNAMICS_TAMD_WITH_SLAB_SUPPORT_H
11 
12 #include "npctransport_config.h"
14 
15 IMPNPCTRANSPORT_BEGIN_NAMESPACE
16 
17 // for swig
18 class SimulationParameters;
19 
20 //! Simple Brownian dynamics simulator.
21 /** This is an implementation of a Brownian Dynamics simulator.
22 
23  _Input particles and score_
24 
25  Each optimized particle must have x,y,z attributes
26  that are optimizable. In addition, each optimized particle must be
27  decorated with the Diffusion decorator. Optionally, the
28  RigidBodyDiffusion decorator can be used to specify a rotational
29  diffusion coefficient for core::RigidBody particles. The
30  optimizer assumes the scoring function to be energy in kcal/mol, and the xyz
31  coordinates to be in angstroms and the diffusion coefficient of
32  each particle be in \f$A^2/fs\f$ (or \f$Radian^2/fs\f$ for rotational
33  diffusion coefficient). Particles without optimized x,y,z
34  and nonoptimized D are skipped.
35 
36  The optimizer can either automatically determine which particles
37  to use from the model or be passed a SingletonContainer for the
38  particles. If such a container is passed, particles added to it
39  during optimization state updates are handled properly.
40 
41  _Simulation_
42 
43  At each simulation time step, each particle is translated in the
44  direction of the sum of a random diffusion vector and the gradient
45  of the scoring function (force field) at the particle
46  coordinates. The translation is proportional to the particle
47  diffusion coefficient, the time step size, and the inverse of kT.
48  Note that particles masses are not considered, only their
49  diffusion coefficients.
50 
51  Similarly, rigid bodies are rotated by the sum of a random torque and a
52  force field torque, proportionally to the rotational diffusion
53  coefficient, the time step size, and inversely proportional kT.
54 
55  If the skt (stochastic runge kutta) flag is true, the simulation is
56  altered slightly to apply the SKT scheme.
57 
58  \see Diffusion
59  \see RigidBodyDiffusion
60  */
61 class IMPNPCTRANSPORTEXPORT BrownianDynamicsTAMDWithSlabSupport
63  public:
64  //! Create the optimizer
65  /** If sc is not null, that container will be used to find particles
66  to move, otherwise the model will be searched.
67  @param m model associated with bd
68  @param name name of bd object
69  @param wave_factor for wave step function, see Simulator object,
70  if >1.001 or so, creates a wave of time steps
71  that are larger by up to wave_factor from
72  formal maximal time step
73 
74  @note wave_factor is an advanced feature - if you're not sure, just use
75  its default, see also Simulator::simulate_wave()
76  */
78  std::string name = "BrownianDynamicsTAMDWithSlabSupport%1%",
79  double wave_factor = 1.0):
80  BrownianDynamicsTAMD(m, name, wave_factor)
81  {}
82 
83  protected:
84  /** advances a chunk of ps from index begin to end
85 
86  @param dtfs time step in femtoseconds
87  @param ikt inverse kT for current chunk step
88  @param ps particle indexes to advance
89  @param begin beginning index of chunk of ps
90  @param end end index of chunk of ps
91  */
92  void do_advance_chunk(double dtfs, double ikt,
93  const ParticleIndexes &ps,
94  unsigned int begin, unsigned int end);
95 };
96 
97 IMPNPCTRANSPORT_END_NAMESPACE
98 
99 #endif /* IMPNPCTRANSPORT_BROWNIAN_DYNAMICS_TAMD_WITH_SLAB_SUPPORT_H */
BrownianDynamicsTAMDWithSlabSupport(Model *m, std::string name="BrownianDynamicsTAMDWithSlabSupport%1%", double wave_factor=1.0)
Create the optimizer.
Simple Brownian dynamics simulator.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Simple molecular dynamics optimizer.
void do_advance_chunk(double dtfs, double ikt, const ParticleIndexes &ps, unsigned int begin, unsigned int end)