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
506e2d67
Commit
506e2d67
authored
May 17, 2016
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
applying obvious metadata renames
section_system_description -> section_system cell_associated -> cell_dependent
parent
a19e12ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/parser-gpaw/parser.py
View file @
506e2d67
...
...
@@ -42,22 +42,22 @@ def parse(filename):
with
o
(
p
,
'section_run'
):
p
.
addValue
(
'program_name'
,
'GPAW'
)
if
r
.
Mode
==
'pw'
:
with
o
(
p
,
'section_basis_set_cell_
associated
'
):
p
.
addValue
(
'basis_set_cell_
associated
_name'
,
with
o
(
p
,
'section_basis_set_cell_
dependent
'
):
p
.
addValue
(
'basis_set_cell_
dependent
_name'
,
'PW_%.1f_Ry'
%
(
r
.
PlaneWaveCutoff
*
2.0
))
# in Ry
p
.
addRealValue
(
'basis_set_plane_wave_cutoff'
,
c
(
r
.
PlaneWaveCutoff
,
'hartree'
))
elif
r
.
Mode
==
'fd'
:
with
o
(
p
,
'section_basis_set_cell_
associated
'
):
with
o
(
p
,
'section_basis_set_cell_
dependent
'
):
h1
=
np
.
linalg
.
norm
(
r
.
UnitCell
[
0
])
/
r
.
dims
[
'ngptsx'
]
h2
=
np
.
linalg
.
norm
(
r
.
UnitCell
[
1
])
/
r
.
dims
[
'ngptsy'
]
h3
=
np
.
linalg
.
norm
(
r
.
UnitCell
[
2
])
/
r
.
dims
[
'ngptsz'
]
h
=
(
h1
+
h2
+
h3
)
/
3.0
p
.
addValue
(
'basis_set_cell_
associated
_name'
,
p
.
addValue
(
'basis_set_cell_
dependent
_name'
,
'GR_%.1f'
%
(
c
(
h
,
'bohr'
)
*
1.0E15
))
# in fm
elif
r
.
Mode
==
'lcao'
:
pass
with
o
(
p
,
'section_system
_description
'
):
with
o
(
p
,
'section_system'
):
p
.
addArrayValues
(
'simulation_cell'
,
c
(
r
.
UnitCell
,
'bohr'
))
symbols
=
np
.
array
([
chemical_symbols
[
z
]
for
z
in
r
.
AtomicNumbers
])
p
.
addArrayValues
(
'atom_label'
,
symbols
)
...
...
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