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
normalizer-repo-tags
Commits
1de06cba
Commit
1de06cba
authored
Jan 30, 2019
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
meta 2.0 changes
parent
bcb49a0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/scala/eu/nomad_lab/normalizers/RepoTagsNormalizer.scala
View file @
1de06cba
...
...
@@ -98,7 +98,7 @@ object RepoTagsNormalizer extends ExternalNormalizerGenerator(
case
Calculation
(
archiveSet
,
c
)
=>
val
programNames
:
Set
[
String
]
=
(
for
(
v
<-
c
.
valueTable
(
Seq
(
"section_run"
,
"program_name"
)))
yield
(
v
.
stringValue
))(
breakOut
)
val
programVersions
:
Set
[
String
]
=
(
for
(
v
<-
c
.
valueTable
(
Seq
(
"section_run"
,
"program_version"
)))
yield
(
v
.
stringValue
))(
breakOut
)
val
xcFunctionals
:
Set
[
String
]
=
(
for
(
v
<-
c
.
valueTable
(
Seq
(
"section_run"
,
"section_method"
,
"section_
XC
_functionals"
,
"
XC
_functional_name"
)))
yield
(
v
.
stringValue
))(
breakOut
)
val
xcFunctionals
:
Set
[
String
]
=
(
for
(
v
<-
c
.
valueTable
(
Seq
(
"section_run"
,
"section_method"
,
"section_
xc
_functionals"
,
"
xc
_functional_name"
)))
yield
(
v
.
stringValue
))(
breakOut
)
val
electronicStructureMethods
:
Set
[
String
]
=
(
for
(
v
<-
c
.
valueTable
(
Seq
(
"section_run"
,
"section_method"
,
"electronic_structure_method"
)))
yield
(
v
.
stringValue
))(
breakOut
)
val
singleConfSections
=
c
.
sectionTable
(
Seq
(
"section_run"
,
"section_single_configuration_calculation"
))
val
nEnergyEvaluations
=
singleConfSections
.
lengthL
...
...
@@ -132,7 +132,7 @@ object RepoTagsNormalizer extends ExternalNormalizerGenerator(
writeOut
(
s
"""{
"program_name": ${JsonUtils.normalizedStr(jn.JArray(programNames.map(jn.JString(_))(breakOut)))},
"program_version": ${JsonUtils.normalizedStr(jn.JArray(programVersions.map(jn.JString(_))(breakOut)))},
"
XC
_functional_name": ${JsonUtils.normalizedStr(jn.JArray(xcFunctionals.map(jn.JString(_))(breakOut)))},
"
xc
_functional_name": ${JsonUtils.normalizedStr(jn.JArray(xcFunctionals.map(jn.JString(_))(breakOut)))},
"electronic_structure_method": ${JsonUtils.normalizedStr(jn.JArray(electronicStructureMethods.map(jn.JString(_))(breakOut)))},
"section_single_confguration_calculation.length": ${nEnergyEvaluations},
"energy_total.last": ${lastEnergy.getOrElse("null")},
...
...
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