Journal:Molmil: A molecular viewer for the PDB and beyond
|Full article title||Molmil: A molecular viewer for the PDB and beyond|
|Journal||Journal of Cheminformatics|
|Author(s)||Bekker, G.J.; Nakamura, H.; Kinjo, A.R.|
|Author affiliation(s)||Osaka University|
|Primary contact||Email: gertjan dot bekker at protein dot osaka-u dot ac dot jp|
|Volume and issue||8 (1)|
|Distribution license||Creative Commons Attribution 4.0 International|
Keywords: WebGL, protein structure visualization, molecular dynamics
Molecular viewers are a vital tool for our understanding of protein structures and functions. The shift from regular desktop platforms such as Windows, Mac OSX and Linux to mobile platforms such as iOS and Android in the last half-decade, however, prevents traditional online molecular viewers such as PDBj’s previously developed jV and the popular Jmol from running on these new platforms as these platforms do not support Java Applets. For mobile platforms a native application (i.e., an application specifically designed and optimized for each of these platforms) can be created and distributed via their respective application stores. However, with new platforms on the horizon, or already available, in addition to the already established desktop platforms, it would be a tedious and inefficient job to make a molecular viewer available on all platforms, current and future.
Implementation and capabilities
Molmil has been designed as a lightweight and full-featured viewer for the PDB. As such, Molmil can load legacy PDB flat files, PDBx/mmCIF and PDBML formatted files. Molmil can also load a custom format which we call PDBx/mmJSON, which is a JSON version of the PDBx/mmCIF data. Other formats which Molmil supports are GRO, MOL2, MDL, CCP4 (for electron density maps and EM data), MyPresto’s trajectory format, Gromacs’ TRR and XTC trajectory formats and our own developed MPBF polygon format which we are using for our eF-site service for large structures. Users can also load these files from their local hard drive.
The PDBx/mmJSON (mmJSON for short) format was specifically developed for Molmil. In a nutshell, it is a JSON representation of the mmCIF format, made by translating the data structure based on the STAR syntax, into a series of associative arrays, standard arrays, integers, floats and null values. A major advantage of this format is that it can be directly interpreted by modern browsers, that is, a typed data structure is available once the JSON data has been parsed by a browser. Such is not the case for PDBML (XML) or mmCIF formats. In addition, the file size is generally smaller in the mmJSON format than in PDBML or mmCIF formats. An analysis showed that the compressed mmJSON is on average approximately 33 or 56 % smaller than a compressed mmCIF or PDBML formatted file, respectively, making it more suitable for web deployment. For large structures another derivative of mmJSON is currently under development to only include the minimal amount of information in the file required to display the backbone structure. This mmJSON variant is not yet offered as a service by PDBj, but can be previewed by using Molmil: http://gjbekker.github.io/molmil/#molmil.loadPDBlite(‘3j3q’). Implementation details regarding the parsers used to load the mmCIF data, as well as information regarding the mmJSON format and its relation with the mmCIF format is given on its Github page at http://github.com/gjbekker/cif-parsers.
Displaying large entries
One of the design goals of Molmil was to create a molecular viewer which can produce high-quality images suitable for publications. On the other hand, it should also be able to scale to very large structures available in the Protein Data Bank (PDB) consisting of hundreds of thousands to millions of atoms. By default WebGL can only display a limited amount of polygons. However, by using an extension to WebGL (OES_element_index_uint) which is available on all modern platforms, it becomes possible to efficiently render very large or highly detailed structures. Molmil uses this extension to build high quality geometry for small and medium sized structures and dynamically scale down the quality as the size of the structure increases to gigantic proportions (such as the HIV-1 capsid; 3j3q, see Fig. 1). Note that to be able to load these gigantic structures, an adequate amount of memory is still required, which is often not available on smartphones, tablets and older systems. To enable high-quality lighting even when using polygon models of low detail for these gigantic structures, Molmil uses tuned Phong shading which can accurately calculate the lighting even for simplistic polygon models.
Rendering and coloring modes
Molmil supports several rendering and coloring modes which can be selected using a point-and-click based menu. In the top-right corner of Molmil’s canvas the structures menu can be enabled (see also Fig. 2). This structures menu lists all the loaded structures in the current canvas. Via a hierarchical tree selection system chains and residues belonging to the structure can be explored. Right clicking on the structures, chains or residues displays a context menu via which users can change the display and color modes. Double clicking on the residues causes Molmil to focus and jump to the selected residue. Furthermore, right-clicking on the atoms or cartoon rendering within the canvas also enables users to interactively modify the rendering and color mode of the selected atom or the residue/chain the atom belongs to. These controls are reminiscent from Yasara, which uses a similar hierarchical structures menu and context menu to modify the display and color modes of the loaded structures. Molmil currently supports VDW, ball-and-stick, stick, Cα-trace, tube, cartoon, rocket and coarse surface representations. Structures can be colored by their secondary structure elements, CPK, group (blue-to-red gradient), chain, ABEGO or custom color assignments. Views can be outputted as high quality PNG images, suitable for publication without requiring additional plugins. An overview of Molmil’s various rendering modes can be found in Additional file 1: Appendix I.
It is also possible to load PDB files with multiple models and play them as animations, by using the “Animation” control panel which is accessible from Molmil’s main menu (see Fig. 2). PDBj’s Promode Elastic service uses this functionality. It is also possible to use this animation functionality using alternative formats to, for example, play molecular dynamics trajectories. Currently myPresto’s trajectory format and Gromacs’s TRR and XTC trajectory formats are supported by Molmil and support for other formats can be easily added. Although web browsers can be used to produce PNG images by Molmil, they cannot make MP4 movies. However, by using a server-side REST service it is possible to stitch the images of each frame in the trajectory together to build a movie. For obvious reasons (potential abuse) we have not made this functionality available as a public REST service, but users can obtain this application from Molmil’s Github page which they can then run on their own workstation so that their own machine will then build the movie. Using this tool, Molmil can be used to produce high quality MP4 videos of molecular simulation trajectories.
Molmil has been integrated in many of PDBj’s services, including: Mine PDB Explorer Asymmetric Unit viewer; Mine PDB Explorer Biological Unit viewer; EDMap viewer (for electron densities); Sequence Navigator; Structure Navigator; Promode Elastic (for viewing protein mobility analysed via Normal Mode Analysis) and Chemie (PDBj’s new chemical component service). More recently, the eF-site service (for viewing the electrostatic surface of proteins) was also updated with an integrated Molmil viewer and the Biological Unit viewer was also upgraded. Furthermore, high quality PNG images of all the released PDB entries on the PDBj website have also been generated by Molmil in an automated manner. More information regarding Molmil as well as use-cases and command-line examples can be found at http://github.com/gjbekker/molmil/wiki.
Although Molmil exposes some of PyMol’s commands via Molmil’s command line, support is currently limited to a small subset of commands for selection, styling and coloring of structures. Also, although Molmil can be used to load CCP4 files for electron densities and generate coarse surfaces for proteins, high-quality surfaces such as MSMS and solvent-accessible surfaces are currently not yet supported, partly because of the high computational requirements involved in generating highly detailed surfaces.
Since Molmil’s initial release in 2013, other WebGL-based molecular viewers have also emerged. E.g., JSmol (JSmol/WebGL) has been extended with a basic WebGL based viewer and PV was developed by SWISS-MODEL and is currently also being used by the RCSB-PDB. Other WebGL-based molecular viewers are listed in Additional file 1: Appendix II. Molmil however offers high-quality graphics due to using highly detailed polygon models when possible, while it can scale up to display very large structures by dynamically reducing the quality to render these large structures in combination with a finely tuned Phong shader for smooth and realistic shading even for lower detailed models. Furthermore, Molmil can also be used to easily load files from the users’ hard drive, including molecular simulation trajectories, and comes with a readily accessible command line interface, which is also programmable by embedding the commands in the URL, as shown in Fig. 2.
We have designed a versatile, high-performance, high-quality molecular viewer for the web. We have also deployed the molecular viewer on the PDBj web application as part of various services to aid users as well as demonstrate some of the capabilities of Molmil. The source code is available on GitHub as well as documentation on how to use and/or deploy Molmil on your own website. Questions or requests can be made either via Molmil’s GitHub page or via our contact page http://pdbj.org/contact.
Availability and requirements
Project name: Molmil
Project home page: http://github.com/gjbekker/molmil
Operating system(s): Platform independent
Other requirements: WebGL
Licence: GNU LGPLv3
Restrictions for use by non-academics: None
API: Application programming interface
CSS3: Cascade Style Sheets Version 3
EM: Electron microscopy
GPU: Graphics processing unit
HTML5: Hypertext Markup Language Version 5
MPBF: Molmil Polygon Binary Format
PDB: Protein Data Bank
PDBj: Protein Data Bank Japan
PNG: Portable Network Graphics
REST: Representational State Transfer
VDW: Van Der Waals
XML: extendible meta language
HN and GB conceived the idea. GB designed and coded the software, and led the writing of the manuscript. ARK helped write the manuscript and conceived the name of the program. HN and ARK contributed to the further development of the idea and in giving suggestions for improvements to the program. All authors read and approved the manuscript.
The authors declare that they have no competing interests.
This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.
- Additional file 1. Appendices; Example renderings using Molmil & Overview of alternative WebGL based molecular viewers: 13321_2016_155_MOESM1_ESM.pdf
- Kinoshita, K.; Nakamura, H. (2003). "eF-site and PDBjViewer: database and viewer for protein functional sites". Bioinformatics 20 (8): 1329-1330. doi:10.1093/bioinformatics/bth073. PMID 14871866.
- Hanson, R.M. (2010). "Jmol - A paradigm shift in crystallographic visualization". Journal of Applied Crystallography 43 (5): 1250-1260. doi:10.1107/S0021889810030256.
- W3C Working Group (13 October 2015). "CSS Snapshot 2015". World Wide Web Consortium. https://www.w3.org/TR/CSS/. Retrieved 14 March 2016.
- W3C Working Group (28 October 2014). "HTML5: A vocabulary and associated APIs for HTML and XHTML". World Wide Web Consortium. https://www.w3.org/TR/html5/. Retrieved 14 March 2016.
- "Firefox OS". Mozilla. https://www.mozilla.org/en-US/firefox/os/. Retrieved 14 March 2016.
- "Ubuntu for Phones". Canonical Ltd. http://www.ubuntu.com/phone. Retrieved 14 March 2016.
- Hanson, R.M.; Prilusky, J.; Renjian, Z. et al. (2013). "JSmol and the Next-Generation Web-Based Representation of 3D Molecular Structure as Applied to Proteopedia". Israel Journal of Chemistry 53 (3-4): 207–216. doi:10.1002/ijch.201300024.
- Pettersen, E.F.; Goddard, T.D.; Huang, C.C. et al. (2004). "UCSF Chimera—A visualization system for exploratory research and analysis". Journal of Computational Chemistry 25 (13): 1605–1612. doi:10.1002/jcc.20084. PMID 15264254.
- Humphrey, W.; Dalke, A.; Schulten, K. (1996). "VMD: Visual molecular dynamics". Journal of Molecular Graphics 14 (1): 33–38. doi:10.1016/0263-7855(96)00018-5. PMID 8744570.
- Schrödinger, L. (2010). "The PyMOL molecular graphics system, version 1.3r1". https://www.pymol.org/.
- Krieger, E.; Vriend, G. (2014). "YASARA View - Molecular graphics for all devices, from smartphones to workstations". Bioinformatics 30 (20): 2981-2. doi:10.1093/bioinformatics/btu426. PMC PMC4184264. PMID 24996895. http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid=PMC4184264.
- "OpenGL — The industry standard for high performance graphics". Khronos Group. https://www.opengl.org/. Retrieved 14 March 2016.
- Abraham, M.J.; Murtola, T.; Schulz, R. et al. (2015). "GROMACS: High performance molecular simulations through multi-level parallelism from laptops to supercomputers". SoftwareX 1–2: 19–25. doi:10.1016/j.softx.2015.06.001.
- Mashimo, T.; Fukunishi, Y.; Kamiya, N. et al. (2013). "Molecular dynamics simulations accelerated by GPU for biological macromolecules with a non-Ewald scheme for electrostatic interactions". Journal of Chemical Theory and Computation 9 (12): 5599–5609. doi:10.1021/ct400342e.
- "OpenGL ES 2.0 for the Web". Khronos Group. https://www.khronos.org/webgl/. Retrieved 14 December 2015.
- "OpenGL ES 2.x: The Standard for Embedded Accelerated 3D Graphics". Khronos Group. https://www.khronos.org/opengles/2_X/. Retrieved 14 March 2016.
- "Chrome Web Browser". Google. https://www.google.com/chrome/. Retrieved 14 March 2016.
- "Firefox". Mozilla. http://www.mozilla.org/en-US/firefox/new/. Retrieved 14 March 2016.
- "Protein Data Bank Japan". Protein Data Bank Japan. http://pdbj.org/. Retrieved 14 March 2016.
- Wako, H.; Endo, S. (2013). "Normal mode analysis based on an elastic network model for biomolecules in the Protein Data Bank, which uses dihedral angles as independent variables". Computational Biology and Chemistry 44: 22-30. doi:10.1016/j.compbiolchem.2013.02.006. PMID 23537565.
- Kinjo, A.R.; Suzuki, H.; Yamashita, R. et al. (2012). "Protein Data Bank Japan (PDBj): Maintaining a structural data archive and resource description framework format". Nucleic Acids Research 40 (D1): D453-60. doi:10.1093/nar/gkr811. PMC PMC3245181. PMID 21976737. http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid=PMC3245181.
- Fitzgerald, P.M.D.; Westbrook, J.D.; Bourne, P.E. et al. (2006). "Macromolecular dictionary (mmCIF)". In Hall, S.R.; McMahon, B.. International Tables for Crystallography. pp. 295–443. doi:10.1107/97809553602060000745. http://dx.doi.org/10.1107/97809553602060000745.
- Westbrook, J.; Ito, N.; Nahamura, H. et al. (2005). "PDBML: The representation of archival macromolecular structure data in XML". Bioinformatics 21 (7): 988-92. doi:10.1093/bioinformatics/bti082. PMID 15509603.
- "Introducing JSON". http://www.json.org/. Retrieved 14 March 2016.
- Winn, M.D.; Ballard, C.C.; Cowtan, K.D. et al. (2011). "Overview of the CCP4 suite and current developments". Acta Crystallographica Section D D67 (Part 4): 235-242. doi:10.1107/S0907444910045749.
- Morikami, K.; Nakai, T.; Kidera, A. et al. (1992). "Presto (protein engineering simulator): A vectorized molecular mechanics program for biopolymers". Computers & Chemistry 16 (3): 243-248. doi:10.1016/0097-8485(92)80010-W.
- Hall, S.R. (1991). "The STAR file: A new format for electronic data transfer and archiving". Journal of Chemical Information and Modeling 31 (2): 326–333. doi:10.1021/ci00002a020.
- Zhao, G.; Perilla, J.R.; Yufenyuy, E.L. et al. (2013). "Mature HIV-1 capsid structure by cryo-electron microscopy and all-atom molecular dynamics". Nature 497 (7451): 643-6. doi:10.1038/nature12162. PMC PMC3729984. PMID 23719463. http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid=PMC3729984.
- Phong, B.T. (1975). "Illumination for computer generated pictures". Communications of the ACM 18 (6): 311–317. doi:10.1145/360825.360839.
- Lin, Y.R.; Koga, N.; Tatsumi-Koga, R. et al. (2015). "Control over overall shape and size in de novo designed proteins". Proceedings of the National Academy of Sciences of the United States of Americs 112 (40): E5478-85. doi:10.1073/pnas.1509508112. PMC PMC4603489. PMID 26396255. http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid=PMC4603489.
- Biasini, M. (2015). "PV". GitHub. https://github.com/biasmv/pv.
This presentation is faithful to the original, with only a few minor changes to presentation. In some cases important information was missing from the references, and that information was added.