指点成金-最美分享吧

登录

XCrySDen在ubuntu上的安装步骤详解

佚名 举报

篇首语:本文由小编为大家整理,主要介绍了XCrySDen在ubuntu上的安装步骤详解相关的知识,希望对你有一定的参考价值。

注:本文原创于计算化学公社ggdh童鞋。

祝大家有情人终成眷属!


xcrysten可以作为crystal、PWscf、以及wien2k的图形界面,虽然安装简单,但是并没有常规的configure步骤。没弄对就折腾一晚上(比如我)。现在把经验分享下:

1.下载软件包(http://www.xcrysden.org/Download.html

选择source package下载(如果下载编译好的版本,在运行的时候会报错,提示系统的某个库文件不够新。)

并且解压,进入解压后的目录

tar -zxvf xcrysden-1.5.60.tar.gz

cd xcrysden-1.5.60

2.安装依赖包

sudo apt-get install build-essential gfortran freeglut3-dev tcl8.5-dev tk8.5-dev xutils-dev libfftw3-dev libxmu-dev

3.  确定自己在目录xcrysden-1.5.60中,创建文件Make.sys

vi Make.sys

然后把下面的话粘贴进去


##############################################


#-------------------------------------

# if you have a GNU make it is better to set the MAKE variable to point

# to gnu make

#-------------------------------------

MAKE = make

#-------------------------------------

# compilers & flags

#------------------------------------

CFLAGS = -ansi -funroll-loops -fPIC -DUSE_FONTS

CC     = gcc

#LDLIB  = -ldl

MATH   = -lm


FFLAGS = -O2

FC     = gfortran

#------------------------------------

# X-libraries & include files

#

# for STATIC compilation one should add: -lpthread

#---------------------------------

X_LIB     = -L/usr/X11R6/lib -lXmu -lX11 -lXext

X_INCDIR  = -I/usr/X11R6/include


#-Possibility-2-------------------

#

# XCRYSDEN package may contain the tcl, tk & Mesa sources !!!

# If you would like to compile and use these then uncomment below lines and

# comment lines "Possibility-1" (see above).

#

#----------------------------------


COMPILE_TCLTK = yes

COMPILE_MESA  = yes

#

# #

# # Do we want a shared library version of Tcl/Tk/Mesa or static?

# # If we want shared then set the following flags to: --enable-shared

# # else set the following flag to: --disable-shared

# #

TCLTK_OPTIONS      = --enable-shared

MESA_TARGET        = linux

#

# #

# # Libraries (dynamic loading)

# #           for shared linking the libraries postfix should be .so

# #           for static linking the libraries postfix should be .a

# #

TCL_LIB     = -L$(TOPDIR)/external/lib -ltcl$(TCL_VER2)

TK_LIB      = -L$(TOPDIR)/external/lib -ltk$(TCL_VER2)

GLU_LIB     = -L$(TOPDIR)/external/lib -lGLU

GL_LIB      = -L$(TOPDIR)/external/lib -lGL

FFTW3_LIB    = -lfftw3

#

# #

# # Include directories

# #

TCL_INCDIR  = -I$(TOPDIR)/external/src/tcl$(TCL_VER3)/generic

TK_INCDIR   = -I$(TOPDIR)/external/src/tk$(TCL_VER3)/generic

GL_INCDIR   = -I$(TOPDIR)/external/include


#######################################

4. 输入 make -j n all 其中n是你的cpu核数
5. 输入./scripts/xcConfigure.sh进行配置

基本上一路回车就行。如果你想让它支持CRYSTAL, 中途它会让你CRYSTAL包的位置。

6. 读取环境变量

source ~/.bashrc

7.安装支持包(非必要)
sudo apt-get install mplayer mencoder imagemagick openbabel

学术之友向广大读者们征稿,内容包括但不限于科研文献解读,科研软件使用经验分享,科研基础知识总结归纳,科研招聘广告发布,科研生活闲聊杂谈等。我们会免费为大家编辑和推广。

投稿联系734915365@qq.com

以上是关于XCrySDen在ubuntu上的安装步骤详解的主要内容,如果未能解决你的问题,请参考以下文章