pymol

Only call function if PyMOL running

跟風遠走 提交于 2019-12-08 19:05:29
I have a script that performs some calculations on a protein. When it's finished, a method imports the pymol module, and uses the pymol.cmd API to display results in a PyMOL session. The process is something akin to the following: def display_results(results, protein_fn): import pymol pymol.cmd.load(protein_fn) pymol.cmd.alter(...) ... protein_fn = "1abc.ent" results = analyze_protein(protein_fn) display_results(results, protein_fn) However, my script doesn't necessarily need to display the results in PyMOL, and I'd like this to only be done if PyMOL is installed and running. It's easy to

Only call function if PyMOL running

百般思念 提交于 2019-12-08 05:40:05
问题 I have a script that performs some calculations on a protein. When it's finished, a method imports the pymol module, and uses the pymol.cmd API to display results in a PyMOL session. The process is something akin to the following: def display_results(results, protein_fn): import pymol pymol.cmd.load(protein_fn) pymol.cmd.alter(...) ... protein_fn = "1abc.ent" results = analyze_protein(protein_fn) display_results(results, protein_fn) However, my script doesn't necessarily need to display the

pymol-note

匿名 (未验证) 提交于 2019-12-02 23:48:02
一、Snapshot(用不同颜色显示蛋白不同二级结构,用不同颜色显示不同小分子,显示连键) >load name.pdb,name #>fetch object #>disable object-name #>enable object-name #>delete selection-name #>hide representation #>as representation 如下: > set cartoon_transparency, 0.5 >alter mg,vdw=2 >rebuild >hide labels 二、加载namd动力学轨迹: 首先将dcd文件用cpptraj转化为mdcrd文件,然后再pymol中运行命令 加载轨迹: >load prmtop,mmm,format=top >load_traj 02_Heat.mdcrd,mmm,format=trj, start=1, stop=10001, interval=100 >hide >show cartoon,mmm > color red,ss h > color blue,ss l+ > color yellow,ss s >select THM,selection >color yellow,THM >show sticks,THM >bg_color white >ray 900,900 三、动画