Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
normalizer-repo-tags
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nomad-lab
normalizer-repo-tags
Commits
bc6bdbc3
Commit
bc6bdbc3
authored
7 years ago
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Downloads
Patches
Plain Diff
adding main file uri
parent
9a6d0b96
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/eu/nomad_lab/normalizers/RepoTagsNormalizer.scala
+16
-0
16 additions, 0 deletions
...n/scala/eu/nomad_lab/normalizers/RepoTagsNormalizer.scala
with
16 additions
and
0 deletions
src/main/scala/eu/nomad_lab/normalizers/RepoTagsNormalizer.scala
+
16
−
0
View file @
bc6bdbc3
...
@@ -30,7 +30,9 @@ import eu.nomad_lab.h5.H5EagerScanner
...
@@ -30,7 +30,9 @@ import eu.nomad_lab.h5.H5EagerScanner
import
eu.nomad_lab.h5.SectionH5
import
eu.nomad_lab.h5.SectionH5
import
eu.nomad_lab.parsers.ExternalParserWrapper
import
eu.nomad_lab.parsers.ExternalParserWrapper
import
eu.nomad_lab.JsonUtils
import
eu.nomad_lab.JsonUtils
import
eu.nomad_lab.H5Lib
import
scala.collection.mutable.StringBuilder
import
scala.collection.mutable.StringBuilder
import
util.control.NonFatal
object
RepoTagsNormalizer
extends
ExternalNormalizerGenerator
(
object
RepoTagsNormalizer
extends
ExternalNormalizerGenerator
(
name
=
"RepoTagsNormalizer"
,
name
=
"RepoTagsNormalizer"
,
...
@@ -99,6 +101,19 @@ object RepoTagsNormalizer extends ExternalNormalizerGenerator(
...
@@ -99,6 +101,19 @@ object RepoTagsNormalizer extends ExternalNormalizerGenerator(
val
nEnergyEvaluations
=
singleConfSections
.
lengthL
val
nEnergyEvaluations
=
singleConfSections
.
lengthL
var
lastGeometry
:
Option
[
SectionH5
]
=
None
var
lastGeometry
:
Option
[
SectionH5
]
=
None
var
lastEnergy
:
Option
[
Double
]
=
None
var
lastEnergy
:
Option
[
Double
]
=
None
val
cGroup
=
c
.
calculationGroup
val
mainFileUris
:
Seq
[
String
]
=
try
{
val
mainFileAttr
:
Long
=
H5Lib
.
attributeOpen
(
cGroup
,
attributeName
=
"mainFileUri"
,
attributeType
=
"C"
)
val
mainFiles
:
Array
[
String
]
=
H5Lib
.
attributeReadStr
(
mainFileAttr
)
H5Lib
.
attributeClose
(
mainFileAttr
)
mainFiles
.
toSeq
}
catch
{
case
NonFatal
(
e
)
=>
Seq
()
}
if
(
nEnergyEvaluations
>
0
)
{
if
(
nEnergyEvaluations
>
0
)
{
val
lastEnergyEval
:
SectionH5
=
singleConfSections
(
nEnergyEvaluations
-
1
)
val
lastEnergyEval
:
SectionH5
=
singleConfSections
(
nEnergyEvaluations
-
1
)
lastGeometry
=
lastEnergyEval
.
maybeValue
(
"single_configuration_calculation_to_system_ref"
).
map
(
_
.
longValue
)
match
{
lastGeometry
=
lastEnergyEval
.
maybeValue
(
"single_configuration_calculation_to_system_ref"
).
map
(
_
.
longValue
)
match
{
...
@@ -118,6 +133,7 @@ object RepoTagsNormalizer extends ExternalNormalizerGenerator(
...
@@ -118,6 +133,7 @@ object RepoTagsNormalizer extends ExternalNormalizerGenerator(
"electronic_structure_method": ${JsonUtils.normalizedStr(jn.JArray(electronicStructureMethods.map(jn.JString(_))(breakOut)))},
"electronic_structure_method": ${JsonUtils.normalizedStr(jn.JArray(electronicStructureMethods.map(jn.JString(_))(breakOut)))},
"section_single_confguration_calculation.length": ${nEnergyEvaluations},
"section_single_confguration_calculation.length": ${nEnergyEvaluations},
"energy_total.last": ${lastEnergy.getOrElse("null")},
"energy_total.last": ${lastEnergy.getOrElse("null")},
"main_file_uri": ${JsonUtils.normalizedStr(jn.JArray(mainFileUris.map(jn.JString(_))(breakOut)))},
"section_system.last": """
)
"section_system.last": """
)
lastGeometry
match
{
lastGeometry
match
{
case
None
=>
"null"
case
None
=>
"null"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment