Homepage of the CPMC-Lab Package
CPMC-Lab is a Matlab package for the constrained-path and phaseless auxiliary-field Monte Carlo methods.
This package implements the full ground-state constrained-path Monte Carlo (CPMC) method for the Hubbard model in Matlab with a graphical interface.
The package can perform calculations in finite supercells in any dimensions, under periodic or twist boundary conditions. It also includes and illustrates importance sampling and all other algorithmic details of a total energy calculation.
This open-source tool allows users to experiment with various model and run parameters and visualize the results. It provides a direct and interactive environment to learn the method and study the code with minimal overhead for setup.
The package can be easily generalized for auxiliary-field quantum Monte Carlo (AFQMC) calculations in many other models for correlated electron systems, and can serve as a template for developing a production code for AFQMC total energy calculations in real materials.
This package is distributed under the Computer Physics Communications Non-Profit Use License.
Any publications resulting from either applying or building on the present package should cite the following journal article (in addition to the relevant literature on the method):
The user must have an active Matlab installation to run the package.
To run the sample script
sample.m in an interactive Matlab session, navigate to the directory containing the script, type
sample and hit Enter or Return. User should feel free to change the input parameters in
sample.m and run the script with these new parameters.
For help, see the header of each file in the package. Alternatively, in an interactive Matlab session, type
help filename at the Matlab prompt.
This package contains 10 source files for the CPMC program, 1 GUI program, and 2 sample scripts for running the program:
CPMC_Lab.mis the main driver of the package. For every time step, it calls
stepwlk.mto propagate the walkers. When appropriate, it calls
measure.mto measure the energy,
stlbz.mto re-orthonormalize the walkers or
pop_cntrl.mto do population control. After the end of the random walk, it calculates the final average and standard error of the energy and saves the results to a file.
validation.mto conduct a basic check on the input parameters and initializes internal quantities, e.g. the total number of sites and electrons. It forms the free-electron trial wave function and creates the initial population of walkers.
validation.mverifies the basic validity of user inputs, as mentioned above.
H_K.mcreates the one-body kinetic Hamiltonian.
stepwlk.mcarries out one step of the random walk by calling
halfK.mpropagates a walker by .
V.mcarries out importance sampling site by site to select the auxiliary fields, and propagates a walker by .
measure.mcomputes the energy of a walker.
stblz.morthonormalizes walkers by the modified Gram-Schmidt algorithm.
pop_cntrl.mcarries out population control by a simple-combing method.
sample.mis a script that allows users to set input parameters.
batchsample.mis a script that loops over multiple sets of parameters.
GUI.mlaunches the graphical user interface of the package. It is a stand-alone file that is independent of all the other files in the package and contains all the subroutines of a QMC run.