Pymol里常用到的命令,隨用隨記


python腳本運行方式:

1, File->Run Script->選擇python腳本;

2, run python腳本

常用命令:

load *.pdb

remove solvent

select str1, resn Cl-

remove str1

align WT_ligs, WT_box_wat_eq3 #后面的是target

alignto WT_ligs #把所有pdb都align到WT_ligs

show sticks, resi 87

set label_size, -1.4

set label_color, black, selection

select selection, resid 84+85+86+94+98+101+151+273+274+278+282+285+336+341+342+345+346+348+418+421+422+423+425+426+430

png image.png, 10cm, dpi=300, ray=1

png image.png, width=3000, height=2400, dpi=300, ray=1

 

高精度做圖命令:

hide

hide labels, agi

show sticks, lig | res  #棒狀顯示lig和res對象,"|"為邏輯“或”

select 5A, byres ligand around 5 #選取ligand5A范圍內殘基

hide sticks, h.  #隱藏H原子

zoom lig | res  #居中放大lig和res,其他對象虛化

color wheat, lig & name C*  #將lig的碳原子(以C開頭的原子名)設為小麥色

set label_size, 30

set label_font_id, 9

#########

import center_of_mass

select AGI1, resn AGI & name C2+C3+C4+C5+C6

com AGI1, object=p1

select AGI2, resn AGI & name C7+C8+C9+C10+C11

com AGI2, object=p2

hide everything, p*

show spheres, p*

set sphere_scale, 0.4

hide labels, measure*

set dash_length, 0.3

set dash_radius, 0.08

set dash_gap, 0.3

color green, measure01

color gray70, measure02

bg_color white

show cartoon

#########

color smudge, lig & name C*

set cartoon_transparency, 0.5

set cartoon_round_helices, 1

set cartoon_fancy_helices, 1

set cartoon_fancy_sheets, 1

set cartoon_color, green, FLS_TPP_DHA & chain A  #設置不同鏈的cartoon不同顏色

set stick_ball #顯示棍棒模型

set stick_ball_ratio, 1.8

set stick_h_scale, 0.8

unset opaque_background   # 設置背景透明,只在ray下有用

#########

save focus.pse

png label.png

hide labels

png focus.png, 16.93cm, 16.93cm, dpi=300, ray=1

zoom

set cartoon_transparency, 0

png overview.png, 20cm, 18cm, dpi=300, ray=1

save overview.pse

高階命令:

load candidate.pdb, c_run4

select run4_AGI, c_run4 & resn AGI

sel active_run4, byres c_run4 within 5 of run4_AGI

show sticks, active_run4

show surface, active_run4

show surface, byres c_run4 within 5 of run4_AGI

...


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM