<div dir="ltr">Many thanks Matthias for your reply</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 10, 2022 at 4:04 PM Krack Matthias (PSI) <<a href="mailto:matthias.krack@psi.ch">matthias.krack@psi.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div style="overflow-wrap: break-word;" lang="en-CH">
<div class="gmail-m_-4637875490102466931WordSection1">
<p class="MsoNormal"><span lang="DE-CH">Hi Abhishek<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="DE-CH"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">HTH<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Matthias<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:36pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">"<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>" <<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>> on behalf of Abhishek Sharma <<a href="mailto:asharma.ms.in@gmail.com" target="_blank">asharma.ms.in@gmail.com</a>><br>
<b>Reply to: </b>"<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>" <<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>><br>
<b>Date: </b>Wednesday, 10 August 2022 at 16:12<br>
<b>To: </b>"<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>" <<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>><br>
<b>Subject: </b>[CP2K:17456] Different values of stress tensor from FORCE_EVAL and MOTION sections duing MD<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt">Dear CP2K users,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt">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<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt">...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;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><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt">and another in PRINT of MOTION section (to get pressure file)</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt">...</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;color:green">        &STRESS<br>
            &EACH<br>
                MD 1<br>
            &END<br>
            FILENAME pressure<br>
        &END STRESS</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt">After running the job , I got following output in the stress file:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:12pt"> </span><span style="font-size:10pt;color:green">STRESS TENSOR [GPa]</span><br>
<span style="font-size:10pt;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><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt">while in pressure file I got following output<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;color:green"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;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><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt">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:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;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><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt">Many thanks ,</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt">Abhishek</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-left:36pt">-- <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" target="_blank">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" target="_blank">
https://groups.google.com/d/msgid/cp2k/f85026bf-7459-4b60-ae08-8af46c8876can%40googlegroups.com</a>.<br>
<br>
<u></u><u></u></p>
</div>
</div>


<p></p>

-- <br>
You received this message because you are subscribed to a topic in the Google Groups "cp2k" group.<br>
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/cp2k/QYumahu4sRk/unsubscribe" target="_blank">https://groups.google.com/d/topic/cp2k/QYumahu4sRk/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com" target="_blank">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" target="_blank">https://groups.google.com/d/msgid/cp2k/D09FB1FE-74F7-4123-97BD-8D1191B8FD66%40psi.ch</a>.<br>
</blockquote></div>

<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/CANbRB3vbORJf3243jhKsvnxYeCUtKMuh_2%3DXo%2BYXjsaFH16qng%40mail.gmail.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/CANbRB3vbORJf3243jhKsvnxYeCUtKMuh_2%3DXo%2BYXjsaFH16qng%40mail.gmail.com</a>.<br />