Skip to content
Back to skills

Bio Applied Rdkit Basics

ASecurity

RDKit fundamentals: SMILES parsing, molecular properties, substructure search, fingerprints, and chemical similarity. Use when performing cheminformatics operations in Python.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
data-aipythongit

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned May 27, 2026

npx -y skills add Pavel-Kravchenko/Bioinformatics --skill bio-applied-rdkit-basics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bio Applied Rdkit Basics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bio Applied Rdkit Basics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pavel-kravchenko-bio-applied-rdkit-basics/badge)](https://www.skillsdirectory.com/skills/pavel-kravchenko-bio-applied-rdkit-basics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bio-applied-rdkit-basics
description: "RDKit fundamentals: SMILES parsing, molecular properties, substructure search, fingerprints, and chemical similarity. Use when performing cheminformatics operations in Python."
tool_type: python
primary_tool: RDKit
---

# Molecular Representations  RDKit

- [RDKit Getting Started in Python](https://www.rdkit.org/docs/GettingStartedInPython.html)
- [TeachOpenCADD — Jupyter drug design course](https://github.com/volkamerlab/teachopencadd)
- [Practical Cheminformatics blog](https://practicalcheminformatics.blogspot.com/)

## Molecular Representations

> Explain SMILES notation (linear text), InChI (International Chemical Identifier), and molecular graph representation. Examples: aspirin, caffeine, ibuprofen.

```python
# Example: Install RDKit
# pip install rdkit

from rdkit import Chem
from rdkit.Chem import Draw, Descriptors
from rdkit.Chem import rdMolDescriptors
import pandas as pd
import numpy as np

# Example: Parse SMILES
# smiles_dict
#     'Aspirin':   'CC(O)Oc1ccccc1C(O)O',
#     'Caffeine':  'Cn1cnc2c1c(O)n(C)c(O)n2C',
#     'Ibuprofen': 'CC(C)Cc1ccc(cc1)C(C)C(O)O',
#
# mols  name: Chem.MolFromSmiles(smi) for name, smi in smiles_dict.items()

# Example: Validate (None  invalid SMILES)
# for name, mol in mols.items():
#     print(f'name: valid if mol else INVALID')
```

## Structure Visualization

> Draw 2D structures with RDKit Draw. Create a grid image of all three molecules.

```python
from IPython.display import display

# Example: Draw molecule grid
# img  Draw.MolsToGridImage(list(mols.values()), legendslist(mols.keys()),
#                            molsPerRow3, subImgSize(300, 250))
# display(img)
```

## Molecular Descriptors & Lipinski's Rule of Five

> Compute MW, LogP, HBD, HBA, TPSA for each molecule. Check Lipinski's Rule of Five for oral bioavailability prediction.


## Molecular Fingerprints

> Compute Morgan (ECFP4) and MACCS fingerprints. Visualize as bit vectors. Explain radius and nBits parameters.

```python
from rdkit.Chem import AllChem
from rdkit import DataStructs

# Example: Morgan fingerprints (ECFP4: radius2, nBits2048)
# fps  name: AllChem.GetMorganFingerprintAsBitVect(mol, radius2, nBits2048)
#        for name, mol in mols.items()

# Example: MACCS keys
# from rdkit.Chem.MACCSkeys import GenMACCSKeys
# maccs_fps  name: GenMACCSKeys(mol) for name, mol in mols.items()
```

## Tanimoto Similarity Search

> Compute pairwise Tanimoto similarity matrix for the three molecules. Query a small library and find the most similar compound.

```python
import seaborn as sns
import matplotlib.pyplot as plt

# Example: Pairwise Tanimoto similarity
# names  list(fps.keys())
# sim_matrix  pd.DataFrame(indexnames, columnsnames, dtypefloat)
# for n1 in names:
#     for n2 in names:
#         sim_matrix.locn1, n2  DataStructs.TanimotoSimilarity(fpsn1, fpsn2)

# sns.heatmap(sim_matrix.astype(float), annotTrue, cmap'Blues', vmin0, vmax1)
# plt.title('Tanimoto Similarity (ECFP4)')
# plt.show()
```

## Summary

> Recap molecular representations, descriptors, and fingerprints. Discuss use cases: virtual screening, chemical diversity analysis, lead optimization. Link to QSAR modeling notebook.

## Pitfalls

- **SMILES canonicalization**: Different SMILES can represent the same molecule; always canonicalize before comparison
- **Stereochemistry**: Ignoring chirality in fingerprints can merge enantiomers with different bioactivity
- **Descriptor scaling**: Molecular descriptors span different ranges; always standardize before ML

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.