Trisurf Monte Carlo simulator
Samo Penic
2016-05-15 e1b97dcc9d4ad47bf4ceab66466fde2ce895cbe0
commit | author | age
9f5ff5 1 from trisurf import tsmgr
SP 2 from trisurf import trisurf
3
3d0247 4
SP 5 #Simple example how to start simulation from a previos snapshot
9f5ff5 6 run1=trisurf.Runner(snapshot='snapshot.vtu')
SP 7 run1.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
8 run1.setSubdir("run0")
9
3d0247 10 #Example how to start simulation from tape. Extra argument in runArgs will be passed to trisurf executable (meaning that simulation will always start from the beginning (bipyramid) ignoring the fact that some states may have been calculated already)
9f5ff5 11 run2=trisurf.Runner(tape='tape', runArgs=['--force-from-tape'])
SP 12 run2.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
13 run2.setSubdir("run1")
14
3d0247 15 #Example of programatical setup of 4 runs
SP 16 pRun=[]
17 for i in range(0,4): #0,1,2,3
18     tpRun=trisurf.Runner(tape='tape')
19     tpRun.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
20     tpRun.setSubdir("programatical_"+str(i))
21     pRun.append(tpRun)
9f5ff5 22
SP 23
3d0247 24 #obligatory final configuration step: combine all runs
SP 25 Runs=[run1,run2]+pRun
26 #start manager with configured runs
9f5ff5 27 tsmgr.start(Runs)
SP 28