k2gamma assertion error: complex MO coefficients
See original GitHub issueThere are several points in the k2gamma code (specifically in the mo_k2gamma
function) where there are assertions with no description of what causes the issue or how to resolve it. Mostly these are related to matrices that should be real, having significant imaginary components. When I come across one of these assertion errors, what should I do to reduce the errors so that my system/calculation can pass the assertion?
Here is an example that triggers an assertion error:
from pyscf.pbc import scf
from pyscf.pbc.gto import Cell
import numpy as np
# ----- Construct a 1-dimensional O2 chain unit cell ----- #
cell = Cell()
cell.atom = [
["O", (0,0,0)],
["O", (2,0,0)]
]
cell.dimension = 1
cell.basis = '6-31g'
cell.a = np.eye(3)*[4,10,10]
cell.verbose = 4
cell.unit = 'A'
cell.build()
kpts = cell.make_kpts([3,1,1])
# -------- KHF calculation ------- #
mf = scf.KRHF(cell, kpts).density_fit()
e_hf = mf.kernel()
from pyscf.pbc.tools.k2gamma import mo_k2gamma
mo_k2gamma(cell, mf.mo_energy, mf.mo_coeff, mf.kpts, kmesh=None)
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Source code for pyscf.pbc.tools.k2gamma
Convert the k-sampled MO/integrals to corresponding Gamma-point supercell ... DEBUG3: logger.debug3(cell, 'dim=%d common_denominator %d error %g', i, ...
Read more >arXiv:2208.07343v2 [math.NT] 21 Aug 2022
This family is studied for its own interest and for applications to elliptic curves and coefficients of half integer weight modular forms. To...
Read more >Hecke polynomials of modular groups and congruence
we are interested only in the absolute values of the zeros of the Hecke poly- nomials (cf. \S 1, Remark 2). But, of...
Read more >pyscf Changelog - pyup.io
Fix an error when calculating grad of dft method with "HF" as xc ... Performance of semi-incore AO-MO integral transformation * Bugfix -...
Read more >Bayesian Non-linear Statistical Inverse Problems.
1.2.2 A random design regression model with normal errors . . . . 13 ... vector fields defined on X,Z, respectively. Denote by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi all, Another way to say Zhihao’s point: at the noninteracting level, this system is a metal (it’s equally-spaced O atoms). An RHF calculation of the supercell that Max suggested probably doesn’t converge. The converged k-point solution, which breaks lattice symmetry as Zhihao said, is a CDW insulator.
On Tue, Jan 11, 2022 at 5:58 PM Max @.***> wrote:
Hi Max,
There exists a set of orbitals in the supercell describing the same occupied space, but cannot be realized.
I think we can always get a set of real orbitals from a supercell calculation, but that solution would be different from the one from the above k-point calculation.