[Wien] bash script to run initso_lapw for different M-axis

Gavin Abo gsabo at crimson.ua.edu
Sat Sep 16 17:12:01 CEST 2017


For the (100), (101), (102), and (103), you could try a for loop in bash 
[ 
https://stackoverflow.com/questions/24366305/how-to-write-a-bash-script-with-a-for-loop-that-creates-multiple-text-files-with 
]; for example:

create_initso_inputfile.sh
----------------------------------------------------------
#!/bin/bash

for i in {100,101,102,103}; do
echo $i > input$i.txt
echo "11-15,17,18,22-26" >> input$i.txt
echo "N" >> input$i.txt
echo "8" >> input$i.txt
echo "y" >> input$i.txt
echo "150" >> input$i.txt
echo "N" >> input$i.txt
done
----------------------------------------------------------

The above bash script creates the input data in separate files 
input100.txt, input101.txt, input102.txt, and input103.txt. Though, you 
could instead modify it to output a input.txt in separate directories.

Then, you could try redirecting the files [ 
https://en.wikipedia.org/wiki/Redirection_(computing) ] as input to 
initso in your job scripts; for example, try in the 100 job script:

initso_lapw < input100.txt

(note: If the text editor opens of case.inso or case.in1 for example 
stop the initso_lapw script from finishing, then the editor lines might 
need commented out in initso_lapw or make_inso_lapw. )

Alternatively, you could also try using echo or printf in your job 
script like was described before, with kgen as the example, in the 
mailing list posts at:

https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg14196.html
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg14171.html

On 9/16/2017 8:04 AM, venkatesh chandragiri wrote:
>
>
> Dear Wien2k users,
>
>
> I want to run the SO caculations to plot the energies for different 
> angles of M-axis orientations. So I have re-initilize the SO 
> calcualtions for each M-axis using "initso_lapw" and need to submit 
> the job in each time in a queue using a pbs script. But this takes me 
> a lot of effort (re-initiliation of initso_lapw for each M-axis)and 
> for each time submitting the job is taking more time to have its own 
> turn to run. As it seems to me all other paramaters are similar, 
> except the M-axis values, Is there any unique way to run SO 
> calculations by giving M-axis values , A= 
> {(100),(101,)(102),(103)..etc} in a seperate file, such that for a 
> give i=1 to n (n= size of A), the wien2k do the initso_lapw and run 
> the SO calculatons. After finishing each ith SO run, the pbs script 
> takes the output (using grep command) into another file (output.txt). 
> May be this was in similar to the optimize_job script.
>
> Could anybody suggest me how to write a bash script to read the 
> parameters from input.txt when running initso-lapw for each ith run.
>
> input.txt
> ==================
>
> initso_lapw
>
> A  = {(100),(101,)(102),(103)..etc} # M-axis orientations
>
> 11-15,17,18,22-26 # list of atoms for which SO was not applied
>
> N # no for RLO
>
> 8 # Emax value
>
> y # yes, to generate the new structure for a given M-axis
>
> y # yes, to use newly generated structure
>
> 150 # number of k-points
>
> N # no for re-run the kgen
>
> =========================================
>
> thanks in advance.
>
> with best regards,
>
> venkatesh
>


More information about the Wien mailing list