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?

MOLGWのMac上でのビルド/インストール

Posted at

Introduction

MOLGWのMac上でのビルドも成功したので、簡単な記録を残しておきます。

環境

システム

  • macOS Sonoma Version 14.7.5
  • Hombrew 4.5.0

ライブラリ:

  • libxc
  • libcint
  • libint(libint2)

libxcとlibint2はhomebrew経由でインストールします。

libcintのビルド

先ずlibcint(6.1.2)を入手します。

wget https://github.com/sunqm/libcint/archive/refs/tags/v6.1.2.tar.gz

次にアーカイブを解凍します。

tar zxf v6.1.2.tar.gz

licintのソースディレクトリに移動し、ビルド用ディレクトリを作成し、以下を実行します。

cd libcint-6.1.2; mkdir build; cd build

以下のコマンドを実行します。

cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/local -DWITH_RANGE_COULOMB=1 -DBUILD_SHARED_LIBS=0 -DPYPZPX=1 ..

引き続いてmakeを実行、さらに問題が無ければ続けてmake installを実行します。

make; make install

今の場合${HOME}/local以下にlibcintのライブラリとインクルードファイルがインストールされます。

MOLGWのビルド #1

以下ではMOLGWのlibcintとビルドした手順を記述します。

先ずconfig/my_machine_gfortran_seq.archmy_machine.archにコピーします。

cp config/my_machine_gfortran_seq.arch my_machine.arc

my_machine.archを編集します。以下は私が使用したものです。

PYTHON=python3

# Sequential compilation
FC=gfortran

CPPFLAGS=

CXX=g++
FCFLAGS= -cpp -O2  # -O0 -g -check all -traceback 
CXXFLAGS= -O2 # -O0 -g -fbounds-check

LAPACK=-L${HOME}/local/ -llapack -lblas

LIBXC_ROOT=/opt/homebrew
LIBXC=-L${LIBXC_ROOT}/lib -lxc
LIBXC_INCS=-I${LIBXC_ROOT}/include

LIBCINT=-L${HOME}/local/lib -lcint

MOLGWのビルド #2

次にMOLGWをlibint(libint2)を使ってビルドしようとしましたが、うまくいっていません。
Placeholderとしてここにセクションを設けておきます。

まとめ

小さい分子の計算であればMac上でも簡単にできるのがMOLGWの魅力です。
ビルドも比較的簡単なのでチュートリアルにも適しているように思っています。

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?