0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CREST インストール

Posted at

概要

配座探索ソフトウェア CREST(Conformer–Rotamer Ensemble Sampling Tool)をインストールした作業ログ。(紛らわしい名称だが、JST の CREST とは一切関係ない。)

検証環境

  • CPU: Ryzen 9 7950x
  • m/o: AsRock Steel Legend
  • Python 3.12.9
  • gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
  • Fedora 40 server edition

環境設定

ますは、su で root ユーザーになる。
基本的には、こちらのページ の Option 3: Compiling from source に従う。

cd /opt
mkdir CREST
cd CREST
git clone https://github.com/crest-lab/crest.git
cd crest
git submodule init
git submodule update 

# ここから GNU compliler 関連
sudo dnf -y install openblas-devel
sudo dnf -y install openblas-static
sudo dnf -y install @development-tools
sudo dnf -y groupinstall "Development Tools" "Development Libraries"
sudo dnf -y install libgfortran-static libquadmath-static glibc-static
# Intelのリポジトリを追加
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo rpm --import GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo dnf config-manager --add-repo https://yum.repos.intel.com/oneapi
sudo dnf -y install intel-oneapi-mkl intel-oneapi-mkl-devel
sudo dnf -y install lapack-devel

# ここから CMake 関連
python -m venv .venv
source .venv/bin/activate
pip install cmake
cmake -B _build
make -C _build
make test -C _build

# ここから Meson 関連
python3 -m pip install meson ninja
meson --version
LDFLAGS="-Wl,-Bdynamic" FFLAGS="-Wno-unused-function -Wno-maybe-uninitialized -Wno-conversion -w" meson setup _build -Dla_backend=openblas -Ddefault_library=shared -Dwerror=false
meson compile -C _build

make -C _build には 5 分ほど時間がかかる。
meson compile -C _build は 726/737 で 1 分ほど待ち時間がかかる。

root ユーザーを exit する。
crest 自体は、/opt/CREST/crest/_build にあり、libcrest.so は /opt/CREST/crest/_build 内にある。

# crest のシンボリックリンクを作成
sudo ln -s /opt/CREST/crest/_build/crest /usr/local/bin/crest
# crest のライブラリの path を通す
export LD_LIBRARY_PATH=/home/odyssey/biotools/CREST/crest/_build:$LD_LIBRARY_PATH
source .bashrc

which crest でパスが通っているかを確認する。
path を通した後で、crest のバージョン情報を確認する。

# crest --version を実行すると以下の文字が表示される。

       ╔════════════════════════════════════════════╗
       ║            ___ ___ ___ ___ _____           ║
       ║           / __| _ \ __/ __|_   _|          ║
       ║          | (__|   / _|\__ \ | |            ║
       ║           \___|_|_\___|___/ |_|            ║
       ║                                            ║
       ║  Conformer-Rotamer Ensemble Sampling Tool  ║
       ║          based on the xTB methods          ║
       ║                                            ║
       ╚════════════════════════════════════════════╝
       Version 3.0.2, Fri Mar 14 03:39:20 PM JST 2025
       commit (53290da) compiled by 'root@localhost.localdomain'

 crest 3.0.2

インプットファイルの作り方

crest を使う際は、 --input オプションでインプットファイルを指定するか、シンプルに .toml ファイルだけを引数にする。

# crest 実行方法
crest struc.xyz --input input.toml
または
crest input.toml

xyz ファイルは、gaussian のファイルを編集して以下の形式で作成する。

原子数
ファイル名
座標

input.toml ファイルの中身を以下に示す。

# CREST 3 input file
input = "struc.xyz"   
runtype="ancopt"
threads = 9

[calculation]
elog="energies.log"

[[calculation.level]]
method = "gfn2"
uhf = 0
chrg = 0

ancopt は「構造最適化のみ」を意味する。
配座探索する場合は、「mdopt」を指定する。

ディレクトリを作成し、以下の 2 つのファイルのみがある状態にする。

input.toml  struc.xyz

動作確認用に、構造最適化計算を実行する。

crest input.toml

わずか数秒で計算は終わり、以下のような結果が表示される。


==========================================
 TOTAL ENERGY         -59.5486338244 Eh
 GRADIENT NORM          0.0003705855 Eh/a0
==========================================

 -----------------
 Wall Time Summary
 -----------------
 CREST runtime (total)               0 d,  0 h,  0 min,  0.747 sec
 ------------------------------------------------------------------
 Geometry optimization      ...        0 min,  0.724 sec ( 96.935%)
 I/O and setup              ...        0 min,  0.023 sec (  3.065%)
 ------------------------------------------------------------------
 * wall-time:     0 d,  0 h,  0 min,  0.747 sec
 *  cpu-time:     0 d,  0 h,  0 min,  6.185 sec
 * ratio c/w:     8.277 speedup
 ------------------------------------------------------------------
 * Total number of energy+grad calls: 39

 CREST terminated normally.

ディレクトリ内には、以下のファイルが生成する。

coord         crest_input_copy.xyz  crestopt.xyz   energies.log  struc.xyz
crest.engrad  crestopt.log          crest.restart  input.toml

coord: XTBやTURBOMOLE形式の内部座標ファイル。計算に使用される分子構造を格納している。

crest_input_copy.xyz: 元の入力構造のバックアップコピー。

crestopt.xyz: CRESTの構造最適化によって生成された構造ファイル。最適化の過程で更新される。

crestopt.log: 構造最適化プロセスのログファイル。収束情報や構造変化の詳細が含まれている。

crest.engrad: エネルギー勾配情報を含むファイル。最適化やシミュレーション中の力の情報が保存されている。

crest.restart: 計算が中断された場合の再開に必要な情報を含むファイル。長時間の計算でのチェックポイントとして機能する。

energies.log: 計算過程で得られた各構造のエネルギー値のログ。エネルギー変化を追跡するために使用する。

配座探索

以下のコマンドで配座探索を実行する。
このコマンドでは、エネルギー範囲 6 kcal/mol 以内を探索します。

crest struc.xyz -xnam xtb -gfn2 -niceprint -ewin 6 -T 8

時間がかかるため、ジョブスケジューラー経由で実行するか、nohup で実行した方が良い。

CREST は、xTB を利用しているため、GPU で加速することは現時点では出来ません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?