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

'''Wave Function Stability Analysis

Ref.
JCP, 66, 3045
JCP, 104, 9047

See also tddft/rhf.py and scf/newton_ah.py
'''

import numpy
import scipy
from pyscf import lib
from pyscf.lib import logger
from pyscf.scf import hf, hf_symm, uhf_symm
from pyscf.soscf import newton_ah
from pyscf.soscf.newton_ah import _gen_rhf_response, _gen_uhf_response

def rhf_stability(mf, internal=True, external=False, verbose=None):
    '''
    Stability analysis for RHF/RKS method.

    Args:<commit_msg>from functools import reduce in scf/stability.py<commit_after>#!/usr/bin/env python
#
# Author: <NAME> <<EMAIL>>
#

'''Wave Function Stability Analysis

Ref.
JCP, 66, 3045
JCP, 104, 9047

See also tddft/rhf.py and scf/newton_ah.py
'''

import numpy
import scipy
from functools import reduce
from pyscf import lib
from pyscf.lib import logger
from pyscf.scf import hf, hf_symm, uhf_symm
from pyscf.soscf import newton_ah
from pyscf.soscf.newton_ah import _gen_rhf_response, _gen_uhf_response

def rhf_stability(mf, internal=True, external=False, verbose=None):
    '''
    Stability analysis for RHF/RKS method.

    Args:
{'fraction_non_alphanumeric': 0.0967741935483871, 'fraction_numerical': 0.022071307300509338, 'mean_word_length': 4.779411764705882, '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': '3705686', 'n_tokens_mistral': 485, 'n_tokens_neox': 456, 'n_words': 126}