@@ -27,259 +27,9 @@ Not maintained for long time, but may still contain some useful info on some top
2727 hasn't been used for a while - use the Slack workspace instead
2828
2929
30- ## Installation Videotutorials (as of 5/16/2022)
30+ ## Installation
3131
32- * [ Installing WSL2] ( https://ub.hosted.panopto.com/Panopto/Pages/Embed.aspx?id=02184b70-7745-4eb4-a776-ae92014c652a&autoplay=false&offerviewer=true&showtitle=true&showbrand=true&captions=false&interactivity=all )
33-
34- * [ Installing WSL2: After reboot] ( https://ub.hosted.panopto.com/Panopto/Pages/Embed.aspx?id=972aef79-e235-4a90-9ce1-ae92014d34db&autoplay=false&offerviewer=true&showtitle=true&showbrand=true&captions=false&interactivity=all )
35-
36- * [ Installing Ubuntu on Windows 11] ( https://ub.hosted.panopto.com/Panopto/Pages/Embed.aspx?id=31a63536-f333-4242-9b56-ae92015ece64&autoplay=false&offerviewer=true&showtitle=true&showbrand=true&captions=false&interactivity=all )
37-
38- * [ Creating Conda environment for Libra] ( https://ub.hosted.panopto.com/Panopto/Pages/Embed.aspx?id=d6ada23e-7e16-4b7a-b290-ae920188627c&autoplay=false&offerviewer=true&showtitle=true&showbrand=true&captions=false&interactivity=all )
39-
40- * [ Installing Libra] ( https://ub.hosted.panopto.com/Panopto/Pages/Embed.aspx?id=7f8dd8c4-9f58-4ca0-a8cb-ae930166b7ec&autoplay=false&offerviewer=true&showtitle=true&showbrand=true&captions=false&interactivity=all )
41-
42- ## Installation (as of after 3/23/2023)
43-
44- ### 1. Install miniconda (for Python 3.9) and activate Conda
45-
46- #### 1.1 Download and install
47-
48- mkdir Conda
49- cd Conda/
50- wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh .
51- sh ./Miniconda3-py39_4.12.0-Linux-x86_64.sh -b -u -p <install_dir>
52-
53- Here,
54-
55- * the ` -b ` option will accept the license agreement and will skip all the prompts
56- * the ` -u ` option will tell the installer to do all the needed updates
57- * the ` -p ` option followed by the installation directory path (will be created), tells
58- the installed where to install the package.
59-
60- Test it is working by doing:
61-
62- which conda
63-
64-
65- #### 1.2 Update the conda
66-
67- Actually, let's not do this:
68-
69- conda update -n base -c defaults conda
70-
71-
72- #### 1.3 Activate the environment
73-
74- Add the following line to you ` .bashrc ` or ` .bash_profile ` scripts:
75-
76- eval "$(<path to bin/conda> shell.bash hook)"
77-
78- For instance,
79-
80- eval "$(/projects/academic/cyberwksp21/SOFTWARE/Conda/bin/conda shell.bash hook)"
81-
82- Restart your terminal or reload the ` .bashrc ` script:
83-
84- source ~/.bashrc
85-
86-
87- When you do this, your command line should show up the (base) in front, indicating that
88- the base environment is ready
89-
90- Test it is working by doing:
91-
92- which conda
93-
94-
95-
96- ### 2. Create the environment equipped with all Libra needs
97-
98- #### 2.1 Create the ` libra ` environment
99-
100- In fact, you can call it whatever you like:
101-
102- conda create -n libra python=3.7
103-
104- #### 2.2 Activate this environment
105-
106- conda activate libra
107-
108- This is very important step - when activated, all the installs will go into that folder.
109-
110- ** In case you mess up with an environment** , you can remove it with:
111-
112- conda remove --name libra --all
113-
114-
115- #### 2.3 Now, equip your environment with the required packages
116-
117- Do this ** one by one, and in this order** , (should not matter too much, but who knows...)
118-
119- > To automate the below procedures, you can use `-y` option to accept prompts (sometimes this will override)
120- > previous packages/conflicts, so be careful
121- >
122- > 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
123-
124-
125- First let's install the most general packages:
126-
127- conda install -y -c conda-forge numpy scipy matplotlib imageio
128-
129-
130- Next, all what we actually need:
131-
132- conda install -y conda-build make
133- conda install -y anaconda::py-boost
134- conda install -y -c conda-forge gcc_linux-64=12.2.0 gxx_linux-64=12.2.0 cmake=3.24.2 python-devtools llvm-openmp
135- conda install -y -c conda-forge/label/gcc7 eigen mpfr
136- conda install -y -c psi4/label/dev libint2=2.7.1
137- conda install -y -c anaconda h5py gmp
138-
139- Install Jupyter Lab or traditional Jupyter notebook as explainted [ here] ( https://jupyter.org/install ) :
140-
141- pip install -U jupyterlab
142-
143- or
144-
145- pip install -U notebook
146-
147-
148- Install py3Dmol for viewing molecular structures:
149-
150- pip install -U py3Dmol
151-
152-
153- Installation instruction of Scikit-learn from its official website:
154-
155- pip install -U scikit-learn
156-
157-
158- >
159- > YES - IT GOT SMALLER AND MORE COMPACT !
160- >
161-
162- Install PyTorch - since the current versions of Libra have a growing number of
163- functions/modules written with PyTorch. The general instructions can be found [ here] ( https://pytorch.org/get-started/locally/ )
164-
165- As a simple (most common case, peraps), we install PyTorch for CPU on Linux with:
166-
167- pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
168-
169- or
170-
171- conda install pytorch cpuonly -c pytorch
172-
173-
174- ### 3. Download and build Libra
175-
176- #### 3.1 Get it from the GitHub and choose the right branch
177-
178- Clone the repo from the GitHub
179-
180- git clone https://github.com/Quantum-Dynamics-Hub/libra-code.git libra
181-
182- and switch to the correct branch or tag - usually, it would be ` devel ` branch
183-
184- cd libra
185- git checkout devel
186-
187- #### 3.2 Create the build directory and make the Makefiles
188-
189- Then in the ` libra ` directory, create the build directory:
190-
191- mkdir _build
192- cd _build
193- cmake ../
194-
195- #### 3.3 Compile the package
196-
197- make -j4
198-
199-
200- ### 4. Make it ready to use
201-
202- Add the following exports to your ` .bash_profile ` file
203-
204- export PYTHONPATH=<path to the ppackage>/libra/_build/src:$PYTHONPATH
205-
206-
207- Restart the terminal or source the bash profile and activate libra conda environment
208-
209- source .bash_profile
210- conda activate libra
211-
212- And you should be ready to use Libra.
213-
214-
215- ## Useful notes:
216-
217- ### 1. 2/15/2025 (from Liz Stippell):
218-
219- Notes on making Libra if you have python v3.7+ installed anywhere on your system (Linux):
220- Although the libra environment is made with python 3.7, during the ` cmake ../ ` step it will search for any python,
221- including versions outside of the libra environment. (Ex: my system kept finding python v3.9 in my
222- Miniconda here: ` /path/to/Conda/Miniconda3/include/python3.9 ` instead of searching within the libra
223- environment: ` /path/to/Conda/Miniconda3/envs/libra ` )
224-
225- To avoid this issue, you can add the following lines in the CMakeLists.txt file in your libra source code directory around line 44:
226-
227- """
228- set(Python3_ROOT_DIR "/path/to/Conda/Miniconda3/envs/libra")
229- set(Python3_EXECUTABLE "/path/to/Conda/Miniconda3/envs/libra/bin/python3")
230- set(Python3_LIBRARY "/path/to/Conda/Miniconda3/envs/libra/lib/libpython3.7m.so")
231- set(Python3_INCLUDE_DIR "/path/to/Conda/Miniconda3/envs/libra/include/python3.7m")
232- FIND_PACKAGE(Python3 3.6 REQUIRED COMPONENTS Development)
233- """
234-
235- This will force the make to search within the libra environment in the specified locations where you know the files exist.
236-
237-
238- ### 2. 4/17/2025 (Alexey Akimov)
239-
240- A good way to setup the conda environment to have Boost and Python version consistent is this:
241-
242-
243- conda install -c conda-forge boost=1.82 python=3.10
244-
245-
246- ### 3. 4/17/2025 (Alexey Akimov)
247-
248- Another useful recipe for setting up jupyter notebook specific to a selected Conda environment:
249-
250- Step 1: Activate the environment
251-
252- conda activate libra
253-
254-
255- Step 2: Install ipykernel and register the kernel
256-
257-
258- conda install ipykernel
259- python -m ipykernel install --user --name=libra --display-name "Python (libra)"
260-
261-
262- Now, in Jupyter, you'll see a new kernel called "Python (libra)". Select that in your notebook.
263-
264- ### 4. 7/31/2025 (from Daeho Han)
265-
266- Here are some installationinstructions from ** Daeho Han** that may be used as a good revised summary of the above
267- installation instructions:
268-
269- conda create -n libra
270- conda install -c conda-forge boost=1.82 python=3.10
271- conda install -y -c conda-forge numpy scipy matplotlib imageio
272-
273- conda install -y conda-build make
274- conda install -y -c conda-forge gcc_linux-64=12.2.0 gxx_linux-64=12.2.0 cmake=3.24.2 python-devtools llvm-openmp
275- conda install -y -c conda-forge/label/gcc7 eigen mpfr
276- conda install -y -c psi4/label/dev libint2=2.7.1
277- conda install -y -c anaconda h5py gmp
278-
279- pip install -U jupyterlab
280- pip install -U py3Dmol
281- pip install -U scikit-learn
282- pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
32+ Please see [ here] ( INSTALLATION.md )
28333
28434## Developers and Contributors
28535
0 commit comments