SUMMARY: Programs such as VMD and PyMOL are excellent tools for analyzing macromolecular structures, but they do not implement many of the advanced rendering techniques common in the film and video-game industries. In contrast, the open-source program Blender is a general-purpose tool for industry-standard rendering/visualization, but its user interface is poorly suited for rigorous scientific analysis. We present BlendMol, a Blender plugin that imports VMD or PyMOL scenes into Blender. BlendMol-generated images are well suited for use in manuscripts, outreach programs, websites and classes. AVAILABILITY AND IMPLEMENTATION: BlendMol is available free of charge from http://durrantlab.com/blendmol/. It is written in Python. SUPPLEMENTARY INFORMATION: Supplementary data are available at Bioinformatics online.
SUMMARY: Programs such as VMD and PyMOL are excellent tools for analyzing macromolecular structures, but they do not implement many of the advanced rendering techniques common in the film and video-game industries. In contrast, the open-source program Blender is a general-purpose tool for industry-standard rendering/visualization, but its user interface is poorly suited for rigorous scientific analysis. We present BlendMol, a Blender plugin that imports VMD or PyMOL scenes into Blender. BlendMol-generated images are well suited for use in manuscripts, outreach programs, websites and classes. AVAILABILITY AND IMPLEMENTATION: BlendMol is available free of charge from http://durrantlab.com/blendmol/. It is written in Python. SUPPLEMENTARY INFORMATION: Supplementary data are available at Bioinformatics online.
Molecular modeling plays a prominent role in biological and chemical research. While mathematical analysis is critical, it remains true that many insights come only from visual inspection. Programs dedicated to macromolecular visualization and analysis (e.g. VMD and PyMOL) (DeLano, 2002; Humphrey ) generate images that are scientifically rigorous and esthetically pleasing. Artistic considerations are far from frivolous. Poor esthetics are distracting and so impede scientific communication. Advanced rendering techniques such as photo-realistic shadows and lighting can convey subtle but important structural information.Beyond macromolecular visualization, the film and video-game industries have also done much to advance computer graphics in recent years. The free, open-source program Blender implements many industry-standard rendering tools. Though popular molecular-visualization programs have impressive rendering engines (Stone ), they cannot yet match Blender (Fig. 1).
Fig. 1.
A green fluorescent protein with a highlighted central helix (Color version of this figure is available at Bioinformatics online.)
A green fluorescent protein with a highlighted central helix (Color version of this figure is available at Bioinformatics online.)General-purpose modeling programs such as Blender are thus increasingly popular tools for producing photo-realistic macromolecular images and videos (Johnson and Hertig, 2014). These programs allow users to position macromolecules in their actual microscopic contexts, providing much needed scientific perspective (see, e.g. the June 2, 2017 and May 6, 2016 covers of Science) (Hastie ; Stepanek and Pigino, 2016). Companies such as Digizyme and Random42 produce and sell these visualizations. And universities ranging from Harvard Medical School to the Cleveland Institute of Art teach classes in macromolecular visualization.Several Blender plugins can load molecular models independent of any dedicated molecular-visualization program (Andrei ). Given that VMD and PyMOL have been in development for roughly 20 years, independently developed Blender plugins typically lack many of their powerful visualization features. Efforts to implement these features demand a complex, difficult-to-maintain codebase, perhaps explaining why so many previously published molecular-visualization plugins are no longer functional. Beyond that, the Blender UI itself, while well suited for visualization, is not convenient for macromolecular analysis. Researchers will likely analyze their molecular systems in programs such as VMD or PyMOL regardless.Our past macromolecular-visualization workflow has thus required us to switch between VMD and Blender. We first analyze our molecular structures in VMD. Then, when preparing a final image, we separately reconstruct the VMD-visualized scene in Blender. This reconstruction process is tedious. Both VMD and PyMOL can export molecular meshes to Blender-compatible file formats. But after export, these files must be separately imported into Blender. Both VMD and PyMOL save meshes using camera coordinates rather than the world coordinates of the models themselves, so two imported molecular meshes will not align unless the same camera position is used on export. Overcoming this challenge requires TCL or Python scripts that standardize the camera position. Finally, the exported meshes themselves are often suboptimal. For example, we routinely have to remove duplicate mesh vertices within Blender after import. A better approach is to create a plugin that seamlessly bridges VMD/PyMOL and Blender. Importing VMD/PyMOL scenes into Blender should take minimal effort, and steps such as adjusting coordinates and optimizing mesh geometries should be automated.We here present BlendMol, a Blender plugin that interfaces with the VMD or PyMOL executable to easily import VMD Visualization State and PyMOL Session files. One can also work entirely within Blender, without ever opening a dedicated macromolecular-visualization program. If the user provides a Protein Data Bank (PDB) ID or a PDB file, the plugin uses VMD or PyMOL to automatically generate a simple, default visualization.The BlendMol plugin has been tested in Blender 2.79 on Windows 10 Home (1709), macOS High Sierra (10.13.3) and Ubuntu Linux (16.04 LTS). We release it under the terms of the GNU GPL Version 3 license. A copy is available free of charge from http://durrantlab.com/blendmol/. The Supplementary Material includes detailed installation instructions (Supplementary Video S1), as well as examples of use.
2 Software comparison
To understand its utility, it is helpful to compare BlendMol to other programs for macromolecular visualization.
2.1 Desktop programs
BlendMol and dedicated programs such as VMD (Humphrey ) or PyMOL (DeLano, 2002) do not occupy the same niche. The later include tools for analyzing atomic-resolution structures and simulations. In contrast, BlendMol serves as a bridge between VMD/PyMOL and Blender. Within Blender, molecules are stored as meshes, not collections of atoms with exact coordinates. Rather than analysis, the goal is to create enhanced images for use in journals, outreach programs, websites and classes.
The Supplementary Material shows how BlendMol can facilitate browser-based macromolecular visualization. In that sense, it is similar to JavaScript libraries such as 3Dmol.js (Rego and Koes, 2015), NGL Viewer (Rose and Hildebrand, 2015; Rose ) and JSmol/Jmol (Hanson, 2010; Hanson ). These libraries are ideal for rapidly generating browser-based molecular representations on the fly. They process input (PDB) files directly, without requiring intermediate programs such as VMD or Blender.BlendMol is useful when visualizations can be pre-rendered. For example, Blender can ‘bake’ photorealistic shadows/lighting onto browser-compatible image textures (Supplementary Fig. S4). In contrast, JavaScript-only libraries cannot perform these resource-intensive calculations in real time. Furthermore, to the best of our knowledge, no browser-based macromolecular-visualization library can display molecules in virtual reality (Supplementary Fig. S5). BlendMol, together with the Babylon.JS game engine (see Supplementary Material), provides a more immersive experience.
2.3 Other modeling-software plugins
To our knowledge, no other plugin so seamlessly integrates popular macromolecular-analysis and computer-graphics programs (e.g. VMD/PyMOL and Blender). BlendMol allows users to import into Blender the very representations and coloring schemes they use for analysis in VMD or PyMOL. Advanced rendering thus becomes but another step in their existing workflows. That having been said, there are several other molecular-visualization plugins for Blender and similar 3D modeling environments. The Supplementary Material includes a detailed comparison.
3 Conclusion
BlendMol bridges popular macromolecular-analysis programs and the open-source, general-purpose modeling program Blender. It allows scientists to visualize molecules using state-of-the-art techniques, thus furthering collaborations and inspiring students. The Supplementary Material describes general limitations and future directions. It also shows how advanced lighting/materials can improve realism and communicate scientific information (Supplementary Fig. S2). BlendMol also facilitates 3D printing (Supplementary Fig. S3), in-browser visualization (Supplementary Fig. S4), virtual reality (Supplementary Fig. S5), video rendering (Supplementary Fig. S6 and Video S2) and molecular-dynamics visualization (Rajendiran and Durrant, 2018) (Supplementary Videos S3 and S4).Click here for additional data file.
Authors: Kathryn M Hastie; Michelle A Zandonatti; Lara M Kleinfelter; Megan L Heinrich; Megan M Rowland; Kartik Chandran; Luis M Branco; James E Robinson; Robert F Garry; Erica Ollmann Saphire Journal: Science Date: 2017-06-02 Impact factor: 47.728
Authors: Kevin C Cassidy; Roni M Lahr; Jesse C Kaminsky; Stephanie Mack; Bruno D Fonseca; Subha R Das; Andrea J Berman; Jacob D Durrant Journal: Structure Date: 2019-10-31 Impact factor: 5.006
Authors: Kevin C Cassidy; Jan Šefčík; Yogindra Raghav; Alexander Chang; Jacob D Durrant Journal: PLoS Comput Biol Date: 2020-03-31 Impact factor: 4.475