ALPS 2 Tutorials:DWA-02 Density Profile

From ALPS
Revision as of 21:41, 13 September 2013 by Tamama (talk | contribs) (Created page with "The DWA code is itself marvellous in being able to handle very robust simulation sizes. As a first example, we first look at one specific parameter input that resembles the exper…")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The DWA code is itself marvellous in being able to handle very robust simulation sizes. As a first example, we first look at one specific parameter input that resembles the experiments.

Step 1: The usual business

import pyalps;
import pyalps.dwa;

Step 2: Preparing the parameter file

tof_phase = pyalps.dwa.tofPhase(time_of_flight=15.5, wavelength=[843,765,765], mass=86.99)

params=[]
params.append(

  { 'LATTICE'         : 'inhomogeneous simple cubic lattice'   # Refer to <lattice.xml> from ALPS Lattice Library
  , 'MODEL'           : 'boson Hubbard'                        # Refer to <model.xml>   from ALPS Model Library

  , 'L'               : 100                # Length aspect of lattice               
  , 'Nmax'            : 20                 # Maximum number of bosons on each site

  , 't'               : 1.                 # Hopping
  , 'U'               : 8.11               # Onsite Interaction
  , 'T'               : 1.                 # Temperature
  , 'mu_homogeneous'  : 4.05               # Chemical potential (homogeneous) 
  , 'mu'              : 'mu_homogeneous - (0.0073752*(x-(L-1)/2.)*(x-(L-1)/2.) + 0.0036849*(y-(L-1)/2.)*(y-(L-1)/2.) + 0.0039068155*(z-(L-1)/2.)*(z-(L-1)/2.))'

  , 'tof_phase'       :  str(tof_phase) 
  
  , 'SWEEPS'          : 100000             # Total number of sweeps
  , 'SKIP'            : 100                # Number of sweeps before measurement (You don't need to measure too often!)  
  }

)
h5_infiles = pyalps.writeInputH5Files("parm9f",params);

or simply if existent,

h5_infiles = pyalps.getInputH5Files(prefix='parm9f');

Have a preliminary taste:

pyalps.runApplication('dwa', h5_infiles[0]);

Detailed step by step instruction for running this example is illustrated here.