LinuxコマンドラインでpymolでPythonスクリプトを使用しますか?

LinuxコマンドラインでpymolでPythonスクリプトを使用しますか?

Linux端末(CLIのみ)を使用してt5.pypymolを呼び出すPythonスクリプトを実行しようとしていますが、なぜ動作しないのかわかりません。以下は、pymol t5.pyコマンドラインに入力したときに表示されるメッセージです。

pymolをインストールしました

sourdough@ZT:/mnt/c/Users/AceRe/Desktop$ pymol t5.py
<string>:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted

スクリプトは以下の通りです。

from pymol import cmd
f=open('dist5.txt','w')
r1 = 'r55_01///UNL`1/N*'
r2 = 'r55_01///UNL`1/O*'
r3 = 'r55_01//R/ASP`113/OD2'
r4 = 'r55_01//R/ASN`312/ND2'

d1=cmd.distance(r1,r3,cutoff=5,mode=2)
d2=cmd.distance(r2,r4,cutoff=5,mode=2)

r1 = 'Lig_N'
r2 = 'Lig_O'
r3 = 'D113'
r4 = 'N312'

f.write("%5s %4s %4.2f\n"%(r1,r3,d1))
f.write("%5s %4s %4.2f\n"%(r2,r4,d2))
f.close()

よろしくお願いします!

ベストアンサー1

おすすめ記事