vasputils 0.1.4 → 0.1.5
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 +4 -4
- data/CHANGES +6 -1
- data/VERSION +1 -1
- data/lib/vasputils/vasprunxml.rb +44 -0
- data/test/{test_incar.rb → incar/test_incar.rb} +0 -0
- data/test/{test_kpoints.rb → kpoints/test_kpoints.rb} +0 -0
- data/test/{test_outcar.rb → outcar/test_outcar.rb} +0 -0
- data/test/{test_poscar.rb → poscar/test_poscar.rb} +0 -0
- data/test/{test_potcar.rb → potcar/test_potcar.rb} +0 -0
- data/test/{test_potcar_concatenater.rb → potcar/test_potcar_concatenater.rb} +0 -0
- data/test/{test_vaspdir.rb → vaspdir/test_vaspdir.rb} +0 -0
- data/test/{test_vaspebmdir.rb → vaspebmdir/test_vaspebmdir.rb} +0 -0
- data/test/{test_vaspgeometryoptimizer.rb → vaspgeometryoptimizer/test_vaspgeometryoptimizer.rb} +0 -0
- data/test/vasprunxml/P-1.xml +19234 -0
- data/test/{test_vasprunxml.rb → vasprunxml/test_vasprunxml.rb} +39 -0
- data/vasputils.gemspec +14 -13
- metadata +13 -12
@@ -143,6 +143,45 @@ class TC_VasprunXml < Test::Unit::TestCase
|
|
143
143
|
assert_equal(-4.40063677, results[4])
|
144
144
|
end
|
145
145
|
|
146
|
+
def test_calculation_basis
|
147
|
+
v = VaspUtils::VasprunXml.load_file('test/vasprunxml/P-1.xml')
|
148
|
+
results = v.calculation_basis
|
149
|
+
assert_equal(100, results.size)
|
150
|
+
assert_equal(
|
151
|
+
[ [ 5.46899986, 0.00000000, 0.00000000],
|
152
|
+
[ -1.74915164, 9.50235270, 0.00000000],
|
153
|
+
[ -2.23197985, -1.92643023, 14.02443236],
|
154
|
+
],
|
155
|
+
results[0]
|
156
|
+
)
|
157
|
+
assert_equal(
|
158
|
+
[ [ 5.40956519, -0.00945616, -0.00482282],
|
159
|
+
[ -1.74657312, 9.66179824, -0.01002973],
|
160
|
+
[ -2.21676384, -1.97136374, 14.19879844],
|
161
|
+
],
|
162
|
+
results[1]
|
163
|
+
)
|
164
|
+
assert_equal(
|
165
|
+
[ [ 4.47641358, -0.16679058, 0.40905180],
|
166
|
+
[ -1.81434021, 10.68263862, -0.18256841],
|
167
|
+
[ -0.18061392, -2.30429722, 15.63276550],
|
168
|
+
],
|
169
|
+
results[99]
|
170
|
+
)
|
171
|
+
end
|
172
|
+
|
173
|
+
def test_elements
|
174
|
+
assert_equal( ["Ag", "Ag", "I ", "I "], @v00.elements)
|
175
|
+
end
|
176
|
+
|
177
|
+
def test_calculation_cells
|
178
|
+
v = VaspUtils::VasprunXml.load_file('test/vasprunxml/P-1.xml')
|
179
|
+
results = v.calculation_cells
|
180
|
+
assert_equal(100, results.size)
|
181
|
+
assert_equal(CrystalCell::Cell, results[0].class)
|
182
|
+
#pp results
|
183
|
+
end
|
184
|
+
|
146
185
|
|
147
186
|
|
148
187
|
end
|
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.
|
5
|
+
# stub: vasputils 0.1.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "vasputils"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.5"
|
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-
|
14
|
+
s.date = "2016-05-11"
|
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"]
|
@@ -252,15 +252,18 @@ Gem::Specification.new do |s|
|
|
252
252
|
"test/incar/INCAR.01",
|
253
253
|
"test/incar/dot.vasputils",
|
254
254
|
"test/incar/test.vasputils",
|
255
|
+
"test/incar/test_incar.rb",
|
255
256
|
"test/kpoints/bench.Hg",
|
256
257
|
"test/kpoints/g123-456",
|
257
258
|
"test/kpoints/m123-456",
|
259
|
+
"test/kpoints/test_kpoints.rb",
|
258
260
|
"test/outcar/01-03-INT.OUTCAR",
|
259
261
|
"test/outcar/01-13-FIN.OUTCAR",
|
260
262
|
"test/outcar/02-05-FIN.OUTCAR",
|
261
263
|
"test/outcar/03-05-FIN.OUTCAR",
|
262
264
|
"test/outcar/10-01-FIN.OUTCAR",
|
263
265
|
"test/outcar/bench.Hg.OUTCAR",
|
266
|
+
"test/outcar/test_outcar.rb",
|
264
267
|
"test/poscar/LiF.poscar",
|
265
268
|
"test/poscar/NOT_POSCAR",
|
266
269
|
"test/poscar/POSCAR.01",
|
@@ -277,6 +280,7 @@ Gem::Specification.new do |s|
|
|
277
280
|
"test/poscar/symmetry/tetragonal/POSCAR",
|
278
281
|
"test/poscar/symmetry/triclinic/POSCAR",
|
279
282
|
"test/poscar/symmetry/trigonal/POSCAR",
|
283
|
+
"test/poscar/test_poscar.rb",
|
280
284
|
"test/poscarparser/POSCAR.00",
|
281
285
|
"test/poscarparser/POSCAR.01",
|
282
286
|
"test/potcar/POTCAR",
|
@@ -590,6 +594,8 @@ Gem::Specification.new do |s|
|
|
590
594
|
"test/potcar/dummy/Zr_sv_GW/POTCAR",
|
591
595
|
"test/potcar/dummy/data_base/POTCAR",
|
592
596
|
"test/potcar/test.vasputils",
|
597
|
+
"test/potcar/test_potcar.rb",
|
598
|
+
"test/potcar/test_potcar_concatenater.rb",
|
593
599
|
"test/procar/La.PROCAR",
|
594
600
|
"test/procar/Si-all-fermi1.0.out",
|
595
601
|
"test/procar/Si-all-occupancy.out",
|
@@ -603,17 +609,7 @@ Gem::Specification.new do |s|
|
|
603
609
|
"test/repeatVasp/Iter2-Nsw2.00/POTCAR",
|
604
610
|
"test/repeatVasp/test.sh",
|
605
611
|
"test/setting/dot.vasputils",
|
606
|
-
"test/test_incar.rb",
|
607
|
-
"test/test_kpoints.rb",
|
608
|
-
"test/test_outcar.rb",
|
609
|
-
"test/test_poscar.rb",
|
610
|
-
"test/test_potcar.rb",
|
611
|
-
"test/test_potcar_concatenater.rb",
|
612
612
|
"test/test_setting.rb",
|
613
|
-
"test/test_vaspdir.rb",
|
614
|
-
"test/test_vaspebmdir.rb",
|
615
|
-
"test/test_vaspgeometryoptimizer.rb",
|
616
|
-
"test/test_vasprunxml.rb",
|
617
613
|
"test/test_xdatcar.rb",
|
618
614
|
"test/vaspcelloptimizer/00-after/cellopt00/INCAR",
|
619
615
|
"test/vaspcelloptimizer/00-after/cellopt00/KPOINTS",
|
@@ -663,6 +659,7 @@ Gem::Specification.new do |s|
|
|
663
659
|
"test/vaspdir/started/OUTCAR",
|
664
660
|
"test/vaspdir/started/POSCAR",
|
665
661
|
"test/vaspdir/started/POTCAR",
|
662
|
+
"test/vaspdir/test_vaspdir.rb",
|
666
663
|
"test/vaspebmdir/ebm16-08/00/POSCAR",
|
667
664
|
"test/vaspebmdir/ebm16-08/01/POSCAR",
|
668
665
|
"test/vaspebmdir/ebm16-08/02/POSCAR",
|
@@ -671,6 +668,7 @@ Gem::Specification.new do |s|
|
|
671
668
|
"test/vaspebmdir/ebm16-08/POTCAR",
|
672
669
|
"test/vaspebmdir/findinputfiles/geomopt00/INCAR",
|
673
670
|
"test/vaspebmdir/findinputfiles/geomopt01/INCAR",
|
671
|
+
"test/vaspebmdir/test_vaspebmdir.rb",
|
674
672
|
"test/vaspgeometryoptimizer/ended-Iter1/geomopt00/CONTCAR",
|
675
673
|
"test/vaspgeometryoptimizer/ended-Iter1/geomopt00/INCAR",
|
676
674
|
"test/vaspgeometryoptimizer/ended-Iter1/geomopt00/KPOINTS",
|
@@ -841,6 +839,7 @@ Gem::Specification.new do |s|
|
|
841
839
|
"test/vaspgeometryoptimizer/started/geomopt00/KPOINTS",
|
842
840
|
"test/vaspgeometryoptimizer/started/geomopt00/POSCAR",
|
843
841
|
"test/vaspgeometryoptimizer/started/geomopt00/POTCAR",
|
842
|
+
"test/vaspgeometryoptimizer/test_vaspgeometryoptimizer.rb",
|
844
843
|
"test/vaspgeometryoptimizer/till01/geomopt00/CONTCAR",
|
845
844
|
"test/vaspgeometryoptimizer/till01/geomopt00/INCAR",
|
846
845
|
"test/vaspgeometryoptimizer/till01/geomopt00/KPOINTS",
|
@@ -852,9 +851,11 @@ Gem::Specification.new do |s|
|
|
852
851
|
"test/vaspgeometryoptimizer/till01/geomopt01/POSCAR",
|
853
852
|
"test/vaspgeometryoptimizer/till01/geomopt01/POTCAR",
|
854
853
|
"test/vasprunxml/La.xml",
|
854
|
+
"test/vasprunxml/P-1.xml",
|
855
855
|
"test/vasprunxml/dos.xml",
|
856
856
|
"test/vasprunxml/geomopt.xml",
|
857
857
|
"test/vasprunxml/singlepoint.xml",
|
858
|
+
"test/vasprunxml/test_vasprunxml.rb",
|
858
859
|
"test/xdatcar/XDATCAR",
|
859
860
|
"vasputils.gemspec"
|
860
861
|
]
|
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.
|
4
|
+
version: 0.1.5
|
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
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -441,15 +441,18 @@ files:
|
|
441
441
|
- test/incar/INCAR.01
|
442
442
|
- test/incar/dot.vasputils
|
443
443
|
- test/incar/test.vasputils
|
444
|
+
- test/incar/test_incar.rb
|
444
445
|
- test/kpoints/bench.Hg
|
445
446
|
- test/kpoints/g123-456
|
446
447
|
- test/kpoints/m123-456
|
448
|
+
- test/kpoints/test_kpoints.rb
|
447
449
|
- test/outcar/01-03-INT.OUTCAR
|
448
450
|
- test/outcar/01-13-FIN.OUTCAR
|
449
451
|
- test/outcar/02-05-FIN.OUTCAR
|
450
452
|
- test/outcar/03-05-FIN.OUTCAR
|
451
453
|
- test/outcar/10-01-FIN.OUTCAR
|
452
454
|
- test/outcar/bench.Hg.OUTCAR
|
455
|
+
- test/outcar/test_outcar.rb
|
453
456
|
- test/poscar/LiF.poscar
|
454
457
|
- test/poscar/NOT_POSCAR
|
455
458
|
- test/poscar/POSCAR.01
|
@@ -466,6 +469,7 @@ files:
|
|
466
469
|
- test/poscar/symmetry/tetragonal/POSCAR
|
467
470
|
- test/poscar/symmetry/triclinic/POSCAR
|
468
471
|
- test/poscar/symmetry/trigonal/POSCAR
|
472
|
+
- test/poscar/test_poscar.rb
|
469
473
|
- test/poscarparser/POSCAR.00
|
470
474
|
- test/poscarparser/POSCAR.01
|
471
475
|
- test/potcar/POTCAR
|
@@ -779,6 +783,8 @@ files:
|
|
779
783
|
- test/potcar/dummy/Zr_sv_GW/POTCAR
|
780
784
|
- test/potcar/dummy/data_base/POTCAR
|
781
785
|
- test/potcar/test.vasputils
|
786
|
+
- test/potcar/test_potcar.rb
|
787
|
+
- test/potcar/test_potcar_concatenater.rb
|
782
788
|
- test/procar/La.PROCAR
|
783
789
|
- test/procar/Si-all-fermi1.0.out
|
784
790
|
- test/procar/Si-all-occupancy.out
|
@@ -792,17 +798,7 @@ files:
|
|
792
798
|
- test/repeatVasp/Iter2-Nsw2.00/POTCAR
|
793
799
|
- test/repeatVasp/test.sh
|
794
800
|
- test/setting/dot.vasputils
|
795
|
-
- test/test_incar.rb
|
796
|
-
- test/test_kpoints.rb
|
797
|
-
- test/test_outcar.rb
|
798
|
-
- test/test_poscar.rb
|
799
|
-
- test/test_potcar.rb
|
800
|
-
- test/test_potcar_concatenater.rb
|
801
801
|
- test/test_setting.rb
|
802
|
-
- test/test_vaspdir.rb
|
803
|
-
- test/test_vaspebmdir.rb
|
804
|
-
- test/test_vaspgeometryoptimizer.rb
|
805
|
-
- test/test_vasprunxml.rb
|
806
802
|
- test/test_xdatcar.rb
|
807
803
|
- test/vaspcelloptimizer/00-after/cellopt00/INCAR
|
808
804
|
- test/vaspcelloptimizer/00-after/cellopt00/KPOINTS
|
@@ -852,6 +848,7 @@ files:
|
|
852
848
|
- test/vaspdir/started/OUTCAR
|
853
849
|
- test/vaspdir/started/POSCAR
|
854
850
|
- test/vaspdir/started/POTCAR
|
851
|
+
- test/vaspdir/test_vaspdir.rb
|
855
852
|
- test/vaspebmdir/ebm16-08/00/POSCAR
|
856
853
|
- test/vaspebmdir/ebm16-08/01/POSCAR
|
857
854
|
- test/vaspebmdir/ebm16-08/02/POSCAR
|
@@ -860,6 +857,7 @@ files:
|
|
860
857
|
- test/vaspebmdir/ebm16-08/POTCAR
|
861
858
|
- test/vaspebmdir/findinputfiles/geomopt00/INCAR
|
862
859
|
- test/vaspebmdir/findinputfiles/geomopt01/INCAR
|
860
|
+
- test/vaspebmdir/test_vaspebmdir.rb
|
863
861
|
- test/vaspgeometryoptimizer/ended-Iter1/geomopt00/CONTCAR
|
864
862
|
- test/vaspgeometryoptimizer/ended-Iter1/geomopt00/INCAR
|
865
863
|
- test/vaspgeometryoptimizer/ended-Iter1/geomopt00/KPOINTS
|
@@ -1030,6 +1028,7 @@ files:
|
|
1030
1028
|
- test/vaspgeometryoptimizer/started/geomopt00/KPOINTS
|
1031
1029
|
- test/vaspgeometryoptimizer/started/geomopt00/POSCAR
|
1032
1030
|
- test/vaspgeometryoptimizer/started/geomopt00/POTCAR
|
1031
|
+
- test/vaspgeometryoptimizer/test_vaspgeometryoptimizer.rb
|
1033
1032
|
- test/vaspgeometryoptimizer/till01/geomopt00/CONTCAR
|
1034
1033
|
- test/vaspgeometryoptimizer/till01/geomopt00/INCAR
|
1035
1034
|
- test/vaspgeometryoptimizer/till01/geomopt00/KPOINTS
|
@@ -1041,9 +1040,11 @@ files:
|
|
1041
1040
|
- test/vaspgeometryoptimizer/till01/geomopt01/POSCAR
|
1042
1041
|
- test/vaspgeometryoptimizer/till01/geomopt01/POTCAR
|
1043
1042
|
- test/vasprunxml/La.xml
|
1043
|
+
- test/vasprunxml/P-1.xml
|
1044
1044
|
- test/vasprunxml/dos.xml
|
1045
1045
|
- test/vasprunxml/geomopt.xml
|
1046
1046
|
- test/vasprunxml/singlepoint.xml
|
1047
|
+
- test/vasprunxml/test_vasprunxml.rb
|
1047
1048
|
- test/xdatcar/XDATCAR
|
1048
1049
|
- vasputils.gemspec
|
1049
1050
|
homepage: http://github.com/ippei94da/vasputils
|