Giter Club home page Giter Club logo

shci's Introduction

Arrow

>>>====> Fast Semistochastic Heat Bath Configuration Interaction (SHCI) Solver for accurate quantum simulations.

Build Status

Compilation

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.

Example Run

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.

Configurations

General

  • n_up, n_dn (required): number of up / down electrons.
  • system (required): only support chem for 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 smallest eps_var in the csv format. For the two body density matrix, the p q r s columns represent a+_p a+_q a_r a_s.
  • get_green: ๐ŸŒฑ whether calculates the green's function, default to false. If it is true, w_green gives the real part of the frequency and n_green gives the imaginary part. advanced_green determines whether calculating G- (true) or G+ (false), default to false. The Green's function matrix is returned in csv format.
  • 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 via hc_client.py. hc_client.py exposes a class called HcClient, which has three public methods: getN for getting the number of determinants, getCoefs for getting the coefficients array as a numpy array, and Hc(arr) which performs the matrix-vector multiplication on a numpy array of dtype either np.float64 or np.complex64 and returns the resulting numpy array of the same type. The HcClient accepts several optional construction options:
    • nProcs: default to 1, where the program uses all the cores on the master node. To run the hc_server across nodes, set nProcs to the number of nodes allocated to the job when creating the HcClient instance.
    • runtimePath: default to the current working directory. The config.json and FCIDUMP shall exist in the runtime path.
    • shciPath: default to the shci under 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 in src/solver/hc_server.h in case of a port conflict.
    • verbose: default to true.

๐ŸŒฑ Experimental

๐ŸŒด Experimental for the default values.

Chemistry Block chem

  • point_group (required): supports C1, C2, Cs, Ci, C2v, C2h, Coov, D2, D2h, and Dooh.
  • irreps: an array of irreducible representations. If occupations are also given, they together determine the starting determinant, otherwise, the lowest orbitals are filled. occs_up and occs_dn when specified explicitly have priority over irreps.
  • irrep_occs_up and irrep_occs_dn: occupation of each irreducible representation for up and down electrons respectively, the lowest orbitals satisfying which constitute the starting determinant. Ignored if irreps is not given.

Citations

Any papers that use Arrow should cite the following 3 papers:

"Fast semistochastic heat-bath configuration interaction", Junhao Li, Matthew Otten, Adam A. Holmes, Sandeep Sharma, and C. J. Umrigar, J. Chem. Phys., 149, 214110 (2018).

"Heat-bath configuration interaction: An efficient selected configuration interaction algorithm inspired by heat-bath sampling", Adam A. Holmes, Norm M. Tubman, and C. J. Umrigar, J. Chem. Theory Comput. 12, 3674 (2016).

"Semistochastic heat-bath configuration interaction method: selected configuration interaction with semistochastic perturbation theory", Sandeep Sharma, Adam A. Holmes, Guillaume Jeanmairet, Ali Alavi, and C. J. Umrigar, J. Chem. Theory Comput. 13, 1595 (2017).

In bibfile format:

@article{LiOttHolShaUmr-JCP-18,
Author = {Junhao Li and  Matthew Otten and Adam A. Holmes and Sandeep Sharma and C. J. Umrigar},
Title = {Fast Semistochastic Heat-Bath Configuration Interaction},
Journal = {J. Chem. Phys.},
Year = {2018},
Volume = {148},
Pages = {214110}
}

@article{ShaHolJeaAlaUmr-JCTC-17,
Author = {Sandeep Sharma and Adam A. Holmes and Guillaume Jeanmairet and Ali Alavi and C. J. Umrigar},
Title = {Semistochastic Heat-Bath Configuration Interaction Method: Selected
   Configuration Interaction with Semistochastic Perturbation Theory},
Journal = {J. Chem. Theory Comput.},
Year = {2017},
Volume = {13},
Pages = {1595-1604},
DOI = {10.1021/acs.jctc.6b01028},
}

@article{HolTubUmr-JCTC-16,
Author = {Adam A. Holmes and Norm M. Tubman and C. J. Umrigar},
Title = {Heat-bath Configuration Interaction: An efficient selected CI algorithm inspired by heat-bath sampling},
Journal = {J. Chem. Theory Comput.},
Volume = {12},
Pages = {3674-3680},
Year = {2016}}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.