Hot answers tagged

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's user avatar
  • 33.1k
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
  • 17.6k
10 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
  • 8,946
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
  • 17.6k
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
  • 17.6k
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,623
8 votes

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
  • 649
8 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
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,623
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,656
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
  • 375
6 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
  • 17.6k
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
  • 17.6k
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
  • 17.6k
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
  • 17.6k
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's user avatar
  • 33.1k
6 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's user avatar
  • 33.1k
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
  • 8,946
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
  • 17.6k
5 votes
Accepted

Calculating first and second derivatives of a molecular Hamiltonian?

The derivatives of a molecular Hamiltonian with respect to nuclear coordinates can be performed analytically (as you correctly pointed out), and therefore does not need PySCF or Psi4, which are ...
Nike Dattani's user avatar
  • 33.1k
5 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
5 votes
Accepted

Molecular orbital values on grid points in PySCF?

You can evaluate molecular orbitals on a grid by first evaluating the AOs on the grid with ao = mol.eval_gto('GTOval', coords) and then contracting with the ...
Susi Lehtola's user avatar
  • 17.6k
5 votes
Accepted

Restarting an FCI calculation in PySCF

What you can do, is save the CI vector of your calculation and then use it as starting point in a subsequent calculation, like so: ...
Severus Snape's user avatar
5 votes

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

The difference between "S" and "P" is quite significant in that S-type basis functions have a different mathematical form compared to P-type functions (and therefore the shapes of ...
Nike Dattani's user avatar
  • 33.1k

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