>>>====> Fast Semistochastic Heat Bath Configuration Interaction Solver for accurate quantum simulations.
Make sure you have installed MPI.
git clone --recursive https://github.com/jl2922/shci
cd shci
make -j
--recursive will download all the dependencies from Github recursively.
An example carbon atom calculation inputs is provided with the code.
cp FCIDUMP.example FCIDUMP
cp config.json.example config.json
mpirun -n 1 ./shci
To run other systems, you will have to obtain an FCIDUMP file and modify the values in config.json accordingly.
Many software packages can generate FCIDUMP, such as PySCF and Molpro.
n_up,n_dn(required): number of up / down electrons.system(required): only supportchemfor now.eps_vars(required): an array of variational epsilons from big to small.occs_up: occupied orbitals for the starting up determinant, default to lowest ones.occs_dn: occupied orbitals for the starting dn determinant, default to lowest ones.eps_vars_schedule: 🌴 an array of additional variational epsilons run beforehand for a better selection of determinants, default to an empty array.target_error: 🌴 target error for stochastic perturbation, default to 1.0e-5.var_only: only run variation, default to false.force_var: run variation even if valid wavefunction files already exists, default to false.var_sd: 🌴 include all singles and doubles excitation, i.e. at least CISD, default to false.get_pair_contrib: 🌴 calculate occupied pair contribution, default to false.eps_pt: 🌴 perturbation epsilon, default to eps_var / 5000.eps_pt_psto: 🌴 pseudo stochastic perturbation epsilon, default to eps_var / 500.eps_pt_dtm: 🌴 deterministic perturbation epsilon, default to eps_var / 50.max_pt_iteration: 🌴 maximum stochastic perturbation iterations, default to 100.n_batches_pt_sto: 🌴 number of batches for stochastic perturbation, default to 16.n_samples_pt_sto: 🌴 number of samples for stochastic perturbation, default to choose based on available system memory.random_seed: for stochastic perturbation, default to the current timestamp.time_sym: 🌴 whether turns on time reversal symmetry, default to false.s2: 🌴 whether calculates s squared, default to false.natorb: whether generates natural orbitals FCIDUMP, default to false.load_integrals_cache: whether loads FCIDUMP information from integrals_cache, default to false.get_1rdm_csv,get_2rdm_csv: 🌱 whether calculates the density matrices, default to false. If it is true, the program outputs density matrices for the smallesteps_varin thecsvformat. For the two body density matrix, thep q r scolumns representa+_p a+_q a_r a_s.get_green: 🌱 whether calculates the green's function, default to false. If it is true,w_greengives the real part of the frequency andn_greengives the imaginary part.advanced_greendetermines whether calculating G- (true) or G+ (false), default to false. The Green's function matrix is returned incsvformat.hc_server_mode: 🌱 operates as an H * c server, default to false. If it is true, the program serves as an RPC server for performing H * c matrix-vector multiplication after finishing the matrix reconstruction. It can work with any language that supports direct socket IO. A python client interface / demo is provided viahc_client.py.hc_client.pyexposes a class calledHcClient, which has three public methods:getNfor getting the number of determinants,getCoefsfor getting the coefficients array as a numpy array, andHc(arr)which performs the matrix-vector multiplication on a numpy array ofdtypeeithernp.float64ornp.complex64and returns the resulting numpy array of the same type. TheHcClientaccepts several optional construction options:nProcs: default to 1, where the program uses all the cores on the master node. To run thehc_serveracross nodes, setnProcsto the number of nodes allocated to the job when creating theHcClientinstance.runtimePath: default to the current working directory. Theconfig.jsonandFCIDUMPshall exist in the runtime path.shciPath: default to theshciunder the current working directory, probably needs to be changed to the actual path of the program.port: default to 2018. Change it together with the value insrc/solver/hc_server.hin case of a port conflict.verbose: default to true.
🌱 Experimental
🌴 Experimental for the default values.
point_group(required): supportsC1,C2,Cs,Ci,C2v,C2h,Coov,D2,D2h, andDooh.irreps: an array of irreducible representations. If occupations are also given, they together determine the starting determinant, otherwise, the lowest orbitals are filled.occs_upandoccs_dnwhen specified explicitly have priority over irreps.irrep_occs_upandirrep_occs_dn: occupation of each irreducible representation for up and down electrons respectively, the lowest orbitals satisfying which constitute the starting determinant. Ignored ifirrepsis not given.
Li, Junhao, Matthew Otten, Adam A. Holmes, Sandeep Sharma, and Cyrus J. Umrigar. "Fast semistochastic heat-bath configuration interaction." The Journal of chemical physics 149, no. 21 (2018): 214110.
Holmes, Adam A., Norm M. Tubman, and C. J. Umrigar. "Heat-bath configuration interaction: An efficient selected configuration interaction algorithm inspired by heat-bath sampling." Journal of chemical theory and computation 12, no. 8 (2016): 3674-3680.
Sharma, Sandeep, Adam A. Holmes, Guillaume Jeanmairet, Ali Alavi, and Cyrus J. Umrigar. "Semistochastic heat-bath configuration interaction method: selected configuration interaction with semistochastic perturbation theory." Journal of chemical theory and computation 13, no. 4 (2017): 1595-1604.