Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80654724
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
Sun, Sep 1, 22:13
Size
801 B
Mime Type
text/x-python
Expires
Tue, Sep 3, 22:13 (2 d)
Engine
blob
Format
Raw Data
Handle
20414176
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