21
VMD hands on Rogelio Rodríguez-Sotres, FQ, UNAM. Marzo 2016

VMD hands on - UNAMdepa.fquim.unam.mx/proteinas/pue/vmd-hands-on.pdf · VMD hands on Rogelio Rodríguez-Sotres, FQ, UNAM. Marzo 2016. VMD tiene dos forma de control ... Select atoms

Embed Size (px)

Citation preview

VMD hands on

Rogelio Rodríguez-Sotres,FQ, UNAM.Marzo 2016

VMD tiene dos forma de control

● Las formas gráficas que son múltiples yextensibles

● La ventana de TCL/Tk que es un interprete deun lenguaje llamado TCL

● VMD puede llamarse en modo Python yentonces la interfase acepta comandoPython/Tk-inter

load VMD

● Open a terminal, type:– $ vmd

Main Windowand graphicmenu

VMD consolewhere messages aredisplayed (you mayissue commands here)

Graphic displaywindow, forimagerendering inreal time anduser interaction

other window controls:

Tk console:commandscan beissued here

Labels:graphics->labels

File browser:File-> New mol...

materialsgraphics->materials

Representations:graphics->representations

Menus can also be turned on andMenus can also be turned on andoff with:off with:menu xxxxxx onmenu xxxxxx oni.e., i.e., menu main offmenu main offmenu main onmenu main on

use "menu list" to see all possible options...

let us download a PDB filecd “~”mkdir “mypdb”cd “mypdb”menu pdbtool on

Can also be opened with:Extensions -> PDB query

1ude

Click→ →choose “mypdb”folder, click OK

when done, close the window

load the molecule

● Turn on the Tk console

– % mol new “1ude.pdb”

● get more details on the command mol

– mol ⏎● mol● usage: mol <command> [args...] ...

● Get more documentation at:● http://www.ks.uiuc.edu/

Research/vmd/current/ug/ug.html

● You may turn on the File->new molecule browser● All the features you see here are accessible at command line using

different command options

You get this... not so nice

Let us make it look nice...● graphics →colors

● Display→Background→gray

● graphics→representations● selected atoms: protein● coloring method: Secondary...● Drawing method: New cartoon

● resolution ► 50● Material: EdgyShiny

● Create Rep

● coloring method: color chain

● material: transparent

● Thickness: 0.35● Main menu:

Display→orthographic● light 3 √● render mode: GLSL● axes off

More details...● graphics→representations

● |Create Rep|

● selected atoms: "protein and (sidechain or type CA)"

● coloring method: Type

● Drawing method: CPK

● Sphere/Bond resolution ► 90● Material: Goodsell

● |Create Rep|

● selected atoms: "protein and (sidechain or type CA)"

● coloring method: ResType

● Drawing method: Licorice

● Sphere/Bond resolution ► 90● Material: EdgyShiny

● Create one more representation for:

● "water and (within 6.0 of protein) and not (within 4 of protein)"

● using VDW drawing method to resolution 120, with color element.

Now this is nicer!● Orient and label the molecule:Orient and label the molecule:

– click on the OpenGL displayclick on the OpenGL display

– press "=" on the keybordpress "=" on the keybord

– press s on the keybordpress s on the keybord

– get closer to your molecule (fill area)get closer to your molecule (fill area)

– drag the lower down window corner drag the lower down window corner

– press "r" and rotate your moleculepress "r" and rotate your molecule

– press "t" translate your molecule to a nice positionpress "t" translate your molecule to a nice position

– press "1", click on an atompress "1", click on an atom

– press "2", click on two consecutive atomspress "2", click on two consecutive atoms

– press "3", click on three consecutive atomspress "3", click on three consecutive atoms

– press "4", click on 4 consecutive atomspress "4", click on 4 consecutive atoms

resize the displayresize the display

Fix the labels● Neat labelsNeat labels

– Graphics Graphics →→ Labels Labels

– Select atoms. Click on the second row and drag downSelect atoms. Click on the second row and drag down

– |Hide||Hide|

– clickclick

● Type on the Tk console:Type on the Tk console:

– label textsize 2 label textsize 2

– label textthickness 2label textthickness 2

● back to graphic labelsback to graphic labels

– select atoms: click on first lineselect atoms: click on first line

– properties tab, format: %a:%r%d,%cproperties tab, format: %a:%r%d,%c

– reorient your molecule to fit your tastereorient your molecule to fit your taste

● Main Manu: File RenderMain Manu: File Render

Now save a hard copy!● Main menu: File → RenderMain menu: File → Render

– Render using...: Tachyon (internal...Render using...: Tachyon (internal...

– add -fullshade -trans_vmd flags toadd -fullshade -trans_vmd flags tocommand linecommand line

– Set page size: display resize 1000 900Set page size: display resize 1000 900

– |Browse...||Browse...| select "mypdb" folder and select "mypdb" folder andwrite a namewrite a name

– click on click on |Start rendering||Start rendering|

● SAVE YOUR VISUALIZATION STATE:SAVE YOUR VISUALIZATION STATE:

● Main menu: File Main menu: File → Save visualization state→ Save visualization state......

– choose mypdb folder, give file namechoose mypdb folder, give file namestate1.vmdstate1.vmd

Now save a hard copy!

#!/bin/bash# next line is a comment in tcl\cd ${0%/*}# next line is a comment in tcl\exec /PATH2VMD/startup.command -e $0

● Close the program (quit)Close the program (quit)

– cd ~/mypdbcd ~/mypdb

– vi "state1.vmd"vi "state1.vmd"

● add the following lines at theadd the following lines at thebeginning:beginning:

Change name>mv state1.vmd. state1.vmd.sh

Give it execution permissions:>chmod -x state1.vmd.sh

and execute it>./state1.vmd.sh BACK ON BUSINESS IN A JIFFY!

result

EVEN BETTER

● Load Open office

● create a new blank presentation

● (File -> New-> Presentation... |Create|)

● Insert a square

● double click and add a label

● right-click select "interaction" then choose run program

● select "state1.vmd.sh"

● save your file and go to presentation mode

● click on the box

Click me

click me

Warning:You may need to "explain" gnome how to handle your file, because in order to "runit" open office needs to find out that a "TERMINAL" must be opened and theprogram should be handle to the terminal for execution. Depending oh the configuration of your GNOME/KDE graphic desktop, this may ormay not work without the need for additional changes to system configuration.

Run a small script● Downlad "archivos pdb comprimidos"

● extract in a folder

– >ch $HOME/Downloads (may be $HOME/Decargas)

– >mkdir myfiles ; cd myfile

– >tar -xjvf ../many_pdb.tbz● make sure multiload.vmd.sh is executable

– >ls -lh● run it!

– >./multiload.vmd.sh● let us analize this script

– > gedit multiload.vmd.sh

Let us clean and reset

● Tk console:

– foreach mym [molinfo list] {mol delete $mym}● this command will delete all loaded molecules● no questions asked!

● Do not close vmd, open a new terminal:

● Download the file (moodle site): "mdl_2LWC.tgz" into mypdb

– ch ~/mypdb; tar -xzvf mdl_2LWC.tgz

● Go back to the vmd tk window

● Let us load these files together...

Quit vmd (type quit on the console)● In a new terminal:

– cd ~/mypdb/mdl_2LWC

– vmd

● In the Tk console:

– source "state2.vmd"

● Main Menu: Extensions -> analysis-> RMS trajectory tool

– select "all", remove the noh box, select ref:Average, turn on the plot,click on RMSD.

● Main Menu: Extensions -> visualization-> MakeMovie

– Set directory to ~/mypdb/mdl_2LCW, file name to "movie", method toAnimated GIF, compresion settings to 24 film, Renderer to Tachyon(internal) , movie settings to "trajectory rock".

– click on make movie and wait...

– Open your movie with the WEB browser.

Load the files as frames

● Go back to the vmd tk window

● Let us load these files together

– cd ~/mypdb/mdl_2LWC

– mol new

– foreach nfl [glob 2LWC*.pdb] {mol addfile $nfl}

● change the representation to TYPE/CPK/EdgyShiny● add representation SURF/Element/BrownGlass, set method to

Wireframe, probe 1.5● Now save this state to "state2.vmd"

● let us clean again:

– foreach mym [molinfo list] {mol delete $mym}

Load the files individually

● Now let us load the individually (Tk console):

– foreach nfl [glob 2LWC*.pdb] {mol new $nfl -type pdb}

● Add representations for all (Tk console)

– mol selection "all"

– mol representation "Licorice"

– mol color "element"

– mol material "Glass1"

– foreach nml [molinfo list ] {mol delrep 0 $nml; mol addrep $nml }

● you may now save this state as well, as "state3.vmd"