<commit_before>#!/usr/bin/env python
#
# Author: <NAME> <<EMAIL>>
#

import numpy
import pyscf.lib
import pyscf.gto
from pyscf.lib import logger
import pyscf.symm
import pyscf.scf
import pyscf.ao2mo
from pyscf.mcscf import casci


class CASCI(casci.CASCI):
    def __init__(self, mf, ncas, nelecas, ncore=None):
        assert(mf.mol.symmetry)
# Ag, A1 or A
#TODO:        self.wfnsym = pyscf.symm.param.CHARACTER_TABLE[mol.groupname][0][0]
        self.orbsym = []
        casci.CASCI.__init__(self, mf, ncas, nelecas, ncore)

    def kernel(self, mo_coeff=None, ci0=None):
        if mo_coeff is None:
            mo_coeff = self.mo_coeff
        else:
            self.mo_coeff = mo_coeff
        if ci0 is None:
            ci0 = self.ci

        label_symmetry_(self, self.mo_coeff)
        return self.kernel(mo_coeff, ci0)

    def _eig(self, mat, b0, b1):
        return eig(mat, numpy.array(self.orbsym[b0:b1]))
<commit_msg>recursive dependence issue in CASCI.kernel<commit_after>#!/usr/bin/env python
#
# Author: <NAME> <<EMAIL>>
#

import numpy
import pyscf.lib
import pyscf.gto
from pyscf.lib import logger
import pyscf.symm
import pyscf.scf
import pyscf.ao2mo
from pyscf.mcscf import casci


class CASCI(casci.CASCI):
    def __init__(self, mf, ncas, nelecas, ncore=None):
        assert(mf.mol.symmetry)
# Ag, A1 or A
#TODO:        self.wfnsym = pyscf.symm.param.CHARACTER_TABLE[mol.groupname][0][0]
        self.orbsym = []
        casci.CASCI.__init__(self, mf, ncas, nelecas, ncore)

    def kernel(self, mo_coeff=None, ci0=None):
        if mo_coeff is None:
            mo_coeff = self.mo_coeff
        else:
            self.mo_coeff = mo_coeff
        if ci0 is None:
            ci0 = self.ci

        label_symmetry_(self, self.mo_coeff)
        return casci.CASCI.kernel(self, mo_coeff, ci0)

    def _eig(self, mat, b0, b1):
        return eig(mat, numpy.array(self.orbsym[b0:b1]))

{'fraction_non_alphanumeric': 0.11594963273871983, 'fraction_numerical': 0.012591815320041973, 'mean_word_length': 2.7539370078740157, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2087115', 'n_tokens_mistral': 776, 'n_tokens_neox': 754, 'n_words': 163}