Skip to main content

XH-/PI interaction detection

Project description

Xpid

Xpid is a Gemmi-based tool designed to detect XH-π interactions in PDB/mmCIF files.

Installation

Requires Python 3.9+.

pip install xpid

Configuration

The detection of XH–π interactions depends on the positions of hydrogen atoms. To add hydrogens to the structure before detection, the path to a monomer library must be specified (e.g., the CCP4 Monomer Library).

xpid --set-mon-lib /Users/abc123/monomers

Quick Start

Scans a directory or PDB/mmCIF file and save results into a JSON file.

xpid ./data

Output: ./data/xpid_output/xpid_results.json

Geometric Criteria

Definitions: * Cπ: Ring Centroid

  • n: Ring Normal Vector
  • X: Donor Heavy Atom
  • Xproj: The projection of X onto the π plane
  • H: Hydrogen

Hudson System

  • Distance (X - Cπ): ≤ 4.5 Å
  • Angle (X - H, n): ≤ 40°
  • Distance (Xproj - Cπ):
    • ≤ 1.6 Å (for His, Trp-A)
    • ≤ 2.0 Å (for Phe, Trp-B, Tyr)

Plevin System

  • Distance (X - Cπ): < 4.3 Å
  • Angle (X - H - Cπ): > 120°
  • Angle (X - Cπ, n): < 25°

Command Options

Argument Description
inputs Input file (.cif, .pdb) or directory path.
--out-dir Specify custom output directory.
--separate Save results as separate files per PDB (Default: Merge).
--file-type Output format: json (default) or csv.
-v, --verbose Output detailed metrics (angles, coords, B-factors).
--log Enable log file saving.
--h-mode N Hydrogen handling mode (0=NoChange, 4=ReAddButWater).
--jobs N Number of CPU cores to use (Default: 1).
--model ID Model index to analyze (Default: 0; use all for NMR).
--mon-lib Custom Monomer Library path ("/Users/abc123/monomers").
--set-mon-lib Set default Monomer Library ("/Users/abc123/monomers").
--show-mon-lib-config Show current Monomer Library status.
--pi-res Limit acceptor residues (e.g., TRP,TYR).
--donor-res Limit donor residues (e.g., HIS,ARG).
--donor-atom Limit donor element types (e.g., N,O).

Output Data

Simple Mode (Default)

  • PDB ID, Resolution
  • Chain, Name, ID for X-donor and $\pi$ Residues.
  • Distance ($d_{X \text{--} C_\pi}$)

Detailed Mode (-v)

  • Includes all Simple fields plus:
  • Secondary structure: Type (H/G/I/E/C) and Region IDs.
  • Coordinates: Flattened x, y, z for $\pi$-center and X-atom.
  • Geometric parameters: $\angle X\text{--}H \text{--} \vec{n}$, $\angle X\text{--}H \text{--} C_\pi$, $\angle X \text{--} C_\pi \text{--} \vec{n}$, $d_{Xp \text{--} C_\pi}$
  • B-factors: Average B-factor for ring atoms and X-atom.

Dependencies

  • gemmi
  • numpy

Contact

Sean Wang (sean.wang@york.ac.uk)

York Structural Biology Laboratory (YSBL), University of York

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

xpid-0.0.2.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

xpid-0.0.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file xpid-0.0.2.tar.gz.

File metadata

  • Download URL: xpid-0.0.2.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for xpid-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e6b69e9a26d3865235880021f6c90dc6ae802fbe2aeb54dd2851a6500f4ebb47
MD5 cfdcdb4961b41cedc933ce9695df4f80
BLAKE2b-256 6c04839fa5fbc38d7d839a3e242799650da90b129ebf91d1c7c872f12961a2cb

See more details on using hashes here.

File details

Details for the file xpid-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: xpid-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for xpid-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 db3451815487c5df7c760dce94cced3c880e4c881b2e54d887b99b3467eb19e0
MD5 1bef865a2edc72a63294677e95395464
BLAKE2b-256 0801105672db70c2884c07a53620c53647be3c081ca2c80d2c35f43ed2f3945c

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