~/pharma-chem-flashcards/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Pharmaceutical Inorganic Chemistry — Flashcards";
pres.author = "Pharma Study";
// ─── COLOUR PALETTE ───────────────────────────────────────────────
// Dark navy bg, bright accent per unit, white card face
const PALETTE = {
bg: "0D1B2A", // deep navy
card: "162639", // slightly lighter card bg
accent: ["1ABC9C","F39C12","E74C3C","9B59B6","2980B9","27AE60","E67E22","C0392B","16A085","8E44AD"],
white: "FFFFFF",
cream: "F0F4F8",
label: "A8C0D6", // muted blue-gray for "TERM" label
ans: "E8F8F5", // pale green tint for answer text
};
// unit color mapping (index 0-9 for units 1-10)
function unitColor(u) { return PALETTE.accent[u % PALETTE.accent.length]; }
// ─── HELPERS ──────────────────────────────────────────────────────
function titleSlide(title, subtitle) {
const slide = pres.addSlide();
// full background
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: PALETTE.bg }, line:{ color: PALETTE.bg } });
// accent bar left
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.18, h:5.625, fill:{ color: "1ABC9C" }, line:{ color:"1ABC9C" } });
// main title
slide.addText(title, {
x:0.5, y:1.5, w:9, h:1.2,
fontSize:36, bold:true, color: PALETTE.white, fontFace:"Calibri", align:"center"
});
slide.addText(subtitle, {
x:0.5, y:2.9, w:9, h:0.7,
fontSize:18, color: PALETTE.label, fontFace:"Calibri", align:"center", italic:true
});
}
function unitDivider(unitNum, unitTitle, color) {
const slide = pres.addSlide();
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: PALETTE.bg }, line:{ color: PALETTE.bg } });
// large accent stripe
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:1.1, fill:{ color }, line:{ color } });
// unit number badge
slide.addText(`UNIT ${unitNum}`, {
x:0.4, y:0.15, w:2.5, h:0.75,
fontSize:22, bold:true, color: PALETTE.bg, fontFace:"Calibri", align:"left"
});
slide.addText(unitTitle, {
x:0.5, y:1.6, w:9, h:1.2,
fontSize:30, bold:true, color, fontFace:"Calibri", align:"center"
});
slide.addText("Flashcard Review", {
x:0.5, y:3.0, w:9, h:0.6,
fontSize:16, color: PALETTE.label, fontFace:"Calibri", align:"center", italic:true
});
}
// Flashcard: question on left half, answer on right half (side-by-side)
function flashcard(qLabel, question, answer, color, extra) {
const slide = pres.addSlide();
// full dark bg
slide.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: PALETTE.bg }, line:{ color: PALETTE.bg } });
// LEFT PANEL — question
slide.addShape(pres.shapes.RECTANGLE, { x:0.2, y:0.25, w:4.3, h:5.1,
fill:{ color: PALETTE.card }, line:{ color }, shadow:{ type:"outer", color:"000000", blur:8, offset:3, angle:135, opacity:0.3 } });
// color top bar on left card
slide.addShape(pres.shapes.RECTANGLE, { x:0.2, y:0.25, w:4.3, h:0.28, fill:{ color }, line:{ color } });
slide.addText("QUESTION", { x:0.3, y:0.28, w:4.1, h:0.22, fontSize:8, bold:true, color: PALETTE.bg, fontFace:"Calibri", align:"left", charSpacing:3 });
slide.addText(qLabel, { x:0.3, y:0.65, w:4.0, h:0.35, fontSize:11, color, bold:true, fontFace:"Calibri", align:"left" });
slide.addText(question, { x:0.3, y:1.1, w:3.9, h:3.9,
fontSize:17, color: PALETTE.white, fontFace:"Calibri", align:"left", valign:"middle", bold:false });
// RIGHT PANEL — answer
slide.addShape(pres.shapes.RECTANGLE, { x:4.8, y:0.25, w:4.9, h:5.1,
fill:{ color: "0A2236" }, line:{ color }, shadow:{ type:"outer", color:"000000", blur:8, offset:3, angle:135, opacity:0.3 } });
slide.addShape(pres.shapes.RECTANGLE, { x:4.8, y:0.25, w:4.9, h:0.28, fill:{ color }, line:{ color } });
slide.addText("ANSWER", { x:4.9, y:0.28, w:4.6, h:0.22, fontSize:8, bold:true, color: PALETTE.bg, fontFace:"Calibri", align:"left", charSpacing:3 });
slide.addText(answer, { x:4.9, y:0.65, w:4.6, h:4.5,
fontSize:14, color: PALETTE.cream, fontFace:"Calibri", align:"left", valign:"top" });
// optional extra (reaction box)
if (extra) {
// reaction strip at bottom of answer panel
slide.addShape(pres.shapes.RECTANGLE, { x:4.8, y:4.8, w:4.9, h:0.55,
fill:{ color }, line:{ color } });
slide.addText(extra, { x:4.9, y:4.82, w:4.7, h:0.48, fontSize:11, color: PALETTE.bg, bold:true, fontFace:"Courier New", align:"left", valign:"middle" });
}
}
// ════════════════════════════════════════════════════════════════════
// TITLE SLIDE
// ════════════════════════════════════════════════════════════════════
titleSlide("📚 Pharmaceutical Inorganic Chemistry", "Flashcard Study Deck • Units 1 – 10");
// ════════════════════════════════════════════════════════════════════
// UNIT 1 — General Principles
// ════════════════════════════════════════════════════════════════════
const c1 = unitColor(0);
unitDivider(1, "General Principles of Analysis", c1);
flashcard("Q1", "Define ERROR", "Error is the difference between the observed (measured) value and the true (accepted) value.\n\nError = Observed Value − True Value", c1, "e.g. True = 10.0 mL, Observed = 10.2 mL → Error = +0.2");
flashcard("Q2", "Difference between PRIMARY and SECONDARY Standard?",
"PRIMARY STANDARD:\n• Very high purity (≥99.9%)\n• Stable, does not need standardization\n• Examples: Oxalic acid, K₂Cr₂O₇, Na₂CO₃\n\nSECONDARY STANDARD:\n• Less pure, needs standardization\n• Examples: NaOH, KMnO₄, HCl", c1);
flashcard("Q3", "Define PRECISION and ACCURACY",
"PRECISION: Closeness of repeated measurements to each other (reproducibility).\nExample: 10.1, 10.1, 10.2 mL\n\nACCURACY: Closeness of a measurement to the true value.\nExample: True = 10.0 mL, Got = 10.0 mL\n\nTip: Precise ≠ Accurate. You can be precise but wrong!", c1);
flashcard("Q4", "Define SIGNIFICANT FIGURES",
"Significant figures are all certain digits plus one uncertain digit in a measured value.\n\nThey show the precision of a measurement.\n\nRules:\n• All non-zero digits are significant\n• Zeros between non-zeros are significant\n• Trailing zeros after decimal are significant\n\nExample: 25.34 mL → 4 significant figures", c1);
flashcard("Q5", "Define MOLALITY and MOLE FRACTION",
"MOLALITY (m):\nMoles of solute per kg of solvent\nm = moles of solute / kg of solvent\n\nMOLE FRACTION (X):\nRatio of moles of one component to total moles\nXₐ = nₐ / (nₐ + n_b)\n\nBoth are temperature-independent concentration units.", c1);
flashcard("Q6", "pH Range of Phenolphthalein and Methyl Orange",
"PHENOLPHTHALEIN:\npH range: 8.3 – 10.0\nColor change: Colorless → Pink\nUsed for: Strong acid + Strong base OR Weak acid + Strong base\n\nMETHYL ORANGE:\npH range: 3.1 – 4.4\nColor change: Red → Yellow\nUsed for: Strong acid + Weak base", c1);
flashcard("Q7", "Types of ERRORS with Examples",
"1. Constant Error: Same amount every reading\n e.g. Wrongly weighted standard\n\n2. Proportional Error: Increases with sample size\n e.g. Impure standard substance\n\n3. Random Error: Unpredictable, due to chance\n e.g. Different burette reading each time\n\n4. Systematic Error: Definite, reproducible cause\n e.g. Uncalibrated balance", c1);
// ════════════════════════════════════════════════════════════════════
// UNIT 2 — Acid-Base & Redox Titration
// ════════════════════════════════════════════════════════════════════
const c2 = unitColor(1);
unitDivider(2, "Acid-Base & Redox Titration", c2);
flashcard("Q1", "What is REDOX TITRATION?",
"A titration based on oxidation-reduction (redox) reactions between the titrant and the analyte.\n\nOne substance is oxidized while the other is reduced simultaneously.\n\nExample: FeSO₄ titrated with KMnO₄ in acidic medium.", c2, "Fe²⁺ → Fe³⁺ + e⁻ | Mn⁷⁺ + 5e⁻ → Mn²⁺");
flashcard("Q2", "Define OXIDATION and REDUCTION",
"OXIDATION:\n• Loss of electrons\n• Gain of oxygen / loss of hydrogen\n• Oxidation number INCREASES\nExample: Fe²⁺ → Fe³⁺ + e⁻\n\nREDUCTION:\n• Gain of electrons\n• Loss of oxygen / gain of hydrogen\n• Oxidation number DECREASES\nExample: Mn⁷⁺ + 5e⁻ → Mn²⁺\n\nMemory tip: OIL RIG (Oxidation Is Loss, Reduction Is Gain)", c2);
flashcard("Q3", "What is REDOX POTENTIAL?",
"Redox potential (electrode potential) is the tendency of a substance to gain or lose electrons, measured relative to the Standard Hydrogen Electrode (SHE = 0.00 V).\n\n• High positive value → strong oxidizing agent\n• High negative value → strong reducing agent\n\nExample: MnO₄⁻/Mn²⁺ = +1.51 V (strong oxidizer)", c2);
flashcard("Q4", "What is OXIDATION NUMBER?",
"The charge an atom would carry if all bonds were fully ionic (electrons given to the more electronegative atom).\n\nRules:\n• Free element = 0 (e.g. Fe, O₂)\n• Monatomic ion = its charge\n• O in compounds = −2 (except peroxides = −1)\n• H in compounds = +1\n\nExample: In KMnO₄ → Mn = +7", c2);
flashcard("Q5", "Applications of REDOX TITRATION",
"1. Assay of H₂O₂ (hydrogen peroxide) using KMnO₄\n2. Estimation of Fe²⁺ in ferrous sulfate tablets\n3. Estimation of Vitamin C (ascorbic acid) using iodine\n4. Determination of bleaching powder (available Cl)\n5. Assay of calcium gluconate (indirect)\n6. Estimation of oxalic acid using KMnO₄", c2);
flashcard("Q6", "Ostwald's Theory of Acid-Base Indicator",
"An acid-base indicator is a WEAK ACID or WEAK BASE that has different colors in its ionized and unionized forms.\n\nHIn ⇌ H⁺ + In⁻\n(color A) (color B)\n\nIn ACID medium → equilibrium shifts LEFT → color of HIn\nIn ALKALI medium → equilibrium shifts RIGHT → color of In⁻\n\nExample: Phenolphthalein (HIn = colorless, In⁻ = pink)", c2);
flashcard("Q7", "Define ALKALIMETRY TITRATION",
"Alkalimetry is the estimation of the strength of an ACID using a standard ALKALI (base) solution as the titrant.\n\nThe analyte is the acid; the titrant is the base.\n\nExample: Titration of HCl with standard NaOH\n\nReaction: HCl + NaOH → NaCl + H₂O", c2, "HCl + NaOH → NaCl + H₂O");
flashcard("Q8", "Define NORMALITY and MOLARITY",
"NORMALITY (N):\nNumber of gram equivalents of solute per liter of solution.\nN = gram equivalents / volume (L)\nRelated to reacting capacity.\n\nMOLARITY (M):\nNumber of moles of solute per liter of solution.\nM = moles / volume (L)\nRelated to formula weight.\n\nRelationship: N = M × n-factor", c2);
flashcard("Q9", "What is a WEAK BASE?",
"A weak base partially ionizes in water, producing only a small amount of OH⁻ ions. It establishes an equilibrium.\n\nNH₄OH ⇌ NH₄⁺ + OH⁻\n\nKb = [NH₄⁺][OH⁻] / [NH₄OH]\n\nSmall Kb → weak base\n\nOther examples: Pyridine, aniline, trimethylamine", c2, "NH₄OH ⇌ NH₄⁺ + OH⁻ (partial ionization)");
flashcard("Q10", "Types of NEUTRALIZATION Indicators",
"1. Phenolphthalein (pH 8.3–10.0)\n Colorless → Pink\n Used: Strong acid + Strong base\n\n2. Methyl Orange (pH 3.1–4.4)\n Red → Yellow\n Used: Strong acid + Weak base\n\n3. Methyl Red (pH 4.4–6.2)\n Red → Yellow\n Used: Strong acid + Weak base\n\n4. Litmus (pH 5–8)\n Red → Blue • General indicator", c2);
// ════════════════════════════════════════════════════════════════════
// UNIT 3 — Precipitation & Non-Aqueous
// ════════════════════════════════════════════════════════════════════
const c3 = unitColor(2);
unitDivider(3, "Precipitation & Non-Aqueous Titration", c3);
flashcard("Q1", "What is PRECIPITATION TITRATION?",
"A titration in which the analyte reacts with the titrant to form an INSOLUBLE PRECIPITATE. The endpoint is detected when precipitation is complete.\n\nAlso called argentometric titration when AgNO₃ is used.\n\nExample: NaCl + AgNO₃ → AgCl↓ (white ppt) + NaNO₃", c3, "Ag⁺ + Cl⁻ → AgCl↓ (white precipitate)");
flashcard("Q2", "What is NON-AQUEOUS TITRATION?",
"Titration carried out in NON-AQUEOUS SOLVENTS (not water) for substances that:\n• Are weak acids/bases — cannot be detected in water\n• Are insoluble in water\n• Show overlapping endpoints in water\n\nTitrant: Perchloric acid (HClO₄) in glacial acetic acid (for bases)\nExample: Aspirin titrated in glacial acetic acid", c3);
flashcard("Q3", "Principle of NON-AQUEOUS TITRATION",
"Based on LEVELING and DIFFERENTIATING effects of solvents.\n\nLeveling effect: Solvent enhances acidity/basicity of dissolved substances (all acids appear equally strong).\n\nDifferentiating effect: Solvent distinguishes between acids/bases of different strengths.\n\nGlacial acetic acid levels basic strength → sharp endpoint for weak bases using HClO₄.", c3);
flashcard("Q4", "Classification of SOLVENTS in Non-Aqueous Titration",
"1. PROTOPHILIC (Basic): Accept protons\n Examples: Pyridine, acetone, ethylenediamine\n\n2. PROTOGENIC (Acidic): Donate protons\n Examples: Glacial acetic acid, H₂SO₄\n\n3. APROTIC: Neither donate nor accept protons\n Examples: Benzene, chloroform, dioxane\n\n4. AMPHIPROTIC: Both donate and accept protons\n Examples: Ethanol, methanol, water", c3);
flashcard("Q5", "Fajans' Rules (Adsorption Indicator Method)",
"Used in argentometric titration with adsorption indicators (e.g., Fluorescein).\n\nBEFORE endpoint: Excess Cl⁻ adsorbed on AgCl ppt → indicator stays in solution (yellow-green).\n\nAT endpoint: Excess Ag⁺ adsorbed on ppt surface → fluorescein indicator adsorbs → COLOR CHANGES to pink/red.\n\nIndicator: Fluorescein / Dichlorofluorescein", c3);
flashcard("Q6", "Volhard's and Modified Volhard's Method",
"VOLHARD'S METHOD:\nIndirect method for Cl⁻, Br⁻, I⁻. Excess AgNO₃ added → back-titrated with NH₄SCN using ferric alum indicator.\nEndpoint: Red color (Fe(SCN)³)\n\nMODIFIED VOLHARD'S (for Chlorides):\nAgCl ppt is filtered OR coated with nitrobenzene before back-titration — prevents AgCl from reacting with SCN⁻ (AgCl more soluble than AgSCN).", c3, "Ag⁺ + SCN⁻ → AgSCN↓ | Fe³⁺ + 3SCN⁻ → Fe(SCN)₃ (red)");
// ════════════════════════════════════════════════════════════════════
// UNIT 4 — Complexometry
// ════════════════════════════════════════════════════════════════════
const c4 = unitColor(3);
unitDivider(4, "Complexometry", c4);
flashcard("Q1", "Methods in COMPLEXOMETRY",
"1. DIRECT TITRATION: Metal ion titrated directly with EDTA.\n Example: Ca²⁺ + EDTA → Ca-EDTA complex\n\n2. BACK TITRATION: Excess EDTA added, back-titrated with metal salt.\n\n3. INDIRECT TITRATION: Metal precipitated, dissolved, then titrated.\n\n4. SUBSTITUTION TITRATION: Metal displaces another from EDTA complex.\n\n5. ALKALIMETRIC TITRATION: H⁺ ions released on complexation titrated with NaOH.", c4);
flashcard("Q2", "Masking and Demasking Agents",
"MASKING AGENTS:\nPrevent a metal ion from reacting with EDTA WITHOUT removing it from solution.\nExample: KCN masks Zn²⁺, Cu²⁺, Ni²⁺, Co²⁺\nCa²⁺, Mg²⁺ are NOT masked → can be titrated selectively.\n\nDEMASKING AGENTS:\nRelease the masked metal back to react.\nExample: Formaldehyde demasks Zn²⁺ from Zn-CN complex\nChloroacetamide demasks Pb²⁺", c4);
flashcard("Q3", "Sequestering Agents",
"Substances that form STABLE, SOLUBLE complexes with metal ions, preventing them from reacting with other substances (keeping metal ions 'hidden' in solution).\n\nUsed to prevent interference by metal ions.\n\nExamples:\n• EDTA (ethylenediaminetetraacetic acid)\n• NTA (nitrilotriacetic acid)\n• Citric acid\n• Sodium hexametaphosphate\n• Tartaric acid", c4);
flashcard("Q4", "Chelating / Complexing Agents",
"Chelating agents are POLYDENTATE LIGANDS that form ring-like (cyclic) stable complexes called CHELATES with metal ions by donating 2 or more electron pairs.\n\nEDTA is the most important chelating agent — it is hexadentate (6 donor sites).\n\nChelate ring formation makes the complex extra stable.\n\nExample: EDTA forms a stable 5-membered ring with Ca²⁺\n\nOther examples: EGTA, NTA, DTPA, citric acid", c4);
// ════════════════════════════════════════════════════════════════════
// UNIT 5 — Gravimetry & Limit Tests
// ════════════════════════════════════════════════════════════════════
const c5 = unitColor(4);
unitDivider(5, "Gravimetry & Limit Tests", c5);
flashcard("Q1", "Define GRAVIMETRIC ANALYSIS",
"Quantitative analytical method in which the analyte is converted into a STABLE INSOLUBLE PRECIPITATE, which is filtered, washed, dried or ignited, and WEIGHED to calculate the amount present.\n\nBased on: Measurement by WEIGHT\n\nSteps:\n1. Dissolve sample\n2. Precipitate analyte\n3. Filter, wash, dry/ignite\n4. Weigh precipitate\n5. Calculate result", c5);
flashcard("Q2", "Coprecipitation and Post-Precipitation",
"COPRECIPITATION:\nContamination of a precipitate by foreign ions carried down WITH the desired precipitate during precipitation.\nExample: BaSO₄ carrying NO₃⁻ or Cl⁻\n\nMechanisms: Occlusion, adsorption, inclusion\n\nPOST-PRECIPITATION:\nA second substance precipitates ON TOP of the primary precipitate AFTER main precipitation.\nExample: MgC₂O₄ precipitating over CaC₂O₄\n\nBoth cause ERRORS → must be minimized.", c5);
flashcard("Q3", "Limitations of GRAVIMETRIC Analysis",
"1. Time-consuming — multiple steps (filter, dry, ignite, weigh)\n2. Not suitable for trace/micro amounts\n3. Errors due to coprecipitation and post-precipitation\n4. Requires skilled analyst\n5. Cannot be easily automated\n6. Only one analyte determined per analysis\n7. Volatile precipitates cause loss on ignition\n8. Hygroscopic precipitates absorb moisture", c5);
flashcard("Q4", "Sources of IMPURITIES in Pharmaceutical Substances",
"1. Raw materials used in manufacture\n2. Reagents and solvents used in synthesis\n3. Reaction intermediates and by-products\n4. Degradation products (during storage)\n5. Packaging materials (heavy metals from containers)\n6. Environmental contamination (dust, microbes)\n7. Improper storage conditions\n8. Cross-contamination during manufacture", c5);
flashcard("Q5", "Limit Test of CHLORIDES — Reaction",
"Based on reaction of chloride ions with silver nitrate in dilute nitric acid forming a WHITE TURBIDITY (AgCl precipitate).\n\nThe turbidity of test solution is compared with a standard chloride solution (1 ppm).\n\nCondition: Dilute HNO₃ medium (prevents interference from PO₄³⁻, CO₃²⁻, etc.)", c5, "Cl⁻ + AgNO₃ → AgCl↓ (white turbidity) + NO₃⁻");
flashcard("Q6", "Limit Test of SULPHATES — Reaction",
"Sulphate ions react with barium chloride in dilute HCl to form a WHITE PRECIPITATE of barium sulphate.\n\nThe turbidity is compared with a standard sulphate solution (1 ppm).\n\nCondition: Dilute HCl medium prevents false positives from Ba-carbonates or Ba-phosphates.", c5, "SO₄²⁻ + BaCl₂ → BaSO₄↓ (white ppt) + 2Cl⁻");
flashcard("Q7", "Principle of Limit Test of ARSENIC (Gutzeit Test)",
"Arsenic compounds are REDUCED to ARSINE GAS (AsH₃) by zinc + dilute H₂SO₄.\n\nArsine gas reacts with mercuric chloride paper, producing a YELLOW-BROWN STAIN.\n\nThe stain intensity is compared with a standard arsenic solution (1–2 ppm).\n\nH₂S is removed by lead acetate cotton wool (scrubber).\n\nFinal comparison: stain depth = arsenic content", c5, "As³⁺ + Zn + H₂SO₄ → AsH₃ (gas) → HgCl₂ paper → yellow/brown stain");
flashcard("Q8", "Limit Test of IRON — Chemical Reaction",
"Iron (Fe³⁺) reacts with THIOGLYCOLIC ACID in ammoniacal (NH₃) solution to form a PURPLE COLOR complex.\n\nThe purple color is compared with a standard iron solution (2 ppm).\n\nAmmoniacal medium: ensures complete reaction and proper pH.\n\nReagent: Thioglycolic acid (HSCH₂COOH)", c5, "Fe³⁺ + Thioglycolic acid + NH₃ → Purple color complex");
flashcard("Q9", "Apparatus in Limit Test of ARSENIC",
"The Arsenic generator apparatus (Gutzeit apparatus) consists of:\n\n1. Conical flask (250 mL) — reaction vessel for Zn + H₂SO₄ + sample\n2. Lead acetate cotton wool — in lower tube, absorbs H₂S gas\n3. Glass tube with mercuric chloride paper — at the top, detects AsH₃\n4. Zinc granules and dilute H₂SO₄ — generate hydrogen gas to reduce As to AsH₃\n5. Starch iodide paper — alternative for detection", c5);
flashcard("Q10", "Define LIMIT TEST and Its Types",
"LIMIT TEST: A quantitative/semi-quantitative test to check that the amount of an impurity does NOT EXCEED the prescribed permissible limit as per pharmacopoeia.\n\nTypes:\n1. Limit test for Chlorides\n2. Limit test for Sulphates\n3. Limit test for Arsenic\n4. Limit test for Iron\n5. Limit test for Heavy Metals (Lead)\n6. Limit test for Lead", c5);
// ════════════════════════════════════════════════════════════════════
// UNIT 6 — GI Agents: Antacids, Buffers, Gases
// ════════════════════════════════════════════════════════════════════
const c6 = unitColor(5);
unitDivider(6, "Antacids, Buffers & Medicinal Gases", c6);
flashcard("Q1", "What are ANTACIDS? Give Examples.",
"Antacids are substances that NEUTRALIZE excess hydrochloric acid (HCl) in the stomach, relieving acidity, heartburn, and peptic ulcer pain.\n\nThey raise gastric pH above 4.\n\nExamples:\n• Sodium bicarbonate (NaHCO₃) — systemic\n• Aluminium hydroxide Al(OH)₃\n• Magnesium hydroxide Mg(OH)₂\n• Calcium carbonate CaCO₃\n• Magnesium trisilicate", c6);
flashcard("Q2", "Systemic vs Non-Systemic Antacids",
"SYSTEMIC ANTACIDS:\n• Absorbed into bloodstream\n• May cause systemic alkalosis\n• Short-term use only\n• Example: Sodium bicarbonate (NaHCO₃)\n\nNON-SYSTEMIC ANTACIDS:\n• NOT absorbed — act locally\n• No systemic side effects\n• Preferred for chronic use\n• Examples: Al(OH)₃, Mg(OH)₂, MgCO₃, CaCO₃", c6);
flashcard("Q3", "What is ACHLORHYDRIA? Treatment?",
"ACHLORHYDRIA: A condition where the stomach FAILS to produce hydrochloric acid (HCl), causing poor digestion, especially of proteins. Can lead to B12 deficiency.\n\nSymptoms: Bloating, poor digestion, bacterial overgrowth\n\nTREATMENT:\n1. Dilute Hydrochloric Acid (HCl) — given orally with water\n2. Glutamic Acid Hydrochloride — safer oral acidifier\n3. Betaine HCl — supplement", c6);
flashcard("Q4 + Q5", "ACIDIFIERS and MEDICINAL GASES",
"ACIDIFIERS:\n• Dilute HCl — for achlorhydria\n• Glutamic acid HCl — oral acidifier\n• Ammonium chloride (NH₄Cl) — systemic acidifier\n\nMEDICINAL GASES:\n• Oxygen (O₂) → hypoxia, respiratory failure\n• CO₂ (5-7% with O₂) → respiratory stimulant\n• Nitrous oxide (N₂O) → anaesthetic (laughing gas)\n• Helium (He) → respiratory therapy in asthma", c6);
flashcard("Q6", "Acid-Neutralizing Reaction of Sodium Bicarbonate",
"Sodium bicarbonate reacts with stomach HCl, producing salt, water, and CO₂ gas (which causes belching).\n\nUsed as a SYSTEMIC antacid — fast acting but short duration.\n\nDisadvantage: May cause alkalosis with long-term use.\nCO₂ produced can cause reflux/distension.", c6, "NaHCO₃ + HCl → NaCl + H₂O + CO₂↑");
flashcard("Q7", "Define BUFFERS — Two Official Buffer Examples",
"BUFFER: A solution that RESISTS changes in pH when small amounts of acid or base are added. Contains a weak acid + its conjugate base (or weak base + conjugate acid).\n\nOFFICIAL BUFFERS (IP/BP):\n1. ACETATE BUFFER (pH 3.5–5.5)\n Acetic acid + Sodium acetate\n\n2. PHOSPHATE BUFFER (pH 5.8–8.0)\n KH₂PO₄ + Na₂HPO₄", c6);
flashcard("Q8", "Buffer Capacity and Isotonicity",
"BUFFER CAPACITY (β):\nAbility of a buffer to RESIST pH change.\nDefined as moles of acid/base needed to change pH of 1 L buffer by 1 unit.\nHigher β = more resistant to pH change.\nMaximum buffer capacity when pH = pKa.\n\nISOTONICITY:\nSolution is isotonic when osmotic pressure EQUALS that of blood plasma.\nIsotonic NaCl = 0.9% w/v\nUsed in IV fluids, eye drops to prevent cell lysis.", c6);
flashcard("Q9", "Storage and Labeling Conditions of CO₂",
"STORAGE:\n• As liquid under pressure in steel cylinders\n• Cylinders are GREY colored (IP)\n• Store upright, away from heat\n• Well-ventilated storage area\n• Keep away from flammable materials\n\nLABELING:\n• 'Carbon Dioxide — Medicinal Gas'\n• 'For medical use only'\n• Labeled with batch no., expiry, pressure\n\nUSE: 5–7% CO₂ mixed with O₂ as respiratory stimulant", c6);
// ════════════════════════════════════════════════════════════════════
// UNIT 7 — Cathartics, Electrolytes, GIT
// ════════════════════════════════════════════════════════════════════
const c7 = unitColor(6);
unitDivider(7, "Cathartics, Electrolytes & GIT Agents", c7);
flashcard("Q1+Q2", "Types of CATHARTICS — Saline Cathartics",
"TYPES:\n1. Saline cathartics — MgSO₄, Na₂SO₄ (osmotic)\n2. Stimulant cathartics — Castor oil, Senna\n3. Bulk cathartics — Methylcellulose, Ispaghula\n4. Lubricant cathartics — Liquid paraffin\n5. Emollient cathartics — Docusate sodium\n\nSALINE CATHARTICS:\nOsmotically active salts that retain water in the intestinal lumen, increasing pressure and stimulating bowel movement.\nExamples: MgSO₄·7H₂O (Epsom salt), Na₂SO₄·10H₂O (Glauber's salt)", c7);
flashcard("Q3", "Extracellular and Intracellular ELECTROLYTES",
"EXTRACELLULAR (outside the cell — plasma/interstitial fluid):\n• Na⁺ (major cation)\n• Cl⁻ (major anion)\n• HCO₃⁻\n• Ca²⁺\n\nINTRACELLULAR (inside the cell — cytoplasm):\n• K⁺ (major cation)\n• Mg²⁺\n• HPO₄²⁻\n• Proteins (as anions)\n\nNa/K balance maintained by Na⁺/K⁺ ATPase pump.", c7);
flashcard("Q4+Q5", "Electrolyte Combination Therapy & ORS",
"ELECTROLYTE COMBINATION THERAPY:\nSimultaneous administration of 2 or more electrolytes to correct multiple deficiencies or maintain electrolyte balance.\n\nMost important example: ORS\n\nORS = ORAL REHYDRATION SALTS/SOLUTION\n\nWHO-ORS composition:\n• NaCl — 2.6 g\n• KCl — 1.5 g\n• Trisodium citrate — 2.9 g\n• Glucose — 13.5 g\n• Water — 1 liter\n\nUsed in diarrhea and dehydration.", c7);
flashcard("Q6+Q7", "GIT Agents & Aluminium Hydroxide Gel Uses",
"GIT AGENTS: Substances acting on the gastrointestinal tract:\nAntacids, cathartics, antidiarrhoeals, antiemetics, carminatives, digestants\n\nUSES OF ALUMINIUM HYDROXIDE GEL:\n1. Antacid — neutralizes excess HCl\n2. Phosphate binder — in renal failure\n3. Peptic ulcer treatment\n4. Astringent — protects mucosa\n5. Vaccine adjuvant\n\nReaction: Al(OH)₃ + 3HCl → AlCl₃ + 3H₂O", c7, "Al(OH)₃ + 3HCl → AlCl₃ + 3H₂O");
flashcard("Q8+Q9", "Major Physiological Ions & Natural Buffer Systems",
"MAJOR IONS:\nNa⁺ (extracellular), K⁺ (intracellular), Ca²⁺, Mg²⁺, Cl⁻, HCO₃⁻, HPO₄²⁻\n\nNATURAL BUFFER SYSTEMS IN HUMAN BODY:\n1. Bicarbonate buffer: H₂CO₃/HCO₃⁻\n (Most important in blood — maintains pH 7.4)\n2. Phosphate buffer: H₂PO₄⁻/HPO₄²⁻\n (Important in urine and cells)\n3. Protein buffer: Plasma proteins and Hemoglobin\n (Amphoteric — act as both acid and base)", c7);
flashcard("Q10", "Role of Na⁺, Ca²⁺, Cl⁻ and HCO₃⁻",
"Na⁺ (Sodium):\nMaintains extracellular osmotic pressure, fluid balance, nerve impulse\n\nCa²⁺ (Calcium):\nBone/tooth formation, muscle contraction, blood clotting, nerve function\n\nCl⁻ (Chloride):\nAcid-base balance, osmotic pressure, forms HCl in stomach\n\nHCO₃⁻ (Bicarbonate):\nMajor blood buffer — maintains pH 7.4; transports CO₂ from tissues to lungs", c7);
// ════════════════════════════════════════════════════════════════════
// UNIT 8 — Antimicrobial Agents
// ════════════════════════════════════════════════════════════════════
const c8 = unitColor(7);
unitDivider(8, "Antimicrobial Agents", c8);
flashcard("Q1", "Antimicrobial Agents — Examples",
"Antimicrobial agents are substances that KILL or INHIBIT GROWTH of microorganisms.\n\nTypes:\n• Antiseptics (used on living tissue)\n• Disinfectants (used on non-living surfaces)\n\nExamples:\n• Boric acid H₃BO₃ — mild antiseptic\n• Hydrogen peroxide H₂O₂ — antiseptic\n• Iodine I₂ — antiseptic (tincture, Lugol's)\n• Chlorinated lime — disinfectant\n• KMnO₄ — antiseptic\n• Phenol — disinfectant", c8);
flashcard("Q2", "Uses of BORIC ACID",
"Formula: H₃BO₃ (MW = 61.83)\n\nUses:\n1. Mild antiseptic — eye wash, skin infections\n2. Antifungal — vaginal yeast infections\n3. Preservative in pharmaceutical preparations\n4. Buffer in ophthalmic (eye) solutions\n5. Boric acid lint — wound dressings\n6. Insecticidal (cockroach killer)\n\nIt is a WEAK MONOBASIC ACID — pKa = 9.2", c8);
flashcard("Q3", "Why is H₂SO₄ Added in Assay of Hydrogen Peroxide?",
"H₂SO₄ is added to:\n1. ACIDIFY the medium — KMnO₄ works as oxidizing agent ONLY in acidic medium\n2. Provide correct conditions for Mn⁷⁺ → Mn²⁺ reduction\n3. Prevent decomposition of H₂O₂ in alkaline conditions\n\nEndpoint: Permanent pink color (due to excess KMnO₄)\nKMnO₄ acts as self-indicator in acidic medium (purple → colorless)", c8, "2KMnO₄ + 5H₂O₂ + 3H₂SO₄ → 2MnSO₄ + K₂SO₄ + 8H₂O + 5O₂");
flashcard("Q4+Q5", "Boric Acid Formula & Preparation/Uses of Iodine",
"BORIC ACID:\nFormula: H₃BO₃ (also written B(OH)₃)\nMW = 61.83 g/mol | Weak monobasic acid\n\nIODINE PREPARATION:\nFrom seaweed ash/iodide salts by oxidation with Cl₂:\n 2KI + Cl₂ → 2KCl + I₂\nOr oxidation with MnO₂ + H₂SO₄\n\nUSES OF IODINE:\n1. Antiseptic — tincture of iodine, Lugol's iodine\n2. Thyroid disorders (hyperthyroidism treatment)\n3. Povidone-iodine — surgical scrub\n4. Iodometric titrations (analytical)", c8, "2KI + Cl₂ → 2KCl + I₂");
flashcard("Q6", "Use of GLYCERINE in Boric Acid Assay",
"Boric acid is a VERY WEAK ACID (pKa = 9.2) and CANNOT be directly titrated with NaOH — endpoint is not sharp.\n\nGlycerine is added to form a STRONGER GLYCEROBORIC ACID complex:\n\n H₃BO₃ + Glycerol → Glyceroboric acid\n\nGlyceroboric acid is a stronger acid and can be titrated with NaOH using PHENOLPHTHALEIN indicator.\n\nThis gives a sharp endpoint and accurate result.", c8, "H₃BO₃ + Glycerol → Glyceroboric acid → + NaOH → titrate");
// ════════════════════════════════════════════════════════════════════
// UNIT 9 — Dental, Water, Excipients
// ════════════════════════════════════════════════════════════════════
const c9 = unitColor(8);
unitDivider(9, "Dental Agents, Water & Pharmaceutical Excipients", c9);
flashcard("Q1+Q2", "Dental Caries, Anticaries & Desensitizing Agents",
"DENTAL CARIES:\nDestruction of tooth enamel by ACID produced by bacteria (Streptococcus mutans) acting on dietary sugars.\n\nANTICARIES AGENTS:\n1. Sodium fluoride (NaF) — hardens enamel, inhibits bacterial enzymes\n2. Stannous fluoride (SnF₂) — antibacterial + enamel protection\n\nDESENSITIZING AGENTS (reduce tooth hypersensitivity):\n1. Potassium nitrate (KNO₃) — blocks dentinal tubules\n2. Strontium chloride (SrCl₂) — plugs tubules\n3. Sodium fluoride (NaF)", c9);
flashcard("Q3+Q4", "Dentifrices and Antioxidants",
"DENTIFRICES (Dentifricing Agents):\nSubstances in toothpaste/powder to clean and polish teeth.\nExamples:\n• Calcium carbonate CaCO₃ — mild abrasive\n• Dicalcium phosphate CaHPO₄ — abrasive\n• Magnesium carbonate MgCO₃ — abrasive\n• Sodium lauryl sulphate — foaming agent\n\nANTIOXIDANTS:\nPrevent oxidative degradation of pharma products.\nExamples:\n1. Sodium metabisulphite Na₂S₂O₅\n2. Ascorbic acid (Vitamin C)\n(Others: BHA, BHT, sodium bisulphite)", c9);
flashcard("Q5", "Water for Injection vs Sterile Water for Injection",
"WATER FOR INJECTION (WFI):\n• Bulk water, not necessarily sterile\n• Pyrogen-free (passes pyrogen test)\n• Used to PREPARE sterile products\n• Stored in large bulk containers\n• Must be used within 24 hrs of preparation\n\nSTERILE WATER FOR INJECTION (SWFI):\n• Already sterile — filled in sealed ampoules/vials\n• Pyrogen-free\n• Used DIRECTLY as diluent/vehicle\n• Terminally sterilized by autoclaving", c9);
flashcard("Q6+Q7", "Bentonite, Magnesium Stearate & Calcium Carbonate",
"BENTONITE:\nFormula: Al₂O₃·4SiO₂·H₂O (hydrated aluminium silicate)\nUses: Suspending agent, emulsifier, topical protectant\n\nMAGNESIUM STEARATE:\nFormula: Mg(C₁₇H₃₅COO)₂\nUses: Tablet lubricant, anti-adherent\n\nCALCIUM CARBONATE (CaCO₃):\nMedicinal uses:\n1. Antacid — neutralizes stomach acid\n2. Calcium supplement (osteoporosis, hypocalcemia)\n3. Dentifrice — mild abrasive\n4. Phosphate binder in renal disease", c9, "CaCO₃ + 2HCl → CaCl₂ + H₂O + CO₂↑");
flashcard("Q8", "Sodium Metabisulphite and Sodium CMC",
"SODIUM METABISULPHITE:\nFormula: Na₂S₂O₅\nUses: Antioxidant in injections, preservative, reducing agent\n\nSODIUM CARBOXYMETHYLCELLULOSE (Na-CMC):\nFormula: C₆H₇O₂(OH)₂·OCH₂COONa\nUses:\n1. Viscosity-enhancing agent\n2. Suspending agent in oral suspensions\n3. Tablet binder and disintegrant\n4. Laxative (bulk-forming)\n5. Coating agent", c9);
// ════════════════════════════════════════════════════════════════════
// UNIT 10 — Radiopharmaceuticals
// ════════════════════════════════════════════════════════════════════
const c10 = unitColor(9);
unitDivider(10, "Radiopharmaceuticals", c10);
flashcard("Q1+Q5", "Radiopharmaceuticals and Isotopes",
"RADIOPHARMACEUTICALS:\nRadioactive compounds used for DIAGNOSIS and TREATMENT of diseases. Contain a radioisotope that emits detectable radiation.\nExamples: Sodium Iodide I¹³¹, Technetium-99m, Chromic Phosphate P³²\n\nISOTOPE:\nAtoms of the SAME element with the same atomic number (protons) but DIFFERENT mass numbers (different neutrons).\n\nExample: I-127 (stable) and I-131 (radioactive) are isotopes of iodine.\n\nRadioisotopes = radioactive isotopes", c10);
flashcard("Q2+Q3", "Importance of Radioisotopes & Half-Life",
"IMPORTANCE IN PHARMACY:\n1. Diagnosis — organ scanning (thyroid, bone, kidney)\n2. Therapy — cancer destruction (I¹³¹ for thyroid Ca)\n3. Research — radioactive tracers for drug metabolism\n4. Sterilization — gamma radiation for pharma products\n5. QC — checking sealed package integrity\n\nHALF-LIFE (t₁/₂):\nTime required for HALF (50%) of a radioactive substance to decay/disintegrate.\n\nExample: t₁/₂ of I¹³¹ = 8 days\nAfter 8 days → 50% remaining\nAfter 16 days → 25% remaining", c10);
flashcard("Q4+Q6", "Uses and Storage of Sodium Iodide (I¹³¹)",
"USES:\n1. Diagnosis of thyroid disorders — thyroid uptake scan\n2. Treatment of hyperthyroidism (Graves' disease)\n3. Treatment of thyroid CANCER\n4. Thyroid imaging — visualize size and function\n\nSTORAGE CONDITIONS:\n1. Lead-lined containers — absorb radiation\n2. Cool, ventilated, designated radioactive storage area\n3. Distance from personnel\n4. Labeled with radioactive hazard symbols (trefoil ☢)\n5. Use within expiry (short t₁/₂ = 8 days)", c10);
flashcard("Q7", "Precautions for Handling Radioactive Substances",
"The 3 Principles: TIME · DISTANCE · SHIELDING\n\n1. DISTANCE — maintain maximum distance (inverse square law)\n2. SHIELDING — lead aprons, lead glass, lead containers\n3. TIME — minimize time near radioactive material\n4. PPE — gloves, lab coat, dosimeter badge\n5. No eating or drinking in radioactive areas\n6. Monitor with Geiger-Müller counter regularly\n7. Proper disposal of radioactive waste per regulations\n8. Wash hands thoroughly after handling", c10);
flashcard("Q8", "Two Properties of GAMMA Radiation",
"1. HIGH PENETRATING POWER:\nCan penetrate thick lead and concrete.\nMost penetrating of all radiations: α < β < γ\nRequires several cm of lead for shielding.\n\n2. NO MASS AND NO CHARGE:\nGamma rays are ELECTROMAGNETIC WAVES (photons), not particles.\nThey travel at the speed of light (3×10⁸ m/s).\nNot deflected by electric or magnetic fields.\n\nAlso: Cause ionization, detected by GM counter, used for sterilization.", c10);
flashcard("Q9+Q10", "Antidotes and Respiratory Stimulants",
"ANTIDOTES:\nSubstances that counteract or neutralize the effects of a POISON or drug overdose.\n\nExamples:\n• Atropine — antidote for organophosphate poisoning\n• Naloxone — antidote for opioid (morphine) overdose\n• Dimercaprol (BAL) — antidote for heavy metal poisoning\n• N-acetylcysteine — antidote for paracetamol overdose\n• Protamine sulphate — antidote for heparin\n\nRESPIRATORY STIMULANT (1 Example):\nNIKETHAMIDE (Coramine) — stimulates respiratory center in medulla oblongata, increasing rate and depth of breathing.", c10);
// FINAL SLIDE
const slideEnd = pres.addSlide();
slideEnd.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{ color: PALETTE.bg }, line:{ color: PALETTE.bg } });
slideEnd.addShape(pres.shapes.RECTANGLE, { x:0, y:4.5, w:10, h:1.125, fill:{ color:"1ABC9C" }, line:{ color:"1ABC9C" } });
slideEnd.addText("YOU GOT THIS! 🎯", {
x:0.5, y:1.2, w:9, h:1.4,
fontSize:40, bold:true, color:"1ABC9C", fontFace:"Calibri", align:"center"
});
slideEnd.addText("Pharmaceutical Inorganic Chemistry\nUnits 1 – 10 Complete", {
x:0.5, y:2.8, w:9, h:0.9,
fontSize:18, color: PALETTE.label, fontFace:"Calibri", align:"center", italic:true
});
slideEnd.addText("Best of Luck in Your Exams!", {
x:0.5, y:4.55, w:9, h:0.55,
fontSize:16, color: PALETTE.bg, bold:true, fontFace:"Calibri", align:"center"
});
pres.writeFile({ fileName: "/home/daytona/workspace/pharma-chem-flashcards/Pharma_Inorganic_Chem_Flashcards.pptx" })
.then(() => console.log("✅ PPTX created successfully!"))
.catch(err => { console.error("❌ Error:", err); process.exit(1); });