Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
nomad-lab
normalizer-prototypes
Commits
8eea4f80
Commit
8eea4f80
authored
Aug 10, 2017
by
Daria M. Tomecka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update normalizer
parent
bd6e8e14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
normalizer/normalizer-prototypes/classify4me_prototypes.py
normalizer/normalizer-prototypes/classify4me_prototypes.py
+10
-10
No files found.
normalizer/normalizer-prototypes/classify4me_prototypes.py
View file @
8eea4f80
...
...
@@ -40,7 +40,7 @@ from nomadcore.parser_backend import JsonParseEventsWriterBackend
import
sys
#print(sys.path)
sys
.
path
.
append
(
'/home/beaker/py3k/lib/python3.5/'
)
#
sys.path.append('/home/beaker/py3k/lib/python3.5/')
import
spglib
import
logging
...
...
@@ -190,7 +190,7 @@ def updatePrototypesWyckoff(protos):
wy
=
protoNormalizeWycoff
(
protoDict
)
protoDict
[
'normalized_wyckoff_spg'
]
=
wy
except
:
logging
.
exception
(
"Failed to compute normalized wyckoffs for %s"
,
protoDict
)
logging
.
exception
(
"Failed to compute normalized wyckoffs for %s"
,
json
.
dumps
(
protoDict
)
)
def
systemToSpg
(
cell
,
atomSpecies
,
atomPos
):
"""uses spg to calculate the symmetry of the given system"""
...
...
@@ -279,15 +279,15 @@ def main():
dictReader
=
ParseStreamedDicts
(
sys
.
stdin
)
while
True
:
sectSys
=
dictReader
.
readNextDict
()
if
sectSys
is
None
:
break
try
:
if
sectSys
is
None
:
break
label
=
classify_by_norm_wyckoff
(
sectSys
)
if
label
:
backend
.
openContext
(
sectSys
[
'uri'
])
backend
.
addValue
(
"prototype_label"
,
label
)
backend
.
closeContext
(
sectSys
[
'uri'
])
sys
.
stdout
.
flush
()
label
=
classify_by_norm_wyckoff
(
sectSys
)
if
label
:
backend
.
openContext
(
sectSys
[
'uri'
])
backend
.
addValue
(
"prototype_label"
,
label
)
backend
.
closeContext
(
sectSys
[
'uri'
])
sys
.
stdout
.
flush
()
except
:
logging
.
exception
(
"exception trying to calculate prototype for %s"
,
sectSys
)
...
...
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