Package: block2
block2The block2 code provides an efficient highly scalable
implementation of the Density Matrix Renormalization Group (DMRG) for quantum chemistry,
based on Matrix Product Operator (MPO) formalism.The block2 code is developed as an improved version ofStackBlock,
where the low-level structure of the code has been completely rewritten.
The block2 code is developed and maintained in Garnet Chan group at Caltech.Main contributors:Huanchen Zhai@hczhai: DMRG and parallelizationHenrik R. Larsson@h-larsson: DMRG-MRCI/MRPT, large site, Green's function in frequency and time for finite temp.Seunghoon Lee@seunghoonlee89: Stochastic perturbative DMRGZhi-Hao Cui@zhcui: User interfaceIf you find this package useful for your scientific research, please cite the work as:Zhai, H.; Larsson, H. R.; Lee, S.; Cui, Z.; Zhu, T.; Sun, C.; Peng, L.; Peng, R.; Liao, K.; Tölle, J.; Yang, J.; Li, S.; Chan, G. K. L. Block2: a comprehensive open source framework to develop and apply state-of-the-art DMRG algorithms in electronic structure and beyond. arXiv preprintarXiv:2310.03920.For parallel ab initio DMRG, please citeZhai, H., Chan, G. K. L. Low communication high performance ab initio density matrix renormalization group algorithms.The Journal of Chemical Physics2021,154, 224116, doi:10.1063/5.0050902.For the large site code, please citeLarsson, H. R., Zhai, H., Gunst, K., Chan, G. K. L. Matrix product states with large sites.Journal of Chemical Theory and Computation2022,18, 749-762,  doi:10.1021/acs.jctc.1c00957.You can find a bibtex file inCITATIONS.bib.One can installblock2usingpip:OpenMP-only version (no MPI dependence)pip install block2Hybrid openMP/MPI version (requiring openMPI 4.1.x)pip install block2-mpiBinary format is prepared viapipfor python 3.7, 3.8, 3.9, 3.10, and 3.11 with macOS (x86 and arm64, no-MPI) or Linux (no-MPI/openMPI). If these binaries have some problems, you can use the--no-binaryoption ofpipto force building from source (for example,pip install block2 --no-binary block2).One should only install one ofblock2andblock2-mpi.block2-mpicovers all features inblock2, but its dependence on mpi library can sometimes be difficult to deal with. Some guidance for resolving environment problems can be found in issue#7andhere.To install the most recent development version, use:pip install block2==<version> --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/
pip install block2-mpi==<version> --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/where<version>can be some development version number like0.5.2rc13. To force reinstalling an updated version, you may considerpipoptions--upgrade --force-reinstall --no-deps --no-cache-dir.The detailed instructions on manual installation can be foundhere.To run a DMRG calculation using the command line interface, please use the following command:block2main dmrg.conf > dmrg.outwheredmrg.confis theStackBlockstyle input file anddmrg.outcontains the outputs.
Example input files can be foundhere.For DMRGSCF calculation, please have a look athere.For a list of DMRG references for methods implemented inblock2, see:https://block2.readthedocs.io/en/latest/user/references.htmlDocumentation:https://block2.readthedocs.io/en/latest/Tutorial (python interface):https://block2.readthedocs.io/en/latest/tutorial/qc-hamiltonians.htmlSource code:https://github.com/block-hczhai/block2-previewFor a simplified implementation of ab initio DMRG, seepyblock3. Data can be imported and exported betweenblock2andpyblock3, seehttps://github.com/block-hczhai/block2-preview/discussions/35.FeaturesState symmetryU(1) particle number symmetrySU(2) or U(1) spin symmetry (spatial orbital)No spin symmetry (general spin orbital)Abelian point group symmetryTranslational (K point) / Lz symmetrySweep algorithms (1-site / 2-site / 2-site to 1-site transition)Ground-State DMRGDecomposition types: density matrix / SVDNoise types: wavefunction / density matrix / perturbativeMulti-Target Excited-State DMRGState-averaged / state-specificMPS compression / additionExpectationImaginary / real time evolutionHermitian / non-Hermitian HamiltonianTime-step targeting methodTime dependent variational principle methodGreen's functionFinite-Temperature DMRG (ancilla approach)Green's functionTime evolutionLow-Temperature DMRG (partition function approach)Particle Density Matrix (1-site / 2-site)1PDM / 2PDM / 3PDM / 4PDMTransition 1PDM / 2PDM / 3PDM / 4PDMSpin / charge correlationQuantum Chemistry MPONormal-Complementary (NC) partitionComplementary-Normal (CN) partitionConventional scheme (switch between NC and CN near the middle site)Symbolic MPO simplificationMPS initialization using occupation numberSupported matrix representation of site operatorsBlock-sparse (outer) / dense (inner)Block-sparse (outer) / elementwise-sparse (CSR, inner)Fermionic MPS algebra (non-spin-adapted only)Determinant/CSF coefficients of MPSExtracting Determinant/CSF coefficients from MPSConstructing MPS from Determinant/CSF coefficientsMulti-level parallel DMRGParallelism over sites (2-site only)Parallelism over sum of MPOs (distributed)Parallelism over operators (distributed/shared memory)Parallelism over symmetry sectors (shared memory)Parallelism within dense matrix multiplications (MKL)DMRG-CASSCF and contracted dynamic correlationDMRG-CASSCF (pyscf / openMOLCAS / forte interface)DMRG-CASSCF nuclear gradients and geometry optimization (pyscf interface, RHF reference only)DMRG-sc-NEVPT2 (pyscf interface, classical approach)DMRG-sc-MPS-NEVPT2 (pyscf interface, MPS compression approximation)DMRG-CASPT2 (openMOLCAS interface)DMRG-cu-CASPT2 (openMOLCAS interface)DMRG-MRDSRG (forte interface)Stochastic perturbative DMRGDMRG with Spin-Orbit Coupling (SOC)1-step approach (full complex one-MPO and hybrid real/complex two-MPO schemes)2-step approachUncontracted dynamic correlationDMRG Multi-Reference Configuration Interaction (MRCI) of arbitrary orderDMRG Multi-Reference Averaged Quadratic Coupled Cluster (AQCC)/ Coupled Pair Functional (ACPF)DMRG NEVPT2/3/..., REPT2/3/..., MR-LCC, ...Orbital ReorderingFiedlerGenetic algorithmMPS TransformationSU2 to SZ mappingPoint group mappingOrbital basis rotationStackBlock CompatibilityAStackBlock 1.5compatible user interface can be found atpyblock2/driver/block2main.
This script can work as a replacement of the StackBlock binary, with a few limitations and some extensions.
The format of the input filedmrg.confis identical to that of StackBlock 1.5.
Seedocs/driver.mdanddocs/source/user/basic.rstfor detailed documentations for this interface.
Examples using this interface can be found attests/driver.Instuctions for installing the StackBlock code can be found inhere. A list of precompiled binaries of StackBlock can be found inhere.