Reorganize files for reference manual
[alexxy/gromacs.git] / docs / reference-manual / special / electric-fields.rst
1 Electric fields
2 ---------------
3
4 A pulsed and oscillating electric field can be applied according to:
5
6 .. math:: E(t) = E_0 \exp\left[-\frac{(t-t_0)^2}{2\sigma^2}\right]\cos\left[\omega (t-t_0)\right]
7           :label: eq-efield
8
9 where :math:`E_0` is the field strength, the angular frequency
10 :math:`\omega = 2\pi c/\lambda`, :math:`t_0` is the time
11 at of the peak in the field strength and :math:`\sigma` is the with of
12 the pulse. Special cases occur when :math:`\sigma` = 0 (non-pulsed
13 field) and for :math:`\omega` is 0 (static field).
14
15 This simulated laser-pulse was applied to simulations of melting
16 ice \ :ref:`146 <refCaleman2008a>`. A pulsed electric field may look ike
17 :numref:`Fig. %s <fig-field>`. In the supporting information of that paper the impact
18 of an applied electric field on a system under periodic boundary
19 conditions is analyzed. It is described that the effective electric
20 field under PBC is larger than the applied field, by a factor depending
21 on the size of the box and the dielectric properties of molecules in the
22 box. For a system with static dielectric properties this factor can be
23 corrected for. But for a system where the dielectric varies over time,
24 for example a membrane protein with a pore that opens and closes during
25 the simulation, this way of applying an electric field is not useful.
26 In such cases one can use the computational electrophysiology protocol
27 described in the next section (sec. :ref:`compel`).
28
29 .. _fig-field:
30
31 .. figure:: plots/field.*
32    :width: 8.00000cm
33
34    A simulated laser pulse in |Gromacs|.
35
36 Electric fields are applied when the following options are specified in
37 the :ref:`grompp <gmx grompp>` :ref:`mdp` file. You specify, in order, :math:`E_0`,
38 :math:`\omega`, :math:`t_0` and :math:`\sigma`:
39
40 ::
41
42     electric-field-x = 0.04 0       0     0
43
44 yields a static field with :math:`E_0` = 0.04 V/nm in the X-direction.
45 In contrast,
46
47 ::
48
49     electric-field-x = 2.0  150     5     0
50
51 yields an oscillating electric field with :math:`E_0` = 2 V/nm,
52 :math:`\omega` = 150/ps and :math:`t_0` = 5 ps. Finally
53
54 ::
55
56     electric-field-x = 2.0  150     5     1
57
58 yields an pulsed-oscillating electric field with :math:`E_0` = 2 V/nm,
59 :math:`\omega` = 150/ps and :math:`t_0` = 5 ps and :math:`\sigma` = 1
60 ps. Read more in ref. \ :ref:`146 <refCaleman2008a>`. Note that the input file
61 format is changed from the undocumented older version. A figure like
62 :numref:`Fig. %s <fig-field>` may be produced by passing the
63 ``-field`` option to :ref:`gmx mdrun`.