Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-octopus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
nomad-lab
parser-octopus
Commits
7de9f912
Commit
7de9f912
authored
Mar 4, 2019
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed metainfo path calculations.
parent
4d2bc025
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
octopusparser/parser_octopus.py
+9
-13
9 additions, 13 deletions
octopusparser/parser_octopus.py
with
9 additions
and
13 deletions
octopusparser/parser_octopus.py
+
9
−
13
View file @
7de9f912
...
@@ -30,6 +30,7 @@ from ase.io import read
...
@@ -30,6 +30,7 @@ from ase.io import read
# import setup_paths
# import setup_paths
import
nomad_meta_info
from
nomadcore.local_meta_info
import
loadJsonFile
,
InfoKindEl
from
nomadcore.local_meta_info
import
loadJsonFile
,
InfoKindEl
from
nomadcore.parser_backend
import
JsonParseEventsWriterBackend
from
nomadcore.parser_backend
import
JsonParseEventsWriterBackend
from
nomadcore.unit_conversion.unit_conversion
import
convert_unit
from
nomadcore.unit_conversion.unit_conversion
import
convert_unit
...
@@ -232,12 +233,14 @@ def parse_coordinates_from_parserlog(fname):
...
@@ -232,12 +233,14 @@ def parse_coordinates_from_parserlog(fname):
def
normalize_names
(
names
):
def
normalize_names
(
names
):
return
[
name
.
lower
()
for
name
in
names
]
return
[
name
.
lower
()
for
name
in
names
]
metaInfoPath
=
os
.
path
.
normpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"
../../../../dependencies/nomad-meta-info/meta_info/nomad_meta_info/octopus.nomadmetainfo.json
"
))
metaInfoPath
=
os
.
path
.
normpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
metaInfoEnv
,
warnings
=
loadJsonFile
(
filePath
=
metaInfoPath
,
os
.
path
.
abspath
(
nomad_meta_info
.
__file__
)),
"
octopus.nomadmetainfo.json
"
))
dependencyLoader
=
None
,
extraArgsHandling
=
InfoKindEl
.
ADD_EXTRA_ARGS
,
metaInfoEnv
,
warnings
=
loadJsonFile
(
uri
=
None
)
filePath
=
metaInfoPath
,
dependencyLoader
=
None
,
extraArgsHandling
=
InfoKindEl
.
ADD_EXTRA_ARGS
,
uri
=
None
)
# Dictionary of all meta info:
# Dictionary of all meta info:
metaInfoKinds
=
metaInfoEnv
.
infoKinds
.
copy
()
metaInfoKinds
=
metaInfoEnv
.
infoKinds
.
copy
()
...
@@ -615,13 +618,6 @@ class OctopusParserWrapper():
...
@@ -615,13 +618,6 @@ class OctopusParserWrapper():
self
.
backend_factory
=
backend
self
.
backend_factory
=
backend
def
parse
(
self
,
mainfile
):
def
parse
(
self
,
mainfile
):
import
nomad_meta_info
metaInfoPath
=
os
.
path
.
normpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
nomad_meta_info
.
__file__
)),
"
octopus.nomadmetainfo.json
"
))
metaInfoEnv
,
warnings
=
loadJsonFile
(
filePath
=
metaInfoPath
,
dependencyLoader
=
None
,
extraArgsHandling
=
InfoKindEl
.
ADD_EXTRA_ARGS
,
uri
=
None
)
from
unittest.mock
import
patch
logging
.
info
(
'
octopus parser started
'
)
logging
.
info
(
'
octopus parser started
'
)
logging
.
getLogger
(
'
nomadcore
'
).
setLevel
(
logging
.
WARNING
)
logging
.
getLogger
(
'
nomadcore
'
).
setLevel
(
logging
.
WARNING
)
backend
=
self
.
backend_factory
(
metaInfoEnv
)
backend
=
self
.
backend_factory
(
metaInfoEnv
)
...
...
...
...
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
sign in
to comment