LQF_Machine_Learning_E…
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Core cheminformatics toolkit for SMILES/SDF/InChI parsing, descriptors (MW, LogP, TPSA), fingerprints, ECFP/Morgan fingerprints, substructure search, 2D/3D generation, similarity, reactions, and datamol-style molecule standardization when no separate wrapper skill is routed.
$ npx -y skills add foryourhealth111-pixel/Vibe-Skills --skill rdkit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/rdkitContext preview
The summary Claude sees to decide when to auto-load this skill.
Core cheminformatics toolkit for SMILES/SDF/InChI parsing, descriptors (MW, LogP, TPSA), fingerprints, ECFP/Morgan fingerprints, substructure search, 2D/3D generation, similarity, reactions, and datamol-style molecule standardization when no separate wrapper skill is routed.
name: rdkit description: "Core cheminformatics toolkit for SMILES/SDF/InChI parsing, descriptors (MW, LogP, TPSA), fingerprints, ECFP/Morgan fingerprints, substructure search, 2D/3D generation, similarity, reactions, and datamol-style molecule standardization when no separate wrapper skill is routed."
RDKit is a comprehensive cheminformatics library providing Python APIs for molecular analysis and manipulation. This skill provides guidance for reading/writing molecular structures, calculating descriptors, fingerprinting, substructure searching, chemical reactions, 2D/3D coordinate generation, and molecular visualization. Use this skill for drug discovery, computational chemistry, and cheminformatics research tasks.
**Reading Molecules:**
Read molecular structures from various formats:
from rdkit import Chem
# From SMILES strings
mol = Chem.MolFromSmiles('Cc1ccccc1') # Returns Mol object or None
# From MOL files
mol = Chem.MolFromMolFile('path/to/file.mol')
# From MOL blocks (string data)
mol = Chem.MolFromMolBlock(mol_block_string)
# From InChI
mol = Chem.MolFromInchi('InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H')**Writing Molecules:**
Convert molecules to text representations:
# To canonical SMILES smiles = Chem.MolToSmiles(mol) # To MOL block mol_block = Chem.MolToMolBlock(mol) # To InChI inchi = Chem.MolToInchi(mol)
**Batch Processing:**
For processing multiple molecules, use Supplier/Writer objects:
# Read SDF files
suppl = Chem.SDMolSupplier('molecules.sdf')
for mol in suppl:
if mol is not None: # Check for parsing errors
# Process molecule
pass
# Read SMILES files
suppl = Chem.SmilesMolSupplier('molecules.smi', titleLine=False)
# For large files or compressed data
with gzip.open('molecules.sdf.gz') as f:
suppl = Chem.ForwardSDMolSupplier(f)
for mol in suppl:
# Process molecule
pass
# Multithreaded processing for large datasets
suppl = Chem.MultithreadedSDMolSupplier('molecules.sdf')
# Write molecules to SDF
writer = Chem.SDWriter('output.sdf')
for mol in molecules:
writer.write(mol)
writer.close()**Important Notes:**
RDKit automatically sanitizes molecules during parsing, executing 13 steps including valence checking, aromaticity perception, and chirality assignment.
**Sanitization Control:**
# Disable automatic sanitization
mol = Chem.MolFromSmiles('C1=CC=CC=C1', sanitize=False)
# Manual sanitization
Chem.SanitizeMol(mol)
# Detect problems before sanitization
problems = Chem.DetectChemistryProblems(mol)
for problem in problems:
print(problem.GetType(), problem.Message())
# Partial sanitization (skip specific steps)
from rdkit.Chem import rdMolStandardize
Chem.SanitizeMol(mol, sanitizeOps=Chem.SANITIZE_ALL ^ Chem.SANITIZE_PROPERTIES)**Common Sanitization Issues:**
**Accessing Molecular Structure:**
# Iterate atoms and bonds
for atom in mol.GetAtoms():
print(atom.GetSymbol(), atom.GetIdx(), atom.GetDegree())
for bond in mol.GetBonds():
print(bond.GetBeginAtomIdx(), bond.GetEndAtomIdx(), bond.GetBondType())
# Ring information
ring_info = mol.GetRingInfo()
ring_info.NumRings()
ring_info.AtomRings() # Returns tuples of atom indices
# Check if atom is in ring
atom = mol.GetAtomWithIdx(0)
atom.IsInRing()
atom.IsInRingSize(6) # Check for 6-membered rings
# Find smallest set of smallest rings (SSSR)
from rdkit.Chem import GetSymmSSSR
rings = GetSymmSSSR(mol)**Stereochemistry:**
# Find chiral centers from rdkit.Chem import FindMolChiralCenters chiral_centers = FindMolChiralCenters(mol, includeUnassigned=True) # Returns list of (atom_idx, chirality) tuples # Assign stereochemistry from 3D coordinates from rdkit.Chem import AssignStereochemistryFrom3D AssignStereochemistryFrom3D(mol) # Check bond stereochemistry bond = mol.GetBondWithIdx(0) stereo = bond.GetStereo() # STEREONONE, STEREOZ, STEREOE, etc.
**Fragment Analysis:**
# Get disconnected fragments frags = Chem.GetMolFrags(mol, asMols=True) # Fragment on specific bonds from rdkit.Chem import FragmentOnBonds frag_mol = FragmentOnBonds(mol, [bond_idx1, bond_idx2]) # Count ring systems from rdkit.Chem.Scaffolds import MurckoScaffold scaffold = MurckoScaffold.GetScaffoldForMol(mol)
**Basic Descriptors:**
from rdkit.Chem import Descriptors # Molecular weight mw = Descriptors.MolWt(mol) exact_mw = Descriptors.ExactMolWt(mol) # LogP (lipophilicity) logp = Descriptors.MolLogP(mol) # Topological polar surface area tpsa = Descriptors.TPSA(mol) # Number of hydrogen bond donors/acceptors hbd = Descriptors.NumHDonors(mol) hba = Descriptors.NumHAcceptors(mol) # Number of rotatable bonds rot_bonds = Descriptors.NumRotatableBonds(mol) # Number of aromatic rings aromatic_rings = Descriptors.NumAromaticRings(mol)
**Batch Descriptor Calculation:**
# Calculate all descriptors at once
all_descriptors = Descriptors.CalcMolDescriptors(mol)
# Returns dictionary: {'MolWt': 180.16, 'MolLogP': 1.23, ...}
# Get list of available descriptor names
descriptor_names = [desc[0] for desc in Descriptors._descList]**Lipinski's Rule of Five:**
# Check drug-likeness mw = Descriptors.MolWt(mol) <= 500 logp = Descriptors.MolLogP(mol) <= 5 hbd = Descriptors.NumHDonor
Intelligent Skill routing and workflow orchestration for AI agents — +21.12 pp reward, −29.6% tokens on SkillsBench with DeepSeekV4Flash-VE.
Repo: foryourhealth111-pixel/Vibe-Skills
LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling,…
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code,…
Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the…
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex…