Visualization of pySCF-molecules¶
In order to run a pySCF-calculation and thereafter visualize the resulting orbitals, do the following:
In [ ]:
Copied!
import braketlab as bk
from pyscf import gto, scf
# set up a quantum system
mol = gto.Mole()
mol.build(atom = '''O 0 0 0; H 0 1 0; H 0 0 1''',basis = 'cc-pvdz')
# extract the basis using braketlab
basis = bk.basisbank.extract_pyscf_basis(mol)
# do some scf-optimization
res = scf.RHF(mol)
res.kernel()
# extract MO number 9:
p = 9
pn = basis[0]*res.mo_coeff[0,p]
for i in range(1, len(basis)):
pn += basis[i]*res.mo_coeff[i,p]
# display result
pn.view()
import braketlab as bk
from pyscf import gto, scf
# set up a quantum system
mol = gto.Mole()
mol.build(atom = '''O 0 0 0; H 0 1 0; H 0 0 1''',basis = 'cc-pvdz')
# extract the basis using braketlab
basis = bk.basisbank.extract_pyscf_basis(mol)
# do some scf-optimization
res = scf.RHF(mol)
res.kernel()
# extract MO number 9:
p = 9
pn = basis[0]*res.mo_coeff[0,p]
for i in range(1, len(basis)):
pn += basis[i]*res.mo_coeff[i,p]
# display result
pn.view()
In [ ]:
Copied!