attachment
attachment

Give Chapter 5 All topic combined all theory in one pdf format in drug discovery subject

analyse_media
Reading File
Running Command

mkdir -p /tmp/workspace/chapter5-drug-discovery && ls /tmp/workspace/chapter5-drug-discovery/

Writing File

~/chapter5-drug-discovery/generate_pdf.py

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

OUTPUT = "/tmp/workspace/chapter5-drug-discovery/Chapter5_QSAR_Prodrug_Drug_Discovery.pdf"

# ── page setup ──────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=2*cm, rightMargin=2*cm,
    topMargin=2.5*cm, bottomMargin=2.5*cm,
    title="Chapter 5 – QSAR Statistical Methods & Prodrug Design",
    author="Pharmacology (MPL) Sem-II",
)

W, H = A4

# ── styles ───────────────────────────────────────────────────────────────────
ss = getSampleStyleSheet()

cover_title = ParagraphStyle("cover_title", parent=ss["Title"],
    fontSize=24, textColor=colors.HexColor("#1a237e"),
    spaceAfter=10, alignment=TA_CENTER, leading=30)

cover_sub = ParagraphStyle("cover_sub", parent=ss["Normal"],
    fontSize=13, textColor=colors.HexColor("#283593"),
    spaceAfter=6, alignment=TA_CENTER)

cover_info = ParagraphStyle("cover_info", parent=ss["Normal"],
    fontSize=11, textColor=colors.HexColor("#37474f"),
    spaceAfter=4, alignment=TA_CENTER)

ch_heading = ParagraphStyle("ch_heading", parent=ss["Heading1"],
    fontSize=18, textColor=colors.white,
    spaceAfter=8, spaceBefore=6, alignment=TA_CENTER,
    backColor=colors.HexColor("#1a237e"), leading=24,
    leftIndent=-10, rightIndent=-10, borderPad=8)

topic_heading = ParagraphStyle("topic_heading", parent=ss["Heading2"],
    fontSize=14, textColor=colors.white,
    spaceAfter=6, spaceBefore=12,
    backColor=colors.HexColor("#283593"),
    leftIndent=0, borderPad=5, leading=20)

sub_heading = ParagraphStyle("sub_heading", parent=ss["Heading3"],
    fontSize=12, textColor=colors.HexColor("#1a237e"),
    spaceAfter=4, spaceBefore=8, leading=16)

sub_sub = ParagraphStyle("sub_sub", parent=ss["Heading4"],
    fontSize=11, textColor=colors.HexColor("#283593"),
    spaceAfter=3, spaceBefore=5, leading=15)

body = ParagraphStyle("body", parent=ss["Normal"],
    fontSize=10.5, leading=16, spaceAfter=6,
    alignment=TA_JUSTIFY, textColor=colors.HexColor("#212121"))

bullet = ParagraphStyle("bullet", parent=body,
    leftIndent=20, firstLineIndent=-14,
    spaceAfter=4, bulletIndent=6)

note_box = ParagraphStyle("note_box", parent=body,
    backColor=colors.HexColor("#e8eaf6"),
    borderColor=colors.HexColor("#3949ab"),
    borderWidth=1, borderPad=6,
    leftIndent=8, rightIndent=8)

def H1(txt): return Paragraph(txt, ch_heading)
def H2(txt): return Paragraph(txt, topic_heading)
def H3(txt): return Paragraph(txt, sub_heading)
def H4(txt): return Paragraph(txt, sub_sub)
def B(txt):  return Paragraph(txt, body)
def BL(txt): return Paragraph(f"•  {txt}", bullet)
def SP(n=6): return Spacer(1, n)
def HR():    return HRFlowable(width="100%", thickness=0.5,
                                color=colors.HexColor("#9fa8da"))
def NOTE(txt): return Paragraph(f"<b>Note:</b> {txt}", note_box)

# ══════════════════════════════════════════════════════════════════════════════
story = []

# ── COVER PAGE ────────────────────────────────────────────────────────────────
story.append(SP(60))
story.append(Paragraph("PHARMACOLOGY (MPL) SEM - II", cover_sub))
story.append(SP(10))
story.append(Paragraph("DRUG DISCOVERY", cover_title))
story.append(SP(8))
story.append(HRFlowable(width="80%", thickness=2, color=colors.HexColor("#1a237e"), hAlign="CENTER"))
story.append(SP(12))
story.append(Paragraph("CHAPTER 5", ParagraphStyle("ch5lbl", parent=cover_sub,
    fontSize=20, textColor=colors.HexColor("#283593"))))
story.append(SP(8))
story.append(Paragraph("QSAR Statistical Methods &amp; Prodrug Design", 
    ParagraphStyle("ch5title", parent=cover_title, fontSize=20,
                   textColor=colors.HexColor("#283593"))))
story.append(SP(20))

# topic list on cover
topics_data = [
    ["Topics Covered"],
    ["1. Regression Analysis"],
    ["2. Partial Least Squares (PLS) Analysis"],
    ["3. Other Multivariate Statistical Methods"],
    ["4. 3D-QSAR: CoMFA and CoMSIA"],
    ["5. Prodrug Design – Basic Concepts"],
    ["6. Prodrugs to Improve Patient Acceptability"],
    ["7. Prodrugs to Improve Drug Solubility"],
    ["8. Prodrugs to Improve Drug Absorption & Distribution"],
    ["9. Site-Specific Drug Delivery & Sustained Drug Action"],
    ["10. Rationale & Practical Considerations of Prodrug Design"],
]
tbl = Table(topics_data, colWidths=[14*cm])
tbl.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a237e")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,0), 12),
    ("ALIGN", (0,0), (-1,-1), "LEFT"),
    ("FONTNAME", (0,1), (-1,-1), "Helvetica"),
    ("FONTSIZE", (0,1), (-1,-1), 10),
    ("BACKGROUND", (0,1), (-1,-1), colors.HexColor("#e8eaf6")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.HexColor("#e8eaf6"), colors.HexColor("#c5cae9")]),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("LEFTPADDING", (0,0), (-1,-1), 12),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
]))
story.append(tbl)
story.append(SP(30))
story.append(Paragraph("Hours Allocated: 12", cover_info))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER HEADER
# ══════════════════════════════════════════════════════════════════════════════
story.append(H1("CHAPTER 5: QSAR STATISTICAL METHODS & PRODRUG DESIGN"))
story.append(SP(6))
story.append(B("This chapter covers statistical approaches used in Quantitative Structure-Activity Relationship (QSAR) modelling and the concept of prodrug design - a strategy to optimise drug pharmacokinetics and pharmacodynamics."))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 1 – REGRESSION ANALYSIS
# ══════════════════════════════════════════════════════════════════════════════
story.append(H2("TOPIC 1: REGRESSION ANALYSIS IN QSAR"))
story.append(SP(6))

story.append(H3("1.1 Introduction"))
story.append(B("Regression analysis is the most fundamental statistical method used in classical QSAR modelling. It establishes a mathematical relationship between molecular descriptors (independent variables) and biological activity (dependent variable). The primary goal is to derive a predictive equation that can be used to forecast the activity of untested compounds."))
story.append(SP(6))

story.append(H3("1.2 Simple Linear Regression (SLR)"))
story.append(B("Simple linear regression relates one independent variable (descriptor) to one dependent variable (biological activity):"))
story.append(SP(4))
story.append(NOTE("Equation: log(1/C) = a·X + b    where C = molar concentration for a standard biological effect, X = physicochemical descriptor, a = regression coefficient, b = intercept"))
story.append(SP(6))
story.append(B("<b>Key statistical parameters:</b>"))
story.append(BL("<b>n</b> – number of data points (compounds in the training set)"))
story.append(BL("<b>r</b> or <b>r²</b> – correlation coefficient / coefficient of determination. r² values closer to 1.0 indicate a better fit."))
story.append(BL("<b>s</b> – standard error of estimate. Smaller s indicates better predictive ability."))
story.append(BL("<b>F</b> – Fisher's F-statistic. Measures overall significance of the regression model."))
story.append(BL("<b>p-value</b> – probability that the observed correlation is due to chance. p &lt; 0.05 is generally accepted as significant."))
story.append(SP(6))

story.append(H3("1.3 Multiple Linear Regression (MLR)"))
story.append(B("MLR extends simple regression to include multiple descriptors simultaneously:"))
story.append(SP(4))
story.append(NOTE("Equation: log(1/C) = a₁X₁ + a₂X₂ + ... + aₙXₙ + b"))
story.append(SP(4))
story.append(B("MLR is the classical approach used by Hansch, Free-Wilson, and most traditional QSAR studies. It requires:"))
story.append(BL("The number of compounds (n) to be at least 5× the number of descriptors"))
story.append(BL("Absence of multicollinearity among descriptors (checked by cross-correlation matrix)"))
story.append(BL("Normally distributed residuals"))
story.append(BL("No significant outliers"))
story.append(SP(6))

story.append(H3("1.4 Leave-One-Out Cross-Validation (LOO-CV)"))
story.append(B("To assess the predictive validity of a QSAR model, leave-one-out cross-validation is used. Each compound is removed one at a time, the model is re-built, and the activity of the omitted compound is predicted."))
story.append(SP(4))
story.append(NOTE("q² (cross-validated r²) = 1 - (PRESS / SSY)    where PRESS = Predictive Residual Sum of Squares, SSY = Sum of Squares of deviations of actual activity from mean. A q² > 0.5 is generally considered a valid predictive model."))
story.append(SP(6))

story.append(H3("1.5 Assumptions and Limitations of Regression"))
story.append(B("<b>Assumptions:</b>"))
story.append(BL("Linearity between descriptors and activity"))
story.append(BL("Independence of observations"))
story.append(BL("Homoscedasticity (constant variance of residuals)"))
story.append(BL("Normal distribution of errors"))
story.append(SP(4))
story.append(B("<b>Limitations:</b>"))
story.append(BL("Cannot handle highly correlated descriptors (multicollinearity)"))
story.append(BL("Fails when n is small and number of variables is large"))
story.append(BL("Sensitive to outliers"))
story.append(BL("Cannot capture non-linear structure-activity relationships"))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 2 – PARTIAL LEAST SQUARES
# ══════════════════════════════════════════════════════════════════════════════
story.append(H2("TOPIC 2: PARTIAL LEAST SQUARES (PLS) ANALYSIS"))
story.append(SP(6))

story.append(H3("2.1 Introduction to PLS"))
story.append(B("Partial Least Squares (PLS) is the most widely used statistical method in 3D-QSAR. It was developed by Herman Wold (1966) and is particularly suited for datasets where the number of variables (descriptors) exceeds the number of observations (compounds)."))
story.append(SP(4))
story.append(B("Unlike MLR, PLS:"))
story.append(BL("Handles large numbers of inter-correlated variables"))
story.append(BL("Reduces the descriptor space into a smaller set of latent variables (LVs)"))
story.append(BL("Maximises covariance between the X-block (descriptors) and Y-block (activity)"))
story.append(BL("Is essential for 3D-QSAR methods like CoMFA and CoMSIA"))
story.append(SP(6))

story.append(H3("2.2 Principle of PLS"))
story.append(B("PLS decomposes both the descriptor matrix (X) and the activity matrix (Y) into scores and loadings:"))
story.append(SP(4))
story.append(NOTE("X = T·Pᵀ + E    Y = U·Qᵀ + F    where T, U = score matrices; P, Q = loading matrices; E, F = residual matrices. The algorithm maximises the covariance between T and U."))
story.append(SP(4))
story.append(B("The number of optimal latent variables (components) is determined by cross-validation: the optimal number is that which gives the maximum q² (leave-one-out cross-validated r²)."))
story.append(SP(6))

story.append(H3("2.3 PLS Algorithm Steps"))
story.append(BL("<b>Step 1:</b> Mean-centre and scale the X and Y matrices"))
story.append(BL("<b>Step 2:</b> Extract first pair of latent variables (scores t₁ and u₁) that maximise covariance(X, Y)"))
story.append(BL("<b>Step 3:</b> Regress Y on t₁ to get the inner relation coefficient b₁"))
story.append(BL("<b>Step 4:</b> Deflate X and Y matrices by removing variance explained by first LV"))
story.append(BL("<b>Step 5:</b> Repeat for subsequent LVs until optimal number is reached"))
story.append(BL("<b>Step 6:</b> Reconstruct the final PLS model using selected number of LVs"))
story.append(SP(6))

story.append(H3("2.4 Validation of PLS Models"))
story.append(B("Validation is critical for any QSAR model. Key parameters:"))

# table for PLS validation parameters
pls_val = [
    ["Parameter", "Acceptable Range", "Significance"],
    ["q² (LOO-CV)", "> 0.5", "Internal predictivity"],
    ["r² (fitted)", "> 0.9", "Goodness of fit"],
    ["F-statistic", "High", "Model significance"],
    ["SDEP", "Small", "Std. deviation of error"],
    ["r²pred (external)", "> 0.6", "External predictivity"],
]
t = Table(pls_val, colWidths=[4*cm, 4*cm, 6*cm])
t.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 9),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("ALIGN", (0,0), (-1,-1), "CENTER"),
    ("LEFTPADDING", (0,0), (-1,-1), 6),
    ("TOPPADDING", (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP(6))

story.append(H3("2.5 Advantages of PLS over MLR"))
story.append(BL("Handles datasets with more variables than observations"))
story.append(BL("Tolerates multicollinearity among descriptors"))
story.append(BL("Provides latent variable interpretation (biological/chemical meaning)"))
story.append(BL("Widely used in 3D-QSAR (CoMFA, CoMSIA)"))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 3 – OTHER MULTIVARIATE METHODS
# ══════════════════════════════════════════════════════════════════════════════
story.append(H2("TOPIC 3: OTHER MULTIVARIATE STATISTICAL METHODS"))
story.append(SP(6))

story.append(H3("3.1 Principal Component Analysis (PCA)"))
story.append(B("PCA is an unsupervised dimensionality-reduction technique. It transforms correlated descriptors into a smaller set of uncorrelated principal components (PCs) that capture maximum variance in the dataset."))
story.append(SP(4))
story.append(B("<b>Applications in Drug Discovery:</b>"))
story.append(BL("Visualisation of chemical space (2D/3D score plots)"))
story.append(BL("Identification of outliers and chemical clusters"))
story.append(BL("Pre-processing step before MLR or PLS"))
story.append(BL("Diversity analysis of compound libraries"))
story.append(SP(6))

story.append(H3("3.2 Principal Component Regression (PCR)"))
story.append(B("PCR combines PCA and linear regression. First PCA reduces descriptors to PCs; then regression is performed on selected PCs. It solves the multicollinearity problem but is less efficient than PLS because PCA does not consider the Y-variable (activity) during decomposition."))
story.append(SP(6))

story.append(H3("3.3 Artificial Neural Networks (ANN)"))
story.append(B("ANNs are non-linear computational models inspired by biological neural systems. They consist of input, hidden, and output layers connected by weighted nodes."))
story.append(SP(4))
story.append(B("<b>Advantages:</b>"))
story.append(BL("Can model complex, non-linear SAR"))
story.append(BL("No assumption of linearity required"))
story.append(BL("Handles large descriptor sets"))
story.append(SP(4))
story.append(B("<b>Disadvantages:</b>"))
story.append(BL("Black-box model – difficult to interpret mechanistically"))
story.append(BL("Risk of overfitting with small datasets"))
story.append(BL("Requires large training sets for reliability"))
story.append(SP(6))

story.append(H3("3.4 Genetic Algorithms (GA)"))
story.append(B("GA is an evolutionary optimisation method that mimics natural selection. In QSAR, GA is widely used for:"))
story.append(BL("<b>Descriptor selection:</b> selecting the optimal subset of molecular descriptors from a large pool"))
story.append(BL("<b>3D alignment:</b> finding the best molecular superposition for 3D-QSAR"))
story.append(BL("<b>Conformer searching:</b> identifying bioactive conformations"))
story.append(SP(6))

story.append(H3("3.5 Support Vector Machines (SVM)"))
story.append(B("SVM is a supervised learning algorithm that finds the optimal hyperplane separating active and inactive compounds. It is used in both regression (SVR) and classification (SVC) tasks. SVM is particularly effective for high-dimensional datasets with small sample sizes."))
story.append(SP(6))

story.append(H3("3.6 k-Nearest Neighbours (kNN)"))
story.append(B("kNN predicts the activity of a new compound based on the activities of its k most similar compounds in the training set (measured by structural similarity). Simple, non-parametric, and useful for virtual screening."))
story.append(SP(6))

story.append(H3("3.7 Random Forest (RF)"))
story.append(B("Random Forest is an ensemble method that builds multiple decision trees and aggregates their predictions. It is widely used in QSAR for classification (active/inactive) and regression (pIC50 prediction). RF provides feature importance scores, aiding descriptor selection."))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 4 – 3D-QSAR: CoMFA and CoMSIA
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(H2("TOPIC 4: 3D-QSAR APPROACHES – CoMFA AND CoMSIA"))
story.append(SP(6))

story.append(H3("4.1 Introduction to 3D-QSAR"))
story.append(B("Three-dimensional QSAR (3D-QSAR) incorporates the three-dimensional shape and spatial arrangement of molecules in QSAR modelling. Unlike classical 2D-QSAR (Hansch, Free-Wilson), 3D-QSAR uses the actual 3D coordinates of aligned molecules superimposed in a common grid."))
story.append(SP(4))
story.append(B("<b>Prerequisites for 3D-QSAR:</b>"))
story.append(BL("A set of structurally related active compounds with known biological activity"))
story.append(BL("Energy-minimised 3D structures (usually generated by molecular mechanics)"))
story.append(BL("Molecular alignment (superimposition) – the most critical and difficult step"))
story.append(BL("PLS statistical analysis for model building"))
story.append(SP(6))

story.append(H3("4.2 Comparative Molecular Field Analysis (CoMFA)"))
story.append(B("CoMFA was introduced by <b>Cramer et al. (1988)</b> and represents the landmark development in 3D-QSAR. It is the most widely used 3D-QSAR method."))
story.append(SP(4))

story.append(H4("4.2.1 Principle of CoMFA"))
story.append(B("Aligned molecules are placed in a 3D grid (lattice). A probe atom (typically sp3 carbon with +1 charge) is moved to each grid point, and two molecular field energies are calculated:"))
story.append(BL("<b>Steric field (Lennard-Jones potential):</b> measures steric/van der Waals interactions between the probe and the molecule"))
story.append(BL("<b>Electrostatic field (Coulombic potential):</b> measures electrostatic interactions"))
story.append(SP(4))
story.append(NOTE("The grid spacing is typically 2 Å. An energy cutoff (usually ±30 kcal/mol) is applied to avoid singularity at atom positions. This generates thousands of field values (descriptors) per molecule."))
story.append(SP(6))

story.append(H4("4.2.2 Statistical Analysis in CoMFA"))
story.append(B("The grid field values form the X-matrix (thousands of descriptors), and biological activities form the Y-vector. PLS analysis extracts the most relevant information:"))
story.append(BL("LOO cross-validation determines the optimal number of latent variables"))
story.append(BL("q² > 0.5 is the minimum criterion for a valid model"))
story.append(BL("<b>Steric and electrostatic contribution %</b> indicates relative importance of each field"))
story.append(SP(6))

story.append(H4("4.2.3 CoMFA Contour Maps"))
story.append(B("Contour plots are the most useful output of CoMFA, providing visual interpretation:"))
story.append(BL("<b>Steric map:</b> Green contours = regions where bulky groups increase activity; Yellow contours = regions where bulk decreases activity"))
story.append(BL("<b>Electrostatic map:</b> Blue contours = regions where positive charge/electropositive groups increase activity; Red contours = regions where negative charge/electronegative groups increase activity"))
story.append(SP(4))
story.append(B("These maps guide medicinal chemists to design new analogues with improved activity."))
story.append(SP(6))

story.append(H3("4.3 Comparative Molecular Similarity Indices Analysis (CoMSIA)"))
story.append(B("CoMSIA was developed by <b>Klebe et al. (1994)</b> as an improvement over CoMFA. It uses Gaussian-type distance-dependent functions instead of the Lennard-Jones and Coulombic potentials used in CoMFA."))
story.append(SP(4))

story.append(H4("4.3.1 Fields in CoMSIA"))
story.append(B("CoMSIA calculates five types of similarity indices at each grid point:"))

fields_data = [
    ["Field", "Description", "Significance"],
    ["Steric", "Molecular volume/shape", "Size requirements at receptor"],
    ["Electrostatic", "Charge distribution", "Ionic/polar interactions"],
    ["Hydrophobic", "Lipophilic character", "Hydrophobic pocket interactions"],
    ["H-bond donor", "H-bond donor capacity", "H-bond donor interactions"],
    ["H-bond acceptor", "H-bond acceptor capacity", "H-bond acceptor interactions"],
]
tf = Table(fields_data, colWidths=[3.5*cm, 6*cm, 5*cm])
tf.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 9),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("ALIGN", (0,0), (-1,-1), "CENTER"),
    ("LEFTPADDING", (0,0), (-1,-1), 6),
    ("TOPPADDING", (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
]))
story.append(tf)
story.append(SP(6))

story.append(H4("4.3.2 Advantages of CoMSIA over CoMFA"))
story.append(BL("Smoother field values – no singularity at atom positions, so no cutoff required"))
story.append(BL("Five fields provide more comprehensive description of molecular interactions"))
story.append(BL("Contour maps are smoother and easier to interpret"))
story.append(BL("Better model statistics in many case studies"))
story.append(BL("Hydrophobic and H-bond fields account for pharmacophoric features"))
story.append(SP(6))

story.append(H3("4.4 Comparison: CoMFA vs CoMSIA"))
comp_data = [
    ["Feature", "CoMFA", "CoMSIA"],
    ["Year introduced", "1988 (Cramer)", "1994 (Klebe)"],
    ["Field types", "Steric + Electrostatic (2)", "Steric, Elec, Hydro, HBD, HBA (5)"],
    ["Potential function", "Lennard-Jones + Coulomb", "Gaussian similarity"],
    ["Energy cutoff", "Required (±30 kcal/mol)", "Not required"],
    ["Singularity issue", "Yes, near atom centres", "No"],
    ["Contour maps", "Steric (G/Y), Elec (B/R)", "5 contour types"],
    ["Statistical method", "PLS", "PLS"],
    ["Alignment sensitivity", "High", "High"],
]
tc = Table(comp_data, colWidths=[4*cm, 4.5*cm, 5.5*cm])
tc.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 8.5),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("ALIGN", (0,0), (-1,-1), "CENTER"),
    ("LEFTPADDING", (0,0), (-1,-1), 5),
    ("TOPPADDING", (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story.append(tc)
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 5 – PRODRUG DESIGN
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(H2("TOPIC 5: PRODRUG DESIGN – BASIC CONCEPTS"))
story.append(SP(6))

story.append(H3("5.1 Definition of Prodrug"))
story.append(B("A <b>prodrug</b> is a pharmacologically inactive (or less active) compound that is converted in vivo into an active drug (parent drug) by enzymatic and/or chemical reactions. The term was first coined by <b>Albert (1958)</b>."))
story.append(SP(4))
story.append(NOTE("Prodrug → (metabolic / chemical activation) → Active Drug → Pharmacological Effect"))
story.append(SP(6))

story.append(H3("5.2 Classification of Prodrugs"))
story.append(B("Prodrugs are broadly classified into two categories:"))
story.append(SP(4))

story.append(H4("Type I – Intracellular Activation"))
story.append(B("Bioactivation occurs intracellularly (inside cells). Subdivided into:"))
story.append(BL("<b>Type IA:</b> Activated in metabolic tissues (liver, intestine). Examples: statins (lovastatin, simvastatin), acyclovir"))
story.append(BL("<b>Type IB:</b> Activated in therapeutic target tissues. Examples: cyclophosphamide, 5-fluorouracil"))
story.append(SP(4))

story.append(H4("Type II – Extracellular Activation"))
story.append(B("Bioactivation occurs extracellularly (in the GI tract, blood, or at the target site):"))
story.append(BL("<b>Type IIA:</b> Activated in the GI tract/lumen. Examples: dipivefrin (from epinephrine), loperamide oxide"))
story.append(BL("<b>Type IIB:</b> Activated in systemic circulation. Examples: bacampicillin, pivampicillin"))
story.append(BL("<b>Type IIC:</b> Activated at the therapeutic target site. Example: antibody-directed enzyme prodrug therapy (ADEPT)"))
story.append(SP(6))

story.append(H3("5.3 Promoiety"))
story.append(B("The inactive chemical group attached to the parent drug in a prodrug is called the <b>promoiety</b>. It is removed in vivo by enzymatic or chemical cleavage. The promoiety should be:"))
story.append(BL("Non-toxic and rapidly eliminated after cleavage"))
story.append(BL("Enzymatically or chemically labile under physiological conditions"))
story.append(BL("Stable during formulation and storage"))
story.append(SP(6))

story.append(H3("5.4 Rationale for Prodrug Design"))
story.append(B("Prodrug design is employed to overcome specific pharmaceutical or pharmacokinetic limitations:"))

rationale_data = [
    ["Problem", "Prodrug Strategy", "Example"],
    ["Poor water solubility", "Add hydrophilic promoiety (phosphate, amino acid)", "Prednisolone-21-phosphate"],
    ["Poor oral bioavailability", "Lipophilic ester prodrug", "Enalapril from enalaprilat"],
    ["Bitter/unpleasant taste", "Ester/carbamate promoiety", "Chloramphenicol palmitate"],
    ["GI irritation", "Mask acidic/basic group", "Aspirin → No direct contact"],
    ["Short duration", "Sustained release via prodrug", "Fluphenazine decanoate"],
    ["Poor CNS penetration", "Increase lipophilicity", "Levodopa (crosses BBB, → dopamine)"],
    ["Site-specific targeting", "Antibody/enzyme conjugate", "ADEPT system"],
    ["First-pass metabolism", "Ester prodrug bypasses liver", "Testosterone undecanoate"],
]
tr = Table(rationale_data, colWidths=[4*cm, 5.5*cm, 4.5*cm])
tr.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 8.5),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("VALIGN", (0,0), (-1,-1), "TOP"),
    ("LEFTPADDING", (0,0), (-1,-1), 5),
    ("TOPPADDING", (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story.append(tr)
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 6 – PATIENT ACCEPTABILITY
# ══════════════════════════════════════════════════════════════════════════════
story.append(H2("TOPIC 6: PRODRUGS TO IMPROVE PATIENT ACCEPTABILITY"))
story.append(SP(6))

story.append(H3("6.1 Taste Masking"))
story.append(B("Bitter taste is a major obstacle for paediatric and geriatric formulations. Prodrug strategies effectively mask unpleasant tastes:"))
story.append(SP(4))
story.append(BL("<b>Chloramphenicol palmitate:</b> Chloramphenicol has an intensely bitter taste. The palmitate ester prodrug is tasteless (insoluble in saliva) and is hydrolysed to active chloramphenicol by pancreatic lipase in the GI tract."))
story.append(BL("<b>Clindamycin palmitate and phosphate:</b> Clindamycin HCl is bitter; the palmitate ester is taste-free."))
story.append(BL("<b>Erythromycin esters:</b> Erythromycin estolate and ethylsuccinate mask the bitter taste of erythromycin."))
story.append(BL("<b>Ampicillin esters:</b> Various esters of ampicillin improve taste and oral absorption."))
story.append(SP(6))

story.append(H3("6.2 Reduction of GI Irritation and Pain on Injection"))
story.append(B("Some drugs cause local irritation at the site of administration. Prodrug design can mitigate this:"))
story.append(BL("<b>Aspirin (Acetylsalicylic acid):</b> While aspirin itself is a prodrug of salicylic acid, further esterification reduces direct GI irritation."))
story.append(BL("<b>Indomethacin prodrugs:</b> Acemetacin (glycolamide ester) reduces GI irritation compared to parent indomethacin."))
story.append(BL("<b>Dexamethasone phosphate:</b> The water-soluble sodium phosphate ester is used for IV injection, avoiding the pain of insoluble parent drug suspensions."))
story.append(SP(6))

story.append(H3("6.3 Odour Masking"))
story.append(B("Some drugs possess unpleasant odour which can be masked using prodrug strategies. Metronidazole and certain sulphur-containing compounds use ester promoieties for this purpose."))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 7 – DRUG SOLUBILITY
# ══════════════════════════════════════════════════════════════════════════════
story.append(H2("TOPIC 7: PRODRUGS TO IMPROVE DRUG SOLUBILITY"))
story.append(SP(6))

story.append(H3("7.1 Importance of Solubility in Drug Development"))
story.append(B("Poor aqueous solubility (BCS Class II and IV drugs) is one of the most common formulation challenges. Approximately 40% of marketed drugs and up to 70% of drug candidates in development have poor water solubility. Prodrug strategies convert lipophilic drugs into more water-soluble derivatives."))
story.append(SP(6))

story.append(H3("7.2 Phosphate Ester Prodrugs"))
story.append(B("Phosphate esters are among the most successful promoieties for solubility enhancement:"))
story.append(BL("<b>Prednisolone-21-phosphate:</b> Highly water-soluble prodrug of prednisolone. Used for ophthalmic and IV formulations."))
story.append(BL("<b>Hydrocortisone-21-phosphate:</b> Converts insoluble hydrocortisone into a water-soluble IV injectable form."))
story.append(BL("<b>Dexamethasone sodium phosphate:</b> Solubility increases from ~0.1 mg/mL (free alcohol) to >100 mg/mL (phosphate salt)."))
story.append(BL("<b>Fosphenytoin:</b> Phosphate ester prodrug of phenytoin. Highly water-soluble; used for IV/IM administration when phenytoin suspension is impractical."))
story.append(BL("<b>Fosamprenavir:</b> Phosphate ester prodrug of amprenavir (HIV protease inhibitor); dramatically improved solubility and oral bioavailability."))
story.append(SP(6))

story.append(H3("7.3 Amino Acid Ester Prodrugs"))
story.append(BL("<b>Aciclovir (Acyclovir) and Valaciclovir:</b> Acyclovir has poor oral bioavailability (~20%). Valaciclovir is the L-valyl ester prodrug; oral bioavailability increases to 55% due to active transport by intestinal peptide transporters."))
story.append(BL("<b>Valganciclovir:</b> L-valyl ester of ganciclovir. Oral bioavailability improves from 5% (ganciclovir) to 60% (valganciclovir)."))
story.append(SP(6))

story.append(H3("7.4 Other Solubilising Promoieties"))
story.append(BL("<b>Succinate esters:</b> Chloramphenicol sodium succinate for IV use."))
story.append(BL("<b>Hemisuccinate esters:</b> Methylprednisolone hemisuccinate (Solu-Medrol)."))
story.append(BL("<b>N-oxide prodrugs:</b> Improve solubility by introduction of ionisable nitrogen oxide groups."))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 8 – ABSORPTION AND DISTRIBUTION
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(H2("TOPIC 8: PRODRUGS TO IMPROVE DRUG ABSORPTION AND DISTRIBUTION"))
story.append(SP(6))

story.append(H3("8.1 Improving Oral Absorption by Increasing Lipophilicity"))
story.append(B("Many hydrophilic drugs with excellent potency suffer from poor oral absorption due to inability to penetrate lipid membranes. Esterification with lipophilic groups increases log P and membrane permeability:"))
story.append(SP(4))
story.append(BL("<b>Enalapril:</b> Ethyl ester prodrug of enalaprilat (ACE inhibitor). Enalaprilat has poor oral bioavailability (&lt;10%) due to two ionisable carboxylic acid groups. Enalapril has ~60% oral bioavailability; hydrolysed by hepatic esterases to active enalaprilat."))
story.append(BL("<b>Bacampicillin:</b> Ethoxycarbonyloxyethyl ester prodrug of ampicillin. Oral bioavailability improves from 30–40% (ampicillin) to 80–98% (bacampicillin)."))
story.append(BL("<b>Pivampicillin:</b> Pivaloyloxymethyl ester of ampicillin; improved oral absorption."))
story.append(BL("<b>Talampicillin:</b> Phthalidyl ester of ampicillin; oral bioavailability ~98%."))
story.append(BL("<b>Olmesartan medoxomil:</b> Ester prodrug of olmesartan (AT1 receptor antagonist); hydrolysed during absorption in GI tract."))
story.append(SP(6))

story.append(H3("8.2 Improving CNS Penetration"))
story.append(B("The blood-brain barrier (BBB) is a major obstacle for CNS drug delivery. Prodrug strategies modify physicochemical properties to facilitate BBB passage:"))
story.append(SP(4))
story.append(BL("<b>Levodopa (L-DOPA):</b> The most famous CNS prodrug. Dopamine cannot cross the BBB due to its polar catecholamine structure. L-DOPA is the amino acid precursor that is transported across the BBB by large neutral amino acid transporters (LAT1), then decarboxylated by DOPA decarboxylase to dopamine."))
story.append(BL("<b>Heroin (diacetylmorphine):</b> Diacetyl ester of morphine. More lipophilic than morphine; rapidly crosses BBB, then deacetylated to 6-acetylmorphine and morphine. (Historical note: used in pain management before abuse potential recognised.)"))
story.append(BL("<b>Memantine prodrugs:</b> Various lipophilic prodrugs of memantine for improved CNS exposure."))
story.append(SP(6))

story.append(H3("8.3 Transporter-Mediated Prodrugs"))
story.append(B("Intestinal and cellular transporters can be exploited for targeted prodrug delivery:"))
story.append(BL("<b>Peptide transporter (PEPT1/PEPT2):</b> Di/tripeptide-like prodrugs are actively transported. Valaciclovir uses hPEPT1; valganciclovir uses the same mechanism."))
story.append(BL("<b>Amino acid transporters:</b> L-DOPA uses LAT1 at the BBB. L-serine and L-alanine promoieties can exploit amino acid carriers."))
story.append(BL("<b>Nucleoside transporters:</b> Antiviral nucleoside prodrugs (e.g., tenofovir alafenamide) exploit intracellular activation for targeted delivery."))
story.append(SP(6))

story.append(H3("8.4 Depot Prodrugs for Prolonged Action"))
story.append(B("Long-chain fatty acid esters of drugs form depot preparations that release the parent drug slowly:"))
story.append(BL("<b>Fluphenazine decanoate:</b> Long-chain fatty acid ester of fluphenazine. IM injection provides antipsychotic effect for 2–4 weeks. Improves medication compliance."))
story.append(BL("<b>Haloperidol decanoate:</b> Monthly depot injection for schizophrenia."))
story.append(BL("<b>Testosterone esters:</b> Testosterone enanthate, cypionate, and undecanoate provide sustained testosterone release from IM/SC depots."))
story.append(BL("<b>Nandrolone decanoate:</b> Anabolic steroid depot formulation."))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 9 – SITE-SPECIFIC DELIVERY & SUSTAINED DRUG ACTION
# ══════════════════════════════════════════════════════════════════════════════
story.append(H2("TOPIC 9: SITE-SPECIFIC DRUG DELIVERY AND SUSTAINED DRUG ACTION"))
story.append(SP(6))

story.append(H3("9.1 Concept of Site-Specific Drug Delivery"))
story.append(B("Site-specific (targeted) drug delivery aims to concentrate the drug at the intended therapeutic site while minimising systemic exposure and off-target toxicity. Prodrugs are designed to be activated only at the target site by enzymes or conditions unique to that site."))
story.append(SP(6))

story.append(H3("9.2 GI Tract-Specific Prodrugs (Colon Targeting)"))
story.append(B("Colonic drug delivery is employed for:"))
story.append(BL("Treatment of colorectal diseases (ulcerative colitis, Crohn's disease)"))
story.append(BL("Oral delivery of proteins/peptides susceptible to upper GI proteolysis"))
story.append(SP(4))
story.append(B("<b>Mechanism:</b> Azo-bond prodrugs are cleaved by azoreductase enzymes produced by colonic bacteria:"))
story.append(BL("<b>Sulfasalazine:</b> Azo prodrug of 5-aminosalicylic acid (5-ASA) and sulfapyridine. 5-ASA released in colon treats inflammatory bowel disease."))
story.append(BL("<b>Olsalazine:</b> Azo dimer of two 5-ASA molecules; splits in colon."))
story.append(BL("<b>Balsalazide:</b> 5-ASA coupled to inert carrier via azo bond; colon-specific."))
story.append(SP(4))
story.append(B("Glucuronide and glycoside prodrugs are also used since colonic bacteria express β-glucuronidase and β-glucosidase."))
story.append(SP(6))

story.append(H3("9.3 Tumour-Targeted Prodrug Systems"))
story.append(B("<b>ADEPT (Antibody-Directed Enzyme Prodrug Therapy):</b>"))
story.append(BL("Step 1: Tumour-specific antibody conjugated to an enzyme is administered; localises at tumour."))
story.append(BL("Step 2: Systemically administered prodrug reaches tumour site."))
story.append(BL("Step 3: Localised enzyme activates prodrug to cytotoxic drug only at tumour."))
story.append(BL("Result: High local drug concentration at tumour; minimal systemic toxicity."))
story.append(SP(4))
story.append(B("<b>GDEPT (Gene-Directed Enzyme Prodrug Therapy):</b>"))
story.append(BL("A gene encoding a foreign enzyme is delivered selectively to tumour cells"))
story.append(BL("Prodrug administered systemically; activated only in cells expressing the foreign enzyme"))
story.append(BL("Example: Herpes simplex virus thymidine kinase (HSV-TK) + ganciclovir prodrug system"))
story.append(SP(4))
story.append(B("<b>Hypoxia-activated prodrugs:</b>"))
story.append(BL("Solid tumours have hypoxic cores; nitroreductase-activated prodrugs (e.g., tirapazamine) are selectively activated under hypoxic conditions"))
story.append(SP(6))

story.append(H3("9.4 Sustained Drug Action via Prodrugs"))
story.append(B("Sustained release can be achieved without complex formulation technology by incorporating slow-release promoieties:"))
story.append(BL("<b>Principle:</b> Rate of hydrolysis/biotransformation of the prodrug controls the rate of active drug release"))
story.append(BL("<b>Intramuscular depot prodrugs:</b> Fluphenazine decanoate, haloperidol decanoate (as discussed in Topic 8)"))
story.append(BL("<b>Ophthalmic prodrugs:</b> Dipivefrin (dipivalyl ester of epinephrine) for glaucoma – better corneal penetration and sustained release of epinephrine in the eye"))
story.append(BL("<b>Dermal prodrugs:</b> Minoxidil sulfate (active form) formed from minoxidil via sulfotransferase in follicular cells; provides localised hair growth stimulation"))
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# TOPIC 10 – RATIONALE & PRACTICAL CONSIDERATIONS
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(H2("TOPIC 10: RATIONALE AND PRACTICAL CONSIDERATIONS OF PRODRUG DESIGN"))
story.append(SP(6))

story.append(H3("10.1 Rationale for Prodrug Design"))
story.append(B("The primary rationale is to overcome pharmacokinetic, pharmaceutical, or pharmacodynamic limitations of the parent drug. Key reasons:"))

ratio_data = [
    ["Rationale Category", "Specific Objective", "Example"],
    ["Pharmaceutical", "Improve water solubility for IV formulation", "Prednisolone-21-phosphate"],
    ["Pharmaceutical", "Taste masking for oral pediatric use", "Chloramphenicol palmitate"],
    ["Pharmacokinetic", "Improve oral bioavailability", "Valaciclovir, Enalapril"],
    ["Pharmacokinetic", "CNS penetration (BBB crossing)", "Levodopa"],
    ["Pharmacokinetic", "Extend duration of action (depot)", "Fluphenazine decanoate"],
    ["Pharmacokinetic", "Overcome first-pass metabolism", "Testosterone undecanoate"],
    ["Pharmacodynamic", "Site-specific activation", "Sulfasalazine, ADEPT"],
    ["Toxicity reduction", "Reduce systemic toxicity", "Antibody-drug conjugates"],
    ["Stability", "Protect from chemical degradation", "Acetal/ketal prodrugs"],
]
tr2 = Table(ratio_data, colWidths=[4*cm, 5.5*cm, 4.5*cm])
tr2.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 8.5),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("VALIGN", (0,0), (-1,-1), "TOP"),
    ("LEFTPADDING", (0,0), (-1,-1), 5),
    ("TOPPADDING", (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story.append(tr2)
story.append(SP(8))

story.append(H3("10.2 Practical Considerations in Prodrug Design"))
story.append(B("Designing a successful prodrug requires careful consideration of multiple factors:"))
story.append(SP(4))

story.append(H4("10.2.1 Chemical Stability"))
story.append(BL("The prodrug must be chemically stable during manufacturing, storage, and transit to the site of activation"))
story.append(BL("Must not degrade prematurely in formulation or in the gastrointestinal lumen (if meant for systemic delivery)"))
story.append(BL("The promoiety should be easily cleaved only after reaching the target site"))
story.append(SP(4))

story.append(H4("10.2.2 Enzymatic Activation"))
story.append(BL("The enzyme responsible for prodrug activation must be present in adequate amounts at the target site"))
story.append(BL("Common activating enzymes: esterases (plasma, hepatic), phosphatases, peptidases, azoreductases, cytochrome P450s"))
story.append(BL("Species differences in enzyme expression must be considered during preclinical development"))
story.append(BL("Genetic polymorphisms in activating enzymes can lead to variable clinical response"))
story.append(SP(4))

story.append(H4("10.2.3 Safety of the Promoiety"))
story.append(BL("The released promoiety must be non-toxic, pharmacologically inert, and rapidly eliminated"))
story.append(BL("Formaldehyde, acetaldehyde, and other reactive species from promoiety metabolism are problematic"))
story.append(BL("Pivaloyloxymethyl (POM) ester promoieties release pivalic acid, which conjugates with carnitine and may cause carnitine deficiency"))
story.append(SP(4))

story.append(H4("10.2.4 Physicochemical Properties of the Prodrug"))
story.append(BL("The prodrug must maintain adequate aqueous solubility or membrane permeability (depending on the objective)"))
story.append(BL("Log P, pKa, molecular weight, and hydrogen bonding must be optimised"))
story.append(BL("Must comply with Lipinski's Rule of Five for oral prodrugs"))
story.append(SP(4))

story.append(H4("10.2.5 Bioavailability and Pharmacokinetics"))
story.append(BL("Rate of conversion to active drug must be predictable and reproducible"))
story.append(BL("Incomplete conversion leads to subtherapeutic concentrations"))
story.append(BL("Rate of conversion must not be too fast (defeating purpose) or too slow (prolonged inactivity)"))
story.append(BL("Distribution of both prodrug and active drug must be characterised"))
story.append(SP(4))

story.append(H4("10.2.6 Regulatory Considerations"))
story.append(BL("Prodrugs are considered new chemical entities (NCEs) and require full regulatory approval"))
story.append(BL("Both prodrug and released drug (plus any reactive intermediates) must be toxicologically evaluated"))
story.append(BL("Metabolic profiling and identification of all metabolites are required"))
story.append(BL("Patent strategy: prodrug may extend patent life of parent drug (secondary patent)"))
story.append(SP(6))

story.append(H3("10.3 Bioreversible Derivatives"))
story.append(B("Prodrugs must be bioreversible - they must regenerate the parent drug in vivo. Key considerations:"))
story.append(BL("<b>Esters:</b> Most widely used promoiety. Hydrolysed by ubiquitous esterases. Rate controlled by ester structure (methyl > ethyl > iso-propyl > tert-butyl in terms of hydrolysis rate)."))
story.append(BL("<b>Carbonates and carbamates:</b> More stable than esters; used for controlled release."))
story.append(BL("<b>Amides:</b> Relatively resistant to hydrolysis; less commonly used."))
story.append(BL("<b>Phosphates:</b> Rapidly cleaved by alkaline phosphatase; used for solubility improvement."))
story.append(BL("<b>N-oxides, N-mannich bases, oxazolidines:</b> Used for amine drugs."))
story.append(SP(6))

story.append(H3("10.4 Examples of Successful Prodrugs in Clinical Use"))

success_data = [
    ["Prodrug", "Active Drug", "Benefit", "Activation"],
    ["Enalapril", "Enalaprilat", "Oral bioavailability", "Hepatic esterase"],
    ["Valaciclovir", "Acyclovir", "Absorption (PEPT1)", "Intestinal/hepatic"],
    ["Oseltamivir phosphate", "Oseltamivir carboxylate", "Oral stability/absorption", "Hepatic esterase"],
    ["Levodopa", "Dopamine", "BBB penetration", "DOPA decarboxylase"],
    ["Sulfasalazine", "5-ASA + sulfapyridine", "Colon targeting", "Azo reductase"],
    ["Fosphenytoin", "Phenytoin", "Solubility for IV use", "Phosphatase"],
    ["Tenofovir alafenamide", "Tenofovir diphosphate", "Intracellular activation", "Cathepsin A"],
    ["Clopidogrel", "Active thiol metabolite", "Platelet inhibition", "CYP2C19"],
    ["Omeprazole", "Sulfenamide", "Proton pump inhibition", "Acid-catalysed"],
]
ts = Table(success_data, colWidths=[3.5*cm, 3.5*cm, 4.5*cm, 3.5*cm])
ts.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 8),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("VALIGN", (0,0), (-1,-1), "TOP"),
    ("LEFTPADDING", (0,0), (-1,-1), 4),
    ("TOPPADDING", (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story.append(ts)
story.append(SP(10))

# ══════════════════════════════════════════════════════════════════════════════
# SUMMARY TABLE
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(H2("CHAPTER 5 – SUMMARY AND KEY POINTS"))
story.append(SP(8))

story.append(H3("Quick Reference: QSAR Statistical Methods"))
qsar_summ = [
    ["Method", "Type", "Key Feature", "Use in QSAR"],
    ["Simple LR", "Univariate", "One descriptor", "Classical QSAR"],
    ["Multiple LR (MLR)", "Multivariate", "Multiple descriptors", "Hansch, classical 2D-QSAR"],
    ["PLS", "Latent variable", "Handles collinearity", "3D-QSAR (CoMFA, CoMSIA)"],
    ["PCA", "Unsupervised", "Dimensionality reduction", "Data exploration"],
    ["PCR", "Supervised + PCA", "Orthogonal predictors", "2D/3D QSAR"],
    ["ANN", "Non-linear ML", "Complex non-linear SAR", "QSAR/QSPR"],
    ["SVM", "Supervised ML", "High-dim, small n", "Classification & regression"],
    ["Random Forest", "Ensemble", "Feature importance", "VS, activity prediction"],
    ["GA", "Evolutionary", "Descriptor selection", "Optimisation in QSAR"],
]
tqs = Table(qsar_summ, colWidths=[3.5*cm, 3.5*cm, 4.5*cm, 3.5*cm])
tqs.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 8),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("ALIGN", (0,0), (-1,-1), "CENTER"),
    ("LEFTPADDING", (0,0), (-1,-1), 4),
    ("TOPPADDING", (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story.append(tqs)
story.append(SP(10))

story.append(H3("Quick Reference: Prodrug Design"))
pd_summ = [
    ["Prodrug Category", "Strategy", "Examples"],
    ["Solubility improvement", "Phosphate/amino acid ester", "Prednisolone-21-phosphate, Fosphenytoin"],
    ["Absorption improvement", "Lipophilic ester", "Enalapril, Bacampicillin"],
    ["CNS penetration", "Amino acid / lipophilic ester", "Levodopa, Heroin"],
    ["Taste masking", "Insoluble ester", "Chloramphenicol palmitate"],
    ["GI irritation reduction", "Masked acid/base", "Acemetacin"],
    ["Colon targeting", "Azo bond", "Sulfasalazine, Olsalazine"],
    ["Tumour targeting", "Enzyme-activated", "ADEPT system"],
    ["Sustained action", "Long-chain fatty acid ester", "Fluphenazine decanoate"],
    ["Intracellular targeting", "Nucleotide prodrugs", "Tenofovir alafenamide"],
]
tpd = Table(pd_summ, colWidths=[4.5*cm, 5*cm, 5.5*cm])
tpd.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), colors.HexColor("#283593")),
    ("TEXTCOLOR", (0,0), (-1,0), colors.white),
    ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE", (0,0), (-1,-1), 8.5),
    ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#9fa8da")),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [colors.white, colors.HexColor("#e8eaf6")]),
    ("VALIGN", (0,0), (-1,-1), "TOP"),
    ("LEFTPADDING", (0,0), (-1,-1), 5),
    ("TOPPADDING", (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story.append(tpd)
story.append(SP(10))

story.append(H3("Key Points to Remember"))
story.append(BL("<b>Regression analysis</b> (MLR) is the foundation of classical 2D-QSAR. q² > 0.5 and r² > 0.9 are minimum criteria for a valid model."))
story.append(BL("<b>PLS</b> is the statistical engine of 3D-QSAR. It handles collinear, large descriptor matrices by extracting latent variables."))
story.append(BL("<b>CoMFA (1988)</b> uses steric + electrostatic fields on a 3D grid; PLS analysis gives contour maps for drug design."))
story.append(BL("<b>CoMSIA (1994)</b> adds hydrophobic, H-bond donor, and H-bond acceptor fields; uses Gaussian functions (no cutoff needed)."))
story.append(BL("A <b>prodrug</b> is an inactive compound converted to active drug in vivo by enzyme/chemical reaction."))
story.append(BL("<b>Ester prodrugs</b> (phosphate, amino acid, fatty acid) are the most common class; cleaved by esterases."))
story.append(BL("<b>Valaciclovir</b> (amino acid ester of acyclovir) is transported by PEPT1, improving bioavailability from 20% to 55%."))
story.append(BL("<b>Levodopa</b> crosses BBB via LAT1 amino acid transporter; converted to dopamine by DOPA decarboxylase."))
story.append(BL("<b>Sulfasalazine</b> is cleaved by colonic azoreductase to release 5-ASA at the site of inflammation."))
story.append(BL("Practical prodrug design must consider: stability, enzymatic activation, promoiety safety, PK, and regulatory requirements."))
story.append(SP(10))

# ── page number footer via on-page canvas callback ───────────────────────────
def footer(canvas, doc):
    canvas.saveState()
    canvas.setFont("Helvetica", 8)
    canvas.setFillColor(colors.HexColor("#546e7a"))
    page_num = canvas.getPageNumber()
    text = f"Chapter 5: QSAR Statistical Methods & Prodrug Design  |  Pharmacology (MPL) Sem-II  |  Page {page_num}"
    canvas.drawCentredString(A4[0]/2, 1.5*cm, text)
    canvas.setStrokeColor(colors.HexColor("#9fa8da"))
    canvas.setLineWidth(0.4)
    canvas.line(2*cm, 1.8*cm, A4[0]-2*cm, 1.8*cm)
    canvas.restoreState()

doc.build(story, onFirstPage=footer, onLaterPages=footer)
print(f"PDF saved to: {OUTPUT}")
print(f"File size: {os.path.getsize(OUTPUT)/1024:.1f} KB")
Running Command

python /tmp/workspace/chapter5-drug-discovery/generate_pdf.py

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

Chapter5 QSAR Prodrug Drug Discovery

PDF Document · PDF


What's Inside the PDF

The PDF covers all 10 topics from your Pharmacology (MPL) Sem-II, Chapter 5 syllabus in a structured, exam-ready format:
TopicContent
1. Regression AnalysisSLR, MLR equations, statistical parameters (r², q², F, p), LOO cross-validation, assumptions & limitations
2. PLS AnalysisPrinciple, algorithm steps, latent variables, validation table (q², r², SDEP), advantages over MLR
3. Other Multivariate MethodsPCA, PCR, ANN, Genetic Algorithms, SVM, kNN, Random Forest
4. CoMFA & CoMSIA (3D-QSAR)Cramer (1988) CoMFA - steric + electrostatic fields, contour map interpretation (Green/Yellow, Blue/Red); Klebe (1994) CoMSIA - 5 fields, Gaussian functions; detailed comparison table
5. Prodrug ConceptsAlbert's definition (1958), Type I vs Type II classification, promoiety concept
6. Patient AcceptabilityTaste masking (chloramphenicol palmitate, erythromycin esters), GI irritation reduction
7. Solubility ImprovementPhosphate esters (fosphenytoin, fosamprenavir), amino acid esters (valaciclovir, valganciclovir)
8. Absorption & DistributionEnalapril, bacampicillin, levodopa (BBB via LAT1), depot prodrugs (fluphenazine decanoate)
9. Site-Specific & Sustained ActionColon targeting (sulfasalazine, azo prodrugs), ADEPT, GDEPT, hypoxia-activated prodrugs
10. Rationale & Practical ConsiderationsFull rationale table, stability, enzyme activation, promoiety safety, regulatory aspects, 10 clinical examples table
The PDF also includes a summary chapter with quick-reference tables and 10 key points to memorise for exams.
This is a shared conversation. Sign in to Orris to start your own chat.