Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

DEMO: HF calculations on small organic molecules by PySCF

Open in Colab

Overview of Basis sets used in calculations

Minimal & small

Split-valence Pople sets

With polarization

Correlation-consistent (Dunning) sets

Diatomics

converged SCF energy = -1.04299627454009
Bond distance: 0.50 Å, Total Energy: -1.042996 Hartree
converged SCF energy = -1.10962287714076
Bond distance: 0.63 Å, Total Energy: -1.109623 Hartree
converged SCF energy = -1.1151049457252
Bond distance: 0.76 Å, Total Energy: -1.115105 Hartree
converged SCF energy = -1.09311721487025
Bond distance: 0.89 Å, Total Energy: -1.093117 Hartree
converged SCF energy = -1.05859984694162
Bond distance: 1.03 Å, Total Energy: -1.058600 Hartree
converged SCF energy = -1.0184750668009
Bond distance: 1.16 Å, Total Energy: -1.018475 Hartree
converged SCF energy = -0.976475042485522
Bond distance: 1.29 Å, Total Energy: -0.976475 Hartree
converged SCF energy = -0.934934347558081
Bond distance: 1.42 Å, Total Energy: -0.934934 Hartree
converged SCF energy = -0.895332352040937
Bond distance: 1.55 Å, Total Energy: -0.895332 Hartree
converged SCF energy = -0.858539335922428
Bond distance: 1.68 Å, Total Energy: -0.858539 Hartree
converged SCF energy = -0.825003227962735
Bond distance: 1.82 Å, Total Energy: -0.825003 Hartree
converged SCF energy = -0.794885434688666
Bond distance: 1.95 Å, Total Energy: -0.794885 Hartree
converged SCF energy = -0.768150987030312
Bond distance: 2.08 Å, Total Energy: -0.768151 Hartree
converged SCF energy = -0.744632766213529
Bond distance: 2.21 Å, Total Energy: -0.744633 Hartree
converged SCF energy = -0.724083718963794
Bond distance: 2.34 Å, Total Energy: -0.724084 Hartree
converged SCF energy = -0.706219811199347
Bond distance: 2.47 Å, Total Energy: -0.706220 Hartree
converged SCF energy = -0.690751272496288
Bond distance: 2.61 Å, Total Energy: -0.690751 Hartree
converged SCF energy = -0.67740092568721
Bond distance: 2.74 Å, Total Energy: -0.677401 Hartree
converged SCF energy = -0.665911797817778
Bond distance: 2.87 Å, Total Energy: -0.665912 Hartree
converged SCF energy = -0.656048251145591
Bond distance: 3.00 Å, Total Energy: -0.656048 Hartree
<Figure size 800x500 with 1 Axes>
<Figure size 800x500 with 1 Axes>
converged SCF energy = -1.11675930739643
Generating cube file for MO 2 (0-indexed as 1)
Visualizing cube file: mo_1.cube
Loading...

Build and Visualize Benzene

Loading...

Run calculations

converged SCF energy = -227.890481261003

Visualize Results

Loading...
Loading...
Loading...
RegionOrbital indicesTypeComment
Very low0–5C 1s coreFlat band, strongly bound
Middle6–20σ bondingσ-framework in the ring
Gap~21Highest occupied πAromatic HOMO
High22–35π*/σ*Virtual MOs

Short Survey of more acurate methods

System: uname_result(system='Linux', node='runnervm76f27', release='6.17.0-1022-azure', version='#22-Ubuntu SMP Mon Jul 27 17:24:03 UTC 2026', machine='x86_64')  Threads 4
Python 3.13.15 (main, Aug  6 2026, 02:15:18) [GCC 13.3.0]
numpy 2.5.2  scipy 1.18.0  h5py 3.16.0
Date: Thu Aug 20 20:31:26 2026
PySCF version 2.14.0
PySCF path  /opt/hostedtoolcache/Python/3.13.15/x64/lib/python3.13/site-packages/pyscf

[CONFIG] conf_file None
[INPUT] verbose = 4
[INPUT] num. atoms = 3
[INPUT] num. electrons = 10
[INPUT] charge = 0
[INPUT] spin (= nelec alpha-beta = 2S) = 0
[INPUT] symmetry True subgroup None
[INPUT] Mole.unit = angstrom
[INPUT] Symbol           X                Y                Z      unit          X                Y                Z       unit  Magmom
[INPUT]  1 O      0.000000000000   0.000000000000   0.117300000000 AA    0.000000000000   0.000000000000   0.221664874411 Bohr   0.0
[INPUT]  2 H      0.000000000000   0.757200000000  -0.469200000000 AA    0.000000000000   1.430900621521  -0.886659497646 Bohr   0.0
[INPUT]  3 H      0.000000000000  -0.757200000000  -0.469200000000 AA    0.000000000000  -1.430900621521  -0.886659497646 Bohr   0.0

nuclear repulsion = 9.1895337629349
point group symmetry = C2v
symmetry origin: [0. 0. 0.]
symmetry axis x: [-1. -0. -0.]
symmetry axis y: [0. 1. 0.]
symmetry axis z: [0. 0. 1.]
num. orbitals of irrep A1 = 7
num. orbitals of irrep B1 = 2
num. orbitals of irrep B2 = 4
number of shells = 9
number of NR pGTOs = 30
number of NR cGTOs = 13
basis = 6-31g
ecp = {}
CPU time:        19.14
Loading...

Hartree-Fock

See the PySCF user guide and examples for more info.



******** <class 'pyscf.scf.hf_symm.SymAdaptedRHF'> ********
method = SymAdaptedRHF
initial guess = minao
damping factor = 0
level_shift factor = 0
DIIS = <class 'pyscf.scf.diis.CDIIS'>
diis_start_cycle = 1
diis_space = 8
diis_damp = 0
SCF conv_tol = 1e-09
SCF conv_tol_grad = None
SCF max_cycles = 50
direct_scf = True
direct_scf_tol = 1e-13
chkfile to save SCF result = /tmp/tmp51ai18jp
max_memory 4000 MB (current use 395 MB)
Freeze 0 electrons in irreps []
    10 free electrons in irreps A1 B1 B2
Set gradient conv threshold to 3.16228e-05
Initial guess from minao.
init E= -75.8343030732679
HOMO (B1) = -0.474622307499056  LUMO (A1) = 0.124028813320098  gap/eV = 16.29013
cycle= 1 E= -75.9458238773405  delta_E= -0.112  |g|= 0.419  |ddm|= 1.19
HOMO (B1) = -0.41446039447561  LUMO (A1) = 0.209091679575772  gap/eV = 16.96772
cycle= 2 E= -75.9747569680174  delta_E= -0.0289  |g|= 0.226  |ddm|= 0.406
HOMO (B1) = -0.503724607052101  LUMO (A1) = 0.197910489056946  gap/eV = 19.09246
cycle= 3 E= -75.9837994485706  delta_E= -0.00904  |g|= 0.022  |ddm|= 0.142
HOMO (B1) = -0.499873983490941  LUMO (A1) = 0.203806292491575  gap/eV = 19.14812
cycle= 4 E= -75.983968312152  delta_E= -0.000169  |g|= 0.00351  |ddm|= 0.0223
HOMO (B1) = -0.501170980205032  LUMO (A1) = 0.203672006137031  gap/eV = 19.17975
cycle= 5 E= -75.9839743119537  delta_E= -6e-06  |g|= 0.000534  |ddm|= 0.00506
HOMO (B1) = -0.501373592709125  LUMO (A1) = 0.203643081946627  gap/eV = 19.18448
cycle= 6 E= -75.983974470941  delta_E= -1.59e-07  |g|= 5.35e-05  |ddm|= 0.000938
HOMO (B1) = -0.501372091345514  LUMO (A1) = 0.203641391321118  gap/eV = 19.18439
cycle= 7 E= -75.9839744725996  delta_E= -1.66e-09  |g|= 1.24e-05  |ddm|= 9.81e-05
HOMO (B1) = -0.501368130501562  LUMO (A1) = 0.203641216029915  gap/eV = 19.18428
cycle= 8 E= -75.9839744727203  delta_E= -1.21e-10  |g|= 1.54e-06  |ddm|= 3.21e-05
HOMO (B1) = -0.501368365983406  LUMO (A1) = 0.203640958576327  gap/eV = 19.18428
Extra cycle  E= -75.9839744727217  delta_E= -1.32e-12  |g|= 7.11e-07  |ddm|= 2.46e-06
converged SCF energy = -75.9839744727217

Density Functional Theory

See the PySCF user guide and examples for more info.

Møller–Plesset perturbation theory

See the PySCF user guide and examples for more info.


******** <class 'pyscf.mp.mp2.RMP2'> ********
nocc = 5, nmo = 13
max_memory 4000 MB (current use 398 MB)
E(RMP2) = -76.1128253908809  E_corr = -0.128850918159199
E(SCS-RMP2) = -76.1124627493824  E_corr = -0.128488276660723
E_corr(same-spin) = -0.0301532597657486
E_corr(oppo-spin) = -0.0986976583934503

Coupled Cluster

See the PySCF user guide and examples for more info.


******** <class 'pyscf.cc.ccsd.CCSD'> ********
CC2 = 0
CCSD nocc = 5, nmo = 13
max_cycle = 50
direct = 0
conv_tol = 1e-07
conv_tol_normt = 1e-05
diis_space = 6
diis_start_cycle = 0
diis_start_energy_diff = 1e+09
max_memory 4000 MB (current use 398 MB)
Init t2, MP2 energy = -76.1128253971341  E_corr(MP2) -0.128850924412438
Init E_corr(CCSD) = -0.128850924412628
cycle = 1  E_corr(CCSD) = -0.131108130968237  dE = -0.00225720656  norm(t1,t2) = 0.0228787
cycle = 2  E_corr(CCSD) = -0.133971459205635  dE = -0.00286332824  norm(t1,t2) = 0.00827705
cycle = 3  E_corr(CCSD) = -0.135274692633285  dE = -0.00130323343  norm(t1,t2) = 0.00329509
cycle = 4  E_corr(CCSD) = -0.135395198809583  dE = -0.000120506176  norm(t1,t2) = 0.000547317
cycle = 5  E_corr(CCSD) = -0.13538272686884  dE = 1.24719407e-05  norm(t1,t2) = 0.000202845
cycle = 6  E_corr(CCSD) = -0.135379406531295  dE = 3.32033755e-06  norm(t1,t2) = 5.06174e-05
cycle = 7  E_corr(CCSD) = -0.135379879258623  dE = -4.72727328e-07  norm(t1,t2) = 1.08852e-05
cycle = 8  E_corr(CCSD) = -0.135379510430962  dE = 3.68827661e-07  norm(t1,t2) = 2.91755e-06
cycle = 9  E_corr(CCSD) = -0.135379510791861  dE = -3.6089895e-10  norm(t1,t2) = 5.44171e-07
CCSD converged
E(CCSD) = -76.11935398351353  E_corr = -0.1353795107918611
CCSD(T) correction = -0.000995860106834962

Full Configuration Interaction

See the PySCF examples for more details.

Analysis

Important data is saved to the PySCF method objects, making it easy to analyze and visualize!

Loading...