Installation#
Prerequisites#
Before installing Nearl, ensure that the following software is installed on your operating system:
A C++ compiler: g++
A CUDA compiler: nvcc
Optional:
A Python environment manager: conda, micromamba or others
A partial charge calculator (if partial charge is not readily available from the topology): ChargeFW2
Visualization and surface calculation: SiESTA-Surf and Open3D
Tip
For Linux users, micromamba is the recommended for Python package management due to its rapid dependency resolution and standalone installation of itself and packages.
The code snippet below installs micromamba in the /tmp/micromamba directory. Modify the directory path as needed to suit your preferences. To completely uninstall micromamba and its associated environments, simply delete the specified directory.
curl -s https://gist.githubusercontent.com/miemiemmmm/40d2e2b49e82d682ef5a7b2aa94a243f/raw/b9a3e3c916cbee42b2cfedcda69d2db916e637c0/install_micromamba.sh | bash -s -- /tmp/micromamba
Installation Guide#
Install dependencies#
Nearl requires AmberTools (specifically PyTraj, the python wrapper of CPPTRAJ), OpenBabel, and RDKit, for its functionality (we tested with Python 3.9).
PyTorch is the deep learning framework used for pre-built ML models. Note that you may need to manually modify the pytorch-cuda version to match your CUDA version.
The following command creates a new Python environment named nearl_env with the required dependencies, assuming micromamba is the package manager in use.
You can replace micromamba with conda or mamba if necessary.
git clone https://github.com/miemiemmmm/Nearl
cd Nearl
micromamba env create -f requirements.yml
Install Nearl#
The development and tests are performed on Linux(Ubuntu), and the software is not guaranteed to work on other operating systems. You can install Nearl using one of the following methods:
Installation from GitHub: Install directly from the repository.
pip install git+https://github.com/miemiemmmm/Nearl
Installation from Source: Clone the repository and install Nearl from the source.
git clone https://github.com/miemiemmmm/Nearl
cd Nearl
pip install .
Note
To correctly compile GPU code, ensure that the CUDA_COMPUTE_CAPABILITY is set appropriately for your GPU.
For older devices, adjust the CUDA_COMPUTE_CAPABILITY to match the CUDA architecture. The current default value is sm_80.
Optional dependencies#
Optional dependencies are available and can be obtained from their respective repositories:
ChargeFW2: sb-ncbr/ChargeFW2SiESTA-Surf: miemiemmmm/SiESTAOpen3D: isl-org/Open3D
Verify installation#
Run the following command to check the installation of major components from Nearl:
python -m nearl.valid_installation