RheaKitScientific UI surfaces for SwiftUI
Components

BioRendererView

Render PDB and SMILES structures in 3D, then hand the active molecule to the tribunal for analysis.

BioRendererView

BioRendererView is a 3D molecular visualization surface powered by 3Dmol.js inside a WKWebView. It supports PDB lookup, SMILES input, multiple rendering styles, and tribunal-backed analysis.

Usage

import RheaKit

struct MoleculeTab: View {
    var body: some View {
        BioRendererView()
    }
}

The view is self-contained. Drop it into a TabView or present it modally.

Features

  • PDB lookup from RCSB
  • SMILES mode for small molecules
  • Cartoon, stick, sphere, line, and cross rendering
  • Spectrum, chain, secondary structure, element, and residue color schemes
  • Touch and mouse interaction
  • Preset molecules for rapid demos and testing
  • Analysis panel that forwards the active structure to the backend
  • Metadata display for title, method, resolution, and organism

Presets

PDB IDName
1CRNCrambin
1BNADNA B-form
4HHBHemoglobin
1ATPATP synthase
6LU7SARS-CoV-2 Mpro
1GZMGFP

Render styles

StyleDescription
cartoonSecondary structure ribbons
stickBall-and-stick bonds
sphereSpace-filling CPK spheres
lineWireframe bonds
crossCross markers at atom positions

Notes

  • 3Dmol-min.js is bundled locally, so rendering does not depend on a CDN
  • PDB files come from RCSB
  • Visualization is client-side; only fetch and AI analysis require network

On this page