Stage_1/DOS script output for 596: Bi2WO6_1_hb

Status: finished
set SaveWAVECAR 0
set SaveWAVEDER 0
set SaveOPTIC 0

	    proc listFiles {} {
		puts "\nFiles:"
		foreach file [lsort [glob -nocomplain *]] {
		    if {[catch {file mtime $file} T]} {
			set T "--- -- --:--:--"
		    } else {
			set T [clock format $T -format "%b %d %T"]
		    }
		    puts [format "%15d %s %s" [file size $file] $T $file]
		}
		puts ""
	    }
	    proc saveFiles {dir} {
		file mkdir $dir
		foreach file {INCAR POSCAR POTCAR KPOINTS WAVECAR CHGCAR} {
		    if {[file exists $file]} {
			file copy -force $file Initial/
		    }
		}
	    }
	
		    package require JobServer
		    package require Translate
			::JobServer::getFile 596 "Stage_1/WAVECAR.txt" WAVECAR.txt

		    WAVECARtoBinary
		    catch {file delete -force WAVECAR.txt}
			set nsteps 1
	package require VASP 5.0
	    if {[catch {
		listFiles

		if {$nsteps > 1} {

		    for {set nstep 0} {$nstep <= $nsteps} {incr nstep} {
			file copy -force INCAR$nstep INCAR
			file copy -force mdlicense$nstep.txt mdlicense.txt
			puts "Starting VASP step $nstep for the DOS calculation at [clock format [clock seconds]]"
			::VASP::execute -out VASP.out
			after 100
			file rename -force VASP.out VASP$nstep.out
		    }
		    set fd [open VASP.out a]
		    for {set nstep 0} {$nstep <= $nsteps} {incr nstep} {
			if {[file exists VASP$nstep.out]} {
			    set fdnstep [open VASP$nstep.out r]
			    puts $fd [read $fdnstep]
			    close $fdnstep
			}
		    } 
		    close $fd

		} else {

		    puts "Running the DOS calculation"
		    ::VASP::execute -out VASP.out
		    after 100

		}

		if {$SaveWAVECAR && [file exists WAVECAR] && [file size WAVECAR] > 0} {
		    package require Translate
		    WAVECARtoASCII WAVECAR VASP_WAVECAR.txt
		}
		catch {file delete -force WAVECAR}
		if {$SaveOPTIC && [file exists OPTIC] && [file size OPTIC] > 0} {
		    package require Translate
		    OPTICtoASCII OPTIC OPTIC.txt
		}
		puts "Finished the DOS!"
		listFiles
	    } msg]} {
		puts "Error with the DOS: $msg"
		puts ""
		puts $::errorInfo
		listFiles
	    }