My software notes

January 21, 2006

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. 登入的畫面:

January 20, 2006

Circular shifting..

Filed under: NMRPipe and NMRview — kpwu @ 8:30 pm

nmrPipe -fn CS -ls 10ppm -sw \
or
nmrPipe -fn CS -rs 40 -sw \

CS: circular shifting
RS: right shifting
LS: left shifting..

sample file for circular shifting

sort pseudo3D data to single FIDs (for Varian)

Filed under: NMRPipe and NMRview — kpwu @ 6:35 pm

Post for memo, found from NMRPipe discussion forum

/* sort_pseudo3D.c

(from grad_sort_nd.c)

Written by Lewis E. Kay on July 5 1992
To carry out time-domain manipulations on Rance-type
HSQC data to get pure-absn lineshape

Modified by L.E.Kay on December 13 1992
To carry out time-domain manipulations on the ni2
dimension of a phase2,phase 3D data set to get
pure absn lineshape.

Modified by L.E.Kay on April 11 1993
To carry out time-domain manipulations on 4D data
sets acquired as d3,d2,d4, phase3,phase2,phase data sets.

Modified by L.E.Kay on May 4 1993
To carry out time-domain manipulations on 2D data sets

Modified by Patrik Lundstrom, 030301
To separate 2D datasets recorded interleaved
Some code modifications and comments

Modified by Patrik Lundstrom, 040915
To separate any pseudo 3D into the respective planes

Modified by Patrik Lundstrom, 041018
To cover case where data is pseudo 4D and the
spectrometer operator has screwed up and used
array=’par1,phase,par2′
*/

#include
#include
#include

#define MAXDATA 4096
#define MAX_PLANE 256

int main(int argc, char *argv[])
{

void help(char *name);

FILE *infile, /* ptr to input file */
*outfile[MAX_PLANE]; /* ptr to output files */

char head[50], /* headers preceeding each data-set */
*inptr;

long data[MAXDATA]; /* the FIDs. each point in 4 bytes so we must have long
*/

int i,j,jj,k,
mode, /* acq.order can be ‘arraypar phase’ or ‘phase arraypar’ */
ni,
np,
planes,
planes2=1, /* needed for pseudo 4D if array=’par1,phase,par2′ */
inflag = 1,
outflag = 1,
modeflag = 1,
niflag = 1,
npflag = 1;

/* Read arguments */
/* ————– */
i = 1;
while (i MAXDATA) {
fprintf(stderr, “np > 4096. If you want to continue, you\n”);
fprintf(stderr, “have to change the code and recompile.\n”);
return 1;
}
if (planes*planes2 > MAX_PLANE) {
fprintf(stderr, “Number of planes (plane*plane2) must be less than %d!\n”,
MAX_PLANE);
fprintf(stderr, “If you need this no. planes, change code and recompile!\n”,
MAX_PLANE);
return 1;
}

/* Read and write global header */
/* —————————- */
fread(head, 1, 32, infile);
for (i=0; i
-plane -mode -ni -np
\n\n”, name);
fprintf(stderr, “This program will separate a pseudo 3D experiment\n”);
fprintf(stderr, “recorded with array=’parameter,phase’ (or opposite)\n”);
fprintf(stderr, “into regular 2D fids.\n”);
fprintf(stderr, “‘parameter’ might be a relaxation delay, cpmg\n”);
fprintf(stderr, “repetition rate, offset or whatever.\n”);
fprintf(stderr, “The output files will be called 0.fid, 1.fid…\n\n”);
fprintf(stderr, “Arguments:\n\n”),
fprintf(stderr, “-in\tinput file\n”);
fprintf(stderr, “-plane\tNo. interleaved experiments (in 3rd dim.)\n”);
fprintf(stderr, “-plane2\tNo. interleaved experiments (in 4th dim.)\n”);
fprintf(stderr, “-mode\t0 for array=’par,phase’; 1 for ‘phase,par’; -1
for ‘par1,phase,par2′\n”);
fprintf(stderr, “-ni\tNumber of increments (ni)\n”);
fprintf(stderr, “-np\tTotal number of acq. points: np (REAL +
IMAG)\n\n”);
}

« Previous Page

Blog at WordPress.com.