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
cfb81bf4
Commit
cfb81bf4
authored
Jan 24, 2022
by
Alvin Noe Ladines
Browse files
Fix issue
#726
parent
11858c6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
nomad/normalizing/workflow.py
View file @
cfb81bf4
...
...
@@ -17,6 +17,7 @@
#
import
numpy
as
np
from
ase
import
Atoms
from
nomad.datamodel.metainfo.simulation.calculation
import
Calculation
from
nomad.normalizing.normalizer
import
Normalizer
...
...
@@ -255,9 +256,14 @@ class GeometryOptimizationNormalizer(TaskNormalizer):
if
not
self
.
section
.
final_displacement_maximum
:
try
:
system
=
self
.
run
.
system
ase_atoms
=
[
Atoms
(
positions
=
system_i
.
atoms
.
positions
.
magnitude
,
cell
=
system_i
.
atoms
.
lattice_vectors
.
magnitude
,
pbc
=
system_i
.
atoms
.
periodic
)
for
system_i
in
system
]
_
=
[
atoms
.
wrap
()
for
atoms
in
ase_atoms
]
displacements
=
[
np
.
max
(
np
.
abs
(
system
[
n
].
atoms
.
positions
-
system
[
n
-
1
].
atoms
.
positions
))
for
n
in
range
(
1
,
len
(
system
))]
self
.
section
.
final_displacement_maximum
=
resolve_difference
(
displacements
)
ase_atoms
[
n
].
get_
positions
()
-
ase_atoms
[
n
-
1
].
get_
positions
()
))
for
n
in
range
(
1
,
len
(
ase_atoms
))]
self
.
section
.
final_displacement_maximum
=
displacements
[
np
.
amax
(
np
.
nonzero
(
displacements
)
)]
except
Exception
:
pass
...
...
Write
Preview
Supports
Markdown
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