# Tag Info

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 ...
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 ...
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 ...
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. ...
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)...
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). ...
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 ...

### 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 ...

### 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. ...

### 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 ...
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 ...
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 ...

### 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, ...

### 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 ...

### 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 ...

### 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 ...

### 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 ...

### 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. ...
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 ...

### 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; ...
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: ...

### 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 ...

### 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 ...
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 ...
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:...
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 ...

### 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. <...
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 ...