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-gpaw
Commits
e0721ca3
Commit
e0721ca3
authored
Jul 12, 2017
by
Ask Hjorth Larsen
Browse files
fix and re-enable 3d arrays
parent
2f389437
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/parser-gpaw/parser2.py
View file @
e0721ca3
...
...
@@ -145,13 +145,12 @@ def parse(filename):
c
(
fermilevels
,
'eV'
))
# Load 3D arrays ("volumetric data")
origin
=
-
0.5
*
r
.
atoms
.
cell
origin
=
-
0.5
*
r
.
atoms
.
cell
.
sum
(
axis
=
0
)
npoints
=
np
.
array
(
r
.
density
.
density
.
shape
[
1
:])
npoints
[
~
r
.
atoms
.
pbc
]
+=
1
displacements
=
r
.
atoms
.
cell
/
npoints
def
add_3d_array
(
values
,
kind
,
unit
):
return
with
o
(
p
,
'section_volumetric_data'
):
p
.
addArrayValues
(
'volumetric_data_origin'
,
c
(
origin
,
'angstrom'
))
...
...
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