What FoldRay is
FoldRay is a browser-based app that aims to make beautiful protein structure visualisation quick and easy. Load a structure, pick a style, and download a ray-traced render in seconds. Detailed customisation options also let you make every picture your own.
Ray tracing follows light as it bounces around the molecule. It takes a little time and computing power, but the result has real shadows, soft light, and realistic materials such as glass and metal, which makes an enormous difference to the quality of a visualisation.
Everything happens in your browser, on your computer. Your structures are never uploaded, so they stay private.
What you need
- A desktop browser with WebGPU: Chrome or Edge 113+, Safari 26+ on macOS 26, or Firefox 141+ (147+ on an Apple-silicon Mac).
- A screen at least 1124 × 520 pixels.
- A graphics card. Most should work, but rendering speed depends on the card.
FoldRay is in beta (version 0.1.0), so expect the odd rough edge.
Getting started
FoldRay opens with a Load a structure box. There are three ways in:
- From the PDB. Type a four-character ID like
4HHBand press Load. - From AlphaFold DB. Type a UniProt accession like
P69905and press Load. - From your computer. Drop a
.cifor.pdbfile anywhere on the page, or pick one with Browse files…. Gzipped files work too, up to 64 MB.

After that, the File menu in the top bar does all of the same things.
A few things to know:
- You get the first biological assembly. That's the working molecule, not just the piece the crystal happened to hold. It can be big: a virus loads as the whole capsid. For just the deposited chains, choose Asymmetric unit under File → Molecule → Build.
- A file with several models, like an NMR ensemble, shows model 1.
- Loading a new structure clears your finished renders and your undo history. Download anything you want to keep first.
Once a structure is open, the settings are on the left, the picture in the middle, and your layers and Create Image on the right.

Preview, Live, Result, Compare
The picture in the middle has four modes. Switch between them with the buttons along its bottom edge.

| Mode | What it's for |
|---|---|
| Preview | A fast, plain view for finding your angle and picking parts. It uses a standard viewer style, so most of what you set on the left only shows up in Live. |
| Live | The real thing. The ray tracer draws what you're looking at and keeps refining it. |
| Result | Your finished pictures, one at a time. Zoom in, touch up, download. |
| Compare | Two finished pictures against each other: Wipe, Split or Overlay. |
Live
Press Live and the picture starts grainy, then sharpens. The counter in the bottom-left corner shows how far along it is: 43 / 128 · 976x686 means 43 of 128 samples, on a 976 × 686 picture.
Drag to orbit and scroll to zoom, same as Preview. Any change starts it over, whether it's the camera, a colour or a material.
Quick Image keeps the Live picture exactly as it is, at the size of the stage. It's the fast way to save a view without a full render.
Alpha, White and Black, at the bottom right, set the background. Alpha means transparent (that's the checkerboard).
Styles
A Style is a ready-made look: representation, colour, material and lighting in one go. There are 90 of them, and they're the fastest way to a good picture.
Hover over the Styles bar above the picture to open the gallery. The Recommended row picks Styles that suit your structure. Why these? explains the picks, and Randomize styles deals a fresh hand. Below that, the rest are grouped by subject: small proteins, domains, multimers, interfaces, nucleic acids, ligands, ions, big assemblies, pLDDT, B-factor and a few concept pieces.


To use one, click its tile, then press Apply style. The tile's card also lets you swap in a different Colour scheme first.
Styles can bring layers. A Style may add its own selection layers and replace your visible ones for the parts it covers. Layers override the settings on the left, so remove them if you want those settings to apply again.
How Styles behave
- They stack. A Style only replaces the parts it has an opinion on: protein, nucleic acids, ligands or ions. So a ligand Style followed by a protein Style gives you both. Lighting and lens always come from the latest one.
- They start clean. In the parts a Style replaces, anything it doesn't set goes back to the default.
- They leave some things alone: your camera, the Output settings, water and hidden layers.
- They finish the picture. The card's Improve image switch is on by default, so the Style's own touch-up is applied to your next render. Switch it off if you'd rather not.
- They can be undone. Press Ctrl+Z, or Restore my settings to get back what you had before your first Style.
Confidence Styles need pLDDT values in the file, and B-factor Styles need an experimental structure. On anything else the colour falls back.
Many Styles use depth of field and will ask you to pick a focus point.
You can also use Styles as a solid starting point and then customise the look.
Components and looks

The Protein card on the left sets how the protein is drawn. The Components card covers everything else: nucleic acids, ligands, ions and water. Opening one card closes the others; Alt-click a card to keep the rest open.
Each component has an Include in render box. Nucleic acids switch on by themselves when the file has DNA or RNA. Ligands and ions start switched on. Water starts switched off: tick its box to bring it in.
| Component | Looks |
|---|---|
| Protein | Cartoon, Ribbon, Surface, Ball & stick, Sticks, Spheres |
| Nucleic acids | Blocks, Rings, Tape, Ribbon, Ball & stick, Sticks, Spheres, Surface |
| Ligands | Ball & stick, Sticks, Spheres |
| Ions | Smooth spheres, Faceted markers, Octahedral markers |
| Water | Small spheres |






Cartoons and ribbons come in several types, under Type. Try a few; they're more different than the names suggest.











Surfaces have four levels of detail. To show a ligand in its pocket, or other fine detail, you may need a higher level.




Atoms: Ball & stick, Sticks and Spheres can draw all atoms or just side chains. Hydrogens are hidden unless you tick Show hydrogens.
Advanced settings has sliders for the shape: helix, sheet and loop width, thickness and edge rounding, rail size, arrowheads and so on. If one slider would make a shape impossible, FoldRay nudges another to match. Switching to a different look resets these sliders.
Secondary structure (Protein card): Automatic uses the file's own helix and sheet records, and works them out when there aren't any. You can also force DSSP or Zhang–Skolnick.
A few more:
- Hide polyatomic ions (Ligands) hides sulfate, phosphate and friends, the usual leftovers from crystallisation.
- Want just a few waters? Switch water on, select the ones you want, make a layer, then switch water off again. The layer keeps its waters.
Colour

Every card has a Colour menu. What's on offer depends on the component:
| Component | Colour options |
|---|---|
| Protein | Uniform, By element, By chain, N → C gradient, X, Y or Z-axis gradient |
| Nucleic acids | By base, By phosphate / sugar / base, By strand, 5′ → 3′ gradient, By element, Uniform |
| Ligands | By element, Uniform, By chain, X, Y or Z-axis gradient |
| Ions | By element, Uniform |
| Water | One colour |
- Uniform is one colour. Protein has 12 presets to click; for anything else, use the colour wheel or type a hex code like
#58BFA8. - N → C runs from the start of each chain to its end. Handy for following a fold.
- X, Y and Z-axis gradients sweep across the molecule along the file's own axes, not the screen's.
- Gradients take 2 to 5 colours. + Add colour adds a new end colour.
- By chain, By element and the other "by" options list what's in your structure, with a colour for each. Change any of them.
- By element only shows up for atom looks and surfaces. A cartoon has no elements to colour.
pLDDT confidence appears for predicted structures, and B-factor for experimental structures that carry it. A note under the menu tells you when one is available.
Materials and lighting
This is where ray tracing earns its keep. None of it shows in Preview, so switch to Live to see what you're doing.
Materials
Every component gets the same 12:












Emission and Bioluminescent get an Emission strength slider. Every component has Opacity under Advanced settings.
Lighting

Pick an Illumination in the Lighting card: Autumn meadow (the default), Blue studio, Dark studio, Neutral softbox, Soft overcast, Clear directional, Cool night, Fluorescence or Glass studio. It lights the molecule but never shows up behind it. The background is always Alpha, White or Black.
Drag the compass to move the light around; the arrow keys nudge it. Under Advanced settings:
- Strength: 0 is off, 1 is as designed, 4 is as bright as it goes.
- Anchor: Camera-relative keeps the light where it is as you orbit. World fixes it to the molecule.
- Elevation and Azimuth: the compass angles, if you'd rather type them.
- Reflections and refraction: what shiny and glass surfaces reflect. It can differ from the light, for example studio softboxes or a plain colour.
Shiny materials look quite calm under Autumn meadow. For more sparkle, try Neutral softbox or a studio.
View transform
The last step turns light into screen colours. It's in Output → Advanced settings.
- Filmic (the default): punchy, with highlights that roll off gently.
- AgX: softer and more neutral.
- Standard: no tone curve, so bright spots can blow out.
- Raw: linear data. If you want to grade yourself.
Selections and layers
Want the active site in gold and everything else in soft grey? Use a layer. A layer is one part of the structure with its own look, colour and material.
Make a layer

- In the Selection layers panel on the right, press Select.
- Pick what you want. Click residues in the 3D view, or open Sequence above the picture and click or drag along the chain. The Select a component and Select a chain buttons grab whole pieces at once.
- Press Create layer, then give it a representation, colour and material.
You can have up to 16 layers.
Picking tips
- A chain or component button replaces your selection. Hold Ctrl or Shift to add to it instead.
- In the sequence strip, a click toggles one residue and Shift-click grabs a range. A drag that starts on an unselected residue adds; one that starts on a selected residue removes.
- Residue, Chain and Entity set how much one click in 3D grabs. Entity means every copy of that molecule.
- Clear empties the selection. Escape or a click outside closes the sequence strip.
- Selecting only works in Preview. In Live, a click just inspects.

Working with layers
- One layer holds one kind of thing: protein, nucleic acid, ligand, ion or water. If your selection mixes them, make two layers.
- Hide takes the selection out of the picture. Hidden always wins, whatever the layer order or any Style you apply later.
- Edit selection lets you add or remove residues. Press Save selection when you're done.
- Drag layers to reorder them. The eye button hides a layer without deleting it.
- The preview only shows a layer's colour. Its shape and material appear in Live and in the final picture.
- Applying a Style swaps out your visible layers for the parts that Style covers. Hidden layers stay put.
- Deleted one by accident? Ctrl+Z brings it back.
Inspect is the other mode, and the one you start in. Click a residue to fly to it and see what's around it. Click empty space to zoom back out. Pressing a residue in the sequence strip does the same.
The camera
The camera works the same in Preview and Live:
- Left-drag to rotate.
- Right-drag (or Ctrl + drag) to pan.
- Scroll to zoom.
Fit visible structure frames everything on show. Save camera view remembers the current angle and Go to saved view brings it back. You get one saved view per structure, and it's kept in your session.

Focal length (Camera card) runs from 8 to 300 mm, 29 mm by default. FoldRay keeps the molecule the same size as you change it, so only the perspective moves. Short is wide and dramatic. Long is flat, like a technical drawing.
Depth of field blurs what's out of focus. Tick Enable camera depth of field, then set the F-stop: lower means more blur. The focus sits at the centre of the frame until you press Pick focus in the preview and click an atom or residue. Auto focus puts it back in the centre.
Camera moves count as undo steps. Undo a setting without losing your angle with Ctrl+Alt+Z.
Making the final picture

When Live looks right, press Create Image at the bottom right. It renders at the size and quality set in the Output card on the left.

| Quality profile | Size | Samples |
|---|---|---|
| Draft | 512 px | 32 |
| Review | 1024 px | 64 |
| Default | 1024 px | 128 |
| High | 2048 px | 256 |
| Ultra | 3840 px | 512 |
More samples means less grain and a longer wait. On a desktop graphics card, Default takes seconds. On laptop graphics, anything from under a minute to several, depending on the structure. A progress bar shows the time left, and Cancel stops the render.
Aspect ratio sets the shape: square, landscape or portrait. It keeps the long edge, so High at 16:9 comes out 2048 × 1152. In Preview, two dashed lines mark the edges of the final picture. Anything outside them gets cropped, and Live doesn't show them, so check in Preview. Advanced settings lets you type an exact width, height and sample count, and turn denoising on or off.
Where pictures go
Finished pictures land in the tray under the stage and open in Result. The tray holds 24. It isn't saved anywhere and it empties when you reload or open a new structure, so download the keepers.

In Result you can:
- Download PNG: the picture as you see it, background included (transparent if you chose Alpha).
- Download TIFF: a 32-bit linear file straight from the renderer, before any tone mapping or touch-ups. For people who like to grade their own.
- Download session: the whole setup as a
.foldrayfile, structure included. It does not save the earlier images and their setups in the bottom tray, just the current setup. - Apply: bring that picture's settings back, camera and all. Apply style only takes just its Style.
- Zoom with +, −, Fit and 1:1, or double-click the picture.
Improve image
Touch up a finished picture without rendering it again: exposure, highlights, shadows, contrast, warmth, tint, saturation, brightness, sharpness, glow and halo. Halo is a soft light spilling into a transparent background, so it needs a bit of empty space around the molecule to show. Auto improve applies a gentle preset. Reset brings back the original.
Note: your adjustments carry over to every later render until you press Reset.
Sessions and undo
A session is your whole setup in one .foldray file: the structure itself, the camera, every setting, your layers and the active Style. Open it later and you're right back where you left off.
- Save with File → Save session as…. In Result, Download session saves the settings behind the picture on screen.
- Open with File → Open session…, or drop the file on the page.
- The structure travels inside the file, so sharing a session shares the coordinates too.
- Finished pictures aren't in the session. Download them separately.
- FoldRay never saves on its own. The top bar says Unsaved changes when there's something to save, and your browser asks before you close the tab.
- New session starts from scratch. It asks first if you haven't saved.

Undo
Undo and redo cover almost everything: settings, layers, Styles, even the camera. You get 50 steps. Opening a structure or session starts the history fresh.
| Keys | What it does |
|---|---|
| Ctrl+Z | Undo |
| Ctrl+Shift+Z, or Ctrl+Y | Redo |
| Ctrl+Alt+Z | Undo, but leave the camera where it is |
| Esc | Close the sequence strip, the Styles gallery or a pop-up |
| + − 0 1 | Zoom in, out, fit and 1:1 in Result |
| Alt+← or → | Move a picture along the tray |

On a Mac, use ⌘ for Ctrl. If Ctrl + Alt + Z doesn't play nicely with your keyboard, the camera kept buttons next to undo and redo in the top bar do the same job.
Troubleshooting
FoldRay reports what it's doing in the status line at the top. If a message is cut off, hover over it to read the rest.
"This browser has no WebGPU"
Use Chrome or Edge 113+, Safari 26+ on macOS 26, or Firefox 141+ (147+ on an Apple-silicon Mac), on a desktop computer.
"This page is not on a secure origin"
Browsers only allow WebGPU on https:// pages. Open the https address.
"No GPU is available to this browser"
Turn on graphics (hardware) acceleration in your browser settings and reload. In Chrome, chrome://gpu shows what's going on.
"This app needs a bigger tab or screen"
FoldRay needs at least 1124 × 520 pixels, so make the window bigger. It's built for a mouse and keyboard.
My ligand isn't in the picture
Ligands and ions are in the render when you open a structure, but a Style that doesn't feature them switches them off. Tick Include in render in the Components card to bring them back.
I changed a setting and nothing happened
The Style you applied probably added selection layers, and a layer overrides the settings on the left for the parts it covers. Remove the layers (or the ones covering that part) and your settings apply again.
The ID won't load
PDB IDs are four characters starting with a digit, like 1UBQ. AlphaFold wants a plain UniProt accession, like P69905, without an isoform suffix. Files over 64 MB are too big. If a download fails, whatever you had open stays open.
The file won't open
FoldRay reads .cif and .pdb files, gzipped or not. Coarse-grained and integrative models aren't supported yet.
It's slow
The work happens on your GPU, so laptops take longer. Use Draft or Review while you experiment and save High and Ultra for the keeper. Huge structures, like a whole virus, are slow on any machine: try the asymmetric unit or hide what you don't need. If a size is too big for your GPU, FoldRay says so and tells you the largest it can do.
A red note appeared over the picture
Part of your setup couldn't be drawn. The note says which part and why.
My renders disappeared
The tray empties when you reload or open another structure. Download the pictures you want, or save a session.
Still stuck?
Send feedback and say what happened. A screenshot helps.