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,19 @@
|
|
|
1
|
+
code_category: Atomistic code
|
|
2
|
+
code_homepage: https://www.onetep.org/
|
|
3
|
+
code_name: ONETEP
|
|
4
|
+
metadata:
|
|
5
|
+
codeCategory: Atomistic code
|
|
6
|
+
codeLabel: ONETEP
|
|
7
|
+
codeLabelStyle: All in capitals
|
|
8
|
+
codeName: onetep
|
|
9
|
+
codeUrl: https://www.onetep.org/
|
|
10
|
+
parserDirName: dependencies/electronic/electronicparsers/onetep/
|
|
11
|
+
parserGitUrl: https://github.com/nomad-coe/electronic-parsers.git
|
|
12
|
+
parserSpecific: ''
|
|
13
|
+
preamble: ''
|
|
14
|
+
status: production
|
|
15
|
+
tableOfFiles: ''
|
|
16
|
+
name: parsers/onetep
|
|
17
|
+
parser_class_name: electronicparsers.onetep.parser.OnetepParser
|
|
18
|
+
python_package: electronicparsers.onetep
|
|
19
|
+
plugin_source_code_url: https://github.com/nomad-coe/electronic-parsers/tree/develop/electronicparsers/onetep
|
|
@@ -0,0 +1,577 @@
|
|
|
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 os
|
|
20
|
+
import logging
|
|
21
|
+
import numpy as np
|
|
22
|
+
from datetime import datetime
|
|
23
|
+
|
|
24
|
+
from nomad.units import ureg
|
|
25
|
+
from nomad.parsing.file_parser import TextParser, Quantity
|
|
26
|
+
from runschema.run import Run, Program, TimeRun
|
|
27
|
+
from runschema.method import (
|
|
28
|
+
Method,
|
|
29
|
+
DFT,
|
|
30
|
+
XCFunctional,
|
|
31
|
+
Functional,
|
|
32
|
+
BasisSet,
|
|
33
|
+
BasisSetContainer,
|
|
34
|
+
)
|
|
35
|
+
from runschema.system import System, Atoms
|
|
36
|
+
from runschema.calculation import (
|
|
37
|
+
Calculation,
|
|
38
|
+
Energy,
|
|
39
|
+
EnergyEntry,
|
|
40
|
+
Forces,
|
|
41
|
+
ForcesEntry,
|
|
42
|
+
ScfIteration,
|
|
43
|
+
Charges,
|
|
44
|
+
)
|
|
45
|
+
from .metainfo.onetep import x_onetep_section_tddft, x_onetep_section_tddft_excitations
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
re_n = r'[\n\r]'
|
|
49
|
+
re_f = r'[-+]?\d+\.\d*(?:[DdEe][-+]\d+)?'
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class InputParser(TextParser):
|
|
53
|
+
def __init__(self):
|
|
54
|
+
super().__init__()
|
|
55
|
+
|
|
56
|
+
def init_quantities(self):
|
|
57
|
+
def to_block(val_in):
|
|
58
|
+
val = val_in.strip().replace('"', '').splitlines()
|
|
59
|
+
key = val[0].strip()
|
|
60
|
+
return [key.lower(), [v.split() for v in val[1:]]]
|
|
61
|
+
|
|
62
|
+
self._quantities = [
|
|
63
|
+
Quantity('parameter', r'([a-z_]+) +: +(\S+)', repeats=True),
|
|
64
|
+
Quantity(
|
|
65
|
+
'block',
|
|
66
|
+
r'\%block +([a-z_]+\s+[\s\S]+?)\s+\%endblock',
|
|
67
|
+
repeats=True,
|
|
68
|
+
str_operation=to_block,
|
|
69
|
+
),
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def cell(self):
|
|
74
|
+
self._results = dict() if self._results is None else self._results
|
|
75
|
+
if self._results.get('cell') is None:
|
|
76
|
+
|
|
77
|
+
def resolve_unit(value):
|
|
78
|
+
if isinstance(value[0][0], str):
|
|
79
|
+
if value[0][0].lower().startswith('ang'):
|
|
80
|
+
return ureg.angstrom
|
|
81
|
+
if value[0][0].lower().startswith('bohr'):
|
|
82
|
+
return ureg.bohr
|
|
83
|
+
|
|
84
|
+
cell = dict()
|
|
85
|
+
for block in self.get('block', []):
|
|
86
|
+
if block[0].lower() == 'lattice_cart':
|
|
87
|
+
unit = resolve_unit(block[1])
|
|
88
|
+
cell['lattice_vectors'] = (
|
|
89
|
+
block[1] * ureg.bohr if unit is None else block[1][1:] * unit
|
|
90
|
+
)
|
|
91
|
+
elif block[0].lower() == 'positions_abs':
|
|
92
|
+
unit = resolve_unit(block[1])
|
|
93
|
+
value = block[1] if unit is None else block[1][1:]
|
|
94
|
+
unit = ureg.bohr if unit is None else unit
|
|
95
|
+
cell['labels'] = [v[0] for v in value]
|
|
96
|
+
cell['positions'] = (
|
|
97
|
+
np.array([v[1:4] for v in value], dtype=np.dtype(np.float64))
|
|
98
|
+
* unit
|
|
99
|
+
)
|
|
100
|
+
self._results['cell'] = cell
|
|
101
|
+
return self._results['cell']
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class OutParser(TextParser):
|
|
105
|
+
def init_quantities(self):
|
|
106
|
+
calculation_quantities = [
|
|
107
|
+
Quantity(
|
|
108
|
+
'iteration',
|
|
109
|
+
rf'\>\>\> Optimising kernel([\s\S]+?'
|
|
110
|
+
rf'(?:Predicted gain in energy|\-\> RMS NGWF gradient|maximum number of NGWF).+)',
|
|
111
|
+
repeats=True,
|
|
112
|
+
sub_parser=TextParser(
|
|
113
|
+
quantities=[
|
|
114
|
+
Quantity(
|
|
115
|
+
'energy_total',
|
|
116
|
+
rf'Total energy += +({re_f}) +Eh',
|
|
117
|
+
dtype=np.float64,
|
|
118
|
+
unit=ureg.hartree,
|
|
119
|
+
),
|
|
120
|
+
Quantity(
|
|
121
|
+
'band_gap',
|
|
122
|
+
rf'Estimated bandgap += +({re_f}) +Eh',
|
|
123
|
+
dtype=np.float64,
|
|
124
|
+
unit=ureg.hartree,
|
|
125
|
+
),
|
|
126
|
+
Quantity(
|
|
127
|
+
'x_onetep_rms_occupancy_error',
|
|
128
|
+
rf'RMS occupancy error += +({re_f})',
|
|
129
|
+
dtype=np.float64,
|
|
130
|
+
),
|
|
131
|
+
Quantity(
|
|
132
|
+
'x_onetep_commutator',
|
|
133
|
+
rf'\[H,K\] commutator += +({re_f})',
|
|
134
|
+
dtype=np.float64,
|
|
135
|
+
),
|
|
136
|
+
Quantity(
|
|
137
|
+
'rms_gradient',
|
|
138
|
+
rf'RMS gradient += +({re_f})',
|
|
139
|
+
dtype=np.float64,
|
|
140
|
+
),
|
|
141
|
+
]
|
|
142
|
+
),
|
|
143
|
+
),
|
|
144
|
+
Quantity(
|
|
145
|
+
'energy_components',
|
|
146
|
+
r'ENERGY COMPONENTS \(Eh\)([\s\S]+?\={10})',
|
|
147
|
+
sub_parser=TextParser(
|
|
148
|
+
quantities=[
|
|
149
|
+
Quantity(
|
|
150
|
+
'contribution',
|
|
151
|
+
rf'\| (.+): +({re_f})',
|
|
152
|
+
str_operation=lambda x: [
|
|
153
|
+
v.strip() for v in x.rsplit(' ', 1)
|
|
154
|
+
],
|
|
155
|
+
repeats=True,
|
|
156
|
+
),
|
|
157
|
+
Quantity(
|
|
158
|
+
'integrated_density',
|
|
159
|
+
rf'Integrated density +: +({re_f})',
|
|
160
|
+
dtype=np.float64,
|
|
161
|
+
),
|
|
162
|
+
]
|
|
163
|
+
),
|
|
164
|
+
),
|
|
165
|
+
Quantity(
|
|
166
|
+
'forces',
|
|
167
|
+
r'Forces \*+([\s\S]+?TOTAL)',
|
|
168
|
+
sub_parser=TextParser(
|
|
169
|
+
quantities=[
|
|
170
|
+
Quantity(
|
|
171
|
+
'value',
|
|
172
|
+
rf'[A-Z][a-z]* +\d+ +({re_f} +{re_f} +{re_f})',
|
|
173
|
+
dtype=np.dtype(np.float64),
|
|
174
|
+
)
|
|
175
|
+
]
|
|
176
|
+
),
|
|
177
|
+
),
|
|
178
|
+
Quantity(
|
|
179
|
+
'convergence_tolerance_energy_difference',
|
|
180
|
+
rf'dE\/ion +\| +({re_f}) +\| +({re_f}) +\| +Ha',
|
|
181
|
+
dtype=np.dtype(np.float64),
|
|
182
|
+
unit=ureg.hartree,
|
|
183
|
+
),
|
|
184
|
+
Quantity(
|
|
185
|
+
'convergence_tolerance_force_maximum',
|
|
186
|
+
rf'\|F\|max +\| +({re_f}) +\| +({re_f}) +\| +Ha\/Bohr',
|
|
187
|
+
dtype=np.dtype(np.float64),
|
|
188
|
+
unit=ureg.hartree / ureg.bohr,
|
|
189
|
+
),
|
|
190
|
+
Quantity(
|
|
191
|
+
'convergence_tolerance_displacement_maximum',
|
|
192
|
+
rf'\|dR\|max +\| +({re_f}) +\| +({re_f}) +\| +Bohr',
|
|
193
|
+
dtype=np.dtype(np.float64),
|
|
194
|
+
unit=ureg.bohr,
|
|
195
|
+
),
|
|
196
|
+
Quantity(
|
|
197
|
+
'cell',
|
|
198
|
+
r'Element +Atom +Absolute co\-ordinates of atoms([\s\S]+?)x{10}',
|
|
199
|
+
sub_parser=TextParser(
|
|
200
|
+
quantities=[
|
|
201
|
+
Quantity(
|
|
202
|
+
'positions',
|
|
203
|
+
rf'({re_f} +{re_f} +{re_f})',
|
|
204
|
+
dtype=np.dtype(np.float64),
|
|
205
|
+
repeats=True,
|
|
206
|
+
),
|
|
207
|
+
Quantity(
|
|
208
|
+
'labels', r'([A-Z][a-z]*) +\d+', dtype=str, repeats=True
|
|
209
|
+
),
|
|
210
|
+
]
|
|
211
|
+
),
|
|
212
|
+
),
|
|
213
|
+
Quantity(
|
|
214
|
+
'mulliken',
|
|
215
|
+
r'Mulliken Atomic Populations\s+\-+\s+'
|
|
216
|
+
r'Species +Ion +Total +Charge \(e\)\s+\=+\s+([\s\S]+?)\={10}',
|
|
217
|
+
str_operation=lambda x: [
|
|
218
|
+
v.strip().split() for v in x.strip().splitlines()
|
|
219
|
+
],
|
|
220
|
+
),
|
|
221
|
+
]
|
|
222
|
+
|
|
223
|
+
self._quantities = [
|
|
224
|
+
Quantity('program_version', r'Version (\S+)', dtype=str),
|
|
225
|
+
Quantity(
|
|
226
|
+
'program_name', r'(\S+) is based on developments described', dtype=str
|
|
227
|
+
),
|
|
228
|
+
Quantity(
|
|
229
|
+
'x_onetep_number_of_processors',
|
|
230
|
+
r'Default threads: (\d+)',
|
|
231
|
+
dtype=np.dtype(np.int32),
|
|
232
|
+
),
|
|
233
|
+
Quantity(
|
|
234
|
+
'input_file', r'Reading parameters from file \"(.+?)\"', dtype=str
|
|
235
|
+
),
|
|
236
|
+
Quantity(
|
|
237
|
+
'input',
|
|
238
|
+
r'INPUT FILE \-+([\s\S]+?)\-+ END INPUT FILE',
|
|
239
|
+
sub_parser=TextParser(
|
|
240
|
+
quantities=[
|
|
241
|
+
Quantity('parameter', r'([a-z\_]+) +: +(\S+)', repeats=True),
|
|
242
|
+
]
|
|
243
|
+
),
|
|
244
|
+
),
|
|
245
|
+
Quantity(
|
|
246
|
+
'date_start',
|
|
247
|
+
r'Job started: (\d\d\-\d\d\-\d\d\d\d \d\d:\d\d \(\+\d\d\d\d\))',
|
|
248
|
+
flatten=False,
|
|
249
|
+
dtype=str,
|
|
250
|
+
),
|
|
251
|
+
Quantity(
|
|
252
|
+
'date_end',
|
|
253
|
+
r'Job completed: (\d\d\-\d\d\-\d\d\d\d \d\d:\d\d \(\+\d\d\d\d\))',
|
|
254
|
+
flatten=False,
|
|
255
|
+
dtype=str,
|
|
256
|
+
),
|
|
257
|
+
Quantity(
|
|
258
|
+
'psinc',
|
|
259
|
+
r'PSINC grid sizes([\s\S]+)=+',
|
|
260
|
+
sub_parser=TextParser(
|
|
261
|
+
quantities=[
|
|
262
|
+
Quantity(
|
|
263
|
+
'cutoff',
|
|
264
|
+
rf'KE cutoff=\s+({re_f})Eh',
|
|
265
|
+
dtype=np.float64,
|
|
266
|
+
unit=ureg.hartree,
|
|
267
|
+
),
|
|
268
|
+
]
|
|
269
|
+
),
|
|
270
|
+
),
|
|
271
|
+
Quantity(
|
|
272
|
+
'geometry_optimization',
|
|
273
|
+
r'Starting ONETEP Geometry Optimisation([\s\S]+?)(?:\- TIMING|\Z)',
|
|
274
|
+
sub_parser=TextParser(
|
|
275
|
+
quantities=[
|
|
276
|
+
Quantity(
|
|
277
|
+
'single_point',
|
|
278
|
+
r'\>\>\> Optimising kernel for current NGWFs:([\s\S]+?\|dR\|max.+)',
|
|
279
|
+
sub_parser=TextParser(quantities=calculation_quantities),
|
|
280
|
+
),
|
|
281
|
+
Quantity(
|
|
282
|
+
'iteration',
|
|
283
|
+
r'(Starting BFGS iteration +\d+[\s\S]+?\|dR\|max.+)',
|
|
284
|
+
repeats=True,
|
|
285
|
+
sub_parser=TextParser(
|
|
286
|
+
quantities=calculation_quantities
|
|
287
|
+
+ [
|
|
288
|
+
Quantity(
|
|
289
|
+
'improve',
|
|
290
|
+
r'BFGS: improving iteration([\s\S]+?\|dR\|max.+)',
|
|
291
|
+
sub_parser=TextParser(
|
|
292
|
+
quantities=calculation_quantities
|
|
293
|
+
),
|
|
294
|
+
)
|
|
295
|
+
]
|
|
296
|
+
),
|
|
297
|
+
),
|
|
298
|
+
Quantity(
|
|
299
|
+
'converged',
|
|
300
|
+
r'Geometry +optimization +(\S+)',
|
|
301
|
+
str_operation=lambda x: x == 'completed',
|
|
302
|
+
),
|
|
303
|
+
Quantity(
|
|
304
|
+
'final_configuration',
|
|
305
|
+
r'(Final Configuration:[\s\S]+?Final Enthalpy.+)',
|
|
306
|
+
sub_parser=TextParser(quantities=[]),
|
|
307
|
+
),
|
|
308
|
+
]
|
|
309
|
+
),
|
|
310
|
+
),
|
|
311
|
+
Quantity(
|
|
312
|
+
'single_point',
|
|
313
|
+
r'(\>\>\> Optimising kernel for current NGWFs:[\s\S]+?)(?:\- TIMING|\Z)',
|
|
314
|
+
sub_parser=TextParser(quantities=calculation_quantities),
|
|
315
|
+
),
|
|
316
|
+
Quantity(
|
|
317
|
+
'tddft',
|
|
318
|
+
r'(LR\-TDDFT CG optimisation[\s\S]+?)(?:\- TIMING|\Z)',
|
|
319
|
+
sub_parser=TextParser(
|
|
320
|
+
quantities=[
|
|
321
|
+
Quantity(
|
|
322
|
+
'iteration',
|
|
323
|
+
r'(LR_TDDFT CG iteration +\d+ +\#+[\s\S]+?(?:\#{75}|TDDFT_grad))',
|
|
324
|
+
repeats=True,
|
|
325
|
+
sub_parser=TextParser(
|
|
326
|
+
quantities=[
|
|
327
|
+
Quantity(
|
|
328
|
+
'energy_total',
|
|
329
|
+
rf'LR\-TDDFT energy += +({re_f})',
|
|
330
|
+
dtype=np.float64,
|
|
331
|
+
unit=ureg.hartree,
|
|
332
|
+
),
|
|
333
|
+
Quantity(
|
|
334
|
+
'x_onetep_tddft_omega_change',
|
|
335
|
+
rf'Change in omega += +({re_f})',
|
|
336
|
+
dtype=np.float64,
|
|
337
|
+
),
|
|
338
|
+
Quantity(
|
|
339
|
+
'rms_gradient',
|
|
340
|
+
rf'RMS gradient += +({re_f})',
|
|
341
|
+
dtype=np.float64,
|
|
342
|
+
),
|
|
343
|
+
Quantity(
|
|
344
|
+
'x_onetep_tddft_number_conv_states',
|
|
345
|
+
r'Number of newly converged states: +(\d+)',
|
|
346
|
+
dtype=np.int32,
|
|
347
|
+
),
|
|
348
|
+
]
|
|
349
|
+
),
|
|
350
|
+
),
|
|
351
|
+
Quantity(
|
|
352
|
+
'excitation',
|
|
353
|
+
r'\|Excitation\| +Energy \(in Ha\).+([\s\d\.\-\+E]+)',
|
|
354
|
+
str_operation=lambda x: np.array(
|
|
355
|
+
[v.strip().split() for v in x.strip().splitlines()],
|
|
356
|
+
dtype=np.dtype(np.float64),
|
|
357
|
+
),
|
|
358
|
+
),
|
|
359
|
+
]
|
|
360
|
+
),
|
|
361
|
+
),
|
|
362
|
+
]
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
class OnetepParser:
|
|
366
|
+
def __init__(self):
|
|
367
|
+
self.out_parser = OutParser()
|
|
368
|
+
self.input_parser = InputParser()
|
|
369
|
+
self._xc_map = {
|
|
370
|
+
'PBE': ['GGA_C_PBE', 'GGA_X_PBE'],
|
|
371
|
+
'LDA': ['LDA_C_PZ', 'LDA_X_PZ'],
|
|
372
|
+
'PW91': ['GGA_C_PW91', 'GGA_X_PW91'],
|
|
373
|
+
'PW92': ['GGA_C_PW92', 'GGA_X_PW92'],
|
|
374
|
+
'GGA': ['GGA_X_PBE'],
|
|
375
|
+
'CAPZ': ['LDA_C_PZ'],
|
|
376
|
+
'VWN': ['LDA_C_VWN'],
|
|
377
|
+
'PBESOL': ['GGA_X_PBE_SOL'],
|
|
378
|
+
'RPBE': ['GGA_X_RPBE'],
|
|
379
|
+
'REVPBE': ['GGA_X_PBE_R'],
|
|
380
|
+
'BLYP': ['GGA_X_B88', 'GGA_C_LYP'],
|
|
381
|
+
'XLYP': ['GGA_XC_XLYP'],
|
|
382
|
+
'OPTB88': ['GGA_X_OPTB88_VDW', 'LDA_C_PZ'],
|
|
383
|
+
'OPTPBE': ['GGA_X_OPTPBE_VDW', 'LDA_C_PZ'],
|
|
384
|
+
'VDWDF': ['GGA_X_PBE_R_VDW', 'LDA_C_PZ'],
|
|
385
|
+
'VDWDF2': ['GGA_X_RPW86', 'LDA_C_PZ'],
|
|
386
|
+
'VV10': ['HYB_GGA_XC_LC_VV10'],
|
|
387
|
+
'AVV10S': ['GGA_X_AM05', 'GGA_C_AM05_rVV10-sol'],
|
|
388
|
+
}
|
|
389
|
+
self._metainfo_map = {
|
|
390
|
+
'Kinetic': 'kinetic_electronic',
|
|
391
|
+
'Hartree': 'correction_hartree',
|
|
392
|
+
'Pseudopotential (local)': 'x_onetep_pseudopotential_local',
|
|
393
|
+
'Pseudopotential (non-local)': 'x_onetep_pseudopotential_non_local',
|
|
394
|
+
'Exchange-correlation': 'xc',
|
|
395
|
+
'Ewald': 'ewald',
|
|
396
|
+
'Total': 'total',
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
def init_parser(self):
|
|
400
|
+
self.out_parser.mainfile = self.filepath
|
|
401
|
+
self.out_parser.logger = self.logger
|
|
402
|
+
self.input_parser.logger = self.logger
|
|
403
|
+
|
|
404
|
+
def parse_configuration(self, source: TextParser):
|
|
405
|
+
"""Generate a system section from `source`.
|
|
406
|
+
Input:
|
|
407
|
+
- `source`: information block corresponding to a single point calculation"""
|
|
408
|
+
|
|
409
|
+
def parse_system(source):
|
|
410
|
+
cell = source.get('cell', self.input_parser.cell)
|
|
411
|
+
if cell is None:
|
|
412
|
+
return
|
|
413
|
+
|
|
414
|
+
sec_system = System()
|
|
415
|
+
self.archive.run[-1].system.append(sec_system)
|
|
416
|
+
positions = cell.get('positions')
|
|
417
|
+
positions = (
|
|
418
|
+
positions * ureg.bohr if isinstance(positions, list) else positions
|
|
419
|
+
)
|
|
420
|
+
sec_system.atoms = Atoms(positions=positions, labels=cell.get('labels'))
|
|
421
|
+
sec_system.atoms.lattice_vectors = cell.get(
|
|
422
|
+
'lattice_vectors', self.input_parser.cell.get('lattice_vectors')
|
|
423
|
+
)
|
|
424
|
+
return sec_system
|
|
425
|
+
|
|
426
|
+
def parse_scc(source):
|
|
427
|
+
sec_scc = Calculation()
|
|
428
|
+
self.archive.run[-1].calculation.append(sec_scc)
|
|
429
|
+
|
|
430
|
+
# scf iteration
|
|
431
|
+
for iteration in source.get('iteration', []):
|
|
432
|
+
sec_scf = ScfIteration()
|
|
433
|
+
sec_scc.scf_iteration.append(sec_scf)
|
|
434
|
+
sec_scf.energy = Energy(total=EnergyEntry(value=iteration.energy_total))
|
|
435
|
+
|
|
436
|
+
energies = source.get('energy_components')
|
|
437
|
+
if energies is not None:
|
|
438
|
+
sec_energy = Energy()
|
|
439
|
+
sec_scc.energy = sec_energy
|
|
440
|
+
for contribution in energies.get('contribution', []):
|
|
441
|
+
key = self._metainfo_map.get(contribution[0])
|
|
442
|
+
if key is not None:
|
|
443
|
+
setattr(
|
|
444
|
+
sec_energy,
|
|
445
|
+
key,
|
|
446
|
+
EnergyEntry(value=contribution[1] * ureg.hartree),
|
|
447
|
+
)
|
|
448
|
+
elif len(sec_scc.scf_iteration) > 0:
|
|
449
|
+
sec_scc.energy = Energy(
|
|
450
|
+
total=EnergyEntry(
|
|
451
|
+
value=sec_scc.scf_iteration[-1].energy.total.value
|
|
452
|
+
)
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
if source.get('forces') is not None:
|
|
456
|
+
value = source.forces.value
|
|
457
|
+
sec_scc.forces = Forces(
|
|
458
|
+
total=ForcesEntry(
|
|
459
|
+
value=np.reshape(value, (np.size(value) // 3, 3))
|
|
460
|
+
* (ureg.hartree / ureg.bohr)
|
|
461
|
+
)
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
if source.get('mulliken') is not None:
|
|
465
|
+
sec_charges = Charges()
|
|
466
|
+
sec_scc.charges.append(sec_charges)
|
|
467
|
+
sec_charges.analysis_method = 'Mulliken'
|
|
468
|
+
sec_charges.value = [
|
|
469
|
+
v[3] for v in source.get('mulliken', [])
|
|
470
|
+
] * ureg.elementary_charge
|
|
471
|
+
|
|
472
|
+
return sec_scc
|
|
473
|
+
|
|
474
|
+
sec_system = parse_system(source)
|
|
475
|
+
sec_scc = parse_scc(source)
|
|
476
|
+
sec_scc.system_ref = sec_system
|
|
477
|
+
|
|
478
|
+
def parse(self, filepath, archive, logger):
|
|
479
|
+
self.filepath = os.path.abspath(filepath)
|
|
480
|
+
self.archive = archive
|
|
481
|
+
self.logger = logging.getLogger(__name__) if logger is None else logger
|
|
482
|
+
self.maindir = os.path.dirname(self.filepath)
|
|
483
|
+
self.init_parser()
|
|
484
|
+
|
|
485
|
+
sec_run = Run()
|
|
486
|
+
self.archive.run.append(sec_run)
|
|
487
|
+
sec_run.program = Program(
|
|
488
|
+
name=self.out_parser.get('program_name'),
|
|
489
|
+
version=self.out_parser.get('program_version'),
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
def get_timestamp(date):
|
|
493
|
+
if date is None:
|
|
494
|
+
return
|
|
495
|
+
return datetime.strptime(date, '%d-%m-%Y %H:%M (%z)').timestamp()
|
|
496
|
+
|
|
497
|
+
sec_run.time_run = TimeRun(
|
|
498
|
+
date_start=get_timestamp(self.out_parser.date_start),
|
|
499
|
+
date_end=get_timestamp(self.out_parser.date_end),
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
self.input_parser.mainfile = os.path.join(
|
|
503
|
+
self.maindir, self.out_parser.get('input_file', '')
|
|
504
|
+
)
|
|
505
|
+
|
|
506
|
+
input_parameters = {
|
|
507
|
+
key: val
|
|
508
|
+
for key, val in self.out_parser.get('input', {}).get('parameter', [])
|
|
509
|
+
}
|
|
510
|
+
sec_method = Method()
|
|
511
|
+
sec_run.method.append(sec_method)
|
|
512
|
+
sec_method.x_onetep_input_parameters = input_parameters
|
|
513
|
+
if input_parameters.get('xc_functional') is not None:
|
|
514
|
+
sec_method.dft = DFT(xc_functional=XCFunctional())
|
|
515
|
+
for xc_functional in self._xc_map.get(
|
|
516
|
+
input_parameters.get('xc_functional'), []
|
|
517
|
+
):
|
|
518
|
+
if '_X_' in xc_functional or xc_functional.endswith('_X'):
|
|
519
|
+
sec_method.dft.xc_functional.exchange.append(
|
|
520
|
+
Functional(name=xc_functional)
|
|
521
|
+
)
|
|
522
|
+
elif '_C_' in xc_functional or xc_functional.endswith('_C'):
|
|
523
|
+
sec_method.dft.xc_functional.correlation.append(
|
|
524
|
+
Functional(name=xc_functional)
|
|
525
|
+
)
|
|
526
|
+
elif 'HYB' in xc_functional:
|
|
527
|
+
sec_method.dft.xc_functional.hybrid.append(
|
|
528
|
+
Functional(name=xc_functional)
|
|
529
|
+
)
|
|
530
|
+
else:
|
|
531
|
+
sec_method.dft.xc_functional.contributions.append(
|
|
532
|
+
Functional(name=xc_functional)
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
# Basis set
|
|
536
|
+
if cutoff := self.out_parser.get('psinc', {}).get('cutoff'):
|
|
537
|
+
sec_em = BasisSetContainer(
|
|
538
|
+
type='support functions',
|
|
539
|
+
scope=['wavefunction'],
|
|
540
|
+
basis_set=[
|
|
541
|
+
BasisSet(
|
|
542
|
+
type='psinc functions',
|
|
543
|
+
scope=['valence'],
|
|
544
|
+
cutoff=cutoff,
|
|
545
|
+
),
|
|
546
|
+
],
|
|
547
|
+
)
|
|
548
|
+
sec_method.electrons_representation = [sec_em]
|
|
549
|
+
|
|
550
|
+
if self.out_parser.geometry_optimization is not None:
|
|
551
|
+
if self.out_parser.geometry_optimization.single_point is not None:
|
|
552
|
+
self.parse_configuration(
|
|
553
|
+
self.out_parser.geometry_optimization.single_point
|
|
554
|
+
)
|
|
555
|
+
for iteration in self.out_parser.geometry_optimization.get('iteration', []):
|
|
556
|
+
self.parse_configuration(
|
|
557
|
+
iteration if iteration.improve is None else iteration.improve
|
|
558
|
+
)
|
|
559
|
+
|
|
560
|
+
elif self.out_parser.single_point is not None:
|
|
561
|
+
self.parse_configuration(self.out_parser.single_point)
|
|
562
|
+
|
|
563
|
+
elif self.out_parser.tddft is not None:
|
|
564
|
+
self.parse_configuration(self.out_parser.tddft)
|
|
565
|
+
if self.out_parser.tddft is not None:
|
|
566
|
+
sec_tddft = x_onetep_section_tddft()
|
|
567
|
+
sec_run.calculation[-1].x_onetep_section_tddft.append(sec_tddft)
|
|
568
|
+
for excitation in self.out_parser.tddft.get('excitation', []):
|
|
569
|
+
sec_excitation = x_onetep_section_tddft_excitations()
|
|
570
|
+
sec_tddft.x_onetep_section_tddft_excitations.append(sec_excitation)
|
|
571
|
+
sec_excitation.x_onetep_tddft_excit_energy = (
|
|
572
|
+
excitation[1] * ureg.hartree
|
|
573
|
+
)
|
|
574
|
+
sec_excitation.x_onetep_tddft_excit_oscill_str = excitation[2]
|
|
575
|
+
sec_excitation.x_onetep_tddft_excit_lifetime = (
|
|
576
|
+
excitation[3] * ureg.ns
|
|
577
|
+
)
|
|
@@ -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 OpenmxParser
|
|
@@ -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.openmx import OpenmxParser
|
|
26
|
+
|
|
27
|
+
if __name__ == '__main__':
|
|
28
|
+
configure_logging(console_log_level=logging.DEBUG)
|
|
29
|
+
archive = EntryArchive()
|
|
30
|
+
OpenmxParser().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 openmx
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright The NOMAD Authors.
|
|
3
|
+
#
|
|
4
|
+
# This file is part of NOMAD. See https://nomad-lab.eu for further info.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
# you may not use this file except in compliance with the License.
|
|
8
|
+
# You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
from nomad.metainfo import Section, Quantity, Package
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
m_package = Package(name='openmx_nomadmetainfo_json', description='None')
|
|
23
|
+
|
|
24
|
+
m_package.__init_metainfo__()
|