Installation

Installing pdb_prot_align itself

pdb_prot_align requires Python 3.6 or higher.

The easiest way to install pdb_prot_align is from PyPI using pip with:

pip install pdb_prot_align

You also need to ensure that mafft is installed so it is available at the command line as mafft.

The source code for pdb_prot_align is available on GitHub at https://github.com/jbloomlab/pdb_prot_align.

Installing PyMol and nglview

In some cases, you may want to visualize the results on protein structures using pymol or nglview. This can be done as described in the Colored structures in PyMol and the Interactive structures with nglview examples by taking advantage of the pdb_prot_align.pymol_struct and pdb_prot_align.nglview_struct modules. In order to uses these, you must install pymol or nglview, which is substantially more complex than the simple instructions above to install pdb_prot_align.

pymol can be installed a number of ways, as can nglview. We suggest doing it via conda. The environment.yml file in the pdb_prot_align GitHub repo can be used to install pymol and nglview. To do this, just follow the instructions to create a conda environment from a YAML file. However assuming that you’re not building from the source in the pdb_prot_align GitHub repo, you should change the lines in the environment.yml file that read:

- pip:
  - -e .

to instead read:

- pip:
  - pdb_prot_align

For nglview, after building and activating the conda environment, you then need to run the following command (see here):

jupyter-nbextension enable nglview --py --sys-prefix

If you are using mybinder, this can be done via a postBuild file with the following contents placed in ./binder/postBuild.

Note that if you do not want your pymol images to have a watermark, you’ll also have to manually install a pymol license. Note also note that the current version of nglview may only work in a Jupyter notebook, if you want to run through Jupyter lab you may have to follow the extra steps here.