Commit be09df19 authored by hebrewsnabla's avatar hebrewsnabla
Browse files

move everything to pyAutoMR.automr

parent 00ad80f2
__pycache__/
*pyc
/test/
uno.out
version 0.2.0 (Jul 10, 2021)
* move everything to pyAutoMR.automr
version 0.1.1 (Jun 27, 2021)
version 0.1.1 (Jul 9, 2021)
--------------------------
* dump active orbital composition
* add MC-PDFT
version 0.1 (Jun 27, 2021)
--------------------------
* UHF -> UNO -> CASSCF
......
......@@ -6,10 +6,13 @@ This program aims to do:
* HF guess strategy
* automatic guess for CASSCF/SUHF
## Pre-requisites
## Installation
Pre-requisites
* MOKIT (no need to fully compile, only lo, autopair are needed)
* [PySCF](https://github.com/pyscf/pyscf)
* [mrh](https://github.com/MatthewRHermes/mrh) (optional, for MC-PDFT)
Install
* git clone and add `/path/to/pyAutoMR` to your `PYTHONPATH`
## Features
* UHF -> UNO -> CASSCF
......@@ -30,7 +33,7 @@ UHF, RHF can be auto-detected.
## Quick Start
```
import guess, autocas, cidump
from automr import guess, autocas, cidump
xyz = 'N 0.0 0.0 0.0; N 0.0 0.0 1.9'
bas = 'cc-pvdz'
......
......@@ -161,7 +161,7 @@ def check_uhf(mf):
return False, mf
def cas(mf, crazywfn=False, max_memory=2000, natorb=True):
def cas(mf, act_user=None, crazywfn=False, max_memory=2000, natorb=True):
is_uhf, mf = check_uhf(mf)
if is_uhf:
mf, unos, unoon, nacto, (nacta, nactb), ndb, nex = get_uno(mf)
......@@ -170,6 +170,10 @@ def cas(mf, crazywfn=False, max_memory=2000, natorb=True):
nacto = npair*2
nacta = nactb = npair
nopen = nacta - nactb
if act_user is not None:
print('Warning: using user defined active space')
nacto = act_user[0]
nacta, nactb = act_user[1]
mc = mcscf.CASSCF(mf,nacto,(nacta,nactb))
mc.fcisolver.max_memory = max_memory // 2
mc.max_memory = max_memory // 2
......
......@@ -42,14 +42,14 @@ def get_energy_decomposition (mc, ot, mo_coeff=None, ci=None):
#else:
if True:
e_nn, e_core, e_coul, e_x, e_otx, e_otc, e_c = _get_e_decomp (mc, ot, mo_coeff, ci, e_mcscf, xfnal, cfnal)
print('e_mc : %15.8f' % e_mcscf)
print('e_nn : %15.8f' % e_nn)
print('e_core: %15.8f' % e_core)
print('e_coul: %15.8f' % e_coul)
print('e_x : %15.8f' % e_x)
print('e_otx : %15.8f' % e_otx)
print('e_otc : %15.8f' % e_otc)
print('e_c : %15.8f' % e_c)
print('e_mc : %15.8f' % e_mcscf)
print('e_nn : %15.8f' % e_nn)
print('e_core : %15.8f' % e_core)
print('e_coul : %15.8f' % e_coul)
print('e_x : %15.8f' % e_x)
print('e_otx : %15.8f' % e_otx)
print('e_otc : %15.8f' % e_otc)
print('e_c : %15.8f' % e_c)
return e_nn, e_core, e_coul, e_x, e_otx, e_otc, e_c
def _get_e_decomp (mc, ot, mo_coeff, ci, e_mcscf, xfnal, cfnal):
......
from pyscf import lib
#from pyphf import util, guess
import guess, autocas, cidump
from automr import guess, autocas, cidump
lib.num_threads(4)
......
from pyscf import lib
#from pyphf import util, guess
import guess, autocas, cidump
from automr import guess, autocas, cidump
lib.num_threads(4)
......
from pyscf import lib
import guess, autocas, mcpdft
from automr import guess, autocas, mcpdft
lib.num_threads(4)
......
from pyscf import lib
#from pyphf import util, guess
import guess
from automr import guess
lib.num_threads(4)
......
from pyscf import lib
import guess
from automr import guess
lib.num_threads(4)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment