Metadata-Version: 2.4
Name: posco
Version: 2.2.0a3
Summary: po-sco 2: atom-resolved interaction analysis of pre-protonated structures
Keywords: molecular docking,protein-ligand interactions,hydrogen bond,scoring,PyMOL,cheminformatics
Author: Manuel S. Sellner, Martin Smieško, Peter Rüthemann
Maintainer: Peter Rüthemann
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: C++
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Requires-Dist: numpy>=1.24
Requires-Dist: pyarrow>=14
Provides-Extra: pandas
Requires-Dist: pandas>=2; extra == "pandas"
Provides-Extra: pymol
Requires-Dist: pymol-open-source>=3; extra == "pymol"
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Requires-Dist: packaging; extra == "test"
Description-Content-Type: text/markdown

# po-sco

**po-sco** analyses a protein–ligand (or protein–protein) complex and lists, atom by atom, its hydrogen bonds,
lipophilic contacts, π, halogen and metal contacts and salt bridges. It scores hydrogen bonds and lipophilic
contacts with empirical pair terms, writes per-residue interaction fingerprints, and can add the
solvent-accessible surface and buried polar sites. A Repulsion Gate flags poses with severe steric clashes or
like-charge contacts. Results are Arrow tables and Feather files, and a PyMOL viewer draws them.

> **The scores are empirical descriptors, not binding free energies.** Their sums are not experimental or
> computed free energies, and no parameter was calibrated against affinities.

Inputs are fully protonated structures with explicit hydrogens: the receptor is a PDB file, the ligand is a PDB
file or an SD file / molfile (`.sdf`, `.sd`, `.mol`). po-sco validates the protonation and never changes it.

**Status: alpha (`2.2.0-alpha.3`).** The engine is C++20 with a Python package (`posco`). Wheels target Linux
x86-64 and CPython 3.10 to 3.13; it is tested with CPython 3.12. The package is not on PyPI yet: build it from
this repository (below).

## Install

```bash
pip install .                 # builds the C++ engine; needs cmake, ninja and a C++20 compiler
```

The command-line program `po-sco` and the Python package come from the same sources. Build options and the
tests: `docs/development/building.md`. Releasing: `docs/development/release.md`.

## Quick start

```bash
po-sco receptor.pdb ligand.sdf                      # summary
po-sco --format json receptor.pdb ligand.pdb > result.json
```

```python
import posco

result = posco.analyze("receptor.pdb", "ligand.sdf")
print(result.interactions.num_rows, result.scoring_model_id)   # a pyarrow.Table
result.to_feather("results/single")                            # one Feather V2 file per table
tables = posco.read_feather("results/single")

batch = posco.analyze_batch(pairs, on_error="collect")         # (receptor, ligand[, pose_id]) items
```

Every interaction record has its atoms, its measured geometry and, where defined, its score. Geometry that
cannot be measured is null with an outcome column, never zero.

## Command-line tools

| Command | Writes per complex |
|---|---|
| `posco-features` | the Feather tables (one folder per complex, or one dataset for a `--pairs` CSV) |
| `posco-pymol` | the Feather tables and a PyMOL viewer bundle (`.iviz`) |
| `posco-session` | the Feather tables, the bundle and a saved PyMOL session (`.pse`) |

```bash
posco-session receptor.pdb ligand.sdf -o out
posco-features --pairs complexes.csv -o out --workers 4
```

Details: `docs/scripts.md`. The PyMOL viewer is `posco.pymol`; see `docs/pymol/installation.md`.

## What it computes

| Topic | Document |
|---|---|
| Interaction terms, criteria and sources | `docs/interactions.md` |
| Output tables and the schema | `docs/feature_schema.md` |
| Command line | `docs/cli.md` |
| Python API | `docs/python_api.md` |
| SD-file ligands | `docs/sdf_input.md` |
| PDB input, topology, perception, geometry | `docs/pdb_input.md`, `docs/topology.md`, `docs/perception.md`, `docs/geometry.md` |
| Fingerprints | `docs/fingerprints.md` |
| Solvent accessibility and buried polar sites (opt-in) | `docs/biophysics_solvent.md`, `docs/polar_site_rules.md` |
| Repulsion Gate (opt-in) | `docs/repulsion_gate.md` |
| Validation | `docs/validation.md` |
| Sources and DOIs | `docs/references.md` |
| History of the modernization | `docs/project_history.md`, `CHANGELOG.md` |

## Citation

If you use po-sco, please cite the preprint that describes the method:

> Sellner MS, Lill MA, Smieško M. *Quality Matters: Deep Learning-Based Analysis of Protein-Ligand
> Interactions with Focus on Avoiding Bias.* bioRxiv 2023. doi:
> [10.1101/2023.11.13.566916](https://doi.org/10.1101/2023.11.13.566916)

`CITATION.cff` holds the same reference. The lipophilic term, its weights and the fingerprint features follow
that work; `docs/interactions.md` and `docs/fingerprints.md` state exactly where.

## Key references for the interaction analysis

The criteria and parameters are documented with their sources in `docs/references.md` (DOIs checked there).
The main ones:

- Salentin S *et al.* PLIP: fully automated protein–ligand interaction profiler. *Nucleic Acids Res* 2015.
  [10.1093/nar/gkv315](https://doi.org/10.1093/nar/gkv315). Adasme MF *et al.* PLIP 2021. *Nucleic Acids Res*
  2021, 49, W530. [10.1093/nar/gkab294](https://doi.org/10.1093/nar/gkab294). Geometric criteria for π stacking,
  cation–π, halogen bonds, metal coordination and salt bridges.
- Bouysset C, Fiorucci S. ProLIF. *J Cheminform* 2021.
  [10.1186/s13321-021-00548-6](https://doi.org/10.1186/s13321-021-00548-6). Independent interaction
  fingerprints (background).
- Arunan E *et al.* Definition of the hydrogen bond (IUPAC 2011). *Pure Appl Chem* 83, 1637.
  [10.1351/PAC-REC-10-01-02](https://doi.org/10.1351/PAC-REC-10-01-02). Desiraju GR *et al.* Definition of the
  halogen bond (IUPAC 2013). *Pure Appl Chem* 85, 1711.
  [10.1351/PAC-REC-12-05-10](https://doi.org/10.1351/PAC-REC-12-05-10).
- Vedani A. YETI. *J Comput Chem* 1988, 9, 269. [10.1002/jcc.540090310](https://doi.org/10.1002/jcc.540090310);
  Vedani A, Huhta DW. *J Am Chem Soc* 1990, 112, 4759.
  [10.1021/ja00168a021](https://doi.org/10.1021/ja00168a021). The 12-10 hydrogen-bond form with cos²
  directionality and metal-site parameters (plausible origins, see `docs/references.md`).
- Cordero B *et al.* Covalent radii revisited. *Dalton Trans* 2008, 2832.
  [10.1039/b801115j](https://doi.org/10.1039/b801115j). Covalent radii for the bond topology.
- Mitternacht S. FreeSASA. *F1000Research* 2016, 5:189.
  [10.12688/f1000research.7931.1](https://doi.org/10.12688/f1000research.7931.1). Independent oracle for the
  solvent-accessible surface.

## Authors and license

**Manuel S. Sellner** and **Martin Smieško** (University of Basel). The original interaction-analysis programs
are by Martin Smieško; Markus A. Lill is a co-author of the preprint. The package is maintained by
Peter Rüthemann.

Released under the MIT License (`LICENSE`).

The po-sco 1.0 programs (`interaction-analyzer` and the v1.24 binary) are no longer part of this repository;
they remain in its history up to tag `v2.2.0-alpha.2` (`docs/legacy_removed.md`).
