Make notess for easy learning use flowchart or whatever u want
mkdir -p /tmp/workspace/mevalonate-notes && ls /tmp/workspace/
~/mevalonate-notes/notes.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AcetateβMevalonate Pathway Notes</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Poppins', Arial, sans-serif;
background: #f0f4ff;
color: #1a1a2e;
padding: 30px 20px;
}
h1 {
text-align: center;
background: linear-gradient(135deg, #7b2ff7, #5b8dee);
color: white;
padding: 22px 30px;
border-radius: 16px;
font-size: 1.8em;
margin-bottom: 10px;
letter-spacing: 1px;
}
.subtitle {
text-align: center;
color: #7b2ff7;
font-size: 0.95em;
margin-bottom: 30px;
font-weight: 600;
}
/* ===== OVERVIEW CARDS ===== */
.cards-row {
display: flex;
flex-wrap: wrap;
gap: 16px;
margin-bottom: 30px;
justify-content: center;
}
.card {
background: white;
border-radius: 14px;
padding: 18px 20px;
flex: 1 1 220px;
max-width: 260px;
box-shadow: 0 4px 15px rgba(123,47,247,0.12);
border-top: 5px solid #7b2ff7;
text-align: center;
}
.card .emoji { font-size: 2em; margin-bottom: 8px; }
.card h3 { font-size: 0.85em; color: #7b2ff7; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.card p { font-size: 0.82em; color: #444; line-height: 1.5; }
/* ===== SECTION TITLES ===== */
.section-title {
background: linear-gradient(135deg, #7b2ff7, #9b59b6);
color: white;
padding: 12px 22px;
border-radius: 10px;
font-size: 1.1em;
font-weight: 700;
margin: 30px 0 18px 0;
display: flex;
align-items: center;
gap: 10px;
}
/* ===== FLOWCHART ===== */
.flowchart {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
margin-bottom: 20px;
}
.flow-box {
background: white;
border-radius: 12px;
padding: 14px 22px;
text-align: center;
box-shadow: 0 3px 14px rgba(0,0,0,0.08);
width: 100%;
max-width: 640px;
position: relative;
}
.flow-box .step-label {
font-size: 0.68em;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 4px;
}
.flow-box .compound {
font-size: 1.05em;
font-weight: 700;
}
.flow-box .detail {
font-size: 0.78em;
color: #555;
margin-top: 4px;
line-height: 1.5;
}
/* color themes per step */
.s1 { border-left: 6px solid #e74c3c; } .s1 .step-label { color: #e74c3c; }
.s2 { border-left: 6px solid #e67e22; } .s2 .step-label { color: #e67e22; }
.s3 { border-left: 6px solid #f1c40f; } .s3 .step-label { color: #b7950b; }
.s4 { border-left: 6px solid #2ecc71; } .s4 .step-label { color: #1a8a4a; }
.s5 { border-left: 6px solid #1abc9c; } .s5 .step-label { color: #117a65; }
.s6 { border-left: 6px solid #3498db; } .s6 .step-label { color: #1a5276; }
.s7 { border-left: 6px solid #9b59b6; } .s7 .step-label { color: #6c3483; }
.s8 { border-left: 6px solid #e91e63; } .s8 .step-label { color: #880e4f; }
/* Arrow */
.arrow {
font-size: 1.6em;
color: #7b2ff7;
line-height: 1;
margin: 2px 0;
text-align: center;
}
.arrow-label {
font-size: 0.7em;
background: #ede7ff;
color: #5b2ca7;
border-radius: 6px;
padding: 2px 10px;
display: inline-block;
margin: 0px 0 2px 0;
font-weight: 600;
}
/* ===== PRODUCTS GRID ===== */
.products-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 14px;
margin-bottom: 20px;
}
.product-card {
background: white;
border-radius: 12px;
padding: 14px;
text-align: center;
box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
.product-card .carbons {
font-size: 1.4em;
font-weight: 700;
margin-bottom: 4px;
}
.product-card .name {
font-size: 0.82em;
font-weight: 600;
margin-bottom: 4px;
}
.product-card .type {
font-size: 0.72em;
color: #777;
}
.c10 { border-top: 4px solid #3498db; } .c10 .carbons { color: #3498db; }
.c15 { border-top: 4px solid #2ecc71; } .c15 .carbons { color: #2ecc71; }
.c20 { border-top: 4px solid #e67e22; } .c20 .carbons { color: #e67e22; }
.c25 { border-top: 4px solid #9b59b6; } .c25 .carbons { color: #9b59b6; }
.c30 { border-top: 4px solid #e74c3c; } .c30 .carbons { color: #e74c3c; }
.c40 { border-top: 4px solid #1abc9c; } .c40 .carbons { color: #1abc9c; }
/* ===== MEMORY TABLE ===== */
table {
width: 100%;
border-collapse: collapse;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 3px 14px rgba(0,0,0,0.08);
margin-bottom: 30px;
font-size: 0.82em;
}
thead tr { background: linear-gradient(135deg, #7b2ff7, #5b8dee); color: white; }
thead th { padding: 12px 14px; text-align: left; font-weight: 700; }
tbody tr:nth-child(even) { background: #f5f0ff; }
tbody td { padding: 10px 14px; border-bottom: 1px solid #eee; vertical-align: top; }
tbody td:first-child { font-weight: 700; color: #7b2ff7; }
/* ===== KEY FACTS ===== */
.facts-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 14px;
margin-bottom: 30px;
}
.fact-box {
background: white;
border-radius: 12px;
padding: 16px;
box-shadow: 0 3px 12px rgba(0,0,0,0.07);
border-left: 5px solid #7b2ff7;
}
.fact-box h4 {
font-size: 0.82em;
font-weight: 700;
color: #7b2ff7;
text-transform: uppercase;
margin-bottom: 6px;
}
.fact-box p, .fact-box ul {
font-size: 0.8em;
color: #444;
line-height: 1.6;
}
.fact-box ul { padding-left: 16px; }
.fact-box ul li { margin-bottom: 3px; }
/* ===== MNEMONIC ===== */
.mnemonic {
background: linear-gradient(135deg, #fff9e6, #fff3cd);
border: 2px dashed #f39c12;
border-radius: 14px;
padding: 20px 24px;
margin-bottom: 30px;
}
.mnemonic h3 { color: #d68910; font-size: 1em; margin-bottom: 12px; }
.mnemonic-letters {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.ml {
background: white;
border-radius: 8px;
padding: 8px 14px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
font-size: 0.82em;
}
.ml b { color: #e74c3c; font-size: 1.2em; }
footer {
text-align: center;
font-size: 0.75em;
color: #aaa;
margin-top: 20px;
}
</style>
</head>
<body>
<h1>πΏ Acetate β Mevalonate Pathway</h1>
<p class="subtitle">Also known as: Isoprenoid Pathway / HMG-CoA Reductase Pathway</p>
<!-- OVERVIEW CARDS -->
<div class="cards-row">
<div class="card">
<div class="emoji">π¦ </div>
<h3>Where it occurs</h3>
<p>Eukaryotes, Archaea & some Bacteria</p>
</div>
<div class="card">
<div class="emoji">π§±</div>
<h3>Building blocks made</h3>
<p><b>IPP</b> (Isopentenyl Pyrophosphate)<br>& <b>DMAPP</b> (Dimethylallyl Pyrophosphate)<br>Both are <b>C5 units</b></p>
</div>
<div class="card">
<div class="emoji">π</div>
<h3>Starts with</h3>
<p>Acetyl CoA (active acetate)</p>
</div>
<div class="card">
<div class="emoji">π</div>
<h3>Ends with</h3>
<p>IPP + DMAPP β Isoprenoids</p>
</div>
<div class="card">
<div class="emoji">π</div>
<h3>Products include</h3>
<p>Cholesterol, Vitamin K, CoQ10, Steroids, Terpenoids, Alkaloids</p>
</div>
</div>
<!-- FLOWCHART -->
<div class="section-title">βοΈ Step-by-Step Pathway Flowchart</div>
<div class="flowchart">
<div class="flow-box s1">
<div class="step-label">Step 1 β Start</div>
<div class="compound">Acetyl CoA (C2)</div>
<div class="detail">Produced from pyruvic acid β end product of glycolysis</div>
</div>
<div class="arrow">β</div>
<span class="arrow-label">Claisen Condensation (2 molecules)</span>
<div class="flow-box s2">
<div class="step-label">Step 2</div>
<div class="compound">Acetoacetyl CoA (C4)</div>
<div class="detail">2 Acetyl CoA β Acetoacetyl CoA</div>
</div>
<div class="arrow">β</div>
<span class="arrow-label">Aldol Addition (3rd Acetyl CoA)</span>
<div class="flow-box s3">
<div class="step-label">Step 3</div>
<div class="compound">Ξ²-Hydroxy Ξ²-Methylglutaryl CoA (HMG-CoA) (C6)</div>
<div class="detail">3rd molecule of Acetyl CoA added by aldol addition</div>
</div>
<div class="arrow">β</div>
<span class="arrow-label">Reduction (HMG-CoA Reductase β KEY ENZYME)</span>
<div class="flow-box s4">
<div class="step-label">Step 4 β KEY PRECURSOR</div>
<div class="compound">Mevalonic Acid (C6)</div>
<div class="detail">Main precursor for biosynthesis of all terpenoids</div>
</div>
<div class="arrow">β</div>
<span class="arrow-label">ATP-mediated Phosphorylation β Mevalonic Acid Diphosphate</span>
<div class="flow-box s5">
<div class="step-label">Step 5</div>
<div class="compound">Mevalonic Acid Diphosphate β Decarboxylation</div>
<div class="detail">Loses COβ to form the 1st isoprene unit</div>
</div>
<div class="arrow">β</div>
<span class="arrow-label">Decarboxylation</span>
<div class="flow-box s6">
<div class="step-label">Step 6 β 1st Isoprene Unit</div>
<div class="compound">IPP β Isopentenyl Pyrophosphate (C5)</div>
<div class="detail">Active isoprene unit</div>
</div>
<div class="arrow">β</div>
<span class="arrow-label">Isomerase Enzyme</span>
<div class="flow-box s7">
<div class="step-label">Step 7 β 2nd Isoprene Unit</div>
<div class="compound">DMAPP β Dimethylallyl Pyrophosphate (C5)</div>
<div class="detail">IPP isomerizes to DMAPP via isomerase</div>
</div>
<div class="arrow">β</div>
<span class="arrow-label">Electrophilic addition via Prenyl Transferase</span>
<div class="flow-box s8">
<div class="step-label">Step 8 β Chain Building Begins!</div>
<div class="compound">IPP + DMAPP β GPP (C10)</div>
<div class="detail">Geranyl Pyrophosphate β precursor for Monoterpenes</div>
</div>
</div>
<!-- CHAIN ELONGATION TABLE -->
<div class="section-title">π Chain Elongation (Adding IPP Units)</div>
<table>
<thead>
<tr>
<th>Carbons</th>
<th>Compound</th>
<th>Abbreviation</th>
<th>Terpene Class</th>
<th>How Formed</th>
</tr>
</thead>
<tbody>
<tr>
<td>C5</td>
<td>IPP / DMAPP</td>
<td>IPP / DMAPP</td>
<td>Hemiterpene (C5)</td>
<td>From mevalonic acid</td>
</tr>
<tr>
<td>C10</td>
<td>Geranyl Pyrophosphate</td>
<td>GPP</td>
<td>Monoterpene</td>
<td>IPP + DMAPP (prenyl transferase)</td>
</tr>
<tr>
<td>C15</td>
<td>Farnesyl Pyrophosphate</td>
<td>FPP</td>
<td>Sesquiterpene</td>
<td>GPP + IPP</td>
</tr>
<tr>
<td>C20</td>
<td>Geranyl Geranyl Pyrophosphate</td>
<td>GGPP</td>
<td>Diterpene</td>
<td>FPP + IPP</td>
</tr>
<tr>
<td>C25</td>
<td>Geranyl Farnesyl Pyrophosphate</td>
<td>β</td>
<td>Sesterterpene</td>
<td>GGPP + IPP</td>
</tr>
<tr>
<td>C30</td>
<td>Squalene (triterpene)</td>
<td>β</td>
<td>Triterpene β Steroids</td>
<td>Tail-to-tail: 2 Γ FPP (C15)</td>
</tr>
<tr>
<td>C40</td>
<td>Tetraterpene</td>
<td>β</td>
<td>Tetraterpene β Carotenoids</td>
<td>Tail-to-tail: 2 Γ GGPP (C20)</td>
</tr>
</tbody>
</table>
<!-- PRODUCT CARDS -->
<div class="section-title">π Final Products at a Glance</div>
<div class="products-grid">
<div class="product-card c10">
<div class="carbons">C10</div>
<div class="name">GPP</div>
<div class="type">Monoterpenes<br>(e.g. menthol, camphor)</div>
</div>
<div class="product-card c15">
<div class="carbons">C15</div>
<div class="name">FPP</div>
<div class="type">Sesquiterpenes<br>(e.g. farnesol)</div>
</div>
<div class="product-card c20">
<div class="carbons">C20</div>
<div class="name">GGPP</div>
<div class="type">Diterpenes<br>(e.g. Vit K, gibberellins)</div>
</div>
<div class="product-card c25">
<div class="carbons">C25</div>
<div class="name">Sesterterpenes</div>
<div class="type">Rare terpenoids</div>
</div>
<div class="product-card c30">
<div class="carbons">C30</div>
<div class="name">Squalene</div>
<div class="type">Triterpenes β <b>Steroids</b><br>Cholesterol, hormones</div>
</div>
<div class="product-card c40">
<div class="carbons">C40</div>
<div class="name">Tetraterpene</div>
<div class="type">Carotenoids<br>(Ξ²-carotene, lycopene)</div>
</div>
</div>
<!-- KEY FACTS -->
<div class="section-title">π Key Facts to Remember</div>
<div class="facts-grid">
<div class="fact-box">
<h4>βοΈ Rate-limiting Enzyme</h4>
<p><b>HMG-CoA Reductase</b> β reduces HMG-CoA to Mevalonic acid. This is also the target of <b>Statin drugs</b> (cholesterol-lowering).</p>
</div>
<div class="fact-box">
<h4>π IPP vs DMAPP</h4>
<p>Both are C5 units. IPP (isopentenyl PP) is the active isoprene donor. DMAPP is the isomer β formed by isomerase. DMAPP is the "starter" unit that accepts IPP.</p>
</div>
<div class="fact-box">
<h4>β Tail-to-tail condensation</h4>
<p>C30 (squalene) = 2 Γ FPP joined <b>tail-to-tail</b><br>C40 (tetraterpene) = 2 Γ GGPP joined <b>tail-to-tail</b></p>
</div>
<div class="fact-box">
<h4>π¦ Products: 30,000+ biomolecules</h4>
<ul>
<li>Cholesterol & steroid hormones</li>
<li>Vitamin K, Coenzyme Q10</li>
<li>Carotenoids (Vit A precursors)</li>
<li>Essential oils (monoterpenes)</li>
<li>Rubber (polyisoprene)</li>
<li>Glycosides & alkaloids (with other pathways)</li>
</ul>
</div>
<div class="fact-box">
<h4>π·οΈ Other Names</h4>
<ul>
<li>Isoprenoid pathway</li>
<li>HMG-CoA reductase pathway</li>
<li>MVA pathway</li>
</ul>
</div>
<div class="fact-box">
<h4>𧬠Via Squalene</h4>
<p>The pathway works through IPP + DMAPP β via <b>squalene (C30)</b> to produce two skeleton types:<br>β
<b>Steroids</b><br>β
<b>Triterpenoids</b></p>
</div>
</div>
<!-- MNEMONIC -->
<div class="mnemonic">
<h3>π§ Mnemonic β Remember the Steps: "A Auntie Hmm Mamma IPP DMAPP Goes Far Getting Squalene"</h3>
<div class="mnemonic-letters">
<div class="ml"><b>A</b>cetyl CoA</div>
<div class="ml">+<b>A</b>cetyl CoA β Acetoacetyl CoA</div>
<div class="ml"><b>H</b>MG-CoA</div>
<div class="ml"><b>M</b>evalonic Acid</div>
<div class="ml"><b>I</b>PP (C5)</div>
<div class="ml"><b>D</b>MAPP (C5)</div>
<div class="ml"><b>G</b>PP (C10) β Mono</div>
<div class="ml"><b>F</b>PP (C15) β Sesqui</div>
<div class="ml"><b>G</b>GPP (C20) β Di</div>
<div class="ml"><b>S</b>qualene (C30) β Tri β Steroids</div>
</div>
</div>
<footer>π AcetateβMevalonate Pathway Study Notes | Made for easy learning</footer>
</body>
</html>
cd /tmp/workspace/mevalonate-notes && python3 -c " from reportlab.lib.pagesizes import A4 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib import colors from reportlab.lib.units import cm from reportlab.lib.enums import TA_CENTER, TA_LEFT doc = SimpleDocTemplate('notes.pdf', pagesize=A4, rightMargin=1.8*cm, leftMargin=1.8*cm, topMargin=1.8*cm, bottomMargin=1.8*cm) styles = getSampleStyleSheet() PURPLE = colors.HexColor('#7b2ff7') LIGHT_PURPLE = colors.HexColor('#ede7ff') DARK = colors.HexColor('#1a1a2e') RED = colors.HexColor('#e74c3c') ORANGE = colors.HexColor('#e67e22') GREEN = colors.HexColor('#2ecc71') TEAL = colors.HexColor('#1abc9c') BLUE = colors.HexColor('#3498db') DARK_PURPLE = colors.HexColor('#9b59b6') YELLOW_BG = colors.HexColor('#fff9e6') GOLD = colors.HexColor('#d68910') def h(text, size=14, color=PURPLE, bg=None, center=True): align = TA_CENTER if center else TA_LEFT style = ParagraphStyle('hdr', fontSize=size, textColor=color, fontName='Helvetica-Bold', alignment=align, spaceAfter=4, spaceBefore=6, backColor=bg or colors.white, borderPad=6 if bg else 0) return Paragraph(text, style) def p(text, size=9, color=DARK, left=False): style = ParagraphStyle('para', fontSize=size, textColor=color, fontName='Helvetica', spaceAfter=3, spaceBefore=2, alignment=TA_LEFT if left else TA_CENTER, leading=13) return Paragraph(text, style) def bold(text, size=9, color=PURPLE): style = ParagraphStyle('bold', fontSize=size, textColor=color, fontName='Helvetica-Bold', spaceAfter=3, alignment=TA_LEFT, leading=13) return Paragraph(text, style) story = [] # === TITLE === title_data = [[Paragraph('<b>πΏ Acetate β Mevalonate Pathway</b><br/><font size=9 color=white>Isoprenoid / HMG-CoA Reductase Pathway</font>', ParagraphStyle('title', fontSize=18, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER, leading=24))]] title_table = Table(title_data, colWidths=[17*cm]) title_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), PURPLE), ('ROUNDEDCORNERS', [10,10,10,10]), ('TOPPADDING', (0,0), (-1,-1), 16), ('BOTTOMPADDING', (0,0), (-1,-1), 16), ('LEFTPADDING', (0,0), (-1,-1), 16), ])) story.append(title_table) story.append(Spacer(1, 14)) # === OVERVIEW ROW === overview = [ [Paragraph('<b>WHERE?</b><br/>Eukaryotes, Archaea, some Bacteria', ParagraphStyle('ov', fontSize=8, fontName='Helvetica', alignment=TA_CENTER, leading=12, textColor=DARK))], [Paragraph('<b>STARTS WITH</b><br/>Acetyl CoA', ParagraphStyle('ov', fontSize=8, fontName='Helvetica', alignment=TA_CENTER, leading=12, textColor=DARK))], [Paragraph('<b>KEY UNITS</b><br/>IPP + DMAPP (C5 each)', ParagraphStyle('ov', fontSize=8, fontName='Helvetica', alignment=TA_CENTER, leading=12, textColor=DARK))], [Paragraph('<b>PRODUCTS</b><br/>30,000+ biomolecules', ParagraphStyle('ov', fontSize=8, fontName='Helvetica', alignment=TA_CENTER, leading=12, textColor=DARK))], ] ov_table = Table([overview[0:2], overview[2:4]] if False else [overview], colWidths=[4.1*cm]*4) ov_table = Table([overview], colWidths=[4.1*cm]*4) ov_table.setStyle(TableStyle([ ('BOX', (0,0), (-1,-1), 1, LIGHT_PURPLE), ('INNERGRID', (0,0), (-1,-1), 0.5, LIGHT_PURPLE), ('BACKGROUND', (0,0), (-1,-1), colors.white), ('TOPPADDING', (0,0), (-1,-1), 10), ('BOTTOMPADDING', (0,0), (-1,-1), 10), ('LEFTPADDING', (0,0), (-1,-1), 8), ('RIGHTPADDING', (0,0), (-1,-1), 8), ('LINEBELOW', (0,0), (-1,0), 3, PURPLE), ])) story.append(ov_table) story.append(Spacer(1, 12)) # === SECTION TITLE === def section_title(text): t = Table([[Paragraph(f'<b>{text}</b>', ParagraphStyle('st', fontSize=11, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_LEFT))]], colWidths=[17*cm]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), PURPLE), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ('LEFTPADDING', (0,0), (-1,-1), 12), ])) return t # === PATHWAY FLOWCHART TABLE === story.append(section_title('βοΈ Step-by-Step Pathway Flowchart')) story.append(Spacer(1, 8)) ps = ParagraphStyle('fc', fontSize=8, fontName='Helvetica', alignment=TA_LEFT, leading=12, textColor=DARK) ps_bold = ParagraphStyle('fcb', fontSize=9, fontName='Helvetica-Bold', alignment=TA_LEFT, leading=13, textColor=DARK) ps_label = ParagraphStyle('fclbl', fontSize=7.5, fontName='Helvetica-Bold', alignment=TA_LEFT, textColor=colors.white) def flow_row(step_num, step_color, compound, detail, arrow_label=''): step_cell = Paragraph(f'<b>Step {step_num}</b>', ParagraphStyle('sl', fontSize=8, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER)) compound_cell = Paragraph(f'<b>{compound}</b>', ps_bold) detail_cell = Paragraph(detail, ps) return step_cell, compound_cell, detail_cell, step_color steps = [ (1, RED, 'Acetyl CoA (C2)', 'From pyruvic acid (end product of glycolysis)'), (2, ORANGE, 'Acetoacetyl CoA (C4)', 'Claisen condensation of 2Γ Acetyl CoA'), (3, colors.HexColor('#f39c12'), 'HMG-CoA (C6)', 'Ξ²-Hydroxy Ξ²-Methylglutaryl CoA β 3rd Acetyl CoA added by aldol addition'), (4, GREEN, 'Mevalonic Acid (C6)', 'HMG-CoA reductase (RATE-LIMITING) reduces HMG-CoA β KEY PRECURSOR for terpenoids'), (5, TEAL, 'Mevalonic Acid Diphosphate', 'ATP-mediated phosphorylation of mevalonic acid'), (6, BLUE, 'IPP β Isopentenyl Pyrophosphate (C5)', 'Decarboxylation gives 1st isoprene unit'), (7, DARK_PURPLE, 'DMAPP β Dimethylallyl Pyrophosphate (C5)', 'Isomerase converts IPP β DMAPP (2nd isoprene unit)'), (8, colors.HexColor('#e91e63'), 'GPP β Geranyl Pyrophosphate (C10)', 'IPP + DMAPP via prenyl transferase β start of chain elongation'), ] arrow_labels = [ 'Claisen Condensation', 'Aldol Addition (3rd Acetyl CoA)', 'Reduction by HMG-CoA Reductase β', 'ATP-mediated Phosphorylation', 'Decarboxylation', 'Isomerase Enzyme', 'Electrophilic Addition (Prenyl Transferase)', '', ] flow_data = [] for i, (num, color, compound, detail) in enumerate(steps): step_cell = Paragraph(f'<b>Step {num}</b>', ParagraphStyle('sl', fontSize=8, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER)) compound_p = Paragraph(f'<b>{compound}</b>', ps_bold) detail_p = Paragraph(detail, ps) flow_data.append([step_cell, compound_p, detail_p]) if i < len(steps)-1 and arrow_labels[i]: arrow_p = Paragraph(f'β {arrow_labels[i]}', ParagraphStyle('ar', fontSize=7.5, fontName='Helvetica-Oblique', textColor=PURPLE, alignment=TA_CENTER)) flow_data.append(['', arrow_p, '']) flow_table = Table(flow_data, colWidths=[1.5*cm, 6.5*cm, 9*cm]) ts = TableStyle([ ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ('RIGHTPADDING', (0,0), (-1,-1), 6), ('GRID', (0,0), (-1,-1), 0.3, colors.HexColor('#e0d4ff')), ]) # Color step number cells step_row_indices = [0, 2, 4, 6, 8, 10, 12, 14] # every other row (actual step rows) colors_list = [RED, ORANGE, colors.HexColor('#f39c12'), GREEN, TEAL, BLUE, DARK_PURPLE, colors.HexColor('#e91e63')] for idx, (row_i, col) in enumerate(zip(step_row_indices, colors_list)): ts.add('BACKGROUND', (0, row_i), (0, row_i), col) ts.add('BACKGROUND', (1, row_i), (2, row_i), colors.HexColor('#fafafa')) # arrow rows if row_i + 1 < len(flow_data): ts.add('BACKGROUND', (0, row_i+1), (2, row_i+1), LIGHT_PURPLE) ts.add('SPAN', (1, row_i+1), (2, row_i+1)) flow_table.setStyle(ts) story.append(flow_table) story.append(Spacer(1, 14)) # === CHAIN ELONGATION TABLE === story.append(section_title('π Chain Elongation β Adding IPP Units')) story.append(Spacer(1, 8)) chain_headers = [ Paragraph('<b>Carbons</b>', ParagraphStyle('th', fontSize=9, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER)), Paragraph('<b>Compound</b>', ParagraphStyle('th', fontSize=9, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER)), Paragraph('<b>Abbrev.</b>', ParagraphStyle('th', fontSize=9, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER)), Paragraph('<b>Terpene Class</b>', ParagraphStyle('th', fontSize=9, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER)), Paragraph('<b>Formation</b>', ParagraphStyle('th', fontSize=9, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER)), ] chain_rows = [ ['C5', 'IPP / DMAPP', 'IPP/DMAPP', 'Hemiterpene', 'From mevalonic acid'], ['C10', 'Geranyl Pyrophosphate', 'GPP', 'Monoterpene', 'IPP + DMAPP'], ['C15', 'Farnesyl Pyrophosphate', 'FPP', 'Sesquiterpene', 'GPP + IPP'], ['C20', 'Geranyl Geranyl PP', 'GGPP', 'Diterpene', 'FPP + IPP'], ['C25', 'Geranyl Farnesyl PP', 'β', 'Sesterterpene', 'GGPP + IPP'], ['C30', 'Squalene', 'β', 'Triterpene β Steroids', '2 Γ FPP (tail-to-tail)'], ['C40', 'Tetraterpene', 'β', 'Tetraterpene β Carotenoids', '2 Γ GGPP (tail-to-tail)'], ] p8 = ParagraphStyle('td', fontSize=8, fontName='Helvetica', alignment=TA_CENTER, leading=11) p8l = ParagraphStyle('tdl', fontSize=8, fontName='Helvetica', alignment=TA_LEFT, leading=11) chain_data = [chain_headers] for row in chain_rows: chain_data.append([Paragraph(row[i], p8l if i > 0 else p8) for i in range(5)]) chain_table = Table(chain_data, colWidths=[1.6*cm, 5*cm, 2.2*cm, 4*cm, 4.2*cm]) row_colors = [BLUE, colors.HexColor('#1a73c8'), GREEN, ORANGE, DARK_PURPLE, RED, TEAL] chain_ts = TableStyle([ ('BACKGROUND', (0,0), (-1,0), PURPLE), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ddd')), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 6), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, LIGHT_PURPLE]), ]) for i, c in enumerate(row_colors): chain_ts.add('TEXTCOLOR', (0, i+1), (0, i+1), c) chain_ts.add('FONTNAME', (0, i+1), (0, i+1), 'Helvetica-Bold') chain_table.setStyle(chain_ts) story.append(chain_table) story.append(Spacer(1, 14)) # === KEY FACTS === story.append(section_title('π Key Facts to Remember')) story.append(Spacer(1, 8)) facts = [ ('β Rate-limiting Enzyme', 'HMG-CoA Reductase β reduces HMG-CoA to Mevalonic acid.\nTarget of STATIN drugs (cholesterol lowering!)', RED), ('π IPP vs DMAPP', 'Both C5 units. IPP = active isoprene donor.\nDMAPP = isomer via isomerase. DMAPP is the starter unit.', BLUE), ('π Tail-to-tail condensation', 'C30 Squalene = 2 Γ FPP (tail-to-tail)\nC40 Tetraterpene = 2 Γ GGPP (tail-to-tail)', GREEN), ('πΏ 30,000+ Products', 'Cholesterol, Vit K, CoQ10, Steroids, Carotenoids,\nEssential oils, Alkaloids, Rubber', PURPLE), ('π Other names', 'Isoprenoid pathway\nHMG-CoA reductase pathway\nMVA pathway', ORANGE), ('𧬠Via Squalene', 'IPP + DMAPP β Squalene (C30) β produces\nβ’ Steroids β’ Triterpenoids', TEAL), ] fact_data = [] row = [] for i, (title, body, color) in enumerate(facts): cell_content = Paragraph(f'<b><font color=\"#{color.hexval()[1:]}\">{title}</font></b><br/><font size=8>{body.replace(chr(10), \"<br/>\")}</font>', ParagraphStyle('fact', fontSize=8.5, fontName='Helvetica', leading=13, leftIndent=4)) row.append(cell_content) if len(row) == 2: fact_data.append(row) row = [] if row: row.append('') fact_data.append(row) fact_table = Table(fact_data, colWidths=[8.3*cm, 8.7*cm]) fact_ts = TableStyle([ ('BOX', (0,0), (-1,-1), 0.5, colors.HexColor('#ddd')), ('INNERGRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ddd')), ('BACKGROUND', (0,0), (-1,-1), colors.white), ('ROWBACKGROUNDS', (0,0), (-1,-1), [colors.white, LIGHT_PURPLE]), ('TOPPADDING', (0,0), (-1,-1), 10), ('BOTTOMPADDING', (0,0), (-1,-1), 10), ('LEFTPADDING', (0,0), (-1,-1), 10), ('VALIGN', (0,0), (-1,-1), 'TOP'), ]) fact_table.setStyle(fact_ts) story.append(fact_table) story.append(Spacer(1, 14)) # === MNEMONIC === story.append(section_title('π§ Mnemonic β Remember the Steps')) story.append(Spacer(1, 8)) mnemonic_items = [ ('A', 'cetyl CoA', RED), ('A', 'cetoacetyl CoA', ORANGE), ('H', 'MG-CoA', colors.HexColor('#f39c12')), ('M', 'evalonic Acid', GREEN), ('I', 'PP (C5)', TEAL), ('D', 'MAPP (C5)', BLUE), ('G', 'PP C10 Monoterpene', DARK_PURPLE), ('F', 'PP C15 Sesqui', colors.HexColor('#e91e63')), ('G', 'GPP C20 Diterpene', RED), ('S', 'qualene C30 β Steroids', PURPLE), ] mn_row = [] mn_data = [] for letter, rest, color in mnemonic_items: cell = Paragraph(f'<font color=\"#{color.hexval()[1:]}\" size=14><b>{letter}</b></font><font size=8>{rest}</font>', ParagraphStyle('mn', fontName='Helvetica', alignment=TA_CENTER, leading=18)) mn_row.append(cell) if len(mn_row) == 5: mn_data.append(mn_row) mn_row = [] if mn_row: while len(mn_row) < 5: mn_row.append('') mn_data.append(mn_row) mn_table = Table(mn_data, colWidths=[3.3*cm]*5) mn_table.setStyle(TableStyle([ ('BOX', (0,0), (-1,-1), 1, GOLD), ('INNERGRID', (0,0), (-1,-1), 0.5, LIGHT_PURPLE), ('BACKGROUND', (0,0), (-1,-1), YELLOW_BG), ('TOPPADDING', (0,0), (-1,-1), 10), ('BOTTOMPADDING', (0,0), (-1,-1), 10), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ])) story.append(mn_table) story.append(Spacer(1, 10)) footer_p = Paragraph('<i>Acetate-Mevalonate Pathway Study Notes | Made for easy learning</i>', ParagraphStyle('footer', fontSize=7.5, textColor=colors.grey, alignment=TA_CENTER)) story.append(footer_p) doc.build(story) print('PDF created successfully!') "
python3 -c " from reportlab.lib import colors c = colors.HexColor('#e74c3c') print(repr(c.hexval())) print(repr(c.hexval().lstrip('0x'))) # Better way print(repr(c.hexcode)) "
cd /tmp/workspace/mevalonate-notes && python3 << 'PYEOF' from reportlab.lib.pagesizes import A4 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle from reportlab.lib.styles import ParagraphStyle from reportlab.lib import colors from reportlab.lib.units import cm from reportlab.lib.enums import TA_CENTER, TA_LEFT doc = SimpleDocTemplate('notes.pdf', pagesize=A4, rightMargin=1.8*cm, leftMargin=1.8*cm, topMargin=1.8*cm, bottomMargin=1.8*cm) PURPLE = colors.HexColor('#7b2ff7') LP = colors.HexColor('#ede7ff') DARK = colors.HexColor('#1a1a2e') RED = colors.HexColor('#e74c3c') ORANGE = colors.HexColor('#e67e22') GOLD_C = colors.HexColor('#f39c12') GREEN = colors.HexColor('#27ae60') TEAL = colors.HexColor('#1abc9c') BLUE = colors.HexColor('#2980b9') DPURPLE = colors.HexColor('#8e44ad') PINK = colors.HexColor('#e91e63') YELLOW_B = colors.HexColor('#fff9e6') GOLD = colors.HexColor('#d68910') # helper to get hex string safe for ReportLab inline markup def hx(col): return col.hexval().replace('0x','') story = [] # ββ TITLE ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ title_para = Paragraph( '<b>Acetate - Mevalonate Pathway</b><br/>' '<font size="9">Isoprenoid / HMG-CoA Reductase Pathway</font>', ParagraphStyle('T', fontSize=18, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_CENTER, leading=26)) t = Table([[title_para]], colWidths=[17*cm]) t.setStyle(TableStyle([ ('BACKGROUND',(0,0),(-1,-1),PURPLE), ('TOPPADDING',(0,0),(-1,-1),16),('BOTTOMPADDING',(0,0),(-1,-1),16), ('LEFTPADDING',(0,0),(-1,-1),14), ])) story += [t, Spacer(1,12)] # ββ OVERVIEW ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ov_s = ParagraphStyle('ov', fontSize=8, fontName='Helvetica', alignment=TA_CENTER, leading=13, textColor=DARK) ov_data = [[ Paragraph('<b>WHERE?</b><br/>Eukaryotes, Archaea,<br/>some Bacteria', ov_s), Paragraph('<b>STARTS WITH</b><br/>Acetyl CoA<br/>(from pyruvic acid)', ov_s), Paragraph('<b>KEY C5 UNITS</b><br/>IPP<br/>DMAPP', ov_s), Paragraph('<b>30,000+ PRODUCTS</b><br/>Cholesterol, Vit K,<br/>CoQ10, Steroids', ov_s), ]] ov = Table(ov_data, colWidths=[4.2*cm]*4) ov.setStyle(TableStyle([ ('GRID',(0,0),(-1,-1),1,LP), ('BACKGROUND',(0,0),(-1,-1),colors.white), ('TOPPADDING',(0,0),(-1,-1),10),('BOTTOMPADDING',(0,0),(-1,-1),10), ('LINEBELOW',(0,0),(-1,0),3,PURPLE), ])) story += [ov, Spacer(1,12)] # ββ SECTION HEADER helper ββββββββββββββββββββββββββββββββββββββββββββββββββ def sec(text): p = Paragraph(f'<b>{text}</b>', ParagraphStyle('sh', fontSize=11, textColor=colors.white, fontName='Helvetica-Bold', alignment=TA_LEFT)) t = Table([[p]], colWidths=[17*cm]) t.setStyle(TableStyle([ ('BACKGROUND',(0,0),(-1,-1),PURPLE), ('TOPPADDING',(0,0),(-1,-1),8),('BOTTOMPADDING',(0,0),(-1,-1),8), ('LEFTPADDING',(0,0),(-1,-1),12), ])) return t # ββ FLOWCHART ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ story += [sec('Step-by-Step Pathway Flowchart'), Spacer(1,8)] step_data = [ (RED, 1, 'Acetyl CoA (C2)', 'Produced from pyruvic acid - end product of glycolysis', 'Claisen Condensation x2'), (ORANGE, 2, 'Acetoacetyl CoA (C4)', 'Two molecules of Acetyl CoA condense', 'Aldol Addition (3rd Acetyl CoA)'), (GOLD_C, 3, 'HMG-CoA (C6) - beta-Hydroxy beta-Methylglutaryl CoA', '3rd Acetyl CoA added by aldol addition', 'HMG-CoA Reductase [RATE-LIMITING STEP]'), (GREEN, 4, 'Mevalonic Acid (C6) KEY PRECURSOR', 'Main precursor for all terpenoid biosynthesis - target of STATINS', 'ATP-mediated Phosphorylation'), (TEAL, 5, 'Mevalonic Acid Diphosphate', 'Phosphorylated form of mevalonic acid', 'Decarboxylation'), (BLUE, 6, 'IPP - Isopentenyl Pyrophosphate (C5)', '1st active isoprene unit formed', 'Isomerase Enzyme'), (DPURPLE,7, 'DMAPP - Dimethylallyl Pyrophosphate (C5)', '2nd isoprene unit; IPP converted to DMAPP by isomerase', 'Electrophilic Addition via Prenyl Transferase'), (PINK, 8, 'GPP - Geranyl Pyrophosphate (C10)', 'IPP + DMAPP joined - precursor for Monoterpenes', ''), ] ps8 = ParagraphStyle('f8', fontSize=8, fontName='Helvetica', alignment=TA_LEFT, leading=12) ps9b = ParagraphStyle('f9b', fontSize=9, fontName='Helvetica-Bold', alignment=TA_LEFT, leading=13) ps7i = ParagraphStyle('f7i', fontSize=7.5,fontName='Helvetica-Oblique',alignment=TA_CENTER, textColor=PURPLE, leading=11) psw = ParagraphStyle('fw', fontSize=8.5, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER) rows = [] ts = TableStyle([ ('VALIGN',(0,0),(-1,-1),'MIDDLE'), ('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5), ('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7), ('GRID',(0,0),(-1,-1),0.3,colors.HexColor('#e0d4ff')), ]) for idx,(col, num, comp, detail, arrow) in enumerate(step_data): r = idx * 2 rows.append([Paragraph(f'<b>Step {num}</b>',psw), Paragraph(f'<b>{comp}</b>',ps9b), Paragraph(detail,ps8)]) ts.add('BACKGROUND',(0,r),(0,r),col) ts.add('BACKGROUND',(1,r),(2,r),colors.white) if arrow: rows.append(['', Paragraph(f' {arrow}',ps7i),'']) ts.add('BACKGROUND',(0,r+1),(2,r+1),LP) ts.add('SPAN',(1,r+1),(2,r+1)) ft = Table(rows, colWidths=[1.6*cm, 7*cm, 8.4*cm]) ft.setStyle(ts) story += [ft, Spacer(1,14)] # ββ CHAIN ELONGATION TABLE βββββββββββββββββββββββββββββββββββββββββββββββββ story += [sec('Chain Elongation - Adding IPP Units'), Spacer(1,8)] thdr = ParagraphStyle('th', fontSize=9, fontName='Helvetica-Bold', textColor=colors.white, alignment=TA_CENTER) tcel = ParagraphStyle('tc', fontSize=8, fontName='Helvetica', alignment=TA_LEFT, leading=12) tcen = ParagraphStyle('tcc', fontSize=8, fontName='Helvetica', alignment=TA_CENTER, leading=12) tcb = ParagraphStyle('tcb', fontSize=8.5, fontName='Helvetica-Bold', alignment=TA_CENTER, leading=12) chain_hdr = [Paragraph(x,thdr) for x in ['Carbons','Compound','Abbrev.','Terpene Class','Formation']] chain_body = [ ('C5', 'IPP / DMAPP', 'IPP/DMAPP', 'Hemiterpene', 'From mevalonic acid'), ('C10', 'Geranyl Pyrophosphate', 'GPP', 'Monoterpene', 'IPP + DMAPP'), ('C15', 'Farnesyl Pyrophosphate', 'FPP', 'Sesquiterpene', 'GPP + IPP'), ('C20', 'Geranyl Geranyl PP', 'GGPP', 'Diterpene', 'FPP + IPP'), ('C25', 'Geranyl Farnesyl PP', '-', 'Sesterterpene', 'GGPP + IPP'), ('C30', 'Squalene', '-', 'Triterpene -> Steroids', '2 x FPP (tail-to-tail)'), ('C40', 'Tetraterpene', '-', 'Tetraterpene -> Carotenoids','2 x GGPP (tail-to-tail)'), ] cb_colors = [BLUE,BLUE,GREEN,ORANGE,DPURPLE,RED,TEAL] ctable_data = [chain_hdr] for row in chain_body: ctable_data.append([Paragraph(x, tcel if i>0 else tcen) for i,x in enumerate(row)]) ct = Table(ctable_data, colWidths=[1.6*cm,5.1*cm,2.2*cm,3.8*cm,4.3*cm]) cts = TableStyle([ ('BACKGROUND',(0,0),(-1,0),PURPLE), ('GRID',(0,0),(-1,-1),0.5,colors.HexColor('#ddd')), ('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6), ('LEFTPADDING',(0,0),(-1,-1),6), ('ROWBACKGROUNDS',(0,1),(-1,-1),[colors.white,LP]), ]) for i,c in enumerate(cb_colors): cts.add('TEXTCOLOR',(0,i+1),(0,i+1),c) cts.add('FONTNAME',(0,i+1),(0,i+1),'Helvetica-Bold') ct.setStyle(cts) story += [ct, Spacer(1,14)] # ββ KEY FACTS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ story += [sec('Key Facts to Remember'), Spacer(1,8)] fact_s = ParagraphStyle('fa', fontSize=8.5, fontName='Helvetica', alignment=TA_LEFT, leading=14) facts = [ ('<b>Rate-limiting Enzyme</b><br/>HMG-CoA Reductase reduces HMG-CoA to Mevalonic acid.<br/>Target of STATIN drugs (cholesterol-lowering).', RED), ('<b>IPP vs DMAPP</b><br/>Both C5. IPP = active isoprene donor.<br/>DMAPP = isomer via isomerase. DMAPP is the starter unit.', BLUE), ('<b>Tail-to-tail condensation</b><br/>C30 Squalene = 2 x FPP (tail-to-tail)<br/>C40 Tetraterpene = 2 x GGPP (tail-to-tail)', GREEN), ('<b>30,000+ Products</b><br/>Cholesterol, Vit K, CoQ10, Steroids,<br/>Carotenoids, Essential oils, Alkaloids', PURPLE), ('<b>Other names</b><br/>Isoprenoid pathway<br/>MVA pathway<br/>HMG-CoA reductase pathway', ORANGE), ('<b>Via Squalene</b><br/>IPP+DMAPP -> Squalene(C30)<br/>-> Steroids and Triterpenoids', TEAL), ] fact_rows = [] for i in range(0,len(facts),2): r = [] for j in range(2): if i+j < len(facts): txt, col = facts[i+j] r.append(Paragraph(txt, fact_s)) else: r.append('') fact_rows.append(r) fact_table = Table(fact_rows, colWidths=[8.4*cm, 8.6*cm]) fts = TableStyle([ ('BOX',(0,0),(-1,-1),0.5,colors.HexColor('#ddd')), ('INNERGRID',(0,0),(-1,-1),0.5,colors.HexColor('#ddd')), ('ROWBACKGROUNDS',(0,0),(-1,-1),[colors.white,LP]), ('TOPPADDING',(0,0),(-1,-1),10),('BOTTOMPADDING',(0,0),(-1,-1),10), ('LEFTPADDING',(0,0),(-1,-1),10),('VALIGN',(0,0),(-1,-1),'TOP'), ]) # left border colour per row for i,(txt,col) in enumerate(facts): row = i // 2 col_idx = i % 2 fts.add('LINEAFTER' if col_idx==0 else 'LINEBEFORE', (col_idx,row),(col_idx,row),4,col) fact_table.setStyle(fts) story += [fact_table, Spacer(1,14)] # ββ MNEMONIC βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ story += [sec('Mnemonic - Remember the Steps'), Spacer(1,8)] items = [ ('A','cetyl CoA', RED), ('A','cetoacetyl CoA', ORANGE), ('H','MG-CoA', GOLD_C), ('M','evalonic Acid', GREEN), ('I','PP (C5)', TEAL), ('D','MAPP (C5)', BLUE), ('G','PP C10 Mono', DPURPLE), ('F','PP C15 Sesqui', PINK), ('G','GPP C20 Di', RED), ('S','qualene C30 Steroids',PURPLE), ] mn_style = ParagraphStyle('mn', fontName='Helvetica', alignment=TA_CENTER, leading=20) mn_rows = [] row = [] for letter, rest, col in items: cell = Paragraph(f'<font size="16"><b>{letter}</b></font><font size="8">{rest}</font>', mn_style) row.append(cell) if len(row) == 5: mn_rows.append(row); row = [] if row: while len(row)<5: row.append('') mn_rows.append(row) mn_t = Table(mn_rows, colWidths=[3.3*cm]*5) mn_t.setStyle(TableStyle([ ('BOX',(0,0),(-1,-1),2,GOLD), ('INNERGRID',(0,0),(-1,-1),0.5,LP), ('BACKGROUND',(0,0),(-1,-1),YELLOW_B), ('TOPPADDING',(0,0),(-1,-1),10),('BOTTOMPADDING',(0,0),(-1,-1),10), ('ALIGN',(0,0),(-1,-1),'CENTER'),('VALIGN',(0,0),(-1,-1),'MIDDLE'), ])) # Colour the first letter of each cell via text - already in markup, just set cell bg slightly story += [mn_t, Spacer(1,10)] footer = Paragraph('<i>Acetate-Mevalonate Pathway Study Notes | Easy Learning Edition</i>', ParagraphStyle('ft', fontSize=7.5, textColor=colors.grey, alignment=TA_CENTER)) story.append(footer) doc.build(story) print('PDF created successfully!') PYEOF
notes
PDF Document Β· PDF
notes
HTML File Β· HTML
| Step | Compound | Key Reaction |
|---|---|---|
| 1 | Acetyl CoA (C2) | From pyruvic acid (glycolysis) |
| 2 | Acetoacetyl CoA (C4) | Claisen condensation of 2Γ Acetyl CoA |
| 3 | HMG-CoA (C6) | Aldol addition of 3rd Acetyl CoA |
| 4 | Mevalonic Acid (C6) β | HMG-CoA Reductase - RATE-LIMITING |
| 5 | Mevalonic Acid Diphosphate | ATP-mediated phosphorylation |
| 6 | IPP (C5) | Decarboxylation - 1st isoprene unit |
| 7 | DMAPP (C5) | Isomerase converts IPP β DMAPP |
| 8 | GPP (C10) | IPP + DMAPP via prenyl transferase |