///////////////////////////////////////////////////////////////////////////// // // // Quadratic Monte Carlo Method // // // // Burkhard Militzer Berkeley 03-08-23 // // // ///////////////////////////////////////////////////////////////////////////// (1) Compile our QMC code by typing "make" machine:~/CMS_MC_test_03-08-23a> make g++ -O3 -Wall -pedantic -funroll-loops -DRING Standard.C Main.C Form.C Timer.C PrintErrorBar.C -lm -o ring g++ -O3 -Wall -pedantic -funroll-loops -DHARMONIC Standard.C Main.C Form.C Timer.C PrintErrorBar.C -lm -o harm g++ -O3 -Wall -pedantic -funroll-loops -DROSENBROCK Standard.C Main.C Form.C Timer.C PrintErrorBar.C -lm -o rosen ------------------------------------------------------------------------------------------------------------------- (2) Run test of harmonic potential in tcsh set index = 58 set T = 0.01 set n = 6 set a = 1.5 harm -affine n=$n a=$a T=${T} nBlocks=100000 > affine${index}_${T}_${n}_${a}.txt & harm -qmc n=$n a=$a T=${T} nBlocks=100000 > qmcLin${index}_${T}_${n}_${a}.txt & harm -qmc -Gaussian n=$n a=$a T=${T} nBlocks=100000 > qmcGau${index}_${T}_${n}_${a}.txt & # Compare the output with the following results. The MC average of E should be close to 0.5*n*T = 0.03 grep "Fraction= 0.9" *58_*.txt affine58_0.01_6_1.5.txt: Fraction= 0.9 n= 90000 E= 0.03000173 +- 0.00001369 qmcGau58_0.01_6_1.5.txt: Fraction= 0.9 n= 90000 E= 0.03003602 +- 0.00001169 qmcLin58_0.01_6_1.5.txt: Fraction= 0.9 n= 90000 E= 0.02999435 +- 0.00001152 ------------------------------------------------------------------------------------------------------------------- (3) Perform calculations for the ring potential, again with tcsh machine:~/CMS_MC_test_03-08-23a> tcsh set index = 57 set T = 0.01 set n = 6 set a = 1.5 set m = 6 set R = 1.0 ring -low -affine m=$m n=$n a=$a T=${T} R=${R} nBlocks=100000 > affine${index}_${T}_${n}_${m}_${a}_${R}.txt & ring -low -qmc m=$m n=$n a=$a T=${T} R=${R} nBlocks=100000 > qmcLin${index}_${T}_${n}_${m}_${a}_${R}.txt & ring -low -qmc -Gaussian m=$m n=$n a=$a T=${T} R=${R} nBlocks=100000 > qmcGau${index}_${T}_${n}_${m}_${a}_${R}.txt & # Compare the output with the following. The MC averages will not agree perfectly. machine:~/CMS_MC_test_03-08-23a> grep "Fraction= 0.9" *57_*.txt affine57_0.01_6_6_1.5_1.0.txt: Fraction= 0.9 n= 90000 E= -0.00031481 +- 0.00007970 qmcGau57_0.01_6_6_1.5_1.0.txt: Fraction= 0.9 n= 90000 E= -0.00030795 +- 0.00004486 qmcLin57_0.01_6_6_1.5_1.0.txt: Fraction= 0.9 n= 90000 E= -0.00026504 +- 0.00003554 ------------------------------------------------------------------------------------------------------------------- (4) To evaluate the performance of our MODIFIED WALK moves, we recommend machine:~/CMS_MC_test_03-08-23a> tcsh set index = 199 set T = 1.0 foreach nWalkers (3 4 5 6 8 10 20) set para = "T=$T nStepsPerBlock=1000 nBlocks=100000 nWalkers=${nWalkers}" foreach nMovers (3 4 5 6 10) foreach a (1.2 1.5 2.0 3.0) rosen -walk $para nMovers=$nMovers a=$a > walk${index}_${nWalkers}_${nMovers}_${a}.txt & end end end ------------------------------------------------------------------------------------------------------------------- (5) To understand the implementation of our QMC method, we recommend opening the file "MC.h" and reading the function PerformOneQuadraticMonteCarloSweep(...)