MOPAC計算

64ビットMacOS

Mac OSがCatalina(10.15.64ビット)になった時点(2019)で,32ビット版が主流の分子軌道計算アプリをMac上で実行することは出来なくなった.Windows 10(64ビット)のマシンでは,32ビットアプリも走るので,必要な時はWindows(BTOマシン)を使用してきた.今後,MacのCPUがIntelからApple独自のCPUに換わり,過去のソフト資産が利用できないとなると,そろそろMacと決別する時期かもしれない.そう思いながら分子軌道計算アプリの各種OSに対する対応状況を調べてみたら,Wikipediaに下記の記述があった.

2021年8月17日にMOPAC2016の代理店での販売を終了し[2]、Stewartの公式HPから実行バイナリの無料配布(オープンアクセス)が開始された[5]

Windowsマシン用のMOPACについての記事と思いながら,念のためStewartのホームページを確認するとMac用の64ビット版がフリーでダウンロード(Downloads - Mopacできるようになっていた.

① MOPAC Version = 22.0.1Open-source release

MOPAC2016_for_Macintosh(Closed-source release)

ターミナルについて(備忘録)

UNIX システム フォルダ (/usr, /var, /etcなど) は Mac OS X 上で既定では非表示のため, Finder で移動することはできない. ターミナルでインストール,実行するには,その準備のため最低限のコマンドとMacのファイル構造に関する知識が必要である.インストール手順書には/optの下にmopacフォルダを作り,そのなかにプログラムを入れるように指示されている.そのためには/optが存在するか調べ.無ければ作る必要がある.

ターミナル上で以下を実行し,

ls /

ファイル一覧の中に, /optがあることを確認したら,

open /opt

でFinderで開くことができる. サイドバーに追加しておくと便利である.

/optがないため,新規に作成する場合は以下を実行する.

sudo mkdir -p /opt/mopac 注 -p オプションは必要に応じて親ディレクトリーを作成する.

これに, 読込・書込・実行のアクセス許可( "rwxrwxrwx")を与えるため, "chmod 777 mopac" のコマンドを実行する.

optはルートの下に置く




ターミナル起動時はホームに居る

(1) MOPAC64ビット最新版のインストール

ダウンロードしたmopac-22.0.1-mac.dmgを右クリックして得られるmopac-22.0.1-mac.app(HDD⬇のマーク)を実行 すると,opt下のmopacフォルダ内にインストールされる.

実行プログラムの正確な位置は opt/mopac/bin/mopac.exe である.

これをターミナルで実行する.

ターミナルを立ち上げると~ %が表示される.

?? ~ % :~はホームディレクトリ

?? ~ %mkdir MOPAC :この下にMOPAC(作業用)というフォルダを作り,

cd MOPAC で:MOPACフォルダに移動する.

AvogadroやMolby等の別アプリで入力データtest.mop(例)を作成し.MOPACフォルダに保存する.

実行はターミナルに戻り,mopac test.mop(リターン)するだけでよい.

test.outとtest.arcが生成しているので,Avogadroで構造を確認する.

AUX LARGE CHARGE=0 SINGLET PM6

Title


C 0.000000 1 0.000000 1 0.000000 1 0 0 0

C 1.471970 1 0.000000 1 0.000000 1 1 0 0

C 1.471973 1 107.894195 1 0.000000 1 1 2 0

H 1.079706 1 120.876082 1 143.616790 1 1 2 3

C 1.471983 1 107.894253 1 0.043716 1 2 1 3

H 1.079733 1 120.857874 1 216.481453 1 2 1 3

C 1.459811 1 107.567014 1 1.921704 1 5 2 1

H 1.080804 1 121.703787 1 145.051757 1 3 1 2

H 1.080790 1 121.715609 1 214.846985 1 5 2 1

O 1.248821 1 118.707586 1 216.681609 1 7 5 2

計算構造(平面)

(2) GUI版MOPAC2016_for_Macintoshのインストール

ターミナルを使わず,GUIでやれないかと探したら,MOPAC2016の最終版Closed-sourse リリース の中にMOPAC2016_for_Macintosh.zipが公開されている.


まずはターミナルで実行

MOPAC2016_for_Macintosh.zipをダウンロードして開き,アプリケーションに保存した.フォルダーには各種ファイルが入っている.

?? ~ % cd /Applications/MOPAC2016_for_Macintosh

?? MOPAC2016_for_Macintosh % ls

Example_data_set.mop MOPAC2016.exe

Installation instructions.txt Shutdown Command.app

MOPAC.app mopac.csh

?? MOPAC2016_for_Macintosh % chmod +x MOPAC2016.exe まずはMOPAC2016.exeに実行権を設定.

./MOPAC2016.exe Example_data _set.mop ←ターミナル上で実行

ターミナル実行後のフォルダ

計算結果

  • Example_data _set.out

  • Example_data _set.arc

GUIによる実行

MOPAC2016.exeをopt/mopac下にコピーする.

MOPAC.appを右クリックしてパッケージの内容を表示させる.

その中のContentsの中にMacOSの下にあるMOPACに実行権を与える.作業はターミナルで行う.

scriptの中身

#

# Run a MOPAC job.

#

nice /opt/mopac/mopac2016.exe "$1" &

アプリに付属しているこのマークをダブルクリックしても入力を促すようなことはないが,Dockにエーリアスが表示される.これに計算する入力ファイルをかぶせると計算が開始される.

C60 36.41 sec

Kekulene 21.51 sec

β-CyD 40.21 sec

計算座標 cartesian

G-C塩基対  分子間水素結合

β-CyD-安息香酸包接体-1

β-CyD-安息香酸包接体-2

64ビットOSのMacで半経験的分子軌道計算MOPACが走るようになった,今更,半経験的分子軌道計算の時代ではないという意見もあるが,大きな分子の構造や電子状態を手軽に知る方法としては欠かせない存在である.なお,非経験的分子軌道計算も64ビット版GAMESSがフリーで入手可能であり,コマンドによる実行は可能である.GUIによる実行を含めた紹介は別稿にしたい.

Installation instructions(折りたたみ文書)

Installation instructions for Macintosh

If you want an updated copy of MOPAC, then:

1.1. Download a new executable from: http://openmopac.net/Download_MOPAC_Executable_Step2.html

1.2. Replace the old executable with the new one.

If you are a first-time user of MOPAC2016, then:

1. Create a directory called "/opt/mopac/" You might need to use a command such as:

sudo mkdir -p /opt/mopac 注 -p オプションは必要に応じて親ディレクトリーを作成する

Give this directory the privileges "rwxrwxrwx",

i.e. run the command: "chmod 777 mopac" You will need superuser 注 読込・書込・実行できる権限

privileges to do this. If you can't use /opt/mopac, then set

define the location of the license key as shown below.

2. Download the Macintosh MOPAC2016 executable, and put it in the directory

"/opt/mopac/"

3. Add the following line to your .profile start-up script:

alias mopac='/opt/mopac/MOPAC2016.exe'

If you have not modified the .profile script before, go on-line with Google

and look for "MAC .profile"

4. Run the start-up script, that is, run the command: "source ~/.profile" This

will activate the alias.

5. Create a directory that will be used for running MOPAC jobs.

Check that MOPAC will run the job Example_data_set.mop. This job should take

about 0.05 seconds to run. After the job runs successfully, as a safety precaution

change permissions on the MOPAC folder to prevent writing to it. This is a security

step intended to stop any accidental or deliberate attempts to mess with the contents

of the MOPAC folder.

6. Run MOPAC using data sets that have the names <file>.mop, <file>.dat, or

<file>.arc. E.g. run the command "mopac test" to run the data set

"test.mop", or "mopac test.arc" to run the data set "test.arc"

7. You are now ready to run MOPAC2016. If you are new to mopac, please see:

http://openmopac.net/manual/running_mopac.html

Problems? Please see: http://openmopac.net/Discussions/Problems%20installing%20MOPAC.html

ターミナル実行例

KH % cd MO (MOディレクトリへ移動,KHはパソコン名)

KH MO % ls (ファイル表示)

BP.mop cpPM6.mop proline.arc proline.mop

cpPM6.arc cpPM6.out proline.aux proline.out

KH MO % mopac BP (MOPAC計算実行,BPは入力ファイル名)



MOPAC Job: "BP.mop" ended normally on Jun 10, 2022, at 19:35.


KH MO %


(2022.6.17)