|
| 1 | +.. TurboRVB_manual documentation master file, created by |
| 2 | + sphinx-quickstart on Thu Jan 24 00:11:17 2019. |
| 3 | + You can adapt this file completely to your liking, but it should at least |
| 4 | + contain the root `toctree` directive. |
| 5 | +
|
| 6 | +.. _turbogenius_installation: |
| 7 | + |
| 8 | +Installation of TurboGenius |
| 9 | +====================================================== |
| 10 | + |
| 11 | +The following is an instruction to install TurboGenius. |
| 12 | +If you have any problem on the installation, please visit `TurboGenius Discussions <https://github.com/kousuke-nakano/turbogenius/discussions>`__ and please post your problem. |
| 13 | + |
| 14 | +Prerequisites |
| 15 | +-------------------------------------------- |
| 16 | + |
| 17 | +Before installing the packages, ensure you have the following prerequisites: |
| 18 | + |
| 19 | +* TurboRVB |
| 20 | +* Python 3.8 or later |
| 21 | +* Conda (optional, recommended for Python environment management) |
| 22 | + |
| 23 | +TurboGenius also depends on the following Python packages, which will be automatically installed during the installation process: |
| 24 | + |
| 25 | +* numpy (version 1.x) |
| 26 | +* pandas |
| 27 | +* matplotlib |
| 28 | +* trexio |
| 29 | +* trexio-tools |
| 30 | +* basis-set-exchange |
| 31 | +* ase |
| 32 | +* pymatgen |
| 33 | +* click |
| 34 | +* tqdm |
| 35 | +* psutil |
| 36 | +* pytest (for developers) |
| 37 | +* setuptools_scm (for developers) |
| 38 | + |
| 39 | +To run the tutorials, the users also need to install the following software: |
| 40 | + |
| 41 | +* PySCF |
| 42 | + |
| 43 | + |
| 44 | +TurboRVB installation |
| 45 | +-------------------------------------------- |
| 46 | + |
| 47 | +See our documents for installation of TurboRVB :ref:`turborvb_installation`. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +TurboGenius installation |
| 52 | +-------------------------------------------- |
| 53 | + |
| 54 | +Let's make a conda environment to install turbogenius (if you prefer) |
| 55 | + |
| 56 | +.. code-block:: bash |
| 57 | + |
| 58 | + % conda create -n turborvb python=3.8 |
| 59 | + % conda activate turborvb |
| 60 | +
|
| 61 | +Please download the source codes from the GitHub repository. |
| 62 | + |
| 63 | +.. code-block:: bash |
| 64 | +
|
| 65 | + % cd ~/applications |
| 66 | + % git clone https://github.com/kousuke-nakano/turbogenius.git |
| 67 | +
|
| 68 | +Let's install turbogenius via pip |
| 69 | + |
| 70 | +.. code-block:: bash |
| 71 | +
|
| 72 | + % cd turbogenius |
| 73 | + % pip install -e . # Install in development mode |
| 74 | +
|
| 75 | +Test if it works. |
| 76 | + |
| 77 | +.. code-block:: bash |
| 78 | +
|
| 79 | + % turbogenius --help |
| 80 | +
|
| 81 | +If you see the help output, TurboGenius has been successfully installed! |
| 82 | + |
| 83 | + |
| 84 | +Troubleshooting |
| 85 | +-------------------------------------------- |
| 86 | + |
| 87 | +Common issues and solutions: |
| 88 | + |
| 89 | +1. If the help output is not shown, and the following error messages are produced instead: |
| 90 | + |
| 91 | + .. code-block:: plain |
| 92 | +
|
| 93 | + $ turbogenius --help |
| 94 | + Traceback (most recent call last): |
| 95 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/pyturbo/utils/env.py", line 46, in <module> |
| 96 | + os.path.dirname(subprocess.check_output(cmd, shell=True, env=sys_env)) |
| 97 | + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 98 | + File "/envs/turborvb/lib/python3.11/subprocess.py", line 466, in check_output |
| 99 | + return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, |
| 100 | + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 101 | + File "/envs/turborvb/lib/python3.11/subprocess.py", line 571, in run |
| 102 | + raise CalledProcessError(retcode, process.args, |
| 103 | + subprocess.CalledProcessError: Command 'which readalles.x' returned non-zero exit status 1. |
| 104 | +
|
| 105 | + During handling of the above exception, another exception occurred: |
| 106 | + |
| 107 | + Traceback (most recent call last): |
| 108 | + File "/envs/turborvb/bin/turbogenius", line 3, in <module> |
| 109 | + from turbogenius.turbo_genius_cli import cli |
| 110 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/__init__.py", line 11, in <module> |
| 111 | + from . import * |
| 112 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/correlated_sampling_genius.py", line 21, in <module> |
| 113 | + from turbogenius.pyturbo.vmc import VMC |
| 114 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/pyturbo/__init__.py", line 10, in <module> |
| 115 | + from . import * |
| 116 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/pyturbo/lrdmc.py", line 20, in <module> |
| 117 | + from turbogenius.pyturbo.namelist import Namelist |
| 118 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/pyturbo/namelist.py", line 23, in <module> |
| 119 | + from turbogenius.pyturbo.utils.utility import get_str_variable_type_auto |
| 120 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/pyturbo/utils/utility.py", line 29, in <module> |
| 121 | + from .env import pyturbo_root |
| 122 | + File "/envs/turborvb/lib/python3.11/site-packages/turbogenius/pyturbo/utils/env.py", line 50, in <module> |
| 123 | + raise ValueError( |
| 124 | + ValueError: Set TURBORVB_ROOT (e.g., export TURBORVB_ROOT=XXX in ~.bashrc) |
| 125 | + |
| 126 | + it occurs when TurboRVB is not installed or the executables of TurboRVB are not included in the command search paths. Please make sure that you have installed TurboRVB following the inststruction :ref:`turborvb_installation`. Then, add the directory to the ``PATH`` environment variable where the TurboRVB executables are installed, or set it to ``TURBORVB_ROOT`` as shown in the error message. |
| 127 | + |
| 128 | +2. **Python environment issues** |
| 129 | + |
| 130 | + If you have problems with the Python environment: |
| 131 | + |
| 132 | + * Ensure you're using the correct Python version |
| 133 | + * Try creating a fresh conda environment |
| 134 | + * Check that pip is up to date: ``pip install --upgrade pip`` |
| 135 | + |
| 136 | +For additional help, please visit the discussion forums linked above or open an issue on the respective GitHub repositories. |
0 commit comments