我正在尝试使用 Linux 终端(仅限 CLI)运行t5.py
调用 pymol 的 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()
提前致谢!