Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions applications/qmc/dwa/dwa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,29 @@ void
<< "\n* DEALINGS IN THE SOFTWARE."
<< "\n*"
<< "\n*****************************************************************************/"
<< "\n\n";
<< "\n\n"
<< "\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
<< "\n\n"
<< "\n! WARNING WARNING WARNING "
<< "\n\n"
<< "\n! This code is deprecated and will be removed in a future version of ALPS. "
<< "\n! Meanwhile, we refer to an open source code with similar functionality which "
<< "\n! can be found here: "
<< "\n! N. Sadoune and L. Pollet, Efficient and scalable path integral Monte Carlo "
<< "\n! simulations with worm-type updates for Bose-Hubbard and XXZ models "
<< "\n! https://scipost.org/SciPostPhysCodeb.9 "
<< "\n! doi:10.21468/SciPostPhysCodeb.9 "
<< "\n! doi:10.21468/SciPostPhysCodeb.9-r1.0 "
<< "\n! https://github.com/LodePollet/worm "
<< "\n!"
<< "\n! Note that for the ALPS DWA code I currently cannot guarantee the results of "
<< "\n! the momentum distribution nor of the TOF images. Only real space densities "
<< "\n! and quantities such as the winding number have been tested for on-site "
<< "\n! interactions. "
<< "\n! Contact: Lode Pollet <Lode.Pollet@lmu.de> "
<< "\n\n"
<< "\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
<< "\n\n\n\n";
}

void
Expand Down Expand Up @@ -999,9 +1021,9 @@ void
std::cout << " Valid : ";
#endif

std::cout << "Checkpoint Sweep " << _sweep_counter
<< " ... Probability : " << probability_worm_insertion() << " / " << probability_bounce()
;
//std::cout << "Checkpoint Sweep " << _sweep_counter
// << " ... Probability : " << probability_worm_insertion() << " / " << probability_bounce()
// ;

// measurements
if (measure_)
Expand All @@ -1014,11 +1036,11 @@ void
if (measure_simulation_speed_)
{
std::time(&_simulation_timer.second);
std::cout << " ... speed = " << std::difftime(_simulation_timer.second, _simulation_timer.first);
//std::cout << " ... speed = " << std::difftime(_simulation_timer.second, _simulation_timer.first);
std::time(&_simulation_timer.first);
}

std::cout << "\n";
//std::cout << "\n";
}

void
Expand Down
6 changes: 3 additions & 3 deletions lib/pyalps/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def plot3D(sets, centeredAtOrigin=False, layer=None):
if len(shape) < 2 or len(shape) > 3:
return;

x = np.arange(shape[0]);
y = np.arange(shape[1]);
x = np.arange(shape[0], dtype = float);
y = np.arange(shape[1], dtype = float);
if centeredAtOrigin:
x -= (shape[0]-1)/2.
y -= (shape[1]-1)/2.
Expand All @@ -162,7 +162,7 @@ def plot3D(sets, centeredAtOrigin=False, layer=None):
if layer == None: # column integrate
Z = np.sum(Z, axis=2);
elif layer == "center":
Z = Z[:,:,shape[2]/2]
Z = Z[:,:,shape[2]//2]
else:
Z = Z[:,:,layer]

Expand Down
Binary file removed tutorials/dwa-01-bosons/dwa-01-bosons.vt
Binary file not shown.
2 changes: 1 addition & 1 deletion tutorials/dwa-01-bosons/parm1b
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Nmax = 2;
U = 1.0;
mu = 0.5;

T = 0.05;
T = 0.1;

SWEEPS=2000000;
THERMALIZATION=150000;
Expand Down
Binary file not shown.
27 changes: 14 additions & 13 deletions tutorials/dwa-02-density-profile/parm2a
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
LATTICE="inhomogeneous simple cubic lattice"
L=120
LATTICE="inhomogeneous simple cubic lattice";
L=21;

MODEL="boson Hubbard"
Nmax=20

t=1.
U=8.11
mu="4.05 - (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.))"
MODEL="boson Hubbard";
Nmax=5;

THERMALIZATION=1500
SWEEPS=7000
SKIP=50
t=1.;
U=8.11;
mu="4.05 - (0.2*(x-(L-1)/2.)*(x-(L-1)/2.) + 0.2*(y-(L-1)/2.)*(y-(L-1)/2.) + 0.2*(z-(L-1)/2.)*(z-(L-1)/2.))";

MEASURE[Local Density]=1

{ T=1. }
THERMALIZATION=2000;
SWEEPS=20000;
SKIP=10;

MEASURE[Local Density]=1;

{ T=1.; }
27 changes: 14 additions & 13 deletions tutorials/dwa-02-density-profile/parm2b
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
LATTICE="inhomogeneous simple cubic lattice"
L=60
LATTICE="inhomogeneous simple cubic lattice";
L=21;

MODEL="boson Hubbard"
Nmax=20

t=1.
U=60.
mu="40. - (0.09416*(x-(L-1)/2.)*(x-(L-1)/2.) + 0.12955*(y-(L-1)/2.)*(y-(L-1)/2.) + 0.11496*(z-(L-1)/2.)*(z-(L-1)/2.))"
MODEL="boson Hubbard";
Nmax=5;

THERMALIZATION=1000000
SWEEPS=3000000
SKIP=1000
t=1.;
U=60;
mu="30.0 - (0.2*(x-(L-1)/2.)*(x-(L-1)/2.) + 0.2*(y-(L-1)/2.)*(y-(L-1)/2.) + 0.2*(z-(L-1)/2.)*(z-(L-1)/2.))";

MEASURE[Local Density]=1

{ T=1. }
THERMALIZATION=100000;
SWEEPS=2000000;
SKIP=1000;

MEASURE[Local Density]=1;

{ T=1.; }
12 changes: 6 additions & 6 deletions tutorials/dwa-02-density-profile/tutorial2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@
parms = [
{
'LATTICE' : 'inhomogeneous simple cubic lattice' ,
'L' : 120 ,
'L' : 21 ,

'MODEL' : 'boson Hubbard' ,
'Nmax' : 20 ,
'Nmax' : 5 ,

't' : 1. ,
'U' : 8.11 ,
'mu' : '4.05 - (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.))' ,
'mu' : '4.05 - (0.2*(x-(L-1)/2.)*(x-(L-1)/2.) + 0.2*(y-(L-1)/2.)*(y-(L-1)/2.) + 0.2*(z-(L-1)/2.)*(z-(L-1)/2.))' ,

'T' : 1. ,

'THERMALIZATION' : 1500 ,
'SWEEPS' : 7000 ,
'SKIP' : 50 ,
'THERMALIZATION' : 2000,
'SWEEPS' : 20000,
'SKIP' : 10,

'MEASURE[Local Density]': 1
}
Expand Down
10 changes: 5 additions & 5 deletions tutorials/dwa-02-density-profile/tutorial2b.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
parms = [
{
'LATTICE' : 'inhomogeneous simple cubic lattice' ,
'L' : 60 ,
'L' : 21 ,

'MODEL' : 'boson Hubbard' ,
'Nmax' : 20 ,
'Nmax' : 5 ,

't' : 1. ,
'U' : 60. ,
'mu' : '40. - (0.09416*(x-(L-1)/2.)*(x-(L-1)/2.) + 0.12955*(y-(L-1)/2.)*(y-(L-1)/2.) + 0.11496*(z-(L-1)/2.)*(z-(L-1)/2.))' ,
'mu' : '30. - (0.2*(x-(L-1)/2.)*(x-(L-1)/2.) + 0.2*(y-(L-1)/2.)*(y-(L-1)/2.) + 0.2*(z-(L-1)/2.)*(z-(L-1)/2.))' ,

'T' : 1. ,

'THERMALIZATION' : 1000000 ,
'SWEEPS' : 3000000 ,
'THERMALIZATION' : 100000 ,
'SWEEPS' : 2000000 ,
'SKIP' : 1000 ,

'MEASURE[Local Density]': 1
Expand Down
Loading