Thirdorder安装教程


thirdorder安装教程

产生用于三阶力常数计算的文件

软件下载地址

官网:http://www.shengbte.org/downloads

安装编译

1 解压进入文件夹

tar -jxvf thirdorder-v1.1.1-8526f47.tar.bz2
cd thirdorder

2 修改setup.py 加入spglib的库路径

修改后如下

注:如果include文件夹里没有spglib文件夹,手动建一个并把spglib.h拷贝进去就行。

#!/usr/bin/env python
# -*- encoding: utf-8 -*-

import numpy
from distutils.core import setup
from distutils.extension import Extension

# Add the location of the "spglib/spglib.h" to this list if necessary.
# Example: INCLUDE_DIRS=["/home/user/local/include"]
INCLUDE_DIRS = ["/home/wh/software/spglib-master/usr/local/include"]
# Add the location of the spglib shared library to this list if necessary.
# Example: LIBRARY_DIRS=["/home/user/local/lib"]
LIBRARY_DIRS = ["/home/wh/software/spglib-master/usr/local/lib"]

# Set USE_CYTHON to True if you want include the cythonization in your build
# process.
USE_CYTHON = False

ext = ".pyx" if USE_CYTHON else ".c"

extensions = [
    Extension(
        "thirdorder_core", ["thirdorder_core" + ext],
        include_dirs=[numpy.get_include()] + INCLUDE_DIRS,
        library_dirs=LIBRARY_DIRS,
        runtime_library_dirs=LIBRARY_DIRS,
        libraries=["symspg"])
]

if USE_CYTHON:
    from Cython.Build import cythonize
    extensions = cythonize(extensions)

setup(name="thirdorder", ext_modules=extensions)

修改完成后编译安装

python setup.py install

运行命令

以VASP程序的POSCAR为例

1 拷贝源代码中的 thirdorder_common.py 和 thirdorder_vasp.py 两个文件到POSCAR目录下

2 运行命令

thirdorder_vasp.py sow|reap na nb nc cutoff[nm/-integer]

#example
thirdorder_vasp.py sow|reap 6 6 6 0.5 #0.5nm的截断半径
thirdorder_vasp.py sow|reap 6 6 6 -3 #第三最近邻截断

文章作者: 天帝君豪
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 天帝君豪 !
 上一篇
VASP5.4.4安装教程 VASP5.4.4安装教程
VASP-5.4.4(CPU)安装教程软件下载地址VASP软件需要付费,请自行下载。 安装编译1 拷贝makefile.include到vasp文件夹 tar -zxvf vasp.tar.gz cd vasp.5.4.4 #根据实际文件名
下一篇 
Publications Publications
Wang Hao, Zhou Yu, Zeng Zhao-Yi, Cheng Yan, Chen Qi-Feng, First-principles study of elastic, thermal and optical proper
2020-04-17 天帝君豪
  目录