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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nomad-lab
parser-vasp
Commits
aa7414da
Commit
aa7414da
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Reduced warnings.
parent
386c64df
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vaspparser/parser_vasprun.py
+13
-6
13 additions, 6 deletions
vaspparser/parser_vasprun.py
with
13 additions
and
6 deletions
vaspparser/parser_vasprun.py
+
13
−
6
View file @
aa7414da
...
@@ -275,6 +275,8 @@ class VasprunContext(object):
...
@@ -275,6 +275,8 @@ class VasprunContext(object):
self
.
cell
=
None
self
.
cell
=
None
self
.
angstrom_cell
=
None
self
.
angstrom_cell
=
None
self
.
unknown_incar_params
=
[]
if
self
.
logger
is
None
:
if
self
.
logger
is
None
:
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -795,8 +797,7 @@ class VasprunContext(object):
...
@@ -795,8 +797,7 @@ class VasprunContext(object):
meta
=
metaEnv
[
'
x_vasp_incarOut_
'
+
name
]
meta
=
metaEnv
[
'
x_vasp_incarOut_
'
+
name
]
valType
=
el
.
attrib
.
get
(
"
type
"
)
valType
=
el
.
attrib
.
get
(
"
type
"
)
if
not
meta
:
if
not
meta
:
backend
.
pwarn
(
"
Unknown INCAR out parameter (not registered in the meta data): %s %s %r
"
%
(
self
.
unknown_incar_params
.
append
((
el
.
tag
,
el
.
attrib
,
el
.
text
))
el
.
tag
,
el
.
attrib
,
el
.
text
))
else
:
else
:
if
valType
:
if
valType
:
expectedMetaType
=
{
expectedMetaType
=
{
...
@@ -866,13 +867,15 @@ class VasprunContext(object):
...
@@ -866,13 +867,15 @@ class VasprunContext(object):
elif
el
.
tag
==
"
separator
"
:
elif
el
.
tag
==
"
separator
"
:
self
.
separatorScan
(
el
,
backend
,
depth
+
1
)
self
.
separatorScan
(
el
,
backend
,
depth
+
1
)
else
:
else
:
backend
.
pwarn
(
"
unexpected tag %s %s in parameters separator %s at depth %d
"
%
(
# backend.pwarn("unexpected tag %s %s in parameters separator %s at depth %d" % (
el
.
tag
,
el
.
attrib
,
separatorName
,
depth
))
# el.tag, el.attrib, separatorName, depth))
pass
elif
separators
.
tag
==
"
i
"
:
elif
separators
.
tag
==
"
i
"
:
self
.
incarOutTag
(
separators
)
self
.
incarOutTag
(
separators
)
else
:
else
:
backend
.
pwarn
(
"
unexpected tag %s %s in parameters at depth %d
"
%
(
# backend.pwarn("unexpected tag %s %s in parameters at depth %d" % (
separators
.
tag
,
separators
.
attrib
,
depth
))
# separators.tag, separators.attrib, depth))
pass
def
onEnd_parameters
(
self
,
parser
,
event
,
element
,
pathStr
):
def
onEnd_parameters
(
self
,
parser
,
event
,
element
,
pathStr
):
self
.
separatorScan
(
element
,
parser
.
backend
)
self
.
separatorScan
(
element
,
parser
.
backend
)
...
@@ -1123,6 +1126,10 @@ class XmlParser(object):
...
@@ -1123,6 +1126,10 @@ class XmlParser(object):
parserErrors
=
[
"
exception: %s
"
%
sys
.
exc_info
()[
1
]]
parserErrors
=
[
"
exception: %s
"
%
sys
.
exc_info
()[
1
]]
)
)
else
:
else
:
if
len
(
self
.
superContext
.
unknown_incar_params
)
>
0
:
example
=
self
.
superContext
.
unknown_incar_params
[
0
]
backend
.
pwarn
(
"
Unknown INCAR out parameters (not registered in the meta data), e.g. %s %s %r
"
%
example
)
backend
.
finishedParsingSession
(
backend
.
finishedParsingSession
(
parserStatus
=
"
ParseSuccess
"
,
parserStatus
=
"
ParseSuccess
"
,
parserErrors
=
None
parserErrors
=
None
...
...
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
register
or
sign in
to comment