My software notes

January 21, 2006

pymol’s sequence mode

Filed under: pymol/ molmol — kpwu @ 5:05 am

seq-mode.jpg

Beginning from pymol 0.98, there is a new function called “sequence mode”

You can just click the pymol Tcl/Tk GUI toolbar [DISPLAY] -> [SEQUENCE] to enable the sequence mode, then you will see a sequence of you PDB file in the PyMOL viewer window. Seqeunce mode is a very powerful advantage, because you can use mose left button to select residues you have interests, then pymol automatically generetes a selection object for you, like what I show in this figure, I load 1PJW.pdb, enable the NMR ensemble structure view (set all_states, on), then enable the sequence mode, and select residues 21~ 37 quickly. The viewer window shows many purple dots which are the residues I selected.

See how amazning convenience the function is!

Enjoy PyMOL.

Last update: 2006/Jan/21

define the secondary structure by yourself (It can be different with the PDB file)

Filed under: pymol/ molmol — kpwu @ 4:37 am

1jlz.png

每一個從Protein Data Bank上抓到的pdb file應該都會包含一段header,內容是描述此protein的基本性質,二級結構分布,源自哪個物種,三度空間結構的定義等等,當pymol開啟pdb file時,會去找這段header,並依照pdf file的二級結構定義而產生helix/strands/loops.
若是home-made的pdb files,如用xplor,cns, cyana等軟體計算得到的pdb, pymol無法讀取hearders,所以其二級結構必定不同於正確值,這時可使用下列方法解決.

  1. 使用alter指令 (sample pdb: 1jc6.pdb)
  • OPEN File
    load 1j6c.pdb
  • Hide the DEFAULT presentations
    hide all
  • show cartoon
  • 原先的helix是從resiuse 4 to 9,改為b-strand (ss=’S'是strand, ss=’H'是helix, ss=’L'是loop’)
    alter 4-9/, ss=’S’
    alter 11-15/, ss=’L’
    alter 17-19/, ss=’H’
  • SHOW Cartoon AGAIN!!
    show cartoon
  • set bg_color and widow size, the final result picture is left one at top

    Last modified: 2004/04/27

select specifc residue/ribose and give hydrogen bonds, showing with surface and sphere.(Use hybrid DNA as example)

Filed under: pymol/ molmol — kpwu @ 4:32 am

1l3m.png

  • 從程式集開啟PyMOL
    Open PyMol
  • 載入pdb files, 可用指令模式或用工具列啟動
    load 1L3M ( Use PyMOL Tcl/Tk GUI, File -> open -> /your_path/1L3M.pdb)
  • 消去預先顯示的畫面
    hide all
  • 順著Z軸翻轉180度
    rotate z, 180
  • 設定背景顏色為白色
    bg_color white
  • 此1L3M.pdb為雙股螺旋DNA,每一股helix定義為一個chain,下兩個步驟為分別選擇chain A, chain B的方式
    select chain-a, chain a
    select chain-b, chain b
  • chain a, chain b都用sticks表示,而且把bond的半徑縮小
    show sticks, chain-a
    show sticks, chain-b
    set stick_radius = 0.13
  • 定義chain a為藍色,chain b為綠色
    color green, chain-b
    color blue, chain-a
  • 細分chain a的residues兩部份, 1-5 & 6-12,選擇方式如下,a15 & a612分別是選擇的object的名稱
    select a15, resi 1-5
    select a612,resi 6-12
  • a15部分畫surface圖,a612部分畫sphere圖
    show surface, a15
    show sphere, a612
  • a15的surface顏色為yellow, a612的sphere也是yellow
    set surface_color,yellow, a15
    set sphere_color,yellow, a612
  • a15的透明度是0.33, a612的透明度是0.76
    set transparency, 0.33, a15
    set sphere_transparency,0.76,a612
  • 手動增加兩個氫鍵,使用dist指令;其中///A/6/1H6的意思是/object/segment/chain/residues/atom的分類方式,在1L3M.pdb檔案中,只有一個object,一個segment,兩個chain(a/b),並選取residue 6的1H6,其餘三個選擇亦是如此;
    dist hb1, ///A/6/1H6, ///B/19/O4
    dist hb2, ///A/6/N1, ///B/19/H3
  • 在這裡你會看到這個dist的指令其實是量距離的工具,但只要把label拿掉就像是一個hydrogen bond
    hide labels
  • 兩hbond的顏色分別定義為red for hb1, and orange for hb2
    color red, hb1
    color orange, hb2
  • 最後把剛剛做出的兩組hbond修改一下,定義dash的radius是0.11(both for hb1,hb2),hb1的lenght是2,hb2沒有gap,你可以明顯看出hb1,hb2的差別.
    set dash_radius, 0.11
    set dash_length, 2,hb1
    set dash_gap, 0, hb2
  • 以chain B上的residue 18為中心放大,scale為-8
    zoom ///B/18,-8
  • 在輸入ray之前你看到hbond是細細的,ray指令執行後,會是類似stick的效果,可以自行比較.

你也可以在Tcl/Tk GUI視窗的command input area把上述的所有指令一次輸入,類似macro的功能(把下列指令全選,一次貼上即可)
load 1L3M.pdb
hide all
rotate z, 180
bg_color white
select chain-a, chain a
show sticks, chain-a
set stick_radius = 0.13
select chain-b, chain b
show sticks, chain-b
color green, chain-b
color blue, chain-a
select a15, resi 1-5
select a612,resi 6-12
show surface, a15
show sphere, a612
set surface_color,yellow, a15
set sphere_color,yellow, a612
set transparency, 0.33, a15
set sphere_transparency,0.76,a612
dist dist1, ///A/6/1H6, ///B/19/O4
dist dist2, ///A/6/N1, ///B/19/H3
hide labels
color red, dist1
color orange, dist2
set dash_length, 2,dist1
set dash_gap, 0, dist2
set dash_radius, 0.11
zoom ///B/18,-8
rayLast modified: 2004/04/27

Advanced NMR data (PDB) presentations–ensemble view

Filed under: pymol/ molmol — kpwu @ 4:27 am

15-nmr-pdb.png

  • 從程式集開啟PyMOL
    Open PyMol
  • 載入pdb files, 可用指令模式或用工具列啟動
    load 1m58.pdb ( Use PyMOL Tcl/Tk GUI, File -> open -> 1m58.pdb)
  • 消去預先顯示的畫面
    hide all
  • 設定觀看畫面視窗
    viewport 640,480
  • 背景顏色為white
    bg_color white
  • 顯示全部的PDB (totally 15)
    set all_states, on
  • 用 line 表示結構
    show line, 1m58
  • 隱藏 side chain以及 back-bone上的O, NH
    cmd.hide(“((byres (1m58))&!n;ca,c,n)”)
    註: cmd.hide(“((byres (1m58))&!n;ca,c,n,o,h)”) 就表示單純hide side chain
  • 黑色表示backbone
    color black, 1m58
  • 改變 line width
    set line_width, 1.5
  • 輸出最後結果
    png 15-nmr-pdb.png

——————————————————————-

From pymol discussion mailing list (Jan 15, 2006)
Joel Tyndall provides detailing commands

  • To see them all at once:

load my_struct.pdb
set all_states

  • Or if you want them separated into individual objects:

unset all_states
split_states my_struct
dele my_struct

Last modified: 2004/06/28, 2006/01/21

cartoon plus surface view, transparent effect !

Filed under: pymol/ molmol — kpwu @ 4:23 am
  • 1m58-3.png
  • 從程式集開啟PyMOL
    Open PyMol
  • 載入pdb files, 可用指令模式或用工具列啟動
    load 1m58.pdb ( Use PyMOL Tcl/Tk GUI, File -> open -> 1m58.pdb)
  • 消去預先顯示的畫面
    hide all
  • 設定觀看畫面視窗
    viewport 640,480
  • 畫cartoon圖
    show cartoon, 1m58
  • 整體顏色為cyan
    color cyan, 1m58
  • 設定cartoon的顯示為highlight color,且highlight的顏色為green
    set cartoon_highlight_color, green
  • Show fancy helices (Tcl/Tk GUI -> cartoon -> fancy helices check on)
    set cartoon_fancy_helices=1
  • 新增surface圖
    show surface,1m58
  • 設定透明度 (1為完全透明,0為不透明)
    set transparency,0.4
  • 定義surface顏色為lime
    set surface_color, lime
  • 順著x-axis翻轉 180度 (亦可順y-axis, z-axis轉)
    rotate x, 180
  • 背景顏色改為白色
    bg_color white
  • 設定圖形輸出解析度
    ray 400,300
  • 輸出最後結果
    png 1m58-3.png

Last modified: 2004/04/26

[pymol]color simple cartoon view (Big5)

Filed under: pymol/ molmol — kpwu @ 4:06 am

1m58-2.png

  • 從程式集開啟PyMOL
    Open PyMol
  • 載入pdb files, 可用指令模式或用工具列啟動
    load 1m58.pdb ( Use PyMOL Tcl/Tk GUI, File -> open -> 1m58.pdb)
  • 消去預先顯示的畫面
    hide all
  • 設定觀看畫面視窗
    viewport 640,480
  • 畫cartoon圖
    show cartoon, 1m58
  • 設定helix為紅色 (ss為secondary structure,h指 a-helix, 同理,l為loop, s為b-sheet)
    color red, ss h
  • 設定sheets顏色為orange
    color orange, ss s
  • 設定loop顏色為green
    color green, ss l+”
  • 設定cartoon的顯示為discrete colors,此時每段二級結構之間的顏色為獨立的狀態)
    set cartoon_discrete_colors, 1
  • 設定cartoon的顯示為highlight color,且highlight的顏色為yellow (1為black, 0為white,亦可自行定義顏色)
    set cartoon_highlight_color, yellow
  • Show fancy helices (Tcl/Tk GUI -> cartoon -> fancy helices check on)
    set cartoon_fancy_helices=1
  • zoom out view (負值為放大,正值為縮小)
    zoom 1m58, -15
  • 設定圖形輸出解析度
    ray 400,320
  • 輸出最後結果
    png 1m58-2.png

Last modified: 2004/04/26

TALOS Howto (Big5)

Filed under: NMRPipe and NMRview — kpwu @ 2:17 am

如果您從本頁有所收穫,歡迎寫email給我鼓勵. 如果您發現我有寫錯的地方,更希望email告訴我

  • TALOS是 Torsion Angle Likelihood Obtained from Shift and sequence similarity的縮寫, Ad. Bax實驗室所撰寫的軟體,與NMRPipe的作者是同一人(Dr. Frank Delaglio).
  • website: http://spin.niddk.nih.gov/bax/software/TALOS/index.html
  • Obtains: TALOS沒有公開FTP或網站供下載,需寫信給Dr. Delaglio表示想使用這套軟體,Dr. Delaglio會把FTP的帳號密碼告知. 現在只要系統內安裝有NMRPipe,就會發現TALOS已經存在系統內了.
  • TALOS的基本程式有: talos.tcl, vina.tcl 與 rama.tcl,以及一些小工具如:talos2xplor.tcl, talos2dyana.tcl, talos2shift.tcl等工具程式.
  • 要執行TALOS要先準備好幾個檔案:
    1. Chemical Shift Table,格式如下 (NMRView有提供output轉換程式):
      x.jpg
    2. reference pdb (非必要)
  • 開始使用TALOS:
    1. talos.tcl:
      talos.tcl -in myshifts.tab
      這個動作會產生一個pred的資料夾,裡面有一堆residue predict table (res*.tab),這個動作要等一下子,talos.tcl會從talos database做phi/psi angle的比對,一個residue大約要花30~60秒的時間.
    2. vina.tcl:
      vina.tcl -in myshifts.tab -auto
      vina.tcl -in myshifts.tab -ref mystruct.pdb -auto
      vina.tcl可執行也可不執行,這只是一個把pred/res*.tab做一個summarize的動作.
    3. rama.tcl:
      rama.tcl -in myshifts.tab
      rama.tcl -in myshifts.tab -ref mystruct.pdb
      rama.tcl是視窗介面程式,可以讓user觀看talos.tcl做的phi/psi angle prediction results,有三個視窗,分別是:

      • sequence window:
        綠色是表示talos預測的結果是好的,紅色是不好的,超出範圍的,而黃色是ambiguos,灰色表示無法做predictions
      • prediction window :
        下面綠色的 checkbox是指會顯示在ramachandran window上的點,若是不想要某一個reference protein的phi/psi angle作為參考值,取消選取即可.
      • Ramachadran window:
        這裡看到綠色的點就是prediction的結果,十字游標表示中心點,橢圓圈是預測的角度範圍,藍色的點是user指定的reference pdb中,該 residue的角度位置.user可以自行判斷這個prediction是算good, ambiguos, bad 或unclassfied.當最後執行QUIT時,會問你是否要SAVE,yes就會產生一個pred.tab的prediction table
    4. talos2xplor.tcl
      下面是talos2xplor.tcl的一段程式碼:
      x2.jpg
      上面這段程式碼可以看出talos2xplor.tcl有幾個參數,紅色部分字體是參數設法,黃色是其說明.
      使用方式如下:
      talos2xplor.tcl -in pred.tab -cs myshifts.tab
      talos2xplor.tcl -in my-pred.tab -pdb my-structure.pdb
      talos2xplor.tcl -in my-pred.tab -pdb ref.pdb -f 1.5

      第一與第二行的指令是相同的結果,一個是讀chemical shift tab的sequence資訊,一個讀取pdb內的sequence資訊. 結果如下:

      x3.jpg
      比較pred.tab可以看出talos2xplor.tcl把角度範圍設定比較大(factor = 2),若不想要設定這麼寬的xplor dihedral angle restraints,可以用 -f參數設定比例,第三行就是使用1.5倍的範圍,可以上下兩個tab比較看看就知道結果.

      x4.jpg

    revised date: 06/07/2004, 08/06/2004

Putty Howto (Big5)

Filed under: softwares and scripts — kpwu @ 2:10 am

說明:
Putty是一個專位SSH跟Telnet連線的軟體,支援MS-Win跟UN*X平台,作者為 Simon Tatham 目前最新的版本為0.54版, 其軟體首頁為:http://www.chiark.greenend.org.uk/~sgtatham/putty/台灣有位 Hung-Te Lin也把Putty做了更棒的中文支援,解決一些中文使用上的問題,若有興趣,可至piaip’s pputty看看.

使用:

  1. 開啟putty,基本介面如下:
    (1) 圖中的第一區是輸入IP或是Host Name的地方,右邊的port可以不用理會,只要記得ip或host name輸入後在第二區部分選擇是SSH/Telnet或其他的連線方式,port就會自動改變.
    (2)第三區就是你的連線書籤,當你常常用putty連線到某幾台主機時,存成書籤可以節省不少時間
  2. 範例: 用telnet方式連到bbs.ntu.edu.tw,請看紅色框框的部份
  3. 下張圖是以連線到bbs.cs.nthu.edu.tw後,開啟的畫面範例 (Telnet模式)
  4. 當你使用SSH模式連線時,第一次連到SSH主機會接收到一個訊息要你確認 “host key”,這時候選”是” (yes)就對了
  5. 登入的畫面:

Blog at WordPress.com.