# Shape TK

> 3D molecular shape comparison and alignment toolkit for virtual screening and molecular overlay

## Links
- [Full Documentation](https://docs.eyesopen.com/toolkits/python/shapetk/index.html)
- [Theory](https://docs.eyesopen.com/toolkits/python/shapetk/theory.html)
- [Code Examples](https://docs.eyesopen.com/toolkits/python/shapetk/examples.html)
- [API Reference](https://docs.eyesopen.com/toolkits/python/shapetk/api.html)

## Core API - Function Quick Reference

### Shape Overlap Calculation
```
OEOverlapFunc() -> OEOverlapFunc
  Use for: Calculate shape and color overlap between molecules
  Example: func = OEOverlapFunc(); score = func.Overlap(refmol, fitmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEOverlapFunc.html

OESelfShape(mol: OEMolBase) -> float
  Use for: Calculate self-shape volume of a molecule
  Example: vol = OESelfShape(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OESelfShape.html

OESelfColor(mol: OEMolBase) -> float
  Use for: Calculate self-color score of a molecule
  Example: color = OESelfColor(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OESelfColor.html

OEOverlapResults() -> OEOverlapResults
  Use for: Store and retrieve overlap calculation results
  Example: res = OEOverlapResults(); func.Overlap(refmol, fitmol, res)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEOverlapResults.html
```

### Molecular Overlay and Alignment
```
OEOverlay() -> OEOverlay
  Use for: Perform rigid-body overlay optimization between molecules
  Example: overlay = OEOverlay(); overlay.Overlay(fitmol, refmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEOverlay.html

OEBestOverlayResults() -> OEBestOverlayResults
  Use for: Store best overlay result from optimization
  Example: res = OEBestOverlayResults(); overlay.BestOverlay(res, refmol, fitmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEBestOverlayResults.html

OEMultiRefOverlay() -> OEMultiRefOverlay
  Use for: Overlay against multiple reference molecules simultaneously
  Example: overlay = OEMultiRefOverlay(); overlay.AddRef(refmol1); overlay.Overlay(fitmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEMultiRefOverlay.html

OEROCS() -> OEROCS
  Use for: Fast shape-based virtual screening (ROCS algorithm)
  Example: rocs = OEROCS(); rocs.AddMol(refmol); result = rocs.Overlay(fitmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEROCS.html
```

### Flexible Overlay
```
OEFlexiOverlay() -> OEFlexiOverlay
  Use for: Perform flexible overlay with conformer generation and force field
  Example: flexi = OEFlexiOverlay(); flexi.Overlay(fitmol, refmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEFlexiOverlay.html

OEFlexiOverlapFunc() -> OEFlexiOverlapFunc
  Use for: Calculate overlap with flexible conformer enumeration
  Example: func = OEFlexiOverlapFunc(); func.Overlap(refmol, fitmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEFlexiOverlapFunc.html
```

### Color Force Field (Pharmacophore Features)
```
OEAddColorAtoms(mol: OEMolBase) -> bool
  Use for: Add color atoms (pharmacophore features) to molecule
  Example: OEAddColorAtoms(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OEAddColorAtoms.html

OEHasColorAtoms(mol: OEMolBase) -> bool
  Use for: Check if molecule has color atoms assigned
  Example: if OEHasColorAtoms(mol): process_color(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OEHasColorAtoms.html

OERemoveColorAtoms(mol: OEMolBase) -> bool
  Use for: Remove color atoms from molecule
  Example: OERemoveColorAtoms(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OERemoveColorAtoms.html

OEColorForceField() -> OEColorForceField
  Use for: Define custom color force field for pharmacophore matching
  Example: cff = OEColorForceField(); cff.Init(OEColorFFType_ImplicitMillsDean)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEColorForceField.html
```

### Shape Query
```
OEShapeQuery() -> OEShapeQuery
  Use for: Create shape-only query from molecule or grid
  Example: query = OEShapeQuery(); query.Init(refmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEShapeQuery.html

OEReadShapeQuery(filename: str, query: OEShapeQuery) -> bool
  Use for: Read shape query from file
  Example: query = OEShapeQuery(); OEReadShapeQuery("query.sq", query)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OEReadShapeQuery.html

OEWriteShapeQuery(filename: str, query: OEShapeQuery) -> bool
  Use for: Write shape query to file
  Example: OEWriteShapeQuery("query.sq", query)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OEWriteShapeQuery.html
```

### Hermite Expansion
```
OEHermite() -> OEHermite
  Use for: Create Hermite expansion representation of molecular shape
  Example: hermite = OEHermite(); hermite.Setup(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEHermite.html

OEHermiteShapeFunc() -> OEHermiteShapeFunc
  Use for: Calculate shape overlap using Hermite representation
  Example: func = OEHermiteShapeFunc(); score = func.Overlap(hermite1, hermite2)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEHermiteShapeFunc.html
```

### Starting Positions
```
OERandomStarts(nstarts: int) -> OERandomStarts
  Use for: Generate random starting positions for overlay optimization
  Example: starts = OERandomStarts(100)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OERandomStarts.html

OEInertialStarts() -> OEInertialStarts
  Use for: Generate inertial frame starting positions (default ROCS method)
  Example: starts = OEInertialStarts()
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEInertialStarts.html

OESubrocsStarts() -> OESubrocsStarts
  Use for: Generate SUBROCS starting positions for improved accuracy
  Example: starts = OESubrocsStarts()
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OESubrocsStarts.html
```

### Scoring and Cutoffs
```
OEHighestTanimotoCombo() -> OEHighestTanimotoCombo
  Use for: Sort results by TanimotoCombo score (shape + color)
  Example: sorter = OEHighestTanimotoCombo()
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEHighestTanimotoCombo.html

OETanimotoComboCutoff(cutoff: float) -> OETanimotoComboCutoff
  Use for: Filter results by minimum TanimotoCombo score
  Example: cutoff = OETanimotoComboCutoff(1.5)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OETanimotoComboCutoff.html

OEHighestTanimoto() -> OEHighestTanimoto
  Use for: Sort results by shape Tanimoto only
  Example: sorter = OEHighestTanimoto()
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeClasses/OEHighestTanimoto.html
```

### Utility Functions
```
OECalcVolume(mol: OEMolBase) -> float
  Use for: Calculate molecular volume
  Example: vol = OECalcVolume(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OECalcVolume.html

OEOrientByMomentsOfInertia(mol: OEMolBase) -> bool
  Use for: Orient molecule by principal moments of inertia
  Example: OEOrientByMomentsOfInertia(mol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OEOrientByMomentsOfInertia.html

OEROCSOverlay(fitmol: OEMolBase, refmol: OEMolBase) -> OEROCSResult
  Use for: Quick ROCS overlay returning best result
  Example: result = OEROCSOverlay(fitmol, refmol)
  See: https://docs.eyesopen.com/toolkits/python/shapetk/OEShapeFunctions/OEROCSOverlay.html
```

## Common Patterns - Complete Working Examples

### Pattern: Calculate Simple Shape Overlap
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref.sdf"), refmol)
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)

overlap = oeshape.OEOverlapFunc()
result = oeshape.OEOverlapResults()
overlap.Overlap(refmol, fitmol, result)
tanimoto = result.GetTanimoto()
print(f"Shape Tanimoto: {tanimoto:.3f}")
```
Use when: You need basic shape similarity between two molecules without optimization

### Pattern: Calculate Shape and Color Overlap
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref.sdf"), refmol)
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)

oeshape.OEAddColorAtoms(refmol)
oeshape.OEAddColorAtoms(fitmol)
overlap = oeshape.OEOverlapFunc()
overlap.SetupRef(refmol)
result = oeshape.OEOverlapResults()
overlap.Overlap(fitmol, result)
combo = result.GetTanimotoCombo()
print(f"TanimotoCombo: {combo:.3f}")
```
Use when: You want to include pharmacophore features (color) in similarity calculation

### Pattern: Find Best Overlay Between Two Molecules
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref.sdf"), refmol)
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)

overlay = oeshape.OEOverlay()
result = oeshape.OEBestOverlayResults()
overlay.BestOverlay(result, refmol, fitmol)
result.Transform(fitmol)
oechem.OEWriteMolecule(oechem.oemolostream("aligned.sdf"), fitmol)
print(f"Best TanimotoCombo: {result.GetTanimotoCombo():.3f}")
```
Use when: You need to align molecules and get the best overlay score with optimization

### Pattern: ROCS Virtual Screening - Best Hit
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), refmol)

rocs = oeshape.OEROCS()
rocs.AddMol(refmol)

ifs = oechem.oemolistream("database.sdf")
best_score = 0.0
best_mol = oechem.OEMol()
for mol in ifs.GetOEMols():
    result = rocs.Overlay(mol)
    if result.GetTanimotoCombo() > best_score:
        best_score = result.GetTanimotoCombo()
        result.Transform(mol)
        best_mol = oechem.OEMol(mol)
oechem.OEWriteMolecule(oechem.oemolostream("best_hit.sdf"), best_mol)
```
Use when: Screening a database to find the single best matching molecule

### Pattern: ROCS Virtual Screening - Top N Hits
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), refmol)

rocs = oeshape.OEROCS(oeshape.OEROCSOptions())
rocs.AddMol(refmol)

results = []
ifs = oechem.oemolistream("database.sdf")
for mol in ifs.GetOEMols():
    result = rocs.Overlay(mol)
    result.Transform(mol)
    results.append((result.GetTanimotoCombo(), oechem.OEMol(mol)))

results.sort(reverse=True, key=lambda x: x[0])
ofs = oechem.oemolostream("top_hits.sdf")
for score, mol in results[:100]:
    oechem.OEWriteMolecule(ofs, mol)
```
Use when: You want to retrieve multiple top-scoring hits from a database screen

### Pattern: Create and Use Shape Query
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("reference.sdf"), refmol)

query = oeshape.OEShapeQuery()
query.Init(refmol)
oeshape.OEWriteShapeQuery("query.sq", query)

# Later, use the saved query
loaded_query = oeshape.OEShapeQuery()
oeshape.OEReadShapeQuery("query.sq", loaded_query)

fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)
overlay = oeshape.OEOverlay()
result = oeshape.OEBestOverlayResults()
overlay.BestOverlay(result, loaded_query, fitmol)
```
Use when: You want to save a shape representation for reuse without the original molecule

### Pattern: Flexible Overlay with Conformer Generation
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref.sdf"), refmol)
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)

flexi = oeshape.OEFlexiOverlay()
flexi.SetRefMol(refmol)
result = oeshape.OEFlexiOverlapResults()
flexi.Overlay(fitmol, result)
result.Transform(fitmol)
oechem.OEWriteMolecule(oechem.oemolostream("flexi_aligned.sdf"), fitmol)
print(f"Flexible TanimotoCombo: {result.GetTanimotoCombo():.3f}")
```
Use when: You need to generate and optimize conformers during overlay for flexible molecules

### Pattern: Custom Color Force Field
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref.sdf"), refmol)
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)

cff = oeshape.OEColorForceField()
cff.Init(oeshape.OEColorFFType_ImplicitMillsDean)
oeshape.OEAddColorAtoms(refmol, cff)
oeshape.OEAddColorAtoms(fitmol, cff)

overlap = oeshape.OEOverlapFunc()
overlap.SetupRef(refmol)
result = oeshape.OEOverlapResults()
overlap.Overlap(fitmol, result)
print(f"Custom Color TanimotoCombo: {result.GetTanimotoCombo():.3f}")
```
Use when: You need specific pharmacophore feature definitions beyond default settings

### Pattern: Hermite Shape Comparison
```python
from openeye import oechem, oeshape

mol1 = oechem.OEMol()
mol2 = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("mol1.sdf"), mol1)
oechem.OEReadMolecule(oechem.oemolistream("mol2.sdf"), mol2)

hermite1 = oeshape.OEHermite()
hermite2 = oeshape.OEHermite()
hermite1.Setup(mol1)
hermite2.Setup(mol2)

func = oeshape.OEHermiteShapeFunc()
tanimoto = func.Tanimoto(hermite1, hermite2)
print(f"Hermite Tanimoto: {tanimoto:.3f}")
```
Use when: You need fast shape comparison using Hermite expansion representation

### Pattern: Multi-Reference Overlay
```python
from openeye import oechem, oeshape

ref1 = oechem.OEMol()
ref2 = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref1.sdf"), ref1)
oechem.OEReadMolecule(oechem.oemolistream("ref2.sdf"), ref2)

multiref = oeshape.OEMultiRefOverlay()
multiref.AddRef(ref1)
multiref.AddRef(ref2)

fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)
result = oeshape.OEBestOverlayResults()
multiref.BestOverlay(result, fitmol)
result.Transform(fitmol)
print(f"Best ref index: {result.GetRefIdx()}, Score: {result.GetTanimotoCombo():.3f}")
```
Use when: You want to overlay against multiple reference conformations and find the best match

### Pattern: Apply Score Cutoff Filter
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), refmol)

options = oeshape.OEROCSOptions()
options.SetCutoff(oeshape.OETanimotoComboCutoff(1.5))

rocs = oeshape.OEROCS(options)
rocs.AddMol(refmol)

ifs = oechem.oemolistream("database.sdf")
ofs = oechem.oemolostream("hits.sdf")
for mol in ifs.GetOEMols():
    result = rocs.Overlay(mol)
    if result.GetTanimotoCombo() >= 1.5:
        result.Transform(mol)
        oechem.OEWriteMolecule(ofs, mol)
```
Use when: You want to filter results by minimum score threshold during screening

### Pattern: Calculate All Overlay Results
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
fitmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref.sdf"), refmol)
oechem.OEReadMolecule(oechem.oemolistream("fit.sdf"), fitmol)

overlay = oeshape.OEOverlay()
overlay.SetupRef(refmol)
scores = oeshape.OEBestOverlayScoreIter()
overlay.Overlay(fitmol, scores)

for score in scores:
    print(f"Start {score.GetStartType()}: TanimotoCombo = {score.GetTanimotoCombo():.3f}")
    aligned_mol = oechem.OEMol(fitmol)
    score.Transform(aligned_mol)
```
Use when: You want to examine all starting position results, not just the best one

### Pattern: Add Color Atoms to Specific Atom Types
```python
from openeye import oechem, oeshape

mol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("molecule.sdf"), mol)

# Add default color atoms
oeshape.OEAddColorAtoms(mol)

# Check which atoms are color atoms
for atom in mol.GetAtoms():
    if oeshape.OEIsColorAtom(atom):
        color_type = oeshape.OEGetColorType(atom)
        print(f"Atom {atom.GetIdx()} is color type {color_type}")

# Remove and re-add with custom settings
oeshape.OERemoveColorAtoms(mol)
cff = oeshape.OEColorForceField()
cff.Init(oeshape.OEColorFFType_ExplicitMillsDean)
oeshape.OEAddColorAtoms(mol, cff)
```
Use when: You need fine control over which atoms are assigned pharmacophore features

### Pattern: Cache Self-Overlap Values
```python
from openeye import oechem, oeshape

refmol = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("ref.sdf"), refmol)

# Calculate and cache self-overlap
if not oeshape.OEHasCachedSelfShape(refmol):
    self_shape = oeshape.OESelfShape(refmol)
    oeshape.OESetCachedSelfShape(refmol, self_shape)

if not oeshape.OEHasCachedSelfColor(refmol):
    self_color = oeshape.OESelfColor(refmol)
    oeshape.OESetCachedSelfColor(refmol, self_color)

# Now overlaps will use cached values
overlap = oeshape.OEOverlapFunc()
overlap.SetupRef(refmol)
```
Use when: You're doing many overlays with the same reference to avoid recalculating self-overlap

## API Decision Guide

### Choosing Overlay Methods
- **For rigid-body overlay**: use `OEOverlay` (standard optimization with starting positions)
- **For flexible overlay**: use `OEFlexiOverlay` (generates conformers during optimization)
- **For fast virtual screening**: use `OEROCS` (optimized for database screening)
- **For multiple references**: use `OEMultiRefOverlay` (overlay against multiple conformations)
- **For quick single overlay**: use `OEROCSOverlay` function (convenience wrapper)

### Choosing Overlap Functions
- **For basic shape overlap**: use `OEOverlapFunc` with shape-only scoring
- **For shape + color**: use `OEOverlapFunc` after calling `OEAddColorAtoms` on molecules
- **For flexible overlap**: use `OEFlexiOverlapFunc` (includes conformer generation)
- **For Hermite-based**: use `OEHermiteShapeFunc` (fast approximate shape comparison)
- **For grid-based**: use `OEGridShapeFunc` (when working with grid representations)

### Choosing Starting Positions
- **Default/recommended**: use `OEInertialStarts` (principal moments of inertia alignment)
- **For better accuracy**: use `OESubrocsStarts` (SUBROCS method, slower but more thorough)
- **For random sampling**: use `OERandomStarts(n)` (specify number of random starts)
- **For custom positions**: use `OEAsIsStarts` (use input coordinates as-is)
- **For atom-based**: use `OEAtAtomStarts` (align specific atoms)

### Choosing Score Types and Cutoffs
- **For shape + color combined**: use `TanimotoCombo` (sum of shape and color Tanimoto)
- **For shape only**: use `Tanimoto` (shape Tanimoto coefficient)
- **For color only**: use `ColorTanimoto` (pharmacophore Tanimoto)
- **For Tversky (asymmetric)**: use `FitTversky` or `RefTversky` (when query/database roles differ)
- **To filter results**: use cutoff classes like `OETanimotoComboCutoff(threshold)`
- **To sort results**: use sorter classes like `OEHighestTanimotoCombo()`

### Choosing Color Force Fields
- **Default pharmacophore**: use `OEColorFFType_ImplicitMillsDean` (standard ROCS features)
- **Explicit features**: use `OEColorFFType_ExplicitMillsDean` (more control over features)
- **Custom features**: create `OEColorForceField` and add custom `OEColorFFParameter` objects

### Shape Query vs Molecule
- **Use OEShapeQuery when**: You want to save shape representation without molecule structure
- **Use molecule directly when**: You need chemical information or will modify the reference
- **OEShapeQuery advantages**: Smaller file size, faster loading, no chemical structure exposed
- **Molecule advantages**: Can visualize, modify, or extract chemical properties

### Optimization Options
- **For speed**: reduce number of starting positions, use `OEInertialStarts` only
- **For accuracy**: use `OESubrocsStarts`, increase optimization iterations
- **For conformer flexibility**: use `OEFlexiOverlay` with appropriate conformer settings
- **For large databases**: use `OEROCS` with appropriate cutoffs to filter early

## Common Parameters & Types

**OEMolBase**: Molecule object from OEChem
  - Create with: `mol = oechem.OEMol()` or `oechem.OEReadMolecule(ifs, mol)`
  - Common in: All overlay, overlap, and shape calculation functions
  - Gotcha: Must have 3D coordinates for shape calculations; use `OEAddExplicitHydrogens` if needed

**OEOverlapResults**: Container for overlap calculation results
  - Create with: `result = oeshape.OEOverlapResults()`
  - Common in: `OEOverlapFunc.Overlap()`, stores Tanimoto scores and overlap values
  - Access scores: `result.GetTanimoto()`, `result.GetColorTanimoto()`, `result.GetTanimotoCombo()`

**OEBestOverlayResults**: Container for best overlay optimization result
  - Create with: `result = oeshape.OEBestOverlayResults()`
  - Common in: `OEOverlay.BestOverlay()`, `OEMultiRefOverlay.BestOverlay()`
  - Apply transform: `result.Transform(mol)` to align molecule to reference

**OEROCSResult**: Result from ROCS overlay
  - Create with: Returned by `OEROCS.Overlay(mol)`
  - Common in: Virtual screening workflows with ROCS
  - Access: `result.GetTanimotoCombo()`, `result.Transform(mol)`

**OEColorForceField**: Defines pharmacophore feature types
  - Create with: `cff = oeshape.OEColorForceField(); cff.Init(type)`
  - Common in: `OEAddColorAtoms(mol, cff)` for custom color atom assignment
  - Types: `OEColorFFType_ImplicitMillsDean`, `OEColorFFType_ExplicitMillsDean`

**OEStarts**: Base class for starting position generators
  - Implementations: `OEInertialStarts`, `OERandomStarts`, `OESubrocsStarts`, `OEAsIsStarts`
  - Common in: `OEOverlayOptions.SetStarts(starts)` to control optimization starting points
  - Gotcha: More starts = better coverage but slower; balance speed vs accuracy

**OEShapeQuery**: Shape-only representation of a molecule
  - Create with: `query = oeshape.OEShapeQuery(); query.Init(mol)`
  - Common in: Saving/loading shape queries, overlay without chemical structure
  - Save/load: `OEWriteShapeQuery(file, query)`, `OEReadShapeQuery(file, query)`

**OEHermite**: Hermite expansion representation of molecular shape
  - Create with: `hermite =