ゴミのやま

完全自分向け雑記

Pymol 便利なコマンド集

目的

自分用によく使うコマンドを整理しておく


ファイルのリストを得る

cmd.get_names()

ファイルの名前を書きかえる

cmd.set_name("fileA", "fileB"))

[応用]"filename A"を含むファイル名のみ抽出し, 一部を書き換える

for a in [file for file in cmd.get_names()  if "filenameA " in file]: cmd.set_name(a, a.replace("filenameA","filenameB"))

オブジェクトの色を変える

color blue, objectname*

GUIで選択された(=enable)なオブジェクトだけmesh表示にする

show mesh, enabled

背景色変更

bg_color silver