Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
parser-gaussian
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nomad-lab
parser-gaussian
Commits
2997aa12
Commit
2997aa12
authored
Jan 26, 2019
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meta 2.0 changes
parent
d18f1276
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
parser/parser-gaussian/parser_gaussian.py
parser/parser-gaussian/parser_gaussian.py
+15
-12
src/main/scala/eu/nomad_lab/parsers/GaussianParser.scala
src/main/scala/eu/nomad_lab/parsers/GaussianParser.scala
+1
-1
No files found.
parser/parser-gaussian/parser_gaussian.py
View file @
2997aa12
...
...
@@ -133,7 +133,7 @@ mainFileDescription = SM(
SM
(
r"\s*NFock=\s*[0-9]+\s*Conv=(?P<x_gaussian_energy_error__hartree>[-+0-9EeDd.]+)\s*"
),
SM
(
r"\s*KE=\s*(?P<x_gaussian_electronic_kinetic_energy__hartree>[-+0-9EeDd.]+)\s*"
),
SM
(
r"\s*Annihilation of the first spin contaminant"
),
SM
(
r"\s*[A-Z][*][*][0-9]\s*before annihilation\s*(?P<spin_
S2>[0-9.]+),\s*after\s*(?P<x_gaussian_after_annihilation_spin_S
2>[0-9.]+)"
),
SM
(
r"\s*[A-Z][*][*][0-9]\s*before annihilation\s*(?P<spin_
s2>[0-9.]+),\s*after\s*(?P<x_gaussian_after_annihilation_spin_s
2>[0-9.]+)"
),
SM
(
r"\s*[()A-Z0-9]+\s*=\s*[-+0-9D.]+\s*[()A-Z0-9]+\s*=\s*(?P<x_gaussian_perturbation_energy__hartree>[-+0-9D.]+)"
),
]
),
...
...
@@ -343,7 +343,7 @@ mainFileDescription = SM(
subMatchers
=
[
SM
(
r"\s*Temperature\s*(?P<x_gaussian_temperature>[0-9.]+)\s*Kelvin.\s*Pressure\s*(?P<x_gaussian_pressure__atmosphere>[0-9.]+)\s*Atm."
),
SM
(
r"\s*Principal axes and moments of inertia in atomic units:"
),
SM
(
r"\s*Eigenvalues --\s*(?P<x_gaussian_moment_of_inertia_
X__amu_angstrom_angstrom>(\d+\.\d{5}))\s*?(?P<x_gaussian_moment_of_inertia_Y__amu_angstrom_angstrom>(\d+\.\d{5}))\s*?(?P<x_gaussian_moment_of_inertia_Z
__amu_angstrom_angstrom>(\d+\.\d{5}))"
),
SM
(
r"\s*Eigenvalues --\s*(?P<x_gaussian_moment_of_inertia_
x__amu_angstrom_angstrom>(\d+\.\d{5}))\s*?(?P<x_gaussian_moment_of_inertia_y__amu_angstrom_angstrom>(\d+\.\d{5}))\s*?(?P<x_gaussian_moment_of_inertia_z
__amu_angstrom_angstrom>(\d+\.\d{5}))"
),
SM
(
r"\s*Zero-point correction=\s*(?P<x_gaussian_zero_point_energy__hartree>[0-9.]+)"
),
SM
(
r"\s*Thermal correction to Energy=\s*(?P<x_gaussian_thermal_correction_energy__hartree>[0-9.]+)"
),
SM
(
r"\s*Thermal correction to Enthalpy=\s*(?P<x_gaussian_thermal_correction_enthalpy__hartree>[0-9.]+)"
),
...
...
@@ -474,8 +474,8 @@ class GaussianParserContext(object):
backend
.
addValue
(
"sampling_method"
,
sampling_method
)
backend
.
closeSection
(
"section_sampling_method"
,
samplingGIndex
)
frameSequenceGIndex
=
backend
.
openSection
(
"section_frame_sequence"
)
backend
.
addValue
(
"frame_sequence_to_sampling_ref"
,
samplingGIndex
)
backend
.
addArrayValues
(
"frame_sequence_
local
_frames_ref"
,
np
.
asarray
(
self
.
singleConfCalcs
))
backend
.
addValue
(
"frame_sequence_to_sampling_
method_
ref"
,
samplingGIndex
)
backend
.
addArrayValues
(
"frame_sequence_
to
_frames_ref"
,
np
.
asarray
(
self
.
singleConfCalcs
))
backend
.
closeSection
(
"section_frame_sequence"
,
frameSequenceGIndex
)
# reset all variables
self
.
initialize_values
()
...
...
@@ -510,7 +510,10 @@ class GaussianParserContext(object):
atom_forces
[
i
,
0
]
=
xForce
[
i
]
atom_forces
[
i
,
1
]
=
yForce
[
i
]
atom_forces
[
i
,
2
]
=
zForce
[
i
]
backend
.
addArrayValues
(
"atom_forces_raw"
,
atom_forces
)
fId
=
backend
.
openSection
(
'section_atom_forces'
)
backend
.
addValue
(
'atom_forces_constraints'
,
'raw'
)
backend
.
addArrayValues
(
"atom_forces"
,
atom_forces
)
backend
.
closeSection
(
'section_atom_forces'
,
fId
)
def
onOpen_section_single_configuration_calculation
(
self
,
backend
,
gIndex
,
section
):
self
.
singleConfCalcs
.
append
(
gIndex
)
...
...
@@ -526,7 +529,7 @@ class GaussianParserContext(object):
# start with -1 since zeroth iteration is the initialization
self
.
scfIterNr
=
-
1
# write the references to section_method and section_system
backend
.
addValue
(
'single_configuration_
to_calculation
_method_ref'
,
self
.
secMethodIndex
)
backend
.
addValue
(
'single_configuration_
calculation_to
_method_ref'
,
self
.
secMethodIndex
)
backend
.
addValue
(
'single_configuration_calculation_to_system_ref'
,
self
.
secSystemDescriptionIndex
)
def
onClose_x_gaussian_section_geometry_optimization_info
(
self
,
backend
,
gIndex
,
section
):
...
...
@@ -1325,11 +1328,11 @@ class GaussianParserContext(object):
for
xcItem
in
xcList
:
xcName
=
xcItem
.
get
(
'name'
)
if
xcName
is
not
None
:
# write section and
XC
_functional_name
gIndexTmp
=
backend
.
openSection
(
'section_
XC
_functionals'
)
backend
.
addValue
(
'
XC
_functional_name'
,
xcName
)
# write hybrid_xc_coeff for PBE1PBE into
XC
_functional_parameters
backend
.
closeSection
(
'section_
XC
_functionals'
,
gIndexTmp
)
# write section and
xc
_functional_name
gIndexTmp
=
backend
.
openSection
(
'section_
xc
_functionals'
)
backend
.
addValue
(
'
xc
_functional_name'
,
xcName
)
# write hybrid_xc_coeff for PBE1PBE into
xc
_functional_parameters
backend
.
closeSection
(
'section_
xc
_functionals'
,
gIndexTmp
)
else
:
logger
.
error
(
"The dictionary for xc functional '%s' does not have the key 'name'. Please correct the dictionary xcDict in %s."
%
(
xc
[
-
1
],
os
.
path
.
basename
(
__file__
)))
else
:
...
...
@@ -1531,7 +1534,7 @@ cachingLevelForMetaName = {
"section_method"
:
CachingLevel
.
Forward
,
"x_gaussian_section_elstruc_method"
:
CachingLevel
.
Forward
,
"x_gaussian_electronic_structure_method"
:
CachingLevel
.
ForwardAndCache
,
"
XC
_functional_name"
:
CachingLevel
.
ForwardAndCache
,
"
xc
_functional_name"
:
CachingLevel
.
ForwardAndCache
,
"basis_set_atom_centered_short_name"
:
CachingLevel
.
Forward
,
"x_gaussian_settings"
:
CachingLevel
.
Cache
,
"x_gaussian_settings_corrected"
:
CachingLevel
.
ForwardAndCache
,
...
...
src/main/scala/eu/nomad_lab/parsers/GaussianParser.scala
View file @
2997aa12
...
...
@@ -47,7 +47,7 @@ object GaussianParser extends SimpleExternalParserGenerator(
"parser-gaussian/setup_paths.py"
,
"nomad_meta_info/public.nomadmetainfo.json"
,
"nomad_meta_info/common.nomadmetainfo.json"
,
"nomad_meta_info/meta
_types
.nomadmetainfo.json"
,
"nomad_meta_info/meta.nomadmetainfo.json"
,
"nomad_meta_info/gaussian.nomadmetainfo.json"
)
++
DefaultPythonInterpreter
.
commonFiles
(),
dirMap
=
Map
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment