<div dir="ltr">Hi,<div><br></div><div>I think I figured out the problem. I was missing the 'lsign' parameter in pp.x. 'lsign' basically gives |psi^2| * sign (psi). If 'lsign' is false, it gives the magnitude of 'psi^2', which I was getting earlier. Now on putting 'lsign=true', I get the positive and negative values of the wavefunction which I need. The HOMO and LUMO I got matches with the literature. Anyways, thanks for the help.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 4, 2014 at 5:29 PM, Filipe Camargo Dalmatti Alves Lima <span dir="ltr"><<a href="mailto:flima@if.usp.br" target="_blank">flima@if.usp.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Plot_num = 7 for wavefunction.<div><br></div><div>This script was written in python. All it asks are the parameters you wrote in the input file provided in quantum espresso and options for pp.x. </div><div>You must edit this file by hand using an editor of your preference. The prof. Kulik's script should make you life easier, as the python would do the hard job for you.</div><div><br></div><div>If it is not helping you, I am attaching an example of input to be used on pp.x<br></div><div><br></div><div><div>&inputpp</div><div> prefix ='SAME_PREFIX_YOU_USE_ON_.IN_FILE',</div><div> filplot = 'name of the output file. For each kpoint and kband there should be a DIFFERENTE NAME. Otherwise it will overwrite',</div><div> plot_num = 7, #to plot wavefunctions. Are you using norm. conserving PPs?</div><div> kpoint = 1,    # If you are using monkhorst pack, you should first run a nscf calculation specifying the kpoints you are interested. Remember to backup your .save folder.</div><div> kband = 4,   # band you are plotting. Remember that bands = (number of electrons) / 2. If you have spin polarized you should check the up and down electrons.</div><div>/</div><div>&plot</div><div> nfile= 1,</div><div> filepp(1)='add a name here',</div><div> weight(1)= 1.0,</div><div> iflag= 3, </div><div> output_format=6,  # cube format</div><div> fileout='wavefunction.X.Y.Z.cube'</div><div>/</div></div><div><br></div><div>all you need to do is prepare this file for your needs and run pp.x</div><div><br></div><div><br></div><div>best regards,</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><br></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 4, 2014 at 6:44 PM, Arpan Kundu <span dir="ltr"><<a href="mailto:arpankundu18@gmail.com" target="_blank">arpankundu18@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Filipe,<div><br></div><div>Thanks a lot for your reply. The problem I am facing in plotting the wavefunction is setting the appropriate parameters in pp.x. In the pp.x manual, below are the options for plot_num. Which option should I select to produce molecular orbitals?  Also, I dont understand the method discussed in the link that you provided:  <a href="http://hjklol.mit.edu/content/visualizing-molecular-orbitals" target="_blank">http://hjklol.mit.edu/content/visualizing-molecular-orbitals</a> . Where do I edit the variables mentioned in the variables.py file ?</div><div><br></div><div><br></div><div><a name="1497cee214ce04db_1497c96d2e372b55_plot_num" style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:medium;background-color:rgb(255,235,198)"><table width="100%" style="border:2px solid rgb(181,181,0);margin-bottom:10px;table-layout:auto;background-color:rgb(255,255,255)"><tbody><tr><td align="left" valign="top" colspan="2"><blockquote><pre>0  = electron (pseudo-)charge density

   1  = total potential V_bare + V_H + V_xc

   2  = local ionic potential V_bare

   3  = local density of states at e_fermi
        (number of states per volume, in bohr^3,
         per energy unit, in Ry)

   4  = local density of electronic entropy

   5  = STM images
        Tersoff and Hamann, PRB 31, 805 (1985)

   6  = spin polarization (rho(up)-rho(down))

   7  = contribution of a selected wavefunction to the
        (pseudo-)charge density. For norm-conserving PPs,
        |psi|^2 (psi=selected wavefunction). Noncollinear case:
        contribution of the given state to the charge or
        to the magnetization along the direction indicated
        by spin_component (0 = charge, 1 = x, 2 = y, 3 = z )
</pre><div><br></div></blockquote></td></tr></tbody></table></a></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Tue, Nov 4, 2014 at 8:00 AM, Filipe Camargo Dalmatti Alves Lima <span dir="ltr"><<a href="mailto:flima@if.usp.br" target="_blank">flima@if.usp.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It might be a case that you should fine tuning the software you use to plot the wavefunction.<div><br></div><div>I usually export as .cube and load the orbitals using the jmol for high quality image.</div><div><br></div><div>Try typing these commands on the jmol console:</div><div><br></div><div><div>load 'FILE.cube'   </div><div>background white </div><div>isosurface  NICKNAME_1 cutoff 0.009 color deepskyblue file ''  <br></div><div>isosurface  NICKNAME_2 cutoff -0.0009 color red file ''  <br></div><div><br></div><div>As you can see, I can define different cutoff to drawn the "positive" and "negative" parts of the wavefunction.</div><div>When you consider the figure is what you want, then type<br></div><div><br></div><div><div>write povray 'ANYNAME.pov'</div></div><div><br></div><div>It will generate a very good high quality image.</div><div><br></div><div>I hope it helps you finding what you want.</div><div><br></div><div>You might also consider study a very good tutorial (IMHO) provided by professor Heather Kulik, from MIT,  at the link below:</div><div><a href="http://hjklol.mit.edu/content/visualizing-molecular-orbitals" target="_blank">http://hjklol.mit.edu/content/visualizing-molecular-orbitals</a><br></div><div><br></div><div>Best,</div><div><br></div><div>Filipe</div><div><br></div><div><br></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Sat, Nov 1, 2014 at 7:33 PM, Lorenzo Paulatto <span dir="ltr"><<a href="mailto:lorenzo.paulatto@impmc.upmc.fr" target="_blank">lorenzo.paulatto@impmc.upmc.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 10/31/2014 10:39 PM, Arpan Kundu wrote:<br>
> Hi users,<br>
><br>
> I want to plot the HOMO, LUMO wavefunction of H2O in QE. But the pp.x<br>
> plots the charge density instead of the exact wavefunction. I mean the<br>
> wavefunction should have a positive part and a negative part. But when<br>
> I plot pp.x with a plot_num=7, it plots the contribution of the<br>
> wavefunction to the charge density and it is mostly positive. Thanks a<br>
> lot for your help.<br>
><br>
><br>
</span>Hi Arpan,<br>
the manual of PP is only a couple of pages long, it's better to read it<br>
to the end:<br>
<<a href="http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PP.html#idp42384" target="_blank">http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PP.html#idp42384</a>><br>
<br>
kind regards<br>
<span><font color="#888888"><br>
--<br>
Dr. Lorenzo Paulatto<br>
IdR @ IMPMC -- CNRS & Université Paris 6<br>
<a href="tel:%2B33%20%280%291%2044%20275%20084" value="+33144275084" target="_blank">+33 (0)1 44 275 084</a> / skype: paulatz<br>
<a href="http://www-int.impmc.upmc.fr/~paulatto/" target="_blank">http://www-int.impmc.upmc.fr/~paulatto/</a><br>
23-24/4é16 Boîte courrier 115, 4 place Jussieu 75252 Paris Cédex 05<br>
<br>
_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr">_________________________________________<br>Filipe Camargo Dalmatti Alves Lima<br>PhD Student<br>University of São Paulo, Physics Institute, Materials Physics Department, Nanomol Group, Brazil.<br>Phones:    (11) 3091-6881  (USP)<br>                (11) 97408-2755 (Vivo)<br></div></div>
</font></span></div>
<br>_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><span><div><div dir="ltr">Regards,<br>Arpan Kundu<br>Doctoral Student<div>Department of Mechanical Engineering<div>Purdue University</div></div></div></div>
</span></div>
<br>_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">_________________________________________<br>Filipe Camargo Dalmatti Alves Lima<br>PhD Student<br>University of São Paulo, Physics Institute, Materials Physics Department, Nanomol Group, Brazil.<br>Phones:    (11) 3091-6881  (USP)<br>                (11) 97408-2755 (Vivo)<br></div></div>
</div>
</div></div><br>_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Regards,<br>Arpan Kundu<br>Doctoral Student<div>Department of Mechanical Engineering<div>Purdue University</div></div></div></div>
</div>