<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>SENSITIVITY ANALYSIS IN A PROBLEM OF REAXFF MOLECULAR-DYNAMIC FORCE FIELD OPTIMIZATION</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>K. S. Shefov</string-name>
          <email>k.s.shefov@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>M. M. Stepanova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>St. Petersburg State University</institution>
          ,
          <addr-line>7-9 University emb, St. Petersburg, 199034</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>595</fpage>
      <lpage>600</lpage>
      <abstract>
        <p>In a wide range of modern problems, it is required to estimate an influence of uncertainty of input parameters on uncertainty of an output value of a modeling function. In this contribution, we present algorithms for analyzing the sensitivity of a target function with respect to parameters in the problem of optimization of ReaxFF molecular-dynamic force field. In this particular case it allows one to effectively decrease the number of simultaneously optimized parameters. We compare the Sobol's global sensitivity indexes (SI) approach and the correlation analysis. Both methods are based on computations of the target function value on the set of pseudo- or quasi-randomly distributed points. The distribution derived is used for further computations of SI using Monte-Carlo technique and correlation coefficients. In the case of optimized ReaxFF force field one may spend up to several seconds to compute a value of the target function in a particular point. That is why it is important to perform calculations in parallel for multiple points. A parallel algorithm has been implemented in C++ using MPI. We compute Sobol's SI and coefficients of correlation of parameters variation and target function values variation while we optimize the force field for molecules and crystals of zinc hydroxide. We show that using of parameter set sorted by influence allows one to significantly increase convergence speed of the optimization algorithm and even completely exclude those parameters with relatively small influence.</p>
      </abstract>
      <kwd-group>
        <kwd>sensitivity analysis</kwd>
        <kwd>reactive force field</kwd>
        <kwd>molecular dynamics</kwd>
        <kwd>parameter optimization</kwd>
        <kwd>parallel algorithm</kwd>
        <kwd>scalability</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>In a wide range of modern problems, it is required to estimate the influence of the uncertainty
of the input parameters on the uncertainty in the output value of the modeling function. In this paper
there are presented algorithms of sensitivity analysis of an objective function to parameters in the
problem of optimization of the molecular-dynamic force field ReaxFF. In this particular case, this
effectively reduces the number of parameters simultaneously participating in the optimization. Two
approaches are compared: one based on Sobol’s global sensitivity indexes (SI) by and the other one
uses correlation analysis. A parallel program is presented, its scalability is studied, and the calculation
results for a particular task are given.</p>
    </sec>
    <sec id="sec-2">
      <title>2. The Problem</title>
      <p>A
molecular-dynamic force field is characterized by a number of parameters: 
=
 ( 1,  2, … ,   ). These parameters are set before solving the Newton’s equations of motion and do
not alter during the simulation. Their number ( ) may vary from 3 – 4 to several dozens. A procedure
of a force field parameters search for a particular simulated system is referred to as a force field
optimization. As a measure of optimality we use the parameter-dependent objective function (OF)
 ( 1,  2, … ,   ). The OF is determined by the deviation of any characteristics of the simulated system
obtained using the methods of MD, from those obtained by more accurate methods. The process of
optimization is to search the force field parameters that bring the OF the minimal value.</p>
      <p>
        As the MD force field  ( ⃗) we use ReaxFF (Reactive Force Field) that is able to simulate
chemical reactions [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. To optimize the OF we use the multifactorial global search algorithm (MGSA)
suggested by Strongin [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>The MGSA is able to simultaneously optimize relatively small number of parameters (the
optimal variant is 4). However, optimizing ReaxFF for a particular system may need the number of
parameters to be of several dozens. Therefore the parameters being searched are divided into groups,
e. g. of 4 pieces, which participate in the optimization. The question arises of how to sort the
parameters by groups, and also how to exclude parameters that almost do not affect the change in the
OF. This task could be solved with a help of sensitivity analysis. In this paper we consider the
correlation analysis and the method of Sobol’s sensitivity indices.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Correlation analysis</title>
      <p>The objective function for searching MD force field parameters is a sum of terms depending
on the parameters  1,  2, … ,   . The procedure of correlation analysis requires the following steps.</p>
      <p>1. Generate a sample of  (pseudo-)random sets of parameters  1, ,  2, , … ,   , , 1 ≤  ≤  ,
that are uniformly distributed over the search domain of the OF.</p>
      <p>2. For each set of parameters compute the OF value and record the values of particular terms.
One will obtain a 
× 
matrix of OF terms’ values, where 
is the number of terms of the OF. In
total, one has two matrices: the 
× 
matrix of parameters  and the 
×  matrix of OF terms  .
3. Normalize matrices  and  :
 
=</p>
      <p>−  ̅
√   ,</p>
      <p>Here  ̅ , ̅ are averages by columns,   , ,</p>
      <sec id="sec-3-1">
        <title>4. Calculate the</title>
        <p>× 
matrix</p>
        <p>, are dispersions by columns,  is the sample size.
=   ·  of cross-correlations of parameters change and
OF values change. The elements of the matrix,   , are cross-correlation coefficients.</p>
      </sec>
      <sec id="sec-3-2">
        <title>5. Sort the rows of the matrix</title>
        <p>by the greatest absolute value of element in a row in
descending order. Each row corresponds to a single parameter.
monotonically, which is not always the case.</p>
        <p>The correlation analysis will give good result only if the OF terms depend on the parameters

 =1  1&lt;⋯&lt; 
 ( ) =  0 + ∑
∑
  1,…, 
(  1, … ,   ) =</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Sobol sensitivity analysis</title>
      <p>in the unit cube   . Then its ANOVA (Analysis of Variances) decomposition is</p>
      <p>A more efficient technique for estimating the influence of variables on a function is the
calculation of global sensitivity indices (SI) suggested by I. Sobol and A. Saltelli [3]. The method of
sensitivity indices, in contrast to the correlation analysis, does not require the presence of a monotonic
dependence of the function on the variables.</p>
      <p>Let  ( ) be a function of several variables</p>
      <p>= ( 1,  2, … ,   ) defined and square integrable
=  0 + ∑   (  ) + ∑   (  ,   ) + ⋯ +  1,2,…, ( 1, … ,   ),
(1)

1</p>
      <p>&lt;
The global sensitivity indices are the dispersion ratios</p>
      <p>if  0 = ∫  ( ) , and ∫   1,…,
0

    = 0, when 1 ≤  ≤  . The inner sum in (1) is done by
all the  1, … ,   , that satisfy inequalities 1 ≤  1 &lt; ⋯ &lt;   ≤  .</p>
      <p>The decomposition (1) could be made with any complete orthonormal system of functions
 0( ),  1( ), … ,   ( ), … , that includes the function  0( ) ≡ 1.</p>
      <p>The quantities   1,…,  = ∫  21,…, 
(  1, … ,  

)   1, … ,   are called the dispersions. Here and

below the sign ∫ means integration from 0 to 1 by the corresponding variables. The quantity  =
∫ 2( )
−  02 is called the total dispersion. It is also true that.  = ∑ =1 ∑ 1&lt;⋯&lt;    1,…, .</p>
      <p>1&lt;⋯&lt;  =   1&lt;⋯&lt;  ⁄ .</p>
      <p>In application single-dimension sensitivity indices   are most often used. With their help one
is able to sort variables   : the bigger is   , the more influential is the variable   .</p>
      <p>Let us consider an arbitrary group of variables   1, … ,    , where 1 ≤  1 &lt; ⋯ &lt;  
≤  ,
1 ≤  ≤  − 1. We shall denote them by a single letter 
= (  1, … ,    ); and let  be the
aggregate of all the rest  – 
variables. Thus, 
= ( ,  ). With 
let us denote the aggregate of
indices ( 1, … ,   ). For the set  let us introduce two types of global SI:
1 ≤  ≤  .</p>
    </sec>
    <sec id="sec-5">
      <title>5. LPτ Sequences</title>
      <p>1
2
  = ∑   1,…,  ,</p>
      <p>tot = ∑   1,…,  .</p>
      <p>In   the summation is produced for all the groups of  1, … ,   , where all the   ∈  . In   tot
the summation is produced for all the groups of  1, … ,   so that at least one index   ∈  .</p>
      <p>One is able to calculate the SI   and   tot by integrating using (pseudo/quasi) Monte Carlo
technique. Let  and  ′ be the points of   and let  = ( ,  ), and  ′ = ( ′,  ′). In the paper [3] it is
shown that
  = ∫  ( ) ( ,  ′)</p>
      <p>′ −  02,
  tot =
∫[ ( ) −  ( ′,  )]2</p>
      <p>′ =  +  02 − ∫  ( ′) ( ,  ′)  ′ .</p>
      <p>In order to compute all the one-dimensional ( = (  )) SI   and   tot, in each sample of the
Monte Carlo method one needs to use two n-dimensional random points  and  ′ and calculate the
value of the function  + 2 times:  ( ),  ( ′), and   =  ( 1′, … ,  ′ −1,   ,  ′ +1, … ,  ′ ), when</p>
      <p>
        One may select the points of parameters in a pseudo-random way, but it will not provide a
uniform cover of the whole unit cube   . The alternative is to use LPτ sequences [
        <xref ref-type="bibr" rid="ref3">4</xref>
        ]. These strictly
ordered sequences are based on multiple binary division of the domain by all the dimensions. They
allow one to construct a mesh on a hypercube so that the mesh nodes fill it as uniformly as possible.
      </p>
      <p>Let us compare a mesh of 16 points of this sequence with the simple cubic mesh for the square
(Figure 1). The points of the simple mesh allow one to calculate function values only in 4 different
values of each of the two variables. The mesh built by LPτ allows one to obtain function values in 16
different values of each variable for the same total number of points. Thus, LPτ provides more
efficient distribution of points.</p>
      <p>1
0</p>
      <p>1
1
0</p>
      <p>1</p>
    </sec>
    <sec id="sec-6">
      <title>6. Implementation and Scalability</title>
      <p>
        We implemented parallel programs for sensitivity analysis in C++ using MPI technology. The
use of sensitivity analysis in the problem of ReaxFF force field optimization has an important feature
that the time of calculation of a single OF value significantly exceeds the time of all other operations,
i. e. data exchange between processes of interaction with the file system. OF values are computed with
the help of LAMMPS molecular dynamic simulation library [
        <xref ref-type="bibr" rid="ref4">5</xref>
        ]: it calculates values of energies and
forces for several dozens of molecules.
      </p>
      <p>In Figure 2 the general scheme of the
implemented programs is presented. In both cases
(correlation analysis and sensitivity indices
approach) the scheme is the same. At first one
generates an array of N-dimensional points
(ReaxFF parameters). The array is divided into
equal parts between all the parallel processes and is
sent between them to compute the OF values.</p>
      <p>In the stage of OF values calculation the
data exchange is not needed. Each process
computes the values independently. The calculated
OF values are gathered by the main process which
computes correlation coefficients and Sobol’s SI.</p>
      <p>Due to no data exchange in the main loop of the Figure 2. General scheme of programs
programs good scalability is expected. This was
verified on a cluster of the following configuration.
14 nodes: 2 × 4 core CPU Intel® Xeon® E5335 2.00 GHz, 16 GB RAM; 112 cores in total;
OS: CentOS Linux 7 (Core); MPICH2 v1.4.1p1.</p>
      <p>Hardware is provided by Resource Center Computer Center of St. Petersburg State University.
We measured the dependence of acceleration of programs’ time of operation on the number of CPU
cores in use for 1, 7, 14, 28, 56, and 112 pieces. The computations we done for 112 points of the
search domain; when using all the 112 cores, we had one point per process. The average time of
computation of a single OF value by a single process is 12.4 seconds.
7. Application</p>
      <p>The programs presented have been applied to sensitivity analysis of the objective function to
the parameters of ReaxFF force field in its optimization for Zn – O – H compounds.</p>
      <p>The sensitivity indices (SI) and correlation coefficients (CC) calculation is performed for 58
parameters on 130000 points. The diagram on Figure 4 depicts relative values of SI and CC for 24
parameters of ReaxFF. For the unity we take the greatest SI in the first case, and the greatest CC in the
second case. The parameters on the diagram are sorted by SI in descending order. On the chart for CC
white hatching highlights those parameters that were not included in the first 24 in the correlation
analysis. The number of such parameters is not large relative to the length of the whole list. One has to
note that 5 parameters with the greatest CC are also located in the beginning of the list by SI. In
general, the order of the parameters for the SI and CC is noticeably different.</p>
      <p>AlphavdW_Zn-O</p>
      <p>RvdW_Zn-O</p>
      <p>Rsig_Zn-O
EvdW_Zn-O</p>
      <p>RvdW_Zn</p>
      <p>ChiEEM_O
AlphavdW_Zn</p>
      <p>EtaEEM_O
EtaEEM_Zn</p>
      <p>Pbo1_Zn-O
GammaEEM_O</p>
      <p>Rsig_Zn</p>
      <p>ChiEEM_Zn
GammaEEM_Zn</p>
      <p>Pbo2_Zn-O</p>
      <p>RvdW_O</p>
      <p>EvdW_Zn
Pbe2_Zn-O</p>
      <p>Pbe1_Zn-O
AlphavdW_O</p>
      <p>Rsig_O
Pval2_O-Zn-O
Pval1_Zn-O-Zn
Pval4_O-Zn-O
1E-3
0.01
0.1
1
0.0
0.5
1.0</p>
      <sec id="sec-6-1">
        <title>Relative Sensitivity Indices</title>
      </sec>
      <sec id="sec-6-2">
        <title>Relative Correlation Coefficients</title>
        <p>Using MGSA method we perform ReaxFF optimization by 24 parameters: first with the
greatest CC, then with the greatest SI. The optimization is done in groups of 4 parameters. The
sequence of the groups is defined by sorting the parameters by CC and SI, respectively. The loop of
groups is repeated until the difference of OF values of the two consecutive iterations becomes less
than a predefined tolerance. If the order of the groups in the optimization is defined by CC, the
algorithm requires 2.5 loop passes to converge. When the order is defined by SIs, the algorithm needs</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>8. Conclusion</title>
      <p>Sensitivity analysis is useful in the problem of optimizing of a large number of parameters of
ReaxFF force field in groups. The approach allows one to exclude those parameters that have little
influence on the objective function and also effectively sort them by influence.</p>
      <p>The developed parallel program for Sobol sensitivity indices and correlation coefficients
calculation is effectively scalable on a computational cluster.</p>
      <p>To sort the parameters in ReaxFF optimization for zinc — oxygen — hydrogen compounds it
is better to use Sobol sensitivity analysis than the correlation analysis, since the procedure converges
faster in the first case.
[3] Sobol’ I. M, Global’nye pokazateli chuvstvitelnosti dlya izucheniya nelineynykh
matematicheskikh modeley [Global sensitivity indices for exploration of non-linear mathematical
models] // Matematicheskoye modelirovanie [Mathematical modeling] — 2005. — Vol. 17 (9). — P.
43 – 52. (in Russian)</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>K.</given-names>
            <surname>Nomura</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. K.</given-names>
            <surname>Kalia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Nakano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Vashishta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. L.</given-names>
            <surname>Landa</surname>
          </string-name>
          .
          <article-title>A scalable parallel algorithm for large-scale reactive force-field molecular dynamics simulation // Comp</article-title>
          . Phys.
          <string-name>
            <surname>Comm</surname>
          </string-name>
          .
          <article-title>-</article-title>
          <year>2008</year>
          . - Vol.
          <volume>178</volume>
          (
          <issue>2</issue>
          ). - P.
          <fpage>73</fpage>
          -
          <lpage>87</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Stepanova</surname>
            <given-names>M.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shefov</surname>
            <given-names>K.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Slavyanov</surname>
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>Multifactorial global search algorithm in the problem of optimizing a reactive force field // Theoretical</article-title>
          and Mathematical Physics.
          <article-title>-</article-title>
          <year>2016</year>
          . - Vol.
          <volume>187</volume>
          , Issue 1. - P.
          <fpage>603</fpage>
          -
          <lpage>617</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Sobol' I. M.</given-names>
            ,
            <surname>Statnikov R</surname>
          </string-name>
          . B.
          <article-title>Vybor optimal'nykh parametrov v zadachakh so mnogimi kriteriyami [Choise of optimal parameters in problems with multiple criteria]</article-title>
          . - M.: «Drofa».
          <year>2006</year>
          . - 175 p.
          <article-title>(in Russian)</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [5] LAMMPS package: https://lammps.sandia.
          <source>gov/ (accessed 30.09</source>
          .
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>