Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-vasp
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-vasp
Commits
bb0372a0
Commit
bb0372a0
authored
Mar 20, 2017
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Downloads
Patches
Plain Diff
emit pseudopotential name (was parsed already)
parent
a79e5508
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
parser/parser-vasp/parser_vasprun.py
+21
-2
21 additions, 2 deletions
parser/parser-vasp/parser_vasprun.py
with
21 additions
and
2 deletions
parser/parser-vasp/parser_vasprun.py
+
21
−
2
View file @
bb0372a0
...
...
@@ -14,6 +14,7 @@ import numpy as np
import
setup_paths
from
nomadcore.unit_conversion.unit_conversion
import
convert_unit_function
import
ase.geometry
import
ase.data
from
math
import
pi
eV2J
=
convert_unit_function
(
"
eV
"
,
"
J
"
)
...
...
@@ -625,6 +626,24 @@ class VasprunContext(object):
atomTypesDesc
.
append
(
typeDesc
)
else
:
backend
.
pwarn
(
"
unexpected tag %s in atomtypes array in atominfo
"
%
atomsEl
.
tag
)
kindIds
=
[]
for
atomDesc
in
atomTypesDesc
:
kindId
=
backend
.
openSection
(
"
section_method_atom_kind
"
)
if
'
element
'
in
atomDesc
:
try
:
elNr
=
ase
.
data
.
chemical_symbols
.
index
(
atomDesc
[
'
element
'
].
strip
())
backend
.
addValue
(
"
method_atom_kind_atom_number
"
,
elNr
)
except
:
logging
.
exception
(
"
error finding element number for %r
"
,
atomDesc
[
'
element
'
].
strip
())
if
"
mass
"
in
atomDesc
:
backend
.
addValue
(
"
method_atom_kind_mass
"
,
atomDesc
[
"
mass
"
])
if
"
valence
"
in
atomDesc
:
backend
.
addValue
(
"
method_atom_kind_explicit_electrons
"
,
atomDesc
[
"
valence
"
])
if
"
pseudopotential
"
in
atomDesc
:
backend
.
addValue
(
"
method_atom_kind_pseudopotential_name
"
,
atomDesc
[
"
pseudopotential
"
])
kindIds
.
append
(
kindId
)
backend
.
closeSection
(
"
section_method_atom_kind
"
,
kindId
)
backend
.
addArrayValues
(
"
x_vasp_atom_kind_refs
"
,
np
.
asarray
([
kindIds
[
i
-
1
]
for
i
in
atomTypes
]))
else
:
backend
.
pwarn
(
"
unexpected array named %s in atominfo
"
%
name
)
else
:
...
...
...
...
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