计算化学公社

标题: 用xtb程序跑AIMD如何构建显示水模型 [打印本页]

作者
Author:
ljh123    时间: 2024-10-29 22:43
标题: 用xtb程序跑AIMD如何构建显示水模型
我有两个问题想请教下:
1.xtb跑AIMD是无法用周期性盒子吗?我在手册里没看到相关内容。
2.如果用不了周期性盒子,那是直接构造一个球型的水团簇包裹住溶质吗?我是考察溶液中的反应,可能有水和质子参与,不知道可以不可以用水团簇代替周期性盒子

作者
Author:
sobereva    时间: 2024-10-30 01:44
无法用。xtb只对于GFN-FF支持周期性计算。周期性GFN1-xTB计算用CP2K是极佳的选择

水团簇不一定可以,MD过程中有可能关心的区域跑到簇的边缘

作者
Author:
ljh123    时间: 2024-10-30 13:11
sobereva 发表于 2024-10-30 01:44
无法用。xtb只对于GFN-FF支持周期性计算。周期性GFN1-xTB计算用CP2K是极佳的选择

水团簇不一定可以,MD ...

好的谢谢sob老师,因为成本限制所以打算用gfn2-xtb跑金属络合物反应的aimd,现在看来得学一学cp2k了
作者
Author:
ljh123    时间: 2024-10-30 14:54
sobereva 发表于 2024-10-30 01:44
无法用。xtb只对于GFN-FF支持周期性计算。周期性GFN1-xTB计算用CP2K是极佳的选择

水团簇不一定可以,MD ...

sob老师,我在linux系统中使用cp2k发生了报错。报错文件提示/share/apps/cp2k-2023.2/exe/local/cp2k.popt: error while loading shared libraries: libmpi.so.12: cannot open shared object file: No such file or directory。这个报错是说mpi库缺少libmpi.so.12库的意思吗
作者
Author:
Uus/pMeC6H4-/キ    时间: 2024-10-30 15:01
本帖最后由 Uus/pMeC6H4-/キ 于 2024-10-30 15:04 编辑
ljh123 发表于 2024-10-30 14:54
sob老师,我在linux系统中使用cp2k发生了报错。报错文件提示/share/apps/cp2k-2023.2/exe/local/cp2k.pop ...

这个CP2K以前具体怎么安装编译的,有没有加载什么非默认的编译器或MPI模块,现在运行时有没有source目录下那个tools/toolchain/install/setup文件?
作者
Author:
ljh123    时间: 2024-10-30 15:07
Uus/pMeC6H4-/キ 发表于 2024-10-30 15:01
这个CP2K是什么版本,以前具体怎么安装编译的,有没有加载什么非默认的MPI模块,现在运行时有没有source ...

cp2k和Mpi都是学校超算平台自己编译的。cp2k版本好像是cp2k/2023.2。mpi版本是4.1.6。tools/toolchain/install/setup这个已经加到环境变量里了
作者
Author:
ljh123    时间: 2024-10-30 15:10
Uus/pMeC6H4-/キ 发表于 2024-10-30 15:01
这个CP2K以前具体怎么安装编译的,有没有加载什么非默认的编译器或MPI模块,现在运行时有没有source目录 ...

我在/share/apps/openmpi4.1.6/lib目录下面找了下这个文件。发现没有找到libmpi.so.12文件,只找到了libmpi.so.40。不知道这个该怎么处理呢
作者
Author:
Uus/pMeC6H4-/キ    时间: 2024-10-30 15:24
ljh123 发表于 2024-10-30 15:07
cp2k和Mpi都是学校超算平台自己编译的。cp2k版本好像是cp2k/2023.2。mpi版本是4.1.6。tools/toolchain/in ...

如果是超算平台的话,module list和module avail看到的模块加载情况如何?有可能平台不只有OpenMPI 4.1.6,而cp2k编译的时候按别的MPI编译的,如果能翻到cp2k目录的话看看arch文件夹local.psmp怎么写的。

tools/toolchain/install/setup的source指令不是加到自己登录节点的环境变量里,而是往计算节点排队系统提交任务的脚本里。
作者
Author:
ljh123    时间: 2024-10-30 15:43
Uus/pMeC6H4-/キ 发表于 2024-10-30 15:24
如果是超算平台的话,module list和module avail看到的模块加载情况如何?有可能平台不只有OpenMPI 4.1.6 ...

老师我刚刚去看了下,平台里有4.1.6、4.1.5、3.1.2版本的openmpi,我均试了一边都是一样的报错。至于您说的文件我找到了,但是作为小白看不太明白。我将文件复制如下,您可以帮忙看看吗。万分感谢
CC          = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiicc
CXX         = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiicpc
AR          = ar -r
FC          = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiifort
LD          = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiifort
#
DFLAGS      =  -D__LIBXSMM  -D__parallel -D__MPI_F08 -D__MKL -D__FFTW3  -D__SCALAPACK -D__FFTW3  -D__LIBINT -D__LIBXC -D__COSMA -D__ELPA  -D__GSL -D__HDF5 -D__LIBVDWXC -D__SPGLIB -D__LIBVORI -D__SPFFT    -D__SPLA -D__SIRIUS  
#
WFLAGS      =   
#
FCDEBFLAGS  =  
CFLAGS      = -cc=icx -fPIC -fp-model=precise -g -qopenmp -qopenmp-simd -traceback -xHost -O2 -funroll-loops $(PROFOPT)    -m64 -I/share/apps/oneapi21.4/mkl/2021.4.0/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/fftw-3.3.10/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/COSMA-2.6.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/modules' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/elpa' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/gsl-2.7/include' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/hdf5-1.12.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/libvdwxc-0.4.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/spglib-1.16.2/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpFFT-1.0.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpLA-1.5.5/include/spla' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/sirius-7.4.3/include -std=c11 -Wall $(DFLAGS)
FCFLAGS     = -fc=ifort -fPIC -fp-model=precise -g -qopenmp -qopenmp-simd -traceback -xHost -O2 -funroll-loops $(PROFOPT)    -m64 -I/share/apps/oneapi21.4/mkl/2021.4.0/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/fftw-3.3.10/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/COSMA-2.6.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/modules' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/elpa' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/gsl-2.7/include' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/hdf5-1.12.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/libvdwxc-0.4.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/spglib-1.16.2/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpFFT-1.0.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpLA-1.5.5/include/spla' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/sirius-7.4.3/include $(FCDEBFLAGS) $(WFLAGS) $(DFLAGS) -diag-disable=8291 -diag-disable=8293 -fpp -fpscomp logicals -free
CXXFLAGS    = -cxx=icpx -fPIC -fp-model=precise -g -qopenmp -qopenmp-simd -traceback -xHost -O2 -funroll-loops $(PROFOPT)    -m64 -I/share/apps/oneapi21.4/mkl/2021.4.0/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/fftw-3.3.10/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/COSMA-2.6.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/modules' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/elpa' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/gsl-2.7/include' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/hdf5-1.12.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/libvdwxc-0.4.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/spglib-1.16.2/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpFFT-1.0.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpLA-1.5.5/include/spla' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/sirius-7.4.3/include -std=c11 -Wall $(DFLAGS) -fPIC -fp-model=precise -g -qopenmp -qopenmp-simd -traceback -xHost -O2 -funroll-loops $(PROFOPT)    -m64 -I/share/apps/oneapi21.4/mkl/2021.4.0/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/fftw-3.3.10/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/COSMA-2.6.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/modules' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/elpa' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/gsl-2.7/include' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/hdf5-1.12.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/libvdwxc-0.4.0/include -I/share/package/src/cp2k-2023.2/tools/toolchain/install/spglib-1.16.2/include -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpFFT-1.0.6/include' -I'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpLA-1.5.5/include/spla' -I/share/package/src/cp2k-2023.2/tools/toolchain/install/sirius-7.4.3/include --std=c++14 $(DFLAGS)
#
LDFLAGS     =  $(FCFLAGS) -Wl,--enable-new-dtags -L'/share/apps/oneapi21.4/mpi/2021.4.0/lib/release' -Wl,-rpath,'/share/apps/oneapi21.4/mpi/2021.4.0/lib/release'  -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/fftw-3.3.10/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/fftw-3.3.10/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxc-6.2.2/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/libxsmm-1.17/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/COSMA-2.6.6/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/COSMA-2.6.6/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/elpa-2022.11.001/cpu/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/gsl-2.7/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/gsl-2.7/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/hdf5-1.12.0/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/hdf5-1.12.0/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/libvdwxc-0.4.0/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/libvdwxc-0.4.0/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/spglib-1.16.2/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/spglib-1.16.2/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/libvori-220621/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/libvori-220621/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpFFT-1.0.6/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpFFT-1.0.6/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpLA-1.5.5/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/SpLA-1.5.5/lib' -L'/share/package/src/cp2k-2023.2/tools/toolchain/install/sirius-7.4.3/lib' -Wl,-rpath,'/share/package/src/cp2k-2023.2/tools/toolchain/install/sirius-7.4.3/lib'
LDFLAGS_C   = -nofor-main
LIBS        = -lsirius  -lspla -lspfft -lsymspg -lvdwxc -lhdf5 -lhdf5_hl -lz -lgsl -lelpa_openmp -lcosma_prefixed_pxgemm -lcosma -lcosta  -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp  -lmpi -lmpicxx  -L/share/apps/oneapi21.4/mkl/2021.4.0/lib/intel64 -Wl,-rpath,/share/apps/oneapi21.4/mkl/2021.4.0/lib/intel64 -lmkl_scalapack_lp64 -Wl,--start-group -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 -Wl,--end-group -lpthread -lm -ldl -lvori -lstdc++ -lstdc++
#
# Required due to memory leak that occurs if high optimisations are used
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
        $(FC) -c $(subst -O2,-O0,$(FCFLAGS)) $<
# Required due to SEGFAULTS occurring for higher optimisation levels
paw_basis_types.o: paw_basis_types.F
        $(FC) -c $(subst -O2,-O1,$(FCFLAGS)) $<
# Reduce compilation time
hfx_contraction_methods.o: hfx_contraction_methods.F
        $(FC) -c $(subst -O2,-O1,$(FCFLAGS)) $<

作者
Author:
Uus/pMeC6H4-/キ    时间: 2024-10-30 16:08
不必叫老师{/) (\}

看这个文件前五行写的flags引用的指令的路径,
  1. CC          = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiicc
  2. CXX         = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiicpc
  3. AR          = ar -r
  4. FC          = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiifort
  5. LD          = /share/apps/oneapi21.4/mpi/2021.4.0/bin/mpiifort
复制代码

可见编译CP2K的时候用的是Intel的OneAPI 2021.4而非任何一个OpenMPI,那运行时也得相应启用Intel MPI才能找到依赖库。module avail应该能看到对应的模块,module load加载以后mpirun --version再确认一遍是不是对应版本的Intel MPI,如果是的话mpirun cp2k.popt -v应该可以正常运行(并提示编译器信息等)。
作者
Author:
ljh123    时间: 2024-10-30 16:36
Uus/pMeC6H4-/キ 发表于 2024-10-30 16:08
不必叫老师{/) (\}

看这个文件前五行写的flags引用的指令的路径,

感谢感谢,不过我改成OneAPI2021.4后提示cp2k.popt: error while loading shared libraries: libmkl_scalapack_lp64.so.2: cannot open shared object file: No such file or directory
请问下这应该时mkl库吧,这个我该怎么调用呢
作者
Author:
Uus/pMeC6H4-/キ    时间: 2024-10-30 20:49
本帖最后由 Uus/pMeC6H4-/キ 于 2024-10-30 21:24 编辑
ljh123 发表于 2024-10-30 16:36
感谢感谢,不过我改成OneAPI2021.4后提示cp2k.popt: error while loading shared libraries: libmkl_scal ...

在local.psmp里面搜mkl字样,仔细观察前面的路径就知道MKL库是Intel OneAPI 2021.4的一部分。完全切换到这个Intel OneAPI环境(包括编译器和MPI)、source了setup文件之后,echo $MKLROOT和echo $MKL_LIBS应当能看到对应路径,这时再运行CP2K。

实在跑不起来就跟同一个超算平台能用CP2K的用户问问具体怎么操作,毕竟(已编辑)我也只是一个路过的
作者
Author:
ljh123    时间: 2024-10-30 21:31
Uus/pMeC6H4-/キ 发表于 2024-10-30 20:49
在local.psmp里面搜mkl字样,仔细观察前面的路径就知道MKL库是Intel OneAPI 2021.4的一部分。完全切换到 ...

好的好的,感谢你,我做了很多尝试,感觉应该是我们超算平台没编译好。因为我们学校的超算也是年初才试运行的。我自己跟着教程编译了CP2K,现在可以运行了
作者
Author:
get-it    时间: 2024-10-30 22:58
跑周期性xtb MD可以考虑tblite: https://tblite.readthedocs.io/en/latest/




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3