# FastROCS TK

> GPU-accelerated 3D shape-based virtual screening toolkit for rapid molecular similarity searches

FastROCS TK provides high-performance shape and color similarity searching using GPU acceleration. It enables virtual screening of large molecular databases by comparing 3D molecular shapes and chemical (color) features.

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

## Core API - Function Quick Reference

### Database Operations

**OEShapeDatabase(dbtype: OEShapeDatabaseType = OEShapeDatabaseType_Default)**
  Use for: Creating a shape database object for GPU-accelerated searches
  Example: `db = OEShapeDatabase(OEShapeDatabaseType_Default)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabase.html

**OEShapeDatabase.Open(filename: str) -> bool**
  Use for: Loading a prepared molecular database for searching
  Example: `db.Open("molecules.oeb.gz")`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabase.html

**OEShapeDatabase.GetScores(query: OEMolBase, scores: OEShapeDatabaseScore, numHits: int) -> int**
  Use for: Performing shape similarity search and retrieving top scoring hits
  Example: `db.GetScores(query_mol, scores, 100)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabase.html

**OEShapeDatabase.GetSortedScores(scores: OEShapeDatabaseScore, numHits: int) -> OEShapeDatabaseScoreIter**
  Use for: Retrieving sorted results after a search
  Example: `for score in db.GetSortedScores(scores, 100):`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabase.html

**OEShapeDatabase.NumMols() -> int**
  Use for: Getting the number of molecules in the loaded database
  Example: `count = db.NumMols()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabase.html

### Database Configuration

**OEShapeDatabaseOptions()**
  Use for: Configuring database search parameters and behavior
  Example: `opts = OEShapeDatabaseOptions()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseOptions.html

**OEShapeDatabaseOptions.SetSimFunc(simfunc: OEShapeSimFuncType)**
  Use for: Setting the similarity function (Tanimoto, Tversky, etc.)
  Example: `opts.SetSimFunc(OEShapeSimFuncType_Tanimoto)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseOptions.html

**OEShapeDatabaseOptions.SetInitialOrientation(orient: OEFastROCSOrientation)**
  Use for: Controlling initial alignment strategy for overlays
  Example: `opts.SetInitialOrientation(OEFastROCSOrientation_InertialAtHeavyAtoms)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseOptions.html

**OEShapeDatabaseOptions.SetColorForceField(cff: OEColorForceField)**
  Use for: Setting custom color force field for pharmacophore matching
  Example: `opts.SetColorForceField(OEColorFFType_ImplicitMillsDean)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseOptions.html

**OEShapeDatabaseOptions.SetNumBestHits(num: int)**
  Use for: Specifying how many top hits to return from search
  Example: `opts.SetNumBestHits(500)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseOptions.html

### Score Handling

**OEShapeDatabaseScore()**
  Use for: Creating object to store search results and scores
  Example: `scores = OEShapeDatabaseScore()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseScore.html

**OEShapeDatabaseScore.GetMol() -> OEMolBase**
  Use for: Retrieving the molecule from a score result
  Example: `hit_mol = score.GetMol()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseScore.html

**OEShapeDatabaseScore.GetShapeTanimoto() -> float**
  Use for: Getting shape Tanimoto similarity score
  Example: `shape_score = score.GetShapeTanimoto()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseScore.html

**OEShapeDatabaseScore.GetColorTanimoto() -> float**
  Use for: Getting color (pharmacophore) Tanimoto similarity score
  Example: `color_score = score.GetColorTanimoto()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseScore.html

**OEShapeDatabaseScore.GetTanimotoCombo() -> float**
  Use for: Getting combined shape + color Tanimoto score
  Example: `combo_score = score.GetTanimotoCombo()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseScore.html

### Database Preparation

**OEShapeDatabasePrep(infile: str, outfile: str, opts: OEShapeDatabaseOptions = None) -> int**
  Use for: Pre-processing molecular database for faster loading
  Example: `OEShapeDatabasePrep("mols.sdf", "mols_prep.oeb.gz")`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OEShapeDatabasePrep.html

**OEIsDatabasePrepared(filename: str) -> bool**
  Use for: Checking if a database file has been pre-processed
  Example: `if OEIsDatabasePrepared("mols.oeb.gz"):`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OEIsDatabasePrepared.html

**OEPrepareFastROCSMol(mol: OEMolBase) -> bool**
  Use for: Preparing a single molecule for use as query
  Example: `OEPrepareFastROCSMol(query_mol)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OEPrepareFastROCSMol.html

### Coordinate Manipulation

**OESetCoordsToInertialFrame(mol: OEMolBase) -> bool**
  Use for: Aligning molecule to its inertial reference frame
  Example: `OESetCoordsToInertialFrame(mol)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OESetCoordsToInertialFrame.html

### GPU and System Information

**OEFastROCSIsGPUReady() -> bool**
  Use for: Checking if GPU is available and properly configured
  Example: `if OEFastROCSIsGPUReady():`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OEFastROCSIsGPUReady.html

**OEFastROCSGetNumDevices() -> int**
  Use for: Getting number of available GPU devices
  Example: `num_gpus = OEFastROCSGetNumDevices()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OEFastROCSGetNumDevices.html

**OEFastROCSGPUStatus() -> str**
  Use for: Getting detailed GPU status and configuration information
  Example: `print(OEFastROCSGPUStatus())`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OEFastROCSGPUStatus.html

**OEFastROCSIsLicensed() -> bool**
  Use for: Verifying FastROCS license is valid
  Example: `if not OEFastROCSIsLicensed(): sys.exit(1)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSFunctions/OEFastROCSIsLicensed.html

### Histogram Analysis

**OEFastROCSHistogram()**
  Use for: Creating histogram object for score distribution analysis
  Example: `hist = OEFastROCSHistogram()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEFastROCSHistogram.html

**OEShapeDatabase.GetHistogram(hist: OEFastROCSHistogram, query: OEMolBase) -> bool**
  Use for: Generating score distribution histogram for a query
  Example: `db.GetHistogram(hist, query_mol)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabase.html

### Database Tracing

**OEDBTracer()**
  Use for: Creating tracer to monitor database search progress
  Example: `tracer = OEDBTracer()`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEDBTracer.html

**OEShapeDatabaseOptions.SetDBTracer(tracer: OEDBTracerBase)**
  Use for: Attaching progress tracer to database searches
  Example: `opts.SetDBTracer(tracer)`
  See: https://docs.eyesopen.com/toolkits/python/fastrocstk/OEFastROCSClasses/OEShapeDatabaseOptions.html

## Common Patterns - Complete Working Examples

### Pattern: Basic Shape Similarity Search

```python
from openeye import oechem, oefastrocs

# Load query molecule
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), query)
oefastrocs.OEPrepareFastROCSMol(query)

# Open database and perform search
db = oefastrocs.OEShapeDatabase()
db.Open("database.oeb.gz")
scores = oefastrocs.OEShapeDatabaseScore()
db.GetScores(query, scores, 100)

# Retrieve and process results
for score in db.GetSortedScores(scores, 100):
    hit = oechem.OEGraphMol(score.GetMol())
    print(f"{hit.GetTitle()}: TanimotoCombo={score.GetTanimotoCombo():.3f}")
```
Use when: You need to find molecules with similar 3D shape to a query structure

### Pattern: Shape + Color Search with Custom Settings

```python
from openeye import oechem, oefastrocs

# Configure search options
opts = oefastrocs.OEShapeDatabaseOptions()
opts.SetSimFunc(oefastrocs.OEShapeSimFuncType_Tanimoto)
opts.SetNumBestHits(500)
opts.SetInitialOrientation(oefastrocs.OEFastROCSOrientation_InertialAtHeavyAtoms)

# Load and search database
db = oefastrocs.OEShapeDatabase(opts)
db.Open("database.oeb.gz")
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.mol2"), query)
scores = oefastrocs.OEShapeDatabaseScore()
db.GetScores(query, scores, opts.GetNumBestHits())

# Write top hits to file
ofs = oechem.oemolostream("hits.sdf")
for score in db.GetSortedScores(scores, 50):
    oechem.OEWriteMolecule(ofs, score.GetMol())
```
Use when: You need fine control over search parameters and want to save results

### Pattern: Database Preparation for Faster Loading

```python
from openeye import oefastrocs

# Check if database needs preparation
infile = "molecules.sdf"
outfile = "molecules_prep.oeb.gz"

if not oefastrocs.OEIsDatabasePrepared(infile):
    print("Preparing database...")
    ret = oefastrocs.OEShapeDatabasePrep(infile, outfile)
    if ret != oefastrocs.OEFastROCSReturnCode_Success:
        print("Database preparation failed")
    else:
        print(f"Database prepared and saved to {outfile}")
else:
    print("Database already prepared")
```
Use when: You want to optimize database loading time for repeated searches

### Pattern: Multi-Conformer Query Search

```python
from openeye import oechem, oefastrocs, oeomega

# Generate conformers for query
query = oechem.OEMol()
oechem.OEReadMolecule(oechem.oemolistream("query.smi"), query)
omega = oeomega.OEOmega()
omega.SetMaxConfs(50)
omega(query)

# Search with each conformer
db = oefastrocs.OEShapeDatabase()
db.Open("database.oeb.gz")
best_combo = 0.0
best_hit = None

for conf in query.GetConfs():
    scores = oefastrocs.OEShapeDatabaseScore()
    db.GetScores(conf, scores, 1)
    for score in db.GetSortedScores(scores, 1):
        if score.GetTanimotoCombo() > best_combo:
            best_combo = score.GetTanimotoCombo()
            best_hit = oechem.OEGraphMol(score.GetMol())

print(f"Best hit: {best_hit.GetTitle()} (combo={best_combo:.3f})")
```
Use when: Query molecule flexibility is important for finding best matches

### Pattern: Filtering Results by Score Thresholds

```python
from openeye import oechem, oefastrocs

# Perform search
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), query)
db = oefastrocs.OEShapeDatabase()
db.Open("database.oeb.gz")
scores = oefastrocs.OEShapeDatabaseScore()
db.GetScores(query, scores, 1000)

# Filter by shape and color thresholds
shape_cutoff = 0.7
color_cutoff = 0.5
ofs = oechem.oemolostream("filtered_hits.sdf")

for score in db.GetSortedScores(scores, 1000):
    if score.GetShapeTanimoto() >= shape_cutoff and score.GetColorTanimoto() >= color_cutoff:
        hit = oechem.OEGraphMol(score.GetMol())
        oechem.OESetSDData(hit, "ShapeTanimoto", f"{score.GetShapeTanimoto():.3f}")
        oechem.OESetSDData(hit, "ColorTanimoto", f"{score.GetColorTanimoto():.3f}")
        oechem.OEWriteMolecule(ofs, hit)
```
Use when: You need to apply specific score cutoffs to filter search results

### Pattern: Using Custom Color Force Field

```python
from openeye import oechem, oefastrocs

# Create custom color force field
cff = oechem.OEColorForceField()
cff.Init(oechem.OEColorFFType_ImplicitMillsDean)

# Configure database with custom color
opts = oefastrocs.OEShapeDatabaseOptions()
opts.SetColorForceField(cff)

# Perform search with custom coloring
db = oefastrocs.OEShapeDatabase(opts)
db.Open("database.oeb.gz")
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.mol2"), query)
scores = oefastrocs.OEShapeDatabaseScore()
db.GetScores(query, scores, 100)

for score in db.GetSortedScores(scores, 10):
    print(f"{score.GetMol().GetTitle()}: Color={score.GetColorTanimoto():.3f}")
```
Use when: You need specific pharmacophore feature definitions for your search

### Pattern: Progress Monitoring with Tracer

```python
from openeye import oechem, oefastrocs

# Set up progress tracer
tracer = oefastrocs.OEDBTracer()
opts = oefastrocs.OEShapeDatabaseOptions()
opts.SetDBTracer(tracer)

# Perform search with progress tracking
db = oefastrocs.OEShapeDatabase(opts)
db.Open("large_database.oeb.gz")
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), query)
scores = oefastrocs.OEShapeDatabaseScore()

print(f"Searching {db.NumMols()} molecules...")
db.GetScores(query, scores, 100)
print("Search complete")

for score in db.GetSortedScores(scores, 10):
    print(f"{score.GetMol().GetTitle()}: {score.GetTanimotoCombo():.3f}")
```
Use when: Searching large databases and you want to monitor progress

### Pattern: Histogram Analysis of Score Distribution

```python
from openeye import oechem, oefastrocs

# Perform search and generate histogram
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), query)
db = oefastrocs.OEShapeDatabase()
db.Open("database.oeb.gz")

hist = oefastrocs.OEFastROCSHistogram()
db.GetHistogram(hist, query)

# Analyze score distribution
print(f"Total molecules: {db.NumMols()}")
print(f"Mean TanimotoCombo: {hist.GetMean():.3f}")
print(f"Std Dev: {hist.GetStdDev():.3f}")
print(f"Max score: {hist.GetMax():.3f}")
```
Use when: You need to understand score distribution before setting cutoffs

### Pattern: Alternative Starting Orientations

```python
from openeye import oechem, oefastrocs

# Try different initial orientations
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), query)
db = oefastrocs.OEShapeDatabase()
db.Open("database.oeb.gz")

orientations = [
    oefastrocs.OEFastROCSOrientation_InertialAtHeavyAtoms,
    oefastrocs.OEFastROCSOrientation_InertialAtColorAtoms,
    oefastrocs.OEFastROCSOrientation_AsIs
]

for orient in orientations:
    opts = oefastrocs.OEShapeDatabaseOptions()
    opts.SetInitialOrientation(orient)
    db.SetOptions(opts)
    scores = oefastrocs.OEShapeDatabaseScore()
    db.GetScores(query, scores, 10)
    print(f"Orientation {orient}: Best={list(db.GetSortedScores(scores, 1))[0].GetTanimotoCombo():.3f}")
```
Use when: Default alignment doesn't give good results and you want to try alternatives

### Pattern: GPU Status Check Before Search

```python
from openeye import oechem, oefastrocs
import sys

# Verify GPU availability
if not oefastrocs.OEFastROCSIsLicensed():
    print("FastROCS license not found")
    sys.exit(1)

if not oefastrocs.OEFastROCSIsGPUReady():
    print("GPU not available or not properly configured")
    print(oefastrocs.OEFastROCSGPUStatus())
    sys.exit(1)

print(f"Found {oefastrocs.OEFastROCSGetNumDevices()} GPU device(s)")

# Proceed with search
db = oefastrocs.OEShapeDatabase()
db.Open("database.oeb.gz")
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("query.sdf"), query)
scores = oefastrocs.OEShapeDatabaseScore()
db.GetScores(query, scores, 100)
```
Use when: You need to verify GPU setup before running searches

### Pattern: Batch Query Processing

```python
from openeye import oechem, oefastrocs

# Load multiple queries
queries = []
ifs = oechem.oemolistream("queries.sdf")
for mol in ifs.GetOEGraphMols():
    oefastrocs.OEPrepareFastROCSMol(mol)
    queries.append(oechem.OEGraphMol(mol))

# Search database with each query
db = oefastrocs.OEShapeDatabase()
db.Open("database.oeb.gz")
ofs = oechem.oemolostream("all_hits.sdf")

for query in queries:
    scores = oefastrocs.OEShapeDatabaseScore()
    db.GetScores(query, scores, 50)
    for score in db.GetSortedScores(scores, 50):
        hit = oechem.OEGraphMol(score.GetMol())
        oechem.OESetSDData(hit, "QueryTitle", query.GetTitle())
        oechem.OESetSDData(hit, "TanimotoCombo", f"{score.GetTanimotoCombo():.3f}")
        oechem.OEWriteMolecule(ofs, hit)
```
Use when: You have multiple query molecules to search against the same database

### Pattern: Tversky Similarity for Substructure-like Searches

```python
from openeye import oechem, oefastrocs

# Configure Tversky similarity (asymmetric)
opts = oefastrocs.OEShapeDatabaseOptions()
opts.SetSimFunc(oefastrocs.OEShapeSimFuncType_Tversky)
# Tversky weights favor query (find molecules containing query shape)

# Perform search
db = oefastrocs.OEShapeDatabase(opts)
db.Open("database.oeb.gz")
query = oechem.OEGraphMol()
oechem.OEReadMolecule(oechem.oemolistream("fragment.sdf"), query)
oefastrocs.OEPrepareFastROCSMol(query)

scores = oefastrocs.OEShapeDatabaseScore()
db.GetScores(query, scores, 100)

for score in db.GetSortedScores(scores, 20):
    print(f"{score.GetMol().GetTitle()}: Tversky={score.GetShapeTanimoto():.3f}")
```
Use when: You want to find molecules that contain the query shape (fragment-based search)

## API Decision Guide

### Choosing Similarity Functions
- **For symmetric similarity** (A vs B same as B vs A): use `OEShapeSimFuncType_Tanimoto`
- **For finding molecules containing query shape**: use `OEShapeSimFuncType_Tversky` (asymmetric)
- **For standard virtual screening**: use `OEShapeSimFuncType_Tanimoto` (most common)

### Choosing Initial Orientations
- **For general searches**: use `OEFastROCSOrientation_InertialAtHeavyAtoms` (default, fastest)
- **For pharmacophore-focused searches**: use `OEFastROCSOrientation_InertialAtColorAtoms`
- **When query is pre-aligned**: use `OEFastROCSOrientation_AsIs`
- **For difficult cases**: try `OEFastROCSOrientation_UserInertialStarts` with custom starts

### Database Format Decisions
- **For repeated searches**: use `OEShapeDatabasePrep()` to create optimized `.oeb.gz` format
- **For one-time searches**: can use original SDF/MOL2 files directly (slower loading)
- **Check preparation status**: use `OEIsDatabasePrepared()` before deciding

### Score Selection
- **For shape-only searches**: use `GetShapeTanimoto()`
- **For pharmacophore-only**: use `GetColorTanimoto()`
- **For combined shape + pharmacophore**: use `GetTanimotoCombo()` (most common)
- **For ranking hits**: `GetTanimotoCombo()` is standard metric

### Query Preparation
- **Single conformer query**: use `OEPrepareFastROCSMol()` on query molecule
- **Multi-conformer query**: generate conformers first (e.g., with Omega), then search with each
- **Pre-aligned query**: use `OESetCoordsToInertialFrame()` if needed

### Performance Optimization
- **For large databases**: use `OEShapeDatabasePrep()` for faster loading
- **For multiple queries**: keep database open, reuse `OEShapeDatabase` object
- **For progress tracking**: attach `OEDBTracer` to monitor long searches
- **GPU verification**: always check `OEFastROCSIsGPUReady()` before production runs

### Result Filtering
- **Get top N hits**: specify in `GetScores(query, scores, N)`
- **Apply score cutoffs**: iterate `GetSortedScores()` and filter by threshold
- **Retrieve specific scores**: use `GetShapeTanimoto()`, `GetColorTanimoto()`, `GetTanimotoCombo()`

## Common Parameters & Types

**OEShapeDatabase**: Main database object for GPU-accelerated searches
  - Create with: `db = OEShapeDatabase()` or `db = OEShapeDatabase(options)`
  - Common in: All search operations
  - Gotcha: Must call `Open()` before searching; database stays in memory until closed

**OEShapeDatabaseOptions**: Configuration object for search parameters
  - Create with: `opts = OEShapeDatabaseOptions()`
  - Common in: Database initialization, customizing search behavior
  - Key settings: `SetSimFunc()`, `SetNumBestHits()`, `SetInitialOrientation()`, `SetColorForceField()`
  - Gotcha: Options must be set before opening database or via `SetOptions()`

**OEShapeDatabaseScore**: Container for search results
  - Create with: `scores = OEShapeDatabaseScore()`
  - Common in: `GetScores()`, `GetSortedScores()`
  - Access results: `GetMol()`, `GetShapeTanimoto()`, `GetColorTanimoto()`, `GetTanimotoCombo()`
  - Gotcha: Reusable object - can be passed to multiple `GetScores()` calls

**OEFastROCSOrientation**: Enum for initial alignment strategy
  - Typical values: `OEFastROCSOrientation_InertialAtHeavyAtoms` (default), `OEFastROCSOrientation_InertialAtColorAtoms`, `OEFastROCSOrientation_AsIs`
  - Common in: `SetInitialOrientation()`
  - Gotcha: Choice significantly affects search quality for certain query types

**OEShapeSimFuncType**: Enum for similarity function type
  - Typical values: `OEShapeSimFuncType_Tanimoto` (symmetric), `OEShapeSimFuncType_Tversky` (asymmetric)
  - Common in: `SetSimFunc()`
  - Gotcha: Tversky is asymmetric - useful for fragment searches but different interpretation

**OEColorForceField**: Pharmacophore feature definition
  - Create with: `cff = OEColorForceField()` then `cff.Init(OEColorFFType_ImplicitMillsDean)`
  - Common in: `SetColorForceField()` for custom pharmacophore definitions
  - Typical values: `OEColorFFType_ImplicitMillsDean` (default), `OEColorFFType_ExplicitMillsDean`

**OEFastROCSHistogram**: Score distribution analysis object
  - Create with: `hist = OEFastROCSHistogram()`
  - Common in: `GetHistogram()` for analyzing score distributions
  - Access stats: `GetMean()`, `GetStdDev()`, `GetMax()`, `GetMin()`

**OEDBTracer**: Progress monitoring for searches
  - Create with: `tracer = OEDBTracer()`
  - Common in: `SetDBTracer()` for tracking search progress
  - Gotcha: Useful for large database searches to monitor completion

## Return Types & Error Handling

```python
# Pattern 1: Boolean returns for success/failure
if not db.Open("database.oeb.gz"):
    print("Failed to open database")
    sys.exit(1)

if not oefastrocs.OEPrepareFastROCSMol(query):
    print("Failed to prepare query molecule")
    sys.exit(1)

# Pattern 2: Integer return codes
ret