Hey Give me some pictures of vitamin model
vitamin molecular model 3D structure images



Generate a PDF with vitamin molecular models and facts
mkdir -p /tmp/workspace/vitamins-pdf/images && ls /tmp/workspace/
cd /tmp/workspace/vitamins-pdf/images && \ curl -s -o vitC.jpg "https://www.indigoinstruments.com/images/models/vitamin-C-structure-molecule.jpg" && \ curl -s -o vitB1.jpg "https://c8.alamy.com/comp/2F1PHW8/3d-render-of-molecular-structure-of-vitamin-b1-isolated-over-white-background-atoms-are-represented-as-spheres-with-color-and-chemical-symbol-coding-2F1PHW8.jpg" && \ curl -s -o vitC2.jpg "https://media.sciencephoto.com/c0/40/43/38/c0404338-800px-wm.jpg" && \ curl -L -s -o vitD.jpg "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Cholecalciferol.svg/320px-Cholecalciferol.svg.png" && \ ls -lh
python3 -c "from rdkit import Chem; from rdkit.Chem import Draw; print('rdkit ok')"
~/vitamins-pdf/draw_vitamins.py
"""
Draw vitamin molecular structure diagrams using matplotlib.
Each vitamin is drawn as a 2D structural formula with atoms and bonds.
"""
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyArrowPatch
import numpy as np
import os
OUT = "/tmp/workspace/vitamins-pdf/images"
os.makedirs(OUT, exist_ok=True)
# ── helper ──────────────────────────────────────────────────────────────────
def draw_molecule(ax, atoms, bonds, title, color_map=None):
"""
atoms : list of (label, x, y)
bonds : list of (i, j, order) order=1 single, 2 double, 3 triple
"""
if color_map is None:
color_map = {}
default_colors = {'C':'#2c2c2c','H':'#888888','O':'#e63946',
'N':'#457b9d','S':'#e9c46a','P':'#2a9d8f'}
ax.set_xlim(-0.5, max(a[1] for a in atoms)+0.5)
ax.set_ylim(-0.5, max(a[2] for a in atoms)+0.5)
ax.set_aspect('equal')
ax.axis('off')
ax.set_title(title, fontsize=11, fontweight='bold', pad=6)
# bonds
for b in bonds:
i, j, order = b
x0,y0 = atoms[i][1], atoms[i][2]
x1,y1 = atoms[j][1], atoms[j][2]
dx, dy = x1-x0, y1-y0
length = np.hypot(dx, dy)
perp = np.array([-dy, dx]) / (length+1e-9)
offsets = {1:[0], 2:[-0.07, 0.07], 3:[-0.12, 0, 0.12]}
for off in offsets.get(order,[0]):
ox, oy = perp * off
ax.plot([x0+ox, x1+ox],[y0+oy, y1+oy], 'k-', lw=1.4, zorder=1)
# atoms
for lbl, x, y in atoms:
elem = lbl.lstrip('0123456789').split('(')[0].rstrip('0123456789+-')
elem_base = ''.join(c for c in elem if c.isalpha())
col = color_map.get(lbl, default_colors.get(elem_base[:1], '#333'))
fs = 8 if len(lbl) > 2 else 9
ax.text(x, y, lbl, ha='center', va='center', fontsize=fs,
fontweight='bold', color=col,
bbox=dict(boxstyle='round,pad=0.18', fc='white', ec='none'), zorder=3)
# ── Vitamin C (Ascorbic Acid) ────────────────────────────────────────────────
# Ring: C1-C2-C3-C4-O5 (5-membered lactone), substituents
def make_vitC():
s = 1.0
h = s * np.sqrt(3)/2
# 5-membered ring: O at top, then C1,C2,C3,C4
ring_cx, ring_cy = 2.5, 2.0
r = 1.1
angles = [90, 162, 234, 306, 18] # degrees for 5 ring atoms
ring = [(cx + r*np.cos(np.radians(a)), cy + r*np.sin(np.radians(a)))
for cx,cy,a in [(ring_cx,ring_cy,a) for a in angles]]
atoms = [
('O', ring[0][0], ring[0][1]), # 0 ring O
('C1', ring[1][0], ring[1][1]), # 1
('C2', ring[2][0], ring[2][1]), # 2
('C3', ring[3][0], ring[3][1]), # 3
('C4', ring[4][0], ring[4][1]), # 4
# C=O of lactone hanging off C1
('C=O', ring[1][0]-1.1, ring[1][1]-0.3), # 5
# OH groups
('OH', ring[2][0]-1.0, ring[2][1]), # 6
('OH', ring[3][0]-0.7, ring[3][1]-0.9), # 7
# C4 -> CH(OH)-CH2OH chain
('CH', ring[4][0]+1.1, ring[4][1]+0.2), # 8
('OH', ring[4][0]+1.1, ring[4][1]-0.9), # 9
('CH2OH', ring[4][0]+2.3, ring[4][1]+0.4), # 10
]
bonds = [
(0,1,1),(1,2,1),(2,3,2),(3,4,1),(4,0,1),
(1,5,2),(2,6,1),(3,7,1),
(4,8,1),(8,9,1),(8,10,1),
]
return atoms, bonds
fig, ax = plt.subplots(figsize=(4,4))
atoms, bonds = make_vitC()
draw_molecule(ax, atoms, bonds, "Vitamin C (Ascorbic Acid)\nC₆H₈O₆ MW: 176.12 g/mol")
plt.tight_layout()
plt.savefig(f"{OUT}/vitC_struct.png", dpi=130, bbox_inches='tight')
plt.close()
print("Vitamin C done")
# ── Vitamin D3 (Cholecalciferol) ─────────────────────────────────────────────
# Simplified skeleton: 3 six-membered rings + 5-membered ring + side chain
def make_vitD():
# Ring A (left 6-membered)
Ax = [0, 1, 2, 2, 1, 0]
Ay = [1, 0, 0, 2, 3, 3]
# Ring C (middle 6-membered, shared bond with ring B region)
# Ring B is broken (seco-steroid)
# We'll simplify with 3 rings + side chain
atoms = [
('C1',0,1),('C2',1,0),('C3',2,0),('C4',3,0),
('C5',4,1),('C6',3,2),('C7',2,2),('C8',1,2),
# ring C
('C9',4,2),('C10',5,1),('C11',6,0),('C12',6,2),
# ring D (5-membered)
('C13',7,1),('C14',7,3),
# side chain
('C15',8,0),('C16',9,0),('C17',9,1),('C18',10,1),
# OH on C3
('OH',0,0),
# double bonds markers
]
bonds = [
(0,1,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(5,6,1),(6,7,1),(7,0,1),
(4,8,1),(8,9,1),(9,10,1),(10,11,1),(11,5,1),
(9,12,1),(12,13,1),(13,8,1),
(12,14,1),(14,15,1),(15,16,1),(16,17,1),
(0,18,1),
(3,4,2),(10,11,2),
]
return atoms, bonds
fig, ax = plt.subplots(figsize=(5,3))
atoms, bonds = make_vitD()
draw_molecule(ax, atoms, bonds, "Vitamin D3 (Cholecalciferol)\nC₂₇H₄₄O MW: 384.64 g/mol")
ax.set_xlim(-0.8, 11.5)
ax.set_ylim(-0.8, 4.0)
plt.tight_layout()
plt.savefig(f"{OUT}/vitD_struct.png", dpi=130, bbox_inches='tight')
plt.close()
print("Vitamin D done")
# ── Vitamin E (Alpha-Tocopherol) ──────────────────────────────────────────────
def make_vitE():
# Chromanol ring (6+5 fused) + phytyl side chain
atoms = [
# benzene-like ring
('C1',0,1),('C2',1,0),('C3',2,0),('C4',3,1),('C5',3,2),('C6',2,3),('C7',1,3),
('O',0,2), # ring O (chroman)
# pyran ring C8-C4
('C8',4,1),('C9',5,2),
# OH on aromatic
('OH',2,4),
# CH3 groups on ring
('CH₃',3,3.8),('CH₃',-0.5,0.5),
# side chain (simplified)
('C',6,1),('C',7,1),('C',8,1),('C',9,1),
]
bonds = [
(0,1,1),(1,2,1),(2,3,2),(3,4,1),(4,5,2),(5,6,1),(6,7,1),(7,0,1),
(3,8,1),(8,9,1),(9,4,1),
(5,10,1),(6,11,1),(0,12,1),
(8,13,1),(13,14,1),(14,15,1),(15,16,1),
]
return atoms, bonds
fig, ax = plt.subplots(figsize=(5,3.5))
atoms, bonds = make_vitE()
draw_molecule(ax, atoms, bonds, "Vitamin E (α-Tocopherol)\nC₂₉H₅₀O₂ MW: 430.71 g/mol")
ax.set_xlim(-1, 10.5)
ax.set_ylim(-0.5, 5.0)
plt.tight_layout()
plt.savefig(f"{OUT}/vitE_struct.png", dpi=130, bbox_inches='tight')
plt.close()
print("Vitamin E done")
# ── Vitamin B1 (Thiamine) ─────────────────────────────────────────────────────
def make_vitB1():
# Pyrimidine ring + thiazole ring linked by CH2
atoms = [
# Pyrimidine (6-membered, 2 N)
('N1',0,1),('C2',1,0),('N3',2,0),('C4',3,1),('C5',3,2),('C6',2,3),('C7',1,3),
# Thiazole (5-membered, N and S)
('C8',5,1),('N9',6,0),('C10',7,1),('S',6,2),
# CH2 bridge
('CH2',4,1),
# NH2 on pyrimidine
('NH2',0,0),
# CH3 on pyrimidine
('CH₃',4,3),
# OH on thiazole
('CH2OH',8,2),
# CH3 on thiazole
('CH₃',8,0),
]
bonds = [
(0,1,1),(1,2,1),(2,3,2),(3,4,1),(4,5,2),(5,6,1),(6,0,2),
(7,8,2),(8,9,1),(9,10,2),(10,7,1),
(4,11,1),(11,7,1),
(0,12,1),(6,13,1),
(9,14,1),(8,15,1),
]
return atoms, bonds
fig, ax = plt.subplots(figsize=(5,3.5))
atoms, bonds = make_vitB1()
draw_molecule(ax, atoms, bonds, "Vitamin B1 (Thiamine)\nC₁₂H₁₇N₄OS⁺ MW: 265.36 g/mol",
color_map={'S':'#e9c46a','N1':'#457b9d','N3':'#457b9d','N9':'#457b9d'})
ax.set_xlim(-0.8, 9.5)
ax.set_ylim(-0.5, 4.0)
plt.tight_layout()
plt.savefig(f"{OUT}/vitB1_struct.png", dpi=130, bbox_inches='tight')
plt.close()
print("Vitamin B1 done")
# ── Vitamin A (Retinol) ───────────────────────────────────────────────────────
def make_vitA():
# Beta-ionone ring (6-membered) + polyene chain + CH2OH
r = 1.2
cx, cy = 1.5, 1.5
ring_pts = [(cx + r*np.cos(np.radians(a)), cy + r*np.sin(np.radians(a)))
for a in [90, 150, 210, 270, 330, 30]]
atoms = [
('C', ring_pts[0][0], ring_pts[0][1]),
('C', ring_pts[1][0], ring_pts[1][1]),
('C', ring_pts[2][0], ring_pts[2][1]),
('C', ring_pts[3][0], ring_pts[3][1]),
('C', ring_pts[4][0], ring_pts[4][1]),
('C', ring_pts[5][0], ring_pts[5][1]),
# polyene chain (alternating double bonds)
('C', 3.0, 1.5),
('C', 4.0, 1.8),
('C', 5.0, 1.5),
('C', 6.0, 1.8),
('C', 7.0, 1.5),
('C', 8.0, 1.8),
('CH2OH', 9.0, 1.5),
# methyl groups on ring
('CH₃', cx-0.3, cy+2.5),
('CH₃', cx+1.8, cy+2.3),
]
bonds = [
(0,1,1),(1,2,2),(2,3,1),(3,4,2),(4,5,1),(5,0,2),
(4,6,1),(6,7,2),(7,8,1),(8,9,2),(9,10,1),(10,11,2),(11,12,1),
(0,13,1),(0,14,1),
]
return atoms, bonds
fig, ax = plt.subplots(figsize=(5.5,3))
atoms, bonds = make_vitA()
draw_molecule(ax, atoms, bonds, "Vitamin A (Retinol)\nC₂₀H₃₀O MW: 286.45 g/mol")
ax.set_xlim(-0.5, 10.5)
ax.set_ylim(-0.2, 4.5)
plt.tight_layout()
plt.savefig(f"{OUT}/vitA_struct.png", dpi=130, bbox_inches='tight')
plt.close()
print("Vitamin A done")
print("\nAll vitamin structure images saved!")
cd /tmp/workspace/vitamins-pdf && python3 draw_vitamins.py
~/vitamins-pdf/build_pdf.py
"""
Build a polished PDF: Vitamin Molecular Models & Facts
Using reportlab
"""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Image,
Table, TableStyle, HRFlowable, PageBreak, KeepTogether
)
from reportlab.pdfgen import canvas
from reportlab.platypus.flowables import Flowable
import os
OUT_PDF = "/tmp/workspace/vitamins-pdf/Vitamin_Molecular_Models.pdf"
IMG_DIR = "/tmp/workspace/vitamins-pdf/images"
PAGE_W, PAGE_H = A4
MARGIN = 2.2 * cm
# ── Colors ────────────────────────────────────────────────────────────────────
C_HEADER = colors.HexColor("#1a3a5c") # dark navy
C_ACCENT = colors.HexColor("#e63946") # red
C_ACCENT2 = colors.HexColor("#457b9d") # steel blue
C_LIGHT = colors.HexColor("#f0f4f8") # light bg
C_BORDER = colors.HexColor("#c9d6e3")
C_TEXT = colors.HexColor("#1d2d44")
C_SUBHEAD = colors.HexColor("#2a6496")
# ── Styles ────────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
title_style = ParagraphStyle('Title2',
parent=styles['Title'],
fontSize=28, textColor=C_HEADER,
spaceAfter=4, leading=34, alignment=TA_CENTER)
subtitle_style = ParagraphStyle('Sub',
parent=styles['Normal'],
fontSize=13, textColor=C_ACCENT2,
spaceAfter=2, alignment=TA_CENTER)
section_title = ParagraphStyle('SecTitle',
parent=styles['Heading1'],
fontSize=15, textColor=colors.white,
spaceAfter=0, leading=20, alignment=TA_LEFT,
leftIndent=6)
fact_label = ParagraphStyle('FactLabel',
parent=styles['Normal'],
fontSize=9, textColor=C_SUBHEAD,
fontName='Helvetica-Bold', spaceAfter=1)
fact_value = ParagraphStyle('FactVal',
parent=styles['Normal'],
fontSize=9.5, textColor=C_TEXT,
spaceAfter=4, leading=13)
body_style = ParagraphStyle('Body',
parent=styles['Normal'],
fontSize=9.5, textColor=C_TEXT,
spaceAfter=4, leading=14, alignment=TA_JUSTIFY)
caption_style = ParagraphStyle('Caption',
parent=styles['Normal'],
fontSize=8, textColor=colors.HexColor('#666'),
alignment=TA_CENTER, spaceAfter=4)
toc_style = ParagraphStyle('TOC',
parent=styles['Normal'],
fontSize=11, textColor=C_TEXT, leading=20)
# ── Vitamin data ──────────────────────────────────────────────────────────────
vitamins = [
{
"name": "Vitamin A",
"alt": "Retinol",
"formula": "C₂₀H₃₀O",
"mw": "286.45 g/mol",
"type": "Fat-soluble",
"img": "vitA_struct.png",
"color": colors.HexColor("#e07a5f"),
"sources": "Liver, fish oils, dairy, egg yolk, orange/yellow vegetables (beta-carotene)",
"functions": [
"Essential for vision, especially night vision (forms rhodopsin in rod cells)",
"Supports immune function and cell differentiation",
"Required for growth, skin health, and reproduction",
"Acts as an antioxidant (beta-carotene form)",
],
"deficiency": "Night blindness, xerophthalmia, increased infection susceptibility, keratomalacia",
"rda": "Men: 900 µg/day | Women: 700 µg/day (as Retinol Activity Equivalents)",
"overdose": "Toxicity possible (fat-soluble); causes headache, liver damage, teratogenicity",
"fun_fact": "Vitamin A was the first vitamin to be discovered, in 1913 by Elmer McCollum."
},
{
"name": "Vitamin B1",
"alt": "Thiamine",
"formula": "C₁₂H₁₇N₄OS⁺",
"mw": "265.36 g/mol",
"type": "Water-soluble",
"img": "vitB1_struct.png",
"color": colors.HexColor("#3d405b"),
"sources": "Whole grains, pork, legumes, nuts, seeds, fortified cereals",
"functions": [
"Coenzyme (as TPP) in carbohydrate metabolism and energy production",
"Critical for pyruvate dehydrogenase and alpha-ketoglutarate dehydrogenase",
"Supports nerve conduction and cardiac function",
"Involved in synthesis of acetylcholine (neurotransmitter)",
],
"deficiency": "Beriberi (wet: cardiac; dry: neurological), Wernicke-Korsakoff syndrome (alcohol-related)",
"rda": "Men: 1.2 mg/day | Women: 1.1 mg/day",
"overdose": "No known toxicity (rapidly excreted); very high doses may cause headache",
"fun_fact": "Thiamine has an unusual structure containing both a pyrimidine and a thiazole ring linked by a methylene bridge."
},
{
"name": "Vitamin C",
"alt": "Ascorbic Acid",
"formula": "C₆H₈O₆",
"mw": "176.12 g/mol",
"type": "Water-soluble",
"img": "vitC_struct.png",
"color": colors.HexColor("#f4a261"),
"sources": "Citrus fruits, kiwi, strawberries, bell peppers, broccoli, spinach",
"functions": [
"Potent antioxidant — scavenges reactive oxygen species",
"Collagen synthesis: hydroxylation of proline and lysine (wound healing)",
"Enhances non-heme iron absorption from the gut",
"Regenerates vitamin E; immune system support",
],
"deficiency": "Scurvy: perifollicular hemorrhages, swollen bleeding gums, poor wound healing",
"rda": "Men: 90 mg/day | Women: 75 mg/day | Smokers: +35 mg/day",
"overdose": "High doses (>2g/day) → osmotic diarrhea, kidney oxalate stones",
"fun_fact": "Humans are one of the few mammals that cannot synthesize vitamin C; most animals make it from glucose."
},
{
"name": "Vitamin D3",
"alt": "Cholecalciferol",
"formula": "C₂₇H₄₄O",
"mw": "384.64 g/mol",
"type": "Fat-soluble",
"img": "vitD_struct.png",
"color": colors.HexColor("#2a9d8f"),
"sources": "Sunlight (skin synthesis from 7-dehydrocholesterol), fatty fish, egg yolk, fortified milk",
"functions": [
"Regulates calcium and phosphorus absorption in the intestine",
"Maintains bone mineralisation (prevents rickets/osteomalacia)",
"Acts as a steroid hormone via nuclear receptors (VDR)",
"Immune modulation, cell differentiation, insulin secretion",
],
"deficiency": "Rickets (children), osteomalacia/osteoporosis (adults), muscle weakness",
"rda": "Adults 19-70: 600 IU/day | >70: 800 IU/day",
"overdose": "Hypercalcemia, metastatic calcification, kidney stones (fat-soluble, accumulates)",
"fun_fact": "Vitamin D is technically a prohormone; the active form (calcitriol) is made in the kidneys."
},
{
"name": "Vitamin E",
"alt": "α-Tocopherol",
"formula": "C₂₉H₅₀O₂",
"mw": "430.71 g/mol",
"type": "Fat-soluble",
"img": "vitE_struct.png",
"color": colors.HexColor("#264653"),
"sources": "Vegetable oils (wheat germ, sunflower), nuts, seeds, leafy greens, avocado",
"functions": [
"Primary fat-soluble antioxidant in cell membranes",
"Protects polyunsaturated fatty acids (PUFAs) from lipid peroxidation",
"Anti-platelet aggregation (reduces thrombosis risk)",
"Immune function and gene expression regulation",
],
"deficiency": "Rare; seen in fat malabsorption — hemolytic anemia, neuropathy, ataxia",
"rda": "Adults: 15 mg/day (22.4 IU) of alpha-tocopherol",
"overdose": "May inhibit vitamin K action → increased bleeding risk at high supplemental doses",
"fun_fact": "There are 8 natural forms of vitamin E (4 tocopherols + 4 tocotrienols); alpha-tocopherol is the most biologically active."
},
]
# ── Page number footer ─────────────────────────────────────────────────────────
def add_page_elements(canvas_obj, doc):
canvas_obj.saveState()
page_num = canvas_obj.getPageNumber()
# footer line
canvas_obj.setStrokeColor(C_BORDER)
canvas_obj.setLineWidth(0.5)
canvas_obj.line(MARGIN, 1.4*cm, PAGE_W - MARGIN, 1.4*cm)
canvas_obj.setFont('Helvetica', 8)
canvas_obj.setFillColor(colors.HexColor('#888'))
canvas_obj.drawString(MARGIN, 0.9*cm, "Vitamin Molecular Models & Facts")
canvas_obj.drawRightString(PAGE_W - MARGIN, 0.9*cm, f"Page {page_num}")
canvas_obj.restoreState()
# ── Build story ────────────────────────────────────────────────────────────────
story = []
# ── COVER PAGE ────────────────────────────────────────────────────────────────
story.append(Spacer(1, 3.5*cm))
# Title banner table
banner_data = [[Paragraph(
'<font color="white"><b>Vitamin Molecular Models</b></font><br/>'
'<font size="14" color="#a8d8ea"> & Key Scientific Facts</font>',
ParagraphStyle('BanTitle', fontSize=26, textColor=colors.white,
alignment=TA_CENTER, leading=36)
)]]
banner = Table(banner_data, colWidths=[PAGE_W - 2*MARGIN])
banner.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), C_HEADER),
('ALIGN', (0,0), (-1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('TOPPADDING', (0,0), (-1,-1), 22),
('BOTTOMPADDING', (0,0), (-1,-1), 22),
('ROUNDEDCORNERS', [8]),
]))
story.append(banner)
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph("A reference guide to the structure, function, and biochemistry of essential vitamins",
subtitle_style))
story.append(Spacer(1, 0.4*cm))
story.append(HRFlowable(width="80%", thickness=1.5, color=C_ACCENT, spaceAfter=10))
story.append(Spacer(1, 0.3*cm))
# Quick summary table on cover
summary_data = [
[Paragraph('<b>Vitamin</b>', fact_label),
Paragraph('<b>Chemical Name</b>', fact_label),
Paragraph('<b>Formula</b>', fact_label),
Paragraph('<b>Type</b>', fact_label)],
]
for v in vitamins:
summary_data.append([
Paragraph(v['name'], fact_value),
Paragraph(v['alt'], fact_value),
Paragraph(v['formula'], fact_value),
Paragraph(v['type'], fact_value),
])
sum_table = Table(summary_data,
colWidths=[(PAGE_W-2*MARGIN)*f for f in [0.22,0.30,0.26,0.22]])
sum_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), C_ACCENT2),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [C_LIGHT, colors.white]),
('GRID', (0,0), (-1,-1), 0.4, C_BORDER),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,-1), 9),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(sum_table)
story.append(Spacer(1, 0.6*cm))
story.append(Paragraph("Generated by Orris AI • July 2026", caption_style))
story.append(PageBreak())
# ── VITAMIN PAGES ─────────────────────────────────────────────────────────────
for v in vitamins:
elements = []
# Section header banner
hdr_data = [[Paragraph(
f'<font size="16"><b>{v["name"]}</b></font> '
f'<font size="11">({v["alt"]})</font>',
section_title
)]]
hdr = Table(hdr_data, colWidths=[PAGE_W - 2*MARGIN])
hdr.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), v['color']),
('TOPPADDING', (0,0), (-1,-1), 10),
('BOTTOMPADDING', (0,0), (-1,-1), 10),
('LEFTPADDING', (0,0), (-1,-1), 12),
('ROUNDEDCORNERS', [6]),
]))
elements.append(hdr)
elements.append(Spacer(1, 0.4*cm))
# Molecular structure image + basic data side by side
img_path = os.path.join(IMG_DIR, v['img'])
mol_img = Image(img_path, width=7.5*cm, height=6.5*cm)
mol_img.hAlign = 'CENTER'
basic_rows = [
[Paragraph('Molecular Formula', fact_label), Paragraph(v['formula'], fact_value)],
[Paragraph('Molecular Weight', fact_label), Paragraph(v['mw'], fact_value)],
[Paragraph('Solubility Type', fact_label), Paragraph(v['type'], fact_value)],
[Paragraph('RDA', fact_label), Paragraph(v['rda'], fact_value)],
[Paragraph('Dietary Sources', fact_label), Paragraph(v['sources'], fact_value)],
[Paragraph('Deficiency', fact_label), Paragraph(v['deficiency'], fact_value)],
[Paragraph('Overdose Risk', fact_label), Paragraph(v['overdose'], fact_value)],
]
basic_table = Table(basic_rows, colWidths=[3.5*cm, 8.0*cm])
basic_table.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('ROWBACKGROUNDS', (0,0), (-1,-1), [C_LIGHT, colors.white]),
('GRID', (0,0), (-1,-1), 0.3, C_BORDER),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 6),
]))
side_table = Table(
[[mol_img, basic_table]],
colWidths=[8.0*cm, 11.9*cm - 2*MARGIN + PAGE_W - 8*cm - 0.5*cm]
)
# adjust to fill page width
avail = PAGE_W - 2*MARGIN
side_table = Table(
[[mol_img, basic_table]],
colWidths=[7.8*cm, avail - 7.8*cm - 0.3*cm]
)
side_table.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (0,-1), 0),
('RIGHTPADDING', (0,0), (0,-1), 8),
]))
elements.append(side_table)
elements.append(Spacer(1, 0.35*cm))
# Biological Functions
func_data = [[Paragraph('<b>Biological Functions</b>', ParagraphStyle(
'FH', fontSize=10, textColor=colors.white, fontName='Helvetica-Bold'))]]
for fn in v['functions']:
func_data.append([Paragraph(f'• {fn}', body_style)])
func_table = Table(func_data, colWidths=[PAGE_W - 2*MARGIN])
func_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), C_ACCENT2),
('BACKGROUND', (0,1), (-1,-1), colors.HexColor('#f7fbff')),
('GRID', (0,0), (-1,-1), 0.3, C_BORDER),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 10),
]))
elements.append(func_table)
elements.append(Spacer(1, 0.3*cm))
# Fun fact box
ff_data = [[
Paragraph('💡', ParagraphStyle('Icon', fontSize=16, alignment=TA_CENTER)),
Paragraph(f'<b>Did you know?</b><br/>{v["fun_fact"]}',
ParagraphStyle('FF', fontSize=9, textColor=C_TEXT, leading=14))
]]
ff_table = Table(ff_data, colWidths=[1.2*cm, PAGE_W - 2*MARGIN - 1.4*cm])
ff_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor("#fff9e6")),
('BOX', (0,0), (-1,-1), 1, colors.HexColor("#f4cc5a")),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('TOPPADDING', (0,0), (-1,-1), 8),
('BOTTOMPADDING', (0,0), (-1,-1), 8),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
elements.append(ff_table)
story.append(KeepTogether(elements[:4]))
for e in elements[4:]:
story.append(e)
story.append(PageBreak())
# Remove last PageBreak
if isinstance(story[-1], PageBreak):
story.pop()
# ── Build PDF ─────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUT_PDF,
pagesize=A4,
leftMargin=MARGIN, rightMargin=MARGIN,
topMargin=MARGIN, bottomMargin=2.5*cm,
title="Vitamin Molecular Models & Facts",
author="Orris AI",
subject="Chemistry & Biochemistry of Vitamins",
)
doc.build(story, onFirstPage=add_page_elements, onLaterPages=add_page_elements)
print(f"PDF saved → {OUT_PDF}")
cd /tmp/workspace/vitamins-pdf && python3 build_pdf.py 2>&1
ls -lh /tmp/workspace/vitamins-pdf/Vitamin_Molecular_Models.pdf
Vitamin Molecular Models
PDF Document · PDF
| Vitamin | Chemical Name | Formula |
|---|---|---|
| Vitamin A | Retinol | C₂₀H₃₀O |
| Vitamin B1 | Thiamine | C₁₂H₁₇N₄OS⁺ |
| Vitamin C | Ascorbic Acid | C₆H₈O₆ |
| Vitamin D3 | Cholecalciferol | C₂₇H₄₄O |
| Vitamin E | α-Tocopherol | C₂₉H₅₀O₂ |
That model which has all vitamins are in plz give me some idea about that by picture
A scientific educational poster showing molecular structure models of 5 vitamins all together on one page. Each vitamin has its 2D chemical structural formula drawn clearly with atoms and bonds labeled. Include: Vitamin A (Retinol) with its beta-ionone ring and polyene chain, Vitamin B1 (Thiamine) with pyrimidine and thiazole rings, Vitamin C (Ascorbic Acid) with its 5-membered lactone ring and OH groups, Vitamin D3 (Cholecalciferol) with its steroid-like ring system, and Vitamin E (Alpha-Tocopherol) with its chromanol ring and long phytyl chain. Each molecule is in its own colored box with the vitamin name, chemical name, and molecular formula below it. Clean white background, color-coded atoms (oxygen in red, nitrogen in blue, sulfur in yellow, carbon in dark gray), scientific illustration style, high detail.

| Vitamin | Key Structural Feature |
|---|---|
| Vitamin A | Beta-ionone ring + long polyene chain with alternating double bonds |
| Vitamin B1 | Two rings (pyrimidine + thiazole) connected by a methylene bridge |
| Vitamin C | 5-membered lactone ring with multiple OH (hydroxyl) groups |
| Vitamin D3 | Broken steroid ring system (seco-steroid) with a long side chain |
| Vitamin E | Chromanol ring (benzene fused with oxygen ring) + long phytyl tail |
I don't want molecular structure I want project like vitamin
A school science project display board about vitamins. A large colorful tri-fold poster board on a table titled "VITAMINS" in big bold letters at the top. The board shows each vitamin (A, B, C, D, E, K) with a small hand-drawn label, real food pictures next to each (carrots for A, citrus for C, milk for D, etc.), small vitamin pill bottles and capsules arranged neatly, colorful handwritten notes and facts, cut-out pictures of fruits and vegetables glued on, bright markers used for headings, a cheerful classroom science fair style, realistic photo style like an actual student project.

| Section | What to show |
|---|---|
| Vitamin A | Carrots, sweet potato, eggs - "Good for eyes & skin" |
| Vitamin B | Whole grains, meat, nuts - "Energy & nerves" |
| Vitamin C | Oranges, lemon, strawberries - "Immunity & healing" |
| Vitamin D | Sunlight, milk, fish - "Strong bones" |
| Vitamin E | Nuts, seeds, avocado - "Antioxidant protection" |
| Vitamin K | Leafy greens, broccoli - "Blood clotting" |
Make a comparison chart of all vitamins and their benefits
A detailed and colorful comparison chart poster of all vitamins (A, B1, B2, B3, B5, B6, B7, B9, B12, C, D, E, K) and their benefits. Each vitamin has its own row with columns for: vitamin name, type (fat or water soluble), key food sources (with small food icons), main health benefits, and deficiency disease. The chart has a clean professional design with alternating colored rows, bold headers, icons for each food source, bright colors for each vitamin category, white background, large readable text, infographic style educational poster layout.

| Vitamin | Type | Key Sources | Main Benefits | Deficiency Disease |
|---|---|---|---|---|
| A | Fat-soluble | Carrots, liver, dairy | Vision, skin, immunity, growth | Night blindness, Xerophthalmia |
| B1 (Thiamine) | Water-soluble | Whole grains, pork, nuts | Energy metabolism, nerve function | Beriberi, Wernicke's syndrome |
| B2 (Riboflavin) | Water-soluble | Eggs, milk, leafy greens | Energy production, skin, eyes | Ariboflavinosis, cracked lips |
| B3 (Niacin) | Water-soluble | Meat, fish, peanuts | DNA repair, energy, cholesterol | Pellagra (4 Ds) |
| B5 (Pantothenic acid) | Water-soluble | Avocado, chicken, mushrooms | Hormone synthesis, metabolism | Fatigue, numbness (rare) |
| B6 (Pyridoxine) | Water-soluble | Bananas, fish, poultry | Brain function, red blood cells | Anemia, peripheral neuropathy |
| B7 (Biotin) | Water-soluble | Eggs, nuts, seeds | Hair, nails, fat metabolism | Hair loss, skin rash |
| B9 (Folate) | Water-soluble | Leafy greens, legumes | Cell division, DNA, pregnancy | Neural tube defects, anemia |
| B12 (Cobalamin) | Water-soluble | Meat, fish, dairy | Nerve function, red blood cells | Pernicious anemia, neuropathy |
| C | Water-soluble | Citrus, berries, peppers | Antioxidant, collagen, immunity | Scurvy |
| D | Fat-soluble | Sunlight, fish, milk | Bone strength, calcium absorption | Rickets (kids), Osteomalacia |
| E | Fat-soluble | Nuts, seeds, oils | Antioxidant, cell membranes | Hemolytic anemia, neuropathy |
| K | Fat-soluble | Leafy greens, broccoli | Blood clotting, bone health | Excessive bleeding |
Make an image poster of vitamin food sources
A vibrant and beautiful food sources poster for all vitamins. The poster is titled "VITAMIN FOOD SOURCES" in large bold colorful text at the top. The poster is divided into colorful sections, one for each vitamin: Vitamin A section shows bright orange carrots, sweet potatoes, liver, eggs, and dairy; Vitamin B section shows whole grain bread, meat, fish, eggs, nuts, bananas, and leafy greens; Vitamin C section shows juicy oranges, lemons, strawberries, kiwi, and red bell peppers; Vitamin D section shows a bright sun, salmon, tuna, egg yolk, and a glass of milk; Vitamin E section shows almonds, sunflower seeds, avocado, and spinach; Vitamin K section shows broccoli, kale, spinach, and Brussels sprouts. Each section has a bold colored banner with the vitamin name, realistic beautiful photos of the foods arranged artistically, small labels under each food. The whole poster looks like a professional health and nutrition infographic, bright colors, photorealistic food illustrations, clean white background with colorful accents.

| Vitamin | 🍽️ Best Food Sources |
|---|---|
| 🟠 A | Carrots, sweet potato, liver, eggs, dairy |
| 🟡 B-complex | Whole grains, meat, fish, eggs, nuts, bananas |
| 🍊 C | Oranges, lemon, kiwi, strawberries, bell peppers |
| ☀️ D | Sunlight, salmon, tuna, milk, egg yolk |
| 🥑 E | Almonds, sunflower seeds, avocado, spinach |
| 🥦 K | Broccoli, kale, spinach, Brussels sprouts |
Give ideas for college project for the vitamins
| # | Project | Why It Stands Out |
|---|---|---|
| 1 | Vitamin C Titration in Fruit Juices | Real lab work, quantitative results, easy to execute |
| 2 | Vitamin Intake Survey Among Students | Original data, statistical analysis, highly relevant |
| 3 | 3D Molecular Docking of Vitamin D-VDR | Modern, computational, impressive for biochemistry |
Create a research paper outline on vitamin deficiency in populations
| Vitamin | Deficiency Disease | At-Risk Population |
|---|---|---|
| A | Night blindness, Xerophthalmia | Children <5 yrs, pregnant women |
| B1 | Beriberi, Wernicke-Korsakoff | Alcoholics, malnourished |
| B9 | Neural tube defects, Megaloblastic anemia | Pregnant women |
| B12 | Pernicious anemia, Neuropathy | Vegans, elderly |
| C | Scurvy | Elderly, low-income, smokers |
| D | Rickets, Osteomalacia, Immune dysfunction | Urban, dark-skinned, indoor workers |
| Section | Word Count |
|---|---|
| Abstract | 250 |
| Introduction | 500-700 |
| Literature Review | 800-1000 |
| Vitamins & Deficiencies | 1200-1500 |
| Causative Factors | 600-800 |
| Health Consequences | 500-700 |
| Interventions | 800-1000 |
| Future Directions | 300-400 |
| Conclusion | 250-350 |
| Total | ~5,200-6,700 words |
Give some project models ideas for the school project
A collage of 4 creative school project model ideas about vitamins shown as real physical models: Top left - a colorful tri-fold display board with vitamin charts, food pictures, and pill bottles arranged neatly on a table; Top right - a 3D model made of clay and foam balls showing vitamin molecules on a wooden board with labels; Bottom left - a vitamin wheel spinner made from cardboard with each section showing a different vitamin, its food sources drawn with markers; Bottom right - a food pyramid model made from cardboard boxes and real food packaging showing which foods contain which vitamins. All models look like actual student-made school science fair projects, bright classroom setting, creative and colorful, realistic photo style.

| Material | Used For |
|---|---|
| Colored cardboard | Display board, cube, wheel |
| Clay (red, black, white, yellow) | Molecular models |
| Toothpicks / sticks | Atom bonds in molecular model |
| Markers & color pens | Labeling, decorating |
| Food magazine cutouts / printouts | Food source visuals |
| Glue, scissors, brass pins | Assembly |
| Small pill bottles (empty) | Display supplements |
| Project | Difficulty | Time Needed | Wow Factor |
|---|---|---|---|
| Tri-fold Board | ⭐ Easy | 1 day | ⭐⭐⭐ |
| Clay Molecule | ⭐⭐ Medium | 2 days | ⭐⭐⭐⭐ |
| Spinner Wheel | ⭐⭐ Medium | 1 day | ⭐⭐⭐⭐ |
| Food Basket | ⭐ Easy | Half day | ⭐⭐⭐ |
| 3D Cube | ⭐⭐ Medium | 1 day | ⭐⭐⭐⭐ |
| Vitamin Tree | ⭐⭐⭐ Hard | 2-3 days | ⭐⭐⭐⭐⭐ |
Give some idea like this but in innovative way at college level
An innovative college-level science exhibition project display about vitamins. A professional and advanced tri-fold board on a table but much more sophisticated than a school project. The board has: a large digital tablet or screen embedded showing vitamin deficiency graphs and charts, QR codes on the board that visitors can scan, 3D printed molecular models of Vitamin C and Vitamin D placed on the table in front, real blood test report printouts showing vitamin D deficiency data pinned on the board, glass test tubes with colored liquids labeled with vitamin names, a small LED light setup showing UV light converting Vitamin D, printed scientific journal abstracts pinned as references, professional typography and design, university science fair setting, realistic photo style, impressive and modern.

| Feature | School Board (Image) | College Board (Innovative) |
|---|---|---|
| Labels | Handwritten markers | Printed professional typography |
| Food display | Real food/plastic models | Test tubes, 3D prints, live demo |
| Data | General facts | Your own survey/experiment data |
| References | None | Pinned PubMed journal abstracts |
| Technology | None | QR codes, tablet, LED setup |
| Interactivity | Look only | Visitors scan, watch demo, test |
| Design | Colorful craft style | Clean, minimalist, scientific |