Professional Documents
Culture Documents
¨ Polymerforschung,
* Present address: Max-Planck-Institut fur
Ackermannweg 10, D-55128 Mainz, Germany.
Correspondence to: W. F. van Gunsteren.
Journal of Computational Chemistry, Vol. 18, No. 12, 1484 ]1495 (1997)
Q 1997 John Wiley & Sons, Inc. CCC 0192-8651 / 97 / 121484-12
FE INTERPOLATION OF QM / MM SIMULATIONS
als are easy to derive. They are also considered to and j at the positions p i and p j , the energy Em of
lead to earlier interpolations in an MD simula- the midpoint of the connecting edge can be esti-
tion because fewer vertices are needed to form an mated by a third-order polynomial, using the ener-
element. gies Ei and Ej and directional derivatives Ž Er
The main difference from FEs methods as used p . p i and Ž Er p . p j along the edge p s p i y p j .
traditionally is the triangulation, which is not
known in advance but is progressively built up, 1 E E
Em s y < pi y p j <
point by point, during the simulation. Thus, it is
impossible to select an optimum grid with ele- 8 žž / ž / /
p pj p pi
E s C1 q r 1C2 q r 12 C3 q r 2 C4 q r 22 C5 q r 1 r 2 C6 s 1 y 3r 1 q 2 r 12 y 3r 2 q 2 r 22 y 3r 3
q r 3 C 7 q r 32 C8 q r 1 r 3 C9 q r 2 r 3 C10 . Ž1. q 2 r 32 q 4 r 1 r 2 q 4 r 1 r 3 q 4 r 2 r 3 ,
The polynomial has 10 unknown coefficients CŽ1, 0, 0. Ž r 1 , r 2 , r 3 . s yr1 q 2 r 12 ,
C1 ]C10 that have to be determined from informa-
tion at the vertices. Using the energies and gradi- CŽ0, 1, 0. Ž r 1 , r 2 , r 3 . s yr 2 q 2 r 22 ,
ents, which are needed for the MD part of the CŽ0, 0, 1. Ž r 1 , r 2 , r 3 . s yr 3 q 2 r 32 ,
simulation, yields 16 knowns Žone energy and three
gradient components at four vertices.. The infor- CŽ1r2, 0, 0. Ž r 1 , r 2 , r 3 . s 4 r 1 y 4 r 12 y 4 r 1 r 2 y 4 r 1 r 3 ,
mation is reduced in the following way. Using the
energies and gradients at every pair of vertices i CŽ0, 1r2, 0. Ž r 1 , r 2 , r 3 . s 4 r 2 y 4 r 22 y 4 r 1 r 2 y 4 r 2 r 3 ,
CŽ0, 0, 1r2. Ž r 1 , r 2 , r 3 . s 4 r 3 y 4 r 32 y 4 r 1 r 3 y 4 r 2 r 3 , instead. The energy and its derivatives are then
calculated rather than interpolated.
CŽ1r2, 1r2, 0. Ž r 1 , r 2 , r 3 . s 4 r 1 r 2 ,
CŽ1r2, 0, 1r2. Ž r 1 , r 2 , r 3 . s 4 r1 r 3 ,
Adding Elements to the Triangulation
CŽ0, 1r2, 1r2. Ž r 1 , r 2 , r 3 . s 4 r 2 r 3 , Ž3.
Using the list of neighboring vertices, all possi-
where the index of C denotes at which point of ble combinations of vertices that may form new
the master element the shape function has the elements with the new point are generated and
value of unity. examined whether a valid and well-shaped ele-
Any irregular FE can be transformed into the ment is formed. However, the number of possible
master element by a coordinate transformation combinations rises dramatically with the number
Žtranslation, followed by a shear rotation.. The of neighbors. Because the element validity checks
transformation of the point p t subjected to interpo- are not straightforward, the evaluation of the large
lation is achieved by the matrix operation amount of possible elements may become slow
and most of the proposals will be rejected anyway.
p M s My1 Ž p t y p 0 . , Ž4.
So it would be advantageous to reduce the num-
with the transformation matrix M defined by the ber of neighbors by removing those that will not
translated vertices of the triclinic element, form well-shaped elements. Hence, the following
filters are applied to reduce the number of neigh-
M s ŽŽ p 1 y p 0 .Ž p 2 y p 0 .Ž p 3 y p 0 .. , Ž5. boring vertices, the number of proposed elements,
where the p 0 to p 3 are the positions of the vertices the number of new elements that are ultimately
of the triclinic element. The point p M then has the added to the triangulation, and to optimize the
same relative position in the master element as the overall triangulation.
point p t has in the triclinic element. The energy Remapping. The space spanned by dihedral an-
and the gradient of the transformed point are then gles is actually cyclic Žperiodic.. This property was
calculated using the interpolation polynomial. The not implemented in the current version. Instead,
energy can be taken directly from the master ele- undesirable consequences are circumvented with
ment because it is invariant under coordinate little effort: the borders of the conformation space
transformation. However, the gradient requires actually considered are shifted in such a way that
backtransformation to the irregular element. This
they come to lie in regions of high energy where
is achieved by the matrix operation
few points are encountered and probably no ele-
y1 ments can be installed. Otherwise, if the borders
g t s ŽM T . gM . Ž6.
lie in densely populated regions, there would be
many elements prevented from extending over the
BUILDING UP THE MESH borders. This technique was found to be very ef-
fective in practice. However, it is only applicable if
Finding the Element that Contains the
the regions of high energy are known in advance.
New Point
This is the case in the current test system.
To find the element that contains the new point,
the known vertices are scanned. Only vertices that Shielding. In MD simulations the trajectory of-
are nearer than a certain cutoff distance Žmaxi- ten forms a more or less straight line that leads to
mum element edge length. are considered and elements that will either have bad angles or form
added to a list of neighbors. As soon as a vertex is narrow tubes along the trajectory path, preventing
part of any element, it is checked whether the better elements from being built later. Shielding
point lies within it or not. If it does, the desired means that of the neighbors that are less than a
element is found and an interpolation is carried certain angle apart Ž158., viewed from the central
out. If not, the element that lies on the opposite Žnew. point, only the nearest can be seen. Thus, a
side of the face of the current element, of which neighbor is interpreted as a diffuse cloud that is
the point is found to lie outside, if it exists, is able to shield other neighbors behind it. The
checked next. Moreover, all elements already ex- shielded points are then removed from the neigh-
amined are flagged to prevent a second evalua- bor list. In general, the reduction of neighbors
tion. If no appropriate element is found, a com- makes the combinatorics to form elements more
plete list of neighboring vertices is established efficient. The number of neighbors is heavily
reduced by this relatively simple criterion. As a is useful to obtain an efficient and accurate inter-
consequence, the number of combinations that may polation.
span elements becomes dramatically smaller.
Shadowing. Shadowing consists of removing all
the neighbors that lie behind an existing or newly
Results and Discussion
constructed element, viewed from the new point. MODEL SYSTEM ‘‘HEXA-ARGANE’’
Such points cannot be connected to form an edge.
The concept of shadowing is needed to avoid A very simple molecular system was chosen to
triangulation violations such as intersecting test the method. It consists of a chain of argon
elements. atoms in a solution of fluid argon. The ‘‘argane’’
chain has three dihedral angles, indicated by r 1 ,
Distance Ordering. An ordering of the neighbors r 2 , and r 3 , that span the conformation space for the
with increasing distance from the new point is FE interpolation. All other internal degrees of free-
needed to prevent big elements from being built dom, such as bond lengths and bond angles, are
that enclose nearer points. After sorting the neigh- held fixed by constraints. The dynamics of the
bors, it is guaranteed that smaller elements are molecule is governed by arbitrarily chosen poten-
established, if successfully passing through the tial energy functions imposed on the dihedral
other restrictions, before larger ones are consid- angles.
ered. All atoms Žsolute and solvent. are argon atoms
Bad Angle Rejection. Elements with very acute with mass m s 39.948 amu and Lennard]Jones
Ž- 158. or very obtuse angles Ž) 1658. are neither parameters « s 0.996 kJrmol and s s 0.341 nm.
suited for interpolation nor for the handling of the All bond lengths are constrained10 to 0.148 nm,
elements. Thus, such bad-shaped elements have to bond angles to 1208. The potential energy func-
be intercepted. Unfortunately, a simplex has many tion imposed on the dihedral angles ri reads
angles that all have to be tested, except the ones EŽ ri . s 2.5 kJrmol ? Ž1 y cosŽ2 ri .. on every dihe-
involving the new vertex as the middle point, dral, which means a two-well potential energy
which were already eliminated by the shielding function Žminima 08, cis, and 1808, trans. with a
procedure. barrier of 5 kJrmol in between. No other in-
Triangulation Consistency Checks. In rare cases it tramolecular interactions are taken into account.
is possible that some neighbors that would lead to The following parameters were used in all sim-
a wrong triangulation are not eliminated by the ulations unless explicitly indicated. A periodic
foregoing filters. Thus, another triangulation con- cubic box of 2.15-nm edge length was used, con-
sistency check is needed. For that reason, the fact taining 216 solvent argon atoms and one hexa-
is used that a face of a simplex, defined by n of its argane molecule Ždensity 1.4818 grcm3 .. The
vertices, always has two distinct sides that can be leapfrog integration time step was 0.01 ps. Non-
occupied by two neighboring elements. Whether bonded forces were cut off at 1 nm distance. For
the element being built up would lie on the same NVT simulations, the system was weakly coupled
side as an existing element is examined. If so the to a temperature bath at 300 K with 1 ps relaxation
element is rejected. time.11 Two hundred thousand MD steps were
performed, equivalent to a total simulation time
Gradient Accuracy Checks. Unlike the energy, the of 2 ns. The relative geometric tolerance in the
gradient is not continuous over the elements’ SHAKE10 procedure was set to 10y6 .
boundaries using a quadratic polynomial for inter-
polation. To make sure that the gradient disconti-
SIMULATIONS IN NVE ENSEMBLE
nuity is not too large, the new element is rejected
if, at any vertex, the deviation of the interpolated Simulations in the NVE ensemble were per-
gradient from the one explicitly calculated Žwhen formed to examine the energy conservation using
the vertex was added. exceeds a certain limit, here the interpolation scheme. Moreover, it was checked
1% of the maximum force. This filter allows the whether the interpolation would significantly
use of larger elements without making the interpo- change the dynamic and static properties of the
lations less accurate. isomerization. A reference simulation without in-
There may be redundancy in applying all these terpolations was performed.
filters. However, it has been found that every filter The simulations with interpolations all lost more
is necessary to obtain a correct triangulation and energy than the reference simulation did ŽTable I..
However, no trend was visible among the simula- the error bars. The two outer dihedrals should
tions using different element sizes. This is in strong yield equal values due to symmetry. This is ap-
contrast to simulations without applying the gra- proximately achieved.
dient accuracy check Žnot shown., in which the
drift increased dramatically with the larger ele-
ments. PERFORMANCE AND ACCURACY OF
To get the correlation time Žrelaxation time. of FE INTERPOLATION
the dihedrals remaining in either the cis or the Different maximum element sizes were used to
trans conformation, each of the three dihedral an- investigate the performance Žnumber of interpola-
gles was mapped to a state function that is 1 for a
tions per MD step, ratio of interpolations to ex-
cis configuration Ž< ri < - 908., or 0 for a trans angle
plicit calculations. and the accuracy Ždeviation of
Ž< ri < G 908.. The autocorrelation of this function can
the interpolated to the calculated value. of the
be well fitted by a stretched exponential function,
interpolation. To check the accuracy all interpola-
expŽyŽ tra . b .. The integral of this function is ana-
lytically available and determines the relaxation tions were compared to the true value which was
time t s H0`expŽyŽ tra . b . dt s arb G Ž1rb .. calculated in addition to the interpolation. If the
To obtain the uncertainty of the cis fraction and deviation between calculated and interpolated gra-
the correlation time, the trajectory was split into dient exceeded the limit of 0.05 kJrŽmol rad., this
five parts and each of these was analyzed by the value was identified as inaccurate. Inaccurate gra-
same procedure as the entire trajectory Žjackknife dients occurred in larger numbers with larger ele-
method12 .. The standard deviation of these five ments. The employed quadratic interpolation poly-
values is indicated in Table I and serves as a nomial did not fit the cosine type potential energy
measure of reliability of the corresponding aver- surface of the dihedral angle well if the mesh
age. Figure 1 shows that the correlation times for points were far apart. Yet, the interpolated ener-
various element sizes differ from each other within gies were mostly very accurate. The maximum
TABLE I.
Energetics and Static and Dynamic Properties of Hexa-Argane Test System, Using Different Maximum Edge
Lengths of Elements.
Max. Total Energy (kJ / mol)
Simplex Correlation Time t
Edge Length cis Fraction (ps)
RMS
(rad) Average Fluctuation Drift Average SD Average SD
FIGURE 1. Correlation times of the isomerization dynamics of hexa-argane at different maximum lengths of an
element edge used in an MD simulation in the NVE ensemble. (l): Inner dihedral; (', %): outer dihedrals. Error bars
given by the standard deviation of Table I.
deviation in energy is indicated in Table II; it size. However, there seemed to be a best value
becomes noticeable only for the biggest elements. around 0.6 rad maximum edge length. The slight
The gradient inaccuracy introduced by the interpo- decline with the largest elements was probably
lation reaches a nonnegligible limit with a maxi- due to the inaccuracy checks. Most of the very
mum edge length of an element of 0.6 rad and large elements failed the test and were not used.
larger, although the dynamics did not seem to be The introduction of the accuracy tests greatly
affected. enhanced the accuracy of the interpolation, com-
As expected, the performance of the interpola- pared to that found in an earlier study,13 where
tion scheme became better with increasing element the maximum interpolations per step performance
TABLE II.
Finite Elements Interpolation Performance for NVE MD Simulations of 200,000 Steps.
Max. Largest
Simplex Interpolations / MD Energy Inaccurate
Edge Length Final Numbers of Step Ratio Interpolations / Explicit Difference Gradients
(rad) Interpolations Vertices Elements (%) Calculation (kJ / mol) (%)
of 56% was accompanied by a ratio of inaccurate The benefits of the preceding MC simulation are
interpolations of 61% when using 0.6 rad elements. clearly visible when comparing Tables II and IV.
Although more points in the conformation space
are considered because of the additional MC simu-
MD WITH PRECEDING MONTE CARLO (MC) lation, the total number of explicit calculations is
It was found that an MC simulation,14 per- generally slightly smaller. A value of 0.4 rad is the
formed prior to the MD simulation was particu- most favorable maximum element size. The per-
larly useful in triangulating the conformation space formance is at the maximum Žor at least nearly.,
in regions of low energy efficiently and thus led to and the inaccuracy is at a negligible level. Using
enhanced performance. The maximum MC step larger elements, the inaccuracy grows to a critical
size was chosen to be the maximum length of an level, and the performance does not improve any
element edge to ensure that two consecutive points more.
could always be connected to form an edge. The Comparing the statistics of the FE system be-
points that were rejected by the MC criterion were tween simulations with and without preceding
still used as candidate vertices. The irregular path- MC grid preparations, one can see that the MC
way of an MC simulation allowed a more efficient grid generations indeed leads to an improved
tiling than the often straight MD trajectories. In the mesh: fewer elements lead to more interpolations.
following simulations 50,000 MC steps were fol- This means that the individual elements are bigger
lowed by 200,000 steps of MD. For these simula- but still allow the same accuracy, because the
tions, the system was weakly coupled11 to an ex- deviations in energy and forces remain approxi-
ternal heat bath at 300 K ŽNVT simulation.. The mately the same.
drift in energy became smaller by doing so The preceding MC simulation was carried out
ŽTable III., but the isomerization dynamics were at 100 and 300 K for each series of simulations
not influenced. with different maximum lengths of an element
TABLE III.
Energetics and Static and Dynamic Properties of Hexa-Argane Test System.
Max
Simplex Total Energy Correlation
Edge Length (kJ / mol) Time
cis
(rad) Average Fluctuation Drift Fraction (ps)
TABLE IV.
Finite Elements Interpolation Performance for NVT MD Simulations at 300 K with Preceding MC Simulation
at 100 or 300 K.
Max.
Simplex Largest
Edge Interpolations / MD Energy Inaccurate
Length Final No. Step Ratio Interpolations / Explicit Difference Gradients
(rad) Interpolations Vertices Elements (%) Calculations (kJ / mol) (%)
100 K MC Temperature
300 K MC Temperature
edge. The lower MC temperatures allowed a more reached but sometimes visited high-energy regions
concentrated sampling of the low energy regions. that were not useful in the MD simulation after-
However, care must be taken that all low energy ward. This observation is confirmed by the results
regions were visited. The 300 K MC simulation did in Table V. A very good performance is obtained
not bias the ensemble of the conformation points in the 100 K MC part. However, the FE system is
TABLE V.
Snapshots of the Time Evolution of Finite Element Interpolation Grid for MD Simulation with Preceding
MC Simulation.
Interpolations / MD
No. Steps No. of Step Ratio Interpolations / Explicit
and Type Interpolations Vertices Elements (%) Calculation
less well prepared for the follow-up MD part, as spite of the long simulation, saturation Žno more
indicated by the interpolation per step ratio of the new vertices and elements. is not yet reached.
first 50,000 MD steps that is lower than in the
example with a 300 K MC preparation. Looking at FE MESH HANDLING TIMING PROFILE
the overall performance, the 100 K preparation
exceeds the results of the 300 K simulation for up To get an idea of how much computer time the
to 100,000 steps. This is because the 100 K MC part different parts of the interpolation method con-
requires only about one-third of the calculations sume, the MC simulation at 300 K with a maxi-
that the 300 K MC part requires. Different snap- mum element edge length of 0.4 rad has been
shots from the simulations are shown in Table V. profiled ŽTable VI.. On average, the FE part con-
The differences are less pronounced for longer sumes 13% of the time Žincluding all interpola-
tions, but not explicit calculations., which is
simulations. So using a lowered MC temperature
affordable. The timings are split up into simulation
is especially effective for shorter MD simulations.
blocks of 10,000 steps and into the key tasks of the
The time evolution of the FE interpolation grid
FE mesh handling. In general, the processing time
is shown in Figure 2. In the step range less than
increases as the mesh grows. However, this is not
zero, an MC grid generation took place. The num-
true for the triangulation checks, for which large
ber of interpolations is reset at step zero when the fluctuations are observed. This is probably due to
MD started to separate the performance of the two the current environment of the new points, be-
parts. The number of elements grows very quickly cause it requires more time to establish a correct
and shows only a slight tendency to grow slower. triangulation in a region already densely popu-
On the other hand, the number of vertices is flat- lated than in a region visited for the first time. The
tening, which is in agreement with the increasing other quantities do not depend on the surrounding
number of interpolations. The number of interpo- mesh. The increasing time is due to the growing
lations grows nearly linearly, with a slightly in- numbers of elements to be considered.
creasing trend. Clearly visible is the increased The triangulation checks are the most time con-
growth in the MD part Žlarger slope.. However, in suming, which is in accordance with the complex
FIGURE 2. Time evolution of the finite element interpolation grid. A 300 K MC grid preparation is shown in the
negative step range; MD starts at 0. Maximum length of an element edge is 0.4 rad.
TABLE VI.
Timings of Different Parts of the FE Mesh Handling on Sun Ultra 1 (200 MHz).
calculations that are involved. The accuracy checks higher dimensional cases were neither tested nor
are relatively cheap but enable a much more effi- studied. However, no fundamental problems
cient interpolation Žsee above.. The time required should arise when generalizing to more dimen-
to find the element enclosing a point is nicely sions. The method was shown to work properly
proportional to the number of vertices, which is and efficiently. No significant deviations in static
clearly a consequence of the way of finding it by and dynamic properties were observed between
scanning the vertices. simulations with and without interpolations. How-
ever, in explicit comparisons of forces, inaccurate
interpolations were no longer negligible if the
Conclusions maximum edge lengths of simplex elements be-
came larger than 0.4 rad.
An interpolation scheme has been developed Using the largest maximum edge lengths that
with the enhancement of efficiency of combined guarantee accurate forces, nearly 50% of the re-
quantum-chemicalrclassical MD simulations Žhy- quired Žquantum. calculations could be replaced
brid models. in mind. The method is based on FE by cheap interpolations in pure MD simulations.
interpolation, which is able to treat the irregular This corresponded to an interpolation per explicit
nature of the triangulation of the conformation calculation ratio of about 0.9. The performance
space of a molecule that takes part in a chemical could be further enhanced by preceding the MD
reaction. Irregular tetrahedra were used as FEs. simulation by an MC mesh generation. Then the
The method was tested for a 3-dimensional case interpolation per explicit calculation ratio could be
with a simple system. Although the program increased to 1.5 Žmore than 70% interpolations in
was implemented for multiple dimensions, 4- and the MD part.. For short MD simulations, a reduc-