Skip to main content

INSTALLATION (using PyPI)

If you would like to use pKa-ANI in a python script, simply use the command below:

pip install pkaani

Python script usage

The snippet below shows how to use the calculate_pka function within a python script - the input argument is a list of strings which are PDB file names in the working directory. Given a list of PDBs titled "1brs.pdb" and "6oge_de.pdb":

from pkaani.pkaani import calculate_pka as calculate_pkaani
  
pKas = calculate_pkaani(["1brs.pdb","6oge_de.pdb"])

Command line usage

Note that command line usage (e.g. pkaani -i 1FDL.pdb on the command line) will not work with the simple pip install given above.

Command line usage performs energy minimization on the structure before the pKa calculation, which requires ambertools and can be installed as given below (only works with Python versions <3.14)

conda create -n pkaani python=3.13
conda activate pkaani
conda install conda-forge::ambertools

Note that this necessitates a numpy version earlier than 2.0, so if you are running into a numpy error use the following command to alleviate it:

pip install "numpy<2"

Example command line usages:

  • If PDB file doesnt exist, it is downloaded and prepared for pKa calculations.
pkaani -i 1BNZ
      
pkaani -i 1BNZ.pdb
  • Multiple files can be given as inputs
pkaani -i 1BNZ,1E8L
  • If a specific directory is wanted:
pkaani -i path_to_file/1BNZ
      
pkaani -i path_to_file/1BNZ,path_to_file/1E8L

Arguments:

-h: Help

-i: Input files. Inputs can be given with or without file extension (.pdb). 
    If PDB file is under a specific directory (or will be downloaded) the path                 
    can also be given as path_to_file/PDBFILE. Multiple PDB files can be given 
    by using "," as separator (i.e. pkaani -i 1BNZ,1E8L).

INSTALLATION (from source code)

Navigate to this repository for the source code for this pyPI upload: https://github.com/adnaksskanda/pKa-ANI/tree/pyPI_upload

Prior to the installation of pKa-ANI, users should make sure they have installed conda.

To install pKa-ANI, navigate to the directory of the source that you've downloaded and;

conda env create -f pkaani_env.yaml

This will create a conda environment named pkaani and install all required packages. After the environment is created, activate the environment and install the package.

conda activate pkaani 
pip install .

PREREQUISITES:

  • miniconda/anaconda

If pkaani_env.yaml is not used, users should make sure the following packages are installed.

  • python>=3.10
  • numpy
  • scipy
  • pytorch
  • torchani==2.2.0
  • scikit-learn==1.6.1
  • ase
  • joblib
  • ambertools
  • setuptools

Other notes

pKa-ANI requires PDB files to have H atoms that are added with default ionization states of residues: ASP, GLU, LYS, TYR, HIE.

Due to this reason, input PDB file(s) are prepared before the calculation of pKa values (output PDB file 'PDBID_pkaani.pdb').

We would like to warn users, that our models are trained to predict pKa values for apo-proteins. Due to this, any residue that is not an aminoacid is removed from PDB file(s) during the preparation.

CITATION

Gokcan, H.; Isayev, O. Prediction of Protein p K a with Representation Learning. Chem. Sci. 2022, 13 (8), 2462–2474. https://doi.org/10.1039/D1SC05610G.

LICENSING

Please read LICENSE file.

Metadata

Release files for pkaani 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pkaani 0.1.14
File Size Uploaded
pkaani-0.1.14.tar.gz 23.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pkaani 0.1.14
File Interpreter ABI Platform
pkaani-0.1.14-py3-none-any.whl Python 3 none any Details

Total release size: 48.4 MB

Release files / pkaani-0.1.14.tar.gz

Download URL pkaani-0.1.14.tar.gz
Size 23.8 MB
Tags Source
SHA-256 checksum
How to use checksums
ba82adea4ef05ff5602b25c15b2bbbfc43e3662491e84d88a6831f1acec7d08b
BLAKE2b-256 checksum
How to use checksums
e6c0a8bbcaa3502d19751c42d9ef3fc8dec37a3d2d1add7c6a052898a09303f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.12

Release files / pkaani-0.1.14-py3-none-any.whl

Download URL pkaani-0.1.14-py3-none-any.whl
Size 24.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
35a079ff95d22d75951f2dfa496434634e53affcc476b4dc7eb6872a4c34cb9e
BLAKE2b-256 checksum
How to use checksums
e1e04a21a053cf7d1496338970b6ad43a94e228d6b81fcd1497ddf6e1226eb3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.12

Release history Release notifications | RSS feed

This release

0.1.14 This release

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page