Skip to main content

Tautomer-aware microstate ranking · HH scoring · PubChem pKa evidence · pH-adjusted 3D structures

Project description

pKaNET Cloud+

PyPI Python License: MIT

Tautomer-aware microstate ranking · Henderson–Hasselbalch scoring · PubChem pKa evidence · pH-adjusted 3D structures

Part of the DFDD Project.


Features

  • Tautomer enumeration with SMARTS-based plausibility scoring
  • Dimorphite-DL protonation state enumeration over a pH window
  • Henderson–Hasselbalch 5-layer microstate scoring
  • PubChem experimental pKa evidence to guide state selection
  • ETKDGv3 + MMFF 3D minimization for the top microstates
  • Optional ML backends: pkasolver, propka, unipka CLI
  • CLI (pkanet) and Python API
  • Streamlit web UI (optional)

Installation

# Minimal (RDKit + requests only — heuristic mode)
pip install pkanet-cloud

# Recommended (adds Dimorphite-DL and pandas)
pip install "pkanet-cloud[recommended]"

# Full (adds propka and Streamlit web UI)
pip install "pkanet-cloud[all]"

RDKit note: rdkit is listed as a dependency but PyPI's rdkit wheel requires Python ≥ 3.9 on 64-bit platforms. If your environment uses a conda-managed RDKit, install without deps:

pip install pkanet-cloud --no-deps
pip install requests dimorphite-dl pandas   # then add these manually

CLI

After installation a pkanet command is available:

# Single SMILES
pkanet --smiles "CC(=O)OC1=CC=CC=C1C(=O)O" --ph 7.4

# Compound name  (PubChem auto-lookup)
pkanet --name "baicalein" --ph 7.4 --out-dir ./results

# SMILES file  (one SMILES [name] per line)
pkanet --smi-file ligands.smi --formats PDB MOL2 --top-n 3

# Ligand file  (.pdb / .mol2 / .sdf)
pkanet --file ligand.pdb --no-pubchem --keep-stereo

# Fast heuristic charge only  (no 3D, sub-millisecond)
pkanet --smiles "NCC(=O)O" --fast
pkanet --smi-file library.smi --fast --quiet   # TSV output

All CLI flags

Flag Default Description
--ph 7.4 Target pH
--out-dir ./pkanet_out Output directory
--out-name ligand Base name for output files
--formats PDB MOL2 SDF PDB 3D output format(s)
--ph-window 1.0 Dimorphite-DL pH window
--max-tautomers 8 Max tautomers to enumerate
--top-n 5 Top N microstates to rank
--top-k-3d 3 Write 3D for top-k microstates
--keep-stereo off Skip R/S stereoisomer enumeration
--no-pubchem off Disable PubChem pKa lookup
--fast off Heuristic charge only (no 3D)
--json-out FILE Write full results as JSON
--quiet off TSV output, no banner

Python API

from pkanet import predict_charge, heuristic_net_charge, batch_predict_charges

# Auto mode: fast for unambiguous sites, full pipeline for borderline pKa
charge, mode = predict_charge("NCC(=O)O", ph=7.4)
print(charge, mode)   # 0  'full'

# Sub-millisecond heuristic estimate
charge = heuristic_net_charge("CC(=O)OC1=CC=CC=C1C(=O)O", ph=7.4)
print(charge)         # -1

# Batch prediction → pandas DataFrame
df = batch_predict_charges(
    ["NCC(=O)O", "CC(N)C(=O)O", "c1ccccc1O"],
    ph=7.4,
    mode="auto",
)
print(df[["name", "predicted_charge", "is_zwitterion"]])

Full pipeline

from pkanet.core import run_job

result = run_job(
    input_type    = "SMILES",
    smiles_text   = "CC(=O)OC1=CC=CC=C1C(=O)O",
    uploaded_bytes = None,
    uploaded_name  = None,
    target_pH     = 7.4,
    output_name   = "aspirin",
    out_dir       = "./output",
    output_formats = ["PDB"],
    use_pubchem   = True,
)

top = result["results"][0]
print(top["selected_microstate_smiles"])
print(top["formal_charge"])
print(top["minimized_pdb"])

pKa backends (auto-selected by priority)

Priority Backend Install
1 pkasolver (GNN) pip install pkasolver
2 propka (semi-empirical) pip install "pkanet-cloud[propka]"
3 unipka CLI system install
4 heuristic SMARTS table built-in, always available

Citation

If you use pKaNET Cloud+ in your research, please cite:

Hengphasatporn K. et al. DFDD / Anyone Can Dock. JCIM (2026).
Ropp PJ et al. Dimorphite-DL. J Cheminform (2019).

License

MIT © Kowit Hengphasatporn — kowith@ccs.tsukuba.ac.jp

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pkanet_cloud-0.8.0.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pkanet_cloud-0.8.0-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file pkanet_cloud-0.8.0.tar.gz.

File metadata

  • Download URL: pkanet_cloud-0.8.0.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for pkanet_cloud-0.8.0.tar.gz
Algorithm Hash digest
SHA256 6fdc78a05936598950eea7af439877c8a378fbeb6c3c4953aac196d8fe5db49b
MD5 246853c5f12a091260151e34896c99e1
BLAKE2b-256 fdd498e385ca9f2a3cc55a49f5e0201d772cde84a6b616e3e6c592e028a59dea

See more details on using hashes here.

File details

Details for the file pkanet_cloud-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: pkanet_cloud-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for pkanet_cloud-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c9ed5c8196d76a3c2397e48fa7dafebba7cc63a12ccb5a36e9987e5d4e63ecb
MD5 6f3630ed69e47d222e82666790f5c95c
BLAKE2b-256 1ddc761b11f3da4eceb9e1bed3b822c350363e9b440b2517fa486b8c8578a31e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page