Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
cee32cd5
Commit
cee32cd5
authored
Jul 09, 2020
by
Remi Perenon
Browse files
Dealing with unordered LAMMPS files
parent
4755ad1f
Pipeline
#8012
passed with stages
in 35 minutes and 13 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Src/Framework/Jobs/LAMMPS.py
View file @
cee32cd5
...
...
@@ -228,7 +228,7 @@ class LAMMPSConverter(Converter):
for
i
,
_
in
enumerate
(
range
(
self
.
_itemsPosition
[
"ATOMS"
][
0
],
self
.
_itemsPosition
[
"ATOMS"
][
1
])):
temp
=
self
.
_lammps
.
readline
().
split
()
idx
=
self
.
_nameToIndex
[
self
.
_rankToName
[
i
]]
idx
=
self
.
_nameToIndex
[
self
.
_rankToName
[
i
nt
(
temp
[
0
])
-
1
]]
conf
.
array
[
idx
,:]
=
numpy
.
array
([
temp
[
self
.
_x
],
temp
[
self
.
_y
],
temp
[
self
.
_z
]],
dtype
=
numpy
.
float64
)
if
self
.
_fractionalCoordinates
:
...
...
@@ -336,7 +336,7 @@ class LAMMPSConverter(Converter):
idx
=
int
(
temp
[
self
.
_id
])
-
1
ty
=
int
(
temp
[
self
.
_type
])
name
=
"%s%d"
%
(
self
.
_lammpsConfig
[
"elements"
][
ty
],
idx
)
self
.
_rankToName
[
i
]
=
name
self
.
_rankToName
[
i
nt
(
temp
[
0
])
-
1
]
=
name
g
.
add_node
(
idx
,
element
=
self
.
_lammpsConfig
[
"elements"
][
ty
],
atomName
=
name
)
if
self
.
_lammpsConfig
[
"n_bonds"
]
is
not
None
:
...
...
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