Mini Map Aide: Difference between revisions

From Proteopedia
Jump to navigationJump to search
Eric Martz (talk | contribs)
No edit summary
Angel Herraez (talk | contribs)
applying template to style the images
 
Line 5: Line 5:
</center></td></tr></table></center>
</center></td></tr></table></center>


<table class="wikitable" align="right"><tr><td width="200">
{{ImageWithCaptionRight|Cooper-jon-minimap1.jpg|300|Mini map aide in use showing a threonine residue at the centre of the screen with a symmetry-related molecule, shown with its bonds drawn green. The bonds of main molecule are coloured dark yellow and individual atoms are coloured according to type, red for oxygen and blue for nitrogen.}}
Mini map aide in use showing a threonine residue at the centre of the screen with a symmetry-related molecule, shown with its bonds drawn green. The bonds of main molecule are coloured dark yellow and individual atoms are coloured according to type, red for oxygen and blue for nitrogen.
</td><td width="300">
[[Image:Cooper-jon-minimap1.jpg|300px]]
</td></tr></table>


[https://minimapai.de/ Mini Map Aide] is a mobile phone website application for visualizing atomic models and electron density maps. It emulates a small number of the functions of [[Molecular visualization in the 1980s|FRODO]]. It is coded in Lua, simply because that was the language that was stored in my head at the time of deciding to do this. Mini Map Aide uses a JavaScript virtual machine [http://fengari.io/ Fengari] so that it runs as a web-browser script and can use various javascript libraries such as [https://mathjs.org/ math.js] and, most importantly, the 3D graphics library [https://threejs.org/ three.js]. Quoting from [https://en.wikipedia.org/wiki/Three.js Wikipedia] (the free encyclopedia):  
[https://minimapai.de/ Mini Map Aide] is a mobile phone website application for visualizing atomic models and electron density maps. It emulates a small number of the functions of [[Molecular visualization in the 1980s|FRODO]]. It is coded in Lua, simply because that was the language that was stored in my head at the time of deciding to do this. Mini Map Aide uses a JavaScript virtual machine [http://fengari.io/ Fengari] so that it runs as a web-browser script and can use various javascript libraries such as [https://mathjs.org/ math.js] and, most importantly, the 3D graphics library [https://threejs.org/ three.js]. Quoting from [https://en.wikipedia.org/wiki/Three.js Wikipedia] (the free encyclopedia):  
Line 32: Line 28:
Mini Map Aide attempts to mimic a tiny fraction of FRODO's protein rebuilding capabilities, albeit in a rather different way to be more amenable for use with mobile devices. On the dark display window there is a "Move" button which should always be active. When this is clicked or touched, the atoms in the residue which is currently at the centre of the display can be moved by small swipes on the screen. The moveable atoms are highlighted in a pale purple colour and a particular atom can be moved by touching it and gently swiping in one direction. The purple blob for this atom will swell for an instant to indicate that is has been selected. When the atoms have been moved to the desired locations, the geometry can be regularised and the bonds redrawn by clicking the "Tidy" button. The changes to the structure can then either be undone or saved as a new PDB file with the "Undo" and "Save" buttons, respectively.  
Mini Map Aide attempts to mimic a tiny fraction of FRODO's protein rebuilding capabilities, albeit in a rather different way to be more amenable for use with mobile devices. On the dark display window there is a "Move" button which should always be active. When this is clicked or touched, the atoms in the residue which is currently at the centre of the display can be moved by small swipes on the screen. The moveable atoms are highlighted in a pale purple colour and a particular atom can be moved by touching it and gently swiping in one direction. The purple blob for this atom will swell for an instant to indicate that is has been selected. When the atoms have been moved to the desired locations, the geometry can be regularised and the bonds redrawn by clicking the "Tidy" button. The changes to the structure can then either be undone or saved as a new PDB file with the "Undo" and "Save" buttons, respectively.  


<table class="wikitable" align="right"><tr><td width="200">
===Tidy Geometry===
A tyrosine side chain being rebuilt in mini map aide. The moveable atoms are drawn as green squares and have been dragged slightly to the right of the ring's current position. Use of the "Tidy" button will allow the geometry to be regularised.
</td><td width="300">
[[Image:Cooper-jon-minimap2.jpg|300px]]
</td></tr></table>


===Tidy Geometry===
{{ImageWithCaptionRight|Cooper-jon-minimap2.jpg|300|A tyrosine side chain being rebuilt in mini map aide. The moveable atoms are drawn as green squares and have been dragged slightly to the right of the ring's current position. Use of the "Tidy" button will allow the geometry to be regularised.}}


The option to tidy the geometry does so in a very simple stochastic way which is based on a table of approximate interatomic distances found in high resolution crystal structures of amino acids and polypeptides. These are all rounded to the nearest 0.1 &#8491;. The method calculates all of the deviations from the ideal distances within the rebuilt residue and the atom-pair with the worst distance deviation is targeted for correction. Consider two atoms that should be covalently bonded. Since we know the direction of the bond in 3D and how much the bond length needs to increased or decreased to correct it, we could move both atoms inwards or outwards along the bond vector by half the distance violation and get a perfect bond length, at the risk of worsening the geometry of other bonds which these atoms are involved in. Instead, the algorithm takes a slightly different approach which is to take one of the two atoms at random and move it by half of the calculated distance correction in the right direction and leave the other atom unmoved. At this point the deviations from ideal geometry for the whole residue are recalculated and the worst distance violation found and corrected in exactly the same way as before. The whole process is repeated until the worst distance violation is less than 0.1 &#8491;. The reason for choosing which of the two atoms to move completely at random is simply to stop the process becoming stuck trying to correct correlated distance violations cycle after cycle <i>ad infinitum</i>. It helps to prevent the algorithm getting stuck making the same two conflicting distance corrections over and over again.  
The option to tidy the geometry does so in a very simple stochastic way which is based on a table of approximate interatomic distances found in high resolution crystal structures of amino acids and polypeptides. These are all rounded to the nearest 0.1 &#8491;. The method calculates all of the deviations from the ideal distances within the rebuilt residue and the atom-pair with the worst distance deviation is targeted for correction. Consider two atoms that should be covalently bonded. Since we know the direction of the bond in 3D and how much the bond length needs to increased or decreased to correct it, we could move both atoms inwards or outwards along the bond vector by half the distance violation and get a perfect bond length, at the risk of worsening the geometry of other bonds which these atoms are involved in. Instead, the algorithm takes a slightly different approach which is to take one of the two atoms at random and move it by half of the calculated distance correction in the right direction and leave the other atom unmoved. At this point the deviations from ideal geometry for the whole residue are recalculated and the worst distance violation found and corrected in exactly the same way as before. The whole process is repeated until the worst distance violation is less than 0.1 &#8491;. The reason for choosing which of the two atoms to move completely at random is simply to stop the process becoming stuck trying to correct correlated distance violations cycle after cycle <i>ad infinitum</i>. It helps to prevent the algorithm getting stuck making the same two conflicting distance corrections over and over again.  
Line 57: Line 49:


==Content Attribution==
==Content Attribution==
This article was written by [https://profiles.ucl.ac.uk/9508-jonathan-cooper Jonathan Cooper, Professor Emeritus at University College, London]. ([[User:Eric Martz|Eric Martz]] simply put it into Proteopedia, but had no authorship role.)
This article was written by [https://profiles.ucl.ac.uk/9508-jonathan-cooper Jonathan Cooper, Professor Emeritus at University College, London]. ([[User:Eric Martz|Eric Martz]] simply put it into Proteopedia, but had no authorship role. [[User:Angel Herraez|Angel Herráez]] styled the images with captions.)