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
nomad-FAIR
Commits
2bbada57
Commit
2bbada57
authored
Mar 28, 2019
by
Markus Scheidgen
Browse files
Fixed broken variable name.
parent
c61ff1f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
nomad/datamodel/dft.py
View file @
2bbada57
...
...
@@ -46,7 +46,7 @@ version_re = re.compile(r'(\d+(\.\d+(\.\d+)?)?)')
def
map_functional_name_to_xc_treatment
(
name
):
if
name
==
config
.
services
.
unavailable_
label
:
if
name
==
config
.
services
.
unavailable_
value
:
return
name
return
xc_treatments
.
get
(
name
[:
3
].
lower
(),
name
)
...
...
@@ -114,7 +114,7 @@ class DFTCalcWithMetadata(CalcWithMetadata):
if
val
is
None
:
logger
.
warning
(
'The values for %s where not available in any %s'
%
(
key
,
section
))
return
unavailable_value
if
unavailable_value
is
not
None
else
config
.
services
.
unavailable_
label
return
unavailable_value
if
unavailable_value
is
not
None
else
config
.
services
.
unavailable_
value
else
:
return
val
...
...
nomad/normalizing/system.py
View file @
2bbada57
...
...
@@ -184,7 +184,7 @@ class SystemNormalizer(SystemBasedNormalizer):
Determine the dimensioality and hence the system type of the system with
Matid. Write the system type to the backend.
"""
system_type
=
'
unavailable
'
system_type
=
config
.
services
.
unavailable
_value
try
:
dimensionality
=
get_dimensionality
(
atoms
,
cluster_threshold
=
3.1
,
return_clusters
=
False
)
...
...
tests/test_normalizing.py
View file @
2bbada57
...
...
@@ -68,11 +68,11 @@ def assert_normalized(backend: LocalBackend):
assert
len
(
metadata
.
atoms
)
>
0
assert
metadata
.
spacegroup
is
not
None
assert
metadata
.
code_name
is
not
config
.
services
.
unavailable_
label
assert
metadata
.
code_version
is
not
config
.
services
.
unavailable_
label
assert
metadata
.
basis_set
is
not
config
.
services
.
unavailable_
label
assert
metadata
.
xc_functional
is
not
config
.
services
.
unavailable_
label
assert
metadata
.
system
is
not
config
.
services
.
unavailable_
label
assert
metadata
.
code_name
!=
config
.
services
.
unavailable_
value
assert
metadata
.
code_version
!=
config
.
services
.
unavailable_
value
assert
metadata
.
basis_set
!=
config
.
services
.
unavailable_
value
assert
metadata
.
xc_functional
!=
config
.
services
.
unavailable_
value
assert
metadata
.
system
!=
config
.
services
.
unavailable_
value
# TODO check symmetry where we know it should be there
...
...
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