Files
LPP/examples/test_mdump.py
ckloss 80592c0da1 Committer: ckloss <ckloss@fluid38.(none)>
On branch master
 Initial commit for lpp, version 2011-10-11
2012-02-03 14:10:31 +01:00

36 lines
666 B
Python

# simple test of mdump tool
# requires files/mesh.grain
# creates tmp.* files
m = mdump("files/mesh.grain")
m.tselect.none()
m.tselect.one(200)
m.tselect.all()
m.tselect.skip(2)
m.tselect.all()
m.tselect.test("$t >= 100 and $t <= 200")
m.delete()
print "Time",m.time()
m.map(2,"spin")
m.etype = "spin"
flag = 0
while 1:
index,time,flag = m.iterator(flag)
if flag == -1: break
time,box,atoms,bonds,tris,lines = m.viz(index)
colors = [tri[1] for tri in tris]
print time,colors
m = dump("files/mesh.grain",0)
while 1:
time = m.next()
if time < 0: break
print "Incrementally read snaps =",m.nsnaps
print "all done ... type CTRL-D to exit Pizza.py"