Trisurf Monte Carlo simulator
Samo Penic
2016-05-15 38cb4ac927272256b636c014a9aec1a119958fb6
commit | author | age
38cb4a 1 #!/usr/bin/python3
9f5ff5 2 from trisurf import tsmgr
SP 3 from trisurf import trisurf
4
3d0247 5
SP 6 #Simple example how to start simulation from a previos snapshot
9f5ff5 7 run1=trisurf.Runner(snapshot='snapshot.vtu')
SP 8 run1.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
9 run1.setSubdir("run0")
10
3d0247 11 #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 12 run2=trisurf.Runner(tape='tape', runArgs=['--force-from-tape'])
SP 13 run2.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
14 run2.setSubdir("run1")
15
3d0247 16 #Example of programatical setup of 4 runs
SP 17 pRun=[]
18 for i in range(0,4): #0,1,2,3
19     tpRun=trisurf.Runner(tape='tape')
20     tpRun.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
21     tpRun.setSubdir("programatical_"+str(i))
22     pRun.append(tpRun)
9f5ff5 23
SP 24
3d0247 25 #obligatory final configuration step: combine all runs
SP 26 Runs=[run1,run2]+pRun
27 #start manager with configured runs
9f5ff5 28 tsmgr.start(Runs)
SP 29