Savecalc: Difference between revisions
Jump to navigation
Jump to search
m →script |
|||
| (2 intermediate revisions by one other user not shown) | |||
| 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]], [[rungen]] | ||
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. | 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. | 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. | ||
For more information: rgarcia@iciq.es | |||
== script == | == script == | ||
| Line 25: | Line 27: | ||
while [ $j = 0 ] ; do | while [ $j = 0 ] ; do | ||
i=$[$i+1] | i=$[$i+1] | ||
if [[ -e poscar_$i ]] ; then j=0 ; else j=1 ; fi | if <nowiki>[[ -e poscar_$i ]]</nowiki> ; then j=0 ; else j=1 ; fi | ||
done | done | ||
Latest revision as of 15:18, 31 July 2020
go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP, rungen
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.
For more information: rgarcia@iciq.es
script[edit]
#!/bin/bash # Rodrigo García-Muelas. April 2013. 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