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.
- electronicparsers/__init__.py +1162 -0
- electronicparsers/abacus/__init__.py +20 -0
- electronicparsers/abacus/__main__.py +32 -0
- electronicparsers/abacus/metainfo/__init__.py +19 -0
- electronicparsers/abacus/metainfo/abacus.py +836 -0
- electronicparsers/abacus/nomad_plugin.yaml +44 -0
- electronicparsers/abacus/parser.py +1975 -0
- electronicparsers/abinit/__init__.py +19 -0
- electronicparsers/abinit/__main__.py +31 -0
- electronicparsers/abinit/metainfo/__init__.py +20 -0
- electronicparsers/abinit/metainfo/abinit.py +871 -0
- electronicparsers/abinit/metainfo/abinit_autogenerated.py +6794 -0
- electronicparsers/abinit/nomad_plugin.yaml +43 -0
- electronicparsers/abinit/parser.py +1922 -0
- electronicparsers/ams/__init__.py +19 -0
- electronicparsers/ams/__main__.py +31 -0
- electronicparsers/ams/metainfo/__init__.py +19 -0
- electronicparsers/ams/metainfo/ams.py +769 -0
- electronicparsers/ams/nomad_plugin.yaml +19 -0
- electronicparsers/ams/parser.py +1849 -0
- electronicparsers/ams/rkf.py +620 -0
- electronicparsers/atk/__init__.py +19 -0
- electronicparsers/atk/__main__.py +31 -0
- electronicparsers/atk/metainfo/__init__.py +19 -0
- electronicparsers/atk/metainfo/atk.py +71 -0
- electronicparsers/atk/nomad_plugin.yaml +34 -0
- electronicparsers/atk/parser.py +388 -0
- electronicparsers/bigdft/__init__.py +19 -0
- electronicparsers/bigdft/__main__.py +31 -0
- electronicparsers/bigdft/metainfo/__init__.py +18 -0
- electronicparsers/bigdft/nomad_plugin.yaml +19 -0
- electronicparsers/bigdft/parser.py +372 -0
- electronicparsers/castep/__init__.py +19 -0
- electronicparsers/castep/__main__.py +31 -0
- electronicparsers/castep/metainfo/__init__.py +19 -0
- electronicparsers/castep/metainfo/castep.py +2481 -0
- electronicparsers/castep/nomad_plugin.yaml +28 -0
- electronicparsers/castep/parser.py +1680 -0
- electronicparsers/charmm/__init__.py +19 -0
- electronicparsers/charmm/__main__.py +31 -0
- electronicparsers/charmm/metainfo/__init__.py +19 -0
- electronicparsers/charmm/metainfo/charmm.py +1931 -0
- electronicparsers/charmm/nomad_plugin.yaml +18 -0
- electronicparsers/charmm/parser.py +61 -0
- electronicparsers/cp2k/__init__.py +19 -0
- electronicparsers/cp2k/__main__.py +31 -0
- electronicparsers/cp2k/metainfo/__init__.py +19 -0
- electronicparsers/cp2k/metainfo/cp2k.py +59185 -0
- electronicparsers/cp2k/metainfo/cp2k_general.py +1014 -0
- electronicparsers/cp2k/nomad_plugin.yaml +49 -0
- electronicparsers/cp2k/parser.py +2324 -0
- electronicparsers/cpmd/__init__.py +19 -0
- electronicparsers/cpmd/__main__.py +31 -0
- electronicparsers/cpmd/metainfo/__init__.py +19 -0
- electronicparsers/cpmd/metainfo/cpmd.py +10733 -0
- electronicparsers/cpmd/metainfo/cpmd_general.py +988 -0
- electronicparsers/cpmd/nomad_plugin.yaml +19 -0
- electronicparsers/cpmd/parser.py +680 -0
- electronicparsers/crystal/__init__.py +19 -0
- electronicparsers/crystal/__main__.py +31 -0
- electronicparsers/crystal/metainfo/__init__.py +19 -0
- electronicparsers/crystal/metainfo/crystal.py +619 -0
- electronicparsers/crystal/nomad_plugin.yaml +36 -0
- electronicparsers/crystal/parser.py +1745 -0
- electronicparsers/dmol3/__init__.py +19 -0
- electronicparsers/dmol3/__main__.py +31 -0
- electronicparsers/dmol3/metainfo/__init__.py +19 -0
- electronicparsers/dmol3/metainfo/dmol3.py +664 -0
- electronicparsers/dmol3/nomad_plugin.yaml +19 -0
- electronicparsers/dmol3/parser.py +750 -0
- electronicparsers/edmft/__init__.py +19 -0
- electronicparsers/edmft/__main__.py +31 -0
- electronicparsers/edmft/metainfo/__init__.py +19 -0
- electronicparsers/edmft/metainfo/edmft.py +96 -0
- electronicparsers/edmft/nomad_plugin.yaml +53 -0
- electronicparsers/edmft/parser.py +912 -0
- electronicparsers/elk/__init__.py +19 -0
- electronicparsers/elk/__main__.py +31 -0
- electronicparsers/elk/metainfo/__init__.py +19 -0
- electronicparsers/elk/metainfo/elk.py +775 -0
- electronicparsers/elk/nomad_plugin.yaml +19 -0
- electronicparsers/elk/parser.py +493 -0
- electronicparsers/exciting/__init__.py +19 -0
- electronicparsers/exciting/__main__.py +31 -0
- electronicparsers/exciting/metainfo/__init__.py +19 -0
- electronicparsers/exciting/metainfo/exciting.py +2942 -0
- electronicparsers/exciting/nomad_plugin.yaml +83 -0
- electronicparsers/exciting/parser.py +3398 -0
- electronicparsers/fhiaims/__init__.py +19 -0
- electronicparsers/fhiaims/__main__.py +31 -0
- electronicparsers/fhiaims/metainfo/__init__.py +19 -0
- electronicparsers/fhiaims/metainfo/fhi_aims.py +1565 -0
- electronicparsers/fhiaims/nomad_plugin.yaml +52 -0
- electronicparsers/fhiaims/parser.py +2582 -0
- electronicparsers/fleur/__init__.py +19 -0
- electronicparsers/fleur/__main__.py +31 -0
- electronicparsers/fleur/metainfo/__init__.py +19 -0
- electronicparsers/fleur/metainfo/fleur.py +623 -0
- electronicparsers/fleur/nomad_plugin.yaml +19 -0
- electronicparsers/fleur/parser.py +952 -0
- electronicparsers/fplo/__init__.py +19 -0
- electronicparsers/fplo/__main__.py +31 -0
- electronicparsers/fplo/metainfo/__init__.py +19 -0
- electronicparsers/fplo/metainfo/fplo.py +188 -0
- electronicparsers/fplo/metainfo/fplo_input_autogenerated.py +2744 -0
- electronicparsers/fplo/metainfo/fplo_temporaries.py +319 -0
- electronicparsers/fplo/nomad_plugin.yaml +19 -0
- electronicparsers/fplo/parser.py +42 -0
- electronicparsers/gamess/__init__.py +19 -0
- electronicparsers/gamess/__main__.py +31 -0
- electronicparsers/gamess/metainfo/__init__.py +19 -0
- electronicparsers/gamess/metainfo/gamess.py +837 -0
- electronicparsers/gamess/nomad_plugin.yaml +19 -0
- electronicparsers/gamess/parser.py +941 -0
- electronicparsers/gaussian/__init__.py +19 -0
- electronicparsers/gaussian/__main__.py +31 -0
- electronicparsers/gaussian/metainfo/__init__.py +19 -0
- electronicparsers/gaussian/metainfo/gaussian.py +1707 -0
- electronicparsers/gaussian/nomad_plugin.yaml +18 -0
- electronicparsers/gaussian/parser.py +1556 -0
- electronicparsers/gpaw/__init__.py +19 -0
- electronicparsers/gpaw/__main__.py +31 -0
- electronicparsers/gpaw/metainfo/__init__.py +19 -0
- electronicparsers/gpaw/metainfo/gpaw.py +214 -0
- electronicparsers/gpaw/nomad_plugin.yaml +19 -0
- electronicparsers/gpaw/parser.py +671 -0
- electronicparsers/magres/__init__.py +19 -0
- electronicparsers/magres/__main__.py +31 -0
- electronicparsers/magres/metainfo/__init__.py +19 -0
- electronicparsers/magres/metainfo/magres.py +110 -0
- electronicparsers/magres/nomad_plugin.yaml +18 -0
- electronicparsers/magres/parser.py +505 -0
- electronicparsers/molcas/__init__.py +19 -0
- electronicparsers/molcas/__main__.py +31 -0
- electronicparsers/molcas/metainfo/__init__.py +19 -0
- electronicparsers/molcas/metainfo/molcas.py +151 -0
- electronicparsers/molcas/nomad_plugin.yaml +19 -0
- electronicparsers/molcas/parser.py +59 -0
- electronicparsers/mopac/__init__.py +19 -0
- electronicparsers/mopac/__main__.py +31 -0
- electronicparsers/mopac/metainfo/__init__.py +19 -0
- electronicparsers/mopac/metainfo/mopac.py +79 -0
- electronicparsers/mopac/nomad_plugin.yaml +19 -0
- electronicparsers/mopac/parser.py +304 -0
- electronicparsers/nwchem/__init__.py +19 -0
- electronicparsers/nwchem/__main__.py +31 -0
- electronicparsers/nwchem/metainfo/__init__.py +19 -0
- electronicparsers/nwchem/metainfo/nwchem.py +487 -0
- electronicparsers/nwchem/nomad_plugin.yaml +19 -0
- electronicparsers/nwchem/parser.py +757 -0
- electronicparsers/ocean/__init__.py +19 -0
- electronicparsers/ocean/__main__.py +31 -0
- electronicparsers/ocean/metainfo/__init__.py +19 -0
- electronicparsers/ocean/metainfo/ocean.py +410 -0
- electronicparsers/ocean/nomad_plugin.yaml +37 -0
- electronicparsers/ocean/parser.py +344 -0
- electronicparsers/octopus/__init__.py +19 -0
- electronicparsers/octopus/__main__.py +31 -0
- electronicparsers/octopus/metainfo/__init__.py +19 -0
- electronicparsers/octopus/metainfo/octopus.py +71 -0
- electronicparsers/octopus/metainfo/octopus_autogenerated.py +11647 -0
- electronicparsers/octopus/nomad_plugin.yaml +41 -0
- electronicparsers/octopus/parser.py +1214 -0
- electronicparsers/onetep/__init__.py +19 -0
- electronicparsers/onetep/__main__.py +31 -0
- electronicparsers/onetep/metainfo/__init__.py +19 -0
- electronicparsers/onetep/metainfo/onetep.py +3443 -0
- electronicparsers/onetep/nomad_plugin.yaml +19 -0
- electronicparsers/onetep/parser.py +577 -0
- electronicparsers/openmx/__init__.py +19 -0
- electronicparsers/openmx/__main__.py +31 -0
- electronicparsers/openmx/metainfo/__init__.py +19 -0
- electronicparsers/openmx/metainfo/openmx.py +24 -0
- electronicparsers/openmx/nomad_plugin.yaml +25 -0
- electronicparsers/openmx/parser.py +918 -0
- electronicparsers/orca/__init__.py +19 -0
- electronicparsers/orca/__main__.py +31 -0
- electronicparsers/orca/metainfo/__init__.py +19 -0
- electronicparsers/orca/metainfo/orca.py +1448 -0
- electronicparsers/orca/nomad_plugin.yaml +19 -0
- electronicparsers/orca/parser.py +1371 -0
- electronicparsers/psi4/__init__.py +19 -0
- electronicparsers/psi4/__main__.py +31 -0
- electronicparsers/psi4/metainfo/__init__.py +19 -0
- electronicparsers/psi4/metainfo/psi4.py +372 -0
- electronicparsers/psi4/nomad_plugin.yaml +27 -0
- electronicparsers/psi4/parser.py +1362 -0
- electronicparsers/qball/__init__.py +19 -0
- electronicparsers/qball/__main__.py +31 -0
- electronicparsers/qball/metainfo/__init__.py +19 -0
- electronicparsers/qball/metainfo/qball.py +27 -0
- electronicparsers/qball/nomad_plugin.yaml +25 -0
- electronicparsers/qball/parser.py +152 -0
- electronicparsers/qbox/__init__.py +19 -0
- electronicparsers/qbox/__main__.py +31 -0
- electronicparsers/qbox/metainfo/__init__.py +19 -0
- electronicparsers/qbox/metainfo/qbox.py +490 -0
- electronicparsers/qbox/nomad_plugin.yaml +19 -0
- electronicparsers/qbox/parser.py +508 -0
- electronicparsers/quantumespresso/__init__.py +19 -0
- electronicparsers/quantumespresso/__main__.py +31 -0
- electronicparsers/quantumespresso/metainfo/__init__.py +19 -0
- electronicparsers/quantumespresso/metainfo/quantum_espresso.py +3296 -0
- electronicparsers/quantumespresso/nomad_plugin.yaml +31 -0
- electronicparsers/quantumespresso/parser.py +3594 -0
- electronicparsers/siesta/__init__.py +19 -0
- electronicparsers/siesta/__main__.py +31 -0
- electronicparsers/siesta/metainfo/__init__.py +19 -0
- electronicparsers/siesta/metainfo/siesta.py +141 -0
- electronicparsers/siesta/metainfo/siesta_autogenerated.py +3365 -0
- electronicparsers/siesta/nomad_plugin.yaml +19 -0
- electronicparsers/siesta/parser.py +607 -0
- electronicparsers/soliddmft/__init__.py +19 -0
- electronicparsers/soliddmft/__main__.py +31 -0
- electronicparsers/soliddmft/metainfo/__init__.py +19 -0
- electronicparsers/soliddmft/metainfo/soliddmft.py +274 -0
- electronicparsers/soliddmft/nomad_plugin.yaml +26 -0
- electronicparsers/soliddmft/parser.py +727 -0
- electronicparsers/tbstudio/__init__.py +19 -0
- electronicparsers/tbstudio/__main__.py +31 -0
- electronicparsers/tbstudio/metainfo/__init__.py +19 -0
- electronicparsers/tbstudio/metainfo/tbstudio.py +34 -0
- electronicparsers/tbstudio/nomad_plugin.yaml +24 -0
- electronicparsers/tbstudio/parser.py +412 -0
- electronicparsers/turbomole/__init__.py +19 -0
- electronicparsers/turbomole/__main__.py +31 -0
- electronicparsers/turbomole/metainfo/__init__.py +19 -0
- electronicparsers/turbomole/metainfo/turbomole.py +727 -0
- electronicparsers/turbomole/nomad_plugin.yaml +18 -0
- electronicparsers/turbomole/parser.py +1585 -0
- electronicparsers/utils/__init__.py +20 -0
- electronicparsers/utils/magres_workflow.py +61 -0
- electronicparsers/utils/utils.py +636 -0
- electronicparsers/vasp/__init__.py +19 -0
- electronicparsers/vasp/__main__.py +31 -0
- electronicparsers/vasp/metainfo/__init__.py +19 -0
- electronicparsers/vasp/metainfo/vasp.py +169 -0
- electronicparsers/vasp/metainfo/vasp_incars.py +3428 -0
- electronicparsers/vasp/metainfo/vasp_incarsOut.py +3428 -0
- electronicparsers/vasp/metainfo/vasp_incarsUnknown.py +86 -0
- electronicparsers/vasp/nomad_plugin.yaml +28 -0
- electronicparsers/vasp/parser.py +2340 -0
- electronicparsers/w2dynamics/__init__.py +19 -0
- electronicparsers/w2dynamics/__main__.py +31 -0
- electronicparsers/w2dynamics/metainfo/__init__.py +19 -0
- electronicparsers/w2dynamics/metainfo/w2dynamics.py +1270 -0
- electronicparsers/w2dynamics/nomad_plugin.yaml +36 -0
- electronicparsers/w2dynamics/parser.py +674 -0
- electronicparsers/wannier90/__init__.py +19 -0
- electronicparsers/wannier90/__main__.py +31 -0
- electronicparsers/wannier90/metainfo/__init__.py +19 -0
- electronicparsers/wannier90/metainfo/wannier90.py +56 -0
- electronicparsers/wannier90/nomad_plugin.yaml +34 -0
- electronicparsers/wannier90/parser.py +671 -0
- electronicparsers/wien2k/__init__.py +19 -0
- electronicparsers/wien2k/__main__.py +31 -0
- electronicparsers/wien2k/metainfo/__init__.py +19 -0
- electronicparsers/wien2k/metainfo/wien2k.py +783 -0
- electronicparsers/wien2k/nomad_plugin.yaml +18 -0
- electronicparsers/wien2k/parser.py +1133 -0
- electronicparsers/yambo/__init__.py +19 -0
- electronicparsers/yambo/__main__.py +31 -0
- electronicparsers/yambo/metainfo/__init__.py +19 -0
- electronicparsers/yambo/metainfo/yambo.py +577 -0
- electronicparsers/yambo/nomad_plugin.yaml +31 -0
- electronicparsers/yambo/parser.py +896 -0
- nomad_parser_plugins_electronic-1.0.dist-info/LICENSE +202 -0
- nomad_parser_plugins_electronic-1.0.dist-info/METADATA +360 -0
- nomad_parser_plugins_electronic-1.0.dist-info/RECORD +272 -0
- nomad_parser_plugins_electronic-1.0.dist-info/WHEEL +5 -0
- nomad_parser_plugins_electronic-1.0.dist-info/entry_points.txt +43 -0
- nomad_parser_plugins_electronic-1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,372 @@
|
|
|
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
|
+
from ase.data import chemical_symbols
|
|
24
|
+
import yaml
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
from yaml import CLoader
|
|
28
|
+
except Exception:
|
|
29
|
+
pass
|
|
30
|
+
|
|
31
|
+
from nomad.units import ureg
|
|
32
|
+
from runschema.run import Run, Program
|
|
33
|
+
from runschema.method import (
|
|
34
|
+
Method,
|
|
35
|
+
DFT,
|
|
36
|
+
XCFunctional,
|
|
37
|
+
Functional,
|
|
38
|
+
Electronic,
|
|
39
|
+
Scf,
|
|
40
|
+
BasisSet,
|
|
41
|
+
BasisSetContainer,
|
|
42
|
+
)
|
|
43
|
+
from runschema.system import System, Atoms
|
|
44
|
+
from runschema.calculation import (
|
|
45
|
+
Calculation,
|
|
46
|
+
Energy,
|
|
47
|
+
EnergyEntry,
|
|
48
|
+
Forces,
|
|
49
|
+
ForcesEntry,
|
|
50
|
+
ScfIteration,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class BigDFTParser:
|
|
55
|
+
def __init__(self):
|
|
56
|
+
self.yaml_dict = dict()
|
|
57
|
+
|
|
58
|
+
# TODO complete mapping
|
|
59
|
+
self.xc_mapping = {
|
|
60
|
+
1: ['LDA_XC_TETER93'],
|
|
61
|
+
11: ['GGA_C_PBE", "GGA_X_PBE'],
|
|
62
|
+
12: ['GGA_X_PBE'],
|
|
63
|
+
15: ['GGA_C_PBE", "GGA_X_RPBE'],
|
|
64
|
+
16: ['GGA_XC_HCTH_93'],
|
|
65
|
+
17: ['GGA_XC_HCTH_120'],
|
|
66
|
+
26: ['GGA_XC_HCTH_147'],
|
|
67
|
+
27: ['GGA_XC_HCTH_407'],
|
|
68
|
+
100: ['HF_X'],
|
|
69
|
+
# libxc
|
|
70
|
+
'001': 'LDA_X',
|
|
71
|
+
'002': 'LDA_C_WIGNER',
|
|
72
|
+
'003': 'LDA_C_RPA',
|
|
73
|
+
'004': 'LDA_C_HL',
|
|
74
|
+
'005': 'LDA_C_GL',
|
|
75
|
+
'006': 'LDA_C_XALPHA',
|
|
76
|
+
'007': 'LDA_C_VWN',
|
|
77
|
+
'008': 'LDA_C_VWN_RPA',
|
|
78
|
+
'009': 'LDA_C_PZ',
|
|
79
|
+
'010': 'LDA_C_PZ_MOD',
|
|
80
|
+
'011': 'LDA_C_OB_PZ',
|
|
81
|
+
'012': 'LDA_C_PW',
|
|
82
|
+
'013': 'LDA_C_PW_MOD',
|
|
83
|
+
'014': 'LDA_C_OB_PW',
|
|
84
|
+
'015': 'LDA_C_2D_AMGB',
|
|
85
|
+
'016': 'LDA_C_2D_PRM',
|
|
86
|
+
'017': 'LDA_C_vBH',
|
|
87
|
+
'018': 'LDA_C_1D_CSC',
|
|
88
|
+
'019': 'LDA_X_2D',
|
|
89
|
+
'020': 'LDA_XC_TETER93',
|
|
90
|
+
'021': 'LDA_X_1D',
|
|
91
|
+
'101': 'GGA_X_PBE',
|
|
92
|
+
'102': 'GGA_X_PBE_R',
|
|
93
|
+
'103': 'GGA_X_B86',
|
|
94
|
+
'104': 'GGA_X_B86_R',
|
|
95
|
+
'105': 'GGA_X_B86_MGC',
|
|
96
|
+
'106': 'GGA_X_B88',
|
|
97
|
+
'107': 'GGA_X_G96',
|
|
98
|
+
'108': 'GGA_X_PW86',
|
|
99
|
+
'109': 'GGA_X_PW91',
|
|
100
|
+
'110': 'GGA_X_OPTX',
|
|
101
|
+
'111': 'GGA_X_DK87_R1',
|
|
102
|
+
'112': 'GGA_X_DK87_R2',
|
|
103
|
+
'113': 'GGA_X_LG93',
|
|
104
|
+
'114': 'GGA_X_FT97_A',
|
|
105
|
+
'115': 'GGA_X_FT97_B',
|
|
106
|
+
'116': 'GGA_X_PBE_SOL',
|
|
107
|
+
'117': 'GGA_X_RPBE',
|
|
108
|
+
'118': 'GGA_X_WC',
|
|
109
|
+
'119': 'GGA_X_mPW91',
|
|
110
|
+
'120': 'GGA_X_AM05',
|
|
111
|
+
'121': 'GGA_X_PBEA',
|
|
112
|
+
'122': 'GGA_X_MPBE',
|
|
113
|
+
'123': 'GGA_X_XPBE',
|
|
114
|
+
'124': 'GGA_X_2D_B86_MGC',
|
|
115
|
+
'125': 'GGA_X_BAYESIAN',
|
|
116
|
+
'126': 'GGA_X_PBE_JSJR',
|
|
117
|
+
'127': 'GGA_X_2D_B88',
|
|
118
|
+
'128': 'GGA_X_2D_B86',
|
|
119
|
+
'129': 'GGA_X_2D_PBE',
|
|
120
|
+
'130': 'GGA_C_PBE',
|
|
121
|
+
'131': 'GGA_C_LYP',
|
|
122
|
+
'132': 'GGA_C_P86',
|
|
123
|
+
'133': 'GGA_C_PBE_SOL',
|
|
124
|
+
'134': 'GGA_C_PW91',
|
|
125
|
+
'135': 'GGA_C_AM05',
|
|
126
|
+
'136': 'GGA_C_XPBE',
|
|
127
|
+
'137': 'GGA_C_LM',
|
|
128
|
+
'138': 'GGA_C_PBE_JRGX',
|
|
129
|
+
'139': 'GGA_X_OPTB88_VDW',
|
|
130
|
+
'140': 'GGA_X_PBEK1_VDW',
|
|
131
|
+
'141': 'GGA_X_OPTPBE_VDW',
|
|
132
|
+
'160': 'GGA_XC_LB',
|
|
133
|
+
'161': 'GGA_XC_HCTH_93',
|
|
134
|
+
'162': 'GGA_XC_HCTH_120',
|
|
135
|
+
'163': 'GGA_XC_HCTH_147',
|
|
136
|
+
'164': 'GGA_XC_HCTH_407',
|
|
137
|
+
'165': 'GGA_XC_EDF1',
|
|
138
|
+
'166': 'GGA_XC_XLYP',
|
|
139
|
+
'167': 'GGA_XC_B97',
|
|
140
|
+
'168': 'GGA_XC_B97_1',
|
|
141
|
+
'169': 'GGA_XC_B97_2',
|
|
142
|
+
'170': 'GGA_XC_B97_D',
|
|
143
|
+
'171': 'GGA_XC_B97_K',
|
|
144
|
+
'172': 'GGA_XC_B97_3',
|
|
145
|
+
'173': 'GGA_XC_PBE1W',
|
|
146
|
+
'174': 'GGA_XC_MPWLYP1W',
|
|
147
|
+
'175': 'GGA_XC_PBELYP1W',
|
|
148
|
+
'176': 'GGA_XC_SB98_1a',
|
|
149
|
+
'177': 'GGA_XC_SB98_1b',
|
|
150
|
+
'178': 'GGA_XC_SB98_1c',
|
|
151
|
+
'179': 'GGA_XC_SB98_2a',
|
|
152
|
+
'180': 'GGA_XC_SB98_2b',
|
|
153
|
+
'181': 'GGA_XC_SB98_2c',
|
|
154
|
+
'401': 'HYB_GGA_XC_B3PW91',
|
|
155
|
+
'402': 'HYB_GGA_XC_B3LYP',
|
|
156
|
+
'403': 'HYB_GGA_XC_B3P86',
|
|
157
|
+
'404': 'HYB_GGA_XC_O3LYP',
|
|
158
|
+
'405': 'HYB_GGA_XC_mPW1K',
|
|
159
|
+
'406': 'HYB_GGA_XC_PBEH',
|
|
160
|
+
'407': 'HYB_GGA_XC_B97',
|
|
161
|
+
'408': 'HYB_GGA_XC_B97_1',
|
|
162
|
+
'410': 'HYB_GGA_XC_B97_2',
|
|
163
|
+
'411': 'HYB_GGA_XC_X3LYP',
|
|
164
|
+
'412': 'HYB_GGA_XC_B1WC',
|
|
165
|
+
'413': 'HYB_GGA_XC_B97_K',
|
|
166
|
+
'414': 'HYB_GGA_XC_B97_3',
|
|
167
|
+
'415': 'HYB_GGA_XC_mPW3PW',
|
|
168
|
+
'416': 'HYB_GGA_XC_B1LYP',
|
|
169
|
+
'417': 'HYB_GGA_XC_B1PW91',
|
|
170
|
+
'418': 'HYB_GGA_XC_mPW1PW',
|
|
171
|
+
'419': 'HYB_GGA_XC_mPW3LYP',
|
|
172
|
+
'420': 'HYB_GGA_XC_SB98_1a',
|
|
173
|
+
'421': 'HYB_GGA_XC_SB98_1b',
|
|
174
|
+
'422': 'HYB_GGA_XC_SB98_1c',
|
|
175
|
+
'423': 'HYB_GGA_XC_SB98_2a',
|
|
176
|
+
'424': 'HYB_GGA_XC_SB98_2b',
|
|
177
|
+
'425': 'HYB_GGA_XC_SB98_2c',
|
|
178
|
+
'201': 'MGGA_X_LTA',
|
|
179
|
+
'202': 'MGGA_X_TPSS',
|
|
180
|
+
'203': 'MGGA_X_M06L',
|
|
181
|
+
'204': 'MGGA_X_GVT4',
|
|
182
|
+
'205': 'MGGA_X_TAU_HCTH',
|
|
183
|
+
'206': 'MGGA_X_BR89',
|
|
184
|
+
'207': 'MGGA_X_BJ06',
|
|
185
|
+
'208': 'MGGA_X_TB09',
|
|
186
|
+
'209': 'MGGA_X_RPP09',
|
|
187
|
+
'231': 'MGGA_C_TPSS',
|
|
188
|
+
'232': 'MGGA_C_VSXC',
|
|
189
|
+
'301': 'LCA_OMC',
|
|
190
|
+
'302': 'LCA_LCH',
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
def _extract(self, name, source, default=None):
|
|
194
|
+
for key in source.keys():
|
|
195
|
+
if key.lower() == name.lower():
|
|
196
|
+
return source.pop(key)
|
|
197
|
+
return default
|
|
198
|
+
|
|
199
|
+
def parse_method(self):
|
|
200
|
+
sec_method = Method()
|
|
201
|
+
self.archive.run[-1].method.append(sec_method)
|
|
202
|
+
sec_method.electrons_representation = [
|
|
203
|
+
BasisSetContainer(
|
|
204
|
+
type='real-space grid',
|
|
205
|
+
scope=['wavefunction'],
|
|
206
|
+
basis_set=[
|
|
207
|
+
BasisSet(
|
|
208
|
+
type='real-space grid',
|
|
209
|
+
)
|
|
210
|
+
],
|
|
211
|
+
)
|
|
212
|
+
]
|
|
213
|
+
sec_dft = DFT()
|
|
214
|
+
sec_method.dft = sec_dft
|
|
215
|
+
|
|
216
|
+
data = self._extract('dft', self.yaml_dict, {})
|
|
217
|
+
sec_electronic = Electronic()
|
|
218
|
+
sec_method.electronic = sec_electronic
|
|
219
|
+
sec_electronic.charge = self._extract('qcharge', data, 0)
|
|
220
|
+
sec_electronic.n_spin_channels = self._extract('nspin', data, 1)
|
|
221
|
+
sec_method.scf = Scf(n_max_iteration=self._extract('itermax', data, 0))
|
|
222
|
+
|
|
223
|
+
xc_id = self._extract('xc id', data)
|
|
224
|
+
if xc_id is None:
|
|
225
|
+
xc_id = self._extract('ixc', data, 0)
|
|
226
|
+
if xc_id < 0:
|
|
227
|
+
# libxc
|
|
228
|
+
xc_id = '%06d' % abs(xc_id)
|
|
229
|
+
xc_functionals = [
|
|
230
|
+
self.xc_mapping.get(xc_id[:3]),
|
|
231
|
+
self.xc_mapping.get(xc_id[3:]),
|
|
232
|
+
]
|
|
233
|
+
else:
|
|
234
|
+
xc_functionals = self.xc_mapping.get(xc_id, [])
|
|
235
|
+
|
|
236
|
+
xc_functionals = [f for f in xc_functionals if f is not None]
|
|
237
|
+
sec_xc_functional = XCFunctional()
|
|
238
|
+
sec_dft.xc_functional = sec_xc_functional
|
|
239
|
+
for functional in xc_functionals:
|
|
240
|
+
if '_X_' in functional:
|
|
241
|
+
sec_xc_functional.exchange.append(Functional(name=functional))
|
|
242
|
+
elif '_C_' in functional:
|
|
243
|
+
sec_xc_functional.correlation.append(Functional(name=functional))
|
|
244
|
+
else:
|
|
245
|
+
sec_xc_functional.contributions.append(Functional(name=functional))
|
|
246
|
+
sec_xc_functional.name = '_'.join(xc_functionals)
|
|
247
|
+
|
|
248
|
+
def parse_system(self):
|
|
249
|
+
sec_system = System()
|
|
250
|
+
self.archive.run[-1].system.append(sec_system)
|
|
251
|
+
|
|
252
|
+
data = self._extract('Atomic structure', self.yaml_dict, {})
|
|
253
|
+
labels = []
|
|
254
|
+
positions = []
|
|
255
|
+
for atom in self._extract('positions', data, []):
|
|
256
|
+
for label, position in atom.items():
|
|
257
|
+
if label in chemical_symbols:
|
|
258
|
+
# some entries may not be symbols
|
|
259
|
+
labels.append(label)
|
|
260
|
+
positions.append(position)
|
|
261
|
+
|
|
262
|
+
sec_atoms = Atoms()
|
|
263
|
+
sec_system.atoms = sec_atoms
|
|
264
|
+
if labels:
|
|
265
|
+
sec_atoms.positions = positions * ureg.angstrom
|
|
266
|
+
sec_atoms.labels = labels
|
|
267
|
+
|
|
268
|
+
cell = self._extract('cell', data)
|
|
269
|
+
if cell is None:
|
|
270
|
+
data = self._extract('Sizes of the simulation domain', self.yaml_dict, {})
|
|
271
|
+
cell = self._extract('angstroem', data)
|
|
272
|
+
if cell is not None:
|
|
273
|
+
sec_atoms.lattice_vectors = np.diag(cell) * ureg.angstrom
|
|
274
|
+
sec_atoms.periodic = [True, True, True]
|
|
275
|
+
|
|
276
|
+
data = self._extract('Atomic System Properties', self.yaml_dict, {})
|
|
277
|
+
sec_atoms.n_atoms = self._extract('number of atoms', data, 0)
|
|
278
|
+
|
|
279
|
+
pbc = self._extract('boundary conditions', data, 'Periodic').lower()
|
|
280
|
+
if pbc == 'free':
|
|
281
|
+
sec_atoms.periodic = [False, False, False]
|
|
282
|
+
elif pbc == 'periodic':
|
|
283
|
+
sec_atoms.periodic = [True, True, True]
|
|
284
|
+
elif pbc == 'surface':
|
|
285
|
+
sec_atoms.periodic = [True, False, True]
|
|
286
|
+
|
|
287
|
+
def parse_scc(self):
|
|
288
|
+
sec_scc = Calculation()
|
|
289
|
+
self.archive.run[-1].calculation.append(sec_scc)
|
|
290
|
+
|
|
291
|
+
energy = self._extract('Energy (Hartree)', self.yaml_dict)
|
|
292
|
+
sec_energy = Energy()
|
|
293
|
+
sec_scc.energy = sec_energy
|
|
294
|
+
if energy is not None:
|
|
295
|
+
sec_energy.total = EnergyEntry(value=energy * ureg.hartree)
|
|
296
|
+
|
|
297
|
+
forces = self._extract('Atomic Forces (Ha/Bohr)', self.yaml_dict)
|
|
298
|
+
sec_forces = Forces()
|
|
299
|
+
sec_scc.forces = sec_forces
|
|
300
|
+
if forces is not None:
|
|
301
|
+
sec_forces.total = ForcesEntry(
|
|
302
|
+
value=[list(f.values())[0] for f in forces] * (ureg.hartree / ureg.bohr)
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
data = self._extract('Ground State Optimization', self.yaml_dict, [{}])
|
|
306
|
+
hamiltonian = self._extract('hamiltonian optimization', data[0])
|
|
307
|
+
if hamiltonian is None:
|
|
308
|
+
return
|
|
309
|
+
|
|
310
|
+
energy_mapping = {
|
|
311
|
+
'exc': 'energy_xc',
|
|
312
|
+
'evxc': 'energy_xc_potential',
|
|
313
|
+
'eh': 'energy_correction_hartree',
|
|
314
|
+
'ekin': 'energy_kinetic_electronic',
|
|
315
|
+
'eks': 'energy_total',
|
|
316
|
+
'd': 'energy_change',
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
subspace = self._extract('subspace optimization', hamiltonian[0], {})
|
|
320
|
+
wavefunction = self._extract('wavefunctions iterations', subspace, [])
|
|
321
|
+
sec_scc.n_scf_iterations = len(wavefunction)
|
|
322
|
+
for iteration in wavefunction:
|
|
323
|
+
sec_scf = ScfIteration()
|
|
324
|
+
sec_scc.scf_iteration.append(sec_scf)
|
|
325
|
+
energies = self._extract('energies', iteration, {})
|
|
326
|
+
energies.update(iteration.items())
|
|
327
|
+
sec_scf_energy = Energy()
|
|
328
|
+
sec_scf.energy = sec_scf_energy
|
|
329
|
+
for key, val in energies.items():
|
|
330
|
+
key = energy_mapping.get(key.lower())
|
|
331
|
+
if key is not None:
|
|
332
|
+
key = key.replace('energy_', '')
|
|
333
|
+
if key == 'change':
|
|
334
|
+
sec_scf_energy.change = val * ureg.hartree
|
|
335
|
+
else:
|
|
336
|
+
sec_scf_energy.m_add_sub_section(
|
|
337
|
+
getattr(Energy, key), EnergyEntry(value=val * ureg.hartree)
|
|
338
|
+
)
|
|
339
|
+
|
|
340
|
+
def parse(self, filepath, archive, logger):
|
|
341
|
+
self.filepath = os.path.abspath(filepath)
|
|
342
|
+
self.archive = archive
|
|
343
|
+
self.logger = logger if logger is not None else logging.getLogger(__name__)
|
|
344
|
+
|
|
345
|
+
with open(self.filepath) as f:
|
|
346
|
+
try:
|
|
347
|
+
# we simply load everything at once as the metainfo framework does not
|
|
348
|
+
# support streaming
|
|
349
|
+
yaml_dicts = yaml.load_all(f, Loader=CLoader)
|
|
350
|
+
except Exception:
|
|
351
|
+
try:
|
|
352
|
+
yaml_dicts = yaml.safe_load_all(f)
|
|
353
|
+
except Exception:
|
|
354
|
+
self.logger.error('Error loading yaml file.')
|
|
355
|
+
return
|
|
356
|
+
|
|
357
|
+
for yaml_dict in yaml_dicts:
|
|
358
|
+
self.yaml_dict = yaml_dict
|
|
359
|
+
|
|
360
|
+
sec_run = Run()
|
|
361
|
+
self.archive.run.append(sec_run)
|
|
362
|
+
sec_run.program = Program(
|
|
363
|
+
name='BigDFT', version=str(self.yaml_dict.pop('Version Number', ''))
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
self.parse_method()
|
|
367
|
+
self.parse_system()
|
|
368
|
+
self.parse_scc()
|
|
369
|
+
|
|
370
|
+
sec_scc = sec_run.calculation[-1]
|
|
371
|
+
sec_scc.system_ref = sec_run.system[-1]
|
|
372
|
+
sec_scc.method_ref = sec_run.method[-1]
|
|
@@ -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 CastepParser
|
|
@@ -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.castep import CastepParser
|
|
26
|
+
|
|
27
|
+
if __name__ == '__main__':
|
|
28
|
+
configure_logging(console_log_level=logging.DEBUG)
|
|
29
|
+
archive = EntryArchive()
|
|
30
|
+
CastepParser().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 castep
|