Could you help me to reproduce the problem from quantum mechanics textbook by means of QMC and Casino?
I attach two files for Casino: Input and expot.data
The last file contains the finite “square” potential well of 1 a.u. depth and 3 a.u. width. The shift is made to get zero energy at r=0.
The input file should define a system containing a free electron in this external potential without any nuclei.
I believe that I missed something because I did not get the correct answer after DMC equilibration. According to known formulae (attached as a file for matlab or octave, and which seem to be correct to me) I should get about 0.35 a.u., while I get 0.85 a.u. from Casino.
So, where am I wrong?
Thanks for any ideas.
P.S. Can't attach any files to this message, here they are:
input:
Code: Select all
#-------------------#
# CASINO input file #
#-------------------#
# free e- in potential well
# SYSTEM
neu : 0 #*! Number of up-spin electrons (Integer)
ned : 0 #*! Number of down-spin electrons (Integer)
nhu : 0 #*! Number of up-spin holes (Integer)
nhd : 0 #*! Number of down-spin holes (Integer)
atom_basis_type : none #*! Basis set type (Text)
periodic : T #*! Periodic boundary conditions (Boolean)
psi_s : none #*! Type of [anti]symmetrizing wfn (Text)
complex_wf : F #*! Wave function real or complex (Boolean)
%block free_particles
dimensionality 3
r_s 100
cell_geometry
1 0 0
0 1 0
0 0 1
particle 1 det 1 : 1 orbitals free expot 1
%endblock free_particles
%block initial_config
1 1 0 0 0
%endblock initial_config
# RUN
runtype : dmc_dmc #*! Type of calculation (Text)
newrun : T #*! New run or continue old (Boolean)
testrun : F #*! Test run flag (Boolean)
block_time : 0.0 s #*! VMC/DMC block time (Physical)
# VMC
vmc_equil_nstep : 500 #*! Number of equilibration steps (Integer)
vmc_nstep : 5000 #*! Number of steps (Integer)
vmc_nblock : 10 #*! Number of checkpoints (Integer)
vmc_nconfig_write : 1000 #*! Number of configs to write (Integer)
vmc_decorr_period : 3 #*! Decorrelation loop length (Integer)
vmc_ave_period : 1 #*! vmc.hist reduction factor (Integer)
dtvmc : 0.1d0 #*! VMC time step (Real)
# DMC
dmc_equil_nstep : 10000 #*! Number of equil steps (Integer)
dmc_equil_nblock : 10 #*! Number of checkpoints (Integer)
dmc_stats_nstep : 10000 #*! Number of stats accum steps (Integer)
dmc_stats_nblock : 10 #*! Number of checkpoints (Integer)
dmc_target_weight : 1000
dtdmc : 0.01d0 #*! DMC time step (Real)
dmc_ave_period : 1 #*! dmc.hist reduction factor (Integer)
dmc_decorr_period : 1 #*! DMC correlation period (Integer)
# OPTIMIZATION
opt_method : varmin #*! Opt method (varmin/varmin_linjas/emin)
opt_jastrow : F #*! Optimize Jastrow factor (Boolean)
opt_cycles : 1 #*! Number of optimization cycles (Integer)
opt_maxeval : 200 #*! VM max evaluations (Integer)
opt_maxiter : 10 #*! VM max iterations (Integer)
# GENERAL PARAMETERS
interaction : none #*! Interaction type (Text)
use_jastrow : F #*! Use a Jastrow function (Boolean)
use_gjastrow : F #*! Use General Jastrow function (Boolean)
expot : T #*! Use external potential (Boolean)
# EXPECTATION VALUES
density : F #*! Accumulate density (Boolean)
expval_cutoff : 30.d0 hartree #*! G vector cutoff for expval (Physical)
# BLOCK INPUT
Code: Select all
START HEADER
This is an example expot.data file
END HEADER
START VERSION
1
END VERSION
START EXPOT
Title
1 square well for e-
Number of sets
2
START SET 1
Periodicity
APERIODIC
Type of representation
SQUARE
Direction
ISOTROPIC
Number of such potentials to add
1
Origin(s)
0.0 0.0 0.0
Potential
Width (au)
3d0
Height (au)
-1.0d0
END SET 1
START SET 2
Periodicity
APERIODIC
Type of representation
ANALYTIC
Direction
ISOTROPIC
Number of such potentials to add
1
Origin(s)
0.0 0.0 0.0
Potential
Function type and defining parameters [(choose one; extra types definable)]
HARMONIC 0.0d1 1.0d0
END SET 2
END EXPOT
Code: Select all
clear all;
U=1;
R=3;
f=@(E) tan(sqrt(2*E)*R)+sqrt(E/(U-E));
x = fzero(f,(pi^2/(8*R^2) + pi^2/(2*R^2))/2);
Em=-0:0.01:1;
Xm=f(Em);
plot(Em,Xm,'b-',x,0,'r.',[pi^2/(8*R^2) pi^2/(2*R^2)],[0 0],'g*');
x
%approximation
U0=(pi^2/(8*R^2));
E=U0*(2-sqrt(U0/U))^2;
E
% infinite well, R->infty
pi^2/(2*R^2)
% for R=3 U=1: x =
%
% 0.3497
%
%
%E =
%
% 0.3641