Rendering with Fresnel

Link to the Gist

It's convenient to have a nice rendering tool for molecular systems. ChimeraX is the best GUI option hands down, but sometimes a scripted option is better because it's shareable, repeatable and often more customisable. The Fresnel library is a great option for python.

This is a short post just to show how Fresnel works (see Gist below). I wrote this example code a couple of years ago, and tested it yesterday - it's still current. One nice thing about rendering proteins from scratch is that it really forces you to realise that the core of computational med-chemistry is just a bunch of 3 x n_atoms arrays, to represent the xyz coordinates, and n_atoms x n_atoms arrays for the bonding/adjacency matrix. Realising this takes one from using tools towards writing tools.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.