[Pw_forum] band and dos input files in xcrysden
Well, I also like the way the tasks are distributed, it is conceptually very clear. I know a different code that saves a DOS file after a band calculation and the newbies come to me with strange peaks in DOS that are caused by a flat band along a line. Calling dos from pw.x or pw from dos.x masks that conceptual clarity. However, we have to be practical and run the frequent calculations as easily as possible. I would prepend a nscf calculation with "standard options" , and give warning in the otput file that non-standard options can be done doing the nscf calculation separately. Also, I would alway make pw.x to write the self-consistent DOS in a file after an scf calculation, no matter how coarse is the k-points grid. I find this useful for checking purposes (e.g. to know if an impurity have levels in the gaps). Also, for simple metals the k-points grid needed to have converged energies and forces also is enough to have a good DOS. Then let the user the choice to do post processing if want a DOS with an occupation scheme different than the SCF. I would put this file in the .save directory and name it prefix.scfdos or something like that. Boris, thank for your script. I will soon test it. Maybe it can be embedded in PWGUI. Best regards Eduardo -- Mensaje reenviado -- > From: Paolo Giannozzi > To: PWSCF Forum > Date: Thu, 26 Feb 2009 10:34:30 +0100 > Subject: Re: [Pw_forum] band and dos input files in xcrysden > > On Feb 21, 2009, at 17:05 , Eduardo Ariel Menendez Proupin wrote: > > Let me remind how is the process to obtain the DOS. It has three >> calculations >> and 3 input files >> >> pw.x < si.scf.in > si.scf.out # self consistent >> pw.x si.dos.out # non selfconsistent dense k-points mesh >> and a few options >> dos.x si.dos2.out # postprocessing >> > > Hi Eduardo, the issue you raise is a serious one and requires some though. > Right now several standard calculations in q-e are clumsy because they > require separate steps. While I think that it is a good idea to keep > separate > steps separate, I also think that at least the most common calculations > might > be streamlined. I am not convinced that the PWGui is the right tool for > this, > though, at least not in the present form (a tool to produce input data). > The ideal solution would be the usage of a high-level scripting language > like > python to "glue" the various pieces together, but this is highly nontrivial > (at least for me and for 99% of q-e users). > A simpler option could be to collapse some calculations into the same > executable: > for instance > - add a call to dos after a nscf calculation in pw.x, > add a call to bands after a bands calculation in pw.x > or > - prepend a nscf calculation to dos.x, > prepend a band calculation to bands.x > Suggestions are welcome > > Paolo > --- > Paolo Giannozzi, Democritos and University of Udine, Italy > > > > > -- next part -- An HTML attachment was scrubbed... URL: http://www.democritos.it/pipermail/pw_forum/attachments/20090305/e9b64e3d/attachment-0001.htm
[Pw_forum] band and dos input files in xcrysden
Dear Paolo, I, being a script-happy person, like the "seperate steps" approach of pw.x very very much. Although not as high level as a python one, please find a script written in TCL which I use for preparing DOS and PDOS plots. Use this at your own risk! Being a script I modify it constantly for my needs, and I am not sure this is the "most corrected" version. Basically you use it like this : makedosgraph.tcl "pw.x input file" "pw.x output file for latest coordinates or -- to use coordinates in input file" -i "mpi related things + directory" run the script without parameters to see available options. some examples: Prepare the pdos showing atoms 1 3 5 with a degauss of 0.002 from a pwscf result makedosgraph.tcl in.grapheneO -- -i "/home/obm/Progs/pwscf/bin/" -plot_dg 0.002 -fermi_at_zero -atoms "1 3 5" Prepare a nscf file using the latest coordinates from a output file of a relaxation run makedosgraph.tcl in.grapheneO out.grapheneO -s 1 Prepare gnuplot files for an already run projwfc.x/dos.x makedosgraph.tcl in.grapheneO -- -s 4 -fermi_at_zero -atoms "1 3 5" (I also remember having something for bands and workfunctions somewhere) Best, Baris Malcioglu SISSA . makedosgraph.tcl #!/bin/sh # the next line restarts using tclsh \ exec tclsh8.4 "$0" "$@" ### # this script will # 1) read an input file for prefix and outdir # 2) read an output file for latest coordinates # 2) do a nscf calculation according to above data # 3) do a dos.x calculation according to above data # 4) do a projwfc.x calculation according to above data # 5) prepare gnuplot files # # Osman Baris Malcioglu 2007 v.1 alpha # ## proc ::main {argc argv} { global pw_input_file global pw_output_file global plot_dg global stag global spref global plotlist global nspin set plot_dg 0 set stag 0 set spref "" set plotlist "" get_commandline $argc $argv do_calcs } ## #A procedure to read commandline ## proc ::get_commandline {argc argv} { global pw_input_file global pw_output_file global plot_dg global stag global spref global plotlist global fatzero set fatzero 0 if { $argc < 2} { puts stderr "Usage: makedosgraph \[parameters\]" puts stderr "Parameters:" puts stderr "-s : set calculation stage " puts stderr " 1 : prepare nscf files and exit" puts stderr " 2 : use present files and run nscf, and quit" puts stderr " 3 : prepare for and run dos.x and projwfc.x" puts stderr " 4 : prepare gnuplot baches for pdos output only" puts stderr "-plot_dg : set the plotting degauss in dos.x" puts stderr "-i <\"prefix to pwscf\"> : the prefix to be appended to runs" puts stderr "-atoms <\"space seperated list of atoms\">: will draw these atoms only" puts stderr "-fermi_at_zero move the graphs such that Ef is at 0" exit 1 } if { $argc > 0 } { set state first foreach arg $argv { switch -- $state { first { set state second #check if the infile exists set pw_input_file $arg if { [file exists $pw_input_file] } { puts "using input file $pw_input_file" } else { puts stderr "Input file $pw_input_file does not exits" exit 1 } } second { set state flag #check if the outfile exists set pw_output_file $arg if { [file exists $pw_output_file] || $pw_output_file == "--"} { puts "using output file $pw_output_file" } else { puts stderr "Output file $pw_output_file does not exist" exit 1 } } flag { switch -glob -- $arg { -plot_dg { set state p_dg } -s { set state sstag } -i { set state sspref } -atoms {set state splotlist} -fermi_at_zero {set fatzero 1} default { puts stderr "unknown flag $arg" exit 2 } } }
[Pw_forum] band and dos input files in xcrysden
On Feb 21, 2009, at 17:05 , Eduardo Ariel Menendez Proupin wrote: > Let me remind how is the process to obtain the DOS. It has three > calculations > and 3 input files > > pw.x < si.scf.in > si.scf.out # self consistent > pw.x si.dos.out # non selfconsistent dense k-points > mesh and a few options > dos.x si.dos2.out # postprocessing Hi Eduardo, the issue you raise is a serious one and requires some though. Right now several standard calculations in q-e are clumsy because they require separate steps. While I think that it is a good idea to keep separate steps separate, I also think that at least the most common calculations might be streamlined. I am not convinced that the PWGui is the right tool for this, though, at least not in the present form (a tool to produce input data). The ideal solution would be the usage of a high-level scripting language like python to "glue" the various pieces together, but this is highly nontrivial (at least for me and for 99% of q-e users). A simpler option could be to collapse some calculations into the same executable: for instance - add a call to dos after a nscf calculation in pw.x, add a call to bands after a bands calculation in pw.x or - prepend a nscf calculation to dos.x, prepend a band calculation to bands.x Suggestions are welcome Paolo --- Paolo Giannozzi, Democritos and University of Udine, Italy
[Pw_forum] band and dos input files in xcrysden
On Sat, 2009-02-21 at 13:05 -0300, Eduardo Ariel Menendez Proupin wrote: > One simple idea is to add a submenu to the menu "File/New from here" > So, if I have an open pw.x input, when I select "File/New from here" > it will make the new file inheriting all the properties: in this case > outdir and prefix. I would also set by default fildos = prefix.dos. What an excellent idea! > Emin and Emax are the minumum and maxima of the Kohn-Sham eigenvalues > that can be taken from the pw.x outputs. But this is the default (so why bother)!? > A different strategy may be to have a menu Project and from the > Project menu, select kinds of input fiiles or tasks. If one selects > task DOS, ... This is very good ideas as well. In such a task PWgui can produce three main pages: scf input, nscf input, and dos input. In the nscf input only those variables could be displayed that are of interest, and they can also be automatically set to some default values. > for example, then pwgui can create the three input files and display > a reminder of the sequence of calculations to be done. Instead of reminder, pwgui can actually offer to make all requested calculations. Thanks for your useful suggestions. Regards, Tone -- Anton Kokalj J. Stefan Institute, Jamova 39, 1000 Ljubljana, Slovenia (tel: +386-1-477-3523 // fax:+386-1-477-3822) Please, if possible, avoid sending me Word or PowerPoint attachments. See: http://www.gnu.org/philosophy/no-word-attachments.html
[Pw_forum] band and dos input files in xcrysden
Dear Tone, Thanks for your interest in my request. >Don't know what exactly you mean for Emin and Emax, however, as far as >the outdir and prefix are concerned, how should pwgui know which is the >corresponding pw.x input file? (this would be needed for the >inheritance). Let me remind how is the process to obtain the DOS. It has three calculations and 3 input files pw.x < si.scf.in > si.scf.out # self consistent pw.x si.dos.out # non selfconsistent dense k-points mesh and a few options dos.x si.dos2.out # postprocessing At present, pwgui has a Menu File/New, where one can define the input files from the scratch. A typical input for dos.x looks like this outdir='./temp', prefix='silicon' fildos='silicon.dos', Emin=-10.0, Emax=25.0, DeltaE=0.1 / One simple idea is to add a submenu to the menu "File/New from here" So, if I have an open pw.x input, when I select "File/New from here" it will make the new file inheriting all the properties: in this case outdir and prefix. I would also set by default fildos = prefix.dos. Emin and Emax are the minumum and maxima of the Kohn-Sham eigenvalues that can be taken from the pw.x outputs. pwgui may run an script to take these values from the pw.x output if this exists (I may want to run the files interactvely or just to make the input files and copy them to a server). We may ask Paolo to put Emin and Emax, and Efermi or HOMO in a single line of the output. NSCF calculation inherits many more fields from the SCF, so it makes more sense to generate the *.dos.in file from the .scf.in file. Let see the differences diff si.scf.in si.dos.in 2c2 < calculation = 'scf' , --- > calculation = 'nscf' , 15a16,17 > nbnd = 8, > occupations='tetrahedra', 29c31 < 5 5 5 1 1 1 --- > 20 20 20 0 0 0 This I make simply saving the si.scf.in with the name si.dos.in and changing the variables. However, it may be nice to make the changes automatically. The keywords nbnd, occupations, and the k-point mesh (20 20 20) are difficult to set automagically. I propose some maybe good default values nbnd can be searched in the output file. grep 'number of Kohn-Sham states' si.scf.out number of Kohn-Sham states=4 and just double the number 4. It would be a different recipe if we deal with a metal, but let's keep simple and let the user to reduce it. I would set occupations='tetrahedra' by default. > 20 20 20 0 0 0 I would make a contest to select the winning idea. I have one recipe If I have in the scf input calculation K_POINTS automatic N1 N2 N3 1 1 1 or 'N1 N2 N3 0 0 0' then for the nscf calculation I would set N1n N2n N3n 0 0 0 such that N1n/N1 = N2n/N2 = N3n/N3 and N1n*N2n*N3n = (30^3)/nat (nat the number of atoms) A different strategy may be to have a menu Project and from the Project menu, select kinds of input fiiles or tasks. If one selects task DOS, for example, then pwgui can create the three input files and display a reminder of the sequence of calculations to be done. Best regards Eduardo > -- Mensaje reenviado -- > From: Tone Kokalj > To: PWSCF Forum > Date: Fri, 20 Feb 2009 12:08:43 +0100 > Subject: Re: [Pw_forum] band and dos input files in xcrysden > On Thu, 2009-02-19 at 23:48 -0300, Eduardo Ariel Menendez Proupin wrote: > > Hi Tone, > > > > Do you have plans to add the capability in PWGUI to generate inputs > > for bands.x and dos.x ? > > Actually, I didn't have, but this can be easily done. Due to your > request I will do so in the future. > > > It would be goood to operate it in an easy way, i.e. inheriting > > outdir and prefix from the parent pw.x input and Emin=-10.0, Emax=25.0 > > from the pw.x output. > > Don't know what exactly you mean for Emin and Emax, however, as far as > the outdir and prefix are concerned, how should pwgui know which is the > corresponding pw.x input file? (this would be needed for the > inheritance). > > Regards, Tone > > -- next part -- An HTML attachment was scrubbed... URL: http://www.democritos.it/pipermail/pw_forum/attachments/20090221/e66cdff3/attachment.htm
[Pw_forum] band and dos input files in xcrysden
On Thu, 2009-02-19 at 23:48 -0300, Eduardo Ariel Menendez Proupin wrote: > Hi Tone, > > Do you have plans to add the capability in PWGUI to generate inputs > for bands.x and dos.x ? Actually, I didn't have, but this can be easily done. Due to your request I will do so in the future. > It would be goood to operate it in an easy way, i.e. inheriting > outdir and prefix from the parent pw.x input and Emin=-10.0, Emax=25.0 > from the pw.x output. Don't know what exactly you mean for Emin and Emax, however, as far as the outdir and prefix are concerned, how should pwgui know which is the corresponding pw.x input file? (this would be needed for the inheritance). Regards, Tone -- Anton Kokalj J. Stefan Institute, Jamova 39, 1000 Ljubljana, Slovenia (tel: +386-1-477-3523 // fax:+386-1-477-3822) Please, if possible, avoid sending me Word or PowerPoint attachments. See: http://www.gnu.org/philosophy/no-word-attachments.html
[Pw_forum] band and dos input files in xcrysden
Hi Tone, Do you have plans to add the capability in PWGUI to generate inputs for bands.x and dos.x ? It would be goood to operate it in an easy way, i.e. inheriting outdir and prefix from the parent pw.x input and Emin=-10.0, Emax=25.0 from the pw.x output. Best regards -- Eduardo Menendez Departamento de Fisica Facultad de Ciencias Universidad de Chile Phone: (56)(2)9787439 URL: http://fisica.ciencias.uchile.cl/~emenendez -- next part -- An HTML attachment was scrubbed... URL: http://www.democritos.it/pipermail/pw_forum/attachments/20090219/dbf95521/attachment.htm