Пример #1
0
def make_basis(R, params):
    nuclei = [
        hgto.Nucleus(1.0, [-R / 2, 0.0, 0.0]),
        hgto.Nucleus(1.0, [R / 2, 0.0, 0.0]),
    ]

    basis = []

    for sigma in params:
        for n in nuclei:
            basis.append(hgto.HGTO(sigma, origin=n.position))

    return basis, nuclei
Пример #2
0
def make_basis(params):
    A = 1.7
    R = A / numpy.sqrt(3.0)

    nuclei = [
        hgto.Nucleus(1.0, [R, 0.0, 0.0]),
        hgto.Nucleus(1.0, [-R / 2, A / 2, 0.0]),
        hgto.Nucleus(1.0, [-R / 2, -A / 2, 0.0]),
    ]

    basis = []

    for sigma in params:
        for n in nuclei:
            basis.append(hgto.HGTO(sigma, origin=n.position))

    return basis, nuclei
Пример #3
0
def make_basis(R, params):
    nuclei = [
        hgto.Nucleus(2.0, [-R / 2, 0.0, 0.0]),
        hgto.Nucleus(1.0, [R / 2, 0.0, 0.0]),
    ]

    N = len(params) // 2

    sigma_He = params[0:N]
    sigma_H = params[N:]

    basis = []

    for sigma in sigma_He:
        basis.append(hgto.HGTO(sigma, origin=nuclei[0].position))

    for sigma in sigma_H:
        basis.append(hgto.HGTO(sigma, origin=nuclei[1].position))

    return basis, nuclei
Пример #4
0
def equation(basis):

    B = len(basis)

    H = numpy.zeros((B, B))
    S = numpy.zeros((B, B))

    n = hgto.Nucleus(1.0)

    for i in range(B):
        for j in range(B):
            bi = basis[i]
            bj = basis[j]
            S[i, j] = hgto.overlap(bi, bj)
            H[i, j] = hgto.kinetic(bi, bj) + hgto.nuclear_attraction(bi, bj, n)

    return (H, S)