This repository has been archived by the owner on Aug 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
special.tex
1990 lines (1810 loc) · 98 KB
/
special.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% This file is part of the GROMACS molecular simulation package.
%
% Copyright (c) 2013, by the GROMACS development team, led by
% David van der Spoel, Berk Hess, Erik Lindahl, and including many
% others, as listed in the AUTHORS file in the top-level source
% directory and at http://www.gromacs.org.
%
% GROMACS is free software; you can redistribute it and/or
% modify it under the terms of the GNU Lesser General Public License
% as published by the Free Software Foundation; either version 2.1
% of the License, or (at your option) any later version.
%
% GROMACS is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
% Lesser General Public License for more details.
%
% You should have received a copy of the GNU Lesser General Public
% License along with GROMACS; if not, see
% http://www.gnu.org/licenses, or write to the Free Software Foundation,
% Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%
% If you want to redistribute modifications to GROMACS, please
% consider that scientific software is very special. Version
% control is crucial - bugs must be traceable. We will be happy to
% consider code for inclusion in the official distribution, but
% derived work must not be called official GROMACS. Details are found
% in the README & COPYING files - if they are missing, get the
% official version at http://www.gromacs.org.
%
% To help us fund GROMACS development, we humbly ask that you cite
% the research papers on the package. Check out http://www.gromacs.org
\chapter{Special Topics}
\label{ch:special}
\section{Free energy implementation}
\label{sec:dgimplement}
For free energy calculations, there are two things that must be
specified; the end states, and the pathway connecting the end states.
The end states can be specified in two ways. The most straightforward
is through the specification of end states in the topology file. Most
potential forms support both an $A$ state and a $B$ state. Whenever both
states are specified, then the $A$ state corresponds to the initial free
energy state, and the $B$ state corresponds to the final state.
In some cases, the end state can also be defined in some cases without
altering the topology, solely through the {\tt .mdp} file, through the use
of the {\tt couple-moltype},{\tt couple-lambda0}, {\tt couple-lambda1}, and
{\tt couple-intramol} mdp keywords. Any molecule type selected in
{\tt couple-moltype} will automatically have a $B$ state implicitly
constructed (and the $A$ state redefined) according to the {\tt couple-lambda}
keywords. {\tt couple-lambda0} and {\tt couple-lambda1} define the non-bonded
parameters that are present in the $A$ state ({\tt couple-lambda0})
and the $B$ state ({\tt couple-lambda1}). The choices are 'q','vdw', and
'vdw-q'; these indicate the Coulombic, van der Waals, or both parameters
that are turned on in the respective state.
Once the end states are defined, then the path between the end states
has to be defined. This path is defined solely in the .mdp file.
Starting in 4.6, $\lambda$ is a vector of components, with Coulombic,
van der Waals, bonded, restraint, and mass components all able to be
adjusted independently. This makes it possible to turn off the
Coulombic term linearly, and then the van der Waals using soft core,
all in the same simulation. This is especially useful for replica
exchange or expanded ensemble simulations, where it is important to
sample all the way from interacting to non-interacting states in the
same simulation to improve sampling.
{\tt fep-lambdas} is the default array of $\lambda$ values ranging
from 0 to 1. All of the other lambda arrays use the values in this
array if they are not specified. The previous behavior, where the
pathway is controlled by a single $\lambda$ variable, can be preserved
by using only {\tt fep-lambdas} to define the pathway.
For example, if you wanted to first to change the Coulombic terms,
then the van der Waals terms, changing bonded at the same time rate as
the van der Wheals, but changing the restraints throughout the first
two-thirds of the simulation, then you could use this $\lambda$ vector:
\begin{verbatim}
coul-lambdas = 0.0 0.2 0.5 1.0 1.0 1.0 1.0 1.0 1.0 1.0
vdw-lambdas = 0.0 0.0 0.0 0.0 0.4 0.5 0.6 0.7 0.8 1.0
bonded-lambdas = 0.0 0.0 0.0 0.0 0.4 0.5 0.6 0.7 0.8 1.0
restraint-lambdas = 0.0 0.0 0.1 0.2 0.3 0.5 0.7 1.0 1.0 1.0
\end{verbatim}
This is also equivalent to:
\begin{verbatim}
fep-lambdas = 0.0 0.0 0.0 0.0 0.4 0.5 0.6 0.7 0.8 1.0
coul-lambdas = 0.0 0.2 0.5 1.0 1.0 1.0 1.0 1.0 1.0 1.0
restraint-lambdas = 0.0 0.0 0.1 0.2 0.3 0.5 0.7 1.0 1.0 1.0
\end{verbatim}
The {\tt fep-lambda array}, in this case, is being used as the default to
fill in the bonded and van der Waals $\lambda$ arrays. Usually, it's best to fill
in all arrays explicitly, just to make sure things are properly
assigned.
If you want to turn on only restraints going from $A$ to $B$, then it would be:
\begin{verbatim}
restraint-lambdas = 0.0 0.1 0.2 0.4 0.6 1.0
\end{verbatim}
and all of the other components of the $\lambda$ vector would be left in the $A$ state.
To compute free energies with a vector $\lambda$ using
thermodynamic integration, then the TI equation becomes vector equation:
\beq
\Delta F = \int \langle \nabla H \rangle \cdot d\vec{\lambda}
\eeq
or for finite differences:
\beq
\Delta F \approx \int \sum \langle \nabla H \rangle \cdot \Delta\lambda
\eeq
The external {\tt pymbar} script downloaded from https://SimTK.org/home/pymbar can
compute this integral automatically from the {\gromacs} dhdl.xvg output.
\section{Potential of mean force}
A potential of mean force (PMF) is a potential that is obtained
by integrating the mean force from an ensemble of configurations.
In {\gromacs}, there are several different methods to calculate the mean force.
Each method has its limitations, which are listed below.
\begin{itemize}
\item{\bf pull code:} between the centers of mass of molecules or groups of molecules.
\item{\bf free-energy code with harmonic bonds or constraints:} between single atoms.
\item{\bf free-energy code with position restraints:} changing the conformation of a relatively immobile group of atoms.
\item{\bf pull code in limited cases:} between groups of atoms that are
part of a larger molecule for which the bonds are constrained with
SHAKE or LINCS. If the pull group if relatively large,
the pull code can be used.
\end{itemize}
The pull and free-energy code a described in more detail
in the following two sections.
\subsubsection{Entropic effects}
When a distance between two atoms or the centers of mass of two groups
is constrained or restrained, there will be a purely entropic contribution
to the PMF due to the rotation of the two groups~\cite{RMNeumann1980a}.
For a system of two non-interacting masses the potential of mean force is:
\beq
V_{pmf}(r) = -(n_c - 1) k_B T \log(r)
\eeq
where $n_c$ is the number of dimensions in which the constraint works
(i.e. $n_c=3$ for a normal constraint and $n_c=1$ when only
the $z$-direction is constrained).
Whether one needs to correct for this contribution depends on what
the PMF should represent. When one wants to pull a substrate
into a protein, this entropic term indeed contributes to the work to
get the substrate into the protein. But when calculating a PMF
between two solutes in a solvent, for the purpose of simulating
without solvent, the entropic contribution should be removed.
{\bf Note} that this term can be significant; when at 300K the distance is halved,
the contribution is 3.5 kJ~mol$^{-1}$.
\section{Non-equilibrium pulling}
When the distance between two groups is changed continuously,
work is applied to the system, which means that the system is no longer
in equilibrium. Although in the limit of very slow pulling
the system is again in equilibrium, for many systems this limit
is not reachable within reasonable computational time.
However, one can use the Jarzynski relation~\cite{Jarzynski1997a}
to obtain the equilibrium free-energy difference $\Delta G$
between two distances from many non-equilibrium simulations:
\begin{equation}
\Delta G_{AB} = -k_BT \log \left\langle e^{-\beta W_{AB}} \right\rangle_A
\label{eq:Jarz}
\end{equation}
where $W_{AB}$ is the work performed to force the system along one path
from state A to B, the angular bracket denotes averaging over
a canonical ensemble of the initial state A and $\beta=1/k_B T$.
\section{The pull code}
\index{center-of-mass pulling}
\label{sec:pull}
The pull code applies forces or constraints between the centers
of mass of one or more pairs of groups of atoms.
There is one reference group and one or more other pull groups.
Instead of a reference group, one can also use absolute reference
point in space.
The most common situation consists of a reference group
and one pull group. In this case, the two groups are treated
equivalently.
The distance between a pair of groups can be determined
in 1, 2 or 3 dimensions, or can be along a user-defined vector.
The reference distance can be constant or can change linearly with time.
Normally all atoms are weighted by their mass, but an additional
weighting factor can also be used.
\begin{figure}
\centerline{\includegraphics[width=6cm,angle=270]{plots/pull}}
\caption{Schematic picture of pulling a lipid out of a lipid bilayer
with umbrella pulling. $V_{rup}$ is the velocity at which the spring is
retracted, $Z_{link}$ is the atom to which the spring is attached and
$Z_{spring}$ is the location of the spring.}
\label{fi:pull}
\end{figure}
Three different types of calculation are supported,
and in all cases the reference distance can be constant
or linearly changing with time.
\begin{enumerate}
\item{\textbf{Umbrella pulling}\swapindexquiet{umbrella}{pulling}}
A harmonic potential is applied between
the centers of mass of two groups.
Thus, the force is proportional to the displacement.
\item{\textbf{Constraint pulling\swapindexquiet{constraint}{pulling}}}
The distance between the centers of mass of two groups is constrained.
The constraint force can be written to a file.
This method uses the SHAKE algorithm but only needs 1 iteration to be
exact if only two groups are constrained.
\item{\textbf{Constant force pulling}}
A constant force is applied between the centers of mass of two groups.
Thus, the potential is linear.
In this case there is no reference distance of pull rate.
\end{enumerate}
\subsubsection{Definition of the center of mass}
In {\gromacs}, there are three ways to define the center of mass of a group.
The standard way is a ``plain'' center of mass, possibly with additional
weighting factors. With periodic boundary conditions it is no longer
possible to uniquely define the center of mass of a group of atoms.
Therefore, a reference atom is used. For determining the center of mass,
for all other atoms in the group, the closest periodic image to the reference
atom is used. This uniquely defines the center of mass.
By default, the middle (determined by the order in the topology) atom
is used as a reference atom, but the user can also select any other atom
if it would be closer to center of the group.
For a layered system, for instance a lipid bilayer, it may be of interest
to calculate the PMF of a lipid as function of its distance
from the whole bilayer. The whole bilayer can be taken as reference
group in that case, but it might also be of interest to define the
reaction coordinate for the PMF more locally. The {\tt .mdp} option
{\tt pull_geometry = cylinder} does not
use all the atoms of the reference group, but instead dynamically only those
within a cylinder with radius {\tt r_1} around the pull vector going
through the pull group. This only
works for distances defined in one dimension, and the cylinder is
oriented with its long axis along this one dimension. A second cylinder
can be defined with {\tt r_0}, with a linear switch function that weighs
the contribution of atoms between {\tt r_0} and {\tt r_1} with
distance. This smooths the effects of atoms moving in and out of the
cylinder (which causes jumps in the pull forces).
\begin{figure}
\centerline{\includegraphics[width=6cm]{plots/pullref}}
\caption{Comparison of a plain center of mass reference group versus a cylinder
reference group applied to interface systems. C is the reference group.
The circles represent the center of mass of two groups plus the reference group,
$d_c$ is the reference distance.}
\label{fi:pullref}
\end{figure}
For a group of molecules in a periodic system, a plain reference group
might not be well-defined. An example is a water slab that is connected
periodically in $x$ and $y$, but has two liquid-vapor interfaces along $z$.
In such a setup, water molecules can evaporate from the liquid and they
will move through the vapor, through the periodic boundary, to the other
interface. Such a system is inherently periodic and there is no proper way
of defining a ``plain'' center of mass along $z$. A proper solution is to using
a cosine shaped weighting profile for all atoms in the reference group.
The profile is a cosine with a single period in the unit cell. Its phase
is optimized to give the maximum sum of weights, including mass weighting.
This provides a unique and continuous reference position that is nearly
identical to the plain center of mass position in case all atoms are all
within a half of the unit-cell length. See ref \cite{Engin2010a} for details.
When relative weights $w_i$ are used during the calculations, either
by supplying weights in the input or due to cylinder geometry
or due to cosine weighting,
the weights need to be scaled to conserve momentum:
\beq
w'_i = w_i
\left. \sum_{j=1}^N w_j \, m_j \right/ \sum_{j=1}^N w_j^2 \, m_j
\eeq
where $m_j$ is the mass of atom $j$ of the group.
The mass of the group, required for calculating the constraint force, is:
\beq
M = \sum_{i=1}^N w'_i \, m_i
\eeq
The definition of the weighted center of mass is:
\beq
\ve{r}_{com} = \left. \sum_{i=1}^N w'_i \, m_i \, \ve{r}_i \right/ M
\eeq
From the centers of mass the AFM, constraint, or umbrella force $\ve{F}_{\!com}$
on each group can be calculated.
The force on the center of mass of a group is redistributed to the atoms
as follows:
\beq
\ve{F}_{\!i} = \frac{w'_i \, m_i}{M} \, \ve{F}_{\!com}
\eeq
\subsubsection{Limitations}
There is one important limitation:
strictly speaking, constraint forces can only be calculated between
groups that are not connected by constraints to the rest of the system.
If a group contains part of a molecule of which the bond lengths
are constrained, the pull constraint and LINCS or SHAKE bond constraint
algorithms should be iterated simultaneously. This is not done in {\gromacs}.
This means that for simulations with {\tt constraints = all-bonds}
in the {\tt .mdp} file pulling is, strictly speaking,
limited to whole molecules or groups of molecules.
In some cases this limitation can be avoided by using the free energy code,
see \secref{fepmf}.
In practice, the errors caused by not iterating the two constraint
algorithms can be negligible when the pull group consists of a large
amount of atoms and/or the pull force is small.
In such cases, the constraint correction displacement of the pull group
is small compared to the bond lengths.
\section{\normindex{Enforced Rotation}}
\index{rotational pulling|see{enforced rotation}}
\index{pulling, rotational|see{enforced rotation}}
\label{sec:rotation}
\mathchardef\mhyphen="2D
\newcommand{\rotiso }{^\mathrm{iso}}
\newcommand{\rotisopf }{^\mathrm{iso\mhyphen pf}}
\newcommand{\rotpm }{^\mathrm{pm}}
\newcommand{\rotpmpf }{^\mathrm{pm\mhyphen pf}}
\newcommand{\rotrm }{^\mathrm{rm}}
\newcommand{\rotrmpf }{^\mathrm{rm\mhyphen pf}}
\newcommand{\rotrmtwo }{^\mathrm{rm2}}
\newcommand{\rotrmtwopf }{^\mathrm{rm2\mhyphen pf}}
\newcommand{\rotflex }{^\mathrm{flex}}
\newcommand{\rotflext }{^\mathrm{flex\mhyphen t}}
\newcommand{\rotflextwo }{^\mathrm{flex2}}
\newcommand{\rotflextwot}{^\mathrm{flex2\mhyphen t}}
This module can be used to enforce the rotation of a group of atoms, as {\eg}
a protein subunit. There are a variety of rotation potentials, among them
complex ones that allow flexible adaptations of both the rotated subunit as
well as the local rotation axis during the simulation. An example application
can be found in ref. \cite{Kutzner2011}.
\begin{figure}
\centerline{\includegraphics[width=13cm]{plots/rotation.pdf}}
\caption[Fixed and flexible axis rotation]{Comparison of fixed and flexible axis
rotation.
{\sf A:} Rotating the sketched shape inside the white tubular cavity can create
artifacts when a fixed rotation axis (dashed) is used. More realistically, the
shape would revolve like a flexible pipe-cleaner (dotted) inside the bearing (gray).
{\sf B:} Fixed rotation around an axis \ve{v} with a pivot point
specified by the vector \ve{u}.
{\sf C:} Subdividing the rotating fragment into slabs with separate rotation
axes ($\uparrow$) and pivot points ($\bullet$) for each slab allows for
flexibility. The distance between two slabs with indices $n$ and $n+1$ is $\Delta x$.}
\label{fig:rotation}
\end{figure}
\begin{figure}
\centerline{\includegraphics[width=13cm]{plots/equipotential.pdf}}
\caption{Selection of different rotation potentials and definition of notation.
All four potentials $V$ (color coded) are shown for a single atom at position
$\ve{x}_j(t)$.
{\sf A:} Isotropic potential $V\rotiso$,
{\sf B:} radial motion potential $V\rotrm$ and flexible potential
$V\rotflex$,
{\sf C--D:} radial motion\,2 potential $V\rotrmtwo$ and
flexible\,2 potential $V\rotflextwo$ for $\epsilon' = 0$\,nm$^2$ {\sf (C)}
and $\epsilon' = 0.01$\,nm$^2$ {\sf (D)}. The rotation axis is perpendicular to
the plane and marked by $\otimes$. The light gray contours indicate Boltzmann factors
$e^{-V/(k_B T)}$ in the $\ve{x}_j$-plane for $T=300$\,K and
$k=200$\,kJ/(mol$\cdot$nm$^2$). The green arrow shows the direction of the
force $\ve{F}_{\!j}$ acting on atom $j$; the blue dashed line indicates the
motion of the reference position.}
\label{fig:equipotential}
\end{figure}
\subsection{Fixed Axis Rotation}
\subsubsection{Stationary Axis with an Isotropic Potential}
In the fixed axis approach (see \figref{rotation}B), torque on a group of $N$
atoms with positions $\ve{x}_i$ (denoted ``rotation group'') is applied by
rotating a reference set of atomic positions -- usually their initial positions
$\ve{y}_i^0$ -- at a constant angular velocity $\omega$ around an axis
defined by a direction vector $\hat{\ve{v}}$ and a pivot point \ve{u}.
To that aim, each atom with position $\ve{x}_i$ is attracted by a
``virtual spring'' potential to its moving reference position
$\ve{y}_i = \mathbf{\Omega}(t) (\ve{y}_i^0 - \ve{u})$,
where $\mathbf{\Omega}(t)$ is a matrix that describes the rotation around the
axis. In the simplest case, the ``springs'' are described by a harmonic
potential,
\beq
V\rotiso = \frac{k}{2} \sum_{i=1}^{N} w_i \left[ \mathbf{\Omega}(t)
(\ve{y}_i^0 - \ve{u}) - (\ve{x}_i - \ve{u}) \right]^2 ,
\label{eqn:potiso}
\eeq
with optional mass-weighted prefactors $w_i = N \, m_i/M$ with total mass
$M = \sum_{i=1}^N m_i$.
The rotation matrix $\mathbf{\Omega}(t)$ is
\newcommand{\omcost}{\,\xi\,} % abbreviation
\begin{displaymath}
\mathbf{\Omega}(t) =
\left(
\begin{array}{ccc}
\cos\omega t + v_x^2\omcost & v_x v_y\omcost - v_z\sin\omega t & v_x v_z\omcost + v_y\sin\omega t\\
v_x v_y\omcost + v_z\sin\omega t & \cos\omega t + v_y^2\omcost & v_y v_z\omcost - v_x\sin\omega t\\
v_x v_z\omcost - v_y\sin\omega t & v_y v_z\omcost + v_x\sin\omega t & \cos\omega t + v_z^2\omcost \\
\end{array}
\right) ,
\end{displaymath}
where $v_x$, $v_y$, and $v_z$ are the components of the normalized rotation vector
$\hat{\ve{v}}$, and $\omcost := 1-\cos(\omega t)$. As illustrated in
\figref{equipotential}A for a single atom $j$, the
rotation matrix $\mathbf{\Omega}(t)$ operates on the initial reference positions
$\ve{y}_j^0 = \ve{x}_j(t_0)$ of atom $j$ at $t=t_0$. At a later
time $t$, the reference position has rotated away from its initial place
(along the blue dashed line), resulting in the force
\beq
\ve{F}_{\!j}\rotiso
= -\nabla_{\!j} \, V\rotiso
= k \, w_j \left[
\mathbf{\Omega}(t) (\ve{y}_j^0 - \ve{u}) - (\ve{x}_j - \ve{u} ) \right] ,
\label{eqn:force_fixed}
\eeq
which is directed towards the reference position.
\subsubsection{Pivot-Free Isotropic Potential}
Instead of a fixed pivot vector \ve{u} this potential uses the center of
mass $\ve{x}_c$ of the rotation group as pivot for the rotation axis,
\beq
\ve{x}_c = \frac{1}{M} \sum_{i=1}^N m_i \ve{x}_i
\label{eqn:com}
\mbox{\hspace{4ex}and\hspace{4ex}}
\ve{y}_c^0 = \frac{1}{M} \sum_{i=1}^N m_i \ve{y}_i^0 \ ,
\eeq
which yields the ``pivot-free'' isotropic potential
\beq
V\rotisopf = \frac{k}{2} \sum_{i=1}^{N} w_i \left[ \mathbf{\Omega}(t)
(\ve{y}_i^0 - \ve{y}_c^0) - (\ve{x}_i - \ve{x}_c) \right]^2 ,
\label{eqn:potisopf}
\eeq
with forces
\beq
\mathbf{F}_{\!j}\rotisopf = k \, w_j
\left[
\mathbf{\Omega}(t) ( \ve{y}_j^0 - \ve{y}_c^0)
- ( \ve{x}_j - \ve{x}_c )
\right] .
\label{eqn:force_isopf}
\eeq
Without mass-weighting, the pivot $\ve{x}_c$ is the geometrical center of
the group.
\label{sec:fixed}
\subsubsection{Parallel Motion Potential Variant}
The forces generated by the isotropic potentials
(\eqnsref{potiso}{potisopf}) also contain components parallel
to the rotation axis and thereby restrain motions along the axis of either the
whole rotation group (in case of $V\rotiso$) or within
the rotation group (in case of $V\rotisopf$). For cases where
unrestrained motion along the axis is preferred, we have implemented a
``parallel motion'' variant by eliminating all components parallel to the
rotation axis for the potential. This is achieved by projecting the distance
vectors between reference and actual positions
\beq
\ve{r}_i = \mathbf{\Omega}(t) (\ve{y}_i^0 - \ve{u}) - (\ve{x}_i - \ve{u})
\eeq
onto the plane perpendicular to the rotation vector,
\beq
\label{eqn:project}
\ve{r}_i^\perp := \ve{r}_i - (\ve{r}_i \cdot \hat{\ve{v}})\hat{\ve{v}} \ ,
\eeq
yielding
\bea
\nonumber
V\rotpm &=& \frac{k}{2} \sum_{i=1}^{N} w_i ( \ve{r}_i^\perp )^2 \\
&=& \frac{k}{2} \sum_{i=1}^{N} w_i
\left\lbrace
\mathbf{\Omega}(t)
(\ve{y}_i^0 - \ve{u}) - (\ve{x}_i - \ve{u}) \right. \nonumber \\
&& \left. - \left\lbrace
\left[ \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{u}) - (\ve{x}_i - \ve{u}) \right] \cdot\hat{\ve{v}}
\right\rbrace\hat{\ve{v}} \right\rbrace^2 ,
\label{eqn:potpm}
\eea
and similarly
\beq
\ve{F}_{\!j}\rotpm = k \, w_j \, \ve{r}_j^\perp .
\label{eqn:force_pm}
\eeq
\subsubsection{Pivot-Free Parallel Motion Potential}
Replacing in \eqnref{potpm} the fixed pivot \ve{u} by the center
of mass $\ve{x_c}$ yields the pivot-free variant of the parallel motion
potential. With
\beq
\ve{s}_i = \mathbf{\Omega}(t) (\ve{y}_i^0 - \ve{y}_c^0) - (\ve{x}_i - \ve{x}_c)
\eeq
the respective potential and forces are
\bea
V\rotpmpf &=& \frac{k}{2} \sum_{i=1}^{N} w_i ( \ve{s}_i^\perp )^2 \ , \\
\label{eqn:potpmpf}
\ve{F}_{\!j}\rotpmpf &=& k \, w_j \, \ve{s}_j^\perp .
\label{eqn:force_pmpf}
\eea
\subsubsection{Radial Motion Potential}
In the above variants, the minimum of the rotation potential is either a single
point at the reference position $\ve{y}_i$ (for the isotropic potentials) or a
single line through $\ve{y}_i$ parallel to the rotation axis (for the
parallel motion potentials). As a result, radial forces restrict radial motions
of the atoms. The two subsequent types of rotation potentials, $V\rotrm$
and $V\rotrmtwo$, drastically reduce or even eliminate this effect. The first
variant, $V\rotrm$ (\figref{equipotential}B), eliminates all force
components parallel to the vector connecting the reference atom and the
rotation axis,
\beq
V\rotrm = \frac{k}{2} \sum_{i=1}^{N} w_i \left[
\ve{p}_i
\cdot(\ve{x}_i - \ve{u}) \right]^2 ,
\label{eqn:potrm}
\eeq
with
\beq
\ve{p}_i :=
\frac{\hat{\ve{v}}\times \mathbf{\Omega}(t) (\ve{y}_i^0 - \ve{u})} {\| \hat{\ve{v}}\times \mathbf{\Omega}(t) (\ve{y}_i^0 - \ve{u})\|} \ .
\eeq
This variant depends only on the distance $\ve{p}_i \cdot (\ve{x}_i -
\ve{u})$ of atom $i$ from the plane spanned by $\hat{\ve{v}}$ and
$\mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{u})$. The resulting force is
\beq
\mathbf{F}_{\!j}\rotrm =
-k \, w_j \left[ \ve{p}_j\cdot(\ve{x}_j - \ve{u}) \right] \,\ve{p}_j \, .
\label{eqn:potrm_force}
\eeq
\subsubsection{Pivot-Free Radial Motion Potential}
Proceeding similar to the pivot-free isotropic potential yields a pivot-free
version of the above potential. With
\beq
\ve{q}_i :=
\frac{\hat{\ve{v}}\times \mathbf{\Omega}(t) (\ve{y}_i^0 - \ve{y}_c^0)} {\| \hat{\ve{v}}\times \mathbf{\Omega}(t) (\ve{y}_i^0 - \ve{y}_c^0)\|} \, ,
\eeq
the potential and force for the pivot-free variant of the radial motion potential read
\bea
V\rotrmpf & = & \frac{k}{2} \sum_{i=1}^{N} w_i \left[
\ve{q}_i
\cdot(\ve{x}_i - \ve{x}_c)
\right]^2 \, , \\
\label{eqn:potrmpf}
\mathbf{F}_{\!j}\rotrmpf & = &
-k \, w_j \left[ \ve{q}_j\cdot(\ve{x}_j - \ve{x}_c) \right] \,\ve{q}_j
+ k \frac{m_j}{M} \sum_{i=1}^{N} w_i \left[
\ve{q}_i\cdot(\ve{x}_i - \ve{x}_c) \right]\,\ve{q}_i \, .
\label{eqn:potrmpf_force}
\eea
\subsubsection{Radial Motion 2 Alternative Potential}
As seen in \figref{equipotential}B, the force resulting from
$V\rotrm$ still contains a small, second-order radial component. In most
cases, this perturbation is tolerable; if not, the following
alternative, $V\rotrmtwo$, fully eliminates the radial contribution to the
force, as depicted in \figref{equipotential}C,
\beq
V\rotrmtwo =
\frac{k}{2} \sum_{i=1}^{N} w_i\,
\frac{\left[ (\hat{\ve{v}} \times ( \ve{x}_i - \ve{u} ))
\cdot \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{u}) \right]^2}
{\| \hat{\ve{v}} \times (\ve{x}_i - \ve{u}) \|^2 +
\epsilon'} \, ,
\label{eqn:potrm2}
\eeq
where a small parameter $\epsilon'$ has been introduced to avoid singularities.
For $\epsilon'=0$\,nm$^2$, the equipotential planes are spanned by $\ve{x}_i -
\ve{u}$ and $\hat{\ve{v}}$, yielding a force
perpendicular to $\ve{x}_i - \ve{u}$, thus not contracting or
expanding structural parts that moved away from or toward the rotation axis.
Choosing a small positive $\epsilon'$ ({\eg},
$\epsilon'=0.01$\,nm$^2$, \figref{equipotential}D) in the denominator of
\eqnref{potrm2} yields a well-defined potential and continuous forces also
close to the rotation axis, which is not the case for $\epsilon'=0$\,nm$^2$
(\figref{equipotential}C). With
\bea
\ve{r}_i & := & \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{u})\\
\ve{s}_i & := & \frac{\hat{\ve{v}} \times (\ve{x}_i -
\ve{u} ) }{ \| \hat{\ve{v}} \times (\ve{x}_i - \ve{u})
\| } \equiv \; \Psi_{i} \;\; {\hat{\ve{v}} \times
(\ve{x}_i-\ve{u} ) }\\
\Psi_i^{*} & := & \frac{1}{ \| \hat{\ve{v}} \times
(\ve{x}_i-\ve{u}) \|^2 + \epsilon'}
\eea
the force on atom $j$ reads
\beq
\ve{F}_{\!j}\rotrmtwo =
- k\;
\left\lbrace w_j\;
(\ve{s}_j\cdot\ve{r}_{\!j})\;
\left[ \frac{\Psi_{\!j}^* }{\Psi_{\!j} } \ve{r}_{\!j}
- \frac{\Psi_{\!j}^{*2}}{\Psi_{\!j}^3}
(\ve{s}_j\cdot\ve{r}_{\!j})\ve{s}_j \right]
\right\rbrace \times \hat{\ve{v}} .
\label{eqn:potrm2_force}
\eeq
\subsubsection{Pivot-Free Radial Motion 2 Potential}
The pivot-free variant of the above potential is
\beq
V\rotrmtwopf =
\frac{k}{2} \sum_{i=1}^{N} w_i\,
\frac{\left[ (\hat{\ve{v}} \times ( \ve{x}_i - \ve{x}_c ))
\cdot \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{y}_c) \right]^2}
{\| \hat{\ve{v}} \times (\ve{x}_i - \ve{x}_c) \|^2 +
\epsilon'} \, .
\label{eqn:potrm2pf}
\eeq
With
\bea
\ve{r}_i & := & \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{y}_c)\\
\ve{s}_i & := & \frac{\hat{\ve{v}} \times (\ve{x}_i -
\ve{x}_c ) }{ \| \hat{\ve{v}} \times (\ve{x}_i - \ve{x}_c)
\| } \equiv \; \Psi_{i} \;\; {\hat{\ve{v}} \times
(\ve{x}_i-\ve{x}_c ) }\\ \Psi_i^{*} & := & \frac{1}{ \| \hat{\ve{v}} \times
(\ve{x}_i-\ve{x}_c) \|^2 + \epsilon'}
\eea
the force on atom $j$ reads
\bea
\nonumber
\ve{F}_{\!j}\rotrmtwopf & = &
- k\;
\left\lbrace w_j\;
(\ve{s}_j\cdot\ve{r}_{\!j})\;
\left[ \frac{\Psi_{\!j}^* }{\Psi_{\!j} } \ve{r}_{\!j}
- \frac{\Psi_{\!j}^{*2}}{\Psi_{\!j}^3}
(\ve{s}_j\cdot\ve{r}_{\!j})\ve{s}_j \right]
\right\rbrace \times \hat{\ve{v}}\\
& &
+ k\;\frac{m_j}{M} \left\lbrace \sum_{i=1}^{N}
w_i\;(\ve{s}_i\cdot\ve{r}_i) \;
\left[ \frac{\Psi_i^* }{\Psi_i } \ve{r}_i
- \frac{\Psi_i^{*2}}{\Psi_i^3} (\ve{s}_i\cdot\ve{r}_i )\;
\ve{s}_i \right] \right\rbrace \times \hat{\ve{v}} \, .
\label{eqn:potrm2pf_force}
\eea
\subsection{Flexible Axis Rotation}
As sketched in \figref{rotation}A--B, the rigid body behavior of
the fixed axis rotation scheme is a drawback for many applications. In
particular, deformations of the rotation group are suppressed when the
equilibrium atom positions directly depend on the reference positions.
To avoid this limitation, \eqnsref{potrmpf}{potrm2pf}
will now be generalized towards a ``flexible axis'' as sketched in
\figref{rotation}C. This will be achieved by subdividing the
rotation group into a set of equidistant slabs perpendicular to
the rotation vector, and by applying a separate rotation potential to each
of these slabs. \figref{rotation}C shows the midplanes of the slabs
as dotted straight lines and the centers as thick black dots.
To avoid discontinuities in the potential and in the forces, we define
``soft slabs'' by weighing the contributions of each
slab $n$ to the total potential function $V\rotflex$ by a Gaussian
function
\beq
\label{eqn:gaussian}
g_n(\ve{x}_i) = \Gamma \ \mbox{exp} \left(
-\frac{\beta_n^2(\ve{x}_i)}{2\sigma^2} \right) ,
\eeq
centered at the midplane of the $n$th slab. Here $\sigma$ is the width
of the Gaussian function, $\Delta x$ the distance between adjacent slabs, and
\beq
\beta_n(\ve{x}_i) := \ve{x}_i \cdot \hat{\ve{v}} - n \, \Delta x \, .
\eeq
%
\begin{figure}
\centerline{\includegraphics[width=6.5cm]{plots/gaussians.pdf}}
\caption{Gaussian functions $g_n$ centered at $n \, \Delta x$ for a slab
distance $\Delta x = 1.5$ nm and $n \geq -2$. Gaussian function $g_0$ is
highlighted in bold; the dashed line depicts the sum of the shown Gaussian
functions.}
\label{fig:gaussians}
\end{figure}
%
A most convenient choice is $\sigma = 0.7 \Delta x$ and
\begin{displaymath}
1/\Gamma = \sum_{n \in Z}
\mbox{exp}
\left(-\frac{(n - \frac{1}{4})^2}{2\cdot 0.7^2}\right)
\approx 1.75464 \, ,
\end{displaymath}
which yields a nearly constant sum, essentially independent of $\ve{x}_i$
(dashed line in \figref{gaussians}), {\ie},
\beq
\sum_{n \in Z} g_n(\ve{x}_i) = 1 + \epsilon(\ve{x}_i) \, ,
\label{eqn:normal}
\eeq
with $ | \epsilon(\ve{x}_i) | < 1.3\cdot 10^{-4}$. This choice also
implies that the individual contributions to the force from the slabs add up to
unity such that no further normalization is required.
To each slab center $\ve{x}_c^n$, all atoms contribute by their
Gaussian-weighted (optionally also mass-weighted) position vectors
$g_n(\ve{x}_i) \, \ve{x}_i$. The
instantaneous slab centers $\ve{x}_c^n$ are calculated from the
current positions $\ve{x}_i$,
\beq
\label{eqn:defx0}
\ve{x}_c^n =
\frac{\sum_{i=1}^N g_n(\ve{x}_i) \, m_i \, \ve{x}_i}
{\sum_{i=1}^N g_n(\ve{x}_i) \, m_i} \, ,\\
\eeq
while the reference centers $\ve{y}_c^n$ are calculated from the reference
positions $\ve{y}_i^0$,
\beq
\label{eqn:defy0}
\ve{y}_c^n =
\frac{\sum_{i=1}^N g_n(\ve{y}_i^0) \, m_i \, \ve{y}_i^0}
{\sum_{i=1}^N g_n(\ve{y}_i^0) \, m_i} \, .
\eeq
Due to the rapid decay of $g_n$, each slab
will essentially involve contributions from atoms located within $\approx
3\Delta x$ from the slab center only.
\subsubsection{Flexible Axis Potential}
We consider two flexible axis variants. For the first variant,
the slab segmentation procedure with Gaussian weighting is applied to the radial
motion potential (\eqnref{potrmpf}\,/\,\figref{equipotential}B),
yielding as the contribution of slab $n$
\begin{displaymath}
V^n =
\frac{k}{2} \sum_{i=1}^{N} w_i \, g_n(\ve{x}_i)
\left[
\ve{q}_i^n
\cdot
(\ve{x}_i - \ve{x}_c^n)
\right]^2 ,
\label{eqn:flexpot}
\end{displaymath}
and a total potential function
\beq
V\rotflex = \sum_n V^n \, .
\label{eqn:potflex}
\eeq
Note that the global center of mass $\ve{x}_c$ used in
\eqnref{potrmpf} is now replaced by $\ve{x}_c^n$, the center of mass of
the slab. With
\bea
\ve{q}_i^n & := & \frac{\hat{\ve{v}} \times
\mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{y}_c^n) }{ \| \hat{\ve{v}}
\times \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{y}_c^n) \| } \\
b_i^n & := & \ve{q}_i^n \cdot (\ve{x}_i - \ve{x}_c^n) \, ,
\eea
the resulting force on atom $j$ reads
\bea
\nonumber\hspace{-15mm}
\ve{F}_{\!j}\rotflex &=&
- \, k \, w_j \sum_n g_n(\ve{x}_j) \, b_j^n \left\lbrace \ve{q}_j^n -
b_j^n \frac{\beta_n(\ve{x}_j)}{2\sigma^2} \hat{\ve{v}} \right\rbrace \\ & &
+ \, k \, m_j \sum_n \frac{g_n(\ve{x}_j)}{\sum_h g_n(\ve{x}_h)}
\sum_{i=1}^{N} w_i \, g_n(\ve{x}_i) \, b_i^n \left\lbrace
\ve{q}_i^n -\frac{\beta_n(\ve{x}_j)}{\sigma^2}
\left[ \ve{q}_i^n \cdot (\ve{x}_j - \ve{x}_c^n )\right]
\hat{\ve{v}} \right\rbrace .
\label{eqn:potflex_force}
\eea
%
Note that for $V\rotflex$, as defined, the slabs are fixed in space and so
are the reference centers $\ve{y}_c^n$. If during the simulation the
rotation group moves too far in $\ve{v}$ direction, it may enter a
region where -- due to the lack of nearby reference positions -- no reference
slab centers are defined, rendering the potential evaluation impossible.
We therefore have included a slightly modified version of this potential that
avoids this problem by attaching the midplane of slab $n=0$ to the center of mass
of the rotation group, yielding slabs that move with the rotation group.
This is achieved by subtracting the center of mass $\ve{x}_c$ of the
group from the positions,
\beq
\tilde{\ve{x}}_i = \ve{x}_i - \ve{x}_c \, , \mbox{\ \ \ and \ \ }
\tilde{\ve{y}}_i^0 = \ve{y}_i^0 - \ve{y}_c^0 \, ,
\label{eqn:trafo}
\eeq
such that
\bea
V\rotflext
& = & \frac{k}{2} \sum_n \sum_{i=1}^{N} w_i \, g_n(\tilde{\ve{x}}_i)
\left[ \frac{\hat{\ve{v}} \times \mathbf{\Omega}(t)(\tilde{\ve{y}}_i^0
- \tilde{\ve{y}}_c^n) }{ \| \hat{\ve{v}} \times
\mathbf{\Omega}(t)(\tilde{\ve{y}}_i^0 -
\tilde{\ve{y}}_c^n) \| }
\cdot
(\tilde{\ve{x}}_i - \tilde{\ve{x}}_c^n)
\right]^2 .
\label{eqn:potflext}
\eea
To simplify the force derivation, and for efficiency reasons, we here assume
$\ve{x}_c$ to be constant, and thus $\partial \ve{x}_c / \partial x =
\partial \ve{x}_c / \partial y = \partial \ve{x}_c / \partial z = 0$. The
resulting force error is small (of order $O(1/N)$ or $O(m_j/M)$ if
mass-weighting is applied) and can therefore be tolerated. With this assumption,
the forces $\ve{F}\rotflext$ have the same form as
\eqnref{potflex_force}.
\subsubsection{Flexible Axis 2 Alternative Potential}
In this second variant, slab segmentation is applied to $V\rotrmtwo$
(\eqnref{potrm2pf}), resulting in a flexible axis potential without radial
force contributions (\figref{equipotential}C),
\beq
V\rotflextwo =
\frac{k}{2} \sum_{i=1}^{N} \sum_n w_i\,g_n(\ve{x}_i)
\frac{\left[ (\hat{\ve{v}} \times ( \ve{x}_i - \ve{x}_c^n ))
\cdot \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{y}_c^n) \right]^2}
{\| \hat{\ve{v}} \times (\ve{x}_i - \ve{x}_c^n) \|^2 +
\epsilon'} \, .
\label{eqn:potflex2}
\eeq
With
\bea
\ve{r}_i^n & := & \mathbf{\Omega}(t)(\ve{y}_i^0 - \ve{y}_c^n)\\
\ve{s}_i^n & := & \frac{\hat{\ve{v}} \times (\ve{x}_i -
\ve{x}_c^n ) }{ \| \hat{\ve{v}} \times (\ve{x}_i - \ve{x}_c^n)
\| } \equiv \; \psi_{i} \;\; {\hat{\ve{v}} \times (\ve{x}_i-\ve{x}_c^n ) }\\
\psi_i^{*} & := & \frac{1}{ \| \hat{\ve{v}} \times (\ve{x}_i-\ve{x}_c^n) \|^2 + \epsilon'}\\
W_j^n & := & \frac{g_n(\ve{x}_j)\,m_j}{\sum_h g_n(\ve{x}_h)\,m_h}\\
\ve{S}^n & := &
\sum_{i=1}^{N} w_i\;g_n(\ve{x}_i)
\; (\ve{s}_i^n\cdot\ve{r}_i^n)
\left[ \frac{\psi_i^* }{\psi_i } \ve{r}_i^n
- \frac{\psi_i^{*2}}{\psi_i^3} (\ve{s}_i^n\cdot\ve{r}_i^n )\;
\ve{s}_i^n \right] \label{eqn:Sn}
\eea
the force on atom $j$ reads
\bea
\nonumber
\ve{F}_{\!j}\rotflextwo & = &
- k\;
\left\lbrace \sum_n w_j\;g_n(\ve{x}_j)\;
(\ve{s}_j^n\cdot\ve{r}_{\!j}^n)\;
\left[ \frac{\psi_j^* }{\psi_j } \ve{r}_{\!j}^n
- \frac{\psi_j^{*2}}{\psi_j^3} (\ve{s}_j^n\cdot\ve{r}_{\!j}^n)\;
\ve{s}_{\!j}^n \right] \right\rbrace \times \hat{\ve{v}} \\
\nonumber
& &
+ k \left\lbrace \sum_n W_{\!j}^n \, \ve{S}^n \right\rbrace \times
\hat{\ve{v}}
- k \left\lbrace \sum_n W_{\!j}^n \; \frac{\beta_n(\ve{x}_j)}{\sigma^2} \frac{1}{\psi_j}\;\;
\ve{s}_j^n \cdot
\ve{S}^n \right\rbrace \hat{\ve{v}}\\
& &
+ \frac{k}{2} \left\lbrace \sum_n w_j\;g_n(\ve{x}_j)
\frac{\beta_n(\ve{x}_j)}{\sigma^2}
\frac{\psi_j^*}{\psi_j^2}( \ve{s}_j^n \cdot \ve{r}_{\!j}^n )^2 \right\rbrace
\hat{\ve{v}} .
\label{eqn:potflex2_force}
\eea
Applying transformation (\ref{eqn:trafo}) yields a ``translation-tolerant''
version of the flexible\,2 potential, $V\rotflextwot$. Again,
assuming that $\partial \ve{x}_c / \partial x$, $\partial \ve{x}_c /
\partial y$, $\partial \ve{x}_c / \partial z$ are small, the
resulting equations for $V\rotflextwot$ and $\ve{F}\rotflextwot$ are
similar to those of $V\rotflextwo$ and $\ve{F}\rotflextwo$.
\subsection{Usage}
To apply enforced rotation, the particles $i$ that are to
be subjected to one of the rotation potentials are defined via index groups
{\tt rot\_group0}, {\tt rot\_group1}, etc., in the {\tt .mdp} input file.
The reference positions $\ve{y}_i^0$ are
read from a special {\tt .trr} file provided to {\tt grompp}. If no such file is found,
$\ve{x}_i(t=0)$ are used as reference positions and written to {\tt .trr} such
that they can be used for subsequent setups. All parameters of the potentials
such as $k$, $\epsilon'$, etc. (\tabref{vars}) are provided as {\tt .mdp}
parameters; {\tt rot\_type} selects the type of the potential.
The option {\tt rot\_massw} allows to choose whether or not to use
mass-weighted averaging.
For the flexible potentials, a cutoff value $g_n^\mathrm{min}$
(typically $g_n^\mathrm{min}=0.001$) makes shure that only
significant contributions to $V$ and \ve{F} are evaluated, {\ie} terms with
$g_n(\ve{x}) < g_n^\mathrm{min}$ are omitted.
\tabref{quantities} summarizes observables that are written
to additional output files and which are described below.
\begin{table}[tbp]
\caption{Parameters used by the various rotation potentials.
{\sf x}'s indicate which parameter is actually used for a given potential.}
%\small
\newcommand{\kunit}{$\frac{\mathrm{kJ}}{\mathrm{mol} \cdot \mathrm{nm}^2}$}
\newcommand{\smtt}[1]{{\hspace{-0.5ex}\small #1\hspace{-0.5ex}}}
\label{tab:vars}
\begin{center}
\begin{tabular}{l>{$}l<{$}rccccccc}
\hline
parameter & & & $k$ & $\hat{\ve{v}}$ & $\ve{u}$ & $\omega$ & $\epsilon'$ & $\Delta x$ & $g_n^\mathrm{min}$ \\
\multicolumn{3}{l}{{\tt .mdp} input variable name} & \smtt{k} & \smtt{vec} & \smtt{pivot} & \smtt{rate} & \smtt{eps} & \smtt{slab\_dist} & \smtt{min\_gauss} \\
unit & & & \kunit & - & nm & $^\circ$/ps & nm$^2$ & nm & \,-\, \\[1mm]
\hline \multicolumn{2}{l}{fixed axis potentials:} & eqn.\\
isotropic & V\rotiso & (\ref{eqn:potiso}) & {\sf x} & {\sf x} & {\sf x} & {\sf x} & - & - & - \\
--- pivot-free & V\rotisopf & (\ref{eqn:potisopf}) & {\sf x} & {\sf x} & - & {\sf x} & - & - & - \\
parallel motion & V\rotpm & (\ref{eqn:potpm}) & {\sf x} & {\sf x} & {\sf x} & {\sf x} & - & - & - \\
--- pivot-free & V\rotpmpf & (\ref{eqn:potpmpf}) & {\sf x} & {\sf x} & - & {\sf x} & - & - & - \\
radial motion & V\rotrm & (\ref{eqn:potrm}) & {\sf x} & {\sf x} & {\sf x} & {\sf x} & - & - & - \\
--- pivot-free & V\rotrmpf & (\ref{eqn:potrmpf}) & {\sf x} & {\sf x} & - & {\sf x} & - & - & - \\
radial motion\,2 & V\rotrmtwo & (\ref{eqn:potrm2}) & {\sf x} & {\sf x} & {\sf x} & {\sf x} & {\sf x} & - & - \\
--- pivot-free & V\rotrmtwopf & (\ref{eqn:potrm2pf}) & {\sf x} & {\sf x} & - & {\sf x} & {\sf x} & - & - \\ \hline
\multicolumn{2}{l}{flexible axis potentials:} & eqn.\\
flexible & V\rotflex & (\ref{eqn:potflex}) & {\sf x} & {\sf x} & - & {\sf x} & - & {\sf x} & {\sf x} \\
--- transl. tol. & V\rotflext & (\ref{eqn:potflext}) & {\sf x} & {\sf x} & - & {\sf x} & - & {\sf x} & {\sf x} \\
flexible\,2 & V\rotflextwo & (\ref{eqn:potflex2}) & {\sf x} & {\sf x} & - & {\sf x} & {\sf x} & {\sf x} & {\sf x} \\
--- transl. tol. & V\rotflextwot & - & {\sf x} & {\sf x} & - & {\sf x} & {\sf x} & {\sf x} & {\sf x} \\
\hline
\end{tabular}
\end{center}
\end{table}
\begin{table}
\caption{Quantities recorded in output files during enforced rotation simulations.
All slab-wise data is written every {\tt nstsout} steps, other rotation data every {\tt nstrout} steps.}
\label{tab:quantities}
\begin{center}
\begin{tabular}{llllcc}
\hline
quantity & unit & equation & output file & fixed & flexible\\ \hline
$V(t)$ & kJ/mol & see \ref{tab:vars} & {\tt rotation} & {\sf x} & {\sf x} \\
$\theta_\mathrm{ref}(t)$ & degrees & $\theta_\mathrm{ref}(t)=\omega t$ & {\tt rotation} & {\sf x} & {\sf x} \\
$\theta_\mathrm{av}(t)$ & degrees & (\ref{eqn:avangle}) & {\tt rotation} & {\sf x} & - \\
$\theta_\mathrm{fit}(t)$, $\theta_\mathrm{fit}(t,n)$ & degrees & (\ref{eqn:rmsdfit}) & {\tt rotangles} & - & {\sf x} \\
$\ve{y}_0(n)$, $\ve{x}_0(t,n)$ & nm & (\ref{eqn:defx0}, \ref{eqn:defy0})& {\tt rotslabs} & - & {\sf x} \\
$\tau(t)$ & kJ/mol & (\ref{eqn:torque}) & {\tt rotation} & {\sf x} & - \\
$\tau(t,n)$ & kJ/mol & (\ref{eqn:torque}) & {\tt rottorque} & - & {\sf x} \\ \hline
\end{tabular}
\end{center}
\end{table}
\subsubsection*{Angle of Rotation Groups: Fixed Axis}
For fixed axis rotation, the average angle $\theta_\mathrm{av}(t)$ of the
group relative to the reference group is determined via the distance-weighted
angular deviation of all rotation group atoms from their reference positions,
\beq
\theta_\mathrm{av} = \left. \sum_{i=1}^{N} r_i \ \theta_i \right/ \sum_{i=1}^N r_i \ .
\label{eqn:avangle}
\eeq
Here, $r_i$ is the distance of the reference position to the rotation axis, and
the difference angles $\theta_i$ are determined from the atomic positions,
projected onto a plane perpendicular to the rotation axis through pivot point
$\ve{u}$ (see \eqnref{project} for the definition of $\perp$),
\beq
\cos \theta_i =
\frac{(\ve{y}_i-\ve{u})^\perp \cdot (\ve{x}_i-\ve{u})^\perp}
{ \| (\ve{y}_i-\ve{u})^\perp \cdot (\ve{x}_i-\ve{u})^\perp
\| } \ .
\eeq
%
The sign of $\theta_\mathrm{av}$ is chosen such that
$\theta_\mathrm{av} > 0$ if the actual structure rotates ahead of the reference.
\subsubsection*{Angle of Rotation Groups: Flexible Axis}
For flexible axis rotation, two outputs are provided, the angle of the
entire rotation group, and separate angles for the segments in the slabs.
The angle of the entire rotation group is determined by an RMSD fit
of $\ve{x}_i$
to the reference positions $\ve{y}_i^0$ at $t=0$, yielding $\theta_\mathrm{fit}$
as the angle by which the reference has to be rotated around $\hat{\ve{v}}$
for the optimal fit,
\beq
\mathrm{RMSD} \big( \ve{x}_i,\ \mathbf{\Omega}(\theta_\mathrm{fit})
\ve{y}_i^0 \big) \stackrel{!}{=} \mathrm{min} \, .
\label{eqn:rmsdfit}
\eeq
To determine the local angle for each slab $n$, both reference and actual
positions are weighted with the Gaussian function of slab $n$, and
$\theta_\mathrm{fit}(t,n)$ is calculated as in \eqnref{rmsdfit}) from the
Gaussian-weighted positions.
For all angles, the {\tt .mdp} input option {\tt rot\_fit\_method} controls
whether a normal RMSD fit is performed or whether for the fit each
position $\ve{x}_i$ is put at the same distance to the rotation axis as its
reference counterpart $\ve{y}_i^0$. In the latter case, the RMSD
measures only angular differences, not radial ones.
\subsubsection*{Angle Determination by Searching the Energy Minimum}
Alternatively, for {\tt rot\_fit\_method = potential}, the angle of the rotation
group is determined as the angle for which the rotation potential energy is minimal.
Therefore, the used rotation potential is additionally evaluated for a set of angles
around the current reference angle. In this case, the {\tt rotangles.log} output file
contains the values of the rotation potential at the chosen set of angles, while
{\tt rotation.xvg} lists the angle with minimal potential energy.
\subsubsection*{Torque}
\label{torque}
The torque $\ve{\tau}(t)$ exerted by the rotation potential is calculated for fixed
axis rotation via
\beq
\ve{\tau}(t) = \sum_{i=1}^{N} \ve{r}_i(t) \times \ve{f}_{\!i}^\perp(t) ,
\label{eqn:torque}
\eeq
where $\ve{r}_i(t)$ is the distance vector from the rotation axis to
$\ve{x}_i(t)$ and $\ve{f}_{\!i}^\perp(t)$ is the force component
perpendicular to $\ve{r}_i(t)$ and $\hat{\ve{v}}$. For flexible axis
rotation, torques $\ve{\tau}_{\!n}$ are calculated for each slab using the