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