#! Accesses basis sets, databases, plugins, and executables in non-install locations

memory 250 mb
import os
print os.environ.get('PSIPATH')

###########################
molecule h2o {
  O 
  H 1 0.96
  H 1 0.96 2 104.5
}

set basis cc-pVDZ
energy('scf')

clean()


set globals {
    BASIS sto-3g
    DF_BASIS_SCF  cc-pVDZ-JKFIT
    DF_BASIS_SAPT cc-pVDZ-RI
    DF_BASIS_MP2  cc-pVDZ-RI
    REFERENCE RHF
    SCF_TYPE DF
    PRINT 1
    R_CONVERGENCE 11
    JOBTYPE SP
    GUESS CORE
}

S22mad = database('sapt0','s44',subset=[2,8],BENCHMARK='s22A')
S22mad = database('sapt0','s22',subset=[2,8],BENCHMARK='s22A')
clean()

###########################
# PYTHONPATH must include directory above plugin directory.
#     Define either externally or here, then import plugin.
#sys.path.insert(0, './..')
import myplugin1

molecule water {
O
H 1 R
H 1 R 2 A

R = .9
A = 104.5
symmetry c1
}

set {
  basis sto-3g
    DF_BASIS_SCF  cc-pVDZ-RI
}

set myplugin1 {
  print 1
}

energy('myplugin1')

compare_values(-74.9455096208439784, get_variable('CURRENT ENERGY'), 6, 'PSIPATH plugin')
clean()

###########################
set basis mysto3g
set df_basis_scf myccpvdzri
energy('scf')
compare_values(-74.9455096190513927, get_variable('CURRENT ENERGY'), 6, 'PSIPATH orbital and jk basis sets')
clean()

###########################

molecule eneyne {
C   0.000000  -0.667578  -2.124659
C   0.000000   0.667578  -2.124659
H   0.923621  -1.232253  -2.126185
H  -0.923621  -1.232253  -2.126185
H  -0.923621   1.232253  -2.126185
H   0.923621   1.232253  -2.126185
--
C   0.000000   0.000000   2.900503
C   0.000000   0.000000   1.693240
H   0.000000   0.000000   0.627352
H   0.000000   0.000000   3.963929
}

eneyne.update_geometry()
E, G = eneyne.run_dftd3('b3lyp', 'd2gr')
clean()

###########################
molecule h2o {
  O 
  H 1 0.96
  H 1 0.96 2 104.5
symmetry c1
}

set basis cc-pVDZ
set df_basis_scf cc-pVDZ-JKFIT
energy('scf')

clean()


