我使用的是 Linux Mint 20.1 Cinnamon,内核版本为 5.4.0-97-generic。当我尝试从终端或开始菜单打开 okular 时,我遇到了最近的问题。
Maximum number of clients reachedqt.qpa.xcb: could not connect to display :0
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Aborted (core dumped)
Run Code Online (Sandbox Code Playgroud)
这方面存在很多问题,但没有提供具体的解决方案。有什么帮助吗?
我想从程序输出创建 .csv 文件。我已经根据这个级别定制了一些原始输出。
36.343074719185125 -1.488697037254009 0.517768286726280 -1.488697037254009 48.906350248447872 -0.255764113311881 0.51776828
6726280 -0.255764113311881 31.687963239227631
Run Code Online (Sandbox Code Playgroud)
到目前为止我已经使用了这些命令,
tail -12 Q.out | head -3 | sed 's/^........//' | tr -d '\n' > q.txt
Run Code Online (Sandbox Code Playgroud)
问题是中间没有特定数量的空格。有时有 4 个,有时有 3 个。这一切都取决于程序的输出。例如,如果第一个值是36.343,则前面有两个空格,如果是3.6,则前面有三个空格,如果是360.34,则前面有一个空格。有什么办法可以让它更干净吗?
原始数据
0 1 2
0 36.343074719185125 -1.488697037254009 0.517768286726280
1 -1.488697037254009 48.906350248447872 -0.255764113311881
2 0.517768286726280 -0.255764113311881 31.687963239227631
alpha_(0.000) = 38.979129402287 a.u.
FCHKWriter: !WARNING! method 'CCSD'' renamed to label 'CC'.
FCHKWriter: Writing 0100-A_ccsd.fchk with label ' CC Density'.
Psi4 stopped on: Tuesday, 12 October 2021 04:09PM
Psi4 wall …
Run Code Online (Sandbox Code Playgroud)