vasputils 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/checkvasp +79 -0
- data/bin/runvasp +23 -5
- data/lib/vasputils/vaspdir.rb +6 -0
- data/lib/vasputils/vaspgeomopt.rb +19 -19
- data/lib/vasputils/vaspkpointsfinder.rb +72 -0
- data/memo.txt +5 -0
- data/test/test_calcinspector.rb +29 -29
- data/test/test_incar.rb +109 -109
- data/test/test_kpoints.rb +92 -92
- data/test/test_outcar.rb +154 -154
- data/test/test_poscar.rb +184 -184
- data/test/test_potcar.rb +52 -52
- data/test/test_vaspdir.rb +10 -0
- data/test/test_vaspkpointsfinder.rb +25 -0
- data/test/vaspkpointsfinder/01-01-01/try00/INCAR +17 -0
- data/test/vaspkpointsfinder/01-01-01/try00/KPOINTS +6 -0
- data/test/vaspkpointsfinder/01-01-01/try00/POSCAR +8 -0
- data/test/vaspkpointsfinder/01-01-01/try00/POTCAR +0 -0
- data/vasputils.gemspec +10 -6
- metadata +31 -29
- data/bin/lsvasp +0 -95
- data/bin/lsvaspdir +0 -63
- data/bin/lsvaspseries +0 -95
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vasputils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
16
|
-
requirement: &
|
16
|
+
requirement: &83019100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.12'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *83019100
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &83018860 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.1.3
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *83018860
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &83018620 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.8.3
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *83018620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: simplecov
|
49
|
-
requirement: &
|
49
|
+
requirement: &83018380 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *83018380
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: crystalcell
|
60
|
-
requirement: &
|
60
|
+
requirement: &83018140 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.0.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *83018140
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mageo
|
71
|
-
requirement: &
|
71
|
+
requirement: &83017900 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.0.0
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *83017900
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: malge
|
82
|
-
requirement: &
|
82
|
+
requirement: &83017660 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.0.1
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *83017660
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: maset
|
93
|
-
requirement: &
|
93
|
+
requirement: &83017420 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.0.0
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *83017420
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: comana
|
104
|
-
requirement: &
|
104
|
+
requirement: &83017180 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 0.0.9
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *83017180
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: builtinextension
|
115
|
-
requirement: &
|
115
|
+
requirement: &83016940 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,16 +120,14 @@ dependencies:
|
|
120
120
|
version: 0.0.3
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *83016940
|
124
124
|
description: ! "This gem provides parsers for some of input and output files for VASP.\n
|
125
125
|
\ This will provide support command for computations."
|
126
126
|
email: ippei94da@gmail.com
|
127
127
|
executables:
|
128
128
|
- addVolumeToten.rb
|
129
|
+
- checkvasp
|
129
130
|
- latticeconstants
|
130
|
-
- lsvasp
|
131
|
-
- lsvaspdir
|
132
|
-
- lsvaspseries
|
133
131
|
- qsubvasp
|
134
132
|
- runvasp
|
135
133
|
- symposcar
|
@@ -145,10 +143,8 @@ files:
|
|
145
143
|
- Rakefile
|
146
144
|
- VERSION
|
147
145
|
- bin/addVolumeToten.rb
|
146
|
+
- bin/checkvasp
|
148
147
|
- bin/latticeconstants
|
149
|
-
- bin/lsvasp
|
150
|
-
- bin/lsvaspdir
|
151
|
-
- bin/lsvaspseries
|
152
148
|
- bin/qsubvasp
|
153
149
|
- bin/runvasp
|
154
150
|
- bin/symposcar
|
@@ -161,6 +157,7 @@ files:
|
|
161
157
|
- lib/vasputils/potcar.rb
|
162
158
|
- lib/vasputils/vaspdir.rb
|
163
159
|
- lib/vasputils/vaspgeomopt.rb
|
160
|
+
- lib/vasputils/vaspkpointsfinder.rb
|
164
161
|
- memo.txt
|
165
162
|
- test/calcseries/dup_finished/try00/CONTCAR
|
166
163
|
- test/calcseries/dup_finished/try00/INCAR
|
@@ -228,6 +225,7 @@ files:
|
|
228
225
|
- test/test_potcar.rb
|
229
226
|
- test/test_vaspdir.rb
|
230
227
|
- test/test_vaspgeomopt.rb
|
228
|
+
- test/test_vaspkpointsfinder.rb
|
231
229
|
- test/vaspdir/finished/CONTCAR
|
232
230
|
- test/vaspdir/finished/INCAR
|
233
231
|
- test/vaspdir/finished/KPOINTS
|
@@ -315,6 +313,10 @@ files:
|
|
315
313
|
- test/vaspgeomopt/till01/try01/KPOINTS
|
316
314
|
- test/vaspgeomopt/till01/try01/POSCAR
|
317
315
|
- test/vaspgeomopt/till01/try01/POTCAR
|
316
|
+
- test/vaspkpointsfinder/01-01-01/try00/INCAR
|
317
|
+
- test/vaspkpointsfinder/01-01-01/try00/KPOINTS
|
318
|
+
- test/vaspkpointsfinder/01-01-01/try00/POSCAR
|
319
|
+
- test/vaspkpointsfinder/01-01-01/try00/POTCAR
|
318
320
|
- vasputils.gemspec
|
319
321
|
homepage: http://github.com/ippei94da/vasputils
|
320
322
|
licenses:
|
@@ -331,7 +333,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
331
333
|
version: '0'
|
332
334
|
segments:
|
333
335
|
- 0
|
334
|
-
hash:
|
336
|
+
hash: 434831473
|
335
337
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
336
338
|
none: false
|
337
339
|
requirements:
|
data/bin/lsvasp
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
# Show state of vasp geometry optimization calculations.
|
5
|
-
|
6
|
-
#require "vasputils/calcseries.rb"
|
7
|
-
require "vasputils/vaspgeomopt.rb"
|
8
|
-
#require "optparse"
|
9
|
-
#
|
10
|
-
## option analysis
|
11
|
-
#OPTIONS = Hash.new
|
12
|
-
#op = OptionParser.new
|
13
|
-
#op.on("-c", "--cutoff" , "Show cutoff energy. "){ OPTIONS[:cutoff ] = true }
|
14
|
-
#op.on("-e", "--electronic-steps", "Show electronic-steps." ){ OPTIONS[:e_steps] = true }
|
15
|
-
#op.on("-i", "--ionic-steps" , "Show ionic-steps." ){ OPTIONS[:i_steps] = true }
|
16
|
-
#op.on("-k", "--k-mesh" , "Show k-mesh." ){ OPTIONS[:k_mesh] = true }
|
17
|
-
#op.on("-K", "--irr-kpoints" , "Show irreducible k-points."){ OPTIONS[:irr_k ] = true }
|
18
|
-
#op.on("-l", "--lattice-const" , "Show lattice constants."){ OPTIONS[:lattice] = true }
|
19
|
-
#op.on("-t", "--elapsed-time" , "Show elapsed-time." ){ OPTIONS[:time ] = true }
|
20
|
-
#op.on("-T", "--time-estesp" , "Show time per elec. steps."){ OPTIONS[:time_e] = true }
|
21
|
-
#op.on("-E", "--toten" , "Show toten." ){ OPTIONS[:toten ] = true }
|
22
|
-
#op.on("-a", "--all" , "Show all information." ){
|
23
|
-
# # -a で出力される順序はここで決まる。
|
24
|
-
# OPTIONS[:cutoff ] = true
|
25
|
-
# OPTIONS[:irr_k ] = true
|
26
|
-
# OPTIONS[:k_mesh ] = true
|
27
|
-
# OPTIONS[:i_steps ] = true
|
28
|
-
# OPTIONS[:e_steps ] = true
|
29
|
-
# OPTIONS[:time ] = true
|
30
|
-
# OPTIONS[:time_e ] = true
|
31
|
-
# OPTIONS[:lattice ] = true
|
32
|
-
# OPTIONS[:toten ] = true
|
33
|
-
#}
|
34
|
-
#
|
35
|
-
#op.parse!(ARGV)
|
36
|
-
|
37
|
-
dirs = ARGV
|
38
|
-
dirs = Dir.glob("*").sort if ARGV.empty?
|
39
|
-
|
40
|
-
## generate headline
|
41
|
-
#items = []
|
42
|
-
#OPTIONS.each do |key, val|
|
43
|
-
# case key
|
44
|
-
# when :cutoff then items << sprintf("%6s", "ENCUT")
|
45
|
-
# when :k_mesh then items << sprintf("%2s, %2s, %2s, %8s, %8s, %8s",
|
46
|
-
# "ka", "kb", "kc", "ka_shift", "kb_shift", "kc_shift")
|
47
|
-
# when :irr_k then items << sprintf("%4s", "ir_k")
|
48
|
-
# when :lattice then
|
49
|
-
# items << sprintf("%9s, %9s, %9s, %9s, %9s, %9s",
|
50
|
-
# "a", "b", "c", "alpha", "beta", "gamma")
|
51
|
-
# when :e_steps then items << sprintf("%4s", "el_s")
|
52
|
-
# when :i_steps then items << sprintf("%4s", "io_s")
|
53
|
-
# when :time then items << sprintf("%8s", "time")
|
54
|
-
# when :time_e then items << sprintf("%8s", "time/ele")
|
55
|
-
# when :toten then items << sprintf("%16s", "TOTEN")
|
56
|
-
# end
|
57
|
-
#end
|
58
|
-
#items << "calc_name"
|
59
|
-
#puts "#" + items.join(", ")
|
60
|
-
|
61
|
-
dirs.each do |dir|
|
62
|
-
state = VaspGeomOpt.new(dir).state
|
63
|
-
longest = :terminated.size
|
64
|
-
state = state.to_s + (" " * (longest - state.size ))
|
65
|
-
|
66
|
-
puts
|
67
|
-
#begin
|
68
|
-
# ldir = VaspGeomOpt.new(dir).latest_dir
|
69
|
-
# results = []
|
70
|
-
# names = []
|
71
|
-
# OPTIONS.each do |key, val|
|
72
|
-
# case key
|
73
|
-
# when :cutoff
|
74
|
-
# results << sprintf("%6s", ldir.finished_calc.incar["ENCUT"])
|
75
|
-
# when :k_mesh then results << sprintf("%2d, %2d, %2d, %8.5f, %8.5f, %8.5f",
|
76
|
-
# * ldir.finished_calc.kpoints[:mesh], * ldir.finished_calc.kpoints[:shift])
|
77
|
-
# when :irr_k then results << sprintf("%4d", ldir.finished_calc.outcar[:irreducible_kpoints])
|
78
|
-
# when :lattice then
|
79
|
-
# results << sprintf("%9.5f, %9.5f, %9.5f, %9.5f, %9.5f, %9.5f",
|
80
|
-
# * ldir.finished_calc.contcar.axes.get_lattice_constants)
|
81
|
-
# when :e_steps then results << sprintf("%4d", ldir.internal_steps)
|
82
|
-
# when :i_steps then results << sprintf("%4d", ldir.external_steps)
|
83
|
-
# when :time then results << sprintf("%8d", ldir.elapsed_time)
|
84
|
-
# when :time_e then results << sprintf("%8d", ldir.elapsed_time/ldir.internal_steps)
|
85
|
-
# when :toten then results << sprintf("%16.4f", ldir.finished_calc.outcar[:totens][-1])
|
86
|
-
# end
|
87
|
-
# end
|
88
|
-
# results << dir
|
89
|
-
# puts " " + results.join(", ")
|
90
|
-
#rescue
|
91
|
-
# puts "Something wrong: #{dir}"
|
92
|
-
# next
|
93
|
-
#end
|
94
|
-
|
95
|
-
end
|
data/bin/lsvaspdir
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
# vasp の計算ディレクトリの状態を表示する。
|
5
|
-
#
|
6
|
-
# - YET 未計算(lock がない)
|
7
|
-
# - STARTED 計算中 or 計算が終了したが、何らかのエラーが生じた。
|
8
|
-
# (lock があるが、normal_ended ではない)
|
9
|
-
# 計算が中断されたか、計算中かの判断は原理上つけられない。
|
10
|
-
# - NEXT 計算が正常に終了し、収束していない。次の計算が生成された。
|
11
|
-
# - FINISHED 計算が正常に終了し、収束した。
|
12
|
-
#
|
13
|
-
# 引数でディレクトリを指定できる。
|
14
|
-
# 引数なしだとカレントディレクトリの全てのディレクトリ。
|
15
|
-
#
|
16
|
-
# オプションをつけると、指定の状態のディレクトリを出力。
|
17
|
-
# -y : YET
|
18
|
-
# -s : STARTED
|
19
|
-
# -n : NEXT
|
20
|
-
# -f : FINISHED
|
21
|
-
# -c -n のように複数指定できる。
|
22
|
-
#
|
23
|
-
# デフォルトでは引数のディレクトリまたは
|
24
|
-
# -S オプションで状態を出力せず、ディレクトリ名だけを出力する。
|
25
|
-
# このオプションはシェルの backquote `` 機能から使うことを想定している。
|
26
|
-
|
27
|
-
require "optparse"
|
28
|
-
|
29
|
-
require "rubygems"
|
30
|
-
gem "vasputils"
|
31
|
-
require "vasputils/calcinspector.rb"
|
32
|
-
require "vasputils/vaspdir.rb"
|
33
|
-
|
34
|
-
OPTIONS = {}
|
35
|
-
OPTIONS[:target_status] = ["YET", "STARTED", "NEXT", "FINISHED"]
|
36
|
-
tmp = []
|
37
|
-
op = OptionParser.new
|
38
|
-
op.on("-y", "--yet" , "Show calcs of YET." ){tmp << "YET" }
|
39
|
-
op.on("-s", "--started" , "Show calcs of STARTED." ){tmp << "STARTED" }
|
40
|
-
op.on("-n", "--next" , "Show calcs of NEXT." ){tmp << "NEXT" }
|
41
|
-
op.on("-f", "--finished" , "Show calcs of FINISHED."){tmp << "FINISHED"}
|
42
|
-
op.on("-S", "--no-status", "Not output status." ){OPTIONS[:nostatus] = true}
|
43
|
-
op.parse!(ARGV)
|
44
|
-
OPTIONS[:target_status] = tmp unless tmp.empty?
|
45
|
-
|
46
|
-
#pp OPTIONS
|
47
|
-
|
48
|
-
dirs = ARGV
|
49
|
-
dirs = Dir.glob("*").sort if ARGV.empty?
|
50
|
-
dirs.each do |dir|
|
51
|
-
begin
|
52
|
-
vd = VaspDir.new(dir)
|
53
|
-
status = CalcInspector.inspect(vd)
|
54
|
-
#pp status
|
55
|
-
if OPTIONS[:target_status].include?(status)
|
56
|
-
printf("%10s ", status) unless OPTIONS[:nostatus]
|
57
|
-
printf("%s\n", dir)
|
58
|
-
end
|
59
|
-
rescue VaspDir::InitializeError
|
60
|
-
#pp "Something wrong."
|
61
|
-
next
|
62
|
-
end
|
63
|
-
end
|
data/bin/lsvaspseries
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
# vasp の計算シリーズの状態を表示する。
|
5
|
-
# - total ionic steps
|
6
|
-
# - total electronic steps
|
7
|
-
# - total elapsed time
|
8
|
-
# - final TOTEN
|
9
|
-
# - final cell parameter
|
10
|
-
|
11
|
-
require "vasputils/calcseries.rb"
|
12
|
-
require "vasputils/vaspdir.rb"
|
13
|
-
require "optparse"
|
14
|
-
|
15
|
-
## option analysis
|
16
|
-
OPTIONS = Hash.new
|
17
|
-
op = OptionParser.new
|
18
|
-
op.on("-c", "--cutoff" , "Show cutoff energy. "){ OPTIONS[:cutoff ] = true }
|
19
|
-
op.on("-e", "--electronic-steps", "Show electronic-steps." ){ OPTIONS[:e_steps] = true }
|
20
|
-
op.on("-i", "--ionic-steps" , "Show ionic-steps." ){ OPTIONS[:i_steps] = true }
|
21
|
-
op.on("-k", "--k-mesh" , "Show k-mesh." ){ OPTIONS[:k_mesh] = true }
|
22
|
-
op.on("-K", "--irr-kpoints" , "Show irreducible k-points."){ OPTIONS[:irr_k ] = true }
|
23
|
-
op.on("-l", "--lattice-const" , "Show lattice constants."){ OPTIONS[:lattice] = true }
|
24
|
-
op.on("-t", "--elapsed-time" , "Show elapsed-time." ){ OPTIONS[:time ] = true }
|
25
|
-
op.on("-T", "--time-estesp" , "Show time per elec. steps."){ OPTIONS[:time_e] = true }
|
26
|
-
op.on("-E", "--toten" , "Show toten." ){ OPTIONS[:toten ] = true }
|
27
|
-
op.on("-a", "--all" , "Show all information." ){
|
28
|
-
# -a で出力される順序はここで決まる。
|
29
|
-
OPTIONS[:cutoff ] = true
|
30
|
-
OPTIONS[:irr_k ] = true
|
31
|
-
OPTIONS[:k_mesh ] = true
|
32
|
-
OPTIONS[:i_steps ] = true
|
33
|
-
OPTIONS[:e_steps ] = true
|
34
|
-
OPTIONS[:time ] = true
|
35
|
-
OPTIONS[:time_e ] = true
|
36
|
-
OPTIONS[:lattice ] = true
|
37
|
-
OPTIONS[:toten ] = true
|
38
|
-
}
|
39
|
-
|
40
|
-
op.parse!(ARGV)
|
41
|
-
|
42
|
-
dirs = ARGV
|
43
|
-
dirs = Dir.glob("*").sort if ARGV.empty?
|
44
|
-
|
45
|
-
# generate headline
|
46
|
-
items = []
|
47
|
-
OPTIONS.each do |key, val|
|
48
|
-
case key
|
49
|
-
when :cutoff then items << sprintf("%6s", "ENCUT")
|
50
|
-
when :k_mesh then items << sprintf("%2s, %2s, %2s, %8s, %8s, %8s",
|
51
|
-
"ka", "kb", "kc", "ka_shift", "kb_shift", "kc_shift")
|
52
|
-
when :irr_k then items << sprintf("%4s", "ir_k")
|
53
|
-
when :lattice then
|
54
|
-
items << sprintf("%9s, %9s, %9s, %9s, %9s, %9s",
|
55
|
-
"a", "b", "c", "alpha", "beta", "gamma")
|
56
|
-
when :e_steps then items << sprintf("%4s", "el_s")
|
57
|
-
when :i_steps then items << sprintf("%4s", "io_s")
|
58
|
-
when :time then items << sprintf("%8s", "time")
|
59
|
-
when :time_e then items << sprintf("%8s", "time/ele")
|
60
|
-
when :toten then items << sprintf("%16s", "TOTEN")
|
61
|
-
end
|
62
|
-
end
|
63
|
-
items << "calc_name"
|
64
|
-
puts "#" + items.join(", ")
|
65
|
-
|
66
|
-
dirs.each do |dir|
|
67
|
-
begin
|
68
|
-
cs = CalcSeries.new(dir)
|
69
|
-
results = []
|
70
|
-
names = []
|
71
|
-
OPTIONS.each do |key, val|
|
72
|
-
case key
|
73
|
-
when :cutoff
|
74
|
-
results << sprintf("%6s", cs.finished_calc.incar["ENCUT"])
|
75
|
-
when :k_mesh then results << sprintf("%2d, %2d, %2d, %8.5f, %8.5f, %8.5f",
|
76
|
-
* cs.finished_calc.kpoints[:mesh], * cs.finished_calc.kpoints[:shift])
|
77
|
-
when :irr_k then results << sprintf("%4d", cs.finished_calc.outcar[:irreducible_kpoints])
|
78
|
-
when :lattice then
|
79
|
-
results << sprintf("%9.5f, %9.5f, %9.5f, %9.5f, %9.5f, %9.5f",
|
80
|
-
* cs.finished_calc.contcar.axes.get_lattice_constants)
|
81
|
-
when :e_steps then results << sprintf("%4d", cs.internal_steps)
|
82
|
-
when :i_steps then results << sprintf("%4d", cs.external_steps)
|
83
|
-
when :time then results << sprintf("%8d", cs.elapsed_time)
|
84
|
-
when :time_e then results << sprintf("%8d", cs.elapsed_time/cs.internal_steps)
|
85
|
-
when :toten then results << sprintf("%16.4f", cs.finished_calc.outcar[:totens][-1])
|
86
|
-
end
|
87
|
-
end
|
88
|
-
results << dir
|
89
|
-
puts " " + results.join(", ")
|
90
|
-
rescue
|
91
|
-
puts "Something wrong: #{dir}"
|
92
|
-
next
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|