vasputils 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. data/.document +5 -0
  2. data/Gemfile +18 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.rdoc +19 -0
  5. data/Rakefile +54 -0
  6. data/VERSION +1 -0
  7. data/bin/addVolumeToten.rb +19 -0
  8. data/bin/latticeconstants +14 -0
  9. data/bin/lsvaspdir +60 -0
  10. data/bin/lsvaspseries +95 -0
  11. data/bin/repeatvasp +47 -0
  12. data/bin/symposcar +154 -0
  13. data/lib/vasputils/calcinspector.rb +24 -0
  14. data/lib/vasputils/calcrepeater.rb +27 -0
  15. data/lib/vasputils/calcseries.rb +98 -0
  16. data/lib/vasputils/incar.rb +55 -0
  17. data/lib/vasputils/kpoints.rb +41 -0
  18. data/lib/vasputils/outcar.rb +59 -0
  19. data/lib/vasputils/poscar.rb +168 -0
  20. data/lib/vasputils/potcar.rb +18 -0
  21. data/lib/vasputils/vaspdir.rb +278 -0
  22. data/lib/vasputils.rb +0 -0
  23. data/test/calcseries/dup_finished/try00/CONTCAR +17 -0
  24. data/test/calcseries/dup_finished/try00/INCAR +28 -0
  25. data/test/calcseries/dup_finished/try00/KPOINTS +6 -0
  26. data/test/calcseries/dup_finished/try00/OUTCAR +28 -0
  27. data/test/calcseries/dup_finished/try00/POSCAR +12 -0
  28. data/test/calcseries/dup_finished/try00/POTCAR +2 -0
  29. data/test/calcseries/dup_finished/try00/lock +0 -0
  30. data/test/calcseries/dup_finished/try01/CONTCAR +17 -0
  31. data/test/calcseries/dup_finished/try01/INCAR +28 -0
  32. data/test/calcseries/dup_finished/try01/KPOINTS +6 -0
  33. data/test/calcseries/dup_finished/try01/OUTCAR +28 -0
  34. data/test/calcseries/dup_finished/try01/POSCAR +12 -0
  35. data/test/calcseries/dup_finished/try01/POTCAR +2 -0
  36. data/test/calcseries/dup_finished/try01/lock +0 -0
  37. data/test/calcseries/normal_finished/try00/CONTCAR +17 -0
  38. data/test/calcseries/normal_finished/try00/INCAR +28 -0
  39. data/test/calcseries/normal_finished/try00/KPOINTS +6 -0
  40. data/test/calcseries/normal_finished/try00/OUTCAR +40 -0
  41. data/test/calcseries/normal_finished/try00/POSCAR +12 -0
  42. data/test/calcseries/normal_finished/try00/POTCAR +2 -0
  43. data/test/calcseries/normal_finished/try00/lock +0 -0
  44. data/test/calcseries/normal_finished/try01/CONTCAR +17 -0
  45. data/test/calcseries/normal_finished/try01/INCAR +28 -0
  46. data/test/calcseries/normal_finished/try01/KPOINTS +6 -0
  47. data/test/calcseries/normal_finished/try01/OUTCAR +33 -0
  48. data/test/calcseries/normal_finished/try01/POSCAR +12 -0
  49. data/test/calcseries/normal_finished/try01/POTCAR +2 -0
  50. data/test/calcseries/normal_finished/try01/lock +0 -0
  51. data/test/calcseries/not_finished/try00/CONTCAR +17 -0
  52. data/test/calcseries/not_finished/try00/INCAR +28 -0
  53. data/test/calcseries/not_finished/try00/KPOINTS +6 -0
  54. data/test/calcseries/not_finished/try00/OUTCAR +38 -0
  55. data/test/calcseries/not_finished/try00/POSCAR +12 -0
  56. data/test/calcseries/not_finished/try00/POTCAR +2 -0
  57. data/test/calcseries/not_finished/try00/lock +0 -0
  58. data/test/helper.rb +17 -0
  59. data/test/incar/INCAR.00 +35 -0
  60. data/test/incar/INCAR.01 +28 -0
  61. data/test/kpoints/g123-456 +6 -0
  62. data/test/kpoints/m123-456 +6 -0
  63. data/test/outcar/01-03-INT.OUTCAR +619 -0
  64. data/test/outcar/01-13-FIN.OUTCAR +1436 -0
  65. data/test/outcar/02-05-FIN.OUTCAR +2025 -0
  66. data/test/outcar/03-05-FIN.OUTCAR +2602 -0
  67. data/test/outcar/10-01-FIN.OUTCAR +437 -0
  68. data/test/poscar/NOT_POSCAR +0 -0
  69. data/test/poscar/POSCAR.00 +10 -0
  70. data/test/poscar/POSCAR.01 +12 -0
  71. data/test/poscarparser/POSCAR.00 +10 -0
  72. data/test/poscarparser/POSCAR.01 +12 -0
  73. data/test/potcar/POTCAR +5279 -0
  74. data/test/potcar/POTCAR.allElement +165 -0
  75. data/test/potcar/POTCAR.dummy +3 -0
  76. data/test/repeatVasp/Iter2-Nsw2.00/INCAR +35 -0
  77. data/test/repeatVasp/Iter2-Nsw2.00/KPOINTS +6 -0
  78. data/test/repeatVasp/Iter2-Nsw2.00/POSCAR +12 -0
  79. data/test/repeatVasp/Iter2-Nsw2.00/POTCAR +3151 -0
  80. data/test/repeatVasp/test.sh +3 -0
  81. data/test/test_calcinspector.rb +53 -0
  82. data/test/test_calcrepeater.rb +69 -0
  83. data/test/test_calcseries.rb +77 -0
  84. data/test/test_incar.rb +126 -0
  85. data/test/test_kpoints.rb +110 -0
  86. data/test/test_outcar.rb +162 -0
  87. data/test/test_poscar.rb +209 -0
  88. data/test/test_potcar.rb +65 -0
  89. data/test/test_vaspdir.rb +253 -0
  90. data/test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1/CONTCAR +17 -0
  91. data/test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1/INCAR +27 -0
  92. data/test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1/KPOINTS +6 -0
  93. data/test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1/OUTCAR +1436 -0
  94. data/test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1/POSCAR +12 -0
  95. data/test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1/POTCAR +3151 -0
  96. data/test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1/lock +0 -0
  97. data/test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1/CONTCAR +17 -0
  98. data/test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1/INCAR +28 -0
  99. data/test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1/KPOINTS +6 -0
  100. data/test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1/OUTCAR +1436 -0
  101. data/test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1/POSCAR +12 -0
  102. data/test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1/POTCAR +3151 -0
  103. data/test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1/lock +0 -0
  104. data/test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1/CONTCAR +17 -0
  105. data/test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1/INCAR +28 -0
  106. data/test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1/KPOINTS +6 -0
  107. data/test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1/OUTCAR +1436 -0
  108. data/test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1/POSCAR +12 -0
  109. data/test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1/POTCAR +3151 -0
  110. data/test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1/lock +0 -0
  111. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1/CONTCAR +17 -0
  112. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1/INCAR +28 -0
  113. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1/KPOINTS +6 -0
  114. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1/OUTCAR +1436 -0
  115. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1/POSCAR +12 -0
  116. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1/POTCAR +3151 -0
  117. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1/lock +0 -0
  118. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3/CONTCAR +17 -0
  119. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3/INCAR +28 -0
  120. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3/KPOINTS +6 -0
  121. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3/OUTCAR +2602 -0
  122. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3/POSCAR +12 -0
  123. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3/POTCAR +3151 -0
  124. data/test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3/lock +0 -0
  125. data/test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1/CONTCAR +17 -0
  126. data/test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1/INCAR +28 -0
  127. data/test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1/KPOINTS +6 -0
  128. data/test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1/OUTCAR +1436 -0
  129. data/test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1/POSCAR +12 -0
  130. data/test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1/POTCAR +3151 -0
  131. data/test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1/lock +0 -0
  132. data/test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1/CONTCAR +17 -0
  133. data/test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1/INCAR +28 -0
  134. data/test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1/KPOINTS +6 -0
  135. data/test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1/OUTCAR +1436 -0
  136. data/test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1/POSCAR +12 -0
  137. data/test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1/POTCAR +3151 -0
  138. data/test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1/lock +0 -0
  139. data/test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2/CONTCAR +17 -0
  140. data/test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2/INCAR +28 -0
  141. data/test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2/KPOINTS +6 -0
  142. data/test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2/OUTCAR +2025 -0
  143. data/test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2/POSCAR +12 -0
  144. data/test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2/POTCAR +3151 -0
  145. data/test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2/lock +0 -0
  146. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT/CONTCAR +0 -0
  147. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT/INCAR +28 -0
  148. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT/KPOINTS +6 -0
  149. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT/OUTCAR +619 -0
  150. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT/POSCAR +12 -0
  151. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT/POTCAR +3151 -0
  152. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT/lock +0 -0
  153. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3/CONTCAR +17 -0
  154. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3/INCAR +28 -0
  155. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3/KPOINTS +6 -0
  156. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3/OUTCAR +2602 -0
  157. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3/POSCAR +12 -0
  158. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3/POTCAR +3151 -0
  159. data/test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3/lock +0 -0
  160. data/test/vaspdir/PI/INCAR +28 -0
  161. data/test/vaspdir/PI/KPOINTS +5 -0
  162. data/test/vaspdir/PI/PI12345 +0 -0
  163. data/test/vaspdir/PI/POSCAR +57 -0
  164. data/test/vaspdir/PI/POTCAR +698 -0
  165. data/test/vaspdir/lack-INCAR/KPOINTS +5 -0
  166. data/test/vaspdir/lack-INCAR/POSCAR +57 -0
  167. data/test/vaspdir/lack-INCAR/POTCAR +698 -0
  168. data/test/vaspdir/lack-KPOINTS/INCAR +28 -0
  169. data/test/vaspdir/lack-KPOINTS/POSCAR +57 -0
  170. data/test/vaspdir/lack-KPOINTS/POTCAR +698 -0
  171. data/test/vaspdir/lack-POSCAR/INCAR +28 -0
  172. data/test/vaspdir/lack-POSCAR/KPOINTS +5 -0
  173. data/test/vaspdir/lack-POSCAR/POTCAR +698 -0
  174. data/test/vaspdir/lack-POTCAR/INCAR +28 -0
  175. data/test/vaspdir/lack-POTCAR/KPOINTS +5 -0
  176. data/test/vaspdir/lack-POTCAR/POSCAR +57 -0
  177. data/test/vaspdir/lock/INCAR +28 -0
  178. data/test/vaspdir/lock/KPOINTS +5 -0
  179. data/test/vaspdir/lock/POSCAR +57 -0
  180. data/test/vaspdir/lock/POTCAR +698 -0
  181. data/test/vaspdir/lock/lock +0 -0
  182. data/test/vaspdir/lock-PI/INCAR +28 -0
  183. data/test/vaspdir/lock-PI/KPOINTS +5 -0
  184. data/test/vaspdir/lock-PI/PI12345 +0 -0
  185. data/test/vaspdir/lock-PI/POSCAR +57 -0
  186. data/test/vaspdir/lock-PI/POTCAR +698 -0
  187. data/test/vaspdir/lock-PI/lock +0 -0
  188. data/test/vaspdir/next-try00/CONTCAR +17 -0
  189. data/test/vaspdir/next-try00/INCAR +28 -0
  190. data/test/vaspdir/next-try00/KPOINTS +6 -0
  191. data/test/vaspdir/next-try00/OUTCAR +2025 -0
  192. data/test/vaspdir/next-try00/POSCAR +12 -0
  193. data/test/vaspdir/next-try00/POTCAR +3151 -0
  194. data/test/vaspdir/next-try00/lock +0 -0
  195. data/test/vaspdir/not-yet-ISIF2/INCAR +28 -0
  196. data/test/vaspdir/not-yet-ISIF2/KPOINTS +5 -0
  197. data/test/vaspdir/not-yet-ISIF2/PI17489 +2 -0
  198. data/test/vaspdir/not-yet-ISIF2/PI17736 +2 -0
  199. data/test/vaspdir/not-yet-ISIF2/PI1858 +2 -0
  200. data/test/vaspdir/not-yet-ISIF2/PI1866 +2 -0
  201. data/test/vaspdir/not-yet-ISIF2/PI2059 +2 -0
  202. data/test/vaspdir/not-yet-ISIF2/POSCAR +57 -0
  203. data/test/vaspdir/not-yet-ISIF2/POTCAR +698 -0
  204. data/test/vaspdir/not-yet-ISIF3/INCAR +28 -0
  205. data/test/vaspdir/not-yet-ISIF3/KPOINTS +5 -0
  206. data/test/vaspdir/not-yet-ISIF3/POSCAR +57 -0
  207. data/test/vaspdir/not-yet-ISIF3/POTCAR +698 -0
  208. data/vasputils.gemspec +272 -0
  209. metadata +409 -0
@@ -0,0 +1,209 @@
1
+ #! /usr/bin/ruby -W
2
+
3
+ require "test/unit"
4
+ require "stringio"
5
+ require "vasputils/poscar.rb"
6
+
7
+ require "rubygems"
8
+ gem "mageo"
9
+ require "mageo/vector3dinternal.rb"
10
+ gem "crystalcell"
11
+ require "crystalcell/cell.rb"
12
+
13
+ class TC_Poscar < Test::Unit::TestCase
14
+ $tolerance = 10 ** (-10)
15
+
16
+ def test_dump
17
+ # 例外ケース
18
+ axes = LatticeAxes.new( [
19
+ [1.0, 0.0, 0.0 ],
20
+ [0.0, 1.0, 0.0 ],
21
+ [0.0, 0.0, 1.0 ],
22
+ ])
23
+ atoms = [
24
+ Atom.new(0, [0.1, 0.2, 0.3]),
25
+ Atom.new(1, [0.2, 0.3, 0.4]),
26
+ Atom.new(0, [0.3, 0.4, 0.5]),
27
+ ]
28
+ cell = Cell.new(axes, atoms)
29
+ cell.comment = "test"
30
+ io = StringIO.new
31
+ assert_raises(Poscar::ElementMismatchError){
32
+ Poscar.dump(cell, [0,1,2], io)}
33
+
34
+ # 生成
35
+ axes = LatticeAxes.new( [
36
+ [1.0, 0.0, 0.0 ],
37
+ [0.0, 1.0, 0.0 ],
38
+ [0.0, 0.0, 1.0 ],
39
+ ])
40
+ atoms = [
41
+ Atom.new(0, [0.1, 0.2, 0.3]),
42
+ Atom.new(1, [0.2, 0.3, 0.4]),
43
+ Atom.new(0, [0.3, 0.4, 0.5]),
44
+ ]
45
+ cell = Cell.new(axes, atoms)
46
+ cell.comment = "test"
47
+ io = StringIO.new
48
+ Poscar.dump(cell, [0,1], io)
49
+ io.rewind
50
+ corrects = [
51
+ "test\n",
52
+ "1.0\n",
53
+ " 1.000000000000000 0.000000000000000 0.000000000000000\n",
54
+ " 0.000000000000000 1.000000000000000 0.000000000000000\n",
55
+ " 0.000000000000000 0.000000000000000 1.000000000000000\n",
56
+ "2 1\n",
57
+ "Direct\n",
58
+ " 0.100000000000000 0.200000000000000 0.300000000000000\n",
59
+ " 0.300000000000000 0.400000000000000 0.500000000000000\n",
60
+ " 0.200000000000000 0.300000000000000 0.400000000000000\n",
61
+ ]
62
+ lines = io.readlines
63
+ corrects.each_with_index do |cor, index|
64
+ assert_equal(cor, lines[index], "line: #{index}")
65
+ end
66
+ assert_equal(corrects.size, lines.size)
67
+
68
+ atoms = [
69
+ Atom.new(0, [0.1, 0.2, 0.3], "atom0", [false, true , true ]),
70
+ Atom.new(1, [0.2, 0.3, 0.4], "atom1", [false, false, true ]),
71
+ Atom.new(0, [0.3, 0.4, 0.5], "atom2", [false, false, false]),
72
+ ]
73
+ cell = Cell.new(axes, atoms)
74
+ cell.comment = "test"
75
+ io = StringIO.new
76
+ Poscar.dump(cell, [0,1], io)
77
+ io.rewind
78
+ corrects = [
79
+ "test\n",
80
+ "1.0\n",
81
+ " 1.000000000000000 0.000000000000000 0.000000000000000\n",
82
+ " 0.000000000000000 1.000000000000000 0.000000000000000\n",
83
+ " 0.000000000000000 0.000000000000000 1.000000000000000\n",
84
+ "2 1\n",
85
+ "Selective dynamics\n",
86
+ "Direct\n",
87
+ " 0.100000000000000 0.200000000000000 0.300000000000000 F T T\n",
88
+ " 0.300000000000000 0.400000000000000 0.500000000000000 F F F\n",
89
+ " 0.200000000000000 0.300000000000000 0.400000000000000 F F T\n",
90
+ ]
91
+ lines = io.readlines
92
+ corrects.each_with_index do |cor, index|
93
+ assert_equal(cor, lines[index], "line: #{index}")
94
+ end
95
+ assert_equal(corrects.size, lines.size)
96
+ end
97
+
98
+ def test_parse
99
+ io = StringIO.new
100
+ assert_raises(Poscar::ParseError){ Poscar.parse(io) }
101
+
102
+ io = StringIO.new
103
+ io.puts "sample0"
104
+ io.puts "1.0"
105
+ io.puts " 1.0 0.0 0.0"
106
+ io.puts " 0.0 1.0 0.0"
107
+ io.puts " 0.0 0.0 1.0"
108
+ io.puts " 1 1 1"
109
+ io.puts "Direct"
110
+ io.puts " 0.0 0.0 0.0 #Li-001"
111
+ io.puts " 0.5 0.0 0.0 #Ge-002"
112
+ io.puts " 0.5 0.5 0.0 #O--003"
113
+ io.rewind
114
+ cell = Poscar.parse(io)
115
+ assert_equal("sample0", cell.comment)
116
+ assert_equal(
117
+ LatticeAxes.new( [
118
+ [1.0, 0.0, 0.0 ],
119
+ [0.0, 1.0, 0.0 ],
120
+ [0.0, 0.0, 1.0 ],
121
+ ]),
122
+ cell.axes
123
+ )
124
+ assert_equal(
125
+ Atom.new(0, [0.0, 0.0, 0.0], "#Li-001"), cell.atoms[0])
126
+ assert_equal(
127
+ Atom.new(1, [0.5, 0.0, 0.0], "#Ge-002"), cell.atoms[1])
128
+ assert_equal(
129
+ Atom.new(2, [0.5, 0.5, 0.0], "#O--003"), cell.atoms[2])
130
+
131
+ io = StringIO.new
132
+ io.puts "sample1"
133
+ io.puts "2.0"
134
+ io.puts " 1.0 0.0 0.0"
135
+ io.puts " 0.0 1.0 0.0"
136
+ io.puts " 0.0 0.0 1.0"
137
+ io.puts " 1 1 2"
138
+ io.puts "Selective dynamics"
139
+ io.puts "Direct"
140
+ io.puts " 0.0 0.0 0.0 F F F #Li-001"
141
+ io.puts " 0.5 0.0 0.0 F T F #Ge-002"
142
+ io.puts " 0.5 0.5 0.0 T T T #O--003"
143
+ io.puts " 0.5 0.5 0.5 T T T #O--004"
144
+ io.rewind
145
+ cell = Poscar.parse(io)
146
+ assert_equal("sample1", cell.comment)
147
+ assert_equal(
148
+ LatticeAxes.new( [
149
+ [2.0, 0.0, 0.0 ],
150
+ [0.0, 2.0, 0.0 ],
151
+ [0.0, 0.0, 2.0 ],
152
+ ]),
153
+ cell.axes
154
+ )
155
+ assert_equal(
156
+ Atom.new(0, [0.0, 0.0, 0.0], "#Li-001", [false, false, false]),
157
+ cell.atoms[0])
158
+ assert_equal(
159
+ Atom.new(1, [0.5, 0.0, 0.0], "#Ge-002", [false, true , false]),
160
+ cell.atoms[1])
161
+ assert_equal(
162
+ Atom.new(2, [0.5, 0.5, 0.0], "#O--003", [true, true, true]),
163
+ cell.atoms[2])
164
+ assert_equal(
165
+ Atom.new(2, [0.5, 0.5, 0.5], "#O--004", [true, true, true]),
166
+ cell.atoms[3])
167
+ end
168
+
169
+ def test_load_file
170
+ cell = Poscar.load_file("test/poscar/POSCAR.00")
171
+ assert_equal("sample0", cell.comment)
172
+ assert_equal(
173
+ LatticeAxes.new( [
174
+ [1.0, 0.0, 0.0 ],
175
+ [0.0, 1.0, 0.0 ],
176
+ [0.0, 0.0, 1.0 ],
177
+ ]),
178
+ cell.axes
179
+ )
180
+ assert_equal(
181
+ Atom.new(0, [0.0, 0.0, 0.0], "#Li-001"), cell.atoms[0])
182
+ assert_equal(
183
+ Atom.new(1, [0.5, 0.0, 0.0], "#Ge-002"), cell.atoms[1])
184
+ assert_equal(
185
+ Atom.new(2, [0.5, 0.5, 0.0], "#O--003"), cell.atoms[2])
186
+
187
+ #cell = Poscar.load_file("test/poscar/POSCAR.02")
188
+ #assert_equal("sample0", cell.comment)
189
+ #assert_in_delta( 7.1028554188641708, cell.axes[0][0], $tolerance)
190
+ #assert_in_delta(-0.0000000169534433, cell.axes[0][1], $tolerance)
191
+ #assert_in_delta(-0.0000000169534428, cell.axes[0][2], $tolerance)
192
+ #assert_in_delta( 0.0000001136137521, cell.axes[1][0], $tolerance)
193
+ #assert_in_delta( 7.1028554188641725, cell.axes[1][1], $tolerance)
194
+ #assert_in_delta(-0.0000000169534433, cell.axes[1][2], $tolerance)
195
+ #assert_in_delta( 0.0000001136137521, cell.axes[2][0], $tolerance)
196
+ #assert_in_delta( 0.0000001136137521, cell.axes[2][1], $tolerance)
197
+ #assert_in_delta( 7.1028554188641725, cell.axes[2][2], $tolerance)
198
+ #assert_equal(0, cell.atoms[0].element)
199
+ #assert_equal(0.0395891220708791, cell.atoms[0].position[0])
200
+ #assert_equal(0.0395891220708791, cell.atoms[0].position[1])
201
+ #assert_equal(0.0395891220708791, cell.atoms[0].position[2])
202
+
203
+ end
204
+
205
+ #def setup
206
+ # #@pp02 = Poscar.new("test/poscar/POSCAR.shirai")
207
+ #end
208
+
209
+ end
@@ -0,0 +1,65 @@
1
+ #! /usr/bin/ruby
2
+
3
+ require "test/unit"
4
+ require "vasputils/potcar.rb"
5
+
6
+ class TC_Potcar < Test::Unit::TestCase
7
+
8
+ def setup
9
+ @p0 = Potcar.load_file("test/potcar/POTCAR" )
10
+ @p1 = Potcar.load_file("test/potcar/POTCAR.dummy" )
11
+ @p2 = Potcar.load_file("test/potcar/POTCAR.allElement")
12
+ end
13
+
14
+ def test_get_filename
15
+ assert_equal("test/potcar/POTCAR" , @p0[:name])
16
+ assert_equal("test/potcar/POTCAR.dummy" , @p1[:name])
17
+ assert_equal("test/potcar/POTCAR.allElement", @p2[:name])
18
+ end
19
+
20
+ def test_elements
21
+ assert_equal([ "Li", "Ge", "O" ], @p0[:elements])
22
+ assert_equal([ "Li", "Ge", "O" ], @p1[:elements])
23
+ correct = [
24
+ "Ac", "Ac", "Ag", "Al", "Al", "Ar", "As", "Au", "B", "B", "B", "Ba",
25
+ "Be", "Be", "Bi", "Bi", "Br", "C", "C", "C", "Ca", "Ca", "Cd", "Ce",
26
+ "Ce", "Cl", "Cl", "Co", "Cr", "Cr", "Cs", "Cu", "Cu", "Dy",
27
+ "Er", "Er", "Eu", "Eu", "F", "F", "F", "Fe", "Fe", "Ga", "Ga", "Ga",
28
+ "Gd", "Gd", "Ge", "Ge", "Ge", "H", "H", "H", "H", "H", "H", "He",
29
+ "Hf", "Hf", "Hg", "Ho", "I", "In", "In", "Ir", "K", "K", "Kr",
30
+ "La", "La", "Li", "Li", "Lu", "Lu", "Mg", "Mg", "Mn", "Mn",
31
+ "Mo", "Mo", "N", "N", "N", "Na", "Na", "Na", "Nb", "Nb", "Nd", "Nd",
32
+ "Ne", "Ni", "Ni", "Np", "Np", "O", "O", "O", "Os", "Os", "P", "P",
33
+ "Pa", "Pa", "Pb", "Pb", "Pd", "Pd", "Pm", "Pm", "Pr", "Pr", "Pt",
34
+ "Pu", "Pu", "Rb", "Rb", "Re", "Re", "Rh", "Rh", "Ru", "Ru", "S", "S",
35
+ "Sb", "Sc", "Se", "Si", "Si", "Sm", "Sm", "Sn", "Sn", "Sr",
36
+ "Ta", "Ta", "Tb", "Tc", "Tc", "Te", "Th", "Th", "Ti", "Ti", "Ti",
37
+ "Tl", "Tl", "Tm", "Tm", "U", "U", "V", "V", "V", "W", "W", "X", "Y",
38
+ "Yb", "Yb", "Zn", "Zr", "Zr"]
39
+ assert_equal( correct, @p2[:elements])
40
+ end
41
+
42
+ #def test_self_elements
43
+ # assert_equal([ "Li", "Ge", "O" ], Potcar.elements( @p0 ))
44
+ # assert_equal([ "Li", "Ge", "O" ], Potcar.elements( @p1 ))
45
+ # correct = [
46
+ # "Ac", "Ac", "Ag", "Al", "Al", "Ar", "As", "Au", "B", "B", "B", "Ba",
47
+ # "Be", "Be", "Bi", "Bi", "Br", "C", "C", "C", "Ca", "Ca", "Cd", "Ce",
48
+ # "Ce", "Cl", "Cl", "Co", "Cr", "Cr", "Cs", "Cu", "Cu", "Dy",
49
+ # "Er", "Er", "Eu", "Eu", "F", "F", "F", "Fe", "Fe", "Ga", "Ga", "Ga",
50
+ # "Gd", "Gd", "Ge", "Ge", "Ge", "H", "H", "H", "H", "H", "H", "He",
51
+ # "Hf", "Hf", "Hg", "Ho", "I", "In", "In", "Ir", "K", "K", "Kr",
52
+ # "La", "La", "Li", "Li", "Lu", "Lu", "Mg", "Mg", "Mn", "Mn",
53
+ # "Mo", "Mo", "N", "N", "N", "Na", "Na", "Na", "Nb", "Nb", "Nd", "Nd",
54
+ # "Ne", "Ni", "Ni", "Np", "Np", "O", "O", "O", "Os", "Os", "P", "P",
55
+ # "Pa", "Pa", "Pb", "Pb", "Pd", "Pd", "Pm", "Pm", "Pr", "Pr", "Pt",
56
+ # "Pu", "Pu", "Rb", "Rb", "Re", "Re", "Rh", "Rh", "Ru", "Ru", "S", "S",
57
+ # "Sb", "Sc", "Se", "Si", "Si", "Sm", "Sm", "Sn", "Sn", "Sr",
58
+ # "Ta", "Ta", "Tb", "Tc", "Tc", "Te", "Th", "Th", "Ti", "Ti", "Ti",
59
+ # "Tl", "Tl", "Tm", "Tm", "U", "U", "V", "V", "V", "W", "W", "X", "Y",
60
+ # "Yb", "Yb", "Zn", "Zr", "Zr"]
61
+ # assert_equal( correct, Potcar.elements( @p2 ))
62
+ #end
63
+
64
+ end
65
+
@@ -0,0 +1,253 @@
1
+ #! /usr/bin/env ruby
2
+ # coding: utf-8
3
+
4
+ $TEST = true
5
+
6
+ class VaspDir
7
+ attr_reader :mode
8
+ end
9
+
10
+ require "test/unit"
11
+ require "vasputils/vaspdir.rb"
12
+
13
+ # assert_equal( cor, data)
14
+ # assert_in_delta( cor, data, $tolerance )
15
+ # assert_raise( RuntimeError ){}
16
+
17
+
18
+ class TC_VaspDir < Test::Unit::TestCase
19
+
20
+ GENERATED_FILES_VD00 =
21
+ [
22
+ "test/vaspdir/not-yet-ISIF2/CHG",
23
+ "test/vaspdir/not-yet-ISIF2/CHGCAR",
24
+ "test/vaspdir/not-yet-ISIF2/CONTCAR",
25
+ "test/vaspdir/not-yet-ISIF2/DOSCAR",
26
+ "test/vaspdir/not-yet-ISIF2/EIGENVAL",
27
+ "test/vaspdir/not-yet-ISIF2/IBZKPT",
28
+ "test/vaspdir/not-yet-ISIF2/OSZICAR",
29
+ "test/vaspdir/not-yet-ISIF2/OUTCAR",
30
+ "test/vaspdir/not-yet-ISIF2/PCDAT",
31
+ "test/vaspdir/not-yet-ISIF2/WAVECAR",
32
+ "test/vaspdir/not-yet-ISIF2/XDATCAR",
33
+ "test/vaspdir/not-yet-ISIF2/machines",
34
+ "test/vaspdir/not-yet-ISIF2/vasprun.xml",
35
+ "test/vaspdir/not-yet-ISIF2/lock",
36
+ ]
37
+
38
+ def setup
39
+ @vd00 = VaspDir.new("test/vaspdir/not-yet-ISIF2")
40
+ @vd01 = VaspDir.new("test/vaspdir/not-yet-ISIF3")
41
+ @vd02 = VaspDir.new("test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT")
42
+ @vd03 = VaspDir.new("test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1")
43
+ @vd04 = VaspDir.new("test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2")
44
+ @vd05 = VaspDir.new("test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3")
45
+ @vd06 = VaspDir.new("test/vaspdir/PI")
46
+ @vd07 = VaspDir.new("test/vaspdir/lock")
47
+ @vd08 = VaspDir.new("test/vaspdir/lock-PI")
48
+ @vd09 = VaspDir.new("test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3")
49
+ @vd10 = VaspDir.new("test/vaspdir/next-try00")
50
+ @vd11 = VaspDir.new("test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1")
51
+ @vd12 = VaspDir.new("test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1")
52
+ @vd13 = VaspDir.new("test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1")
53
+ @vd14 = VaspDir.new("test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1")
54
+ @vd15 = VaspDir.new("test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1")
55
+
56
+ GENERATED_FILES_VD00.each do |file|
57
+ FileUtils.rm file if File.exist? file
58
+ end
59
+ end
60
+
61
+ def teardown
62
+ ["test/vaspdir/next-try01/POSCAR" ,
63
+ "test/vaspdir/next-try01/POTCAR" ,
64
+ "test/vaspdir/next-try01/INCAR" ,
65
+ "test/vaspdir/next-try01/KPOINTS"].each do |filename|
66
+ FileUtils.rm(filename) if File.exist?(filename)
67
+ end
68
+ Dir.rmdir("test/vaspdir/next-try01") if File.exist?("test/vaspdir/next-try01")
69
+
70
+ GENERATED_FILES_VD00.each do |file|
71
+ FileUtils.rm file if File.exist? file
72
+ end
73
+ end
74
+
75
+ def test_initialize
76
+ assert_raise(VaspDir::InitializeError){VaspDir.new("test/vaspdir/lack-INCAR" )}
77
+ assert_raise(VaspDir::InitializeError){VaspDir.new("test/vaspdir/lack-KPOINTS")}
78
+ assert_raise(VaspDir::InitializeError){VaspDir.new("test/vaspdir/lack-POSCAR" )}
79
+ assert_raise(VaspDir::InitializeError){VaspDir.new("test/vaspdir/lack-POTCAR" )}
80
+
81
+ assert_equal(:geom_opt_atoms, @vd00.mode)
82
+ assert_equal(:geom_opt_lattice, @vd01.mode)
83
+ assert_equal(:geom_opt_lattice, @vd02.mode)
84
+ assert_equal(:geom_opt_atoms, @vd03.mode)
85
+ end
86
+
87
+ def test_name
88
+ assert_equal("test/vaspdir/not-yet-ISIF2" , @vd00.name)
89
+ assert_equal("test/vaspdir/not-yet-ISIF3" , @vd01.name)
90
+ assert_equal("test/vaspdir/ISIF3-NSW100-OUTCAR-Iter1-INT", @vd02.name)
91
+ assert_equal("test/vaspdir/ISIF2-NSW100-OUTCAR-Iter1" , @vd03.name)
92
+ assert_equal("test/vaspdir/ISIF3-NSW002-OUTCAR-Iter2" , @vd04.name)
93
+ assert_equal("test/vaspdir/ISIF3-NSW100-OUTCAR-Iter3" , @vd05.name)
94
+ assert_equal("test/vaspdir/PI" , @vd06.name)
95
+ assert_equal("test/vaspdir/lock" , @vd07.name)
96
+ assert_equal("test/vaspdir/lock-PI" , @vd08.name)
97
+ assert_equal("test/vaspdir/ISIF2-NSW100-OUTCAR-Iter3" , @vd09.name)
98
+ assert_equal("test/vaspdir/next-try00" , @vd10.name)
99
+ assert_equal("test/vaspdir/ISIF2-NSW000-OUTCAR-Iter1" , @vd11.name)
100
+ assert_equal("test/vaspdir/ISIF2-NSW001-OUTCAR-Iter1" , @vd12.name)
101
+ assert_equal("test/vaspdir/ISIF3-NSW000-OUTCAR-Iter1" , @vd13.name)
102
+ assert_equal("test/vaspdir/ISIF3-NSW001-OUTCAR-Iter1" , @vd14.name)
103
+ assert_equal("test/vaspdir/IBRION-1-NSW000-OUTCAR-Iter1" , @vd15.name)
104
+ end
105
+
106
+ def test_started?
107
+ assert_equal(false, @vd00.started?)
108
+ assert_equal(false, @vd01.started?)
109
+ assert_equal(true , @vd02.started?)
110
+ assert_equal(true , @vd03.started?)
111
+ assert_equal(true , @vd04.started?)
112
+ assert_equal(true , @vd05.started?)
113
+ assert_equal(false, @vd06.started?)
114
+ assert_equal(true , @vd07.started?)
115
+ assert_equal(true , @vd08.started?)
116
+ assert_equal(true , @vd09.started?)
117
+ assert_equal(true , @vd10.started?)
118
+ assert_equal(true , @vd11.started?)
119
+ assert_equal(true , @vd12.started?)
120
+ assert_equal(true , @vd13.started?)
121
+ assert_equal(true , @vd14.started?)
122
+ assert_equal(true , @vd15.started?)
123
+ end
124
+
125
+ def test_normal_ended?
126
+ assert_equal(false, @vd00.normal_ended?)
127
+ assert_equal(false, @vd01.normal_ended?)
128
+ assert_equal(false, @vd02.normal_ended?)
129
+ assert_equal(true , @vd03.normal_ended?)
130
+ assert_equal(true , @vd04.normal_ended?)
131
+ assert_equal(true , @vd05.normal_ended?)
132
+ assert_equal(false, @vd06.normal_ended?)
133
+ assert_equal(false, @vd07.normal_ended?)
134
+ assert_equal(false, @vd08.normal_ended?)
135
+ assert_equal(true , @vd09.normal_ended?)
136
+ end
137
+
138
+ def test_to_be_continued?
139
+ assert_equal(false, @vd00.to_be_continued?)
140
+ assert_equal(false, @vd01.to_be_continued?)
141
+ assert_equal(false, @vd02.to_be_continued?)
142
+ assert_equal(false, @vd03.to_be_continued?)
143
+ assert_equal(true , @vd04.to_be_continued?)
144
+ assert_equal(true , @vd05.to_be_continued?)
145
+ assert_equal(false, @vd06.to_be_continued?)
146
+ assert_equal(false, @vd07.to_be_continued?)
147
+ assert_equal(false, @vd08.to_be_continued?)
148
+ assert_equal(false, @vd09.to_be_continued?)
149
+ assert_equal(true , @vd10.to_be_continued?)
150
+ assert_equal(false, @vd11.to_be_continued?)
151
+ assert_equal(false, @vd12.to_be_continued?)
152
+ assert_equal(false, @vd13.to_be_continued?)
153
+ assert_equal(false, @vd14.to_be_continued?)
154
+ assert_equal(false, @vd15.to_be_continued?)
155
+ end
156
+
157
+ def test_calculate
158
+ assert_raise(VaspDir::LockedError){@vd07.calculate}
159
+ assert_raise(VaspDir::LockedError){@vd08.calculate}
160
+
161
+ #
162
+ assert_nothing_raised{@vd00.calculate}
163
+ GENERATED_FILES_VD00.each do |file|
164
+ assert(FileTest.exist?(file), "#{file} not found.")
165
+ end
166
+ assert(FileTest.exist? "test/vaspdir/not-yet-ISIF2/INCAR")
167
+ assert(FileTest.exist? "test/vaspdir/not-yet-ISIF2/KPOINTS")
168
+ assert(FileTest.exist? "test/vaspdir/not-yet-ISIF2/POSCAR")
169
+ assert(FileTest.exist? "test/vaspdir/not-yet-ISIF2/POTCAR")
170
+ #
171
+ io = File.open("test/vaspdir/not-yet-ISIF2/lock", "r")
172
+ lines = io.readlines
173
+ assert_equal("HOST: #{ENV["HOST"]}\n", lines[0])
174
+ assert(/^START: / =~ lines[1])
175
+ assert_equal("STATUS: normal ended.\n", lines[2])
176
+
177
+ io.close
178
+ # あとかたづけは teardown にまかせる。
179
+ end
180
+
181
+ def test_next
182
+ assert_raise(VaspDir::NotEndedError){@vd00.next}
183
+ assert_raise(VaspDir::NotEndedError){@vd01.next}
184
+ assert_raise(VaspDir::NotEndedError){@vd02.next}
185
+ assert_raise(VaspDir::ConvergedError){@vd03.next}
186
+ assert_raise(VaspDir::NotEndedError){@vd06.next}
187
+ assert_raise(VaspDir::NotEndedError){@vd07.next}
188
+ assert_raise(VaspDir::NotEndedError){@vd08.next}
189
+ assert_raise(VaspDir::ConvergedError){@vd09.next}
190
+
191
+ assert_equal(true , FileTest.exist?("test/vaspdir/next-try00"))
192
+ assert_equal(false, FileTest.exist?("test/vaspdir/next-try01"))
193
+ @vd10.next
194
+ assert_equal("test/vaspdir/next-try01", @vd10.name)
195
+ assert_equal(true , FileTest.exist?("test/vaspdir/next-try00"))
196
+ assert_equal(true , FileTest.exist?("test/vaspdir/next-try01"))
197
+ assert_equal(true , FileTest.exist?("test/vaspdir/next-try01/POSCAR"))
198
+ assert_equal(true , FileTest.exist?("test/vaspdir/next-try01/POTCAR"))
199
+ assert_equal(true , FileTest.exist?("test/vaspdir/next-try01/INCAR"))
200
+ assert_equal(true , FileTest.exist?("test/vaspdir/next-try01/KPOINTS"))
201
+ assert_equal(4 , Dir.glob("test/vaspdir/next-try01/*").size)
202
+ #
203
+ poscar_00 = File.open("test/vaspdir/next-try00/POSCAR" ).readlines
204
+ contcar_00 = File.open("test/vaspdir/next-try00/CONTCAR").readlines
205
+ poscar_01 = File.open("test/vaspdir/next-try01/POSCAR" ).readlines
206
+ assert_equal(false, poscar_00 == contcar_00)
207
+ assert_equal(true, contcar_00 == poscar_01)
208
+ assert_equal(false, poscar_01 == poscar_00)
209
+ # あとかたづけは teardown にまかせる。
210
+ end
211
+
212
+ def test_teardown
213
+ # NO TEST
214
+ end
215
+
216
+ def test_internal_steps
217
+ assert_equal(18, @vd10.internal_steps)
218
+ end
219
+
220
+ def test_external_steps
221
+ assert_equal(2, @vd10.external_steps)
222
+ end
223
+
224
+ def test_elapsed_time
225
+ assert_in_delta(126.383, @vd10.elapsed_time)
226
+ end
227
+
228
+ def test_outcar
229
+ assert_equal("test/vaspdir/next-try00/OUTCAR", @vd10.outcar[:name])
230
+ end
231
+
232
+ def test_contcar
233
+ t = @vd10.contcar
234
+ assert_equal(Cell, t.class)
235
+ assert_in_delta(3.8678456093562040, t.axes[2][2])
236
+
237
+ assert_raise(Errno::ENOENT){@vd00.contcar}
238
+ end
239
+
240
+ def test_incar
241
+ t = @vd10.incar
242
+ assert_equal("400", t["ENCUT"])
243
+ end
244
+
245
+ def test_kpoints
246
+ t = @vd10.kpoints
247
+ assert_equal("Automatic mesh", t[:comment])
248
+ end
249
+
250
+ #undef test_next
251
+
252
+ end
253
+
@@ -0,0 +1,17 @@
1
+ Untitled (VASP)
2
+ 1.00000000000000
3
+ 3.6509999999999998 0.0000000000000000 0.0000000000000000
4
+ -1.8254999999999919 3.1618587492169889 0.0000000000000000
5
+ 0.0000000000000000 0.0000000000000000 3.8879999999999999
6
+ 3 1
7
+ Selective dynamics
8
+ Direct
9
+ 0.0000000000000000 0.0000000000000000 0.5000000000000000 T T T
10
+ 0.3333333333333357 0.6666666666666642 0.0000000000000000 T T T
11
+ 0.6666666666666642 0.3333333333333357 0.0000000000000000 T T T
12
+ 0.0000000000000000 0.0000000000000000 0.0000000000000000 F F F
13
+
14
+ 0.00000000E+00 0.00000000E+00 0.00000000E+00
15
+ 0.00000000E+00 0.00000000E+00 0.00000000E+00
16
+ 0.00000000E+00 0.00000000E+00 0.00000000E+00
17
+ 0.00000000E+00 0.00000000E+00 0.00000000E+00
@@ -0,0 +1,27 @@
1
+ # SCF input for VASP
2
+
3
+ SYSTEM = Untitled (VASP)
4
+ PREC = High
5
+ IBRION = -1 #-1:atoms not moved, 1:quasi-Newton, 2:conjugate-gradient
6
+ NSW = 0 #maximum number of ionic steps
7
+ ENCUT = 400
8
+ NELM = 60 #maximum number of electronic steps
9
+ NELMIN = 2 #minimum number of electronic steps
10
+ EDIFF = 1.0e-05
11
+ EDIFFG = -0.02
12
+ VOSKOWN = 1
13
+ NBLOCK = 1
14
+ ISPIN = 1 #1:non spin polarized, 2:spin polarized
15
+ INIWAV = 1
16
+ ISTART = 1
17
+ ICHARG = 1
18
+ LWAVE = .TRUE.
19
+ LCHARG = .TRUE.
20
+ ISMEAR = 0
21
+ SIGMA = 0.1
22
+ IALGO = 38 #38:KosugiAlgorithm, 48:RMM-DIIS
23
+ #LREAL = .FALSE.
24
+ LREAL = Auto #fast & not accurate
25
+ NGX = 36
26
+ NGY = 36
27
+ NGZ = 42
@@ -0,0 +1,6 @@
1
+ Automatic mesh
2
+ 0
3
+ Monkhorst Pack
4
+ 5 5 5
5
+ 0. 0. 0.
6
+