#! DF-SCF cc-pVDZ of benzene-hydronium ion, scanning the dissociation coordinate with
#! Python's built-in loop mechanism. The geometry is specified by a Z-matrix with dummy
#! atoms, fixed parameters, updated parameters, and separate charge/multiplicity
#! specifiers for each monomer. One-electron properties computed for dimer and one monomer.
 
memory 250 mb
 
Rvals = [ 4.0, 5.0 ]

set {
    DIIS True
    DIIS_MIN_VECS 5
    DIIS_MAX_VECS 9
    MAXITER 1000
    E_CONVERGENCE 11
    D_CONVERGENCE 11
    GUESS SAD
    SCF_TYPE DF
    REFERENCE RHF
}


for R in Rvals:
    molecule dimer {
    0 1
               C          0.710500000000    Bz    -1.230622098778
               C          1.421000000000    Bz     0.000000000000
               C          0.710500000000    Bz     1.230622098778
               C         -0.710500000000    Bz     1.230622098778
               H          1.254500000000    Bz    -2.172857738095
               H         -1.254500000000    Bz     2.172857738095
               C         -0.710500000000    Bz    -1.230622098778
               C         -1.421000000000    Bz     0.000000000000
               H          2.509000000000    Bz     0.000000000000
               H          1.254500000000    Bz     2.172857738095
               H         -1.254500000000    Bz    -2.172857738095
               H         -2.509000000000    Bz     0.000000000000
    --
    1 1
               O          0.000000000000    Oy     0.000000000000
               H          0.494974746831    Hy    -0.857321409974
               H          0.494974746831    Hy     0.857321409974
               H         -0.989949493661    Hy     0.000000000000
    units angstrom
    }
    #dimer.Bz = -4.794637665924 + R
    #dimer.Oy = -0.794637665924 + R
    #dimer.Hy = -0.444637665924 + R
    dimer.Bz = 0.0
    dimer.Oy = R
    dimer.Hy = R + 0.35

    set BASIS sto-3g
    set DF_BASIS_SCF cc-pVDZ-JKFIT

    activate(dimer)

    eehf = energy('scf')
    oeprop("DIPOLE", "QUADRUPOLE", title='BZH3O+ SCF')


    clean()


    monoB = dimer.extract_subsets(2)

    eehf = energy('scf')
    oeprop("DIPOLE", "QUADRUPOLE",title="H3O+ SCF")
    

    clean()

