Write detailed about rigid docking

Reading File
Searching the Web

rigid docking molecular docking computational chemistry methods

Finding Sources
Reading Web Page

https://www.intechopen.com/chapters/1236438

Searching PubMed

"rigid docking" molecular docking drug discovery

Reading Article

PMID: 40900115

Searching the Web

rigid docking search algorithms FFT shape complementarity protein-protein docking tools ZDOCK HADDOCK

Here is a detailed account of rigid docking, covering its definition, principles, algorithms, scoring, applications, limitations, and comparison with flexible docking.

Rigid Docking: A Detailed Overview

1. Definition

Rigid docking is a computational method used to predict how two molecules - typically a protein (receptor) and a small molecule or another protein (ligand) - interact with each other in three-dimensional space. In rigid docking, both the receptor and the ligand are treated as completely fixed, inflexible structures: their bond lengths, bond angles, and torsion angles are held constant throughout the docking simulation. Only the translational and rotational degrees of freedom (i.e., the relative positioning and orientation of the two molecules) are explored.
The term originated in the late 1970s. Initially it simply meant optimizing the separation between molecules while keeping their orientations fixed. Over time it evolved to allow relative orientation changes while still holding each molecule's internal geometry constant.

2. Core Principles

2.1 The Lock-and-Key Model

Rigid docking operationalizes the classic "lock-and-key" hypothesis of molecular recognition, proposed by Emil Fischer (1894). In this model, the receptor's binding site acts as a rigid "lock" and the ligand acts as a rigid "key" - the two molecules fit together based purely on geometric and chemical complementarity, without any induced conformational change.

2.2 Six-Dimensional Search Space

Because internal geometries are fixed, the docking problem reduces to searching a six-dimensional (6-D) space:
  • 3 translational degrees of freedom (x, y, z displacement)
  • 3 rotational degrees of freedom (rotation about x, y, z axes, often represented by Euler angles or quaternions)
This drastically simplifies the computation compared to flexible docking, which must also sample torsional degrees of freedom.

2.3 Shape and Physicochemical Complementarity

The central criterion for a "good" docked pose is complementarity between the surfaces of the two molecules:
  • Geometric/shape complementarity: The molecules fit together spatially, maximizing surface contact with minimal steric clashes.
  • Electrostatic complementarity: Charged groups on one molecule face oppositely charged groups on the other.
  • Desolvation energy: Energy cost of displacing water molecules from the binding interface upon complex formation.
  • Hydrophobic complementarity: Hydrophobic patches align to maximize burial of nonpolar surface area.

3. Search Algorithms

3.1 Fast Fourier Transform (FFT) Methods

The most widely used approach in rigid protein-protein docking. The molecular surface is discretized onto a 3D grid, and the correlation between receptor and ligand surface representations is computed via FFT. This reduces the translational search complexity from O(n^6) to O(n^3 log n^3).
  • ZDOCK: Uses FFT to optimize shape complementarity, electrostatics, and desolvation free energy. Performs an exhaustive 6-D search with defined rotational (15° or 6°) and translational (1.2 Å) sampling.
  • FTDock: Another FFT-based rigid-body search tool.
  • GRAMM: Applies FFT with clustering and rescoring.
  • HEX: Uses Fourier correlation of spherical harmonics to search angular (rotational) space.
  • DOT: FFT global search using shape complementarity and electrostatics.

3.2 Geometric Hashing

A technique borrowed from computer vision. The algorithm extracts geometric features (e.g., triangles formed by surface points) from both molecules and stores them in a hash table. It then matches features between the two surfaces to rapidly identify complementary poses, without requiring an exhaustive grid-based search.

3.3 Clique Search (Graph Matching)

Represents the problem as a graph where nodes correspond to possible atom-sphere pairings and edges connect compatible pairings. The maximum clique in this graph gives the best geometric match - this is the basis used in the DOCK program (Crippen-Kuhl isomorphous subgraph matching method).

3.4 Monte Carlo (MC) Methods

Random perturbations (translations and rotations) are applied to the ligand. A move is accepted if it lowers the energy, or probabilistically if it raises it (controlled by a temperature parameter). MC can avoid local minima but does not guarantee exhaustive sampling.

3.5 Pose Clustering

After an exhaustive search produces thousands of candidate poses, these are clustered based on structural similarity (e.g., RMSD). The top-scoring or most-populated cluster centroids are selected as representative docked structures.

4. Scoring Functions

After the search generates many candidate poses, a scoring function ranks them by predicted binding quality. Three main categories:

4.1 Force Field-Based Scoring

Evaluates binding based on molecular mechanics energy terms: van der Waals interactions, electrostatics, and sometimes solvation. Example: the AMBER or CHARMM force fields. These are physically grounded but computationally demanding.

4.2 Empirical Scoring Functions

Trained on experimentally determined protein-ligand complexes. Use regression to weight different energy components (H-bonds, hydrophobic contacts, metal coordination, etc.) to reproduce known binding affinities. Examples: GoldScore, ChemScore (in GOLD), Glide Score.

4.3 Knowledge-Based (Statistical Potential) Scoring

Derive potentials from the statistical frequencies of observed atom-atom contacts in databases of known structures (e.g., Protein Data Bank). Atom pairs that occur frequently at short distances are assigned favorable scores. Example: DrugScore, SMoG.
In rigid docking of proteins, a "soft" scoring function is often used initially to tolerate minor steric clashes (since small conformational adjustments upon binding are ignored), followed by a more precise scoring in a second refinement stage.

5. Rigid Docking Workflow

A typical rigid docking experiment follows these steps:
  1. Structure preparation: Obtain 3D coordinates of receptor (usually from X-ray crystallography or cryo-EM, stored in PDB format) and ligand. Add hydrogens, assign charges, and remove water molecules.
  2. Grid generation: The receptor's binding site is mapped onto a 3D grid. Grid cells encode steric, electrostatic, and desolvation properties.
  3. Exhaustive pose sampling: The ligand is systematically translated and rotated through all positions in the grid (6-D search), generating thousands to millions of candidate poses.
  4. Scoring: Each pose is evaluated by the scoring function.
  5. Clustering and ranking: Top-scoring poses are clustered; the best representative from each cluster is reported.
  6. Visual inspection and post-processing: Docked poses are visually examined; follow-up analyses (MM-GBSA, MM-PBSA, or MD simulations) may refine estimates of binding affinity.

6. Key Software Tools

ToolPrimary UseMethod
ZDOCKProtein-protein dockingFFT (shape, electrostatics, desolvation)
FTDockProtein-protein dockingFFT rigid-body search
GRAMMProtein-protein dockingFFT with rescoring
HEXProtein-protein dockingFourier spherical harmonics
DOTProtein-protein dockingFFT with shape + electrostatics
DOCKProtein-ligand dockingGeometric hashing / clique search
HADDOCKProtein-protein dockingRigid-body minimization + SA refinement
ClusProProtein-protein dockingZDOCK/DOT + clustering (web server)

7. Advantages of Rigid Docking

  • Computational speed: Because no conformational sampling is needed, rigid docking is orders of magnitude faster than flexible docking. FFT-based methods can evaluate billions of poses in minutes.
  • Simplicity: Fewer parameters and assumptions; results are more reproducible.
  • High-throughput screening: Suitable for rapidly screening large virtual libraries to identify initial lead compounds or interaction partners.
  • Initial-stage docking: Commonly used as the first stage in multi-stage docking protocols, generating a large pool of candidates that are then refined with flexible methods.
  • Well-characterized cases: For complexes with little conformational change upon binding (e.g., many protein-protein interactions), rigid docking can be highly accurate.

8. Limitations

8.1 Ignores Induced Fit

Real proteins and ligands are flexible. Upon binding, both partners can undergo significant conformational changes (induced fit effect). Rigid docking completely ignores this, leading to missed near-native poses when binding is accompanied by structural rearrangements.

8.2 Poor Performance for Flexible Binding Sites

Active sites with flexible loops, hinges, or gating residues cannot be accurately represented by a single rigid conformation. If an apo (unbound) structure is used, the binding pocket may not even be open or accessible.

8.3 Inaccurate Binding Affinity Prediction

Because the scoring function does not account for conformational entropy changes, induced fit energy, or the true solvation energetics, predicted binding affinities are approximate. The correlation between rigid docking scores and experimental binding affinities is often poor.

8.4 Steric Clash Artifacts

Without any conformational relaxation, even a slightly incorrect starting conformation can produce false clashes that penalize what would otherwise be a near-native pose.

9. Comparison: Rigid vs. Flexible Docking

FeatureRigid DockingFlexible Docking
Internal geometryFixed (no conformational changes)Allowed to change
Degrees of freedom6 (3 translational + 3 rotational)6 + torsional DOF
Computational speedVery fastSlower (hours to days)
Biological accuracyLowerHigher
Induced fitNot modeledModeled (partially or fully)
Best used forHTS, protein-protein docking, initial screensLead optimization, small molecule docking

10. Rigid-Body Protein-Protein Docking

Rigid docking is especially prevalent in protein-protein docking, where two large macromolecules are docked together. Many proteins undergo relatively small backbone changes upon forming complexes, making rigid-body approximations more reasonable than in small molecule-receptor docking.
The standard CAPRI (Critical Assessment of PRedicted Interactions) benchmark evaluates protein-protein docking algorithms under blind conditions. ZDOCK and related FFT tools consistently perform competitively in these assessments.
For protein-protein docking, a two-stage strategy is common:
  1. Stage 1 - Rigid-body global search: FFT-based tool (e.g., ZDOCK) generates thousands of candidate complexes.
  2. Stage 2 - Flexible refinement: Top candidates are refined using semi-flexible methods (e.g., HADDOCK's simulated annealing with backbone and side-chain flexibility), or molecular dynamics.

11. Role in Modern Drug Discovery

Despite its limitations, rigid docking remains a cornerstone of structure-based drug design (SBDD):
  • Virtual screening: Rigid docking allows screening of millions of compounds from databases (e.g., ZINC, ChEMBL) against a target receptor in feasible computational time.
  • Fragment-based docking: Small rigid fragments are docked first; hits are then grown or merged.
  • Validation of binding poses: Crystal structures of bound complexes often confirm rigid-docked poses with good accuracy for well-behaved systems.
  • Integration with MD: Rigid docking poses serve as starting points for molecular dynamics simulations or MM-PBSA/MM-GBSA free energy calculations.
A 2025 review in Briefings in Bioinformatics (PMID: 40900115) notes that traditional search-and-score docking methods (which are largely rigid or semi-rigid in their receptor treatment) are being increasingly supplemented by deep learning approaches that attempt to model full protein flexibility - highlighting that overcoming the rigidity assumption remains an active and important research frontier.

12. Summary

Rigid docking is the foundational computational approach for predicting molecular recognition. By treating both receptor and ligand as fixed 3D objects and searching only translational/rotational space, it achieves high speed and practical utility for large-scale screening. Its chief limitation is the inability to capture conformational changes - a constraint that motivates the development of semi-flexible, fully flexible, and AI-based docking methods. Nevertheless, rigid docking tools like ZDOCK, GRAMM, DOCK, and FTDock remain widely used, especially as the first stage in multi-step docking pipelines or for protein-protein interaction prediction where backbone flexibility is modest.

Could you give in PDF format for 5 Mark's contein

Reading File
Running Command

ls -la /home/daytona/workspace/

Writing File

~/docking-pdf/rigid_docking.py

from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY

OUTPUT = "/home/daytona/workspace/docking-pdf/Rigid_Docking_5Marks.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2*cm, bottomMargin=2*cm,
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle(
    'CustomTitle',
    parent=styles['Title'],
    fontSize=16,
    textColor=colors.HexColor('#1a3a5c'),
    spaceAfter=4,
    alignment=TA_CENTER,
    fontName='Helvetica-Bold',
)
subtitle_style = ParagraphStyle(
    'Subtitle',
    parent=styles['Normal'],
    fontSize=10,
    textColor=colors.HexColor('#555555'),
    spaceAfter=6,
    alignment=TA_CENTER,
    fontName='Helvetica-Oblique',
)
heading_style = ParagraphStyle(
    'SectionHeading',
    parent=styles['Heading2'],
    fontSize=12,
    textColor=colors.HexColor('#1a3a5c'),
    spaceBefore=10,
    spaceAfter=4,
    fontName='Helvetica-Bold',
    borderPad=2,
)
body_style = ParagraphStyle(
    'Body',
    parent=styles['Normal'],
    fontSize=10,
    textColor=colors.HexColor('#222222'),
    spaceAfter=6,
    leading=15,
    alignment=TA_JUSTIFY,
    fontName='Helvetica',
)
bullet_style = ParagraphStyle(
    'Bullet',
    parent=styles['Normal'],
    fontSize=10,
    textColor=colors.HexColor('#222222'),
    spaceAfter=3,
    leading=14,
    leftIndent=18,
    bulletIndent=6,
    fontName='Helvetica',
)
bold_inline = '<font name="Helvetica-Bold">'

story = []

# ── Title Block ──────────────────────────────────────────────────────────────
story.append(Paragraph("Rigid Docking", title_style))
story.append(Paragraph("5-Mark Answer | Computational Biology / Bioinformatics", subtitle_style))
story.append(HRFlowable(width="100%", thickness=1.5, color=colors.HexColor('#1a3a5c'), spaceAfter=10))

# ── 1. Definition ─────────────────────────────────────────────────────────────
story.append(Paragraph("1. Definition", heading_style))
story.append(Paragraph(
    "Rigid docking is a computational molecular docking method in which both the <b>receptor</b> "
    "(e.g., a protein) and the <b>ligand</b> (e.g., a small molecule or another protein) are treated "
    "as <b>fixed, inflexible structures</b>. Their internal bond lengths, bond angles, and torsion "
    "angles remain unchanged throughout the simulation. Only the <b>translational</b> and "
    "<b>rotational</b> degrees of freedom (relative positioning and orientation) are varied to "
    "identify the optimal binding pose.",
    body_style
))

# ── 2. Principle ──────────────────────────────────────────────────────────────
story.append(Paragraph("2. Principle (Lock-and-Key Model)", heading_style))
story.append(Paragraph(
    "Rigid docking is based on Emil Fischer's classical <b>lock-and-key hypothesis</b> (1894): the "
    "receptor's binding site is a rigid 'lock' and the ligand is a rigid 'key'. The two molecules "
    "interact based purely on <b>geometric and physicochemical complementarity</b> — shape, "
    "electrostatics, and hydrophobic match — without any induced conformational change.",
    body_style
))
story.append(Paragraph(
    "The search is performed in a <b>six-dimensional (6-D) space</b>:",
    body_style
))
story.append(Paragraph("• 3 translational degrees of freedom (x, y, z displacement)", bullet_style))
story.append(Paragraph("• 3 rotational degrees of freedom (rotation around x, y, z axes)", bullet_style))

# ── 3. Search Algorithms ──────────────────────────────────────────────────────
story.append(Paragraph("3. Search Algorithms", heading_style))

algo_data = [
    [Paragraph("<b>Algorithm</b>", body_style), Paragraph("<b>Description</b>", body_style)],
    [Paragraph("Fast Fourier Transform (FFT)", body_style),
     Paragraph("Molecules are placed on a 3-D grid; correlation between surfaces is computed via FFT. Reduces translational search from O(n⁶) to O(n³ log n³). Used in ZDOCK, FTDock, GRAMM.", body_style)],
    [Paragraph("Geometric Hashing", body_style),
     Paragraph("Surface geometric features are hashed and matched between receptor and ligand. Borrowed from computer vision; efficient for shape complementarity.", body_style)],
    [Paragraph("Clique Search / Graph Matching", body_style),
     Paragraph("Atom-sphere pairings are modeled as a graph; the maximum clique gives the best geometric match. Basis of the DOCK program.", body_style)],
    [Paragraph("Monte Carlo (MC)", body_style),
     Paragraph("Random translations and rotations are applied; moves accepted/rejected based on energy change. Can escape local minima but not exhaustive.", body_style)],
]

algo_table = Table(algo_data, colWidths=[4.5*cm, 11.5*cm])
algo_table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.HexColor('#1a3a5c')),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.white),
    ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
    ('FONTSIZE', (0, 0), (-1, -1), 9),
    ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.HexColor('#eaf0fb'), colors.white]),
    ('GRID', (0, 0), (-1, -1), 0.5, colors.HexColor('#b0c4de')),
    ('VALIGN', (0, 0), (-1, -1), 'TOP'),
    ('TOPPADDING', (0, 0), (-1, -1), 5),
    ('BOTTOMPADDING', (0, 0), (-1, -1), 5),
    ('LEFTPADDING', (0, 0), (-1, -1), 6),
    ('RIGHTPADDING', (0, 0), (-1, -1), 6),
]))
story.append(algo_table)
story.append(Spacer(1, 8))

# ── 4. Scoring Functions ──────────────────────────────────────────────────────
story.append(Paragraph("4. Scoring Functions", heading_style))
story.append(Paragraph(
    "After generating candidate poses, a <b>scoring function</b> ranks them by predicted binding quality:",
    body_style
))
story.append(Paragraph("• <b>Force field-based:</b> Uses van der Waals and electrostatic energy terms (e.g., AMBER, CHARMM force fields).", bullet_style))
story.append(Paragraph("• <b>Empirical scoring:</b> Trained on known complexes; weights energy components to reproduce experimental binding affinities (e.g., GoldScore, Glide Score).", bullet_style))
story.append(Paragraph("• <b>Knowledge-based (statistical potentials):</b> Derived from frequencies of atom-atom contacts in PDB structures (e.g., DrugScore, SMoG).", bullet_style))

# ── 5. Common Software ────────────────────────────────────────────────────────
story.append(Paragraph("5. Common Software Tools", heading_style))

sw_data = [
    [Paragraph("<b>Tool</b>", body_style), Paragraph("<b>Method</b>", body_style), Paragraph("<b>Primary Use</b>", body_style)],
    [Paragraph("ZDOCK", body_style), Paragraph("FFT (shape, electrostatics, desolvation)", body_style), Paragraph("Protein–protein docking", body_style)],
    [Paragraph("FTDock", body_style), Paragraph("FFT rigid-body search", body_style), Paragraph("Protein–protein docking", body_style)],
    [Paragraph("GRAMM", body_style), Paragraph("FFT + clustering/rescoring", body_style), Paragraph("Protein–protein docking", body_style)],
    [Paragraph("HEX", body_style), Paragraph("Fourier spherical harmonics", body_style), Paragraph("Protein–protein docking", body_style)],
    [Paragraph("DOCK", body_style), Paragraph("Geometric hashing / clique search", body_style), Paragraph("Protein–ligand docking", body_style)],
    [Paragraph("ClusPro", body_style), Paragraph("ZDOCK + clustering (web server)", body_style), Paragraph("Protein–protein docking", body_style)],
]

sw_table = Table(sw_data, colWidths=[3*cm, 8*cm, 5*cm])
sw_table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.HexColor('#1a3a5c')),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.white),
    ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
    ('FONTSIZE', (0, 0), (-1, -1), 9),
    ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.HexColor('#eaf0fb'), colors.white]),
    ('GRID', (0, 0), (-1, -1), 0.5, colors.HexColor('#b0c4de')),
    ('VALIGN', (0, 0), (-1, -1), 'TOP'),
    ('TOPPADDING', (0, 0), (-1, -1), 5),
    ('BOTTOMPADDING', (0, 0), (-1, -1), 5),
    ('LEFTPADDING', (0, 0), (-1, -1), 6),
    ('RIGHTPADDING', (0, 0), (-1, -1), 6),
]))
story.append(sw_table)
story.append(Spacer(1, 8))

# ── 6. Advantages & Limitations ───────────────────────────────────────────────
story.append(Paragraph("6. Advantages and Limitations", heading_style))

adv_lim_data = [
    [Paragraph("<b>Advantages</b>", body_style), Paragraph("<b>Limitations</b>", body_style)],
    [Paragraph("Computationally very fast", body_style), Paragraph("Cannot model induced-fit / conformational changes", body_style)],
    [Paragraph("Suitable for high-throughput virtual screening", body_style), Paragraph("Inaccurate for flexible binding sites", body_style)],
    [Paragraph("Simple, reproducible, fewer parameters", body_style), Paragraph("Poor absolute binding affinity prediction", body_style)],
    [Paragraph("Effective as first stage in multi-step pipelines", body_style), Paragraph("Steric clash artifacts when using apo structures", body_style)],
    [Paragraph("Works well when conformational change is minimal", body_style), Paragraph("Misses biologically relevant poses when backbone moves", body_style)],
]

adv_table = Table(adv_lim_data, colWidths=[8*cm, 8*cm])
adv_table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.HexColor('#1a3a5c')),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.white),
    ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
    ('FONTSIZE', (0, 0), (-1, -1), 9),
    ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.HexColor('#eaf0fb'), colors.white]),
    ('GRID', (0, 0), (-1, -1), 0.5, colors.HexColor('#b0c4de')),
    ('VALIGN', (0, 0), (-1, -1), 'TOP'),
    ('TOPPADDING', (0, 0), (-1, -1), 5),
    ('BOTTOMPADDING', (0, 0), (-1, -1), 5),
    ('LEFTPADDING', (0, 0), (-1, -1), 6),
    ('RIGHTPADDING', (0, 0), (-1, -1), 6),
]))
story.append(adv_table)
story.append(Spacer(1, 8))

# ── 7. Rigid vs Flexible Comparison ──────────────────────────────────────────
story.append(Paragraph("7. Rigid Docking vs. Flexible Docking", heading_style))

cmp_data = [
    [Paragraph("<b>Feature</b>", body_style), Paragraph("<b>Rigid Docking</b>", body_style), Paragraph("<b>Flexible Docking</b>", body_style)],
    [Paragraph("Internal geometry", body_style), Paragraph("Fixed", body_style), Paragraph("Variable (torsions sampled)", body_style)],
    [Paragraph("Degrees of freedom", body_style), Paragraph("6 (3 trans + 3 rot)", body_style), Paragraph("6 + rotatable bonds", body_style)],
    [Paragraph("Speed", body_style), Paragraph("Very fast", body_style), Paragraph("Slower (hours–days)", body_style)],
    [Paragraph("Biological accuracy", body_style), Paragraph("Lower", body_style), Paragraph("Higher", body_style)],
    [Paragraph("Induced fit", body_style), Paragraph("Not modeled", body_style), Paragraph("Partially/fully modeled", body_style)],
    [Paragraph("Best use", body_style), Paragraph("HTS, protein-protein, initial screen", body_style), Paragraph("Lead optimization, flexible ligands", body_style)],
]

cmp_table = Table(cmp_data, colWidths=[4.5*cm, 5.5*cm, 6*cm])
cmp_table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.HexColor('#1a3a5c')),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.white),
    ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
    ('FONTSIZE', (0, 0), (-1, -1), 9),
    ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.HexColor('#eaf0fb'), colors.white]),
    ('GRID', (0, 0), (-1, -1), 0.5, colors.HexColor('#b0c4de')),
    ('VALIGN', (0, 0), (-1, -1), 'TOP'),
    ('TOPPADDING', (0, 0), (-1, -1), 5),
    ('BOTTOMPADDING', (0, 0), (-1, -1), 5),
    ('LEFTPADDING', (0, 0), (-1, -1), 6),
    ('RIGHTPADDING', (0, 0), (-1, -1), 6),
]))
story.append(cmp_table)
story.append(Spacer(1, 10))

# ── Conclusion ────────────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#1a3a5c'), spaceAfter=6))
story.append(Paragraph("Conclusion", heading_style))
story.append(Paragraph(
    "Rigid docking is an efficient, well-established computational technique that treats both receptor "
    "and ligand as rigid bodies to predict their binding orientation. It excels in speed and is widely "
    "used for high-throughput virtual screening and protein–protein docking. However, its inability to "
    "model conformational changes limits accuracy for flexible systems. It is most powerful as the "
    "first stage in multi-step pipelines, where flexible refinement and molecular dynamics follow to "
    "improve pose accuracy and binding affinity estimation.",
    body_style
))

# ── Build ─────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
Running Command

python /home/daytona/workspace/docking-pdf/rigid_docking.py

Your PDF is ready! Here's the download link:

Rigid Docking 5Marks

PDF Document · PDF

The PDF is formatted as a concise 5-mark exam answer and covers all key points:
  1. Definition - What rigid docking is and its core assumption
  2. Principle - Lock-and-key model and 6-D search space
  3. Search Algorithms - FFT, Geometric Hashing, Clique Search, Monte Carlo (in a table)
  4. Scoring Functions - Force field, empirical, and knowledge-based types
  5. Common Software Tools - ZDOCK, FTDock, GRAMM, HEX, DOCK, ClusPro
  6. Advantages & Limitations - Side-by-side comparison table
  7. Rigid vs. Flexible Docking - Comparison table
  8. Conclusion - Summary paragraph

Can you give in 10 Mark's contain and in easy language pdf

Writing File

~/docking-pdf/rigid_docking_10marks.py

from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY

OUTPUT = "/home/daytona/workspace/docking-pdf/Rigid_Docking_10Marks.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2.2*cm, leftMargin=2.2*cm,
    topMargin=2*cm, bottomMargin=2*cm,
)

styles = getSampleStyleSheet()

# ── Custom Styles ─────────────────────────────────────────────────────────────
title_style = ParagraphStyle('Title2', parent=styles['Title'],
    fontSize=18, textColor=colors.HexColor('#0d3b66'),
    spaceAfter=4, alignment=TA_CENTER, fontName='Helvetica-Bold')

subtitle_style = ParagraphStyle('Sub', parent=styles['Normal'],
    fontSize=10, textColor=colors.HexColor('#666666'),
    spaceAfter=2, alignment=TA_CENTER, fontName='Helvetica-Oblique')

marks_style = ParagraphStyle('Marks', parent=styles['Normal'],
    fontSize=10, textColor=colors.white,
    alignment=TA_CENTER, fontName='Helvetica-Bold')

heading_style = ParagraphStyle('H2', parent=styles['Normal'],
    fontSize=12, textColor=colors.white,
    spaceBefore=10, spaceAfter=0,
    fontName='Helvetica-Bold', leftIndent=0)

body_style = ParagraphStyle('Body', parent=styles['Normal'],
    fontSize=10.5, textColor=colors.HexColor('#1a1a1a'),
    spaceAfter=7, leading=16, alignment=TA_JUSTIFY,
    fontName='Helvetica')

easy_style = ParagraphStyle('Easy', parent=styles['Normal'],
    fontSize=10, textColor=colors.HexColor('#0d3b66'),
    spaceAfter=5, leading=15, alignment=TA_LEFT,
    fontName='Helvetica-Oblique', leftIndent=10,
    backColor=colors.HexColor('#eef4fc'),
    borderPad=5)

bullet_style = ParagraphStyle('Bullet', parent=styles['Normal'],
    fontSize=10.5, textColor=colors.HexColor('#1a1a1a'),
    spaceAfter=4, leading=15,
    leftIndent=20, bulletIndent=8, fontName='Helvetica')

note_style = ParagraphStyle('Note', parent=styles['Normal'],
    fontSize=9.5, textColor=colors.HexColor('#555555'),
    spaceAfter=4, leading=14, leftIndent=10,
    fontName='Helvetica-Oblique')


def section_header(text, number):
    """Returns a shaded section header block."""
    data = [[Paragraph(f"{number}. {text}", heading_style)]]
    t = Table(data, colWidths=[16.6*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#0d3b66')),
        ('TOPPADDING', (0,0), (-1,-1), 6),
        ('BOTTOMPADDING', (0,0), (-1,-1), 6),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('RIGHTPADDING', (0,0), (-1,-1), 10),
        ('ROUNDEDCORNERS', [4, 4, 4, 4]),
    ]))
    return t


def info_box(text):
    """Returns a light blue info/analogy box."""
    data = [[Paragraph(f"💡 <b>Simple Analogy:</b>  {text}", ParagraphStyle('ib',
        parent=styles['Normal'], fontSize=10, fontName='Helvetica',
        textColor=colors.HexColor('#0d3b66'), leading=14))]]
    t = Table(data, colWidths=[16.6*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#ddeeff')),
        ('TOPPADDING', (0,0), (-1,-1), 7),
        ('BOTTOMPADDING', (0,0), (-1,-1), 7),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('RIGHTPADDING', (0,0), (-1,-1), 10),
        ('BOX', (0,0), (-1,-1), 1, colors.HexColor('#0d3b66')),
    ]))
    return t


story = []

# ══════════════════════════════════════════════════════════════════════════════
# TITLE BLOCK
# ══════════════════════════════════════════════════════════════════════════════
story.append(Paragraph("RIGID DOCKING", title_style))
story.append(Paragraph("Computational Biology / Drug Design  |  10-Mark Exam Answer", subtitle_style))

# Marks badge
badge_data = [[Paragraph("10 MARKS", marks_style)]]
badge = Table(badge_data, colWidths=[4*cm])
badge.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#e63946')),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('ALIGN', (0,0), (-1,-1), 'CENTER'),
    ('ROUNDEDCORNERS', [6,6,6,6]),
]))
story.append(Spacer(1, 4))
story.append(badge)
story.append(Spacer(1, 6))
story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#0d3b66'), spaceAfter=10))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 1 — WHAT IS DOCKING?
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("What is Molecular Docking?", 1))
story.append(Spacer(1, 6))
story.append(Paragraph(
    "Molecular docking is a <b>computer-based technique</b> used in drug discovery. "
    "It predicts how a small drug molecule (called a <b>ligand</b>) fits into the "
    "active site of a target protein (called the <b>receptor</b>). "
    "Think of it as trying to find the best way a key fits into a lock — using a computer.",
    body_style))
story.append(info_box(
    "A protein's active site is the LOCK. The drug molecule is the KEY. "
    "Docking is the computer trying every possible way to insert the key into the lock."))
story.append(Spacer(1, 6))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 2 — WHAT IS RIGID DOCKING?
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("What is Rigid Docking?", 2))
story.append(Spacer(1, 6))
story.append(Paragraph(
    "Rigid docking is a type of molecular docking where <b>neither the receptor nor the ligand "
    "is allowed to change its shape</b> during the simulation. Both molecules are treated like "
    "solid, unchangeable 3D objects. The computer only tries different <b>positions and "
    "orientations</b> (rotations) of the ligand near the receptor's binding site.",
    body_style))
story.append(Paragraph(
    "In simple words: <b>the shapes are frozen — only the positions are moved.</b>",
    body_style))
story.append(info_box(
    "Imagine a plastic toy key and a toy lock. Both are made of hard plastic — neither can bend. "
    "You just try rotating and sliding the key into the lock to see if it fits."))
story.append(Spacer(1, 6))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 3 — PRINCIPLE (Lock-and-Key)
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("Principle: The Lock-and-Key Model", 3))
story.append(Spacer(1, 6))
story.append(Paragraph(
    "Rigid docking is based on Emil Fischer's classic <b>Lock-and-Key Hypothesis (1894)</b>. "
    "According to this idea, a molecule (the ligand) can only bind to a specific receptor "
    "if its shape exactly matches the receptor's binding site — just like a key fits only "
    "one specific lock.",
    body_style))
story.append(Paragraph("The computer checks for three types of matching:", body_style))
story.append(Paragraph("● <b>Shape complementarity</b> — Do the surfaces fit together without clashes?", bullet_style))
story.append(Paragraph("● <b>Electrostatic match</b> — Do positive charges face negative charges at the interface?", bullet_style))
story.append(Paragraph("● <b>Hydrophobic match</b> — Do the oily (water-repelling) regions of both molecules align?", bullet_style))
story.append(Spacer(1, 6))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 4 — HOW DOES IT WORK? (Workflow)
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("How Does Rigid Docking Work? (Step-by-Step)", 4))
story.append(Spacer(1, 6))

steps = [
    ("Step 1: Prepare the Structures",
     "Get the 3D structures of the receptor (protein) and ligand (drug molecule) from databases "
     "like the Protein Data Bank (PDB). Add hydrogen atoms and assign electric charges."),
    ("Step 2: Define the Binding Site",
     "Tell the software WHERE on the protein to look — the active site or binding pocket. "
     "The computer builds a 3D grid map over this region."),
    ("Step 3: Search for Poses (6-D Search)",
     "The ligand is moved in 6 dimensions: 3 translational (left-right, up-down, forward-back) "
     "and 3 rotational (spin in three directions). This generates thousands of possible poses."),
    ("Step 4: Score Each Pose",
     "A scoring function gives each pose a score based on how well the ligand fits the receptor. "
     "Lower energy = better fit."),
    ("Step 5: Rank and Select the Best Pose",
     "All poses are clustered and ranked. The top-scoring pose is reported as the predicted "
     "binding mode of the drug."),
]

for title_s, desc in steps:
    step_data = [
        [Paragraph(f"<b>{title_s}</b>", ParagraphStyle('sh', parent=styles['Normal'],
            fontSize=10, fontName='Helvetica-Bold', textColor=colors.HexColor('#0d3b66'),
            leading=14))],
        [Paragraph(desc, ParagraphStyle('sd', parent=styles['Normal'],
            fontSize=10, fontName='Helvetica', textColor=colors.HexColor('#1a1a1a'),
            leading=14, leftIndent=5))],
    ]
    st = Table(step_data, colWidths=[16.6*cm])
    st.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (0,0), colors.HexColor('#d0e8ff')),
        ('BACKGROUND', (0,1), (0,1), colors.HexColor('#f5faff')),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 8),
        ('RIGHTPADDING', (0,0), (-1,-1), 8),
        ('BOX', (0,0), (-1,-1), 0.8, colors.HexColor('#0d3b66')),
    ]))
    story.append(KeepTogether([st, Spacer(1, 6)]))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 5 — SEARCH ALGORITHMS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("Search Algorithms in Rigid Docking", 5))
story.append(Spacer(1, 6))
story.append(Paragraph(
    "To search all possible positions and orientations of the ligand efficiently, "
    "rigid docking uses several smart algorithms:", body_style))

algo_data = [
    [Paragraph("<b>Algorithm</b>", body_style),
     Paragraph("<b>Simple Explanation</b>", body_style),
     Paragraph("<b>Example Tool</b>", body_style)],
    [Paragraph("Fast Fourier Transform (FFT)", body_style),
     Paragraph("Converts the shape-matching problem into maths to make it extremely fast. "
               "Cuts search time from billions to millions of steps.", body_style),
     Paragraph("ZDOCK, FTDock, GRAMM", body_style)],
    [Paragraph("Geometric Hashing", body_style),
     Paragraph("Extracts surface features (like triangles) from both molecules and quickly finds "
               "matching pairs — like solving a jigsaw puzzle.", body_style),
     Paragraph("DOCK", body_style)],
    [Paragraph("Clique Search (Graph Matching)", body_style),
     Paragraph("Represents possible atom pairings as a graph. Finds the best combination of "
               "matching pairs using graph theory.", body_style),
     Paragraph("DOCK", body_style)],
    [Paragraph("Monte Carlo (MC) Method", body_style),
     Paragraph("Makes random moves (rotate/translate) and keeps moves that improve the score. "
               "Good at avoiding getting stuck in bad positions.", body_style),
     Paragraph("AutoDock", body_style)],
]

algo_table = Table(algo_data, colWidths=[4*cm, 9*cm, 3.6*cm])
algo_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0d3b66')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#eaf4ff'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#a0c4e8')),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING', (0,0), (-1,-1), 6),
    ('BOTTOMPADDING', (0,0), (-1,-1), 6),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
]))
story.append(algo_table)
story.append(Spacer(1, 8))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 6 — SCORING FUNCTIONS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("Scoring Functions: How is Binding Evaluated?", 6))
story.append(Spacer(1, 6))
story.append(Paragraph(
    "A <b>scoring function</b> is a mathematical formula that gives a number (score) to each pose. "
    "A better score = a better predicted fit between drug and protein. "
    "There are three main types:", body_style))

score_data = [
    [Paragraph("<b>Type</b>", body_style),
     Paragraph("<b>What it Does</b>", body_style),
     Paragraph("<b>Easy Analogy</b>", body_style)],
    [Paragraph("<b>Force Field-Based</b>", body_style),
     Paragraph("Uses physics equations to calculate attraction/repulsion energies (van der Waals, electrostatics).", body_style),
     Paragraph("Like calculating how strong a magnet pull is between two objects.", body_style)],
    [Paragraph("<b>Empirical</b>", body_style),
     Paragraph("Trained on databases of known drug-protein pairs. Learns what 'good binding' looks like from real data.", body_style),
     Paragraph("Like a teacher who has seen thousands of exam papers and knows what a correct answer looks like.", body_style)],
    [Paragraph("<b>Knowledge-Based</b>", body_style),
     Paragraph("Based on the frequency of atom-atom contacts seen in protein databases (PDB).", body_style),
     Paragraph("Like checking if two puzzle pieces frequently appear next to each other in solved puzzles.", body_style)],
]

score_table = Table(score_data, colWidths=[4*cm, 6.5*cm, 6.1*cm])
score_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0d3b66')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#eaf4ff'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#a0c4e8')),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING', (0,0), (-1,-1), 6),
    ('BOTTOMPADDING', (0,0), (-1,-1), 6),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
]))
story.append(score_table)
story.append(Spacer(1, 8))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 7 — COMMON SOFTWARE
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("Commonly Used Rigid Docking Software", 7))
story.append(Spacer(1, 6))

sw_data = [
    [Paragraph("<b>Software</b>", body_style),
     Paragraph("<b>Method Used</b>", body_style),
     Paragraph("<b>Main Use</b>", body_style)],
    [Paragraph("ZDOCK", body_style),  Paragraph("FFT (shape + electrostatics + desolvation)", body_style), Paragraph("Protein–Protein", body_style)],
    [Paragraph("FTDock", body_style), Paragraph("FFT rigid-body search", body_style),                        Paragraph("Protein–Protein", body_style)],
    [Paragraph("GRAMM", body_style),  Paragraph("FFT + clustering/rescoring", body_style),                   Paragraph("Protein–Protein", body_style)],
    [Paragraph("HEX", body_style),    Paragraph("Fourier spherical harmonics (rotational)", body_style),     Paragraph("Protein–Protein", body_style)],
    [Paragraph("DOCK", body_style),   Paragraph("Geometric hashing / clique search", body_style),            Paragraph("Protein–Ligand", body_style)],
    [Paragraph("ClusPro", body_style),Paragraph("ZDOCK + pose clustering (free web server)", body_style),    Paragraph("Protein–Protein", body_style)],
    [Paragraph("AutoDock", body_style),Paragraph("Monte Carlo + grid-based energy", body_style),             Paragraph("Protein–Ligand", body_style)],
]

sw_table = Table(sw_data, colWidths=[3.5*cm, 8.5*cm, 4.6*cm])
sw_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0d3b66')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#eaf4ff'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#a0c4e8')),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
]))
story.append(sw_table)
story.append(Spacer(1, 8))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 8 — ADVANTAGES & LIMITATIONS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("Advantages and Limitations of Rigid Docking", 8))
story.append(Spacer(1, 6))

adv_data = [
    [Paragraph("<b>✅ Advantages</b>", ParagraphStyle('ah', parent=styles['Normal'],
        fontSize=10.5, fontName='Helvetica-Bold', textColor=colors.HexColor('#1a6b1a'))),
     Paragraph("<b>❌ Limitations</b>", ParagraphStyle('lh', parent=styles['Normal'],
        fontSize=10.5, fontName='Helvetica-Bold', textColor=colors.HexColor('#8b0000')))],
    [Paragraph("Very fast — can screen millions of molecules quickly", body_style),
     Paragraph("Cannot model shape changes (induced fit) in the protein or drug", body_style)],
    [Paragraph("Simple to use, fewer parameters to set", body_style),
     Paragraph("Less accurate for flexible molecules with many rotating bonds", body_style)],
    [Paragraph("Good for large-scale virtual screening campaigns", body_style),
     Paragraph("May miss the true binding pose if the protein changes shape on binding", body_style)],
    [Paragraph("Reliable for protein–protein docking where backbone movement is small", body_style),
     Paragraph("Binding affinity predictions are approximate, not exact", body_style)],
    [Paragraph("Useful as the first step before more detailed flexible docking", body_style),
     Paragraph("Can produce clashes that wouldn't occur if flexibility was allowed", body_style)],
]

adv_table = Table(adv_data, colWidths=[8.3*cm, 8.3*cm])
adv_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (0,0), colors.HexColor('#d4edda')),
    ('BACKGROUND', (1,0), (1,0), colors.HexColor('#f8d7da')),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f0fff0'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#aaaaaa')),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 8),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
]))
story.append(adv_table)
story.append(Spacer(1, 8))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 9 — RIGID vs FLEXIBLE DOCKING
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("Rigid Docking vs. Flexible Docking", 9))
story.append(Spacer(1, 6))

cmp_data = [
    [Paragraph("<b>Feature</b>", body_style),
     Paragraph("<b>Rigid Docking</b>", body_style),
     Paragraph("<b>Flexible Docking</b>", body_style)],
    [Paragraph("Shape changes allowed?", body_style), Paragraph("❌ No", body_style), Paragraph("✅ Yes", body_style)],
    [Paragraph("Speed", body_style),                  Paragraph("⚡ Very fast", body_style), Paragraph("🐢 Slower", body_style)],
    [Paragraph("Accuracy", body_style),               Paragraph("Moderate", body_style), Paragraph("Higher", body_style)],
    [Paragraph("Degrees of freedom", body_style),     Paragraph("6 (3 move + 3 rotate)", body_style), Paragraph("6 + bond rotations", body_style)],
    [Paragraph("Induced fit", body_style),            Paragraph("Not considered", body_style), Paragraph("Considered", body_style)],
    [Paragraph("Best for", body_style),               Paragraph("HTS, protein-protein docking", body_style), Paragraph("Drug lead optimization", body_style)],
    [Paragraph("Analogy", body_style),                Paragraph("Rigid plastic key in rigid lock", body_style), Paragraph("Flexible rubber key moulding into lock", body_style)],
]

cmp_table = Table(cmp_data, colWidths=[4.5*cm, 6*cm, 6.1*cm])
cmp_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0d3b66')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9.5),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#eaf4ff'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#a0c4e8')),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING', (0,0), (-1,-1), 5),
    ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
]))
story.append(cmp_table)
story.append(Spacer(1, 8))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 10 — APPLICATIONS & CONCLUSION
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("Applications and Conclusion", 10))
story.append(Spacer(1, 6))

story.append(Paragraph("<b>Applications of Rigid Docking:</b>", body_style))
story.append(Paragraph("● <b>Virtual Screening:</b> Rapidly scanning millions of drug-like compounds against a target to shortlist candidates.", bullet_style))
story.append(Paragraph("● <b>Protein–Protein Interaction Studies:</b> Predicting how two proteins bind together (used in ZDOCK, GRAMM).", bullet_style))
story.append(Paragraph("● <b>Fragment-Based Drug Discovery:</b> Docking small rigid fragments first, then building on them.", bullet_style))
story.append(Paragraph("● <b>First Stage in Multi-Step Pipelines:</b> Rigid docking generates candidate poses; flexible refinement and molecular dynamics (MD) then improve accuracy.", bullet_style))
story.append(Paragraph("● <b>Structural Biology:</b> Understanding how enzymes recognize substrates or how antibodies bind antigens.", bullet_style))
story.append(Spacer(1, 6))

# Conclusion box
conc_data = [[Paragraph(
    "<b>Conclusion:</b>  Rigid docking is a fast, efficient computational method where both "
    "the receptor and ligand are treated as fixed 3D structures. It searches all possible "
    "positions and orientations of the ligand near the receptor using algorithms like FFT, "
    "geometric hashing, and Monte Carlo methods. Though it cannot model conformational changes "
    "(induced fit), it is extremely useful for high-throughput screening and protein-protein "
    "docking. It remains the essential first step in modern computer-aided drug design pipelines, "
    "followed by flexible docking and molecular dynamics for refinement.",
    ParagraphStyle('conc', parent=styles['Normal'], fontSize=10.5, fontName='Helvetica',
        textColor=colors.HexColor('#0d2b4d'), leading=16))]]
conc_table = Table(conc_data, colWidths=[16.6*cm])
conc_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#d0e8ff')),
    ('BOX', (0,0), (-1,-1), 1.5, colors.HexColor('#0d3b66')),
    ('TOPPADDING', (0,0), (-1,-1), 10),
    ('BOTTOMPADDING', (0,0), (-1,-1), 10),
    ('LEFTPADDING', (0,0), (-1,-1), 12),
    ('RIGHTPADDING', (0,0), (-1,-1), 12),
]))
story.append(conc_table)
story.append(Spacer(1, 10))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#0d3b66'), spaceAfter=4))
story.append(Paragraph("Prepared for 10-Mark Exam Answer  |  Computational Biology / Bioinformatics",
    ParagraphStyle('footer', parent=styles['Normal'], fontSize=8,
        textColor=colors.HexColor('#888888'), alignment=TA_CENTER, fontName='Helvetica-Oblique')))

# ── Build ─────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
Running Command

python /home/daytona/workspace/docking-pdf/rigid_docking_10marks.py

Your 10-mark PDF is ready! Download it here:

Rigid Docking 10Marks

PDF Document · PDF


The PDF is written in simple, easy-to-understand language with analogies and covers all 10 sections:
#SectionWhat's Inside
1What is Molecular Docking?Basic intro with key-lock analogy
2What is Rigid Docking?Plain definition + analogy
3Principle (Lock-and-Key)Fischer's model, 3 types of complementarity
4Step-by-Step Workflow5 clear steps from structure prep to result
5Search AlgorithmsFFT, Geometric Hashing, Clique Search, Monte Carlo — with simple explanations
6Scoring Functions3 types with easy analogies
7Common SoftwareZDOCK, FTDock, GRAMM, HEX, DOCK, AutoDock
8Advantages & LimitationsSide-by-side ✅/❌ table
9Rigid vs. Flexible DockingComparison table with analogies
10Applications & ConclusionReal-world uses + summary paragraph
This is a shared conversation. Sign in to Orris to start your own chat.