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.9.0.tar.gz (42.5 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.9.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pkanet_cloud-0.9.0.tar.gz
  • Upload date:
  • Size: 42.5 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.9.0.tar.gz
Algorithm Hash digest
SHA256 701e8a817f472cd285427c5da6c579fa63c04f762ca2bdeb53c09bec82a0d61a
MD5 2dd4238748f117d41b315f21bcfaec35
BLAKE2b-256 8b58a6d5d8a1e4f948edbe12bad26fc8a286809e9c0260731cf00fe25e640ae5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pkanet_cloud-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 43.9 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.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb8d5c8a2d280410c38e31b522dfb5622cc08aa0b49f54f9631208252cac05f3
MD5 14d30a41a1be27b65dd4a1f9d47e80ce
BLAKE2b-256 ebfc3733d9db4cde7dcfc2752a454383e49c11f014da1d87507998424adfd94a

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