Skip to main content
19 votes
Accepted

Why is my hydrogen energy not equal to -0.5 hartrees?

Yes, the exact orbital energy of the hydrogen atom is $-1/2\ E_h$. The problems in the calculation are as follows. First, you are running ROKS. ROKS has many definitions in the literature; PySCF ...
Susi Lehtola's user avatar
  • 19.8k
14 votes
Accepted

How are 1-electron and 2-electron integrals done in PySCF?

While this earlier question on our site was asking why fewer 2e- integrals were printed by PySCF than expected, and your question is simply asking how to calculate the 1e- and 2e- integrals in the ...
Nike Dattani - No Free Time's user avatar
14 votes
Accepted

pyscf: Why should the choice of pseudopotential determine the total energy, and not the physics?

The energy of a system, be it a molecule or a material, is dependent on the energy reference (or energy zero point) you choose. Common energy references are: The state where all electrons (except for ...
wzkchem5's user avatar
  • 9,710
13 votes
Accepted

Convert reduced density matrix from M.O. to A.O. basis

Only the first line is correct, as long as the AO basis is not orthogonal. The point is: the AO $\leftrightarrow$ MO transformations of density matrices and Fock matrices require different formulas. ...
wzkchem5's user avatar
  • 9,710
12 votes

Why is my hydrogen energy not equal to -0.5 hartrees?

The exact non-relativistic ground state electronic energy of a hydrogen-like atom, assuming that the nucleus is "clamped", point-sized, and with an infinitely large mass compared to the mass ...
Nike Dattani - No Free Time's user avatar
10 votes
Accepted

How to get atomic orbital coefficients in PySCF

Broadly, there are two flavors of Density Functional Theory (DFT): Orbital Free DFT and Kohn-Sham DFT (KS-DFT). In Orbital Free DFT, we do indeed directly optimize the density until we find the ...
FifthArrow's user avatar
10 votes
Accepted

What unit of energy does PySCF use?

Same as any other electronic structure code: atomic units are used. The unit of energy is Hartree, $E_h$, in which the ground state energy of hydrogen is exactly $-0.5$. One Hartree is roughly 27.211 ...
Susi Lehtola's user avatar
  • 19.8k
9 votes
Accepted

PySCF: Implementing SHCI frozen argument

Freezing can have two meanings: either freezing the occupation (doubly occupied core orbitals and inactive virtual orbitals), or freezing the spatial orbital in orbital optimization (here: in SHCI-SCF)...
Susi Lehtola's user avatar
  • 19.8k
9 votes
Accepted

PySCF: atomic basis Fock matrix changes after mo_coeff update

The Fock matrix is defined as $F_{\mu \nu} = \partial E / \partial P_{\mu \nu}$ where ${\bf P}$ is the density matrix and $E$ is the total energy functional (here: restricted Hartree-Fock i.e. RHF). ...
Susi Lehtola's user avatar
  • 19.8k
9 votes

Codes for post-processing Gaussian cube files?

Multiwfn Multiwfn is a great tool for cube file analysis and wfn file analysis that can probably do almost everything you want to do. It is capable of doing math between cube files, outputting that ...
Tristan Maxson's user avatar
9 votes
Accepted

What do the rows and columns of a Fock matrix represent?

The short answer is: it is the matrix representation of the Fock operator in the given basis set, in this case, the atomic orbital (AO) basis. The Fock operator itself is a mean-field, independent ...
TAR86's user avatar
  • 1,697
9 votes
Accepted

Molecular geometry optimization for cyclooctatetraene with pyscf

I'm not 100% sure I know what you want. But let's walk through creating rough geometries for the different structures in the paper. I'm going to use Avogadro, but it should be possible to do this in ...
Geoff Hutchison's user avatar
8 votes

What information does the 1RDM contain?

I (think that I) can only help with the part in the title of the question. The following answer won't be mathematical rigorous and nothing will be proved, but references are provided at the end. ...
Jakob's user avatar
  • 757
8 votes

What do the rows and columns of a Fock matrix represent?

Formally, the Fock matrix is the density matrix derivative of the Hartree-Fock or Kohn-Sham energy functional. The Fock matrix returned by PySCF is in the atomic-orbital basis, which is actually the ...
Susi Lehtola's user avatar
  • 19.8k
8 votes

How can I build the wheels necessary for a quick installation of PySCFad on a "compute node"?

I finally got it working! Explanation of the error The above procedure installed the "main" branch of "pyscf_properties" rather than the "ad" branch. It seems that due ...
Nike Dattani - No Free Time's user avatar
7 votes

How are 1-electron and 2-electron integrals done in PySCF?

Here is the code that I currently used. i hope it could be helpful for other's research. To obtain the integrals, the first step is to run a Hartree Fock approximation and check if it has converged. <...
ironmanaudi's user avatar
7 votes
Accepted

How to calculate the Fock matrix in the molecular orbital basis PySCF?

For canonical MOs, it is expected that the off-diagonal elements of the described product with the Fock matrix are zero (within reasonable accuracy) because they are the result of the diagonalization ...
TAR86's user avatar
  • 1,697
7 votes
Accepted

Hartree Fock Algorithm too high values for Molecules

Since you've done such an excellent job so far I thought I'd just give you some hints in the chat, but after banging your head on it for a week I think you deserve a proper answer. And with the new ...
AwakenYesterday's user avatar
7 votes

How can I change the mass of an electron in the hamiltonian on a PySCF calculation?

The electron mass is set in pyscf/data/nist.py along with other physical constants, ...
Anyon's user avatar
  • 4,751
7 votes

Print chemical formula from list of atoms in Python?

The tricky part comes if you have multiple fragments and want disconnected formulas. But in general, the Hill system for chemical formulas is used, and available in Open Babel, RDKit, etc. As ...
Geoff Hutchison's user avatar
6 votes

Interface between PySCF and Molpro

Interoperability between quantum chemistry packages is almost non-existent when it comes to more complicated data structures, and there is no real standard for wavefunction or density matrix ...
TiborGY's user avatar
  • 395
6 votes

Codes for post-processing Gaussian cube files?

Why the need to reprocess .cube files, when you can generate a cube straight away for the electron density with cubegen (see ...
Susi Lehtola's user avatar
  • 19.8k
6 votes

Codes for post-processing Gaussian cube files?

TheoDORE Dealing with cube files is fairly easy as long as they all have the same grid definition. A cube file is basically just a long vector of numbers and you can add and multiply them as you wish. ...
Felix's user avatar
  • 1,431
6 votes
Accepted

PySCF: eigenvalues, non-integer occupation, CISD calculations, and frozen lists

One should not confuse the "smearing" used to facilitate self-consistent field convergence, especially for density functional calculations in periodic systems, and the role of fractional ...
Susi Lehtola's user avatar
  • 19.8k
6 votes

How does pyscf's internal basis format distinguish between 1s and 2s orbitals?

There is no distinction of any basis functions in PySCF. Basis functions are just that: basis functions, a mathematical abstraction. The individual basis functions do not have to represent orbitals; ...
Susi Lehtola's user avatar
  • 19.8k
6 votes
Accepted

Inputting custom STO-3G basis into PySCF

Instead of: basis = STO-3G you can get PySCF to read your own "custom" basis set file, for example: ...
Nike Dattani - No Free Time's user avatar
6 votes

Does PySCF use chemist's or physicist's notation for 1- and 2-electron integrals?

You are right that pyscf uses chemist's notation. A quick google search with the keywords pyscf chemist notation and ...
Hemanth Haridas's user avatar
6 votes
Accepted

Error in UCCSD(T) Calculation in PySCF for S atom?

The stack trace shows that the program tries to divide a number by the number of alpha virtual orbitals (nvira), which is zero in the case of STO-3G triplet sulfur atom. This caused a ...
wzkchem5's user avatar
  • 9,710
6 votes
Accepted

May I use a DFTB+ result as initial guess for HF or DFT in PySCF?

Not that I am aware of. Hégély and Kállay studied the accuracy of tight-binding initial guesses in Int. J. Quantum Chem. 122, e26782 (2021) and found that the tight-binding guess has a similar level ...
Susi Lehtola's user avatar
  • 19.8k
5 votes
Accepted

Computing analytic derivatives of molecular Hamiltonians obtained from solving Hartree-Fock equations

PySCF and Psi4 both implement analytical geometric Hessians for Hartree-Fock calculations. The computation of the geometric Hessian indeed requires solving the coupled perturbed Hartree-Fock equations:...
Susi Lehtola's user avatar
  • 19.8k

Only top scored, non community-wiki answers of a minimum length are eligible