一次性添加
This commit is contained in:
115
Multiwfn在Linux下安装的中文说明.txt
Normal file
115
Multiwfn在Linux下安装的中文说明.txt
Normal file
@@ -0,0 +1,115 @@
|
||||
## ubuntu22.04安装shell命令
|
||||
|
||||
安装motif库
|
||||
|
||||
```shell
|
||||
sudo apt-get update
|
||||
sudo apt-get install libmotif-dev libxm4 libgl1 -y
|
||||
```
|
||||
|
||||
~/.bashrc
|
||||
|
||||
```shell
|
||||
export OMP_STACKSIZE=1000M
|
||||
ulimit -s unlimited
|
||||
```
|
||||
|
||||
docker-compose.yml
|
||||
|
||||
```yml
|
||||
version: '3.7'
|
||||
services:
|
||||
your_service_name:
|
||||
image: your_image_name:latest
|
||||
container_name: your_container_name
|
||||
ulimits:
|
||||
stack:
|
||||
soft: unlimited
|
||||
hard: unlimited
|
||||
environment:
|
||||
- OMP_STACKSIZE=1000M
|
||||
volumes:
|
||||
- ./your_data:/data
|
||||
ports:
|
||||
- "8080:8080"
|
||||
command: your_command_here
|
||||
```
|
||||
|
||||
原文链接:http://sobereva.com/688
|
||||
|
||||
非常流行的波函数分析程序Multiwfn(http://sobereva.com/multiwfn)在Linux下的安装方法在Multiwfn手册2.1.2节有充分的说明,但我发现老有人不仔细看,或者由于缺乏Linux最基本常识而无法正确follow,还有人因为那是英文就干脆不看而放弃安装。鉴于此,这里用中文完整、详细说一下Multiwfn在Linux环境下的安装。如果对Multiwfn一无所知,参看《Multiwfn FAQ》(http://sobereva.com/452)和《Multiwfn入门tips》(http://sobereva.com/167)。Multiwfn的可执行文件、源代码和手册都可以在官网http://sobereva.com/multiwfn中的Download页面下载。本文介绍的情况适用于目前Multiwfn官网上最新版本。本文里涉及的命令里的空格必须看清楚,眼睛不好就直接从本文中复制粘贴命令。如果仔细看本文还是安装不成功,可以去Multiwfn论坛http://bbs.keinsci.com/wfn发帖提问,必须把软件环境和遇到的问题交代得尽可能具体。
|
||||
|
||||
安装Multiwfn非常简单,本文文字多纯粹是因为讲解得详细。
|
||||
|
||||
|
||||
0 关于Multiwfn的普通版与noGUI版
|
||||
首先要知道Multiwfn的Linux版有普通版和noGUI版两种,前者在官网的下载页面上是Multiwfn_[版本号]_bin_Linux.zip形式的文件名,后者在文件名里多了个noGUI字样。普通版具有完整的功能,但运行时需要有motif图形库提供的libXm.so.4文件(这个文件本身是Multiwfn所用的dislin图形库所依赖的),否则无法启动,安装这个库需要root权限。然而在超算或者公用的服务器上,普通用户又拿不到root权限而没法安装motif库。为了解决这个矛盾,Multiwfn在官网上特意提供了noGUI版,由于它在启动时不需要motif库,因此也就不需要弄到root权限来安装它,故普通用户都可以很容易地安装。noGUI版的缺点在于没法使用任何Multiwfn与图形有关的功能,如无法显示出图形界面、没法绘制各种曲线图/平面图/等值面图(无论是在屏幕上显示还是保存为图像文件都不行)、做拓扑分析/盆分析/域分析等分析后无法直接可视化结果,等等。由于特意放到高性能Linux服务器上运行Multiwfn通常是为了让Multiwfn跑一些高耗时的任务,它们往往不直接涉及图像显示,所以这并不会带来明显问题。
|
||||
|
||||
下面就开始讲Multiwfn在Linux下的安装流程。
|
||||
|
||||
|
||||
1 安装motif库(安装noGUI版直接跳过此节)
|
||||
如果你用的是Redhat系操作系统,如Redhat Enterprise Linux,CentOS(包括stream)、Rocky Linux、Fedora等,在确保机子能正常访问Internet的情况下,在终端(即命令行界面里)输入yum install motif命令即可安装motif库。这需要root权限,要么以root方式登录,要么在普通用户下用sudo来执行此命令。
|
||||
|
||||
如果你无法访问Internet,可以自行去https://motif.ics.com/motif/downloads下载适合x86_64架构的最新的motif库,比如https://motif.ics.com/sites/default/files/motif-2.3.4-1.x86_64_0.rpm,放到Linux服务器上后用rpm -i motif-2.3.4-1.x86_64_0.rpm命令手动安装之。不过这样安装往往会提示缺一些乱七八糟的依赖库,所以还是建议尽量用yum方式安装。
|
||||
|
||||
如果你不知道当前机子里已经装了motif没有,运行rpm -qa|grep motif命令,如果找到了,那就不用再装了。
|
||||
|
||||
上面说的都是Redhat系Linux的情况。如果你是Debian系Linux如Ubuntu的用户,在连着Internet的情况下可以用sudo apt-get install libxm4 libgl1命令安装motif和相关的libgl1库。
|
||||
|
||||
|
||||
2 检查SysV共享内存段
|
||||
运行cat /proc/sys/kernel/shmmax命令检查SysV共享内存段的值,数值的单位为字节。有的系统这个值默认得非常小,比如就32MB,当Multiwfn做一些较耗内存的分析、载入较大波函数文件时会崩溃。发现需要增大的话,在/etc/sysctl.conf里加入比如kernel.shmmax = 2000000000然后重启系统,就可以令上限提升到大约2GB。修改此文件需要有root权限。
|
||||
|
||||
|
||||
3 解压Multiwfn
|
||||
去Multiwfn官网上下载同时带着bin字样(binary,即已编译好的可执行文件)和Linux字样的压缩包,放在Linux系统下,用unzip [文件名] 命令将之解压到当前目录下。图形界面里也可以在此文件上点右键后选择解压。
|
||||
|
||||
下文假定解压后的目录是/home/sob/Multiwfn_[版本号]_bin_Linux/,在里面应当可以看到Multiwfn程序的各种文件。
|
||||
|
||||
|
||||
4 配置~/.bashrc文件
|
||||
每个用户主目录下都有一个.bashrc文件,记录了每次进入终端后自动执行的命令。由于这是隐藏文件,所以默认情况下看不到。你可以输入vi ~/.bashrc(看清楚vi后面的空格)用vi编辑器去编辑它,也可以在Linux图形界面中要求显示隐藏文件,然后通过操作系统自带的有图形界面的文本编辑器去编辑它。在此文件末尾加上以下内容
|
||||
ulimit -s unlimited
|
||||
export OMP_STACKSIZE=200M
|
||||
export Multiwfnpath=/home/sob/Multiwfn_[版本号]_bin_Linux
|
||||
export PATH=$PATH:/home/sob/Multiwfn_[版本号]_bin_Linux
|
||||
然后保存文件。
|
||||
|
||||
下面解释一下以上命令的意义。
|
||||
|
||||
ulimit -s unlimited用来去除某些操作系统对堆栈内存使用的限制。某些系统默认的限制设置非常脑残,不这么设一下的话用Multiwfn处理稍微大一点的波函数都会出现Segmentation fault报错而终止。
|
||||
|
||||
export OMP_STACKSIZE=200M用来将OMP_STACKSIZE环境变量设为200M。Multiwfn并行运算是通过OpenMP技术实现的,即计算会分摊到不同的线程上,往往有很多数组要储存在每个线程的堆栈内存里。每个线程可以用的堆栈内存量上限就是通过OMP_STACKSIZE来设的,以上例子设成了200MB通常够用了,如果不够的话会导致计算崩溃。并行核数乘以OMP_STACKSIZE值必须显著小于物理内存可用量。
|
||||
|
||||
Multiwfn目录下的settings.ini文件记录了Multiwfn的配置信息。Multiwfn启动时首先在当前目录下寻找settings.ini,如果找不到,则会在Multiwfnpath环境变量设定的目录下找settings.ini,如果还找不到,则会使用默认设定(和程序压缩包里settings.ini里的原始设置相同)。由于在Linux下启动Multiwfn时通常不是在Multiwfn目录下启动的,这是为什么上面要定义Multiwfnpath环境变量,用来避免Multiwfn找不到settings.ini。
|
||||
|
||||
PATH是Linux系统的一个重要的环境变量,里可以包含一大堆目录。如果将一个可执行文件所在目录加入其中,那么在任意目录下都可以直接输入可执行文件名而不用带着目录名就可以启动之。如上将Multiwfn所在目录加入PATH环境变量就是为了这个目的。
|
||||
|
||||
|
||||
5 增加可执行权限
|
||||
Multiwfn的普通版的可执行文件是Multiwfn目录下的Multiwfn,noGUI版是Multiwfn目录下的Multiwfn_noGUI。现在给它们加上可执行权限使之可以被运行。
|
||||
|
||||
对于普通版,在终端里运行chmod +x /home/sob/Multiwfn_[版本号]_bin_Linux/Multiwfn。如果是noGUI版,显然把其中的Multiwfn替换成Multiwfn_noGUI。
|
||||
|
||||
|
||||
6 配置settings.ini
|
||||
编辑Multiwfn目录下的settings.ini,搜索nthreads,将之数值改为计算时要用的并行核数,通常设为CPU的物理核心数即可。
|
||||
|
||||
settings.ini里还有几个其它设置想改的话可以根据需要修改一下
|
||||
•formchkpath:定义的是Gaussian目录下的formchk程序的路径。formchk是干嘛的在《详谈Multiwfn支持的输入文件类型、产生方法以及相互转换》(http://sobereva.com/379)里明确说了。如果把它设成了formchk的实际的路径,Multiwfn就可以直接载入Gaussian的chk文件(在载入时会自动调用formchk转换成fch文件后载入)。
|
||||
•orca_2mklpath:如果设成了ORCA目录下的orca_2mkl可执行文件的路径,Multiwfn就可以直接载入ORCA计算产生的gbw文件(在载入时会自动调用orca_2mkl转换成molden文件后载入)。
|
||||
•gaupath和orcapath:当它们分别设成了Gaussian和ORCA的可执行文件的路径,Multiwfn的一些功能才能自动调用Gaussian和ORCA进行计算,如《使用Multiwfn超级方便地计算出概念密度泛函理论中定义的各种量》(http://sobereva.com/484)介绍的功能。
|
||||
|
||||
|
||||
7 测试
|
||||
退出终端(关闭终端窗口,或者断开链接),然后重新进入终端,之后直接输入Multiwfn(普通版)或Multiwfn_noGUI(noGUI版)应当就能进入Multiwfn了。之后可以随便做简单的测试,比如载入Multiwfn程序包自带的examples目录下的文件然后做简单的计算。例如载入examples/CH3CONH2.fch,之后依次输入
|
||||
9
|
||||
8
|
||||
屏幕上马上就会输出《Multiwfn支持的分析化学键的方法一览》(http://sobereva.com/471)里介绍的拉普拉斯键级。
|
||||
|
||||
|
||||
8 其它
|
||||
如果你是通过纯文本界面连接远程Linux服务器并在上面执行Multiwfn的普通版,并且发现启动Multiwfn时会短暂卡住,在~/.bashrc文件末尾加入export DISPLAY=":0"可以避免。
|
||||
|
||||
《在Linux系统下安装Multiwfn 3.6的演示(CentOS 7.6)》(https://www.bilibili.com/video/av41402462/)是一个较老版本Multiwfn在Linux下的安装演示,如果你在follow上文时遇到困难可以参考。里面有些流程和细节与本文不同,以本文为准。
|
||||
10
README.md
10
README.md
@@ -82,7 +82,15 @@ https://www.moldiscovery.com/software/grid/
|
||||
|
||||
## [gamess](https://www.msg.chem.iastate.edu/gamess/)
|
||||
|
||||
|
||||
All GAMESS requestors MUST agree to the following license agreement which covers all versions of GAMESS (source code, and binaries for Windows, Macintosh and ChemOffice).
|
||||
With regard to the ab initio quantum chemistry code GAMESS, together with its associated graphics and utility programs, with which you have supplied me a copy, I agree to the following conditions:
|
||||
I will not supply a copy of the code to anyone outside my institution or corporation for any reason whatsoever. Instead, I will refer any requests for copies of the program to you at ISUQCG. This in no way limits my making of copies of the code for backup purposes, or for running on more than one computer system at my institution or home.
|
||||
I understand that copyright or ownership rights to GAMESS are retained by ISUQCG and contributors to the GAMESS package. I will not incorporate any part of GAMESS into any other program system, either for sale or for non-profit distribution, without written permission from ISUQCG,
|
||||
I understand that no large program such as GAMESS can be considered to be bug free, and accordingly the ISUQCG supplies the GAMESS software on an "as is" basis, with no additional responsibility or liability,
|
||||
If results obtained with GAMESS are published in the scientific literature, I will reference the program from the article:
|
||||
G. MJ. Barca, C. Bertoni, L. Carrington, D. Datta, N. De Silva, J. E. Deustua, D. G. Fedorov, J. R. Gour, A. O. Gunina, E. Guidez, T. Harville, S. Irle, J. Ivanic, K. Kowalski, S. S. Leang, H. Li, W. L., J. J. Lutz, I. Magoulas, J. Mato, V. Mironov, H. Nakata, B. Q. Pham, P. Piecuch, D. Poole, S. R. Pruitt, A. P. Rendell, L. B. Roskop, K. Ruedenberg, T. Sattasathuchana, M. W. Schmidt, J. Shen, L. Slipchenko, M. Sosonkina, V. Sundriyal, A. Tiwari, J. L. Galvez Vallejo, B. Westheimer, M. Wloch, P. Xu, F. Zahariev, M. S. Gordon J. Chem. Phys. 152 154102 (2020).
|
||||
Using specific methods included in GAMESS may require citing additional articles, as described in the manual. I agree to honor the request to cite additional papers, as appropriate. See HERE For proper citation etiquette.
|
||||
This license is considered a "Research Group" license. Thus anyone directly associated with your research group is covered by the license and may share your copy of GAMESS on all of your group's computer resources.
|
||||
|
||||
|
||||
## [Firefly](http://classic.chem.msu.su/gran/gamess/index.html)
|
||||
|
||||
134
docker/README.md
Normal file
134
docker/README.md
Normal file
@@ -0,0 +1,134 @@
|
||||
|
||||
```shell
|
||||
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/dfc4a434-838c-4450-a6fe-2fa903b75aa7/intel-oneapi-base-toolkit-2025.0.1.46_offline.sh
|
||||
sh ./intel-oneapi-base-toolkit-2025.0.1.46_offline.sh -a --silent --cli --eula accept
|
||||
./configure CC=icc --with-intel-mkl && make && make install
|
||||
```
|
||||
|
||||
error:
|
||||
```shell
|
||||
root@efb88430e4ba:/Open3DQSAR/open3dqsar# ./configure CC=icc --with-intel-mkl
|
||||
checking for a BSD-compatible install... /usr/bin/install -c
|
||||
checking whether build environment is sane... yes
|
||||
checking for a race-free mkdir -p... /usr/bin/mkdir -p
|
||||
checking for gawk... no
|
||||
checking for mawk... mawk
|
||||
checking whether make sets $(MAKE)... yes
|
||||
checking whether make supports nested variables... yes
|
||||
checking build system type... x86_64-pc-linux-gnu
|
||||
checking host system type... x86_64-pc-linux-gnu
|
||||
checking whether make supports the include directive... yes (GNU style)
|
||||
checking for gcc... icc
|
||||
checking whether the C compiler works... no
|
||||
configure: error: in `/Open3DQSAR/open3dqsar':
|
||||
configure: error: C compiler cannot create executables
|
||||
See `config.log' for more details
|
||||
```
|
||||
|
||||
## prepare file
|
||||
|
||||
```shell
|
||||
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.bz2
|
||||
```
|
||||
|
||||
## install manually
|
||||
|
||||
```shell
|
||||
apt update && apt upgrade -y
|
||||
apt install -y build-essential gcc g++ gfortran cmake make wget tar libatlas-base-dev liblapacke-dev libblas-dev git
|
||||
apt install -y build-essential gcc g++ gfortran cmake make wget tar libatlas-base-dev liblapacke-dev libblas-dev libedit-dev zlib1g-dev openbabel libeigen3-dev
|
||||
wget http://open3dqsar.org/downloads/editline-3.0.tar.bz2
|
||||
apt install -y libedit-dev
|
||||
apt install -y zlib1g-dev
|
||||
git
|
||||
git clone https://github.com/UnixJunkie/Open3DQSAR
|
||||
cd Open3DQSAR/
|
||||
ls
|
||||
cd open3dqsar/
|
||||
apt install -y build-essential cmake libatlas-base-dev
|
||||
./bootstrap
|
||||
apt update
|
||||
apt install -y build-essential automake autoconf libtool
|
||||
./bootstrap
|
||||
./configure --with-atlas
|
||||
make -j$(nproc)
|
||||
make install
|
||||
cd test
|
||||
./test.sh
|
||||
```
|
||||
|
||||
## [Open3DGrid](https://opensourcemolecularmodeling.github.io) download and install
|
||||
|
||||
Open3DGrid and Open3DQSAR are a suite of related tools that build 3D QSAR models. Open3DGrid generates molecular interaction fields (MIFs) in a variety of formats, and Open3DQSAR builds predictive models from the MIFs of aligned molecules. Calculations can be visualized in real time in PyMOL.
|
||||
|
||||
Open3DGRID
|
||||
----------
|
||||
|
||||
An open-source software aimed at high-throughput
|
||||
generation of molecular interaction fields (MIFs)
|
||||
|
||||
Paolo Tosco (a,*), Thomas Balle (b)
|
||||
|
||||
a) Department of Drug Science and Technology,
|
||||
University of Turin, via Pietro Giuria 9, 10125 Torino, Italy;
|
||||
e-mail: paolo.tosco@unito.it
|
||||
|
||||
b) Department of Medicinal Chemistry,
|
||||
The Faculty of Pharmaceutical Sciences, University of Copenhagen,
|
||||
2 Universitetsparken, 2100 Copenhagen, Denmark
|
||||
|
||||
http://open3dgrid.org
|
||||
|
||||
|
||||
|
||||
|
||||
Open3DGRID is an open-source software aimed at high-throughput generation
|
||||
of molecular interaction fields (MIFs). Open3DGRID can generate steric
|
||||
potential, electron density and MM/QM electrostatic potential fields;
|
||||
furthermore, it can import GRIDKONT binary files produced by GRID and
|
||||
CoMFA/CoMSIA fields (exported from SYBYL with the aid of a small SPL
|
||||
script).
|
||||
|
||||
High computational performance is attained through implementation of
|
||||
parallelized algorithms for MIF generation.
|
||||
|
||||
Most prominent features in Open3DGRID include:
|
||||
|
||||
* Seamless integration with OpenBabel, PyMOL, GAUSSIAN, FIREFLY,
|
||||
GAMESS-US, MOLDEN, Molecular Discovery GRID
|
||||
|
||||
* Multi-threaded computation of MIFs (both MM and QM); support for
|
||||
MMFF94 and GAFF force-fields with automated assignment of atom types
|
||||
to the imported molecular structures
|
||||
|
||||
* Human and machine-readable text output, integrated with 3D maps
|
||||
in several formats to allow visualization of results in PyMOL, MOE,
|
||||
Maestro and SYBYL
|
||||
|
||||
* User-friendly interface to all major QM packages (e.g. GAUSSIAN,
|
||||
FIREFLY, GAMESS-US, MOLDEN), allows calculation of QM electron
|
||||
density and electrostatic potential 3D maps from within Open3DGRID
|
||||
|
||||
* User-friendly interface to Molecular Discovery GRID to compute
|
||||
GRID MIFs from within Open3DGRID
|
||||
|
||||
|
||||
Open3DGRID is controlled through a command line interface; commands can
|
||||
be either entered interactively from a command prompt or read from a
|
||||
batch script. If PyMOL is installed on the system while Open3DGRID is
|
||||
being operated interactively, the setup of 3D grid computations can be
|
||||
followed in real time on PyMOL's viewport, allowing to tweak grid size and
|
||||
training/test set composition very easily. The main output is arranged
|
||||
as human-readable plain ASCII text, while a number of additional files
|
||||
are generated to store data and to export the results of computations for
|
||||
further analysis and visualization with third party tools. In particular,
|
||||
Open3DGRID can export 3D maps for visualization in PyMOL, MOE, Maestro
|
||||
and SYBYL.
|
||||
|
||||
Open3DGRID is written in C; while pre-built binaries are available for
|
||||
mainstream operating systems (Windows 32/64-bit, Linux 32/64-bit, Solaris
|
||||
x86 32/64-bit, FreeBSD 32/64-bit, Intel Mac OS X 32/64-bit), source
|
||||
code is portable and can be compiled under any platform supporting POSIX
|
||||
threads. The modular nature of the code allows for easy implementation
|
||||
of new features, so that the core application can be customized to meet
|
||||
individual needs.
|
||||
BIN
docker/firefly820_linux_mpich1-ssh.zip
Normal file
BIN
docker/firefly820_linux_mpich1-ssh.zip
Normal file
Binary file not shown.
BIN
docker/open3dgrid-2.31.tar.bz2
Normal file
BIN
docker/open3dgrid-2.31.tar.bz2
Normal file
Binary file not shown.
BIN
docker/openmpi-4.1.6.tar.bz2
Normal file
BIN
docker/openmpi-4.1.6.tar.bz2
Normal file
Binary file not shown.
BIN
docker/orca_6_0_0_linux_x86-64_avx2_shared_openmpi416.tar.xz
Normal file
BIN
docker/orca_6_0_0_linux_x86-64_avx2_shared_openmpi416.tar.xz
Normal file
Binary file not shown.
62
multiwfn_installation_guide(20240926100545).md
Normal file
62
multiwfn_installation_guide(20240926100545).md
Normal file
@@ -0,0 +1,62 @@
|
||||
## 2.1.2 Linux版本
|
||||
|
||||
注意:本节的中文版可在我的博客文章“Linux下安装Multiwfn的中文说明”中找到([http://sobereva.com/688](http://sobereva.com/688))。
|
||||
|
||||
- **解压Multiwfn二进制包**
|
||||
- 确保已安装motif包,该包提供了`libXm.so.4`文件,完整版本的Multiwfn无法在没有该文件的情况下启动。Motif可在[https://motif.ics.com/motif/downloads](https://motif.ics.com/motif/downloads)免费获取。如果你是CentOS或Red Hat Linux用户,且尚未安装motif,可以直接运行`yum install motif`命令来安装;或者你可以下载对应的rpm包(例如`motif-2.3.4-1.x86_64.rpm`)并手动安装。如果你是Ubuntu用户,运行以下命令安装:
|
||||
|
||||
\`\`\`bash
|
||||
sudo apt-get install libxm4 libgl1
|
||||
\`\`\`
|
||||
|
||||
或者下载deb包(例如`libmotif4_2.3.4-1_amd64.deb`)并手动安装。
|
||||
|
||||
- **在`~/.bashrc`文件中添加以下行**(可以使用例如`vi ~/.bashrc`命令):
|
||||
\`\`\`bash
|
||||
export OMP_STACKSIZE=1000M
|
||||
ulimit -s unlimited
|
||||
\`\`\`
|
||||
这些行代码移除了栈内存的限制,并为每个OpenMP线程定义了1000MB的栈大小用于并行计算。详细信息见第2.4节。
|
||||
**注意**:如果`ulimit -s unlimited`在你的系统上无法正常工作,请尝试使用`ulimit -Sn unlimited`代替。
|
||||
|
||||
- **运行**:
|
||||
\`\`\`bash
|
||||
cat /proc/sys/kernel/shmmax
|
||||
\`\`\`
|
||||
检查SysV共享内存段的大小是否足够大(单位为字节);如果值太小,Multiwfn在分析大波函数时可能会崩溃。要增大此值,例如,你可以在`/etc/sysctl.conf`中添加`kernel.shmmax = 5000000000`,然后重启系统,这样上限将增加到大约5GB。
|
||||
|
||||
- 假设你使用的是Bash Shell,并且已经将Multiwfn包解压到了`/sob/Multiwfn_3.6_bin_Linux`文件夹中,你应该将以下行添加到`~/.bashrc`文件中:
|
||||
\`\`\`bash
|
||||
export Multiwfnpath=/sob/Multiwfn_3.6_bin_Linux
|
||||
export PATH=$PATH:/sob/Multiwfn_3.6_bin_Linux
|
||||
\`\`\`
|
||||
|
||||
- **运行以下命令为Multiwfn可执行文件添加可执行权限**:
|
||||
\`\`\`bash
|
||||
chmod +x /sob/Multiwfn_3.6_bin_Linux/Multiwfn
|
||||
\`\`\`
|
||||
|
||||
- **按照上一节中的说明配置Multiwfn文件夹中的`settings.ini`文件**。
|
||||
|
||||
6 配置settings.ini
|
||||
编辑Multiwfn目录下的settings.ini,搜索nthreads,将之数值改为计算时要用的并行核数,通常设为CPU的物理核心数即可。
|
||||
|
||||
settings.ini里还有几个其它设置想改的话可以根据需要修改一下
|
||||
•formchkpath:定义的是Gaussian目录下的formchk程序的路径。formchk是干嘛的在《详谈Multiwfn支持的输入文件类型、产生方法以及相互转换》(http://sobereva.com/379)里明确说了。如果把它设成了formchk的实际的路径,Multiwfn就可以直接载入Gaussian的chk文件(在载入时会自动调用formchk转换成fch文件后载入)。
|
||||
•orca_2mklpath:如果设成了ORCA目录下的orca_2mkl可执行文件的路径,Multiwfn就可以直接载入ORCA计算产生的gbw文件(在载入时会自动调用orca_2mkl转换成molden文件后载入)。
|
||||
•gaupath和orcapath:当它们分别设成了Gaussian和ORCA的可执行文件的路径,Multiwfn的一些功能才能自动调用Gaussian和ORCA进行计算,如《使用Multiwfn超级方便地计算出概念密度泛函理论中定义的各种量》(http://sobereva.com/484)介绍的功能。
|
||||
|
||||
|
||||
- 重新进入终端后,你可以通过简单地运行`Multiwfn`命令在任何地方启动Multiwfn。
|
||||
|
||||
- 如果你通过远程连接以文本模式使用Multiwfn,并且发现Multiwfn在加载输入文件后大约两秒钟内卡住,请将以下内容添加到`~/.bashrc`文件中:
|
||||
\`\`\`bash
|
||||
export DISPLAY=":0"
|
||||
\`\`\`
|
||||
|
||||
- Multiwfn的Linux版本在CentOS 6/7/8、Rocky Linux 9和Ubuntu 12/14/16/22上运行良好。我不能保证该程序完全兼容所有其他Linux发行版。如果系统提示你在启动Multiwfn时缺少某些动态链接库(.so文件),请尝试找到并安装包含相应.so文件的包。
|
||||
|
||||
- 如果由于缺少或不兼容某些与图形相关的库文件而在运行/编译Multiwfn时遇到困难,并且同时你不需要Multiwfn的任何可视化功能,你可以在不支持GUI的情况下运行/编译Multiwfn,所有与GUI和地图绘制无关的功能仍将正常工作。请查阅源码包中的“COMPLIATION_METHOD.txt”了解如何编译此特殊版本的详细信息,该版本的预编译可执行文件也可以从Multiwfn网站下载(称为“noGUI”版本)。
|
||||
|
||||
|
||||
如果你是通过纯文本界面连接远程Linux服务器并在上面执行Multiwfn的普通版,并且发现启动Multiwfn时会短暂卡住,在~/.bashrc文件末尾加入export DISPLAY=":0"可以避免。
|
||||
108
量子化学程序ORCA的安装方法.txt
Normal file
108
量子化学程序ORCA的安装方法.txt
Normal file
@@ -0,0 +1,108 @@
|
||||
# 重要使用时使用绝对路径:
|
||||
|
||||
```shell
|
||||
/root/orca_6_0_0_shared_openmpi416_avx2/orca test.inp > test.out
|
||||
```
|
||||
|
||||
# 导出镜像
|
||||
|
||||
```shell
|
||||
docker save -o hotwa_orca.tar hotwa/orca:latest
|
||||
```
|
||||
|
||||
# 导出镜像
|
||||
|
||||
```shell
|
||||
docker load -i hotwa_orca.tar
|
||||
```
|
||||
|
||||
教程:
|
||||
|
||||
量子化学程序ORCA的安装方法
|
||||
|
||||
Installation method of ORCA quantum chemistry program
|
||||
|
||||
文/Sobereva@北京科音
|
||||
First release 2018-Dec-21 Last update: 2023-Oct-19
|
||||
|
||||
|
||||
0 前言
|
||||
ORCA是一款对学术用户免费但不开源的量子化学程序,发展迅猛,流行程度越来越高,用户越来越多。虽然ORCA的安装很简单,都不需要编译源代码,但还是有不少量子化学初学者经常问怎么安装,这里就统一说一下。当随着ORCA程序更新,导致最新版安装方法与本文存在较大差异时,本文也将同步更新。目前本文对应的是ORCA 6。ORCA虽然有也有Mac版,但由于极其小众,安装方法这里就不提了。
|
||||
|
||||
ORCA官网是https://orcaforum.kofo.mpg.de,和ORCA论坛是在一起的。进去之后注册个新用户,登陆后就可以进入论坛,页面上方有Download按钮,进去就可以下载可执行程序和手册了。如果你注册ORCA论坛时验证码刷不出来,或者根本连ORCA官网都打不开的话,说明需以特殊姿势上网。
|
||||
|
||||
为了测试安装后ORCA是否能正常运行,这里提供个简单的测试文件,将以下内容复制到比如test.inp里即可作为输入文件。此任务要求4核并行:
|
||||
|
||||
! BLYP def2-SVP noautostart miniprint pal4
|
||||
* xyz 0 1
|
||||
C 0.00000000 0.00000000 -0.56221066
|
||||
H 0.00000000 -0.92444767 -1.10110537
|
||||
H -0.00000000 0.92444767 -1.10110537
|
||||
O 0.00000000 0.00000000 0.69618930
|
||||
*
|
||||
|
||||
顺带一提,有些人用ORCA只是想算很常见类型的问题,但不会写关键词。最最简单的做法就是用Multiwfn产生ORCA的输入文件,超级容易,里面的关键词都是绝对最恰当的,见《详谈Multiwfn产生ORCA量子化学程序的输入文件的功能》(http://sobereva.com/490)。此文是一个用Multiwfn创建输入文件结合ORCA做计算的实例:《Simulating UV-Vis and ECD spectra using ORCA and Multiwfn》(http://sobereva.com/485);此视频是一个利用Multiwfn这个功能的综合实例:《基于ORCA量子化学程序对分子做优化、振动分析、观看红外光谱、观看轨道的简单演示》(https://www.bilibili.com/video/av59599938)。
|
||||
|
||||
|
||||
1 Windows版的安装
|
||||
ORCA的Windows版只有64bit的,如果你还在坚持使用老掉牙的32bit Windows,就别指望用Windows版了,要么装64bit Windows系统,要么在现有的32bit Windows下用VMware虚拟机装个64bit Linux跑ORCA Linux版。
|
||||
|
||||
ORCA是基于MPI方式进行并行运算的程序,目前的版本在Windows下是依赖于Microsoft MPI (MSMPI)库运行的,因此还要给系统安装MSMPI。ORCA 6可以搭配MSMPI 10.0运行。Google一下MSMPI 10.0就可以立刻找到MSMPI的下载地址,下载并安装之即可。
|
||||
|
||||
去ORCA论坛下载“ORCA [版本号], Windows, 64bit, Installer”页面里的压缩包,将之解压后,运行Orca[版本号].Win64.exe,就会启动安装程序,选择以Complete方式安装,对于ORCA 6.0.0装好后会占用13多GB硬盘。
|
||||
|
||||
下面测试ORCA能否正常并行运行。将本文开头给的测试文件拷到某处,然后进入操作系统的命令行模式,假设ORCA装到了D:\study\ORCA_6.0.0,就输入D:\study\ORCA_6.0.0\orca H2CO.inp > H2CO.out来执行H2CO.inp并将输出信息输出到H2CO.out。注意输入文件要求并行计算时,必须像这样输入ORCA的绝对路径才行。如果计算中途的输出信息看起来很正常,最后也显示****ORCA TERMINATED NORMALLY****,就说明没问题。如果并行不正常的话,可能会看到输出信息是混乱交错的,这是由于各个进程没有真正协同工作所致。
|
||||
|
||||
ORCA有一部分后HF和多参考计算功能是只有autoCI模块才能做的,比如FIC-MRCI、CCSDT等。如果你需要用这些方法,在按照前面的方法安装的基础之上,还需要进入官方论坛下载页面中的“ORCA [版本号], Windows, 64bit, autoci / parallel part”页面,把里面的压缩包下载下来并解压到ORCA的安装目录下。你会看到这个压缩包里包含的可执行文件开头都带着autoci_字样。把autoCI模块也装上的话,ORCA 6的目录最后会达到30多GB!
|
||||
|
||||
附:在Windows下使用ORCA的最便捷方法
|
||||
利用cmder可以令ORCA在Windows下的使用明显更方便,cmder是一个第三方的文本终端。首先去https://cmder.app下载Full版的cmder,然后解压到你平时安装应用程序的目录。之后进入操作系统的命令行窗口,在cmder的目录下,输入Cmder.exe /REGISTER ALL。从此在任意目录下点右键选cmder Here即可进入cmder命令行窗口,并且当前路径就是此文件夹。启动cmder窗口后,在cmder的标题位置点右键选Settings,在General页面里选择{bash::bash as Admin},然后把cmder关了。从此之后,新开的cmder终端里的命令写法就和Linux的Bash环境下一样了,连awk、vi等常用工具都有。用文本编辑器打开cmder安装目录下的config\user_profile.sh,添加一行比如alias oo='D:/study/orca600/orca',这里oo是你启动ORCA想用的自定义命令,后面是ORCA可执行文件路径。这样,进入cmder后就可以使用比如oo Roselia.inp |tee RAS.out来调用ORCA运行.inp文件,输出的信息不仅显示在屏幕上还同时输出到RAS.out里,比起在Windows的cmd或者PowerShell里运行ORCA方便省事得多。
|
||||
|
||||
|
||||
2 Linux版的安装
|
||||
下面的内容涉及到一些最基本的Linux常识性知识,如果你对Linux是零基础,看下面内容之前建议看看《Gaussian的安装方法及运行时的相关问题》(http://sobereva.com/439)的1.1节。
|
||||
|
||||
2.1 安装OpenMPI
|
||||
ORCA在Linux下是通过OpenMPI这种MPI库实现并行的,并行方式运行ORCA之前需要先编译OpenMPI库。ORCA文件包的文件名当中直接体现了要求的OpenMPI库版本,比如文件名里有openmpi416就代表需要OpenMPI 4.1.1。不代表其它版本OpenMPI就一定不兼容。比如ORCA 6.0.0标配OpenMPI 4.1.6,但我实测结合4.1.1也完全可以用。所有版本的OpenMPI源代码都包可以在https://www.open-mpi.org上下载,比如4.1.6的下载地址为https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.bz2。
|
||||
|
||||
先检查机子有没有装gcc和gfortran编译器,没有的话必须先装上。比如对于CentOS或Rocky Linux,分别运行yum install gcc、yum install gcc-gfortran就能安装。特别要注意,如果只装了gcc而没装gfortran,虽然OpenMPI能正常编译完成,但是此时会由于没有Fortran的接口而导致之后ORCA没法正常并行运行。
|
||||
|
||||
用诸如tar -xf openmpi-4.1.6.tar.bz2命令解压OpenMPI压缩包,进入此目录,输入以下命令,OpenMPI就会被安装到/sob/openmpi416目录下
|
||||
./configure --prefix=/sob/openmpi416 --disable-builtin-atomics
|
||||
make all install -j
|
||||
注:这里用-j是为了通过并行编译降低编译过程耗时。但如果编译中途出现诡异报错,去掉-j再试。
|
||||
|
||||
如果你的操作系统的shell是Bash(如CentOS、Rocky Linux就是),就编辑用户目录下的.bashrc文件,比如运行vi ~/.bashrc命令,将诸如以下两行加入到文件末尾,之后保存
|
||||
export PATH=$PATH:/sob/openmpi416/bin
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sob/openmpi416/lib
|
||||
然后重新打开终端,以上设置就生效了。可以运行mpiexec -V命令,如果正常显示出了OpenMPI的版本,就说明已经装好了。之前解压出来的openmpi-4.1.6目录现在也可以删掉了。
|
||||
|
||||
|
||||
2.2 安装ORCA
|
||||
下载比如orca_6_0_0_linux_x86-64_avx2_shared_openmpi416.tar。然后用
|
||||
tar -xf orca_6_0_0_linux_x86-64_avx2_shared_openmpi416.tar
|
||||
命令即可解压之。文件名里的avx2代表CPU必须支持AVX2指令集才可以用,否则应当下载不带avx2字样的ORCA包。目前主流的CPU都支持AVX2,如果你的CPU较老,可以通过我整理的硬件资料库(http://sobereva.com/datasheet.rar)的查询支持的指令集。
|
||||
|
||||
假设ORCA解压后的目录是/sob/orca600/,就在.bashrc文件里加入以下内容并保存
|
||||
export PATH=$PATH:/sob/orca600
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sob/orca600
|
||||
|
||||
重新进入终端令以上语句生效后即可运行ORCA。并行运行时必须写明ORCA的绝对路径,如:
|
||||
/sob/orca600/orca test.inp > test.out
|
||||
如果懒得每次都写绝对路径,可以在.bashrc里加上下面这句
|
||||
alias orca='/sob/orca600/orca'
|
||||
这代表令orca命令等价于/sob/orca600/orca。
|
||||
|
||||
|
||||
2.3 其它
|
||||
有些系统如CentOS自带了名为orca的带有图形界面的没什么用的屏幕阅读器程序,直接输入orca命令启动的是那个程序,和本文的ORCA毫无联系。应当用rpm -e orca命令将自带的那个orca卸载掉。
|
||||
|
||||
如果你是在root用户下使用ORCA,由于OpenMPI的一个恶心的要求,必须每次执行的命令都带着-allow-run-as-root选项才行,这很烦人。可以在.bashrc里加入以下两行来避免,这在《root用户在用openmpi并行计算时避免加--allow-run-as-root的方法》(http://sobereva.com/409)里也说过:
|
||||
export OMPI_ALLOW_RUN_AS_ROOT=1
|
||||
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
|
||||
|
||||
如果你的机子里之前装有其它MPI库或OpenMPI的其它版本,且在终端里输入which mpiexec命令的时候指向的是那些库的目录,则ORCA有极大可能会无法正常并行,需要你恰当处理以避免其优先级盖过你自己新装的OpenMPI。具体怎么处理,关键取决于你当前机子里之前具体是怎么装的MPI库。如果你之前是把其它MPI库装到了你自定义的目录下而非默认的/usr/local/bin下面,你就把那个MPI库的目录名随便改一下,或者把那个MPI库在.bashrc里的配置语句注释掉(前面加#号)然后重新登录终端。如果其它MPI被你安装到了默认路径(如/usr/local下),可以把前文的$PATH:/sob/openmpi416/bin改为/sob/openmpi416/bin:$PATH、把$LD_LIBRARY_PATH:/sob/openmpi416/lib改为/sob/openmpi416/lib:$LD_LIBRARY_PATH,然后重新登录终端,之所以这样做会奏效是因为此时openmpi416的路径会先于其它路径出现在这俩环境变量里,会被优先利用。
|
||||
|
||||
如果想用非常强大的波函数分析程序Multiwfn(http://sobereva.com/multiwfn)对ORCA的计算结果进行波函数分析和观看轨道图形,运行orca_2mkl xxx -molden,就把ORCA计算时产生的xxx.gbw转化成了xxx.molden.input,此文件可以直接作为Multiwfn的输入文件。orca_2mkl是ORCA目录下自带的意义上类似于Gaussian的formchk的工具。如果把Multiwfn目录里的settings.ini里的orca_2mklpath参数设为当前机子里orca_2mkl可执行文件的实际路径,则Multiwfn还可以直接载入gbw文件,更方便了。
|
||||
|
||||
Multiwfn还可以基于ORCA的输出文件绘制光谱图,见《使用Multiwfn绘制红外、拉曼、UV-Vis、ECD、VCD和ROA光谱图》(http://sobereva.com/224)。但注意,如果在Windows下运行ORCA,不要用PowerShell,要么用cmd要么用cmder。因为PowerShell里通过重定向产生的ORCA输出文件默认是Unicode编码的,Multiwfn没法读取里面的信息。《OfakeG:使GaussView能够可视化ORCA输出文件的工具》(http://sobereva.com/498)介绍的OfakeG程序也同样不认Unicode编码。用cmder的方法前面已经说了,在Win 10/11里如果想方便快速地进入cmd,只需运行一个注册表配置文件即可,见http://bbs.keinsci.com/thread-22940-1-1.html。
|
||||
Reference in New Issue
Block a user