Skip to content

Commit c61d91a

Browse files
committed
Merge branch 'devel'
* ANN functionality is revised and extended, now fully-functional * Eigen3 is removed from the codebase, build instructions are now set to use the external package * Added the libint2 support, Libra is linked to the external libint2 libraries and can use them * Added the MOLDEN-file procedures: constructing the molecular integrals using these files * Added the CP2k workflow with libint2 support * Added the xTB (in CP2k) workflow * Pickling support for various Libra classes * Simplified and generalized the multithreading calculations and made the workflows more user-friendly * Added more efficient methods for SD overlap and time-overlap calculations * Added user-friendly general NA-MD workflows, with a set of new recipes for common types of calculations * Less memory-demanding saving in the files * Fixed a memory leak in the NA-MD workflows
2 parents 2a15e10 + daf3f53 commit c61d91a

File tree

1,810 files changed

+154155
-346559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,810 files changed

+154155
-346559
lines changed

AUTHORS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Alexey V. Akimov <[email protected]>
22
Alexey V. Akimov <[email protected]>
3-
Brendan Smith <[email protected]>
3+
Dr. Brendan Smith <[email protected]>
4+
Mr. Mohammad Shakiba <[email protected]>
45
Story Temen <[email protected]>
56
67
Kosuke Sato <??>

CMakeLists.txt

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Set the compiler as described here: https://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F
2-
#
3-
# Verify that Cmake is up to date
4-
#
5-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
6-
#SET(CMAKE_LEGACY_CYGWIN_WIN32 0)
7-
8-
9-
#
10-
# Project name
11-
#
12-
13-
14-
PROJECT("libra")
1+
# Set the compiler as described here: https://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F
2+
#
3+
# Verify that Cmake is up to date
4+
#
5+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
6+
#SET(CMAKE_LEGACY_CYGWIN_WIN32 0)
7+
8+
9+
#
10+
# Project name
11+
#
12+
13+
14+
PROJECT("libra")
1515

1616
#
1717
# User-defined Find modules
@@ -28,7 +28,9 @@ MESSAGE("Advice: If this search fails, try setting cache variables: -DPYTHON_LIB
2828
MESSAGE("Hint to self: -DPYTHON_INCLUDE_DIR=/home/Alexey_2/Soft/Python-2.6.7/bin/include/python2.6 -DPYTHON_LIBRARY=/home/Alexey_2/Soft/Python-2.6.7/bin/bin")
2929

3030
# For Linux and Cygwin
31-
FIND_PACKAGE(PythonLibs 3.7 REQUIRED)
31+
# Adapt it according to your system
32+
FIND_PACKAGE(PythonLibs 3.6 REQUIRED)
33+
#FIND_PACKAGE(PythonLibs 3.7 REQUIRED)
3234

3335
IF(PYTHONLIBS_FOUND)
3436
MESSAGE("Success!")
@@ -50,19 +52,22 @@ MESSAGE(${PYTHON_INCLUDE_DIRS})
5052
#
5153
# Boost library
5254
#
53-
55+
5456
MESSAGE("Looking for Boost libraries...")
5557
SET(Boost_NO_BOOST_CMAKE TRUE) # to fix the problem of finding python37 libs
5658
SET(Boost_USE_STATIC_LIBS=OFF)
5759
SET(Boost_USE_MULTITHREADED=OFF)
5860
SET(Boost_USE_STATIC_RUNTIME=OFF)
5961

60-
61-
FIND_PACKAGE(Boost REQUIRED)
62+
# Adapt it according to your system
63+
FIND_PACKAGE(Boost 1.73.0 REQUIRED)
64+
#FIND_PACKAGE(Boost REQUIRED)
6265
IF(Boost_FOUND)
6366
MESSAGE("Success!")
64-
INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}")
65-
FIND_PACKAGE(Boost COMPONENTS python37 regex) # it seems that it is important to find sub-packages too!!!
67+
INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}")
68+
# Adapt it based on your system
69+
FIND_PACKAGE(Boost COMPONENTS python36 regex) # it seems that it is important to find sub-packages too!!!
70+
#FIND_PACKAGE(Boost COMPONENTS python37 regex)
6671
ELSEIF(NOT Boost_FOUND)
6772
MESSAGE(FATAL_ERROR "Unable to find correct Boost version. Did you set BOOST_ROOT?")
6873
ENDIF()
@@ -73,6 +78,38 @@ MESSAGE("Found Boost include directory: ")
7378
MESSAGE("${Boost_INCLUDE_DIRS}")
7479

7580

81+
82+
FIND_PACKAGE(Eigen3)
83+
IF(EIGEN3_FOUND)
84+
INCLUDE_DIRECTORIES("${EIGEN3_INCLUDE_DIR}")
85+
MESSAGE("Found Eigen3 include directory: ")
86+
MESSAGE("${EIGEN3_INCLUDE_DIR}")
87+
ELSEIF(NOT EIGEN3_FOUND)
88+
MESSAGE(FATAL_ERROR "Unable to find Eigen3")
89+
ENDIF()
90+
91+
92+
SET(EIGEN3_INCLUDE_DIRS "${EIGEN3_INCLUDE_DIR}")
93+
94+
# Remove CMakeCache.txt from the previous build, if you get an error finding libint2 due to problems
95+
# in finding Eigen3
96+
97+
# Libint2 2.7.0 CONFIG REQUIRED COMPONENTS shared gss e5 g5
98+
#FIND_PACKAGE(Libint2 MODULE 2.7.0)
99+
FIND_PACKAGE(Libint2 CONFIG 2.7.0 REQUIRED COMPONENTS shared gss e5 g5)
100+
IF(Libint2_FOUND)
101+
INCLUDE_DIRECTORIES("${Libint2_INCLUDE_DIRS}")
102+
MESSAGE("Found Libint2 include directory: ")
103+
MESSAGE("${Libint2_INCLUDE_DIRS}")
104+
MESSAGE("Found Libint2_LIBRARIES: ")
105+
MESSAGE("${Libint2_LIBRARIES}")
106+
MESSAGE("Found Libint2_LIBRARY: ")
107+
MESSAGE("${Libint2_LIBRARY}")
108+
ELSEIF(NOT Libint2_FOUND)
109+
MESSAGE(FATAL_ERROR "Unable to find correct libint2")
110+
ENDIF()
111+
112+
76113
#
77114
# GNU compiler definitions
78115
#

README.md

Lines changed: 166 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ The program website is [here](https://quantum-dynamics-hub.github.io/libra/index
1010

1111
More:
1212

13-
* [How to install](https://quantum-dynamics-hub.github.io/libra/installation.html)
1413
* [Training & Usage](https://github.com/compchem-cybertraining/Tutorials_Libra)
1514
* [Autogenerated Documentation](https://quantum-dynamics-hub.github.io/libra-code/)
1615

@@ -27,6 +26,167 @@ for all users with the intent:
2726
knowledge and skills with others;
2827

2928

29+
## Installation (as of after 5/14/2021)
30+
31+
### 1. Install miniconda (for Python 3.8) and activate Conda
32+
33+
mkdir Conda
34+
cd Conda/
35+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh .
36+
sh ./Miniconda3-latest-Linux-x86_64.sh -b -u -p <install_dir>
37+
38+
Here,
39+
40+
* the `-b` option will accept the license agreement and will skip all the prompts
41+
* the `-u` option will tell the installer to do all the needed updates
42+
* the `-p` option followed by the installation directory path (will be created), tells
43+
the installed where to install the package.
44+
45+
To activate the installed base environment of Conda do:
46+
47+
eval "$(<path to bin/conda> shell.bash hook)"
48+
49+
For instance,
50+
51+
eval "$(/projects/academic/cyberwksp21/Software/Conda/Miniconda3/bin/conda shell.bash hook)"
52+
53+
54+
You will need to run this script every time you want to use a particular Conda and the
55+
corresponding environments, unless you include this command in your .bashrc or .bash_profile
56+
57+
Test it is working by doing:
58+
59+
which conda
60+
61+
62+
### 2. Download Libra
63+
64+
mkdir libra
65+
cd libra
66+
git clone https://github.com/Quantum-Dynamics-Hub/libra-code.git .
67+
68+
and switch to the correct branch or tag - usually, it would be `devel` branch
69+
70+
git checkout devel
71+
72+
73+
### 3. Create the environment equipped with all Libra needs
74+
75+
#### 3.1. Simple way:
76+
77+
Just execute the following script located in the root of Libra distribution:
78+
79+
sh ./libra_env_build.sh
80+
81+
This script will create the environment called `libra` and will install all the
82+
needed stuff in it. You just need to activate it:
83+
84+
conda activate libra
85+
86+
#### 3.2. Detailed instructions on what the script about does:
87+
88+
It first creates and activates the `libra` environment:
89+
90+
conda create -n libra
91+
92+
Update conda install if needed (e.g. if the output suggests it)
93+
94+
conda activate libra
95+
96+
Thne, it installs all the dependencies and tools.
97+
98+
Do this one by one, and in this order (should not matter too much, but who knows it)
99+
100+
> To automate the below procedures, you can use `-y` option to accept prompts (sometimes this will override)
101+
> previous packages/conflicts, so be careful
102+
>
103+
> You can also use `-q` to get rid of all the messages to the output, although i'd keep it to keep track of what's going on
104+
105+
Basic stuff
106+
107+
conda install conda-build
108+
conda install gcc_linux-64
109+
conda install gxx_linux-64
110+
conda install make
111+
conda install boost
112+
conda install cmake
113+
conda install git
114+
conda install -c anaconda h5py
115+
conda install -c conda-forge/label/gcc7 eigen
116+
conda install -c psi4/label/dev libint2
117+
conda install -c anaconda gmp
118+
conda install -c conda-forge/label/gcc7 mpfr
119+
120+
More, but still needed because some Python modules require those.
121+
We need to downgrade Python version here to 3.6 to enable Psi4 installation
122+
123+
conda install python=3.6
124+
conda install -c psi4 psi4
125+
conda install -c conda-forge matplotlib
126+
conda install -c rmg py3dmol
127+
conda install -c anaconda numpy
128+
conda install -c anaconda scipy
129+
conda install -c conda-forge llvm-openmp
130+
131+
You can install Jupyter notebook using the following command. This will be useful and you can set up and access the Jupyter notebook
132+
remotely from a cluster and load the tutorials
133+
134+
conda install -c conda-forge jupyterlab
135+
136+
137+
Used in some of the tutorials
138+
139+
conda install -c conda-forge/label/gcc7 imageio
140+
141+
142+
### 4. Adapt the CMakeLists.txt file according to your system
143+
144+
Because we had to downgrade Python to 3.6, we need to edit the CMakeLists.txt such that
145+
cmake is looking for the correct Python version
146+
147+
FIND_PACKAGE(PythonLibs 3.6 REQUIRED)
148+
149+
and also reflect it in the component of the Boost.Python to be found:
150+
151+
FIND_PACKAGE(Boost COMPONENTS python36 regex)
152+
153+
Same for Boost (see the error messages for what version of Boost the cmake can find). In my current
154+
case, it suggest the version 1.73.0, so be it:
155+
156+
FIND_PACKAGE(Boost 1.73.0 REQUIRED)
157+
158+
### 5. Create the build directory and make the Makefiles
159+
160+
Then in the libra directory, create the build directory:
161+
162+
cd libra
163+
mkdir _build
164+
cd _build
165+
cmake ../
166+
167+
### 6. Compile the package
168+
169+
make -j4
170+
171+
### 7. Setup environmental variables
172+
173+
Add the following exports to your `.bash_profile` file
174+
175+
export PYTHONPATH=<path to the ppackage>/libra/_build/src:$PYTHONPATH
176+
export LD_LIBRARY_PATH=<path to the ppackage>/libra/_build/src:$LD_LIBRARY_PATH
177+
178+
### 8. Restart the terminal or source the bash profile and activate libra conda environment
179+
180+
source .bash_profile
181+
conda activate libra
182+
183+
And you should be ready to use Libra.
184+
185+
186+
* [Old instructions](https://quantum-dynamics-hub.github.io/libra/installation.html)
187+
188+
189+
30190
## Developers and Contributors
31191

32192
* Dr. Alexey Akimov (University at Buffalo, [link](https://akimovlab.github.io/index.html) )
@@ -37,7 +197,7 @@ for all users with the intent:
37197
Libra/DFTB+, Libra/QE, Libra/ErgoSCF, Libra/CP2K, and Libra/Gaussian interfaces
38198

39199
* Mr. Mohammad Shakiba (Shahid Bahonar University of Kerman, Iran)
40-
Cube file processing scripts, Libra/CP2K and Libra/Gaussian interfaces
200+
Cube file processing scripts, Libra/CP2K and Libra/Gaussian, Libra/Libint2 interfaces
41201

42202
* Mrs. Story Temen (University at Buffalo)
43203
Implementation and testing of the HEOM codes
@@ -51,10 +211,10 @@ for all users with the intent:
51211
* Dr. Ekadashi Pradhan (York University)
52212
Libra/QE interface, delta-SCF NA-M (Libra-X)
53213

54-
* Dr. Amber Jain (Indian Institute of Technology, Bombay)
214+
* Dr. Amber Jain (Indian Institute of Technology Bombay, India)
55215
Implementation and testing of the HEOM codes
56216

57-
* Dr. Xiang Sun (Indian Institute of Technology, Bombay)
217+
* Dr. Xiang Sun (NYU Shanghai, China)
58218
Implementation and testing of the FGR codes
59219

60220

@@ -64,9 +224,9 @@ This code is provided in the hope it will be useful.
64224

65225
If you use the code in your research, please cite the following paper(s):
66226

67-
### Parers that describe Libra and its features
227+
### Papers that describe Libra or its features
68228

69-
* [Initial Implementation](http://onlinelibrary.wiley.com/doi/10.1002/jcc.24367/full)
229+
* [The initial implementation](http://onlinelibrary.wiley.com/doi/10.1002/jcc.24367/full)
70230
Akimov, A. V. "Libra: An open-Source 'methodology discovery' library for quantum and classical dynamics simulations"
71231
*J. Comput. Chem.* **2016** 37, 1626-1649
72232

libra_env_build.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
conda create -n libra
2+
conda activate libra
3+
conda install -y conda-build
4+
conda install -y gcc_linux-64
5+
conda install -y gxx_linux-64
6+
conda install -y cmake
7+
conda install -y make
8+
conda install -y git
9+
conda install -y boost=1.73.0
10+
conda install -y -c anaconda h5py
11+
conda install -y -c conda-forge/label/gcc7 eigen
12+
conda install -y -c psi4/label/dev libint2
13+
conda install -y -c anaconda gmp
14+
conda install -y -c conda-forge/label/gcc7 mpfr
15+
conda install -y python=3.6
16+
conda install -y -c psi4 psi4
17+
conda install -y -c conda-forge matplotlib
18+
conda install -y -c rmg py3dmol
19+
conda install -y -c anaconda numpy
20+
conda install -y -c anaconda scipy
21+
conda install -y -c conda-forge/label/gcc7 imageio
22+
conda install -y -c conda-forge llvm-openmp
23+

notebooks/Example14_QE_methods/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)