Sha256: 80c6acd93d90bf9f4e43831c53fa6d3363eeb303d9bd1c865d33765a7ff1e0b3
Contents?: true
Size: 880 Bytes
Versions: 2
Compression:
Stored size: 880 Bytes
Contents
#! /usr/bin/env ruby # coding: utf-8 require "optparse" require "fileutils" #require "rubygems" #gem "vasputils" require "vasputils" ## option analysis OPTIONS = {} op = OptionParser.new op.on("-f" , "--force" , "Force to remove finished calc."){ OPTIONS[:force] = true} op.parse!(ARGV) ARGV.each do |tgt| # Checking directory for normal VASP. begin vd = VaspUtils::VaspDir.new(tgt) rescue VaspUtils::VaspDir.InitializeError puts "Not VaspDir: #{tgt}" next end # Delete if OPTIONS[:force] || (! vd.finished?) Dir.glob(tgt + "/*").each do |file| next if file == tgt + "/INCAR" next if file == tgt + "/KPOINTS" next if file == tgt + "/POSCAR" next if file == tgt + "/POTCAR" puts "Deleting #{file}" FileUtils.remove_entry_secure file end else puts "Leave finished calc: #{tgt}" next end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vasputils-0.0.11 | bin/rmvaspout |
vasputils-0.0.10 | bin/rmvaspout |