Grüezi,
過去のエントリでPyMOL上に表示される溶媒の水分子をなんとかする試みを紹介しました.
今回はasコマンドで水分子をうまく扱う方法とともに,.pymolrc
を少し書き換えたので,以下紹介です.
cd ~/Documents/PDB set cartoon_transparency, 0.5 set transparency, 0.6 set surface_color, white set sphere_scale, 0.4 set label_color, gray alias al, alignto; zoom alias sp, split_chains enabled; alignto; zoom alias cc, util.color_chains("(enabled and name CA)",_self=cmd) alias see, zoom byres organic around 8 and chain A alias del, as nb_spheres, solvent alias sol, as nb_spheres, solvent; hide nb_spheres alias line, show lines, byres organic and enabled around 4 alias hb, select ligand, organic and enabled; cmd.dist("contact","(ligand)","(byobj (ligand)) and (not (ligand))",quiet=1,mode=2,label=0,reset=1); cmd.enable("contact") alias well, show surface, byres organic and enabled expand 5 alias 5, create a5, byres organic and enabled expand 5; disable !a5; see alias 4, create a4, byres organic and enabled expand 4; disable !a4; see alias tag, label byres organic and enabled around 5 and name ca, "%s%s" % (resn, resi) alias untag, hide label alias pick, cmd.mouse('forward') alias ch, capture; save image.png
実際の操作をちょっと見ましょう.
下記のコマンドでPyMOLにPDBを読み込みます.
fetch 7BV2
ご存知Remdesivirの複合体です.
今まさにRNAに取り込まれようとしていく様が結晶として取れるなんてスゴイですね!
さて,右側に見える赤とオレンジのspheresが作っている四面体はリン酸で,黄緑のspheresがMgイオンです.
今回はめっちゃ水分子が少なくていい例じゃないですね笑.
さて,次のコマンドを打ってみると,リン酸の右側にちょこちょこっとだけ表示されていた水分子が,赤い小さなspheresになります.
as nb_spheres, solvent
実際には
as nb
まで打ってtabキーで_spheres,
まで補完してくれます.そう,so
の後にtabキーでsolventも補完されます.
as
コマンドは
as representation, selection
の形で,selection
を好きな表示方法(representation)に指定できます.selection
を指定しない場合はdefaultがallで全指定です.今回は,溶媒をnb_spheres
の表示に指定したわけです.
nb_spheresは普通のspheresと区別して使用することができます.
何が便利かというと,今回でいうリン酸やMgイオンのような無機物と分けて指定できるんですね.
これを踏まえて,sol
やdel
のaliasコマンドでアクティブなオブジェクト上の水分子を出したり消したりできます.
see
やline
,hb
のaliasコマンドと組み合わせて, PDBを読み込んで最短4コマンドでこちらのような絵が作れます.
というわけで,本日の自己満でした.