git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4913 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2010-09-30 21:24:52 +00:00
parent b0e9777544
commit 0d0fd0afac
4 changed files with 87 additions and 1 deletions

31
tools/python/neb2.py Executable file
View File

@ -0,0 +1,31 @@
#!/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
from dump import dump
if not globals().has_key("argv"): argv = sys.argv
if len(argv) < 5:
print "Syntax: neb2.py dfinal dfile1 dfile2 ..."
sys.exit()
dfinal = argv[1]
files = 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