Enforced Rotation#

This module can be used to enforce the rotation of a group of atoms, as e.g. 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. 145.

../../_images/rotation.png

Fig. 45 Comparison of fixed and flexible axis rotation. 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). B: Fixed rotation around an axis v with a pivot point specified by the vector u. C: Subdividing the rotating fragment into slabs with separate rotation axes () and pivot points () for each slab allows for flexibility. The distance between two slabs with indices n and n+1 is Δx.#

../../_images/equipotential.png

Fig. 46 Selection of different rotation potentials and definition of notation. All four potentials V (color coded) are shown for a single atom at position xj(t). A: Isotropic potential Viso, B: radial motion potential Vrm and flexible potential Vflex, C–D: radial motion2 potential Vrm2 and flexible2 potential Vflex2 for ϵ=0nm2 (C) and ϵ=0.01nm2 (D). The rotation axis is perpendicular to the plane and marked by . The light gray contours indicate Boltzmann factors eV/(kBT) in the xj-plane for T=300K and k=200kJ/(molnm2). The green arrow shows the direction of the force Fj acting on atom j; the blue dashed line indicates the motion of the reference position.#

Fixed Axis Rotation#

Stationary Axis with an Isotropic Potential#

In the fixed axis approach (see Fig. 45 B), torque on a group of N atoms with positions xi (denoted “rotation group”) is applied by rotating a reference set of atomic positions – usually their initial positions yi0 – at a constant angular velocity ω around an axis defined by a direction vector v^ and a pivot point u. To that aim, each atom with position xi is attracted by a “virtual spring” potential to its moving reference position yi=Ω(t)(yi0u), where Ω(t) is a matrix that describes the rotation around the axis. In the simplest case, the “springs” are described by a harmonic potential,

(361)#Viso=k2i=1Nwi[Ω(t)(yi0u)(xiu)]2

with optional mass-weighted prefactors wi=Nmi/M with total mass M=i=1Nmi. The rotation matrix Ω(t) is

(362)#Ω(t)=(cosωt+vx2ξvxvyξvzsinωtvxvzξ+vysinωtvxvyξ+vzsinωtcosωt+vy2ξvyvzξvxsinωtvxvzξvysinωtvyvzξ+vxsinωtcosωt+vz2ξ)

where vx, vy, and vz are the components of the normalized rotation vector v^, and ξ:=1cos(ωt). As illustrated in Fig. 46 A for a single atom j, the rotation matrix Ω(t) operates on the initial reference positions yj0=xj(t0) of atom j at t=t0. At a later time t, the reference position has rotated away from its initial place (along the blue dashed line), resulting in the force

(363)#Fjiso=jViso=kwj[Ω(t)(yj0u)(xju)]

which is directed towards the reference position.

Pivot-Free Isotropic Potential#

Instead of a fixed pivot vector u this potential uses the center of mass xc of the rotation group as pivot for the rotation axis,

(364)#xc=1Mi=1Nmixiandyc0=1Mi=1Nmiyi0 ,

which yields the “pivot-free” isotropic potential

(365)#Visopf=k2i=1Nwi[Ω(t)(yi0yc0)(xixc)]2,

with forces

(366)#Fjisopf=kwj[Ω(t)(yj0yc0)(xjxc)].

Without mass-weighting, the pivot xc is the geometrical center of the group.

Parallel Motion Potential Variant#

The forces generated by the isotropic potentials (eqns. (361) and (365)) also contain components parallel to the rotation axis and thereby restrain motions along the axis of either the whole rotation group (in case of Viso) or within the rotation group, in case of Visopf.

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

(367)#ri=Ω(t)(yi0u)(xiu)

onto the plane perpendicular to the rotation vector,

(368)#ri:=ri(riv^)v^

yielding

(369)#Vpm=k2i=1Nwi(ri)2=k2i=1Nwi{Ω(t)(yi0u)(xiu){[Ω(t)(yi0u)(xiu)]v^}v^}2

and similarly

(370)#Fjpm=kwjrj

Pivot-Free Parallel Motion Potential#

Replacing in eqn. (369) the fixed pivot u by the center of mass xc yields the pivot-free variant of the parallel motion potential. With

(371)#si=Ω(t)(yi0yc0)(xixc)

the respective potential and forces are

(372)#Vpmpf=k2i=1Nwi(si)2
(373)#Fjpmpf=kwjsj

Radial Motion Potential#

In the above variants, the minimum of the rotation potential is either a single point at the reference position yi (for the isotropic potentials) or a single line through yi 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, Vrm and Vrm2, drastically reduce or even eliminate this effect. The first variant, Vrm (Fig. 46 B), eliminates all force components parallel to the vector connecting the reference atom and the rotation axis,

(374)#Vrm=k2i=1Nwi[pi(xiu)]2,

with

(375)#pi:=v^×Ω(t)(yi0u)v^×Ω(t)(yi0u) .

This variant depends only on the distance pi(xiu) of atom i from the plane spanned by v^ and Ω(t)(yi0u). The resulting force is

(376)#Fjrm=kwj[pj(xju)]pj.

Pivot-Free Radial Motion Potential#

Proceeding similar to the pivot-free isotropic potential yields a pivot-free version of the above potential. With

(377)#qi:=v^×Ω(t)(yi0yc0)v^×Ω(t)(yi0yc0),

the potential and force for the pivot-free variant of the radial motion potential read

(378)#Vrmpf=k2i=1Nwi[qi(xixc)]2,
(379)#Fjrmpf=kwj[qj(xjxc)]qj+kmjMi=1Nwi[qi(xixc)]qi.

Radial Motion 2 Alternative Potential#

As seen in Fig. 46 B, the force resulting from Vrm still contains a small, second-order radial component. In most cases, this perturbation is tolerable; if not, the following alternative, Vrm2, fully eliminates the radial contribution to the force, as depicted in Fig. 46 C,

(380)#Vrm2=k2i=1Nwi[(v^×(xiu))Ω(t)(yi0u)]2v^×(xiu)2+ϵ,

where a small parameter ϵ has been introduced to avoid singularities. For ϵ=0nm2, the equipotential planes are spanned by xiu and v^, yielding a force perpendicular to xiu, thus not contracting or expanding structural parts that moved away from or toward the rotation axis.

Choosing a small positive ϵ (e.g., ϵ=0.01nm2, Fig. 46 D) in the denominator of eqn. (380) yields a well-defined potential and continuous forces also close to the rotation axis, which is not the case for ϵ=0nm2 (Fig. 46 C). With

(381)#ri:=Ω(t)(yi0u)si:=v^×(xiu)v^×(xiu)Ψiv^×(xiu)Ψi:=1v^×(xiu)2+ϵ

the force on atom j reads

(382)#Fjrm2=k{wj(sjrj)[ΨjΨjrjΨj2Ψj3(sjrj)sj]}×v^.

Pivot-Free Radial Motion 2 Potential#

The pivot-free variant of the above potential is

(383)#Vrm2pf=k2i=1Nwi[(v^×(xixc))Ω(t)(yi0yc)]2v^×(xixc)2+ϵ.

With

(384)#ri:=Ω(t)(yi0yc)si:=v^×(xixc)v^×(xixc)Ψiv^×(xixc)Ψi:=1v^×(xixc)2+ϵ

the force on atom j reads

(385)#Fjrm2pf=k{wj(sjrj)[ΨjΨjrjΨj2Ψj3(sjrj)sj]}×v^+kmjM{i=1Nwi(siri)[ΨiΨiriΨi2Ψi3(siri)si]}×v^.

Flexible Axis Rotation#

As sketched in Fig. 45 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, eqns. (378) and (383) will now be generalized towards a “flexible axis” as sketched in Fig. 45 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. Fig. 45 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 Vflex by a Gaussian function

(386)#gn(xi)=Γ exp(βn2(xi)2σ2),

centered at the midplane of the nth slab. Here σ is the width of the Gaussian function, Δx the distance between adjacent slabs, and

(387)#βn(xi):=xiv^nΔx.
../../_images/gaussians.png

Fig. 47 Gaussian functions gn centered at nΔx for a slab distance Δx=1.5 nm and n2. Gaussian function g0 is highlighted in bold; the dashed line depicts the sum of the shown Gaussian functions.#

A most convenient choice is σ=0.7Δx and

(388)#1/Γ=nZexp((n14)220.72)1.75464,

which yields a nearly constant sum, essentially independent of xi (dashed line in Fig. 47), i.e.,

(389)#nZgn(xi)=1+ϵ(xi),

with |ϵ(xi)|<1.3104. 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 xcn, all atoms contribute by their Gaussian-weighted (optionally also mass-weighted) position vectors gn(xi)xi. The instantaneous slab centers xcn are calculated from the current positions xi,

(390)#xcn=i=1Ngn(xi)mixii=1Ngn(xi)mi,

while the reference centers ycn are calculated from the reference positions yi0,

(391)#ycn=i=1Ngn(yi0)miyi0i=1Ngn(yi0)mi.

Due to the rapid decay of gn, each slab will essentially involve contributions from atoms located within 3Δx from the slab center only.

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 (eqn. (378) / Fig. 46 B), yielding as the contribution of slab n

(392)#Vn=k2i=1Nwign(xi)[qin(xixcn)]2,

and a total potential function

(393)#Vflex=nVn.

Note that the global center of mass xc used in eqn. (378) is now replaced by xcn, the center of mass of the slab. With

(394)#qin:=v^×Ω(t)(yi0ycn)v^×Ω(t)(yi0ycn)bin:=qin(xixcn),

the resulting force on atom j reads

(395)#Fjflex=kwjngn(xj)bjn{qjnbjnβn(xj)2σ2v^}+kmjngn(xj)hgn(xh)i=1Nwign(xi)bin{qinβn(xj)σ2[qin(xjxcn)]v^}.

Note that for Vflex, as defined, the slabs are fixed in space and so are the reference centers ycn. If during the simulation the rotation group moves too far in 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 xc of the group from the positions,

(396)#x~i=xixc,\ \ \ and \ \ y~i0=yi0yc0,

such that

(397)#Vflext=k2ni=1Nwign(x~i)[v^×Ω(t)(y~i0y~cn)v^×Ω(t)(y~i0y~cn)(x~ix~cn)]2.

To simplify the force derivation, and for efficiency reasons, we here assume xc to be constant, and thus xc/x=xc/y=xc/z=0. The resulting force error is small (of order O(1/N) or O(mj/M) if mass-weighting is applied) and can therefore be tolerated. With this assumption, the forces Fflext have the same form as eqn. (395).

Flexible Axis 2 Alternative Potential#

In this second variant, slab segmentation is applied to Vrm2 (eqn. (383)), resulting in a flexible axis potential without radial force contributions (Fig. 46 C),

(398)#Vflex2=k2i=1Nnwign(xi)[(v^×(xixcn))Ω(t)(yi0ycn)]2v^×(xixcn)2+ϵ

With

(399)#rin:=Ω(t)(yi0ycn)sin:=v^×(xixcn)v^×(xixcn)ψiv^×(xixcn)ψi:=1v^×(xixcn)2+ϵWjn:=gn(xj)mjhgn(xh)mhSn:=i=1Nwign(xi)(sinrin)[ψiψirinψi2ψi3(sinrin)sin]

the force on atom j reads

(400)#Fjflex2=k{nwjgn(xj)(sjnrjn)[ψjψjrjnψj2ψj3(sjnrjn)sjn]}×v^+k{nWjnSn}×v^k{nWjnβn(xj)σ21ψjsjnSn}v^+k2{nwjgn(xj)βn(xj)σ2ψjψj2(sjnrjn)2}v^.

Applying transformation (396) yields a “translation-tolerant” version of the flexible2 potential, Vflex2t. Again, assuming that xc/x, xc/y, xc/z are small, the resulting equations for Vflex2t and Fflex2t are similar to those of Vflex2 and Fflex2.

Usage#

To apply enforced rotation, the particles i that are to be subjected to one of the rotation potentials are defined via index groups rot-group0, rot-group1, etc., in the mdp input file. The reference positions yi0 are read from a special trr file provided to grompp. If no such file is found, xi(t=0) are used as reference positions and written to trr such that they can be used for subsequent setups. All parameters of the potentials such as k, ϵ, etc. (Table 16) are provided as mdp parameters; rot-type selects the type of the potential. The option rot-massw allows to choose whether or not to use mass-weighted averaging. For the flexible potentials, a cutoff value gnmin (typically gnmin=0.001) makes sure that only significant contributions to V and F are evaluated, i.e. terms with gn(x)<gnmin are omitted. Table 17 summarizes observables that are written to additional output files and which are described below.

Table 16 Parameters used by the various rotation potentials. x indicate which parameter is actually used for a given potential#

parameter

k

v^

u

ω

ϵ

Δx

gnmin

mdp input variable name

k

vec

pivot

rate

eps

slab-dist

min-gauss

unit

kJmolnm2

-

nm

/ps

nm2

nm

-

fixed axis potentials:

eqn.

isotropic

Viso

(361)

x

x

x

x

-

-

-

— pivot-free

Visopf

(365)

x

x

-

x

-

-

-

parallel motion

Vpm

(369)

x

x

x

x

-

-

-

— pivot-free

Vpmpf

(372)

x

x

-

x

-

-

-

radial motion

Vrm

(374)

x

x

x

x

-

-

-

— pivot-free

Vrmpf

(378)

x

x

-

x

-

-

-

radial motion 2

Vrm2

(380)

x

x

x

x

x

-

-

— pivot-free

Vrm2pf

(383)

x

x

-

x

x

-

-

flexible axis potentials:

eqn.

flexible

Vflex

(393)

x

x

-

x

-

x

x

— transl. tol

Vflext

(397)

x

x

-

x

-

x

x

flexible 2

Vflex2

(398)

x

x

-

x

x

x

x

— transl. tol

Vflex2t

-

x

x

-

x

x

x

x


Table 17 Quantities recorded in output files during enforced rotation simulations. All slab-wise data is written every nstsout steps, other rotation data every nstrout steps.#

quantity

unit

equation

output file

fixed

flexible

V(t)

kJ/mol

see Table 16

rotation

x

x

θref(t)

degrees

θref(t)=ωt

rotation

x

x

θav(t)

degrees

(401)

rotation

x

-

θfit(t), θfit(t,n)

degrees

(403)

rotangles

-

x

y0(n), x0(t,n)

nm

(390),(391)

rotslabs

-

x

τ(t)

kJ/mol

(404)

rotation

x

-

τ(t,n)

kJ/mol

(404)

rottorque

-

x

Angle of Rotation Groups: Fixed Axis#

For fixed axis rotation, the average angle θ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,

(401)#θav=i=1Nri θi/i=1Nri .

Here, ri is the distance of the reference position to the rotation axis, and the difference angles θi are determined from the atomic positions, projected onto a plane perpendicular to the rotation axis through pivot point u (see eqn. (368) for the definition of ),

(402)#cosθi=(yiu)(xiu)(yiu)(xiu) .

The sign of θav is chosen such that θav>0 if the actual structure rotates ahead of the reference.

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 xi to the reference positions yi0 at t=0, yielding θfit as the angle by which the reference has to be rotated around v^ for the optimal fit,

(403)#RMSD(xi, Ω(θfit)yi0)=!min.

To determine the local angle for each slab n, both reference and actual positions are weighted with the Gaussian function of slab n, and θfit(t,n) is calculated as in eqn. (403) from the Gaussian-weighted positions.

For all angles, the mdp input option rot-fit-method controls whether a normal RMSD fit is performed or whether for the fit each position xi is put at the same distance to the rotation axis as its reference counterpart yi0. In the latter case, the RMSD measures only angular differences, not radial ones.

Angle Determination by Searching the Energy Minimum#

Alternatively, for 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 rotangles.log output file contains the values of the rotation potential at the chosen set of angles, while rotation.xvg lists the angle with minimal potential energy.

Torque#

The torque τ(t) exerted by the rotation potential is calculated for fixed axis rotation via

(404)#τ(t)=i=1Nri(t)×fi(t),

where ri(t) is the distance vector from the rotation axis to xi(t) and fi(t) is the force component perpendicular to ri(t) and v^. For flexible axis rotation, torques τn are calculated for each slab using the local rotation axis of the slab and the Gaussian-weighted positions.