Sha256: 1d2841d055650c08b064b0f88279339b465ce363ad294b207b60b7d3f71e0e56
Contents?: true
Size: 998 Bytes
Versions: 1
Compression:
Stored size: 998 Bytes
Contents
#! /usr/bin/env ruby # coding: utf-8 require "rubygems" gem "comana" require "comana/computationmanager.rb" #gem "vasputils" require "vasputils/vaspdir.rb" require "vasputils/vaspgeomopt.rb" require "optparse" ## option analysis opts = {} op = OptionParser.new op.on("-g" , "--geom-opt", "Geometry optimization"){opts[:geom] = true} op.on("-c" , "--cond-find", "Condition finding" ){opts[:cond] = true} op.parse!(ARGV) dir = ARGV[0] || "." if opts[:geom] && opts[:cond] puts "-g and -c must not be duplicated." exit end if opts[:geom] begin calc_dir = VaspGeomOpt.new(dir) rescue VaspGeomOpt::NoVaspDirError puts "Not suitable for VaspGeomOpt: #{dir}" exit end elsif opts[:cond] TODO else begin calc_dir = VaspDir.new(dir) rescue VaspDir::InitializeError puts "Not VaspDir: #{dir}" exit end end #pp calc_dir.class.ancestors begin calc_dir.start rescue ComputationManager::AlreadyStartedError puts "Already started. Exit." exit end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vasputils-0.0.9 | bin/runvasp |