Coder Social home page Coder Social logo

sarminh / pyscf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pyscf/pyscf

0.0 0.0 0.0 61.86 MB

Python module for quantum chemistry

License: Apache License 2.0

Python 70.10% Shell 0.02% CMake 0.23% C 20.30% C++ 0.14% Common Lisp 0.31% Fortran 8.52% Cuda 0.10% Jupyter Notebook 0.27% Visual Basic 0.01%

pyscf's Introduction

Python-based Simulations of Chemistry Framework

Build Status

2019-03-15

Installation

  • Prerequisites

    • Cmake 2.8 or higher
    • Python 2.6, 2.7, 3.4 or higher
    • Numpy 1.8.0 or higher
    • Scipy 0.10 or higher (0.12.0 or higher for python 3.4 - 3.6)
    • h5py 2.3.0 or higher (requires HDF5 1.8.4 or higher)
  • Compile core module

      cd pyscf/lib
      mkdir build; cd build
      cmake ..
      make
    

    Note during the compilation, external libraries (libcint, libxc, xcfun) will be downloaded and installed. If you want to disable the automatic downloading, this document shows how to manually build these packages and PySCF C libraries.

  • To export PySCF to Python, you need to set environment variable PYTHONPATH. E.g. if PySCF is installed in /opt, your PYTHONPATH should be

      export PYTHONPATH=/opt/pyscf:$PYTHONPATH
    
  • Using Intel MKL as BLAS library. Enabling the cmake options -DBLA_VENDOR=Intel10_64lp_seq when executing cmake

      cmake -DBLA_VENDOR=Intel10_64lp_seq ..
    

    If cmake does not find MKL, you can define BLAS_LIBRARIES in CMakeLists.txt

      set(BLAS_LIBRARIES "${BLAS_LIBRARIES};/path/to/mkl/lib/intel64/libmkl_intel_lp64.so")
      set(BLAS_LIBRARIES "${BLAS_LIBRARIES};/path/to/mkl/lib/intel64/libmkl_sequential.so")
      set(BLAS_LIBRARIES "${BLAS_LIBRARIES};/path/to/mkl/lib/intel64/libmkl_core.so")
      set(BLAS_LIBRARIES "${BLAS_LIBRARIES};/path/to/mkl/lib/intel64/libmkl_avx.so")
    
  • Using DMRG as the FCI solver for CASSCF. There are two DMRG solver interfaces available in pyscf. Block (https://sanshar.github.io/Block) CheMPS2 (https://github.com/SebWouters/CheMPS2) After installing the DMRG solver, create a file dmrgscf/settings.py to store the path where the DMRG solver was installed.

  • Using FCIQMC as the FCI solver for CASSCF. NECI (https://github.com/ghb24/NECI_STABLE) After installing the NECI, create a file future/fciqmc/settings.py to store the path where the NECI was installed.

  • Using optimized integral library on X86 platform. Qcint is a branch of libcint library. It is heavily optimized against X86_64 platforms. To replace the default libcint library with qcint library, edit the URL of the integral library in lib/CMakeLists.txt file

      ExternalProject_Add(libcint
        GIT_REPOSITORY https://github.com/sunqm/qcint.git
        ...
    
  • Using pyberny (https://github.com/azag0/pyberny) as geometry optimizer. After downloading pyberny

    git clone https://github.com/azag0/pyberny /path/to/pyberny
    

    edit the environment variable to make pyberny a python module

    export PYTHONPATH=/path/to/pyberny:$PYTHONPATH
    

Tutorials

Known problems

  • mkl-2018.0.0-intel_3 from intelpython gives segfault update to mkl-2018.0.1-intel_4 or superior relaease

      conda update mkl
    
  • Error message "Library not loaded: libcint.3.0.dylib" On OS X.

    libcint.dylib is installed in pyscf/lib/deps/lib by default. Add "/path/to/pyscf/lib/deps/lib" to DYLD_LIBRARY_PATH

  • runtime error message

  OSError: ... mkl/lib/intel64/libmkl_avx.so: undefined symbol: ownLastTriangle_64fc

or

  MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.

This is a MKL 11.* bug when MKL is used with "dlopen" function. Preloading MKL libraries can solve this problem on most systems:

  export LD_PRELOAD=$MKLROOT/lib/intel64/libmkl_def.so:$MKLROOT/lib/intel64/libmkl_sequential.so:$MKLROOT/lib/intel64/libmkl_core.so

or

  export LD_PRELOAD=$MKLROOT/lib/intel64/libmkl_avx.so:$MKLROOT/lib/intel64/libmkl_core.so
[ 95%] Building C object CMakeFiles/cint.dir/src/stg_roots.c.o

This code is used by F12 integrals only. If you do not need F12 methods, the relevant compilation can be disabled, by searching DWITH_F12 in file lib/CMakeLists.txt and setting it to -DWITH_F12=0.

Citing PySCF

The following paper should be cited in publications utilizing the PySCF program package:

PySCF: the Python-based Simulations of Chemistry Framework, Q. Sun, T. C. Berkelbach, N. S. Blunt, G. H. Booth, S. Guo, Z. Li, J. Liu, J. McClain, E. R. Sayfutyarova, S. Sharma, S. Wouters, G. K.-L. Chan (2018), PySCF: the Python‐based simulations of chemistry framework. WIREs Comput. Mol. Sci., 8: e1340. doi:10.1002/wcms.1340

Bug report

Qiming Sun [email protected]

pyscf's People

Contributors

sunqm avatar kovalp avatar pulkin avatar tberkel avatar jdmcclain47 avatar ssh2 avatar shengg avatar gkc1000 avatar ghb24 avatar januseriksen avatar sebwouters avatar lkwagner avatar zhendongli2008 avatar jasonmyu avatar yangcal avatar awhite862 avatar mjw99 avatar nsblunt avatar bogdanoff avatar wirawan0 avatar zhengbx avatar jhrmnn avatar latrix avatar hungpham2017 avatar mussard avatar xwang862 avatar sunchong137 avatar mbarbry avatar vondonnerstein avatar susilehtola avatar

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.