[Wien] probelem with x lapw -band -p with w2web

Peter Blaha pblaha at theochem.tuwien.ac.at
Mon Jul 10 15:17:33 CEST 2017


Thanks for this report.

Please find attached   band.pl (and scf.pl, which did not save selection 
of parallel option), which should fix this.

These routines should be copied int $WIENROOT/SRC_w2web/htdocs/exec
Regards

Am 10.07.2017 um 02:30 schrieb Wien2k User:
> Dear Prof. P. Blaha;
> 
> I inform you that there is a problem with the command x lapw -band -p 
> with w2web, the calculation starts in the home/user directory and not in 
> the calculation directory.
> 
> I note that this command  works well on terminal.
> 
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
> 

-- 
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300             FAX: +43-1-58801-165982
Email: blaha at theochem.tuwien.ac.at    WIEN2k: http://www.wien2k.at
WWW: 
http://www.imc.tuwien.ac.at/tc_blaha------------------------------------------------------------------------- 

-------------- next part --------------
#!/usr/bin/perl

require "../../libs/w2web.pl";
require "../../libs/struct.pl";

#$debug=1;
$spin="up";
$myspinopt="";

&GetInput;
&GetSession;
&StructRead;
$prefspace="scf";
&GetPrefs();

#$klist = qx( cat $DIR/.prefs-bandklist );
$bcc="";
$fcc="";
$hcp="";
$simple="";
#if($klist =~ /xcrysden/) {$xcrysden=" SELECTED"; 
#} else {

$bcc=" SELECTED" if ($s_lattice =~ /B/);
$fcc=" SELECTED" if ($s_lattice =~ /F/);
$hcp=" SELECTED" if ($s_lattice =~ /H/);
$simple=" SELECTED" if ($s_lattice =~ /P/);
#}

$next="continue with bandstructure";
$nexturl="/exec/band.pl?SID=$SID";
$nextinteractive=1;

$OUT .= "<h2>Band structure</h2>";

&RequiredFile("insp");
&InitTask();

$OUT.="<TABLE>";


if ($plot) {
$OUT .=  <<__STOP__;
<TR><TD class="task">
<A HREF="$nexturl">Show full menu</A>
</TD></TR>
__STOP__

} else {

$OUT .=  <<__STOP__;

<TR><TD class="task">
<b>The required k-mesh for bandstructure plotting can be generated by:</b>
<FORM ACTION="/util/addklist.pl">
<SELECT NAME="klist">
<OPTION VALUE="bcc" $bcc>bcc
<OPTION VALUE="fcc" $fcc>fcc
<OPTION VALUE="hcp" $hcp>hcp
<OPTION VALUE="simple_cubic" $simple>simple_cubic
</SELECT>
<INPUT NAME=SID VALUE=$SID TYPE=HIDDEN>
<INPUT TYPE=SUBMIT VALUE="create $CASE.klist_band">
  <A HREF="http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-table?from=kv" TARGET=spgrp>Brillouinzones from Bilbao Cryst Server</A><br>
</FORM>
</TD></TR>

</FORM>
</TD></TR>
__STOP__
&PassHiddenParms;

if ($ENV{'XCRYSDEN_TOPDIR'}) {
$OUT .=  <<__STOP__;
<TR><TD class="task">

<FORM ACTION=/util/bandxcrys.pl METHOD=POST>
__STOP__
&PassHiddenParms;
$OUT .=  <<__STOP__;
<b>or</B> <INPUT TYPE=SUBMIT VALUE="Generate k-mesh using XCrysden"> (<b>save klist as $CASE.klist_band</b>)
</FORM>
</TD></TR>
__STOP__
}

$OUT .=  <<__STOP__;
<TR><TD class="task">
<FORM ACTION=/exec/executor.pl METHOD=POST>
__STOP__
&PassHiddenParms;
$OUT .=  <<__STOP__;
<INPUT NAME=precmd TYPE=HIDDEN VALUE="x">
<INPUT NAME=prog TYPE=HIDDEN VALUE="lapw1 -band">
<INPUT TYPE=SUBMIT VALUE="x lapw1 -band  $myspinopt $mypara">
$myspin
Calculate Eigenvalues
__STOP__
    if($spinpol=~ /CHECKED/ && ! $PREFS{'so'} ) {
	$OUT .=  "<INPUT NAME=orb TYPE=CHECKBOX $PREFS{'orb'}> orb&nbsp";
}
$OUT .=  <<__STOP__;
$ni
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>

__STOP__

    if($spinpol=~ /CHECKED/ ) {
 $otherspin = "dn" if ($spin =~ /up/) ;
 $otherspin = "up" if ($spin =~ /dn/) ;
$OUT .=  <<__STOP__;
<TR><TD class="task">
<FORM ACTION=/exec/executor.pl METHOD=POST>
__STOP__
&PassHiddenParms;
$OUT .=  <<__STOP__;
<INPUT NAME=precmd TYPE=HIDDEN VALUE="x">
<INPUT NAME=prog TYPE=HIDDEN VALUE="lapw1 -band">
<INPUT TYPE=SUBMIT VALUE="x lapw1 -band  -$otherspin $mypara">
<INPUT TYPE=HIDDEN NAME=spinpol VALUE=on><INPUT TYPE=HIDDEN NAME=spin VALUE=$otherspin>
Calculate Eigenvalues
__STOP__
    if($spinpol=~ /CHECKED/ && ! $PREFS{'so'} ) {
	$OUT .=  "<INPUT NAME=orb TYPE=CHECKBOX $PREFS{'orb'}> orb&nbsp";
}
$OUT .=  <<__STOP__;
$ni
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>

__STOP__
}

if( $PREFS{'so'} ) {
    $my_spinp = "no" ;
    $my_spinp = "yes" if ($spin =~ /dn/) ;
    if ($my_spinp =~ /no/) {
$OUT .=  <<__STOP__;
<TR><TD class="task">
<FORM ACTION=/exec/executor.pl METHOD=POST>
__STOP__
&PassHiddenParms;
$OUT .=  <<__STOP__;
<INPUT NAME=precmd TYPE=HIDDEN VALUE="x">
<INPUT NAME=prog TYPE=HIDDEN VALUE="lapwso ">
<INPUT TYPE=SUBMIT VALUE="x lapwso $myspinopt $mypara">
$myspin
Calculate Eigenvalues
__STOP__
    if($spinpol=~ /CHECKED/ ) {
	$OUT .=  "<INPUT NAME=orb TYPE=CHECKBOX $PREFS{'orb'}> orb&nbsp";
}
$OUT .=  <<__STOP__;
$ni
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>
__STOP__
}
}
$OUT .=  <<__STOP__;

<TR><TD class="taskoption">
<b>needed only for continuous lines in the plot (not for non-symmorphic
spacegroups)!</b></td></tr>
<TR><TD class="taskoption">
<FORM ACTION=/exec/executor.pl METHOD=POST>
__STOP__
&PassHiddenParms;
$OUT .=  <<__STOP__;
<INPUT NAME=precmd TYPE=HIDDEN VALUE="x">
<INPUT NAME=prog TYPE=HIDDEN VALUE="irrep ">
<INPUT TYPE=SUBMIT VALUE="x irrep  $myspinopt $mypara">
$myspin
Calculate irreducible representations
<INPUT NAME=so TYPE=CHECKBOX $PREFS{'so'}> so 
$ni
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>

<TR><TD class="taskoption">
<b>for band character plots only!</b></td></tr>

<TR><TD class="taskoption">
<FORM ACTION=/exec/executor.pl METHOD=POST>
__STOP__
&PassHiddenParms;
$OUT .=  <<__STOP__;
<INPUT NAME=precmd TYPE=HIDDEN VALUE="x">
<INPUT NAME=prog TYPE=HIDDEN VALUE="lapw2 -band -qtl  ">
<INPUT TYPE=SUBMIT VALUE="x lapw2 -band -qtl  $myspinopt $mypara">
$myspin
Calculate partial charges ("qtl"-file)
<INPUT NAME=so TYPE=CHECKBOX $PREFS{'so'}> so 
$ni
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>
</td></tr>

<TR><TD class="task">
<FORM ACTION="/util/edit.pl">
<INPUT NAME=SID VALUE=$SID TYPE=HIDDEN>
<INPUT NAME=file VALUE="$DIR/$CASE.insp" TYPE=HIDDEN>
<INPUT NAME=redir VALUE="/exec/band.pl?SID=$SID" TYPE=HIDDEN>
<INPUT TYPE=SUBMIT VALUE="edit $CASE.insp">
Insert correct EF
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>

<TR><TD class="task">
<FORM ACTION=/exec/executor.pl METHOD=POST>
__STOP__
&PassHiddenParms;
$OUT .=  <<__STOP__;
<INPUT NAME=precmd TYPE=HIDDEN VALUE="x">
<INPUT NAME=prog TYPE=HIDDEN VALUE="spaghetti ">
$myspin
<INPUT TYPE=SUBMIT VALUE="x spaghetti $myspinopt $mypara">
Calculate bandstructure
<INPUT NAME=so TYPE=CHECKBOX $PREFS{'so'}> so 
$ni
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>

__STOP__
}

if($plot){
	$OUT .= <<__STOP__;
<b>We are in plot mode</b><br>
<TR><TD class="task">
__STOP__

$myform1 =  <<__STOP__;
<FORM ACTION=/exec/band.pl METHOD=POST>
__STOP__
$myform2 =  <<__STOP__;
<INPUT TYPE=hidden NAME=doit VALUE="1">
<INPUT TYPE=hidden NAME=plot VALUE="1">
$myspin
<INPUT TYPE=SUBMIT VALUE="plot bandstructure">
</FORM>
</TD></TR>
__STOP__

	if($doit) {

		$plotfile="$tempdir/$SID-$$";

	$umps = qx( cp $DIR/$CASE.spaghetti$spin\_ps $plotfile.ps);
	
	$umps = qx(gs -sDEVICE=jpeg -sOutputFile=$plotfile.jpg -dBATCH -dNOPAUSE $DIR/$CASE.spaghetti$spin\_ps);
	$OUT .= "umps=$umps" if $debug;;
	$OUT .= "<br><IMG SRC=/tmp/$SID-$$.jpg><br clear=all><br>";
	$OUT .= "<A HREF=/tmp/$SID-$$.ps>Download hardcopy in PostScript format</A
>";


		$OUT .= $myform1;
		&PassHiddenParms;
	$OUT .= <<__STOP__;
		<TR><TD class="task">
		<A HREF="$nexturl">Show full menu</A>
		</TD></TR>
__STOP__
#		$OUT .= $myform2
	} else {
		$OUT .= $myform1;
		&PassHiddenParms;
		$OUT .= $myform2

	}
} else {
	$OUT .= <<__STOP__;
<TR><TD class="task">
<FORM ACTION=/exec/band.pl METHOD=POST>
__STOP__
&PassHiddenParms;
    opendir(DIR1, $DIR);
    @files = sort(readdir(DIR1));
    closedir(DIR1);
$OUT .=  <<__STOP__;
<INPUT TYPE=hidden NAME=plot VALUE="1">
<INPUT TYPE=hidden NAME=doit VALUE="1">
$myspin
<INPUT TYPE=SUBMIT VALUE="plot bandstructure">
Plot bandstructure      or     download Xmgrace files for plotting with xmgrace <br>                                     
__STOP__
    foreach (@files) {
        if (!($_ =~ /^\.$/ )) {
            if ($dir =~ /\/$/) {
                $F = $dir . $_;
            } else {
                $F = $dir . "/" . $_;
            }
                if ($_ =~ /\.bands.*$/ ) { 
                    $OUT .= "<a href=\"/util/download.pl?SID=$SID&file=$DIR/$_\">$_</
a>";}
    }}
$OUT .= <<__STOP__;
</FORM>
</TD></TR>
__STOP__

$OUT .= <<__STOP__;
<TR><TD class="task">
<FORM ACTION="/util/savelapw.pl">
<INPUT NAME=SID VALUE=$SID TYPE=HIDDEN>
<INPUT TYPE=HIDDEN NAME="doit" VALUE="1">
<INPUT TYPE=HIDDEN NAME="b" VALUE="1">
<INPUT NAME=redir VALUE="/exec/band.pl?SID=$SID" TYPE=HIDDEN>
<INPUT TYPE=SUBMIT VALUE="save_lapw  -band">
 with name: $indent <INPUT NAME="savename"><br>
<INPUT TYPE=hidden NAME=next VALUE="$next">
<INPUT TYPE=hidden NAME=nexturl VALUE="$nexturl">
</FORM>
</TD></TR>
__STOP__

}
$OUT .= <<__STOP__;
</TABLE>
__STOP__


PrintPage("Context",$OUT);


-------------- next part --------------
#!/usr/bin/perl
 
require "../../libs/w2web.pl";
#$spinpol=0;
&GetInput();
&GetSession();
$prefspace="scf";
&GetPrefs();
#$spinpol=1 if ($PREFS{'spinpol'});
&ExeTypes();

$mytest="$DIR/$CASE.broyd1";
if ( -e $mytest && !$doit) {
  $OUT .= <<__STOP__;
<H2>Broyden files exist from previous scf-cycle!</H2>
<p>
When you have made changes to  input / struct / kmesh you should most likely "save" the previous calculation or at least remove the "broyden"-files.
</p>
<p> Do you want to
</p>
<ul>
<li><A HREF="/util/savelapw.pl?SID=$SID">Save Calculation with save_lapw</A>
</ul>
<ul>
<li><A HREF="/util/delete.pl?SID=$SID&file=$DIR/$CASE.broyd*">Remove the
files $CASE.broyd[1|2] </A>
</ul>
<p>or </p>
<ul>
<li> <A HREF="/exec/scf.pl?SID=$SID&doit=1">run anyway...</A> (only if you want to continue with the current scf-cycle)
</ul>
__STOP__
} else {

$OUT .=  <<__STOP__;
<H2>SCF Cycle</H2>

<FORM ACTION=/exec/scfrun.pl METHOD=POST>
__STOP__

&PassHiddenParms;


$OUT .=  <<__STOP__;
<TABLE><TR valign=TOP><TD bgcolor=$gray>
<fieldset>
<H3>Options: (<INPUT NAME=h TYPE=CHECKBOX >help)</H3> 
<table><tr valign=top><td>
<INPUT NAME=p1 TYPE=CHECKBOX $PREFS{'p1'}>parallel<br>
<INPUT NAME=min TYPE=CHECKBOX $PREFS{'min'}>optimize positions (MSR1a)<br>
  <INPUT NAME=it TYPE=CHECKBOX $PREFS{'it'}>iterative diag<br>
  <INPUT NAME=it2 TYPE=CHECKBOX $PREFS{'it2'}>iter. after full-diag<br>
  <INPUT NAME=noHinv TYPE=CHECKBOX $PREFS{'noHinv'}>iter.diag (no Hinv)<br>
  <INPUT NAME=vec2pratt TYPE=CHECKBOX $PREFS{'vec2pratt'}>vec2pratt with iter.diag<br>
<INPUT NAME=so TYPE=CHECKBOX $PREFS{'so'}>spinorbit<br>
</td><td>
<INPUT NAME=nohns TYPE=CHECKBOX $PREFS{'nohns'}>no HNS <INPUT NAME=nohns_count
SIZE=2 VALUE=$PREFS{'nohns_count'}><br>
<INPUT NAME=in1new TYPE=CHECKBOX $PREFS{'in1new'}>in1new <INPUT NAME=in1new_count SIZE=2 VALUE=$PREFS{'in1new_count'}><br>
<INPUT NAME=ql TYPE=CHECKBOX $PREFS{'ql'}>q-limit <INPUT NAME=ql_count
SIZE=4 VALUE=$PREFS{'ql_count'}><br>
<INPUT NAME=itnum TYPE=CHECKBOX $PREFS{'itnum'}>It-number <INPUT NAME=itnum_count
SIZE=1 VALUE=$PREFS{'itnum_count'}><br>
    </td></tr><tr valign=top><td><br>
<INPUT NAME=spinpol TYPE=CHECKBOX $spinpol>spin polarized<br>
  <INPUT NAME=spinpolc TYPE=CHECKBOX $PREFS{'spinpolc'}>constrain moment to 0<br>
  <INPUT NAME=afm1 TYPE=CHECKBOX $afm>AFM calc.<br>
<INPUT NAME=dm TYPE=CHECKBOX $PREFS{'dm'}>dm<br>
<INPUT NAME=orb TYPE=CHECKBOX $PREFS{'orb'}>orbital pot (DFT+U)<br>
<INPUT NAME=eece TYPE=CHECKBOX $PREFS{'eece'}>eece (hybrid-DFT for correlated e)<br><br>
<INPUT NAME=dftd3 TYPE=CHECKBOX $PREFS{'dftd3'}>DFT-D3 (dispersion corrections)<br>
  <INPUT NAME=hf TYPE=CHECKBOX $PREFS{'hf'}>hf (full hybrid-DFT, expensive! )<br>
  <INPUT NAME=diaghf TYPE=CHECKBOX $PREFS{'diaghf'}>diaghf (diagonal-only full hybrid-DFT )<br>
  <INPUT NAME=nonself TYPE=CHECKBOX $PREFS{'nonself'}>non-scf full hybrid-DFT)<br>
  <INPUT NAME=newklist TYPE=CHECKBOX $PREFS{'newklist'}>newklist (full hybrid-DFT with new k-list )<br>
  <INPUT NAME=redklist TYPE=CHECKBOX $PREFS{'redklist'}>redklist (full hybrid-DFT with red. k-list)<br>
</td><td><br>
<INPUT NAME=fsm TYPE=CHECKBOX $PREFS{'fsm'}>FSM <INPUT NAME=fsm_count
SIZE=3 VALUE=$PREFS{'fsm_count'}><br>
</td></tr></table>
</fieldset>

</td>
<TD bgcolor=$gray>

<fieldset>
<H3>Expert options:</H3>
<INPUT NAME=expert SIZE=22>
</fieldset>

<br>
<fieldset>
<H3>Scratch Directory:</H3>
<INPUT NAME="scratchdir" SIZE=26 value="$PREFS{'scratchdir'}">
</fieldset>

<br>
<fieldset>
<H3>Convergence criteria:</H3>
<table><tr valign=top><td>
<input name="conv_ec" type=checkbox  $PREFS{'conv_ec'}> Energy:
</td><td>
<input name="convval_ec" size=8 value="$PREFS{'convval_ec'}">Ry
</td></tr>
<tr valign=top><td>
<input name="conv_fc" type=checkbox  $PREFS{'conv_fc'}> Force:
</td><td>  
<input name="convval_fc" size=8 value="$PREFS{'convval_fc'}">mRy/au
</td></tr>
<tr valign=top><td>
<input name="conv_cc" type=checkbox  $PREFS{'conv_cc'}> Charge:
</td><td>
<input name="convval_cc" size=8 value="$PREFS{'convval_cc'}">e
</td></tr>
</td></tr></table>
</fieldset>
</td></tr>

<tr><td colspan=2 bgcolor=$gray>
$exetypes
</td></tr>
<tr><td colspan=2 bgcolor=$gray>
E-mail notification <INPUT TYPE=CHECKBOX NAME="notify" $PREFS{'notify'}>
to <INPUT NAME="notification" SIZE=30 VALUE="$notification">
</td></tr>
<tr><td colspan=1 bgcolor=$gray>
<INPUT TYPE=SUBMIT VALUE="start SCF cycle">
<INPUT TYPE=RESET VALUE="Clear entries">
</td>
<td bgcolor=$red>
<form action=saveparam.pl>
<input type=checkbox name=saveonly>
only save parameters
</td></tr>
</form>
</table>

__STOP__
}

PrintPage("Context",$OUT);


#<tr><td colspan=2 bgcolor=$gray>
#<b>Expert options</b>
#<INPUT NAME=expert SIZE=40>
#</td></tr>


More information about the Wien mailing list