# just proc 0 handles reading of dump file and viz if me == 0: tkroot = None try: import Tkinter except: import tkinter as Tkinter tkroot = Tkinter.Tk() tkroot.withdraw() from dump import dump from gl import gl d = dump("tmp.dump",0) g = gl(d) d.next() d.unscale() g.zoom(1) g.shift(0,0) g.rotate(0,270) g.q(10) g.box(1) g.show(ntimestep) # run nfreq steps at a time w/out pre/post, read dump snapshot, display it while ntimestep < nsteps: lmp.command("run %d pre no post no" % nfreq) ntimestep += nfreq if me == 0:
# wrapper on GL window via Pizza.py gl tool # just proc 0 handles reading of dump file and viz if me == 0: try: from Tkinter import * except: from tkinter import * tkroot = Tk() tkroot.withdraw() from dump import dump from gl import gl d = dump("tmp.dump", 0) g = gl(d) d.next() d.unscale() g.zoom(1) g.shift(0, 0) g.rotate(0, 270) g.q(10) g.box(1) g.show(ntimestep) # display GUI with run/stop buttons and slider for temperature if me == 0: try: from Tkinter import * except: