Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91255423
neb2.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 9, 09:59
Size
801 B
Mime Type
text/x-python
Expires
Mon, Nov 11, 09:59 (2 d)
Engine
blob
Format
Raw Data
Handle
22230816
Attached To
rLAMMPS lammps
neb2.py
View Options
#!/usr/local/bin/python
# combine final snapshots from multiple NEB dump files into 1 dump file
# Syntax: neb2.py dfinal dfile1 dfile2 ...
# dfinal = new combined dump file
# dfile1, dfile2, ... = NEB output dump files from each replica,
# in correct order
# for M replicas, final snapshots are renumbered in final file from 1 to M
import
sys
,
os
path
=
os
.
environ
[
"LAMMPS_PYTHON_TOOLS"
]
sys
.
path
.
append
(
path
)
from
dump
import
dump
if
len
(
sys
.
argv
)
<
5
:
print
"Syntax: neb2.py dfinal dfile1 dfile2 ..."
sys
.
exit
()
dfinal
=
sys
.
argv
[
1
]
files
=
sys
.
argv
[
2
:]
if
os
.
path
.
exists
(
dfinal
):
os
.
remove
(
dfinal
)
n
=
1
for
file
in
files
:
one
=
dump
(
file
)
t
=
one
.
time
()
one
.
tselect
.
one
(
t
[
-
1
])
one
.
snaps
[
-
1
]
.
time
=
n
one
.
write
(
dfinal
,
1
,
1
)
n
+=
1
Event Timeline
Log In to Comment