VERSION>=22.02.2021
Introduction
The number of self-consistent iterations till convergence strongly depends on the quality of the starting point: the closer the initial state is to the solution, the fewer iterations it takes to converge. The W-SLDA Toolkit implements a mechanism for deriving high-quality initial states. Namely, one can use a lower-resolution lattice to generate an approximation of the solution, then interpolate onto a larger/target lattice and use it as a starting point. The idea is presented in the figure below. The same mechanism can be used to test the stability of results with respect to lattice resolution.
Automatic interpolations
Step 1: Generate a solution with an initial lattice. For example:
predefines.h
/**
* Define lattice size and lattice spacing
* */
#define NX 32
#define NY 32
#define NZ 32
#define DX (32./NX)
#define DY (32./NY)
#define DZ (32./NZ)
input.txt
outprefix l-32
checkpoint 1 # do checkpoints after each iteration
Step 2: Run the code compiled for the lattice with a larger resolution:
predefines.h
/**
* Define lattice size and lattice spacing
* */
#define NX 40
#define NY 40
#define NZ 40
#define DX (32./NX)
#define DY (32./NY)
#define DZ (32./NZ)
input.txt
inittype 5 # 5 - start from st-wslda checkpoint, inprefix points to folder with checkpoint binary file
outprefix l-40
inprefix l-32 # start with solution from smaller lattice
checkpoint 1 # do checkpoints after each iteration
Once running the code, you should see this type of message on stdout:
# INSPECTING CHECKPOINT FILE `l-32/checkpoint.dat`
# CHECKPOINT FOR 3D LATTICE: [NX,NY,NZ]=[32,32,32], [DX,DY,DZ]=[1.000,1.000,1.000], [LX,LY,LZ]=[32.000,32.000,32.000]
# !!! --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- !!!
# Resolution of the lattice has changed!
# The code will interpolate given checkpoint data to the new resolution.
# !!! --- ------- --- ------- --- ------- --- ------- --- ------- --- ------- --- !!!
# LOADING CHECKPOINT FILE `l-32/checkpoint.dat`
# CONVERTING CHECKPOINT WITH RESOLUTION [DX,DY,DZ]=[1.000,1.000,1.000] TO NEW RESOLUTION [0.800,0.800,0.800]
Changing the volume
Automatic interpolations were designed to work correctly if the spatial extent has not changed. It means that [LX,LY,LZ] is the same for the input lattice and target lattice. However, if this criterion is not satisfied, the code will attempt to load the checkpoint data, squeeze/stretch it as needed, and then interpolate onto the new lattice. Note that the result of this operation may be unpredictable. The code will provide the following warning:
# !!! --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- !!!
# Checkpoint file is incompatible with code settings!
# The code will upload the data; however, the result of this operation may be unpredictable!
# Make sure you understand what you are doing!
# !!! --- ------- --- ------- --- ------- --- ------- --- ------- --- ------- --- !!!
Disable mixing in the first iteration
For advanced functionals that have a dependence on quantities that are cut-off dependent, it is recommended to disable mixing in the first iteration.
