Questions tagged [pyscf]

For questions about or related to the PySCF electronic structure package for Python

Filter by
Sorted by
Tagged with
8 votes
1 answer
282 views

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

I am trying to evaluate 1- and 2-electron integrals using PySCF trough this code: Hij = mol.intor('int1e_kin') + mol.intor('int1e_nuc') Vijkl = mol.intor('int2e') ...
Rodrigo Sánchez Martínez's user avatar
7 votes
1 answer
94 views

Start a CI calculation from HF/DFT chkfile in PySCF

I am trying to perform a CISD calculation in PySCF using the starting orbitals from an old DFT result. The DFT result was saved on a chkfile, mf.hdf5. The code that ...
David Sousa's user avatar
4 votes
0 answers
34 views

How can I get 2c2e and 3c2e integrals using the erf kernel in PySCF?

I want to reproduce the calculation procedure of density fitting in PySCF. I know how to get the 2c2e/3c2e integrals matrix/tensor with $1/r_{12}$ kernel by using ...
Gaelthorn's user avatar
4 votes
0 answers
63 views

pyscf - non-orthogonal CI

I'm kinda new to pyscf and was wondering if there is a way to implement non-orthogonal CI calculations with it. I would appreciate any help.
master_disaster's user avatar
4 votes
0 answers
53 views

PySCF calcuation of 'one-index' electrostatic (Hartree) potential

I'm trying to calculate the electrostatic (Hartree) potential corresponding to a single (auxiliary) GTO: $$v_i({\bf r_1}) = \int d{\bf r}_2~ \frac{\phi_i ({\bf r}_2)}{r_{12}}$$ [Please note that $\...
stefan_chem's user avatar
5 votes
1 answer
136 views

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

The following is the procedure I have been following: Install PySCFad ...
Nike Dattani's user avatar
  • 31.6k
3 votes
0 answers
64 views

Why is my CISD restart failing in PySCF?

A case that works In my answer to Restarting an FCI calculation in PySCF, I provided a folder full of input and output files that demonstrates saving (as a numpy ...
Nike Dattani's user avatar
  • 31.6k
3 votes
1 answer
103 views

Is PySCF able to print checkpoint files during a CISD calculation?

The problem I've described how to restart a CISD calculation in my answer to the question: Restarting an FCI calculation in PySCF, but this requires all iterations of the CISD calculation to finish, ...
Nike Dattani's user avatar
  • 31.6k
2 votes
1 answer
78 views

How may I calculate free energy using PySCF?

I want to calculate the thermodynamic parameters for a single molecule at a certain temperature. How may I do it with PySCF?
greg pits's user avatar
1 vote
1 answer
143 views

PySCF: How to do CCSD calculations from an FCIDUMP file in HDF5 format?

Recently my question: Why does CCSD work, but not CCSD(T), after reading an FCIDUMP in PySCF? lead to a bug fix that allows users to do CCSD(T) calculations from an FCIDUMP file in PySCF. That was ...
Nike Dattani's user avatar
  • 31.6k
2 votes
0 answers
40 views

PySCF: Two electron integrals, translate between aosym=s8 and full tensor

...
alex math's user avatar
2 votes
1 answer
133 views

Why does CCSD work, but not CCSD(T), after reading an FCIDUMP in PySCF?

CCSD(T) works after an RHF calculation: Input: ...
Nike Dattani's user avatar
  • 31.6k
7 votes
3 answers
972 views

Print chemical formula from list of atoms in Python?

Lets consider the following code which uses the Mole object: ...
Nike Dattani's user avatar
  • 31.6k
3 votes
1 answer
44 views

Check whether a simple molecule is Raman-active or IR-active using PySCF

I am trying to write a python code that checks the dipole moment and the polarisability of a certain molecule in order to determine if it will be Raman-active or IR-active. Raman-active molecules are ...
Joan Grebol's user avatar
4 votes
1 answer
150 views

Inputting custom STO-3G basis into PySCF

A simple question about PySCF, but nonetheless I could not find out how to do it: I have a system of atoms for which I already calculated a STO-3G basis in the usual form of MOs: $$\chi = \sum_i c_i \...
greilchri's user avatar
7 votes
3 answers
291 views

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

I have been looking for a way to change some parameters included in the calculations of PySCF (e.g., changing the mass of the electron to the mass of a muon, so forming an exotic molecule). I know the ...
Joan Grebol's user avatar
4 votes
0 answers
77 views

Convert reduced density matrix in A.O. basis from GAMESS to pyscf

I want pyscf to read the single-particle reduced density matrix computed by GAMESS. However, I am having trouble because the matrix sizes in GAMESS and pyscf are different. For example, the AO-...
user2436's user avatar
4 votes
2 answers
170 views

How to evaluate Hartree--Fock exchange energy density on grids in pyscf?

I am trying to evaluate the Hartree--Fock exchange energy density on grids in pyscf with an instance of class "UKS", in order to test some functionals depending on the exchange energy ...
Lex Lee's user avatar
  • 63
3 votes
1 answer
115 views

Neural network as a customised XC functional in PySCF?

I've been trying to implement neural network as a customised exchange-correlation functional in PySCF but with no success. Below is the example code for customised XC functional. Anyone has any idea ...
Ken.WS's user avatar
  • 31
7 votes
2 answers
183 views

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

For example: gto.basis.load("6-31g", "Li") will show: ...
theQman's user avatar
  • 231
4 votes
2 answers
149 views

Restarting an FCI calculation in PySCF

My question is, if there is a way to continue an earlier FCI calculation in PySCF. Imagine you initially just need energies converged up to a certain threshold: ...
Jannis Erhard's user avatar
2 votes
0 answers
44 views

Information on the PBC TDDFT implementation in PySCF

I recently found out that PySCF can perform gamma point TDDFT for solids (PBC). The results obtained thus far seem reasonable. For example, if I place a molecule in a supercell with a large vacuum ...
Newbie Quantum Chemist's user avatar
3 votes
1 answer
124 views

How to get a two-electron expectation value for atoms in PySCF?

I am interested in calculating the following expectation value for atoms using a converged Slater deteminant from in DFT $$ \left< \Psi \left| \sum_{i,j=1}^N r_i^a r_j^b\right| \Psi \right> \; ,\...
Szgoger's user avatar
  • 380
5 votes
1 answer
275 views

Hartree Fock Algorithm too high values for Molecules

I am working on a high school graduation paper on Hartree Fock and have gotten pretty far already. With help from this community, I managed to generate all the necessary integrals and implement the ...
lela2011's user avatar
  • 125
2 votes
0 answers
270 views

How to read two electron integrals from pyscf

This is a follow-up question to this one I asked a few days ago. I in the meantime talked to my teacher and generate all the necessary integrals in PySCF. For the one electron integrals that isn't an ...
lela2011's user avatar
  • 125
4 votes
2 answers
182 views

Interface between PySCF and Molpro

I am currently interested in using pySCF to generate density matrices (first order single particle density matrices) and then using them in Molpro. In principle, this should be possible if the matrix ...
Jannis Erhard's user avatar
4 votes
1 answer
299 views

Molecular orbital values on grid points in PySCF?

I am looking for a way to easily evaluate individual molecular orbitals on a grid(assuming a single determinant method for now) in PySCF. I am aware on how to generate efficient grids for real-space ...
Szgoger's user avatar
  • 380
6 votes
1 answer
362 views

What information does the 1RDM contain?

The one-electron reduced density matrix (1RDM) contains information useful for the prediction of molecular properties (for instance, dipole moments). As an example, the 1RDM can be easily obtained in ...
Wychh's user avatar
  • 1,973
2 votes
1 answer
169 views

Generate grid coordinates from PySCF DFT package for plotting grid points

As can be read in the pyscf.dft documentation, there should be the possibility of generating the coordinates of the grid for numerical integration. According to the documentation, one can generate the ...
C_Swann22's user avatar
  • 513
9 votes
0 answers
88 views

How to add confining potentials in PySCF? [closed]

I want to try to model the electornic structure of atoms in a confining potential, eg. add a term to the Hamiltonian either of a constant value $V$ after certain distance from the origin or just the ...
user avatar
3 votes
0 answers
85 views

Is the 4-index tensor in the coupled cluster code of PySCF stored in memory or on disk?

In the coupled cluster code of PySCF, is the four index tensor stored in memory or in disk?
Paulie Bao's user avatar
  • 3,711
7 votes
1 answer
232 views

Molecular geometry optimization for cyclooctatetraene with pyscf

I am trying to reproduce the cyclooctatetraene isometrization process pulished here. In figure 3 of the paper, it shows the potential energy surface as a variable of the polar angle using the CAS(8,8) ...
ironmanaudi's user avatar
7 votes
1 answer
219 views

Hartree-Fock Method: Projection of density matrix onto a larger basis set

I am implementing a Hartree-Fock SCF program with an educational purpose. Although the code works fine using a Core Hamiltonian guess for the SCF iterative process, I want to implement a more accurate ...
dav267's user avatar
  • 73
10 votes
0 answers
698 views

How to visualize natural atomic orbitals from PySCF [closed]

I'm trying to visualize the different methods of getting localized orbital (LO) given in the User Guide. I went through the example, saved the orbitals as cube files, then opened the files in ...
Steve Cox's user avatar
  • 193
9 votes
2 answers
1k views

How to get atomic orbital coefficients in PySCF

I'm new to quantum chemistry software, so I'll try my best to explain my thought process. When running a DFT calculation, the software uses a linear combination of basis functions to approximate the ...
Steve Cox's user avatar
  • 193
6 votes
1 answer
707 views

How to compute the overlap matrix in Python

I want to calculate the overlap integral (S), I made the code, but it is only worked when I use a basis function that describe 1s and when I include 2s orbital, I start to get error. The First Problem ...
Abd-Elazeem Mohamed's user avatar
9 votes
0 answers
133 views

Interacting with pyscf integral library from Fortran [closed]

I would like to use libcint, the integral library in pyscf from Fortran. Its webpage has a Fortran API and developer manual, but ...
Lancashire3000's user avatar
8 votes
1 answer
125 views

How to read data from an input and form two-electrons integral?

I am doing a code that can calculate the hartree-fock energy. I want to form the two-electrons integral by reading the data from the input like this one below. The first four number are the indices ...
Abd-Elazeem Mohamed's user avatar
7 votes
0 answers
143 views

How can I calculate the exchange energy for a molecule in PySCF? [closed]

I am trying to generate exchange energy separately in pyscf but didn't see a way to do that. For correlation energy, it's fairly simple but do you have any idea how to calculate exchange energy?
Anoj Aryal's user avatar
10 votes
1 answer
1k views

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

I am interested in converting the one-particle reduced matrix (rdm1) from the molecular orbital (M.O.) basis to the atomic orbital (A.O.) basis. Is the following method correct (in an identical ...
Wychh's user avatar
  • 1,973
7 votes
1 answer
204 views

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

I'm currently working on a quantum chemistry project, I am dealing with a second-quantized electronic Hamiltonian (corresponding to some molecule), written in terms of fermionic creation and ...
Jack Ceroni's user avatar
5 votes
1 answer
169 views

Calculating first and second derivatives of a molecular Hamiltonian?

I'm interested in computing first and second derivatives of molecular Hamiltonians with respect to nuclear coordinates. I've been using Psi4 and PySCF to perform Hartree-Fock calculations, and I was ...
Jack Ceroni's user avatar
11 votes
2 answers
2k views

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

I am right now using the PySCF for some quantum chemistry problems. I need to get the parameters, which are labeled $h_{ij}$ and $V_{ijkl}$. How can I get this done with PySCF?
ironmanaudi's user avatar
5 votes
1 answer
227 views

PySCF: 2-index and 3-index matrix

The 4-index 2-electron integral can be obtained for the He atom with the following code: ...
Wychh's user avatar
  • 1,973
7 votes
1 answer
474 views

PySCF: Implementing SHCI frozen argument

I am trying to run a SHCI calculation in PYSCF with DICE; however, I want to freeze the first two core orbitals and the highest 3 virtual orbitals in a calculation. In other parts of PySCF this can ...
Wychh's user avatar
  • 1,973
5 votes
1 answer
376 views

PySCF: atomic basis Fock matrix changes after mo_coeff update

I've noted a curious thing with PySCF when updating the molecular orbital coefficients of the mean-field object. If one prints out the Fock matrix in the atomic basis (...
Wychh's user avatar
  • 1,973
6 votes
1 answer
653 views

Why is my quantum chemistry software not printing as many 2e- integrals as I expect?

Background: In Hartree-Fock theory, the two-electron integral is given by: $[ij|kl]$ = $\int dx_{1}dx_{2}(\chi_{i}(x_{1})\chi_{j}(x_{1})\frac{1}{r_{12}}\chi_{k}^{*}(x_2)\chi_{l}(x_{2})$ I am ...
Wychh's user avatar
  • 1,973
9 votes
1 answer
296 views

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

I have been performing CISD calculations with PySCF and I have a query surrounding the occupation of the orbitals. Here, the occupancies are calculated from the eigenvalues of the 1-electron ...
Wychh's user avatar
  • 1,973
10 votes
4 answers
1k views

Codes for post-processing Gaussian cube files?

I have generated MOs of a molecular system and I need to recreate its electronic density via $\rho(r)=\sum_{A_i}|\psi_i(\mathbf{r})|^2$ where $A$ is a set of occupied MOs. I am trying to do this via ...
mykd's user avatar
  • 2,052
10 votes
1 answer
878 views

What unit of energy does PySCF use?

The documentation for PySCF can be found here: https://sunqm.github.io/pyscf/ However, it does not explicitly state in the documentation what unit of energy is used. Is there a way to find this out?
user avatar