Ejemplo n.º 1
0
def get_so(atoms, basis):
    atoms = gto.mole.format_atom(atoms)
    gpname, origin, axes = symm.detect_symm(atoms)
    gpname, axes = symm.subgroup(gpname, axes)
    atoms = gto.mole.format_atom(atoms, origin, axes)
    eql_atoms = symm.symm_identical_atoms(gpname, atoms)
    so = symm.basis.symm_adapted_basis(gpname, eql_atoms, atoms, basis)[0]
    n = 0
    for c in so:
        if c.size > 0:
            n += c.shape[1]
    return n, so
Ejemplo n.º 2
0
def get_so(atoms, basis):
    atoms = gto.mole.format_atom(atoms)
    gpname, origin, axes = symm.detect_symm(atoms)
    gpname, axes = symm.subgroup(gpname, axes)
    atoms = gto.mole.format_atom(atoms, origin, axes)
    eql_atoms = symm.symm_identical_atoms(gpname, atoms)
    so = symm.basis.symm_adapted_basis(gpname, eql_atoms, atoms, basis)[0]
    n = 0
    for c in so:
        if c.size > 0:
            n += c.shape[1]
    return n, so
Ejemplo n.º 3
0
def get_so(atoms, basis, cart=False):
    atoms = gto.mole.format_atom(atoms)
    gpname, origin, axes = symm.detect_symm(atoms)
    gpname, axes = symm.subgroup(gpname, axes)
    atoms = gto.mole.format_atom(atoms, origin, axes, 'Bohr')
    mol = gto.M(atom=atoms, basis=basis, unit='Bohr', spin=None)
    mol.cart = cart
    so = symm.basis.symm_adapted_basis(mol, gpname)[0]
    n = 0
    for c in so:
        if c.size > 0:
            n += c.shape[1]
    assert(n == mol.nao_nr())
    return n, so
Ejemplo n.º 4
0
def get_so(atoms, basis, cart=False):
    atoms = gto.mole.format_atom(atoms)
    gpname, origin, axes = symm.detect_symm(atoms)
    gpname, axes = symm.subgroup(gpname, axes)
    atoms = gto.mole.format_atom(atoms, origin, axes)
    try:
        mol = gto.M(atom=atoms, basis=basis)
    except RuntimeError:
        mol = gto.M(atom=atoms, basis=basis, spin=1)
    mol.cart = cart
    so = symm.basis.symm_adapted_basis(mol, gpname)[0]
    n = 0
    for c in so:
        if c.size > 0:
            n += c.shape[1]
    assert(n == mol.nao_nr())
    return n, so