Skip to content

Latest commit

 

History

History
106 lines (66 loc) · 2.37 KB

interfaces.rst

File metadata and controls

106 lines (66 loc) · 2.37 KB

Interfaces

block2 can be used via many different interfaces.

Input File

Like many quantum chemistry packages, block2 can be used by reading parameters and instrutions from a formatted input file. This interface is StackBlock compatible. See user_basic, user_advanced, and user_keywords.

Interfaces for DMRGSCF

To do DMRGSCF, we need to connect block2 to some external softwares for the CASSCF part. See user_dmrgscf, user_open_molcas, and user_forte.

Python Interface (high level)

See https://block2.readthedocs.io/en/latest/tutorial/qc-hamiltonians.html.

Python Interface (low level)

General examples:

  1. GS-DMRG

Test Ground-State DMRG (need pyscf module): :

python3 -m pyblock2.gsdmrg
  1. FT-DMRG

Test Finite-Temperature (FT)-DMRG (need pyscf module): :

python3 -m pyblock2.ftdmrg
  1. LT-DMRG

Test Low-Temperature (LT)-DMRG (need pyscf module): :

python3 -m pyblock2.ltdmrg
  1. GF-DMRG

Test Green's-Function (GF)-DMRG (DDMRG++) (need pyscf module): :

python3 -m pyblock2.gfdmrg
  1. SI-DMRG

Test State-Interaction (SI)-DMRG (need pyscf module): :

python3 -m pyblock2.sidmrg

For special topics, see dev_mpo_reloading, dev_orbital_rotation, dev_pg_mapping.

Input File (C++ Executable)

Example input file for binary executable build/block2: :

rand_seed = 1000
memory = 4E9
scratch = ./scratch

pg = c1
fcidump = data/HUBBARD-L16.FCIDUMP
n_threads = 4
qc_type = conventional

# print_mpo
print_mpo_dims
print_fci_dims
print_mps_dims

bond_dims = 500
noises = 1E-6 1E-6 0.0

center = 0
dot = 2

n_sweeps = 10
tol = 1E-7
forward = 1

noise_type = perturbative
trunc_type = physical

To run this example: :

./build/block2 input.txt

C++ Interpreter

Since block2 is designed as a header-only C++ library, it can be conveniently executed using C++ interpreter [cling](https://github.com/root-project/cling) (which can be installed via [anaconda](https://anaconda.org/conda-forge/cling)) without any compilation. This can be useful for testing small changes in the C++ code.

Example C++ code for cling can be found at tests/cling/hubbard.cl.