nomad-parser-plugins-electronic 1.0__py3-none-any.whl

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.
Files changed (272) hide show
  1. electronicparsers/__init__.py +1162 -0
  2. electronicparsers/abacus/__init__.py +20 -0
  3. electronicparsers/abacus/__main__.py +32 -0
  4. electronicparsers/abacus/metainfo/__init__.py +19 -0
  5. electronicparsers/abacus/metainfo/abacus.py +836 -0
  6. electronicparsers/abacus/nomad_plugin.yaml +44 -0
  7. electronicparsers/abacus/parser.py +1975 -0
  8. electronicparsers/abinit/__init__.py +19 -0
  9. electronicparsers/abinit/__main__.py +31 -0
  10. electronicparsers/abinit/metainfo/__init__.py +20 -0
  11. electronicparsers/abinit/metainfo/abinit.py +871 -0
  12. electronicparsers/abinit/metainfo/abinit_autogenerated.py +6794 -0
  13. electronicparsers/abinit/nomad_plugin.yaml +43 -0
  14. electronicparsers/abinit/parser.py +1922 -0
  15. electronicparsers/ams/__init__.py +19 -0
  16. electronicparsers/ams/__main__.py +31 -0
  17. electronicparsers/ams/metainfo/__init__.py +19 -0
  18. electronicparsers/ams/metainfo/ams.py +769 -0
  19. electronicparsers/ams/nomad_plugin.yaml +19 -0
  20. electronicparsers/ams/parser.py +1849 -0
  21. electronicparsers/ams/rkf.py +620 -0
  22. electronicparsers/atk/__init__.py +19 -0
  23. electronicparsers/atk/__main__.py +31 -0
  24. electronicparsers/atk/metainfo/__init__.py +19 -0
  25. electronicparsers/atk/metainfo/atk.py +71 -0
  26. electronicparsers/atk/nomad_plugin.yaml +34 -0
  27. electronicparsers/atk/parser.py +388 -0
  28. electronicparsers/bigdft/__init__.py +19 -0
  29. electronicparsers/bigdft/__main__.py +31 -0
  30. electronicparsers/bigdft/metainfo/__init__.py +18 -0
  31. electronicparsers/bigdft/nomad_plugin.yaml +19 -0
  32. electronicparsers/bigdft/parser.py +372 -0
  33. electronicparsers/castep/__init__.py +19 -0
  34. electronicparsers/castep/__main__.py +31 -0
  35. electronicparsers/castep/metainfo/__init__.py +19 -0
  36. electronicparsers/castep/metainfo/castep.py +2481 -0
  37. electronicparsers/castep/nomad_plugin.yaml +28 -0
  38. electronicparsers/castep/parser.py +1680 -0
  39. electronicparsers/charmm/__init__.py +19 -0
  40. electronicparsers/charmm/__main__.py +31 -0
  41. electronicparsers/charmm/metainfo/__init__.py +19 -0
  42. electronicparsers/charmm/metainfo/charmm.py +1931 -0
  43. electronicparsers/charmm/nomad_plugin.yaml +18 -0
  44. electronicparsers/charmm/parser.py +61 -0
  45. electronicparsers/cp2k/__init__.py +19 -0
  46. electronicparsers/cp2k/__main__.py +31 -0
  47. electronicparsers/cp2k/metainfo/__init__.py +19 -0
  48. electronicparsers/cp2k/metainfo/cp2k.py +59185 -0
  49. electronicparsers/cp2k/metainfo/cp2k_general.py +1014 -0
  50. electronicparsers/cp2k/nomad_plugin.yaml +49 -0
  51. electronicparsers/cp2k/parser.py +2324 -0
  52. electronicparsers/cpmd/__init__.py +19 -0
  53. electronicparsers/cpmd/__main__.py +31 -0
  54. electronicparsers/cpmd/metainfo/__init__.py +19 -0
  55. electronicparsers/cpmd/metainfo/cpmd.py +10733 -0
  56. electronicparsers/cpmd/metainfo/cpmd_general.py +988 -0
  57. electronicparsers/cpmd/nomad_plugin.yaml +19 -0
  58. electronicparsers/cpmd/parser.py +680 -0
  59. electronicparsers/crystal/__init__.py +19 -0
  60. electronicparsers/crystal/__main__.py +31 -0
  61. electronicparsers/crystal/metainfo/__init__.py +19 -0
  62. electronicparsers/crystal/metainfo/crystal.py +619 -0
  63. electronicparsers/crystal/nomad_plugin.yaml +36 -0
  64. electronicparsers/crystal/parser.py +1745 -0
  65. electronicparsers/dmol3/__init__.py +19 -0
  66. electronicparsers/dmol3/__main__.py +31 -0
  67. electronicparsers/dmol3/metainfo/__init__.py +19 -0
  68. electronicparsers/dmol3/metainfo/dmol3.py +664 -0
  69. electronicparsers/dmol3/nomad_plugin.yaml +19 -0
  70. electronicparsers/dmol3/parser.py +750 -0
  71. electronicparsers/edmft/__init__.py +19 -0
  72. electronicparsers/edmft/__main__.py +31 -0
  73. electronicparsers/edmft/metainfo/__init__.py +19 -0
  74. electronicparsers/edmft/metainfo/edmft.py +96 -0
  75. electronicparsers/edmft/nomad_plugin.yaml +53 -0
  76. electronicparsers/edmft/parser.py +912 -0
  77. electronicparsers/elk/__init__.py +19 -0
  78. electronicparsers/elk/__main__.py +31 -0
  79. electronicparsers/elk/metainfo/__init__.py +19 -0
  80. electronicparsers/elk/metainfo/elk.py +775 -0
  81. electronicparsers/elk/nomad_plugin.yaml +19 -0
  82. electronicparsers/elk/parser.py +493 -0
  83. electronicparsers/exciting/__init__.py +19 -0
  84. electronicparsers/exciting/__main__.py +31 -0
  85. electronicparsers/exciting/metainfo/__init__.py +19 -0
  86. electronicparsers/exciting/metainfo/exciting.py +2942 -0
  87. electronicparsers/exciting/nomad_plugin.yaml +83 -0
  88. electronicparsers/exciting/parser.py +3398 -0
  89. electronicparsers/fhiaims/__init__.py +19 -0
  90. electronicparsers/fhiaims/__main__.py +31 -0
  91. electronicparsers/fhiaims/metainfo/__init__.py +19 -0
  92. electronicparsers/fhiaims/metainfo/fhi_aims.py +1565 -0
  93. electronicparsers/fhiaims/nomad_plugin.yaml +52 -0
  94. electronicparsers/fhiaims/parser.py +2582 -0
  95. electronicparsers/fleur/__init__.py +19 -0
  96. electronicparsers/fleur/__main__.py +31 -0
  97. electronicparsers/fleur/metainfo/__init__.py +19 -0
  98. electronicparsers/fleur/metainfo/fleur.py +623 -0
  99. electronicparsers/fleur/nomad_plugin.yaml +19 -0
  100. electronicparsers/fleur/parser.py +952 -0
  101. electronicparsers/fplo/__init__.py +19 -0
  102. electronicparsers/fplo/__main__.py +31 -0
  103. electronicparsers/fplo/metainfo/__init__.py +19 -0
  104. electronicparsers/fplo/metainfo/fplo.py +188 -0
  105. electronicparsers/fplo/metainfo/fplo_input_autogenerated.py +2744 -0
  106. electronicparsers/fplo/metainfo/fplo_temporaries.py +319 -0
  107. electronicparsers/fplo/nomad_plugin.yaml +19 -0
  108. electronicparsers/fplo/parser.py +42 -0
  109. electronicparsers/gamess/__init__.py +19 -0
  110. electronicparsers/gamess/__main__.py +31 -0
  111. electronicparsers/gamess/metainfo/__init__.py +19 -0
  112. electronicparsers/gamess/metainfo/gamess.py +837 -0
  113. electronicparsers/gamess/nomad_plugin.yaml +19 -0
  114. electronicparsers/gamess/parser.py +941 -0
  115. electronicparsers/gaussian/__init__.py +19 -0
  116. electronicparsers/gaussian/__main__.py +31 -0
  117. electronicparsers/gaussian/metainfo/__init__.py +19 -0
  118. electronicparsers/gaussian/metainfo/gaussian.py +1707 -0
  119. electronicparsers/gaussian/nomad_plugin.yaml +18 -0
  120. electronicparsers/gaussian/parser.py +1556 -0
  121. electronicparsers/gpaw/__init__.py +19 -0
  122. electronicparsers/gpaw/__main__.py +31 -0
  123. electronicparsers/gpaw/metainfo/__init__.py +19 -0
  124. electronicparsers/gpaw/metainfo/gpaw.py +214 -0
  125. electronicparsers/gpaw/nomad_plugin.yaml +19 -0
  126. electronicparsers/gpaw/parser.py +671 -0
  127. electronicparsers/magres/__init__.py +19 -0
  128. electronicparsers/magres/__main__.py +31 -0
  129. electronicparsers/magres/metainfo/__init__.py +19 -0
  130. electronicparsers/magres/metainfo/magres.py +110 -0
  131. electronicparsers/magres/nomad_plugin.yaml +18 -0
  132. electronicparsers/magres/parser.py +505 -0
  133. electronicparsers/molcas/__init__.py +19 -0
  134. electronicparsers/molcas/__main__.py +31 -0
  135. electronicparsers/molcas/metainfo/__init__.py +19 -0
  136. electronicparsers/molcas/metainfo/molcas.py +151 -0
  137. electronicparsers/molcas/nomad_plugin.yaml +19 -0
  138. electronicparsers/molcas/parser.py +59 -0
  139. electronicparsers/mopac/__init__.py +19 -0
  140. electronicparsers/mopac/__main__.py +31 -0
  141. electronicparsers/mopac/metainfo/__init__.py +19 -0
  142. electronicparsers/mopac/metainfo/mopac.py +79 -0
  143. electronicparsers/mopac/nomad_plugin.yaml +19 -0
  144. electronicparsers/mopac/parser.py +304 -0
  145. electronicparsers/nwchem/__init__.py +19 -0
  146. electronicparsers/nwchem/__main__.py +31 -0
  147. electronicparsers/nwchem/metainfo/__init__.py +19 -0
  148. electronicparsers/nwchem/metainfo/nwchem.py +487 -0
  149. electronicparsers/nwchem/nomad_plugin.yaml +19 -0
  150. electronicparsers/nwchem/parser.py +757 -0
  151. electronicparsers/ocean/__init__.py +19 -0
  152. electronicparsers/ocean/__main__.py +31 -0
  153. electronicparsers/ocean/metainfo/__init__.py +19 -0
  154. electronicparsers/ocean/metainfo/ocean.py +410 -0
  155. electronicparsers/ocean/nomad_plugin.yaml +37 -0
  156. electronicparsers/ocean/parser.py +344 -0
  157. electronicparsers/octopus/__init__.py +19 -0
  158. electronicparsers/octopus/__main__.py +31 -0
  159. electronicparsers/octopus/metainfo/__init__.py +19 -0
  160. electronicparsers/octopus/metainfo/octopus.py +71 -0
  161. electronicparsers/octopus/metainfo/octopus_autogenerated.py +11647 -0
  162. electronicparsers/octopus/nomad_plugin.yaml +41 -0
  163. electronicparsers/octopus/parser.py +1214 -0
  164. electronicparsers/onetep/__init__.py +19 -0
  165. electronicparsers/onetep/__main__.py +31 -0
  166. electronicparsers/onetep/metainfo/__init__.py +19 -0
  167. electronicparsers/onetep/metainfo/onetep.py +3443 -0
  168. electronicparsers/onetep/nomad_plugin.yaml +19 -0
  169. electronicparsers/onetep/parser.py +577 -0
  170. electronicparsers/openmx/__init__.py +19 -0
  171. electronicparsers/openmx/__main__.py +31 -0
  172. electronicparsers/openmx/metainfo/__init__.py +19 -0
  173. electronicparsers/openmx/metainfo/openmx.py +24 -0
  174. electronicparsers/openmx/nomad_plugin.yaml +25 -0
  175. electronicparsers/openmx/parser.py +918 -0
  176. electronicparsers/orca/__init__.py +19 -0
  177. electronicparsers/orca/__main__.py +31 -0
  178. electronicparsers/orca/metainfo/__init__.py +19 -0
  179. electronicparsers/orca/metainfo/orca.py +1448 -0
  180. electronicparsers/orca/nomad_plugin.yaml +19 -0
  181. electronicparsers/orca/parser.py +1371 -0
  182. electronicparsers/psi4/__init__.py +19 -0
  183. electronicparsers/psi4/__main__.py +31 -0
  184. electronicparsers/psi4/metainfo/__init__.py +19 -0
  185. electronicparsers/psi4/metainfo/psi4.py +372 -0
  186. electronicparsers/psi4/nomad_plugin.yaml +27 -0
  187. electronicparsers/psi4/parser.py +1362 -0
  188. electronicparsers/qball/__init__.py +19 -0
  189. electronicparsers/qball/__main__.py +31 -0
  190. electronicparsers/qball/metainfo/__init__.py +19 -0
  191. electronicparsers/qball/metainfo/qball.py +27 -0
  192. electronicparsers/qball/nomad_plugin.yaml +25 -0
  193. electronicparsers/qball/parser.py +152 -0
  194. electronicparsers/qbox/__init__.py +19 -0
  195. electronicparsers/qbox/__main__.py +31 -0
  196. electronicparsers/qbox/metainfo/__init__.py +19 -0
  197. electronicparsers/qbox/metainfo/qbox.py +490 -0
  198. electronicparsers/qbox/nomad_plugin.yaml +19 -0
  199. electronicparsers/qbox/parser.py +508 -0
  200. electronicparsers/quantumespresso/__init__.py +19 -0
  201. electronicparsers/quantumespresso/__main__.py +31 -0
  202. electronicparsers/quantumespresso/metainfo/__init__.py +19 -0
  203. electronicparsers/quantumespresso/metainfo/quantum_espresso.py +3296 -0
  204. electronicparsers/quantumespresso/nomad_plugin.yaml +31 -0
  205. electronicparsers/quantumespresso/parser.py +3594 -0
  206. electronicparsers/siesta/__init__.py +19 -0
  207. electronicparsers/siesta/__main__.py +31 -0
  208. electronicparsers/siesta/metainfo/__init__.py +19 -0
  209. electronicparsers/siesta/metainfo/siesta.py +141 -0
  210. electronicparsers/siesta/metainfo/siesta_autogenerated.py +3365 -0
  211. electronicparsers/siesta/nomad_plugin.yaml +19 -0
  212. electronicparsers/siesta/parser.py +607 -0
  213. electronicparsers/soliddmft/__init__.py +19 -0
  214. electronicparsers/soliddmft/__main__.py +31 -0
  215. electronicparsers/soliddmft/metainfo/__init__.py +19 -0
  216. electronicparsers/soliddmft/metainfo/soliddmft.py +274 -0
  217. electronicparsers/soliddmft/nomad_plugin.yaml +26 -0
  218. electronicparsers/soliddmft/parser.py +727 -0
  219. electronicparsers/tbstudio/__init__.py +19 -0
  220. electronicparsers/tbstudio/__main__.py +31 -0
  221. electronicparsers/tbstudio/metainfo/__init__.py +19 -0
  222. electronicparsers/tbstudio/metainfo/tbstudio.py +34 -0
  223. electronicparsers/tbstudio/nomad_plugin.yaml +24 -0
  224. electronicparsers/tbstudio/parser.py +412 -0
  225. electronicparsers/turbomole/__init__.py +19 -0
  226. electronicparsers/turbomole/__main__.py +31 -0
  227. electronicparsers/turbomole/metainfo/__init__.py +19 -0
  228. electronicparsers/turbomole/metainfo/turbomole.py +727 -0
  229. electronicparsers/turbomole/nomad_plugin.yaml +18 -0
  230. electronicparsers/turbomole/parser.py +1585 -0
  231. electronicparsers/utils/__init__.py +20 -0
  232. electronicparsers/utils/magres_workflow.py +61 -0
  233. electronicparsers/utils/utils.py +636 -0
  234. electronicparsers/vasp/__init__.py +19 -0
  235. electronicparsers/vasp/__main__.py +31 -0
  236. electronicparsers/vasp/metainfo/__init__.py +19 -0
  237. electronicparsers/vasp/metainfo/vasp.py +169 -0
  238. electronicparsers/vasp/metainfo/vasp_incars.py +3428 -0
  239. electronicparsers/vasp/metainfo/vasp_incarsOut.py +3428 -0
  240. electronicparsers/vasp/metainfo/vasp_incarsUnknown.py +86 -0
  241. electronicparsers/vasp/nomad_plugin.yaml +28 -0
  242. electronicparsers/vasp/parser.py +2340 -0
  243. electronicparsers/w2dynamics/__init__.py +19 -0
  244. electronicparsers/w2dynamics/__main__.py +31 -0
  245. electronicparsers/w2dynamics/metainfo/__init__.py +19 -0
  246. electronicparsers/w2dynamics/metainfo/w2dynamics.py +1270 -0
  247. electronicparsers/w2dynamics/nomad_plugin.yaml +36 -0
  248. electronicparsers/w2dynamics/parser.py +674 -0
  249. electronicparsers/wannier90/__init__.py +19 -0
  250. electronicparsers/wannier90/__main__.py +31 -0
  251. electronicparsers/wannier90/metainfo/__init__.py +19 -0
  252. electronicparsers/wannier90/metainfo/wannier90.py +56 -0
  253. electronicparsers/wannier90/nomad_plugin.yaml +34 -0
  254. electronicparsers/wannier90/parser.py +671 -0
  255. electronicparsers/wien2k/__init__.py +19 -0
  256. electronicparsers/wien2k/__main__.py +31 -0
  257. electronicparsers/wien2k/metainfo/__init__.py +19 -0
  258. electronicparsers/wien2k/metainfo/wien2k.py +783 -0
  259. electronicparsers/wien2k/nomad_plugin.yaml +18 -0
  260. electronicparsers/wien2k/parser.py +1133 -0
  261. electronicparsers/yambo/__init__.py +19 -0
  262. electronicparsers/yambo/__main__.py +31 -0
  263. electronicparsers/yambo/metainfo/__init__.py +19 -0
  264. electronicparsers/yambo/metainfo/yambo.py +577 -0
  265. electronicparsers/yambo/nomad_plugin.yaml +31 -0
  266. electronicparsers/yambo/parser.py +896 -0
  267. nomad_parser_plugins_electronic-1.0.dist-info/LICENSE +202 -0
  268. nomad_parser_plugins_electronic-1.0.dist-info/METADATA +360 -0
  269. nomad_parser_plugins_electronic-1.0.dist-info/RECORD +272 -0
  270. nomad_parser_plugins_electronic-1.0.dist-info/WHEEL +5 -0
  271. nomad_parser_plugins_electronic-1.0.dist-info/entry_points.txt +43 -0
  272. nomad_parser_plugins_electronic-1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ from .parser import TBStudioParser
@@ -0,0 +1,31 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ import sys
20
+ import json
21
+ import logging
22
+
23
+ from nomad.utils import configure_logging
24
+ from nomad.datamodel import EntryArchive
25
+ from electronicparsers.tbstudio import TBStudioParser
26
+
27
+ if __name__ == '__main__':
28
+ configure_logging(console_log_level=logging.DEBUG)
29
+ archive = EntryArchive()
30
+ TBStudioParser().parse(sys.argv[1], archive, logging)
31
+ json.dump(archive.m_to_dict(), sys.stdout, indent=2)
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ from . import tbstudio
@@ -0,0 +1,34 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ import numpy as np # pylint: disable=unused-import
20
+ import typing # pylint: disable=unused-import
21
+ from nomad.metainfo import ( # pylint: disable=unused-import
22
+ MSection,
23
+ MCategory,
24
+ Category,
25
+ Package,
26
+ Quantity,
27
+ Section,
28
+ SubSection,
29
+ SectionProxy,
30
+ Reference,
31
+ )
32
+
33
+
34
+ m_package = Package()
@@ -0,0 +1,24 @@
1
+ code_category: Atomistic code
2
+ code_homepage: https://tight-binding.com/
3
+ code_name: TBStudio
4
+ metadata:
5
+ codeCategory: Atomistic code
6
+ codeLabel: TBStudio
7
+ codeLabelStyle: All in capitals
8
+ codeName: tbstudio
9
+ codeUrl: https://tight-binding.com/
10
+ parserDirName: dependencies/electronic/electronicparsers/tbstudio/
11
+ parserGitUrl: https://github.com/nomad-coe/electronic-parsers.git
12
+ parserSpecific: ''
13
+ preamble: ''
14
+ status: production
15
+ tableOfFiles: '| Input Filename | Description |
16
+
17
+ | --- | --- |
18
+
19
+ | `*.tbm` | **Mainfile**: output binary file |
20
+
21
+ '
22
+ name: parsers/tbstudio
23
+ parser_class_name: electronicparsers.tbstudio.parser.TBStudioParser
24
+ python_package: electronicparsers.tbstudio
@@ -0,0 +1,412 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+
20
+ import os
21
+ import logging
22
+ import numpy as np
23
+
24
+ from nomad.units import ureg
25
+ from runschema.run import Run, Program
26
+ from runschema.system import System, Atoms
27
+ from runschema.method import (
28
+ Method,
29
+ TB,
30
+ SlaterKoster,
31
+ TightBindingOrbital,
32
+ SlaterKosterBond,
33
+ TwoCenterBond,
34
+ )
35
+ from runschema.calculation import Calculation, BandStructure, BandEnergies, Energy
36
+ from simulationworkflowschema import SinglePoint
37
+ import json
38
+ import re
39
+ from ..utils import BeyondDFTWorkflowsParser
40
+ from ase.data import chemical_symbols
41
+
42
+
43
+ class TBStudioParser(BeyondDFTWorkflowsParser):
44
+ def __init__(self):
45
+ self._calculation_type = 'tight binding'
46
+
47
+ def parse_system(self):
48
+ """Populates run.system with the input structural parameters."""
49
+ sec_run = self.archive.run[-1]
50
+ sec_system = System()
51
+ sec_run.system.append(sec_system)
52
+ sec_atoms = Atoms()
53
+ sec_system.atoms = sec_atoms
54
+
55
+ # Load lattice vectors
56
+ if self.tbm.get('vars') is None:
57
+ self.logger.warning('Could not find the .tbm file vars parameters.')
58
+ return
59
+
60
+ self.a = [np.float64(self.tbm['vars'].get(f'a[{i}]', '0')) for i in range(3)]
61
+ self.b = [np.float64(self.tbm['vars'].get(f'b[{i}]', '0')) for i in range(3)]
62
+ self.c = [np.float64(self.tbm['vars'].get(f'c[{i}]', '0')) for i in range(3)]
63
+
64
+ sec_atoms.lattice_vectors = [self.a, self.b, self.c] * ureg.angstrom
65
+
66
+ xyz_coords = []
67
+ atomic_labels = []
68
+ for r, atomic_number in zip(
69
+ self.tbm['grids']['XYZ_Coords'].get('value', []),
70
+ self.tbm['grids']['KABC_Coords'].get('value', []),
71
+ ):
72
+ # Check if x, y, and z are provided then accept it otherwise it is taken as the end of table
73
+ # This is the same behaviour that tbstudio does to accept or ignore a row
74
+ try:
75
+ x = np.float64(r[0])
76
+ y = np.float64(r[1])
77
+ z = np.float64(r[2])
78
+ atom_num = int(atomic_number[0])
79
+ xyz_coords.append([x, y, z])
80
+ atomic_labels.append(chemical_symbols[atom_num])
81
+ except Exception:
82
+ break
83
+
84
+ sec_atoms.positions = xyz_coords * ureg.angstrom
85
+ sec_atoms.labels = atomic_labels
86
+
87
+ tb_l = np.int64(self.tbm['vars'].get('TBl[0]', '0'))
88
+ tb_m = np.int64(self.tbm['vars'].get('TBm[0]', '0'))
89
+ tb_n = np.int64(self.tbm['vars'].get('TBn[0]', '0'))
90
+
91
+ pbc = [bool(dim != 0) for dim in [tb_l, tb_m, tb_n]]
92
+ sec_atoms.periodic = pbc
93
+
94
+ def parse_method(self):
95
+ """Populates run.method with the input methodological parameters."""
96
+ sec_run = self.archive.run[-1]
97
+
98
+ sec_method = Method()
99
+ sec_run.method.append(sec_method)
100
+ sec_tb = TB()
101
+ sec_method.tb = sec_tb
102
+ sec_sk = SlaterKoster()
103
+ sec_tb.slater_koster = sec_sk
104
+
105
+ orbitals = []
106
+ lastInd = 0
107
+ for i in range(1, 100):
108
+ varName = 'AtomInd{}'.format(i)
109
+ orbital = self.tbm['combos'][varName]
110
+ if orbital['selected'] != 0:
111
+ lastInd = i
112
+ for i in range(1, lastInd + 1):
113
+ varName = 'AtomInd{}'.format(i)
114
+ orbital = self.tbm['combos'][varName]
115
+ items = orbital['items']
116
+ selected = orbital['selected']
117
+ if selected == 0:
118
+ orbitals.append(None)
119
+ else:
120
+ orbitals.append(items[selected])
121
+
122
+ final_os = {}
123
+ tbAtom = ''
124
+ shell = ''
125
+ for state, row in zip(
126
+ self.tbm['grids']['OS']['isReadOnly'], self.tbm['grids']['OS']['value']
127
+ ):
128
+ if state[0] and state[1] and state[2]:
129
+ if row[0] == '' and row[1] == '' and row[2] == '':
130
+ break
131
+ else:
132
+ os_name = row[0]
133
+ orbital_info = re.search(r'^(.*) \((.*)\)$', os_name)
134
+ tbAtom = orbital_info[1]
135
+ shell = orbital_info[2]
136
+ if tbAtom not in final_os:
137
+ final_os[tbAtom] = {shell: {}}
138
+ else:
139
+ if shell not in final_os[tbAtom]:
140
+ final_os[tbAtom][shell] = {}
141
+ else:
142
+ orbital = row[0]
143
+ final = 0
144
+ try:
145
+ final = np.float64(row[2])
146
+ except Exception:
147
+ pass
148
+
149
+ final_os[tbAtom][shell][orbital] = final
150
+
151
+ for atom_index, orbital in enumerate(orbitals):
152
+ shells = final_os[orbital]
153
+ for iShell, shellOrbitals in enumerate(shells.values()):
154
+ for orbital_name, onSite in shellOrbitals.items():
155
+ sec_orbitals = TightBindingOrbital()
156
+ sec_sk.orbitals.append(sec_orbitals)
157
+ sec_orbitals.orbital_name = orbital_name
158
+ sec_orbitals.atom_index = atom_index
159
+ sec_orbitals.shell = iShell
160
+ sec_orbitals.onsite_energy = onSite
161
+
162
+ final_sk = {}
163
+ tb_bond = ''
164
+ for state, row in zip(
165
+ self.tbm['grids']['SK']['isReadOnly'], self.tbm['grids']['SK']['value']
166
+ ):
167
+ if state[0] and state[1] and state[2]:
168
+ if row[0] == '' and row[1] == '' and row[2] == '':
169
+ break
170
+ else:
171
+ tb_bond = row[0]
172
+ final_sk[tb_bond] = {}
173
+ else:
174
+ sk_integral = row[0]
175
+ try:
176
+ final_sk[tb_bond][sk_integral] = np.float64(row[2])
177
+ except Exception:
178
+ final_sk[tb_bond][sk_integral] = 0
179
+
180
+ final_overlap = {}
181
+ tb_bond = ''
182
+ for state, row in zip(
183
+ self.tbm['grids']['OL']['isReadOnly'], self.tbm['grids']['OL']['value']
184
+ ):
185
+ if state[0] and state[1] and state[2]:
186
+ if row[0] == '' and row[1] == '' and row[2] == '':
187
+ break
188
+ else:
189
+ tb_bond = row[0]
190
+ final_overlap[tb_bond] = {}
191
+ else:
192
+ sk_integral = row[0]
193
+ try:
194
+ final_overlap[tb_bond][sk_integral] = np.float64(row[2])
195
+ except Exception:
196
+ final_overlap[tb_bond][sk_integral] = 0
197
+
198
+ bonds = []
199
+ if 'TB Model' in self.tbm['trees']['Bonds']:
200
+ if 'children' in self.tbm['trees']['Bonds']['TB Model']:
201
+ allBonds = self.tbm['trees']['Bonds']['TB Model']['children']
202
+ allCells = allBonds.keys()
203
+ for cells in allCells:
204
+ cellBonds = allBonds[cells]
205
+ cells_info = re.search(r'^(\(.*\))-(\(.*\))$', cells)
206
+ cell1 = cells_info[1]
207
+ cell2 = cells_info[2]
208
+ is_active = cellBonds['state'] == 4
209
+ if is_active:
210
+ allAtoms = cellBonds['children']
211
+ for atoms in allAtoms.keys():
212
+ is_bond_active = allAtoms[atoms]['state'] == 4
213
+ if is_bond_active:
214
+ atoms_info = re.search(
215
+ r'^\[ \(i,n\)=\((\d+),(\d+)\) , \(j,m\)=\((\d+),(\d+)\) , (.*) ]$',
216
+ atoms,
217
+ )
218
+ index1 = atoms_info[1]
219
+ shell1 = atoms_info[2]
220
+ index2 = atoms_info[3]
221
+ shell2 = atoms_info[4]
222
+ bond_type = atoms_info[5]
223
+ bond = {
224
+ 'atom1': {
225
+ 'index': index1,
226
+ 'shell': shell1,
227
+ 'cell': cell1,
228
+ },
229
+ 'atom2': {
230
+ 'index': index2,
231
+ 'shell': shell2,
232
+ 'cell': cell2,
233
+ },
234
+ 'type': bond_type,
235
+ }
236
+ bonds.append(bond)
237
+
238
+ for bond in bonds:
239
+ atom1 = bond['atom1']
240
+ atom2 = bond['atom2']
241
+ bond_type = bond['type']
242
+ h_sk = None
243
+ s_sk = None
244
+ if final_sk:
245
+ h_sk = final_sk[bond_type]
246
+ if final_overlap:
247
+ s_sk = final_overlap[bond_type]
248
+
249
+ if h_sk is not None:
250
+ sec_bonds = SlaterKosterBond()
251
+ sec_sk.bonds.append(sec_bonds)
252
+ sec_bonds.bond_label = bond_type
253
+
254
+ center1 = TightBindingOrbital()
255
+ sec_bonds.center1 = center1
256
+ center1.atom_index = atom1['index']
257
+ center1.shell = atom1['shell']
258
+ indices = re.findall(r'-?\d+', atom1['cell'])
259
+ center1.cell_index = [int(index) for index in indices]
260
+
261
+ center2 = TightBindingOrbital()
262
+ sec_bonds.center2 = center2
263
+ center2.atom_index = atom2['index']
264
+ center2.shell = atom2['shell']
265
+ indices = re.findall(r'-?\d+', atom2['cell'])
266
+ center2.cell_index = [int(index) for index in indices]
267
+ for sk_label, sk_integral in h_sk.items():
268
+ setattr(sec_bonds, sk_label, sk_integral)
269
+
270
+ if s_sk is not None:
271
+ sec_overlaps = SlaterKosterBond()
272
+ sec_sk.overlaps.append(sec_overlaps)
273
+ sec_overlaps.bond_label = bond_type
274
+
275
+ center1 = TightBindingOrbital()
276
+ sec_overlaps.center1 = center1
277
+ center1.atom_index = atom1['index']
278
+ center1.shell = atom1['shell']
279
+ indices = re.findall(r'-?\d+', atom1['cell'])
280
+ center1.cell_index = [int(index) for index in indices]
281
+
282
+ center2 = TightBindingOrbital()
283
+ sec_overlaps.center2 = center2
284
+ center2.atom_index = atom2['index']
285
+ center2.shell = atom2['shell']
286
+ indices = re.findall(r'-?\d+', atom2['cell'])
287
+ center2.cell_index = [int(index) for index in indices]
288
+ for sk_label, sk_integral in s_sk.items():
289
+ setattr(sec_overlaps, sk_label, sk_integral)
290
+
291
+ def parse_scc(self):
292
+ """Populates run.calculation with the output of the calculation."""
293
+ sec_run = self.archive.run[-1]
294
+ sec_scc = Calculation()
295
+ sec_run.calculation.append(sec_scc)
296
+
297
+ _k_points = self.tbm['variables']['KPoints']
298
+ frac_k_points = []
299
+ k_points = []
300
+ k_length = []
301
+ for row in _k_points:
302
+ frac_k_points.append([row[0], row[1], row[2]])
303
+ k_points.append([row[3], row[4], row[5]])
304
+ k_length.append(row[6])
305
+
306
+ tb_bands = self.tbm['variables']['fTBEigVal']
307
+ band_segments_points = self.tbm['variables']['bandSections']['index']
308
+ if band_segments_points is None or len(tb_bands) < 1 or len(frac_k_points) < 1:
309
+ return
310
+
311
+ fermi_level = self.tbm['variables'].get('ChemP')
312
+ if not fermi_level:
313
+ self.logger.warning(
314
+ 'Could not extract the Fermi level, so that the BandStructure is not resolved'
315
+ )
316
+ return
317
+
318
+ sec_energy = Energy()
319
+ sec_scc.energy = sec_energy
320
+ sec_energy.fermi = fermi_level * ureg.eV if fermi_level else None
321
+ sec_k_band = BandStructure()
322
+ sec_k_band.energy_fermi = sec_energy.fermi
323
+
324
+ for n1, n2 in band_segments_points:
325
+ sec_k_band_segment = BandEnergies()
326
+ sec_k_band.segment.append(sec_k_band_segment)
327
+ sec_k_band_segment.kpoints = frac_k_points[n1 : n2 + 1]
328
+ sec_k_band_segment.energies = (
329
+ np.array([tb_bands[n1 : n2 + 1]]) + fermi_level
330
+ ) * ureg.eV
331
+
332
+ sec_scc.band_structure_electronic.append(sec_k_band)
333
+
334
+ def get_mainfile_keys(self, **kwargs):
335
+ filepath = kwargs.get('filename')
336
+
337
+ f = open(filepath)
338
+ tbm = json.load(f)
339
+ f.close()
340
+
341
+ dft_nomad_entry_id = None
342
+ dft_nomad_upload_id = None
343
+ if 'type' in tbm['DFTSource'] and tbm['DFTSource']['type'].lower() == 'nomad':
344
+ dft_nomad_entry_id = tbm['DFTSource']['source']['entry_id']
345
+ dft_nomad_upload_id = tbm['DFTSource']['source']['upload_id']
346
+
347
+ if (
348
+ dft_nomad_entry_id is not None
349
+ and dft_nomad_entry_id != ''
350
+ and dft_nomad_upload_id is not None
351
+ and dft_nomad_upload_id != ''
352
+ ):
353
+ return ['TB_workflow']
354
+ else:
355
+ return True
356
+
357
+ def parse(self, filepath, archive, logger):
358
+ self.filepath = os.path.abspath(filepath)
359
+ self.archive = archive
360
+ self.maindir = os.path.dirname(self.filepath)
361
+ self.logger = logger if logger is not None else logging
362
+
363
+ sec_run = Run()
364
+ self.archive.run.append(sec_run)
365
+
366
+ try:
367
+ f = open(self.filepath)
368
+ tbm = json.load(f)
369
+ f.close()
370
+ except Exception:
371
+ self.logger.error('Error opening json output file.')
372
+ return
373
+
374
+ self.tbm = tbm
375
+ sec_run.program = Program(
376
+ name='TBStudio', version=self.tbm.get('ReleaseVersion', '')
377
+ )
378
+
379
+ dft_nomad_entry_id = None
380
+ dft_nomad_upload_id = None
381
+ if (
382
+ 'type' in self.tbm['DFTSource']
383
+ and self.tbm['DFTSource']['type'].lower() == 'nomad'
384
+ ):
385
+ dft_nomad_entry_id = self.tbm['DFTSource']['source']['entry_id']
386
+ dft_nomad_upload_id = self.tbm['DFTSource']['source']['upload_id']
387
+
388
+ self.parse_system()
389
+ self.parse_method()
390
+ self.parse_scc()
391
+
392
+ workflow = SinglePoint()
393
+ self.archive.workflow2 = workflow
394
+
395
+ if (
396
+ dft_nomad_entry_id is not None
397
+ and dft_nomad_entry_id != ''
398
+ and dft_nomad_upload_id is not None
399
+ and dft_nomad_upload_id != ''
400
+ ):
401
+ first_principles_calculation_archive = None
402
+ try:
403
+ first_principles_calculation_archive = archive.m_context.load_archive(
404
+ dft_nomad_entry_id, dft_nomad_upload_id, None
405
+ )
406
+ except Exception:
407
+ self.logger.warning('TBStudio Workflow was not found.')
408
+ if first_principles_calculation_archive and self._child_archives:
409
+ tb_workflow_archive = self._child_archives.get('TB_workflow')
410
+ self.parse_tb_workflow(
411
+ archive, first_principles_calculation_archive, tb_workflow_archive
412
+ )
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ from .parser import TurbomoleParser
@@ -0,0 +1,31 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ import sys
20
+ import json
21
+ import logging
22
+
23
+ from nomad.utils import configure_logging
24
+ from nomad.datamodel import EntryArchive
25
+ from electronicparsers.turbomole import TurbomoleParser
26
+
27
+ if __name__ == '__main__':
28
+ configure_logging(console_log_level=logging.DEBUG)
29
+ archive = EntryArchive()
30
+ TurbomoleParser().parse(sys.argv[1], archive, logging)
31
+ json.dump(archive.m_to_dict(), sys.stdout, indent=2)
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright The NOMAD Authors.
3
+ #
4
+ # This file is part of NOMAD.
5
+ # See https://nomad-lab.eu for further info.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ from . import turbomole