<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Dear Pablo<br>
    </p>
    <p>Final Coordinates and Job Done do not mean that  relaxation
      reached convergence you may have reached the max number of steps
      and relaxation stopped. <br>
    </p>
    <p>Check few lines before "Begin Final coordinates" you should find
      something like "bfgs converged in <n> scf cycles" <br>
    </p>
    <p>Did you try to use the same relaxation run for the 2 different
      first steps ? Do final results coincide in this case ?<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 28/12/2016 19:01, Pablo García
      Risueño wrote:<br>
    </div>
    <blockquote
cite="mid:CAL1uXO1hOdOAm2C-r_6ugcZuV4qrzZkND1uH=GU8H0Qx9PNq5w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Dear Stefano<br>
          <br>
        </div>
        Thank you very much for your reply. I answer to your questions
        below.<br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">2016-12-28 16:29 GMT+01:00 Stefano de
            Gironcoli <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:degironc@sissa.it" target="_blank">degironc@sissa.it</a>></span>:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear
              Pablo Garcia Risueño<br>
              <br>
                  I'm not sure I understand the problem.<br>
                  the two final positions for ecut=30 are identical to
              my eyes.<br>
                  the two final positions for ecut=60 differ by about
              10-5 A. !<br>
                  If the property you are interested in depends so
              strongly on the<br>
              atomic positions you better learn how to live with it.
              Even assuming<br>
              that you are using perfect xc functional, perfect
              pseudopotentials and<br>
              converged cutoff and k-points (which likely you don't),
              your<br>
              calculation is neglecting zero point energy, thermal
              expansion,<br>
              quantum nature of H motion, ...<br>
              <i><br>
              </i></blockquote>
            <div><i>Yes, my concern is not that the results are not
                perfect (of course DFT makes non-negligible errors). My
                concern is that fully identical input files run in the
                same machine and with the same executable provide
                different results.</i><br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  As for your specific question. In principle if you
              tighten enough<br>
              the convergence the minima should tend to converge toward
              a common<br>
              value. However the stopping criteria will make the two
              calculations<br>
              stop as soon they are satisfied. In your case as soon as
              each force<br>
              component is lower than 10-6 Ry/au and the energy does not
              change more<br>
              that 10-8. Did the calculation complete ? 10-8 for the
              energy is<br>
              easily reachable but 10-6 for the forces looks to me very
              demanding.<br>
              <i><br>
              </i></blockquote>
            <div><i>Yes, the calculations do finish. I read 'Begin final
                coordinates' (...) and 'JOB DONE' at the end of the
                output files. My system is very small (just 26 atoms and
                56 electrons).</i><br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
                Anyhow... even if the relaxation did complete
              successfully two<br>
              equivalent calculations may still differ. If you run your
              calculations<br>
              with exactly the same input on exactly the same machine
              with exactly<br>
              the same mpi setup the results should be identical </blockquote>
            <div><i>This is exactly what I do.</i><br>
               <br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">..but
              why doing<br>
              twice exactly the same calculation ?. </blockquote>
            <div><i>The 'relax' calculation is the first step of a
                complicated process. I run two different calculations
                because the 6th step of the process is different. I
                obtained very different results at the end of the full
                process; then I tried to trace back the differences. And
                then I saw that despite the fact that the 1st step is
                identical for two different runs, the results of the 1st
                step are different. This made me think that there might
                be a bug, or a wrong parameter in my input files.</i><br>
               </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">If
              however you change anything<br>
              in the input (Davidson vs CG, starting wavefunction
              options, mixing<br>
              mode, BFGS-related parameters) or parallel computational
              setup the<br>
              relaxation history will be slightly different and the
              final<br>
              configurations will differ by a certain amount allowed by
              the<br>
              tolerance defined by your stopping criteria.<br>
            </blockquote>
            <div><i>I changed nothing, this is why I am surprised with
                the results...</i> <br>
            </div>
            <div><br>
              <br>
            </div>
            <div>Thank you very much for your attention. Best regards.<br>
            </div>
            <div><br>
              <br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
                HTH<br>
              <span class="HOEnZb"><font color="#888888"><br>
                  stefano<br>
                </font></span>
              <div class="HOEnZb">
                <div class="h5"><br>
                  Quoting Pablo García Risueño <<a
                    moz-do-not-send="true"
                    href="mailto:garcia.risueno@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:garcia.risueno@gmail.com">garcia.risueno@gmail.com</a></a>>:<br>
                  <br>
                  > Dear professor<br>
                  ><br>
                  > Thank you very much for your reply. The
                  differences are important in this<br>
                  > case, my final calculated quantities are very
                  sensitive to these optimized<br>
                  > positions. Should I change any of the ***conv_thr
                  variables, or other<br>
                  > variable, to have the same result for same
                  inputs?<br>
                  ><br>
                  > Is there any random number in the algorithm of
                  relax calculations, can we<br>
                  > be sure that different outputs with the same
                  input are not due to any bug?<br>
                  ><br>
                  > Thank you very much. Best regards.<br>
                  ><br>
                  > 2016-12-28 14:10 GMT+01:00 Paolo Giannozzi <<a
                    moz-do-not-send="true"
                    href="mailto:p.giannozzi@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:p.giannozzi@gmail.com">p.giannozzi@gmail.com</a></a>>:<br>
                  ><br>
                  >> The differences you find are very small.
                  Nothing to worry about in my<br>
                  >> opinion.<br>
                  >><br>
                  >> By the way: Davidson diagonalization is
                  typically faster than CG; do not<br>
                  >> specify incompatible options in K_POINTS
                  (gamma or automatic, not both;<br>
                  >> gamma should be used unless you have a good
                  reason not to)<br>
                  >><br>
                  >> Paolo<br>
                  >><br>
                  >> Il 28/dic/2016 01:46 PM, "Pablo García
                  Risueño" <<a moz-do-not-send="true"
                    href="mailto:garcia.risueno@gmail.com">garcia.risueno@gmail.com</a>><br>
                  >> ha scritto:<br>
                  >> ><br>
                  >> > Dear Espresso community<br>
                  >> ><br>
                  >> > I have one problem that is important for
                  me; it is somewhat surprising.<br>
                  >> I run geometry optimization (relax)
                  calculations with pw.x with identical<br>
                  >> input files, and I obtain rather different
                  final coordinates. The problem<br>
                  >> does not happen if ecutwfc is 30, but it does
                  appear for cutoffs of 60, 80<br>
                  >> or 90. Below one can see the exact input
                  file, and examples of the<br>
                  >> difference between the final coordinates for
                  both runs (both run with<br>
                  >> identical input) for given cutoffs.<br>
                  >> ><br>
                  >> > Could anybody give me a clue on the
                  origin of the problem, and how to<br>
                  >> solve it?<br>
                  >> ><br>
                  >> > Thank you very much. Best regards.<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > Input file:<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > &CONTROL<br>
                  >> ><br>
                  >> >     calculation = 'relax',<br>
                  >> ><br>
                  >> >     restart_mode = 'from_scratch',<br>
                  >> ><br>
                  >> >     prefix='',<br>
                  >> ><br>
                  >> >     outdir = './',<br>
                  >> ><br>
                  >> >     pseudo_dir = '/path_xxx/PP/',<br>
                  >> ><br>
                  >> >     forc_conv_thr = 1.0D-6 ,<br>
                  >> ><br>
                  >> >     etot_conv_thr = 1.0D-8 ,<br>
                  >> ><br>
                  >> >  /<br>
                  >> ><br>
                  >> > &system<br>
                  >> ><br>
                  >> >     ibrav = 0, a=18.0,<br>
                  >> ><br>
                  >> >     nat= 26, ntyp= 2,<br>
                  >> ><br>
                  >> >     ecutwfc = 30d0,<br>
                  >> ><br>
                  >> >     nbnd = 100,<br>
                  >> ><br>
                  >> > /<br>
                  >> ><br>
                  >> > &electrons<br>
                  >> ><br>
                  >> >     conv_thr = 1.0e-9,<br>
                  >> ><br>
                  >> >     mixing_beta = 0.7,<br>
                  >> ><br>
                  >> >     mixing_mode = 'plain',<br>
                  >> ><br>
                  >> >     diagonalization = 'cg'<br>
                  >> ><br>
                  >> > /<br>
                  >> ><br>
                  >> > &IONS<br>
                  >> ><br>
                  >> > /<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > ATOMIC_SPECIES<br>
                  >> ><br>
                  >> > C   12.0107   C.pz-vbc.UPF<br>
                  >> ><br>
                  >> > H   1.007825035  H.pz-vbc.UPF<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > ATOMIC_POSITIONS { angstrom }<br>
                  >> ><br>
                  >> > C  8.891700e+00     8.891700e+00   
                   8.891700e+00<br>
                  >> ><br>
                  >> > C  9.783400e+00     9.783400e+00   
                   8.000000e+00<br>
                  >> ><br>
                  >> > C  9.783400e+00     8.000000e+00   
                   9.783400e+00<br>
                  >> ><br>
                  >> > C  8.000000e+00     9.783400e+00   
                   9.783400e+00<br>
                  >> ><br>
                  >> > C  8.891700e+00     1.067510e+01   
                   1.067510e+01<br>
                  >> ><br>
                  >> > C  1.067510e+01     1.067510e+01   
                   8.891700e+00<br>
                  >> ><br>
                  >> > C  1.067510e+01     8.891700e+00   
                   1.067510e+01<br>
                  >> ><br>
                  >> > C  9.783400e+00     1.156680e+01   
                   9.783400e+00<br>
                  >> ><br>
                  >> > C  9.783400e+00     9.783400e+00   
                   1.156680e+01<br>
                  >> ><br>
                  >> > C  1.156680e+01     9.783400e+00   
                   9.783400e+00<br>
                  >> ><br>
                  >> > H  8.391700e+00     8.391700e+00   
                   8.391700e+00<br>
                  >> ><br>
                  >> > H  7.500000e+00     1.028340e+01   
                   9.283400e+00<br>
                  >> ><br>
                  >> > H  7.500000e+00     9.283400e+00   
                   1.028340e+01<br>
                  >> ><br>
                  >> > H  9.283400e+00     1.028340e+01   
                   7.500000e+00<br>
                  >> ><br>
                  >> > H  1.028340e+01     9.283400e+00   
                   7.500000e+00<br>
                  >> ><br>
                  >> > H  9.283400e+00     7.500000e+00   
                   1.028340e+01<br>
                  >> ><br>
                  >> > H  1.028340e+01     7.500000e+00   
                   9.283400e+00<br>
                  >> ><br>
                  >> > H  9.283400e+00     1.206680e+01   
                   9.283400e+00<br>
                  >> ><br>
                  >> > H  1.206680e+01     9.283400e+00   
                   9.283400e+00<br>
                  >> ><br>
                  >> > H  9.283400e+00     9.283400e+00   
                   1.206680e+01<br>
                  >> ><br>
                  >> > H  8.391700e+00     1.117510e+01   
                   1.117510e+01<br>
                  >> ><br>
                  >> > H  1.117510e+01     1.117510e+01   
                   8.391700e+00<br>
                  >> ><br>
                  >> > H  1.117510e+01     8.391700e+00   
                   1.117510e+01<br>
                  >> ><br>
                  >> > H  1.028340e+01     1.206680e+01   
                   1.028340e+01<br>
                  >> ><br>
                  >> > H  1.028340e+01     1.028340e+01   
                   1.206680e+01<br>
                  >> ><br>
                  >> > H  1.206680e+01     1.028340e+01   
                   1.028340e+01<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > CELL_PARAMETERS {cubic}<br>
                  >> ><br>
                  >> >  1.00  0.00  0.00<br>
                  >> ><br>
                  >> >  0.00  1.00  0.00<br>
                  >> ><br>
                  >> >  0.00  0.00  1.00<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > K_POINTS {gamma} {automatic}<br>
                  >> ><br>
                  >> > 1 1 1  0 0 0<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > The program is run with<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > mpirun -np 32 /path_xxx/pw.x<br>
                  >> ><br>
                  >> ><br>
                  >> ><br>
                  >> > Final coordinates: The first two rows
                  for ecutwfc=30 for two runs with<br>
                  >> identical input are:<br>
                  >> ><br>
                  >> > ATOMIC_POSITIONS (angstrom)<br>
                  >> > C  8.898432121  8.898432121  8.898432121<br>
                  >> > C  9.783306562  9.783306562  8.019670107<br>
                  >> ><br>
                  >> > ATOMIC_POSITIONS (angstrom)<br>
                  >> > C  8.898432121  8.898432121  8.898432121<br>
                  >> > C  9.783306562  9.783306562  8.019670109<br>
                  >> ><br>
                  >> ><br>
                  >> > Final coordinates: The first two rows
                  for ecutwfc=60 for two runs with<br>
                  >> identical input are:<br>
                  >> ><br>
                  >> > ATOMIC_POSITIONS (angstrom)<br>
                  >> > C  8.904988579  8.904988579  8.904988579<br>
                  >> > C  9.783426086  9.783426086  8.031809869<br>
                  >> ><br>
                  >> > ATOMIC_POSITIONS (angstrom)<br>
                  >> > C  8.904962246  8.904962246  8.904962246<br>
                  >> > C  9.783425401  9.783425401  8.031847251<br>
                  >> ><br>
                  >> > --<br>
                  >> > --<br>
                  >> ><br>
                  >> > Dr. Pablo García Risueño<br>
                  >> ><br>
                  >> > Institut für Physikalische Chemie,
                  Universität Hamburg, Grindelallee<br>
                  >> 117, 20146 Hamburg<br>
                  >> ><br>
                  >> > Tel. +49 040 42 83 84 82 7<br>
                  >> ><br>
                  >> > ______________________________<wbr>_________________<br>
                  >> > Pw_forum mailing list<br>
                  >> > <a moz-do-not-send="true"
                    href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
                  >> > <a moz-do-not-send="true"
                    href="http://pwscf.org/mailman/listinfo/pw_forum"
                    rel="noreferrer" target="_blank">http://pwscf.org/mailman/<wbr>listinfo/pw_forum</a><br>
                  >><br>
                  >><br>
                  >> ______________________________<wbr>_________________<br>
                  >> Pw_forum mailing list<br>
                  >> <a moz-do-not-send="true"
                    href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
                  >> <a moz-do-not-send="true"
                    href="http://pwscf.org/mailman/listinfo/pw_forum"
                    rel="noreferrer" target="_blank">http://pwscf.org/mailman/<wbr>listinfo/pw_forum</a><br>
                  >><br>
                  ><br>
                  ><br>
                  ><br>
                  > --<br>
                  > --<br>
                  ><br>
                  > Dr. Pablo García Risueño<br>
                  ><br>
                  > Institut für Physikalische Chemie, Universität
                  Hamburg, Grindelallee 117,<br>
                  > 20146 Hamburg<br>
                  ><br>
                  > Tel. <a moz-do-not-send="true"
                    href="tel:%2B49%20040%2042%2083%2084%2082%207"
                    value="+4940428384827">+49 040 42 83 84 82 7</a><br>
                  <br>
                  <br>
                  <br>
                  ______________________________<wbr>_________________<br>
                  Pw_forum mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://pwscf.org/mailman/listinfo/pw_forum"
                    rel="noreferrer" target="_blank">http://pwscf.org/mailman/<wbr>listinfo/pw_forum</a></div>
              </div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <br>
          -- <br>
          <div class="gmail_signature" data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">--<br>
                      <br>
                      Dr. Pablo García Risueño<br>
                      <br>
                      Institut für Physikalische Chemie, Universität
                      Hamburg, Grindelallee 117, 20146 Hamburg<br>
                      <br>
                      Tel. +49 040 42 83 84 82 7</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Pw_forum mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a>
<a class="moz-txt-link-freetext" href="http://pwscf.org/mailman/listinfo/pw_forum">http://pwscf.org/mailman/listinfo/pw_forum</a></pre>
    </blockquote>
    <br>
  </body>
</html>