vasputils 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90a3f3ced8d0ca4424ca6397334251481629decc
4
- data.tar.gz: f2577c5abbfa368599ac2053a0c22f924800f346
3
+ metadata.gz: 339d8dabfe2de8080b94c9ad01d611e463cae0c5
4
+ data.tar.gz: 7bc653b965f9c83dcd2feb01c24c4a0655a74873
5
5
  SHA512:
6
- metadata.gz: 6ce2a69b6590a80935284f37a48d78a4504b2704f1fc02bd25ecf0a975f8fe333c5777242df6e3c83862e5632afbe02ebedd3bd2f49b9d6bbb85deabc80673d8
7
- data.tar.gz: b347cf6f3d610d07fa7645377980180988aa49b3fb71517d094f56951de7dd40aa5bb213f27d11ebc583c5438a49a6b9bc204716e41eb650603ed1a4b3141cda
6
+ metadata.gz: 3aba4d7d381de464b151b79472d4954ab4cd7c724de070c69b200aa5109fed39361c032d55081112b8bcef80a33e576498f325a23e95919559c19736f8a49b33
7
+ data.tar.gz: becf62c3e7eae752b35d0d32f7a67de3040a4256b075a25ae50cb1b134a174ac849ce5feba82eb9bc493eedaf88ac75655ba2d4e887744b822ba86b9fea14d14
data/CHANGES CHANGED
@@ -1,29 +1,45 @@
1
1
  = vasputils changelog
2
2
 
3
- == Master (for 0.1.7)
3
+ <!-- Master -->
4
+
5
+ == Version 0.1.7 [2016-07-12] released
6
+
7
+ * Explicit requirement of "spglib"
8
+ * Delete meaningless code
9
+ * Delete 'poscar povray'
10
+ * Add 'poscar png4in1' (need povray)
11
+ * Remove mobable_flag from Poscar.load_cell
12
+ * Add 'poscar show' command
13
+ * Add 'vaspdir nelect' command
4
14
 
5
15
  == Version 0.1.6 [2016-05-11] released
16
+
6
17
  * Bugfix of VasprunXml::elements; deleting space after 1 char element
7
18
 
8
19
  == Version 0.1.5 [2016-05-11] released
20
+
9
21
  * Add VasprunXml::calculation_basis
10
22
  * Add VasprunXml::elements
11
23
  * Add VasprunXml::calculation_cells
12
24
 
13
25
  == Version 0.1.4 [2016-05-09] released
26
+
14
27
  * Refactoring of unused variables
15
28
  * Add VasprunXml::calculation_energies
16
29
 
17
30
  == Version 0.1.3 [2016-04-20] released
31
+
18
32
  * Add 'incar generate --overwrite'
19
33
  * Bugfix 'vaspdir qsub'
20
34
  * Bugfix 'vaspdir show --dirs-with-matches'
21
35
  * Use vasputils.gemspec instead of Gemfile
22
36
 
23
37
  == Version 0.1.2 [2016-03-11] released
38
+
24
39
  * bugfix for 'vasprunxml pdos --sum'
25
40
 
26
41
  == Version 0.1.1 [2016-03-11] released
42
+
27
43
  * Add command
28
44
  * bin/vasprunxml
29
45
  * bin/incar
@@ -42,6 +58,7 @@
42
58
  * Remove bin/symposcar
43
59
 
44
60
  == Version 0.1.0 not released
61
+
45
62
  * Small revision of output of 'showvaspdir' to show zero at the tail of toten.
46
63
  * LAST_UPDATE in 'showvaspdir -a' is changed to be "time ago".
47
64
  * Small revision of output of 'symposcar' to include 'operation_id'
@@ -65,6 +82,7 @@
65
82
  * Add element order to Poscar.dump
66
83
 
67
84
  == Version 0.0.12 [2014-08-30] released
85
+
68
86
  * Update bin/symposcar .
69
87
  * Add options to bin/checkvasp and modified output format.
70
88
  * Rename VaspGeomOpt to VaspGeometryOptimizer
@@ -85,6 +103,7 @@
85
103
  * Update dependency on other gems.
86
104
 
87
105
  == Version 0.0.11
106
+
88
107
  * Modify bin/qsubvasp
89
108
  * Add VaspUtils::generate_kmeshes
90
109
  * Add example/dot.vasputils
@@ -96,6 +115,7 @@
96
115
  * Add bin/nextvasp
97
116
 
98
117
  == Version 0.0.10
118
+
99
119
  * Delete Outcar.volume
100
120
  * Delete Outcar.irreducible_kpoints
101
121
  * Accelerate Outcar, using UNIX commands: grep, tail, and head
@@ -104,28 +124,33 @@
104
124
  * Change name space for classes
105
125
 
106
126
  == Version 0.0.9
127
+
107
128
  * Add VaspDir.poscar
108
129
  * Add bin/checkvasp
109
130
  * Delete bin/lsvasp, bin/lsvaspdir, bin/lsvaspseries
110
131
 
111
132
  == Version 0.0.8
133
+
112
134
  * Modified bin/qsubvasp, add -g option
113
135
 
114
136
  == Version 0.0.7
137
+
115
138
  * Modified bin/qsubvasp
116
139
 
117
140
  == Version 0.0.6
141
+
118
142
  * bin/qsubvasp is added
119
143
  * lib/vaspdir is modified to raise ExecuteError when vasp failed
120
144
 
121
145
  == Version 0.0.5
146
+
122
147
  * Modifiy error process in VaspDir.calculate
123
148
  * Add qsubvasp
124
149
 
125
150
  == Version 0.0.4
151
+
126
152
  * Modified to use Comana
127
153
  * bin/runvasp is added
128
154
  * VaspDir is modified
129
155
  * VaspGeomOpt is added
130
156
 
131
- == Version 0.0.3
data/Gemfile CHANGED
@@ -14,10 +14,10 @@ group :development do
14
14
  gem "simplecov", "~> 0.11"
15
15
  gem "thor", "~> 0.19"
16
16
  gem "gnuplot", "~> 2.6"
17
- gem "mageo", "~> 0.0"
17
+ gem "mageo", "~> 0.1"
18
18
  gem "malge", "~> 0.0"
19
19
  gem "maset", "~> 0.0"
20
20
  gem "comana", "~> 0.1"
21
21
  gem "builtinextension", "~> 0.1.4"
22
- gem "crystalcell", "~> 0.0"
22
+ gem "crystalcell", "~> 0.1"
23
23
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
data/bin/poscar CHANGED
@@ -93,37 +93,45 @@ class PoscarCommand < Thor
93
93
  new_poscar.dump($stdout)
94
94
  end
95
95
 
96
- # POSCAR から得られる情報から、povray objects を生み出す povray 形式ファイルを生成。
97
- # 描画は行わない。外部でシェルスクリプトなどで実行すべき。
96
+ ## POSCAR から得られる情報から、povray objects を生み出す povray 形式ファイルを生成。
97
+ ## 描画は行わない。外部でシェルスクリプトなどで実行すべき。
98
+ ##
99
+ ##USAGE:
100
+ ## poscar2pov.rb POSCAR -e 'Li,O'
101
+ ## POTCAR なしでも元素指定可能。POTCAR より優先。
102
+ ## なお、POTCAR も -e 指定もない、すなわち元素が分からない状態ではプログラムは実行されない。
103
+ ##
104
+ ## poscar2pov.rb POSCAR -b "Li,Ge,0.0,1.0,Ge,Ge,2.0,3.0"
105
+ ## 以下の2つの条件の和集合となる連結の描画情報を示す POSCAR.bonds.inc を生成。
106
+ ## - Li-Ge間で距離 0.0〜1.0
107
+ ## - Ge-Ge間で距離 2.0〜3.0
108
+ #desc "povray", "generate povray objects."
109
+ #option :tolerance, desc: 'Tolerance for periodic shown atom.' # '-t tolerance'
110
+ #option :bonds, desc: 'Generate bonds matching conditions.',
111
+ # long_desc: 'E.g., -b "Li,Ge,0.0,1.0" indicateing two conditions'
112
+ # #'-b conditions',
113
+ #def povray(* args)
114
+ # poscar = args[0] || 'POSCAR'
115
+ # tolerance = options[:tolerance].to_f || 0.0
98
116
  #
99
- #USAGE:
100
- # poscar2pov.rb POSCAR -e 'Li,O'
101
- # POTCAR なしでも元素指定可能。POTCAR より優先。
102
- # なお、POTCAR も -e 指定もない、すなわち元素が分からない状態ではプログラムは実行されない。
103
- #
104
- # poscar2pov.rb POSCAR -b "Li,Ge,0.0,1.0,Ge,Ge,2.0,3.0"
105
- # 以下の2つの条件の和集合となる連結の描画情報を示す POSCAR.bonds.inc を生成。
106
- # - Li-Ge間で距離 0.0〜1.0
107
- # - Ge-Ge間で距離 2.0〜3.0
108
- desc "povray", "generate povray objects."
109
- option :tolerance, desc: 'Tolerance for periodic shown atom.' # '-t tolerance'
110
- option :bonds, desc: 'Generate bonds matching conditions.',
111
- long_desc: 'E.g., -b "Li,Ge,0.0,1.0" indicateing two conditions'
112
- #'-b conditions',
113
- def povray(* args)
114
- poscar = args[0] || 'POSCAR'
115
- tolerance = options[:tolerance].to_f || 0.0
116
-
117
- cell = VaspUtils::Poscar.load_file(poscar).to_cell(CrystalCell::Povray::Cell)
118
- puts cell.atoms_to_povs(tolerance).join
119
- puts cell.lattice_to_povs.join
120
- if options[:bonds]
121
- elem0, elem1, min, max = (options[:bonds].split(','))
122
- puts cell.bonds_to_povs(elem0, elem1, min.to_f, max.to_f).join
123
- end
117
+ # cell = VaspUtils::Poscar.load_file(poscar).to_cell(CrystalCell::Povray::Cell)
118
+ # puts cell.atoms_to_povs(tolerance).join
119
+ # puts cell.lattice_to_povs.join
120
+ # if options[:bonds]
121
+ # elem0, elem1, min, max = (options[:bonds].split(','))
122
+ # puts cell.bonds_to_povs(elem0, elem1, min.to_f, max.to_f).join
123
+ # end
124
+ #end
125
+
126
+ desc 'png4in1 POSCAR_file', 'Generate a PNG file from 4 view points.'
127
+ def png4in1(*args)
128
+ poscar_name = args.shift
129
+ cell = VaspUtils::Poscar.load_file(poscar_name).to_cell
130
+ povray = CrystalCell::Povray.new(cell: cell)
131
+ povray.set_axes([-1.0, -1.0, 0.0])
132
+ povray.shoot_4in1(poscar_name)
124
133
  end
125
134
 
126
- #
127
135
  desc 'snapgeomopt [options]', 'Generate POSCARS of each ionic steps'
128
136
  option :xdatcar, desc: "Use XDATCAR in spite of vasprun.xml"
129
137
  long_desc "Note that XDATCAR doesn't preserve cell change."
@@ -138,7 +146,7 @@ class PoscarCommand < Thor
138
146
  xml = VaspUtils::VasprunXml.load_file("./vasprun.xml")
139
147
  bases = xml.bases
140
148
  positions_list = xml.positions_list
141
- elements = xml.elements
149
+ elements = xml.elements.uniq
142
150
  nums_elements = xml.nums_elements
143
151
  end
144
152
 
data/bin/potcar CHANGED
@@ -27,6 +27,20 @@ class PotcarCommand < Thor
27
27
  )
28
28
  vpc.dump(elements, STDOUT)
29
29
  end
30
+
31
+ desc 'show', 'show infomation of POTCAR'
32
+ option :potcar, desc: 'indicate POTCAR file', default: 'POTCAR'
33
+ def show
34
+ potcar = VaspUtils::Potcar.load_file(options[:potcar])
35
+ printf("%7s %7s %4s\n", "element", "ENMAX", "ZVAL")
36
+ potcar.elements.size.times do |i|
37
+ printf("%7s %7.3f %4.1f\n",
38
+ potcar.elements[i],
39
+ potcar.enmaxes[i],
40
+ potcar.zvals[i]
41
+ )
42
+ end
43
+ end
30
44
  end
31
45
 
32
46
  PotcarCommand.start(ARGV)
data/bin/vaspdir CHANGED
@@ -172,7 +172,7 @@ class VaspdirCommand < Thor
172
172
  end
173
173
 
174
174
  desc 'qsub [options] [dirs]', "Submit queue to grid engine. Empty 'dirs' in argument indicates current directory.' "
175
- option :q_name, desc: "Queue name for '#$ -q'"
175
+ option :q_name, desc: "Queue name for '#$ -q', E.g. 'Pd.q'"
176
176
  option :pe_name, desc: "Parallel environment name for '#$ -pe'"
177
177
  option :ppn, desc: "Process per node, 2nd argument for'#$ -pe'"
178
178
  option :ld_library_path, desc: "Environmental variable 'LD_LIBRARY_PATH'"
@@ -183,6 +183,8 @@ class VaspdirCommand < Thor
183
183
  def qsub(* args)
184
184
  new_options = Marshal.load(Marshal.dump(options))
185
185
  new_options[:command] = "#{__FILE__} execute"
186
+ #pp args, new_options
187
+ #exit
186
188
  VaspUtils::VaspDir.qsub(args, new_options)
187
189
  end
188
190
 
@@ -219,6 +221,20 @@ class VaspdirCommand < Thor
219
221
  vd.reset_initialize
220
222
  end
221
223
  end
224
+
225
+ desc 'nelect', 'count NELECT value from POSCR and POTCAR'
226
+ def nelect
227
+ poscar = VaspUtils::Poscar.load_file('POSCAR')
228
+ potcar = VaspUtils::Potcar.load_file('POTCAR')
229
+ #pp poscar.elements
230
+ #pp potcar.elements
231
+ sum = 0
232
+ poscar.nums_elements.size.times do |i|
233
+ sum += poscar.nums_elements[i] * (potcar.zvals[i].to_i)
234
+ end
235
+ puts sum
236
+
237
+ end
222
238
  end
223
239
 
224
240
  VaspdirCommand.start(ARGV)
data/lib/vasputils.rb CHANGED
@@ -24,3 +24,13 @@ require "vasputils/vaspgeometryoptimizer.rb"
24
24
  require "vasputils/vasprunxml.rb"
25
25
  require "vasputils/vaspebmdir.rb"
26
26
  require "vasputils/xdatcar.rb"
27
+
28
+ begin
29
+ require "getspg.so"
30
+ rescue LoadError
31
+ puts "VaspUtils requires 'getspg.so', but not found."
32
+ puts "Insall spglib and put getspg.so into a directory in environment variable RUBYLIB."
33
+ puts "You may get it from 'https://sourceforge.net/projects/spglib'."
34
+ puts "Exit."
35
+ exit
36
+ end
@@ -5,7 +5,7 @@ require "rubygems"
5
5
  require "crystalcell"
6
6
 
7
7
  # Class to manage POSCAR format of VASP.
8
- #
8
+ #
9
9
  # parse と dump のどちらかだけでなく、両方を統括して扱うクラス。
10
10
  class VaspUtils::Poscar
11
11
 
@@ -130,20 +130,22 @@ class VaspUtils::Poscar
130
130
  nums_elements = elements.map{|elem| nums_elements[elem]}
131
131
 
132
132
  positions = []
133
- movable_flags = []
133
+ #movable_flags = []
134
134
  selective_dynamics = false
135
135
  atoms.each do |atom|
136
136
  positions << atom.position
137
- movable_flags << atom.movable_flags
138
- selective_dynamics = true if movable_flags
137
+ #movable_flags << atom.movable_flags
138
+ #selective_dynamics = true if movable_flags
139
139
  end
140
140
 
141
- selective_dynamics = movable_flags if movable_flags
141
+ #selective_dynamics = movable_flags if movable_flags
142
+ selective_dynamics = false
142
143
 
143
144
  options = {
144
145
  :comment => cell.comment ,
145
146
  :scale => 1.0 ,
146
- :axes => cell.axes.to_a,
147
+ #:axes => cell.axes.to_a,
148
+ :axes => cell.axes,
147
149
  :elements => elements ,
148
150
  :nums_elements => nums_elements ,
149
151
  :selective_dynamics => selective_dynamics,
@@ -164,7 +166,6 @@ class VaspUtils::Poscar
164
166
  # 'version' indicates a poscar style for vasp 4 or 5.
165
167
  #def dump(io, elements = nil, version = 5)
166
168
  def dump(io, version = 5)
167
- elements = @elements unless elements
168
169
  elem_indices = elements.map {|elem| @elements.find_index(elem)}
169
170
  unless (Mapping::map?(@elements.uniq, elements){ |i, j| i == j })
170
171
  raise ElementMismatchError,
@@ -212,7 +213,7 @@ class VaspUtils::Poscar
212
213
  movable_flags = @selective_dynamics[total_id]
213
214
  end
214
215
  atoms << CrystalCell::Atom.new(
215
- element,
216
+ element,
216
217
  @positions[total_id],
217
218
  movable_flags
218
219
  )
@@ -274,17 +275,17 @@ class VaspUtils::Poscar
274
275
  VaspUtils::Poscar.new(hash)
275
276
  end
276
277
 
277
- #
278
+ #
278
279
  def ==(other)
279
280
  result = true
280
- result = false unless @comment == other.comment
281
- result = false unless @scale == other.scale
282
- result = false unless @axes == other.axes
283
- result = false unless @elements == other.elements
284
- result = false unless @nums_elements == other.nums_elements
285
- result = false unless @selective_dynamics == other.selective_dynamics
286
- result = false unless @direct == other.direct
287
- result = false unless @positions == other.positions
281
+ result = false unless @comment == other.comment
282
+ result = false unless @scale == other.scale
283
+ result = false unless @axes == other.axes
284
+ result = false unless @elements == other.elements
285
+ result = false unless @nums_elements == other.nums_elements
286
+ result = false unless @selective_dynamics == other.selective_dynamics
287
+ result = false unless @direct == other.direct
288
+ result = false unless @positions == other.positions
288
289
  result
289
290
  end
290
291
 
@@ -296,7 +297,7 @@ class VaspUtils::Poscar
296
297
 
297
298
  def substitute!(elem1, elem2)
298
299
  @elements.map! do |elem|
299
- if elem == elem1
300
+ if elem == elem1
300
301
  elem2
301
302
  else
302
303
  elem
@@ -326,7 +327,7 @@ class VaspUtils::Poscar
326
327
  end
327
328
  end
328
329
  end
329
-
330
+
330
331
  def periodic_nearest(coord0, coord1)
331
332
  pcell = CrystalCell::PeriodicCell.new( [
332
333
  [1.0, 0.0, 0.0],
@@ -337,7 +338,6 @@ class VaspUtils::Poscar
337
338
  result.to_a
338
339
  end
339
340
 
340
-
341
341
  def interpolate_coords(coord0, coord1, ratio)
342
342
  ((coord0.to_v3d * (1-ratio) + coord1.to_v3d * ratio)).to_a
343
343
  end
@@ -5,11 +5,12 @@
5
5
  # Class for dealing with POTCAR.
6
6
  #
7
7
  class VaspUtils::Potcar
8
- attr_reader :elements, :enmaxes
8
+ attr_reader :elements, :enmaxes, :zvals
9
9
 
10
10
  def initialize
11
11
  @elements = []
12
12
  @enmaxes = []
13
+ @zvals = []
13
14
  end
14
15
 
15
16
 
@@ -21,6 +22,8 @@ class VaspUtils::Potcar
21
22
  result.elements << $1
22
23
  elsif line =~ /ENMAX\s*=\s*(\d+\.\d+)/
23
24
  result.enmaxes << $1.to_f
25
+ elsif line =~ /ZVAL\s*=\s*(\d+\.\d+)/
26
+ result.zvals << $1.to_f
24
27
  end
25
28
  end
26
29
  result
@@ -51,12 +51,17 @@ class VaspUtils::VasprunXml
51
51
  end
52
52
  end
53
53
 
54
+ #元素リスト
55
+ #uniq していないものを返す。
54
56
  def elements
55
- @data.xpath("/modeling/atominfo/array[@name='atomtypes']/set/rc").map do |elem|
56
- elem.xpath('./c').children[1].text
57
+ results = []
58
+ @data.xpath('/modeling/atominfo/array[@name="atoms"]/set/rc').each do |i|
59
+ results << i.children[0].children.to_s.strip
57
60
  end
61
+ results
58
62
  end
59
63
 
64
+
60
65
  # Return an array of [energy, total, integrated] for spin.
61
66
  # 'spin' is indicated by number started from 1 (should be 1 or 2).
62
67
  # If the 'spin' does not exist, raise IllegalArgumentError
@@ -120,15 +125,6 @@ class VaspUtils::VasprunXml
120
125
  results
121
126
  end
122
127
 
123
- #元素リスト
124
- def elements
125
- results = []
126
- @data.xpath('/modeling/atominfo/array[@name="atoms"]/set/rc').each do |i|
127
- results << i.children[0].children.to_s.strip
128
- end
129
- results
130
- end
131
-
132
128
  def calculation_cells
133
129
  #calculation_basis #格子定数リスト
134
130
  #pp calculation_basis
@@ -202,10 +202,10 @@ class TC_Poscar < Test::Unit::TestCase
202
202
  assert_in_delta(1.0, poscar.axes[2][2], $tolerance)
203
203
  assert_equal(%w(Li O), poscar.elements)
204
204
  assert_equal([2,1], poscar.nums_elements)
205
- assert_equal(
206
- [ [F, T, T], [F, F, F], [F, F, T], ],
207
- poscar.selective_dynamics
208
- )
205
+ #assert_equal(
206
+ # [ [F, T, T], [F, F, F], [F, F, T], ],
207
+ # poscar.selective_dynamics
208
+ #)
209
209
 
210
210
  assert_equal(true, poscar.direct)
211
211
  assert_in_delta(0.1, poscar.positions[0][0], $tolerance)
@@ -291,6 +291,57 @@ class TC_Poscar < Test::Unit::TestCase
291
291
  assert_equal(cor, lines[index], "line: #{index}")
292
292
  end
293
293
  assert_equal(corrects.size, lines.size)
294
+
295
+ io = StringIO.new
296
+ p01 = VaspUtils::Poscar.new({
297
+ :comment => 'p00',
298
+ :scale => 1.0,
299
+ :axes => [
300
+ [1.0, 0.0, 0.0 ],
301
+ [0.0, 1.0, 0.0 ],
302
+ [0.0, 0.0, 1.0 ],
303
+ ],
304
+ :elements => %w(Li Ge O),
305
+ :nums_elements => [1,2,2],
306
+ :selective_dynamics => [
307
+ [true , true , true ],
308
+ [true , true , true ],
309
+ [true , true , false],
310
+ [true , false, false],
311
+ [false, false, false],
312
+ ],
313
+ :direct => true,
314
+ :positions => [
315
+ [0.0, 0.0, 0.0],
316
+ [0.1, 0.1, 0.1],
317
+ [0.5, 0.0, 0.0],
318
+ [0.5, 0.5, 0.0],
319
+ [0.5, 0.5, 0.5],
320
+ ]
321
+ })
322
+ p01.dump(io)
323
+ io.rewind
324
+ corrects = [
325
+ "p00\n",
326
+ "1.0\n",
327
+ " 1.000000000000000 0.000000000000000 0.000000000000000\n",
328
+ " 0.000000000000000 1.000000000000000 0.000000000000000\n",
329
+ " 0.000000000000000 0.000000000000000 1.000000000000000\n",
330
+ "Li Ge O\n",
331
+ "1 2 2\n",
332
+ "Selective dynamics\n",
333
+ "Direct\n",
334
+ " 0.000000000000000 0.000000000000000 0.000000000000000 T T T\n",
335
+ " 0.100000000000000 0.100000000000000 0.100000000000000 T T T\n",
336
+ " 0.500000000000000 0.000000000000000 0.000000000000000 T T F\n",
337
+ " 0.500000000000000 0.500000000000000 0.000000000000000 T F F\n",
338
+ " 0.500000000000000 0.500000000000000 0.500000000000000 F F F\n",
339
+ ]
340
+ lines = io.readlines
341
+ corrects.each_with_index do |cor, index|
342
+ assert_equal(cor, lines[index], "line: #{index}")
343
+ end
344
+ assert_equal(corrects.size, lines.size)
294
345
  end
295
346
 
296
347
  def test_parse
@@ -64,8 +64,10 @@ class TC_VasprunXml < Test::Unit::TestCase
64
64
 
65
65
  def test_elements
66
66
  assert_equal(['Li'], @v01.elements)
67
+ assert_equal( ["Ag", "Ag", "I", "I"], @v00.elements)
67
68
  end
68
69
 
70
+
69
71
  def test_fermi_energy
70
72
  assert_equal( 3.78039662, @v00.fermi_energy)
71
73
  assert_equal(-3.28068319, @v01.fermi_energy)
@@ -170,10 +172,6 @@ class TC_VasprunXml < Test::Unit::TestCase
170
172
  )
171
173
  end
172
174
 
173
- def test_elements
174
- assert_equal( ["Ag", "Ag", "I", "I"], @v00.elements)
175
- end
176
-
177
175
  def test_calculation_cells
178
176
  v = VaspUtils::VasprunXml.load_file('test/vasprunxml/P-1.xml')
179
177
  results = v.calculation_cells
data/vasputils.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: vasputils 0.1.6 ruby lib
5
+ # stub: vasputils 0.1.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vasputils"
9
- s.version = "0.1.6"
9
+ s.version = "0.1.7"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["ippei94da"]
14
- s.date = "2016-05-11"
14
+ s.date = "2016-07-12"
15
15
  s.description = "This gem provides parsers for some of input and output files for VASP.\n This will provide support command for computations."
16
16
  s.email = "ippei94da@gmail.com"
17
17
  s.executables = ["incar", "kpoints", "poscar", "potcar", "vaspdir", "vaspgeomopt", "vasprunxml"]
@@ -875,12 +875,12 @@ Gem::Specification.new do |s|
875
875
  s.add_development_dependency(%q<simplecov>, ["~> 0.11"])
876
876
  s.add_development_dependency(%q<thor>, ["~> 0.19"])
877
877
  s.add_development_dependency(%q<gnuplot>, ["~> 2.6"])
878
- s.add_development_dependency(%q<mageo>, ["~> 0.0"])
878
+ s.add_development_dependency(%q<mageo>, ["~> 0.1"])
879
879
  s.add_development_dependency(%q<malge>, ["~> 0.0"])
880
880
  s.add_development_dependency(%q<maset>, ["~> 0.0"])
881
881
  s.add_development_dependency(%q<comana>, ["~> 0.1"])
882
882
  s.add_development_dependency(%q<builtinextension>, ["~> 0.1.4"])
883
- s.add_development_dependency(%q<crystalcell>, ["~> 0.0"])
883
+ s.add_development_dependency(%q<crystalcell>, ["~> 0.1"])
884
884
  else
885
885
  s.add_dependency(%q<test-unit>, ["~> 3.1"])
886
886
  s.add_dependency(%q<rdoc>, ["~> 4.2"])
@@ -889,12 +889,12 @@ Gem::Specification.new do |s|
889
889
  s.add_dependency(%q<simplecov>, ["~> 0.11"])
890
890
  s.add_dependency(%q<thor>, ["~> 0.19"])
891
891
  s.add_dependency(%q<gnuplot>, ["~> 2.6"])
892
- s.add_dependency(%q<mageo>, ["~> 0.0"])
892
+ s.add_dependency(%q<mageo>, ["~> 0.1"])
893
893
  s.add_dependency(%q<malge>, ["~> 0.0"])
894
894
  s.add_dependency(%q<maset>, ["~> 0.0"])
895
895
  s.add_dependency(%q<comana>, ["~> 0.1"])
896
896
  s.add_dependency(%q<builtinextension>, ["~> 0.1.4"])
897
- s.add_dependency(%q<crystalcell>, ["~> 0.0"])
897
+ s.add_dependency(%q<crystalcell>, ["~> 0.1"])
898
898
  end
899
899
  else
900
900
  s.add_dependency(%q<test-unit>, ["~> 3.1"])
@@ -904,12 +904,12 @@ Gem::Specification.new do |s|
904
904
  s.add_dependency(%q<simplecov>, ["~> 0.11"])
905
905
  s.add_dependency(%q<thor>, ["~> 0.19"])
906
906
  s.add_dependency(%q<gnuplot>, ["~> 2.6"])
907
- s.add_dependency(%q<mageo>, ["~> 0.0"])
907
+ s.add_dependency(%q<mageo>, ["~> 0.1"])
908
908
  s.add_dependency(%q<malge>, ["~> 0.0"])
909
909
  s.add_dependency(%q<maset>, ["~> 0.0"])
910
910
  s.add_dependency(%q<comana>, ["~> 0.1"])
911
911
  s.add_dependency(%q<builtinextension>, ["~> 0.1.4"])
912
- s.add_dependency(%q<crystalcell>, ["~> 0.0"])
912
+ s.add_dependency(%q<crystalcell>, ["~> 0.1"])
913
913
  end
914
914
  end
915
915
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vasputils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ippei94da
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-11 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.0'
117
+ version: '0.1'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.0'
124
+ version: '0.1'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: malge
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0.0'
187
+ version: '0.1'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0.0'
194
+ version: '0.1'
195
195
  description: |-
196
196
  This gem provides parsers for some of input and output files for VASP.
197
197
  This will provide support command for computations.