Graphein depends on a number of other libraries for constructing protein graphs and meshes. These should be installed in advance.


We recommend installing Graphein in a virtual environment. ..


Some of these packages have more involved setup depending on your requirements (i.e. CUDA). Please refer to the original packages for more detailed information

conda create -n graphein python=3.7

Installing PyTorch Libraries

pip install torch
pip install dgl
pip install pytorch3d

Installing Pytorch Geometric

$ pip install torch-scatter==latest+${CUDA} -f
$ pip install torch-sparse==latest+${CUDA} -f
$ pip install torch-cluster==latest+${CUDA} -f
$ pip install torch-spline-conv==latest+${CUDA} -f
$ python install or pip install torch-geometric

Install all needed packages with ${CUDA} replaced by either cpu, cu92, cu100 or cu101 depending on your PyTorch installation:

GetContacts Requirements

# Install dependencies
$ conda install scipy numpy scikit-learn matplotlib pandas cython seaborn
$ pip install ticc==0.1.4

# Install vmd-python dependencies
$ conda install netcdf4 numpy pandas seaborn  expat tk=8.5  # Alternatively use pip
$ brew install netcdf pyqt # Assumes is installed

# Set up vmd-python library
$ git clone
$ cd vmd-python
$ python build
$ python install
$ cd ..

# Set up getcontacts library
$ git clone
$ echo "export PATH=`pwd`/getcontacts:\$PATH" >> ~/.bash_profile
$ source ~/.bash_profile

# Test installation
$ cd getcontacts/example/5xnd
$ --topology 5xnd_topology.pdb \
                          --trajectory 5xnd_trajectory.dcd \
                          --itypes hb \
                          --output 5xnd_hbonds.tsv

Install DSSP

We use DSSP to compute secondary structure features of proteins.

conda install -c salilab dssp


Install IPyMol from GitHub. The release on PyPI appears to behind the repository and some required functionality is unavailable.

git clone
cd ipymol
pip install .

Install Graphein

git clone
cd graphein
pip install -e .