<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="DE-CH" style="mso-fareast-language:EN-US">Hi Abhishek<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE-CH" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">The total stress tensor including the contributions from the kinetic energy and the constraints (e.g. during a NpT run) is written to the .stress file whereas only the (zero-T) stress
 tensor is written to the CP2K output file, which are basically the derivatives of the total energy wrt to the cell parameters as needed during a CELL_OPT run.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">HTH<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Matthias<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">"cp2k@googlegroups.com" <cp2k@googlegroups.com> on behalf of Abhishek Sharma <asharma.ms.in@gmail.com><br>
<b>Reply to: </b>"cp2k@googlegroups.com" <cp2k@googlegroups.com><br>
<b>Date: </b>Wednesday, 10 August 2022 at 16:12<br>
<b>To: </b>"cp2k@googlegroups.com" <cp2k@googlegroups.com><br>
<b>Subject: </b>[CP2K:17456] Different values of stress tensor from FORCE_EVAL and MOTION sections duing MD<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">Dear CP2K users,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">I am trying to monitor the stress tensor in my ab initio MD simulation in NPT ensemble using CP2K version 7.1. I wrote two print sections, one in FORCE_EVAL section (to print stress file) as<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;color:green">  &PRINT<br>
    &FORCES             ON<br>
      FILENAME          =forces<br>
    &END FORCES<br>
    &STRESS_TENSOR      ON<br>
        FILENAME        =stress<br>
    &END STRESS_TENSOR<br>
  &END PRINT<br>
  STRESS_TENSOR         ANALYTICAL</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">and another in PRINT of MOTION section (to get pressure file)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">...</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;color:green">        &STRESS<br>
            &EACH<br>
                MD 1<br>
            &END<br>
            FILENAME pressure<br>
        &END STRESS</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">After running the job , I got following output in the stress file:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:12.0pt"> </span><span style="font-size:10.0pt;color:green">STRESS TENSOR [GPa]</span><br>
<span style="font-size:10.0pt;color:green">            X               Y               Z<br>
  X       0.00106044     -0.00003023     -0.00393423<br>
  Y      -0.00003023      0.01251158      0.00014630<br>
  Z      -0.00393423      0.00014630      0.00717328<br>
  1/3 Trace(stress tensor):   6.91510096E-03<br>
  Det(stress tensor)      :  -9.84767286E-08<br>
 EIGENVECTORS AND EIGENVALUES OF THE STRESS TENSOR<br>
         -0.00086519      0.00909269      0.01251781<br>
<br>
          0.89817098     -0.43935160     -0.01609565<br>
         -0.00277868     -0.04228259      0.99910183<br>
          0.43963755      0.89731954      0.03919782<br>
  ==============================================================================<br>
   Stress Tensor Components (GPW/GAPW)<br>
                                                1/3 Trace           Determinant<br>
   Kinetic Energy Stress                       1.22833622            0.02852337<br>
   Basis Overlap Stress                        0.30458944            0.01186246<br>
   ES + XC Stress                          -1736.32537740      ****************<br>
   vdW correction (ff) Stress                 -0.00517761           -0.00000010<br>
   Local Pseudopotential/Core Stress          -0.88167272           -0.56052030<br>
   Nonlocal Pseudopotential Stress             2.92262879           20.96427765<br>
   Exact Exchange Stress                      -0.00000000           -0.00000000<br>
   Sum of Parts Stress                     -1732.75667328      ****************<br>
   Total Stress                                0.00785295           -0.00000014<br>
  ==============================================================================<br>
 STRESS TENSOR [GPa]<br>
            X               Y               Z<br>
  X      -0.05130320      0.02112443     -0.15716038<br>
  Y       0.02112443      0.07439468     -0.03381687<br>
  Z      -0.15716038     -0.03381687      0.04697689<br>
  1/3 Trace(stress tensor):   2.33561233E-02<br>
  Det(stress tensor)      :  -1.75455374E-03</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">while in pressure file I got following output<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;color:green"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;color:green">#   Step   Time [fs]            xx [bar]            xy [bar]            xz [bar]            yx [bar]            yy [bar]            yz [bar]            zx [bar]      
      zy [bar]            zz [bar]<br>
       0       0.000     2291.7724124002       -7.8261381151      -11.6256055821       -7.8261381151     2225.2853884787      190.2135354318      -11.6256055821      190.2135354318     2617.3106021379<br>
       1       0.500     1721.2682620818      206.1262199908    -1539.1469767016      206.1262199908     2804.1547381410     -143.2394364947    -1539.1469767016     -143.2394364947     2958.6420055205</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">Both files have values different units (GPa in stress file and bar in pressure file). After converting values to same unit (say bar) the xx stress value 10.60 bar (0.00106044 GPa) does not match with the value
 of  2291.77 bar in the pressure file. Can you please help me to understand this ? Am I doing something wrong in my input file. The print output of cell vectors from the MOTION section is following:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;color:green">#   Step   Time [fs]       Ax [Angstrom]       Ay [Angstrom]       Az [Angstrom]       Bx [Angstrom]       By [Angstrom]       Bz [Angstrom]       Cx [Angstrom]      
 Cy [Angstrom]       Cz [Angstrom]      Volume [Angstrom^3]<br>
       0       0.000       16.9813194275        0.0000000000        0.0000000000        0.0009342941       17.1132431030        0.0000000000       -0.0392083935        0.0056124185       17.0369434357          4951.0285723949<br>
       1       0.500       16.9878393880       -0.0026240361        0.0088682212       -0.0017097687       17.1090517191        0.0016270059       -0.0303270449        0.0072363688       17.0367331490          4951.6596469487</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">Many thanks ,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">Abhishek</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt">-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/f85026bf-7459-4b60-ae08-8af46c8876can%40googlegroups.com?utm_medium=email&utm_source=footer">
https://groups.google.com/d/msgid/cp2k/f85026bf-7459-4b60-ae08-8af46c8876can%40googlegroups.com</a>.<br>
<br>
<o:p></o:p></p>
</div>
</body>
</html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/D09FB1FE-74F7-4123-97BD-8D1191B8FD66%40psi.ch?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/D09FB1FE-74F7-4123-97BD-8D1191B8FD66%40psi.ch</a>.<br />