Difference between revisions of "ALPS 2 Tutorials:DWA-01 SpecificHeat"
From ALPS
(→Using Python) |
(→Using Python) |
||
Line 63: | Line 63: | ||
'SKIP' : 400 | 'SKIP' : 400 | ||
}) | }) | ||
+ | |||
+ | input_file = pyalps.writeInputFiles('parm1a',parms) | ||
+ | res = pyalps.runApplication('dwa',input_file) |
Revision as of 15:17, 27 August 2013
Contents
Specific Heat
with fixed chemical potential
Using the command line
We consider, for instance, the parameter file parm1a that sets up, in command line, the directed worm algorithm for simulating the boson Hubbard model of a 202 lattice with square geometry.
LATTICE="square lattice" MODEL="boson Hubbard" L=20 Nmax=20 t=1. U=16. mu=32. THERMALIZATION=10000 SWEEPS=100000 SKIP=400 {T=0.7} {T=0.8} {T=0.9} {T=1.0} {T=1.1} {T=1.2} {T=1.3} {T=1.4} {T=1.5} {T=1.6} {T=1.7} {T=1.8} {T=1.9} {T=2.0}
We first convert the input parameters to XML and then run the application dwa:
parameter2xml parm1a dwa parm1a.in.xml
Using Python
To set up, in Python, the directed worm algorithm for simulating the boson Hubbard model of a 202 lattice with square geometry, we use the script tutorial1a.py, which reads
import pyalps
parms = []; for T in [0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0]: parms.append({ 'LATTICE' : "square lattice", 'MODEL' : "boson Hubbard", 'L' : 20, 'Nmax' : 20, 't' : 1., 'U' : 16., 'mu' : 32., 'T' : T, 'THERMALIZATION' : 10000, 'SWEEPS' : 100000, 'SKIP' : 400 })
input_file = pyalps.writeInputFiles('parm1a',parms) res = pyalps.runApplication('dwa',input_file)