User Tools

Site Tools


xcrysden

This is an old revision of the document!


概要

QuantumESPRESSOやWIEN2kの入力(あるいは出力)ファイルから、結晶構造を3次元的に表示するソフトです。

環境

Ubuntu 16.04

インストール方法

aptによる入手

Ubuntuならaptで入手できます。

$ sudo apt install xcrysden

この場合、/usr/share/xcrysden/にインストールされます。

ソースコードから自分でコンパイル

事前に必要なもの

Xorg, OpenGL, FFTW3が必要です。 入れてない分に関してインストールしてください。

$ sudo apt install xorg-dev
$ sudo apt install xorg-docs
$ sudo apt install xutils-dev # いらないかも・・・
$ sudo apt install libgl1-mesa-dev
$ sudo apt install libglu1-mesa-dev
$ sudo apt install fftw3
$ sudo apt install fftw3-dev

ソースコードの入手

xcrysden-1.5.60.tar.gzをダウンロードします。 最新バージョンは1.5.60です。

コンパイル

ダウンロードしてきたファイルを解凍し。そのディレクトリに入ります。

$ tar xzvf xcrysden-1.5.60
$ cd xcrysden-1.5.60

インストールの設定をするため、systemディレクトリからMake.sys-semisharedをコピーしてきて、Make.sysというファイル名にします。 なにをしているかわかる場合は、他のファイルをもってきて編集してもよいです。

$ cp system/Make.sys-semishared Make.sys

Make.sysでコンパイラはデフォルトでgccとgfortranになっていますが、Intelコンパイラを使いたい場合は次のように変更します。

Make.sys
(略)
CC = icc
(略)
FC = ifort
(略)

これで準備ができたので、ソースコードをmakeします。

$ make all

環境設定

次にコンピュータの環境設定をします。

$ cd scripts
$ ./xcConfigure.sh

質問に答えていきます。 自動的にbashrcを書き換えてくれるので、終わったら

$ source ~/.bashrc

で設定が反映されます。

使用方法

ターミナルから

$ xcrysden

で起動できます。

トラブルシューティング

Ubuntu 24.04では、以下のメッセージとともに起動しなくなるバグが報告されています

$ xcrysden

+-----------------------------------------------------------------+
|*****************************************************************|
|*                                                               *|
|*  XCrySDen -- (X-Window) CRYstalline Structures and DENsities  *|
|*               =         ===         =              ===        *|
|*---------------------------------------------------------------*|
|*                                                               *|
|*    Anton Kokalj (tone.kokalj@ijs.si)                          *|
|*    Jozef Stefan Institute, Ljubljana, Slovenia                *|
|*                                                               *|
|*    Copyright (c) 1996--2019 by Anton Kokalj                   *|
|*                                                               *|
|*****************************************************************|
+-----------------------------------------------------------------+

  Version: 1.6.2

  Please report bugs to: tone.kokalj@ijs.si


  TERMS OF USE:
  -------------
  XCRYSDEN is released under the GNU General Public License.

  Whenever graphics generated by XCRYSDEN are used in scientific
  publications, it shall be greatly appreciated to include an explicit
  reference. The preferred form is the following:

  [ref] A. Kokalj, J. Mol. Graph. Model., Vol. 17, pp. 176-179, 1999.
        Code available from http://www.xcrysden.org/.

XCRYSDEN_TOPDIR=/usr/share/xcrysden
XCRYSDEN_SCRATCH=/tmp

Running on platform : unix
   Operating system : Linux
Package ImageMagick's convert: /usr/bin/convert
Package ImageMagick's import: /usr/bin/import
Package Ppmtompeg: /usr/bin/ppmtompeg
Executing: /usr/lib/xcrysden/ftnunit
Error in startup script: 
Couldn't configure togl widget
    while executing
"togl .mesa  -width          400  -height         400  -ident          .mesa  -rgba           $toglOpt(rgba)           -redsize        $toglOpt(redsize..."
    (procedure "PlaceGlobWin" line 107)
    invoked from within
"PlaceGlobWin 0 [expr round(670 * $fac1)] [expr round(670 * $fac1)]"
    (procedure "ViewMol" line 25)
    invoked from within
"ViewMol ."
    invoked from within
"if { [llength $argv] > 2 } {
    parseComLinArg [lrange $argv 2 end]
} else {
    ViewMol .
}"
    (file "/usr/share/xcrysden/Tcl/xcInit.tcl" line 633)

この場合は、

$ mkdir .xcrysden
$ cd .xcrysden
$ cp /usr/share/xcrysden/Tcl/custom-definitions .
$ vim custom-definitions
(略)
set toglOpt(accum) false
#set toglOpt(stereo) none
(略)

としてください。 /usr/share/は、手動でインストールした場合は、そのインストールしたディレクトリです。

xcrysden.1780944980.txt.gz · Last modified: 2026/06/09 03:56 by koudai