Bash scripts: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
No edit summary
Line 15: Line 15:


===generate_inputs_2.sh (Gbnd convergence input files)===
===generate_inputs_2.sh (Gbnd convergence input files)===
#!/bin/bash  
#!/bin/bash  
bands='10 20 30 40 50 60 70 80'
bands='10 20 30 40 50 60 70 80'
for i in ${bands}
for i in ${bands}
  do
  do
    sed  -e "s/1 | 40/1 | $i/g"  gw_ppa_30b_3Ry.in  >  gw_ppa_Gbnd$i'.in'
    sed  -e "s/1 | 40/1 | $i/g"  gw_ppa_30b_3Ry.in  >  gw_ppa_Gbnd$i'.in'
  done
  done
 


== Links ==
== Links ==
* [[Tutorials|Back to tutorials menu]]
* [[Tutorials|Back to tutorials menu]]
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN | Back to How to obtain the quasiparticle band structure of a bulk material: h-BN  ]]
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN | Back to How to obtain the quasiparticle band structure of a bulk material: h-BN  ]]

Revision as of 08:40, 20 April 2017

generate_inputs_1.sh (NGsBlkXp and BndsRnXp convergence input files)

#!/bin/bash 
bands='10 20 30 40'
blocks='1 2 3 4 5'
for i in ${bands}
 do
  for j in ${blocks}
   do
    sed  -e "s/1 | 10/1 | $i/g"  gw_ppa.in  > tmp$i
    sed  -e "s/NGsBlkXp= 1/ NGsBlkXp= $j/g"  tmp$i > gw_ppa_$i'b_'$j'Ry.in'
    rm tmp*
   done
 done

generate_inputs_2.sh (Gbnd convergence input files)

#!/bin/bash 
bands='10 20 30 40 50 60 70 80'
for i in ${bands}
 do
   sed  -e "s/1 | 40/1 | $i/g"  gw_ppa_30b_3Ry.in  >  gw_ppa_Gbnd$i'.in'
 done

Links