天天看点

Ubuntu+PLUMED安装、编译和环境配置增强采样技术(enhanced sampling)PLUMEDLAMMPS+PLUMED

增强采样技术(enhanced sampling)

增强采样技术是一种为了突破分子动力学软件常规的采样方法(均匀采样)而开发出的新型采样方法。由于分子动力学模拟是基于牛顿力学而实现的,因此,在模拟状态的时间内,体系粒子所发生的位移和转变是连续的,但在传统采样方法中一般使用均匀采样方法(采样时间间隔一般为单位尺度的十分之一)。比如每隔10ps进行一次样本采集。但这种采样方法虽然提高了采样效率,但随之而也失去了化学反应时一瞬间发生的数据。故在分子动力学模拟的过程中,为描述整个化学反应的全流程而提出增强采样技术。为在使用增强采用技术的前提下,仍然保持一定的采样效率,可以调整采样概率的方法,比如:在高简并度的状态,降低采样频率;在低简并度的状态,提高采样频率。近年利用深度学习的方法也可以提高采样效率。

增强采样技术有很多方法,比如:元动力学(metaDynamic)、VES、ITS和伞形采样(Umbrella Sampling)。

PLUMED

plumed是一款专门的伞形采样软件,官方建议也要安装BLAS和LAPACK,此处不下载安装PLUMED下载界面

下载完成后

安装

./configure --prefix=/home/zteng//home/zteng/plumed-2.8.0
make -j 8
sudo make install
           

安装完成,设置环境变量

vim ~/.bashrc
export PATH=<软件路径>${PATH:+:${PATH}}
export LD_LIBRARY_PATH=<软件路径>${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}		#此环境路径似乎是动态路径,可以调用相同路径的其他包共同使用
           

环境变量设置完毕,检验:

LAMMPS+PLUMED

需要在lammps中安装plumed。将plumed软件包下载到:

/home/zteng/lammps-23Jun2022/lib/plumed
           

编译安装

./configure --prefix=/home/zteng//home/zteng/plumed-2.8.0
make -j 8
make doc 	#可不写
make install
           

下文为lammps中的plumed说明,自行参考:

This directory contains links to the PLUMED library which is required
to use the PLUMED package and its fix plumed command in a
LAMMPS input script.  PLUMED should only be downloaded into this directory if
you wish to statically link the library.  If you wish to link PLUMED as
a dynamic library (as we recommend) then you can compile and build PLUMED
separately to LAMMPS.  To use PLUMED in conjunction with LAMMPS you then simply
need to ensure that the PLUMED library is in your path at runtime.

More info about the PLUMED library can be found at http://www.plumed.org.

You can type "make lib-plumed" from the src directory to see help on
how to download, build and statically link PLUMED via make commands, or you can
do the same thing by typing "python Install.py" from within this
directory.   Alternatively you can download and build PLUMED manually by following the instructions
below.

-----------------

Instructions:

1.  Download PLUMED either as a tarball from
    http://www.plumed.org/get-it
    or clone it using git clone https://github.com/plumed/plumed2.git.
    If you download the tarball
    unpack it in unpack it in this /lib/plumed directory.
    Similarly if you clone it clone it to the /lib/plumed
    directory.

2.  Compile PLUMED from within its home directory.  In the
    simplest cases this be done by issuing the commands
    % ./configure
    % make
    More detailed instructions can be found at
    http://plumed.github.io/doc-master/user-doc/html/_installation.html

3.  There is no need to install PLUMED if you only wish
    to use it from LAMMPS.  You should thus only run
    make install if you want to use PLUMED as a stand-alone
    code or from some other code.  To install it you can
    run the following commands:
    a) install under the default /usr/local
       % sudo make install
    b) install under a user-writeable location by first
         changing the PREFIX variable when running the
         configure command file, then
       % make install

-----------------

When these steps are complete you can build LAMMPS
with the PLUMED package installed:

% cd lammps/src
% make yes-plumed
% make mpi (or whatever target you wish)