Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
affb8137
Commit
affb8137
authored
Feb 09, 2021
by
Lauri Himanen
Browse files
Fixed issue in normalizer order and workflow access.
parent
eb51f1cb
Pipeline
#93086
passed with stages
in 57 minutes and 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nomad/normalizing/__init__.py
View file @
affb8137
...
...
@@ -54,6 +54,6 @@ normalizers: Iterable[Type[Normalizer]] = [
# FhiAimsBaseNormalizer,
DosNormalizer
,
BandStructureNormalizer
,
EncyclopediaNormalizer
,
WorkflowNormalizer
,
EncyclopediaNormalizer
,
]
nomad/normalizing/encyclopedia/encyclopedia.py
View file @
affb8137
...
...
@@ -50,7 +50,7 @@ class EncyclopediaNormalizer(Normalizer):
# Primarily try to determine the calculation type from workflow
# information
try
:
workflow
=
self
.
section_run
.
section_workflow
workflow
=
self
.
entry_archive
.
section_workflow
workflow_map
=
{
"molecular_dynamics"
:
calc_enums
.
molecular_dynamics
,
"geometry_optimization"
:
calc_enums
.
geometry_optimization
,
...
...
@@ -58,8 +58,8 @@ class EncyclopediaNormalizer(Normalizer):
}
workflow_enum
=
workflow_map
.
get
(
workflow
.
workflow_type
)
if
workflow_enum
is
not
None
:
calc
.
calculation_type
=
calc_type
return
calc_type
calc
.
calculation_type
=
workflow_enum
return
workflow_enum
except
Exception
:
pass
...
...
nomad/normalizing/normalizer.py
View file @
affb8137
...
...
@@ -95,7 +95,7 @@ class SystemBasedNormalizer(Normalizer, metaclass=ABCMeta):
# Try to find workflow information and select the representative system
# based on it
workflow
=
self
.
section_run
.
section_workflow
workflow
=
self
.
entry_archive
.
section_workflow
if
workflow
:
try
:
iscc
=
workflow
.
calculation_result_ref
...
...
Write
Preview
Supports
Markdown
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