Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
parser-wien2k
Commits
ac52c102
Commit
ac52c102
authored
Nov 06, 2016
by
Daria Tomecka
Browse files
wien2k: update
parent
cde754b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
parser/parser-wien2k/wien2k_parser.py
View file @
ac52c102
...
...
@@ -207,7 +207,7 @@ mainFileDescription = SM(
SM
(
r
":GMA\s*:\s*POTENTIAL\sAND\sCHARGE\sCUT-OFF\s*(?P<x_wien2k_cutoff>[0-9.]+)\s*Ry\W\W[0-9.]+"
),
SM
(
r
":GAP\s*:\s*(?P<x_wien2k_ene_gap__rydberg>[-+0-9.]+)\s*Ry\s*=\s*(?P<x_wien2k_ene_gap_eV>[-+0-9.]+)\s*eV\s*.*"
),
SM
(
r
":NOE\s*:\s*NUMBER\sOF\sELECTRONS\s*=\s*(?P<x_wien2k_noe>[0-9.]+)"
),
SM
(
r
":FER\s*:\s(\w*\s*)*-\s\w*\W\w*\WM\W*=\s*(?P<x_wien2k_fermi_ene>[-+0-9.]+)"
),
SM
(
r
":FER\s*:\s(\w*\s*)*-\s\w*\W\w*\WM\W*=\s*(?P<x_wien2k_fermi_ene
__rydberg
>[-+0-9.]+)"
),
SM
(
r
":GMA\s*:\s*POTENTIAL\sAND\sCHARGE\sCUT-OFF\s*[0-9.]+\s*Ry\W\W[0-9.]+"
),
SM
(
r
":CHA(?P<x_wien2k_atom_nr>[-+0-9]+):\s*TOTAL\s*\w*\s*CHARGE INSIDE SPHERE\s*(?P<x_wien2k_sphere_nr>[-+0-9]+)\s*=\s*(?P<x_wien2k_tot_val_charge_sphere>[0-9.]+)"
,
repeats
=
True
),
SM
(
r
":CHA\s*:\s*TOTAL\s*\w*\s*CHARGE INSIDE\s*\w*\s*CELL\s=\s*(?P<x_wien2k_tot_val_charge_cell>[-+0-9.]+)"
),
...
...
parser/parser-wien2k/wien2k_parser_struct.py
View file @
ac52c102
...
...
@@ -55,7 +55,7 @@ class Wien2kStructContext(object):
x
=
eqAtoms
[
"x_wien2k_atom_pos_x"
]
y
=
eqAtoms
[
"x_wien2k_atom_pos_y"
]
z
=
eqAtoms
[
"x_wien2k_atom_pos_z"
]
#
OB
logging.error("equiv_atoms: %s x %s y %s z %s",eqAtoms, x, y, z)
#logging.error("equiv_atoms: %s x %s y %s z %s",eqAtoms, x, y, z)
if
len
(
x
)
!=
len
(
y
)
or
len
(
x
)
!=
len
(
z
):
raise
Exception
(
"incorrect parsing, different number of x,y,z components"
)
groupPos
=
[[
x
[
i
],
y
[
i
],
z
[
i
]]
for
i
in
range
(
len
(
x
))]
...
...
@@ -63,8 +63,9 @@ class Wien2kStructContext(object):
labels
+=
[
label
for
i
in
range
(
nAt
)]
pos
+=
groupPos
backend
.
addValue
(
"atom_labels"
,
labels
)
#backend.addValue("atom_positions", np.dot(pos,unit_cell))
#ok#backend.addArrayValues('atom_positions', np.transpose(np.asarray(pos)))
#backend.addArrayValues("atom_positions", np.dot(pos,unit_cell))
#backend.addArrayValues('atom_positions', np.transpose(np.asarray(pos)))
backend
.
addArrayValues
(
'atom_positions'
,
np
.
asarray
(
pos
))
...
...
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