https://github.com/pdbeurope/ccdutils
A set of python tools to deal with PDB chemical components definitions for small molecules, taken from the wwPDB Chemical Component Dictionary, uses RDKit
https://github.com/pdbeurope/ccdutils
Last synced: 6 months ago
JSON representation
A set of python tools to deal with PDB chemical components definitions for small molecules, taken from the wwPDB Chemical Component Dictionary, uses RDKit
- Host: GitHub
- URL: https://github.com/pdbeurope/ccdutils
- Owner: PDBeurope
- License: apache-2.0
- Created: 2020-05-11T08:37:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-30T16:33:50.000Z (11 months ago)
- Last Synced: 2024-11-12T12:13:13.842Z (11 months ago)
- Language: Python
- Homepage: https://pdbeurope.github.io/ccdutils/
- Size: 13 MB
- Stars: 42
- Watchers: 7
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
[](https://www.codefactor.io/repository/github/PDBeurope/ccdutils/overview/master)     
# pdbeccdutils
An RDKit-based python toolkit for parsing and processing small molecule definitions in [wwPDB Chemical Component Dictionary](https://www.wwpdb.org/data/ccd) and [wwPDB The Biologically Interesting Molecule Reference Dictionary](https://www.wwpdb.org/data/bird).`pdbeccdutils` provides streamlined access to all metadata of small molecules in the PDB and offers a set of convenient methods to compute various properties of small molecules using RDKIt such as 2D depictions, 3D conformers, physicochemical properties, matching common fragments and scaffolds, mapping to small-molecule databases using UniChem.
## Features
* `gemmi` CCD read/write.
* Generation of 2D depictions (`No image available` generated if the flattening cannot be done) along with the quality check.
* Generation of 3D conformations.
* Fragment library search (PDBe hand-curated library, ENAMINE, DSI).
* Chemical scaffolds (Murcko scaffold, Murcko general, BRICS).
* Lightweight implementation of [parity method](https://doi.org/10.1016/j.str.2018.02.009) by Jon Tyzack.
* RDKit molecular properties per component.
* UniChem mapping.
* Generating complete representation of multiple [Covalently Linked Components (CLC)](https://www.ebi.ac.uk/pdbe/news/introducing-covalently-linked-components)## Dependencies
* [RDKit](http://www.rdkit.org/) for small molecule representation. Presently tested with `2023.9.6`
* [GEMMI](https://gemmi.readthedocs.io/en/latest/index.html) for parsing mmCIF files.
* [scipy](https://www.scipy.org/) for depiction quality check.
* [numpy](https://www.numpy.org/) for molecular scaling.
* [networkx](https://networkx.org/) for bound-molecules.## Installation
create a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments) and install using pip
```bash
pip install pdbeccdutils
```## Contribution
We encourage you to contribute to this project. The package uses [poetry](https://python-poetry.org/) for packaging and dependency management. You can develop locally using:```bash
git clone https://github.com/PDBeurope/ccdutils.git
cd ccdutils
pip install poetry
poetry install --with tests,docs
pre-commit install
```The pre-commit hook will run linting, formatting and update `poetry.lock`. The `poetry.lock` file will lock all dependencies and ensure that they match pyproject.toml versions.
To add a new dependency
```bash
# Latest resolvable version
poetry add# Optionally fix a version
poetry add @
```To change a version of a dependency, either edit pyproject.toml and run:
```bash
poetry sync --with dev
```or
```bash
poetry add @
```## Documentation
The documentation is generated using `sphinx` in `sphinx_rtd_theme` and hosted on GitHub Pages. To generate the documentation locally,
```bash
cd doc
poetry run sphinx-build -b html . _build/html# See the documentation at http://localhost:8080.
python -m http.server 8080 -d _build/html
```