block2
Efficient parallel quantum chemistry DMRG in MPO formalism
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 12 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
8 of 10 committers (80.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.1%) to scientific vocabulary
Keywords
Repository
Efficient parallel quantum chemistry DMRG in MPO formalism
Basic Info
Statistics
- Stars: 86
- Watchers: 9
- Forks: 28
- Open Issues: 1
- Releases: 90
Topics
Metadata Files
README.md
block2
The block2 code provides an efficient and highly scalable implementation of the Density Matrix Renormalization Group (DMRG) for quantum chemistry, based on the Matrix Product Operator (MPO) formalism.
The block2 code is developed as an improved version of StackBlock, 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 and Initiative for Computational Catalysis at Flatiron Institute.
Main contributors:
- Huanchen Zhai @hczhai: DMRG and parallelization
- Henrik R. Larsson @h-larsson: DMRG-MRCI/MRPT, large site, Green's function in frequency and time for finite temp.
- Seunghoon Lee @seunghoonlee89: Stochastic perturbative DMRG
- Zhi-Hao Cui @zhcui: User interface
If you find this package useful for your scientific research, please cite the work as:
- H. Zhai, H. R. Larsson, S. Lee, Z.-H. Cui, T. Zhu, C. Sun, L. Peng, R. Peng, K. Liao, J. Tölle, J. Yang, S. Li, and G. K.-L. Chan. Block2: A comprehensive open source framework to develop and apply state-of-the-art DMRG algorithms in electronic structure and beyond. The Journal of Chemical Physics 159, 234801 (2023). doi: 10.1063/5.0180424
For parallel ab initio DMRG, please cite
- H. Zhai, and G. K.-L. Chan. Low communication high performance ab initio density matrix renormalization group algorithms. The Journal of Chemical Physics 154, 224116 (2021). doi: 10.1063/5.0050902.
For large site DMRG-MRCI/MRPT, please cite
- H. R. Larsson, H. Zhai, K. Gunst, and G. K.-L. Chan. Matrix product states with large sites. Journal of Chemical Theory and Computation 18, 749-762 (2022). doi: 10.1021/acs.jctc.1c00957.
For DMRG with spin-orbit-coupling, please cite
- H. Zhai, and G. K.-L. Chan. A comparison between the one- and two-step spin-orbit coupling approaches based on the ab initio Density Matrix Renormalization Group. The Journal of Chemical Physics 157, 164108 (2022). doi: 10.1063/5.0107805.
You can find a bibtex file in CITATIONS.bib.
For a list of DMRG references for methods implemented in block2, see: https://block2.readthedocs.io/en/latest/user/references.html.
One can install block2 using pip (note: for very new Python versions, the --extra-index-url option of pip is required, see below for installing the developement version of block2):
OpenMP-only version (no MPI dependence)
pip install block2
Hybrid openMP/MPI version (requiring openMPI 5.0.x for
block2-mpi >= 0.5.3or 4.1.x forblock2-mpi <= 0.5.2andblock2-mpi <= 0.5.3rc19)pip install block2-mpi
Binary format is prepared via
pipfor python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13 with macOS (x86 and arm64, no-MPI), Linux (no-MPI/openMPI), or Windows (x86, no-MPI). 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 of
block2andblock2-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 #7 and here.To install the most recent development version, use:
pip install block2==
--extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/ pip install block2-mpi== --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/
where <version> can be some development version number like 0.5.4rc5 (see https://github.com/block-hczhai/block2-preview/tags for a complete list of version numbers. The letter p is not needed). To force reinstalling an updated version, you may consider pip options --upgrade --force-reinstall --no-deps --no-cache-dir.
The detailed instructions on manual installation can be found here.
To run a DMRG calculation using the command line interface, please use the following command:
block2main dmrg.conf > dmrg.out
where dmrg.conf is the StackBlock style input file and dmrg.out contains the outputs.
Example input files can be found here.
For DMRGSCF calculation, please have a look at here.
Documentation: https://block2.readthedocs.io/en/latest/
Tutorial (Python interface): https://block2.readthedocs.io/en/latest/tutorial/qc-hamiltonians.html
Custom model Hamiltonians can be supported via a Python interface: Fermi-Hubbard, Bose-Hubbard, Hubbard-Holstein, SU(2) Heisenberg, SU(3) Heisenberg, t-J, correlation functions.
Source code: https://github.com/block-hczhai/block2-preview
Example DMRG scripts for realistic systems: https://github.com/hczhai/block2-example-data/tree/master/00-HC
For a simplified implementation of ab initio DMRG, see pyblock3. Data can be imported and exported between block2 and pyblock3, see https://github.com/block-hczhai/block2-preview/discussions/35.
Features
- State symmetry
- U(1) particle number symmetry
- SU(2) or U(1) spin symmetry (spatial orbital)
- No spin symmetry (general spin orbital)
- Abelian point group symmetry
- Translational (K point) / Lz symmetry
- Sweep algorithms (1-site / 2-site / 2-site to 1-site transition)
- Ground-State DMRG
- Decomposition types: density matrix / SVD
- Noise types: wavefunction / density matrix / perturbative
- Multi-Target Excited-State DMRG
- State-averaged / state-specific
- MPS compression / addition
- Expectation
- Imaginary / real time evolution
- Hermitian / non-Hermitian Hamiltonian
- Time-step targeting method
- Time dependent variational principle method
- Green's function
- Ground-State DMRG
- Finite-Temperature DMRG (ancilla approach)
- Green's function
- Time evolution
- Low-Temperature DMRG (partition function approach)
- Particle Density Matrix (1-site / 2-site)
- 1PDM / 2PDM / 3PDM / 4PDM
- Transition 1PDM / 2PDM / 3PDM / 4PDM
- Spin / charge correlation
- Quantum Chemistry MPO
- Normal-Complementary (NC) partition
- Complementary-Normal (CN) partition
- Conventional scheme (switch between NC and CN near the middle site)
- Symbolic MPO simplification
- MPS initialization using occupation number
- Supported matrix representation of site operators
- Block-sparse (outer) / dense (inner)
- Block-sparse (outer) / elementwise-sparse (CSR, inner)
- Fermionic MPS algebra (non-spin-adapted only)
- Determinant/CSF coefficients of MPS
- Extracting Determinant/CSF coefficients from MPS
- Constructing MPS from Determinant/CSF coefficients
- Multi-level parallel DMRG
- Parallelism 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 correlation
- DMRG-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 DMRG
- DMRG with Spin-Orbit Coupling (SOC)
- 1-step approach (full complex one-MPO and hybrid real/complex two-MPO schemes)
- 2-step approach
- Uncontracted dynamic correlation
- DMRG Multi-Reference Configuration Interaction (MRCI) of arbitrary order
- DMRG Multi-Reference Averaged Quadratic Coupled Cluster (AQCC)/ Coupled Pair Functional (ACPF)
- DMRG NEVPT2/3/..., REPT2/3/..., MR-LCC, ...
- Orbital Reordering
- Fiedler
- Genetic algorithm
- MPS Transformation
- SU2 to SZ mapping
- Point group mapping
- Orbital basis rotation
StackBlock Compatibility
A StackBlock 1.5 compatible user interface can be found at pyblock2/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 file dmrg.conf is identical to that of StackBlock 1.5.
See docs/driver.md and docs/source/user/basic.rst for detailed documentations for this interface.
Examples using this interface can be found at tests/driver.
Instuctions for installing the StackBlock code can be found in here. A list of precompiled binaries of StackBlock can be found in here.
Owner
- Name: block-hczhai
- Login: block-hczhai
- Kind: organization
- Repositories: 2
- Profile: https://github.com/block-hczhai
Citation (CITATIONS.bib)
@article{zhai2023block2,
author = {Zhai, Huanchen and Larsson, Henrik R. and Lee, Seunghoon and Cui, Zhi-Hao and Zhu, Tianyu and Sun, Chong and Peng, Linqing and Peng, Ruojing and Liao, Ke and Tölle, Johannes and Yang, Junjie and Li, Shuoxue and Chan, Garnet Kin-Lic},
title = {Block2: A comprehensive open source framework to develop and apply state-of-the-art DMRG algorithms in electronic structure and beyond},
year = {2023},
journal = {The Journal of Chemical Physics},
volume = {159},
number = {23},
pages = {234801},
issn = {0021-9606},
doi = {10.1063/5.0180424}
}
@article{zhai2021low,
title = {Low Communication High Performance Ab Initio Density Matrix Renormalization Group Algorithms},
author = {Zhai, Huanchen and Chan, Garnet Kin-Lic},
year = {2021},
journal = {The Journal of Chemical Physics},
volume = {154},
number = {22},
pages = {224116},
issn = {0021-9606},
doi = {10.1063/5.0050902}
}
@article{larsson2022matrix,
title = {Matrix Product States with Large Sites},
author = {Larsson, Henrik R. and Zhai, Huanchen and Gunst, Klaas and Chan, Garnet Kin-Lic},
year = {2022},
journal = {Journal of Chemical Theory and Computation},
volume = {18},
number = {2},
pages = {749--762},
issn = {1549-9618},
doi = {10.1021/acs.jctc.1c00957}
}
@article{zhai2022comparison,
author = {Zhai, Huanchen and Chan, Garnet Kin-Lic},
title = {A comparison between the one- and two-step spin–orbit coupling approaches based on the ab initio density matrix renormalization group},
year = {2022},
journal = {The Journal of Chemical Physics},
volume = {157},
number = {16},
pages = {164108},
issn = {0021-9606},
doi = {10.1063/5.0107805}
}
GitHub Events
Total
- Create event: 9
- Release event: 6
- Issues event: 31
- Watch event: 16
- Delete event: 2
- Issue comment event: 84
- Push event: 76
- Pull request event: 5
- Fork event: 5
Last Year
- Create event: 9
- Release event: 6
- Issues event: 31
- Watch event: 16
- Delete event: 2
- Issue comment event: 84
- Push event: 76
- Pull request event: 5
- Fork event: 5
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 1,050
- Total Committers: 10
- Avg Commits per committer: 105.0
- Development Distribution Score (DDS): 0.184
Top Committers
| Name | Commits | |
|---|---|---|
| Huanchen Zhai | h****i@u****u | 857 |
| Henrik R. Larsson | l****n@p****e | 96 |
| Henrik R. Larsson | l****n@c****u | 64 |
| Zhihao Cui | z****i@c****u | 15 |
| Seunghoon Lee | s****9@g****m | 12 |
| Huanchen Zhai | h****i@c****u | 2 |
| Henrik R. Larsson | l****n@u****u | 1 |
| Nikolay Bogdanov | n****v@f****e | 1 |
| hczhai | 4****i@u****m | 1 |
| Seunghoon Lee | s****9@c****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 114
- Total pull requests: 14
- Average time to close issues: 20 days
- Average time to close pull requests: about 14 hours
- Total issue authors: 60
- Total pull request authors: 6
- Average comments per issue: 4.26
- Average comments per pull request: 2.64
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 4
Past Year
- Issues: 24
- Pull requests: 6
- Average time to close issues: 3 days
- Average time to close pull requests: about 9 hours
- Issue authors: 19
- Pull request authors: 3
- Average comments per issue: 3.83
- Average comments per pull request: 2.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 3
Top Authors
Issue Authors
- 1234zou (5)
- mfdgroot (5)
- JangidBhavnesh (5)
- chburger (4)
- h-larsson (4)
- ChemChuan (4)
- dking072 (4)
- HehnLukas (4)
- Shovan-Physics (4)
- cvjjm (3)
- naveen-dandu (3)
- henhans (3)
- davidsousarj (3)
- mariomotta (2)
- 1iquidmoon (2)
Pull Request Authors
- chillenb (6)
- dependabot[bot] (5)
- h-larsson (4)
- hczhai (2)
- jiangtong1000 (2)
- brianz98 (1)
- bogdanoff (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 1,517 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 42
- Total maintainers: 1
pypi.org: block2-mpi
An efficient MPO implementation of DMRG for quantum chemistry.
- Homepage: https://github.com/block-hczhai/block2-preview
- Documentation: https://block2-mpi.readthedocs.io/
- License: LICENSE
-
Latest release: 0.5.3
published over 1 year ago
Rankings
Maintainers (1)
pypi.org: block2
An efficient MPO implementation of DMRG for quantum chemistry.
- Homepage: https://github.com/block-hczhai/block2-preview
- Documentation: https://block2.readthedocs.io/
- License: LICENSE
-
Latest release: 0.5.3
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- Jinja2 <3.1
- breathe ==4.29.1
- sphinx ==3.5.3
- sphinx-rtd-theme ==0.5.2
- cmake ==3.17
- intel-openmp *
- mkl ==2019
- mkl-include *
- numpy *
- psutil *
- pybind11 *
- scipy *
- Dockerfile * docker
- ./.github/actions/build-wheel * composite
- actions/checkout v3 composite
- actions/configure-pages v2 composite
- actions/deploy-pages v1 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- actions/upload-pages-artifact v1 composite
- pypa/gh-action-pypi-publish v1.4.2 composite
- softprops/action-gh-release v1 composite