Giter Club home page Giter Club logo

pyscf's Introduction

Python-based Simulations of Chemistry Framework

Build Status codecov

2024-06-01

Installation

  • Install stable release:

      pip install pyscf
    
  • New features developed in recent years are available in the pyscf-forge package:

      pip install pyscf-forge
    
  • Certain modules are maintained as extensions of PySCF, such as dispersion, dmrgscf, fciqmc, icmpspt, properties, semiempirical, shciscf ... (more on https://github.com/pyscf) can be installed using pip:

      pip install pyscf[all]
    

    An individual extension can be installed:

      pip install pyscf[dispersion]
    
  • More details of custom installation can be found in installation manual

Citing PySCF

Base PySCF

The following paper should be cited in publications utilizing the PySCF program package:

Recent developments in the PySCF program package, Qiming Sun, Xing Zhang, Samragni Banerjee, Peng Bao, Marc Barbry, Nick S. Blunt, Nikolay A. Bogdanov, George H. Booth, Jia Chen, Zhi-Hao Cui, Janus J. Eriksen, Yang Gao, Sheng Guo, Jan Hermann, Matthew R. Hermes, Kevin Koh, Peter Koval, Susi Lehtola, Zhendong Li, Junzi Liu, Narbe Mardirossian, James D. McClain, Mario Motta, Bastien Mussard, Hung Q. Pham, Artem Pulkin, Wirawan Purwanto, Paul J. Robinson, Enrico Ronca, Elvira R. Sayfutyarova, Maximilian Scheurer, Henry F. Schurkus, James E. T. Smith, Chong Sun, Shi-Ning Sun, Shiv Upadhyay, Lucas K. Wagner, Xiao Wang, Alec White, James Daniel Whitfield, Mark J. Williamson, Sebastian Wouters, Jun Yang, Jason M. Yu, Tianyu Zhu, Timothy C. Berkelbach, Sandeep Sharma, Alexander Yu. Sokolov, and Garnet Kin-Lic Chan, J. Chem. Phys., 153, 024109 (2020). doi:10.1063/5.0006074

Density functional calculations

As PySCF does not implement density functionals, instead employing external libraries to handle their evaluation, these libraries should also be cited in publications employing PySCF for density functional calculations.

If your calculation employed Libxc, cite

Recent developments in libxc — A comprehensive library of functionals for density functional theory, Susi Lehtola, Conrad Steigemann, Micael J.T. Oliveira, and Miguel A.L. Marques, SoftwareX 7, 1 (2018). doi:10.1016/j.softx.2017.11.002

If your calculation employed XCFun, cite

Arbitrary-order density functional response theory from automatic differentiation, Ulf Ekström, Lucas Visscher, Radovan Bast, Andreas J. Thorvaldsen, and Kenneth Ruud, J. Chem. Theory Comput. 6, 1971 (2010). doi:10.1021/ct100117s

Bug reports and feature requests

Please submit tickets on the issues page.

pyscf's People

Contributors

bogdanoff avatar fishjojo avatar ghb24 avatar gkc1000 avatar hebrewsnabla avatar jamesetsmith avatar januseriksen avatar jasonmyu avatar jdmcclain47 avatar kovalp avatar kylebystrom avatar lkwagner avatar matthew-hennefarth avatar maxnus avatar maxscheurer avatar mjw99 avatar obackhouse avatar ppinski-hqs avatar pulkin avatar samragni-93 avatar sebwouters avatar shengg avatar ssh2 avatar sunqm avatar susilehtola avatar tberkel avatar verena-neufeld avatar xwang862 avatar yangcal avatar zhendongli2008 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyscf's Issues

KCCSD fails with frozen core

Exception: ValueError: could not broadcast input array from shape (90,66) into shape (66,66)
Something should be adjusted in the following part of the code:

        if mo_coeff is None:
            # TODO make this work for frozen maybe... seems like it should work
            self.mo_coeff = numpy.zeros((nkpts,nmo,nmo),dtype=numpy.complex128)
            for k in range(nkpts):
                self.mo_coeff[k] = cc.mo_coeff[k][:,moidx[k]]
            mo_coeff = self.mo_coeff
            self.fock = numpy.zeros((nkpts,nmo,nmo))
            for k in range(nkpts):
                self.fock[k] = numpy.diag(cc.mo_energy[k][moidx[k]])

I believe that following will formally fix the issue:

                # self.mo_coeff[k] = cc.mo_coeff[k][:,moidx[k]]
                self.mo_coeff[k] = cc.mo_coeff[k][moidx[k],moidx[k]]

Numerical orbitals with pyscf

I am having difficulties with using numerical orbitals with pyscf. I guess the actual problem is with having a node of the radial function at zero. Following is the basis set I tried:
{'B': [[0, [1.2920777646002564, 0.4007600499432814], [0.21013549673963738, -0.8278733419943876]], [1, [10.0, 0.7138459438580154], [0.22753255448886953, -0.7606134086048335]]], 'N': [[0, [3.3158593887033017, 0.7322562299222847], [0.45416089000619037, -1.4522661009821747]], [1, [10.0, 1.7699270395553452], [0.8089497974448853, -1.881765082412774]]]}
The band structures I obtained with this basis set using the test file are almost non-dispersive. It seems like I am missing something very important here. Any suggestions?

Manually set molecular symmetry in SCF

Hi Qiming,

Can we manually set the symmetry of a molecule in the SCF/HF module? Say, if the molecule has D2h symmetry but I want it to be C2v instead--for breaking symmetry in UHF.

Wirawan

RCCSD error for atoms

Hi, it looks like we have an RCCSD error for atoms. For instance, take a look at this one:

#! /usr/bin/env python
import sys,os
from pyscf import scf,gto,cc
mol = gto.Mole()
mol.atom = ''' B 0.0 0.0 0.0 '''
mol.basis = {'B': 'ccpv5z'}
mol.symmetry = 'D2h'
mol.spin = 1
mol.charge = 0
mol.build()
hf = scf.ROHF(mol)
hf.irrep_nelec = {
'Ag' : (2,2),
'B3u': (1,0),
'B2u': (0,0),
'B1g': (0,0),
'B1u': (0,0),
'B2g': (0,0),
'B3g': (0,0),
'Au' : (0,0)
}
hf.kernel()
mycc = cc.RCCSD(hf)
mycc.kernel()

Output:

converged SCF energy = -24.529109406518
Traceback (most recent call last):
  File "sae.py", line 26, in <module>
    mycc.kernel()
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 191, in kernel
    return self.ccsd(t1, t2, eris, mbpt2)
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 210, in ccsd
    verbose=self.verbose)
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 30, in kernel
    t1, t2 = cc.init_amps(eris)[1:]
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 179, in init_amps
    eijab = lib.direct_sum('ia,jb->ijab',eia,eia)
  File "/home/gani/codes/pyscf/pyscf/lib/numpy_helper.py", line 620, in direct_sum
    assert(len(symb) == op.ndim)
AssertionError

Thank you.

Process for update

We pull the newest version but seems it still output 16 digits. Do we need to recompile and make the build folder even if it is some change with a python file?

what is gfortran for?

make demands access to gfortran compiler which is not on the list of dependencies. Is there a way around this on mac OS X (el cap)?

PBC / Integrals

Hi,

First I would like to congratulate you first this well documented project! He his really easy to use.
Secondly, I'm a fresh new in the solide-world so please excuse me is I ask some silly questions.

Here is my problem:

Thank you a lot!

Thomas

PS : I need to rotate those integrals in the MO basis set and I didn't find a function to do it. So I wrote a small one. I hope it is correct and that it can be useful to you too:

def ao_mo_mono(mo_coeff,l_k_int)
    """Rotate the mono-electronic integrals from the ao-basis to the mo-basis

    Keyword arguments:
     - mo_coeff [dimension: (mo_num,ao_num)] -- the rotation matrix coefficient
     - l_k_int     [dimension: (k_pts, ao_num, ao_num)] -- For each k_pts the value of the integral concerned of the AO basis set.

    Return:
     - [dimension: (k_pts, mo_num, mo_num)] -- For each k_pts the value of the integral concerned
of the MO basis set.

    """
   return [ reduce(numpy.dot, (mo_coeff.T, l_int, mo_coeff)) for l_int in l_k_int ]

Scalar relativistic correction

Hello,

I have a small question about the scalar relativistic correction. It is not clear which scalar relativistic correction method is included in the code. Will DHK scalar relativistic be implemented in future?

Thanks.

UCCSD value error

Hi, I am looking at B(++) 1s2 3d1 state. I want to use UCCSD but I get a ValueError. Here is my piece of code and the output:

#! /usr/bin/env python
import sys,os
from pyscf import scf,gto,cc
mol = gto.Mole()
mol.atom = ''' B 0.0 0.0 0.0 '''
mol.basis = {'B': 'ccpv5z'}
mol.symmetry = 'D2h'
mol.spin = 1
mol.charge = 2
mol.build()
hf = scf.UHF(mol)
hf.irrep_nelec = {
'Ag' : (1,1),
'B3u': (0,0),
'B2u': (0,0),
'B1g': (1,0),
'B1u': (0,0),
'B2g': (0,0),
'B3g': (0,0),
'Au' : (0,0)
}
hf.kernel()
mycc = cc.UCCSD(hf)
mycc.kernel()

Output:

converged SCF energy = -22.4790012900203
Traceback (most recent call last):
  File "Bae.py", line 26, in <module>
    mycc.kernel()
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 496, in kernel
    return self.ccsd(t1, t2, eris, mbpt2)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 515, in ccsd
    verbose=self.verbose)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 58, in kernel
    t1, t2 = cc.vector_to_amplitudes(vec)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 1671, in vector_to_amplitudes
    t1b, t2bb = self.vector_to_amplitudes_ee(vector[sizea:sizea+sizeb], noccb, nvirb)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 1636, in vector_to_amplitudes_ee
    return self.vector_to_amplitudes_s4(vector, nocc, nvir)
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 1421, in vector_to_amplitudes_s4
    t2tril = vector[nov:size].reshape(nocc*(nocc-1)//2, -1)
ValueError: cannot reshape array of size 0 into shape (0,newaxis)

User-defined mo_coeff not stored in CASSCF or CASCI object?

Hi Qiming,

In the CASSCF or CASCI objects, the main calculational method in the class (e.g. casci() or mc1step()) has an optional argument mo_coeff. If a user specifies something there when calling the object, in the current version, the user-specified value is not stored in the object. Is this an intentional design? I want to clarify this first with you, because from the README, you have certain guidelines on the OO interface. Is it not better to store that value if the user specifies something not None--which means he/she overrides the object's default initial mo_coeff?

Wirawan

UCCSD/CCSD frozen core issues on atoms

Hi, frozen core seems to be not working. I have the following:

#! /usr/bin/env python
import sys,os
from pyscf import scf,gto,cc
mol = gto.Mole()
mol.atom = ''' B 0.0 0.0 0.0 '''
mol.basis = {'B': 'ccpvtz'}
mol.symmetry = 'D2h'
mol.spin = 1
mol.charge = 0
mol.build()
hf = scf.UHF(mol)
hf.irrep_nelec = {
'Ag' : (2,2),
'B3u': (1,0),
'B2u': (0,0),
'B1g': (0,0),
'B1u': (0,0),
'B2g': (0,0),
'B3g': (0,0),
'Au' : (0,0)
}
hf.kernel()
mycc = cc.UCCSD(hf)
mycc.set(frozen = [0,1])
mycc.kernel()

Output for UCCSD:

converged SCF energy = -24.5320678037186
Traceback (most recent call last):
  File "sae.py", line 27, in <module>
    mycc.kernel()
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 496, in kernel
    return self.ccsd(t1, t2, eris, mbpt2)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 504, in ccsd
    if eris is None: eris = self.ao2mo(self.mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 528, in ao2mo
    return _ERIS(self, mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 2034, in __init__
    moidx = get_umoidx(cc)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 2279, in get_umoidx
    if len(frozen[0]) > 0:
TypeError: object of type 'int' has no len()

Output for CCSD:

converged SCF energy = -24.5320678037186
Traceback (most recent call last):
  File "sae.py", line 27, in <module>
    mycc.kernel()
  File "/home/gani/codes/pyscf/pyscf/cc/ccsd.py", line 561, in kernel
    return self.ccsd(t1, t2, eris)
  File "/home/gani/codes/pyscf/pyscf/cc/ccsd.py", line 568, in ccsd
    eris = self.ao2mo(self.mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/ccsd.py", line 641, in ao2mo
    return _ERIS(self, mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/ccsd.py", line 809, in __init__
    self.mo_coeff = mo_coeff = _mo_without_core(cc, mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/ccsd.py", line 983, in _mo_without_core
    return mo[:,moidx]
TypeError: tuple indices must be integers, not tuple

Thank you.

FindBLAS.cmake fails to find openblas

CMake Error at /usr/local/share/cmake/Modules/FindBLAS.cmake:684 (message):
  A required library with BLAS API not found.  Please specify library
  location.

I have openblas-0.2.19 installed that provides /usr/local/lib/libopenblas.so
Intel MKL isn't available for my platform (FreeBSD).

Package directory organization

Hi, great work, just found it via the arxiv preprint.

Would you be willing to consider restructuring the package along more conventional lines? That is, putting the top-level Python packages /<package> (such as /scf) into /pyscf/<package>. That way, the import path would be independent of how one names the containing directory and the note "DO NOT put pyscf in the path." would not be needed. The top level would then contain directories pyscf, lib, doc, and examples. The python files from /lib would be moved to /pyscf/lib and /lib would then contain only the C extensions.

Correlated methods fail for ROHF references

It appears that there is an issue with running some correlated methods, specifically CISD and CCSD using an ROHF reference. It does not flag "Not Implemented", but rather fails on any test I run with an error such as

Traceback (most recent call last):
  File "00-simple_cisd.py", line 18, in <module>
    mycc = ci.CISD(mf).run()
  File "/home/jmcclean/local/pyscf/lib/misc.py", line 299, in run
    self.kernel(*args)
  File "/home/jmcclean/local/pyscf/ci/cisd.py", line 454, in kernel
    return self.cisd(ci0, mo_coeff, eris)
  File "/home/jmcclean/local/pyscf/ci/cisd.py", line 460, in cisd
    tol=self.conv_tol, verbose=self.verbose)
  File "/home/jmcclean/local/pyscf/ci/cisd.py", line 32, in kernel
    diag = make_diagonal(mol, mo_energy, eris, nocc)
  File "/home/jmcclean/local/pyscf/ci/cisd.py", line 71, in make_diagonal
    eris_vvvv = ao2mo.restore(1, eris.vvvv, nvir)
  File "/home/jmcclean/local/pyscf/ao2mo/addons.py", line 124, in restore
    raise ValueError('eri.size = %d, norb = %d' % (eri.size, norb))

EDIT: Seems to work for FCI, but still not CISD or CCSD.

libcint.so.2.8 is built but not installed

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from pyscf import gto, scf
  File "/usr/local/lib/python2.7/site-packages/pyscf/__init__.py", line 118, in <module>
    from pyscf import gto
  File "/usr/local/lib/python2.7/site-packages/pyscf/gto/__init__.py", line 7, in <module>
    from pyscf.gto import mole
  File "/usr/local/lib/python2.7/site-packages/pyscf/gto/mole.py", line 22, in <module>
    from pyscf.gto import moleintor
  File "/usr/local/lib/python2.7/site-packages/pyscf/gto/moleintor.py", line 10, in <module>
    libcgto = pyscf.lib.load_library('libcgto')
  File "/usr/local/lib/python2.7/site-packages/pyscf/lib/misc.py", line 41, in load_library
    return numpy.ctypeslib.load_library(libname, _loaderpath)
  File "/usr/local/lib/python2.7/site-packages/numpy/ctypeslib.py", line 150, in load_library
    return ctypes.cdll[libpath]
  File "/usr/local/lib/python2.7/ctypes/__init__.py", line 437, in __getitem__
    return getattr(self, name)
  File "/usr/local/lib/python2.7/ctypes/__init__.py", line 432, in __getattr__
    dll = self._dlltype(name)
  File "/usr/local/lib/python2.7/ctypes/__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: Shared object "libcint.so.2.8" not found, required by "libcgto.so"

Operators (|z|) and (|zz|)

Hi Qiming,

In http://sunqm.net/pyscf/gto.html#module-pyscf.gto.moleintor you describe that you have the operators:
“cint1e_z_sph” spheric ( | z | )
“cint1e_zz_sph” spheric ( | z z | )

In principle, as atoms move away from the origin along the z-axis, the values (i|z|i) should change in magnitude proportional to the shift along the z-axis?

In AO for the H-chain

BOHR = 0.52917721092
separation = 2.0
num_atoms = 12
z_co = BOHR*separation*np.arange(0.0,num_atoms-0.5,1.0)
z_co = z_co - np.average(z_co)
print "z_co =",z_co
mol = gto.Mole()
mol.atom = []
for zco in z_co:
    mol.atom.append(('H', (0, 0, zco)))
mol.basis = 'sto-3g'
mol.symmetry = 1
mol.charge = 0
mol.spin = 0 #2*S; multiplicity-1
mol.build()

you / pyscf / cint get for (|z|):

[[  6.26596548e-16  -4.62777691e-01  -1.96265900e-01  -3.75938850e-02
   -3.85043869e-03  -2.15980014e-04  -6.23600664e-06  -9.00599343e-08
   -6.49351112e-10  -2.34589262e-12  -4.26003046e-15  -3.89781041e-18]
 [  4.62777691e-01   0.00000000e+00  -4.62777691e-01  -1.96265900e-01
   -3.75938850e-02  -3.85043869e-03  -2.15980014e-04  -6.23600664e-06
   -9.00599343e-08  -6.49351112e-10  -2.34589262e-12  -4.26003046e-15]
 [  1.96265900e-01   4.62777691e-01  -9.00445191e-17  -4.62777691e-01
   -1.96265900e-01  -3.75938850e-02  -3.85043869e-03  -2.15980014e-04
   -6.23600664e-06  -9.00599343e-08  -6.49351112e-10  -2.34589262e-12]
 [  3.75938850e-02   1.96265900e-01   4.62777691e-01   3.35579166e-17
   -4.62777691e-01  -1.96265900e-01  -3.75938850e-02  -3.85043869e-03
   -2.15980014e-04  -6.23600664e-06  -9.00599343e-08  -6.49351112e-10]
 [  3.85043869e-03   3.75938850e-02   1.96265900e-01   4.62777691e-01
   -2.73560224e-17  -4.62777691e-01  -1.96265900e-01  -3.75938850e-02
   -3.85043869e-03  -2.15980014e-04  -6.23600664e-06  -9.00599343e-08]
 [  2.15980014e-04   3.85043869e-03   3.75938850e-02   1.96265900e-01
    4.62777691e-01   0.00000000e+00  -4.62777691e-01  -1.96265900e-01
   -3.75938850e-02  -3.85043869e-03  -2.15980014e-04  -6.23600664e-06]
 [  6.23600664e-06   2.15980014e-04   3.85043869e-03   3.75938850e-02
    1.96265900e-01   4.62777691e-01   0.00000000e+00  -4.62777691e-01
   -1.96265900e-01  -3.75938850e-02  -3.85043869e-03  -2.15980014e-04]
 [  9.00599343e-08   6.23600664e-06   2.15980014e-04   3.85043869e-03
    3.75938850e-02   1.96265900e-01   4.62777691e-01   2.73560224e-17
   -4.62777691e-01  -1.96265900e-01  -3.75938850e-02  -3.85043869e-03]
 [  6.49351112e-10   9.00599343e-08   6.23600664e-06   2.15980014e-04
    3.85043869e-03   3.75938850e-02   1.96265900e-01   4.62777691e-01
   -3.35579166e-17  -4.62777691e-01  -1.96265900e-01  -3.75938850e-02]
 [  2.34589262e-12   6.49351112e-10   9.00599343e-08   6.23600664e-06
    2.15980014e-04   3.85043869e-03   3.75938850e-02   1.96265900e-01
    4.62777691e-01  -4.44226650e-16  -4.62777691e-01  -1.96265900e-01]
 [  4.26003046e-15   2.34589262e-12   6.49351112e-10   9.00599343e-08
    6.23600664e-06   2.15980014e-04   3.85043869e-03   3.75938850e-02
    1.96265900e-01   4.62777691e-01   0.00000000e+00  -4.62777691e-01]
 [  3.89781041e-18   4.26003046e-15   2.34589262e-12   6.49351112e-10
    9.00599343e-08   6.23600664e-06   2.15980014e-04   3.85043869e-03
    3.75938850e-02   1.96265900e-01   4.62777691e-01  -6.26596548e-16]]

and for (|zz|)

[[  6.49524230e-01   9.30064857e-01   5.61017715e-01   1.38267394e-01
    1.71577527e-02   1.14834023e-03   3.89739177e-05   6.49494289e-07
    5.31499604e-09   2.14989495e-11   4.32310263e-14   4.34005444e-17]
 [  9.30064857e-01   6.49524230e-01   9.30064857e-01   5.61017715e-01
    1.38267394e-01   1.71577527e-02   1.14834023e-03   3.89739177e-05
    6.49494289e-07   5.31499604e-09   2.14989495e-11   4.32310263e-14]
 [  5.61017715e-01   9.30064857e-01   6.49524230e-01   9.30064857e-01
    5.61017715e-01   1.38267394e-01   1.71577527e-02   1.14834023e-03
    3.89739177e-05   6.49494289e-07   5.31499604e-09   2.14989495e-11]
 [  1.38267394e-01   5.61017715e-01   9.30064857e-01   6.49524230e-01
    9.30064857e-01   5.61017715e-01   1.38267394e-01   1.71577527e-02
    1.14834023e-03   3.89739177e-05   6.49494289e-07   5.31499604e-09]
 [  1.71577527e-02   1.38267394e-01   5.61017715e-01   9.30064857e-01
    6.49524230e-01   9.30064857e-01   5.61017715e-01   1.38267394e-01
    1.71577527e-02   1.14834023e-03   3.89739177e-05   6.49494289e-07]
 [  1.14834023e-03   1.71577527e-02   1.38267394e-01   5.61017715e-01
    9.30064857e-01   6.49524230e-01   9.30064857e-01   5.61017715e-01
    1.38267394e-01   1.71577527e-02   1.14834023e-03   3.89739177e-05]
 [  3.89739177e-05   1.14834023e-03   1.71577527e-02   1.38267394e-01
    5.61017715e-01   9.30064857e-01   6.49524230e-01   9.30064857e-01
    5.61017715e-01   1.38267394e-01   1.71577527e-02   1.14834023e-03]
 [  6.49494289e-07   3.89739177e-05   1.14834023e-03   1.71577527e-02
    1.38267394e-01   5.61017715e-01   9.30064857e-01   6.49524230e-01
    9.30064857e-01   5.61017715e-01   1.38267394e-01   1.71577527e-02]
 [  5.31499604e-09   6.49494289e-07   3.89739177e-05   1.14834023e-03
    1.71577527e-02   1.38267394e-01   5.61017715e-01   9.30064857e-01
    6.49524230e-01   9.30064857e-01   5.61017715e-01   1.38267394e-01]
 [  2.14989495e-11   5.31499604e-09   6.49494289e-07   3.89739177e-05
    1.14834023e-03   1.71577527e-02   1.38267394e-01   5.61017715e-01
    9.30064857e-01   6.49524230e-01   9.30064857e-01   5.61017715e-01]
 [  4.32310263e-14   2.14989495e-11   5.31499604e-09   6.49494289e-07
    3.89739177e-05   1.14834023e-03   1.71577527e-02   1.38267394e-01
    5.61017715e-01   9.30064857e-01   6.49524230e-01   9.30064857e-01]
 [  4.34005444e-17   4.32310263e-14   2.14989495e-11   5.31499604e-09
    6.49494289e-07   3.89739177e-05   1.14834023e-03   1.71577527e-02
    1.38267394e-01   5.61017715e-01   9.30064857e-01   6.49524230e-01]]

while I get for (|z|) and (|zz|):

( 0 | z | 0 ) = -10.999999899787800572426
( 0 | z | 1 ) = -4.6277769121416882924791
( 0 | z | 2 ) = -0.88319654823480719940676
( 0 | z | 3 ) = -0.10025036004989190674408
( 0 | z | 4 ) = -0.00673826769913168314302121
( 0 | z | 5 ) = -0.000259176017145982943469529
( 0 | z | 6 ) = -5.19667220338388105880601e-06
( 0 | z | 7 ) = -5.14628196118686697135586e-08
( 0 | z | 8 ) = -2.43506666895108163200548e-10
( 0 | z | 9 ) = -5.21309471544019031202246e-13
( 0 | z | 10 ) = -4.2600304552972045679068e-16
( 0 | z | 11 ) = 2.24207754291970731347797e-44
( 1 | z | 0 ) = -4.6277769121416882924791
( 1 | z | 1 ) = -8.99999991800819998388761
( 1 | z | 2 ) = -3.70222152971335027871191
( 1 | z | 3 ) = -0.6869306486270722045262
( 1 | z | 4 ) = -0.0751877700374189439358474
( 1 | z | 5 ) = -0.00481304835652263032080844
( 1 | z | 6 ) = -0.000172784011430655322751407
( 1 | z | 7 ) = -3.11800332203032846587702e-06
( 1 | z | 8 ) = -2.57314098059343348567793e-08
( 1 | z | 9 ) = -8.1168888965036071633112e-11
( 1 | z | 10 ) = -2.40741243048404481631997e-35
( 1 | z | 11 ) = 4.2600304552972045679068e-16
( 2 | z | 0 ) = -0.88319654823480719940676
( 2 | z | 1 ) = -3.70222152971335027871191
( 2 | z | 2 ) = -6.99999993622859939534919
( 2 | z | 3 ) = -2.77666614728501315312315
( 2 | z | 4 ) = -0.490664749019337265156793
( 2 | z | 5 ) = -0.0501251800249459603109337
( 2 | z | 6 ) = -0.00288782901391357836595741
( 2 | z | 7 ) = -8.63920057153276613757034e-05
( 2 | z | 8 ) = -1.03933444067677608470626e-06
( 2 | z | 9 ) = -1.61558713389263217748322e-27
( 2 | z | 10 ) = 8.1168888965036071633112e-11
( 2 | z | 11 ) = 5.21309471544019031202246e-13
( 3 | z | 0 ) = -0.10025036004989190674408
( 3 | z | 1 ) = -0.6869306486270722045262
( 3 | z | 2 ) = -2.77666614728501315312315
( 3 | z | 3 ) = -4.99999995444900058316762
( 3 | z | 4 ) = -1.85111076485667558344517
( 3 | z | 5 ) = -0.294398849411602325787385
( 3 | z | 6 ) = -0.0250625900124729766860199
( 3 | z | 7 ) = -0.000962609671304526085845732
( 3 | z | 8 ) = 5.29395592033937711917702e-22
( 3 | z | 9 ) = 1.03933444067677608470626e-06
( 3 | z | 10 ) = 2.57314098059343348567793e-08
( 3 | z | 11 ) = 2.43506666895108163200548e-10
( 4 | z | 0 ) = -0.00673826769913168314302121
( 4 | z | 1 ) = -0.0751877700374189439358474
( 4 | z | 2 ) = -0.490664749019337265156793
( 4 | z | 3 ) = -1.85111076485667558344517
( 4 | z | 4 ) = -2.9999999726693999946292
( 4 | z | 5 ) = -0.925555382428338013767188
( 4 | z | 6 ) = -0.0981329498038674558069161
( 4 | z | 7 ) = 0
( 4 | z | 8 ) = 0.000962609671304526085845732
( 4 | z | 9 ) = 8.63920057153276613757034e-05
( 4 | z | 10 ) = 3.11800332203032846587702e-06
( 4 | z | 11 ) = 5.14628196118686697135586e-08
( 5 | z | 0 ) = -0.000259176017145982943469529
( 5 | z | 1 ) = -0.00481304835652263032080844
( 5 | z | 2 ) = -0.0501251800249459603109337
( 5 | z | 3 ) = -0.294398849411602325787385
( 5 | z | 4 ) = -0.925555382428338013767188
( 5 | z | 5 ) = -0.999999990889800072224602
( 5 | z | 6 ) = 1.66533453693773481063545e-16
( 5 | z | 7 ) = 0.0981329498038674141735527
( 5 | z | 8 ) = 0.0250625900124729766860199
( 5 | z | 9 ) = 0.00288782901391357836595741
( 5 | z | 10 ) = 0.000172784011430655322751407
( 5 | z | 11 ) = 5.19667220338388105880601e-06
( 6 | z | 0 ) = -5.19667220338388105880601e-06
( 6 | z | 1 ) = -0.000172784011430655322751407
( 6 | z | 2 ) = -0.00288782901391357836595741
( 6 | z | 3 ) = -0.0250625900124729766860199
( 6 | z | 4 ) = -0.0981329498038674558069161
( 6 | z | 5 ) = 1.66533453693773481063545e-16
( 6 | z | 6 ) = 0.999999990889800183246905
( 6 | z | 7 ) = 0.925555382428338013767188
( 6 | z | 8 ) = 0.294398849411602325787385
( 6 | z | 9 ) = 0.0501251800249459603109337
( 6 | z | 10 ) = 0.00481304835652263032080844
( 6 | z | 11 ) = 0.000259176017145982943469529
( 7 | z | 0 ) = -5.14628196118686697135586e-08
( 7 | z | 1 ) = -3.11800332203032846587702e-06
( 7 | z | 2 ) = -8.63920057153276613757034e-05
( 7 | z | 3 ) = -0.000962609671304526085845732
( 7 | z | 4 ) = 0
( 7 | z | 5 ) = 0.0981329498038674141735527
( 7 | z | 6 ) = 0.925555382428338013767188
( 7 | z | 7 ) = 2.9999999726693999946292
( 7 | z | 8 ) = 1.85111076485667558344517
( 7 | z | 9 ) = 0.490664749019337209645641
( 7 | z | 10 ) = 0.0751877700374189439358474
( 7 | z | 11 ) = 0.00673826769913168314302121
( 8 | z | 0 ) = -2.43506666895108163200548e-10
( 8 | z | 1 ) = -2.57314098059343348567793e-08
( 8 | z | 2 ) = -1.03933444067677608470626e-06
( 8 | z | 3 ) = 5.29395592033937711917702e-22
( 8 | z | 4 ) = 0.000962609671304526085845732
( 8 | z | 5 ) = 0.0250625900124729766860199
( 8 | z | 6 ) = 0.294398849411602325787385
( 8 | z | 7 ) = 1.85111076485667558344517
( 8 | z | 8 ) = 4.99999995444900058316762
( 8 | z | 9 ) = 2.77666614728501315312315
( 8 | z | 10 ) = 0.686930648627072093503898
( 8 | z | 11 ) = 0.10025036004989190674408
( 9 | z | 0 ) = -5.21309471544019031202246e-13
( 9 | z | 1 ) = -8.1168888965036071633112e-11
( 9 | z | 2 ) = -1.61558713389263217748322e-27
( 9 | z | 3 ) = 1.03933444067677608470626e-06
( 9 | z | 4 ) = 8.63920057153276613757034e-05
( 9 | z | 5 ) = 0.00288782901391357836595741
( 9 | z | 6 ) = 0.0501251800249459603109337
( 9 | z | 7 ) = 0.490664749019337209645641
( 9 | z | 8 ) = 2.77666614728501315312315
( 9 | z | 9 ) = 6.99999993622859939534919
( 9 | z | 10 ) = 3.70222152971335116689033
( 9 | z | 11 ) = 0.883196548234806977362155
( 10 | z | 0 ) = -4.2600304552972045679068e-16
( 10 | z | 1 ) = -2.40741243048404481631997e-35
( 10 | z | 2 ) = 8.1168888965036071633112e-11
( 10 | z | 3 ) = 2.57314098059343348567793e-08
( 10 | z | 4 ) = 3.11800332203032846587702e-06
( 10 | z | 5 ) = 0.000172784011430655322751407
( 10 | z | 6 ) = 0.00481304835652263032080844
( 10 | z | 7 ) = 0.0751877700374189439358474
( 10 | z | 8 ) = 0.686930648627072093503898
( 10 | z | 9 ) = 3.70222152971335116689033
( 10 | z | 10 ) = 8.99999991800819998388761
( 10 | z | 11 ) = 4.62777691214168918065752
( 11 | z | 0 ) = 2.24207754291970731347797e-44
( 11 | z | 1 ) = 4.2600304552972045679068e-16
( 11 | z | 2 ) = 5.21309471544019031202246e-13
( 11 | z | 3 ) = 2.43506666895108163200548e-10
( 11 | z | 4 ) = 5.14628196118686697135586e-08
( 11 | z | 5 ) = 5.19667220338388105880601e-06
( 11 | z | 6 ) = 0.000259176017145982943469529
( 11 | z | 7 ) = 0.00673826769913168314302121
( 11 | z | 8 ) = 0.10025036004989190674408
( 11 | z | 9 ) = 0.883196548234806977362155
( 11 | z | 10 ) = 4.62777691214168918065752
( 11 | z | 11 ) = 10.9999998997877987960692
( 0 | zz | 0 ) = 121.649523127889011675506
( 0 | zz | 1 ) = 46.7450562876230861775184
( 0 | zz | 2 ) = 8.11725485031002591540528
( 0 | zz | 3 ) = 0.827488619744636944020044
( 0 | zz | 4 ) = 0.0489238718814696965653255
( 0 | zz | 5 ) = 0.0016234962634028499758182
( 0 | zz | 6 ) = 2.75412388858752698185105e-05
( 0 | zz | 7 ) = 2.24926027105023354282833e-07
( 0 | zz | 8 ) = 8.50707142661713386724502e-10
( 0 | zz | 9 ) = 1.42853489023546726912321e-12
( 0 | zz | 10 ) = 1.0567248174665075907848e-15
( 0 | zz | 11 ) = 5.24629952257418176836086e-19
( 1 | zz | 0 ) = 46.7450562876230861775184
( 1 | zz | 1 ) = 81.6495234922970212210203
( 1 | zz | 2 ) = 30.0850594039130143642069
( 1 | zz | 3 ) = 4.97700045658626777367317
( 1 | zz | 4 ) = 0.47661235957001524266019
( 1 | zz | 5 ) = 0.0258212397701610626987723
( 1 | zz | 6 ) = 0.000759576206249573497586436
( 1 | zz | 7 ) = 1.09118878350468524632104e-05
( 1 | zz | 8 ) = 7.05375682694173319072669e-08
( 1 | zz | 9 ) = 2.01356030941424942906576e-10
( 1 | zz | 10 ) = 3.8591594714742920671872e-13
( 1 | zz | 11 ) = 1.0567248174665075907848e-15
( 2 | zz | 0 ) = 8.11725485031002591540528
( 2 | zz | 1 ) = 30.0850594039130143642069
( 2 | zz | 2 ) = 49.649523783823418909833
( 2 | zz | 3 ) = 17.1272840499162910532505
( 2 | zz | 4 ) = 2.62180966129344916737409
( 2 | zz | 5 ) = 0.225986459445285475799992
( 2 | zz | 6 ) = 0.010419485029288647059964
( 2 | zz | 7 ) = 0.00024122417195760755643727
( 2 | zz | 8 ) = 2.59721230963264463259326e-06
( 2 | zz | 9 ) = 1.90747486575486655024307e-08
( 2 | zz | 10 ) = 2.01356030941424942906576e-10
( 2 | zz | 11 ) = 1.42853489023546726912321e-12
( 3 | zz | 0 ) = 0.827488619744636944020044
( 3 | zz | 1 ) = 4.97700045658626777367317
( 3 | zz | 2 ) = 17.1272840499162910532505
( 3 | zz | 3 ) = 25.6495240024682154000857
( 3 | zz | 4 ) = 7.87173022563291091557858
( 3 | zz | 5 ) = 1.05168246443156965241883
( 3 | zz | 6 ) = 0.0756109193704475879282967
( 3 | zz | 7 ) = 0.0027186076588524366384747
( 3 | zz | 8 ) = 6.84401605269522336858629e-05
( 3 | zz | 9 ) = 2.59721230963264463259326e-06
( 3 | zz | 10 ) = 7.05375682694173319072669e-08
( 3 | zz | 11 ) = 8.50707142661713386724502e-10
( 4 | zz | 0 ) = 0.0489238718814696965653255
( 4 | zz | 1 ) = 0.47661235957001524266019
( 4 | zz | 2 ) = 2.62180966129344916737409
( 4 | zz | 3 ) = 7.87173022563291091557858
( 4 | zz | 4 ) = 9.64952414823141424449204
( 4 | zz | 5 ) = 2.31839793106288638568913
( 4 | zz | 6 ) = 0.266618866000630116985803
( 4 | zz | 7 ) = 0.02548573934550163108681
( 4 | zz | 8 ) = 0.0027186076588524366384747
( 4 | zz | 9 ) = 0.000241224171957607529332215
( 4 | zz | 10 ) = 1.09118878350468524632104e-05
( 4 | zz | 11 ) = 2.24926027105023354282833e-07
( 5 | zz | 0 ) = 0.0016234962634028499758182
( 5 | zz | 1 ) = 0.0258212397701610626987723
( 5 | zz | 2 ) = 0.225986459445285475799992
( 5 | zz | 3 ) = 1.05168246443156965241883
( 5 | zz | 4 ) = 2.31839793106288638568913
( 5 | zz | 5 ) = 1.64952422111301411078443
( 5 | zz | 6 ) = 0.467287166206210524688203
( 5 | zz | 7 ) = 0.266618866000630116985803
( 5 | zz | 8 ) = 0.0756109193704475879282967
( 5 | zz | 9 ) = 0.010419485029288647059964
( 5 | zz | 10 ) = 0.000759576206249573497586436
( 5 | zz | 11 ) = 2.75412388858752698185105e-05
( 6 | zz | 0 ) = 2.75412388858752698185105e-05
( 6 | zz | 1 ) = 0.000759576206249573497586436
( 6 | zz | 2 ) = 0.010419485029288647059964
( 6 | zz | 3 ) = 0.0756109193704475879282967
( 6 | zz | 4 ) = 0.266618866000630116985803
( 6 | zz | 5 ) = 0.467287166206210524688203
( 6 | zz | 6 ) = 1.64952422111301411078443
( 6 | zz | 7 ) = 2.31839793106288638568913
( 6 | zz | 8 ) = 1.05168246443156965241883
( 6 | zz | 9 ) = 0.225986459445285475799992
( 6 | zz | 10 ) = 0.0258212397701610626987723
( 6 | zz | 11 ) = 0.0016234962634028499758182
( 7 | zz | 0 ) = 2.24926027105023354282833e-07
( 7 | zz | 1 ) = 1.09118878350468524632104e-05
( 7 | zz | 2 ) = 0.00024122417195760755643727
( 7 | zz | 3 ) = 0.0027186076588524366384747
( 7 | zz | 4 ) = 0.02548573934550163108681
( 7 | zz | 5 ) = 0.266618866000630116985803
( 7 | zz | 6 ) = 2.31839793106288638568913
( 7 | zz | 7 ) = 9.64952414823141424449204
( 7 | zz | 8 ) = 7.87173022563291358011384
( 7 | zz | 9 ) = 2.62180966129344827919567
( 7 | zz | 10 ) = 0.47661235957001524266019
( 7 | zz | 11 ) = 0.0489238718814696965653255
( 8 | zz | 0 ) = 8.50707142661713386724502e-10
( 8 | zz | 1 ) = 7.05375682694173319072669e-08
( 8 | zz | 2 ) = 2.59721230963264463259326e-06
( 8 | zz | 3 ) = 6.84401605269522336858629e-05
( 8 | zz | 4 ) = 0.0027186076588524366384747
( 8 | zz | 5 ) = 0.0756109193704475879282967
( 8 | zz | 6 ) = 1.05168246443156965241883
( 8 | zz | 7 ) = 7.87173022563291358011384
( 8 | zz | 8 ) = 25.6495240024682154000857
( 8 | zz | 9 ) = 17.1272840499162910532505
( 8 | zz | 10 ) = 4.97700045658626688549475
( 8 | zz | 11 ) = 0.827488619744636832997742
( 9 | zz | 0 ) = 1.42853489023546726912321e-12
( 9 | zz | 1 ) = 2.01356030941424942906576e-10
( 9 | zz | 2 ) = 1.90747486575486655024307e-08
( 9 | zz | 3 ) = 2.59721230963264463259326e-06
( 9 | zz | 4 ) = 0.000241224171957607529332215
( 9 | zz | 5 ) = 0.010419485029288647059964
( 9 | zz | 6 ) = 0.225986459445285475799992
( 9 | zz | 7 ) = 2.62180966129344827919567
( 9 | zz | 8 ) = 17.1272840499162910532505
( 9 | zz | 9 ) = 49.649523783823418909833
( 9 | zz | 10 ) = 30.0850594039130143642069
( 9 | zz | 11 ) = 8.11725485031002591540528
( 10 | zz | 0 ) = 1.0567248174665075907848e-15
( 10 | zz | 1 ) = 3.8591594714742920671872e-13
( 10 | zz | 2 ) = 2.01356030941424942906576e-10
( 10 | zz | 3 ) = 7.05375682694173319072669e-08
( 10 | zz | 4 ) = 1.09118878350468524632104e-05
( 10 | zz | 5 ) = 0.000759576206249573497586436
( 10 | zz | 6 ) = 0.0258212397701610626987723
( 10 | zz | 7 ) = 0.47661235957001524266019
( 10 | zz | 8 ) = 4.97700045658626688549475
( 10 | zz | 9 ) = 30.0850594039130143642069
( 10 | zz | 10 ) = 81.6495234922970212210203
( 10 | zz | 11 ) = 46.7450562876231003883731
( 11 | zz | 0 ) = 5.24629952257418176836086e-19
( 11 | zz | 1 ) = 1.0567248174665075907848e-15
( 11 | zz | 2 ) = 1.42853489023546726912321e-12
( 11 | zz | 3 ) = 8.50707142661713386724502e-10
( 11 | zz | 4 ) = 2.24926027105023354282833e-07
( 11 | zz | 5 ) = 2.75412388858752698185105e-05
( 11 | zz | 6 ) = 0.0016234962634028499758182
( 11 | zz | 7 ) = 0.0489238718814696965653255
( 11 | zz | 8 ) = 0.827488619744636832997742
( 11 | zz | 9 ) = 8.11725485031002591540528
( 11 | zz | 10 ) = 46.7450562876231003883731
( 11 | zz | 11 ) = 121.649523127888983253797

Best,
Sebastian

pbc.dft.test.test_ks_noimport.py does not converge

The standalone test I proposed suffers from convergence issues (dev branch).

init E= -10.733248177868
HOMO = -1.18516728756  LUMO = -0.944279011822
cycle= 1 E= 32.8042868359773  delta_E= 43.5  |g|= 15.6  |ddm|= 41.2
HOMO = 7.70665889932  LUMO = 10.3768737466
cycle= 2 E= -4.69630753356  delta_E= -37.5  |g|= 5.47  |ddm|= 48.6
HOMO = -0.456270745914  LUMO = -0.1322822107
cycle= 3 E= 27.5474545612495  delta_E= 32.2  |g|= 32.8  |ddm|= 46.6
HOMO = -0.764295757509  LUMO = -0.429388018793
cycle= 4 E= 30.5860020151835  delta_E= 3.04  |g|= 25.4  |ddm|= 3.84
HOMO = -0.487388317343  LUMO = -0.154586004315
cycle= 5 E= 28.2774392675314  delta_E= -2.31  |g|= 30.9  |ddm|= 3.17
HOMO = 0.238808596413  LUMO = 0.238808596413

WARN: HOMO 0.238808596413 == LUMO 0.238808596413

cycle= 6 E= -6.53051694704711  delta_E= -34.8  |g|= 29.2  |ddm|= 29.1
HOMO = 0.20597970858  LUMO = 0.20597970858

WARN: HOMO 0.20597970858 == LUMO 0.20597970858

cycle= 7 E= -3.94739720390383  delta_E= 2.58  |g|= 35.6  |ddm|= 5.29
HOMO = 0.236194999194  LUMO = 0.236194999194

WARN: HOMO 0.236194999194 == LUMO 0.236194999194

and so on. As far as I remember it was OK previously.

Use libxc's parsing routines instead of hardcoded lists

Hi,

I just had a look at https://github.com/sunqm/pyscf/blob/master/dft/libxc.py and noticed that you're using hardcoded functional lists.

However, libxc has had the functionality to parse functional keywords and id numbers for a long time:
int XC(functional_get_number)(const char *name);
char *XC(functional_get_name)(int number);

which implement the necessary functionality. I would recommend removing XC_CODES, XC_KEYS, LDA_IDS, GGA_IDS, etc from dft/libxc.py, and replacing them with the two above functionals.

The functions is_lda, is_gga and so on can be reimplemented by checking the functional family with
int XC(family_from_id)(int id, int *family, int *number);
or by checking the func.info->family entry of
xc_func_type func;
that has been initialized to the used functional. The character of the functional (x, c, or xc) can be similarly checked from func.info->kind.

It doesn't really make sense to replicate this information, since that entails more maintenance. The stuff is already maintained within libxc, where it is always up to date.

Also, I don't see how you handle range separated hybrids. Are they not supported in pyscf?

Density Matrix can't be calculated

Code:
from pyscf import gto, scf, cc

mole = gto.Mole()
mole.atom = 'O 0 0 0'
mole.basis = 'ccpvdz'
mole.spin = 2
mole.verbose = 3
mole.build()
mf=scf.UHF(mole)
mf.kernel()
mycc=cc.UCCSD(mf)
dm1 = mycc.make_rdm1()
dm2 = mycc.make_rdm2()
mycc.kernel()

Error:
converged SCF energy = -74.792166058284
Traceback (most recent call last):
File "o.py", line 12, in
dm1 = mycc.make_rdm1()
File "/home/gwang18/software/pyscf/pyscf/cc/ccsd.py", line 604, in make_rdm1
if l1 is None: l1, l2 = self.solve_lambda(t1, t2)
File "/home/gwang18/software/pyscf/pyscf/cc/ccsd.py", line 594, in solve_lambda
verbose=self.verbose)
File "/home/gwang18/software/pyscf/pyscf/cc/ccsd_lambda.py", line 33, in kernel
nocc, nvir = t1.shape
AttributeError: 'NoneType' object has no attribute 'shape'

examples fail

Hi all,

I recently downloaded PySCF package. I wanted to start with some of the provided examples, but it seems that most of them fail?!
For example UHF does not work at all, I always get the error:
AttributeError: 'UHF' object has no attribute 'level_shift'
Other examples fail because there is no newton-module.

Did I miss anything? Simple RHF calculations work, I guess the installation worked. I downloaded the (I guess latest version) from github, as suggested in the tutorial.

Cheers,
Markus

[suggestion] Use git submodules instead of ExternalProject_Add

ExternalProject_Add initiates download at the later time. This is disallowed on some platforms, like BSD, because such downloads are inherently insecure (they don't check hash of the files allowing for MITM). You can link other github projects as submodules instead. This will make their download much simpler and safer because it will be a part of one operation.

Symmetry SCF calculation with completely fixed irrep_nelec fails

Qiming,

I found that SCF calculation with symmetry (hf_symm.RHF, for example) may fail if all the electrons are fixed using irrep_nelec facility. (Does this even make sense, at all?) Below is a testcase:

"""C atom, cc-pVDZ basis, with symmetry
At equilibrium (r(C-C)=1.25 angstroms).
"""

from pyscf import gto
from pyscf import scf

mol = gto.Mole()
mol.build(
    verbose = 5,
    #output = 'rhf_c2_symm.outx',
#   Coordinates are in Angstrom
    atom = [
      ['C' , (0. , 0. , 0.625)],
      ['C' , (0. , 0. ,-0.625)],
    ],
    basis = {'C': 'cc-pVDZ',},
    spin = 0,
# mute argument parsing and input file dumping (WP)
    parse_arg = True, dump_input = True,
    symmetry = True,
)
# For more details, see pyscf/gto/mole.py

print "RHF calculation"
rhf = scf.hf_symm.RHF(mol)
rhf.conv_threshold = 1e-8
rhf.irrep_nelec = {'Ag': 4, 'B1u': 4, 'B2u': 2, 'B3u': 2,}
#rhf.chkfile = "rhf_c2_symm.chk"
#print('E=%.15g' % rhf.scf(dump_chk=False))
print('E=%.15g' % scf.hf.kernel(rhf, dump_chk=False))

It fails with "UnboundLocalError: local variable 'elumo_float' referenced before assignment" message. Here's the traceback:

Traceback (most recent call last):
  File "C2_RHF_nelec_bug.py", line 31, in <module>
    print('E=%.15g' % scf.hf.kernel(rhf, dump_chk=False))
  File "/home/wirawan/Work/python-lib/pyscf/scf/hf.py", line 93, in kernel
    mo_occ = mf.get_occ(mo_energy, mo_coeff)
  File "/home/wirawan/Work/python-lib/pyscf/scf/hf_symm.py", line 219, in get_occ
    nocc = int((mo_energy[p0:p0+nso]<elumo_float).sum())

I think this should be easy to fix, but I don't know what elumo_float to use if we don't have free electrons.

Wirawan

Incorrect method calls in spin-orbit AO integral example

[eric@copper]$ python 20-soc_ao_integrals.py
Traceback (most recent call last):
  File "20-soc_ao_integrals.py", line 22, in <module>
    mol.set_rinv_orig(mol.coord_of_atm(atm_id))
AttributeError: 'Mole' object has no attribute 'coord_of_atm'

With a patch to fix it.

diff --git a/examples/gto/20-soc_ao_integrals.py b/examples/gto/20-soc_ao_integrals.py
index 6c7c5490..9a9c749a 100644
--- a/examples/gto/20-soc_ao_integrals.py
+++ b/examples/gto/20-soc_ao_integrals.py
@@ -19,8 +19,8 @@ mol = gto.M(
 # J Chem Phys, 122, 034107, Eq (2)
 mat = 0
 for atm_id in range(mol.natm):
-    mol.set_rinv_orig(mol.coord_of_atm(atm_id))
-    chg = mol.charge_of_atm(atm_id)
+    mol.set_rinv_orig(mol.atom_coord(atm_id))
+    chg = mol.atom_charge(atm_id)
     mat += chg * mol.intor('cint1e_prinvxp_sph', 3)
 
 # J Chem Phys, 122, 034107, Eq (3)

Doesn't work with Python 3.4

/home/eric/development/pyscf/examples/ao2mo on master! (env: 3.4 3.4.5)
[eric@copper]$ OMP_NUM_THREADS=1 python 00-mo_integrals.py
converged SCF energy = -99.9873974403482
Traceback (most recent call last):
  File "00-mo_integrals.py", line 23, in <module>
    eri_4fold = ao2mo.kernel(mol, orb)
  File "/home/eric/development/pyscf/ao2mo/__init__.py", line 301, in kernel
    return full(eri_or_mol, mo_coeffs, *args, **kwargs)
  File "/home/eric/development/pyscf/ao2mo/__init__.py", line 139, in full
    return fn(eri_or_mol, mo_coeff, *args, **kwargs)
  File "/home/eric/development/pyscf/ao2mo/outcore.py", line 589, in full_iofree
    verbose=verbose, compact=compact)
  File "/home/eric/development/pyscf/ao2mo/outcore.py", line 263, in general
    log, compact)
  File "/home/eric/development/pyscf/ao2mo/outcore.py", line 477, in half_e1
    write_handler = async_write(istep, iobuf, write_handler)
  File "/home/eric/development/pyscf/ao2mo/outcore.py", line 450, in async_write
    thread_io = lib.background_thread(save, istep, iobuf)
  File "/home/eric/development/pyscf/lib/misc.py", line 415, in background_thread
    thread = ThreadWithReturnValue(target=func, args=args, kwargs=kwargs)
  File "/home/eric/development/pyscf/lib/misc.py", line 407, in __init__
    Thread.__init__(self, group, qwrap, name, args, kwargs, verbose)
TypeError: __init__() takes from 1 to 6 positional arguments but 7 were given

python 3 compatibility

Small bug: line 50 of CMakeLists.txt is not python 3 compatible: print numpy.get_include() needs parentheses.

bug in ao2mo outcore module

In pyscf v0.9, a serious bug was found in the ao2mo.outcore integral transformation module for this system

from pyscf import gto, scf, ao2mo, mcscf
mol = gto.Mole()
mol.build(atom='H 0 0 0; H 0 0 1; H 0 0 8; H 0 0 9; H 0 0 12 H 0 0 13', basis='sto3g', verbose=0)
mf = scf.RHF(mol)
mf.scf()
mc = mcscf.CASCI(mol, mf, 6, 4)
mc.casci()
eri = ao2mo.outcore.full_iofree(mol, mc.mo_coeff[:,1:7])
print(numpy.allclose(eri, eri.T))

It's very possible that the last print statement output False, which means eri is wrong. This bug is caused by the integral screening. So typically, system with long-range separated atoms may be affected by this bug.

It's highly recommended to upgrade the package to verion 0.10 or later.

Qiming

Build directory path is saved into the shared libraries

Paths are hardcoded in the shared libraries, which they shouldn't be:

# strings /usr/local/lib/python2.7/site-packages/pyscf/lib/libcgto.so | grep work
/usr/local/lib/gcc5:/usr/ports/science/py-pyscf/work/pyscf-1.3.2/lib/deps/lib:/usr/ports/science/py-pyscf/work/pyscf-1.3.2/lib/deps/lib64:/usr/local/lib:/usr/local/lib64:/usr/ports/science/py-pyscf/work/pyscf-1.3.2/lib
  • the temporary build directory /usr/ports/science/py-pyscf/work appears in the permanently installed libraries.

Reduce execution time of some unit tests

I am currently experimenting with Travis CI and I have a working script that checks out the HEAD to a virtual instance on Travis, compiles and then runs the unit tests with nosetests.

This is working, however, there is a 50 minute runtime limit for the virtual machine and it currently times out before completing all the tests. Would it be possible to reduce the time of some of the unit tests? For instance, could mcscf/test/test_bz_df.py use a minimal basis set instead of 6-31g or a smaller molecule?

Unused code in `nr_rks` / `nr_rks` (pyscf.pbc.dft.numint)

I found this:

    xctype = ni._xc_type(xc_code)
    ...
    assert(all(x not in xc_code.upper() for x in ('CC06', 'CS', 'BR89', 'MK00')))

However all _xc_type functions in pyscf return 'LDA', 'GGA' or 'MGGA'. For example,

    def _xc_type(self, xc_code):
        libxc = self.libxc
        if libxc.is_lda(xc_code):
            xctype = 'LDA'
        elif libxc.is_meta_gga(xc_code):
            xctype = 'MGGA'
        else:
            xctype = 'GGA'
        return xctype

Thus, I assumed that this line of code is left for future implementations. But why should it raise AssertionError? Maybe it is better to have NotImplemented or ValueError? What is the purpose of this code?

Molden printing

Hi,

With the following code:

mol = gto.Mole()
mol.atom = '''
   O  0.000000000  0.00000000  0.000000000;
   H  0.790689766  0.00000000  0.612217330;
   H -0.790689766  0.00000000  0.612217330
           '''
mol.basis = '6-31g'
mol.symmetry = 1
mol.charge = 0
mol.spin = 0 #2*S; multiplicity-1
mol.build()

mf = scf.RHF(mol)
mf.verbose = 0
mf.scf()

with open('H2Omo.txt', 'w') as f1:
    molden.header(mol, f1)
    molden.orbital_coeff(mf.mol, f1, mf.mo_coeff, ene=mf.mo_energy, occ=mf.mo_occ)

c_loc_orth = lo.orth_ao(mol, 'meta_lowdin')

with open('H2Oloc.txt', 'w') as f2:
    molden.header(mol, f2)
    molden.orbital_coeff(mf.mol, f2, c_loc_orth)

I get the error:

Traceback (most recent call last):
  File "test.py", line 28, in <module>
    molden.header(mol, f1)
  File "/home/seba/pyscf/tools/molden.py", line 26, in header
    for b in mol.basis[mol.atom_symbol(ia)]:
TypeError: string indices must be integers, not str

Frozen core for NEVPT2

Hi,

Correct me if I am wrong, there is no frozen core option for NEVPT2. I can only find the frozen core option for the CCSD and MCSCF modules.

Best
Thomas

Increasing precision on scf calculations

I'm trying to increase the precision of scf (and later fullCI) calculations. On going through the manual I see that pyscf.tools.dump_mat.dump_rec accepts as a kwarg digits of precision.
Is there a simple way to increase digits of precision in class definition for the molecule?

cosmo bug in UHF case

In UHF case, the following code will not work:
j3c = df.incore.aux_e2(mol, fakemol, intor='cint3c2e_sph', aosym='s2ij')
tril_dm = lib.pack_tril(dm) * 2
because dm is not a matrix now.

Running test_ccsd_t.py with nosetests hangs

Seeing this with 1.3.1. When running nosetests in pyscf-1.3.1/cc/test, this hangs on the test_ccsd_t.py test, but if I run the test explicitly, it works:

pyscf-1.3.1/cc/test$ export PYTHONPATH=../..

$ nosetests -v
test_ccsd (test_2e.KnowValues) ... ok
test_ccsd (test_bz.KnowValues) ... ok
test_ccsd (test_ccsd_lambda.KnowValues) ... ok
....HANG...

$ python test_ccsd_t.py 
converged SCF energy = -76.02676567312
E(CCSD) = -76.24010890731908  E_corr = -0.2133432341990576
Full Tests for CCSD(T)
CCSD(T) correction = -8.49533879364604
.CCSD(T) correction = -0.00306002261051893
CCSD(T) correction = -0.00306002261051893

----------------------------------------------------------------------
Ran 4 tests in 0.297s

OK

A question about 2-center 2-electrons integral in density fitting module.

I am reading the density fitting code, I am confusing with the comment and manual.
2-center 2-electron AO integrals (L|ij).
I think these integrals should be notated as (K|L) K and L belonging to auxiliary basis.

def fill_2c2e(mol, auxmol, intor='cint2c2e_sph', comp=1, hermi=1, out=None):
    '''2-center 2-electron AO integrals (L|ij), where L is the auxiliary basis.
    '''
    return auxmol.intor(intor, comp=comp, hermi=hermi, out=out)

RCCSD/UCCSD with ECP

Hi again,
I have a B(++) 3d1 state with ECP. This state seems to be not working with both RCCSD and UCCSD. Here are inputs and outputs:

#! /usr/bin/env python
import sys,os
from pyscf import scf,gto,cc
mol = gto.Mole()
mol.atom = ''' B 0.0 0.0 0.0 '''
mol.basis = {'B': 'ccpv5z'}
mol.symmetry = 'D2h'
mol.spin = 1
mol.charge = 2
mol.ecp={'B':'bfd'}
mol.build()
hf = scf.UHF(mol)
hf.irrep_nelec = {
'Ag' : (0,0),
'B3u': (0,0),
'B2u': (0,0),
'B1g': (1,0),
'B1u': (0,0),
'B2g': (0,0),
'B3g': (0,0),
'Au' : (0,0)
}
hf.kernel()
mycc = cc.UCCSD(hf)
mycc.kernel()

Output:

Traceback (most recent call last):
  File "Bpp.py", line 28, in <module>
    mycc.kernel()
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 496, in kernel
    return self.ccsd(t1, t2, eris, mbpt2)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 504, in ccsd
    if eris is None: eris = self.ao2mo(self.mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 528, in ao2mo
    return _ERIS(self, mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/uccsd.py", line 2039, in __init__
    self.mo_coeff = mo_coeff = [mo_coeff[0][:,moidx[0]],
IndexError: too many indices for array

RCCSD gives:

Traceback (most recent call last):
  File "Bpp.py", line 28, in <module>
    mycc.kernel()
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 191, in kernel
    return self.ccsd(t1, t2, eris, mbpt2)
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 199, in ccsd
    if eris is None: eris = self.ao2mo(self.mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 223, in ao2mo
    return _ERIS(self, mo_coeff)
  File "/home/gani/codes/pyscf/pyscf/cc/rccsd.py", line 1494, in __init__
    self.ovvv = lib.pack_tril(ovvv).reshape(nocc,nvir,-1)
ValueError: cannot reshape array of size 0 into shape (0,91,newaxis)

Thank you

CCSD doesn't work for atom

Here is the code:

from pyscf import gto, scf, cc

mol = gto.M(
atom = 'O 0 0 0',
spin = 2,
basis = 'ccpvdz')
mf = scf.RHF(mol).run()
mycc = cc.CCSD(mf).run()

here is the error information:
converged SCF energy = -74.7875130746235
Traceback (most recent call last):
File "den_mat.py", line 8, in
mycc = cc.CCSD(mf).run()
File "/home/gwang18/software/pyscf/pyscf/lib/misc.py", line 299, in run
self.kernel(*args)
File "/home/gwang18/software/pyscf/pyscf/cc/ccsd.py", line 561, in kernel
return self.ccsd(t1, t2, eris)
File "/home/gwang18/software/pyscf/pyscf/cc/ccsd.py", line 572, in ccsd
verbose=self.verbose)
File "/home/gwang18/software/pyscf/pyscf/cc/ccsd.py", line 32, in kernel
t1, t2 = mycc.init_amps(eris)[1:]
File "/home/gwang18/software/pyscf/pyscf/cc/ccsd.py", line 544, in init_amps
t1 = eris.fock[:nocc,nocc:] / eia
ValueError: operands could not be broadcast together with shapes (4,0,14) (4,10,2)

eom-cc2

Dear Qiming,

is it possible to perform EOM-CC2 with density fitting using pyscf ?

Best
LUCA

tddft.org is down

PySCF cannot be compiled because it depends on a download from tddft.org, which is currently down.

It would be good to mirror your dependencies to avoid this in the future.

-- Up-to-date: /Users/jrhammon/Work/CHEMISTRY/PySCF/pyscf/lib/deps/include/xcfun.h
-- Up-to-date: /Users/jrhammon/Work/CHEMISTRY/PySCF/pyscf/lib/deps/include/xcfun_autogen.h
-- Installing: /Users/jrhammon/Work/CHEMISTRY/PySCF/pyscf/lib/deps/lib/libxcfun.dylib
[  5%] Completed 'libxcfun'
[  8%] Built target libxcfun
[ 10%] Performing download step (download, verify and extract) for 'libxc'
-- File already exists but no hash specified (use URL_HASH):
  file='/Users/jrhammon/Work/CHEMISTRY/PySCF/pyscf/lib/build/deps/src/libxc-2.2.2.tar.gz'
Old file will be removed and new file downloaded from URL.
-- Downloading...
   dst='/Users/jrhammon/Work/CHEMISTRY/PySCF/pyscf/lib/build/deps/src/libxc-2.2.2.tar.gz'
   timeout='none'
-- Using src='http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz'
-- Retrying...
-- Using src='http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz'
-- Retry after 5 seconds (attempt #2) ...
-- Using src='http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz'
-- Retry after 15 seconds (attempt #4) ...
-- Using src='http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz'
-- Retry after 60 seconds (attempt #5) ...
-- Using src='http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz'
CMake Error at libxc-stamp/download-libxc.cmake:157 (message):

This is not a local issue. I independently confirmed with http://www.downforeveryoneorjustme.com/www.tddft.org and earlier today we had to work around it for the MADNESS project (m-a-d-n-e-s-s/madness#222).

Testcase fails: no such file - libnp_helper

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from pyscf import gto, scf
  File "/usr/local/lib/python2.7/site-packages/pyscf/__init__.py", line 118, in <module>
    from pyscf import gto
  File "/usr/local/lib/python2.7/site-packages/pyscf/gto/__init__.py", line 7, in <module>
    from pyscf.gto import mole
  File "/usr/local/lib/python2.7/site-packages/pyscf/gto/mole.py", line 17, in <module>
    from pyscf import lib
  File "/usr/local/lib/python2.7/site-packages/pyscf/lib/__init__.py", line 11, in <module>
    from pyscf.lib import numpy_helper
  File "/usr/local/lib/python2.7/site-packages/pyscf/lib/numpy_helper.py", line 17, in <module>
    _np_helper = misc.load_library('libnp_helper')
  File "/usr/local/lib/python2.7/site-packages/pyscf/lib/misc.py", line 41, in load_library
    return numpy.ctypeslib.load_library(libname, _loaderpath)
  File "/usr/local/lib/python2.7/site-packages/numpy/ctypeslib.py", line 155, in load_library
    raise OSError("no file with expected extension")
OSError: no file with expected extension

On FreeBSD 11

oscillator strength

Dear Developers,

Is it possible to calculate the oscillator strength (dipole matrix elements)
for excited states from DMRG using pyscf ?

Bests
LUCA

Direct CCSD failed when frozen core is used

I am using pyscf release 1.3.

If frozen=0 then the program will finish without error. However, the program failed if frozen core is used as well as direct is used.

I posted the input here, hope I didn't make any mistakes in input.

Input:

from pyscf import gto, scf, cc
mol = gto.M(atom = 'H 0 0 0; F 0 0 1.1', basis = 'ccpvdz')
mol.verbose = 5
mf = scf.RHF(mol).run()
mycc = cc.CCSD(mf)
mycc.frozen = 1
mycc.direct = True
mycc.run()

Output:

******** <class 'pyscf.cc.ccsd.CCSD'> flags ********
CCSD nocc = 4, nvir = 14
frozen orbitals 1
max_cycle = 50
direct = 1
conv_tol = 1e-07
conv_tol_normt = 1e-05
diis_space = 6
diis_start_cycle = 0
diis_start_energy_diff = 1e+09
    CPU time for CCSD integral transformation      0.16 sec, wall time      0.01 sec
Init t2, MP2 energy = -0.209289266060397
    CPU time for init mp2      0.00 sec, wall time      0.00 sec
Traceback (most recent call last):
  File "ccsd.py", line 9, in <module>
    mycc.run()
  File "/pyscf/pyscf/lib/misc.py", line 299, in run
    self.kernel(*args)
  File "/pyscf/pyscf/cc/ccsd.py", line 560, in kernel
    return self.ccsd(t1, t2, eris)
  File "/pyscf/pyscf/cc/ccsd.py", line 571, in ccsd
    verbose=self.verbose)
  File "/pyscf/pyscf/cc/ccsd.py", line 51, in kernel
    t1new, t2new = mycc.update_amps(t1, t2, eris)
  File "/pyscf/pyscf/cc/ccsd.py", line 79, in update_amps
    mycc.add_wvvVV_(t1, t2, eris, t2new_tril)
  File "/pyscf/pyscf/cc/ccsd.py", line 732, in add_wvvVV_
    t2new_tril += tmp.reshape(-1,nvir,nvir)
ValueError: total size of new array must be unchanged

Bug in ao2mo

Hi Qiming,

For the following input:

  import sys
  #Folder in which PySCF is installed
  sys.path.append('/home/seba/software')
  sys.path.append('/user/scratch/gent/vsc403/vsc40327/hyperpol_pa')
  from pyscf import gto, scf, mp
  from pyscf.cc import ccsd
  from pyscf.scf import newton_ah
  import numpy as np

  mol = gto.Mole()
  mol.atom = '''
            C           11.743867574706     0.316606999501     0.000000000000
            C          -11.743867574706    -0.316606999501     0.000000000000
            C           10.553870254837    -0.315744126581     0.000000000000
            C          -10.553870254837     0.315744126581     0.000000000000
            C            9.269200277889     0.349923846801     0.000000000000
            C           -9.269200277889    -0.349923846801     0.000000000000
            C            8.071955965212    -0.297756260130     0.000000000000
            C           -8.071955965212     0.297756260130     0.000000000000
            C            6.792178681869     0.354487146839     0.000000000000
            C           -6.792178681869    -0.354487146839     0.000000000000
            C            5.593397319786    -0.299863807433     0.000000000000
            C           -5.593397319786     0.299863807433     0.000000000000
            C            4.315340204624     0.347494444444     0.000000000000
            C           -4.315340204624    -0.347494444444     0.000000000000
            C            3.115763295692    -0.309511131598     0.000000000000
            C           -3.115763295692     0.309511131598     0.000000000000
            C            1.838445598904     0.335749634738     0.000000000000
            C           -1.838445598904    -0.335749634738     0.000000000000
            C            0.638552879510    -0.322326989212     0.000000000000
            C           -0.638552879510     0.322326989212     0.000000000000
            H          -12.684335383249     0.237686912674     0.000000000000
            H           12.684335383249    -0.237686912674     0.000000000000
            H          -10.533678299424     1.412366951705     0.000000000000
            H           10.533678299424    -1.412366951705     0.000000000000
            H          -11.807233391909    -1.408837177430     0.000000000000
            H           11.807233391909     1.408837177430     0.000000000000
            H           -9.277335942514    -1.446822818097     0.000000000000
            H            9.277335942514     1.446822818097     0.000000000000
            H           -8.069863604582     1.394986592293     0.000000000000
            H            8.069863604582    -1.394986592293     0.000000000000
            H           -6.790999920587    -1.451394854053     0.000000000000
            H            6.790999920587     1.451394854053     0.000000000000
            H           -5.596458690774     1.396949685248     0.000000000000
            H            5.596458690774    -1.396949685248     0.000000000000
            H           -4.310967423759    -1.444455000566     0.000000000000
            H            4.310967423759     1.444455000566     0.000000000000
            H           -3.121012795141     1.406546376506     0.000000000000
            H            3.121012795141    -1.406546376506     0.000000000000
            H           -1.832688422308    -1.432735242361     0.000000000000
            H            1.832688422308     1.432735242361     0.000000000000
            H            0.644568851886    -1.419333633168     0.000000000000
            H           -0.644568851886     1.419333633168     0.000000000000
  '''
  mol.basis = 'cc-pvdz'
  mol.symmetry = True
  mol.symmetry_subgroup = 'Cs'
  mol.charge = 0
  mol.spin = 0
  mol.set_common_origin_( ( 0.0, 0.0, 0.0 ) )
  mol.build()

  mf = scf.RHF( mol )
  mf.verbose = 4
  mf.conv_tol = 1e-13
  mf.conv_tol_grad = 1e-9
  mf.max_cycle = 100
  E_RHF = mf.scf()
  if ( mf.converged == False ):
     x = newton_ah.kernel( newton_ah.newton( mf ), mf.mo_coeff, mf.mo_occ, conv_tol=1e-12, conv_tol_grad=1e-7, max_cycle=1000, verbose=4 )
     E_RHF = x[1]

  mp2 = mp.MP2( mf )
  mp2.verbose = 5
  mp2.conv_tol = 1e-11
  E_MP2, T_MP2 = mp2.kernel()

  ccsol = ccsd.CCSD( mf )
  ccsol.verbose = 5
  ccsol.conv_tol = 1e-11
  ccsol.max_cycle = 200
  E_CCSD, T1_CCSD, T2_CCSD = ccsol.ccsd()

I get the following output:

  ******** <class 'pyscf.scf.hf_symm.RHF'> flags ********
  method = RHF
  initial guess = minao
  damping factor = 0
  level shift factor = 0
  Do DIIS = True
  DIIS start cycle = 1
  DIIS space = 8
  SCF tol = 1e-13
  SCF gradient tol = 1e-09
  max. SCF cycles = 100
  direct_scf = True
  direct_scf_tol = 1e-13
  chkfile to save SCF result = /local/2223138.master15.delcatty.gent.vsc/tmp7_OuAU
  max_memory 4000 MB (current use 57 MB)
  RHF with symmetry adapted basis
  142 free electrons in irreps A' A"
  Warn: Singularity detected in overlap matrix (condition number = 1.03e+04). SCF may be inaccurate and hard to converge.
  init E= -776.519091402655
  HOMO (A") = -0.186696795093397  LUMO (A") = -0.111672982079217
  cycle= 1 E= -769.863485882878  delta_E= 6.66  |g|= 0.702  |ddm|= 6.28
  HOMO (A") = -0.20478502457029  LUMO (A") = 0.000870876936692684
  cycle= 2 E= -770.06442844679  delta_E= -0.201  |g|= 0.188  |ddm|= 1.12
  HOMO (A") = -0.224330965166522  LUMO (A") = 0.0111890205509458
  cycle= 3 E= -770.085697311525  delta_E= -0.0213  |g|= 0.047  |ddm|= 0.471
  HOMO (A") = -0.224110432489695  LUMO (A") = 0.0205534883011913
  cycle= 4 E= -770.087313375994  delta_E= -0.00162  |g|= 0.0201  |ddm|= 0.0833
  HOMO (A") = -0.227497323521749  LUMO (A") = 0.0243466568996324
  cycle= 5 E= -770.087824607809  delta_E= -0.000511  |g|= 0.00948  |ddm|= 0.0535
  HOMO (A") = -0.229936727302502  LUMO (A") = 0.0256134408543896
  cycle= 6 E= -770.087923540911  delta_E= -9.89e-05  |g|= 0.00297  |ddm|= 0.0261
  HOMO (A") = -0.230439751709951  LUMO (A") = 0.0263076554129962
  cycle= 7 E= -770.087931693811  delta_E= -8.15e-06  |g|= 0.000615  |ddm|= 0.00878
  HOMO (A") = -0.230436814853736  LUMO (A") = 0.0263763247524758
  cycle= 8 E= -770.087931878679  delta_E= -1.85e-07  |g|= 0.000223  |ddm|= 0.00108
  HOMO (A") = -0.230473083917087  LUMO (A") = 0.0263529102814316
  cycle= 9 E= -770.087931907717  delta_E= -2.9e-08  |g|= 6.93e-05  |ddm|= 0.000409
  HOMO (A") = -0.230484408150869  LUMO (A") = 0.0263478400632189
  cycle= 10 E= -770.087931911586  delta_E= -3.87e-09  |g|= 3.6e-05  |ddm|= 0.000142
  HOMO (A") = -0.230485982748459  LUMO (A") = 0.0263485536655247
  cycle= 11 E= -770.087931912543  delta_E= -9.57e-10  |g|= 1.36e-05  |ddm|= 7.77e-05
  HOMO (A") = -0.230487627829322  LUMO (A") = 0.0263470896651141
  cycle= 12 E= -770.087931912712  delta_E= -1.69e-10  |g|= 5.49e-06  |ddm|= 3.93e-05
  HOMO (A") = -0.230488309012235  LUMO (A") = 0.0263464691091661
  cycle= 13 E= -770.087931912746  delta_E= -3.37e-11  |g|= 3.1e-06  |ddm|= 1.63e-05
  HOMO (A") = -0.230488517931858  LUMO (A") = 0.0263461050833298
  cycle= 14 E= -770.087931912757  delta_E= -1.09e-11  |g|= 8.46e-07  |ddm|= 9.7e-06
  HOMO (A") = -0.230488606258757  LUMO (A") = 0.0263459269019765
  cycle= 15 E= -770.087931912756  delta_E= 4.55e-13  |g|= 3.3e-07  |ddm|= 2.58e-06
  HOMO (A") = -0.230488618076209  LUMO (A") = 0.0263458588093296
  cycle= 16 E= -770.087931912755  delta_E= 1.36e-12  |g|= 1.02e-07  |ddm|= 8.21e-07
  HOMO (A") = -0.230488600683093  LUMO (A") = 0.0263458454174715
  cycle= 17 E= -770.087931912757  delta_E= -2.05e-12  |g|= 4.45e-08  |ddm|= 2.65e-07
  HOMO (A") = -0.230488598296136  LUMO (A") = 0.0263458344876973
  cycle= 18 E= -770.08793191276  delta_E= -2.73e-12  |g|= 1.79e-08  |ddm|= 1.1e-07
  HOMO (A") = -0.230488596357118  LUMO (A") = 0.0263458330317896
  cycle= 19 E= -770.087931912762  delta_E= -2.5e-12  |g|= 1.05e-08  |ddm|= 2.55e-08
  HOMO (A") = -0.230488595337429  LUMO (A") = 0.0263458322733806
  cycle= 20 E= -770.087931912763  delta_E= -9.09e-13  |g|= 7.79e-09  |ddm|= 1.41e-08
  HOMO (A") = -0.23048859458771  LUMO (A") = 0.0263458321991323
  cycle= 21 E= -770.087931912767  delta_E= -3.64e-12  |g|= 5.75e-09  |ddm|= 6.68e-09
  HOMO (A") = -0.23048859420382  LUMO (A") = 0.0263458318888329
  cycle= 22 E= -770.087931912771  delta_E= -3.64e-12  |g|= 4.82e-09  |ddm|= 5.37e-09
  HOMO (A") = -0.230488594082645  LUMO (A") = 0.0263458315814267
  cycle= 23 E= -770.087931912769  delta_E= 1.59e-12  |g|= 4.5e-09  |ddm|= 6.84e-09
  HOMO (A") = -0.230488593905912  LUMO (A") = 0.0263458317494153
  cycle= 24 E= -770.087931912773  delta_E= -4.55e-12  |g|= 4.18e-09  |ddm|= 3.18e-09
  HOMO (A") = -0.230488594388333  LUMO (A") = 0.0263458327726021
  cycle= 25 E= -770.08793191277  delta_E= 3.64e-12  |g|= 5.12e-09  |ddm|= 1.18e-08
  HOMO (A") = -0.230488593663183  LUMO (A") = 0.0263458322023538
  cycle= 26 E= -770.087931912775  delta_E= -5e-12  |g|= 3.86e-09  |ddm|= 9.27e-09
  HOMO (A") = -0.230488593339094  LUMO (A") = 0.0263458320553619
  cycle= 27 E= -770.08793191278  delta_E= -5.23e-12  |g|= 2.91e-09  |ddm|= 3.58e-09
  HOMO (A") = -0.230488593154763  LUMO (A") = 0.0263458319686459
  cycle= 28 E= -770.087931912783  delta_E= -3.18e-12  |g|= 2.42e-09  |ddm|= 2.16e-09
  HOMO (A") = -0.230488593056488  LUMO (A") = 0.0263458318987423
  cycle= 29 E= -770.087931912787  delta_E= -3.64e-12  |g|= 2.1e-09  |ddm|= 1.41e-09
  HOMO (A") = -0.23048859298536  LUMO (A") = 0.0263458318461714
  cycle= 30 E= -770.087931912786  delta_E= 4.55e-13  |g|= 1.91e-09  |ddm|= 1.11e-09
  HOMO (A") = -0.230488592935781  LUMO (A") = 0.0263458318108764
  cycle= 31 E= -770.087931912773  delta_E= 1.34e-11  |g|= 1.77e-09  |ddm|= 9.2e-10
  HOMO (A") = -0.230488592874324  LUMO (A") = 0.026345831810173
  cycle= 32 E= -770.087931912762  delta_E= 1.09e-11  |g|= 1.62e-09  |ddm|= 1.09e-09
  HOMO (A") = -0.230488592818116  LUMO (A") = 0.0263458318007431
  cycle= 33 E= -770.087931912746  delta_E= 1.64e-11  |g|= 1.51e-09  |ddm|= 1.01e-09
  HOMO (A") = -0.230488592717756  LUMO (A") = 0.02634583172833
  cycle= 34 E= -770.087931912726  delta_E= 2e-11  |g|= 1.32e-09  |ddm|= 1.52e-09
  HOMO (A") = -0.230488592647334  LUMO (A") = 0.0263458317020037
  cycle= 35 E= -770.0879319127  delta_E= 2.61e-11  |g|= 1.2e-09  |ddm|= 1.22e-09
  HOMO (A") = -0.230488592594146  LUMO (A") = 0.026345831683919
  cycle= 36 E= -770.087931912663  delta_E= 3.66e-11  |g|= 1.15e-09  |ddm|= 1.16e-09
  HOMO (A") = -0.230488592550719  LUMO (A") = 0.0263458316696264
  cycle= 37 E= -770.087931912622  delta_E= 4.09e-11  |g|= 1.13e-09  |ddm|= 1.18e-09
  HOMO (A") = -0.230488592512865  LUMO (A") = 0.0263458316572581
  cycle= 38 E= -770.087931912576  delta_E= 4.57e-11  |g|= 1.13e-09  |ddm|= 1.24e-09
  HOMO (A") = -0.230488592478254  LUMO (A") = 0.026345831646608
  cycle= 39 E= -770.087931912527  delta_E= 4.96e-11  |g|= 1.14e-09  |ddm|= 1.29e-09
  HOMO (A") = -0.230488592445592  LUMO (A") = 0.0263458316366581
  cycle= 40 E= -770.087931912477  delta_E= 5.02e-11  |g|= 1.17e-09  |ddm|= 1.39e-09
  HOMO (A") = -0.230488592415477  LUMO (A") = 0.0263458316254685
  cycle= 41 E= -770.087931912421  delta_E= 5.57e-11  |g|= 1.19e-09  |ddm|= 1.5e-09
  HOMO (A") = -0.230488592387653  LUMO (A") = 0.0263458316136428
  cycle= 42 E= -770.08793191236  delta_E= 6.07e-11  |g|= 1.22e-09  |ddm|= 1.57e-09
  HOMO (A") = -0.23048859236498  LUMO (A") = 0.0263458316056957
  cycle= 43 E= -770.0879319123  delta_E= 6.05e-11  |g|= 1.26e-09  |ddm|= 1.67e-09
  HOMO (A") = -0.23048859234536  LUMO (A") = 0.0263458315991915
  cycle= 44 E= -770.087931912232  delta_E= 6.78e-11  |g|= 1.3e-09  |ddm|= 1.78e-09
  HOMO (A") = -0.230488592327868  LUMO (A") = 0.0263458315936544
  cycle= 45 E= -770.087931912168  delta_E= 6.43e-11  |g|= 1.34e-09  |ddm|= 1.9e-09
  HOMO (A") = -0.230488592312024  LUMO (A") = 0.0263458315888579
  cycle= 46 E= -770.087931912103  delta_E= 6.41e-11  |g|= 1.38e-09  |ddm|= 2.01e-09
  HOMO (A") = -0.230488592297664  LUMO (A") = 0.0263458315846203
  cycle= 47 E= -770.087931912038  delta_E= 6.5e-11  |g|= 1.41e-09  |ddm|= 2.11e-09
  HOMO (A") = -0.230488592284738  LUMO (A") = 0.0263458315808042
  cycle= 48 E= -770.087931911975  delta_E= 6.34e-11  |g|= 1.43e-09  |ddm|= 2.19e-09
  HOMO (A") = -0.230488592273235  LUMO (A") = 0.0263458315773696
  cycle= 49 E= -770.087931911909  delta_E= 6.57e-11  |g|= 1.45e-09  |ddm|= 2.26e-09
  HOMO (A") = -0.230488592263076  LUMO (A") = 0.0263458315744123
  cycle= 50 E= -770.087931911843  delta_E= 6.57e-11  |g|= 1.46e-09  |ddm|= 2.34e-09
  HOMO (A") = -0.230488592254216  LUMO (A") = 0.0263458315719923
  cycle= 51 E= -770.087931911778  delta_E= 6.53e-11  |g|= 1.47e-09  |ddm|= 2.39e-09
  HOMO (A") = -0.230488592246395  LUMO (A") = 0.0263458315698728
  cycle= 52 E= -770.087931911712  delta_E= 6.59e-11  |g|= 1.47e-09  |ddm|= 2.42e-09
  HOMO (A") = -0.230488592239455  LUMO (A") = 0.0263458315679975
  cycle= 53 E= -770.087931911644  delta_E= 6.84e-11  |g|= 1.47e-09  |ddm|= 2.43e-09
  HOMO (A") = -0.230488592233293  LUMO (A") = 0.0263458315663276
  cycle= 54 E= -770.087931911572  delta_E= 7.14e-11  |g|= 1.47e-09  |ddm|= 2.43e-09
  HOMO (A") = -0.230488592227833  LUMO (A") = 0.0263458315648519
  cycle= 55 E= -770.087931911503  delta_E= 6.98e-11  |g|= 1.48e-09  |ddm|= 2.43e-09
  HOMO (A") = -0.230488592223011  LUMO (A") = 0.0263458315635564
  cycle= 56 E= -770.087931911434  delta_E= 6.87e-11  |g|= 1.48e-09  |ddm|= 2.44e-09
  HOMO (A") = -0.230488592218775  LUMO (A") = 0.0263458315624304
  cycle= 57 E= -770.087931911361  delta_E= 7.34e-11  |g|= 1.49e-09  |ddm|= 2.45e-09
  HOMO (A") = -0.230488592215062  LUMO (A") = 0.0263458315614647
  cycle= 58 E= -770.087931911289  delta_E= 7.14e-11  |g|= 1.5e-09  |ddm|= 2.46e-09
  HOMO (A") = -0.230488592211809  LUMO (A") = 0.0263458315606403
  cycle= 59 E= -770.087931911219  delta_E= 6.98e-11  |g|= 1.51e-09  |ddm|= 2.47e-09
  HOMO (A") = -0.230488592208954  LUMO (A") = 0.0263458315599305
  cycle= 60 E= -770.087931911149  delta_E= 7.07e-11  |g|= 1.51e-09  |ddm|= 2.49e-09
  HOMO (A") = -0.230488592206455  LUMO (A") = 0.0263458315593127
  cycle= 61 E= -770.087931911077  delta_E= 7.14e-11  |g|= 1.52e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592204267  LUMO (A") = 0.026345831558772
  cycle= 62 E= -770.087931911008  delta_E= 6.96e-11  |g|= 1.52e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592202357  LUMO (A") = 0.0263458315583022
  cycle= 63 E= -770.087931910937  delta_E= 7.12e-11  |g|= 1.52e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592200696  LUMO (A") = 0.0263458315578907
  cycle= 64 E= -770.087931910865  delta_E= 7.12e-11  |g|= 1.52e-09  |ddm|= 2.53e-09
  HOMO (A") = -0.230488592199258  LUMO (A") = 0.0263458315575188
  cycle= 65 E= -770.087931910796  delta_E= 6.93e-11  |g|= 1.52e-09  |ddm|= 2.54e-09
  HOMO (A") = -0.230488592198028  LUMO (A") = 0.0263458315571888
  cycle= 66 E= -770.087931910728  delta_E= 6.8e-11  |g|= 1.52e-09  |ddm|= 2.54e-09
  HOMO (A") = -0.230488592196978  LUMO (A") = 0.0263458315568899
  cycle= 67 E= -770.08793191066  delta_E= 6.84e-11  |g|= 1.52e-09  |ddm|= 2.54e-09
  HOMO (A") = -0.230488592196085  LUMO (A") = 0.0263458315566234
  cycle= 68 E= -770.087931910589  delta_E= 7.09e-11  |g|= 1.52e-09  |ddm|= 2.54e-09
  HOMO (A") = -0.230488592195323  LUMO (A") = 0.0263458315563866
  cycle= 69 E= -770.087931910522  delta_E= 6.71e-11  |g|= 1.52e-09  |ddm|= 2.54e-09
  HOMO (A") = -0.230488592194684  LUMO (A") = 0.0263458315561737
  cycle= 70 E= -770.087931910452  delta_E= 7e-11  |g|= 1.52e-09  |ddm|= 2.54e-09
  HOMO (A") = -0.230488592194154  LUMO (A") = 0.0263458315559743
  cycle= 71 E= -770.087931910383  delta_E= 6.84e-11  |g|= 1.52e-09  |ddm|= 2.54e-09
  HOMO (A") = -0.230488592193721  LUMO (A") = 0.0263458315557871
  cycle= 72 E= -770.087931910316  delta_E= 6.73e-11  |g|= 1.52e-09  |ddm|= 2.53e-09
  HOMO (A") = -0.230488592193376  LUMO (A") = 0.0263458315556142
  cycle= 73 E= -770.087931910246  delta_E= 7.03e-11  |g|= 1.52e-09  |ddm|= 2.53e-09
  HOMO (A") = -0.230488592193102  LUMO (A") = 0.0263458315554442
  cycle= 74 E= -770.087931910178  delta_E= 6.73e-11  |g|= 1.52e-09  |ddm|= 2.53e-09
  HOMO (A") = -0.230488592192895  LUMO (A") = 0.0263458315552791
  cycle= 75 E= -770.087931910109  delta_E= 6.96e-11  |g|= 1.52e-09  |ddm|= 2.53e-09
  HOMO (A") = -0.230488592192752  LUMO (A") = 0.0263458315551097
  cycle= 76 E= -770.087931910041  delta_E= 6.73e-11  |g|= 1.52e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592192664  LUMO (A") = 0.026345831554943
  cycle= 77 E= -770.087931909973  delta_E= 6.82e-11  |g|= 1.52e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592192622  LUMO (A") = 0.0263458315547744
  cycle= 78 E= -770.087931909905  delta_E= 6.84e-11  |g|= 1.52e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592192628  LUMO (A") = 0.0263458315546077
  cycle= 79 E= -770.087931909837  delta_E= 6.73e-11  |g|= 1.52e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592192674  LUMO (A") = 0.0263458315544386
  cycle= 80 E= -770.087931909771  delta_E= 6.62e-11  |g|= 1.51e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592192756  LUMO (A") = 0.0263458315542709
  cycle= 81 E= -770.087931909704  delta_E= 6.75e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592192866  LUMO (A") = 0.0263458315541072
  cycle= 82 E= -770.087931909638  delta_E= 6.62e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592193007  LUMO (A") = 0.0263458315539425
  cycle= 83 E= -770.08793190957  delta_E= 6.8e-11  |g|= 1.52e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592193173  LUMO (A") = 0.0263458315537766
  cycle= 84 E= -770.087931909501  delta_E= 6.84e-11  |g|= 1.51e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592193365  LUMO (A") = 0.0263458315536041
  cycle= 85 E= -770.087931909434  delta_E= 6.75e-11  |g|= 1.51e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592193577  LUMO (A") = 0.0263458315534329
  cycle= 86 E= -770.087931909365  delta_E= 6.82e-11  |g|= 1.51e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592193807  LUMO (A") = 0.0263458315532565
  cycle= 87 E= -770.087931909299  delta_E= 6.59e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592194056  LUMO (A") = 0.0263458315530809
  cycle= 88 E= -770.087931909232  delta_E= 6.78e-11  |g|= 1.51e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.23048859219432  LUMO (A") = 0.0263458315529014
  cycle= 89 E= -770.087931909165  delta_E= 6.62e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.2304885921946  LUMO (A") = 0.0263458315527138
  cycle= 90 E= -770.087931909098  delta_E= 6.75e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592194889  LUMO (A") = 0.0263458315525219
  cycle= 91 E= -770.087931909031  delta_E= 6.66e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592195189  LUMO (A") = 0.0263458315523354
  cycle= 92 E= -770.087931908963  delta_E= 6.8e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592195497  LUMO (A") = 0.0263458315521495
  cycle= 93 E= -770.087931908895  delta_E= 6.8e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592195811  LUMO (A") = 0.026345831551959
  cycle= 94 E= -770.087931908829  delta_E= 6.66e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592196125  LUMO (A") = 0.0263458315517718
  cycle= 95 E= -770.087931908761  delta_E= 6.75e-11  |g|= 1.51e-09  |ddm|= 2.52e-09
  HOMO (A") = -0.230488592196437  LUMO (A") = 0.0263458315515842
  cycle= 96 E= -770.087931908693  delta_E= 6.78e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.23048859219675  LUMO (A") = 0.0263458315513999
  cycle= 97 E= -770.087931908626  delta_E= 6.73e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.23048859219706  LUMO (A") = 0.0263458315512189
  cycle= 98 E= -770.08793190856  delta_E= 6.62e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592197369  LUMO (A") = 0.0263458315510415
  cycle= 99 E= -770.087931908491  delta_E= 6.91e-11  |g|= 1.51e-09  |ddm|= 2.51e-09
  HOMO (A") = -0.230488592197675  LUMO (A") = 0.0263458315508557
  cycle= 100 E= -770.087931908424  delta_E= 6.64e-11  |g|= 1.51e-09  |ddm|= 2.5e-09
  HOMO (A") = -0.230488592199039  LUMO (A") = 0.026345831550038
  SCF not converge.
  SCF energy = -770.087931908424 after 100 cycles
  HOMO (A") = -0.230488592232092  LUMO (A") = 0.0263458315319473
  HOMO (A") = -0.230488592232092  LUMO (A") = 0.0263458315319473
  macro= 0  E= -770.087931912752  delta_E= -4.3276e-09  |g|= 1.96352e-08  2 JK
  HOMO (A") = -0.230488592232092  LUMO (A") = 0.0263458315319473
  macro= 1  E= -770.087931912752  delta_E= 0  |g|= 1.96352e-08  2 JK
  HOMO (A") = -0.230488592232092  LUMO (A") = 0.0263458315319473
  macro X = 2  E=-770.087931912752  |g|= 1.96352e-08  total 4 JK
  transform (ia|jb)
  MO integrals cint2e_sph are saved in /local/2223138.master15.delcatty.gent.vsc/tmpN0lrLa/eri_mo
  num. MO ints = 5.129772e+08, required disk 4103.8176 MB
  step1: tmpfile 13814.984 MB
  step1: (ij,kl) = (22649,76245), mem cache 8e-06 MB, iobuf 0 MB
      CPU time for Initializing ao2mo.outcore.half_e1      2.17 sec, wall time      0.14 sec
  step 1 [1/13861], AO [0:1], len(buf) = 3
      CPU time for gen AO/transform MO [1/13861]      0.44 sec, wall time      0.04 sec
      CPU time for transposing to disk      0.01 sec, wall time      0.00 sec
  step 1 [2/13861], AO [1:2], len(buf) = 2
      CPU time for gen AO/transform MO [2/13861]      0.10 sec, wall time      0.01 sec
      CPU time for transposing to disk      0.00 sec, wall time      0.00 sec
  step 1 [3/13861], AO [2:3], len(buf) = 1
      CPU time for gen AO/transform MO [3/13861]      0.01 sec, wall time      0.00 sec
      CPU time for transposing to disk      0.00 sec, wall time      0.00 sec

  [continues...]

  step 1 [13859/13861], AO [13858:13859], len(buf) = 3
      CPU time for gen AO/transform MO [13859/13861]      0.09 sec, wall time      0.01 sec
      CPU time for transposing to disk      0.02 sec, wall time      0.00 sec
  step 1 [13860/13861], AO [13859:13860], len(buf) = 3
      CPU time for gen AO/transform MO [13860/13861]      0.07 sec, wall time      0.00 sec
      CPU time for transposing to disk      0.02 sec, wall time      0.00 sec
  step 1 [13861/13861], AO [13860:13861], len(buf) = 6

And the following error message:

  Warn: Singularity detected in overlap matrix (condition number = 1.03e+04). SCF may be inaccurate and hard to converge.
  Traceback (most recent call last):
    File "test.py", line 76, in <module>
      E_MP2, T_MP2 = mp2.kernel()
    File "/user/scratch/gent/vsc403/vsc40327/hyperpol_pa/pyscf/mp/mp2.py", line 141, in kernel
      kernel(self, mo_energy, mo_coeff, verbose=self.verbose)
    File "/user/scratch/gent/vsc403/vsc40327/hyperpol_pa/pyscf/mp/mp2.py", line 32, in kernel
      with mp.ao2mo(mo_coeff) as ovov:
    File "/user/scratch/gent/vsc403/vsc40327/hyperpol_pa/pyscf/mp/mp2.py", line 171, in ao2mo
      verbose=self.verbose)
    File "/user/scratch/gent/vsc403/vsc40327/hyperpol_pa/pyscf/ao2mo/outcore.py", line 271, in general
      log, compact)
    File "/user/scratch/gent/vsc403/vsc40327/hyperpol_pa/pyscf/ao2mo/outcore.py", line 454, in half_e1
      iobuf[:,p0:p0+aoshs[2]] = buf.reshape(comp,aoshs[2],-1)
  ValueError: total size of new array must be unchanged

Also, how can I easily adjust the memory parameter (there's ~64GB mem of which pyscf should easily be allowed to use 32GB)?

Best wishes,
Sebastian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.