Giter Site home page Giter Site logo

hczhai / pyblock Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 2.01 MB

python3 interface for DMRG code block 1.5.3

License: GNU General Public License v3.0

CMake 0.17% Dockerfile 0.01% Python 11.17% C 56.61% C++ 27.08% Makefile 1.22% HTML 3.72% CSS 0.03%

pyblock's Introduction

Documentation Status Build Status codecov


pyblock is a python interface build upon BLOCK 1.5.3 (https://github.com/sanshar/StackBlock).

Installation

Python3 package numpy (version >= 1.18.1) is required. Older version will produce runtime error.

cmake (version >= 3.0) can be used to compile C++ part of the code, as follows:

mkdir build
cd build
cmake .. -DBUILD_LIB=ON <extra options>
make

There are several options available for cmake ...

When -DBUILD_LIB=ON is given, the python extension library will be built. Otherwise, the block 1.5.3 executable will be built.

If MKL Math library is installed in the system, add -DUSE_MKL=ON to use MKL library.

If boost (version < 1.56) is used, add -DBOOST_OLD=ON. For new boost version no extra options are required.

The package root path and ./build path are required to be added to PYTHONPATH so that one can import block and pyblock modules. One way to run tests is

cd tests/hubbard-1d
PYTHONPATH=../..:../../build python3 dmrg.py

This will only temporarily change the PYTHONPATH. One can also install pyblock by running (in package root directory)

pip3 install .

BLOCK

BLOCK implements the density matrix renormalization group (DMRG) algorithm for quantum chemistry.

How to cite Block

Block is distributed under the GNU GPL license which is reproduced in the file LICENSE. In addition, Block contains a full copy of the Newmat C++ matrix library by Robert Davies.

We would appreciate if you cite the following papers in publications resulting from the use of Block:

  • G. K.-L. Chan and M. Head-Gordon, J. Chem. Phys. 116, 4462 (2002),
  • G. K.-L. Chan, J. Chem. Phys. 120, 3172 (2004),
  • D. Ghosh, J. Hachmann, T. Yanai, and G. K.-L. Chan, J. Chem. Phys., 128, 144117 (2008),
  • S. Sharma and G. K-.L. Chan, J. Chem. Phys. 136, 124121 (2012).

In addition, a useful list of DMRG references relevant to quantum chemistry can be found in the article above by Sharma and Chan.

Documentation

The online documentation of block 1.5.3 is available at https://sanshar.github.io/Block.

pyblock's People

Contributors

hczhai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pyblock's Issues

Error install pyblock

should I install block1.5.3 first before install pyblock?
I tried install pyblock independently, here I got error:

$ cmake .. -DBUILD_LIB=ON
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.5", minimum required is "3.8")
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pybind11'
-- PROJECT_NAME = block
-- PYTHON_VERSION_MAJOR = 3
-- PYTHON_VERSION_MINOR = 8
-- PYTHON_LIBRARIES = /usr/lib/x86_64-linux-gnu/libpython3.8.so
-- PYTHON_EXECUTABLE = /usr/bin/python3
-- PYTHON_EXECUTABLE_HINT =
-- PYTHON_INCLUDE_DIRS = /usr/include/python3.8
-- PYLIB_SUFFIX = .cpython-38-x86_64-linux-gnu.so
-- PYBIND_INCLUDE_DIRS =
-- BUILD_LIB = ON
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
CMake Error at CMakeLists.txt:121 (FIND_PACKAGE):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.

Could not find a package configuration file provided by "Eigen3" with any
of the following names:

Eigen3Config.cmake
eigen3-config.cmake

Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!
See also "/home/defanet/chemlib/pyblock/build/CMakeFiles/CMakeOutput.log".
See also "/home/defanet/chemlib/pyblock/build/CMakeFiles/CMakeError.log".

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.