Commit 97f42347 authored by Francois Gygi's avatar Francois Gygi
Browse files

updated for multiple input files

git-svn-id: cba15fb0-1239-40c8-b417-11db7ca47a34
parent cb6d8a38
# compute mean-square displacement in an MD simulation
# generate plot of <r^2>(t) in gnuplot format
# use: species file.r [file.r ...]
# compute the mean-square displacement of atoms of a given species
# generate plot of <r^2(t)> in gnuplot format
# use: species file.r
import xml.sax
import sys
import math
if len(sys.argv) < 3:
print "use: ",sys.argv[0]," species file [file ...]"
if len(sys.argv) != 3:
print "use: ",sys.argv[0]," species file.r"
species = sys.argv[1]
infile = sys.argv[2]
# Qbox output handler to extract and process data
class QboxOutputHandler(xml.sax.handler.ContentHandler):
......@@ -56,13 +57,10 @@ class QboxOutputHandler(xml.sax.handler.ContentHandler):
print self.step,'%12.6f'%(disp2sum/len(self.tau))
self.step += 1
print "# ",species
print "# ",species,infile
parser = xml.sax.make_parser()
handler = QboxOutputHandler()
for i in range(len(sys.argv)-2):
infile = sys.argv[i+2]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment