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
parser-phonopy
Commits
1ab5a1ee
Commit
1ab5a1ee
authored
May 04, 2020
by
Lauri Himanen
Browse files
Made the parser use references that are relative to upload root.
parent
09bc6105
Changes
1
Hide whitespace changes
Inline
Side-by-side
phonopyparser/Get_Force_Constants.py
View file @
1ab5a1ee
...
...
@@ -38,6 +38,8 @@ from nomadcore.parser_backend import *
from
nomadcore.local_meta_info
import
loadJsonFile
,
InfoKindEl
from
phonopy.structure.atoms
import
PhonopyAtoms
as
Atoms
import
nomad.config
phonopy_version
=
__version__
parser_info
=
{
"name"
:
"parser_phonopy"
,
"version"
:
"1.0"
}
...
...
@@ -80,7 +82,9 @@ def parse_without_class(name, backend):
Prep_Path
=
name
.
split
(
"phonopy-FHI-aims-displacement-"
)
Whole_Path
=
[]
for
Path
in
Relative_Path
:
Whole_Path
.
append
(
"%s%s"
%
(
Prep_Path
[
0
],
Path
))
abs_path
=
"%s%s"
%
(
Prep_Path
[
0
],
Path
)
rel_path
=
abs_path
.
split
(
nomad
.
config
.
fs
.
staging
+
"/"
)[
1
].
split
(
"/"
,
3
)[
3
]
Whole_Path
.
append
(
rel_path
)
phonopy_obj
.
set_forces
(
set_of_forces
)
phonopy_obj
.
produce_force_constants
()
FC2
=
phonopy_obj
.
get_force_constants
()
...
...
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