<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 26, 2009, at 2:53 PM, mohnish pandey wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I am beginner of quantum espresso. I am trying to calculate the lattice constant for zinc oxide graphitic and wurtzitic structure . I am using a script for that. But I have to see each and every file to check the energy and to decide which one is minimum. Can you guys please help me to get a shortcut for this I mean after running a loop I get a minimum energy file instead of doing it manually and then deciding which lattice parammeters fits to minimum energy..<br>
<br>Thanks in advance.<br>Mohnish Pandey<br></blockquote><br></div><div><br></div><div><br></div><div>- to extract the final energy of a scf loop just add, at the end of each step of your script loop</div><div>grep ^! fileout | tail -1 | awk '{print $5}'</div><div>or, if you want to store it into a variable etot</div><div>etot=$(grep ^! fileout | tail -1 | awk '{print $5}')</div><div><br></div><div>(the "tail -1" is maybe reduntant if you're using version >= 4.0)</div><div><br></div><div>- to find the minimum, you can make parabolic fits of etot vs lattice_parameter or, maybe better, use and equation of state. Fort the latter,</div><div>a simple utility is available within the QE package, read the header of pwtools/ev.f90 (useful for cubic / hexagonal systems).</div><div><br></div><div>Giovanni</div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><br class="Apple-interchange-newline"><br></div><div><br></div><div>--</div><div><br></div><div>Dr. Giovanni Cantele<br>Coherentia CNR-INFM and Dipartimento di Scienze Fisiche<br>Universita' di Napoli "Federico II"<br>Complesso Universitario di Monte S. Angelo - Ed. 6<br>Via Cintia, I-80126, Napoli, Italy<br>Phone: +39 081 676910<br>Fax: +39 081 676346<br>E-mail: <a href="mailto:giovanni.cantele@cnr.it">giovanni.cantele@cnr.it</a><br> <a href="mailto:giovanni.cantele@na.infn.it">giovanni.cantele@na.infn.it</a><br>Web: <a href="http://people.na.infn.it/~cantele">http://people.na.infn.it/~cantele</a><br>Research Group: <a href="http://www.nanomat.unina.it/">http://www.nanomat.unina.it</a><br>Skype contact: giocan74</div></span>
</div>
<br></body></html>