Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1066382
  • 博文数量: 264
  • 博客积分: 7225
  • 博客等级: 少将
  • 技术积分: 5096
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-17 08:53
文章分类

全部博文(264)

文章存档

2011年(33)

2010年(52)

2009年(152)

2008年(27)

我的朋友

分类:

2011-10-31 18:26:40

I installed Phonopy today afternoon. And I got much help from the websit: http://hi.baidu.com/meizhimeiwei_xyz2009/blog/item/295b9dfa9742856a024f5677.html

 

有时候由于服务器上python版本太低(低于python2.4),而不能安装phonopy,在这种情况下,我们可以尝试自己安装个python来用。

详细步骤:

假设现在你的机子上已经有了如下文件:

python2.4.tar.gz

phonopy-0.9.1.3.tar.gz

numpy-1.4.0.tar.gz

matplotlib-0.99.1.2.tar.gz

lxml-2.2.4.tar.gz

PyYAML-3.09.tar.gz

1. 首先,全部解压:

[whw@einstein ~]$ tar zxvf phonopy-0.9.1.3.tar.gz

[whw@einstein ~]$ tar zxvf python2.4.tar.gz

[whw@einstein ~]$ tar zxvf numpy-1.4.0.tar.gz

[whw@einstein ~]$ tar zxvf matplotlib-0.99.1.2.tar.gz

[whw@einstein ~]$ tar zxvf lxml-2.2.4.tar.gz

[whw@einstein ~]$ tar zxvf PyYAML-3.09.tar.gz

2. python2.4.tar.gz在解压过程中生成了如下文件:

ccpnmr/python2.4/Python-2.4.2.tgz
将该文件移动到用户主目录下

执行:

[whw@einstein ~]$ tar zxvf Python-2.4.2.tgz

3. 进入Python-2.4.2目录下,执行

[whw@einstein Python-2.4.2]$ ./configure --prefix=/home/whw/Python-2.4.2

[whw@einstein Python-2.4.2]$ make

[whw@einstein Python-2.4.2]$ make install

4. 在./barsh_profile文件内添加如下文字:

PATH=$PATH:$HOME/Python-2.4.2/bin
export PATH

PATH=$PATH:$HOME/phonopy-0.9.1.3/bin
export PATH

export PYTHONPATH=~/phonopy-0.9.1.3/lib64/python

5. 重新登陆putty

6.进入numpy-1.4.0目录下,执行

[whw@einstein numpy-1.4.0]$ python2.4 setup.py install --home=//home/whw/phonopy-0.9.1.3

7. 进入matplotlib-0.99.1.1目录下,执行

[whw@einstein matplotlib-0.99.1.1]$ python2.4 setup.py install --home=//home/whw/phonopy-0.9.1.3

8. 进入lxml-2.2.4目录下,执行

[whw@einstein lxml-2.2.4]$ python2.4 setup.py install --home=//home/whw/phonopy-0.9.1.3

9. 进入PyYAML-3.09目录下,执行

[whw@einstein PyYAML-3.09]$ python2.4 setup.py install --home=//home/whw/phonopy-0.9.1.3

10 进入phonopy-0.9.1.3/c目录下

_phono3py.c, _phonopy.c和_spglib.c三个文件里都有这么一句:

#include

将其改为自己系统所对应的目录:

#include

11. 在phonopy-0.9.1.3目录下执行:

[whw@einstein phonopy-0.9.1.3]$ python2.4 setup.py install --home=.

安装完毕,这下你就可以进行phonopy计算了^_^

12. 初步测试

在phonopy-0.9.1.3目录下执行:

[whw@einstein phonopy-0.9.1.3]$ phonopy

结果显示:

        _
_ __ | |__   ___ _ __   ___   _ __ _   _
| '_ \| '_ \ / _ \| '_ \ / _ \ | '_ \| | | |
| |_) | | | | (_) | | | | (_) || |_) | |_| |
| .__/|_| |_|\___/|_| |_|\___(_) .__/ \__, |
|_|                            |_|    |___/

                                     0.9.1.3
POSCAR is not found.
                 _
   ___ _ __   __| |
/ _ \ '_ \ / _` |
| __/ | | | (_| |
\___|_| |_|\__,_|

OK, 安装应该是正确的了,进一步的测试请参考phonopy的手册:

 


    After installation, I try to run the example Si and NaCl. For Nacl, it gives reasonable result. However, for Si, Phonopy always gives error message. Therefore, I have to register in Phonopy maillist. Fortunately, I get a prompt help from the other experts:)  Then I resolve the error with 

$~/bin/phonopy -d --dim="2 2 2"

阅读(2897) | 评论(0) | 转发(0) |
0

上一篇:awk用法小结

下一篇:Installation of Phonopy

给主人留下些什么吧!~~