Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-octopus
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-octopus
Commits
f6efba08
Commit
f6efba08
authored
4 years ago
by
temok-mx
Browse files
Options
Downloads
Patches
Plain Diff
Fixed undefined eFermi variable and lint issues
parent
44509930
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
octopusparser/aseoct.py
+15
-12
15 additions, 12 deletions
octopusparser/aseoct.py
octopusparser/parser_octopus.py
+20
-16
20 additions, 16 deletions
octopusparser/parser_octopus.py
with
35 additions
and
28 deletions
octopusparser/aseoct.py
+
15
−
12
View file @
f6efba08
...
...
@@ -63,7 +63,6 @@ def read_eigenvalues_file(fd):
eigs
[
-
1
].
setdefault
(
spin
,
[]).
append
(
float
(
eig
))
occs
[
-
1
].
setdefault
(
spin
,
[]).
append
(
float
(
occ
))
nkpts
=
len
(
kpts
)
nspins
=
len
(
eigs
[
0
])
nbands
=
len
(
eigs
[
0
][
spin
])
...
...
@@ -180,6 +179,7 @@ def block2list(namespace, lines, header=None):
block
.
append
(
tokens
)
return
name
,
block
class
OctNamespace
:
def
__init__
(
self
):
self
.
names
=
{}
...
...
@@ -326,10 +326,10 @@ def read_static_info_eigenvalues_efermi(fd, energy_unit):
values_sknx
=
{}
eFermi
=
None
nbands
=
0
for
line
in
fd
:
line
=
line
.
strip
()
#print('\t\t' , line)
if
line
.
startswith
(
'
#
'
):
continue
if
line
.
startswith
(
'
Fermi
'
):
# tmk
...
...
@@ -361,12 +361,15 @@ def read_static_info_eigenvalues_efermi(fd, energy_unit):
occ_skn
=
occ_skn
.
transpose
(
1
,
0
,
2
).
copy
()
assert
eps_skn
.
flags
.
contiguous
# print('save to dictionary: ', nspins, nkpts, nbands, eps_skn, occ_skn, eFermi)
return
dict
(
nspins
=
nspins
,
info_dict
=
dict
(
nspins
=
nspins
,
nkpts
=
nkpts
,
nbands
=
nbands
,
eigenvalues
=
eps_skn
,
occupations
=
occ_skn
,
efermi
=
eFermi
)
occupations
=
occ_skn
)
if
eFermi
is
not
None
:
# not all Octopus' output might report the Fermi energy
info_dict
[
'
efermi
'
]
=
eFermi
return
info_dict
def
read_static_info_energy
(
fd
,
energy_unit
):
...
...
This diff is collapsed.
Click to expand it.
octopusparser/parser_octopus.py
+
20
−
16
View file @
f6efba08
...
...
@@ -57,6 +57,7 @@ is largely irrelevant.
metaInfoEnv
=
None
def
parse_infofile
(
meta_info_env
,
pew
,
fname
):
# print('\n\n### parse_infofile()')
# print('\tPROBLEM: {}\n\t{} ' .format(fname, 'should be static/info!!'))
...
...
@@ -237,6 +238,7 @@ def parse_coordinates_from_parserlog(fname):
def
normalize_names
(
names
):
return
[
name
.
lower
()
for
name
in
names
]
# Dictionary of all meta info:
normalized2real
=
None
...
...
@@ -246,6 +248,7 @@ parser_info = {
"
version
"
:
"
1.0
"
}
def
read_parser_log
(
path
):
exec_kwargs
=
{}
# print("\n\nPATH: ", path) # 'exec/parser.log'
...
...
@@ -326,8 +329,9 @@ def override_keywords(kwargs, parser_log_kwargs):
# '%s obtained from parser log'
# % (name, kwargs[name], parser_log_kwargs[name]),
# file=fd)
logging
.
debug
(
'
Keyword %s with value %s overridden by value
'
'
%s obtained from parser log
'
logging
.
debug
(
(
'
Keyword %s with value %s overridden by value
'
'
%s obtained from parser log
'
)
%
(
name
,
kwargs
[
name
],
parser_log_kwargs
[
name
]))
outkwargs
[
name
]
=
parser_log_kwargs
[
name
]
...
...
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