以前做多孔材料的模拟的时候,一直想看下材料的孔径分布,但是不知道怎么进行这方面的模拟,今天在google上搜索pore size distribution的时候,惊喜地发现有人提供了这方面计算的程序,网址如下:
http://supriyo.net/research/psd/psd.htm
我将上面的程序下载了下来,并上传到小木虫上,大家有兴趣可以看下,相互交流一下。网上提供了两个版本的程序:普通的和可以并行的。
我将这两个程序都尝试安装到自己组里的机群上了,但是在用的时候发现有很多问题。
首先我安装了普通版本的,我将PSDsolv.tar.gz文件解压到自己新建的目录下面,然后按照readme里的说明执行操作的时候,在第一步就碰到了错误,readme文件内容如下:
******************* PSDsolv v.1.0 **********************
Author of psd.cpp: Supriyo Bhattacharya
solvopt.cpp and solvopt.h were included upon permission
from Prof. Franz Kappel. ran_nr.cpp is taken from
"Numerical Recipes in C++"
Feel free to modify / distribute the original code for
nonprofit / academic purposes. I give permission for
commercial use of my own code, however solvopt is
forbidden from being used commercially. Therefore
commercial users can use the code as long as they
provide their own nonlinear optimization routine and
give proper credits to the author and cite the reference
given at the end of this document. Also, commercial
establishments may not prohibit others from modifying
/ distributing the original codes either for nonprofit
or for commercial purposes.
GENERAL DESCRIPTION
This program calculates the pore size distribution
from a structure file. The program does not need the
connect records, only the locations and atom types,
so the xyz format is the simplest to work with. If
your structure is in a pdb or mol2 format, use babel
to convert: i.e. openbabel -ipdb struc.pdb -oxyz struc.xyz
The atoms are modeled as hard spheres (vdW radii).
The program uses a nonlinear optimization routine (SOLVOPT)
INSTALL
Run the install script (./install)
Then place the executable (psd) somewhere in your path or
create a link in /usr/local/bin.
Place radii_list.dat in the same directory where you run
the program. This file contains the vdW radii of the
common atom types used by the program. New user defined
atom types can be added to radii_list.dat.
RUN
psd
A bin width of 0.25A seems to be the optimum. The output produces
three files: psd_diff.dat (the actual distribution), psd_cumm.dat
(cummulative PSD, see paper for explanation) and error.dat (shows
the average error over time / MC steps).
Once you start the program, a rough profile can be seen within an hour.
However, it may take upto 24 hours to get a smooth profile
(depending on the system size). Please continue to monitor the
distribution and the estimated error. Once you are satisfied with the results,
just kill the process, simple!!
OTHER INFO
Please cite the following:
psd calculation:
S. Bhattacharya and K. E. Gubbins, fast Method for Computing
Pore Size Distributions of Model Materials, Langmuir 2006, 22, 7726.
solvopt:
F. Kappel and A. V. Kuntsevich, Comput. Optim. Appl. 2000, 15, 193.
Send all comments to sup27606@yahoo.com
---------------------------------------------------------------------------------------------------
我执行了./install后,跳出如下说明:
cc1plus: error: unrecognized command line option "-fast"
cc1plus: error: unrecognized command line option "-fast"
我对install进行了编译,删除了原来里面包含的-fast后,再重新执行./install后,跳出如下说明:
solvopt.cpp: In function 鈊ouble solvopt(short unsigned int, double*, double (*)(double*), double (*)(double*, double*), double*, double (*)(double*), double (*)(double*, double*))?
solvopt.cpp:186: warning: converting to 鈙hort unsigned int?from 鈊ouble?
solvopt.cpp:205: warning: converting to 鈙hort int?from 鈊ouble?
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31,
from psd.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
In file included from psd.cpp:7:
ran_nr.cpp:58:2: warning: no newline at end of file
gettime.c: In function 鈏nt gettime(double*)?
gettime.c:8: error: aggregate 鈚imezone tz?has incomplete type and cannot be defined
gettime.c:11: error: 鈍ettimeofday?was not declared in this scope
psd.cpp: In function 鈒ong int nearest(double)?
psd.cpp:17: warning: converting to 鈒ong int?from 鈊ouble
所以程序在进行install的时候就执行不下去了,也就没有能用这个程序进行测试。我用C++对程序里包含的.cpp和.c文件进行了compile,发现都有提示程序有错误。但是因为我自己不会C++编程,所以也不知道怎么解决。希望有用过这个程序的人能给与帮助吧。 |