Savecalc: Difference between revisions

From Wiki
Jump to navigation Jump to search
Rgarcia (talk | contribs)
m New page: go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP #!/bin/bash if [ -e STOPCAR ] ; then rm STOPCAR ; fi # security comprobation if [ -...
 
Rgarcia (talk | contribs)
mNo edit summary
Line 1: Line 1:
go back to [[Main Page]], [[Group Pages]], [[Núria López and Group]], [[Scripts_for_VASP]]
go back to [[Main Page]], [[Group Pages]], [[Núria López and Group]], [[Scripts_for_VASP]]
This script is designed to save the most important output files from a run, in case you need to do long ionic optimizations involving several runs.
Advice: Use it as a security control in your run generator (see [[rungen]]), to avoid the accidental loss of information for submitting a job without previously moving the CONTCAR file into the new POSCAR.
== script ==


  #!/bin/bash  
  #!/bin/bash  
   
 
# Rodrigo  
  if [ -e STOPCAR ]  ; then rm STOPCAR ; fi  
  if [ -e STOPCAR ]  ; then rm STOPCAR ; fi  
   
   

Revision as of 16:03, 21 May 2013

go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP

This script is designed to save the most important output files from a run, in case you need to do long ionic optimizations involving several runs.

Advice: Use it as a security control in your run generator (see rungen), to avoid the accidental loss of information for submitting a job without previously moving the CONTCAR file into the new POSCAR.

script

#!/bin/bash 
# Rodrigo  
if [ -e STOPCAR ]  ; then rm STOPCAR ; fi 

# security comprobation
if [ -e CONTCAR ]  ; then # exist
if [ -s CONTCAR ]  ; then # nonzero lenght 

# do I need to account? 
if [ -e poscar_1 ] ; then 

# count
i=0
j=0
while [ $j = 0 ] ; do
i=$[$i+1]
if -e poscar_$i  ; then j=0 ; else j=1 ; fi
done 

# save files
mv POSCAR poscar_$i
mv OUTCAR outcar_$i
mv CONTCAR POSCAR
mv OSZICAR oszicar_$i
mv vasprun.xml vasprun_$i.xml 

else 

mv POSCAR poscar_1
mv OUTCAR outcar_1
mv CONTCAR POSCAR
mv OSZICAR oszicar_1
mv vasprun.xml vasprun_1.xml 

fi 

else
rm CONTCAR # if zero lenght
fi 

fi