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
e2c42ccc
Commit
e2c42ccc
authored
Sep 01, 2020
by
Alvin Noe Ladines
Browse files
Added calculations_ref to Relaxation metainfo
parent
bdd9a67b
Pipeline
#81470
passed with stages
in 11 minutes and 1 second
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
nomad/datamodel/metainfo/public.py
View file @
e2c42ccc
...
...
@@ -5627,8 +5627,7 @@ class Relaxation(MSection):
description
=
'''
The maximum net force in the last relaxation step.
'''
,
a_legacy
=
LegacyDefinition
(
name
=
'final_force_maximum'
)
)
a_legacy
=
LegacyDefinition
(
name
=
'final_force_maximum'
))
final_calculation_ref
=
Quantity
(
type
=
Reference
(
SectionProxy
(
'section_single_configuration_calculation'
)),
...
...
@@ -5638,6 +5637,23 @@ class Relaxation(MSection):
'''
,
a_legacy
=
LegacyDefinition
(
name
=
'final_calculation_ref'
))
n_relaxation_steps
=
Quantity
(
type
=
int
,
shape
=
[],
description
=
'''
Number of relaxation steps.
'''
,
a_legacy
=
LegacyDefinition
(
name
=
'n_relaxation_steps'
))
calculations_ref
=
Quantity
(
type
=
Reference
(
SectionProxy
(
'section_single_configuration_calculation'
)),
shape
=
[
'n_relaxation_steps'
],
description
=
'''
List of references to each section_single_configuration_calculation corresponding
to each step in the relaxation.
'''
,
a_legacy
=
LegacyDefinition
(
name
=
'calculations_ref'
))
class
Phonon
(
MSection
):
'''
...
...
nomad/normalizing/workflow.py
View file @
e2c42ccc
...
...
@@ -73,11 +73,17 @@ class RelaxationNormalizer(Normalizer):
if
not
self
.
section
.
relaxation_type
:
self
.
section
.
relaxation_type
=
self
.
_get_relaxation_type
()
scc
=
self
.
section_run
.
section_single_configuration_calculation
if
not
self
.
section
.
final_calculation_ref
:
scc
=
self
.
section_run
.
section_single_configuration_calculation
if
scc
:
self
.
section
.
final_calculation_ref
=
scc
[
-
1
]
if
not
self
.
section
.
n_relaxation_steps
:
self
.
section
.
n_relaxation_steps
=
len
(
scc
)
if
not
self
.
section
.
calculations_ref
:
self
.
section
.
calculations_ref
=
scc
if
not
self
.
section
.
final_energy_difference
:
energies
=
[]
for
scc
in
self
.
section_run
.
section_single_configuration_calculation
:
...
...
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