00_introduction - YoshioNishimoto/sandbox GitHub Wiki
å°å ¥
ããã§ã¯ãPySCF (Python-based Simulations of Chemistry Framework)ãšããéåååŠèšç®ããã±ãŒãžã«ã€ããŠãéåååŠèšç®ãå§ããã°ããã§ãç解ã§ãããããªå 容ã§èª¬æããŠãããããšæããŸãã ããPySCFã«ã€ããŠå匷ãããæ¹ã¯ãPySCFã«ã€ããŠã®ç·èª¬ïŒreviewïŒããåç §ãã ããã ãšèšã£ãŠããã©ã¡ãããšãããšçè«éçºãã©ãããã©ãŒã ãšããŠã®é¢ã«çç®ããŠãããããå¿ èŠãªåæç¥èãå€ããããé£æ床ãé«ããããããŸããã
PySCFã®ç¹åŸŽïŒç¹é·ïŒ
PySCFã¯Pythonãšããããã°ã©ã èšèªã§æžãããŠããŸãã ä»ã®å€ãã®éåååŠèšç®ããã°ã©ã ïŒæåãªããã°ã©ã ã§èšãã°ãGaussianãGAMESSãªã©ïŒãFortranãC(++)èšèªãããŒã¹ã«ããŠããŸãã ãããã®ããã°ã©ã ã§ã¯ãå ¥åãã¡ã€ã«ïŒinput fileïŒãäœæããéã«ãããã°ã©ã ã«ããç°ãªãæžãæ¹ãå匷ããå¿ èŠããããŸãã ãŸããèªåã§ããã°ã©ã ãå€æŽãããã»æ°ããæ©èœãä»ãå ããããšãããšãã«ã¯ãããã°ã©ã èšèªãå匷ããããªãæ°åããå ¥ããŠæ¢åã®ã³ãŒãã®äœ¿ãæ¹ãå匷ããããã°ã©ã ãæžãæããã³ã³ãã€ã«ã»ãªã³ã¯ãããïŒãããŠå€§æµã¯ãããã°ãããïŒå¿ èŠããããŸãã æ°ããéåååŠèšç®ããã°ã©ã ã䜿ãéã«ã¯ããã®äºç¹ã®éå£ãä¹ãè¶ããå¿ èŠããããŸããã幎ããšãã«ã€ããŠéå£ãä¹ãè¶ããã®ã«å¿ èŠãªæéãé·ããªã£ãŠãããŸãã
PySCFã¯ããããã®éå£ãããçšåºŠäžããŠãããšèšã£ãŠè¯ããšæããŸãã ãŸããå ¥åãã¡ã€ã«ã®äœæã«éããæ°ããèŠããããšãå°ãªãã§ãïŒãã ããPythonãç¿åŸããŠããã°ïŒã ãŸããæ°ããæ©èœãä»ãå ããã«ããã£ãŠãããããªãæ°åããå ¥ããŠæ¢åã®ã³ãŒãã®äœ¿ãæ¹ãå匷ãããå¿ èŠãå°ãªããªããã³ã³ãã€ã«ã»ãªã³ã¯ãããå¿ èŠããããŸããã ããã«Pythonã®ã€ã³ã¹ããŒã«ããããŠããŸãã°PySCFã®ã€ã³ã¹ããŒã«èªäœã¯å²ãšç°¡åã«ã§ããïŒå€éšã©ã€ãã©ãªãããŸã䜿çšããŠããªãããïŒãããã軜ãéåååŠèšç®ã䜿ã£ãŠã¿ããããããã¯ã軜ãçè«éçºãããŠã¿ããããšããã®ã«è¯ãããšæããŸãã
现ããããšã§ãããPythonã®ãããªã€ã³ã¿ãŒããªã¿æ¹åŒïŒã³ã³ãã€ã«ãå¿ èŠãªãïŒèšèªã®å®è¡é床ã¯å€§æµé ãã®ã§ããã PySCFã§ã¯æéããããéšåãFortranãC(++)èšèªïŒã³ã³ãã€ã«æ¹åŒãšèšããŸãïŒãçšããŠé«éåããŠããŸãã
PySCFã§äœãã§ããã
PySCFãšããããããŸãã¯éåååŠèšç®ããã°ã©ã å šè¬ã§äœãã§ãããã«ã€ããŠãç°¡åã«ã説æããŸãã
ãŸãã¯ãååïŒãããã¯çµæ¶ïŒã®ããšãã«ã®ãŒããèšç®ããããšãã§ããŸãããšãã«ã®ãŒãèšç®ããããšãã§ãããšãååãæã§å°ãåãããŠãšãã«ã®ãŒãèšç®ããŠïœ¥ïœ¥ïœ¥ãšããæäœãç¹°ãè¿ãããšã«ãããããã³ã·ã£ã«ãšãã«ã®ãŒã«ãŒããããã³ã·ã£ã«ãšãã«ã®ãŒé¢ ïŒpotential energy surface; PESïŒãæãããšãã§ããŸãã ã³ã¬ãåãããšãïŒæéã¯ããããŸããïŒååãã©ã®ãããªåœ¢ã«ãªã£ãŠãããšå®å®ïŒãšãã«ã®ãŒãäœãç¶æ ããããŠããã®é 座ããšã確çãé«ãç¶æ ïŒã«ãªãããåããããã«ãªããŸãã
ãšãã«ã®ãŒã ãèšç®ã§ããŠããããŸãå¬ãããããŸããã ãã¡ããé«ç²ŸåºŠèšç®ã®å Žåã¯ããšãã«ã®ãŒèšç®ã ãã§ã䟡å€ããããšèããŠããŸãïŒå人ã®æèŠã§ãïŒã å ã»ã©ãååãã©ã®ãããªåœ¢ã«ãªã£ãŠãããšå®å®ããšæžããŸããããPESãæãããšãªãååã®åœ¢ãèšç®ã§ããªãã§ããããã ããã¯ããæ§é æé©åãã«ãã£ãŠäžåºŠã®èšç®ãžã§ãã§èšç®ããããšãã§ããŸãã å®å®ãªæ§é ã¯PESã§ã®æ¥µå°å€ã«çžåœãããããPESã§ã®åŸé ïŒã®å察æ¹åïŒã«æ²¿ã£ãŠååãåãããŠããã°ã極å°å€ãèŠã€ããããšãã§ãããã§ãïŒãããå±æ極å°å€ã倧åç極å°å€ãã¯å¥ã®è©±ã§ããïŒã
ä»ã«ã¯ããããã£ã®èšç®ã§ããããã äŸãã°ãååè»éä¿æ°ãå©çšããŠååè»éãæãããšãå¯èœã§ãã æé«å æè»éïŒhighest occupied molecular orbital; HOMOïŒãæäœéå æè»éïŒlowest unoccupied molecular orbital; LUMOïŒãå³ç€ºããŠãã©ã®ããã«åå¿ãããããšããããšãèšããªãã¯ãªããšæããŸãã ãŸããçµå次æ°ïŒäŸãã°Mayer's bond order analysisïŒãèšç®ããããšãå¯èœã§ãããå極åã¢ãŒã¡ã³ãïŒdipole momentïŒãªã©ãèšç®ã§ããŸãã ä»ã«ãå±èµ·ãšãã«ã®ãŒãäºæ¬¡åŸ®åãèšç®ããããšã§åºæºæ¯å解æãããé«æ¬¡ã®åŸ®åãèšç®ããããšã§å極çãèšç®ãããšèšã£ãããšãå¯èœã§ãã
ãŸãã¯ãã®ããšãã«ã®ãŒãèšç®ãšãæ§é æé©åãèšç®ããæã身è¿ãªèšç®ã«ãªãããšæããŸãã äžèšã®ããããã£ã®èšç®ãã溶åªå¹æãåãå ¥ããèšç®ãåååååŠã·ãã¥ã¬ãŒã·ã§ã³ïŒãã ããããã¯PySCFã§ã¯ã§ããªãããïŒãå¯èœã§ãã ãã ããããªããåããããã©èšç®ãã£ãŠã¿ããããšãã䜿ãæ¹ã¯ã§ããŸããã äœã®èšç®ãããããç®çãæã€å¿ èŠããããŸãã
ããŠãPySCFã§äœãã§ããããšèšããŸããšãäžã§æãã倧æµã®ããšãã§ããŸãã ãã®ãã¥ãŒããªã¢ã«ãéããŠãæ§ã ãªææ³ãçšããŠã®ãšãã«ã®ãŒèšç®ãæ§é æé©åãããããã£ã®èšç®ãå±èµ·ãšãã«ã®ãŒã®èšç®ãŸã§ã§ããããã«ãªãã°è¯ããšæããŸãã
ãã¥ãŒããªã¢ã«ã§ã«ããŒããããš
ãããŸã§äºå®ã§ãã
- åæ©çãªPySCFã®äœ¿ãæ¹
- å ¥åãã¡ã€ã«ã®äœæ
- åºåãã¡ã€ã«ã®èŠæ¹
- æ§ã
ãªææ³ã§ã®ãšãã«ã®ãŒèšç®
- Hartree--Fock
- density functional theory
- second-order M\oller--Plesset perturbation theory
- configuration interaction
- (coupled cluster)
- multiconfigurational self-consistent field (MCSCF)
- complete active space SCF (CASSCF)
- multireference perturbation theory (MRPT; SC-NEVPT2)
- æ§é æé©å
- Hartree--Fock
- density functional theory
- second-order M\oller--Plesset perturbation theory
- ããããã£ã®èšç®
- ååè»éã®ãããã
- çµå次æ°
- åºæºæ¯å解æ
- å±èµ·ãšãã«ã®ãŒ
PySCFå éšãå€æŽãããããã°ã©ãã³ã°ãšããé«åºŠãªããšã¯ããŸãããç§ãPythonã䜿ããªãã®ã§ã ææ³ã«ã€ããŠã¯ããç°¡åã«è§Šãããšã¯æããŸããã詳现ãŸã§ã¯è§ŠããããªããšæããŸãã æ°åŒã®å ¥åã«éãLaTeXã®ã³ãã³ããçŽæ¥å ¥ããããªãã®ã§é¢åã«ãªããŸããã
å¯èŠåãœãããŠã§ã¢
ååè»éçãPySCFã®èšç®çµæãå¯èŠåããããã«ã¯ãå¯èŠåãœãããŠã§ã¢ãå¿ èŠã«ãªããŸãã ãããã¯ãèšç®ãããååãçµã¿ç«ãŠãããã«ããå¯èŠåãœãããŠã§ã¢ãçšããæ¹ã䟿å©ã§ãã ããªãå€ãã®çš®é¡ã®ãœãããŠã§ã¢ãããã®ã§ããã ããã§ã¯ç§ã䜿ã£ãŠããã»ã¡ã€ã³ã§äœ¿ã£ãŠããããšããããœãããŠã§ã¢ïŒå šãŠè±èªã§ãïŒãã玹ä»ããããŸãã
ãœãããŠã§ã¢ | cubeãã¡ã€ã«ã®å¯èŠå | ååã¢ããªã³ã° | ç¡å |
---|---|---|---|
MOLDEN | ã | Ã | ã |
visual molecular dynamics (VMD) | ã | Ã | ã |
MolView | Ã | ã | ã |
ChemCraft | ã | ã | â³ |
GaussView | ã | ã | Ã |
Avogadro | ã | ã | ã |
ãšã¯èšãã䜿ãããããã®ã»æ°ã«å ¥ã£ããã®ãèªåã§èŠã€ããŠãã ããã ç§ã¯ChemCraft (licensed)ãšVMDãã¡ã€ã³ã§äœ¿ã£ãŠããŸãã ãã®ãéåååŠãã³ãºãªã³ãã§ã¯ãçããã¯äž»ã«AvogadroãçšããŠããããšã«ãªããšæããŸãã ãšãããããã¡ããã€ã³ã¹ããŒã«ããŠãããŸãããã ç§ã¯äœ¿ã£ãããšããªãã®ã§åãããŸããããäžèšã«ãããšAvogadroãçšããŠååã¢ããªã³ã°ïŒã³ã³ãã¥ãŒã¿äžã§ååãçµã¿ç«ãŠãŠããã¶ãxyzãã¡ã€ã«ã®çæãå¯èœïŒãå¯èœãªããã§ãã
åºæ¬çã«ã¯ãæåãšããã ããã£ãŠGaussViewãæãé«æ§èœã§ãã å€ãã®èšç®ãµãŒããŒã«ã¯æ¢ã«ã€ã³ã¹ããŒã«ãããŠãããšæããŸãã ChemCraftã¯æéä»ç¡åãšãããããªæãã ã£ãããšæããŸãã
MOLDENãšVMDã¯ããã¶ãååãçµã¿ç«ãŠãããšãã§ããªãã§ãã MOLDENã¯è»œéãªã®ãç¹é·ã§ãã VMDã¯å²ãšããããªæ§é ãæžãããšãã§ããŸãã
ãã ãæ®å¿µãªããPySCFã®åºåãã¡ã€ã«ãçŽæ¥èªã¿èŸŒãã§ããããœãããŠã§ã¢ã¯ãªããšæããŸãã ãšããããååè»éãå¯èŠåããéã¯ãPySCFããmoldenãã¡ã€ã«ïŒãcubeãã¡ã€ã«ïŒãåºåãããããå¯èŠåãœãããŠã§ã¢ã§èªã¿èŸŒãããšã«ãªããŸãã ããã¯ååè»éã®å¯èŠåã§èª¬æããŸãã
Pythonã®ã€ã³ã¹ããŒã«
æ©éPySCFã®ã€ã³ã¹ããŒã«ãããããšããã§ãããPySCFã䜿ãããã«ã¯Pythonã䜿ããªããã°ãªããŸãããPythonã䜿ãããã«ã¯ããã€ãæ¹æ³ããããšæããŸãããäž»ã«äžã€ã®ãã¡ã©ã¡ããã§ãããã
- æå ã®ããœã³ã³ã«çŽæ¥Pythonãã€ã³ã¹ããŒã«ãã
- æå ã®ããœã³ã³ã«LinuxïŒãªã©ïŒãã€ã³ã¹ããŒã«ãããã®ä»®æ³OSäžã§Pythonã䜿ã
- ãªã¢ãŒãã®èšç®æ©ã§Pythonã䜿ã
ããã§ã¯äžäºã€ã®ãã¡ãã©ã¡ããã«ãªããšæããŸããã§ãããããã§ã¯PySCFã䜿ãããšãç®çãªã®ã§ãPythonã䜿ãããšãã§ããã ãã§ã¯äžååãšãªããŸããLinuxäžã§ç°å¢ãæ§ç¯ããæ¹ãæ¡åŒµæ§ãæ±çšæ§ã®é«ãããããã¡ãã®æ¹ãè¯ããšæããŸããç§ã¯MacintoshãŠãŒã¶ãŒã§ã¯ãªãã®ã§åãããŸããããMacintoshã®å Žåã¯ç¹ã«äœãããªããŠãPythonã䜿ããã®ã§ããããã
Windowsã®å Žåã¯ãWindows Subsystem for Linux (WSL)ãšããæ©èœãçšãããšãç°¡åã«Linuxãã€ã³ã¹ããŒã«ããããšãã§ããŸããèªåã§æ€çŽ¢ããããäŸãã°é©åœã«æ€çŽ¢ããŠåºãŠãã以äžã®ãããªããŒãžãåèã«ããŠãã€ã³ã¹ããŒã«ããŠã¿ãŠãã ããã
- Windows 10 çš Windows Subsystem for Linux ã®ã€ã³ã¹ããŒã« ã¬ã€ã
- Windows 10ã§Linuxã䜿ã
- WSLã§Windows 10ã«Linuxä»®æ³ç°å¢ãæ§ç¯
PySCFã®ã€ã³ã¹ããŒã«
åºæ¬çã«ã¯PySCFå ¬åŒã®Installation ã®ããŒãžãåç §ããŠããã ããããšããã§ãããè±èªã®ããŒãžãèªã¿é²ããã®ã¯å³ããå ŽåãããããšæããŸãã®ã§ãé©åœã«æ€çŽ¢ããŠãããããæ¥æ¬èªã®ããŒãžãã玹ä»ããŠãããŸãããªããåç¯ã§Linuxãã€ã³ã¹ããŒã«ããå Žåã¯ãPySCFãLinuxäžã«ã€ã³ã¹ããŒã«ããŸãããã
ãŸããç§ã¯äœ¿ã£ãããšãããŸããããGoogle Colaboratoryãšããã§åããããšãã§ããããã§ãïŒPySCFã®ã€ã³ã¹ããŒã«æ¹æ³(Google Colaboratory)ïŒã
# ã¡ã¢
sudo apt-get install python3-pip
which pip
pip install pyscf
ã€ã³ã¹ããŒã«ãæ£ããã§ããŠãããã¯ã次åã®01 äžç¹èšç®1ãåç
§ããŠå®éã«èšç®ãè¡ããèšç®å€ãæ£ããåŸããããã確èªããŸãããã
ç°å¢ã«ãã£ãŠã¯python
ã³ãã³ãã§ã¯ãªãpython3
ã³ãã³ããçšããå¿
èŠãããã®ã§æ³šæããŠãã ããã