Visualizing bio-molecules in Computer[Part-2]: Introduction to Tcl scripting environment in VMD (1 SBD prize task inside)

in #steemstem7 years ago (edited)

Hi friends! I am back with the second part of my bio-molecular visualization series. If you missed the first part, please see it here:
Visualizing bio-molecules in Computer[Part-1]: Let us inspect a PDB file and see it using VMD

Simulation of a Ubiquitin molecule(PDB: 1UBQ) in water(not shown for clarity) visualized in VMD using New cartoon style

Recap from the first part

  • We learned about PDB file format.
  • Visualized 1E6J.pdb using VMD.

What else can we do? When you visualize(or read it in a text editor) this PDB file in VMD, you will notice that it has multiple chains. Let us first get the information about those chains.

Let us do more with VMD to study 1E6J.pdb

So let us load 1E6J.pdb by vmd 1E6J.pdb from terminal. I have changed the perspective view to orthographic from Display option in VMD Main. In the Graphics->Representations, the Drawing Method is chosen as NewCartoon and the Coloring Method is selected as Chain. We see three chains in the VMD Display. Each chain is assigned a color automatically. Let us pull this information via Tcl scripting language embedded in the VMD software. (I have changed the background color of the VMD from black to white for better visibility of protein chains. Let this be an exercise. I will give 1 SBD prize for the person who correctly comments first how to achieve this. :) )

Loading the Tcl scripting environment

Go to Extensions -> Tk Console in VMD Main. Now what you see is a window like below:


Let us do these tasks:

  • First, select all atoms.
  • Display the total atoms in the PDB file
  • Then read the chains in the PDB file and display it.

set sel [atomselect 0 "all"]

set is a command and sel is a variable. atomselect is another command which selects all atoms from molecule-id 0.

All atoms in the mol-id 0 that is 1E6J.pdb are transferred to a variable called sel, which should be assigned as $sel. Let us see the number of atoms in this selection. For that give the next command:

$sel num

Let us try $sel get chain to display all chains.

Something wrong happened. It is displaying all 3 chains. But it is assigned with all atoms.H,L and P are all the 3 chains. We only want the unique list. So let us modify our code as below:
lsort -unique [$sel get chain]

We have displayed the name of three chains in the PDB files. Now to count the length of this list use llength as below:

llength [lsort -unique [$sel get chain]]

Some shortcuts for VMD in GUI-mode can be found at this link: http://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node30.html

To reset the view, just press = key. R is rotate mode, T is translate mode. Once you press these keys while in the visualization mode, you can use your mouse to manipulate things further like to zoom-in or zoom-out using scroll button. You can use mouse right button to move the molecule is a rotation style or translation style etc after using respective keys from the keyboard once.

Let us rotate the VMD axis

Original:

rotate z by +90:

Coming up

  • Fitting 2 similar chains
  • Measuring distances between atoms
  • And much more

References

  • Humphrey, W., Dalke, A. and Schulten, K., "VMD - Visual Molecular Dynamics", J. Molec. Graphics, 1996, vol. 14, pp. 33-38.
  • VMD userguide
  • VMD tutorial
  • Citing PDB related papers: See here.
  • Monaco-Malbet, Stéphanie, et al. "Mutual conformational adaptations in antigen and antibody upon complex formation between an Fab and HIV-1 capsid protein p24." Structure 8.10 (2000): 1069-1077. (1E6J structure related paper)

Join #steemSTEM

#steemSTEM is a community project with the goal to promote and support Science, Technology, Engineering and Mathematics on the STEEM blockchain. If you wish to support the #steemSTEM project you can: Contribute STEM content using the #steemstem tag | Support steemstem authors | Join our curation trail | Join our Discord community | Delegate SP to steemstem

Convenient Delegation Links:

50 SP | 100SP | 500SP | 1000SP | 5000SP | 10000SP | 50000SP

Image courtesy: @elvisxx71

And to steemSTEM beginners:

You can ask for help in our discord page. There are people ready to help you.

gif courtesy: @rocking-dave


All images without mentioning image sources are my creations or snapshots from the computer :)

Follow me @dexterdev


 ____ _______  ______ _________ ____ ______    
/  _ /  __\  \//__ __/  __/  __/  _ /  __/ \ |\
| | \|  \  \  /  / \ |  \ |  \/| | \|  \ | | //
| |_/|  /_ /  \  | | |  /_|    | |_/|  /_| \// 
\____\____/__/\\ \_/ \____\_/\_\____\____\__/

Sort:  

Hi @dexterdev
We have selected your post as post of the day for our DaVinci Times. Our goal is to help the scientific community of Steemit, and even if our vote is still small we hope to grow in quickly! You will soon receive our sincere upvote! If you are interested in science follow us sto learn more about our project.

votaXdavinci.witness.jpg
Immagine CC0 Creative Commons, si ringrazia @mrazura per il logo ITASTEM.
CLICK HERE AND VOTE FOR DAVINCI.WITNESS

Keep in mind that for organizational reasons it’s necessary to use the “steemstem” and “davinci-times” tags to be voted again.
Greetings from @davinci.witness and the itaSTEM team.

wow! Never though that a graphical view of molecule could look like piece of art. Just read the first part of this too. When i saw ur article title the thing came up to my mind is a structure of orbiting electrons as like our solar system. But these bio molecules are kind of smart in the molecular universe i guess.
Jokes apart, the article is well written. Will definitely wait for the next dancing bio molecule.
Cheers.

Thank you for reading these articles. It's nice to know that there are people interested in these kind of work in steemit. I was doubtful initially to start these ones in steemit. But now I have hopes.😃

Surely its an interesting topic. I'm sure many other people haven't ever seen a dancing molecule before, as like me. So keep this up, man.