ChemiAndy

DPDmacs学习笔记之一-安装

+++++++++++++++++++++++++++++++++++++++++
笔记目录
1. 下载与安装
2. DPD理论
3. DPDmacs模拟
(1)建模与输入文件准备;
(2)模拟参数设定
(3)结果分析
++++++++++++++++++++++++++++++++++++++++++

Introduction
DPDmacs是基于DPD理论(耗散离子动力学)进行大尺度分子模拟的软件之一。
最近打算用它来模拟润滑剂分子的表面扩散行为,因此选择它作为所用软件,一是因为免费,而是因为它与Gromacs非常接近。

我的软硬件配置:AMD64, Ubuntu 9.10 Karmic
> uname -a
Linux xijun-desktop 2.6.31-21-generic #59-Ubuntu SMP Wed Mar 24 07:28:27 UTC 2010 x86_64 GNU/Linux

编译环境: GNU4.4 / intel Compiler, intel MKL
GNU 和intel 编译器均可,但是手册说Intel编译器编译的结果要快10%左右。因此选择intel编译器。

1. 下载与安装
下载:DPDmacs Homepage: https://www.apmaths.uwo.ca/~mkarttu/dpdmacs.shtml
> mkdir dpdmacs
> cd dpdmacs  //建立dpdmacs目录并进入
> wget https://www.apmaths.uwo.ca/~mkarttu/downloads/dpdmacs.tar.gz

解压
> tar zxfv dpdmacs.tar.gz
> cd dpdmacs   //解压后进入目录

编译
> ./configure
> make
> sudo make install

如果你的编译环境是配置好的,那么安装会很顺利;但是我的安装并不顺利,因为intel编译器和libstdc++.so.5的问题。
(1)Intel 编译器的环境变量配置
下载intel编译器的问题不说了,因为之前我是下载的免费的个人版 l_cproc_p_11.1.046,  l_cprof_p_11.1.046,后来听说个人版不再免费了,因此,如何下载要靠网络资源。它的安装非常简单,全部是自动进行的。需要注意的是安装完毕后,要配置环境变量。

> cd   //进入用户跟目录
> vi .bashrc  //修改.basjrc文件

增加如下几行
#Souce of intel FORTRAN and C++, MKL environment variables
source /opt/intel/Compiler/11.1/046/bin/iccvars.sh intel64
source /opt/intel/Compiler/11.1/046/bin/ifortvars.sh intel64
source /opt/intel/mkl/10.2.1.017/tools/environment/mklvars64.sh

注意,intel 64表明我的硬件是兼容intel 64的amd64, 还有ia32(32位intel), ia64(64位intel)
根据你的intel编译器版本不一样,建议你参看Realease_note.pdf文件

(2)libstdc++.so.5
如果没有libstdc++.so.5, 安装会提示:
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

Ubuntu 10.1 Karmic默认是不安装libstdc++.so.5的,因为这个版本太老。
并且不支持sudo apt-get install libstdc++5安装。因此要从这个地方下载:https://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/

你可以
> wget https://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb
> sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb

注意我下载的是amd64版本,该目录下有针对不同平台的许多版本,请选择合适的版本下载安装。

全部安装结束后,可在任何目录下直接运行
> dpdmacs

:-) D P D M A C S (-:

(c) Michael Patra

:-) Version 0.9.0 (-:

-f dpdmacs.mdp      Input    input file with run parameters
-c conf.gro         Input    initial configuration of the system
-p topol.top        Input    topology file
-n index.ndx        Input    index file
-o traj.trr         Output   generated trajectory
-cc confout.gro     Output   final configuration of the system
-s topol.tpr        Output   binary topology file

main (line -1): Cannot open topology file.
说明安装成功。

接下来是下载运行测试例子。(待续)

参考:
1. Ubuntu 9.10的libstdc++.so.5安装, https://www.sci123.cn/archives/436.html

原创:ChemiAndy(xijunw (at) gmail.com) in Montreal,转载请注明出处。
一花一世界@百度空间, 2010.05.06

评论

热度(1)