diff --git "a/data/dataset_Quantum_Chemistry.csv" "b/data/dataset_Quantum_Chemistry.csv" new file mode 100644--- /dev/null +++ "b/data/dataset_Quantum_Chemistry.csv" @@ -0,0 +1,139733 @@ +"keyword","repo_name","file_path","file_extension","file_size","line_count","content","language" +"Quantum Chemistry","MFSJMenger/pysurf","setup.py",".py","1441","50","#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""""""The setup script."""""" + +from setuptools import setup, find_packages + +with open('README.rst') as readme_file: + readme = readme_file.read() + +with open('HISTORY.rst') as history_file: + history = history_file.read() + +requirements = ['pycolt>=0.5.3', 'qctools>=0.3.0', 'netcdf4>=1.5', 'numpy>=1.21', 'scipy>=1.7', 'jinja2>=3.1'] + +setup_requirements = ['pytest-runner', ] + +test_requirements = ['pytest>=3', ] + +setup( + author=""Maximilian Menger, Johannes Ehrmaier"", + author_email='m.f.s.j.Menger@rug.nl', + python_requires='>=3.6', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache License 2.0', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + description=""Python Surface Hopping Code"", + entry_points={ + 'console_scripts': [], + }, + install_requires=requirements, + license=""Apache License 2.0"", + long_description=readme + '\n\n' + history, + include_package_data=True, + keywords='pysurf', + name='pysurf', + packages=find_packages(include=['pysurf', 'pysurf.*']), + setup_requires=setup_requirements, + test_suite='tests', + tests_require=test_requirements, + url='https://github.com/mfsjmenger/pysurf', + version='0.2.0', + zip_safe=False, +) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/setup_calculations.py",".py","1453","48","import os +from shutil import copy2 as copy +# +from pysurf.setup import SetupBase +from pysurf.logger import get_logger +from pysurf.sampling import Sampling + + +class SetupComputation(SetupBase): + + folder = 'computations' + subfolder = 'sp' + + _user_input = """""" + # Database containing all the initial conditions + sampling_db = :: existing_file + """""" + + + def __init__(self, config): + """""" Class to create initial conditions due to user input. Initial conditions are saved + in a file for further usage. + """""" + self.logger = get_logger('setup.log', 'setup') + super().__init__(self.logger) + sampling = Sampling.from_db(config['sampling_db'], logger=self.logger) + # + self.setup_folders(range(sampling.nconditions), config, sampling) + + @classmethod + def from_config(cls, config): + return cls(config) + + def setup_folder(self, number, foldername, config, sampling): + #name of new database + qchemfile = os.path.join(foldername, 'init.xyz') + #get info from old db and adjust + condition = sampling.get_condition(number) + with open(qchemfile, 'w') as fh: + fh.write('$molecule\n') + for idx, crd in zip(sampling.atomids, condition.crd): + fh.write(""%d %12.8f %12.8f %12.8f\n"" % (idx, crd[0], crd[1], crd[2])) + fh.write('$end\n') + + +if __name__==""__main__"": + SetupComputation.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/sp_calc.py",".py","5418","141","from pysurf.logger import get_logger +from pysurf.sampling import Sampling + +from pysurf.utils import exists_and_isfile +from pysurf.spp import SurfacePointProvider +from colt import Colt, from_commandline + + +class SinglePointCalculation(Colt): + """""" The SinglePointCalculation class asks the SPP for information at one specific geometry. + + It takes its information from the init_db and writes the results to it. + It was designed specifically for single point calculations for the spectrum + Properties: + ------- + Classmethods: + + from_inputfile: + classmethod to initialize the class from an inputfile + from_config: + classmethod to initialize the class, e.g. used in cls.from_commandline + + ------- + Methods: + """""" + + _user_input = """""" + # Number of states + nstates = :: int + nghost_states = 0 :: int + # Database containing the geometry + init_db = init.db :: str + # Properties that should be calculated + properties = [energy, fosc] :: list + # SPP inputfile + spp = spp.inp :: file + """""" + + def __init__(self, config, logger=None): + """""" + Args: + config, ColtObj: + The config contains the information from the colt + questions of the class + logger, Logger: + Logger for the class. If not provided a new logger is created. + """""" + + if logger is None: + self.logger = get_logger('sp_calc.log', 'sp_calc') + self.logger.header('Single Point Calculation', config) + else: + self.logger = logger + # + self.logger.info(f""Taking information from {config['init_db']}"") + sampling = Sampling.from_db(config['init_db'], logger=self.logger) + + if not(exists_and_isfile(config['spp'])): + spp_config = SurfacePointProvider.generate_input(config['spp']) + else: + spp_config = SurfacePointProvider.generate_input(config['spp'], config=config['spp']) + + + self.logger.debug(f""Setting up SPP with {config['spp']}"") + if sampling.molecule is not None: + spp = SurfacePointProvider.from_config(spp_config, + config['properties'], + config['nstates'], + sampling.natoms, + nghost_states=config['nghost_states'], + atomids = sampling.atomids) + else:#model calculation + spp = SurfacePointProvider,from_config(spp_config, + config['properties'], + config['nstates'], + sampling.nmodes) + + crd = sampling.get_condition(0).crd + + #check that DB can take the results + self.logger.debug(f""Checking whether {config['init_db']} can take the results"") + self._check_res_db(config, sampling) + + with self.logger.info_block(""SPP calculation""): + res = spp.request(crd, config['properties'], states=[st for st in range(config['nstates'])]) + + self.logger.info(f""Writing results to: {config['init_db']}"") + for prop, value in res.iter_data(): + sampling.set(prop, value) + + @classmethod + def from_config(cls, config): + return cls(config) + + @classmethod + def from_inputfile(cls, inputfile): + config = cls.generate_input(inputfile, config=inputfile) +# config['inputfile'] = inputfile + logger = get_logger('sp_calc.log', 'sp_calc') + logger.header('Single Point Calculation', config) + return cls(config, logger) + + def _check_res_db(self, config, sampling): + if exists_and_isfile(config['init_db']): + info = sampling.info + check1 = all(item in info['variables'] for item in config['properties']) + if 'nstates' in info['dimensions']: + if (info['dimensions']['nstates'] >= config['nstates']): + if 'natoms' in info['dimensions']: + if(info['dimensions']['natoms'] == sampling._db.info['dimensions']['natoms']): + check2 = True + else: + check2 = False + if 'nmodes' in info['dimensions']: + if(info['dimensions']['nmodes'] == sampling._db.info['dimensions']['nmodes']): + check2 = True + else: + check2 = False + else: + check2 = False + else: + check2 = False + if check1 and check2: + return + else: + self.logger.error(f""Given database is not appropriate for the results: {config['init_db']}"") + +@from_commandline("""""" +inputfile = sp_calc.inp :: file +"""""") +def command_sp_calc(inputfile): + """""" Setting up initial conditions according to the inputfile. + If inputfile doesn't exist, colt will ask all necessary questions + """""" + sp_calc = SinglePointCalculation.from_inputfile(inputfile) +# sampling = Sampling.from_db('sampling.db') + + +if __name__==""__main__"": + command_sp_calc() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/accumulate_dbs.py",".py","1774","65","import os +from shutil import copy2 as copy + +from colt import Colt +from pysurf.utils import SubfolderHandle +from pysurf.utils import exists_and_isfile +from pysurf.database import PySurfDB + +from combine_dbs import CombineDBs + +class AccumulateDBs(Colt): + _user_input = """""" + #Foldername of the main folder, e.g. spectrum or prop + folder = spectrum :: file + + #subfoldername, e.g. condition + subfolder = condition :: str + + #db files that should be added to mother db + dbfiles = db.dat :: str + + #mother db + mother_db = db.dat :: str + + start_value = 0 :: int + """""" + + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + setup = SubfolderHandle(config['folder'], config['subfolder']) + + counter = 0 + for file in setup.fileiter(config['dbfiles']): + if counter == 0: + copied = False + if not exists_and_isfile(config['mother_db']): + copy(file, config['mother_db']) + copied = True + info = PySurfDB.info_database(config['mother_db']) + if 'natoms' not in info['dimensions']: + model = True + else: + model = False + mother_db = PySurfDB.load_database(config['mother_db'], data=info['variables'], dimensions=info['dimensions'], model=model, sp=False) + counter += 1 + if copied is True: + continue + + CombineDBs(mother_db, file, start=config['start_value']) + print(f""Added file {file} to DB"") + + + +if __name__==""__main__"": + AccumulateDBs.from_commandline() + + + + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/setup_spectrum.py",".py","3484","99","import os +from shutil import copy2 as copy +# +from pysurf.logger import get_logger +from pysurf.sampling import Sampling +from pysurf.setup import SetupBase +from pysurf.utils import exists_and_isfile +from pysurf.spp import SurfacePointProvider + +from sp_calc import SinglePointCalculation + + + +class SetupSpectrum(SetupBase): + + folder = 'spectrum' + subfolder = 'condition' + + _user_input = """""" + # Number of conditions + n_cond = :: int + + # Number of states + nstates = :: int + + #Properties that should be calculated + properties = :: list(str), optional, alias=p + + # Database containing all the initial conditions + sampling_db = sampling.db :: existing_file, alias=db + + # Filepath for the inputfile of the Surface Point Provider + spp = spp.inp :: file, alias=s + + # Filepath for the inputfile of the Single Point Calculation + sp_calc = sp_calc.inp :: file, alias=sp + """""" + + def __init__(self, config): + """""" Class to create initial conditions due to user input. Initial conditions are saved + in a file for further usage. + """""" + if config['properties'] is None: + config.update({'properties': ['energy', 'fosc']}) + logger = get_logger('setup_spectrum.log', 'setup_spectrum') + logger.header('SETUP SPECTRUM', config) + SetupBase.__init__(self, logger) + # + logger.info(f""Opening sampling database {config['sampling_db']}"") + sampling = Sampling.from_db(config['sampling_db'], logger=logger) + + if not exists_and_isfile(config['spp']): + presets="""""" + use_db = no + """""" + logger.info(f""Setting up SPP inputfile: {config['spp']}"") + SurfacePointProvider.generate_input(config['spp'], config=None, presets=presets) + else: + logger.info(f""Using SPP inputfile as it is"") + + if not exists_and_isfile(config['sp_calc']): + presets=f"""""" + properties = {config['properties']} + nstates = {config['nstates']} + init_db = init.db + """""" + logger.info(f""Setting up inputfile for the single point calculations"") + SinglePointCalculation.generate_input(config['sp_calc'], config=None, presets=presets) + else: + logger.info(f""Using inputfile for the single point calculations as it is"") + + logger.info(""Starting to prepare the folders..."") + self.setup_folders(range(config['n_cond']), config, sampling) + + @classmethod + def from_config(cls, config): + return cls(config) + + def setup_folder(self, number, foldername, config, sampling): + copy(config['spp'], foldername) + copy(config['sp_calc'], foldername) + + #name of new database + initname = os.path.join(foldername, 'init.db') + #get info from old db and adjust + variables = sampling.info['variables'] + variables += config['properties'] + dimensions = sampling.info['dimensions'] + dimensions['nstates'] = config['nstates'] + dimensions['nactive'] = config['nstates'] + #setup new database + new_sampling = Sampling.create_db(initname, variables, dimensions, sampling.system, sampling.modes, model=sampling.model, sp=True) + #copy condition to new db + condition = sampling.get_condition(number) + new_sampling.write_condition(condition, 0) + +if __name__==""__main__"": + SetupSpectrum.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/run_trajectory.py",".py","311","16","from colt import Colt +from colt import from_commandline +from pysurf.dynamics.run_trajectory import RunTrajectory + + + + +@from_commandline("""""" +inputfile = prop.inp :: file +"""""") +def command_run_trajectory(inputfile): + RunTrajectory.from_inputfile(inputfile) + +if __name__==""__main__"": + command_run_trajectory() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/copy_execute_old.py",".py","1092","43","from shutil import copy2 as copy +from subprocess import run, CalledProcessError + +from colt import Colt +from pysurf.utils import SubfolderHandle + + +class CopyExecute(Colt): + + _user_input = """""" + #Foldername of the main folder, e.g. spectrum or prop + folder = spectrum :: file + + #subfoldername, e.g. condition + subfolder = condition :: str + + #list with files that should be copied + copy = [submit.sh] :: list + + #executable that should be performed + exe = sbatch submit.sh :: str + """""" + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + setup = SubfolderHandle(config['folder'], config['subfolder']) + + for subfolder in setup: + for item in config['copy']: + copy(item, subfolder) + + try: + run(config['exe'], cwd=subfolder, check=True, shell=True) + except KeyboardInterrupt or CalledProcessError: + break + + +if __name__==""__main__"": + CopyExecute.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/__init__.py",".py","43","2","from sp_calc import SinglePointCalculation +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/copy_execute.py",".py","188","10","from pysurf.workflow import engine + + +workflow = engine.create_workflow(""copy_execute"", """""" +folders = get_subfolder(folder, subfolder) +copy_execute(folders, copy, exe) +"""""") + +workflow.run() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/setup_propagation.py",".py","3013","92","import os +from shutil import copy2 as copy +# +from pysurf.logger import get_logger +from pysurf.sampling import Sampling +from pysurf.setup import SetupBase +from pysurf.spp import SurfacePointProvider +from pysurf.dynamics import RunTrajectory +from pysurf.utils import exists_and_isfile + + +class SetupPropagation(SetupBase): + + folder = 'prop' + subfolder = 'traj' + + _user_input = """""" + # Number of trajectories for the propagation + n_traj = -1 :: int + + # Database containing all the initial conditions + sampling_db = :: existing_file + + # Filepath for the inputfile of the Surface Point Provider + spp = spp.inp :: file + + # initial excited state for the trajectory + initial state = :: int + + #Filepath for the inputfile of the Propagation + prop = prop.inp :: file + + # Decide whether database for the propagation should be copied to the trajectory folder + copy_db = none :: str + """""" + + def __init__(self, config): + """""" Class to create initial conditions due to user input. Initial conditions are saved + in a file for further usage. + """""" + logger = get_logger('setup_propagation.log', 'setup_propagation') + SetupBase.__init__(self, logger) + + + # Open DB of initial conditions once, so that it is available + sampling = Sampling.from_db(config['sampling_db']) + + #Make sure that inputfile for the SPP exists and is complete + + if exists_and_isfile(config['spp']): lconfig = config['spp'] + else: lconfig = None + SurfacePointProvider.generate_input(config['spp'], config=lconfig) + + #Make sure that inputfile for RunTrajectory exists and is complete + if exists_and_isfile(config['prop']): lconfig = config['prop'] + else: lconfig = None + RunTrajectory.generate_input(config['prop'], config=lconfig) + + # + if config['n_traj'] == -1: + ntraj = len(sampling._db) + else: + ntraj = config['n_traj'] + if sampling.nconditions < ntraj: + logger.error(f""Too few initial conditions in {config['sampling_db']}"") + + self.setup_folders(range(ntraj), config, sampling) + + + @classmethod + def from_config(cls, config): + return cls(config) + + def setup_folder(self, number, foldername, config, sampling): + copy(config['prop'], foldername) + copy(config['spp'], foldername) + + if config['copy_db'] != 'none': + copy(config['copy_db'], foldername) + + initname = os.path.join(foldername, 'init.db') + #setup new database + new_sampling = Sampling.create_db(initname, sampling.info['variables'], sampling.info['dimensions'], sampling.system, sampling.modes, model=sampling.model, sp=True) + #copy condition to new db + condition = sampling.get_condition(number) + new_sampling.write_condition(condition, 0) + new_sampling.set('currstate', config['initial state'], 0) + + +if __name__==""__main__"": + SetupPropagation.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/run_hoax.py",".py","199","9","from colt import Colt +from colt import from_commandline +from pysurf.dynamics.run_trajectory import RunTrajectory +from modules.hoax.src.hoax.__main__ import main + + +if __name__==""__main__"": + main() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/sampling.py",".py","575","23","import os +import numpy as np +# +from colt import Colt +from colt import from_commandline +# +from pysurf.utils.constants import fs2au +from pysurf.sampling.sampling import Sampling + + +@from_commandline("""""" +inputfile = sampling.inp :: file +"""""") +def command_setup_sampling(inputfile): + """""" Setting up initial conditions according to the inputfile. + If inputfile doesn't exist, colt will ask all necessary questions + """""" + sampling = Sampling.from_inputfile(inputfile) +# sampling = Sampling.from_db('sampling.db') + +if __name__==""__main__"": + command_setup_sampling() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/collect_spectrum.py",".py","2783","77","import os + +from copy_execute import CopyExecute +from setup_spectrum import SetupSpectrum +from colt import Colt +from pysurf.utils import exists_and_isfile +from pysurf.utils import SubfolderHandle +from pysurf.logger import get_logger, Logger +from pysurf.sampling import Sampling + + +class CollectSpectrum(SubfolderHandle, Colt): + folder = SetupSpectrum.folder + subfolder = SetupSpectrum.subfolder + file = 'init.db' + props = ['energy', 'fosc', 'crd'] + + _user_input = """""" + """""" + """""" Class to collect and evaluate spectral information from the single point calculations + + It uses folder and subfolder from SetupSpectrum + """""" + + + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + self.logger = get_logger('collect_spectrum.log', 'collect_spectrum.log') + subfolderhandle = SubfolderHandle(self.folder, self.subfolder) + specfile = os.path.join(self.folder, 'spectrum.db') + + if exists_and_isfile(specfile): + self.sampling = Sampling.from_db(specfile, logger=self.logger) + self.dimensions = self.sampling.info['dimensions'] + self.variables = self.sampling.info['variables'] + if not self._check_sampling(self.sampling): + logger.error(f""Existing spectrum db is corrupted"") + for counter in range(self.sampling.nconditions, len(subfolderhandle)): + snew = Sampling.from_db(subfolderhandle.get_file(self.file, counter), logger=self.logger) + if self._check_sampling(snew): + self.add_condition(snew) + + else: + counter = 0 + for file in subfolderhandle.fileiter('init.db'): + snew = Sampling.from_db(file, logger=self.logger) + if counter == 0: + self.sampling = Sampling.create_db(specfile, snew.info['variables'], snew.info['dimensions'], + snew.molecule, snew.modes, snew.model, sp=False, logger=self.logger) + self.dimensions = self.sampling.info['dimensions'] + self.variables = self.sampling.info['variables'] + self.add_condition(snew) + counter += 1 + + def add_condition(self, snew): + for prop in self.props: + self.sampling.append(prop, snew.get(prop, 0)) + self.sampling.increase + + + def _check_sampling(self, samp): + if not all(item in samp.info['variables'] for item in self.props): + return False + if samp.info['dimensions']['natoms'] != self.dimensions['natoms']: + return False + return True + + + + +if __name__ == ""__main__"": + CollectSpectrum.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/combine_dbs.py",".py","2405","81"," +import numpy as np +from scipy.spatial import cKDTree + +from pysurf.database import PySurfDB +from colt import Colt + +"""""" This class has to be moved to spp.dbinter.dbinter. + at the moment I cannot change dbinter, but it has to be done in futere + so that the function can be just imported +"""""" +class NextNeighbor(): + def __init__(self, db): + crds = [] + for crd in db['crd']: + crds += [np.array(crd).flatten()] + crds = np.array(crds) + self.tree = cKDTree(crds) + + def get(self, crd): + return self.tree.query(crd.flatten(), k=1) + + +class CombineDBs(Colt): + _user_input = """""" + main_db = :: existing_file + added_db = :: existing_file + start_value = 0 :: int + """""" + + @classmethod + def from_config(cls, config): + return cls(config['main_db'], config['added_db'], start=config['start_value']) + + + def __init__(self, main_db, added_db, start=0): + + if not isinstance(main_db, PySurfDB): + info = PySurfDB.info_database(main_db) + if 'natoms' in info['dimensions']: + model = False + else: + model = True + main_db = PySurfDB.load_database(main_db, dimensions=info['dimensions'], data=info['variables'], model=model) + if not isinstance(added_db, PySurfDB): + added_db = PySurfDB.load_database(added_db, read_only=True) + + + keys_raw = main_db.get_keys() + keys = [] + for key in keys_raw: + if main_db.get_dimension(key)[0].isunlimited() is True: + keys += [key] + + #check whether dbs fit together + check = True + for key in keys: + if key in added_db.get_keys(): + for dim1, dim2 in zip(main_db.get_dimension(key)[1:], added_db.get_dimension(key)[1:]): + if dim1.size != dim2.size: + check = False + else: + check = False + if check is False: + print('Error DBs do not fit together by dimensions') + exit() + + + +# nn = NextNeighbor(db1) + for i in range(start, len(added_db)): +# min_dist = nn.get(crd) +# if min_dist[0] > 0.25: + for key in keys: + main_db.append(key, added_db[key][i]) + main_db.increase + + +if __name__=='__main__': + CombineDBs.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/validation.py",".py","6042","179",""""""" +PySurf Module: + Validation and Training of Interpolators + +Provide infrastructure for the training of interpolators +and test them against a validation set +"""""" +import numpy as np + +from pysurf.database import PySurfDB +from pysurf.spp import SurfacePointProvider +from pysurf.logger import get_logger +from colt import Colt + +from scipy.optimize import minimize + + +class Validation(Colt): + + _user_input = """""" + db = + properties = :: list + save_pes = __NONE__ :: str + save_graddiff = __NONE__ :: str + optimize = False :: bool + """""" + + @classmethod + def _extend_questions(cls, questions): + questions.generate_block(""training"", Training.colt_user_input) + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + self.inter = Training.from_config(config['training']) + # + if config['optimize'] is False: + self.inter.validate(config['db'], config['properties']) + else: + self.inter.optimize(config['db'], config['properties']) + # + if config['save_pes'] != '__NONE__': + self.inter.save_pes(config['save_pes'], config['db']) + + if config['save_graddiff'] != '__NONE__': + self.inter.save_graddiff(config['save_graddiff'], config['db']) + +class Training(Colt): + + _user_input = """""" + spp = spp.inp :: existing_file + """""" + + @classmethod + def from_config(cls, config): + return cls(config['spp']) + + def __init__(self, sppinp): + # + self.logger = get_logger('validate.log', 'validation', []) + # + config = self._get_spp_config(sppinp) + # + natoms, self.nstates, properties = self._get_db_info(config['use_db']['database']) + atomids = [1 for _ in range(natoms)] + self.spp = SurfacePointProvider.from_config(config, properties, self.nstates, natoms, + atomids=atomids, logger=self.logger) + # + self.interpolator = self.spp.interpolator + # + self.weightsfile = self.spp.interpolator.weightsfile + self.interpolator.train(self.weightsfile) + + def _get_spp_config(self, filename): + questions = SurfacePointProvider.generate_questions(presets="""""" + use_db=yes :: yes + [use_db(yes)] + write_only = no :: no + [use_db(yes)::write_only(no)] + fit_only = yes :: yes + """""") + return questions.ask(config=filename, raise_read_error=False) + + def _get_db_info(self, database): + db = PySurfDB.load_database(database, read_only=True) + rep = db.dbrep + natoms = rep.dimensions.get('natoms', None) + if natoms is None: + natoms = rep.dimensions['nmodes'] + nstates = rep.dimensions['nstates'] + return natoms, nstates, db.saved_properties + + def validate(self, filename, properties): + db = PySurfDB.load_database(filename, read_only=True) + self._compute(db, properties) + + def save_graddiff(self, filename, database): + db = PySurfDB.load_database(database, read_only=True) + results, _ = self._compute(db, ['gradient']) + + def str_join(values): + return ' '.join(str(val) for val in values) + + with open(filename, 'w') as f: + graddiff = [np.sqrt(np.mean((fitted-exact)**2)) for (fitted, exact) in results['gradient']] + f.write(""\n"".join(f""{i} {diff}"" + for i, diff in enumerate(graddiff))) + + def save_pes(self, filename, database): + db = PySurfDB.load_database(database, read_only=True) + results, _ = self._compute(db, ['energy']) + + def str_join(values): + return ' '.join(str(val) for val in values) + + with open(filename, 'w') as f: + f.write(""\n"".join(f""{i} {str_join(fitted)} {str_join(exact)}"" + for i, (fitted, exact) in enumerate(results['energy']))) + + def _compute(self, db, properties): + norm = {prop: [] for prop in properties} + ndata = len(db) + + for i, crd in enumerate(db['crd']): + result = self.spp.request(crd, properties) + # + for prop in properties: + if prop != 'gradient': + norm[prop].append([np.copy(result[prop]), np.copy(db[prop][i])]) + else: + norm[prop].append([np.copy(result[prop].data), np.copy(db[prop][i])]) + + for name, value in norm.items(): + errors = self.compute_errors(name, value, ndata) + + return norm, errors + + def compute_errors(self, name, prop, nele): + prop = np.array([val[0] - val[1] for val in prop]) + + # + mse = np.mean(prop) + mae = np.mean(np.absolute(prop)) + rmsd = np.sqrt(np.mean(prop**2)) + rmsd_state = np.sqrt(np.mean(prop**2, axis=0)) + # + maxval = np.amax(prop) + minval = np.amin(prop) + self.logger.info(f""{name}:\n mse = {mse}\n mae = {mae}\n"" + f"" rmsd = {rmsd}\n rmsd_state = {rmsd_state}\n maxval = {maxval}\n minval={minval}\n"") + return {'mse': mse, 'mae': mae, 'rmsd': rmsd, 'rmsd_state': rmsd_state, 'max_error': maxval} + + def optimize(self, filename, properties): + db = PySurfDB.load_database(filename, read_only=True) + + def _function(epsilon): + print('opt cycle', epsilon) + self.interpolator.epsilon = epsilon[0] + self.interpolator.train() + _, error = self._compute(db, properties) + print(error) + return error['rmsd'] + + res = minimize(_function, self.interpolator.epsilon, method='nelder-mead', tol=1e-4, options={ + 'maxiter': 25, 'disp': True, 'xatol': 0.0001}) + print(res) + self.interpolator.epsilon = res.x[0] + self.interpolator.train(self.weightsfile) + + +def eucl_norm(x, y): + return np.linalg.norm(x - y) + + +if __name__ == '__main__': + Validation.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/sp_calc_xyz.py",".py","376","15","from pysurf.workflow import engine + + +workflow = engine.create_workflow(""sp_calc"", """""" +crd = read_xyzfile_crd(crd_file) +atomids = read_xyzfile_atomids(crd_file) +spp = spp_calc(""spp.inp"", atomids, nstates, properties=properties) +res = sp_calc(spp, crd, properties=properties) +"""""") + +wf = workflow.run() +#wf = workflow.run({""properties"": ['energy']}) + +#print(wf['res']['energy']) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/submit_spec_calc.py",".py","669","26","from copy_execute import CopyExecute +from setup_spectrum import SetupSpectrum +from colt import Colt + +class SubmitSpecCalc(Colt): + """""" Class to start single point calculation for the spectrum + + It uses the CopyExecute class and presets folder and subfolder + """""" + + folder = SetupSpectrum.folder + subfolder = SetupSpectrum.subfolder + _user_input ="""""" + copy = :: list + exe = :: str + """""" + + @classmethod + def from_config(cls, config): + config['folder'] = cls.folder + config['subfolder'] = cls.subfolder + return CopyExecute.from_config(config) + +if __name__ == ""__main__"": + SubmitSpecCalc.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","bin/cleanup_db.py",".py","2529","74","import numpy as np + +from scipy.spatial.distance import cdist +from scipy.spatial.distance import cdist, pdist, squareform + +from colt import Colt +from pysurf.database import PySurfDB +from pysurf.spp import within_trust_radius +from pysurf.spp import internal + + +class CleanupDB(Colt): + _user_input = """""" + db_in = db.dat :: file + db_out = clean_db.dat :: file + trust_radius_general = 0.75 :: float + trust_radius_ci = 0.25 :: float + #Energy difference in au, seperating CI trust radius and general trust radius + energy_threshold = 0.02 :: float + crd_mode = internal :: str :: [internal, cartesian] + """""" + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + dbin = PySurfDB.load_database(config['db_in'], read_only=True) + info = PySurfDB.info_database(config['db_in']) + + self.thresh = config['energy_threshold'] + self.trust_radius_general = config['trust_radius_general'] + self.trust_radius_ci = config['trust_radius_ci'] + self.crd_mode = config['crd_mode'] + + if 'natoms' in info['dimensions']: + model = False + else: + model = True + dbout = PySurfDB.generate_database(config['db_out'], data=info['variables'], dimensions=info['dimensions'], model=model) + + self.crds = None + for i, crd in enumerate(dbin['crd']): + if self.crd_mode == 'internal': + crd = internal(np.copy(crd)) + else: + crd = np.copy(crd) + if i%1000 == 0: + print(f""Processing point {i}"") + crd_shape = crd.shape + crd.resize((1, crd.size)) + if self.crds is None: + self.crds = crd.reshape((1, crd.size)) + else: + diff = np.diff(dbin.get('energy', i)) + + _, (trust_general, trust_ci) = within_trust_radius(crd, self.crds, radius=self.trust_radius_general, radius_ci=self.trust_radius_ci, metric='euclidean') + if np.min(diff) < self.thresh: + if trust_ci is True: + continue + else: + if trust_general is True: + continue + self.crds = np.concatenate((self.crds, crd)) + + crd.resize(crd_shape) + for prop in info['variables']: + dbout.append(prop, dbin.get(prop, i)) + dbout.increase + +if __name__ == ""__main__"": + CleanupDB.from_commandline() + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","newtests/test_spp.py",".py","1276","34","import pytest +import numpy as np +from pysurf import SurfacePointProvider + + +@pytest.fixture +def xtb(): + nstates = 1 + natoms = 3 + return SurfacePointProvider.from_questions(['energy'], nstates, natoms, atomids=['O', 'H', 'H'], config='test.ini') + + +def test_xtbinterface_energy(xtb): + res = xtb.request([ [0.00000, 0.00000, 0.11779], + [0.00000, 0.75545, -0.47116], + [0.00000, -0.75545, -0.47116] + ], ['energy', 'gradient']) + + assert abs(res['energy'] - -5.07032508030) < 1e-8 + + +def test_xtbinterface_energy_and_gradient(xtb): + res = xtb.request([ [0.00000, 0.00000, 0.11779], + [0.00000, 0.75545, -0.47116], + [0.00000, -0.75545, -0.47116] + ], ['energy', 'gradient']) + + assert abs(res['energy'] - -5.07032508030) < 1e-8 + refgrad = np.array([[2.8722229638859E-17, -1.0296921891165E-16, 3.6346790530551E-03], + [-3.5498711199182E-17, -4.7850233706476E-03, -1.8173395265276E-03], + [6.7764815603231E-18, 4.7850233706476E-03, -1.8173395265275E-03]]) + for e1, r1 in zip(res['gradient'][0].flatten(), refgrad.flatten()): + assert abs(e1 - r1) < 1e-8 +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","utiltests/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","utiltests/test_context.py",".py","1687","79","import pytest + +from pysurf.utils.context_utils import SetOnException, DoOnException, ExitOnException + + +@pytest.fixture +def dct(): + return { + 'x': 5, + 'y': 10, + 'z': [1, 2, 3], + 'k': 'hallo' + } + + +def set_dct_value(dct, key, value): + dct[key] = value + + +def test_do_on_exception_succeed(dct): + + with DoOnException(set_dct_value, dct, 'x', 100): + set_dct_value(dct, 'x', 2) + + assert dct['x'] == 2 + + +def test_do_on_exception_fail(dct): + + with DoOnException(set_dct_value, dct, 'x', 1111): + raise Exception("""") + set_dct_value(dct, 'x', 2) + + assert dct['x'] == 1111 + + +def test_set_on_exception_fail(dct): + + with SetOnException(dct) as f: + f.set_value('x', 100) + raise Exception("""") + f.set_value('y', [1, 2, 3]) + f.set_value('z', 'hallo') + f.set_value('k', dict(a=10)) + x, y, z, k = f.result + assert x == dct['x'] + assert y == dct['y'] + assert z == dct['z'] + assert k == dct['k'] + + +def test_set_on_exception_succeed(dct): + + with SetOnException(dct) as f: + f.set_value('x', 100) + f.set_value('y', [1, 2, 3]) + f.set_value('z', 'hallo') + f.set_value('k', dict(a=10)) + x, y, z, k = f.result + assert x == 100 + assert y == [1, 2, 3] + assert z == 'hallo' + assert k == {'a': 10} + + +def test_exit_on_exception_fail(): + value = """" + with pytest.raises(SystemExit) as pytest_error: + with ExitOnException(): + raise Exception(value) + assert pytest_error.type == SystemExit + + +def test_exit_on_exception_succeed(): + value = """" + with ExitOnException(): + value = 25 + assert value == 25 +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","core_plugins/interfaces/pyscf.py",".py","6763","205","import numpy as np +# +from colt import Colt +from pysurf.system import ATOMID_TO_NAME +from pysurf.logger import Logger, get_logger +# +from pysurf.spp import AbinitioBase + + +#has to be adapted according to Max's new implementation +from pyscf import gto, dft, tddft, grad + +class DFT(Colt): + """""" class which executes the DFT and TDDFT calculations using the PySCF package """""" + + _user_input = """""" + functional = :: str :: ['pbe0'] + """""" + + implemented = ['energy', 'gradient'] + + + @classmethod + def from_config(cls, config, mol, nstates): + """""" """""" + functional = config['functional'] + return cls(functional, mol, nstates) + + + def __init__(self, functional, mol, nstates): + """""" + Parameters: + ----------- + functional: str + string of the functional + + mol: + mol object of PySCF + + nstates: int + number of states + + """""" + self.mol = mol + self.nstates = nstates + + mydft = dft.RKS(mol).x2c().set(xc=functional) + + self.dft_scanner = mydft.as_scanner() + self.dft_grad = mydft.nuc_grad_method().as_scanner() + + if self.nstates > 1: + # Switch to xcfun because 3rd order GGA functional derivative is not + # available in libxc + mydft._numint.libxc = dft.xcfun + mytddft = tddft.TDDFT(mydft) + self.tddft_scanner = mytddft.as_scanner() + self.tddft_scanner.nstates = self.nstates - 1 + + # PySCF-1.6.1 and newer supports the .Gradients method to create a grad + # object after grad module was imported. It is equivalent to call the + # .nuc_grad_method method. + self.tddft_grad = mytddft.Gradients().as_scanner() + + + def do_energy(self, request, mol): + """""" function to calculate the energies + Parameters: + ----------- + request: + request object + mol: + mol object with the correct coordinates + Return: + ------- + request where the energies are filled in + """""" + if self.nstates == 1: + en = [self.dft_scanner(mol)] + else: + en = self.tddft_scanner(mol) + + request.set('energy', en) + + def do_gradient(self, request, mol): + """""" function to calculate the gradients + Parameters: + ----------- + request: + request object + mol: + mol object with the correct coordinates + Return: + ------- + request where the gradients are filled in + """""" + grad = {} + for state in request.states: + if state == 0: + e_gs, grad_gs = self.dft_grad(mol) + grad[0] = grad_gs + else: + e, grad_tddft = self.tddft_grad(mol, state=state) + grad[state] = grad_tddft + request.set('gradient', grad) + +class PySCF(AbinitioBase): + """""" Interface for the PySCF code, which is free available + + The communication with the SPP is the get function with the request object. + The actual calculations are performed in separate classes. The classes need to have + a function for each property with the name do_prop, e.g. do_energy for energy calculations. + All properties which are implemented have to be stored in the implemented property of the + corresponding classes + """""" + + _user_input = """""" + basis = 631g* + # Calculation Method + method = DFT/TDDFT :: str :: [DFT/TDDFT] + """""" + + # implemented has to be overwritten by the individual classes for the methods + implemented = [] + + # dictionary containing the keywords for the method and the corresponding classes + methods = {'DFT/TDDFT': DFT} + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""method"", {name: method.colt_user_input + for name, method in cls.methods.items()}) + + @classmethod + def from_config(cls, config, atomids, nstates, nghost): + if nghost != 0: + raise ValueError(""Number of ghost states has to be 0 for the PySCF interface"") + method = config['method'].value + basis = config['basis'] + config_method = config['method'] + return cls(basis, method, atomids, nstates, config_method) + + + def __init__(self, basis, method, atomids, nstates, config_method): + """""" + Parameters: + ----------- + basis: str + containing the string of the basis set, directly passed to pyscf + + method: str + string of the method, which has to be in the methods dictionary + + atomids: list + list with the atomids + + nstates: int + number of states, including the ground-state, i.e. 1 is only the ground-state + + config_method: + Colt config for the individual method + """""" + self.mol = self._generate_pyscf_mol(basis, atomids) + self.nstates = nstates + self.atomids = atomids + self.basis = basis + # initializing the class for the corresponding method + self.calculator = self.methods[method].from_config(config_method, self.mol, nstates) + # update the implemented property + self.implemented = self.calculator.implemented + + + + def get(self, request): + """""" main interface with the SPP + + Paramters: + ---------- + request: + request instance of the Request class containing. It contains the coordinates + and the desired properties that should be calculated + + Return: + ------- + request: + request instance of the Request class where the desired information has been + filled in + """""" + # update coordinates + self.mol = self._generate_pyscf_mol(self.basis, self.atomids, request.crd) + for prop in request: + func = getattr(self.calculator, 'do_' + prop) + func(request, self.mol) + # + return request + + @staticmethod + def _generate_pyscf_mol(basis, atomids, crds=None): + """""" helper function to generate the mol object for Pyscf """""" + if crds is None: + crds = np.zeros((len(atomids), 3)) + mol = gto.M(atom=[[atom, crd] for atom, crd in zip(atomids, crds)], + basis = basis, unit='Bohr') + return mol +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","core_plugins/models/harmonic_oscillator_1d.py",".py","3744","124","import numpy as np +from collections import namedtuple + +from pysurf.spp import Model +from pysurf.system import Mode + + +class HarmonicOscillator1D(Model): + """""" Model for a 1D harmonic oscillator with 1 or 2 potential energy surfaces """""" + + _questions = """""" + e0 = 0.0 :: float + w0 = 1.0 :: float + x0 = 0.0 :: float + # Number of potential energy surfaces + npes = 1 :: str :: + + [npes(1)] + + [npes(2)] + e1 = 1.0 :: float + w1 = 1.0 :: float + x1 = 1.0 :: float + """""" + + implemented = [""energy"", ""gradient""] + masses = [1.0] + crd = [0.0] + frequencies = [1.0] + displacements = [[1.0]] + modes = [Mode(freq, dis) for freq, dis in zip(frequencies, displacements)] + + @classmethod + def from_config(cls, config): + e0 = config['e0'] + w0 = config['w0'] + x0 = config['x0'] + npes = int(config['npes'].value) + # + config_npes = config['npes'] + return cls(e0, w0, x0, npes, config_npes) + + def __init__(self, e0, w0, x0, npes, config_npes): + """""" init function for the 1D Harmonic Oscillator. Take care that the mass is set to 1, i.e. + fs are not an appropriate timescale for this model, but atomic units! + + Parameters: + ----------- + e0: float + Float number for the energy offset of the lowest PE surface + + w0: float + Float number for the frequency of the lowest PE surface + + x0: float + Float number for the shift of the lowest PE surface + + npes: int + 1 or 2, depending whether 1 or 2 PE surfaces should be in the model + + config_npes: + config object (similar to dictionary) containing the information of the + second PE surface. If npes == 1, it is not used. + """""" + + self.frequencies = [w0] + self.crd = [x0] + self.npes = int(npes) + self.w = [w0] + self.x = [x0] + self.e = [e0] + # + if self.npes == 2: + self.w += [config_npes['w1']] + self.x += [config_npes['x1']] + self.e += [config_npes['e1']] + + + def _energy(self, x): + """""" returns the energies of the model at position x """""" + energy = [] + for i in range(self.npes): + energy += [0.5*self.w[i]*(x - self.x[i])**2 + self.e[i]] + energy = np.array(energy).flatten() + return energy + + def _gradient(self, x): + """""" returns the gradients of the model at position x """""" + gradient = {} + for i in range(self.npes): + gradient[i] = np.array(self.w[i]*(x - self.x[i])) + return gradient + + + def get(self, request): + """""" the get function returns the adiabatic energies as well as the + gradient at the given position request.crd. + + Parameters: + ----------- + request: + request object containing the information, which properties are asked for + + + Returns: + -------- + request: + request object with the asked information + """""" + crd = request.crd + for prop in request: + if prop == 'energy': + request.set('energy', self._energy(crd)) + if prop == 'gradient': + request.set('gradient', self._gradient(crd)) + return request + + +if __name__==""__main__"": + HO = HarmonicOscillator1D(E0=0.0, w0=1.0, x0=0.0, npes=1, config_npes={}) + fake_request = namedtuple('request', 'crd energy gradient') + fake_request.crd = np.array([1.0]) + print(HO._energy(fake_request.crd)) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","core_plugins/interpolators/regression.py",".py","4133","110","from sklearn.linear_model import LinearRegression +from sklearn.preprocessing import PolynomialFeatures +from scipy.spatial.distance import cdist +# +from pysurf import Interpolator +from pysurf.spp import within_trust_radius, internal + + +class RegInterpolator(Interpolator): + """"""Basic Rbf interpolator"""""" + + _questions = """""" + trust_radius_general = 0.75 :: float + trust_radius_ci = 0.25 :: float + energy_threshold = 0.02 :: float + regression_order = 2 :: int + """""" + + @classmethod + def from_config(cls, config, db, properties, logger, energy_only, weightsfile, crdmode, fit_only): + trust_radius_general = config['trust_radius_general'] + trust_radius_CI = config['trust_radius_ci'] + energy_threshold = config['energy_threshold'] + order = config['regression_order'] + # + return cls(db, properties, logger, energy_only=energy_only, weightsfile=weightsfile, + crdmode=crdmode, trust_radius_general=trust_radius_general, + trust_radius_CI=trust_radius_CI, energy_threshold=energy_threshold, order=order, fit_only=fit_only) + + def __init__(self, db, properties, logger, energy_only=False, weightsfile=None, crdmode='cartesian', + trust_radius_general=0.75, trust_radius_CI=0.25, energy_threshold=0.02, order=2, fit_only=False): + + self.trust_radius_general = trust_radius_general + self.trust_radius_CI = trust_radius_CI + self.energy_threshold = energy_threshold + self.order = order + super().__init__(db, properties, logger, energy_only, weightsfile, crdmode=crdmode, fit_only=fit_only) + + + def get_interpolators(self, db, properties): + return {prop_name: Regression(self.crds, db[prop_name], self.order) + for prop_name in properties}, len(db['crd']) + + def get_interpolators_from_file(self, filename, properties): + pass + + def get(self, request): + """"""fill request + + Return request and if data is trustworthy or not + """""" + if self.crdmode == 'internal': + crd = internal(request.crd) + else: + crd = request.crd + # + _, trustworthy = within_trust_radius(crd, self.crds, radius=self.trust_radius_general, radius_ci=self.trust_radius_CI) +# crd = crd[:self.size] + for prop in request: + request.set(prop, self.interpolators[prop](crd, request)) + # + diffmin = np.min(np.diff(request['energy'])) + #compare energy differences with threshold from user + if diffmin < self.energy_threshold: + self.logger.info(f""Small energy gap of {diffmin}. Within CI radius: "" + str(trustworthy[1])) + is_trustworthy = trustworthy[1] + else: + self.logger.info('Large energy diffs. Within general radius: ' + str(trustworthy[0])) + is_trustworthy = trustworthy[0] + return request, is_trustworthy + + + def save(self, filename): + pass + + def _train(self): + self.crds = self.get_crd() + # + for name, interpolator in self.interpolators.items(): + if isinstance(interpolator, Regression): + interpolator.train() + + def loadweights(self, filename): + pass + + + +class Regression: + def __init__(self, crds, values, order): +# self.crds = np.copy(crds) + self.crds = crds + self.shape_crds = self.crds.shape + self.crds.resize(self.shape_crds[0], int(self.crds.size/self.shape_crds[0])) + self.values = np.copy(values) + self.shape_values = values.shape + self.values.resize(self.shape_values[0], int(self.values.size/self.shape_values[0])) + self.poly = PolynomialFeatures(degree=order) + + def train(self): + self.crds_poly = self.poly.fit_transform(self.crds) + self.regr = LinearRegression() + self.regr.fit(self.crds_poly, self.values) + + def __call__(self, crd, request): + crd = np.copy(crd) + crd = self.poly.fit_transform(crd.reshape((1,crd.size))) + res = self.regr.predict(crd) + res.resize(self.shape_values[1:]) + return res +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","core_plugins/interpolators/shepard.py",".py","2348","75","from pysurf import Interpolator + + +class ShepardInterpolator(Interpolator): + + def __init__(self, db, properties, logger, energy_only=False, weightsfile=None, crdmode='cartesian', fit_only=False): + super().__init__(db, properties, logger, energy_only, weightsfile, crdmode=crdmode, fit_only=fit_only) + self.crds = self.get_crd() + + def get(self, request): + """"""fill request and return True + """""" + # + weights, is_trustworthy = self._get_weights(request.crd) + # no entries in db... + if weights is None: + return request, False + # + for prop in request: + request.set(prop, self._get_property(weights, prop)) + # + return request, is_trustworthy + + def get_interpolators(self, db, properties): + return {prop_name: db[prop_name].shape[1:] for prop_name in properties}, len(db) + + def save(self, filename): + """"""Do nothing"""""" + + def loadweights(self, filename): + """"""Do nothing"""""" + + def _train(self): + pass + + def get_interpolators_from_file(self, filename, properties): + return {prop_name: self.db[prop_name].shape[1:] for prop_name in properties} + + def _get_property(self, weights, prop): + entries = db[prop] + shape = self.interpolators[prop] + res = np.zeros(shape, dtype=np.double) + for i, value in enumerate(entries): + res += weights[i]*value + res = res/np.sum(weights) + if shape == (1,): + return res[0] + return res + + def _get_weights(self, crd, trust_radius=0.2): + """"""How to handle zero division error"""""" + exact_agreement = False + crds = db['crd'] + size = len(crds) + if size == 0: + return None, False + # + weights = np.zeros(size, dtype=np.double) + # + is_trustworthy = False + for i in range(size): + diff = np.linalg.norm((crd-crds[i]))**2 + if diff < trust_radius: + is_trustworthy = True + if round(diff, 6) == 0: + exact_agreement = i + else: + weights[i] = 1./diff + if exact_agreement is False: + return weights, is_trustworthy + # + weights.fill(0.0) + weights[exact_agreement] = 1.0 + return weights, is_trustworthy +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","core_plugins/interpolators/nearest_neighbor.py",".py","10346","270","import numpy as np +# +from scipy.spatial import cKDTree +# +from pysurf import Interpolator +from pysurf.spp import internal + + +class NearestNeighborInterpolator(Interpolator): + """"""Nearest Neighbor Interpolator"""""" + + _questions = """""" + trust_radius_general = 0.75 :: float + trust_radius_ci = 0.25 :: float + energy_threshold = 0.02 :: float + norm = euclidean :: str :: [manhattan, euclidean, max] + """""" + + @classmethod + def from_config(cls, config, db, properties, logger, energy_only, weightsfile, crdmode, fit_only): + trust_radius_general = config['trust_radius_general'] + trust_radius_CI = config['trust_radius_ci'] + energy_threshold = config['energy_threshold'] + # + # convert input for norm in corresponding input (p-Norm) for the cKDTree + # for more information go to the cKDTree.query documentation + if config['norm'] == 'manhattan': + norm = 1 + elif config['norm'] == 'max': + norm = 'infinity' + else: + norm = 2 + # + return cls(db, properties, logger, energy_only=energy_only, weightsfile=weightsfile, + crdmode=crdmode, trust_radius_general=trust_radius_general, + trust_radius_CI=trust_radius_CI, energy_threshold=energy_threshold, + fit_only=fit_only, norm=norm) + + def __init__(self, db, properties, logger, energy_only=False, weightsfile=None, + crdmode='cartesian', fit_only=False, trust_radius_general=0.75, + trust_radius_CI=0.25, energy_threshold=0.02, norm='euclidean'): + """""" Storing user input as internal variables and call the init method of the + interpolator factory + + Parameters + ---------- + + db: + databse containing the datasets, on which the interpolation is + based on + + properties: list + properties (e.g. ['energy', 'gradient']) that should be fitted + + logger: + logger to log any incident + + energy_only: bool, optional + if energy_only is True, gradients are derived from the energy surface + + weightsfile: str, optional + filepath, where to save the weights. Not used in the case of the + NearestNeighborInterpolator, but needed for the overall framework. + + crdmode: str, optional + Variable to determine whether a coordinate transformation is applied before + fitting. + + fit_only: bool, optional + Flag to determine, whether no new QM calculations are performed + + trust_radius_general: float, optional + radius to determine whether fitted result is trustworthy in regions of a + large energy gap + + trust_radius_CI: float, optional + radius to determine whether fitted result is trustworthy in regions of a + small energy gap + + energy_threshold: float, optional + Threshold to distinguish regions of small and large energy gaps. + + norm: str, optional + Determining the norm for the nearest neighbor search. 'manhattan' corresponds + to the 1-norm, 'euclidean' is the 2-norm, and 'max' is the infinity norm. + """""" + # + self.trust_radius_general = trust_radius_general + self.trust_radius_CI = trust_radius_CI + self.energy_threshold = energy_threshold + self.tree = None + self.norm = norm + # + super().__init__(db, properties, logger, energy_only, weightsfile, crdmode=crdmode, + fit_only=fit_only) + + def get_interpolators(self, db, properties): + """""" For each property a separate interpolator is set up to be consistent with the + PySurf Interpolator Framework. To avoid setting up several cKDTrees the same + tree is used for all interpolators. + + Parameters: + ----------- + db: + databse containing the datasets, on which the interpolation is + based on + + properties: list + properties (e.g. ['energy', 'gradient']) that should be fitted + + + Returns + -------- + dictionary containing the property name as key and the corresponding + interpolator as value. + """""" + # + if self.tree is None: + self.tree = cKDTree(self.crds) + return {prop_name: NNInterpolator(db, self.tree, prop_name, norm=self.norm) + for prop_name in properties}, len(db) + + + def get_interpolators_from_file(self, filename, properties): + """""" Specifically for Machine Learning algorithms interpolators can be loaded from a file. + However, in the case of NearestNeighborInterpolation that is not used and implemented. + To be consistent, the get_interpolators method is called + + Parameters: + ----------- + filename: string + filepath where information of interpolators is stored. Not used here! + + properties: list + properties (e.g. ['energy', 'gradient']) that should be fitted + + + Returns + -------- + dictionary containing the property name as key and the corresponding + interpolator as value. + """""" + + self.logger.warning(""NearestNeighborInterpolator cannot be started from a file. "" + + ""Interpolators are set up from database"") + return self.get_interpolators(self.db, properties) + +# @Timer(name=""get"") + def get(self, request): + """""" Fill request and return request and if data is trustworthy or not + + Parameters: + ----------- + request: + request instance of request class, which is the standardized communication + between the spp and its clients + + Returns: + ----------- + request: + The same request instance as the input parameter, but the desired information + is filled in. + """""" + # + # Convert coordinate into desired format + if self.crdmode == 'internal': + crd = internal(request.crd) + else: + crd = request.crd + # + # Make nearest neighbor search once and pass it to all interpolators + dist, idx = self.tree.query(crd, p=self.norm) + for prop in request: + request.set(prop, self.interpolators[prop](crd, request, idx)) + # + # Determine whether result is trustworthy, using the trust radii + diffmin = np.min(np.diff(request['energy'])) + is_trustworthy = False + if diffmin < self.energy_threshold: + if dist < self.trust_radius_CI: is_trustworthy = True + else: + if dist < self.trust_radius_general: is_trustworthy = True + # + return request, is_trustworthy + + def loadweights(self, filename): + """""" Weights are loaded for the interpolators from a file. As the + NearestNeighborInterpolator is not using the save option, also + here, interpolators are just set up from the database + + Parameters: + ----------- + filename, str: + filepath of the file containing the weights. Not used here! + """""" + # + self.logger.warning(""NearestNeighborInterpolator cannot load weights, interpolators are "" + + ""set up from DB"") + # As saving is not used, interpolators are set up from the database + self.get_interpolators(self.db, self.properties) + + def save(self, filename): + """""" Method to save the interpolators to a file. Not used here! + + Parameters: + ----------- + filename: + filepath where to save the information. Not used here! + """""" + # + self.logger.warning(""NearestNeighborInterpolator cannot be saved to a file"") + +# @Timer(name=""train"") + def _train(self): + """""" Method to train the interpolators. In the case of the NearestNeighborInterpolator + the cKDTree has to be updated. + """""" + #update cKDTree + self.tree = cKDTree(self.crds) + +class NNInterpolator(): + """""" NearestNeighborInterpolator for one property. """""" + def __init__(self, db, ckdtree, prop, norm=2): + """""" + Parameters: + ----------- + db: + database containing the datasets on which the interpolation is based on + + ckdtree: + cKDTree of the coordinates for the interpolation + + prop: str + property that should be fitted. No sanity check with the database + is made! + + norm: + norm for the cDKTree.query + """""" + # + self.db = db + self.tree = ckdtree + self.prop = prop + self.norm = norm + + def __call__(self, crd, request, idx=None): + """""" Returns the desired property of the nearest neighbor to the given geometry + + Parameters: + ----------- + crd: + coordinates where the property is requested. The shape has to be consistent + with the shape of the coordinates in the cKDTree + + request: + Instance of the SPP request. Not used here, but needed for consistency. + + idx: int, optional + if idx is an integer, no nearest neighbor search is performed, but the + property of the specific index is returned + + Returns: + -------- + entry of the DB of the property next to the desired coordinate + """""" + # + if idx is None: + dist, idx = self.tree.query(crd, p=self.norm) + return self.db.get(self.prop, idx) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","core_plugins/interpolators/rbf.py",".py","7513","204","import numpy as np +# +from scipy.linalg import lu_factor, lu_solve +from scipy.spatial.distance import cdist, pdist, squareform +# +from pysurf import Interpolator +from pysurf.spp import within_trust_radius, internal +from pysurf.database.dbtools import DBVariable +from pysurf.database.database import Database +# +#from codetiming import Timer + +class RbfInterpolator(Interpolator): + """"""Basic Rbf interpolator"""""" + + _questions = """""" + trust_radius_general = 0.75 :: float + trust_radius_ci = 0.25 :: float + energy_threshold = 0.02 :: float + epsilon = :: float, optional + """""" + + @classmethod + def from_config(cls, config, db, properties, logger, energy_only, weightsfile, crdmode, fit_only): + trust_radius_general = config['trust_radius_general'] + trust_radius_CI = config['trust_radius_ci'] + energy_threshold = config['energy_threshold'] + epsilon = config['epsilon'] + # + return cls(db, properties, logger, energy_only=energy_only, weightsfile=weightsfile, + crdmode=crdmode, trust_radius_general=trust_radius_general, + trust_radius_CI=trust_radius_CI, energy_threshold=energy_threshold, fit_only=fit_only, epsilon=epsilon) + + def __init__(self, db, properties, logger, energy_only=False, weightsfile=None, crdmode='cartesian', fit_only=False, + trust_radius_general=0.75, trust_radius_CI=0.25, energy_threshold=0.02, epsilon=None): + + self.trust_radius_general = trust_radius_general + self.trust_radius_CI = trust_radius_CI + self.energy_threshold = energy_threshold + self.trust_radius = (self.trust_radius_general + self.trust_radius_CI)/2. + if epsilon is not None: + self.epsilon = epsilon + else: + self.epsilon = trust_radius_CI + super().__init__(db, properties, logger, energy_only, weightsfile, crdmode=crdmode, fit_only=fit_only) + + def get_interpolators(self, db, properties): + """""" """""" + A = self._compute_a(self.crds) + lu_piv = lu_factor(A) + return {prop_name: Rbf.from_lu_factors(lu_piv, db[prop_name], self) + for prop_name in properties}, len(db) + + def get_interpolators_from_file(self, filename, properties): + db = Database.load_db(filename) + out = {} + for prop_name in db.keys(): + if prop_name.endswith('_shape'): + continue + if prop_name == 'rbf_epsilon': + self.epsilon = np.copy(db['rbf_epsilon'])[0] + continue + out[prop_name] = Rbf(np.copy(db[prop_name]), tuple(np.copy(db[prop_name+'_shape'])), self) + if not all(prop in out for prop in properties): + raise Exception(""Cannot fit all properties"") + return out + +# @Timer(name=""get"") + def get(self, request): + """"""fill request + + Return request and if data is trustworthy or not + """""" + if self.crdmode == 'internal': + crd = internal(request.crd) + else: + crd = request.crd + # + _, trustworthy = within_trust_radius(crd, self.crds, radius=self.trust_radius_general, radius_ci=self.trust_radius_CI) + + for prop in request: + request.set(prop, self.interpolators[prop](crd, request)) + # + diffmin = np.min(np.diff(request['energy'])) + #compare energy differences with threshold from user + if diffmin < self.energy_threshold: + self.logger.info(f""Small energy gap of {diffmin}. Within CI radius: "" + str(trustworthy[1])) + is_trustworthy = trustworthy[1] + else: + self.logger.info('Large energy diffs. Within general radius: ' + str(trustworthy[0])) + is_trustworthy = trustworthy[0] + return request, is_trustworthy + + def loadweights(self, filename): + """"""Load existing weights"""""" + db = Database.load_db(filename) + for prop, rbf in self.interpolators.items(): + if prop == 'gradient' and self.energy_only is True: + continue + if prop not in db: + raise Exception(""property needs to be implemented"") + rbf.nodes = np.copy(db[prop]) + rbf.shape = np.copy(db[prop+'_shape']) + self.epsilon = np.copy(db['rbf_epsilon']) + + def save(self, filename): + settings = {'dimensions': {}, 'variables': {}} + dimensions = settings['dimensions'] + variables = settings['variables'] + + for prop, rbf in self.interpolators.items(): + if not isinstance(rbf, Rbf): + continue + lshape = len(rbf.shape) + dimensions[str(lshape)] = lshape + for num in rbf.nodes.shape: + dimensions[str(num)] = num + variables[prop] = DBVariable(np.double, tuple(str(num) for num in rbf.nodes.shape)) + variables[prop+'_shape'] = DBVariable(np.int, tuple(str(lshape))) + dimensions['1'] = 1 + variables['rbf_epsilon'] = DBVariable(np.double, ('1',)) + # + db = Database(filename, settings) + # + for prop, rbf in self.interpolators.items(): + if not isinstance(rbf, Rbf): + continue + db[prop] = rbf.nodes + db[prop+'_shape'] = rbf.shape + # + db['rbf_epsilon'] = self.epsilon + +# @Timer(name=""train"") + def _train(self): + """"""set rbf weights, based on the current crds"""""" +# self.crds = self.get_crd() + A = self._compute_a(self.crds) + lu_piv = lu_factor(A) + # + for name, interpolator in self.interpolators.items(): + if isinstance(interpolator, Rbf): + interpolator.update(lu_piv, self.db[name]) + + def _compute_a(self, x): + # + shape = x.shape + if len(shape) == 3: + dist = pdist(x.reshape((shape[0], shape[1]*shape[2]))) + else: + dist = pdist(x) + A = squareform(dist) + return weight(A, self.epsilon) + + +class Rbf: + + def __init__(self, nodes, shape, parent): + self.nodes = nodes + self.shape = shape + self.parent = parent + + def update(self, lu_piv, prop): + self.nodes, self.shape = self._setup(lu_piv, prop) + + @classmethod + def from_lu_factors(cls, lu_piv, prop, parent): + nodes, shape = cls._setup(lu_piv, prop) + return cls(nodes, shape, parent) + + def __call__(self, crd, request): + shape = self.parent.crds.shape + if len(shape) == 3: + dist = cdist([np.array(crd).flatten()], self.parent.crds.reshape((shape[0], shape[1]*shape[2]))) + else: + dist = cdist([np.array(crd).flatten()], self.parent.crds) + crd = weight(dist, self.parent.epsilon) + if len(self.shape) == 1 and self.shape[0] == 1: + return np.dot(crd, self.nodes).reshape(self.shape)[0] + return np.dot(crd, self.nodes).reshape(self.shape) + + @staticmethod + def _setup(lu_piv, prop): + prop = np.array(prop) + shape = prop.shape + size = shape[0] + dim = 1 + for i in shape[1:]: + dim *= i + # + prop = prop.reshape((size, dim)) + # + if dim == 1: + nodes = lu_solve(lu_piv, prop) + else: + nodes = np.zeros((size, dim), dtype=prop.dtype) + for i in range(dim): + nodes[:,i] = lu_solve(lu_piv, prop[:,i]) + return nodes, shape[1:] + + +def weight(r, epsilon): +# return r + return np.sqrt((1.0/epsilon*r)**2 + 1) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","examples/pyrazine_database/get_population.py",".py","463","22","import os +import numpy as np + +lsdir = os.listdir('./') + +counter = 0 +population = np.zeros((10001,3), dtype=int) +for obj in lsdir: + if obj.startswith('traj.'): + counter += 1 + with open(obj + '/energy.txt') as infile: + inp = infile.readlines() + for i in range(1, len(inp)): + state = int(inp[i].split()[0]) + population[i,state] += 1 + +population = population/float(counter) + +np.savetxt('pop.dat',population) + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","examples/pyrazine_database/convert_to_xyz.py",".py","853","24","import os +import numpy as np + + +listdir = os.listdir('./') +vfloat = np.vectorize(float) + +atoms = ['C','N','C','C','H','H','N','C','H','H'] +bohr2angstrom = 0.529177208 + +for obj in listdir: + if obj.startswith('traj.'): + if os.path.isfile(obj + '/crd.txt'): + with open(obj + '/crd.txt') as infile: + inp = infile.readlines() + with open(obj + '/crd.xyz', 'w') as outfile: + for i in range(1,len(inp)): + outfile.write('10\n') + outfile.write(str(i)+'\n') + crds = vfloat(inp[i].split()).reshape(10,3) + for j in range(len(crds)): + outfile.write(""{0} {1:12.8f} {2:12.8f} {3:12.8f}\n"".format(atoms[j], crds[j,0]*bohr2angstrom, + crds[j,1]*bohr2angstrom, crds[j,2]*bohr2angstrom)) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","examples/new_spp/spp.py",".py","421","13","from pysurf import SurfacePointProvider +from pysurf.utils import exists_and_isfile +from pysurf.colt import AskQuestions +b = AskQuestions(SurfacePointProvider.questions) +print(b.literals.data) +print(b.literals._literals) +SurfacePointProvider.generate_input('spp.inp', config=None) +spp = SurfacePointProvider('spp.inp', ['energy', 'gradient'], 2, 3, ['h', 'h']) + + + +print(spp.request([[1, 0, 0], [0, 0, 0]], ['gradient'])) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","examples/pyrazine_energyonly/get_population.py",".py","463","22","import os +import numpy as np + +lsdir = os.listdir('./') + +counter = 0 +population = np.zeros((10001,3), dtype=int) +for obj in lsdir: + if obj.startswith('traj.'): + counter += 1 + with open(obj + '/energy.txt') as infile: + inp = infile.readlines() + for i in range(1, len(inp)): + state = int(inp[i].split()[0]) + population[i,state] += 1 + +population = population/float(counter) + +np.savetxt('pop.dat',population) + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","examples/pyrazine_energyonly/convert_to_xyz.py",".py","853","24","import os +import numpy as np + + +listdir = os.listdir('./') +vfloat = np.vectorize(float) + +atoms = ['C','N','C','C','H','H','N','C','H','H'] +bohr2angstrom = 0.529177208 + +for obj in listdir: + if obj.startswith('traj.'): + if os.path.isfile(obj + '/crd.txt'): + with open(obj + '/crd.txt') as infile: + inp = infile.readlines() + with open(obj + '/crd.xyz', 'w') as outfile: + for i in range(1,len(inp)): + outfile.write('10\n') + outfile.write(str(i)+'\n') + crds = vfloat(inp[i].split()).reshape(10,3) + for j in range(len(crds)): + outfile.write(""{0} {1:12.8f} {2:12.8f} {3:12.8f}\n"".format(atoms[j], crds[j,0]*bohr2angstrom, + crds[j,1]*bohr2angstrom, crds[j,2]*bohr2angstrom)) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/setup.py",".py","1067","36","from abc import abstractmethod +# +from .utils import SubfolderHandle +from .logger import get_logger +# +from colt import Colt + + +class SetupBase(Colt, SubfolderHandle): + + folder = None + subfolder = None + + def __init__(self, logger=None, digit=8): + if self.folder is None: + raise Exception(""self.folder needs to be set!"") + if self.subfolder is None: + raise Exception(""self.subfolder needs to be set!"") + # + SubfolderHandle.__init__(self, self.folder, self.subfolder) + # + if logger is None: + self.logger = get_logger(None, """") + else: + self.logger = logger + + def setup_folders(self, lst, *args, **kwargs): + self.logger.info(f'Start setting up folders\n') + for idx, folder in self.setupiter(lst): + self.logger.info(f'Create folder {folder}\n') + self.setup_folder(idx, folder, *args, **kwargs) + + @abstractmethod + def setup_folder(self, number, foldername, *args, **kwargs): + """"""fill the folder with data"""""" +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/fileparser.py",".py","1249","50","from .system.atominfo import ATOMID_TO_NAME +# +from .utils.osutils import exists_and_isfile +from .utils.constants import angstrom2bohr + + +def read_geom(filename): + + if not exists_and_isfile(filename): + raise Exception(""File '%s' does not exisits"" % filename) + + ftype = filename.rpartition('.')[2] + + if ftype == 'xyz': + return _read_xyz(filename) + + raise Exception(""Filetype '%s' unkown!"" % ftype) + + +def _read_xyz(filename): + atoms = [] + crds = [] + with open(filename, 'r') as f: + natoms = int(f.readline()) + f.readline() + for _ in range(natoms): + line = f.readline() + split_line = line.split() + if len(split_line) == 4: + atoms.append(split_line[0]) + crds.append([float(c)*angstrom2bohr for c in split_line[1:5]]) + + atoms_are_numbers = False + + try: + int(atoms[0]) + atoms_are_numbers = True + except: + pass + + if atoms_are_numbers is True: + for idx, atom in enumerate(atoms): + atoms[idx] = ATOMID_TO_NAME[int(atom)] + else: + for idx, atom in enumerate(atoms): + atom = atom[0].upper() + atom[1:].lower() + atoms[idx] = atom + + return natoms, atoms, crds +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/molden.py",".py","4858","213","from qctools import generate_filereader +from qctools import Event +from qctools import register_event_type +from qctools.events import join_events + + +def event_getter_between(): + + keyword_args = {} + args = ['start', 'end'] + + def between(iterator, start, end): + + + if start is None: + inbetween = True + else: + inbetween = False + # search for start + for line in iterator: + if start in line: + inbetween = True + break + # return + if inbetween is False: + return None, -1 + + out = [] + for line in iterator: + if end in line: + break + out.append(line) + return out, 1 + + return keyword_args, args, between + + +register_event_type('between', event_getter_between) + + +def length(iterator): + return len(iterator) + +NAtoms = Event('NAtoms', + 'between', {'start': '[Atoms]', + 'end': '[FREQ]', + 'ishift': 1}, + func=length, +) + +NFreqs = Event('NFreqs', + 'between', {'start': None, + 'end': '[FR-COORD]'}, + func=length, +) + +Info = join_events(NAtoms, NFreqs) +Info._settings['nmax'] = 1 + +Freqs = Event('Freqs', + 'xgrep', {'keyword': '[FREQ]', + 'ilen': 'NFreqs', + 'ishift': 1,}, + func='split', + func_kwargs={'idx': 0, 'typ': float}, + settings = {'reset': True} +) + + +FrCoords = Event('FrCoords', + 'xgrep', {'keyword': '[FR-COORD]', + 'ilen': 'NAtoms', + 'ishift': 1}, + func='split', + func_kwargs={ + 'idx': [0, 1, 2, 3], + 'typ': [str, float, float, float], + }, +) + + +def parse_fr_norm_coords(result): + vibration = {} + active = -1 + for line in result: + if 'vibration' in line: + active += 1 + vibration[active] = [] + continue + vibration[active].append(list(map(float, line.split()))) + return vibration + + +FrNormCoords = Event('FrNormCoords', + 'xgrep', {'keyword': '[FR-NORM-COORD]', + 'ilen': 'NFreqs*(NAtoms+1)', + 'ishift': 1, + }, + func=parse_fr_norm_coords, +) + + +MoldenParser = generate_filereader('MoldenParser', { + 'Info': Info, + 'Freqs': Freqs, + 'FrCoords': FrCoords, + 'FrNormCoords': FrNormCoords, +}) + + +class FileIterator: + + def __init__(self, filename): + with open(filename, 'r') as fh: + self.lines = fh.readlines() + self._current = 0 + self._nele = len(self.lines) + + def inc(self): + self._current += 1 + + def next(self): + if self._current < self._nele: + line = self.lines[self._current] + self._current += 1 + return line + return None + + def __iter__(self): + return self + + def __next__(self): + line = self.next() + if line is None: + raise StopIteration + return line + + def peek(self, n=0): + number = self._current + n + if number < self._nele: + line = self.lines[number] + return line + + +def parse_freqs(fh): + + freqs = [] + + while True: + line = fh.peek() + if line is None or '[' in line: + break + fh.inc() + freqs.append(float(line)) + + return freqs + + +def parse_vibration(fh): + + vibrations = [] + while True: + line = fh.peek() + if line is None or '[' in line or 'vibration' in line: + break + fh.inc() + x, y, z = line.split() + vibrations.append([float(x), float(y), float(z)]) + return vibrations + + +def parse_vibrations(fh): + + vibrations = [] + while True: + line = fh.peek() + if 'vibration' in line: + fh.inc() + vibrations.append(parse_vibration(fh)) + else: + break + return vibrations + + +def parse_frcoords(fh): + coords = [] + while True: + line = fh.peek() + if '[' in line or line is None: + break + atom, x, y, z = line.split() + coords.append([atom, float(x), float(y), float(z)]) + fh.inc() + return coords + + +def parse_molden(filename): + + fh = FileIterator(filename) + + for line in fh: + line = line.strip() + if line == '[FREQ]': + freqs = parse_freqs(fh) + elif line == '[FR-COORD]': + coords = parse_frcoords(fh) + elif line == '[FR-NORM-COORD]': + vibrations = parse_vibrations(fh) + #elif '[Atoms]' in line: + # coords = parse_coords(line, fh) + + return freqs, coords, vibrations +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/__init__.py",".py","672","23","# -*- coding: utf-8 -*- + +""""""Top-level package for pysurf."""""" + +__author__ = """"""Maximilian F.S.J. Menger, Johannes Ehrmaier"""""" +__email__ = 'maximilian.menger@pci.uni-heidelberg.de' +__version__ = '0.1.0' + +# +import os +# +from colt import PluginLoader +from .spp.spp import SurfacePointProvider, get_spp +from .spp import AbinitioBase, Model, Interpolator +# load plugins +base = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +core_plugins = os.path.join(base, ""core_plugins"") +user_plugins = os.path.join(base, ""plugins"") +# load core plugins +PluginLoader(core_plugins, ignorefile='plugins.ini') +# load user plugins +PluginLoader(user_plugins, ignorefile='plugins.ini') +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/constants.py",".py","120","3","U_TO_AMU = 1./5.4857990943e-4 # atomic mass units to multiple of me +CM_TO_HARTREE = 1./219474.6 # cm-1 to Hartree +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/logger.py",".py","5886","176","from datetime import datetime +from functools import partial +# +from .utils.context_utils import DoOnException +from .utils.context_utils import ExitOnException +from .utils.context_utils import BaseContextDecorator + + +__all__ = [""get_logger"", ""Logger""] + + +def get_logger(filename, name, sublogger=None, mode=""w""): + """"""initialize a new logger"""""" + fhandle = Logger.get_fhandle(filename, mode) + return Logger(name, fhandle, sublogger) + + +class LogBlock(BaseContextDecorator): + + def __init__(self, logger, txt=None): + self.txt = txt + self.logger = logger + + def set_text(self, txt): + self.txt = txt + + def __enter__(self): + self.logger.info(f""\nEnter '{self.txt}' at: "" + f""{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}"") + + def __exit__(self, exception_type, exception_value, traceback): + self.logger.info(f""Leave '{self.txt}' at: "" + f""{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n"") + + +class _LoggerBase(object): + + def __init__(self, name, fhandle): + self.name = name + self.fhandle = fhandle + self._info_block = LogBlock(self) + self._error_block = DoOnException(self.error) + + @staticmethod + def get_fhandle(filename, mode=""w""): + """"""Generate a new file handle"""""" + return _TextHandle(filename, mode) + + def set_fhandle(self, handle): + """"""set fhandle to new handle"""""" + if isinstance(handle, _TextHandle): + pass + elif isinstance(handle, str) or isinstance(handle, None): + handle = self.get_fhandle(handle) + else: + raise Exception(""new file handle can only be: \n"" + ""None -> Console logger\n"" + ""filename -> File logger \n"" + ""logger -> logger \n"") + self.fhandle = handle + + def debug(self, txt): + self.fhandle.write(f""Debug: {txt}\n"") + + def header(self, name, dct=None): + txt = '********************************************************************************\n' + txt += '*{:^78}*\n'.format(name) + txt += '*{:^78}*\n'.format(' ') + txt += f""* {'Date':15}: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}"".ljust(79) + '*\n' + txt += '*{:^78}*\n'.format(' ') + if dct is not None: + for key in dct: + inter = f""* {key:15}: {dct[key]}"" + if len(inter) < 80: + inter = inter.ljust(79) + '*\n' + else: + inter_new = inter[0:79] + '*\n' + inter = inter[79:] + while len(inter) > 60: + inter_new += ""* {:^15} "".format(' ') + inter[0:60] + '*\n' + inter = inter[60:] + inter_new += ""* {:^15} "".format(' ') + inter.ljust(60) + '*\n' + inter = inter_new + txt += inter + txt += '*{:^78}*\n'.format(' ') + txt += '********************************************************************************\n\n\n' + self.fhandle.write(f""{txt}\n"") + + + def info(self, txt): + self.fhandle.write(f""{txt}\n"") + + def warning(self, txt): + self.fhandle.write(f""Warning: {txt}\n"") + + def info_block(self, txt): + self._info_block.set_text(txt) + return self._info_block + + def exit_on_exception(self, txt): + self._error_block.set_args(txt) + return self._error_block + + def error(self, txt): + error = (f""in '{self.name}' at "" + f""{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}:\n"" + f""{txt}\n\n"") + # + self.fhandle.write(f""Error Termination {error}"") + # raise Exception + with ExitOnException(): + raise Exception(error) + + +class Logger(_LoggerBase): + + def __init__(self, name, fhandle=None, handles=None): + if fhandle is None: + # create an terminal logger + fhandle = self.get_fhandle(None) + _LoggerBase.__init__(self, name, fhandle) + self.sublogger = self._generate_sublogger(handles) + + def __getitem__(self, key): + return self.sublogger[key] + + def add_sublogger(self, sublogger): + """"""add new sublogger to logger"""""" + if sublogger is None: + return + if isinstance(sublogger, str): + sublogger = [sublogger] + # + sublogger = self._generate_sublogger(sublogger) + # register new keys + for key, value in sublogger.items(): + self.sublogger[key] = value + + def _generate_sublogger(self, sublogger): + """"""create subloggers"""""" + if sublogger is None: + return + if isinstance(sublogger, list): + return {logger: Logger(f""{self.name.upper()}-{logger}"", self.fhandle) + for logger in sublogger} + if isinstance(sublogger, dict): + return {logger_name: Logger(f""{self.name.upper()}-{logger_name}"", + self.fhandle, sub_logger) + for logger_name, sub_logger in sublogger.items()} + if isinstance(sublogger, tuple): + return {logger: Logger(f""{self.name.upper()}-{logger}"", self.fhandle) + for logger in sublogger} + raise Exception(""Sublogger can only be tuple, dict, list or None!"") + + +class _TextHandle(object): + + def __init__(self, filename=None, mode=""w""): + self._setup(filename, mode=mode) + + def _setup(self, filename, mode=""w""): + if filename is None: + self._f = None + self.write = partial(print, end='') + else: + self._f = open(filename, mode=mode) + self.write = self._write + + def _write(self, txt): + self._f.write(txt) + self._f.flush() + + def __del__(self): + if self._f is not None: + self._f.close() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/design.py",".py","544","14","from itertools import cycle +from collections import namedtuple + + +RGBColor = namedtuple(""RGBColor"", [""red"", ""green"", ""blue""]) +# +BLACK = RGBColor(0,0,0) +BLUE = RGBColor(63/255, 81/255, 181/255) +RED = RGBColor(253/255, 86/255, 33/255) +YELLOW = RGBColor(255/255, 233/255, 75/255) +GREEN = RGBColor(138/255, 193/255, 73/255) +# +colors = cycle([BLACK, BLUE, RED, GREEN, YELLOW]) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/__init__.py",".py","120","4","from .folder_handle import SubfolderHandle +from .folder_handle import FileHandle +from .osutils import exists_and_isfile +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/constants.py",".py","101","5","bohr2angstrom = 0.529177208 +angstrom2bohr = 1/0.529177208 +fs2au = 41.341374575751 +au2ev = 27.211396 +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/colors.py",".py","268","14","COLORS = { + 'lightblue': '#1c98fa', + 'darkblue': '#040443', + 'lightgrey': '#c2c8d0', + 'darkgrey': '#525252', + 'black': '#040404', + 'orange': '#fa6e1c', + 'red': '#fa361c', + 'gold': '#fadc1c', + 'purple': '#bb1cfa', + 'lime': '#1cfa7c', + 'green': '#5bfa1c', +} +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/osutils.py",".py","395","16","import os + + +def exists_and_isfile(filename): + """"""if file does not exist return False + if file exisits check if isfile or raise Exception + """""" + if filename is None: + return False + if os.path.exists(filename): + if os.path.isfile(filename): + return True + else: + raise Exception(""Object '%s' exisits but is not a file!"") + return False +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/folder_handle.py",".py","3894","127","import os +import re +from .osutils import exists_and_isfile + +def create_folder(folder): + if os.path.exists(folder): + if not os.path.isdir(folder): + raise Exception(f""{folder} needs to be a folder"") + else: + os.mkdir(folder) + + +class SubfolderHandle: + """"""Creates a useful handle to an folder tree of following structure + + folder/ + subfolder_0000001/ + ouput.txt + input.txt + value.txt + subfolder_0000002/ + subfolder_0000003/ + ... + subfolder_0001000/ + subfolder_0001001/ + subfolder_0001002/ + ... + + """""" + + def __init__(self, folder, subfolder, digits=8): + """""" """""" + self.parent = os.getcwd() + self.main_folder = self._create_main_folder(folder) + self.template, self.reg = self._setup(subfolder, digits) + self._sanity_check() + self._folders = self._get_folders() + + def fileiter(self, filename): + """"""Returns an iterator over all files with name + filename in folder/subfolder_*/ """""" + for folder in self._folders: + name = os.path.join(folder, filename) + if os.path.isfile(name): + yield name + + def setupiter(self, lst): + """"""Returns an iterator over all files with name + filename in folder/subfolder_*/ """""" + for idx in lst: + name = self._folder_path(idx) + if not os.path.exists(name): + create_folder(name) + yield idx, name + + def folderiter(self, lst): + """"""iterates of the folders idx and names of folders + with a certain idx which do not exists yet and creates them + """""" + for idx in lst: + name = self._folder_path(idx) + create_folder(name) + yield name + self._update_folders() + + def get_file(self, filename, idx): + filepath = os.path.join(self.main_folder, self._folder_name(idx), filename) + if exists_and_isfile(filepath): + return filepath + else: + return None + + def generate_folders(self, lst): + """"""Generates folders"""""" + for idx in lst: + create_folder(self._folder_path(idx)) + self._update_folders() + + def __iter__(self): + for folder in self._folders: + yield folder + + def __len__(self): + return len(self._folders) + + def _folder_path(self, idx): + """"""Return absolute path to an given folder"""""" + return os.path.join(self.main_folder, self._folder_name(idx)) + + def _folder_name(self, idx): + return self.template % idx + + def _update_folders(self): + self._folders = self._get_folders() + + def _setup(self, subfolder, digits): + template = f""{subfolder}_%0{digits}d"" + # we except any digits in case one changes those + regex = f""{subfolder}_"" + r""\d+"" + reg = re.compile(regex) + return template, reg + + def _create_main_folder(self, folder): + folder = os.path.abspath(folder) + create_folder(folder) + return folder + + def _get_folders(self): + return tuple(sorted(os.path.join(self.main_folder, filename) + for filename in os.listdir(self.main_folder) + if self.reg.match(filename) is not None)) + + def _sanity_check(self): + name = self._folder_name(1) + if self.reg.match(name) is None: + raise Exception(""template and regex are not in sync"") + + +class FileHandle(SubfolderHandle): + def __init__(self, folder, subfolder, filename): + super().__init__(folder, subfolder) + self.files = self.fileiter(filename) + + def __iter__(self): + for f in self.files: + yield f +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/strutils.py",".py","228","11","import re + +def split_str(a): + a = a.strip('(){}[] ') + asp = re.split(r'[;|,\s\(\)|\*|\n]',a) + asp_final = [] + for i in range(len(asp)): + if asp[i] != '': + asp_final += [asp[i]] + return asp_final +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/decorator.py",".py","1967","76","from functools import wraps +import types +import time + +_total_times = {} + +def log(func): + + name = func.__name__ + + @wraps(func) + def _wrapper(*args, **kwargs): + print(""Entering Function '%s'"" % name) + result = func(*args, **kwargs) + print(""Leaving Function '%s'"" % name) + return result + return _wrapper + + +def timeit(func): + + global _total_times + + name = func.__name__ + _total_times[name] = [0.0, 0] + + @wraps(func) + def _wrapper(*args, **kwargs): + start = time.time() + result = func(*args, **kwargs) + end = time.time() + # count total costs + _total_times[name][0] += end-start + # count times called + _total_times[name][1] += 1 + return result + return _wrapper + + +def decorate_all_members(*decorators): + + def _cls_wrapper(cls): + # save names and pointer to function + function_names = [] + functions = [] + # + for name in dir(cls): + attribute = getattr(cls, name) + # get function and no dunder methods! + if isinstance(attribute, types.FunctionType): + # add class to function name + attribute.__name__ = cls.__name__ + ""_"" + attribute.__name__ + # create decorated function + for decorator in decorators: + attribute = decorator(attribute) + # save function and function_name + functions.append(attribute) + function_names.append(name) + + # modify the attributes of the class + for i, name in enumerate(function_names): + setattr(cls, name, functions[i]) + # return the class + return cls + return _cls_wrapper + + +def print_timelog(): + global _total_times + + print(""Function call log:"") + form = ""%20s: time = %12.8f ncall = %d "" + + for name, (time, ncalled) in _total_times.items(): + print(form % (name, time, ncalled)) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/utils/context_utils.py",".py","2293","77","import sys +from functools import wraps +from collections import namedtuple + + +class BaseContextDecorator(object): + + def __enter__(self): + pass + + def __exit__(self, exception_type, exception_value, traceback): + pass + + def __call__(self, func): + + @wraps(func) + def _wrapper(*args, **kwargs): + with self: + return func(*args, **kwargs) + return _wrapper + + + +class DoOnException(BaseContextDecorator): + """"""Performs fallback function, if exception is raised"""""" + + def __init__(self, fallback, *args, **kwargs): + self._args = args + self._kwargs = kwargs + self._fallback = fallback + + def set_args(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + + def __exit__(self, exception_type, exception_value, traceback): + if exception_type is not None: + self._fallback(*self._args, **self._kwargs) + return True + +class SetOnException(BaseContextDecorator): + + def __init__(self, dct, reset_all=True): + """"""Context Manager to set defaults on exception, + + Args: + dct, dict = dictionary containing all varibales and their corresponding + default values + """""" + self._tuple = namedtuple(""RESULT"", (key for key in dct)) + self._dct = {key: None for key in dct} + self._defaults = dct + self.result = None + + def set_value(self, name, value): + if name in self._dct: + self._dct[name] = value + + def __enter__(self): + return self + + def __exit__(self, exception_type, exception_value, traceback): + if exception_type is not None: + self.result = self._tuple(*(value for value in self._defaults.values())) + return True + self.result = self._tuple(*(value if value is not None else self._defaults[key] for key, value in self._dct.items())) + + def __call__(self, func): + raise NotImplementedError(""SetOnException cannot be used as decorator"") + +class ExitOnException(BaseContextDecorator): + + def __exit__(self, exception_type, exception_value, traceback): + if exception_type is not None: + print(f""Error Termination: {exception_value}"") + sys.exit() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/system/mode.py",".py","89","4","from collections import namedtuple + +Mode = namedtuple(""Mode"", [""freq"", ""displacements""]) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/system/__init__.py",".py","162","6","from .molecule import Molecule +from .mode import Mode +from .model_info import ModelInfo +from .atominfo import ATOMID_TO_NAME +from .atominfo import ATOMNAME_TO_ID +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/system/model_info.py",".py","92","5","from collections import namedtuple + + +ModelInfo = namedtuple(""ModelInfo"", [""crd"", ""masses""]) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/system/atominfo.py",".py","8321","460","ATOMNAME_TO_ID = { + ""H"": 1, + ""He"": 2, + ""Li"": 3, + ""Be"": 4, + ""B"": 5, + ""C"": 6, + ""N"": 7, + ""O"": 8, + ""F"": 9, + ""Ne"": 10, + ""Na"": 11, + ""Mg"": 12, + ""Al"": 13, + ""Si"": 14, + ""P"": 15, + ""S"": 16, + ""Cl"": 17, + ""Ar"": 18, + ""K"": 19, + ""Ca"": 20, + ""Sc"": 21, + ""Ti"": 22, + ""V"": 23, + ""Cr"": 24, + ""Mn"": 25, + ""Fe"": 26, + ""Co"": 27, + ""Ni"": 28, + ""Cu"": 29, + ""Zn"": 30, + ""Ga"": 31, + ""Ge"": 32, + ""As"": 33, + ""Se"": 34, + ""Br"": 35, + ""Kr"": 36, + ""Rb"": 37, + ""Sr"": 38, + ""Y"": 39, + ""Zr"": 40, + ""Nb"": 41, + ""Mo"": 42, + ""Tc"": 43, + ""Ru"": 44, + ""Rh"": 45, + ""Pd"": 46, + ""Ag"": 47, + ""Cd"": 48, + ""In"": 49, + ""Sn"": 50, + ""Sb"": 51, + ""Te"": 52, + ""I"": 53, + ""Xe"": 54, + ""Cs"": 55, + ""Ba"": 56, + ""La"": 57, + ""Ce"": 58, + ""Pr"": 59, + ""Nd"": 60, + ""Pm"": 61, + ""Sm"": 62, + ""Eu"": 63, + ""Gd"": 64, + ""Tb"": 65, + ""Dy"": 66, + ""Ho"": 67, + ""Er"": 68, + ""Tm"": 69, + ""Yb"": 70, + ""Lu"": 71, + ""Hf"": 72, + ""Ta"": 73, + ""W"": 74, + ""Re"": 75, + ""Os"": 76, + ""Ir"": 77, + ""Pt"": 78, + ""Au"": 79, + ""Hg"": 80, + ""Tl"": 81, + ""Pb"": 82, + ""Bi"": 83, + ""Po"": 84, + ""At"": 85, + ""Rn"": 86, + ""Fr"": 87, + ""Ra"": 88, + ""Ac"": 89, + ""Th"": 90, + ""Pa"": 91, + ""U"": 92, + ""Np"": 93, + ""Pu"": 94, + ""Am"": 95, + ""Cm"": 96, + ""Bk"": 97, + ""Cf"": 98, + ""Es"": 99, + ""Fm"": 100, + ""Md"": 101, + ""No"": 102, + ""Lr"": 103, + ""Rf"": 104, + ""Db"": 105, + ""Sg"": 106, + ""Bh"": 107, + ""Hs"": 108, + ""Mt"": 109, + ""Ds"": 110, + ""Rg"": 111, + ""Cn"": 112, + ""Nh"": 113, + ""Fl"": 114, + ""Mc"": 115, + ""Lv"": 116, + ""Ts"": 117, + ""Og"": 118 +} + +ATOMID_TO_NAME = { + 1: ""H"", + 2: ""He"", + 3: ""Li"", + 4: ""Be"", + 5: ""B"", + 6: ""C"", + 7: ""N"", + 8: ""O"", + 9: ""F"", + 10: ""Ne"", + 11: ""Na"", + 12: ""Mg"", + 13: ""Al"", + 14: ""Si"", + 15: ""P"", + 16: ""S"", + 17: ""Cl"", + 18: ""Ar"", + 19: ""K"", + 20: ""Ca"", + 21: ""Sc"", + 22: ""Ti"", + 23: ""V"", + 24: ""Cr"", + 25: ""Mn"", + 26: ""Fe"", + 27: ""Co"", + 28: ""Ni"", + 29: ""Cu"", + 30: ""Zn"", + 31: ""Ga"", + 32: ""Ge"", + 33: ""As"", + 34: ""Se"", + 35: ""Br"", + 36: ""Kr"", + 37: ""Rb"", + 38: ""Sr"", + 39: ""Y"", + 40: ""Zr"", + 41: ""Nb"", + 42: ""Mo"", + 43: ""Tc"", + 44: ""Ru"", + 45: ""Rh"", + 46: ""Pd"", + 47: ""Ag"", + 48: ""Cd"", + 49: ""In"", + 50: ""Sn"", + 51: ""Sb"", + 52: ""Te"", + 53: ""I"", + 54: ""Xe"", + 55: ""Cs"", + 56: ""Ba"", + 57: ""La"", + 58: ""Ce"", + 59: ""Pr"", + 60: ""Nd"", + 61: ""Pm"", + 62: ""Sm"", + 63: ""Eu"", + 64: ""Gd"", + 65: ""Tb"", + 66: ""Dy"", + 67: ""Ho"", + 68: ""Er"", + 69: ""Tm"", + 70: ""Yb"", + 71: ""Lu"", + 72: ""Hf"", + 73: ""Ta"", + 74: ""W"", + 75: ""Re"", + 76: ""Os"", + 77: ""Ir"", + 78: ""Pt"", + 79: ""Au"", + 80: ""Hg"", + 81: ""Tl"", + 82: ""Pb"", + 83: ""Bi"", + 84: ""Po"", + 85: ""At"", + 86: ""Rn"", + 87: ""Fr"", + 88: ""Ra"", + 89: ""Ac"", + 90: ""Th"", + 91: ""Pa"", + 92: ""U"", + 93: ""Np"", + 94: ""Pu"", + 95: ""Am"", + 96: ""Cm"", + 97: ""Bk"", + 98: ""Cf"", + 99: ""Es"", + 100: ""Fm"", + 101: ""Md"", + 102: ""No"", + 103: ""Lr"", + 104: ""Rf"", + 105: ""Db"", + 106: ""Sg"", + 107: ""Bh"", + 108: ""Hs"", + 109: ""Mt"", + 110: ""Ds"", + 111: ""Rg"", + 112: ""Cn"", + 113: ""Nh"", + 114: ""Fl"", + 115: ""Mc"", + 116: ""Lv"", + 117: ""Ts"", + 118: ""Og"" +} + +MASSES = { + 1: 1.007825, + 2: 4.002603, + 3: 7.016004, + 4: 9.012182, + 5: 11.009305, + 6: 12.0, + 7: 14.003074, + 8: 15.994915, + 9: 18.998403, + 10: 19.99244, + 11: 22.98977, + 12: 23.985042, + 13: 26.981538, + 14: 27.976927, + 15: 30.973762, + 16: 31.972071, + 17: 34.968853, + 18: 39.962383, + 19: 38.963707, + 20: 39.962591, + 21: 44.95591, + 22: 47.947947, + 23: 50.943964, + 24: 51.940512, + 25: 54.93805, + 26: 55.934942, + 27: 58.9332, + 28: 57.935348, + 29: 62.929601, + 30: 63.929147, + 31: 68.925581, + 32: 73.921178, + 33: 74.921596, + 34: 79.916522, + 35: 78.918338, + 36: 83.911507, + 37: 84.911789, + 38: 87.905614, + 39: 88.905848, + 40: 89.904704, + 41: 92.906378, + 42: 97.905408, + 43: 98.907216, + 44: 101.90435, + 45: 102.905504, + 46: 105.903483, + 47: 106.905093, + 48: 113.903358, + 49: 114.903878, + 50: 119.902197, + 51: 120.903818, + 52: 129.906223, + 53: 126.904468, + 54: 131.904154, + 55: 132.905447, + 56: 137.905241, + 57: 138.906348, + 58: 139.905435, + 59: 140.907648, + 60: 141.907719, + 61: 144.912744, + 62: 151.919729, + 63: 152.921227, + 64: 157.924101, + 65: 158.925343, + 66: 163.929171, + 67: 164.930319, + 68: 165.93029, + 69: 168.934211, + 70: 173.938858, + 71: 174.940768, + 72: 179.946549, + 73: 180.947996, + 74: 183.950933, + 75: 186.955751, + 76: 191.961479, + 77: 192.962924, + 78: 194.964774, + 79: 196.966552, + 80: 201.970626, + 81: 204.974412, + 82: 207.976636, + 83: 208.980383, + 84: 208.982416, + 85: 209.987131, + 86: 222.01757, + 87: 223.019731, + 88: 226.025403, + 89: 227.027747, + 90: 232.03805, + 91: 231.035879, + 92: 238.050783, + 93: 237.048167, + 94: 244.064198, + 95: 243.061373, + 96: 247.070347, + 97: 247.070299, + 98: 251.07958, + 99: 252.082972, + 100: 257.095099, + 101: 258.098425, + 102: 259.101024, + 103: 262.109692, +} + +MASSES_AU = { + 1: 1837.152587390918, + 2: 7296.2989187097455, + 3: 12789.392902284651, + 4: 16428.20279248665, + 5: 20068.735312306966, + 6: 21874.661819949906, + 7: 25526.042349144434, + 8: 29156.946371987007, + 9: 34631.97006201015, + 10: 36443.98866296994, + 11: 41907.787005702485, + 12: 43722.05687394125, + 13: 49184.3349276773, + 14: 50998.81807386881, + 15: 56461.71408680127, + 16: 58281.52006736897, + 17: 63744.31946721174, + 18: 72846.96780369294, + 19: 71026.49282305125, + 20: 72847.34696449782, + 21: 81949.6106715087, + 22: 87403.76046549014, + 23: 92865.16535564188, + 24: 94681.7612295875, + 25: 100145.93873312492, + 26: 101963.16168070937, + 27: 107428.65166395598, + 28: 105609.67874342593, + 29: 114713.64502828178, + 30: 116535.70592190544, + 31: 125643.64792654706, + 32: 134750.06417352674, + 33: 136573.71462590928, + 34: 145678.90771471558, + 35: 143859.32959520852, + 36: 152961.31986894662, + 37: 154784.7224084952, + 38: 160242.13152708783, + 39: 162065.44656798916, + 40: 163886.24966855813, + 41: 169357.96663886952, + 42: 178470.64086201816, + 43: 180296.82512939489, + 44: 185760.26618598434, + 45: 187585.25828429186, + 46: 193050.23968165115, + 47: 194876.06301710784, + 48: 207633.11970055714, + 49: 209456.9560875652, + 50: 218568.33423700102, + 51: 220394.17762423103, + 52: 236804.5580359999, + 53: 231332.6934117212, + 54: 240446.56344971608, + 55: 242271.80892952302, + 56: 251385.8758394742, + 57: 253210.78226202296, + 58: 255032.00644983197, + 59: 256858.92898704507, + 60: 258681.9468971233, + 61: 264159.7723667479, + 62: 276932.7246377864, + 63: 278758.3438097327, + 64: 287878.02521621773, + 65: 289703.1777287119, + 66: 298824.5981708116, + 67: 300649.57933178823, + 68: 302472.414953018, + 69: 307948.2279537551, + 70: 317071.1413415241, + 71: 318897.5115435262, + 72: 328022.4920868371, + 73: 329848.0182914707, + 74: 335322.0375699386, + 75: 340799.4857016468, + 76: 349924.369631868, + 77: 351749.8921907246, + 78: 355399.04150441353, + 79: 359048.05957013153, + 80: 368169.9284427985, + 81: 373645.4953535902, + 82: 379118.2149125683, + 83: 380947.9337607174, + 84: 380951.6396930074, + 85: 382783.12309720996, + 86: 404713.2718197547, + 87: 406540.0995667666, + 88: 412019.1044452409, + 89: 413846.2657808456, + 90: 422979.4894258856, + 91: 421152.64344998886, + 92: 433940.03117494, + 93: 432112.37401366746, + 94: 444901.81613394123, + 95: 443073.7779889753, + 96: 450381.6905302229, + 97: 450381.6030315757, + 98: 457690.0751995882, + 99: 459519.14692232513, + 100: 468655.6955159618, + 101: 470484.64692805876, + 102: 472312.27310022706, + 103: 477796.73935260245, +} + + +def get_atom_from_mass(mass): + for atom in MASSES_AU: + if abs(MASSES_AU[atom]-mass) < 0.1: + return ATOMID_TO_NAME[atom] +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/system/molecule.py",".py","891","30","from .atominfo import ATOMID_TO_NAME + +class Molecule: + """"""Store info of a molecule"""""" + def __init__(self, atomids, crd, masses=None, name=None): + self.natoms = len(atomids) + self.atomids = atomids + self.crd = crd + self.name = name + self.masses = masses + + def __len__(self): + return self.natoms + + def __iter__(self): + return zip(self.atomids, self.crd) + + def write_xyz(self, filename): + natoms = len(self.atomids) + out = f""""""{natoms} + commentar\n"""""" + out += ""\n"".join(self.format(atomid, crd) for atomid, crd in self) + with open(filename, 'w') as f: + f.write(out) + + def format(self, atomid, crd): + if not isinstance(atomid, str): + atomid = ATOMID_TO_NAME[atomid] + return ""%s %12.8f %12.8f %12.8f"" % (atomid, crd[0], crd[1], crd[2]) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/database/pysurf_db.py",".py","7750","238","from functools import lru_cache +import numpy as np +# +from ..utils import exists_and_isfile +from .dbtools import DatabaseGenerator +from .database import Database +from ..system import Molecule, Mode, ModelInfo + + +def cached_property(func): + return property(lru_cache(maxsize=1)(func)) + + +class PySurfDB(Database): + + _dimensions_molecule = { + 'frame': 'unlimited', + 'natoms': None, + 'nstates': None, + 'nmodes': None, + 'nactive': None, + 'three': 3, + 'one': 1, + } + + _dimensions_model = { + 'frame': 'unlimited', + 'nstates': None, + 'nmodes': None, + 'nactive': None, + 'one': 1, + } + + _variables_molecule = DatabaseGenerator("""""" + [variables] + crd_equi = double :: (natoms, three) + atomids = int :: (natoms) + freqs_equi= double :: (nmodes) + modes_equi= double :: (nmodes, natoms, three) + masses = double :: (natoms) + model = int :: (one) + + crd = double :: (frame, natoms, three) + veloc = double :: (frame, natoms, three) + accel = double :: (frame, natoms, three) + energy = double :: (frame, nstates) + gradient = double :: (frame, nactive, natoms, three) + fosc = double :: (frame, nstates) + transmom = double :: (frame, nstates, three) + currstate = double :: (frame, one) + time = double :: (frame, one) + ekin = double :: (frame, one) + epot = double :: (frame, one) + etot = double :: (frame, one) + nacs = double :: (frame, nstates, nstates, natoms, three) + """""")['variables'] + + _variables_model = DatabaseGenerator("""""" + [variables] + crd_equi = double :: (nmodes) + freqs_equi= double :: (nmodes) + modes_equi= double :: (nmodes, nmodes) + masses = double :: (nmodes) + model = int :: (one) + + crd = double :: (frame, nmodes) + veloc = double :: (frame, nmodes) + accel = double :: (frame, nmodes) + energy = double :: (frame, nstates) + gradient = double :: (frame, nactive, nmodes) + fosc = double :: (frame, nstates) + currstate = double :: (frame, one) + time = double :: (frame, one) + ekin = double :: (frame, one) + epot = double :: (frame, one) + etot = double :: (frame, one) + nacs = double :: (frame, nstates, nstates, nmodes) + """""")['variables'] + + properties = ['energy', 'gradient', 'fosc', + 'ekin', 'epot', 'etot', 'nacs', + 'veloc', 'accel', 'currstate'] + + + + @classmethod + def generate_database(cls, filename, data=None, dimensions=None, units=None, attributes=None, descriptition=None, model=False, sp=False): + if dimensions is None: + dimensions = {} + if data is None: + data = [] + settings = cls._get_settings(data, model) + cls._prepare_settings(settings, dimensions, model, sp) + return cls(filename, settings) + + @classmethod + def load_database(cls, filename, data=None, dimensions=None, units=None, attributes=None, descriptition=None, model=False, sp=False, read_only=False): + if read_only is True: + return cls.load_db(filename) + # + if not exists_and_isfile(filename): + raise Exception(f""Cannot load database {filename}"") + return cls.generate_database(filename, data, dimensions, units, attributes, descriptition, model, sp) + + @cached_property + def saved_properties(self): + return [prop for prop in self.properties + if prop in self] + + @cached_property + def masses(self): + if 'masses' in self: + return np.array(self['masses']) + return None + + @cached_property + def modes(self): + if 'freqs_equi' in self and 'modes_equi' in self: + return [Mode(freq, mode) for freq, mode in zip(np.copy(self['freqs_equi']), np.copy(self['modes_equi']))] + return None + + @cached_property + def molecule(self): + if self.model: + return None + if 'atomids' in self and 'crd_equi' in self and 'masses' in self: + return Molecule(np.copy(self['atomids']), + np.copy(self['crd_equi']), + np.copy(self['masses'])) + return None + + @cached_property + def model_info(self): + if self.model: + if 'crd_equi' in self and 'masses' in self: + return ModelInfo(np.copy(self['crd_equi']), + np.copy(self['masses'])) + return None + + @property + def system(self): + if self.model: + return self.model_info + else: + return self.molecule + + @property + def dimensions(self): + return self._rep.dimensions + + @cached_property + def natoms(self): + if self.model: + return None + if 'natoms' in self: + return self.dimensions['natoms'] + return None + + @cached_property + def nstates(self): + if 'nstates' in self.dimensions: + return self.dimensions['nstates'] + return None + + @cached_property + def nmodes(self): + if 'nmodes' in self.dimensions: + return self.dimensions['nmodes'] + return None + + @cached_property + def model(self): + if 'model' in self: + return bool(self['model'][0]) + return None + + def __len__(self): + if 'crd' in self: + return len(self['crd']) + return 0 + + @classmethod + def info_database(cls, filename): + db = Database.load_db(filename) + info = {'variables':[]} + for var in set(cls._variables_molecule.keys()).union(set(cls._variables_model.keys())): + if var in db: + info['variables'] += [var] + info['dimensions'] = db._rep.dimensions + info['length'] = len(db['crd']) + return info + + def add_reference_entry(self, system, modes, model): + self.set('model', int(model)) + if model is False: + self.set('atomids', system.atomids) + self.set('masses', system.masses) + if modes is not None: + self.set('modes_equi', np.array([mode.displacements for mode in modes])) + self.set('freqs_equi', np.array([mode.freq for mode in modes])) + # add equilibrium values + self.set('crd_equi', system.crd) + + @classmethod + def _get_settings(cls, variables, model): + out = {'variables': {}, 'dimensions': {}} + varis = out['variables'] + dims = out['dimensions'] + + if model is True: + refvar = cls._variables_model + refdim = cls._dimensions_model + else: + refvar = cls._variables_molecule + refdim = cls._dimensions_molecule + + for var in variables: + try: + varis[var] = refvar[var] + except: + raise Exception(f""Variable {var} unknown"") + for dim in varis[var].dimensions: + try: + dims[dim] = refdim[dim] + except: + raise Exception(f""Dimension {dim} unknown"") + return out + + @classmethod + def _prepare_settings(cls, settings, dimensions, model, single_point): + dims = settings['dimensions'] + for dim, value in settings['dimensions'].items(): + if value is None: + dims[dim] = dimensions[dim] + if value == 'unlimited' and single_point is True: + dims[dim] = 1 + # TODO: modify dimensions for the case db, etc +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/database/database.py",".py","3961","143","import numpy as np + +from ..utils import exists_and_isfile +from .dbtools import DatabaseRepresentation, DatabaseGenerator +from .dbtools import load_database as l_db + + +class Database(object): + """"""""Core Database, can store data given by the DatabaseRepresentation + + database is automatically build using a settings dictionary: + + dct = { 'dimensions': { + 'frame': 'unlimited', + 'natoms': 3, + 'three': 3, + }, + 'variables': { + 'crd': DBVariable(np.double, ('frame', 'natoms', 'three')), + } + } + + or string: + + dct = "" + + [dims] + frame = unlimited + natoms = natoms + three = 3 + [vars] + crd = double :: (frame, natoms, three) + + """""" + + __slots__ = ('filename', '_rep', '_db', '_handle', '_closed', '_icurrent') + + def __init__(self, filename, settings, read_only=False): + """"""Initialize new Database, + if db exists: + load existing database + check that the settings of the old database + are the same with the once used in the loading + routine + else: + create new database + """""" + self.filename = filename + # + if isinstance(settings, dict): + self._rep = DatabaseRepresentation(settings) + elif isinstance(settings, str): + self._rep = DatabaseRepresentation.from_string(settings) + # + self._closed = True + # + self._db, self._handle = self._rep.create_database(filename, False) + # + self._closed = False + # + self._icurrent = None + + @classmethod + def load_db(cls, filename): + nc = l_db(filename) + rep = DatabaseRepresentation.from_db(nc) + return cls(filename, {'variables': rep.variables, 'dimensions': rep.dimensions}) + + @classmethod + def empty_like(cls, filename, db): + """""" create an empty database with the same dimensions as db + filename is the name of the new empty db """""" + return cls(filename, {'variables': db._rep.variables, 'dimensions': db._rep.dimensions}) + + def __getitem__(self, key): + return self._handle.get(key, None) + + def __setitem__(self, key, value): + variable = self._handle[key] + variable[:] = value + + def __contains__(self, key): + return key in self._handle + + def keys(self): + return self._handle.keys() + + def get(self, key, ivalue): + variable = self._handle[key] + if variable.shape[0] > ivalue: + return variable[ivalue] + + def get_keys(self): + return self._db.variables.keys() + + def get_dimension_size(self, key): + dim = self._db.dimensions.get(key, None) + if dim is not None: + return dim.size + + @property + def dbrep(self): + return self._rep + + @property + def closed(self): + return self._closed + + @property + def increase(self): + self._icurrent += 1 + + @property + def info(self): + return {'variables': list(self.get_keys()), 'dimensions': dict(self._rep.dimensions)} + + def get_dimension(self, key): + return self._handle[key].get_dims() + + def append(self, key, value): + """"""Append only for unlimited variables!"""""" + variable = self._handle[key] + unlimited = variable.get_dims()[0] + assert(unlimited.isunlimited()) + if self._icurrent is None: + self._icurrent = unlimited.size + variable[self._icurrent, :] = value + + def set(self, key, value, ivalue=None): + """"""set a given variable"""""" + variable = self._handle[key] + if variable.get_dims()[0].isunlimited(): + if ivalue is None: + self.append(key, value) + else: + variable[ivalue, :] = value + else: + variable[:] = value + + def __del__(self): + if self._closed is False: + self._db.close() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/database/dbtools.py",".py","8667","268","""""""Tools to store information on the Variables and Dimensions in the Database"""""" +import netCDF4 +import numpy as np + +from ..utils.osutils import exists_and_isfile +# +from colt.generator import Generator + + +class _DBVariable(object): + """"""Store info for Database and easy comparison"""""" + + __slots__ = ('type', 'dimensions') + + def __init__(self, typ, dim): + self.type = typ + self.dimensions = dim + + def __eq__(self, rhs): + assert(isinstance(rhs, self.__class__)) + if len(self.dimensions) != len(rhs.dimensions): + return False + if self.type != rhs.type or any(self.dimensions[i] != rhs.dimensions[i] + for i in range(len(self.dimensions))): + return False + return True + + def __str__(self): + return f""_DBVariable(type = {self.type}, dimension = {self.dimensions})"" + +DBVariable = _DBVariable + +def get_variable_info(db, key): + """"""Get the info of a variable as a namedtuple"""""" + variable = db.variables[key] + return _DBVariable(variable.datatype, variable.dimensions) + + +def get_dimension_info(db, key): + """"""Get the info of a dimension"""""" + dim = db.dimensions[key] + if dim.isunlimited(): + return 'unlimited' + else: + return dim.size + + +class DatabaseTools(object): + """"""Namespace to store general tools to work with the database"""""" + + @staticmethod + def get_variables(filename, keys): + db = load_database(filename) + result = {key: get_dimension_info(db, key) for key in keys} + db.close() + return result + + + + +class DatabaseGenerator(Generator): + + default = ""DIM"" + + leafnode_type = (str, int, _DBVariable) + + def __init__(self, string): + tree, _keys = self._configstring_to_keys_and_tree(string, None) + if 'vars' in tree: + tree['variables'] = tree.pop('vars') + if 'dims' in tree: + tree['dimensions'] = tree.pop('dims') + + self.tree = tree + + def leaf_from_string(self, entry, *, parent=None): + """"""Create a leaf from an entry in the config file + + Args: + name (str): + name of the entry + + value (str): + value of the entry in the config + + Kwargs: + parent (str): + identifier of the parent node + + Returns: + A leaf node + + Raises: + ValueError: + If the value cannot be parsed + """""" + if parent in [""vars"", ""variables""]: + typ, dims = entry.value.split(self.seperator) + # get rid of brackets + dims = dims.replace(""("", """").replace("")"", """") + # split according to , or not + if "","" in dims: + dims = [ele.strip() for ele in dims.split(',')] + else: + dims = dims.split() + # return DBVariable + return _DBVariable(self.select_type(typ), dims) + elif parent in [""dims"", ""dimensions""]: + if entry.value in ['unlimited', 'unlim']: + return 'unlimited' + return int(entry.value) + else: + raise ValueError(""Database can only have Dimensions and Variables"") + + @staticmethod + def select_type(typ): + """"""select type"""""" + types = { + 'int': np.int64, + 'float': np.float, + 'double': np.double, + 'complex': np.complex, + } + typ = typ.strip().lower() + + value = types.get(typ, None) + if value is not None: + return value + raise ValueError(f""Only except values of {', '.join(key for key in types.keys())}"") + + +class DatabaseRepresentation(object): + """"""Store abstract representation of the Variables and + Dimensions stored in the Database. This class makes + also comparisons between different representation + straight forward! + """""" + + __slots__ = ('variables', 'dimensions', 'unlimited', '_created', '_db', '_handle') + + + def __init__(self, settings): + self._parse(settings) + self._created = False + self._db = None + self._handle = None + + @classmethod + def from_string(cls, string): + settings = DatabaseGenerator(string).tree + return cls(settings) + + @classmethod + def from_db(cls, db): + """"""Create DatabaseRepresentation from a database set"""""" + variables = {key: get_variable_info(db, key) for key in db.variables.keys()} + dimensions = {key: get_dimension_info(db, key) for key in db.dimensions.keys()} + return cls({'variables': variables, 'dimensions': dimensions}) + + def __str__(self): + dims = "", "".join(item for item in self['dimensions']) + var = "", "".join(item for item in self['dimensions']) + return f""""""Database: + dimensions: {dims} + variables: {var} + """""" + + def _parse(self, settings): + """"""Parse given database"""""" + self.dimensions = {} + self.unlimited = None + # at least one dimension need to be defined!!! + for dim_name, dim in settings['dimensions'].items(): + if dim == 'unlimited': + if self.unlimited is None: + self.unlimited = dim_name + else: + raise Exception(""Only a single unlimited dimension allowed!"") + self.dimensions[dim_name] = dim + # can be that 0 variables are defined, doesnt make sense, but possible + self.variables = {var_name: variable + for var_name, variable in settings.get('variables', {}).items()} + + def __getitem__(self, key): + if key == 'dimensions': + return self.dimensions + elif key == 'variables': + return self.variables + else: + raise KeyError(""Only ['dimension', 'variables'] are allowed keys!"") + + def create_database(self, filename, read_only=False): + """"""Create the database from the representation"""""" + if self._created is True: + return self._db, self._handle + + if read_only is True: + if not exists_and_isfile(filename): + raise Exception(f""Database {filename} needs to exists"") + else: + self._created = True + self._db, self._handle = self._load_database(filename) + return self._db, self._handle + + if exists_and_isfile(filename): + self._db, self._handle = self._load_database(filename) + else: + self._db, self._handle = self._init_database(filename) + # + self._created = True + return self._db, self._handle + + def __eq__(self, rhs): + """"""""Compare two representations"""""" + assert(isinstance(rhs, self.__class__)) + # check dimensions + if (set(rhs['dimensions'].keys()) != set(self['dimensions'].keys())): + return False + # check that dimensions are exactly the same + if not all(rhs['dimensions'][dim_name] == self['dimensions'][dim_name] + for dim_name in self['dimensions'].keys()): + return False + + # check variables + if (set(rhs['variables'].keys()) != set(self['variables'].keys())): + print(""variables keys not the same?"") + return False + if any(rhs['variables'][var_name] != self['variables'][var_name] + for var_name in rhs['variables'].keys()): + return False + return True + + def _init_database(self, filename): + """"""Create a new database"""""" + return create_dataset(filename, self) + + def _load_database(self, filename, read_only=False): + """"""Load an existing database and check + that it is compatable with the existing one"""""" + if read_only is True: + db = load_database(filename, io_options='r') + else: + db = load_database(filename) + ref = DatabaseRepresentation.from_db(db) + + if ref != self: + raise Exception('Database is not in agreement with ask settings!') + return db, db.variables + + +def create_dataset(filename, settings): + # + nc = netCDF4.Dataset(filename, 'w') + # create dimensions + for dim_name, dim in settings['dimensions'].items(): + if dim == 'unlimited': + dim = None + nc.createDimension(dim_name, dim) + # create variables + handle = {} + for var_name, variable in settings['variables'].items(): + handle[var_name] = nc.createVariable(var_name, variable.type, variable.dimensions) + return nc, handle + + +def load_database(filename, io_options='a'): + return netCDF4.Dataset(filename, io_options) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/database/__init__.py",".py","32","2","from .pysurf_db import PySurfDB +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/pysurf.py",".py","2767","94","import numpy as np + +from ..spp import SurfacePointProvider +from ..database import PySurfDB +from ..sampling import Sampler + +from . import engine + +@engine.register_action +def spp_analysis(sppinp: ""file"") -> ""spp"": + """""" comment + + Parameters + ---------- + -sppinp: file + blabla + + Returns + ------- + spp + blabla4 + """""" + # + config = _get_spp_config_analysis(sppinp) + # + natoms, nstates, properties = _get_db_info(config['use_db']['database']) + atomids = [1 for _ in range(natoms)] + spp = SurfacePointProvider.from_config(config, properties, nstates, natoms, atomids, + logger=None) + # + return spp + +@engine.register_action +def spp_calc(sppinp: ""file"", atomids: ""ilist"", nstates: ""int"", properties: ""list""=['energy']) -> ""spp"": + # + presets=f"""""" + use_db=yes :: yes + [use_db(yes)] + write_only = yes :: yes + properties = {properties} :: {properties} + """""" + config = SurfacePointProvider.generate_input(sppinp, config=sppinp, presets=presets) + natoms = len(atomids) + spp = SurfacePointProvider.from_config(config, properties, nstates, natoms, nghost_states=0, atomids=atomids, + logger=None) + # + return spp + +@engine.register_action +def get_energies(spp: ""spp"", crds: ""crds"") -> ""array2D"": + energies = [] + for crd in crds: + request = spp.request(crd, ['energy']) + energies += [request['energy']] + return np.array(energies) + +@engine.register_action +def sampler(samplerinp: ""file"") -> ""sampler"": + sampler = Sampler.from_inputfile(samplerinp) + return sampler + +@engine.register_action +def crds_from_sampler(sampler: ""sampler"", npoints: ""int"") -> ""crds"": + crds = [] + for i in range(npoints): + cond = next(sampler) + crds += [cond.crd] + return np.array(crds) + +@engine.register_action +def sp_calc(spp: ""spp"", crd: ""crd"", properties: ""list""=['energy']) -> ""request"": + return spp.request(crd, properties) + +def _get_spp_config_analysis(filename): + questions = SurfacePointProvider.generate_user_input(presets="""""" + use_db=yes :: yes + [use_db(yes)] + write_only = no :: no + [use_db(yes)::interpolator] + fit_only = yes :: yes + """""") + return questions.ask(config=filename, raise_read_error=False) + +def _get_db_info(database): + db = PySurfDB.load_database(database, read_only=True) + rep = db.dbrep + natoms = rep.dimensions.get('natoms', None) + if natoms is None: + natoms = rep.dimensions['nmodes'] + nstates = rep.dimensions['nstates'] + return natoms, nstates, db.saved_properties + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/__init__.py",".py","251","15","from colt.workflow import WorkflowGenerator + + +engine = WorkflowGenerator() + + +from . import plot +from . import standard +from . import np +from . import pysurf +# type checks at the end +from . import wf_types +from . import crds +from . import copy_execute +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/np.py",".py","1733","61","import copy + +import numpy as np + +from . import engine + +@engine.register_action +def read_npfile(filename:""file"") -> ""array2D"": + return np.loadtxt(filename) + +@engine.register_action +def array2D_extract_columns(data: ""array2D"", columns: ""list"") -> ""array2D"": + newshape = list(data.shape) + newshape[1] = len(columns) + datanew = np.empty(newshape) + for idx, c in enumerate(columns): + datanew[:,idx] = copy.deepcopy(data[:,c]) + return datanew + +@engine.register_action +def array2D_extract_column(data: ""array2D"", column: ""int"") -> ""array1D"": + datanew = copy.deepcopy(data[:, column]) + return datanew + +@engine.register_action +def array_extract_column(data: ""array"", column: ""int"") -> ""array1D"": + datanew = copy.deepcopy(data[:, column]) + return datanew + +@engine.register_action +def array2D_add_column(data: ""array2D"", add: ""array1D"", append: ""bool""=True) -> ""array2D"": + append = False + newshape = list(data.shape) + newshape[1] += 1 + datanew = np.empty(newshape) + if append is True: + datanew[:, :-1] = data + datanew[:, -1] = add + else: + datanew[:, 0] = add + datanew[:, 1:] = data + return datanew + +@engine.register_action +def array2D_sort(data: ""array2D"") -> ""array2D"": + data = data[np.argsort(data[:, 0])] + return data + +@engine.register_action +def array2D_add_ref(data: ""array2D"", columns: ""list"", ref: ""float""): + if isinstance(columns, list): + for c in columns: + data[:,c] = data[:,c] + ref + if isinstance(columns, int): + data[:, columns] = data[:, columns] + ref + +@engine.register_action +def array2D_scale(data: ""array2D"", columns: ""list"", scale: ""float""): + for c in columns: + data[:,c] = data[:,c] * scale +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/copy_execute.py",".py","878","29","from shutil import copy2 as copy +from subprocess import run, CalledProcessError + +from ..utils import SubfolderHandle, FileHandle + +from . import engine + +@engine.register_action(need_self=True, iterator_id=0, progress_bar=True) +def copy_execute(self, folder: ""list"", filenames: ""list"", exe: ""str""): + for item in filenames: + copy(item, folder) + try: + run(exe, cwd=folder, check=True, shell=True) + except KeyboardInterrupt or CalledProcessError: + self.error(""Keyboard Interrupt"") + +@engine.register_action +def get_subfolder(folder: ""str"", subfolder: ""str"") -> ""list"": + return SubfolderHandle(folder, subfolder) + +@engine.register_action +def get_files(folder: ""str"", subfolder: ""str"", filename: ""str"") -> ""list"": + return FileHandle(folder, subfolder, filename) + + +@engine.register_action +def test_subfolder(folder: ""str"", subfolder: ""str""): + pass +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/crds.py",".py","1364","49","import numpy as np + +from ..spp import SurfacePointProvider +from ..database import PySurfDB +from ..system import ATOMNAME_TO_ID +# +from qctools.converter import length_converter + +from . import engine + +@engine.register_action +def read_xyzfile(filename: ""existing_file"") -> ""atomids_crd"": + conv = length_converter.get_converter('ang', 'au') + with open(filename, 'r') as infile: + lines = infile.readlines() + + natoms = int(lines[0]) + atoms = [] + crds = [] + for i in range(natoms): + atoms += [ATOMNAME_TO_ID[lines[2+i].split()[0]]] + crds += [[conv(float(lines[2+i].split()[j])) for j in range(1,4)]] + return (atoms, np.array(crds)) + + +@engine.register_action +def read_xyzfile_crd(filename: ""existing_file"") -> ""crd"": + conv = length_converter.get_converter('ang', 'au') + with open(filename, 'r') as infile: + lines = infile.readlines() + + natoms = int(lines[0]) + crds = [] + for i in range(natoms): + crds += [[conv(float(lines[2+i].split()[j])) for j in range(1,4)]] + return np.array(crds) + +@engine.register_action +def read_xyzfile_atomids(filename: ""existing_file"") -> ""ilist"": + with open(filename, 'r') as infile: + lines = infile.readlines() + + natoms = int(lines[0]) + atoms = [] + for i in range(natoms): + atoms += [ATOMNAME_TO_ID[lines[2+i].split()[0]]] + return atoms + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/wf_types.py",".py","247","11","from . import engine + +engine.add_subtypes(""file"", ""str"") + +engine.add_subtypes(""crd"", ""list"") + +engine.add_subtypes(""array"", ""array2D"") +engine.add_subtypes(""array"", ""array1D"") +engine.add_subtypes(""array"", ""crds"") +engine.add_subtypes(""array"", ""crd"") +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/standard.py",".py","141","8","from . import engine + + +@engine.register_action +def print(arg: 'anything'): + myprint = globals()['__builtins__']['print'] + myprint(arg) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/workflow/plot.py",".py","3176","102","import itertools +import copy + +import numpy as np +import matplotlib.pyplot as plt + +from ..utils import exists_and_isfile +from ..utils.colors import COLORS +from ..analysis import Plot + +from . import engine + + +@engine.register_action +def setup_lineplot(plot_input: ""file"") -> ""plot"": + if exists_and_isfile(plot_input): + plot_config = Plot.generate_input(plot_input, config=plot_input) + else: + plot_config = Plot.generate_input(plot_input) + return [Plot(plot_config), None] + +@engine.register_action +def mesh_plot(plot_input: ""file"", data: ""meshplotdata"") -> ""plot"": + if exists_and_isfile(plot_input): + plot_config = Plot.generate_input(plot_input, config=plot_input) + else: + plot_config = Plot.generate_input(plot_input) + + plot = Plot(plot_config) + ax = plot.mesh_plot(data, x_units_in=None, y_units_in=None, ax=None, show_plot=False, save_plot=True) + return [plot, ax] + +@engine.register_action +def add_plot(plot: ""plot"", data: ""array2D"", style: ""style""=None): + ax = plot[1] + save_plot = False + if style is not None: + for i, style in zip(range(1, len(data[0])), itertools.cycle(style)): + if i == (len(data[0])-1): save_plot = True + ax = plot[0].line_plot(data[:,[0,i]], x_units_in=None, y_units_in=None, ax=ax, show_plot=False, save_plot=save_plot, line_props=style) + else: + for i in range(1, len(data[0])): + if i == (len(data[0])-1): save_plot = True + ax = plot[0].line_plot(data[:,[0,i]], x_units_in=None, y_units_in=None, ax=ax, show_plot=False, save_plot=save_plot) + plot[1] = ax + +"""""" +Type style: + style is a a list of dictionaries that can be given to the plot functions. + The form of the dictionary is not further specified. +"""""" +@engine.register_action +def combine_plotstyles(style1: ""style"", style2: ""style"") -> ""style"": + """""" This function combines two styles + """""" + nentries = max(len(style1), len(style2)) + style1 = itertools.cycle(style1) + style2 = itertools.cycle(style2) + style = [] + #combine the two dicts + for i in range(nentries): + dict1 = copy.deepcopy(next(style1)) + dict1.update(next(style2)) + style += [dict1] + return style + +@engine.register_action +def standard_colors() -> ""style"": + return [{'color': COLORS['black']}, + {'color': COLORS['lightblue']}, + {'color': COLORS['orange']}, + {'color': COLORS['darkgrey']}, + {'color': COLORS['green']}, + {'color': COLORS['gold']}] + +@engine.register_action +def linestyles_standard() -> ""style"": + return [{'linestyle': 'solid'}, + {'linestyle': 'dashed'}, + {'linestyle': 'dotted'}] + +@engine.register_action +def linestyle_dotted() -> ""style"": + return [{'linestyle': 'dotted'}] + +@engine.register_action +def linestyle_dashed() -> ""style"": + return [{'linestyle': 'dashed'}] + +@engine.register_action +def linestyle_solid() -> ""style"": + return [{'linestyle': 'solid'}] + +@engine.register_action +def show_plot(plot: ""plot""): + plot[0] = plt.gcf() + plt.show() + +@engine.register_action +def save_plot(plot: ""plot"", filename: ""file""): + plot[0].savefig(filename) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/__init__.py",".py","362","13","from .spp import SurfacePointProvider +from .spp import ModelFactory +from .dbinter import Interpolator +from .request import Request +from .dbinter import within_trust_radius +from .dbinter import internal +from .dbinter import internal_coordinates +# +from .methodbase import AbinitioBase, Model +# add import plugins +from .qm import plugins +from .model import plugins +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/dbinter.py",".py","11171","330","from abc import abstractmethod +# +from scipy.spatial.distance import cdist, pdist +import numpy as np + +from ..database.pysurf_db import PySurfDB +from ..utils.osutils import exists_and_isfile +# logger +from ..logger import get_logger +# +from colt import Colt, Plugin +from colt.obj import NoFurtherQuestions + + +def internal(crd): + return pdist(crd) +# return np.array([1.0/ele for ele in pdist(crd)]) + + +def internal_coordinates(crds): + return np.array([internal(crd) for crd in crds]) + + +class InterpolatorFactory(Plugin): + _is_plugin_factory = True + _plugins_storage = 'interpolator' + + +class Interpolator(InterpolatorFactory): + + _user_input = """""" + weights_file = :: file, optional + # only fit to the existing data + fit_only = False :: bool + # select interpolator + interpolator = RbfInterpolator :: str + # if true: compute gradient numerically + energy_only = False :: bool + crdmode = internal :: str :: [internal, cartesian] + """""" + + _register_plugin = False + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""interpolator"", + {name: interpolator.colt_user_input + for name, interpolator in cls.plugins.items()}) + + @classmethod + def setup_from_config(cls, config, db, properties, logger): + return InterpolatorFactory.plugin_from_config(config['interpolator'], db, + properties, + logger=logger, + energy_only=config['energy_only'], + weightsfile=config['weights_file'], + crdmode=config['crdmode'], + fit_only=config['fit_only']) + + @classmethod + def from_config(cls, config, db, properties, logger, energy_only, weightsfile, crdmode, fit_only): + return cls(db, properties, logger, energy_only, weightsfile, crdmode, fit_only) + + def __init__(self, db, properties, logger, energy_only=False, weightsfile=None, crdmode=False, fit_only=False): + """"""important for ShepardInterpolator to set db first!"""""" + # + self.crds = None + self.logger = logger + self.db = db + self.nstates = self.db.get_dimension_size('nstates') + self.energy_only = energy_only + self.fit_only = fit_only + self.weightsfile = weightsfile + self.properties = properties + # + self.crdmode = crdmode + self.crds = self.get_crd() + # + if energy_only is True: + properties = [prop for prop in properties if prop != 'gradient'] + # + if exists_and_isfile(weightsfile): + print('weightsfile', weightsfile) + self.interpolators = self.get_interpolators_from_file(weightsfile, properties) + else: + self.interpolators, self.size = self.get_interpolators(db, properties) + # + if energy_only is True: + self.interpolators['gradient'] = self.finite_difference_gradient + # train the interpolator! + self.train(weightsfile) + + def get_crd(self): + if self.crdmode == 'internal': + crds = internal_coordinates(np.copy(self.db['crd'])) + else: + crds = np.copy(self.db['crd']) + return crds + + @abstractmethod + def get(self, request): + """"""fill request + + Return request and if data is trustworthy or not + """""" + + @abstractmethod + def get_interpolators(self, db, properties): + """""" """""" + + @abstractmethod + def save(self, filename): + """"""Save weights"""""" + + @abstractmethod + def get_interpolators_from_file(self, filename, properties): + """"""setup interpolators from file"""""" + + @abstractmethod + def _train(self): + """"""train the interpolators using the existing data"""""" + + @abstractmethod + def loadweights(self, filename): + """"""load weights from file"""""" + + def train(self, filename=None, always=False): + if filename == '': + filename = None + # train normally + if exists_and_isfile(filename): + self.loadweights(filename) + return + else: + self._train() + # save weights + if filename is not None: + self.save(filename) + + def update_weights(self): + """"""update weights of the interpolator"""""" + self.train() + + def finite_difference_gradient(self, crd, request, dq=0.01): + """"""compute the gradient of the energy with respect to a crd + displacement using finite difference method + """""" + crd = request.crd + grad = np.zeros((self.nstates, crd.size), dtype=float) + # + shape = crd.shape + crd.resize(crd.size) + # + energy = self.interpolators['energy'] + # do loop + for i in range(crd.size): + # first add dq + crd[i] += dq + if self.crdmode == 'internal': + crd_here = internal(crd.reshape(shape)) + else: + crd_here = crd + en1 = energy(crd_here, request) + # first subtract 2*dq + crd[i] -= 2*dq + if self.crdmode == 'internal': + crd_here = internal(crd.reshape(shape)) + else: + crd_here = crd + en2 = energy(crd_here, request) + # add dq to set crd to origional + crd[i] += dq + # compute gradient + grad[:,i] = (en1 - en2)/(2.0*dq) + # return gradient + crd.resize(shape) + grad.resize((self.nstates, *shape)) + return grad + + +class DataBaseInterpolation(Colt): + """"""This class handels all the interaction with the database and + the interface: + saves the data and does the interpolation + """""" + + _user_input = """""" + # additional properties to be fitted + properties = :: list, optional + # only write + write_only = yes :: str :: [yes, no] + # name of the database + database = db.dat :: file + """""" + + _write_only = { + 'yes': NoFurtherQuestions, + 'no': Interpolator + } + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""write_only"", {name: mode.colt_user_input for name, mode in cls._write_only.items()}) +# questions.generate_block(""interpolator"", Interpolator.questions) + + @classmethod + def from_config(cls, config, interface, natoms, nstates, properties, model=False, logger=None): + return cls(interface, config, natoms, nstates, properties, model=model, logger=logger) + + def __init__(self, interface, config, natoms, nstates, properties, model=False, logger=None): + """""" """""" + self.config = config + if logger is None: + self.logger = get_logger('db.log', 'database', []) + else: + self.logger = logger + # + self.write_only = config['write_only'] + + # + self._interface = interface + # + self.natoms = natoms + self.nstates = nstates + # + if config['properties'] is not None: + properties += config['properties'] + properties += ['crd'] + # setup database + self._db = self._create_db(properties, natoms, nstates, model=model, filename=config['database']) + self._parameters = get_fitting_size(self._db) + properties = [prop for prop in properties if prop != 'crd'] + self.properties = properties + if config['write_only'] == 'no': + self.interpolator = Interpolator.setup_from_config(config['write_only'], self._db, + properties, + logger=self.logger) + self.fit_only = self.interpolator.fit_only + # + if self.write_only is True and self.fit_only is True: + raise Exception(""Can only write or fit"") + else: + self.write_only = True + self.fit_only = False + + + def get_qm(self, request): + """"""Get result of request and append it to the database"""""" + # + result = self._interface.get(request) + # + for prop, value in result.iter_data(): + self._db.append(prop, value) + self._db.append('crd', result.crd) + # + self._db.increase + return result + + def get(self, request): + """"""answer request"""""" + if request.same_crd is True: + return self.old_request + self.old_request = self._get(request) + return self.old_request + + def _get(self, request): + """"""answer request"""""" + if self.write_only is True: + return self.get_qm(request) + # do the interpolation + result, is_trustworthy = self.interpolator.get(request) + # maybe perform error msg/warning if fitted date is not trustable + if self.fit_only is True: + if is_trustworthy is False: + self.logger.warning('Interpolated result not trustworthy, but used as fit_only is True') + return result + # do qm calculation + if is_trustworthy is False: + self.logger.info('Interpolated result is not trustworthy and QM calculation is started') + return self.get_qm(request) + self.logger.info('Interpolated result is trustworthy and returned') + return result + + def read_last(self, request): + for prop in request: + request.set(prop, self._db.get(prop, -1)) + return request + + def _create_db(self, data, natoms, nstates, filename='db.dat', model=False): + if model is False: + return PySurfDB.generate_database(filename, data=data, dimensions={'natoms': natoms, 'nstates': nstates, 'nactive': nstates}, model=model) + return PySurfDB.generate_database(filename, data=data, dimensions={'nmodes': natoms, 'nstates': nstates, 'nactive': nstates}, model=model) + + +def get_fitting_size(db): + """"""We only fit unlimeted data"""""" + out = {} + for variable in db.get_keys(): + ndim = 1 + dims = db.get_dimension(variable) + if not dims[0].isunlimited(): + continue + for dim in dims[1:]: + ndim *= dim.size + out[variable] = ndim + return out + + + + + +def within_trust_radius(crd, crds, radius, metric='euclidean', radius_ci=None): + is_trustworthy_general = False + is_trustworthy_CI = False + shape = crds.shape + crd_shape = crd.shape + crd.resize((1, crd.size)) + if len(shape) == 3: + crds.resize((shape[0], shape[1]*shape[2])) + dist = cdist(crd, crds, metric=metric) + crds.resize(shape) + crd.resize(crd_shape) + if np.min(dist) < radius: + is_trustworthy_general = True + if radius_ci is not None: + if np.min(dist) < radius_ci: + is_trustworthy_CI = True + return dist[0], (is_trustworthy_general, is_trustworthy_CI) + else: + return dist[0], is_trustworthy_general +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/request.py",".py","3196","104","from collections.abc import Mapping +import numpy as np + + +class RequestGenerator: + """"""Abstraction to generate Requests consistently"""""" + + def __init__(self, nstates, properties=None, use_db=False): + self.nstates = nstates + # properties that are always asked for (database) + if properties is None: + properties = [] + # + self._request_always = properties + # + if use_db is True: + self.request = self._request_all + else: + self.request = self._request + + def _request(self, crd, properties, states=None, same_crd=False): + """"""add more sanity checks!"""""" + properties = properties + self._request_always + if states is None: + return Request(crd, properties, list(range(self.nstates)), same_crd=same_crd) + return Request(crd, properties, states, same_crd=same_crd) + + def _request_all(self, crd, properties, states=None, same_crd=False): + properties = properties + self._request_always + return Request(crd, properties, list(range(self.nstates)), same_crd=same_crd) + + +class StateData: + + def __init__(self, states, shape): + self._states = states + sh = tuple([len(states)] + list(shape)) + self.data = np.empty(sh, dtype=np.double) + + def set_data(self, data): + """"""try to set everything"""""" + data = np.asarray(data) + data = data.reshape(self.data.shape) + self.data[:] = data + + def __setitem__(self, istate, value): + idx = self._states.index(istate) + self.data[idx] = value + + def __getitem__(self, istate): + idx = self._states.index(istate) + return self.data[idx] + + +class Request(Mapping): + + def __init__(self, crd, properties, states, same_crd=False): + self._properties = {prop: None for prop in properties if prop != 'crd'} + self.states = states + self.crd = np.array(crd) + self.same_crd = same_crd + # + if 'gradient' in properties: + self._properties['gradient'] = StateData(states, self.crd.shape) + + def set(self, name, value): + """"""Ignore properties that are not requested!"""""" + if name not in self._properties: + return + prop = self._properties[name] + if isinstance(prop, StateData): + self._set_state_dictionary(prop, value) + else: + self._properties[name] = value + + def __getitem__(self, key): + return self._properties[key] + + def __len__(self): + return len(self._properties) + + def __iter__(self): + return iter(self._properties) + + def iter_data(self): + """"""Iterate over all data in the request dct"""""" + for key, value in self._properties.items(): + if isinstance(value, StateData): + yield key, value.data + else: + yield key, value + + def _set_state_dictionary(self, prop, dct): + """"""Set stateData"""""" + if not isinstance(dct, Mapping): + prop.set_data(dct) + return + # + for state, value in dct.items(): + try: + prop[state] = value + except ValueError: + pass +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/methodbase.py",".py","1528","56","from abc import abstractmethod +# +from .spp import AbinitioFactory, ModelFactory +# fileparser +from ..fileparser import read_geom + + +class AbinitioBase(AbinitioFactory): + """"""Base Class for all Abinitio Implementations"""""" + + _register_plugin = False + implemented = [] + + @classmethod + @abstractmethod + def from_config(cls, config): + """"""initialize class with a given questions config!"""""" + pass + + @abstractmethod + def get(self, request): + """"""get requested info"""""" + + def _get_refgeo(self, filename): + natoms, atoms, crds = read_geom(refgeo_path) + return natoms, {'atoms': atoms, 'crd': np.array(crds)} + + def get_masses(self): + # masses are given in an array of shape (natoms, 3) like + # the coordinates so that they can be easily used in the + # surface hopping algorithm + return np.array([[[atomic_masses[atomname_to_id[self.refgeo['atoms'][i]]], + atomic_masses[atomname_to_id[self.refgeo['atoms'][i]]], + atomic_masses[atomname_to_id[self.refgeo['atoms'][i]]]]] + for i in range(self.natoms) + ]) + + +class Model(ModelFactory): + """"""Base Class for all Abinitio Implementations"""""" + + _register_plugin = False + + implemented = [] + + @classmethod + @abstractmethod + def from_config(cls, config): + """"""initialize class with a given questions config!"""""" + pass + + @abstractmethod + def get(self, request): + """"""get requested info"""""" + pass +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/spp.py",".py","9247","268","import os +# Numpy +import numpy as np +# Database related +from colt import Colt, Plugin +from colt.obj import NoFurtherQuestions +# logger +from ..logger import get_logger, Logger +# Interpolation +from .dbinter import DataBaseInterpolation +# +from .request import RequestGenerator + +"""""" +TODO: + - What happens to user properties that are asked + if no database is set? + - Models should check that enough states are computed! +"""""" + + +class AbinitioFactory(Plugin): + """"""Factory for any QM code"""""" + + _is_plugin_factory = True + _plugins_storage = 'software' + + _user_input = """""" + software = + """""" + + reader = None + + @classmethod + def _extend_user_input(cls, questions): + questions.add_branching(""software"", {name: software.colt_user_input + for name, software in cls.software.items()}) + + +class ModelFactory(Plugin): + """"""Model Factory"""""" + + _is_plugin_factory = True + _plugins_storage = '_models' + + _user_input = """""" + model = + """""" + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""model"", {name: model.colt_user_input + for name, model in cls._models.items()}) + + +class SurfacePointProvider(Colt): + """""" The Surface Point Provider is the main interface providing + to perform calculations of a given system at a specific coordinate. + """""" + # Main Questions for SPP + _user_input = """""" + logging = debug :: str :: + mode = ab-initio + use_db = no + """""" + # different modes + _modes = {'ab-initio': AbinitioFactory, + 'model': ModelFactory, + } + # use_db + _database = { + 'yes': DataBaseInterpolation, + 'no': NoFurtherQuestions + } + + @classmethod + def _extend_user_input(cls, questions): + """""" Extend the questions of the surface point provider using + the questions of the `Abinitio` and `Model` """""" + questions.generate_cases(""mode"", {name: mode.colt_user_input for name, mode in cls._modes.items()}) + questions.generate_cases(""use_db"", {name: mode.colt_user_input for name, mode in cls._database.items()}) + + @classmethod + def from_config(cls, config, properties, nstates, natoms, *, + nghost_states=0, atomids=None, logger=None): + """""" Initialize the SurfacePointProvider from the information + read from configfile using `Colt` + + Parameters + ---------- + + config: ColtConfig + config object created through colt by reading a configfile/asking + commandline questions, etc. + + properties: list/tuple of strings + all possible requested properties, used for sanity checks + + natoms: int + Number of atoms in the system + + nstates: int + Number of states requested + + nghost_states: int + Number of ghost states requested + + atomids: list/tuple, optional + Atomids of the molecule, needed in case an abinitio method is selected + ignored in case of the model + + logger: Logger, optional + objected used for loggin, if None, a new one will be created + + Returns + ------- + + SurfacePointProvider + SurfacePointProvider instance + + """""" + + return cls(config['mode'], config['use_db'], + properties, nstates, natoms, + nghost_states=nghost_states, atomids=atomids, logger=logger, + logging_level=config['logging']) + + def __init__(self, mode_config, use_db, properties, nstates, natoms, *, + nghost_states=0, atomids=None, logger=None, logging_level='debug'): + """""" The inputfile for the SPP has to provide the necessary + information, how to produce the data at a specific point + in the coordinate space. + + Parameters + ---------- + + mode_config: + `config` stating the interface etc. and corresponding info + + use_db: + `config` stating if database should be setup or not + + properties: list/tuple of strings + all possible requested properties, used for sanity checks + + natoms: int + Number of atoms in the system + + nstates: int + Number of states requested + + nghost_states: int + Number of ghost states requested + + atomids: list/tuple, optional + Atomids of the molecule, needed in case an abinitio method is selected + ignored in case of the model + + logging_level: str, optional + Specifies the logging level of the `SurfacePointProvider` + + logger: Logger, optional + objected used for loggin, if None, a new one will be created + """""" + if logger is None: + self.logger = get_logger('spp.log', 'SPP', []) + else: + self.logger = logger + # + self._request, self._interface = self._select_interface(mode_config, use_db, + properties, natoms, + nstates, nghost_states, + atomids) + + @property + def interpolator(self): + interpolator = getattr(self._interface, 'interpolator', None) + if interpolator is None: + raise Exception(""Interpolator not available"") + return interpolator + + def request(self, crd, properties, states=None, same_crd=False): + """""" The get method is the method which should be called by + external programs, which want to use the SPP. As an + input it takes the crdinates and gives back the + information at this specific position. + + It does not perform any sanity checks anylonger, so insure that all + possible requested properties are in used! + """""" + datacontainer = self._request.request(crd, properties, states, same_crd=same_crd) + return self._interface.get(datacontainer) + + def _select_interface(self, mode_config, use_db, properties, natoms, + nstates, nghost_states, atomids): + """"""Select the correct interface based on the mode"""""" + # + if mode_config == 'model': + self.logger.info('Using model to generate the PES') + interface = ModelFactory.plugin_from_config(mode_config['model']) + # If an ab initio calculation is used and if a database is used + elif mode_config == 'ab-initio': + self.logger.info('Ab initio calculations are used to generate the PES') + # make sure that AB INITIO section is in the inputfile + # add path to AB INITIO section + interface = AbinitioFactory.plugin_from_config(mode_config['software'], atomids, nstates, nghost_states) + else: + # is atomatically caught through colt! + self.logger.error(""Mode has to be 'model' or 'ab-initio'"") + # check default + self._check_properties(properties, interface) + # use databse + if use_db == 'yes': + self.logger.info(""Setting up database..."") + interface = DataBaseInterpolation.from_config(use_db, interface, natoms, nstates, + properties, model=(mode_config=='model')) + if use_db['properties'] is not None: + properties += use_db['properties'] + request = RequestGenerator(nstates, properties, use_db=True) + self.logger.info(""Database ready to use"") + else: + request = RequestGenerator(nstates) + # + return request, interface + + def _check_properties(self, properties, interface): + """"""Sanity check for properties"""""" + if any(prop not in interface.implemented for prop in properties): + self.logger.error(f""""""The Interface does not provide all properties: +Needed: {properties} +Implemented: {interface.implemented} + """""") + self.logger.info(f""Interface {interface} provides all necessary properties"") + + +def get_spp(configfile, properties, nstates, natoms, *, + nghost_states=0, atomids=None, logger=None, checkonly=True): + """"""Initialize a Surface point provider from a config file + + Args + ---- + + configfile: str + name of the config file + + properties: list(str) + list of properties the spp should be able to provide + + nstates: int + Number of states + + natoms: int + Number of atoms + + nghost_states: int, optional + Number of ghost states + + Kwargs + ------ + + atomids: list + atomids of the system + + + """""" + return SurfacePointProvider.from_questions(properties, nstates, natoms, nghost_states=nghost_states, atomids=atomids, + config=configfile, checkonly=checkonly) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/model/pyrazine_schneider.py",".py","5651","162","import numpy as np +from copy import deepcopy +from ..methodbase import Model +from ...system import Mode + + + +ev2au = 1./27.2113961 + +class PyrazineSchneider(Model): + + implemented = [""energy"", ""gradient"", ""fosc""] + frequencies = np.array([0.126*ev2au, 0.074*ev2au, 0.118*ev2au]) + masses = np.array(np.ones(3)/frequencies) + displacements = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]] + modes = [Mode(freq, dis) for freq, dis in zip(frequencies, displacements)] + crd = [0.0, 0.0, 0.0] + nstates = 3 + + @classmethod + def from_config(cls, config): + return cls() + + def __init__(self): + """"""Pyrazine model according to Schneider, Domcke, Koeppel; JCP 92, 1045, + 1990 with 3 modes and 2 excited states. + The model is in dimensionless normal modes. + """""" + ev2au = 1./27.2113961 + self.E1 = 3.94*ev2au + self.E2 = 4.84*ev2au + self.kappa11 = 0.037*ev2au + self.kappa12 = -0.105*ev2au + self.kappa21 = -0.254*ev2au + self.kappa22 = 0.149*ev2au + self.lam = 0.262*ev2au + self.w1 = self.frequencies[0] + self.w2 = self.frequencies[1] + self.w3 = self.frequencies[2] + pass + + def get(self, request): + """"""the get function returns the adiabatic energies as well as the + gradient at the given position crd. Additionally the masses + of the normal modes are returned for the kinetic Hamiltonian. + """""" + crd = request.crd + T = None + if 'energy' in request.keys(): + en, T = self.adiab_en(crd) + request.set('energy', en) + if 'fosc' in request.keys(): + request.set('fosc', self.adiab_fosc(crd, T)) + if 'gradient' in request.keys(): + grad = self.adiab_grad(crd) + request.set('gradient', grad) + return request + + def adiab_en(self, crd): + """"""adiab_en returns a one dimensional vector with the adiabatic energies at + the position crd + """""" + diab_en = self.diab_en(crd) + (adiab_en, T) = np.linalg.eigh(diab_en) + adiab_en = np.sort(adiab_en) + return adiab_en, T + + def adiab_fosc(self, crd, T=None): + diab_fosc = [0, 0, 1] + if T is None: + diab_en = self.diab_en(crd) + (en, T) = np.linalg.eigh(diab_en) + return np.abs(T.dot(diab_fosc)) + + def diab_en(self, crd): + """"""diab_en returns the full diabatic matrix of the system + """""" + diab_en = np.empty((3, 3), dtype=float) + diab_en[0, 0] = 0.5*(self.w1*crd[0]**2 + + self.w2*crd[1]**2 + + self.w3*crd[2]**2) + diab_en[0, 1] = 0.0 + diab_en[0, 2] = 0.0 + diab_en[1, 1] = diab_en[0, 0] + self.E1 \ + + self.kappa11*crd[0] + self.kappa12*crd[1] + diab_en[1, 2] = self.lam*crd[2] + diab_en[2, 2] = diab_en[0, 0] + self.E2 \ + + self.kappa21*crd[0] + self.kappa22*crd[1] + diab_en[1, 0] = diab_en[0, 1] + diab_en[2, 0] = diab_en[0, 2] + diab_en[2, 1] = diab_en[1, 2] + return diab_en + + def adiab_grad(self, crd): + """"""adiab_grad calculates and returns the numeric adiabatic gradients + """""" + adiab_grad = np.empty((3, 3), dtype=float) + dq = 0.01 + for i in range(3): + crd1 = deepcopy(crd) + crd1[i] = crd1[i] + dq + en1, _ = self.adiab_en(crd1) + crd2 = deepcopy(crd) + crd2[i] = crd2[i] - dq + en2, _ = self.adiab_en(crd2) + adiab_grad[:, i] = (en1 - en2)/2.0/dq + return {i: adiab_grad[i] for i in range(3)} + + def diab_grad(self, crd): + """"""diab_grad returns the matrix with the analytical diabatic gradients + """""" + diab_grad = np.empty((3, 3, 3), dtype=float) + diab_grad[0, 0, 0] = self.w1*crd[0] + diab_grad[0, 0, 1] = self.w2*crd[1] + diab_grad[0, 0, 2] = self.w3*crd[2] + diab_grad[0, 1, 0:3] = 0.0 + diab_grad[0, 2, 0:3] = 0.0 + diab_grad[1, 1, 0] = diab_grad[0, 0, 0] + 2.*self.kappa11*crd[0] + diab_grad[1, 1, 1] = diab_grad[0, 0, 1] + 2.*self.kappa12*crd[1] + diab_grad[1, 1, 2] = diab_grad[0, 0, 2] + diab_grad[1, 2, 0:2] = 0.0 + diab_grad[1, 2, 2] = self.lam + diab_grad[2, 2, 0] = diab_grad[0, 0, 0] + 2.*self.kappa21*crd[0] + diab_grad[2, 2, 1] = diab_grad[0, 0, 1] + 2.*self.kappa12*crd[1] + diab_grad[2, 2, 2] = diab_grad[0, 0, 2] + diab_grad[1, 0, :] = diab_grad[0, 1, :] + diab_grad[2, 0, :] = diab_grad[0, 2, :] + diab_grad[2, 1, :] = diab_grad[1, 2, :] + return diab_grad + + +#class PyrMiniSala(PyrMini): +# +# def __init__(self): +# """""" Pyrazine model according to Sala, Lasorne, Gatti and Guerin; +# PCCP 2014, 16, 15957 with 3 modes and 2 excited states. +# The model is in dimensionless normal modes. +# """""" +# ev2au = 1./27.2113961 +# self.E1 = 3.93*ev2au +# self.E2 = 4.79*ev2au +# self.kappa11 = -0.038*ev2au +# self.kappa12 = -0.081*ev2au +# self.kappa21 = -0.183*ev2au +# self.kappa22 = 0.128*ev2au +# self.lam = 0.195*ev2au +# self.w1 = 0.126*ev2au +# self.w2 = 0.074*ev2au +# self.w3 = 0.116*ev2au +# self.masses = np.array((1.0/self.w1, 1.0/self.w2, 1.0/self.w3)) +# pass + + +if __name__ == ""__main__"": + """"""small test function printing the energies and gradients at the equilibrium + point + """""" + crd = np.array([0.0, 0.0, 0.0]) + model = PyrMini() + print(model.w1, model.w2, model.w3) + # print(model.get(crd)) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/model/plot_energy.py",".py","1525","55","import numpy as np +import matplotlib.pyplot as plt + +from pyrmini import PyrMini + +x = np.linspace(-10,10,100) + +y_grad = np.empty((100,3),dtype=float) +y1_en = np.empty((100,3), dtype=float) +y2_en = np.empty((100,3), dtype=float) +y3_en = np.empty((100,3), dtype=float) + +pm=PyrMini() +print(pm.w1) +for i in range(100): + res = pm.get({'crd': np.array([x[i],0,0]), 'gradient': None, 'energy': None}) + y1_en[i] = res['energy'] + #print(pm.get(np.array([x[i],0,0]))['gradient']) + +for i in range(100): + res = pm.get({'crd': np.array([0,x[i],0]), 'gradient': None, 'energy': None}) + y2_en[i] = res['energy'] + #print(pm.get(np.array([x[i],0,0]))['gradient']) + +for i in range(100): + res = pm.get({'crd': np.array([0,0,x[i]]), 'gradient': None, 'energy': None}) + y3_en[i] = res['energy'] + +y1_en = np.array(y1_en)*27.2114 +y2_en = np.array(y2_en)*27.2114 +y3_en = np.array(y3_en)*27.2114 + + +black = (0,0,0) +blue = (63/255, 81/255, 181/255) +red = (253/255, 86/255, 33/255) +fig = plt.figure() +ax = fig.add_subplot(1, 3, 1) +ax.set_xlabel(r'$Q_1$') +ax.set_ylabel('energy [eV]') +for i, color in enumerate((black, blue, red)): + ax.plot(x, y1_en[:,i], color=color) +ax = fig.add_subplot(1, 3, 2) +ax.set_xlabel(r'$Q_{6a}$') +ax.set_ylabel('energy [eV]') +for i, color in enumerate((black, blue, red)): + ax.plot(x, y2_en[:,i], color=color) +ax = fig.add_subplot(1, 3, 3) +ax.set_xlabel(r'$Q_{10a}$') +ax.set_ylabel('energy [eV]') +for i, color in enumerate((black, blue, red)): + ax.plot(x, y3_en[:,i], color=color) +plt.show() + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/model/pyrazine_sala.py",".py","10835","294","import numpy as np +from copy import deepcopy +from ..methodbase import Model +from ...system import Mode +from qctools.converter import energy_converter + + +ev2au = 1./27.2113961 + +class PyrazineSala(Model): + """""" Pyrazine Models from Phys. Chem. Chem. Phys. 2014, 16, 15957 from Sala, Lasorne, Gatti and + Guerin. The user can choose how many states are involved. Additionally the ground-state is + added to the models, but is not coupled. The number of modes varies with the number of states. + """""" + + _questions = """""" + n_states = 3 :: int :: [3, 4, 5] + """""" + + q_list = ['v6a', 'v10a', 'v16a', 'v1', 'v4', 'v19b', 'v9a', 'v3', 'v8b', 'v8a', 'v5', 'v12', + 'v18a', 'v18b', 'v19a', 'v14'] + + #Frequencies in cm-1 from Table 2 + w = {'v6a': 593, + 'v1': 1017, + 'v9a': 1242, + 'v8a': 1605, + 'v2': 3226, + 'v10a': 936, + 'v4': 734, + 'v5': 942, + 'v6b': 700, + 'v3': 1352, + 'v8b': 1553, + 'v7b': 3205, + 'v16a': 337, + 'v17a': 966, + 'v12': 1022, + 'v18a': 1148, + 'v19a': 1486, + 'v13': 3206, + 'v18b': 1079, + 'v14': 1364, + 'v19b': 1440, + 'v20b': 3221, + 'v16b': 417, + 'v11': 797} + + #Energies in [eV] from Table 3 + E = {0: 0.0, + 1: 3.93, + 2: 4.45, + 3: 4.79, + 4: 5.38} + + #Kappa values [eV] from Table 4 + k = {'v6a': {1: -0.081, 2: -0.168, 3: 0.128, 4:-0.184}, + 'v1': {1: -0.038, 2: -0.083, 3: -0.183, 4: -0.117}, + 'v9a': {1: 0.117, 2: -0.071, 3: 0.045, 4: 0.165}, + 'v8a': {1: -0.087, 2: -0.465, 3: 0.026, 4: 0.172}, + 'v2': {1: 0.022, 2: 0.060, 3: 0.018, 4: 0.030}} + + #lambda values according to Table 5 in [eV] + l = {'v10a': 0.195, + 'v4': 0.060, + 'v5': 0.053, + 'v6b': 0.000, + 'v3': 0.065, + 'v8b': 0.219, + 'v7b': 0.020, + 'v16a': 0.112, + 'v17a': 0.018, + 'v12': 0.207, + 'v18a': 0.090, + 'v19a': 0.094, + 'v13': 0.000, + 'v18b': 0.044, + 'v14': 0.044, + 'v19b': 0.072, + 'v20b': 0.000} + + #List of allowed transitions according to the symmetry + #Coupling state 1 and 2: B3g symmetry + l12 = ['v6b', 'v3', 'v8b', 'v7b'] + #Coupling state 1 and 3: B1g symmetry + l13 = ['v10a'] + #Coupling state 2 and 3: B2g symmetry + l23 = ['v4', 'v5'] + #Coupling state 1 and 4: B1u symmetry + l14 = ['v12', 'v18a', 'v19a', 'v13'] + #Coupling state 2 and 4: B2u symmetry + l24 = ['v18b', 'v14', 'v19b', 'v20b'] + #Coupling state 3 and 4: Au symmetry + l34 = ['v16a', 'v17a'] + + #gamma values according to Table 5 in [eV] + g = {'v10a': {1: -0.012, 2: -0.048, 3: -0.012, 4: -0.013}, + 'v4': {1: -0.030, 2: -0.031, 3: -0.031, 4: -0.027}, + 'v5': {1: -0.014, 2: -0.026, 3: -0.026, 4: -0.009}, + 'v6b': {1: -0.013, 2: -0.013, 3: -0.005, 4: -0.006}, + 'v3': {1: -0.006, 2: 0.006, 3: 0.001, 4: -0.004}, + 'v8b': {1: -0.012, 2: -0.012, 3: 0.007, 4: -0.043}, + 'v7b': {1: 0.003, 2: 0.003, 3: 0.004, 4: 0.003}, + 'v16a': {1: 0.013, 2: -0.013, 3: -0.008, 4: -0.008}, + 'v17a': {1: -0.016, 2: -0.041, 3: -0.012, 4: -0.012}, + 'v12': {1: -0.006, 2: -0.022, 3: -0.006, 4: -0.006}, + 'v18a': {1: -0.006, 2: -0.002, 3: -0.005, 4: -0.006}, + 'v19a': {1: -0.006, 2: -0.010, 3: -0.002, 4: -0.006}, + 'v13': {1: 0.005, 2: 0.004, 3: 0.004, 4: 0.004}, + 'v18b': {1: -0.001, 2: -0.003, 3: -0.002, 4: -0.003}, + 'v14': {1: -0.019, 2: -0.021, 3: -0.020, 4: -0.021}, + 'v19b': {1: -0.013, 2: -0.006, 3: -0.015, 4: -0.006}, + 'v20b': {1: 0.005, 2: 0.003, 3: 0.004, 4: 0.003}} + + implemented = [""energy"", ""gradient"", ""fosc""] + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + self.nstates = config['n_states'] + if config['n_states'] == 3: + self.q = ['v6a', 'v10a', 'v1', 'v9a', 'v8a'] + self.states = [0, 1, 3] + if config['n_states'] == 4: + self.q = ['v6a', 'v10a', 'v1', 'v4', 'v9a', 'v3', 'v8b', 'v8a', 'v5'] + self.states = [0, 1, 2, 3] + if config['n_states'] == 5: + self.q = ['v6a', 'v10a', 'v16a', 'v1', 'v4', 'v19b', 'v9a', 'v3', 'v8b', + 'v8a', 'v5', 'v12', 'v18a', 'v18b', 'v19a', 'v14'] + self.states = [0, 1, 2, 3, 4] + + self.conv_ev = energy_converter.get_converter('eV', 'au') + self.conv_cm = energy_converter.get_converter('cminv', 'au') + + self.frequencies = np.array([self.conv_cm(self.w[mode]) for mode in self.q]) + self.masses = np.ones(self.frequencies.size)/self.frequencies + self.displacements = np.identity(len(self.q)) + self.modes = [Mode(freq, dis) for freq, dis in zip(self.frequencies, self.displacements)] + self.crd = np.zeros(len(self.q)) + + + def get(self, request): + """"""the get function returns the adiabatic energies as well as the + gradient at the given position crd. Additionally the masses + of the normal modes are returned for the kinetic Hamiltonian. + """""" + crd = request.crd + T = None + if 'energy' in request.keys(): + en, T = self.adiab_en(crd) + request.set('energy', en) + if 'fosc' in request.keys(): + request.set('fosc', self.adiab_fosc(crd, T)) + if 'gradient' in request.keys(): + grad = self.adiab_grad(crd) + request.set('gradient', grad) + return request + + def adiab_en(self, crd): + """"""adiab_en returns a one dimensional vector with the adiabatic energies at + the position crd + """""" + diab_en = self.diab_en(crd) + # eigh gives eigenvalues and eigenvectors in ascending order for hermitian matrix + res = np.linalg.eigh(diab_en) + adiab_en = res[0] + T = res[1] + return adiab_en, T + + def adiab_fosc(self, crd, T=None): + """"""adiab_en returns a one dimensional vector with the adiabatic energies at + the position crd + """""" + if T is None: + diab_en = self.diab_en(crd) + T = np.linalg.eigh(diab_en)[1] + adiab_fosc = T.dot(self.diab_fosc(crd)) + return np.abs(adiab_fosc) + + def diab_en(self, crd): + """"""diab_en returns the full diabatic matrix of the system + """""" + diab_en = np.zeros((self.nstates, self.nstates), dtype=float) + #Build diabatic hamiltonian + for state_idx, state in enumerate(self.states): + #add excitation energy + diab_en[state_idx, state_idx] += self.conv_ev(self.E[state]) + + for idx, mode in enumerate(self.q): + #add reference frequency terms + diab_en[state_idx, state_idx] += self.conv_cm(self.w[mode])/2. * crd[idx]**2 + + #Add kappa terms + if mode in self.k and state != 0: + diab_en[state_idx, state_idx] += self.conv_ev(self.k[mode][state]) * crd[idx] + + #Add gamma terms + if mode in self.g and state != 0: + diab_en[state_idx, state_idx] += self.conv_ev(self.g[mode][state]) * crd[idx]**2 + + #Add off diagonal coupling terms: + if self.nstates == 3: + for idx, mode in enumerate(self.q): + #note that the 2 state model contains the states 1 and 3! + if mode in self.l13: + diab_en[1, 2] += self.conv_ev(self.l[mode]) * crd[idx] + diab_en[2, 1] = diab_en[1, 2] + else: + for idx, mode in enumerate(self.q): + #note that the 2 state model contains the states 1 and 3! + if mode in self.l13: + diab_en[1, 3] += self.conv_ev(self.l[mode]) * crd[idx] + diab_en[3, 1] = diab_en[1, 3] + + if self.nstates >= 4: + for idx, mode in enumerate(self.q): + if mode in self.l12: + diab_en[1, 2] += self.conv_ev(self.l[mode]) * crd[idx] + diab_en[2, 1] = diab_en[1, 2] + if mode in self.l23: + diab_en[2, 3] += self.conv_ev(self.l[mode]) * crd[idx] + diab_en[3, 2] = diab_en[2, 3] + + if self.nstates >= 5: + for idx, mode in enumerate(self.q): + if mode in self.l14: + diab_en[1, 4] += self.conv_ev(self.l[mode]) * crd[idx] + diab_en[4, 1] = diab_en[1, 4] + if mode in self.l24: + diab_en[2, 4] += self.conv_ev(self.l[mode]) * crd[idx] + diab_en[4, 2] = diab_en[2, 4] + if mode in self.l34: + diab_en[3, 4] += self.conv_ev(self.l[mode]) * crd[idx] + diab_en[4, 3] = diab_en[3, 4] + + return diab_en + + def diab_fosc(self, crd): + if self.nstates == 3: + return np.array([0, 0, 1]) + if self.nstates == 4: + return np.array([0, 0, 0, 1]) + if self.nstates == 5: + return np.array([0, 0, 0, 1, 0]) + + def adiab_grad(self, crd): + """"""adiab_grad calculates and returns the numeric adiabatic gradients + """""" + adiab_grad = np.empty((self.nstates, len(self.q)), dtype=float) + dq = 0.01 + for i in range(len(self.q)): + crd1 = deepcopy(crd) + crd1[i] = crd1[i] + dq + en1, _ = self.adiab_en(crd1) + crd2 = deepcopy(crd) + crd2[i] = crd2[i] - dq + en2, _ = self.adiab_en(crd2) + adiab_grad[:, i] = (en1 - en2)/2.0/dq + return {i: adiab_grad[i] for i in range(self.nstates)} + + + +#class PyrMiniSala(PyrMini): +# +# def __init__(self): +# """""" Pyrazine model according to Sala, Lasorne, Gatti and Guerin; +# PCCP 2014, 16, 15957 with 3 modes and 2 excited states. +# The model is in dimensionless normal modes. +# """""" +# ev2au = 1./27.2113961 +# self.E1 = 3.93*ev2au +# self.E2 = 4.79*ev2au +# self.kappa11 = -0.038*ev2au +# self.kappa12 = -0.081*ev2au +# self.kappa21 = -0.183*ev2au +# self.kappa22 = 0.128*ev2au +# self.lam = 0.195*ev2au +# self.w1 = 0.126*ev2au +# self.w2 = 0.074*ev2au +# self.w3 = 0.116*ev2au +# self.masses = np.array((1.0/self.w1, 1.0/self.w2, 1.0/self.w3)) +# pass + + +if __name__ == ""__main__"": + """"""small test function printing the energies and gradients at the equilibrium + point + """""" + crd = np.zeros() + model = PyrazineSala({'':{'n_states': 3}}) + print(model.frequencies) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/model/model.py",".py","109","9","from abc import ABC, abstractmethod + + +class Model(ABC): + + @abstractmethod + def get(self): + pass +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/model/__init__.py",".py","166","6","from ..methodbase import Model +from .pyrazine_schneider import PyrazineSchneider +from .pyrazine_sala import PyrazineSala + +plugins = [PyrazineSchneider, PyrazineSala] +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/model/plot_grad.py",".py","660","31","import numpy as np +import matplotlib.pyplot as plt + +from pyrmini import PyrMini + +x = np.linspace(-15,15,100) + +y_grad = np.empty((100,3),dtype=float) +y_en = np.empty((100,3), dtype=float) + +pm=PyrMini() +print(pm.w1) +for i in range(100): + res = pm.get({'crd': np.array([0,0,x[i]]), 'gradient': None, 'energy': None}) + y_grad[i] = res['gradient'][:,2] + y_en[i] = res['energy'] + #print(pm.get(np.array([x[i],0,0]))['gradient']) + + +fig = plt.figure() +ax = fig.add_subplot(1, 2, 1) +ax.set_xlabel('Coord ') +ax.set_ylabel('energy') +ax.plot(x, y_grad) +ax = fig.add_subplot(1, 2, 2) +ax.set_xlabel('Coord ') +ax.set_ylabel('energy') +ax.plot(x, y_en) +plt.show() + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/model/test_db.py",".py","1934","69","import numpy as np +from abc import abstractmethod, ABC + + +class Model(ABC): + + @abstractmethod + def get(self): + pass + + +class TestDB(Model): + """""" class to test the interpolation routine of the database. + It provides two simple potential energy surfaces and the + corresponding gradients of shifted harmonic oscillators in an + arbitrary dimension. + """""" + def __init__(self): + pass + + def get(self, request): + """""" the get function returns the adiabatic energies as well as + the gradient at the given position crd. Additionally the + masses of the normal modes are returned for the kinetic + Hamiltonian. + """""" + if 'crd' in request.keys(): + crd = request['crd'] + if 'energy' in request.keys(): + request['energy'] = self.en(crd) + if 'gradient' in request.keys(): + request['gradient'] = self.grad(crd) + + # If an empty dictionary is sent, all possible properties are + # sent back + else: + request['energy'] = None + request['gradient'] = None + return request + + + def en(self, crd): + """""" Method to calculate the energies of the PE surfaces at the + given point. + """""" + en = [0.0, 0.0] + for co in crd.flatten(): + en[0] += co**2 + en[1] += (co-1)**2 + return en + + def grad(self, crd): + """""" Method to calculate the gradient for the PE surfaces + at the given point. + """""" + grad = np.zeros((2, *crd.shape), dtype=float) + grad[0, :, :] = 2.*crd + grad[1, :, :] = 2.*(crd-1) + return grad + + +if __name__ == ""__main__"": + """""" small test function printing the energies and gradients at the + equilibrium point + """""" + crd = np.array([[0.0, 0.0, 0.0]]) + model = TestDB() + print(model.get(crd)) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/qm/turbomole.py",".py","16802","491","from collections.abc import MutableMapping +from copy import deepcopy +import os +import shutil +import subprocess +import numpy as np +# +from jinja2 import Template +# +from qctools import generate_filereader, Event +from qctools.events import join_events +# +from colt import Colt +from ...utils import exists_and_isfile +from ...system import ATOMID_TO_NAME +from ...logger import Logger, get_logger +# +from . import AbinitioBase +from ...system import Molecule + + +class ADC2questions(Colt): + _user_input = """""" + """""" + +class DFTquestions(Colt): + _user_input = """""" + functional = :: str + grid = m4 :: str + """""" + + +turbomole = """""" +[MP2Energy] +grep = Final MP2 energy +split = 5 :: float + +[DSCFEnergy] +grep = | total energy +split = 4 :: float + +[ESCFEnergy] +grep = Total energy +split = 2 :: float +settings = multi=True + +[ESCFFosc] +grep = Oscillator strength :: 1 :: 2 +split = 2 :: float +settings = multi=True + +[ADCFosc] +grep = oscillator strength +split = 5 :: float +settings = multi=True + +[NStates] +grep = nstates= +split = -1 :: int +"""""" + +# Additional functions for the reader +def get_ex_energies(txt): + ex = [] + for line in txt: + ex += [float(line.split()[1])] + return ex + +def get_gradient(txt): + grad = [] + for line in txt: + line = line.replace('D', 'E') + ls = line.split() + grad += [[float(ls[0]), float(ls[1]), float(ls[2])]] + return grad + +def get_state(txt): + return int(txt.split('_')[-1]) + +def get_fosc(txt): + txt = txt.replace('D', 'E') + txt_sp = txt.split() + res = 0 + for i in [1, 3, 5]: + res += float(txt_sp[i].strip('=')) + return res + +# Events for the reader +ADCExEnergies = Event('ADCExEnergies', + 'xgrep', {'keyword': 'excitation_energies_ADC(2)', + 'ishift' : 1, + 'ilen' : 'nstates'}, + func=get_ex_energies) + + +ADCExGradient = Event('ADCExGradient', + 'xgrep', {'keyword': 'gradient', + 'ishift' : 1, + 'ilen' : 'natoms'}, + func=get_gradient) + +Gradient = Event('Gradient', + 'xgrep', {'keyword': 'cycle', + 'ishift' : 'shift', + 'ilen' : 'natoms'}, + func=get_gradient) + +ADCExPropState = Event('ADCExPropState', + 'grep', {'keyword': 'exstprop', + 'ishift' : 0, + 'ilen' : 1}, + func=get_state) + + +# change by hand the events, to clear them up! +TurbomoleReader = generate_filereader(""TurbomoleReader"", turbomole) +TurbomoleReader.add_event(""ADCExGradient"", ADCExGradient) +TurbomoleReader.add_event(""ADCExPropState"", ADCExPropState) +grad_ex = TurbomoleReader._events['ADCExGradient'] +prop_st = TurbomoleReader._events['ADCExPropState'] +grad_state = join_events(prop_st, grad_ex) +TurbomoleReader.add_event(""ADCExEnergies"", ADCExEnergies) +TurbomoleReader.add_event(""Gradient"", Gradient) +TurbomoleReader.add_event(""ADCExGrad"", grad_state) + + +tpl_energy = Template( +"""""" +$denconv 0.10000000E-06 +$ricc2 + adc(2) +$excitations + irrep=a mult=1 nexc={{states}} npre={{states}} nstart={{states}} + {{fosc}} +"""""") + +tpl_fosc = """""" + spectrum states=all operators=diplen +"""""" + +tpl_gradient_gs = """""" +$denconv 0.10000000E-06 +$ricc2 + geoopt model=mp2 +"""""" + +tpl_gradient_ex = Template( +"""""" +$denconv 0.10000000E-06 +$ricc2 + adc(2) +$excitations + irrep=a mult=1 nexc={{states}} npre={{states}} nstart={{states}} + xgrad states=(a {{gradstates}}) +"""""") + +tpl_dft = Template("""""" +$dft + functional {{functional}} + gridsize {{grid}} +$soes + a {{states}} +$denconv 1d-7 +$scfinstab rpas +"""""") + + +class Turbomole(AbinitioBase): + + _user_input = """""" + # Methode die angewendet werden soll + method = ADC(2) :: str :: [ADC(2), DFT/TDDFT] + + basis = cc-pVDZ + max_scf_cycles = 50 :: int + """""" + + _method = { + 'ADC(2)': ADC2questions, + 'DFT/TDDFT': DFTquestions + } + + + settings = { + 'method': 'ADC(2)', + 'basis': 'cc-pvdz', + 'max_scf_cycles': 50, + } + + + reader = TurbomoleReader + # + implemented = ['energy', 'gradient', 'fosc'] + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""method"", {name: method.colt_user_input for name, method in cls._method.items()}) + + def __init__(self, config, atomids, nstates, nghost_states): + self.logger = get_logger('tm_inter.log', 'turbomole_interface') + self.molecule = Molecule(atomids, None) + self.nstates = nstates + self.nghost_states = nghost_states + self.atomids = atomids + self.atomnames = [ATOMID_TO_NAME[idx] for idx in atomids] + self._update_settings(config, nstates) + self.reader._events['ESCFEnergy'].nmax = nstates+nghost_states + + def _update_settings(self, config, nstates): + self.settings = {key: config[key] for key in self.settings} + self.settings.update({key: config['method'][key] for key in config['method']}) + self.settings['nstates'] = nstates + + @classmethod + def from_config(cls, config, atomids, nstates, nghost_states): + return cls(config, atomids, nstates, nghost_states) + + def get(self, request): + # update coordinates + self.same_crd = False + self.molecule.crd = request.crd + if 'energy' in request: + if self.settings['method'] == 'ADC(2)': + self._do_energy_adc(request) + self.same_crd = True + elif self.settings['method'] == 'DFT/TDDFT': + self._do_energy_dft(request) + self.same_crd = True + if 'gradient' in request: + self._do_gradient(request) + self.same_crd = False + # + return request + + def _do_gradient(self, request): + grad = {} + if 0 in request.states: + if exists_and_isfile('gradient'): os.remove('gradient') + if self.settings['method'] == 'ADC(2)': + grad.update(self._do_gs_gradient_adc(request)) + elif self.settings['method'] == 'DFT/TDDFT': + grad.update(self._do_gs_gradient_dft(request)) + for state in request.states: + if state == 0: + continue + if self.settings['method'] == 'ADC(2)': + grad.update(self._do_ex_gradient_adc(request, state)) + if self.settings['method'] == 'DFT/TDDFT': + grad.update(self._do_ex_gradient_dft(request, state)) + request.set('gradient', grad) + + def _do_energy_adc(self, request): + #create coord file + coord = self._write_coord(self.molecule.crd, filename='coord') + self._check_reffiles(coord) + mode = {'energy': ''} + if 'fosc' in request: + mode['fosc'] = True + self._prepare_control_adc(mode=mode) + #start calculations + if self.same_crd is False: + dscf_output = self.submit('dscf') + ricc2_output = self.submit('ricc2') + #read energies + mp2energy = self.reader(ricc2_output, ['MP2Energy'])['MP2Energy'] + energies = [mp2energy] + if self.nstates > 1: + exenergies = self.reader('exstates', ['ADCExEnergies'], {'nstates': self.nstates-1+self.nghost_states})['ADCExEnergies'] + exenergies = exenergies[:self.nstates-1] + if isinstance(exenergies, list): + for ex in exenergies: + energies += [mp2energy + ex] + if isinstance(exenergies, float): + energies += [mp2energy + exenergies] + request.set('energy', energies) + #read oscillator strengths if requested + if 'fosc' in request: + fosc = [0.] + foscres = self.reader(ricc2_output, ['ADCFosc'])['ADCFosc'] + if isinstance(foscres, list): + fosc += foscres + elif isinstance(foscres, float): + fosc += [foscres] + request.set('fosc', np.array(fosc).flatten()[:self.nstates]) + + def _do_energy_dft(self, request): + #create coord file + coord = self._write_coord(self.molecule.crd, filename='coord') + self._check_reffiles(coord) + mode = {'energy': ''} + self._prepare_control_dft(mode=mode) + #start calculations + if self.same_crd is False: + dscf_output = self.submit('dscf') + if self.nstates > 1: + escf_output = self.submit('escf') + #read energies + dscfenergy = self.reader(dscf_output, ['DSCFEnergy'])['DSCFEnergy'] + energies = [dscfenergy] + if self.nstates > 1: + exenergies = self.reader(escf_output, ['ESCFEnergy'])['ESCFEnergy'] + energies = exenergies[:self.nstates] + energies = np.array(energies).flatten() + request.set('energy', energies) + #read oscillator strengths if requested + if 'fosc' in request: + fosc = [0.] + if self.nstates > 1: + foscread = self.reader(escf_output, ['ESCFFosc'])['ESCFFosc'] + if isinstance(foscread, list): + fosc += np.array(foscread).flatten() + if isinstance(foscread, float): + fosc += [foscread] + request.set('fosc', np.array(fosc).flatten()[:self.nstates]) + + def _do_ex_gradient_dft(self, request, state): + coord = self._write_coord(self.molecule.crd, filename='coord') + self._check_reffiles(coord) + mode = {'gradient': state} + self._prepare_control_dft(mode=mode) + if self.same_crd is False: + dscf_output = self.submit('dscf') + grad_output = self.submit('egrad') + return {state: np.array(self.reader('gradient', ['Gradient'], {'natoms': self.molecule.natoms, 'shift': self.molecule.natoms + 1})['Gradient'])} + + def _do_gs_gradient_adc(self, request): + coord = self._write_coord(self.molecule.crd, filename='coord') + self._check_reffiles(coord) + mode = {'gradient': 0} + self._prepare_control_adc(mode=mode) + if self.same_crd is False: + dscf_output = self.submit('dscf') + ricc2_output = self.submit('ricc2') + return {0: np.array(self.reader('gradient', ['Gradient'], {'natoms': self.molecule.natoms, 'shift': self.molecule.natoms + 1})['Gradient'])} + + def _do_gs_gradient_dft(self, request): + coord = self._write_coord(self.molecule.crd, filename='coord') + self._check_reffiles(coord) + mode = {'gradient': 0} + self._prepare_control_dft(mode=mode) + if self.same_crd is False: + dscf_output = self.submit('dscf') + grad_output = self.submit('grad') + return {0: np.array(self.reader('gradient', ['Gradient'], {'natoms': self.molecule.natoms, 'shift': self.molecule.natoms + 1})['Gradient'])} + + def _do_ex_gradient_adc(self, request, state): + coord = self._write_coord(self.molecule.crd, filename='coord') + self._check_reffiles(coord) + states = '' + c=0 + mode = {'gradient': state} + self._prepare_control_adc(mode=mode) + if self.same_crd is False: + dscf_output = self.submit('dscf') + ricc2_output = self.submit('ricc2') + #read gradient output + res = self.reader('exstates', ['ADCExGrad'], {'natoms': self.molecule.natoms}) + grad={} + if isinstance(res['ADCExPropState'], list): + for idx, state in enumerate(res['ADCExPropState']): + grad[state] = np.array(res['ADCExGradient'][idx]) + else: + grad[res['ADCExPropState']] = np.array(res['ADCExGradient']) + return grad + + def _prepare_control_adc(self, mode, reffile='control_ref'): + with open(reffile, 'r') as f: + template = f.readlines() + with open('control', 'w') as f: + for line in template: + if '$end' not in line: + if '$scfiterlimit' in line: + f.write(f""$scfiterlimit {self.settings['max_scf_cycles']}\n"") + continue + f.write(line) + else: + break + #for energies and fosc + if ('energy' in mode) or ('fosc' in mode): + if 'fosc' in mode: + fosc = tpl_fosc + else: + fosc = '' + f.write(tpl_energy.render(states=self.nstates-1+self.nghost_states, fosc=fosc)) + #for gradients + if 'gradient' in mode: + #check ground state gradient calculation + if mode['gradient'] == 0: + f.write(tpl_gradient_gs) + else: + f.write(tpl_gradient_ex.render(states=self.nstates-1, gradstates=mode['gradient'])) + f.write('\n$end') + + def _prepare_control_dft(self, mode, reffile='control_ref'): + with open(reffile, 'r') as f: + template = f.readlines() + with open('control', 'w') as f: + for line in template: + if '$end' not in line: + if '$scfiterlimit' in line: + f.write(f""$scfiterlimit {self.settings['max_scf_cycles']}\n"") + continue + #Use Turbomole default for scfdamp in DFT calculations + if '$scfdamp' in line: + f.write(""$scfdamp start=0.7 step=0.050 min=0.050\n"") + continue + f.write(line) + else: + break + f.write(tpl_dft.render(states=self.nstates-1+self.nghost_states, functional=self.settings['functional'], grid=self.settings['grid'])) + #for gradients + if 'gradient' in mode: + #check ground state gradient calculation + if mode['gradient'] == 0: + pass + else: + f.write(f""$exopt {mode['gradient']}"") + f.write('\n$end') + + def _check_reffiles(self, coord, refcontrol=None, reforbitals=None): + #Check whether reference control file exists + if refcontrol is None: + refcontrol = 'control_ref' + if exists_and_isfile(refcontrol): + ctrl = True + else: + ctrl = False + #Check whether reference orbital file exists: + orbs = False + if reforbitals is None: + if exists_and_isfile('mos'): + orbs = True + if exists_and_isfile('alpha') and exists_and_isfile('beta'): + orbs = True + else: + if len(reforbitals) > 1: + for reffile in reforbitals: + if exists_and_isfile(reffile): + shutil.copy(reffile, './') + else: + self.logger.error('reference orbital files not found') + else: + if exists_and_isfile(reffile): + shutil.copy(reffile, './') + else: + self.logger.error('reference orbital file not found') + orbs = True + #run turbomole define input script if necessary + if (orbs and ctrl) is False: + self._run_define(coord, self.settings['basis']) + + def _write_coord(self, crd, filename='coord'): + with open(filename, 'w') as crdfile: + crdfile.write('$coord\n') + for crd, atom in zip(crd, self.atomnames): + crdfile.write(f"" {crd[0]:>19.14f} {crd[1]:>19.14f} {crd[2]:>19.14f} {atom}\n"") + crdfile.write(""$end"") + return filename + + def _run_define(self, coord, basis): + self.logger.info('Run turbomole define script') + define_in = f"""""" + + a {coord} + * + no + b all {basis} + * + eht + + + + q + """""" + define = subprocess.run('define', + input=define_in.encode('utf-8'), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if not('define ended normally' in define.stderr.decode('utf-8').strip()): + self.logger.error('Error in generating the reference control file') + shutil.copyfile('control', 'control_ref') + + def submit(self, exe): + output = exe + "".out"" + cmd = f""{exe}"" + with open(output, 'w') as outfile: + run = subprocess.run(cmd, stdout=outfile, stderr=subprocess.PIPE) + if not('ended normally' in run.stderr.decode('utf-8')): + self.logger.error(f""Error in Turbomole calculation: {cmd} with error: {run.stderr.decode('utf-8')}"") + return output +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/qm/xtb.py",".py","3603","112","import os +import subprocess as sp +# +from . import AbinitioBase +from ...fileparser import read_geom +from .xtbhelp import XTBReader +from ...system import Molecule + + +def run_interface(script, name): + print('############## Run section: ##############\nInterface %s call:' % name) + print(script) + error=sp.call(script, shell=True) + if error==0: + print('Finished!') + else: + print('*** Something went wrong! ***') + print(""Error count = %d"" % error) + return + + +def write_content_to_file(fileName, content, options=""w""): + """""" write content to file [fileName] + + fileName = str, Name of the file to be read + content = str, content written to the file + """""" + with open(fileName, options) as f: + f.write(content) + + +class XTBInterface(AbinitioBase): + + name = ""XTB"" + + _user_input = """""" + executable = xtb + name = xtb calculation + refgeom = :: existing_file + filename = xtb_input.xyz + """""" + + implemented = ['energy', 'gradient'] + + def __init__(self, executable, name, atomids, filename): + self.natoms = len(atomids) + self.molecule = Molecule(atomids, None) + self.name = name + self.executable = executable +# self.natoms, self.atomnames, self.coords = read_geom(refgeom) + self.ifile = filename + + @classmethod + def from_config(cls, config, atomids, nstates, nghost): + assert nghost == 0 + if nstates > 1: + raise Exception(""Only Groundstate calculations possible"") + return cls(config['executable'], config['name'], atomids, config['filename']) + + def get(self, request): + self.molecule.crd = request.crd + self._write_general_inputs() + (en, dip), grad, _ = self._run_gradient() + if 'gradient' in request: + request['gradient'][0] = grad.reshape((self.natoms, 3)) + request.set('energy', en) + return request + + def _write_general_inputs(self): + self.molecule.write_xyz(self.ifile) + + def _run_energy(self): + command = ""%s %s --sp --copy > output_energy"" % (self.executable, self.ifile) + run_interface(command, self.name) + return (self._read_xtb_energy_and_dipole(""output_energy""), None, None) + + def _run_gradient(self): + command = ""%s %s --grad --copy > output_gradient "" % (self.executable, self.ifile) + run_interface(command, self.name) + output = (self._read_xtb_energy_and_dipole(""output_gradient""), self._read_xtb_gradient(""gradient""), None) + self.clean_up() + return output + + def _run_frequency(self): + (_, _), grad, _ = self._run_gradient() + command = ""%s %s --hess --copy > output_freq"" % (self.executable, self.ifile) + run_interface(command, self.name) + return (self._read_xtb_energy_and_dipole(""output_freq""), + grad, + self._read_xtb_hessian(""hessian"")) + + + def clean_up(self): + os.rename(""gradient"", ""grad_old"") + return + + def _read_xtb_energy_and_dipole(self, filename): + xtb = XTBReader(filename, [""Dipole"", ""Energy""]) + return xtb[""Energy""], xtb[""Dipole""] + + def _read_xtb_gradient(self, filename): + xtb = XTBReader(filename, [""Gradient""], {""NAtoms"": self.natoms}) + return xtb[""Gradient""] + + def _read_xtb_hessian(self, filename): + xtb = XTBReader(filename, [""Hessian""], {""NAtoms"": self.natoms}) + return xtb[""Hessian""] + + @classmethod + def get_coordinates(cls, atomid, coords): + return ""% 4s % 14.10f % 14.10f % 14.10f \n"" % (atomid, coords[0], coords[1], coords[2]) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/qm/xtbhelp.py",".py","1741","65","import numpy as np +# +from qctools import generate_filereader +from qctools import Event +from qctools import register_event_type + + +def end_of_loop(): + raise StopIteration + + +def read_xtb_gradient(iterator, NAtoms=0): + + # skip first NAtoms+1 lines + for _ in range(NAtoms+2): + next(iterator) + # read next NAtoms lines and map it to a np.array + out = np.array(list(list(map(float, next(iterator).replace('D','E').split())) + for _ in range(NAtoms))).flatten(), 1 + print(out[0]) + return out +# add new event xtb_gradient +register_event_type('xtb_gradient', [{'NAtoms': int}, [], read_xtb_gradient]) + + +def read_xtb_hessian(iterator, NAtoms=0): + #skip first line + next(iterator) + # return np array of result + return np.array(list(list(map(float, line.split())) for line in iterator)).flatten(), 1 + +# add new event xtb_hessian +register_event_type('xtb_hessian', [{'NAtoms': int}, [], read_xtb_hessian]) + +# define Events +Dipole = Event('Dipole', + 'grep', {'keyword': 'molecular dipole:', + 'ilen': 1, + 'ishift': 3}, + func='split', + func_kwargs={'idx': [1, 2, 3], + 'typ': [float, float, float]} +) +# +Energy = Event('Energy', + 'grep', {'keyword': 'TOTAL ENERGY', + 'ilen': 1, + 'ishift': 0}, + func='split', + func_kwargs={'idx': 3, 'typ': float} +) +# +Gradient = Event('Gradient', 'xtb_gradient', {'NAtoms': 'NAtoms'}) +# +Hessian = Event('Hessian', 'xtb_hessian', {'NAtoms': 'NAtoms'}) + +xtb_config = { + 'Energy': Energy, + 'Dipole': Dipole, + 'Gradient': Gradient, + 'Hessian': Hessian +} + +XTBReader = generate_filereader('XTBReader', xtb_config) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/qm/__init__.py",".py","170","7","from ..methodbase import AbinitioBase +from .xtb import XTBInterface +from .qchem import QChem +from .turbomole import Turbomole + +plugins = [XTBInterface, QChem, Turbomole] +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/spp/qm/qchem.py",".py","8056","281","from collections.abc import MutableMapping +from copy import deepcopy +import os +# +from jinja2 import Template +import numpy as np +# +# +from . import AbinitioBase +from ...system import Molecule +# +from qctools import generate_filereader, Event +from qctools.events import join_events + + +qchem = """""" +[SCFEnergy] +grep = Total energy in the final basis set = +split = 8 :: float + +[ExcitedState] +grep = : excitation energy (eV) = :: 1 :: 1 +split = 5 :: float +settings = multi=true + +[fosc] +grep = Strength :: 1 :: 0 +split = 2 :: float +settings = multi=true + +[transmom] +grep = Trans. Mom. :: 1 :: 0 +split = 2, 4, 6 :: float +settings = multi=true +"""""" + + +def length(kwargs): + natoms = kwargs['natoms'] + if natoms % 6 == 0: + return (natoms // 6) * 4 + return ((natoms // 6) + 1) * 4 + + +def get_gradient(scftxt): + gradient = [] + for i in range(0, len(scftxt), 4): + x = map(float, scftxt[i + 1].split()[1:]) + y = map(float, scftxt[i + 2].split()[1:]) + z = map(float, scftxt[i + 3].split()[1:]) + gradient += [[x1, y1, z1] for x1, y1, z1 in zip(x, y, z)] + return gradient + + +SCFGradient = Event('SCFGradient', + 'xgrep', {'keyword': 'Gradient of SCF Energy', + 'ilen': length, + 'ishift': 1,}, + func=get_gradient, +) + + +CisGradient = Event('CisGradient', + 'xgrep', {'keyword': 'Gradient of the state energy (including CIS Excitation Energy)', + 'ilen': length, + 'ishift': 1,}, + func=get_gradient, +) + + +# change by hand the events, to clear them up! +QChemReader = generate_filereader(""QChemReader"", qchem) +ex_st = QChemReader._events['ExcitedState'] +osc = QChemReader._events['fosc'] +tm = QChemReader._events['transmom'] +together = join_events(ex_st, tm, osc) +QChemReader.add_event('ExcitedStateInfo', together) +QChemReader.add_event(""SCFGradient"", SCFGradient) +QChemReader.add_event(""CisGradient"", CisGradient) + + +tpl = Template("""""" +$molecule +{{chg}} {{mult}} {% for atomid, crd in mol %} +{{mol.format(atomid, crd)}} {% endfor %} +$end + +$rem {% for key, value in remsection %} +{{key}} {{value}} {% endfor %} +$end +"""""") + + +class UpdatableDict(MutableMapping): + + def __init__(self, *dicts): + self._dicts = dicts + self._data = {} + self._own = [] + + def clean(self): + self._data = {} + self._own = [] + + def __setitem__(self, key, value): + if key not in self: + self._own.append(key) + self._data[key] = value + + def __getitem__(self, key): + value = self._data.get(key, None) + if value is not None: + return value + for dct in self._dicts: + value = dct.get(key, None) + if value is not None: + return value + raise KeyError + + def __contains__(self, key): + if key not in self._data: + return any(key in dct for dct in self._dicts) + return True + + def __delitem__(self, key): + del self._data[key] + + def __iter__(self): + for key in self._own: + yield key + for dct in self._dicts: + for key in dct: + yield key + + def __len__(self): + length = 0 + for dct in self._dicts: + length += len(dct) + length += len(self._own) + return length + + +class QChem(AbinitioBase): + + _user_input = """""" + exe = +# remsection = :: literal + chg = 0 :: int + mult = 1 :: int + exchange = pbe0 + basis = cc-pvdz + max_scf_cycles = 500 :: int + xc_grid = 000075000302 + mem_static = 4000 :: int + mem_total = 16000 :: int + sym_ignore = true :: bool + set_iter = 50 :: int + input_bohr = true :: bool + + """""" + + tpl = tpl + + reader = QChemReader + + settings = { + 'set_iter': 50, + 'exchange': 'pbe0', + 'basis': 'cc-pvdz', + 'max_scf_cycles': 500, + 'xc_grid': '000075000302', + 'mem_static': 4000, + 'mem_total': 16000, + 'sym_ignore': 'true', + 'input_bohr': True, + } + + excited_state_settings = { + 'cis_n_roots': 3, + 'cis_singlets': True, + 'cis_triplets': False, + 'RPA': 0, + } + + runtime = ['jobtype',] + # + implemented = ['energy', 'gradient', 'fosc', 'transmom'] + + def __init__(self, config, atomids, nstates, nghost_states, chg, mult, qchemexe): + self.molecule = Molecule(atomids, None) + self.exe = qchemexe + self.chg = chg + self.mult = mult + self.filename = 'qchem.in' + self.nstates = nstates + self.nghost_states = nghost_states + self.reader._events['ExcitedStateInfo'].nmax = nstates + nghost_states - 1 + self._update_settings(config) + self.excited_state_settings['cis_n_roots'] = nstates + nghost_states - 1 + + def _update_settings(self, config): + self.settings = {key: config[key] for key in self.settings} + + @classmethod + def from_config(cls, config, atomids, nstates, nghost_states): + return cls(config, atomids, nstates, nghost_states, config['chg'], config['mult'], config['exe']) + + def get(self, request): + # update coordinates + self.molecule.crd = request.crd + if 'gradient' in request: + self._do_gradient(request) + if 'energy' in request: + self._do_energy(request) + # + return request + + def _do_gradient(self, request): + jobtype = 'FORCE' + remsection = deepcopy(self.settings) + gradient = {} + for state in request.states: + if state == 0: + gradient[state] = self._do_gs_gradient(request) + else: + gradient[state] = self._do_ex_gradient(request, state) + request.set('gradient', gradient) + + def _do_energy(self, request): + settings = UpdatableDict(self.settings, self.excited_state_settings) + settings['jobtype'] = 'sp' + self._write_input(self.filename, settings.items()) + output = self.submit(self.filename) + out = self.reader(output, ['SCFEnergy', 'ExcitedStateInfo']) + if not isinstance(out['ExcitedState'], list): + outst = [out['ExcitedState']] + else: + outst = out['ExcitedState'] + request.set('energy', np.sort(np.array([out['SCFEnergy']] + outst).flatten())[:self.nstates]) + if 'fosc' in request: + if not isinstance(out['fosc'], list): + outfosc = [0.] + [value for value in out['fosc']] + else: + outfosc = [0.] + out['fosc'] + request.set('fosc', outfosc) + if 'transmom' in request: + if not isinstance(out['transmom'], list): + outtransmom = [0.] + [out['transmom']] + else: + outtransmom = [0.] + out['transmom'] + request.set('transmom', outtransmom) + + def _do_gs_gradient(self, request): + settings = UpdatableDict(self.settings) + settings['jobtype'] = 'force' + self._write_input(self.filename, settings.items()) + output = self.submit(self.filename) + out = self.reader(output, ['SCFGradient'], {'natoms': self.molecule.natoms}) + return out['SCFGradient'] + + def _do_ex_gradient(self, request, state): + settings = UpdatableDict(self.settings, self.excited_state_settings) + settings['jobtype'] = 'force' + settings['CIS_STATE_DERIV'] = state + self._write_input(self.filename, settings.items()) + output = self.submit(self.filename) + out = self.reader(output, ['CisGradient'], {'natoms': self.molecule.natoms}) + return out['CisGradient'] + + def _write_input(self, filename, remsection): + """"""write input file for qchem"""""" + with open(filename, 'w') as f: + f.write(self.tpl.render(chg=self.chg, mult=self.mult, + mol=self.molecule, remsection=remsection)) + + def submit(self, filename): + output = filename + "".out"" + cmd = f""{self.exe} {filename} > {output}"" + os.system(cmd) + return output +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/random/shrandom.py",".py","732","34","from abc import ABC, abstractmethod +import numpy as np + + +# This should be a Singleton class! +# there can only exist ONE way to +# generate random numbers! + +class RandomNumberGeneratorBase(ABC): + """"""""Python Class to generate random numbers"""""" + + def __init__(self, seed=None): + self.seed = seed + self._set_seed(seed) + + @abstractmethod + def _set_seed(self, seed): + """"""Sets seed for random number generator"""""" + pass + + @abstractmethod + def get(self): + pass + + +class RandomNumberGeneratorNP(RandomNumberGeneratorBase): + + def _set_seed(self, seed): + """"""Sets seed for random number generator"""""" + np.random.seed(seed) + + def get(self): + return np.random.random() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/random/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/plot3D.py",".py","4832","155","import os +import numpy as np + +import matplotlib.pyplot as plt +import matplotlib as mpl +from mpl_toolkits.mplot3d import Axes3D +# +from colt import Colt +from qctools.converter import energy_converter, length_converter, time_converter + +from .plot import Plot + +class Plot3D(Plot): + """""" Plotting class for pysurf results. It uses Matplotlib to plot and Colt to + handle the user input + """""" + _user_input = 'inherited' + extend_user_input : 'inherited' + + @classmethod + def _extend_user_input(cls, questions): + questions.add_questions_to_block("""""" + z_units = au :: str :: [au, eV, fs, a.u., nm, ang, bohr, ps, ns] + z_start = :: float, optional + z_end = :: float, optional + z_label = :: str + z_label_unit = True :: bool + """""") + + def __init__(self, config): + super().__init__(config) + if config['matplotlib style'] is None: + #Hard coded matplotlib stylesheet + style = os.path.dirname(os.path.abspath(__file__)) + style = os.path.join(style, 'pysurf3d.mplstyle') + else: + style = config['matplotlib style'] + try: + plt.style.use(style) + except: + raise Exception(f""Matplotlib style {style} could not be set"") + + + + def surface_plot(self, data, x_units_in, y_units_in, z_units_in, ax=None, line_props={}, save_plot=True, show_plot=True): + """""" + """""" + + config = self.config + + #Get converter for x-data + if x_units_in is not None: + try: + xconverter = globals()[x_units_in[0]+'_converter'].get_converter(x_units_in[1], config['x_units']) + except: + raise InputException(""Converter or units not known"") + else: + xconverter = lambda x: x + #Get converter for y-data + if y_units_in is not None: + try: + yconverter = globals()[y_units_in[0]+'_converter'].get_converter(y_units_in[1], config['y_units']) + except: + raise InputException(""Converter or units not known"") + else: + yconverter = lambda x: x + + if z_units_in is not None: + try: + zconverter = globals()[z_units_in[0]+'_converter'].get_converter(z_units_in[1], config['z_units']) + except: + raise InputException(""Converter or units not known"") + else: + zconverter = lambda x: x + + #Convert data + convdatax = np.empty_like(data[0]) + convdatay = np.empty_like(data[1]) + convdataz = np.empty_like(data[2]) + convdatax = xconverter(data[0]) + convdatay = yconverter(data[1]) + convdataz = zconverter(data[2]) + + if ax is None: + fig = plt.figure() + ax = Axes3D(fig)#fig.add_subplot(111, projection='3d') + +# if config['title'] != None: ax.set_title(config['title']) + + + #set axis and axis label + lbl = r""{}"".format(config['x_label']) + if config['x_label_unit']: + lbl += r"" [{}]"".format(config['x_units']) + ax.set_xlabel(lbl) + + scale = False + lim = [config['x_start']] + lim += [config['x_end']] + if None in lim: scale = True + ax.set_xlim(*lim, auto=scale) + + if config['x_units'] == 'a.u.': + ax.set_xticklabels('' for x in ax.get_xticks()) + + lbl = r""{}"".format(config['y_label']) + if config['y_label_unit']: + lbl += r"" [{}]"".format(config['y_units']) + ax.set_ylabel(lbl) + + scale = False + lim = [config['y_start']] + lim += [config['y_end']] + if None in lim: scale = True + ax.set_ylim(*lim, auto=scale) + + if config['y_units'] == 'a.u.': + ax.set_yticklabels('' for y in ax.get_yticks()) + + lbl = r""{}"".format(config['z_label']) + if config['z_label_unit']: + lbl += r"" [{}]"".format(config['z_units']) + ax.set_zlabel(lbl) + + scale = False + lim = [config['z_start']] + lim += [config['z_end']] + if None in lim: scale = True + ax.set_zlim(*lim, auto=scale) + + if config['z_units'] == 'a.u.': + ax.set_zticklabels('' for z in ax.get_zticks()) + + #plot data + ax.plot_surface(convdatax, convdatay, convdataz, antialiased=True, shade=True, linewidth=0) + + #legend + if config['legend'] is not None: + ax.legend(*config['legend']) + + #reduce number of ticks + plt.locator_params(nbins=4) + + ax.dist = 13 + #save plot + if config['save_plot'] and save_plot: + plt.savefig(config['save_plot']['plot_file']) + + #show plot + if config['show_plot'] and show_plot: + plt.show() + + return ax + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/analyse_fit_pes_nm.py",".py","7852","213",""""""" +PySurf Module: + Validation and Training of Interpolators + +Provide infrastructure for the training of interpolators +and test them against a validation set +"""""" +import numpy as np + +from pysurf.database import PySurfDB +from pysurf.spp import SurfacePointProvider +from pysurf.logger import get_logger +from pysurf.sampling.normalmodes import Mode +from pysurf.system import Molecule +from pysurf.sampling.normalmodes import NormalModes as nm +from pysurf.molden import MoldenParser +from pysurf.constants import U_TO_AMU, CM_TO_HARTREE +from pysurf.system.atominfo import ATOMNAME_TO_ID, MASSES +from pysurf.utils import exists_and_isfile + +from pysurf.analysis import Plot + +from scipy.optimize import minimize +# +from colt import from_commandline +from colt import Colt +from qctools.converter import energy_converter + + + + +class AnalyseFitPesNm(Colt): + + _user_input = """""" + spp = spp.inp :: existing_file + savefile = :: str + mode = :: int + energy_units = eV :: str :: [eV, au, cm-1, nm] + reference_energy = 0 :: float + plot_input = plot_fit_pes_nm.inp :: file + start = -2 :: float + end = 2 :: float + npoints = 100 :: int + save_data = yes :: str :: [yes, no] + plot_pes = yes :: str :: [yes, no] + moldenfile = molden.in :: existing_file + """""" + + _save_data = { + 'yes': ""data_file = fit_pes_nm.dat :: file"", + 'no' : "" "" + } + + _plot_pes = { + 'yes': ""plot_inputfile = plot_fit_pes_nm.inp :: file"", + 'no' : """" + } + + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases('save_data', {name: mode for name, mode in cls._save_data.items() }) + questions.generate_cases('plot_pes', {name: mode for name, mode in cls._plot_pes.items()}) + + + @classmethod + def from_inputfile(cls, inputfile): + if not(exists_and_isfile(inputfile)): + config = cls.generate_input(inputfile, config=None) + else: + config = cls.generate_input(inputfile, config=inputfile) + quests = cls.generate_user_input(config=inputfile) + config = quests.check_only(inputfile) + + plot_config={} + if config['plot_pes'].value == 'yes': + plot_config = {} + plot_config['x_label'] = 'mode' + plot_config['x_label_unit'] = False + plot_config['y_label_unit'] = True + plot_config['y_label'] = 'energy' + plot_config = {'':plot_config} + + presets = '' + presets += f""y_label = energy\n"" + presets += f""x_label_unit = True\n"" + presets += f""[save_plot(yes)]\nplot_file = plot_fit_pes_nm.png\n"" + presets += ""legend = {}\n"" + + plot_input = config['plot_pes']['plot_inputfile'] + if exists_and_isfile(plot_input): + plot_config = Plot.generate_input(plot_input, config=plot_input, presets=presets) + else: + plot_config = Plot.generate_input(plot_input, config=plot_config, presets=presets) + return cls(config, plot_config) + + + def __init__(self, config, plot_config): + # + self.logger = get_logger('plotnm.log', 'plotnm', []) + # + #Get Surface Point Provider + config_spp = self._get_spp_config(config['spp']) + natoms, self.nstates, properties = self._get_db_info(config_spp['use_db']['database']) + atomids = [1 for _ in range(natoms)] + self.spp = SurfacePointProvider(None, properties, self.nstates, natoms, atomids, + logger=self.logger, config=config_spp) + # + self.interpolator = self.spp.interpolator + self.savefile = config['savefile'] + self.interpolator.train(self.savefile) + # + qs, crds = self.generate_crds(config['moldenfile'], mode=config['mode'], start=config['start'], end=config['end'], npoints=config['npoints']) + energy = self._compute(crds) + data = [] + conv = energy_converter.get_converter('au', config['energy_units']) + for q, en in zip(qs, energy): + en = conv(en) - conv(config['reference_energy']) + data += [[q, *en]] + data = np.array(data) + + if config['save_data'] == 'yes': + np.savetxt(config['save_data']['data_file'], data) + + if config['plot_pes'] == 'yes': + nstates = data.shape[1]-1 + myplt = Plot(plot_config) + myax = myplt.line_plot(data[:,[0,1]], x_units_in=('length', 'au'), y_units_in=('energy', config['energy_units']), ax=None, show_plot=False, save_plot=False) + for state in range(1, nstates): + save = False + plot = False + if state == nstates-1: + save = True + plot = True + myax = myplt.line_plot(data[:,[0, state+1]], x_units_in=('length', 'au'), y_units_in=('energy', config['energy_units']), ax=myax, show_plot=plot, save_plot=save) + + + def _get_spp_config(self, filename): + questions = SurfacePointProvider.generate_user_input(presets="""""" + use_db=yes :: yes + [use_db(yes)] + fit_only = yes :: yes + write_only = no :: no + """""") + return questions.ask(config=filename, raise_read_error=False) + + def _get_db_info(self, database): + db = PySurfDB.load_database(database, read_only=True) + rep = db.dbrep + natoms = rep.dimensions.get('natoms', None) + if natoms is None: + natoms = rep.dimensions['nmodes'] + nstates = rep.dimensions['nstates'] + return natoms, nstates, db.saved_properties + + def generate_crds(self, moldenfile, mode, start=-5, end=5, npoints=50): + molden = MoldenParser(moldenfile, ['Info', 'Freqs', 'FrCoords', 'FrNormCoords']) + # get molecule info + atoms = [atom for atom, _, _, _ in molden['FrCoords']] + atomids = np.array([ATOMNAME_TO_ID[atom] for atom in atoms]) + crd = np.array([[x, y, z] for _, x, y, z in molden['FrCoords']]) + masses = np.array([MASSES[idx]*U_TO_AMU for idx in atomids]) + # create molecule + molecule = Molecule(atomids, crd, masses) + # + print('nmsampler, molecule', molecule) + modes = [Mode(freq * CM_TO_HARTREE, np.array(molden['FrNormCoords'][imode])) + for imode, freq in enumerate(molden['Freqs'])] + # + modes = nm.create_mass_weighted_normal_modes(modes, molecule) + + crds = np.empty((npoints, *crd.shape)) + qs = np.linspace(start, end, npoints) + for i, q in enumerate(qs): + crds[i] = crd + q*modes[mode].displacements + return qs, crds + + + + def validate(self, filename, properties): + db = PySurfDB.load_database(filename, read_only=True) + self._compute(db, properties) + + def save_pes(self, filename, database): + db = PySurfDB.load_database(database, read_only=True) + results, _ = self._compute(db, ['energy']) + + def str_join(values): + return ' '.join(str(val) for val in values) + + with open(filename, 'w') as f: + f.write(""\n"".join(f""{i} {str_join(fitted)} {str_join(exact)}"" + for i, (fitted, exact) in enumerate(results['energy']))) + + def _compute(self, crds): + ndata = len(crds) + energy = [] + for i, crd in enumerate(crds): + result = self.spp.request(crd, ['energy']) + # + energy += [np.copy(result['energy'])] + return energy + +@from_commandline("""""" +inputfile = analyse_fit_pes_nm.inp :: file +"""""") +def command_analyse_pes(inputfile): + analyse_pes = AnalyseFitPesNm.from_inputfile(inputfile) + + +if __name__ == '__main__': + command_analyse_pes() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/analyse_population.py",".py","5948","155","import os +import matplotlib.pyplot as plt +import numpy as np + +from pysurf.sampling import Sampling +from pysurf.utils import exists_and_isfile +from pysurf.analysis import Plot +from pysurf.utils import SubfolderHandle +from pysurf.dynamics import DynDB +# +from qctools.converter import Converter, time_converter +from colt import Colt, from_commandline + +class NoFurtherQuestions(Colt): + _user_input = """" + + + +class AnalysePopulation(Colt): + + _user_input ="""""" + time_units = fs :: str :: [au, fs] + save_data = yes :: str :: [yes, no] + plot_population = yes :: str :: [yes, no] + folder = ./ :: str + subfolder = traj :: str + nsteps = :: int, optional + """""" + + _save_data = { + 'yes': ""data_file = population.dat :: file"", + 'no' : "" "" + } + + _plot_population = { + 'yes': ""plot_inputfile = plot_population.inp :: file"", + 'no' : """" + } + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases('save_data', {name: mode for name, mode in cls._save_data.items() }) + questions.generate_cases('plot_population', {name: mode for name, mode in cls._plot_population.items()}) + + @classmethod + def from_inputfile(cls, inputfile): + if not(exists_and_isfile(inputfile)): + config = cls.generate_input(inputfile, config=None) + else: + config = cls.generate_input(inputfile, config=inputfile) + quests = cls.generate_user_input(config=inputfile) + config = quests.check_only(inputfile) + + plot_config={} + if config['plot_population'].value == 'yes': + plot_config = {} + # plot_config['x_label'] = 'time' + plot_config['x_units'] = config['time_units'] + plot_config['x_label_unit'] = True + plot_config['y_label_unit'] = False + plot_config['y_label'] = 'population' + plot_config = {'':plot_config} + + presets = '' + presets += f""y_start = 0.0\n"" + presets += f""y_end = 1.0\n"" + presets += f""x_label = time\n"" + presets += f""y_label_unit = False\n"" + presets += f""y_label = population\n"" + presets += f""x_units = {config['time_units']}\n"" + presets += f""x_label_unit = True\n"" + presets += f""[save_plot(yes)]\nplot_file = population.png\n"" + presets += ""legend = {}\n"" + + plot_input = config['plot_population']['plot_inputfile'] + if exists_and_isfile(plot_input): + plot_config = Plot.generate_input(plot_input, config=plot_input, presets=presets) + else: + plot_config = Plot.generate_input(plot_input, config=plot_config, presets=presets) + return cls(config, plot_config) + + + def __init__(self, config, plot_config=None): + self.config = config + self.folder = os.path.abspath(config['folder']) + self.subfolder = config['subfolder'] + subfolderhandle = SubfolderHandle(self.folder, self.subfolder) + propfiles = subfolderhandle.fileiter('prop.db') + first = True + for idx, propfile in enumerate(propfiles): + db = DynDB.load_database(propfile, read_only=True) + print(propfile) + dbtime = np.array(db['time']).flatten() + if len(dbtime) == 0: + continue + if first is True: + first = False + if config['nsteps'] is not None: + nsteps = config['nsteps'] + else: + nsteps = len(db) + nstates = db.info['dimensions']['nstates'] + data = np.zeros(shape=(nsteps, nstates + 1), dtype=float) + data[:min(len(db), nsteps), 0] = dbtime + counter = np.zeros(nsteps, dtype=int) + if nsteps > len(db): + times_missing = True + time_steps = len(db) + else: + times_missing = False + time_steps = len(db) + if np.max(np.abs(data[:min(time_steps, len(dbtime)),0] - dbtime[:min(time_steps, len(dbtime))])) < 0.1: + if len(dbtime) > time_steps and times_missing is True: + data[time_steps:len(dbtime), 0] = dbtime[time_steps:min(nsteps, len(dbtime))] + time_steps = len(dbtime) + currstate = np.array(db['currstate']).flatten() + for idx in range(min(len(dbtime), nsteps)): + data[idx, int(currstate[idx]+1)] += 1 + counter[idx] += 1 + else: + print('times do not fit') + + data[:, 1:] = data[:, 1:]/np.repeat(counter, nstates).reshape(nsteps, nstates) + + converter = time_converter.get_converter('au', self.config['time_units']) + data[:, 0] = converter(data[:, 0]) + + if config['save_data'].value == 'yes': + np.savetxt(config['save_data']['data_file'], data) + + if config['plot_population'].value == 'yes': + myplt = Plot(plot_config) + myax = myplt.line_plot(data[:,[0,1]], ('time', self.config['time_units']), y_units_in=None, ax=None, show_plot=False, save_plot=False, line_props={'label': 'state 0'}) + for state in range(1, nstates): + save = False + plot = False + if state == nstates-1: + save = True + plot = True + myax = myplt.line_plot(data[:,[0, state+1]], ('time', self.config['time_units']), y_units_in=None, ax=myax, show_plot=plot, save_plot=save, line_props={'label': f""state {state}""}) + + + + + + +@from_commandline("""""" +inputfile = analyse_population.inp :: file +"""""") +def command_analyse_population(inputfile): + analyse_population = AnalysePopulation.from_inputfile(inputfile) + +if __name__ == ""__main__"": + command_analyse_population() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/get_states.py",".py","1167","46","#! /data/ehrmaier/anaconda3/bin/python3 +import sys +import os +import numpy as np + +from pysurf.database.database import Database +from pysurf.database.dbtools import DatabaseRepresentation +from pysurf.database.dbtools import DatabaseTools +from pysurf.database.dbtools import DBVariable +from pysurf.database.dbtools import load_database +from pysurf.system.atominfo import get_atom_from_mass + +from pysurf.utils.constants import au2ev +# +from colt import from_commandline + + + +def write_state(state, step): + string = '' + string += 'step {0} : {1}\n'.format(step, state) + return string + +@from_commandline("""""" +infile = prop.db :: existing_file +outfile = states.dat :: file +"""""") +def get_states_command(infile, outfile): + get_states(infile, outfile) + +def get_states(infile, outfile): + if not(os.path.isfile(infile)): + print('Error: infile path does not exist! ' + infile) + exit() + + db = Database.load_db(infile) + + with open(outfile, 'w') as output: + step = 0 + for state in db['curr_state']: + output.write(write_state(state[0], step)) + step += 1 + +if __name__==""__main__"": + get_states_command() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/get_gradients.py",".py","2294","82","import sys +import os +import numpy as np + +from pysurf.database.database import Database +from pysurf.database.dbtools import DatabaseRepresentation +from pysurf.database.dbtools import DatabaseTools +from pysurf.database.dbtools import DBVariable +from pysurf.database.dbtools import load_database +from pysurf.system.atominfo import get_atom_from_mass + +from pysurf.utils.constants import bohr2angstrom +# +from colt import from_commandline + + +def write_gradient(atoms, gradient, step): + nstates = len(gradient) + string = str(len(gradient)) + '\n' + string += 'step {0} \n'.format(step) + for state in range(len(gradient)): + string += 'state: ' + str(state) + '\n' + for i in range(len(atoms)): + string += '{0:s} {1:12.8f} {2:12.8f} {3:12.8f}\n'.format(atoms[i], *gradient[state][i]) + + return string + +def write_gradient_model(gradient, step): + string = str(len(gradient)) + '\n' + string += 'step {0} \n'.format(step) + np.vectorize(str) + string += np.array2string(gradient, separator=', ', precision=5).strip(']').strip('[') + string += '\n' + string += '\n' + return string + +@from_commandline("""""" +infile = prop.db :: file_exists +outfile = gradient.dat :: file +"""""") +def get_gradients_command(infile, outfile): + get_gradient(infile, outfile) + +def get_gradients(infile, outfile): + if not(os.path.isfile(infile)): + print('Error: infile path does not exist! ' + infile) + exit() + + db = Database.load_db(infile) + try: + mass = db['mass'] + if len(mass.shape) == 1: + model = True + else: + model = False + except: + print('Masses could not be found in DB!') + mass = None + model = True + + atoms=[] + if model is True: + for m in range(len(db['gradient'][0])): + atoms+=['Q'] + if model is False: + for m in mass[:,0]: + atoms += [get_atom_from_mass(m)] + + + with open(outfile, 'w') as output: + step = 0 + for grad in db['gradient']: + if model is False: + output.write(write_gradient(atoms, grad, step)) + else: + output.write(write_gradient_model(grad, step)) + step += 1 + + +if __name__==""__main__"": + get_gradients_command() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/get_velocs.py",".py","2096","76","import sys +import os +import numpy as np + +from pysurf.database.database import Database +from pysurf.database.dbtools import DatabaseRepresentation +from pysurf.database.dbtools import DatabaseTools +from pysurf.database.dbtools import DBVariable +from pysurf.database.dbtools import load_database +from pysurf.system.atominfo import get_atom_from_mass + +from pysurf.utils.constants import bohr2angstrom +# +from colt import from_commandline + +def write_veloc(atoms, crd, step): + string = str(len(crd)) + '\n' + string += 'step {0} \n'.format(step) + for i in range(len(crd)): + string += '{0:s} {1:12.8f} {2:12.8f} {3:12.8f}\n'.format(atoms[i], *crd[i]) + return string + +def write_veloc_model(crd, step): + string = str(len(crd)) + '\n' + string += 'step {0} \n'.format(step) + np.vectorize(str) + string += np.array2string(crd, separator=', ', precision=5).strip(']').strip('[') + string += '\n' + string += '\n' + return string + +@from_commandline("""""" +infile = prop.db :: file_exists +outfile = veloc.dat :: file +"""""") +def get_velocs_command(infile, outfile): + get_velocs(infile, outfile) + +def get_velocs(infile, outfile): + if not(os.path.isfile(infile)): + print('Error: infile path does not exist! ' + infile) + exit() + + db = Database.load_db(infile) + try: + mass = db['mass'] + if len(mass.shape) == 1: + model = True + else: + model = False + except: + print('Masses could not be found in DB!') + mass = None + model = True + + atoms=[] + if model is True: + for m in range(len(db['crd'][0])): + atoms+=['Q'] + if model is False: + for m in mass[:,0]: + atoms += [get_atom_from_mass(m)] + + + with open(outfile, 'w') as output: + step = 0 + for veloc in db['veloc']: + if model is False: + output.write(write_veloc(atoms, veloc, step)) + else: + output.write(write_veloc_model(veloc, step)) + step += 1 + +if __name__==""__main__"": + get_velocs_command() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/analyse_spectrum.py",".py","5660","158","import os +import matplotlib.pyplot as plt +import numpy as np + +from pysurf.sampling import Sampling +from pysurf.utils import exists_and_isfile +from pysurf.analysis import Plot +# +from colt import Colt, from_commandline +from qctools.converter import Converter, energy_converter + +class NoFurtherQuestions(Colt): + _user_input = """" + + +class Broadening(Colt): + _user_input = """""" + method = Lorentzian :: str :: [Gaussian, Lorentzian] + width = :: float + energy_start = :: float + energy_end = :: float + n_points = 500 :: int + """""" + + def __init__(self, config): + self.config = config + + def broadening(self, data): + res = np.zeros((self.config['n_points'], 2)) + res[:,0] = np.linspace(self.config['energy_start'], self.config['energy_end'], self.config['n_points']) + for (e0, fosc) in data: + if self.config['method'] == 'Lorentzian': + func = self.l_vec(fosc, e0, self.config['width']) + if self.config['method'] == 'Gaussian': + func = self.g_vec(fosc, e0, self.config['width']) + res[:, 1] += func(res[:, 0]) + res[:, 1] = res[:, 1] / len(data) + return res + + @staticmethod + def l_vec(fosc, e0, w): + return np.vectorize(lambda e:fosc * 1 / (1 + ((e - e0)/w*2)**2)) + + @staticmethod + def g_vec(fosc, e0, w): + return np.vecotrize(lambda e: fosc * np.exp(-np.ln(2)*((e - e0)/w*2)**2)) + + +class AnalyseSpectrum(Colt): + specfile = os.path.join('spectrum', 'spectrum.db') + + _user_input = """""" + input_db = spectrum/spectrum.db :: existing_file + energy_units = au :: str :: [au, eV] + broadening = yes :: str :: [yes, no] + save_data = yes :: str :: [yes, no] + plot_spectrum = yes :: str :: [yes, no] + """""" + + _save_data = { + 'yes': ""data_file = spectrum/spectrum.dat :: file"", + 'no' : "" "" + } + + _broadening={ + 'yes': Broadening, + 'no' : NoFurtherQuestions + } + + _plot_spectrum = { + 'yes': ""plot_inputfile = spectrum/plot_spectrum.inp :: file"", + 'no' : """" + } + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases('save_data', {name: mode for name, mode in cls._save_data.items() }) + questions.generate_cases('broadening', {name: mode.questions for name, mode in cls._broadening.items()}) + questions.generate_cases('plot_spectrum', {name: mode for name, mode in cls._plot_spectrum.items()}) + + + @classmethod + def from_inputfile(cls, inputfile): + if not(exists_and_isfile(inputfile)): + config = cls.generate_input(inputfile, config=None) + else: + config = cls.generate_input(inputfile, config=inputfile) + quests = cls.generate_user_input(config=inputfile) + config = quests.check_only(inputfile) + + + if config['plot_spectrum'].value == 'yes': + plot_config = {} + if config['broadening'].value == 'yes': + plot_config['x_start'] = config['broadening']['energy_start'] + plot_config['x_end'] = config['broadening']['energy_end'] + plot_config['x_label'] = 'energy' + plot_config['y_label_unit'] = True + plot_config['y_label'] = 'intensity' + plot_config['x_units'] = config['energy_units'] + plot_config['x_label_unit'] = True + plot_config = {'': plot_config} + + presets = '' + if config['broadening'].value == 'yes': + presets += f""x_start = {config['broadening']['energy_start']}\n"" + presets += f""x_end = {config['broadening']['energy_end']}\n"" + presets += f""x_label = energy\n"" + presets += f""y_label_unit = True\n"" + presets += f""y_label = intensity\n"" + presets += f""y_units = a.u.\n"" + presets += f""x_units = {config['energy_units']}\n"" + presets += f""x_label_unit = True\n"" + presets += f""[save_plot(yes)]\nplot_file = spectrum/spectrum.png\n"" + + plot_input = config['plot_spectrum']['plot_inputfile'] + if exists_and_isfile(plot_input): + plot_config = Plot.generate_input(plot_input, config=plot_input, presets=presets) + else: + plot_config = Plot.generate_input(plot_input, config=plot_config, presets=presets) + + return cls(config, plot_config) + + + def __init__(self, config, plot_config=None): + self.config = config + sampling = Sampling.from_db(self.specfile) + + nstates = sampling.info['dimensions']['nstates'] + npoints = sampling.nconditions + data = [] + for energy, fosc in zip(np.copy(sampling._db['energy']), np.copy(sampling._db['fosc'])): + for idx, en in enumerate(energy[1:]): + data += [[en - energy[0], fosc[idx+1]]] + data = np.array(data) + + converter = energy_converter.get_converter('au', self.config['energy_units']) + data[:, 0] = converter(data[:, 0]) + if config['broadening'].value == 'yes': + cont_data = Broadening(config['broadening']).broadening(data) + else: + cont_data = np.sort(data) + + Plot(plot_config).line_plot(cont_data, ('energy', self.config['energy_units']), y_units_in=None, ax=None, line_props={'linestyle':'solid'}) + + + + + +@from_commandline("""""" +inputfile = spectrum/analyse_spectrum.inp :: file +"""""") +def command_analyse_spectrum(inputfile): + analyse_spectrum = AnalyseSpectrum.from_inputfile(inputfile) + +if __name__ == ""__main__"": + command_analyse_spectrum() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/plot_model_pes.py",".py","3073","88","import numpy as np + +from pysurf.analysis import Plot +from pysurf.dynamics import DynDB +from pysurf.utils import exists_and_isfile +from pysurf.spp import ModelBase, Request + +from colt import Colt + + +class PESModel(Colt): + _user_input = """""" + model = :: str + mode = 0 :: int + start_plot = -5 :: float + end_plot = 5 :: float + """""" + + _plot_input = ""plot_pes_model.inp"" + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""model"", {name: model.questions for name, model in ModelBase._models.items()}) + + @classmethod + def from_inputfile(cls, inputfile): + config = cls.generate_input(inputfile, config=inputfile) + return cls(config) + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + model = ModelBase._models[config['model'].value].from_config(config['model']) + nstates = model.nstates + crd_equi = model.crd + npoints = 100 + data = np.empty((npoints, nstates+1), dtype=float) + data[:, 0] = np.linspace(config['start_plot'], config['end_plot'], npoints) + for idx, point in enumerate(data[:, 0]): + crd = np.zeros(model.crd.size) + crd[config['mode']] = point + data[idx, 1:] = model.get(Request(crd, properties=['energy'], states=[i for i in range(nstates)]))['energy'] + print(data) + plot_config = {} + plot_config['x_label'] = f""mode config['mode']"" + plot_config['x_start'] = config['start_plot'] + plot_config['x_end'] = config['end_plot'] + plot_config['y_label'] = 'energy' + plot_config['y_units'] = 'eV' + plot_config['x_units'] = 'au' + plot_config['y_label_unit'] = True + plot_config['x_label_unit'] = True + plot_config = {'': plot_config} + + presets = """""" + x_label = mode + y_label = energy + y_units = eV + x_units = au + y_label_unit = True + x_label_unit = True + """""" + + if exists_and_isfile(self._plot_input): + plot_config = Plot.generate_input(self._plot_input, config=self._plot_input, presets=presets) + else: + plot_config = Plot.generate_input(self._plot_input, config=None, presets=None) + + myplot = Plot(plot_config) + + + if nstates == 1: + save_plot = True + show_plot = True + else: + save_plot = False + show_plot = False + myax = myplot.line_plot(data[:,[0,1]], x_units_in=['energy', 'a.u.'], y_units_in=['energy', 'au'], ax=None, save_plot=save_plot, show_plot=show_plot) + for state in range(1, nstates-1): + myax = myplot.line_plot(data[:,[0, state+1]], x_units_in=['energy', 'a.u.'], y_units_in=['energy', 'au'], ax=myax, show_plot=False, save_plot=False) + myax = myplot.line_plot(data[:,[0, nstates]], x_units_in=['energy', 'a.u.'], y_units_in=['energy', 'au'], ax=myax, show_plot=True, save_plot=True) + + +if __name__ == ""__main__"": + PESModel.from_inputfile('plot_pes.inp') +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/__init__.py",".py","50","3","from .plot import Plot +from .plot3D import Plot3D +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/analyse_fit_pes_model.py",".py","899","27","from pysurf.workflow import engine + +workflow = engine.create_workflow(""analyse_fit_pes_model"", """""" +spp = spp_analysis(""spp.inp"") +spp_calc = spp_calc(""spp.inp"", 5, 3, ['energy']) +sampler = sampler(""samplerinp"") +crds = crds_from_sampler(sampler, 200) +energies = get_energies(spp, crds) +energies_calc = get_energies(spp_calc, crds) +array2D_scale(energies, [0, 1, 2], 27.2114) +array2D_scale(energies_calc, [0, 1, 2], 27.2114) +x = array_extract_column(crds, 0) +data = array2D_add_column(energies, x, append=False) +data_calc = array2D_add_column(energies_calc, x, append=False) +datasorted = array2D_sort(data) +datasorted_calc = array2D_sort(data_calc) +plot = setup_lineplot(""plot.inp"") +color = standard_colors() +dashed = linestyle_dashed() +style_dashed = combine_plotstyles(color, dashed) +add_plot(plot, datasorted_calc) +add_plot(plot, datasorted, style=style_dashed) +show_plot(plot) +"""""") + +workflow.run() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/test.py",".py","435","18","from colt import Colt + + +class Test(Colt): + _user_input = """""" + testfloat = :: python(dict) + """""" + + @classmethod + def from_inputfile(cls, inputfile): + quests = cls.generate_input(inputfile, config=None) + quests = cls.generate_user_input(config=inputfile) + config = quests.check_only(inputfile) + print(config['testfloat'][1]) + +if __name__==""__main__"": + Test.from_inputfile('test.inp') +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/remove_db_entry.py",".py","775","35","from pysurf.database.database import Database +from colt import from_commandline + + +@from_commandline("""""" +db = :: file +rm_entry = :: int +"""""") +def remove_entry_command(db, rm_entry) + remove_entry(db, rm_entry) + +def remove_entry(dbfile, rm_entry): + rm_entry = int(rm_entry) + print('database: ', dbfile) + print('remove entry: ', rm_entry) + + db = Database.load_db(dbfile) + dbnew = Database.empty_like('db_new.dat', db) + + keys = db.get_keys() + for key in keys: + lendb = len(db[key]) + + for i in range(lendb): + if i == rm_entry: + print(f'Do not copy entry: {i}') + continue + + for key in keys: + dbnew.append(key, db[key][i]) + dbnew.increase + +if __name__=='__main__': + remove_entry_command() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/get_energies.py",".py","1226","50","import sys +import os +import numpy as np + +from pysurf.database.database import Database +from pysurf.database.dbtools import DatabaseRepresentation +from pysurf.database.dbtools import DatabaseTools +from pysurf.database.dbtools import DBVariable +from pysurf.database.dbtools import load_database +from pysurf.system.atominfo import get_atom_from_mass + +from pysurf.utils.constants import au2ev +# +from colt import from_commandline + + + +def write_energy(energy, step): + string = '' + string += '{0} '.format(step) + string += np.array2string(energy, separator=', ', precision=5).strip(']').strip('[') + string += '\n' + return string + + +@from_commandline("""""" +outfile = energy.dat :: file +infile = prop.db :: file +"""""") +def get_energies_command(infile, outfile): + get_energies(infile, outfile) + +def get_energies(infile, outfile): + if not(os.path.isfile(infile)): + print('Error: infile path does not exist! ' + infile) + exit() + + db = Database.load_db(infile) + + + with open(outfile, 'w') as output: + step = 0 + for energy in db['energy']: + output.write(write_energy(energy, step)) + step += 1 + + +if __name__==""__main__"": + get_energies_command() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/get_etot.py",".py","1280","48","import sys +import os +import numpy as np + +from pysurf.database.database import Database +from pysurf.database.dbtools import DatabaseRepresentation +from pysurf.database.dbtools import DatabaseTools +from pysurf.database.dbtools import DBVariable +from pysurf.database.dbtools import load_database +from pysurf.system.atominfo import get_atom_from_mass + +from pysurf.utils.constants import au2ev +from colt import from_commandline + + + +def write_etot(ekin, epot, etot, step): + string = '' + string += 'step {0} : {1:8.4f}, {2:8.4f}, {3:8.4f}'.format(step, ekin, epot, etot) + string += '\n' + return string + + +@from_commandline("""""" +infile = prop.db :: file_exists +outfile = etot.dat :: file +"""""") +def get_etot_command(infile, outfile): + get_etot(infile, outfile) + +def get_etot(infile, outfile): + if not(os.path.isfile(infile)): + print('Error: infile path does not exist! ' + infile) + exit() + + db = Database.load_db(infile) + + + with open(outfile, 'w') as output: + output.write('ekin, epot, etot \n') + step = 0 + for ekin, epot, etot in zip(db['ekin'], db['epot'], db['etot']): + output.write(write_etot(ekin[0], epot[0], etot[0], step)) + step += 1 + +if __name__==""__main__"": + get_etot_command() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/analyse_pes_traj.py",".py","2651","76","import numpy as np + +from pysurf.analysis import Plot +from pysurf.dynamics import DynDB +from pysurf.utils import exists_and_isfile +# +from colt import Colt + +class PESTraj(Colt): + _user_input = """""" + prop_db = prop.db :: existing_file + + #reference energy in atomic units + reference_energy = :: float + """""" + + _plot_input = 'plot_pes_traj.inp' + + @classmethod + def from_config(cls, config): + return cls(config) + + def __init__(self, config): + db = DynDB.load_database(config['prop_db'], read_only=True) + nstates = db.nstates + npoints = len(db) + data = np.empty((npoints, nstates+1), dtype=float) + data[:, 0] = np.array(db['time'])[:, 0] + data[:, 1:] = np.array(db['energy'])-config['reference_energy'] + currstate = np.array(db['currstate'])[:, 0] + plot_config = {} + plot_config['x_label'] = 'time' + plot_config['y_label'] = 'energy' + plot_config['y_units'] = 'eV' + plot_config['x_units'] = 'fs' + plot_config['y_label_unit'] = True + plot_config['x_label_unit'] = True + plot_config = {'': plot_config} +# plot_config['save_plot'] = {'plot_file': 'pes_traj.png'} + + presets = """""" + x_label = time + y_label = energy + y_units = eV + x_units = fs + y_label_unit = True + x_label_unit = True + """""" + + if exists_and_isfile(self._plot_input): + plot_config = Plot.generate_input(self._plot_input, config=self._plot_input, presets=presets) + else: + plot_config = Plot.generate_input(self._plot_input, config=plot_config, presets=presets) + + myplot = Plot(plot_config) + + + if nstates == 1: + save_plot = True + show_plot = True + else: + save_plot = False + show_plot = False + myax = myplot.line_plot(data[:,[0,1]], x_units_in=['time', 'au'], y_units_in=['energy', 'au'], ax=None, save_plot=save_plot, show_plot=show_plot) + for state in range(1, nstates): + myax = myplot.line_plot(data[:,[0, state+1]], x_units_in=['time', 'au'], y_units_in=['energy', 'au'], ax=myax, show_plot=False, save_plot=False) + + curr_plot = np.empty((npoints, 2), dtype=float) + curr_plot[:, 0] = data[:, 0] + for idx, state in enumerate(currstate): + curr_plot[idx, 1] = data[idx, int(state + 1)] + myax = myplot.line_plot(curr_plot, x_units_in=['time', 'au'], y_units_in=['energy', 'au'], ax=myax, save_plot=True, show_plot=True, line_props={'marker': 'o', 'color': 'red'}) + +if __name__ == ""__main__"": + PESTraj.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/get_coordinates.py",".py","2168","81","#! /data/ehrmaier/anaconda3/bin/python3 +import sys +import os +import numpy as np + +from pysurf.database.database import Database +from pysurf.database.dbtools import DatabaseRepresentation +from pysurf.database.dbtools import DatabaseTools +from pysurf.database.dbtools import DBVariable +from pysurf.database.dbtools import load_database +from pysurf.system.atominfo import get_atom_from_mass +# +from colt import from_commandline + +from pysurf.utils.constants import bohr2angstrom + +def au2ang(x): + return x * bohr2angstrom + +def write_xyz(atoms, crd, step): + string = str(len(crd)) + '\n' + string += 'step {0} \n'.format(step) + for i in range(len(crd)): + string += '{0:s} {1:12.8f} {2:12.8f} {3:12.8f}\n'.format(atoms[i], *au2ang(crd[i])) + return string + +def write_crd(crd, step): + string = str(len(crd)) + '\n' + string += 'step {0} \n'.format(step) + np.vectorize(str) + string += np.array2string(crd, separator=', ', precision=5).strip(']').strip('[') + string += '\n' + string += '\n' + return string + + +@from_commandline("""""" +infile = :: existing_file +outfile = crd.xyz :: file +"""""") +def get_coordinates_command(infile, outfile): + get_coordinates(infile, outfile) + +def get_coordinates(infile, outfile): + if not(os.path.isfile(infile)): + print('Error: infile path does not exist! ' + infile) + exit() + + db = Database.load_db(infile) + try: + mass = db['masses'] + if len(mass.shape) == 1: + model = False + else: + model = False + except: + print('Masses could not be found in DB!') + mass = None + model = True + + atoms=[] + if model is True: + for m in range(len(db['crd'][0])): + atoms+=['Q'] + if model is False: + for m in mass: + atoms += [get_atom_from_mass(m)] + + + with open(outfile, 'w') as output: + step = 0 + for crd in db['crd']: + if model is False: + output.write(write_xyz(atoms, crd, step)) + else: + output.write(write_crd(crd, step)) + step += 1 + +if __name__=='__main__': + get_coordinates_command() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/print_property.py",".py","1399","57","import sys +import os +import numpy as np + +from pysurf.database import PySurfDB +from pysurf.system.atominfo import get_atom_from_mass + +from pysurf.utils.constants import bohr2angstrom +# +from colt import Colt + +def au2ang(x): + return x * bohr2angstrom + +def write_xyz(atoms, crd, step): + string = str(len(crd)) + '\n' + string += 'step {0} \n'.format(step) + for i in range(len(crd)): + string += '{0:s} {1:12.8f} {2:12.8f} {3:12.8f}\n'.format(atoms[i], *au2ang(crd[i])) + return string + +def write_crd(crd, step): + string = str(len(crd)) + '\n' + string += 'step {0} \n'.format(step) + np.vectorize(str) + string += np.array2string(crd, separator=', ', precision=5).strip(']').strip('[') + string += '\n' + string += '\n' + return string + + +class PrintProperty(Colt): + + _user_input ="""""" + infile = :: existing_file + + property = :: str + """""" + + def __init__(self, config): + db = PySurfDB.load_database(config['infile'], read_only=True) + + if config['property'] == 'len': + print(""Number of entries in database: "", len(db)) + return + + for idx, entry in enumerate(db[config['property']]): + print('\nEntry: {}'.format(idx)) + print(entry) + + @classmethod + def from_config(cls, config): + return cls(config) + +if __name__=='__main__': + PrintProperty.from_commandline() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/analyse_2d_spectrum.py",".py","1316","37","import numpy as np + +from pysurf.workflow import engine +from pysurf.database import PySurfDB + + +@engine.register_action +def calc_2d_spec(files: ""list"", energy_start: ""float"", energy_end: ""float"", en_points: ""int"", timesteps: ""int"") -> ""meshplotdata"": + result = np.zeros((en_points, timesteps)) + for file in files: + db = PySurfDB.load_database(file, read_only=True) + energy = np.copy(db['energy']) + fosc = np.copy(db['fosc']) + currstate = np.copy(db['currstate']).flatten() + for idx, en in enumerate(energy): + state = int(currstate[idx]) + en_diff = en[state] - en[0] + en_pos = (en_diff-energy_start)/(energy_end-energy_start)*en_points + en_pos = int(en_pos) + if en_pos >=0 and en_pos < en_points: + #units are arbitrary, therefor not full Einstain A coefficient ist used, but just f*v**2 + result[en_pos, idx] += fosc[idx][state]*en_diff**2 + X = np.arange(timesteps)*0.5 + Y = np.linspace(energy_start, energy_end, en_points)*27.2114 + return (X, Y, result) + + +workflow = engine.create_workflow(""copy_execute"", """""" +files = get_files(folder, subfolder, filename) +spec = calc_2d_spec(files, 0.075, 0.2, 100, 201) +plot = mesh_plot(""plot_spec.inp"", spec) +show_plot(plot) +"""""") + +workflow.run() + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/plot.py",".py","10234","294","import os +import numpy as np + +import matplotlib.pyplot as plt +import matplotlib as mpl +# +from colt import Colt +from qctools.converter import energy_converter, length_converter, time_converter + +class Plot(Colt): + """""" Plotting class for pysurf results. It uses Matplotlib to plot and Colt to + handle the user input + """""" + + _user_input = """""" + x_units = au :: str :: [au, eV, fs, a.u., nm, ang, bohr, ps, ns] + y_units = au :: str :: [au, eV, fs, a.u., nm, ang, bohr, ps, ns] + x_start = :: float, optional + x_end = :: float, optional + y_start = :: float, optional + y_end = :: float, optional + y_label = :: str + y_label_unit = True :: bool + x_label = :: str + x_label_unit = True :: bool + legend = :: list, optional + title = :: str, optional + save_plot = yes :: str :: [yes, no] + show_plot = True :: bool + rcparams = :: python(dict), optional + matplotlib style = :: str, optional + """""" + + _save_plot = { + 'yes': ""plot_file = plot.png :: file"", + 'no': """" + } + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases('save_plot', {name: mode for name, mode in cls._save_plot.items()}) + + @classmethod + def from_inputfile(cls, inputfile): + config = self.generate_input(inputfile, config=inputfile) + return cls(config) + + def __init__(self, config): + """""" + Initialising the plotting class + + Args: + config: + Colt information according to the class questions + """""" + self.config = config + if config['matplotlib style'] is None: + #Hard coded matplotlib stylesheet + style = os.path.dirname(os.path.abspath(__file__)) + style = os.path.join(style, 'pysurf.mplstyle') + else: + style = config['matplotlib style'] + try: + plt.style.use(style) + except: + raise Exception(f""Matplotlib style {style} could not be set"") + + if config['rcparams'] is not None: + for key, value in config['rcparams'].items(): + mpl.rcParams[key] = value + + + def line_plot(self, data, x_units_in, y_units_in, ax=None, line_props={}, save_plot=True, show_plot=True): + """""" + function that plots the data in a line plot + + Args: + data, numpy array + size (:, 2), containing the x and y data for the plot. + + x_units_in, None or tuple: + If it is None, x data will not be converted + If it is a tuple of length 2, it has to contain the type of the x-data, i.e. length, energy or time + and the units of the input data. The data will be transformed accordingly from this unit to the + desired unit given in the Colt questins, i.e. self.config['x_units'] + + y_units_in, None or tuple: + If it is None, ydata will not be converted + If it is a tuple of length 2, it has to contain the type of the y-data, i.e. length, energy or time + and the units of the input data. The data will be transformed accordingly from this unit to the + desired unit given in the Colt questions, i.e. self.config['y_units'] + + ax, optional, pyplot axes object: + If ax is set, the Line Plot will be added to the chart, otherwise a new figure is created for the plot. + + line_props, optional, dict: + dictionary containing the properties like linestyl, color, width, ... for the line plot. It will be used as is. + + + Output: + ax, pyplot axes object: + ax is the updated axes object with the new plot, or the newly created object if ax was not set. + + """""" + + + config = self.config + + #Get converter for x-data + if x_units_in is not None: + try: + xconverter = globals()[x_units_in[0]+'_converter'].get_converter(x_units_in[1], config['x_units']) + except: + raise InputException(""Converter or units not known"") + else: + xconverter = lambda x: x + #Get converter for y-data + if y_units_in is not None: + try: + yconverter = globals()[y_units_in[0]+'_converter'].get_converter(y_units_in[1], config['y_units']) + except: + raise InputException(""Converter or units not known"") + else: + yconverter = lambda x: x + + #Convert data + convdata = np.empty_like(data) + convdata[:, 0] = xconverter(data[:, 0]) + convdata[:, 1] = yconverter(data[:, 1]) + if ax is None: + fig = plt.figure() + ax = fig.add_subplot(1, 1, 1) + +# if config['title'] != None: ax.set_title(config['title']) + + + #set axis and axis label + lbl = r""{}"".format(config['x_label']) + if config['x_label_unit']: + lbl += r"" [{}]"".format(config['x_units']) + ax.set_xlabel(lbl) + + scale = False + lim = [config['x_start']] + lim += [config['x_end']] + if None in lim: scale = True + ax.set_xlim(*lim, auto=scale) + + if config['x_units'] == 'a.u.': + ax.set_xticklabels('' for x in ax.get_xticks()) + + lbl = r""{}"".format(config['y_label']) + if config['y_label_unit']: + lbl += r"" [{}]"".format(config['y_units']) + ax.set_ylabel(lbl) + + scale = False + lim = [config['y_start']] + lim += [config['y_end']] + if None in lim: scale = True + ax.set_ylim(*lim, auto=scale) + + if config['y_units'] == 'a.u.': + ax.set_yticklabels('' for y in ax.get_yticks()) + + #plot data + ax.plot(convdata[:, 0], convdata[:, 1], **line_props) + + #legend + if config['legend'] is not None: + ax.legend(config['legend']) + + #save plot + if config['save_plot'] and save_plot: + plt.savefig(config['save_plot']['plot_file']) + + #show plot + if config['show_plot'] and show_plot: + plt.show() + + return ax + + + def mesh_plot(self, data, x_units_in, y_units_in, ax=None, save_plot=True, show_plot=True): + """""" + function that plots the data in a mesh plot + + Args: + data, numpy array + size (:, 2), containing the x and y data for the plot. + + x_units_in, None or tuple: + If it is None, x data will not be converted + If it is a tuple of length 2, it has to contain the type of the x-data, i.e. length, energy or time + and the units of the input data. The data will be transformed accordingly from this unit to the + desired unit given in the Colt questins, i.e. self.config['x_units'] + + y_units_in, None or tuple: + If it is None, ydata will not be converted + If it is a tuple of length 2, it has to contain the type of the y-data, i.e. length, energy or time + and the units of the input data. The data will be transformed accordingly from this unit to the + desired unit given in the Colt questions, i.e. self.config['y_units'] + + ax, optional, pyplot axes object: + If ax is set, the Line Plot will be added to the chart, otherwise a new figure is created for the plot. + + line_props, optional, dict: + dictionary containing the properties like linestyl, color, width, ... for the line plot. It will be used as is. + + + Output: + ax, pyplot axes object: + ax is the updated axes object with the new plot, or the newly created object if ax was not set. + + """""" + + + config = self.config + + #Get converter for x-data + if x_units_in is not None: + try: + xconverter = globals()[x_units_in[0]+'_converter'].get_converter(x_units_in[1], config['x_units']) + except: + raise InputException(""Converter or units not known"") + else: + xconverter = lambda x: x + #Get converter for y-data + if y_units_in is not None: + try: + yconverter = globals()[y_units_in[0]+'_converter'].get_converter(y_units_in[1], config['y_units']) + except: + raise InputException(""Converter or units not known"") + else: + yconverter = lambda x: x + + #Convert data + x = np.empty_like(data[0]) + y = np.empty_like(data[1]) + x = xconverter(data[0]) + y = yconverter(data[1]) + if ax is None: + fig = plt.figure() + ax = fig.add_subplot(1, 1, 1) + +# if config['title'] != None: ax.set_title(config['title']) + + + #set axis and axis label + lbl = r""{}"".format(config['x_label']) + if config['x_label_unit']: + lbl += r"" [{}]"".format(config['x_units']) + ax.set_xlabel(lbl) + + scale = False + lim = [config['x_start']] + lim += [config['x_end']] + if None in lim: scale = True + ax.set_xlim(*lim, auto=scale) + + if config['x_units'] == 'a.u.': + ax.set_xticklabels('' for x in ax.get_xticks()) + + lbl = r""{}"".format(config['y_label']) + if config['y_label_unit']: + lbl += r"" [{}]"".format(config['y_units']) + ax.set_ylabel(lbl) + + scale = False + lim = [config['y_start']] + lim += [config['y_end']] + if None in lim: scale = True + ax.set_ylim(*lim, auto=scale) + + if config['y_units'] == 'a.u.': + ax.set_yticklabels('' for y in ax.get_yticks()) + + #plot data + ax.pcolormesh(x, y, data[2]) + + #legend + if config['legend'] is not None: + ax.legend(config['legend']) + + #save plot + if config['save_plot'] and save_plot: + plt.savefig(config['save_plot']['plot_file']) + + #show plot + if config['show_plot'] and show_plot: + plt.show() + + return ax +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/analysis/analyse_fit_pes_2nm.py",".py","8738","231",""""""" +PySurf Module: + Validation and Training of Interpolators + +Provide infrastructure for the training of interpolators +and test them against a validation set +"""""" +import numpy as np +from scipy.optimize import minimize +import matplotlib.pyplot as plt +from mpl_toolkits.mplot3d import Axes3D + +from pysurf.database import PySurfDB +from pysurf.spp import SurfacePointProvider +from pysurf.logger import get_logger +from pysurf.sampling.normalmodes import Mode +from pysurf.system import Molecule +from pysurf.sampling.normalmodes import NormalModes as nm +from pysurf.molden import MoldenParser +from pysurf.constants import U_TO_AMU, CM_TO_HARTREE +from pysurf.system.atominfo import ATOMNAME_TO_ID, MASSES +from pysurf.utils import exists_and_isfile +from pysurf.analysis import Plot3D +# +from colt import Colt +from colt import from_commandline +from qctools.converter import energy_converter + + + + + + +class AnalyseFitPes2Nm(Colt): + _user_input = """""" + spp = spp.inp :: existing_file + mode = :: int + mode2 = :: int + energy_units = eV :: str :: [eV, au, cm-1, nm] + reference_energy = 0 :: float + plot_input = plot_fit_pes_2nm.inp :: file + start = -2 :: float + end = 2 :: float + start2 = -2 :: float + end2 = 2 :: float + npoints = 15 :: int + npoints2 = 15 :: int + save_data = yes :: str :: [yes, no] + plot_pes = yes :: str :: [yes, no] + moldenfile = molden.in :: existing_file + states = :: ilist, optional + """""" + + _save_data = { + 'yes': ""data_file = fit_pes_2nm.dat :: file"", + 'no' : "" "" + } + + _plot_pes = { + 'yes': ""plot_inputfile = plot_fit_pes_2nm.inp :: file"", + 'no' : """" + } + + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases('save_data', {name: mode for name, mode in cls._save_data.items() }) + questions.generate_cases('plot_pes', {name: mode for name, mode in cls._plot_pes.items()}) + + + @classmethod + def from_inputfile(cls, inputfile): + if not(exists_and_isfile(inputfile)): + config = cls.generate_input(inputfile, config=None) + else: + config = cls.generate_input(inputfile, config=inputfile) + quests = cls.generate_user_input(config=inputfile) + config = quests.check_only(inputfile) + + plot_config={} + if config['plot_pes'].value == 'yes': + plot_config = {} + plot_config['x_label'] = 'mode' + plot_config['x_label_unit'] = False + plot_config['z_label_unit'] = True + plot_config['z_label'] = 'energy' + plot_config = {'':plot_config} + + presets = '' + presets += f""z_label = energy\n"" + presets += f""x_label_unit = True\n"" + presets += f""[save_plot(yes)]\nplot_file = plot_fit_pes_nm.png\n"" + presets += ""legend = {}\n"" + + plot_input = config['plot_pes']['plot_inputfile'] + if exists_and_isfile(plot_input): + plot_config = Plot3D.generate_input(plot_input, config=plot_input, presets=presets) + else: + plot_config = Plot3D.generate_input(plot_input, config=plot_config, presets=presets) + print(plot_config) + return cls(config, plot_config) + + + def __init__(self, config, plot_config): + # + self.logger = get_logger('plotnm.log', 'plotnm', []) + # + #Get Surface Point Provider + config_spp = self._get_spp_config(config['spp']) + natoms, self.nstates, properties = self._get_db_info(config_spp['use_db']['database']) + atomids = [1 for _ in range(natoms)] + self.spp = SurfacePointProvider.from_config(config_spp, properties, self.nstates, natoms, atomids=atomids, + logger=self.logger) + # + self.interpolator = self.spp.interpolator + self.interpolator.train() + # + qx, qy, crds = self.generate_crds(config['moldenfile'], mode=(config['mode'], config['mode2']), start=(config['start'], config['start2']), end=(config['end'], config['end2']), npoints=(config['npoints'], config['npoints2'])) + energy = self._compute(crds) + data = [] + conv = energy_converter.get_converter('au', config['energy_units']) + for qxi, qyi, en in zip(np.ravel(qx), np.ravel(qy), energy): + en = conv(en) - conv(config['reference_energy']) + data += [[qxi, qyi, *en]] + data = np.array(data) + nstates = data.shape[1] - 2 + energy = data[:,2:] + energy = energy.T.reshape((nstates, *qx.shape)) + + # Take only states according to user input + if config['states'] is None: + statelist = [i for i in range(nstates)] + else: + statelist = config['states'] + + if config['save_data'] == 'yes': + np.savetxt(config['save_data']['data_file'], data) + + if config['plot_pes'] == 'yes': + myplt = Plot3D(plot_config) + + save = False + plot = False + for state in statelist: + if state == nstates-1: + save = True + plot = True + if state == statelist[0]: + myax = myplt.surface_plot((qx, qy, energy[state]), + x_units_in=('length', 'au'), + y_units_in=('length', 'au'), + z_units_in=('energy', config['energy_units']), + ax=None, + show_plot=plot, + save_plot=save) + else: + myax = myplt.surface_plot((qx, qy, energy[state]), + x_units_in=('length', 'au'), + y_units_in=('length', 'au'), + z_units_in=('energy', config['energy_units']), + ax=myax, + show_plot=plot, + save_plot=save) + + + + def _get_spp_config(self, filename): + questions = SurfacePointProvider.generate_user_input(presets="""""" + use_db=yes :: yes + [use_db(yes)] + fit_only = yes :: yes + write_only = no :: no + """""") + return questions.ask(config=filename, raise_read_error=False) + + def _get_db_info(self, database): + db = PySurfDB.load_database(database, read_only=True) + rep = db.dbrep + natoms = rep.dimensions.get('natoms', None) + if natoms is None: + natoms = rep.dimensions['nmodes'] + nstates = rep.dimensions['nstates'] + return natoms, nstates, db.saved_properties + + def generate_crds(self, moldenfile, mode, start=-5, end=5, npoints=50): + molden = MoldenParser(moldenfile, ['Info', 'Freqs', 'FrCoords', 'FrNormCoords']) + # get molecule info + atoms = [atom for atom, _, _, _ in molden['FrCoords']] + atomids = np.array([ATOMNAME_TO_ID[atom] for atom in atoms]) + crd = np.array([[x, y, z] for _, x, y, z in molden['FrCoords']]) + masses = np.array([MASSES[idx]*U_TO_AMU for idx in atomids]) + # create molecule + molecule = Molecule(atomids, crd, masses) + # + print('nmsampler, molecule', molecule) + modes = [Mode(freq * CM_TO_HARTREE, np.array(molden['FrNormCoords'][imode])) + for imode, freq in enumerate(molden['Freqs'])] + # + modes = nm.create_mass_weighted_normal_modes(modes, molecule) + + crds = np.empty((npoints[0]*npoints[1], *crd.shape)) + qx, qy = np.mgrid[start[0]: end[0]: npoints[0]*1j, start[1]:end[1]:npoints[1]*1j] + i=0 + for qxi, qyi in zip(np.ravel(qx), np.ravel(qy)): + crds[i] = crd + qxi*modes[mode[0]].displacements + qyi*modes[mode[1]].displacements + i += 1 + return qx, qy, crds + + + def _compute(self, crds, states=None): + ndata = len(crds) + energy = [] + for i, crd in enumerate(crds): + if states is None: + result = self.spp.request(crd, ['energy']) + else: + result = self.spp.request(crd, ['energy']) + # + energy += [np.copy(result['energy'])] + return np.array(energy) + +@from_commandline("""""" +inputfile = analyse_fit_pes_2nm.inp :: file +"""""") +def command_analyse_pes(inputfile): + analyse_pes = AnalyseFitPes2Nm.from_inputfile(inputfile) + + +if __name__ == '__main__': + command_analyse_pes() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/landauzener.py",".py","9595","264","import numpy as np +from ..random.shrandom import RandomNumberGeneratorNP + +from ..spp import SurfacePointProvider +#from pysurf.dynamics import * + +from .base_propagator import PropagatorBase + + + + +class LandauZener(PropagatorBase): + + properties = ['energy', 'gradient'] + + def _run(self, nsteps, dt, seed=16661): + self.dt = dt + self.nsteps = nsteps + self.e_curr = None + self.e_prev_step = None + self.e_two_step_prev = None + + # set random number + self.init_random(seed) + + if self.restart is False: + self.setup_new() + if self.nsteps < 2: + return + else: + self.setup_from_db() + + if self.start > self.nsteps: + self.logger.info(""Dynamics already performed for more steps!"") + return + + for istep in range(self.start, nsteps+1): + # 1) update coordinates + self.crd = vv_xstep(self.crd, self.v, self.a, self.dt) + # 2) get data + self.data = self.call_spp() + self.e_two_step_prev = self.e_prev_step + self.e_prev_step = self.e_curr + self.e_curr = self.data['energy'] + # + # update acceleration + self.a_old = self.a + self.a = get_acceleration(self.data['gradient'][self.iactive], self.masses) + # + self.v = vv_vstep(self.v, self.a_old, self.a, self.dt) + + # Landau Zener: + self.iselected = self.lz_select() + if self.iselected is not None: + # change active state + self.dE = self.data['energy'][self.iselected] - self.data['energy'][self.iactive] + self.ekin = calc_ekin(self.masses, self.v) + if (self.dE > self.ekin): + self.logger.info(f""* Frustrated hop: Too few energy -> no hop\n"") + else: + self.logger.info(f""* LandauZener hop: {self.iactive} -> {self.iselected}\n"") + self.iactive = self.iselected + # rescale velocity + self.v = rescale_velocity(self.ekin, self.dE, self.v) + # get acceleration + self.data = self.call_spp(same_crd=True) + self.a = get_acceleration(self.data['gradient'][self.iactive], self.masses) + + self.etot_old = self.etot + self.ekin = calc_ekin(self.masses, self.v) + self.epot = self.e_curr[self.iactive] + self.etot = self.ekin + self.epot + #write step info + time = dt * istep + diff = self.etot - self.etot_old + self.output_step(istep, time, self.iactive, self.ekin, self.epot, self.etot, diff) + self.db.add_step(time, self.data, self.v, self.iactive, self.ekin, self.epot, self.etot) + if np.abs(diff) > 0.01: + self.logger.error('Energy difference too large! Simulation stopped') + + def call_spp(self, crd=None, gradstate=None, same_crd=False): + if crd is None: + crd = self.crd + if gradstate is None: + gradstate = self.iactive + res = self.spp.request(crd, self.properties, states=[gradstate], same_crd=same_crd) + return res + + def setup_new(self): + self.iactive = int(self.init.state) + if self.iactive > self.nstates - 1: + self.logger.error('Initial state is higher than number of states of the calculation') + # set starting crds + self.crd = self.init.crd + # set starting veloc + self.v = self.init.veloc + # get gradient and energy + self.data = self.call_spp() + self.e_curr = self.data['energy'] + + self.a = get_acceleration(self.data['gradient'][self.iactive], self.masses) + # + self.ekin = calc_ekin(self.masses, self.v) + self.epot = self.e_curr[self.iactive] + self.etot = self.ekin + self.epot + self.etot_old = self.etot + + #Put initial condition as step 0 into database + istep = 0 + diff = 0. + time = istep * self.dt + diff = self.etot - self.etot_old + self.output_step(istep, time, self.iactive, self.ekin, self.epot, self.etot, diff) + self.db.add_step(time, self.data, self.v, self.iactive, self.ekin, self.epot, self.etot) + + self.start = 1 + + if self.nsteps > 0: + # If not restart, first 2 steps are just to save energy! + self.crd = vv_xstep(self.crd, self.v, self.a, self.dt) + + self.data = self.call_spp() + self.e_prev_step = self.e_curr + self.e_curr = self.data['energy'] + + # update acceleration + self.a_old = self.a + self.a = get_acceleration(self.data['gradient'][self.iactive], self.masses) + self.v = vv_vstep(self.v, self.a_old, self.a, self.dt) + + self.etot_old = self.etot + self.ekin = calc_ekin(self.masses, self.v) + self.epot = self.e_curr[self.iactive] + self.etot = self.ekin + self.epot + + istep = 1 + time = istep * self.dt + diff = self.etot - self.etot_old + self.output_step(istep, time, self.iactive, self.ekin, self.epot, self.etot, diff) + self.db.add_step(time, self.data, self.v, self.iactive, self.ekin, self.epot, self.etot) + + self.start = 2 + + + def setup_from_db(self): + #two previous steps are needed + if len(self.db) < 2: + self.create_new_db() + return self.setup_new() + else: + self.crd = self.db.get('crd', -1) + self.iactive = int(self.db.get('currstate', -1)) + self.v = self.db.get('veloc', -1) + grad = self.db.get('gradient', -1)[0] + self.a = get_acceleration(grad, self.masses) + self.e_curr = self.db.get('energy',-1) + self.e_prev_step = self.db.get('energy', -2) + self.start = len(self.db) + self.etot = self.db.get('etot', -1)[0] + + def lz_select(self): + """"""""takes in the (adiabatic?) energies at + the current, the previous, and the two steps previous time step + select which state is the most likely to hop to + """""" + iselected = None + prob = -1.0 + for istate in range(self.nstates): + # + if istate == self.iactive: + continue + # compute energy differences + d_two_step_prev = compute_diff(self.e_two_step_prev, self.iactive, istate) + d_prev_step = compute_diff(self.e_prev_step, self.iactive, istate) + d_curr = compute_diff(self.e_curr, self.iactive, istate) + # compute probability + if (abs_gt(d_curr, d_prev_step) and abs_gt(d_two_step_prev, d_prev_step)): + curr_hop_prob = self._lz_probability(self.dt, d_curr, d_prev_step, d_two_step_prev) + if curr_hop_prob > prob: + prob = curr_hop_prob + iselected = istate + # + if iselected is None: + return None + if prob > self.random(): + return iselected + return None + + + def _lz_probability(self, dt, d_curr, d_prev_step, d_two_step_prev): + """"""compute landau zener sh probability between two states"""""" + # compute the second derivative of the energy difference by time + finite_difference_grad = ((d_curr + d_two_step_prev - 2 * d_prev_step) / dt**2) + # compute the hopping probability + return np.exp((-np.pi/2.0) * np.sqrt(abs(d_prev_step)**3 / abs(finite_difference_grad))) + + + def init_random(self, seed=16661): + self._random = RandomNumberGeneratorNP(seed) + + def random(self): + return self._random.get() + + +def calc_ekin(masses, veloc): + ekin = 0.0 + #Take care that for an ab-initio calculation masses are a 1D array of length natoms + #and velocities are a 2D array of shape (natoms, 3) + if veloc.shape != masses.shape: + masses_new = np.repeat(masses, 3).reshape((len(masses),3)) + else: + masses_new = masses + for i, mass in enumerate(masses_new.flatten()): + ekin += 0.5*mass*veloc.flatten()[i]*veloc.flatten()[i] + return ekin + +def x_update(crd, v, a, dt): + """"""Currently we only support velocity verlet"""""" + crd += v*dt + 0.5*a*dt*dt + return crd + +def v_update(v, a_old, a, dt): + v += 0.5 * (a_old + a) * dt + return v + +def get_acceleration(g, m): + g = np.array(g) + m = np.array(m) + #Take care that for an ab-initio calculation masses are a 1D array of length natoms + #and acceleration g is a 2D array of shape (natoms, 3) + if g.shape == m.shape: + return -g/m + else: + m_new = np.repeat(m, 3).reshape((len(m),3)) + return -g/m_new + +def rescale_velocity(ekin, dE, v): + factor = (1. - dE/ekin) + v *= np.sqrt(factor) + return v + +def _rescale_velocity_along_v(ekin, dE, v): + factor = (1. - dE/ekin) + v *= np.sqrt(factor) + return v + +def vv_xstep(crd, v, a, dt): + crd += v*dt + 0.5*a*dt*dt + return crd + +def vv_vstep(v, a_old, a, dt): + v += 0.5 * (a_old + a) * dt + return v + +def compute_diff(e, i, j): + """"""return e[i] - e[j]"""""" + return e[i] - e[j] + +def abs_gt(a, b): + return abs(a) > abs(b) + + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/base_propagator.py",".py","4531","118","from abc import abstractmethod +import os +import numpy as np +import time + +from ..spp import SurfacePointProvider +from ..utils import exists_and_isfile +from ..logger import get_logger + +from qctools.converter import Converter, time_converter +from colt import Plugin + +from .dyn_db import DynDB + +class PropagatorFactory(Plugin): + _plugins_storage = '_methods' + _is_plugin_factory = True + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""method"", {name: method.questions + for name, method in cls._methods.items()}) + +class PropagatorBase(PropagatorFactory): + _user_input = 'inherited' + extend_user_input: 'inherited' + + _register_plugin = False + #Properties have to be defined for each Propagator + properties = ['energy', 'gradient'] + + @abstractmethod + def _run(self, nsteps, db, *args, **kwargs): + """""" propagation routine"""""" + pass + + def run(self, nsteps, dt, *args, **kwargs): + self.output_header() + self.start_time = time.perf_counter() + self._run(nsteps, dt, *args, **kwargs) + + def get_runtime(self): + return (time.perf_counter() - self.start_time) + + def __init__(self, spp_inp, sampling, nstates, nghost_states, restart=True, logger=None): + """"""Setup surface hopping using config in `configfile` + and a SurfacePointProvider (SPP) abstract class + + The system is completely defined via the SPP model + """""" + self.nstates = nstates + self.start_time = time.perf_counter() + self.sampling = sampling + + if logger is None: + self.logger = get_logger('prop.log', 'propagator') + info = {'spp inputfile': spp_inp} + self.logger.header('PROPAGATION', info) + else: + self.logger = logger + +# for prop in properties: +# if prop not in self.properties: +# self.properties += [prop] + + self.init = sampling.get_condition(0) + # setup SPP + if sampling.model is False: + self.spp = SurfacePointProvider.from_questions(self.properties, nstates, + sampling.natoms, + nghost_states=nghost_states, + atomids=sampling.atomids, + config=spp_inp) + else: + self.spp = SurfacePointProvider.from_questions(self.properties, nstates, + sampling.nmodes, nghost_states=nghost_states, + config=spp_inp) + + if exists_and_isfile('prop.db'): + self.db = DynDB.from_dynamics('prop.db') + if len(self.db['crd']) > 0: + self.restart = True + else: + self.restart = False + else: + if self.init is None: + self.logger.error('No initial condition or restart file for the Propagator') + else: + self.create_new_db() + self.restart = False + + if restart is False: self.restart = False + + if self.restart is True: + self.masses = np.array(self.db['masses']) + mode_output = ""a"" + else: + self.masses = sampling.masses + mode_output = ""w"" + + self.t_converter = time_converter.get_converter(tin='au', tout='fs') + self.output = get_logger('prop.out', 'propagator_output', mode=mode_output) + + def create_new_db(self): + name = 'prop.db' + if exists_and_isfile(name): os.remove(name) + self.db = DynDB.create_db(name, self.sampling, self.nstates, self.properties) + + def output_header(self): + self.output.info('#'+('='*101)) + self.output.info(f""#{'Step':^9}|{'Time':^12}|{'State':^7}|{'Energy':^47}|{'Gradient':^11}|{'Runtime':^9}|"") + self.output.info(f""#{' ':9}|{' ':^12}|{' ':^7}|{'kin':^11}|{'pot':^11}|{'tot':^11}|{'diff':^11}|{'RMS':^11}|{' ':^9}|"") + self.output.info(f""#{' ':9}|{'[fs] ':^12}|{' ':^7}|{'[au]':^47}|{'[au]':^11}|{'[sec]':^9}|"") + self.output.info('#' + ('='*101) ) + + def output_step(self, step, time, state, ekin, epot, etot, dE, grad=None): + self.output.info(f""{step:>10}{self.t_converter(time):>13.2f}{state:>8} {ekin:>11.6f} {epot:>11.6f} {etot:>11.6f} {dE:>11.6f}{' ':12}{round(self.get_runtime(), 1):>10}"") +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/run_trajectory.py",".py","2820","71","import os +import numpy as np + +from collections import namedtuple + +from ..logger import Logger, get_logger +from ..database.database import Database +from ..database.dbtools import DBVariable +from ..utils.constants import fs2au +from ..utils.strutils import split_str +from ..spp import SurfacePointProvider +from .base_propagator import PropagatorFactory +from ..sampling import Sampling +# +from colt import Colt + + +class RunTrajectory(Colt): + _user_input = """""" + # Total propagation time in fs + time_final [fs] = 100 :: float + + # Time step in fs for the propagation + timestep [fs] = 0.5 :: float + + # File with initial condition + initial condition = init.db :: str + + # Number of total states + n_states = :: int + nghost_states = 0 :: int + method = LandauZener :: str + + #Filepath for the inputfile of the Surface Point Provider + spp = spp.inp :: str + + restart = True :: bool + +# properties = energy, gradient :: list + """""" + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""method"", {name: method.colt_user_input + for name, method in PropagatorFactory._methods.items()}) + + def __init__(self, config): + self.logger = get_logger('prop.log', 'prop') + self.logger.header('PROPAGATION', config) + sampling = Sampling.from_db(config['initial condition']) + + self.nsteps = int(np.ceil(config['time_final [fs]'] / config['timestep [fs]'])) + + self.logger.info('Start propagation of trajectory') + + #get propagator + propagator = PropagatorFactory._methods[config['method'].value](config['spp'], + sampling, + config['n_states'], + nghost_states = config['nghost_states'], + #properties = config['properties'], + restart=config['restart'], + logger=self.logger) + propagator.run(self.nsteps, config['timestep [fs]']*fs2au) + + @classmethod + def from_inputfile(cls, inputfile): + quests = cls.generate_user_input(config=inputfile) + config = quests.ask(inputfile) + return cls(config) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/__init__.py",".py","105","4","from .run_trajectory import RunTrajectory +from .dyn_db import DynDB +from .landauzener import LandauZener +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/dyn_db.py",".py","1894","52","import numpy as np + +from ..database import PySurfDB + +class DynDB(PySurfDB): + variables_molecule = ['crd_equi', 'modes_equi', 'model', 'atomids', 'freqs_equi', 'masses', 'currstate', 'crd', 'veloc', 'energy', 'ekin', 'epot', 'etot', 'time'] + variables_model = ['crd_equi', 'modes_equi', 'model', 'freqs_equi', 'masses', 'currstate', 'crd', 'veloc', 'energy', 'ekin', 'epot', 'etot', 'time'] + + @classmethod + def from_dynamics(cls, dbfile): + info = cls.info_database(dbfile) + if 'atomids' in info['variables']: + model = False + else: + model = True + return cls.load_database(dbfile, info['variables'], info['dimensions'], model=model) + + @classmethod + def create_db(cls, dbfile, sampling, nstates, props): + if sampling.model: + variables = cls.variables_model + else: + variables = cls.variables_molecule + + # Add additionally requested properties + for prop in props: + if prop not in variables: + variables += [prop] + dims = sampling.info['dimensions'] + dims['nstates'] = nstates + dims['nactive'] = 1 + db = cls.generate_database(dbfile, variables, dims, model=sampling.model, sp=False) + db.add_reference_entry(sampling.system, sampling.modes, sampling.model) + return db + + def add_step(self, time, data, veloc, currstate, ekin, epot, etot): + self.append('time', time) + for key, value in data.iter_data(): + if key == 'gradient': + self.append(key, data[key][currstate]) + continue + self.append(key, value) + self.append('crd', data.crd) + self.append('currstate', currstate) + self.append('ekin', ekin) + self.append('epot', epot) + self.append('etot', etot) + self.append('veloc', veloc) + self.increase + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/old/landauzener.py",".py","6286","168","import numpy as np +from .base_propagator import SHPropagatorBase + + +def get_data(spp, crd): + res = spp.get({'crd': crd, 'mass': None, 'gradient': None, 'energy': None}) + return res + + +def calc_ekin(masses, veloc): + ekin = 0.0 + for i, mass in enumerate(masses.flatten()): + ekin += 0.5*mass*veloc.flatten()[i]*veloc.flatten()[i] + return ekin + + +class LandauZener(SHPropagatorBase): + + properties = ['energy', 'gradient'] + + def __init__(self, spp_inp, natoms, nstates, atomids): + """"""setup surface hopping base"""""" + super().__init__(spp_inp, natoms, nstates, atomids, properties=self.properties) + + def run(self, initcond, nsteps, dt): + """"""actual surface hopping run"""""" + # these here should got from init + e_curr = self.storage['energy'].current + e_prev_step = self.storage['energy'].prev + e_two_step_prev = self.storage['energy'].twoprev + # set starting crd + crd = self.storage['crd'] + # + v = self.storage['veloc'] + # start + data = get_data(spp, crd) + nstates = len(data['energy']) + a = self.get_acceleration(data['gradient'][iactive], data['mass']) + # + if self.irestart is False: + # setup + e_curr = data['energy'] + for istep in range(2): + # If not restart, first 2 steps are just to save energy! + crd, v, a, data = self._propagation_step(crd, v, a, dt) + if e_prev_step is None: + e_prev_step = e_curr + e_curr = data['energy'] + continue + e_two_step_prev = e_prev_step + e_prev_step = e_curr + e_curr = data['energy'] + else: + raise Exception(""not implemented!"") + # TODO: that should be removed! + save = Save('prop.db', data) + # check whether ab initio calculation + save.add_mass(data['mass']) + # + for istep in range(nsteps): + # 1) write step info + # 2) call interface + crd, v, a, data = self._propagation_step(crd, v, a, dt) + # update energy + e_two_step_prev = e_prev_step + e_prev_step = e_curr + e_curr = data['energy'] + # Landau Zener: + iselected = self.landau_zener(iactive, nstates, dt, + e_curr, e_prev_step, e_two_step_prev) + if iselected is not None: + # change active state + dE = data['energy'][iselected] - data['energy'][iactive] + ekin = calc_ekin(data['mass'], v) + # TODO: all logging should be done automatically + if (dE > ekin): + print(f""Too few energy -> no hop"") + else: + iactive = iselected + print(f""new selected state: {iselected}"") + # rescale velocity + v = self._rescale_velocity_along_v(ekin, dE, v) + # get new acceleration + a = self.get_acceleration(data['gradient'][iactive], data['mass']) + ekin = calc_ekin(data['mass'], v) + epot = e_curr[iactive] + etot = ekin + epot + print(iactive, ekin, epot, etot) + save.append(data, v, iactive, ekin, epot, etot) + + def _propagation_step(self, crd, v, a, dt): + crd = self.x_update(crd, v, a, dt) + data = get_data(spp, crd) + # update acceleration + a_old = a + a = self.get_acceleration(data['gradient'][iactive], data['mass']) + v = self.v_update(v, a_old, a, dt) + return crd, v, a, data + + def _init_trajectory(self): + """"""setup a new trajectory run, returns if restart or not!"""""" + self.init_random(10) + return False + + def _restart_trajectory(self): + raise Exception(""not implemented yet"") + + @classmethod + def landau_zener_select(cls, iactive, nstates, dt, e_curr, e_prev_step, e_two_step_prev): + """"""""takes in the (adiabatic?) energies at + the current, the previous, and the two steps previous time step + + select which state is the most likely to hop to + """""" + iselected = None + prop = -1.0 + for istate in range(nstates): + # + if istate == iactive: + continue + # compute energy differences + d_two_step_prev = cls.compute_diff(e_two_step_prev, iactive, istate) + d_prev_step = cls.compute_diff(e_prev_step, iactive, istate) + d_curr = cls.compute_diff(e_curr, iactive, istate) + # compute probability + if (cls.abs_gt(d_curr, d_prev_step) and + cls.abs_gt(d_two_step_prev, d_prev_step)): + curr_hop_prob = cls.compute_landau_zener_probability( + dt, d_curr, d_prev_step, d_two_step_prev) + if curr_hop_prob > prop: + prop = curr_hop_prob + iselected = istate + print(f""{iselected} = {istate}"") + # + if iselected is None: + return None + if cls.landau_zener_hop(prop): + return iselected + return None + + @staticmethod + def abs_gt(a, b): + if isinstance(a, float) or isinstance(a, int): + return abs(a) > abs(b) + return any(a[i] > b[i] for i in range(len(a))) + + @staticmethod + def compute_landau_zener_probability(dt, d_curr, d_prev_step, d_two_step_prev): + """"""compute landau zener sh probability between two states"""""" + # compute the second derivative of the energy difference by time + finite_difference_grad = ((d_curr + d_two_step_prev - 2 * d_prev_step) + / dt**2) + # compute the hopping probability + return np.exp((-np.pi/2.0) # pi/2 + * np.sqrt(d_prev_step**3 + / finite_difference_grad)) + + @staticmethod + def compute_diff(e, i, j): + """"""return e[i] - e[j]"""""" + return e[i] - e[j] + + def landau_zener_hop(self, prop): + """"""Decide if Landom Zener Hop appears"""""" + if (prop > self.random()): + return True + return False +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/old/sh.py",".py","6150","166","import numpy as np +from .shbase import SurfaceHoppingBase + + +def get_data(spp, crd): + res = spp.get({'crd': crd, 'mass': None, 'gradient': None, 'energy': None}) + return res + + +def calc_ekin(masses, veloc): + ekin = 0.0 + for i, mass in enumerate(masses.flatten()): + ekin += 0.5*mass*veloc.flatten()[i]*veloc.flatten()[i] + return ekin + + +class LandauZener(SurfaceHoppingBase): + + def __init__(self, configfile): + """"""setup surface hopping base"""""" + super().__init__(self, configfile) + + def run(self): + """"""actual surface hopping run"""""" + # these here should got from init + e_curr = self.storage['energy'].current + e_prev_step = self.storage['energy'].prev + e_two_step_prev = self.storage['energy'].twoprev + # set starting crd + crd = self.storage['crd'] + # + v = self.storage['veloc'] + # start + data = get_data(spp, crd) + nstates = len(data['energy']) + a = self.get_acceleration(data['gradient'][iactive], data['mass']) + # + if self.irestart is False: + # setup + e_curr = data['energy'] + for istep in range(2): + # If not restart, first 2 steps are just to save energy! + crd, v, a, data = self._propagation_step(crd, v, a, dt) + if e_prev_step is None: + e_prev_step = e_curr + e_curr = data['energy'] + continue + e_two_step_prev = e_prev_step + e_prev_step = e_curr + e_curr = data['energy'] + else: + raise Exception(""not implemented!"") + # TODO: that should be removed! + save = Save('prop.db', data) + # check whether ab initio calculation + save.add_mass(data['mass']) + # + for istep in range(nsteps): + # 1) write step info + # 2) call interface + crd, v, a, data = self._propagation_step(crd, v, a, dt) + # update energy + e_two_step_prev = e_prev_step + e_prev_step = e_curr + e_curr = data['energy'] + # Landau Zener: + iselected = self.landau_zener(iactive, nstates, dt, + e_curr, e_prev_step, e_two_step_prev) + if iselected is not None: + # change active state + dE = data['energy'][iselected] - data['energy'][iactive] + ekin = calc_ekin(data['mass'], v) + # TODO: all logging should be done automatically + if (dE > ekin): + print(f""Too few energy -> no hop"") + else: + iactive = iselected + print(f""new selected state: {iselected}"") + # rescale velocity + v = self._rescale_velocity_along_v(ekin, dE, v) + # get new acceleration + a = self.get_acceleration(data['gradient'][iactive], data['mass']) + ekin = calc_ekin(data['mass'], v) + epot = e_curr[iactive] + etot = ekin + epot + print(iactive, ekin, epot, etot) + save.append(data, v, iactive, ekin, epot, etot) + + def _propagation_step(self, crd, v, a, dt): + crd = self.x_update(crd, v, a, dt) + data = get_data(spp, crd) + # update acceleration + a_old = a + a = self.get_acceleration(data['gradient'][iactive], data['mass']) + v = self.v_update(v, a_old, a, dt) + return crd, v, a, data + + def _init_trajectory(self): + """"""setup a new trajectory run, returns if restart or not!"""""" + self.init_random(10) + return False + + def _restart_trajectory(self): + raise Exception(""not implemented yet"") + + @classmethod + def landau_zener_select(cls, iactive, nstates, dt, e_curr, e_prev_step, e_two_step_prev): + """"""""takes in the (adiabatic?) energies at + the current, the previous, and the two steps previous time step + + select which state is the most likely to hop to + """""" + iselected = None + prop = -1.0 + for istate in range(nstates): + # + if istate == iactive: + continue + # compute energy differences + d_two_step_prev = cls.compute_diff(e_two_step_prev, iactive, istate) + d_prev_step = cls.compute_diff(e_prev_step, iactive, istate) + d_curr = cls.compute_diff(e_curr, iactive, istate) + # compute probability + if (cls.abs_gt(d_curr, d_prev_step) and + cls.abs_gt(d_two_step_prev, d_prev_step)): + curr_hop_prob = cls.compute_landau_zener_probability( + dt, d_curr, d_prev_step, d_two_step_prev) + if curr_hop_prob > prop: + prop = curr_hop_prob + iselected = istate + print(f""{iselected} = {istate}"") + # + if iselected is None: + return None + if cls.landau_zener_hop(prop): + return iselected + return None + + @staticmethod + def abs_gt(a, b): + if isinstance(a, float) or isinstance(a, int): + return abs(a) > abs(b) + return any(a[i] > b[i] for i in range(len(a))) + + @staticmethod + def compute_landau_zener_probability(dt, d_curr, d_prev_step, d_two_step_prev): + """"""compute landau zener sh probability between two states"""""" + # compute the second derivative of the energy difference by time + finite_difference_grad = ((d_curr + d_two_step_prev - 2 * d_prev_step) + / dt**2) + # compute the hopping probability + return np.exp((-np.pi/2.0) # pi/2 + * np.sqrt(d_prev_step**3 + / finite_difference_grad)) + + @staticmethod + def compute_diff(e, i, j): + """"""return e[i] - e[j]"""""" + return e[i] - e[j] + + def landau_zener_hop(self, prop): + """"""Decide if Landom Zener Hop appears"""""" + if (prop > self.random()): + return True + return False +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/old/model.py",".py","4187","130","import numpy as np +import os + +from pysurf.spp.spp import SurfacePointProvider +from pysurf.sh.sh import * + +#spp = SurfacePointProvider('./test.inp') +#out = spp.get({'crd': np.zeros(3, dtype=np.double), 'energy': None, 'gradient': None}) + +class Save(object): + + def __init__(self, filename, header=None): + + if os.path.isfile(filename): + filename = list(filename.rpartition('.')) + filename[0] += ""_%12.11f"" % random.get() + filename = """".join(filename) + + self.f = open(filename, 'w') + if header is not None: + self.f.write(header + ""\n"") + + def save(self, txt): + self.f.write(txt + ""\n"") + + def __del__(self): + self.f.close() + + +def rescale_velocity(ekin, dE, v): + factor = (1. - dE/ekin) + print(f""factor = {factor}"") + v *= np.sqrt(factor) + return v + +def landau_zener_surfacehopping(init_cond, iactive, nsteps, random_seed, inp, dt): + + nstates = 3 +# mass = np.array([1.0, 1.0, 1.0]) + + save_crd = Save('crd.txt', ""M1 M2 M3"") + save_veloc = Save('veloc.txt', ""M1 M2 M3"") + save_acc = Save('acc.txt', ""M1 M2 M3"") + save_energy = Save(""energy.txt"", ""iactive EKin EPot ETot"") + save_pes = Save(""pes.txt"", ""states"") + + e_curr = None + e_prev_step = None + e_two_step_prev = None + + # init SPP + spp = SurfacePointProvider(inp) + # set random number + random = RandomNumberGeneratorNP(random_seed) + # set starting crds + crd = init_cond.crd + # + v = init_cond.veloc + # start + data = get_data(spp, crd) + a = get_acceleration(data['gradient'][iactive], data['mass']) + # + e_curr = data['energy'] + for istep in range(2): + """"""If not restart, first 2 steps are just to save energy!"""""" + crd = vv_xstep(crd, v, a, dt) + data = get_data(spp, crd) + # update acceleration + a_old = a + a = get_acceleration(data['gradient'][iactive], data['mass']) + v = vv_vstep(v, a_old, a, dt) + if e_prev_step is None: + e_prev_step = e_curr + e_curr = data['energy'] + continue + e_two_step_prev = e_prev_step + e_prev_step = e_curr + e_curr = data['energy'] + + + for istep in range(nsteps): + # 1) write step info + # 2) call interface + crd = vv_xstep(crd, v, a, dt) + data = get_data(spp, crd) + # + e_two_step_prev = e_prev_step + e_prev_step = e_curr + e_curr = data['energy'] + # update acceleration + a_old = a + a = get_acceleration(data['gradient'][iactive], data['mass']) + # + v = vv_vstep(v, a_old, a, dt) + # Landau Zener: + iselected = LandauZener.landau_zener(iactive, nstates, dt, + e_curr, e_prev_step, e_two_step_prev) + if iselected is not None: + # change active state + dE = data['energy'][iselected] - data['energy'][iactive] + ekin = calc_ekin(data['mass'], v) + if (dE > ekin): + print(f""Too few energy -> no hop"") + else: + iactive = iselected + print(f""new selected state: {iselected}"") + # rescale velocity + v = rescale_velocity(ekin, dE, v) + # get acceleration + a = get_acceleration(data['gradient'][iactive], data['mass']) + save_crd.save("" "".join(""%12.8f"" % c for c in crd.flatten())) + save_veloc.save("" "".join(""%12.8f"" % _v for _v in v.flatten())) + save_acc.save("" "".join(""%12.8f"" % _a for _a in a.flatten())) + ekin = calc_ekin(data['mass'], v) + epot = e_curr[iactive] + etot = ekin + epot + print(iactive, ekin, epot, etot) + save_energy.save(""%8d %12.8f %12.8f %12.8f"" % (iactive, ekin, epot, etot)) + save_pes.save(""%12.8f %12.8f %12.8f"" % (data['energy'][0], data['energy'][1], data['energy'][2])) + +def calc_ekin(masses, veloc): + ekin = 0.0 + for i, mass in enumerate(masses.flatten()): + ekin += 0.5*mass*veloc.flatten()[i]*veloc.flatten()[i] + return ekin + +def get_data(spp, crd): + res = spp.get({'crd': crd, 'mass': None, 'gradient': None, 'energy': None}) + return res +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/dynamics/old/shbase.py",".py","1943","75","from abc import ABC, abstractmethod +from ..random.shrandom import RandomNumberGeneratorNP + + +class SurfaceHoppingBase(ABC): + + def __init__(self, configfile): + """"""Setup surface hopping using config in `configfile` + and a SurfacePointProvider (SPP) abstract class + + The system is completely defined via the SPP model + """""" + # get spp input + spp_inp = self._parse_config(configfile) + # setup SPP + self.spp = SurfacePointProvider(spp_inp) + # setup trajectory + self.irestart = self._init_trajectory() + if self.irestart is True: + self._restart_trajectory() + + @abstractmethod + def _parse_config(self, config): + """"""parse the config file and do anything related + should return the input file for the spp + """""" + pass + + @abstractmethod + def _restart_trajectory(self): + """"""method to restart a trajectory"""""" + pass + + @abstractmethod + def _init_trajectory(self): + """"""setup a new trajectory run, returns if restart or not!"""""" + pass + + @abstractmethod + def _init_system(self): + """"""method to setup the surface hopping run"""""" + pass + + @abstractmethod + def run(self): + """"""run the actual trajectory job!"""""" + pass + + def init_random(self, seed=16661): + self._random = RandomNumberGeneratorNP(seed) + + def random(self): + return self._random.get() + + @staticmethod + def x_update(crd, v, a, dt): + """"""Currently we only support velocity verlet"""""" + crd += v*dt + 0.5*a*dt*dt + return crd + + @staticmethod + def v_update(v, a_old, a, dt): + v += 0.5 * (a_old + a) * dt + return v + + @staticmethod + def get_acceleration(g, m): + return -g/m + + @staticmethod + def _rescale_velocity_along_v(ekin, dE, v): + factor = (1. - dE/ekin) + v *= np.sqrt(factor) + return v +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/sampler.py",".py","2151","81","from abc import abstractmethod +from collections import namedtuple +from copy import deepcopy +# +import numpy as np +#from pysurf.logger import get_logger +from ..utils.osutils import exists_and_isfile +from ..database.database import Database +from ..database.dbtools import DBVariable +from ..logger import Logger, get_logger +# +from ..system import Molecule +from ..sampling.base_sampler import SamplerFactory +from .base_sampler import DynCondition, CrdCondition +from .normalmodes import Mode +# +from colt import Colt + + + + +class Sampler(Colt): + _user_input = """""" + method = :: str + + #State whether the system is a model system + model = False :: bool + """""" + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""method"", {name: method.colt_user_input + for name, method in SamplerFactory._methods.items()}) + + @classmethod + def from_config(cls, config): + sampler = cls._get_sampler(config['method']) + return cls(config, sampler) + + @classmethod + def from_inputfile(cls, inputfile): + # Generate the config + config = cls.generate_input(inputfile, config=inputfile) + return cls.from_config(config) + + def __init__(self, config, sampler, logger=None): + """""" Sampling always goes with a database, if not needed use Sampler class + """""" + + self.config = config + self.sampler = sampler + self._start = 0 + + if logger is None: + self.logger = get_logger('sampler.log', 'sampler') + else: + self.logger = logger + + + def get_condition(self, idx): + return self.sampler.get_condition() + + def __iter__(self): + self._start = 1 # skip equilibrium structure + return self + + def __next__(self): + cond = self.get_condition(self._start) + if cond is not None: + self._start += 1 + return cond + raise StopIteration + + @staticmethod + def _get_sampler(config): + return SamplerFactory._methods[config.value].from_config(config) + + @property + def equilibrium(self): + return self.sampler.get_init() +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/normalmodes.py",".py","4689","118","from copy import deepcopy +# +from collections import namedtuple +# +import numpy as np +# +from ..constants import U_TO_AMU +# + +Mode = namedtuple(""Mode"", [""freq"", ""displacements""]) + + +class NormalModes(object): + + @staticmethod + def is_normal_mode_format(modes, natoms): + """"""Check if the normal mode is in the given format! + change the docstring to something useful! + """""" + + thresh = 0.05 + nmodes = len(modes) + # + matrix = np.array([[mode.displacements[iatom][ixyz] for mode in modes] + for iatom in range(natoms) + for ixyz in range(3)]) + # + result = np.dot(matrix.T, matrix) # returns modes*modes matrix + # compute the trace + trace = np.trace(result) + # set diagonal elements to 0.0 + np.fill_diagonal(result, 0.0) + # + nmodes_m1 = float(nmodes-1) + # check that trace == nmodes - 1 + if trace > nmodes_m1: + if abs((trace/nmodes) - 1.0) < thresh: + # compute max/min ofdiagonal elements + max_val = abs(np.max(result)) + min_val = abs(np.min(result)) + # check that there are no significant elements! + if max_val < thresh and min_val < thresh: + return True + return False + + @staticmethod + def compute_norm_mode(mode, molecule): + """"""Compute the norm of a mode"""""" + norm = 0.0 + for iatom, displacement in enumerate(mode.displacements): + for xyz in displacement: + norm += xyz**2 * molecule.masses[iatom]/U_TO_AMU + return np.sqrt(norm) + + @staticmethod + def scale_mode(imode, modes, expression): + """"""example expression: + + lambda imode, iatom, ixyz, disp: disp/(norm/np.sqrt(molecule.masses[iatom])) + + """""" + mode = deepcopy(modes[imode]) + # + for iatom, displacement in enumerate(mode.displacements): + mode.displacements[iatom] = [expression(imode, iatom, ixyz, disp) + for ixyz, disp in enumerate(displacement)] + # + return mode + + @classmethod + def create_mass_weighted_normal_modes(cls, modes, molecule): + """"""decide which format the normal modes are and convert to the mass-weighted once"""""" + ANG_TO_BOHR = 1./0.529177211 + # compute norms + norms = [cls.compute_norm_mode(mode, molecule) for mode in modes] + # define options + options = { + 'gaussian-type': lambda imode, iatom, ixyz, disp: (disp/(norms[imode] + / np.sqrt(molecule.masses[iatom] + / U_TO_AMU))), + 'molpro-type': lambda imode, iatom, ixyz, disp: (disp * np.sqrt( + molecule.masses[iatom] + / U_TO_AMU)), + 'columbus-type': lambda imode, iatom, ixyz, disp: (disp * np.sqrt( + (molecule.masses[iatom] + / U_TO_AMU) + / ANG_TO_BOHR)), + 'mass-weighted': lambda imode, iatom, ixyz, disp: disp, + } + # + possible_formats = {} + # + for typ, expression in options.items(): + current_modes = [cls.scale_mode(imode, modes, expression) + for imode in range(len(modes))] + if cls.is_normal_mode_format(current_modes, molecule.natoms): + possible_formats[typ] = current_modes + # + if len(possible_formats) < 1: + print(""possible_formats = "", possible_formats) + raise Exception('Could not specify format possible formats = ""%s""' + % "", "".join(possible_formats.keys())) + # + if len(possible_formats) > 1: + print(""possible_formats = "", "", "".join(possible_formats.keys())) + print(""select first one..."") + # + for _, mode in possible_formats.items(): + return mode + + @classmethod + def create_dimensionless_normal_modes(cls, modes, molecules, mass_weighted=False): + if mass_weighted is False: + # get mass weighted normal modes + modes = cls.create_mass_weighted_normal_modes(modes, molecules) + modes = [Mode(mode.freq, mode.displacements/np.sqrt(mode.freq)) for mode in modes] + return modes +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/__init__.py",".py","235","8","# load here all Samplers as Plugins +from .sampling import Sampling +from .sampler import Sampler +from .wigner import Wigner +from .nm_sampler import NMSampler +from .base_sampler import DynCondition +from .base_sampler import CrdCondition +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/base_sampler.py",".py","2382","81","from collections import namedtuple +from abc import abstractmethod + +from colt import Plugin + +CrdCondition = namedtuple(""CrdCondition"",['crd']) +DynCondition = namedtuple(""DynCondition"", ['crd', 'veloc', 'state']) + + +class SamplerFactory(Plugin): + """""" Factory for samplers, which provide only coordinates. It is also the underlying class for + DynSamplingFactory, which is an extension for samplers with velocities and initial states. + """""" + _plugins_storage = '_methods' + _is_plugin_factory = True + + condition = CrdCondition + _n_conditions = None + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""method"", {name: method.colt_user_input + for name, method in cls._methods.items()}) + + def get_number_of_conditions(self, n_max): + if self._n_conditions is None: + return n_max + if self._n_conditions > n_max: + return n_max + return self._n_conditions + + +class CrdSamplerBase(SamplerFactory): + """"""Basic sampler class"""""" + + extend_user_input: ""inherited"" + # + _register_plugin = False + _user_input = ""inherited"" + + @classmethod + @abstractmethod + def from_config(cls, config, start=0): + pass + +class DynSamplerFactory(CrdSamplerBase): + """"""Factory to store intial condition samplers"""""" + # setup questions + _colt_user_input = 'inherited' + extend_user_input: 'inherited' + # setup plugin + _plugins_storage = '_methods' + _is_plugin_specialisation = True + _is_plugin_factory = True + _register_plugin = False + # + condition = DynCondition + + @classmethod + def _extend_user_input(cls, questions): + """""" This class will not be inherited """""" + # Update _user_input from Sampling by adding an additional question + questions.add_questions_to_block("""""" + # State on which trajectories start + initial state = 0 :: int + """""") + questions.generate_cases(""method"", {name: method.colt_user_input + for name, method in cls._methods.items()}) + + +class DynSamplerBase(DynSamplerFactory): + """"""Base Class for Dynamics Conditions Sampler"""""" + + _register_plugin = False + _colt_user_input = 'inherited' + + @classmethod + @abstractmethod + def from_config(cls, config, start=0): + pass +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/sampling_db.py",".py","5572","174","from abc import abstractmethod +from collections import namedtuple +from copy import deepcopy +# +import numpy as np +#from pysurf.logger import get_logger +from ..utils.osutils import exists_and_isfile +from ..database import PySurfDB +from ..logger import Logger, get_logger +# +from ..system import Molecule +from ..spp import Model +from ..sampling.base_sampler import SamplerFactory +from .base_sampler import DynCondition, CrdCondition +from .normalmodes import Mode +# +from colt import Colt + + +class SamplingDB(PySurfDB): + + @classmethod + def from_db(cls, dbfilename): + """""" Using an existing sampling file to set up sampling + first information has to be read from database, then the database can be loaded. + This is to make sure that databases don't get corrupted! + """""" + + config = {'sampling_db': dbfilename} + info = PySurfDB.info_database(dbfilename) + config['n_conditions'] = info['length'] + #still a hard coded stuff as long as description of db not working + config['method'] = 'Wigner' + if 'atomids' in info['variables']: + config['model'] = False + else: + config['model'] = True + # + if 'veloc' in info['variables']: + dynsampling = True + else: + dynsampling = False + # + if info['dimensions']['frame'] == 1: + sp = True + else: + sp = False + db = cls.load_database(dbfilename, data=info['variables'], dimensions=info['dimensions'], model=config['model'], sp=sp) + return db + + @classmethod + def from_sampler(cls, config, sampler): + getinit = sampler.get_init() + + system = getinit['system'] + + if isinstance(system, Model): + model = True + else: + model = False + if sampler.condition.__name__ == ""DynCondition"": + dynsampling = True + else: + dynsampling = False + + modes = getinit.get('modes', None) + if modes is not None: + nmodes = len(modes) + + if model is False: + natoms = system.natoms + if modes is not None: + variables = ['model', 'crd_equi', 'masses', 'atomids', 'modes_equi', 'freqs_equi', 'crd', 'currstate'] + dimensions = {'natoms': natoms, 'nmodes': nmodes} + else: + variables = ['model', 'crd_equi', 'masses', 'atomids', 'crd', 'currstate'] + dimensions = {'natoms': natoms} + else: + if modes is not None: + variables = ['model', 'crd_equi', 'masses', 'modes_equi', 'freqs_equi', 'crd', 'currstate'] + dimensions = {'nmodes': nmodes} + else: + variables = ['model', 'crd_equi', 'masses', 'crd', 'currstate'] + dimensions = {} + if dynsampling: + variables += ['veloc'] + db = cls.generate_database(config['sampling_db'], data=variables, dimensions=dimensions, model=model) + db.add_reference_entry(system, modes, model) + return db + + @classmethod + def create_db(cls, dbfilename, variables, dimensions, system, modes, model=False, sp=False): + db = cls.generate_database(dbfilename, data=variables, dimensions=dimensions, model=model, sp=sp) + db.add_reference_entry(system, modes, model) + return db + + def append_condition(self, cond): + self.append('crd', cond.crd) + if self.dynsampling: + self.append('veloc', cond.veloc) + self.append('currstate', cond.state) + self.increase + + def write_condition(self, cond, idx): + self.set('crd', cond.crd, idx) + if self.dynsampling: + self.set('veloc', cond.veloc, idx) + self.set('currstate', cond.state, idx) + + def write_xyz(self, filename, number): + molecule = deepcopy(self.molecule) + molecule.crd = self.get('crd', number) + molecule.write_xyz(filename) + + def get_condition(self, idx): + if idx >= self.nconditions: + return None + crd = self.get('crd', idx) + if self.dynsampling: + veloc = self.get('veloc', idx) + state = np.int(self.get('currstate', idx)) + return self.condition(crd, veloc, state) + return self.condition(crd) + + def get_config(self): + config = {} + config['n_conditions'] = self.nconditions + config['method'] = 'Wigner' + config['model'] = self.model + return config + + @property + def dynsampling(self): + if 'veloc' in self.info['variables']: + return True + else: + return False + + @property + def condition(self): + if self.dynsampling: + return DynCondition + else: + return CrdCondition + + @property + def nconditions(self): + return len(self['crd']) + +# @classmethod +# def _get_method_from_db(cls, db): +# _method_number = db['method'] +# method = cls._get_method_from_number(_method_number) +# return method +# +# @staticmethod +# def _get_method_from_number(numbers): +# method = '' +# for num in numbers: +# if num != 0: +# method += chr(num) +# else: +# break +# return method +# +# @staticmethod +# def _get_number_from_method(method): +# #length of numpy arry has to be consistent with length in settings +# res = np.zeros(100, int) +# for index, letter in enumerate(method): +# res[index] = ord(letter) +# return res +# +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/n_grid_iter.py",".py","4179","153","from itertools import permutations +import numpy as np +from copy import deepcopy + +class NGridIterator(): + """""" Iterator that runs through an n-dimensional grid on spheres around the + origin, given vectors for the grid points. Thus it runs through an N- + dimensional grid staying as close as possible to the origin, without + visiting points twice. + """""" + + def __init__(self, dim): + """""" + Args: + dim, int + dim is the dimension of the grid + """""" + + self.dim = dim + # self.R2 is the current square radius of the sphere + self.R2 = 0 + # self.vectors contains all the vectors on the + # sphere with radius sqrt(R2) + self.vectors = get_vectors(self.dim, self.R2) + self.vectors_idx = 0 + + def __iter__(self): + return self + + def __next__(self): + if self.vectors_idx >= len(self.vectors): + self.vectors_idx = 0 + self.vectors = [] + while len(self.vectors) == 0: + self.R2 += 1 + self.vectors = get_vectors(self.dim, self.R2) + + + res = self.vectors[self.vectors_idx] + self.vectors_idx += 1 + + return res + + + + +def get_base_vector(dim, maximum, numbers=None): + """""" base vector is a recursive function that + calculates a possible combination out of a set, + given in numbers, for a specific maximum number. + For example: maximum = 5 and numbers = [4, 1, 1, 0, 0] + and dim = 2 + Then it will return the vector [4, 1], such that the sum + is maximum. It will only use numbers which are given in numbers + + """""" + if maximum == 0 and dim == 0: return [] + if dim == 0: return False + if numbers is None: numbers = get_set(dim, maximum) + vector = [] + + nb = max(numbers) + numbers.remove(nb) + if nb <= maximum: + vector += [nb] + res = get_base_vector(dim-1, maximum-nb, numbers) + if res is False: + return False + else: + vector += res + return vector + else: + res = get_base_vector(dim, maximum, numbers) + if res is False: + return False + else: + vector += res + return vector + +def get_set(dim, maximum): + """""" Provides all possible square numbers that could be needed + to calculate maximum as a sum of a dim-dimensional vector. + For example: dim = 2, maximum = 5, then the function will return + [4, 1, 1, 0, 0] + the repetitions of the numbers are important for get_base_vector + """""" + + i = 0 + numbers = [] + while i**2 <= maximum: + n = i**2 + counter = 0 + while n <= maximum and counter < dim: + numbers += [i**2] + n += i**2 + counter += 1 + i += 1 + return numbers + +def mysum(vec): + if len(vec) == 0: + return 0 + else: + return sum(vec) + +def get_vectors(dim, R2): + """"""function collecting all vectors for a specific radius + """""" + + #collecting base vectors + base_vecs = [] + numbers = get_set(dim, R2) + while len(numbers) >= dim: + vec = get_base_vector(dim, R2, deepcopy(numbers)) + if vec is not False: + base_vecs += [np.sqrt(vec)] + numbers.remove(max(numbers)) + #permuting base vectors + uvecs = [] + for vec in base_vecs: + for per_vec in permutations(vec): + uvecs += [per_vec] + uvecs = list(set(uvecs)) + + #adding all possible sign options + vecs = [] + for vec in uvecs: + for sign in sign_possibilities(dim): + vecs += [tuple([int(a*b) for a, b in zip(sign, vec)])] + vecs = list(set(vecs)) + return vecs + + +def sign_possibilities(dim): + """""" + giving all possible sign combinations for a specific dimension + e.g. for dim = 2: + [[1,1], [-1,1], [1,-1], [-1,-1]] + """""" + vecs = [] + for i in range(dim+1): + vec = np.ones(dim) + vec[:i] *= -1 + for svec in permutations(vec): + vecs += [svec] + return list(set(vecs)) + + +if __name__==""__main__"": + mygrid = NGridIterator(24) + for i in range(100): + print(next(mygrid)) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/sampling.py",".py","6097","196","import numpy as np + +from .sampling_db import SamplingDB +from .base_sampler import SamplerFactory + +from ..utils import exists_and_isfile +from ..logger import Logger, get_logger +from ..system import Molecule +# +from colt import Colt + + +class Sampling(Colt): + """""" Sampling is the header class for the sampling routines. It asks the main questions, selects + the sampler and reads and writes the conditions to the sampling database. + """""" + _user_input = """""" + # Maximium Number of Samples + n_conditions_max = 100 :: int + + method = :: str + + # Database containing all the initial conditions + sampling_db = sampling.db :: file + + """""" + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""method"", {name: method.colt_user_input + for name, method in SamplerFactory._methods.items()}) + + @classmethod + def from_config(cls, config, logger=None): + if exists_and_isfile(config['sampling_db']): + logger.info(f""Found existing database {config['sampling_db']}"") + db = SamplingDB.from_db(config['sampling_db']) + logger.info(f""There are already {db.nconditions} conditions in the database"") + sampler = None + else: + logger.info(f""Loading sampler {config['method'].value}"") + sampler = cls._get_sampler(config['method'], start=0) + logger.info(f""Creating new database {config['sampling_db']}"") + db = SamplingDB.from_sampler(config, sampler) + return cls(config, db, db.dynsampling, sampler=sampler, logger=logger) + + @classmethod + def from_inputfile(cls, inputfile): + logger = get_logger('sampling.log', 'sampling') + # Generate the config + if exists_and_isfile(inputfile): + config = cls.generate_input(inputfile, config=inputfile) + else: + config = cls.generate_input(inputfile) + logger.header('SAMPLING', config) + logger.info(f""Took information from inputfile {inputfile}"") + return cls.from_config(config, logger=logger) + + @classmethod + def create_db(cls, dbfilename, variables, dimensions, system, modes, model=False, sp=False, logger=None): + db = SamplingDB.create_db(dbfilename, variables, dimensions=dimensions, system=system, modes=modes, model=model, sp=sp) + config = db.get_config() + config['sampling_db'] = dbfilename + return cls(config, db, db.dynsampling, logger=logger) + + @classmethod + def from_db(cls, dbfilename, logger=None): + db = SamplingDB.from_db(dbfilename) + config = db.get_config() + config['sampling_db'] = dbfilename + return cls(config, db, db.dynsampling, logger=logger) + + def __init__(self, config, db, dynsampling, sampler=None, logger=None): + """""" Sampling always goes with a database, if not needed use Sampler class + """""" + self._db = db + if logger is None: + self.logger = get_logger('sampling.log', 'sampling') + self.logger.header('SAMPLING', config) + else: + self.logger = logger + + if sampler is None: + logger.info(f""Loading sampler {config['method'].value}"") + self.sampler = self._get_sampler(config['method'], start=self.nconditions) + else: + self.sampler = sampler + + n_conditions = self.sampler.get_number_of_conditions(config['n_conditions_max']) + + # check for conditions + if self.nconditions < n_conditions: + # setup sampler + self.logger.info(f""Adding {n_conditions-self.nconditions} additional entries to the database"") + self.add_conditions(n_conditions - self.nconditions) + + def add_conditions(self, nconditions, state=0): + # TODO + # Take the random seed and random counter from the database to + # assure the consistency with all + # the previous conditions + for _ in range(nconditions): + cond = self.sampler.get_condition() + if cond is None: + self.logger.error('Sampler has no more conditions') + self._db.append_condition(cond) + + def write_condition(self, condition, idx): + self._db.write_condition(condition, idx) + + def append_condition(self, condition, idx): + self._db.append_condition(condition, idx) + + def append(self, key, value): + self._db.append(key, value) + + def get(self, key, idx=None): + return self._db.get(key, idx) + + def set(self, key, value, idx=None): + self._db.set(key, value, idx) + + def __iter__(self): + self._start = 1 # skip equilibrium structure + return self + + def __next__(self): + cond = self.get_condition(self._start) + if cond is not None: + self._start += 1 + return cond + raise StopIteration + + def get_condition(self, idx): + return self._db.get_condition(idx) + + @staticmethod + def _get_sampler(config, start=0): + return SamplerFactory._methods[config.value].from_config(config, start) + + @property + def nmodes(self): + return self._db.nmodes + + @property + def dynsampling(self): + return self._db.dynsampling + + @property + def info(self): + return self._db.info + + @property + def molecule(self): + return self._db.molecule + + @property + def model_info(self): + return self._db._model_info + + @property + def system(self): + return self._db.system + + @property + def increase(self): + return self._db.increase + + @property + def natoms(self): + return self.molecule.natoms + + @property + def atomids(self): + return self.molecule.atomids + + @property + def method(self): + return self._db['method'] + + @property + def modes(self): + return self._db.modes + + @property + def model(self): + return self._db.model + + @property + def nconditions(self): + return len(self._db['crd']) + + @property + def masses(self): + return self._db.masses +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/wigner.py",".py","6518","214","import numpy as np +from numpy import random +# +from colt import Colt +# +from ..constants import U_TO_AMU, CM_TO_HARTREE +from ..molden import MoldenParser, parse_molden +from ..spp import ModelFactory +# +from ..system import Molecule +from ..system.atominfo import MASSES +from ..system.atominfo import ATOMNAME_TO_ID +from .normalmodes import NormalModes as nm +from .normalmodes import Mode +from .base_sampler import DynSamplerBase +# + + +class Molden(Colt): + _user_input = """""" + moldenfile = :: existing_file + """""" + + +class Wigner(DynSamplerBase): + + _user_input = """""" + # Input source for the normal modes and/or frequencies, which are used to generate the + # initial conditions. + from = :: str + """""" + + _from = {'molden' : Molden, + 'model' : ModelFactory, + } + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""from"", {name: val.colt_user_input + for name, val in cls._from.items()}) + + + def __init__(self, system, modes, check=True, is_massweighted=False): + """"""Initialize a new Wigner Sampling with a molecule class + and a normal Mode class"""""" + self.system = system + self.modes = modes + self.is_massweighted = is_massweighted + if check is True: + self._check_modes() + + @classmethod + def from_config(cls, config, start=None): + """""" """""" + #start keyword is not needed here, but has to be provided for DynSamplerBase + if config['from'] == 'molden': + return cls.from_molden(config['from']['moldenfile']) + if config['from'].value == 'model': + model = ModelFactory.plugin_from_config(config['from']['model']) + return cls.from_model(model) + raise Exception(""only (molden, frequencies) implemented"") + + @classmethod + def from_db(cls, database): + # CHECK: Is this intentional? + return cls(None, None, check=False) + + def get_init(self): + """"""Return all infos needed for the initial condition parser"""""" + return {'system': self.system, + 'modes': self.modes} + + def get_condition(self): + """"""Return a single created initial condition"""""" + _, conds = get_initial_condition(self.system, self.modes) + return conds + + def _check_modes(self): + img = [mode.freq for mode in self.modes if mode.freq < 0.0] + nimg_freq = len(img) + if nimg_freq == 0: + return + + def to_strg(number): + return ""%12.8f"" % number + + print(f""Found {nimg_freq} imaginary frequencies:"") + print(""["" + "", "".join(map(to_strg, img)) + ""]"") + + @classmethod + def from_molden(cls, filename, format=2): + if format == 1: + molden = MoldenParser(filename, ['Info', 'Freqs', 'FrCoords', 'FrNormCoords']) + else: + freqs, frcoords, frnorm = parse_molden(filename) + molden = {'FrCoords': frcoords, + 'Freqs': freqs, + 'FrNormCoords': frnorm,} + # get molecule info + atoms = [atom for atom, _, _, _ in molden['FrCoords']] + atomids = np.array([ATOMNAME_TO_ID[atom] for atom in atoms]) + crd = np.array([[x, y, z] for _, x, y, z in molden['FrCoords']]) + masses = np.array([MASSES[idx]*U_TO_AMU for idx in atomids]) + # create molecule + molecule = Molecule(atomids, crd, masses) + # + modes = [Mode(freq * CM_TO_HARTREE, np.array(molden['FrNormCoords'][imode])) + for imode, freq in enumerate(molden['Freqs'])] + # + modes = nm.create_mass_weighted_normal_modes(modes, molecule) + # + return cls(molecule, modes, True) + + # method to create initial conditions for model systems like the pyrazine model + @classmethod + def from_model(cls, model): + """"""Create Wigner class from a analytic model"""""" + return cls(model, model.modes, True) + + def to_mass_weighted(self): + """"""transform normalmodes to massweighted"""""" + if self.is_massweighted is True: + return + self.modes = nm.create_mass_weighted_normal_modes(self.modes, self.system) + self.is_massweighted = True + + +def get_random(*args): + """"""Get random number in range + + Args + ---- + + args: list(int), optional + if no args are given, return random number in bounds [0, 1) + if two args are given, return random number in bounds [args[0], args[1]) + else raise ValueError + + Returns + ------- + + random: float + random number within the defined bounds + + Raises + ------ + + ValueError, if number of arguments not in [0, 2] + """""" + if len(args) == 0: + return random.random() + if len(args) == 2: + return _get_random(*args) + raise ValueError(""Please give upper and lower bounds"") + + +def _get_random(lower, upper): + assert upper > lower + diff = upper - lower + return random.random() * diff + lower + + +def get_initial_condition(system, modes): + """"""Wigner sampling condition according to + + L. Sun, W. L. Hase J. Chem. Phys. 133, 044313 (2010). + + parameters taken from SHARC in accordance to github.com/sharc-md + especially the bounds [-5, +5] + """""" + epot = 0.0 + # + crd = np.copy(system.crd) + veloc = np.zeros_like(system.crd, dtype=np.double) + # + for mode in modes: + # Factor is sqrt(angular freq) + if mode.freq < 0.0: + factor = np.sqrt(-1.0*mode.freq) + else: + factor = np.sqrt(mode.freq) + # + while True: + # get random Q and P in the interval [-5, +5] + Q = get_random(-5, 5) + P = get_random(-5, 5) + # accept random numbers if np.exp(-(Q**2 + P**2) + if wigner_gs(Q, P) > get_random(): + break # coordinates accepted + + Q /= factor + P *= factor + # + epot += 0.5 * mode.freq**2 * Q**2 + # scaling for crd, veloc sampling + scale = np.copy(mode.displacements) + for i, mass in enumerate(system.masses): + scale[i] *= 1.0/np.sqrt(mass) + # + crd += Q * scale + veloc += P * scale + # + # TODO: remove translational/rotational dofs + # + return epot, DynSamplerBase.condition(crd, veloc, 0) + + +def wigner_gs(Q, P): + """"""For a one-dimensional harmonic oscillator: + Q: dimensionless coordinate + P: dimensionless momentum + """""" + return np.exp(-Q**2.0-P**2.0) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","pysurf/sampling/nm_sampler.py",".py","5618","179","import numpy as np + +from colt import Colt +from ..spp import ModelFactory +from ..molden import MoldenParser +from ..constants import U_TO_AMU, CM_TO_HARTREE + +from .base_sampler import CrdSamplerBase +from .normalmodes import NormalModes as nm +from ..system import Molecule +from ..system.atominfo import ATOMNAME_TO_ID, MASSES +from .normalmodes import Mode +from .base_sampler import CrdCondition +from .n_grid_iter import NGridIterator + +class Moldenfile(Colt): + _user_input = """""" + moldenfile = :: existing_file + """""" + +class NMSampler(CrdSamplerBase): + _user_input = """""" + # Where do the coorindates come from? If it is a moldenfile, modes are converted into dimensionless + # normal modes. If they come from a model, they are used as they are. + from = molden :: str :: [molden, model] + + stepsize = 0.3 :: float + + include_combinations = False :: bool + + # Decide whether sampling should be done along all normal modes + select_nmodes = all :: str :: [all, select] + + """""" + + _from = {'molden': Moldenfile, + 'model': ModelFactory, + } + + _select_nmodes = { + 'all': """", + 'select': ""mode_list = :: ilist"" + } + + _step = 0 + _mode = 0 + _sign = 1 + + @classmethod + def _extend_user_input(cls, questions): + questions.generate_cases(""from"", {name: method.colt_user_input + for name, method in cls._from.items()}) + questions.generate_cases(""select_nmodes"", {name: value + for name, value in cls._select_nmodes.items()}) + + + def __init__(self, config, system, modes, start=0): + self.system = system + self.modes = modes + self.config = config + if config['select_nmodes'] == 'all': + self.sel_modes = modes + else: + self.sel_modes = [] + for idx in config['select_nmodes']['mode_list']: + self.sel_modes += [modes[idx]] + self.nmodes_sel = len(self.sel_modes) + self.config = config + self.stepsize = config['stepsize'] + if config['from'].value == 'model': + self.model = True + else: + self.model = False + + self._check_modes() + if config['include_combinations']: + self.myiter = NGridIterator(len(self.sel_modes)) + + if start != 0: + for i in range(start): + self.get_condition() + + + def get_init(self): + """"""Return all infos needed for the initial condition parser"""""" + return {'system': self.system, + 'modes': self.modes} + + def get_condition(self): + if self.config['include_combinations']: + return self.get_condition_combined() + else: + return self.get_condition_pure() + + + def get_condition_combined(self): + vec = next(self.myiter) + crd = np.copy(self.system.crd) + + for fac, mode in zip(vec, self.sel_modes): + crd += np.array(fac*self.stepsize) * np.array(mode.displacements) + print(crd) + return CrdCondition(crd) + + + def get_condition_pure(self): + """"""Return a single created initial condition"""""" + crd = np.copy(self.system.crd) + # for reference point: + if self._step == 0: + self._step += 1 + return CrdCondition(crd) + + crd += self._sign * self._step * self.stepsize * np.array(self.sel_modes[self._mode].displacements) + + # to sample in both directions + if self._sign == 1: + self._sign = -1 + return CrdCondition(crd) + + if self._mode == self.nmodes_sel - 1: + self._sign = 1 + self._mode = 0 + self._step += 1 + else: + self._sign = 1 + self._mode += 1 + cond = CrdCondition(crd) + return cond + + @classmethod + def from_config(cls, config, start=0): + """""" """""" + if config['from'] == 'molden': + return cls.from_molden(config, start) + elif config['from'].value == 'model': + return cls.from_model(config, start) + + @classmethod + def from_molden(cls, config, start=0): + filename = config['from']['moldenfile'] + molden = MoldenParser(filename, ['Info', 'Freqs', 'FrCoords', 'FrNormCoords']) + # get molecule info + atoms = [atom for atom, _, _, _ in molden['FrCoords']] + atomids = np.array([ATOMNAME_TO_ID[atom] for atom in atoms]) + crd = np.array([[x, y, z] for _, x, y, z in molden['FrCoords']]) + masses = np.array([MASSES[idx]*U_TO_AMU for idx in atomids]) + # create molecule + molecule = Molecule(atomids, crd, masses) + # + print('nmsampler, molecule', molecule) + modes = [Mode(freq * CM_TO_HARTREE, np.array(molden['FrNormCoords'][imode])) + for imode, freq in enumerate(molden['Freqs'])] + # + modes = nm.create_mass_weighted_normal_modes(modes, molecule) + # + return cls(config, molecule, modes, start=start) + + @classmethod + def from_model(cls, config, start=0): + model = ModelFactory.plugin_from_config(config['from']['model']) + return cls(config, system=model, modes=model.modes, start=start) + + def _check_modes(self): + img = [mode.freq for mode in self.modes if mode.freq < 0.0] + nimg_freq = len(img) + if nimg_freq == 0: + return + + def to_strg(number): + return ""%12.8f"" % number + + print(f""Found {nimg_freq} imaginary frequencies:"") + print(""["" + "", "".join(map(to_strg, img)) + ""]"") + + + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","docs/conf.py",".py","4890","166","#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# pysurf documentation build configuration file, created by +# sphinx-quickstart on Fri Jun 9 13:47:02 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another +# directory, add these directories to sys.path here. If the directory is +# relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('..')) + +#import pysurf + +# -- General configuration --------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.graphviz', + 'sphinx.ext.inheritance_diagram'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'pysurf' +copyright = u""2019, Maximilian Menger"" +author = u""Maximilian Menger"" + +__version__ = '0.1' +# The version info for the project you're documenting, acts as replacement +# for |version| and |release|, also used in various other places throughout +# the built documents. +# +# The short X.Y version. +version = __version__ +# The full version, including alpha/beta/rc tags. +release = __version__ + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set ""language"" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a +# theme further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named ""default.css"" will overwrite the builtin ""default.css"". +html_static_path = ['_static'] + + +# -- Options for HTMLHelp output --------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = 'pysurfdoc' + + +# -- Options for LaTeX output ------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'pysurf.tex', + u'pysurf Documentation', + u'Maximilian Menger', 'manual'), +] + + +# -- Options for manual page output ------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'pysurf', + u'pysurf Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ---------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'pysurf', + u'pysurf Documentation', + author, + 'pysurf', + 'One line description of project.', + 'Miscellaneous'), +] + + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/__init__.py",".py","61","4","# -*- coding: utf-8 -*- + +""""""Unit test package for pysurf."""""" +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/test_flake.py",".py","21","2","print( ""hallo"" ) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/test_pysurf.py",".py","83","7","#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""""""Tests for `pysurf` package."""""" + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/lz_prop/test_prop.py",".py","1746","67","import numpy as np + +from pysurf.dynamics import LandauZener +from pysurf.spp.model import HarmonicOscillator +from pysurf.sampling import DynCondition + + + +class FakeDB(): + def __init__(self): + self.crd = [] + self.veloc = [] + + def add_step(self, time, data, v, iactive, ekin, epot, etot): + self.crd.append(list(data['crd'])) + self.veloc.append(list(v)) + + @property + def model(self): + return True + +class FakeSPP: + def __init__(self): + self.ho = HarmonicOscillator() + self.model = True + + def request(self, crd, properties, states): + request = {'crd': crd} + res = self.ho.get(request) + return res + +class LZ_Test(LandauZener): + + + def __init__(self): + self.spp = FakeSPP() + self.restart = False + self.masses = np.array([1.0]) + self.nstates = 1 + + self.ekin_save = [] + self.epot_save = [] + self.etot_save = [] + + self.init = DynCondition(crd=np.array([1.0]), veloc=np.array([0.0]), state=0) + self.db = FakeDB() + self._run(100, 0.1) + + def get_results(self): + return np.array(self.db.crd).flatten(), np.array(self.db.veloc).flatten(), np.array(self.etot_save).flatten() + + def output_step(self, istep, time, iactive, ekin, epot, etot, diff): + self.ekin_save.append(list([ekin])) + self.epot_save.append(list([epot])) + self.etot_save.append(list([etot])) + +def test_lz_prop(): + crd, veloc, etot = LZ_Test().get_results() + time = np.linspace(0, 10, 101) + sin = -np.sin(time) + cos = np.cos(time) + + assert(np.max(np.abs(crd - cos)) < 0.01) + assert(np.max(np.abs(veloc - sin)) < 0.01) + assert(np.max(np.abs(etot-0.5))) + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/test_database.py",".py","1289","59","from pytest import fixture +import os +import numpy as np + +from pysurf.database.database import Database +from pysurf.database.dbtools import DatabaseRepresentation + + +@fixture +def filepath(): + return 'database.nc' + +@fixture +def default_settings(): + return """""" + [dims] + frames = unlimited + natoms = 10 + three = 3 + one = 1 + [variables] + dipole = double :: (frames, three) + """""" + + + +@fixture +def empty_database(filepath, default_settings): + + if os.path.exists(filepath): + if os.path.isfile(filepath): + os.remove(filepath) + else: + raise Exception(f""file '{filepath}' exists is not a file"") + + return Database(filepath, default_settings) + + +@fixture +def empty_database_closed(empty_database): + empty_database.close() + return empty_database + + +def test_check(empty_database, default_settings): + rep = DatabaseRepresentation.from_db(empty_database._db) + rep2 = DatabaseRepresentation(default_settings) + assert(rep == rep2) + +def test_append(empty_database_closed, filepath, default_settings): + nc = Database(filepath, default_settings) + nc.close() + nc = Database(filepath, default_settings) + nc.append('dipole', np.array([1, 2, 3])) + assert(nc.get_dimension_size('frames') == 1) + + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/test_dbtools.py",".py","1027","43","from pytest import fixture +import numpy as np + +from pysurf.database.dbtools import DatabaseRepresentation + + +@fixture +def db_representation_basic(): + return """""" + [dimensions] + frames = unlimited + natoms = 10 + """""" + +@fixture +def db_representation_basic_changed(): + return """""" + [dimensions] + frames = unlimited + natoms = 12 + """""" + + +def test_database_same_basic_representation(db_representation_basic): + rep1 = DatabaseRepresentation(db_representation_basic) + rep2 = DatabaseRepresentation(db_representation_basic) + assert(rep1 == rep2) + + +def test_database_different_basic_representation(db_representation_basic, db_representation_basic_changed): + rep1 = DatabaseRepresentation(db_representation_basic) + rep2 = DatabaseRepresentation(db_representation_basic_changed) + assert(rep1 != rep2) + +@fixture +def db_representation_basic_changed(): + return { + 'dimensions': { + 'frames': 'unlimited', + 'natoms': 12, + } + } +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/model/test_abinit_model.py",".py","1247","39","from pytest import fixture +import os +import numpy as np + +from pysurf.spp.spp import SurfacePointProvider + +@fixture +def input_filename(): + path = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(path,'test_abinit_model.inp') + +def test_abinit_calc(input_filename): + if os.path.isfile('db.dat'): + os.remove('db.dat') + # set up SPP + spp = SurfacePointProvider(input_filename) + coord = spp.refgeo['coord'] + + # Check available properties + res = spp.get({}) + assert(('energy' in res.keys()) and ('gradient' in res.keys())) + + # fill DB with three points + spp.get({'coord': coord, 'energy': None, 'gradient': None}) + coord[0, 0] += 1 + spp.get({'coord': coord, 'energy': None, 'gradient': None}) + coord[0, 1] += 1 + spp.get({'coord': coord, 'energy': None, 'gradient': None}) + coord[0, 2] += 1 + res = spp.get({'coord': coord, 'energy': None, 'gradient': None}) + + # check interpolation + coord[0, 2] -= 0.1 + res = spp.get({'coord': coord}) + assert(abs(res['energy'][0] - 2.9) < 0.1) + assert(abs(res['energy'][1] - 0.1) < 0.1) + refgrad = np.array([[[2, 2, 1.8]], [[ 0. , 0. , -0.2]]], dtype=float) + assert(np.amax(np.absolute(res['gradient'] - refgrad)) < 0.1) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/model/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/abinitio/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/abinitio/test_abinit.py",".py","777","24","from pytest import fixture +import os +import numpy as np + +from pysurf.spp.spp import SurfacePointProvider + +@fixture +def input_filename(): + path = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(path,'test_abinit.inp') + +def test_abinit_calc(input_filename): + spp = SurfacePointProvider(input_filename) + res = spp.get({}) + assert(('energy' in res.keys()) and ('gradient' in res.keys())) + + res = spp.get({'coord': spp.refgeo['coord'], + 'energy': None, 'gradient': None}) + + assert(res['energy'].all() == np.array([-8.00014277e-10, + -1.52319380e-02, + -1.40437478e-02, + 1.29286264e-02]).all()) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/database/abinitio/test/test.py",".py","484","23","from scipy.interpolate import LinearNDInterpolator +import numpy as np + +x = np.linspace(0,1,100) + +points = np.empty((10000,2), dtype=float) +z = np.empty((10000,3), dtype=float) + +for i in range(100): + for j in range(100): + z[(j*i) + j,0] = (i/100)**2+(j/100.)**2 + z[(j*i) + j,1] = 1 + z[(j*i) + j,2] = 2 + points[(j*i) + j,:] = [i/100.,j/100.] + +print(points) +print(z) +interpolator = LinearNDInterpolator(points, z) + +print(interpolator((0.24,0.222))) + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/interpolation/test2_rbf.py",".py","1819","54","import os +import numpy as np +import matplotlib.pyplot as plt + +from pysurf.utils import exists_and_isfile +from pysurf.spp import RbfInterpolator +from pysurf.spp.model import PyrazineSchneider, PyrazineSala, HarmonicOscillator +from pysurf.spp import Request +from pysurf.database import PySurfDB +from pysurf.logger import Logger, get_logger + +def fill_db(filename, npoints): + if exists_and_isfile(filename) is True: + os.remove(filename) + + + ho = HarmonicOscillator() + model = PyrazineSala({'n_states': 3}) + nmodes = len(model.crd) + nstates = 3 + db = PySurfDB.generate_database(filename, data=['crd', 'energy'], dimensions={'nmodes':nmodes, 'nstates': nstates}, model=True) + x = (np.random.random((npoints, nmodes))-0.5) * 20 + y = [] + for r in x: + db.append('crd', r) + y += [model.get(Request(r, ['energy'], [i for i in range(nstates)]))['energy']] + db.append('energy', model.get(Request(r, ['energy'], [i for i in range(nstates)]))['energy']) + db.increase + return db + +#db1 = fill_db('db1.dat', 5000) +db1 = PySurfDB.load_database('db.dat', read_only=True) +#db2 = fill_db('db2.dat', 1000) +db2 = PySurfDB.load_database('prop.db', read_only=True) + +nstates=4 +nmodes = 9 +logger = get_logger('test.log', 'test') +config = {'energy_threshold': 0.02, 'trust_radius_ci': 0.5, 'trust_radius_general': 1.0, 'inverse_distance': False} +rbf = RbfInterpolator(config, db1, ['energy'], nstates, nmodes, logger=logger) + +counter = 0 +diff_sum = 0 +diff = [] +for crd, energy in zip(db2['crd'], db2['energy']): + counter += 1 + res, trust = rbf.get(Request(crd, ['energy'], [0, 1, 2])) + diff += [res['energy'] - energy] + diff_sum += (res['energy'] - energy)**2 +print('RMS [eV]= ', np.sqrt(diff_sum/counter)*27.2114) +print('Max diff [eV]=', np.amax(diff, axis=0)*27.2114) + + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/spp/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/spp/model/test_model.py",".py","718","23","from pytest import fixture +import os +import numpy as np + +from pysurf.spp.spp import SurfacePointProvider + +@fixture +def input_filename(): + path = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(path,'test.inp') + +def test_model(input_filename): + spp = SurfacePointProvider(input_filename) + res = spp.get({}) + assert(('energy' in res.keys()) and ('gradient' in res.keys()) + and ('mass' in res.keys())) + res = spp.get({'coord': np.array([0.0,0.0,0.0]), + 'energy': None, 'gradient': None}) + assert(res['energy'].all() == np.array([0., + 0.14479228, + 0.17786665]).all()) + +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/spp/model/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/spp/abinitio/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/spp/abinitio/test_abinit.py",".py","813","25","from pytest import fixture +import os +import numpy as np + +from pysurf.spp.spp import SurfacePointProvider + +@fixture +def input_filename(): + path = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(path,'test_abinit.inp') + +def test_abinit_calc(input_filename): + spp = SurfacePointProvider(input_filename) + + #check properties: + res = spp.get({}) + assert( ('energy' in res.keys()) and ('gradient' in res.keys())) + res = spp.get({'coord': spp.refgeo['coord'], + 'energy': None, + 'gradient': None}) + assert(np.allclose(res['energy'], np.array([-8.00014277e-10, + -1.52319380e-02, + -1.40437478e-02, + 1.29286264e-02]))) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/spp/abinitio/qchem/test_adc.py",".py","690","23","from pytest import fixture +import os +import numpy as np + +from pysurf.spp.spp import SurfacePointProvider + +@fixture +def input_filename(): + path = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(path,'test_adc.inp') + +def test_abinit_calc(input_filename): + spp = SurfacePointProvider(input_filename) + + #check properties: + res = spp.get({}) + assert( ('energy' in res.keys()) and ('gradient' in res.keys())) + res = spp.get({'coord': spp.refgeo['coord'], + 'energy': None, + 'gradient': None}) + #print(res) + assert np.allclose(res['energy'], np.array([9.99989425e-10, 1.59115397e-01, 1.81781271e-01, 1.91643398e-01])) +","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/spp/abinitio/qchem/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","MFSJMenger/pysurf","tests/initconds/test_initconds.py",".py","1786","45","from pytest import fixture +import os +import numpy as np + + +from pysurf.sampling.initialconditions import InitialConditionsFactory +from pysurf.utils.osutils import exists_and_isfile + + +pyrazine_crd = np.array([[ 2.13131002e+00, 1.31728882e+00, 9.30480000e-04], + [6.90960000e-04, 2.66329754e+00, 2.31798000e-03], + [-2.13078722e+00, 1.31820446e+00, 1.22076000e-03], + [-2.13142558e+00, -1.31717271e+00, -8.40390000e-04], + [-3.90820150e+00, 2.37650649e+00, 2.09824000e-03], + [-3.90935032e+00, -2.37461841e+00, -1.87133000e-03], + [-6.04090000e-04, -2.66329813e+00, -2.43821000e-03], + [ 2.13066752e+00, -1.31832153e+00, -1.20462000e-03], + [ 3.90824960e+00, -2.37637730e+00, -2.09090000e-03], + [ 3.90941282e+00, 2.37447189e+00, 1.93468000e-03]]) + +@fixture +def filepath_molden(): + return 'test_molden.inp' + +@fixture +def filepath_freq(): + return 'test_freq.inp' + +def delete_database(filename): + if exists_and_isfile(filename): + os.remove(filename) + +def test_moldeninput(filepath_molden): + delete_database('initconds.db') + initconds = InitialConditionsFactory.from_inputfile(filepath_molden) + assert initconds.get_condition(50).crd.shape == (10,3) + assert initconds.get_condition(51).veloc.shape == (10,3) + assert np.array_equal(initconds.equilibrium.crd, pyrazine_crd) + +def test_freqinput(filepath_freq): + delete_database('initconds.db') + initconds = InitialConditionsFactory.from_inputfile(filepath_freq) + assert np.array_equal(initconds.get_condition(0).crd, [0., 0., 0.]) + assert initconds.get_condition(10).veloc.size == 3 +","Python" +"Quantum Chemistry","manassharma07/PyFock","setup.py",".py","2541","59","# To publish on PyPi, run the following +# python setup.py sdist +# twine upload dist/* +import os +from setuptools import setup, find_packages + + +# Utility function to read the README file. +# Used for the long_description. It's nice, because now 1) we have a top level +# README file and 2) it's easier to type in the README file than to put a raw +# string in below ... +def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() + +# Read the requirements +# with open('requirements.txt') as f: +# requirements = f.read().splitlines() +here = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(here, ""requirements.txt"")) as f: + requirements = f.read().splitlines() + +setup( + name = ""pyfock"", + version = ""0.0.9"", # DONT FORGET TO CHANGE THE VERSION IN __INIT__.py + author = ""Manas Sharma"", + author_email = ""feedback@bragitoff.com"", + description = (""A simplistic and efficient pure-python quantum chemistry library from Phys Whiz.""), + license = ""MIT"", + keywords = [""dft"", ""pure python"", ""numba dft"", ""density functional theory"", ""manas sharma"", ""bragitoff"",""quantum chemistry"", ""pyfock"", ""molecular integrals""], + url = ""https://github.com/manassharma07/pyfock"", + download_url = '', + packages=find_packages(),#['pyfock'], + include_package_data=True, + long_description=read('README.md'), + long_description_content_type='text/markdown', + install_requires=requirements, + classifiers=[ + ""Development Status :: 5 - Production/Stable"", + ""Topic :: Scientific/Engineering :: Chemistry"", + ""Topic :: Scientific/Engineering :: Physics"", + ""Intended Audience :: Science/Research"", + ""License :: OSI Approved :: MIT License"", + ""Programming Language :: Python :: 3 :: Only"", + 'Programming Language :: Python :: 3.0', #Specify which pyhton versions that you want to support + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', #Specify which pyhton versions that you want to support + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: Unix', + 'Operating System :: POSIX :: Linux', + 'Operating System :: MacOS :: MacOS X', + ], +) +","Python" +"Quantum Chemistry","manassharma07/PyFock","logo_pyfock.py",".py","5177","129","#!/usr/bin/env python3 + +def print_pyfock_logo(): + """"""Print PyFock logo with gradient colors using ANSI escape codes."""""" + + # ANSI color codes for gradient (blue to purple to pink) + colors = [ + '\033[38;5;39m', # Bright blue + '\033[38;5;45m', # Cyan blue + '\033[38;5;51m', # Light cyan + '\033[38;5;87m', # Light blue + '\033[38;5;123m', # Light purple + '\033[38;5;159m', # Very light blue + '\033[38;5;195m', # Light cyan-white + '\033[38;5;225m', # Light pink + '\033[38;5;219m', # Pink + '\033[38;5;213m', # Magenta pink + ] + + reset = '\033[0m' # Reset color + + # ASCII art for PyFock + + logo_lines = [ + ""██████ ██ ██ ███████ ██████ ██████ ██ ██"", + ""██░░░██ ░██ ██░ ██░░░░░ ██░░░░██ ██░░░░░ ██ ██░ "", + ""██████ ░████░ █████ ██ ██ ██ █████░ "", + ""██░░░░ ░██░ ██░░░ ██ ██ ██ ██░░██ "", + ""██ ██ ██ ░██████░ ░██████ ██ ░██"", + ""░░ ░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░"" + ] + + # Alternative block-style logo + block_logo = [ + ""████████ ██ ██ ███████ ████████ ████████ ██ ██"", + ""██ ██ ██ ██ ██ ██ ██ ██ ██ ██ "", + ""████████ ████ ██████ ██ ██ ██ █████ "", + ""██ ██ ██ ██ ██ ██ ██ ██ "", + ""██ ██ ██ ████████ ████████ ██ ██"" + ] + + print(""\n"" + ""=""*60) + print(""PyFock ASCII Logo with Gradient Colors"") + print(""=""*60) + + # Print the logo with gradient colors + for line in logo_lines: + colored_line = """" + chars_per_color = len(line) // len(colors) + + for i, char in enumerate(line): + if char == ' ': + colored_line += char + else: + color_index = min(i // max(1, chars_per_color), len(colors) - 1) + colored_line += colors[color_index] + char + reset + + print(colored_line) + + print(""\n"" + ""=""*60) + + # Alternative version with different styling + print(""\nAlternative Style:"") + print(""-"" * 50) + + alt_logo = [ + ""▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄ ▄"", + ""█ █ █ █ █ █ █ █"", + ""█ ▄ █▄ ▄█ █ ▄▄▄█ ▄ █ █▄ ▄█"", + ""█ █ █ █ █ █ █▄▄▄█ █ █ █ ▄▄█ █ "", + ""█ █▄█ █ █ █ ▄▄▄█ █▄█ █ █ █ █ "", + ""█ █ █ █ █ █ █ █▄▄█ █"", + ""█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█"" + ] + + for line in alt_logo: + colored_line = """" + chars_per_color = len(line) // len(colors) + + for i, char in enumerate(line): + if char == ' ': + colored_line += char + else: + color_index = min(i // max(1, chars_per_color), len(colors) - 1) + colored_line += colors[color_index] + char + reset + + print(colored_line) + +def print_simple_pyfock(): + """"""Simple version using basic characters."""""" + colors = [ + '\033[94m', # Blue + '\033[96m', # Cyan + '\033[95m', # Magenta + '\033[91m', # Light red + '\033[93m', # Yellow + '\033[92m', # Green + ] + reset = '\033[0m' + + simple_logo = [ + ""####### # # ###### ####### ####### # #"", + ""# # # # # # # # # # "", + ""####### ## ##### # # # #### "", + ""# ## # # # # # # "", + ""# ## # ####### ####### # #"" + ] + + print(""\nSimple Style:"") + print(""-"" * 45) + + for line in simple_logo: + colored_line = """" + char_count = 0 + + for char in line: + if char != ' ': + color_index = (char_count // 8) % len(colors) + colored_line += colors[color_index] + char + reset + char_count += 1 + else: + colored_line += char + + print(colored_line) + +if __name__ == ""__main__"": + print_pyfock_logo() + print_simple_pyfock() + print(""\nNote: Colors may vary depending on your terminal's color support."")","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex19_XC_funcs_libxc_pyfock.py",".py","925","39","import pylibxc +from pyfock import XC +import numpy as np + + +# TESTING +funcid = 1 +print('Functional ID in LibXC: ') +print(funcid) + +rho = [1,2,3] +print('Density at grid points: ') +print(rho) + +#LibXC stuff +# Create a LibXC object +func = pylibxc.LibXCFunctional(funcid, ""unpolarized"") +print('Family: ', func.get_family()) +print(func.describe()) +# Input dictionary for libxc +inp = {} +# Input dictionary needs density values at grid points +inp['rho'] = rho +# Calculate the necessary quantities using LibXC +ret = func.compute(inp) +print('Functional values (energy density) at grid points:') +print(ret['zk']) +print('Functional potential at grid points:') +print(ret['vrho']) + + +# PyFock stuff +ret = XC.func_compute(funcid, rho, use_gpu=False) +print('Functional values (energy density) at grid points using PyFock implementation:') +print(ret[0]) +print('Functional potential at grid points using PyFock implementation:') +print(ret[1]) + +","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex5_Integrals_kinetic.py",".py","2844","70","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# KINETIC POTENTIAL MATRIX + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'h2o.xyz' +xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='sto-3g')}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +#Now we can calculate integrals. +# This example shows how to calculate the kinetic matrix using the basis set object created. +# One can specify exactly which elements of the kinetic matrix they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete kinetic potential matrix +print('\n\n\n') +print('Integrals') +print('Kinetic energy matrix\n') +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +Vkin = Integrals.kin_mat_symm(basis) +print(Vkin) +print(Vkin.shape) + +#Instead of calculating the complete KE matrix you can also just calculate a specific element or a continuous block of the kinetic matrix +#This is done by specifying an additional argument that contains the start and indices of the block of the kinetic matrix +#that you want to calculate. +print('\n\n\n') +print('Integrals') +start_row = 1 +end_row = 7 +start_col = 1 +end_col = 7 +print('\nSubset of kinetic energy matrix Vkin[start_row:end_row, start_col:end_col]\n') +print([start_row, end_row, start_col, end_col]) +Vkin_subset = Integrals.kin_mat_symm(basis, slice=[start_row, end_row, start_col, end_col]) +print(Vkin_subset) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(Vkin[start_row:end_row, start_col:end_col] - Vkin_subset).max()') +print(abs(Vkin_subset - Vkin[start_row:end_row, start_col:end_col]).max()) + +#Let's try for a larger basis set like def2-tzvp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-tzvp')}) +print('\n\n\n') +print('Integrals') +print('\nKinetic energy matrix in def2-TZVP basis\n') +print(Integrals.kin_mat_symm(basisBig)) +","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex12_Integrals_2c2e_rys_quadrature.py",".py","4162","108","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# 2c2e Integral via Rys Quadrature (Faster than the conventional implementation) +# This is basically the Coulomb metric used for density fitting. + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +basisName = '6-31G' +# basisName = 'def2-SVP' + +auxbasisName = '6-31G' +# auxbasisName = 'def2-universal-jfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +#Now we can calculate integrals. +# This example shows how to calculate the 4c2e ERI array using the basis set object created. +# One can specify exactly which elements of the ERI array they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete ERI array +print('\n\n\n') +print('Integrals') +print('2c2e array\n') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI = Integrals.rys_2c2e_symm(basis) +print(ERI) + +#Instead of calculating the complete ERI array you can also just calculate a specific element or a continuous block of the ERI array +#This is done by specifying an additional argument that contains the start and indices of the block of the ERI array +#that you want to calculate. +print('\n\n\n') +print('Integrals') +indx_startA = 1 +indx_endA = 4 +indx_startB = 1 +indx_endB = 4 +print('\nSubset of 2c2e array 2c2e[indx_startA:indx_endA, indx_startB:indx_endB]\n') +print('Slice',[indx_startA, indx_endA, indx_startB, indx_endB]) +ERI_subset = Integrals.rys_2c2e_symm(basis, slice=[indx_startA, indx_endA, indx_startB, indx_endB]) +print(ERI_subset[:, :]) +print('\nSlice from the original array\n') +# print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, 0, 0]) +print(ERI[indx_startA:indx_endA, indx_startB:indx_endB]) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(2c2e[indx_startA:indx_endA, indx_startB:indx_endB] - 2c2e_subset).max()') +print(abs(ERI_subset - ERI[indx_startA:indx_endA, indx_startB:indx_endB]).max()) + +#Let's try for a larger basis set like def2-svp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) +print('\n\n\n') +print('Integrals') +print('\n2c2e ERI array in def2-SVP basis\n') +print('NAO: ', basisBig.bfs_nao) +print(Integrals.rys_2c2e_symm(basisBig)) + + +#Comparison with PySCF +from pyscf import gto, dft, df +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = 'h2o.xyz' +molPySCF.basis = basisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + +# auxmol = df.addons.make_auxmol(molPySCF, auxbasis='weigend') +auxmol = df.addons.make_auxmol(molPySCF, auxbasis='6-31G') + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +ERI_pyscf = df.incore.aux_e2(molPySCF, auxmol, intor='int2c2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf) +print('Array dimensions: ', ERI_pyscf.shape) +print(abs(ERI_pyscf - ERI).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +print('Duration for ERI using PySCF: ',duration)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex3_Graphics_visualize_mol.py",".py","196","8","from pyfock import Graphics as gfx +# from pyfock import Graphics_old as gfx_old +from pyfock import Mol + +# mol = Mol(coordfile='Graphene_C20.xyz') +mol = Mol(coordfile='h2o.xyz') + +gfx.visualize(mol)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex18_XC_funcs_libxc.py",".py","645","29","import pylibxc + +import numpy as np + + +# TESTING +funcid = 1 +print('Functional ID in LibXC: ') +print(funcid) + +rho = [1,2,3] +print('Density at grid points: ') +print(rho) + +#LibXC stuff +# Create a LibXC object +func = pylibxc.LibXCFunctional(funcid, ""unpolarized"") +print('Family: ', func.get_family()) +print(func.describe()) +# Input dictionary for libxc +inp = {} +# Input dictionary needs density values at grid points +inp['rho'] = rho +# Calculate the necessary quantities using LibXC +ret = func.compute(inp) +print('Functional values (energy density) at grid points:') +print(ret['zk']) +print('Functional potential at grid points:') +print(ret['vrho'])","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex11_Integrals_2c2e_conventional.py",".py","4165","108","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# 2c2e Integral via Rys Quadrature (Faster than the conventional implementation) +# This is basically the Coulomb metric used for density fitting. + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +basisName = '6-31G' +# basisName = 'def2-SVP' + +auxbasisName = '6-31G' +# auxbasisName = 'def2-universal-jfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +#Now we can calculate integrals. +# This example shows how to calculate the 4c2e ERI array using the basis set object created. +# One can specify exactly which elements of the ERI array they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete ERI array +print('\n\n\n') +print('Integrals') +print('2c2e array\n') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI = Integrals.conv_2c2e_symm(basis) +print(ERI) + +#Instead of calculating the complete ERI array you can also just calculate a specific element or a continuous block of the ERI array +#This is done by specifying an additional argument that contains the start and indices of the block of the ERI array +#that you want to calculate. +print('\n\n\n') +print('Integrals') +indx_startA = 1 +indx_endA = 4 +indx_startB = 1 +indx_endB = 4 +print('\nSubset of 2c2e array 2c2e[indx_startA:indx_endA, indx_startB:indx_endB]\n') +print('Slice',[indx_startA, indx_endA, indx_startB, indx_endB]) +ERI_subset = Integrals.conv_2c2e_symm(basis, slice=[indx_startA, indx_endA, indx_startB, indx_endB]) +print(ERI_subset[:, :]) +print('\nSlice from the original array\n') +# print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, 0, 0]) +print(ERI[indx_startA:indx_endA, indx_startB:indx_endB]) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(2c2e[indx_startA:indx_endA, indx_startB:indx_endB] - 2c2e_subset).max()') +print(abs(ERI_subset - ERI[indx_startA:indx_endA, indx_startB:indx_endB]).max()) + +#Let's try for a larger basis set like def2-svp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) +print('\n\n\n') +print('Integrals') +print('\n2c2e ERI array in def2-SVP basis\n') +print('NAO: ', basisBig.bfs_nao) +print(Integrals.conv_2c2e_symm(basisBig)) + + +#Comparison with PySCF +from pyscf import gto, dft, df +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = 'h2o.xyz' +molPySCF.basis = basisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + +# auxmol = df.addons.make_auxmol(molPySCF, auxbasis='weigend') +auxmol = df.addons.make_auxmol(molPySCF, auxbasis='6-31G') + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +ERI_pyscf = df.incore.aux_e2(molPySCF, auxmol, intor='int2c2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf) +print('Array dimensions: ', ERI_pyscf.shape) +print(abs(ERI_pyscf - ERI).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +print('Duration for ERI using PySCF: ',duration)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex21_ao_values_on_grids.py",".py","764","31","from pyfock import Basis +from pyfock import Mol +from pyfock import Grids +from pyfock import Integrals +from pyfock import DFT +import numpy as np +from opt_einsum import contract + +ncores = 2 +import numba +numba.set_num_threads(ncores) + + +# Define the molecule using an XYZ file +mol = Mol(coordfile = 'h2o.xyz') + +# Generate grids for XC term +gridsLevel = 3 +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-QZVP')}) +grids = Grids(mol, basis=basis, level = gridsLevel, ncores=ncores) + +print('\n\nWeights:') +print(grids.weights) +print('\n\nCoords:') +print(grids.coords) +print('\nNo. of generated grid points: ', grids.coords.shape[0]) + +ao_values = Integrals.bf_val_helpers.eval_bfs(basis, grids.coords, parallel=True) + +print('\n\nAO Values:') +print(ao_values)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex10_Integrals_3c2e_rys_quadrature.py",".py","4458","112","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# 3c2e ERI via Rys Quadrature (Faster than the conventional implementation) + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +basisName = '6-31G' +# basisName = 'def2-SVP' + +auxbasisName = '6-31G' +# auxbasisName = 'def2-universal-jfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +# We also need an auxiliary basis for density fitting +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasisName)}) + +#Now we can calculate integrals. +# This example shows how to calculate the 4c2e ERI array using the basis set object created. +# One can specify exactly which elements of the ERI array they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete ERI array +print('\n\n\n') +print('Integrals') +print('3c2e ERI array\n') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI = Integrals.rys_3c2e_symm(basis, auxbasis) +print(ERI[0:7,0:7,0]) + +#Instead of calculating the complete ERI array you can also just calculate a specific element or a continuous block of the ERI array +#This is done by specifying an additional argument that contains the start and indices of the block of the ERI array +#that you want to calculate. +print('\n\n\n') +print('Integrals') +indx_startA = 2 +indx_endA = 5 +indx_startB = 1 +indx_endB = 4 +indx_startC = 1 +indx_endC = 7 +print('\nSubset of 3c2e ERI array ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC]\n') +print('Slice',[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC]) +ERI_subset = Integrals.rys_3c2e_symm(basis, auxbasis, slice=[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC]) +print(ERI_subset[:, :, 0]) +print('\nSlice from the original array\n') +# print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, 0, 0]) +print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC]) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC] - ERI_subset).max()') +print(abs(ERI_subset - ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC]).max()) + +#Let's try for a larger basis set like def2-svp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) +print('\n\n\n') +print('Integrals') +print('\n3c2e ERI array in def2-SVP basis\n') +print('NAO: ', basisBig.bfs_nao) +print(Integrals.rys_3c2e_symm(basisBig, auxbasis)[0:7,0:7,0]) + + +#Comparison with PySCF +from pyscf import gto, dft, df +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = 'h2o.xyz' +molPySCF.basis = basisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + +# auxmol = df.addons.make_auxmol(molPySCF, auxbasis='weigend') +auxmol = df.addons.make_auxmol(molPySCF, auxbasis='6-31G') + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +ERI_pyscf = df.incore.aux_e2(molPySCF, auxmol, intor='int3c2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf[0:7,0:7,0]) +print('Array dimensions: ', ERI_pyscf.shape) +print(abs(ERI_pyscf - ERI).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +print('Duration for ERI using PySCF: ',duration)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex14_Integrals_schwarz_screening_density_fitting.py",".py","5334","128","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +from timeit import default_timer as timer + +import numpy as np + +import warnings +warnings.filterwarnings('ignore') + +import numba +numba.set_num_threads(4) + +# Get rid of compilation time for getting accurate timings +print('Compiling...') +mol = Mol(coordfile = 'h2o.xyz') +basis_temp = Basis(mol, {'all':Basis.load(mol=mol, basis_name='sto-2g')}) +auxbasis_temp = Basis(mol, {'all':Basis.load(mol=mol, basis_name='sto-2g')}) +ints2c2e_temp = Integrals.rys_2c2e_symm(auxbasis_temp) +ints3c2e_temp = Integrals.rys_3c2e_symm(basis_temp, auxbasis_temp) +ints3c2e_temp = Integrals.rys_3c2e_tri(basis_temp, auxbasis_temp) +ints3c2e_temp = Integrals.rys_3c2e_tri_schwarz(basis_temp, auxbasis_temp, np.array([0,1,2,3], dtype=np.uint16), np.array([0,1,2,3], dtype=np.uint16), np.array([0,1,2,3], dtype=np.uint16)) +ints4c2e_diag_temp = Integrals.schwarz_helpers.eri_4c2e_diag(basis_temp) +print('Compilation done!\n\n') + +# Example on how to perform Schwarz screening for density fitting calculations + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +# basisName = '6-31G' +basisName = 'def2-SVP' + +# auxbasisName = '6-31G' +auxbasisName = 'def2-universal-jfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +# We also need an auxiliary basis for density fitting +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasisName)}) + +# Calculate two-centered two electron integrals (Coulomb metric) for the density fitting procedure +ints2c2e = Integrals.rys_2c2e_symm(auxbasis) + +start = timer() +print('\n\nPerforming Schwarz screening...') +threshold_schwarz = 1e-11 +print('Threshold ', threshold_schwarz) + +# Size of the 3c2e array naively +nints3c2e = basis.bfs_nao*basis.bfs_nao*auxbasis.bfs_nao +# Size of the 3c2e array considering the ij symmetry of the first two indices +nints3c2e_tri = int(basis.bfs_nao*(basis.bfs_nao+1)/2.0)*auxbasis.bfs_nao + +# This is based on Schwarz inequality screening +# ""Diagonal"" elements of ERI 4c2e array (uv|uv) +ints4c2e_diag = Integrals.schwarz_helpers.eri_4c2e_diag(basis) + +# Calculate the indices of the ints3c2e array with significant contributions based on Schwarz inequality +# The following returns an array with 0s and 1s. 1=significant; 0=non-significant +indices_temp = Integrals.schwarz_helpers.calc_indices_3c2e_schwarz(ints4c2e_diag, ints2c2e, basis.bfs_nao, auxbasis.bfs_nao, threshold_schwarz) +# Find the corresponding indices +if basis.bfs_nao<65500 and auxbasis.bfs_nao<65500: + indices = [a.astype(np.uint16) for a in indices_temp.nonzero()] # Will work as long as the no. of max(Bfs,auxbfs) is less than 65535 +else: + indices = [a.astype(np.uint32) for a in indices_temp.nonzero()] # Will work as long as the no. of Bfs/auxbfs is less than 4294967295 + +# Get rid of temp variables +indices_temp=0 + +print('Size of array storing the significant indices of 3c2e ERI in GB ', indices[0].nbytes/1e9, flush=True) + +nsignificant = len(indices[0]) +print('No. of elements in the standard three-centered two electron ERI tensor: ', nints3c2e, flush=True) +print('No. of elements in the triangular three-centered two electron ERI tensor: ', nints3c2e_tri, flush=True) +print('No. of significant triplets based on Schwarz inequality and triangularity: ' + str(nsignificant) + ' or '+str(np.round(nsignificant/nints3c2e*100,1)) + '% of original', flush=True) +print('Schwarz screening done!') +duration = timer() - start +print('Time taken ', duration) + +# Calculate the 3c2e integrals for only the significant pairs +start = timer() +ints3c2e = Integrals.rys_3c2e_tri_schwarz(basis, auxbasis, indices[0], indices[1], indices[2]) +duration = timer() - start +print('\n3c2e integral with Schwarz screening') +print(ints3c2e) +print('Time taken ', duration) +size = ints3c2e.nbytes/1e9 +print('Size (GB) ', size) + +# Calculate the unique (triangular) 3c2e integrals without Schwarz screening +start = timer() +ints3c2e = Integrals.rys_3c2e_tri(basis, auxbasis) +duration = timer() - start +print('\nUnique (triangular) 3c2e integral without Schwarz screening') +print(ints3c2e) +print('Time taken ', duration) +size = ints3c2e.nbytes/1e9 +print('Size (GB) ', size) + +# Calculate the full 3c2e integrals without Schwarz screening +start = timer() +ints3c2e = Integrals.rys_3c2e_symm(basis, auxbasis) +duration = timer() - start +print('\nFull 3c2e integral without Schwarz screening') +print(ints3c2e) +print('Time taken ', duration) +size = ints3c2e.nbytes/1e9 +print('Size (GB) ', size)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex17_CAO_2_SAO_conversion.py",".py","2687","82","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# Converstion from Cartesian AO basis potential matrices of PyFock to Soherical AO basis + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = '6-31G' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-TZVPP' +# basis_set_name = 'def2-QZVPP' +# basis_set_name = 'def2-TZVPD' +basis_set_name = 'def2-QZVPD' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'cc-pVDZ' +# basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +#Now we can calculate integrals. +# This example shows how to calculate the kinetic matrix using the basis set object created. + +#Let's calculate the complete kinetic potential matrix +print('\n\n\n') +print('Integrals') +print('Kinetic energy matrix (CAO basis)\n') +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +Vkin_cart = Integrals.kin_mat_symm(basis) +print(Vkin_cart) + +print('\n\nKinetic energy matrix (SAO basis)\n') +c2sph_mat = basis.cart2sph_basis() +Vkin_sph = np.dot(c2sph_mat, np.dot(Vkin_cart, c2sph_mat.T)) +print(Vkin_sph) + +#Comparison with PySCF +from pyscf import gto +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = False +molPySCF.build() +# print(molPySCF.sph_labels()) +# print(molPySCF.cart_labels()) +print(molPySCF.ao_labels()) + + +#Kinetic pot mat +Vkin_sph_pyscf = molPySCF.intor_symmetric('int1e_kin_sph') +print('\n\nPySCF') +print(Vkin_sph_pyscf) +print('Matrix dimensions: ', Vkin_sph_pyscf.shape) +print(abs(Vkin_sph_pyscf - Vkin_sph).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't have the same ordering of g,h,.. orbitals. + +","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex4_Integrals_nuclear.py",".py","3470","74","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +# from timeit import default_timer as timer +import numpy as np + +#NUCLEAR POTENTIAL MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='sto-3g')}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +#Now we can calculate integrals. +# This example shows how to calculate the Nuclear matrix using the basis set object created. +# Notice, how we don't need a mol object for things like overlap/KE integrals but we do need one for Nuclear matrix. +# However, the mol object and basis object do not have to be of the same molecule. +# This is because the basis functions in basis set object contain their own coordinates and don't rely on mol object. +# Therefore, you can calculate the nuclear matrix in the basis of one molecule due to the nuclei of another molecule. +# I feel this can be a useful feature and offers reasonable flexibility and modularity. +# Furthermore, one can specify exactly which elements of the nuclear matrix they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete nuclear potential matrix +print('\n\n\n') +print('Integrals') +print('Nuclear matrix\n') +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +Vnuc = Integrals.nuc_mat_symm(basis, mol) +print(Vnuc) + +#Instead of calculating the complete KE matrix you can also just calculate a specific element or a continuous block of the kinetic matrix +#This is done by specifying an additional argument that contains the start and indices of the block of the kinetic matrix +#that you want to calculate. +print('\n\n\n') +print('Integrals') +start_row = 5 +end_row = 7 +start_col = 5 +end_col = 7 +print('\nSubset of Nuclear matrix Vnuc[start_row:end_row, start_col:end_col]\n') +print([start_row, end_row, start_col, end_col]) +Vnuc_subset = Integrals.nuc_mat_symm(basis, mol, slice=[start_row, end_row, start_col, end_col]) +print(Vnuc_subset) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(Vnuc[start_row:end_row, start_col:end_col] - Vnuc_subset).max()') +print(abs(Vnuc_subset - Vnuc[start_row:end_row, start_col:end_col]).max()) + +#Let's try for a larger basis set like def2-tzvp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-tzvp')}) +print('\n\n\n') +print('Integrals') +print('\nNuclear matrix in def2-TZVP basis\n') +print(Integrals.nuc_mat_symm(basisBig, mol))","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex6_Integrals_overlap.py",".py","2807","69","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# OVERLAP POTENTIAL MATRIX + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='sto-3g')}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +#Now we can calculate integrals. +# This example shows how to calculate the Overlap matrix using the basis set object created. +# One can specify exactly which elements of the Overlap matrix they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete Overlap matrix +print('\n\n\n') +print('Integrals') +print('Overlap matrix\n') +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ovlp = Integrals.overlap_mat_symm(basis) +print(ovlp) + +#Instead of calculating the complete KE matrix you can also just calculate a specific element or a continuous block of the Overlap matrix +#This is done by specifying an additional argument that contains the start and indices of the block of the Overlap matrix +#that you want to calculate. +print('\n\n\n') +print('Integrals') +start_row = 3 +end_row = 7 +start_col = 3 +end_col = 7 +print('\nSubset of Overlap matrix ovlp[start_row:end_row, start_col:end_col]\n') +print([start_row, end_row, start_col, end_col]) +ovlp_subset = Integrals.overlap_mat_symm(basis, slice=[start_row, end_row, start_col, end_col]) +print(ovlp_subset) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(ovlp[start_row:end_row, start_col:end_col] - Vkin_subset).max()') +print(abs(ovlp_subset - ovlp[start_row:end_row, start_col:end_col]).max()) + +#Let's try for a larger basis set like def2-tzvp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-tzvp')}) +print('\n\n\n') +print('Integrals') +print('\nOverlap matrix in def2-TZVP basis\n') +print(Integrals.overlap_mat_symm(basisBig)) +","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex1_Basis.py",".py","2539","69","from pyfock import Basis +from pyfock import Mol +#Example on how to specify basis + + +#First of all we need a mol object with some geometry +mol = Mol(coordfile='h2o.xyz') + +# Define some basis as strings in a variable +# This can later be used in Basis.load() function +sto3g = ''' +* +* +o STO-3G +* +3 s +0.1307093214E+03 0.1543289673E+00 +0.2380886605E+02 0.5353281423E+00 +0.6443608313E+01 0.4446345422E+00 +3 s +0.5033151319E+01 -0.9996722919E-01 +0.1169596125E+01 0.3995128261E+00 +0.3803889600E+00 0.7001154689E+00 +3 p +0.5033151319E+01 0.1559162750E+00 +0.1169596125E+01 0.6076837186E+00 +0.3803889600E+00 0.3919573931E+00 +* +* +h STO-3G +* +3 s +0.3425250914E+01 0.1543289673E+00 +0.6239137298E+00 0.5353281423E+00 +0.1688554040E+00 0.4446345422E+00 +* +''' +# To create a basis set object we need an already instantiated mol object. +# The second argument is supposed to be a dictionary that specifies the basis set to be used for +# a given atomic species. +# The keyname= 'all' means that all the atoms would be specified the same basis set. +# after the keyname one should provide the basis set to be used (The complete basis set, not just the name) +basis = Basis(mol, {'all':sto3g}) # Load from string +print(basis.nprims) +print(basis.prim_coeffs) +print('\nNormalization factor of the contraction of primitives that make up a basis function') +print(basis.bfs_contr_prim_norms) + + +#Example 2 +# Alternatively one can load the basis set from a file in the same working directory +# NOTE: The basis set should be specifiec in the Turbomole format +# Basis.loadfromfile is a function that would read the basis sets corresponding to the atoms in the given mol object +# from a file(should be in Turbomole format). +basis = Basis(mol, {'all':Basis.loadfromfile(mol=mol, basis_name='sto-3g.dat')}) # Load from file +print(basis.nprims) +print(basis.prim_coeffs) +print('\nNormalization factor of the contraction of primitives that make up a basis function') +print(basis.bfs_contr_prim_norms) + +#Example 3 +# Alternatively one can load the basis set from crysxdft library by specifying the name as shown below +# using the Basis.load() function. The function takes the mol and basis set name as arguments. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='sto-3g')}) # Load from crysxdft library +print(basis.nprims) +print(basis.prim_coeffs) +print('\nNormalization factor of the contraction of primitives that make up a basis function') +print(basis.bfs_contr_prim_norms) +#print(basis.basisSet)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex27_PBC_ring_gen.py",".py","5203","169","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from pyfock import Utils +from pyfock import PBC_ring + +from timeit import default_timer as timer +import numpy as np +import scipy +import matplotlib.pyplot as plt + +# PySCF imports +from pyscf.pbc import gto, scf +from pyscf import gto as mol_gto, dft as molecular_dft + +ncores = 4 + +#LDA +# funcx = 1 +# funcc = 7 +#PBE +funcx = 101 +funcc = 130 +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + +basis_set_name = 'def2-SVP' +auxbasis_name = 'def2-universal-jfit' +xyzFilename = 'LiH.xyz' + + + +#Initialize a Mol object with unit cell +unit_mol = Mol(coordfile=xyzFilename) + +# Generate rings and save XYZ files +ring_sizes = [10, 15] +pyfock_results = [] +pyscf_results = [] + +for N in ring_sizes: + print(f""\nPyFock Ring N={N}"") + ring_mol = PBC_ring.ring(unit_mol, N=N, periodicity=3.2, periodic_dir='x', + output_xyz=True, xyz_filename=f'pbc_ring_{N}') + + print(""\n=== PySCF Ring Calculations (using PyFock XYZ files) ==="") + + print(f""\nPySCF Ring N={N} (from pbc_ring_{N}.xyz)"") + + # Read PyFock-generated XYZ file + mol = mol_gto.Mole() + mol.atom = f'pbc_ring_{N}.xyz' + mol.basis = basis_set_name + mol.spin = 0 + mol.charge = 0 + mol.build() + + # DFT calculation + mf = molecular_dft.RKS(mol).density_fit() + dmat_init = mf.init_guess_by_minao(mol) + mf.xc = funcidpyscf + mf.conv_tol = 1e-7 + e_total = mf.kernel(dmat_init) + e_per_unit = e_total / N + + pyscf_results.append((N, e_total, e_per_unit)) + print(f"" PySCF E_total = {e_total:.10f} Ha, E/unit = {e_per_unit:.10f} Ha"") + + print(""=== PyFock Ring Calculation ==="") + #Initialize basis + basis = Basis(ring_mol, {'all':Basis.load(mol=ring_mol, basis_name=basis_set_name)}) + auxbasis = Basis(ring_mol, {'all':Basis.load(mol=ring_mol, basis_name=auxbasis_name)}) + + dftObj = DFT(ring_mol, basis, auxbasis, xc=funcidcrysx, grids=mf.grids) + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + # dftObj.strict_schwarz = False + dftObj.save_ao_values = True + # dftObj.dmat = dmat_init + + energyCrysX, dmat = dftObj.scf() + n_units = len(ring_mol.atoms) // 2 + energy_per_unit = energyCrysX / n_units + + pyfock_results.append((N, energyCrysX, energy_per_unit)) + print(f"" PyFock E_total = {energyCrysX:.10f} Ha, E/unit = {energy_per_unit:.10f} Ha"") + +print(""\n=== PBC Reference (PySCF) ==="") + +# PBC calculation +def build_lih_pbc_cell(): + cell = gto.Cell() + cell.unit = ""Angstrom"" + cell.atom = [[""Li"", (0.0, 0.0, 0.0)], [""H"", (1.6, 0.0, 0.0)]] # 1.6 Å LiH bond + cell.basis = basis_set_name + cell.a = np.array([[3.2, 0.0, 0.0], [0.0, 25.0, 0.0], [0.0, 0.0, 25.0]]) # 3.2 Å periodicity + cell.build() + return cell + +cell = build_lih_pbc_cell() +kpts = cell.make_kpts([20, 1, 1]) +mf_pbc = scf.KRKS(cell, kpts=kpts).density_fit() +mf_pbc.xc = funcidpyscf +mf_pbc.conv_tol = 1e-7 +e_pbc_total = mf_pbc.kernel() +e_pbc_per_unit = e_pbc_total # Only 1 LiH unit in cell + +print(f""PBC E_total = {e_pbc_total:.10f} Ha, E/unit = {e_pbc_per_unit:.10f} Ha"") + +print(""\n=== PySCF Ring Calculations (using PyFock XYZ files) ==="") + + + + + +print(""\n=== Extrapolation Analysis ==="") + +# Use PySCF results for extrapolation (more standard) +Ns = np.array([r[0] for r in pyscf_results]) +E_per_unit = np.array([r[2] for r in pyscf_results]) +x = 1.0 / (Ns**2) + +# Linear fit +coeffs = np.polyfit(x, E_per_unit, 1) +a, b = coeffs[0], coeffs[1] +extrapolated_limit = b + +print(f""Linear fit: E/unit = {a:.6e} * (1/N²) + {b:.10f}"") +print(f""Extrapolated limit (N→∞): {extrapolated_limit:.10f} Ha"") +print(f""PBC reference: {e_pbc_per_unit:.10f} Ha"") +print(f""Difference: {(extrapolated_limit - e_pbc_per_unit)*1000:.3f} mHa"") + +# Plot +plt.figure(figsize=(10, 6)) +plt.scatter(x, E_per_unit, s=100, color='red', label='PySCF Rings', zorder=5) + +xfit = np.linspace(0, x.max()*1.1, 100) +yfit = a * xfit + b +plt.plot(xfit, yfit, '--', color='blue', label='Linear fit') +plt.axhline(y=e_pbc_per_unit, color='green', linestyle='-', linewidth=2, + label=f'PBC: {e_pbc_per_unit:.6f} Ha') + +plt.xlabel(""1 / N²"") +plt.ylabel(""Energy per LiH unit (Ha)"") +plt.title(""Ring Energy Extrapolation to Thermodynamic Limit"") +plt.legend() +plt.grid(True, alpha=0.3) +plt.tight_layout() +plt.savefig(""ring_extrapolation.png"", dpi=150) +print(f""\nSaved plot: ring_extrapolation.png"") + +print(""\n=== Summary Comparison ==="") +print(f""{'Method':<20} {'N':<5} {'E/unit (Ha)':<15} {'Error vs PBC (mHa)':<15}"") +print(""-"" * 60) +print(f""{'PBC Reference':<20} {'∞':<5} {e_pbc_per_unit:<15.10f} {'0.000':<15}"") + +for i, (pf_result, ps_result) in enumerate(zip(pyfock_results, pyscf_results)): + N, pf_etot, pf_epu = pf_result + _, ps_etot, ps_epu = ps_result + + pf_error = (pf_epu - e_pbc_per_unit) * 1000 + ps_error = (ps_epu - e_pbc_per_unit) * 1000 + + print(f""{'PyFock Ring':<20} {N:<5} {pf_epu:<15.10f} {pf_error:<15.3f}"") + print(f""{'PySCF Ring':<20} {N:<5} {ps_epu:<15.10f} {ps_error:<15.3f}"") + +print(f""{'Extrapolated':<20} {'∞':<5} {extrapolated_limit:<15.10f} {(extrapolated_limit-e_pbc_per_unit)*1000:<15.3f}"")","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex7_Integrals_4c2e_conventional.py",".py","4227","105","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# 4c2e ERI via explicit conventional integrals (quite slow) + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +basisName = '6-31G' +# basisName = 'def2-SVP' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +#Now we can calculate integrals. +# This example shows how to calculate the 4c2e ERI array using the basis set object created. +# One can specify exactly which elements of the ERI array they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete ERI array +print('\n\n\n') +print('Integrals') +print('4c2e ERI array\n') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI = Integrals.conv_4c2e_symm(basis) +print(ERI[0:7,0:7,0,0]) + +#Instead of calculating the complete ERI array you can also just calculate a specific element or a continuous block of the ERI array +#This is done by specifying an additional argument that contains the start and indices of the block of the ERI array +#that you want to calculate. +print('\n\n\n') +print('Integrals') +indx_startA = 2 +indx_endA = 4 +indx_startB = 1 +indx_endB = 4 +indx_startC = 5 +indx_endC = 7 +indx_startD = 5 +indx_endD = 7 +print('\nSubset of 4c2e ERI array ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC, indx_startD:indx_endD]\n') +print('Slice',[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD]) +ERI_subset = Integrals.conv_4c2e_symm(basis, slice=[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD]) +print(ERI_subset[:, :, 0, 0]) +print('\nSlice from the original array\n') +# print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, 0, 0]) +print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC, indx_startD]) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC, indx_startD:indx_endD] - ERI_subset).max()') +print(abs(ERI_subset - ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC, indx_startD:indx_endD]).max()) + +#Let's try for a larger basis set like def2-svp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) +print('\n\n\n') +print('Integrals') +print('\n4c2e ERI array in def2-SVP basis\n') +print('NAO: ', basisBig.bfs_nao) +print(Integrals.conv_4c2e_symm(basisBig)[0:7,0:7,0,0]) + + +#Comparison with PySCF +from pyscf import gto, dft +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = 'h2o.xyz' +molPySCF.basis = basisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +ERI_pyscf = molPySCF.intor('int2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf[0:7,0:7,0,0]) +print('Array dimensions: ', ERI_pyscf.shape) +print(abs(ERI_pyscf - ERI).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +print('Duration for ERI using PySCF: ',duration)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex13_Integrals_3c2e_rys_quad_triangular.py",".py","3317","92","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# 3c2e Integral via Rys Quadrature (Faster than the conventional implementation) +# Here we use a memory efficient version of rys_3c2e_symm +# that returns a 2D array instead of a 3D array. +# Only the symmetrically unique values are returned. + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +basisName = '6-31G' +# basisName = 'def2-SVP' + +auxbasisName = '6-31G' +# auxbasisName = 'def2-universal-jfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + + +# We also need an auxiliary basis for density fitting +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasisName)}) + +#Now we can calculate integrals. +# This example shows how to calculate the 4c2e ERI array using the basis set object created. +# One can specify exactly which elements of the ERI array they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete ERI array +print('\n\n\n') +print('Integrals') +print('3c2e array (triangular)\n') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI = Integrals.rys_3c2e_tri(basis, auxbasis) +print(ERI) + +#Let's try for a larger basis set like def2-svp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) +print('\n\n\n') +print('Integrals') +print('\n2c2e ERI array in def2-SVP basis\n') +print('NAO: ', basisBig.bfs_nao) +print(Integrals.rys_3c2e_tri(basisBig, auxbasis)) + + +#Comparison with PySCF +from pyscf import gto, dft, df +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = 'h2o.xyz' +molPySCF.basis = basisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + +# auxmol = df.addons.make_auxmol(molPySCF, auxbasis='weigend') +auxmol = df.addons.make_auxmol(molPySCF, auxbasis='6-31G') + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +ERI_pyscf = df.incore.aux_e2(molPySCF, auxmol, intor='int3c2e', aosym='s2ij') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf) +print('Array dimensions: ', ERI_pyscf.shape) +print(abs(ERI_pyscf - ERI).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +print('Duration for ERI using PySCF: ',duration)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex16_system_information.py",".py","209","8","# When performing benchmarks, it might be useful to print out the specifications +# of the system, the calculation is being run on + +from pyfock import Utils + +Utils.print_sys_info() + +print(Utils.get_cpu_model())","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex2_Basis.py",".py","3981","99","from pyfock import Basis +from pyfock import Mol + +#Example on how to access various properties of Basis object such info on primitives, +#shells and basis functions + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'H2O.xyz' +# xyzFilename = 'H2.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' +# xyzFilename = 'Graphene_C76.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# This example shows how to load the basis set from the CrysX library, +# and the properties of the basis set object. +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +# basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-tzvp')}) +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-SVP')}) +# basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) +#print(basis.basisSet) +print('\n\n\nTotal number of basis functions\n') +print(basis.bfs_nao) +print('\n\n\nTotal number of primitives\n') +print(basis.totalnprims) +print('\nNumber of primitives in each shell\n') +print(basis.nprims, len(basis.nprims)) +print('\nIndices of the atoms to which each primitive function corresponds/belongs to\n') +print(basis.prim_atoms) +print('\nNo. of primitives corresponding to each atomic index\n') +print(basis.nprims_atoms) +print('\nIndices of the shells to which each primitive function corresponds/belongs to\n') +print(basis.prim_shells) +print('\nNo. of primitives corresponding to each shell index\n') +print(basis.nprims_shells) +print('\nA list of tuples that shows the angular momentum of shell in the first index and the no. of corresponding primitives in the second index\n') +print(basis.nprims_shell_l_list) +print('\nLargest exponent values corresponding to each atom\n') +print(basis.alpha_max) +print('\nSmallest exponent values corresponding to each shell of each atom\n') +print(basis.alpha_min) +print('\nCoefficients and exponents of primitives\n') +print(basis.prim_coeffs) +print(basis.prim_expnts) +print('\nConfirming if the number of primitives and the number of exponents/coefficients read is the same\n') +print(len(basis.prim_coeffs)) +print('\nShell labels\n') +print(basis.shellsLabel) +print('\nShells\n') +print(basis.shells) +print('\nBasis function information\n') +print('\nBF labels\n') +print(basis.bfs_label) +print(len(basis.bfs_label)) +print('\nBF lmn triplets\n') +print(basis.bfs_lmn) +print(len(basis.bfs_label)) +print('\nBF angular momentum\n') +print(basis.bfs_lm) +print(len(basis.bfs_lm)) +print('\nNumber of basis functions in each shell\n') +print(basis.bfs_nbfshell) +print('\nOffset index of the basis function corresponding to a given shell index') +print(basis.shell_bfs_offset) +print('\nShell indices of basis functions\n') +print(basis.bfs_shell_index) +print('\nNumber of primitives for a basis function\n') +print(basis.bfs_nprim) +print(len(basis.bfs_label)) +print('\nExponents of primitives for each basis functions\n') +print(basis.bfs_expnts) +print(len(basis.bfs_expnts)) +print('\nContraction coefficients of primitives for each basis functions\n') +print(basis.bfs_coeffs) +print(len(basis.bfs_coeffs)) +print('\nNormalization factors of primitives for each basis functions\n') +print(basis.bfs_prim_norms) +print(len(basis.bfs_prim_norms)) +print('\nNormalization factor of the contraction of primitives that make up a basis function\n') +print(basis.bfs_contr_prim_norms) +print(len(basis.bfs_contr_prim_norms)) +print('\nCoordinates of basis functions\n') +print(basis.bfs_coords) +print(len(basis.bfs_coords)) +print('Indices of atoms to which basis functions correspond to\n') +print(basis.bfs_atoms) +print(len(basis.bfs_atoms)) +print('\n\n\n') +","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex22_ao_grad_values_on_grids.py",".py","844","33","from pyfock import Basis +from pyfock import Mol +from pyfock import Grids +from pyfock import Integrals +from pyfock import DFT +import numpy as np +from opt_einsum import contract + +ncores = 2 +import numba +numba.set_num_threads(ncores) + + +# Define the molecule using an XYZ file +mol = Mol(coordfile = 'h2o.xyz') + +# Generate grids for XC term +gridsLevel = 3 +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-QZVP')}) +grids = Grids(mol, basis=basis, level = gridsLevel, ncores=ncores) + +print('\n\nWeights:') +print(grids.weights) +print('\n\nCoords:') +print(grids.coords) +print('\nNo. of generated grid points: ', grids.coords.shape[0]) + +ao_values, ao_grad_values = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, grids.coords, parallel=True) + +print('\n\nAO Values:') +print(ao_values) +print('\n\nAO gradient Values:') +print(ao_grad_values)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex24_Cube_file_of_density.py",".py","1365","54","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from pyfock import Utils + +from timeit import default_timer as timer +import numpy as np +import scipy + +ncores = 4 + +#LDA +funcx = 1 +funcc = 7 +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = '6-31G' + +auxbasis_name = 'def2-universal-jfit' + +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + + +#Initialize a Mol object with somewhat large geometry +mol = Mol(coordfile=xyzFilename) + + +#Initialize a Basis object with a very large basis set +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasis_name)}) + +dftObj = DFT(mol, basis, auxbasis, xc=funcidcrysx) + +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 20 +dftObj.ncores = ncores +dftObj.save_ao_values = True +energyCrysX, dmat = dftObj.scf() + +Utils.write_density_cube(mol, basis, dftObj.dmat, 'water_dens.cube', nx=100, ny=100, nz=100, ncores=ncores)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex9_Integrals_3c2e_conventional.py",".py","4459","112","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# 3c2e ERI via the same explicit formulas as 4c2e (Slower implementation) + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +basisName = '6-31G' +# basisName = 'def2-SVP' + +auxbasisName = '6-31G' +# auxbasisName = 'def2-universal-jfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +# We also need an auxiliary basis for density fitting +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasisName)}) + +#Now we can calculate integrals. +# This example shows how to calculate the 4c2e ERI array using the basis set object created. +# One can specify exactly which elements of the ERI array they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete ERI array +print('\n\n\n') +print('Integrals') +print('3c2e ERI array\n') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI = Integrals.conv_3c2e_symm(basis, auxbasis) +print(ERI[0:7,0:7,0]) + +#Instead of calculating the complete ERI array you can also just calculate a specific element or a continuous block of the ERI array +#This is done by specifying an additional argument that contains the start and indices of the block of the ERI array +#that you want to calculate. +print('\n\n\n') +print('Integrals') +indx_startA = 2 +indx_endA = 5 +indx_startB = 1 +indx_endB = 4 +indx_startC = 1 +indx_endC = 7 +print('\nSubset of 3c2e ERI array ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC]\n') +print('Slice',[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC]) +ERI_subset = Integrals.conv_3c2e_symm(basis, auxbasis, slice=[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC]) +print(ERI_subset[:, :, 0]) +print('\nSlice from the original array\n') +# print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, 0, 0]) +print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC]) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC] - ERI_subset).max()') +print(abs(ERI_subset - ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC]).max()) + +#Let's try for a larger basis set like def2-svp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) +print('\n\n\n') +print('Integrals') +print('\n3c2e ERI array in def2-SVP basis\n') +print('NAO: ', basisBig.bfs_nao) +print(Integrals.conv_3c2e_symm(basisBig, auxbasis)[0:7,0:7,0]) + + +#Comparison with PySCF +from pyscf import gto, dft, df +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = 'h2o.xyz' +molPySCF.basis = basisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + +# auxmol = df.addons.make_auxmol(molPySCF, auxbasis='weigend') +auxmol = df.addons.make_auxmol(molPySCF, auxbasis='6-31G') + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +ERI_pyscf = df.incore.aux_e2(molPySCF, auxmol, intor='int3c2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf[0:7,0:7,0]) +print('Array dimensions: ', ERI_pyscf.shape) +print(abs(ERI_pyscf - ERI).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +print('Duration for ERI using PySCF: ',duration)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex20_XC_grids_generate.py",".py","511","20","from pyfock import Basis +from pyfock import Mol +from pyfock import Grids +import numpy as np + +ncores = 4 + +# Define the molecule using an XYZ file +mol = Mol(coordfile = 'h2o.xyz') + +# Generate grids for XC term +gridsLevel = 3 +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-QZVP')}) +grids = Grids(mol, basis=basis, level = gridsLevel, ncores=ncores) + +print('\n\nWeights:') +print(grids.weights) +print('\n\nCoords:') +print(grids.coords) +print('\nNo. of generated grid points: ', grids.coords.shape[0])","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex25_Cube_file_of_orbitals.py",".py","1685","61","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from pyfock import Utils + +from timeit import default_timer as timer +import numpy as np +import scipy + +ncores = 4 + +#LDA +funcx = 1 +funcc = 7 +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = '6-31G' + +auxbasis_name = 'def2-universal-jfit' + +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + + +#Initialize a Mol object with somewhat large geometry +mol = Mol(coordfile=xyzFilename) + + +#Initialize a Basis object with a very large basis set +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasis_name)}) + +dftObj = DFT(mol, basis, auxbasis, xc=funcidcrysx) + +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 20 +dftObj.ncores = ncores +dftObj.save_ao_values = True +energyCrysX, dmat = dftObj.scf() + +# Find the indices of HOMOL and LUMO +occupied = np.where(dftObj.mo_occupations > 1e-8)[0] +homo_idx = occupied[-1] +lumo_idx = homo_idx + 1 +# Write HOMO +Utils.write_orbital_cube(mol, basis, dftObj.mo_coefficients[:, homo_idx], 'water_HOMO.cube', nx=100, ny=100, nz=100, ncores=ncores) +# Write LUMO +Utils.write_orbital_cube(mol, basis, dftObj.mo_coefficients[:, lumo_idx], 'water_LUMO.cube', nx=100, ny=100, nz=100, ncores=ncores)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex8_Integrals_4c2e_rys_quadrature.py",".py","4264","105","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals + +import numpy as np + +# 4c2e ERI via Rys Quadrature (Faster than the conventional implementation) + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# basisName = 'sto-3g' +# basisName = 'sto-6g' +small_basisName = '6-31G' +big_basisName = 'def2-SVP' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=small_basisName)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + +#Now we can calculate integrals. +# This example shows how to calculate the 4c2e ERI array using the basis set object created. +# One can specify exactly which elements of the ERI array they want to calculate. +# So, one can either calculate a single element or a continuous block of the matrix using the slice. + +#Let's calculate the complete ERI array +print('\n\n\n') +print('Integrals') +print('4c2e ERI array\n') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI = Integrals.rys_4c2e_symm(basis) +print(ERI[0:7,0:7,0,0]) + +#Instead of calculating the complete ERI array you can also just calculate a specific element or a continuous block of the ERI array +#This is done by specifying an additional argument that contains the start and indices of the block of the ERI array +#that you want to calculate. +print('\n\n\n') +print('Integrals') +indx_startA = 2 +indx_endA = 4 +indx_startB = 1 +indx_endB = 4 +indx_startC = 5 +indx_endC = 7 +indx_startD = 5 +indx_endD = 7 +print('\nSubset of 4c2e ERI array ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC, indx_startD:indx_endD]\n') +print('Slice',[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD]) +ERI_subset = Integrals.rys_4c2e_symm(basis, slice=[indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD]) +print(ERI_subset[:, :, 0, 0]) +print('\nSlice from the original array\n') +# print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, 0, 0]) +print(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC, indx_startD]) + +# Compare with the slice of the original full matrix +print('\n\nCompare with the slice of the original full matrix') +print('abs(ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC, indx_startD:indx_endD] - ERI_subset).max()') +print(abs(ERI_subset - ERI[indx_startA:indx_endA, indx_startB:indx_endB, indx_startC:indx_endC, indx_startD:indx_endD]).max()) + +#Let's try for a larger basis set like def2-svp +basisBig = Basis(mol, {'all':Basis.load(mol=mol, basis_name=big_basisName)}) +print('\n\n\n') +print('Integrals') +print('\n4c2e ERI array in def2-SVP basis\n') +print('NAO: ', basisBig.bfs_nao) +print(Integrals.rys_4c2e_symm(basisBig)[0:7,0:7,0,0]) + + +#Comparison with PySCF +from pyscf import gto, dft +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = 'h2o.xyz' +molPySCF.basis = small_basisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +ERI_pyscf = molPySCF.intor('int2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf[0:7,0:7,0,0]) +print('Array dimensions: ', ERI_pyscf.shape) +print(abs(ERI_pyscf - ERI).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +print('Duration for ERI using PySCF: ',duration)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex23_rho_values_on_grids.py",".py","1198","44","from pyfock import Basis +from pyfock import Mol +from pyfock import Grids +from pyfock import Integrals +from pyfock import DFT +import numpy as np +from opt_einsum import contract + +ncores = 2 +import numba +numba.set_num_threads(ncores) + + +# Define the molecule using an XYZ file +mol = Mol(coordfile = 'h2o.xyz') + +# Generate grids for XC term +gridsLevel = 3 +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-QZVP')}) +grids = Grids(mol, basis=basis, level = gridsLevel, ncores=ncores) + +print('\n\nWeights:') +print(grids.weights) +print('\n\nCoords:') +print(grids.coords) +print('\nNo. of generated grid points: ', grids.coords.shape[0]) + +ao_values = Integrals.bf_val_helpers.eval_bfs(basis, grids.coords, parallel=True) + +print('\n\nAO Values:') +print(ao_values) + +# basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-SVP')}) +dft = DFT(mol, basis) +dmat = dft.guessCoreH() + +rho = contract('ij,mi,mj->m', dmat, ao_values, ao_values) +print('\n\nRho Values:') +print(rho) + + +rho_alternative = Integrals.bf_val_helpers.eval_rho(ao_values, dmat) # This is by-far the fastest now (when not using non_zero_indices) <----- +print('\n\nRho Values calculated in another way:') +print(rho_alternative)","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex15_DFT_LDA_DF_rys_tri_schwarz.py",".py","3252","100","import os + +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # or export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # or export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # or export VECLIB_MAXIMUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # or export NUMEXPR_NUM_THREADS=4 + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT + +from timeit import default_timer as timer +import numpy as np +import scipy + + + +# DFT SCF example using density fitting for Coulomb term and rys quadrature for 3c2e and 2c2e integrals. +# Furthermore, Schwarz screening and other symmetries are used to reduce the number of integral evaluations as well as storage. +# Please note: Here we are using the DFT grids provided by the numgrid library that is installed automatically while +# installing PyFock. +# However, it was found during testing that PySCF grids were much more efficient as they resulted in overall less +# number of grid points and also less no. of basis functions contributing to a particular batch/block of grid points. +# Furthermore, PySCF takes very little amount of time to generate grids as opposed to numgrid which is much slower. + +#LDA +# funcx = 1 +# funcc = 7 +# funcidcrysx = [funcx, funcc] +# funcidpyscf = str(funcx)+','+str(funcc) + +#GGA +funcx = 101 +funcc = 130 +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = '6-31G' +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-TZVPP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'cc-pVDZ' +# basis_set_name = 'ano-rcc' + +auxbasis_name = 'def2-universal-jfit' +# auxbasis_name = 'sto-3g' +# auxbasis_name = 'def2-SVP' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'TPP.xyz' +# xyzFilename = 'Zn_TPP.xyz' +# xyzFilename = 'h2o.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + + +#Initialize a Mol object with somewhat large geometry +mol = Mol(coordfile=xyzFilename) + + +#Initialize a Basis object with a very large basis set +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasis_name)}) + +dftObj = DFT(mol, basis, auxbasis, xc=funcidcrysx) + +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 20 +dftObj.ncores = ncores +dftObj.save_ao_values = True +# Using CrysX grids +# To get the same energies as PySCF (level=5) upto 1e-7 au, use the following settings +# radial_precision=1.0e-13 +# level=3 +# pruning by density with threshold = 1e-011 +# alpha_min and alpha_max corresponding to QZVP +energyCrysX, dmat = dftObj.scf() +","Python" +"Quantum Chemistry","manassharma07/PyFock","examples/ex26_PBC_ring_gen.py",".py","1074","46","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from pyfock import Utils +from pyfock import PBC_ring + +from timeit import default_timer as timer +import numpy as np +import scipy + +ncores = 4 + +#LDA +funcx = 1 +funcc = 7 +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'sto-3g' + +auxbasis_name = 'def2-universal-jfit' + +xyzFilename = 'LiH.xyz' + + +#Initialize a Mol object with somewhat large geometry +unit_mol = Mol(coordfile=xyzFilename) +ring_mol = PBC_ring.ring(unit_mol, N=10, periodicity=3.2, periodic_dir = 'x', + output_xyz = True, xyz_filename = 'pbc_ring_10') + + +#Initialize a Basis object with a very large basis set +basis = Basis(ring_mol, {'all':Basis.load(mol=ring_mol, basis_name=basis_set_name)}) + +auxbasis = Basis(ring_mol, {'all':Basis.load(mol=ring_mol, basis_name=auxbasis_name)}) + +dftObj = DFT(ring_mol, basis, auxbasis, xc=funcidcrysx) + +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 20 +dftObj.ncores = ncores +dftObj.save_ao_values = True +energyCrysX, dmat = dftObj.scf() +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_3c2e_integrals.py",".py","5740","148","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer + +import numpy as np +import numba +import os + +ncores = 4 +bench_GPU = True + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + + +# 3c2e ERI + +# basis_set_name = '6-31G' +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'H2O.xyz' +# xyzFilename = 'Zn_dimer.xyz' +xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# auxbasisName = 'sto-3g' +# auxbasisName = '6-31G' +auxbasisName = 'def2-universal-jfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +# We also need an auxiliary basis for density fitting +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasisName)}) + +#Now we can calculate integrals using different algorithms + +#Let's calculate the complete ERI array using the explicit conventional formula (Slow) +print('\n\n\n') +print('Integrals') +print('3c2e ERI array (Conventional Algorithm)\n') +print('NAO: ', basis.bfs_nao) +print('NAO (aux): ', auxbasis.bfs_nao) +start=timer() +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI_conv = Integrals.conv_3c2e_symm(basis, auxbasis) +print(ERI_conv[0:7,0:7,0]) +duration = timer() - start +print('Duration for 3c2e ERI using PyFock Conventional algorithm: ',duration) + + +#Let's calculate the complete 3c2e ERI array using the Rys algorithm +print('\n\n\n') +print('Integrals') +print('3c2e ERI array (Rys)\n') +print('NAO: ', basis.bfs_nao) +print('NAO (aux): ', auxbasis.bfs_nao) +start=timer() +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI_rys = Integrals.rys_3c2e_symm(basis, auxbasis, schwarz=False) +print(ERI_rys[0:7,0:7,0]) +duration = timer() - start +print(abs(ERI_conv - ERI_rys).max()) +print('Duration for 3c2e ERI using PyFock Rys algorithm: ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrysX-PyFock (GPU)') + print('NAO: ', basis.bfs_nao) + print('NAO (aux): ', auxbasis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + ERI_rys_gpu = Integrals.rys_3c2e_symm_cupy(basis, auxbasis, schwarz=False) + print(ERI_rys_gpu[0:7,0:7,0]) + duration = timer() - start + print('Duration for 3c2e ERI using PyFock (GPU): ', duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(ERI_rys - cp.asnumpy(ERI_rys_gpu)).max()) + + print('\n\n\n') + print('CrysX-PyFock (GPU 32-bit)') + print('NAO: ', basis.bfs_nao) + print('NAO (aux): ', auxbasis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + ERI_rys_gpu_fp32 = Integrals.rys_3c2e_symm_cupy_fp32(basis, auxbasis, schwarz=False) + print(ERI_rys_gpu_fp32[0:7,0:7,0]) + duration = timer() - start + print('Duration for 3c2e ERI using PyFock (GPU 32-bit): ', duration) + import cupy as cp + print('Difference b/w CPU and GPU (32 bit) version: ', abs(ERI_rys - cp.asnumpy(ERI_rys_gpu_fp32)).max()) + + +#Comparison with PySCF +from pyscf import gto, dft, df +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + +auxmol = df.addons.make_auxmol(molPySCF, auxbasisName) + +#ERI array/tensor +start=timer() +ERI_pyscf = df.incore.aux_e2(molPySCF, auxmol, intor='int3c2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf[0:7,0:7,0]) +print('Array dimensions: ', ERI_pyscf.shape) +print('Duration for 3c2e ERI using PySCF: ',duration) +print(abs(ERI_pyscf - ERI_conv).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +# print(abs(ERI_pyscf - ERI_mmd).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_2c2e_integrals.py",".py","3738","107","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer + +import numpy as np +import numba +import os + +ncores = 4 +bench_GPU = True + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + + +# 2c2e ERI + + + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'H2O.xyz' +xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +# auxbasisName = 'sto-3g' +# auxbasisName = '6-31G' +# auxbasisName = 'def2-universal-jfit' +auxbasisName = 'def2-universal-jkfit' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +# We also need an auxiliary basis for density fitting +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasisName)}) + +#Now we can calculate integrals + + +#Let's calculate the complete 2c2e ERI array using the Rys algorithm +print('\n\n\n') +print('Integrals') +print('2c2e ERI array (Rys)\n') +print('NAO (aux): ', auxbasis.bfs_nao) +start=timer() +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI_rys = Integrals.rys_2c2e_symm(auxbasis) +print(ERI_rys) +duration = timer() - start +print('Duration for 2c2e ERI using PyFock Rys algorithm: ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrysX-PyFock (GPU)') + print('NAO (aux): ', auxbasis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + ERI_rys_gpu = Integrals.rys_2c2e_symm_cupy(auxbasis) + print(ERI_rys_gpu) + duration = timer() - start + print('Matrix dimensions: ', ERI_rys_gpu.shape) + print('Duration for 2c2e ERI using PyFock (GPU): ', duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(ERI_rys - cp.asnumpy(ERI_rys_gpu)).max()) + + +#Comparison with PySCF +from pyscf import gto, dft, df +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = auxbasisName +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + +auxmol = df.addons.make_auxmol(molPySCF, auxbasisName) + +#ERI array/tensor +start=timer() +ERI_pyscf = df.incore.aux_e2(molPySCF, auxmol, intor='int2c2e') +duration = timer() - start +print('\n\nPySCF') +print(ERI_pyscf) +print('Array dimensions: ', ERI_pyscf.shape) +print('Duration for 2c2e ERI using PySCF: ',duration) +print(abs(ERI_pyscf - ERI_rys).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +# print(abs(ERI_pyscf - ERI_mmd).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_Kinetic_Matrix.py",".py","5320","127","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer +import numpy as np +import os + +from pyscf import gto, dft +import numba + +ncores = 4 +bench_GPU = False + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + +#IMPORTANT +#Since, it seems that in order for the Numba implementation to work efficiently we must remove the compile time from the calculation. +#So, a very simple calculation on a very small system must be run before, to have the numba functions compiled. +mol_temp = Mol(coordfile='H2O.xyz') +basis_temp = Basis(mol_temp, {'all':Basis.load(mol=mol_temp, basis_name='sto-2g')}) +Vmat_temp = Integrals.nuc_mat_symm(basis_temp, mol_temp) + +#KINETIC POTENTIAL MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'H2O.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + + +print('\n\n\n') +print('CrysX-PyFock') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +start=timer() +# Vkin = Integrals.kin_mat_symm(basis) +Vkin = Integrals.kin_mat_symm(basis) +print(Vkin) +duration = timer() - start +print('Matrix dimensions: ', Vkin.shape) +print('Duration for Vkin using PyFock: ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrsX-PyFock (GPU)') + print('NAO: ', basis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + Vkin_gpu = Integrals.kin_mat_symm_cupy(basis) + print(Vkin_gpu) + duration = timer() - start + print('Matrix dimensions: ', Vkin_gpu.shape) + print('Duration for Vkin using PyFock (GPU): ',duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(Vkin - cp.asnumpy(Vkin_gpu)).max()) + + # print('\n\n\n') + # print('CrsX-PyFock (GPU) but looping over shells instead of BFs') + # print('NAO: ', basis.bfs_nao) + # #NOTE: The matrices are calculated in CAO basis and not the SAO basis + # #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + # start=timer() + # Vkin_gpu2 = Integrals.kin_mat_symm_shell_cupy(basis) + # print(Vkin_gpu2) + # duration = timer() - start + # print('Matrix dimensions: ', Vkin_gpu2.shape) + # print('Duration for Vkin using PyFock (GPU): ',duration) + # import cupy as cp + # print('Difference b/w CPU and GPU version: ', abs(Vkin - cp.asnumpy(Vkin_gpu2)).max()) + + +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#Kinetic mat +start=timer() +V = molPySCF.intor_symmetric('int1e_kin') +duration = timer() - start +print('\n\nPySCF') +print(V) +print('Matrix dimensions: ', V.shape) +print('Duration for Vkin using PySCF: ',duration) +print('Difference b/w PyFock (CPU) and PySCF: ', abs(V - Vkin).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +if bench_GPU: + print('Difference b/w PyFock (GPU) and PySCF: ',abs(V - cp.asnumpy(Vkin_gpu)).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. + # print('Difference b/w PyFock (GPU) (shell based) and PySCF: ',abs(V - cp.asnumpy(Vkin_gpu2)).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals.","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_Dipole_Matrix.py",".py","6126","174","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer +import numpy as np +import os + +from pyscf import gto, dft +import numba + +ncores = 4 +bench_GPU = False +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + + +#IMPORTANT +start=timer() +#Since, it seems that in order for the Numba implementation to work efficiently we must remove the compile time from the calculation. +#So, a very simple calculation on a very small system must be run before, to have the numba functions compiled. +mol_temp = Mol(coordfile='H2O.xyz') +basis_temp = Basis(mol_temp, {'all':Basis.load(mol=mol_temp, basis_name='sto-2g')}) +Vmat_temp = Integrals.dipole_moment_mat_symm(basis_temp) +duration = timer() - start +print('Compilation duration: ',duration) + + +#DIPOLE MOMENT MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# # basis_set_name = 'sto-2g' +basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'Adenine-Thymine.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'TPP.xyz' +# xyzFilename = 'Zn_TPP.xyz' +# xyzFilename = 'H2O.xyz' + +# xyzFilename = 'Caffeine.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'C60.xyz' +xyzFilename = 'Taxol.xyz' +# xyzFilename = 'Valinomycin.xyz' +# xyzFilename = 'Olestra.xyz' +# xyzFilename = 'Ubiquitin.xyz' + +### 1D Carbon Alkanes +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +### 2D Carbon +# xyzFilename = 'Graphene_C16.xyz' +# xyzFilename = 'Graphene_C76.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + +### 3d Carbon Fullerenes +# xyzFilename = 'C60.xyz' +# xyzFilename = 'C70.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) +# origin = mol.get_center_of_charge() +origin = np.zeros((3)) +print('Gauge origin: ', origin) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + + +print('\n\n\n') +print('CrysX-PyFock MMD') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +start=timer() +M_mmd = Integrals.dipole_moment_mat_symm(basis, origin=origin) +print(M_mmd[0]) +duration = timer() - start +print('Matrix dimensions: ', M_mmd.shape) +print('Duration for M using PyFock (MMD): ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrsX-PyFock MMD (GPU)') + print('NAO: ', basis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + M_mmd_gpu = Integrals.dipole_moment_mat_symm_cupy(basis) + print(M_mmd_gpu[0]) + duration = timer() - start + print('Matrix dimensions: ', M_mmd_gpu.shape) + print('Duration for M using PyFock (GPU): ',duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(M_mmd - cp.asnumpy(M_mmd_gpu)).max()) + + +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +# Dipole moment mat +start=timer() +with molPySCF.with_common_orig(origin): + M = molPySCF.intor_symmetric('int1e_r', comp=3) +duration = timer() - start +print('\n\nPySCF') +print(M[0]) +print('Matrix dimensions: ', M.shape) +print('Duration for M using PySCF: ',duration) +print('Difference b/w PyFock (CPU) and PySCF: ', abs(M - M_mmd).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +if bench_GPU: + print('Difference b/w PyFock (GPU) and PySCF: ',abs(M - cp.asnumpy(M_mmd_gpu)).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. + + +# Calculate dipole moment +mf = dft.rks.RKS(molPySCF) +mf.init_guess = 'minao' +dmat = mf.init_guess_by_minao(molPySCF) + +print('Dipole moment PySCF') +print(mf.dip_moment(molPySCF, dmat, unit='AU')) +el_dip = np.einsum('xij,ji->x', M, dmat).real +charges = molPySCF.atom_charges() +coords = molPySCF.atom_coords() +nucl_dip = np.einsum('i,ix->x', charges, coords) +mol_dip = nucl_dip - el_dip +print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + +print('Dipole moment CrysX-PyFock') +# el_dip = np.einsum('xij,ji->x', M_mmd, dmat).real +# charges = mol.Zcharges +# coords = mol.coordsBohrs +# nucl_dip = np.einsum('i,ix->x', charges, coords) +# mol_dip = nucl_dip - el_dip +mol_dip = mol.get_dipole_moment(M_mmd, dmat) +print('Dipole moment(X, Y, Z, A.U.):', *mol_dip)","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_4c2e_integrals.py",".py","5376","142","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer + +import numpy as np +import numba + +ncores = 4 +numba.set_num_threads(ncores) + + +#IMPORTANT +#Since, it seems that in order for the Numba implementation to work efficiently we must remove the compile time from the calculation. +#So, a very simple calculation on a very small system must be run before, to have the numba functions compiled. +mol_temp = Mol(coordfile='H2O.xyz') +basis_temp = Basis(mol_temp, {'all':Basis.load(mol=mol_temp, basis_name='sto-2g')}) +# Vmat_temp = Integrals.mmd_4c2e_symm(basis_temp) +Vmat_temp = Integrals.rys_4c2e_symm(basis_temp) +Vmat_temp = Integrals.rys_4c2e_symm_old(basis_temp) +Vmat_temp = Integrals.conv_4c2e_symm(basis_temp) + + +# 4c2e ERI via explicit conventional integrals (quite slow) + +# basis_set_name = '6-31G' +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'ano-rcc' +# basis_set_name = 'cc-pVDZ' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'H2O.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +#Now we can calculate integrals using different algorithms + +#Let's calculate the complete ERI array using the explicit conventional formula (Slow) +print('\n\n\n') +print('Integrals') +print('4c2e ERI array (Conventional Algorithm)\n') +print('NAO: ', basis.bfs_nao) +start=timer() +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI_conv = Integrals.conv_4c2e_symm(basis) +print(ERI_conv[0:7,0:7,0,0]) +duration = timer() - start +print('Duration for ERI using PyFock Conventional algorithm: ',duration) + + +#Let's calculate the complete ERI array using the MMD algorithm +# print('\n\n\n') +# print('Integrals') +# print('4c2e ERI array (MMD) (Unstable as gives segmentation fault on the second run)\n') +# print('NAO: ', basis.bfs_nao) +# start=timer() +# #NOTE: The matrices are calculated in CAO basis and not the SAO basis +# #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +# ERI_mmd = Integrals.mmd_4c2e_symm(basis) +# print(ERI_mmd[0:7,0:7,0,0]) +# duration = timer() - start +# print(abs(ERI_conv - ERI_mmd).max()) +# print('Duration for ERI using PyFock MMD algorithm: ',duration) + +#Let's calculate the complete ERI array using the Rys algorithm +print('\n\n\n') +print('Integrals') +print('4c2e ERI array (Rys Old)\n') +print('NAO: ', basis.bfs_nao) +start=timer() +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI_rys = Integrals.rys_4c2e_symm_old(basis) +print(ERI_rys[0:7,0:7,0,0]) +duration = timer() - start +print(abs(ERI_conv - ERI_rys).max()) +print('Duration for ERI using PyFock Rys algorithm: ',duration) + +#Let's calculate the complete ERI array using the Rys algorithm +print('\n\n\n') +print('Integrals') +print('4c2e ERI array (Rys New)\n') +print('NAO: ', basis.bfs_nao) +start=timer() +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +ERI_rys = Integrals.rys_4c2e_symm(basis) +print(ERI_rys[0:7,0:7,0,0]) +duration = timer() - start +print(abs(ERI_conv - ERI_rys).max()) +print('Duration for ERI using PyFock Rys algorithm: ',duration) + + +#Comparison with PySCF +from pyscf import gto, dft +from timeit import default_timer as timer +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#ERI array/tensor +start=timer() +# ERI_pyscf = molPySCF.intor('int2e',aosym='s8') +ERI_pyscf = molPySCF.intor('int2e') +duration = timer() - start +print('\n\nPySCF') +# print(ERI_pyscf[0:7,0:7,0,0]) +print('Array dimensions: ', ERI_pyscf.shape) +print('Duration for ERI using PySCF: ',duration) +print(abs(ERI_pyscf - ERI_conv).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +# print(abs(ERI_pyscf - ERI_mmd).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_factorial.py",".py","1159","43","import numpy as np +from pyfock.Integrals.integral_helpers import fastFactorial, fastFactorial_old +# from pyfock import Integrals +from numba import njit +from timeit import default_timer as timer + +start=timer() + +# 100 million evaluations of the boys function. +N = 100000000 +np.random.seed(0) +n_vals = np.random.randint(0, 20, N)#.astype(float) + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def test_new(n_vals, N): + x = np.zeros((N),dtype=np.int64) + for i in range(N): # Million runs + x[i] = fastFactorial(n_vals[i]) + return x + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def test_old(n_vals, N): + x = np.zeros((N),dtype=np.int64) + for i in range(N): # Million runs + x[i] = fastFactorial_old(n_vals[i]) + return x + +duration = timer() - start +print('Duration preliminaries: ',duration) + +start=timer() +x_new = test_new(n_vals, N) # Cached +duration = timer() - start +print('Duration new: ',duration) +# Duration new: 0.3832744919927791 +start=timer() +x_old = test_old(n_vals, N) # Cached +duration = timer() - start +print('Duration old: ',duration) +print(abs(x_new-x_old).max()) +# Duration old: 1.1192696560174227 +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_Overlap_Matrix.py",".py","4268","113","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer +import numpy as np +import os + +from pyscf import gto, dft +import numba + +ncores = 4 +bench_GPU = True + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + +#IMPORTANT +#Since, it seems that in order for the Numba implementation to work efficiently we must remove the compile time from the calculation. +#So, a very simple calculation on a very small system must be run before, to have the numba functions compiled. +mol_temp = Mol(coordfile='H2O.xyz') +basis_temp = Basis(mol_temp, {'all':Basis.load(mol=mol_temp, basis_name='sto-2g')}) +Vmat_temp = Integrals.nuc_mat_symm(basis_temp, mol_temp) + +#OVERLAP MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-TZVPPD' +basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'H2O.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + + +print('\n\n\n') +print('CrysX-PyFock') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +start=timer() +S = Integrals.overlap_mat_symm(basis) +print(S) +duration = timer() - start +print('Matrix dimensions: ', S.shape) +print('Duration for S using PyFock: ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrsX-PyFock (GPU)') + print('NAO: ', basis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + S_gpu = Integrals.overlap_mat_symm_cupy(basis) + print(S_gpu) + duration = timer() - start + print('Matrix dimensions: ', S_gpu.shape) + print('Duration for S using PyFock (GPU): ',duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(S - cp.asnumpy(S_gpu)).max()) + + +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +S_pyscf = molPySCF.intor_symmetric('int1e_ovlp') +duration = timer() - start +print('\n\nPySCF') +print(S_pyscf) +print('Matrix dimensions: ', S_pyscf.shape) +print('Duration for S using PySCF: ',duration) +print('Difference b/w PyFock (CPU) and PySCF: ', abs(S_pyscf - S).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +if bench_GPU: + print('Difference b/w PyFock (GPU) and PySCF: ',abs(S_pyscf - cp.asnumpy(S_gpu)).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. + ","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_boys.py",".py","1813","56","import numpy as np +from pyfock.Integrals.integral_helpers import Fboys, Fboys_old, Fboys_jjgoings +# from pyfock import Integrals +from numba import njit +from timeit import default_timer as timer + + +# 100 million evaluations of the boys function. +N = 100000000 +np.random.seed(0) +n_vals = np.random.randint(0, 10, N)#.astype(float) +x_vals = np.random.uniform(0.0, 35.0, N) + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def test_new(x_vals, n_vals, N): + x = np.zeros((N)) + for i in range(N): # Million runs + x[i] = Fboys(n_vals[i], x_vals[i]) + return x + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def test_old(x_vals, n_vals, N): + x = np.zeros((N)) + for i in range(N): # Million runs + x[i] = Fboys_old(n_vals[i], x_vals[i]) + return x + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def test_jjgoings(x_vals, n_vals, N): + x = np.zeros((N)) + for i in range(N): # Million runs + x[i] = Fboys_jjgoings(n_vals[i], x_vals[i]) + return x + +start=timer() +x_new = test_new(x_vals, n_vals, N) # Cached +duration = timer() - start +print('Duration new: ',duration) +# Duration new: 4.23387262201868 + +start=timer() +x_old = test_old(x_vals, n_vals, N) # Gets compiled at runtime (cant be cached) +duration = timer() - start +print('Duration old: ',duration) +print(abs(x_new-x_old).max()) +# Duration old: 11.750024079985451 + +start=timer() +x_jjgoings = test_jjgoings(x_vals, n_vals, N) # Gets compiled at runtime (cant be cached) +duration = timer() - start +print('Duration jjgoings: ',duration) +print(abs(x_jjgoings-x_old).max()) +# Duration : 36.23037774604745 + +# Results look good compared to here: https://github.com/adabbott/Research_Notes/blob/13327abe82a3576dd95df038e24007645071bc13/Quax_dev_archive/integrals_dev/tei_trials/teis_trial7/taketa_test/test.py","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_Overlap_Matrix_Gradient.py",".py","5372","143","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer +import numpy as np +import os + +from pyscf import gto, dft +import numba + +ncores = 4 +bench_GPU = False + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + + +#OVERLAP MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# basis_set_name = 'sto-2g' +basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +xyzFilename = 'H2.xyz' +# xyzFilename = 'H2O.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + + +print('\n\n\n') +print('CrysX-PyFock') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +start=timer() +dS = Integrals.overlap_mat_grad_symm(basis) +print(dS) +duration = timer() - start +print('Matrix dimensions: ', dS.shape) +print('Duration for dS using PyFock: ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrsX-PyFock (GPU)') + print('NAO: ', basis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + dS_gpu = Integrals.overlap_mat_symm_cupy(basis) + print(dS_gpu) + duration = timer() - start + print('Matrix dimensions: ', dS_gpu.shape) + print('Duration for dS using PyFock (GPU): ',duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(dS - cp.asnumpy(dS_gpu)).max()) + + +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#Overlap mat +start=timer() +dS_pyscf = -molPySCF.intor_symmetric('int1e_ipovlp', comp=3) +dS_pyscf = dS_pyscf #+ dS_pyscf.transpose(0,2,1) +duration = timer() - start +print('\n\nPySCF') +# print(dS_pyscf) +print('Matrix dimensions (partial dS): ', dS_pyscf.shape) +print('Duration for dS (partial) using PySCF: ', duration) + +# https://github.com/pyscf/pyscf/issues/1067 +# https://github.com/jcandane/HF_Gradient/blob/main/PySCF_Gradients.ipynb +def S_deriv(atom_id, S_xAB, mol): + shl0, shl1, p0, p1 = mol.aoslice_by_atom()[atom_id] +# print(p0, p1) + + vrinv = np.zeros(S_xAB.shape) + vrinv[:, p0:p1, :] += S_xAB[:, p0:p1, :] + # vrinv[:, :, p0:p1] = S_xAB[:, :, p0:p1] + + final = vrinv + vrinv.swapaxes(1,2)#vrinv.transpose(0, 2, 1) + # Set derivatives to zero for basis functions on the same atom using numpy indexing + final[:, p0:p1, p0:p1] = 0.0 + # if atom_id!=0: + # final = -final + # if atom_id!=0: + # for i in range(0, atom_id): + # shl0, shl1, p0, p1 = mol.aoslice_by_atom()[i] + # final[:, p0:p1, :] = -final[:, p0:p1, :] + # final[:, :, p0:p1] = -final[:, :, p0:p1] + if atom_id != 0: + slices = np.array([mol.aoslice_by_atom()[i] for i in range(atom_id)]) + for shl0, shl1, p0, p1 in slices: + final[:, p0:p1, :] = -final[:, p0:p1, :] + final[:, :, p0:p1] = -final[:, :, p0:p1] + return final +# S_xAB = -mol.intor('int1e_ipovlp', comp=3) +dS_pyscf_full = np.zeros(((len(molPySCF.aoslice_by_atom()),) + dS_pyscf.shape)) +for iatom in range(len(molPySCF.aoslice_by_atom())): + dS_pyscf_full[iatom] = S_deriv(iatom, dS_pyscf, molPySCF) + +duration = timer() - start +print('Duration for dS (full) using PySCF: ',duration) +# print(dS_pyscf_full) +print('Matrix dimensions (full dS): ', dS_pyscf_full.shape) +print('Difference b/w PyFock (CPU) and PySCF: ', abs(dS_pyscf_full - dS).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +if bench_GPU: + print('Difference b/w PyFock (GPU) and PySCF: ',abs(dS_pyscf_full - cp.asnumpy(dS_gpu)).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. + ","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_Nuclear_Matrix.py",".py","6133","148","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer +import numpy as np +import os +from pyscf import gto, dft +import numba + +ncores = 4 +bench_GPU = False + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + + +#IMPORTANT +#Since, it seems that in order for the Numba implementation to work efficiently we must remove the compile time from the calculation. +#So, a very simple calculation on a very small system must be run before, to have the numba functions compiled. +mol_temp = Mol(coordfile='H2O.xyz') +basis_temp = Basis(mol_temp, {'all':Basis.load(mol=mol_temp, basis_name='sto-2g')}) +Vmat_temp = Integrals.nuc_mat_symm(basis_temp, mol_temp) +Vmat_temp = Integrals.rys_nuc_mat_symm(basis_temp, mol_temp) +Vmat_temp = Integrals.mmd_nuc_mat_symm(basis_temp, mol_temp) + +#NUCLEAR POTENTIAL MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'H2O.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'TPP.xyz' +# xyzFilename = 'Zn_TPP.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) +#basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-svp')}) + + +print('\n\n\n') +print('CrysX-PyFock') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +start=timer() +Vnuc_conv = Integrals.nuc_mat_symm(basis, mol) +print(Vnuc_conv) +duration = timer() - start +print('Matrix dimensions: ', Vnuc_conv.shape) +print('Duration for Vnuc using PyFock: ',duration) + +# print('\n\n\n') +# print('CrysX-PyFock Rys (3c2e Integral scheme with sharp gaussians at nuclear centers)') +# print('NAO: ', basis.bfs_nao) +# #NOTE: The matrices are calculated in CAO basis and not the SAO basis +# #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +# start=timer() +# Vnuc_rys = Integrals.rys_nuc_mat_symm(basis, mol) +# print(Vnuc_rys) +# duration = timer() - start +# print('Matrix dimensions: ', Vnuc_rys.shape) +# print(abs(Vnuc_rys-Vnuc_conv).max()) +# print('Duration for Vnuc using PyFock (Rys 3c2e): ',duration) + +# print('\n\n\n') +# print('CrysX-PyFock MMD (Unstable as gives segmentation fault sometimes)') +# print('NAO: ', basis.bfs_nao) +# #NOTE: The matrices are calculated in CAO basis and not the SAO basis +# #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +# start=timer() +# Vnuc_mmd = Integrals.mmd_nuc_mat_symm(basis, mol) +# print(Vnuc_mmd) +# duration = timer() - start +# print('Matrix dimensions: ', Vnuc_mmd.shape) +# print(abs(Vnuc_mmd-Vnuc_conv).max()) +# print('Duration for Vnuc using PyFock (MMD): ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrysX-PyFock (GPU)') + print('NAO: ', basis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + Vnuc_gpu = Integrals.nuc_mat_symm_cupy(basis, mol) + print(Vnuc_gpu) + duration = timer() - start + print('Matrix dimensions: ', Vnuc_gpu.shape) + print('Duration for Vnuc using PyFock (GPU): ',duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(Vnuc_conv - cp.asnumpy(Vnuc_gpu)).max()) + + +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +V = molPySCF.intor_symmetric('int1e_nuc') +duration = timer() - start +print('\n\nPySCF') +print(V) +print('Matrix dimensions: ', V.shape) +print('Duration for Vnuc using PySCF: ',duration) +print('Difference b/w PyFock (default) and PySCF: ',abs(V - Vnuc_conv).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +# print('Difference b/w PyFock (Rys) and PySCF: ',abs(V - Vnuc_rys).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +# print('Difference b/w PyFock (MMD) and PySCF: ',abs(V - Vnuc_mmd).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +if bench_GPU: + print('Difference b/w PyFock (GPU) and PySCF: ',abs(V - cp.asnumpy(Vnuc_gpu)).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. + ","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_Cross_Overlap_Matrix.py",".py","4408","127","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer +import numpy as np +import os + +from pyscf import gto, dft +import numba + +ncores = 4 + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + +#IMPORTANT +#Since, it seems that in order for the Numba implementation to work efficiently we must remove the compile time from the calculation. +#So, a very simple calculation on a very small system must be run before, to have the numba functions compiled. +mol_temp = Mol(coordfile='H2O.xyz') +basis_temp = Basis(mol_temp, {'all':Basis.load(mol=mol_temp, basis_name='sto-2g')}) +Vmat_temp = Integrals.overlap_mat_symm(basis_temp) + +#OVERLAP MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# basis_set_nameA = 'sto-2g' +basis_set_nameA = 'sto-3g' +# basis_set_nameA = 'sto-6g' +# basis_set_nameA = 'def2-SVP' +# basis_set_nameA = 'def2-DZVP' +# basis_set_nameA = 'def2-TZVP' +# basis_set_nameA = 'def2-TZVPPD' +# basis_set_nameA = 'def2-QZVPPD' +# basis_set_nameA = 'ano-rcc' + +# basis_set_nameB = 'sto-2g' +basis_set_nameB = 'sto-3g' +# basis_set_nameB = 'sto-6g' +# basis_set_nameB = 'def2-SVP' +# basis_set_nameB = 'def2-DZVP' +# basis_set_nameB = 'def2-TZVP' +# basis_set_nameB = 'def2-TZVPPD' +# basis_set_nameB = 'def2-QZVPPD' +# basis_set_nameB = 'ano-rcc' + +# xyzFilenameA = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilenameA = 'H2O.xyz' +# xyzFilenameA = 'Ethane.xyz' +# xyzFilenameA = 'Cholesterol.xyz' +# xyzFilenameA = 'Serotonin.xyz' +xyzFilenameA = 'Decane_C10H22.xyz' +# xyzFilenameA = 'Icosane_C20H42.xyz' +# xyzFilenameA = 'Tetracontane_C40H82.xyz' +# xyzFilenameA = 'Pentacontane_C50H102.xyz' +# xyzFilenameA = 'Octacontane_C80H162.xyz' +# xyzFilenameA = 'Hectane_C100H202.xyz' +# xyzFilenameA = 'Icosahectane_C120H242.xyz' + +# xyzFilenameB = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilenameB = 'H2O.xyz' +# xyzFilenameB = 'Ethane.xyz' +# xyzFilenameB = 'Cholesterol.xyz' +# xyzFilenameB = 'Serotonin.xyz' +# xyzFilenameB = 'Decane_C10H22.xyz' +# xyzFilenameB = 'Icosane_C20H42.xyz' +# xyzFilenameB = 'Tetracontane_C40H82.xyz' +# xyzFilenameB = 'Pentacontane_C50H102.xyz' +# xyzFilenameB = 'Octacontane_C80H162.xyz' +# xyzFilenameB = 'Hectane_C100H202.xyz' +xyzFilenameB = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +molA = Mol(coordfile = xyzFilenameA) +molB = Mol(coordfile = xyzFilenameB) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basisA = Basis(molA, {'all':Basis.load(mol=molA, basis_name=basis_set_nameA)}) +basisB = Basis(molB, {'all':Basis.load(mol=molB, basis_name=basis_set_nameB)}) + + + +print('\n\n\n') +print('CrysX-PyFock') +print('NAO (A): ', basisA.bfs_nao) +print('NAO (B): ', basisB.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +start=timer() +S_AB = Integrals.cross_overlap_mat_symm(basisA, basisB) +print(S_AB) +duration = timer() - start +print('Matrix dimensions: ', S_AB.shape) +print('Duration for S using PyFock: ',duration) + + + +#Comparison with PySCF +molPySCFA = gto.Mole() +molPySCFA.atom = xyzFilenameA +molPySCFA.basis = basis_set_nameA +molPySCFA.cart = True +molPySCFA.build() + +molPySCFB = gto.Mole() +molPySCFB.atom = xyzFilenameB +molPySCFB.basis = basis_set_nameB +molPySCFB.cart = True +molPySCFB.build() + + +#Nuclear mat +start=timer() +# V = molPySCF.intor('int1e_nuc') +S_AB_pyscf = gto.intor_cross('int1e_ovlp', molPySCFA, molPySCFB) +duration = timer() - start +print('\n\nPySCF') +print(S_AB_pyscf) +print('Matrix dimensions: ', S_AB_pyscf.shape) +print('Duration for S using PySCF: ',duration) +print('Difference b/w PyFock (CPU) and PySCF: ', abs(S_AB_pyscf - S_AB).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_Kinetic_Matrix_Gradient.py",".py","4928","133","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from timeit import default_timer as timer +import numpy as np +import os + +from pyscf import gto, dft +import numba + +ncores = 4 +bench_GPU = False + +numba.set_num_threads(ncores) +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 + + +#OVERLAP MATRIX BENCHMARK and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-DZVP' +basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'ano-rcc' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'H2.xyz' +# xyzFilename = 'H2O.xyz' +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +#First of all we need a mol object with some geometry +mol = Mol(coordfile = xyzFilename) + +# Next we need to specify some basis +# The basis set can then be used to calculate things like Overlap, KE, integrals/matrices. +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + + +print('\n\n\n') +print('CrysX-PyFock') +print('NAO: ', basis.bfs_nao) +#NOTE: The matrices are calculated in CAO basis and not the SAO basis +#You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. +start=timer() +dT = Integrals.kin_mat_grad_symm(basis) +print(dT) +duration = timer() - start +print('Matrix dimensions: ', dT.shape) +print('Duration for dT using PyFock: ',duration) + +if bench_GPU: + print('\n\n\n') + print('CrsX-PyFock (GPU)') + print('NAO: ', basis.bfs_nao) + #NOTE: The matrices are calculated in CAO basis and not the SAO basis + #You should refer to the example that shows the transformation between the two if you need matrices in SAO basis. + start=timer() + dT_gpu = Integrals.overlap_mat_symm_cupy(basis) + print(dT_gpu) + duration = timer() - start + print('Matrix dimensions: ', dT_gpu.shape) + print('Duration for dS using PyFock (GPU): ',duration) + import cupy as cp + print('Difference b/w CPU and GPU version: ', abs(dT - cp.asnumpy(dT_gpu)).max()) + + +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.build() +#print(molPySCF.cart_labels()) + + +#Overlap mat +start=timer() +dT_pyscf = -molPySCF.intor_symmetric('int1e_ipkin', comp=3) +dT_pyscf = dT_pyscf #+ dS_pyscf.transpose(0,2,1) +duration = timer() - start +print('\n\nPySCF') +# print(dT_pyscf) +print('Matrix dimensions (partial dT): ', dT_pyscf.shape) +print('Duration for dT (partial) using PySCF: ', duration) + +# https://github.com/pyscf/pyscf/issues/1067 +# https://github.com/jcandane/HF_Gradient/blob/main/PySCF_Gradients.ipynb +def T_deriv(atom_id, T_xAB, mol): + shl0, shl1, p0, p1 = mol.aoslice_by_atom()[atom_id] + + vrinv = np.zeros(T_xAB.shape) + vrinv[:, p0:p1, :] += T_xAB[:, p0:p1, :] + + final = vrinv + vrinv.transpose(0, 2, 1) + # Set derivatives to zero for basis functions on the same atom using numpy indexing + final[:, p0:p1, p0:p1] = 0.0 + if atom_id!=0: + for i in range(0, atom_id): + shl0, shl1, p0, p1 = mol.aoslice_by_atom()[i] + final[:, p0:p1, :] = -final[:, p0:p1, :] + final[:, :, p0:p1] = -final[:, :, p0:p1] + return final +dT_pyscf_full = np.zeros(((len(molPySCF.aoslice_by_atom()),) + dT_pyscf.shape)) +for iatom in range(len(molPySCF.aoslice_by_atom())): + dT_pyscf_full[iatom] = T_deriv(iatom, dT_pyscf, molPySCF) + +duration = timer() - start +print('Duration for dS (full) using PySCF: ',duration) +print(dT_pyscf_full) +print('Matrix dimensions (full dS): ', dT_pyscf_full.shape) +print('Difference b/w PyFock (CPU) and PySCF: ', abs(dT_pyscf_full - dT).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. +if bench_GPU: + print('Difference b/w PyFock (GPU) and PySCF: ',abs(dT_pyscf_full - cp.asnumpy(dT_gpu)).max()) #There will sometimes be a difference b/w PySCF and CrysX values because PySCF doesn't normalize d,f,g orbitals. + ","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_DFT_LDA_4c2e.py",".py","9068","290","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(25000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +funcx = 1 +funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +# funcx = 101 +# funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = '6-31G' +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-SVPD' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-TZVPP' +# basis_set_name = 'def2-QZVPP' +# basis_set_name = 'def2-TZVPD' +# basis_set_name = 'def2-QZVPD' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'cc-pVDZ' +# basis_set_name = 'ano-rcc' + + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'Adenine-Thymine.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'TPP.xyz' +# xyzFilename = 'Zn_TPP.xyz' +# xyzFilename = 'H2O.xyz' + +# xyzFilename = 'Caffeine.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'C60.xyz' +# xyzFilename = 'Taxol.xyz' +# xyzFilename = 'Valinomycin.xyz' +# xyzFilename = 'Olestra.xyz' +# xyzFilename = 'Ubiquitin.xyz' + +### 1D Carbon Alkanes +# xyzFilename = 'Ethane.xyz' +xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +### 2D Carbon +# xyzFilename = 'Graphene_C16.xyz' +# xyzFilename = 'Graphene_C76.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + +### 3d Carbon Fullerenes +# xyzFilename = 'C60.xyz' +# xyzFilename = 'C70.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + + +# ---------PySCF--------------- +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.verbose = 4 +molPySCF.max_memory=5000 +# molPySCF.incore_anyway = True # Keeps the PySCF ERI integrals incore +molPySCF.build() +#print(molPySCF.cart_labels()) + +print('\n\nPySCF Results\n\n') +start=timer() +mf = dft.rks.RKS(molPySCF) +# mf = scf.RHF(molPySCF) +mf.xc = funcidpyscf +# mf.verbose = 4 +mf.direct_scf = False +# mf.with_df.max_memory = 25000 +# dmat_init = mf.init_guess_by_1e(molPySCF) +# dmat_init = mf.init_guess_by_huckel(molPySCF) +mf.init_guess = 'minao' +dmat_init = mf.init_guess_by_minao(molPySCF) +# mf.init_guess = 'atom' +# dmat_init = mf.init_guess_by_atom(molPySCF) +mf.max_cycle = 30 +mf.conv_tol = 1e-7 +mf.grids.level = 3 +# print('begin df build') +# start_df_pyscf=timer() +# mf.with_df.build() +# duration_df_pyscf = timer()- start_df_pyscf +# print('PySCF df time: ', duration_df_pyscf) +# print('end df build') +energyPyscf = mf.kernel(dm0=dmat_init) +print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) +print('One electron integrals energy',mf.scf_summary['e1']) +print('Coulomb energy ',mf.scf_summary['coul']) +print('EXC ',mf.scf_summary['exc']) +duration = timer()-start +print('PySCF time: ', duration) +pyscfGrids = mf.grids +print('PySCF Grid Size: ', pyscfGrids.weights.shape) +print('\n\n PySCF Dipole moment') +dmat = mf.make_rdm1() +mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') +mf = 0#None +import psutil + +# Get memory information +memory_info = psutil.virtual_memory() + +# Convert bytes to human-readable format +used_memory = psutil._common.bytes2human(memory_info.used) + + +# If you want to print in a more human-readable format, you can use psutil's utility function +print(f""Currently Used memory: {used_memory}"") +#--------------------CrysX -------------------------- + +#Initialize a Mol object with somewhat large geometry +molCrysX = Mol(coordfile=xyzFilename) +print('\n\nNatoms :',molCrysX.natoms) +# print(molCrysX.coordsBohrs) + +#Initialize a Basis object with a very large basis set +basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) +print('\n\nNAO :',basis.bfs_nao) + + +dftObj = DFT(molCrysX, basis, xc=funcidcrysx, grids=pyscfGrids) +dftObj.dmat = dmat_init +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 35 +dftObj.ncores = ncores +dftObj.save_ao_values = True +dftObj.isDF = False +dftObj.rys = True +dftObj.blocksize = 5000 +dftObj.XC_algo = 2 +dftObj.debug = False +dftObj.sortGrids = False +dftObj.xc_bf_screen = True +# dftObj.threshold_schwarz = 1e-9 +dftObj.strict_schwarz = False +# dftObj.cholesky = True +dftObj.orthogonalize = True +# SAO or CAO basis +dftObj.sao = False + +# GPU acceleration +dftObj.use_gpu = False +dftObj.keep_ao_in_gpu = False +dftObj.use_libxc = False +dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference +dftObj.n_gpus = 1 # Specify the number of GPUs +dftObj.free_gpu_mem = True +dftObj.threads_x = 32 +dftObj.threads_y = 32 +dftObj.dynamic_precision = False +dftObj.keep_ints3c2e_in_gpu = True + +# print(dmat_init) +# Using PySCF grids to compare the energies +energyCrysX, dmat = dftObj.scf() +# print(dmat) + +# Using CrysX grids +# To get the same energies as PySCF (level=5) upto 1e-7 au, use the following settings +# radial_precision=1.0e-13 +# level=3 +# pruning by density with threshold = 1e-011 +# alpha_min and alpha_max corresponding to QZVP +# energyCrysX, dmat = dftObj.scf() + + +print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + +print('\n\nPyFock Dipole moment') +M = Integrals.dipole_moment_mat_symm(basis) +mol_dip = molCrysX.get_dipole_moment(M, dmat) +print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) +print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/benchmark_DFT_LDA_DF.py",".py","9464","298","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(25000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = '6-31G' +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-SVPD' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-TZVPP' +# basis_set_name = 'def2-QZVPP' +# basis_set_name = 'def2-TZVPD' +# basis_set_name = 'def2-QZVPD' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'cc-pVDZ' +# basis_set_name = 'ano-rcc' + +auxbasis_name = 'def2-universal-jfit' +# auxbasis_name = 'def2-universal-jkfit' +# auxbasis_name = 'def2-TZVP' +# auxbasis_name = 'sto-3g' +# auxbasis_name = 'def2-SVP' +# auxbasis_name = '6-31G' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'Adenine-Thymine.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'TPP.xyz' +# xyzFilename = 'Zn_TPP.xyz' +xyzFilename = 'H2O.xyz' + +# xyzFilename = 'Caffeine.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'C60.xyz' +# xyzFilename = 'Taxol.xyz' +# xyzFilename = 'Valinomycin.xyz' +# xyzFilename = 'Olestra.xyz' +# xyzFilename = 'Ubiquitin.xyz' + +### 1D Carbon Alkanes +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +### 2D Carbon +# xyzFilename = 'Graphene_C16.xyz' +# xyzFilename = 'Graphene_C76.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + +### 3d Carbon Fullerenes +# xyzFilename = 'C60.xyz' +# xyzFilename = 'C70.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + + +# ---------PySCF--------------- +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.verbose = 4 +molPySCF.max_memory=5000 +# molPySCF.incore_anyway = True # Keeps the PySCF ERI integrals incore +molPySCF.build() +#print(molPySCF.cart_labels()) + +print('\n\nPySCF Results\n\n') +start=timer() +mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) +# mf = scf.RHF(molPySCF).density_fit(auxbasis=auxbasis_name) +mf.xc = funcidpyscf +# mf.verbose = 4 +mf.direct_scf = False +# mf.with_df.max_memory = 25000 +# dmat_init = mf.init_guess_by_1e(molPySCF) +# dmat_init = mf.init_guess_by_huckel(molPySCF) +mf.init_guess = 'minao' +dmat_init = mf.init_guess_by_minao(molPySCF) +# mf.init_guess = 'atom' +# dmat_init = mf.init_guess_by_atom(molPySCF) +mf.max_cycle = 30 +mf.conv_tol = 1e-7 +mf.grids.level = 3 +# print('begin df build') +# start_df_pyscf=timer() +# mf.with_df.build() +# duration_df_pyscf = timer()- start_df_pyscf +# print('PySCF df time: ', duration_df_pyscf) +# print('end df build') +energyPyscf = mf.kernel(dm0=dmat_init) +print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) +print('One electron integrals energy',mf.scf_summary['e1']) +print('Coulomb energy ',mf.scf_summary['coul']) +print('EXC ',mf.scf_summary['exc']) +duration = timer()-start +print('PySCF time: ', duration) +pyscfGrids = mf.grids +print('PySCF Grid Size: ', pyscfGrids.weights.shape) +print('\n\n PySCF Dipole moment') +dmat = mf.make_rdm1() +mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') +mf = 0#None +import psutil + +# Get memory information +memory_info = psutil.virtual_memory() + +# Convert bytes to human-readable format +used_memory = psutil._common.bytes2human(memory_info.used) + + +# If you want to print in a more human-readable format, you can use psutil's utility function +print(f""Currently Used memory: {used_memory}"") +#--------------------CrysX -------------------------- + +#Initialize a Mol object with somewhat large geometry +molCrysX = Mol(coordfile=xyzFilename) +print('\n\nNatoms :',molCrysX.natoms) +# print(molCrysX.coordsBohrs) + +#Initialize a Basis object with a very large basis set +basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) +print('\n\nNAO :',basis.bfs_nao) + +auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) +print('\n\naux NAO :',auxbasis.bfs_nao) + +dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) +dftObj.dmat = dmat_init +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 35 +dftObj.ncores = ncores +dftObj.save_ao_values = False +dftObj.rys = True +dftObj.DF_algo = 10 +dftObj.blocksize = 5000 +dftObj.XC_algo = 2 +dftObj.debug = False +dftObj.sortGrids = False +dftObj.xc_bf_screen = True +dftObj.threshold_schwarz = 1e-9 +dftObj.strict_schwarz = True +dftObj.cholesky = True +dftObj.orthogonalize = True +# SAO or CAO basis +dftObj.sao = False + +# GPU acceleration +dftObj.use_gpu = False +dftObj.keep_ao_in_gpu = False +dftObj.use_libxc = False +dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference +dftObj.n_gpus = 1 # Specify the number of GPUs +dftObj.free_gpu_mem = True +dftObj.threads_x = 32 +dftObj.threads_y = 32 +dftObj.dynamic_precision = False +dftObj.keep_ints3c2e_in_gpu = True + +# print(dmat_init) +# Using PySCF grids to compare the energies +energyCrysX, dmat = dftObj.scf() +# print(dmat) + +# Using CrysX grids +# To get the same energies as PySCF (level=5) upto 1e-7 au, use the following settings +# radial_precision=1.0e-13 +# level=3 +# pruning by density with threshold = 1e-011 +# alpha_min and alpha_max corresponding to QZVP +# energyCrysX, dmat = dftObj.scf() + + +print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + +print('\n\nPyFock Dipole moment') +M = Integrals.dipole_moment_mat_symm(basis) +mol_dip = molCrysX.get_dipole_moment(M, dmat) +print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) +print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/PySCF_scaling_fit.py",".py","2365","82","import numpy as np +import matplotlib.pyplot as plt +from scipy.optimize import curve_fit + +# ----------------- +# PySCF data +# ----------------- +nbf = np.array([25, 125, 250, 500, 800, 1175, 1900, 2500, 3475], dtype=float) +total_time = np.array([0.059873508, 0.351985034, 1.545247587, 5.655018284, 13.58711019, + 28.77391837, 67.70287694, 129.9493543, 262.5715926], dtype=float) + +# Scaling law function +def scaling_law(N, a, p): + return a * N**p + +# ----------------- +# Method 1: Log–log linear regression +# ----------------- +def loglog_fit(N, t): + logN = np.log(N) + logt = np.log(t) + coeffs = np.polyfit(logN, logt, 1) + p = coeffs[0] + a = np.exp(coeffs[1]) + return a, p + +# ----------------- +# Method 2: Nonlinear least squares +# ----------------- +def nonlinear_fit(N, t): + popt, _ = curve_fit(scaling_law, N, t, p0=(1e-6, 2)) + a, p = popt + return a, p + +# Fit results +a_log, p_log = loglog_fit(nbf, total_time) +a_nonlin, p_nonlin = nonlinear_fit(nbf, total_time) + +# Print results +print(""PySCF Total Time Scaling:"") +print(f"" Log–log fit: a = {a_log:.6e}, p = {p_log:.4f}"") +print(f"" Nonlinear fit: a = {a_nonlin:.6e}, p = {p_nonlin:.4f}"") + +# ----------------- +# Plotting function +# ----------------- +def plot_fit(a, p, method_name): + plt.figure(figsize=(7,5)) + N_fit = np.linspace(min(nbf), max(nbf), 200) + + # Plot data and fit + plt.plot(nbf, total_time, 'o', color=""tab:blue"", label=""PySCF Data"") + plt.plot(N_fit, scaling_law(N_fit, a, p), '-', color=""tab:blue"", + label=f""Fit (N^{p:.2f})"") + + # Axis labels + plt.xlabel(r""No. of Basis Functions ($N_{bf}$)"", fontsize=15, weight='bold') + plt.ylabel(""Wall Time per Iteration (s)"", fontsize=15, weight='bold') + + # Bold tick labels + plt.xticks(fontsize=13, fontweight='bold') + plt.yticks(fontsize=13, fontweight='bold') + + # Multiline title + plt.title(f""Scaling Behavior of PySCF\nKS-DFT Calculations on Water Clusters\n({method_name} fit)"", + fontsize=16, weight='bold', pad=15) + + # Thick border + for spine in plt.gca().spines.values(): + spine.set_linewidth(1.8) + + # Bold legend + plt.legend(fontsize=12, prop={'weight': 'bold'}) + plt.grid(True) + plt.tight_layout() + +# Plot for both methods +plot_fit(a_log, p_log, ""Log–log"") +plot_fit(a_nonlin, p_nonlin, ""Nonlinear"") + +plt.show() +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/parallel_efficiency_2.py",".py","1319","44","#!/usr/bin/env python3 +"""""" +Parallel efficiency plot for PyFock and PySCF. +"""""" + +import numpy as np +import matplotlib.pyplot as plt + +# Raw data +cores = np.array([1, 2, 4, 8, 16, 32, 48, 64]) +time_pyfock = np.array([8265.656, 4300.769, 2505.805, 1371.796, + 840.332, 587.816, 527.458, 476.245]) +time_pyscf = np.array([15698.977, 8119.609, 4344.811, 2490.722, + 1455.911, 965.482, 829.167, 773.742]) + +# Choose max number of cores to display +max_cores = 64 # change this value to 32, 16, etc. +mask = cores <= max_cores + +cores = cores[mask] +time_pyfock = time_pyfock[mask] +time_pyscf = time_pyscf[mask] + +# Efficiency calculation +eta_pyfock = time_pyfock[0] / (cores * time_pyfock) +eta_pyscf = time_pyscf[0] / (cores * time_pyscf) + +# Plot +plt.figure(figsize=(7, 5)) +plt.plot(cores, eta_pyfock, 'o-', linewidth=2, markersize=8, label=""PyFock"") +plt.plot(cores, eta_pyscf, 's--', linewidth=2, markersize=7, label=""PySCF"") + +plt.axhline(1.0, color='k', linestyle=':', linewidth=1.2, label=""Ideal"") + +plt.xlabel(""Number of Cores"", fontsize=13) +plt.ylabel(""Parallel Efficiency"", fontsize=13) +plt.title(""Parallel Efficiency: PyFock vs PySCF"", fontsize=14) +plt.xticks(cores, cores) +plt.ylim(0, 1.1) +plt.grid(True, ls=""--"", alpha=0.6) +plt.legend(fontsize=11) +plt.tight_layout() +plt.show() +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/PyFock_scaling_fit.py",".py","3168","94","import numpy as np +import matplotlib.pyplot as plt +from scipy.optimize import curve_fit + +# ----------------- +# Data from the table +# ----------------- +nbf = np.array([25, 125, 250, 500, 800, 1175, 1900, 2500, 3475], dtype=float) +total_time = np.array([0.091779917, 0.251879828, 0.829753874, 3.32694805, 7.512214625, + 17.15226698, 41.32841003, 82.38475342, 154.2059581], dtype=float) +j_time = np.array([0.013566, 0.08225514, 0.35319341, 1.91062789, 4.40820322, + 10.75980486, 24.7638173, 54.0653728, 97.1046283], dtype=float) +xc_time = np.array([0.01539, 0.10870471, 0.33446765, 0.95263881, 1.99390185, + 3.76085967, 8.61741557, 12.6850703, 21.373439], dtype=float) + +# Function to fit +def scaling_law(N, a, p): + return a * N**p + +# ----------------- +# Method 1: Log–log linear regression +# ----------------- +def loglog_fit(N, t): + logN = np.log(N) + logt = np.log(t) + coeffs = np.polyfit(logN, logt, 1) # slope, intercept + p = coeffs[0] + a = np.exp(coeffs[1]) + return a, p + +# ----------------- +# Method 2: Nonlinear least squares +# ----------------- +def nonlinear_fit(N, t): + popt, _ = curve_fit(scaling_law, N, t, p0=(1e-6, 2)) # initial guess + a, p = popt + return a, p + +# Fit for each quantity +results = {} +for label, data in zip([""Total"", ""ERI"", ""XC""], [total_time, j_time, xc_time]): + a_log, p_log = loglog_fit(nbf, data) + a_nonlin, p_nonlin = nonlinear_fit(nbf, data) + results[label] = { + ""log-log"": (a_log, p_log), + ""nonlinear"": (a_nonlin, p_nonlin) + } + +# Print results +for label, vals in results.items(): + print(f""{label}:"") + print(f"" Log–log fit: a = {vals['log-log'][0]:.6e}, p = {vals['log-log'][1]:.4f}"") + print(f"" Nonlinear fit: a = {vals['nonlinear'][0]:.6e}, p = {vals['nonlinear'][1]:.4f}"") + print() + +# ----------------- +# Plotting +# ----------------- +def plot_fit(method_name): + plt.figure(figsize=(7,5)) + for label, data, color in zip([""Total"", ""ERI"", ""XC""], + [total_time, j_time, xc_time], + [""tab:blue"", ""tab:orange"", ""tab:green""]): + a, p = results[label][method_name] + N_fit = np.linspace(min(nbf), max(nbf), 200) + plt.plot(nbf, data, 'o', color=color, label=f""{label}"") + plt.plot(N_fit, scaling_law(N_fit, a, p), '-', color=color, + label=f""{label} fit (N^{p:.2f})"") + + # Axis labels + plt.xlabel(r""No. of Basis Functions ($N_{bf}$)"", fontsize=15, weight='bold') + plt.ylabel(""Wall Time per Iteration (s)"", fontsize=15, weight='bold') + + # Larger tick labels + plt.xticks(fontsize=13, fontweight='bold') + plt.yticks(fontsize=13, fontweight='bold') + + # Multiline title + plt.title(""Scaling Behavior of PyFock\nKS-DFT Calculations on Water Clusters"", + fontsize=16, weight='bold', pad=15) + + # Thicker border + for spine in plt.gca().spines.values(): + spine.set_linewidth(1.8) + + plt.legend(fontsize=12, prop={'weight': 'bold'}) + plt.grid(True) + plt.tight_layout() + +# Example: plot for nonlinear fit +plot_fit(""nonlinear"") +plot_fit(""log-log"") +plt.show() +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/PyFock_CPU_vs_GPU.py",".py","4132","97","import matplotlib.pyplot as plt +import numpy as np + +# ==== CONFIG FLAGS ==== +x_axis_choice = ""water"" # ""water"" or ""basis"" +log_scale = False # True for log scale, False for linear +plot_total_only = False # True for just total times, False for breakdown + +# ==== DATA ==== +water_molecules = np.array([47, 76, 100, 139]) +basis_functions = np.array([1175, 1900, 2500, 3475]) + +total_gpu_old = np.array([1.815790464, 4.110073972, 7.665055265, 14.48421162]) +total_gpu = np.array([1.53661779, 3.292493198, 5.90542049, 10.71981104]) +total_cpu = np.array([17.15226698, 41.32841003, 82.38475342, 154.2059581]) + +j_gpu_old = np.array([0.896369033, 2.172111774, 4.52707693, 8.54460349]) +j_gpu = np.array([0.784328794, 1.87488702, 3.823785722, 7.140085827]) +j_cpu = np.array([10.75980461, 24.7638173, 54.06537282, 97.10462831]) + +xc_gpu_old = np.array([0.48043671, 0.991713577, 1.396709837, 2.243173538]) +xc_gpu = np.array([0.413739246, 0.780230838, 1.078757818, 1.639881885]) +xc_cpu = np.array([3.76085967, 8.61741557, 12.6850703, 21.373439]) + +# Derived values for ""Other"" = Total - (J + XC) +other_gpu = total_gpu - (j_gpu + xc_gpu) +other_cpu = total_cpu - (j_cpu + xc_cpu) + +# ==== Choose x-axis ==== +if x_axis_choice == ""water"": + x_values = water_molecules + x_label = ""Number of Water Molecules"" + # Create subscript labels for water molecules + x_tick_labels = [f""(H$_2$O)$_{{{n}}}$"" for n in water_molecules] + # x_tick_labels = [fr""$\mathbf{{(H_2O)}}_{{{n}}}$"" for n in water_molecules] +elif x_axis_choice == ""basis"": + x_values = basis_functions + x_label = ""Number of Basis Functions"" + x_tick_labels = [str(n) for n in basis_functions] +else: + raise ValueError(""x_axis_choice must be 'water' or 'basis'"") + +# ==== Plot ==== +width = 10 +fig, ax = plt.subplots(figsize=(10, 6.3)) + +if plot_total_only: + # Plot just total times + bars_cpu = ax.bar(x_values - width/2, total_cpu, width, label=""CPU"", color=""tab:red"", edgecolor='black', linewidth=1.2) + bars_gpu = ax.bar(x_values + width/2, total_gpu, width, label=""GPU"", color=""tab:blue"", edgecolor='black', linewidth=1.2) +else: + # Stacked bars: J, XC, Other + bars_cpu = ax.bar(x_values - width/2, j_cpu, width, label=""ERI (CPU)"", color=""tab:orange"", edgecolor='black', linewidth=1.2) + ax.bar(x_values - width/2, xc_cpu, width, bottom=j_cpu, label=""XC (CPU)"", color=""tab:green"", edgecolor='black', linewidth=1.2) + ax.bar(x_values - width/2, other_cpu, width, bottom=j_cpu+xc_cpu, label=""Other (CPU)"", color=""tab:gray"", edgecolor='black', linewidth=1.2) + + bars_gpu = ax.bar(x_values + width/2, j_gpu, width, label=""ERI (GPU)"", color=""tab:orange"", alpha=0.6, edgecolor='black', linewidth=1.2) + ax.bar(x_values + width/2, xc_gpu, width, bottom=j_gpu, label=""XC (GPU)"", color=""tab:green"", alpha=0.6, edgecolor='black', linewidth=1.2) + ax.bar(x_values + width/2, other_gpu, width, bottom=j_gpu+xc_gpu, label=""Other (GPU)"", color=""tab:gray"", alpha=0.6, edgecolor='black', linewidth=1.2) + +# Labels & settings +ax.set_xlabel(x_label, fontsize=16, fontweight='bold') +ax.set_ylabel(""Time per Iteration (s)"", fontsize=16, fontweight='bold') + +if log_scale: + ax.set_yscale(""log"") + +ax.set_title(""CPU vs GPU Timing Breakdown"" if not plot_total_only else ""CPU vs GPU Total Time per Iteration"", + fontsize=16, fontweight='bold') + +# Set custom x-tick labels +ax.set_xticks(x_values) +ax.set_xticklabels(x_tick_labels) + +# Tick labels +ax.tick_params(axis='both', labelsize=14) +for label in ax.get_xticklabels() + ax.get_yticklabels(): + label.set_fontweight('bold') + +# Thicker border +for spine in ax.spines.values(): + spine.set_linewidth(1.5) + +# Legend styling +legend = ax.legend(fontsize=12) +for text in legend.get_texts(): + text.set_fontweight('bold') + +# ==== Annotate total times ==== +for x, val in zip(x_values - width/2, total_cpu): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) + +for x, val in zip(x_values + width/2, total_gpu): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) + +plt.tight_layout() +plt.show()","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/PyFock_scaling_fit_GPU.py",".py","2951","87","import numpy as np +import matplotlib.pyplot as plt +from scipy.optimize import curve_fit + +# ----------------- +# Updated data from the table +# ----------------- +nbf = np.array([250, 500, 800, 1175, 1900, 2500, 3475], dtype=float) +total_time = np.array([0.181416858, 0.443782182, 0.813939424, 1.53661779, 3.292493198, 5.90542049, 10.71981104], dtype=float) +j_time = np.array([0.065847379, 0.162756136, 0.350158489, 0.784328794, 1.87488702, 3.823785722, 7.140085827], dtype=float) +xc_time = np.array([0.05082353, 0.154355068, 0.26185166, 0.413739246, 0.780230838, 1.078757818, 1.639881885], dtype=float) + +# Scaling law function +def scaling_law(N, a, p): + return a * N**p + +# ----------------- +# Method 1: Log–log linear regression +# ----------------- +def loglog_fit(N, t): + logN = np.log(N) + logt = np.log(t) + coeffs = np.polyfit(logN, logt, 1) # slope, intercept + p = coeffs[0] + a = np.exp(coeffs[1]) + return a, p + +# ----------------- +# Method 2: Nonlinear least squares +# ----------------- +def nonlinear_fit(N, t): + popt, _ = curve_fit(scaling_law, N, t, p0=(1e-6, 2)) # initial guess + a, p = popt + return a, p + +# Fit for each quantity +results = {} +for label, data in zip([""Total"", ""ERI"", ""XC""], [total_time, j_time, xc_time]): + a_log, p_log = loglog_fit(nbf, data) + a_nonlin, p_nonlin = nonlinear_fit(nbf, data) + results[label] = { + ""log-log"": (a_log, p_log), + ""nonlinear"": (a_nonlin, p_nonlin) + } + +# Print results +for label, vals in results.items(): + print(f""{label}:"") + print(f"" Log–log fit: a = {vals['log-log'][0]:.6e}, p = {vals['log-log'][1]:.4f}"") + print(f"" Nonlinear fit: a = {vals['nonlinear'][0]:.6e}, p = {vals['nonlinear'][1]:.4f}"") + print() + +# ----------------- +# Plotting +# ----------------- +def plot_fit(method_name): + plt.figure(figsize=(7,5)) + for label, data, color in zip([""Total"", ""ERI"", ""XC""], + [total_time, j_time, xc_time], + [""tab:blue"", ""tab:orange"", ""tab:green""]): + a, p = results[label][method_name] + N_fit = np.linspace(min(nbf), max(nbf), 200) + plt.plot(nbf, data, 'o', color=color, label=f""{label}"") + plt.plot(N_fit, scaling_law(N_fit, a, p), '-', color=color, + label=f""{label} fit (N^{p:.2f})"") + + plt.xlabel(r""No. of Basis Functions ($N_{bf}$)"", fontsize=15, weight='bold') + plt.ylabel(""Wall Time per Iteration (s)"", fontsize=15, weight='bold') + + plt.xticks(fontsize=13, fontweight='bold') + plt.yticks(fontsize=13, fontweight='bold') + + plt.title(""Scaling Behavior of PyFock\nKS-DFT Calculations on Water Clusters"", + fontsize=16, weight='bold', pad=15) + + for spine in plt.gca().spines.values(): + spine.set_linewidth(1.8) + + plt.legend(fontsize=12, prop={'weight': 'bold'}) + plt.grid(True) + plt.tight_layout() + +# Plot both methods +plot_fit(""nonlinear"") +plot_fit(""log-log"") +plt.show() +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/parallel_efficiency_1.py",".py","1953","52","#!/usr/bin/env python3 +"""""" +Strong scaling plot for PyFock vs PySCF. +Includes breakdown of PyFock timings into J and XC. +"""""" + +import numpy as np +import matplotlib.pyplot as plt + +# Raw data +cores = np.array([1, 2, 4, 8, 16, 32, 48, 64]) +time_pyfock_total = np.array([8265.656, 4300.769, 2505.805, 1371.796, + 840.332, 587.816, 527.458, 476.245]) +time_pyfock_J = np.array([5186.064, 2647.520, 1572.094, 814.812, + 448.830, 273.503, 209.090, 145.506]) +time_pyfock_XC = np.array([1246.379, 653.984, 340.340, 190.672, + 125.339, 103.408, 110.146, 120.418]) +time_pyscf_total = np.array([15698.977, 8119.609, 4344.811, 2490.722, + 1455.911, 965.482, 829.167, 773.742]) + +# Choose max number of cores to display +max_cores = 64 # change to 32, 16, etc. if needed +mask = cores <= max_cores + +cores = cores[mask] +time_pyfock_total = time_pyfock_total[mask] +time_pyfock_J = time_pyfock_J[mask] +time_pyfock_XC = time_pyfock_XC[mask] +time_pyscf_total = time_pyscf_total[mask] + +# Ideal scaling reference (PyFock total, 1-core baseline) +t1 = time_pyfock_total[0] +ideal_scaling = t1 / cores + +# Plot +plt.figure(figsize=(8, 6)) + +plt.loglog(cores, time_pyfock_total, 'o-', label=""PyFock (Total)"", linewidth=2, markersize=8) +plt.loglog(cores, time_pyfock_J, 's--', label=""PyFock (ERI)"", linewidth=2, markersize=7) +plt.loglog(cores, time_pyfock_XC, 'd--', label=""PyFock (XC)"", linewidth=2, markersize=7) +plt.loglog(cores, time_pyscf_total, '^-.', label=""PySCF (Total)"", linewidth=2, markersize=7) +plt.loglog(cores, ideal_scaling, 'k:', label=""Ideal Scaling"", linewidth=1.5) + +plt.xlabel(""Number of Cores"", fontsize=13) +plt.ylabel(""Wall Time (s)"", fontsize=13) +plt.title(""Strong Scaling: PyFock vs PySCF (with J and XC breakdown)"", fontsize=14) +plt.xticks(cores, cores) +plt.grid(True, which=""both"", ls=""--"", alpha=0.6) +plt.legend(fontsize=11) +plt.tight_layout() +plt.show() +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/PySCF_PyFock_CPU_vs_GPU.py",".py","5419","118","import matplotlib.pyplot as plt +import numpy as np + +# ==== CONFIG FLAGS ==== +x_axis_choice = ""water"" # ""water"" or ""basis"" +log_scale = False # True for log scale, False for linear +plot_total_only = True # True for just total times, False for breakdown + +# ==== DATA ==== +water_molecules = np.array([47, 76, 100, 139]) +basis_functions = np.array([1175, 1900, 2500, 3475]) + +# PySCF data +total_pyscf = np.array([28.77391837, 67.70287694, 129.9493543, 262.5715926]) + +# GPU/CPU data +total_gpu_old = np.array([1.815790464, 4.110073972, 7.665055265, 14.48421162]) +total_gpu = np.array([1.53661779, 3.292493198, 5.90542049, 10.71981104]) +total_cpu = np.array([17.15226698, 41.32841003, 82.38475342, 154.2059581]) + +j_gpu_old = np.array([0.896369033, 2.172111774, 4.52707693, 8.54460349]) +j_gpu = np.array([0.784328794, 1.87488702, 3.823785722, 7.140085827]) +j_cpu = np.array([10.75980461, 24.7638173, 54.06537282, 97.10462831]) + +xc_gpu_old = np.array([0.48043671, 0.991713577, 1.396709837, 2.243173538]) +xc_gpu = np.array([0.413739246, 0.780230838, 1.078757818, 1.639881885]) +xc_cpu = np.array([3.76085967, 8.61741557, 12.6850703, 21.373439]) + +# Derived values for ""Other"" = Total - (J + XC) +other_gpu = total_gpu - (j_gpu + xc_gpu) +other_cpu = total_cpu - (j_cpu + xc_cpu) + +# ==== Choose x-axis ==== +if x_axis_choice == ""water"": + x_values = water_molecules + x_label = ""Number of Water Molecules"" + # Create subscript labels for water molecules + x_tick_labels = [f""(H$_2$O)$_{{{n}}}$"" for n in water_molecules] + # x_tick_labels = [fr""$\mathbf{{(H_2O)}}_{{{n}}}$"" for n in water_molecules] +elif x_axis_choice == ""basis"": + x_values = basis_functions + x_label = ""Number of Basis Functions"" + x_tick_labels = [str(n) for n in basis_functions] +else: + raise ValueError(""x_axis_choice must be 'water' or 'basis'"") + +# ==== Plot ==== +width = 6 # Reduced width to accommodate three bars +fig, ax = plt.subplots(figsize=(10, 6.3)) + +if plot_total_only: + # Plot just total times - PySCF first, then PyFock CPU and GPU + bars_pyscf = ax.bar(x_values - width, total_pyscf, width, label=""PySCF (CPU)"", color=""tab:green"", edgecolor='black', linewidth=1.2) + bars_cpu = ax.bar(x_values, total_cpu, width, label=""PyFock (CPU)"", color=""tab:red"", edgecolor='black', linewidth=1.2) + bars_gpu = ax.bar(x_values + width, total_gpu, width, label=""PyFock (GPU)"", color=""tab:blue"", edgecolor='black', linewidth=1.2) +else: + # Stacked bars: J, XC, Other (keeping original layout but adjusting positions) + bars_pyscf = ax.bar(x_values - width, total_pyscf, width, label=""PySCF (CPU, Total)"", color=""tab:green"", edgecolor='black', linewidth=1.2) + + bars_cpu = ax.bar(x_values, j_cpu, width, label=""PyFock J (CPU)"", color=""tab:orange"", edgecolor='black', linewidth=1.2) + ax.bar(x_values, xc_cpu, width, bottom=j_cpu, label=""PyFock XC (CPU)"", color=""tab:red"", edgecolor='black', linewidth=1.2) + ax.bar(x_values, other_cpu, width, bottom=j_cpu+xc_cpu, label=""PyFock Other (CPU)"", color=""tab:gray"", edgecolor='black', linewidth=1.2) + + bars_gpu = ax.bar(x_values + width, j_gpu, width, label=""PyFock J (GPU)"", color=""tab:orange"", alpha=0.6, edgecolor='black', linewidth=1.2) + ax.bar(x_values + width, xc_gpu, width, bottom=j_gpu, label=""PyFock XC (GPU)"", color=""tab:red"", alpha=0.6, edgecolor='black', linewidth=1.2) + ax.bar(x_values + width, other_gpu, width, bottom=j_gpu+xc_gpu, label=""PyFock Other (GPU)"", color=""tab:gray"", alpha=0.6, edgecolor='black', linewidth=1.2) + +# Labels & settings +ax.set_xlabel(x_label, fontsize=16, fontweight='bold') +ax.set_ylabel(""Time per Iteration (s)"", fontsize=16, fontweight='bold') + +if log_scale: + ax.set_yscale(""log"") + +title = ""PySCF vs PyFock Timing Breakdown"" if not plot_total_only else ""PySCF vs PyFock Total Time per Iteration"" +ax.set_title(title, fontsize=16, fontweight='bold') + +# Set custom x-tick labels +ax.set_xticks(x_values) +ax.set_xticklabels(x_tick_labels) + +# Tick labels +ax.tick_params(axis='both', labelsize=14) +for label in ax.get_xticklabels() + ax.get_yticklabels(): + label.set_fontweight('bold') + +# Thicker border +for spine in ax.spines.values(): + spine.set_linewidth(1.5) + +# Legend styling +legend = ax.legend(fontsize=12) +for text in legend.get_texts(): + text.set_fontweight('bold') + +# ==== Annotate total times ==== +if plot_total_only: + for x, val in zip(x_values - width, total_pyscf): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) + + for x, val in zip(x_values, total_cpu): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) + + for x, val in zip(x_values + width, total_gpu): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) +else: + # For breakdown view, annotate total times + for x, val in zip(x_values - width, total_pyscf): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) + + for x, val in zip(x_values, total_cpu): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) + + for x, val in zip(x_values + width, total_gpu): + ax.text(x, val * 1.01, f""{val:.0f}"", ha='center', va='bottom', fontsize=12, fontweight='bold', rotation=0) + +plt.tight_layout() +plt.show()","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/PyFock_PySCF_scaling_fit.py",".py","3502","95","import numpy as np +import matplotlib.pyplot as plt +from scipy.optimize import curve_fit + +# ----------------- +# Data from the table (PyFock) +# ----------------- +nbf = np.array([25, 125, 250, 500, 800, 1175, 1900, 2500, 3475], dtype=float) +total_time = np.array([0.091779917, 0.251879828, 0.829753874, 3.32694805, 7.512214625, + 17.15226698, 41.32841003, 82.38475342, 154.2059581], dtype=float) +j_time = np.array([0.013566, 0.08225514, 0.35319341, 1.91062789, 4.40820322, + 10.75980486, 24.7638173, 54.0653728, 97.1046283], dtype=float) +xc_time = np.array([0.01539, 0.10870471, 0.33446765, 0.95263881, 1.99390185, + 3.76085967, 8.61741557, 12.6850703, 21.373439], dtype=float) + +# ----------------- +# PySCF total wall times +# ----------------- +pyscf_total_time = np.array([0.059873508, 0.351985034, 1.545247587, 5.655018284, 13.58711019, + 28.77391837, 67.70287694, 129.9493543, 262.5715926], dtype=float) + +# Function to fit +def scaling_law(N, a, p): + return a * N**p + +# Log–log linear regression +def loglog_fit(N, t): + logN = np.log(N) + logt = np.log(t) + coeffs = np.polyfit(logN, logt, 1) + p = coeffs[0] + a = np.exp(coeffs[1]) + return a, p + +# Nonlinear least squares fit +def nonlinear_fit(N, t): + popt, _ = curve_fit(scaling_law, N, t, p0=(1e-6, 2)) + a, p = popt + return a, p + +# Fit all datasets +results = {} +for label, data in zip([""Total"", ""ERI"", ""XC"", ""PySCF Total""], + [total_time, j_time, xc_time, pyscf_total_time]): + a_log, p_log = loglog_fit(nbf, data) + a_nonlin, p_nonlin = nonlinear_fit(nbf, data) + results[label] = { + ""log-log"": (a_log, p_log), + ""nonlinear"": (a_nonlin, p_nonlin) + } + +# Print results +for label, vals in results.items(): + print(f""{label}:"") + print(f"" Log–log fit: a = {vals['log-log'][0]:.6e}, p = {vals['log-log'][1]:.4f}"") + print(f"" Nonlinear fit: a = {vals['nonlinear'][0]:.6e}, p = {vals['nonlinear'][1]:.4f}"") + print() + +# ----------------- +# Plotting function +# ----------------- +def plot_fit(method_name): + plt.figure(figsize=(7,5)) + for label, data, color in zip([""Total"", ""ERI"", ""XC"", ""PySCF Total""], + [total_time, j_time, xc_time, pyscf_total_time], + [""tab:blue"", ""tab:orange"", ""tab:green"", ""tab:red""]): + a, p = results[label][method_name] + N_fit = np.linspace(min(nbf), max(nbf), 200) + plt.plot(nbf, data, 'o', color=color, label=f""{label}"") + if label=='XC' or label=='J': + plt.plot(N_fit, scaling_law(N_fit, a, p), '--', color=color, + label=f""{label} fit (N^{p:.2f})"") + else: + plt.plot(N_fit, scaling_law(N_fit, a, p), '-', color=color, + label=f""{label} fit (N^{p:.2f})"") + + plt.xlabel(r""No. of Basis Functions ($N_{bf}$)"", fontsize=15, weight='bold') + plt.ylabel(""Wall Time per Iteration (s)"", fontsize=15, weight='bold') + plt.xticks(fontsize=13, fontweight='bold') + plt.yticks(fontsize=13, fontweight='bold') + plt.title(""Scaling Behavior of PyFock vs PySCF\nKS-DFT Calculations on Water Clusters"", + fontsize=16, weight='bold', pad=15) + + for spine in plt.gca().spines.values(): + spine.set_linewidth(1.8) + + plt.legend(fontsize=12, prop={'weight': 'bold'}) + plt.grid(True) + plt.tight_layout() + +# Plot for both fit methods +plot_fit(""nonlinear"") +plot_fit(""log-log"") +plt.show() +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Cube_File_Plotting/plotting_on_grids_figure.py",".py","430","19","from pyfock import Basis +from pyfock import Mol +from pyfock import DFT +from pyfock import Utils + +mol = Mol(coordfile='Benzene.xyz') + +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-SVP')}) +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-universal-jfit')}) + +dftObj = DFT(mol, basis, auxbasis, xc=[1, 7]) +dftObj.scf() + +Utils.write_density_cube(mol, basis, dftObj.dmat, 'benzene_dens_temp.cube') + + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Cube_File_Plotting/Cube_file_of_orbitals.py",".py","1338","51","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from pyfock import Utils + +from timeit import default_timer as timer +import numpy as np +import scipy + +ncores = 4 + +#LDA +funcx = 1 +funcc = 7 +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' + +auxbasis_name = 'def2-universal-jfit' + +xyzFilename = 'Benezene_UMA_OMOL_Optimized.xyz' + + +#Initialize a Mol object with somewhat large geometry +mol = Mol(coordfile=xyzFilename) + + +#Initialize a Basis object with a very large basis set +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasis_name)}) + +dftObj = DFT(mol, basis, auxbasis, xc=funcidcrysx) + +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 20 +dftObj.ncores = ncores +dftObj.save_ao_values = True +energyCrysX, dmat = dftObj.scf() + +# Find the indices of HOMOL and LUMO +occupied = np.where(dftObj.mo_occupations > 1e-8)[0] +homo_idx = occupied[-1] +lumo_idx = homo_idx + 1 +# Write HOMO +Utils.write_orbital_cube(mol, basis, dftObj.mo_coefficients[:, homo_idx], 'Benzene_HOMO.cube', nx=100, ny=100, nz=100, ncores=ncores) +# Write LUMO +Utils.write_orbital_cube(mol, basis, dftObj.mo_coefficients[:, lumo_idx], 'Benzene_LUMO.cube', nx=100, ny=100, nz=100, ncores=ncores)","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Cube_File_Plotting/Cube_file_of_density.py",".py","1016","44","from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from pyfock import Utils + +from timeit import default_timer as timer +import numpy as np +import scipy + +ncores = 4 + +#LDA +funcx = 1 +funcc = 7 +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' + +auxbasis_name = 'def2-universal-jfit' + +xyzFilename = 'Benezene_UMA_OMOL_Optimized.xyz' + + +#Initialize a Mol object with somewhat large geometry +mol = Mol(coordfile=xyzFilename) + + +#Initialize a Basis object with a very large basis set +basis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=basis_set_name)}) + +auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name=auxbasis_name)}) + +dftObj = DFT(mol, basis, auxbasis, xc=funcidcrysx) + +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 20 +dftObj.ncores = ncores +dftObj.save_ao_values = True +energyCrysX, dmat = dftObj.scf() + +Utils.write_density_cube(mol, basis, dftObj.dmat, 'benzene_dens.cube', nx=100, ny=100, nz=100, ncores=ncores)","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_CPU_Benchmark/2D_Graphene/benchmark_DFT_LDA_DF.py",".py","7113","218","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Graphene_C16.xyz', + '../../Structures/Graphene_C76.xyz', + '../../Structures/Graphene_C102.xyz', + '../../Structures/Graphene_C184.xyz', + '../../Structures/Graphene_C210.xyz', + '../../Structures/Graphene_C294.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_CPU_Benchmark/General_Molecules/benchmark_DFT_LDA_DF.py",".py","7157","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Caffeine.xyz', + '../../Structures/Serotonin.xyz', + '../../Structures/Cholesterol.xyz', + '../../Structures/C60.xyz', + '../../Structures/Taxol.xyz', + '../../Structures/Valinomycin.xyz', + '../../Structures/Olestra.xyz', + '../../Structures/Ubiquitin.xyz' +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = True + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_CPU_Benchmark/1D_Alkanes/benchmark_DFT_LDA_DF.py",".py","7175","219","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Ethane.xyz', + '../../Structures/Decane_C10H22.xyz', + '../../Structures/Icosane_C20H42.xyz', + '../../Structures/Pentacontane_C50H102.xyz', + '../../Structures/Octacontane_C80H162.xyz', + '../../Structures/Hectane_C100H202.xyz', + '../../Structures/Icosahectane_C120H242.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_CPU_Benchmark/3D_Water_Clusters/benchmark_DFT_LDA_DF.py",".py","7268","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/water_cluster_1.xyz', + '../../Structures/water_cluster_5.xyz', + '../../Structures/water_cluster_10.xyz', + '../../Structures/water_cluster_20.xyz', + '../../Structures/water_cluster_32.xyz', + '../../Structures/water_cluster_47.xyz', + '../../Structures/water_cluster_76.xyz', + '../../Structures/water_cluster_100.xyz', + '../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_CPU_Benchmark/3D_Water_Clusters/new_with_inline_coulomb/benchmark_DFT_LDA_DF.py",".py","7325","222","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +#basis_set_name = 'def2-SVP' +basis_set_name = 'def2-TZVP' +#basis_set_name = 'def2-QZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', + '../../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', + '../../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', + '../../../Structures/water_cluster_47.xyz', + '../../../Structures/water_cluster_76.xyz', + '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/General_Molecules/benchmark_DFT_LDA_DF.py",".py","7308","225","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(25000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Caffeine.xyz', + '../../Structures/Serotonin.xyz', + '../../Structures/Cholesterol.xyz', + '../../Structures/C60.xyz', + '../../Structures/Taxol.xyz', + '../../Structures/Valinomycin.xyz', + '../../Structures/Olestra.xyz', + '../../Structures/Ubiquitin.xyz' +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=5000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + print('\n\nNatoms :',molCrysX.natoms) + # print(molCrysX.coordsBohrs) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + print('\n\nNAO :',basis.bfs_nao) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + print('\n\naux NAO :',auxbasis.bfs_nao) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 35 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = True + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/benchmark_DFT_LDA_DF.py",".py","7268","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/water_cluster_1.xyz', + '../../Structures/water_cluster_5.xyz', + '../../Structures/water_cluster_10.xyz', + '../../Structures/water_cluster_20.xyz', + '../../Structures/water_cluster_32.xyz', + '../../Structures/water_cluster_47.xyz', + '../../Structures/water_cluster_76.xyz', + '../../Structures/water_cluster_100.xyz', + '../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore32/benchmark_DFT_LDA_DF.py",".py","7303","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 32 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore16/benchmark_DFT_LDA_DF.py",".py","7303","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 16 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore48/benchmark_DFT_LDA_DF.py",".py","7303","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 48 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore1/benchmark_DFT_LDA_DF.py",".py","7302","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 1 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore2/benchmark_DFT_LDA_DF.py",".py","7302","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore8/benchmark_DFT_LDA_DF.py",".py","7302","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 8 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore4/benchmark_DFT_LDA_DF.py",".py","7302","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/ncore64/benchmark_DFT_LDA_DF.py",".py","7303","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 64 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/new_xc_alternative/ncore32/benchmark_DFT_LDA_DF.py",".py","7310","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 32 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/new_xc_alternative/ncore16/benchmark_DFT_LDA_DF.py",".py","7296","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 16 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../../Structures/water_cluster_1.xyz', + '../../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', + '../../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', + '../../../Structures/water_cluster_47.xyz', + '../../../Structures/water_cluster_76.xyz', + '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/new_xc_alternative/ncore48/benchmark_DFT_LDA_DF.py",".py","7307","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 48 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/new_xc_alternative/ncore1/benchmark_DFT_LDA_DF.py",".py","7306","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 1 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/new_xc_alternative/ncore8/benchmark_DFT_LDA_DF.py",".py","7306","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 8 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/new_xc_alternative/ncore4/benchmark_DFT_LDA_DF.py",".py","7306","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Parallel_Efficiency_PyFock_CPU_Benchmark/3D_Water_Clusters/new_xc_alternative/ncore64/benchmark_DFT_LDA_DF.py",".py","7316","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 64 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../../Structures/water_cluster_1.xyz', +# '../../../../Structures/water_cluster_5.xyz', + '../../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_Turbomole_CPU_Benchmark/3D_Water_Clusters/benchmark_DFT_LDA_DF.py",".py","7268","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/water_cluster_1.xyz', + '../../Structures/water_cluster_5.xyz', + '../../Structures/water_cluster_10.xyz', + '../../Structures/water_cluster_20.xyz', + '../../Structures/water_cluster_32.xyz', + '../../Structures/water_cluster_47.xyz', + '../../Structures/water_cluster_76.xyz', + '../../Structures/water_cluster_100.xyz', + '../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PySCF_GPU_Benchmark/3D_Water_Clusters/pyscf_gpu.py",".py","3758","138","from pyscf import gto +from gpu4pyscf.dft import rks +import os +from timeit import default_timer as timer + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +funcx = 1 +funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +# funcx = 101 +# funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = '6-31G' +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-SVPD' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-TZVPP' +# basis_set_name = 'def2-QZVPP' +# basis_set_name = 'def2-TZVPD' +# basis_set_name = 'def2-QZVPD' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'cc-pVDZ' +# basis_set_name = 'ano-rcc' + +auxbasis_name = 'def2-universal-jfit' +# auxbasis_name = 'def2-TZVP' +# auxbasis_name = 'sto-3g' +# auxbasis_name = 'def2-SVP' +# auxbasis_name = '6-31G' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'Adenine-Thymine.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'TPP.xyz' +# xyzFilename = 'Zn_TPP.xyz' +# xyzFilename = 'H2O.xyz' + +# xyzFilename = 'Caffeine.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'C60.xyz' +# xyzFilename = 'Taxol.xyz' +xyzFilename = 'Valinomycin.xyz' +# xyzFilename = 'Olestra.xyz' +# xyzFilename = 'Ubiquitin.xyz' + +### 1D Carbon Alkanes +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +# xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +### 2D Carbon +# xyzFilename = 'Graphene_C16.xyz' +# xyzFilename = 'Graphene_C76.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + +### 3d Carbon Fullerenes +# xyzFilename = 'C60.xyz' +# xyzFilename = 'C70.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + +molPySCF = gto.Mole() +molPySCF.atom = 'molecular-structures/'+xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = False +molPySCF.verbose = 6 +#molPySCF.max_memory=25000 +# molPySCF.incore_anyway = True # Keeps the PySCF ERI integrals incore +molPySCF.build() + +print('\n\nPySCF Results\n\n') +start=timer() +mf = rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) +mf.xc = funcidpyscf +mf.verbose = 7 +# mf.direct_scf = True +# mf.with_df.max_memory = 25000 +# dmat_init = mf.init_guess_by_1e(molPySCF) +# dmat_init = mf.init_guess_by_huckel(molPySCF) +mf.init_guess = 'minao' +dmat_init = mf.init_guess_by_minao(molPySCF) +# mf.init_guess = 'atom' +# dmat_init = mf.init_guess_by_atom(molPySCF) +mf.max_cycle = 30 +mf.conv_tol = 1e-7 +mf.grids.level = 5 +# print('begin df build') +# start_df_pyscf=timer() +# mf.with_df.build() +# duration_df_pyscf = timer()- start_df_pyscf +# print('PySCF df time: ', duration_df_pyscf) +# print('end df build') +energyPyscf = mf.kernel(dm0=dmat_init) +print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) +print('One electron integrals energy',mf.scf_summary['e1']) +print('Coulomb energy ',mf.scf_summary['coul']) +print('EXC ',mf.scf_summary['exc']) +duration = timer()-start +print('PySCF time: ', duration) +pyscfGrids = mf.grids +print('PySCF Grid Size: ', pyscfGrids.weights.shape) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PySCF_GPU_Benchmark/3D_Water_Clusters/benchmark_DFT_LDA_DF.py",".py","4268","125","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +#os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +#print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from timeit import default_timer as timer +import numpy as np + +from pyscf import gto +from gpu4pyscf.dft import rks + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../Structures/water_cluster_1.xyz', + '../../Structures/water_cluster_5.xyz', + '../../Structures/water_cluster_10.xyz', + '../../Structures/water_cluster_20.xyz', + '../../Structures/water_cluster_32.xyz', + '../../Structures/water_cluster_47.xyz', + '../../Structures/water_cluster_76.xyz', + '../../Structures/water_cluster_100.xyz', + '../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 6 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + mf = rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 7 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + start=timer() + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PySCF_CPU_Benchmark/General_Molecules/benchmark_DFT_LDA_DF.py",".py","7309","225","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(25000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Caffeine.xyz', + '../../Structures/Serotonin.xyz', + '../../Structures/Cholesterol.xyz', + '../../Structures/C60.xyz', + '../../Structures/Taxol.xyz', + '../../Structures/Valinomycin.xyz', + '../../Structures/Olestra.xyz', + '../../Structures/Ubiquitin.xyz' +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=5000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + print('\n\nNatoms :',molCrysX.natoms) + # print(molCrysX.coordsBohrs) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + print('\n\nNAO :',basis.bfs_nao) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + print('\n\naux NAO :',auxbasis.bfs_nao) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = True + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PySCF_CPU_Benchmark/3D_Water_Clusters/benchmark_DFT_LDA_DF.py",".py","4470","135","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/water_cluster_1.xyz', + '../../Structures/water_cluster_5.xyz', + '../../Structures/water_cluster_10.xyz', + '../../Structures/water_cluster_20.xyz', + '../../Structures/water_cluster_32.xyz', + '../../Structures/water_cluster_47.xyz', + '../../Structures/water_cluster_76.xyz', + '../../Structures/water_cluster_100.xyz', + '../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 5 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 5 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + start=timer() + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Energy_and_Convergence_Validations/General_Molecules/benchmark_DFT_LDA_DF.py",".py","7316","225","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 48 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +# basis_set_name = 'def2-SVP' +basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Caffeine.xyz', + '../../Structures/Serotonin.xyz', + '../../Structures/Cholesterol.xyz', + '../../Structures/C60.xyz', + '../../Structures/Taxol.xyz', + '../../Structures/Valinomycin.xyz', + '../../Structures/Olestra.xyz', +# '../Structures/Ubiquitin.xyz' +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + print('\n\nNatoms :',molCrysX.natoms) + # print(molCrysX.coordsBohrs) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + #print('\n\nNAO :',basis.bfs_nao) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + #print('\n\naux NAO :',auxbasis.bfs_nao) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Energy_and_Convergence_Validations/General_Molecules/olestra_debug/benchmark_DFT_LDA_DF.py",".py","7323","225","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 48 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +# basis_set_name = 'def2-SVP' +basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + + +# List of all molecules to calculate +xyz_files = [ +# '../../Structures/Caffeine.xyz', +# '../../Structures/Serotonin.xyz', +# '../../Structures/Cholesterol.xyz', +# '../../Structures/C60.xyz', +# '../../Structures/Taxol.xyz', +# '../../Structures/Valinomycin.xyz', + '../../../Structures/Olestra.xyz', +# '../Structures/Ubiquitin.xyz' +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'atom' + dmat_init = mf.init_guess_by_atom(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + print('\n\nNatoms :',molCrysX.natoms) + # print(molCrysX.coordsBohrs) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + #print('\n\nNAO :',basis.bfs_nao) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + #print('\n\naux NAO :',auxbasis.bfs_nao) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 30 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Energy_and_Convergence_Validations/3D_Water_Clusters/benchmark_DFT_LDA_DF.py",".py","7269","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 48 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/water_cluster_1.xyz', + '../../Structures/water_cluster_5.xyz', + '../../Structures/water_cluster_10.xyz', + '../../Structures/water_cluster_20.xyz', + '../../Structures/water_cluster_32.xyz', + '../../Structures/water_cluster_47.xyz', + '../../Structures/water_cluster_76.xyz', + '../../Structures/water_cluster_100.xyz', + '../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/2D_Graphene/benchmark_DFT_LDA_DF.py",".py","7113","218","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Graphene_C16.xyz', + '../../Structures/Graphene_C76.xyz', + '../../Structures/Graphene_C102.xyz', + '../../Structures/Graphene_C184.xyz', + '../../Structures/Graphene_C210.xyz', + '../../Structures/Graphene_C294.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/General_Molecules/benchmark_DFT_LDA_DF.py",".py","7157","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Caffeine.xyz', + '../../Structures/Serotonin.xyz', + '../../Structures/Cholesterol.xyz', + '../../Structures/C60.xyz', + '../../Structures/Taxol.xyz', + '../../Structures/Valinomycin.xyz', + '../../Structures/Olestra.xyz', + '../../Structures/Ubiquitin.xyz' +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 50 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 5000 + dftObj.XC_algo = 2 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = True + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = False + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/1D_Alkanes/benchmark_DFT_LDA_DF.py",".py","7174","218","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ + '../../Structures/Ethane.xyz', + '../../Structures/Decane_C10H22.xyz', + '../../Structures/Icosane_C20H42.xyz', + '../../Structures/Pentacontane_C50H102.xyz', + '../../Structures/Octacontane_C80H162.xyz', + '../../Structures/Hectane_C100H202.xyz', + '../../Structures/Icosahectane_C120H242.xyz', +] + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 51200 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/benchmark_DFT_LDA_DF.py",".py","7276","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', +# '../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', +# '../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 51200 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU2/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU12/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = True + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU/benchmark_DFT_LDA_DF.py",".py","7284","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', +# '../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU10/benchmark_DFT_LDA_DF.py",".py","7287","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/latest_inline_coulomb_rys_3c2e/benchmark_DFT_LDA_DF.py",".py","7300","222"," +####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', + '../../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', + '../../../Structures/water_cluster_47.xyz', + '../../../Structures/water_cluster_76.xyz', + '../../../Structures/water_cluster_100.xyz', +# '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU9/benchmark_DFT_LDA_DF.py",".py","7287","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU11/benchmark_DFT_LDA_DF.py",".py","7285","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = True + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = True + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU3/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 10240 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU4/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU13/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = True + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/latest_GPU_benchmark_no_cholesky_smaller_XC_batch_size/benchmark_DFT_LDA_DF.py",".py","7305","222"," +####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../../Structures/water_cluster_5.xyz', +# '../../../Structures/water_cluster_10.xyz', +# '../../../Structures/water_cluster_20.xyz', +# '../../../Structures/water_cluster_32.xyz', +# '../../../Structures/water_cluster_47.xyz', +# '../../../Structures/water_cluster_76.xyz', +# '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU6/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU7/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU8/benchmark_DFT_LDA_DF.py",".py","7287","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/test_new_GPU5/benchmark_DFT_LDA_DF.py",".py","7286","221","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../../Structures/water_cluster_1.xyz', +# '../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', +# '../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', +# '../../Structures/water_cluster_47.xyz', +# '../../Structures/water_cluster_76.xyz', +# '../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = True + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/FINAL_Benchmarks_for_paper/Scaling_PyFock_GPU_Benchmark/3D_Water_Clusters/def2-TZVP/benchmark_DFT_LDA_DF.py",".py","7423","227","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 2 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(1500000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + + +#basis_set_name = 'def2-SVP' +basis_set_name = 'def2-TZVP' +# basis_set_name = 'cc-pVDZ' + + +auxbasis_name = 'def2-universal-jfit' + +# List of all molecules to calculate +xyz_files = [ +# '../../Structures/water_cluster_1.xyz', + '../../../Structures/water_cluster_5.xyz', + '../../../Structures/water_cluster_10.xyz', + '../../../Structures/water_cluster_20.xyz', + '../../../Structures/water_cluster_32.xyz', + '../../../Structures/water_cluster_47.xyz', + '../../../Structures/water_cluster_76.xyz', + '../../../Structures/water_cluster_100.xyz', + '../../../Structures/water_cluster_139.xyz', +] + + +# Loop through all molecules +for xyzFilename in xyz_files: + print(f""\n{'='*60}"") + print(f""Processing: {xyzFilename}"") + print(f""{'='*60}"") + + # ---------PySCF--------------- + #Comparison with PySCF + molPySCF = gto.Mole() + molPySCF.atom = xyzFilename + molPySCF.basis = basis_set_name + molPySCF.cart = True + molPySCF.verbose = 4 + molPySCF.max_memory=1500000 + molPySCF.build() + + print('\n\nPySCF Results\n\n') + start=timer() + mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) + mf.xc = funcidpyscf + mf.verbose = 4 + mf.direct_scf = False + mf.init_guess = 'minao' + dmat_init = mf.init_guess_by_minao(molPySCF) + mf.max_cycle = 1 + mf.conv_tol = 1e-7 + mf.grids.level = 3 + energyPyscf = mf.kernel(dm0=dmat_init) + print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) + print('One electron integrals energy',mf.scf_summary['e1']) + print('Coulomb energy ',mf.scf_summary['coul']) + print('EXC ',mf.scf_summary['exc']) + duration = timer()-start + print('PySCF time: ', duration) + pyscfGrids = mf.grids + print('PySCF Grid Size: ', pyscfGrids.weights.shape) + print('\n\n PySCF Dipole moment') + dmat = mf.make_rdm1() + mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') + mf = 0 + + #--------------------CrysX -------------------------- + + #Initialize a Mol object with somewhat large geometry + molCrysX = Mol(coordfile=xyzFilename) + + #Initialize a Basis object with a very large basis set + basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) + + auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) + + dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) + dftObj.dmat = dmat_init + dftObj.conv_crit = 1e-7 + dftObj.max_itr = 50 + dftObj.ncores = ncores + dftObj.save_ao_values = False + dftObj.rys = True + dftObj.DF_algo = 10 + dftObj.blocksize = 20480 + dftObj.XC_algo = 3 + dftObj.debug = False + dftObj.sortGrids = False + dftObj.xc_bf_screen = True + dftObj.threshold_schwarz = 1e-9 + dftObj.strict_schwarz = False + dftObj.cholesky = False + dftObj.orthogonalize = True + # SAO or CAO basis + dftObj.sao = False + + # GPU acceleration + dftObj.use_gpu = True + dftObj.keep_ao_in_gpu = False + dftObj.use_libxc = False + dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference + dftObj.n_gpus = 1 # Specify the number of GPUs + dftObj.free_gpu_mem = True + dftObj.threads_x = 32 + dftObj.threads_y = 32 + dftObj.dynamic_precision = False + dftObj.keep_ints3c2e_in_gpu = True + + + # Using PySCF grids to compare the energies + energyCrysX, dmat = dftObj.scf() + + + print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + + print('\n\nPyFock Dipole moment') + M = Integrals.dipole_moment_mat_symm(basis) + mol_dip = molCrysX.get_dipole_moment(M, dmat) + print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) + print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +from numba import cuda + +# Reset releases all memory and context +cuda.select_device(0) +cuda.close() +cuda.current_context().reset() +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +# import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +# print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","benchmarks_tests/Apple_M4_16GB_256GB/benchmark_DFT_LDA_DF.py",".py","9462","298","####### NOTE: The scipy.linalg library appears to be using double the number of threads supplied for some reason. +####### To avoid such issues messing up the benchmarks, the benchmark should be run as 'taskset --cpu-list 0-3 python3 benchmark_DFT_LDA_DF.py' +####### This way one can set the number of CPUs seen by the python process and the benchmark would be much more reliable. +####### Furthermore, to confirm the CPU and memory usage throughout the whole process, one can profilie it using +####### psrecord 13447 --interval 1 --duration 120 --plot 13447.png +####### +####### This may be required in some cases when using GPU on WSL +####### export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" + +import os +import platform +import psutil +import numba +#numba.config.THREADING_LAYER='tbb' +# Set the number of threads/cores to be used by PyFock and PySCF +ncores = 4 +os.environ['OMP_NUM_THREADS'] = str(ncores) +os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 +os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 +os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 +# os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 +os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=1 +# Set the max memory for PySCF +os.environ[""PYSCF_MAX_MEMORY""] = str(25000) + +# Print system information +from pyfock import Utils + +Utils.print_sys_info() + +# Check if the environment variables are properly set +print(""Number of cores being actually used/requested for the benchmark:"", ncores) +print('Confirming that the environment variables are properly set...') +print('OMP_NUM_THREADS =', os.environ.get('OMP_NUM_THREADS', None)) +print('OPENBLAS_NUM_THREADS =', os.environ.get('OPENBLAS_NUM_THREADS', None)) +print('MKL_NUM_THREADS =', os.environ.get('MKL_NUM_THREADS', None)) +print('VECLIB_MAXIMUM_THREADS =', os.environ.get('VECLIB_MAXIMUM_THREADS', None)) +print('NUMEXPR_NUM_THREADS =', os.environ.get('NUMEXPR_NUM_THREADS', None)) +print('PYSCF_MAX_MEMORY =', os.environ.get('PYSCF_MAX_MEMORY', None)) + + +# Run your tasks here +from pyfock import Basis +from pyfock import Mol +from pyfock import Integrals +from pyfock import DFT +from timeit import default_timer as timer +import numpy as np +import scipy + +from pyscf import gto, dft, df, scf + +#DFT SCF benchmark and comparison with PySCF +#Benchmarking and performance assessment and comparison using various techniques and different softwares + +# LDA_X LDA_C_VWN +# funcx = 1 +# funcc = 7 + +# LDA_X LDA_C_PW +# funcx = 1 +# funcc = 12 + +# LDA_X LDA_C_PW_MOD +# funcx = 1 +# funcc = 13 + +# GGA_X_PBE, GGA_C_PBE (PBE) +funcx = 101 +funcc = 130 + +# GGA_X_B88, GGA_C_LYP (BLYP) +# funcx = 106 +# funcc = 131 + +funcidcrysx = [funcx, funcc] +funcidpyscf = str(funcx)+','+str(funcc) + +# basis_set_name = 'sto-2g' +# basis_set_name = 'sto-3g' +# basis_set_name = 'sto-6g' +# basis_set_name = '6-31G' +basis_set_name = 'def2-SVP' +# basis_set_name = 'def2-SVPD' +# basis_set_name = 'def2-TZVP' +# basis_set_name = 'def2-QZVP' +# basis_set_name = 'def2-TZVPP' +# basis_set_name = 'def2-QZVPP' +# basis_set_name = 'def2-TZVPD' +# basis_set_name = 'def2-QZVPD' +# basis_set_name = 'def2-TZVPPD' +# basis_set_name = 'def2-QZVPPD' +# basis_set_name = 'cc-pVDZ' +# basis_set_name = 'ano-rcc' + +auxbasis_name = 'def2-universal-jfit' +# auxbasis_name = 'def2-universal-jkfit' +# auxbasis_name = 'def2-TZVP' +# auxbasis_name = 'sto-3g' +# auxbasis_name = 'def2-SVP' +# auxbasis_name = '6-31G' + +# xyzFilename = 'Benzene-Fulvene_Dimer.xyz' +# xyzFilename = 'Adenine-Thymine.xyz' +# xyzFilename = 'Zn.xyz' +# xyzFilename = 'Zn_dimer.xyz' +# xyzFilename = 'TPP.xyz' +# xyzFilename = 'Zn_TPP.xyz' +# xyzFilename = 'H2O.xyz' + +# xyzFilename = 'Caffeine.xyz' +# xyzFilename = 'Serotonin.xyz' +# xyzFilename = 'Cholesterol.xyz' +# xyzFilename = 'C60.xyz' +# xyzFilename = 'Taxol.xyz' +# xyzFilename = 'Valinomycin.xyz' +# xyzFilename = 'Olestra.xyz' +# xyzFilename = 'Ubiquitin.xyz' + +### 1D Carbon Alkanes +# xyzFilename = 'Ethane.xyz' +# xyzFilename = 'Decane_C10H22.xyz' +xyzFilename = 'Icosane_C20H42.xyz' +# xyzFilename = 'Tetracontane_C40H82.xyz' +# xyzFilename = 'Pentacontane_C50H102.xyz' +# xyzFilename = 'Octacontane_C80H162.xyz' +# xyzFilename = 'Hectane_C100H202.xyz' +# xyzFilename = 'Icosahectane_C120H242.xyz' + +### 2D Carbon +# xyzFilename = 'Graphene_C16.xyz' +# xyzFilename = 'Graphene_C76.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + +### 3d Carbon Fullerenes +# xyzFilename = 'C60.xyz' +# xyzFilename = 'C70.xyz' +# xyzFilename = 'Graphene_C102.xyz' +# xyzFilename = 'Graphene_C184.xyz' +# xyzFilename = 'Graphene_C210.xyz' +# xyzFilename = 'Graphene_C294.xyz' + + +# ---------PySCF--------------- +#Comparison with PySCF +molPySCF = gto.Mole() +molPySCF.atom = xyzFilename +molPySCF.basis = basis_set_name +molPySCF.cart = True +molPySCF.verbose = 4 +molPySCF.max_memory=5000 +# molPySCF.incore_anyway = True # Keeps the PySCF ERI integrals incore +molPySCF.build() +#print(molPySCF.cart_labels()) + +print('\n\nPySCF Results\n\n') +start=timer() +mf = dft.rks.RKS(molPySCF).density_fit(auxbasis=auxbasis_name) +# mf = scf.RHF(molPySCF).density_fit(auxbasis=auxbasis_name) +mf.xc = funcidpyscf +# mf.verbose = 4 +mf.direct_scf = False +# mf.with_df.max_memory = 25000 +# dmat_init = mf.init_guess_by_1e(molPySCF) +# dmat_init = mf.init_guess_by_huckel(molPySCF) +mf.init_guess = 'minao' +dmat_init = mf.init_guess_by_minao(molPySCF) +# mf.init_guess = 'atom' +# dmat_init = mf.init_guess_by_atom(molPySCF) +mf.max_cycle = 1 +mf.conv_tol = 1e-7 +mf.grids.level = 3 +# print('begin df build') +# start_df_pyscf=timer() +# mf.with_df.build() +# duration_df_pyscf = timer()- start_df_pyscf +# print('PySCF df time: ', duration_df_pyscf) +# print('end df build') +energyPyscf = mf.kernel(dm0=dmat_init) +print('Nuc-Nuc PySCF= ', molPySCF.energy_nuc()) +print('One electron integrals energy',mf.scf_summary['e1']) +print('Coulomb energy ',mf.scf_summary['coul']) +print('EXC ',mf.scf_summary['exc']) +duration = timer()-start +print('PySCF time: ', duration) +pyscfGrids = mf.grids +print('PySCF Grid Size: ', pyscfGrids.weights.shape) +print('\n\n PySCF Dipole moment') +dmat = mf.make_rdm1() +mol_dip_pyscf = mf.dip_moment(molPySCF, dmat, unit='AU') +mf = 0#None +import psutil + +# Get memory information +memory_info = psutil.virtual_memory() + +# Convert bytes to human-readable format +used_memory = psutil._common.bytes2human(memory_info.used) + + +# If you want to print in a more human-readable format, you can use psutil's utility function +print(f""Currently Used memory: {used_memory}"") +#--------------------CrysX -------------------------- + +#Initialize a Mol object with somewhat large geometry +molCrysX = Mol(coordfile=xyzFilename) +print('\n\nNatoms :',molCrysX.natoms) +# print(molCrysX.coordsBohrs) + +#Initialize a Basis object with a very large basis set +basis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=basis_set_name)}) +print('\n\nNAO :',basis.bfs_nao) + +auxbasis = Basis(molCrysX, {'all':Basis.load(mol=molCrysX, basis_name=auxbasis_name)}) +print('\n\naux NAO :',auxbasis.bfs_nao) + +dftObj = DFT(molCrysX, basis, auxbasis, xc=funcidcrysx, grids=pyscfGrids) +dftObj.dmat = dmat_init +dftObj.conv_crit = 1e-7 +dftObj.max_itr = 35 +dftObj.ncores = ncores +dftObj.save_ao_values = True +dftObj.rys = True +dftObj.DF_algo = 10 +dftObj.blocksize = 5000 +dftObj.XC_algo = 2 +dftObj.debug = False +dftObj.sortGrids = False +dftObj.xc_bf_screen = True +dftObj.threshold_schwarz = 1e-9 +dftObj.strict_schwarz = True +dftObj.cholesky = True +dftObj.orthogonalize = True +# SAO or CAO basis +dftObj.sao = False + +# GPU acceleration +dftObj.use_gpu = False +dftObj.keep_ao_in_gpu = False +dftObj.use_libxc = False +dftObj.n_streams = 1 # Changing this to anything other than 1 won't make any difference +dftObj.n_gpus = 1 # Specify the number of GPUs +dftObj.free_gpu_mem = True +dftObj.threads_x = 32 +dftObj.threads_y = 32 +dftObj.dynamic_precision = False +dftObj.keep_ints3c2e_in_gpu = True + +# print(dmat_init) +# Using PySCF grids to compare the energies +energyCrysX, dmat = dftObj.scf() +# print(dmat) + +# Using CrysX grids +# To get the same energies as PySCF (level=5) upto 1e-7 au, use the following settings +# radial_precision=1.0e-13 +# level=3 +# pruning by density with threshold = 1e-011 +# alpha_min and alpha_max corresponding to QZVP +# energyCrysX, dmat = dftObj.scf() + + +print('Energy diff (PySCF-CrysX)', abs(energyCrysX-energyPyscf)) + +print('\n\nPyFock Dipole moment') +M = Integrals.dipole_moment_mat_symm(basis) +mol_dip = molCrysX.get_dipole_moment(M, dmat) +print('Dipole moment(X, Y, Z, A.U.):', *mol_dip) +print('Max Diff dipole moment (PySCF-CrysX)', abs(mol_dip_pyscf-mol_dip).max()) + +#Print package versions +import joblib +import scipy +import numba +import threadpoolctl +import opt_einsum +import pylibxc +import llvmlite +import cupy +import numexpr +import pyscf +print('\n\n\n Package versions') +print('pyscf version', pyscf.__version__) +# print('psi4 version', psi4.__version__) +print('np version', np.__version__) +print('joblib version', joblib.__version__) +print('numba version', numba.__version__) +print('threadpoolctl version', threadpoolctl.__version__) +print('opt_einsum version', opt_einsum.__version__) +# print('pylibxc version', pylibxc.__version__) +print('llvmlite version', llvmlite.__version__) +print('cupy version', cupy.__version__) +print('numexpr version', numexpr.__version__) +print('scipy version', scipy.__version__) +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/UHF_atoms.py",".py","94134","1600","# UHF_atoms.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +from re import T +import pyfock.Mol as Mol +import pyfock.Basis as Basis +# import pyfock.Integrals as Integrals +import pyfock.Integrals as Integrals +import pyfock.Grids as Grids +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +controller = ThreadpoolController() +import numpy as np +from numpy.linalg import eig, multi_dot as dot +import scipy + +from timeit import default_timer as timer +import numba +from opt_einsum import contract +import pylibxc +# import sparse +# import dask.array as da +from scipy.sparse import csr_matrix, csc_matrix +# from memory_profiler import profile +import os +from numba import njit, prange, cuda +import numexpr +try: + import cupy as cp + from cupy import fuse + import cupyx + CUPY_AVAILABLE = True +except Exception as e: + print('Cupy is not installed. GPU acceleration is not availble.') + CUPY_AVAILABLE = False + pass + + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def compute_B(errVecs): + nKS = errVecs.shape[0] + B = np.zeros((nKS + 1, nKS + 1)) + B[-1, :] = B[:, -1] = -1.0 + B[-1, -1] = 0.0 + for i in prange(nKS): + # errVec_i_conj_T = errVecs[i].conj().T + errVec_i_conj_T = errVecs[i].T + for j in range(i + 1): + # B[i, j] = B[j, i] = np.real(np.trace(np.dot(errVec_i_conj_T, errVecs[j]))) + B[i, j] = B[j, i] = np.trace(np.dot(errVec_i_conj_T, errVecs[j])) + return B + +class DFT: + def __init__(self, mol, basis, dmat_guess_method=None, xc=None, gridsLevel=3): + if mol is None: + print('ERROR: A Mol object is required to initialize a DFT object.') + else: + self.mol = mol + if basis is None: + print('ERROR: A Basis object is required to initialize a DFT object.') + else: + self.basis = basis + if dmat_guess_method is None: + self.dmat_guess_method = 'core' + else: + self.dmat_guess_method = dmat_guess_method + if xc is None: + self.xc = [1, 7] #LDA + else: + self.xc = xc + # DIIS + self.KSmats = [] + self.errVecs = [] + self.diisSpace = 6 + + # Grids + self.gridsLevel = gridsLevel + + # GPU acceleration + self.use_gpu = False + self.keep_ao_in_gpu = True + self.use_libxc = True + self.n_streams = 1 + self.n_gpus = 1 + self.free_gpu_mem = False + try: + self.max_threads_per_block = cuda.get_current_device().MAX_THREADS_PER_BLOCK + except: + self.max_threads_per_block = 1024 + + self.threads_x = int(self.max_threads_per_block/16) + self.threads_y = int(self.max_threads_per_block/64) + + # self.max_threads_per_block = 1024 + # self.threads_x = 64 + # self.threads_y = 16 + + # if self.use_gpu: + # try: + # global cp + # global cupy_scipy + # import cupy as cp + # import cupyx.scipy as cupy_scipy + # # from cupy.linalg import eig, multi_dot as dot + # except ModuleNotFoundError: + # print('Cupy was not found!') + + def removeLinearDep(self, H, S): + return 1 + + def nuclear_rep_energy(self, mol=None): + # Nuclear-nuclear energy + if mol is None: + mol = self.mol + + e = 0 + for i in range(mol.natoms): + for j in range(i, mol.natoms): + if (i!=j): + dist = mol.coordsBohrs[i]-mol.coordsBohrs[j] + e = e + mol.Zcharges[i]*mol.Zcharges[j]/np.sqrt(np.sum(dist**2)) + + return e + + # full density matrix for RHF + def gen_dm(self, mo_coeff, mo_occ): + + mocc = mo_coeff[:,mo_occ>0] + + return np.dot(mocc*mo_occ[mo_occ>0], mocc.conj().T) + + def getOcc(self, mol=None, energy_mo=None, coeff_mo=None): + e_idx = np.argsort(energy_mo) + e_sort = energy_mo[e_idx] + nmo = energy_mo.size + occ_mo = np.zeros(nmo) + nocc = mol.nelectrons // 2 + occ_mo[e_idx[:nocc]] = 2 + return occ_mo + + def gen_dm_cupy(self, mo_coeff, mo_occ): + mocc = mo_coeff[:,mo_occ>0] + return cp.dot(mocc*mo_occ[mo_occ>0], mocc.conj().T) + + def getOcc_cupy(self, mol=None, energy_mo=None, coeff_mo=None): + e_idx = cp.argsort(energy_mo) + e_sort = energy_mo[e_idx] + nmo = energy_mo.size + occ_mo = cp.zeros(nmo) + nocc = mol.nelectrons // 2 + occ_mo[e_idx[:nocc]] = 2 + return occ_mo + + def solve(self, H, S, orthogonalize=False): + if not orthogonalize: + #Solve the generalized eigenvalue equation HC = SCE + eigvalues, eigvectors = scipy.linalg.eigh(H, S) + + else: + eig_val_s, eig_vec_s = scipy.linalg.eigh(S) + # Removing the eigenvectors assoicated to the smallest eigenvalue. + x = eig_vec_s[:,eig_val_s>1e-7] / np.sqrt(eig_val_s[eig_val_s>1e-7]) + xhx = x.T @ H @ x + #Solve the canonical eigenvalue equation HC = SCE + eigvalues, eigvectors = scipy.linalg.eigh(xhx) + eigvectors = np.dot(x, eigvectors) + + idx = np.argmax(np.abs(eigvectors.real), axis=0) + eigvectors[:,eigvectors[idx,np.arange(len(eigvalues))].real<0] *= -1 + return eigvalues, eigvectors # E, C + + def solve_cupy(self, H, S, orthogonalize=True): + eig_val_s, eig_vec_s = cp.linalg.eigh(S) + # Removing the eigenvectors assoicated to the smallest eigenvalue. + x = eig_vec_s[:,eig_val_s>1e-7] / cp.sqrt(eig_val_s[eig_val_s>1e-7]) + xhx = x.T @ H @ x + #Solve the canonical eigenvalue equation HC = SCE + eigvalues, eigvectors = cp.linalg.eigh(xhx) + eigvectors = cp.dot(x, eigvectors) + + idx = cp.argmax(cp.abs(eigvectors.real), axis=0) + eigvectors[:,eigvectors[idx,cp.arange(len(eigvalues))].real<0] *= -1 + return eigvalues, eigvectors # E, C + + + def getCoreH(self, mol=None, basis=None): + #Get the core Hamiltonian + if mol is None: + mol = self.mol + if basis is None: + basis = self.basis + nao = basis.bfs_nao + H = np.empty((nao,nao)) + Vmat = Integrals.nucMatSymmNumbawrap(basis, mol) + Tmat = Integrals.kinMatSymmNumbawrap(basis) + H = Vmat + Tmat + + return H + + + def guessCoreH(self, mol=None, basis=None, Hcore=None, S=None): + #Get a guess for the density matrix using the core Hamiltonian + if mol is None: + mol = self.mol + if basis is None: + basis = self.basis + if Hcore is None: + Hcore = self.getCoreH(mol, basis) + if S is None: + S = Integrals.overlapMatSymmNumbawrap(basis) + + eigvalues, eigvectors = scipy.linalg.eigh(Hcore, S) + # print(eigvalues) + idx = np.argmax(abs(eigvectors.real), axis=0) + eigvectors[:,eigvectors[idx,np.arange(len(eigvalues))].real<0] *= -1 + mo_occ = self.getOcc(mol, eigvalues, eigvectors) + # print(mo_occ) + return self.gen_dm(eigvectors, mo_occ) + + + + # def DIIS(self, S, D, F): + # FDS = np.dot(np.dot(F, D), S) + # errVec = FDS - FDS.T.conj() + # self.KSmats.append(F) + # self.errVecs.append(errVec) + # nKS = len(self.KSmats) + # if nKS > self.diisSpace: + # self.KSmats.pop(0) + # self.errVecs.pop(0) + # nKS = nKS - 1 + # B = compute_B(self.errVecs) + # residual = np.zeros(nKS + 1) + # residual[-1] = -1.0 + # weights = scipy.linalg.solve(B, residual) + # assert np.isclose(np.sum(weights[:-1]), 1.0) + # F = np.zeros(F.shape) + # for i, KS in enumerate(self.KSmats): + # F += weights[i] * KS + # return F + + def DIIS(self,S,D,F): + FDS = dot([F,D,S]) + # SDF = np.conjugate(FDS).T + errVec = FDS - np.conjugate(FDS).T + self.KSmats.append(F) + self.errVecs.append(errVec) + nKS = len(self.KSmats) + if nKS > self.diisSpace: + self.KSmats.pop(0) + self.errVecs.pop(0) + nKS = nKS - 1 + B = np.zeros((nKS + 1,nKS + 1)) + B[-1,:] = B[:,-1] = -1.0 + B[-1,-1] = 0.0 + # B is symmetric + for i in range(nKS): + for j in range(i+1): + B[i,j] = B[j,i] = \ + np.real(np.trace(np.dot(np.conjugate(self.errVecs[i]).T, self.errVecs[j]))) + # for i in range(nKS): + # for j in range(i+1): + # print(self.errVecs[i].shape) + # B[i,j] = np.real(np.dot(np.conjugate(self.errVecs[i]).T, self.errVecs[j])) + # B[j,i] = B[i,j] + + residual = np.zeros((nKS + 1, 1)) + residual[-1] = -1.0 + weights = scipy.linalg.solve(B,residual) + + # weights is 1 x numFock + 1, but first numFock values + # should sum to one if we are doing DIIS correctly + assert np.isclose(sum(weights[:-1]),1.0) + + F = np.zeros(F.shape) + for i, KS in enumerate(self.KSmats): + weight = weights[i] + F += numexpr.evaluate('(weight * KS)') + + return F + + def DIIS_cupy(self,S,D,F): + FDS = F @ D @ S + errVec = FDS - cp.conjugate(FDS).T + self.KSmats.append(F) + self.errVecs.append(errVec) + nKS = len(self.KSmats) + if nKS > self.diisSpace: + self.KSmats.pop(0) + self.errVecs.pop(0) + nKS = nKS - 1 + B = cp.zeros((nKS + 1,nKS + 1)) + B[-1,:] = B[:,-1] = -1.0 + B[-1,-1] = 0.0 + # B is symmetric + for i in range(nKS): + for j in range(i+1): + B[i,j] = B[j,i] = \ + cp.real(cp.trace(cp.dot(cp.conjugate(self.errVecs[i]).T, self.errVecs[j]))) + + residual = cp.zeros((nKS + 1, 1)) + residual[-1] = -1.0 + weights = cp.linalg.solve(B,residual) + + # weights is 1 x numFock + 1, but first numFock values + # should sum to one if we are doing DIIS correctly + assert cp.isclose(sum(weights[:-1]),1.0) + + F = cp.zeros(F.shape) + for i, KS in enumerate(self.KSmats): + weight = weights[i] + F += weight * KS + + return F + + # @profile + def scf(self, mol=None, basis=None, dmat=None, xc=None, conv_crit=1.0E-7, max_itr=50, ncores=2, grids=None, gridsLevel=3, isDF=True, + auxbasis=None, rys=True, DF_algo=6, blocksize=None, XC_algo=None, debug=False, sortGrids=False, save_ao_values=False,xc_bf_screen=True, + threshold_schwarz = 1e-09): + #### Timings + duration1e = 0 + durationDIIS = 0 + durationAO_values = 0 + durationCoulomb = 0 + durationgrids = 0 + durationItr = 0 + durationxc = 0 + durationXCpreprocessing = 0 + durationDF = 0 + durationKS = 0 + durationSCF = 0 + durationgrids_prune_rho = 0 + durationSchwarz = 0 + duration2c2e = 0 + durationDF_coeff = 0 + durationDF_gamma = 0 + durationDF_Jtri = 0 + startSCF = timer() + + + + #### Set number of cores + numba.set_num_threads(ncores) + os.environ['RAYON_NUM_THREADS'] = str(ncores) + + print('Running DFT using '+str(numba.get_num_threads())+' threads for Numba.\n\n', flush=True) + if basis is None: + basis = self.basis + if mol is None: + mol = self.mol + if xc is None: + xc = self.xc + if gridsLevel is None: + gridsLevel = self.gridsLevel + if auxbasis is None: + auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-universal-jfit')}) + if grids is None: + sortGrids = True + if xc_bf_screen==False: + if save_ao_values==True: + print('Warning! AO screening is set to False, but AO values are requested to be saved. \ + AO values can only be saved when XC_BF_SCREEN=TRUE. AO values will not be saved.', flush=True) + save_ao_values = False + if CUPY_AVAILABLE: + if self.use_gpu: + print('GPU acceleration is enabled. Currently this only accelerates AO values and XC term evaluation.', flush=True) + print('GPU(s) information:') + # print(cp.cuda.Device.mem_info()) + print(cuda.detect()) + print('Max threads per block supported by the GPU: ', cuda.get_current_device().MAX_THREADS_PER_BLOCK, flush=True) + print('The user has specified to use '+str(self.n_gpus)+' GPU(s).') + + # For CUDA computations + threads_per_block = (self.threads_x, self.threads_y) + print('Threads per block configuration: ', threads_per_block, flush=True) + + print('\n\nWill use dynamic precision. ') + print('This means that the XC term will be evaluated in single precision until the ') + print('relative energy difference b/w successive iterations is less than 5.0E-7.') + precision_XC = cp.float32 + + if XC_algo is None: + XC_algo = 3 + if blocksize is None: + blocksize = 51200 + else: + if self.use_gpu: + print('GPU acceleration requested but cannot be enabled as Cupy is not installed.', flush=True) + self.use_gpu = False + + if XC_algo is None: + XC_algo = 2 + if blocksize is None: + blocksize = 5000 + + isSchwarz = True + + + eigvectors = None + # DF_algo = 1 # Worst algorithm for more than 500 bfs/auxbfs (requires 2x mem of 3c2e integrals and a large prefactor) + # DF_algo = 2 # Sligthly better (2x memory efficient) algorithm than above (requires 1x mem of 3c2e integrals and a large prefactor) + # DF_algo = 3 # Memory effcient without any prefactor. (Can easily be converted into a sparse version, unlike the others) (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + # DF_algo = 4 # Same as 3, except now we use triangular version of ints3c2e to save on memory + # DF_algo = 5 # Same as 4 in terms of memory requirements, however faster in performance due to the use of Schwarz screening. + # DF_algo = 6 # Much cheaper than 4 and 5 in terms of memory requirements because the indices of significant (ij|P) are efficiently calculated without duplicates/temporary arrays. + # The speed maybe same or just slightly slower. + # DF_algo = 7 # The significant indices (ij|P) are stored even more efficiently by using shell indices instead of bf indices. + # DF_algo = 8 # Similar to 6, except that here the significant indices are not stored resulting in 50% memory savings + # DF_algo = 9 # Same as 4, however, here we use pyscf (libcint) for integral evaluation + + start1e = timer() + print('\nCalculating one electron integrals...\n\n', flush=True) + # One electron integrals + S = Integrals.overlap_mat_symm(basis) + V = Integrals.nuc_mat_symm(basis, mol) + T = Integrals.kin_mat_symm(basis) + # Core hamiltonian + H = V + T + if self.use_gpu: + S = cp.asarray(S, dtype=cp.float64) + V = cp.asarray(V, dtype=cp.float64) + T = cp.asarray(T, dtype=cp.float64) + H = cp.asarray(H, dtype=cp.float64) + cp.cuda.Stream.null.synchronize() + + print('Core H size in GB ',H.nbytes/1e9, flush=True) + print('done!', flush=True) + duration1e = timer() - start1e + print('Time taken '+str(duration1e)+' seconds.\n', flush=True) + + if dmat is None: + if self.dmat_guess_method=='core': + dmat = self.guessCoreH(mol, basis, Hcore=H, S=S) + + if self.use_gpu: + dmat_cp = cp.asarray(dmat, dtype=cp.float64) + cp.cuda.Stream.null.synchronize() + + startCoulomb = timer() + if not isDF: # 4c2e ERI case + + print('\nCalculating four centered two electron integrals (ERIs)...\n\n', flush=True) + if not isSchwarz: + # Four centered two electron integrals (ERIs) + if rys: + ints4c2e = Integrals.rys_4c2e_symm(basis) + else: + ints4c2e = Integrals.conv_4c2e_symm(basis) + print('Four Center Two electron ERI size in GB ',ints4c2e.nbytes/1e9, flush=True) + print('done!') + else: + print('\n\nPerforming Schwarz screening...') + # threshold_schwarz = 1e-09 + print('Threshold ', threshold_schwarz) + startSchwarz = timer() + nints4c2e_sym8 = int(basis.bfs_nao**4/8) + nints4c2e = int(basis.bfs_nao**4) + duration_4c2e_diag = 0.0 + start_4c2e_diag = timer() + # Diagonal elements of ERI 4c2e array + ints4c2e_diag = Integrals.schwarz_helpers.eri_4c2e_diag(basis) + duration_4c2e_diag = timer() - start_4c2e_diag + print('Time taken to evaluate the ""diagonal"" of 4c2e ERI tensor: ', duration_4c2e_diag) + # Calculate the square roots required for + duration_square_roots = 0.0 + start_square_roots = timer() + sqrt_ints4c2e_diag = np.sqrt(np.abs(ints4c2e_diag)) + duration_square_roots = timer() - start_square_roots + print('Time taken to evaluate the square roots needed: ', duration_square_roots) + chunksize = int(1e9) # Results in 2 GB chunks + duration_indices_calc = 0.0 + duration_concatenation = 0.0 + start_indices_calc = timer() + # indices_temp = [] + ijkl = [0, 0, 0, 0] + if chunksize0: + indicesA = np.concatenate([indicesA, indices_temp[0][0:count]]) + indicesB = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC = np.concatenate([indicesC, indices_temp[2][0:count]]) + indicesD = np.concatenate([indicesD, indices_temp[3][0:count]]) + else: + + indicesA = indices_temp[0][0:count] + indicesB = indices_temp[1][0:count] + indicesC = indices_temp[2][0:count] + indicesD = indices_temp[3][0:count] + # duration_concatenation += timer() - start_concatenation + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if count0: + indicesA = np.concatenate([indicesA, indices_temp[0][0:count]]) + indicesB = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC = np.concatenate([indicesC, indices_temp[2][0:count]]) + else: + + indicesA = indices_temp[0][0:count] + indicesB = indices_temp[1][0:count] + indicesC = indices_temp[2][0:count] + # duration_concatenation += timer() - start_concatenation + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if count0: + indicesA_shell = np.concatenate([indicesA, indices_temp[0][0:count]]) + indicesB_shell = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC_shell = np.concatenate([indicesC, indices_temp[2][0:count]]) + else: + + indicesA_shell = indices_temp[0][0:count] + indicesB_shell = indices_temp[1][0:count] + indicesC_shell = indices_temp[2][0:count] + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if count0: + offset = np.concatenate([offset, indices_temp[0][0:np.argmax(indices_temp[0])]]) + indicesB = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC = np.concatenate([indicesC, indices_temp[2][0:count]]) + else: + + offset = indices_temp[0][0:np.argmax(indices_temp[0])] + indicesB = indices_temp[1][0:count] + indicesC = indices_temp[2][0:count] + # duration_concatenation += timer() - start_concatenation + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if countQpq', metric_inverse_sqrt, ints3c2e) + # # print('Contraction done!') + # ints3c2e = 0 + # print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + # print('Intermediate Auxiliary Density fitting coefficients size in GB ',Qpq.nbytes/1e9, flush=True) + + ##### New version, that as far as I can understand doesn't involve any creation of new arrays of the size of int3c2e array + ##### This is done by not storing the result of scipy solve in an array but rather overwriting the original array. + ##### A lot of reshaping is involved, but it is checked that it does not result in copies of arrays by using + ##### np.shares_memory(a,b) https://stackoverflow.com/questions/69447431/numpy-reshape-copying-data-or-not + metric_sqrt = scipy.linalg.sqrtm(ints2c2e) + print('Sqrt done!') + ints3c2e_reshape = ints3c2e.reshape(basis.bfs_nao*basis.bfs_nao, auxbasis.bfs_nao).T + print('Reshape done!') + print(np.shares_memory(ints3c2e_reshape, ints3c2e)) + #TODO: The following solve step is very sloww and makes the Coulomb time much longer. Try to make it faster. + scipy.linalg.solve(metric_sqrt, ints3c2e_reshape, \ + assume_a='pos', overwrite_a=False, overwrite_b=True) + print('Solve done!') + Qpq = ints3c2e_reshape.reshape(auxbasis.bfs_nao, basis.bfs_nao, basis.bfs_nao) + print(np.shares_memory(Qpq, ints3c2e_reshape)) + print(np.shares_memory(Qpq, ints3c2e)) + print('Reshape done!') + print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + print('Intermediate Auxiliary Density fitting coefficients size in GB ',Qpq.nbytes/1e9, flush=True) + + ##### Sparse version of above (The solve is very slow and the reshape after solve on sparse matrix doesn't work) + # metric_sqrt = scipy.linalg.sqrtm(ints2c2e) + # print('Sqrt done!') + # ints3c2e_reshape = ints3c2e.reshape(basis.bfs_nao*basis.bfs_nao, auxbasis.bfs_nao).T + # print('Reshape done!') + # ints3c2e_reshape[np.abs(ints3c2e_reshape) < 1E-09] = 0# fill most of the array with zeros (1E-09 is optimal i guess) + # ints3c2e_reshape_sparse = csc_matrix(ints3c2e_reshape) + # metric_sqrt[np.abs(metric_sqrt) < 1E-09] = 0# fill most of the array with zeros (1E-09 is optimal i guess) + # metric_sqrt_sparse = csc_matrix(metric_sqrt) + # print('Sparsification done!') + # print('ints3c2e Sparse size in GB ',(ints3c2e_reshape_sparse.data.nbytes + ints3c2e_reshape_sparse.indptr.nbytes + ints3c2e_reshape_sparse.indices.nbytes)/1e9, flush=True) + # # Sparse solve + # Qpq_sparse = scipy.sparse.linalg.spsolve(metric_sqrt_sparse, ints3c2e_reshape_sparse) + # print('Sparse Solve done!') + # Qpq_sparse = Qpq_sparse.reshape(auxbasis.bfs_nao, basis.bfs_nao, basis.bfs_nao) + # print('Reshape done!') + # print('Qpq Sparse size in GB ',(Qpq_sparse.data.nbytes + Qpq_sparse.indptr.nbytes + Qpq_sparse.indices.nbytes)/1e9, flush=True) + # Qpq = sparse.COO.from_scipy_sparse(Qpq_sparse) + + if DF_algo==3: # Best algorithm (Memory efficient and fast without any prefactor linalg.solve) + #https://aip.scitation.org/doi/pdf/10.1063/1.1567253 + print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + print('Three Center Two electron ERI size in GB ',ints3c2e.nbytes/1e9, flush=True) + if DF_algo==4 or DF_algo==5 or DF_algo==6 or DF_algo==8: + indices_dmat_tri = np.tril_indices_from(dmat) # Lower triangular including diagonal + indices_dmat_tri_2 = np.tril_indices_from(dmat, k=-1) # lower tri, without the diagonal + print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + print('Three Center Two electron ERI size in GB ',ints3c2e.nbytes/1e9, flush=True) + + + + + print('Three-centered two electron evaluation done!', flush=True) + + ### TESTING SOME SPARSE STUFF + # Unfortunately, the current settings only provide small memory savings and the error is also quite large (0.00001 Ha) + # Anyway this is not very useful as we are making a sparse array from an already calculated array which may not fit into memory + # So I don't see much use for this right now. + # df_coeff0[np.abs(df_coeff0) < 1E-09] = 0# fill most of the array with zeros (1E-09 is optimal i guess) + # df_coeff0_sp = sparse.COO(df_coeff0) # convert to sparse array + # ints3c2e[np.abs(ints3c2e) < 1E-07] = 0# fill most of the array with zeros (1E-07 is optimal i guess) + # ints3c2e_sp = sparse.COO(ints3c2e) # convert to sparse array + # print('Sparse Three Center Two electron ERI size in GB ',ints3c2e_sp.nbytes/1e9, flush=True) + # print('Intermediate Sparse Auxiliary Density fitting coefficients size in GB ',df_coeff0_sp.nbytes/1e9, flush=True) + + + durationCoulomb = timer() - startCoulomb + print('Time taken for Coulomb term related calculations (integrals, screening, prelims..) '+str(durationCoulomb)+' seconds.\n', flush=True) + + + scf_converged = False + durationgrids = 0 + + if grids is None: + startGrids = timer() + print('\nGenerating grids...\n\n', flush=True) + # To get the same energies as PySCF (level=5) upto 1e-7 au, use the following settings + # radial_precision = 1.0e-13 + # level=3 + # pruning by density with threshold = 1e-011 + # alpha_min and alpha_max corresponding to QZVP + print('Grids level: ', gridsLevel) + # Generate grids for XC term + basisGrids = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-QZVP')}) + grids = Grids(mol, basis=basisGrids, level = gridsLevel, ncores=ncores) + + print('done!', flush=True) + durationgrids = timer() - startGrids + print('Time taken '+str(durationgrids)+' seconds.\n', flush=True) + + # Begin pruning the grids based on density (rho) + # Evaluate ao_values to calculate rho + print('\nPruning generated grids by rho...\n\n', flush=True) + startGrids_prune_rho = timer() + threshold_rho = 1e-011 + ngrids_temp = grids.coords.shape[0] + ndeleted = 0 + blocksize_temp = 50000 + nblocks_temp = ngrids_temp//blocksize_temp + weightsNew = None + coordsNew = None + for iblock in range(nblocks_temp+1): + offset = iblock*blocksize_temp + weights_block = grids.weights[offset : min(offset+blocksize_temp,ngrids_temp)] + coords_block = grids.coords[offset : min(offset+blocksize_temp,ngrids_temp)] + ao_value_block = Integrals.bf_val_helpers.eval_bfs(basis, coords_block) + rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block) + zero_indices = np.where(np.abs(rho_block*weights_block) < threshold_rho)[0] + ndeleted += len(zero_indices) + weightsNew_block = np.delete(weights_block, zero_indices) + coordsNew_block = np.delete(coords_block, zero_indices, 0) + if weightsNew_block.shape[0]>0: + if weightsNew is None: + weightsNew = weightsNew_block + coordsNew = coordsNew_block + else: + weightsNew = np.concatenate((weightsNew, weightsNew_block)) + coordsNew = np.concatenate([coordsNew, coordsNew_block], axis=0) + + grids.coords = coordsNew + grids.weights = weightsNew + print('done!', flush=True) + durationgrids_prune_rho = timer() - startGrids_prune_rho + print('Time taken '+str(durationgrids_prune_rho)+' seconds.\n', flush=True) + print('\nDeleted '+ str(ndeleted) + ' grid points.', flush=True) + + else: + print('\nUsing the user supplied grids!\n\n', flush=True) + + + # Grid information initial + print('\nNo. of supplied/generated grid points: ', grids.coords.shape[0], flush=True) + + # Prune grids based on weights + # start_pruning_weights = timer() + # print('\nPruning grids based on weights....', flush=True) + # zero_indices = np.where(np.logical_and(grids.weights>=-1.0e-12, grids.weights<=1.e-12)) + # grids.weights = np.delete(grids.weights, zero_indices) + # grids.coords = np.delete(grids.coords, zero_indices, 0) + # print('done!', flush=True) + # duration_pruning_weights = timer() - start_pruning_weights + # print('\nTime taken '+str(duration_pruning_weights)+' seconds.\n', flush=True) + # print('\nNo. of grid points after screening by weights: ', grids.coords.shape[0], flush=True) + + print('Size (in GB) for storing the coordinates of grid: ', grids.coords.nbytes/1e9, flush=True) + print('Size (in GB) for storing the weights of grid: ', grids.weights.nbytes/1e9, flush=True) + print('Size (in GB) for storing the density at gridpoints: ', grids.weights.nbytes/1e9, flush=True) + + # Sort the grids for slightly better performance with batching (doesn't seem to make much difference) + if sortGrids: + print('\nSorting grids ....', flush=True) + # Function to sort grids + def get_ordered_list(points, x, y, z): + points.sort(key = lambda p: (p[0] - x)**2 + (p[1] - y)**2 + (p[2] - z)**2) + # print(points[0:10]) + return points + # Make a single array of coords and weights + coords_weights = np.c_[grids.coords, grids.weights] + coords_weights = np.array(get_ordered_list(coords_weights.tolist(), min(grids.coords[:,0]), min(grids.coords[:,1]), min(grids.coords[:,2]))) + # Now go back to two arrays for coords and weights + grids.weights = coords_weights[:,3] + grids.coords = coords_weights[:,0:3] + coords_weights = 0#None + print('done!', flush=True) + + # blocksize = 10000 + ngrids = grids.coords.shape[0] + nblocks = ngrids//blocksize + print('\nWill use batching to evaluate the XC term for memory efficiency.', flush=True) + print('Batch size: ', blocksize, flush=True) + print('No. of batches: ', nblocks+1, flush=True) + + + #### Some preliminary stuff for XC evaluation + durationXCpreprocessing = 0 + list_nonzero_indices = None + count_nonzero_indices = None + list_ao_values = None + list_ao_grad_values = None + if xc_bf_screen: + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(xc[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(xc[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + ### Find the list of significanlty contributing bfs for xc evaluations + startXCpreprocessing = timer() + print('\nPreliminary processing for XC term evaluations...', flush=True) + print('Calculating the value of basis functions (atomic orbitals) and get the indices of siginificantly contributing functions...', flush=True) + # Calculate the value of basis functions for all grid points in batches + # and find the indices of basis functions that have a significant contribution to those batches for each batch + list_nonzero_indices, count_nonzero_indices = Integrals.bf_val_helpers.nonzero_ao_indices(basis, grids.coords, blocksize, nblocks, ngrids) + print('done!', flush=True) + durationXCpreprocessing = timer() - startXCpreprocessing + print('Time taken '+str(durationXCpreprocessing)+' seconds.\n', flush=True) + print('Maximum no. of basis functions contributing to a batch of grid points: ', max(count_nonzero_indices)) + print('Average no. of basis functions contributing to a batch of grid points: ', int(np.mean(count_nonzero_indices))) + + + durationAO_values = 0 + if save_ao_values: + startAO_values = timer() + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + print('\nYou have asked to save the values of significant basis functions on grid points so as to avoid recalculation for each SCF cycle.', flush=True) + memory_required = sum(count_nonzero_indices*blocksize)*8/1024/1024/1024 + print('Please note: This will require addtional memory that is approximately :'+ str(np.round(memory_required,1))+ ' GB', flush=True) + print('Calculating the value of significantly contributing basis functions (atomic orbitals)...', flush=True) + list_ao_values = [] + # Loop over batches + for iblock in range(nblocks+1): + offset = iblock*blocksize + coords_block = grids.coords[offset : min(offset+blocksize,ngrids)] + ao_values_block = Integrals.bf_val_helpers.eval_bfs(basis, coords_block, parallel=True, non_zero_indices=list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]]) + if self.use_gpu and self.keep_ao_in_gpu: + list_ao_values.append(cp.asarray(ao_values_block)) + else: + list_ao_values.append(ao_values_block) + #Free memory + ao_values_block = 0 + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + print('\nYou have asked to save the values of significant basis functions and their gradients on grid points so as to avoid recalculation for each SCF cycle.', flush=True) + memory_required = 4*sum(count_nonzero_indices*blocksize)*8/1024/1024/1024 + print('Please note: This will require addtional memory that is approximately :'+ str(np.round(memory_required,1))+ ' GB', flush=True) + print('Calculating the value of significantly contributing basis functions (atomic orbitals)...', flush=True) + list_ao_values = [] + list_ao_grad_values = [] + # Loop over batches + for iblock in range(nblocks+1): + offset = iblock*blocksize + coords_block = grids.coords[offset : min(offset+blocksize,ngrids)] + # ao_values_block = Integrals.bf_val_helpers.eval_bfs(basis, coords_block, parallel=True, non_zero_indices=list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]]) + ao_values_block, ao_grad_values_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, parallel=True, non_zero_indices=list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]]) + if self.use_gpu and self.keep_ao_in_gpu: + list_ao_values.append(cp.asarray(ao_values_block)) + list_ao_grad_values.append(cp.asarray(ao_grad_values_block)) + else: + list_ao_values.append(ao_values_block) + list_ao_grad_values.append(ao_grad_values_block) + #Free memory + ao_values_block = 0 + ao_grad_values_block =0 + print('done!', flush=True) + durationAO_values = timer() - startAO_values + print('Time taken '+str(durationAO_values)+' seconds.\n', flush=True) + + if self.use_gpu: + grids.coords = cp.asarray(grids.coords, dtype=cp.float64) + grids.weights = cp.asarray(grids.weights, dtype=cp.float64) + + #-------XC Stuff start---------------------- + + funcid = self.xc + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + + print('\n\n------------------------------------------------------', flush=True) + print('Exchange-Correlation Functional') + print('------------------------------------------------------\n', flush=True) + print('XC Functional IDs supplied: ', funcid, flush=True) + print('\n\nDescription of exchange functional: \n') + print('The Exchange function belongs to the family:', xc_family_dict[x_family_code], flush=True) + print(funcx.describe()) + print('\n\nDescription of correlation functional: \n', flush=True) + print(' The Correlation function belongs to the family:', xc_family_dict[c_family_code], flush=True) + print(funcc.describe()) + print('------------------------------------------------------\n', flush=True) + print('\n\n', flush=True) + #-------XC Stuff end---------------------- + + Etot = 0 + + itr = 1 + Enn = self.nuclear_rep_energy(mol) + + #diis = scf.CDIIS() + dmat_old = 0 + J_diff = 0 + Ecoul = 0.0 + Ecoul_temp = 0.0 + + durationxc = 0 + + + while not (scf_converged or itr==max_itr+1): + startIter = timer() + if itr==1: + dmat_diff = dmat + # Coulomb (Hartree) matrix + if not isDF: + # J = np.einsum('ijkl,lk',ints4c2e,dmat) + J = contract('ijkl,ij',ints4c2e,dmat) + else: + startDF = timer() + # Using DF calculate the density fitting coefficients of the auxiliary basis + if DF_algo==1: + df_coeff = contract('ijk,jk', df_coeff0, dmat) + J = contract('ijk,k',ints3c2e,df_coeff) + if DF_algo==2: + df_coeff = contract('ijk,jk', Qpq, dmat) # Not exactly the same thing as above (not the auxiliary density coeffs) + J = contract('ijk,i',Qpq,df_coeff) + if DF_algo==3: # Fastest + df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + scipy.linalg.solve(ints2c2e, df_coeff, assume_a='pos', overwrite_a=False, overwrite_b=True) + J = contract('ijk,k', ints3c2e, df_coeff) + if DF_algo==4 or DF_algo==5: # Fastest and triangular (half the memory of algo 3) + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + scipy.linalg.solve(ints2c2e, df_coeff, assume_a='pos', overwrite_a=False, overwrite_b=True) + J_tri = contract('pP,P', ints3c2e, df_coeff) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + if DF_algo==6: + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + startDF_gamma = timer() + # df_coeff_1 = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator(ints3c2e, dmat_tri, indicesA, indicesB, indicesC, auxbasis.bfs_nao, ncores) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + durationDF_gamma += timer() - startDF_gamma + startDF_coeff = timer() + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Density fitting', controller.info()) + df_coeff = scipy.linalg.solve(ints2c2e, gamma_alpha, assume_a='pos', overwrite_a=False, overwrite_b=False) + durationDF_coeff += timer() - startDF_coeff + with threadpool_limits(limits=ncores, user_api='blas'): + Ecoul_temp = np.dot(df_coeff, gamma_alpha) # (rho^~|rho^~) Coulomb energy due to interactions b/w auxiliary density + startDF_Jtri = timer() + #J_tri = contract('pP,P', ints3c2e, df_coeff) + J_tri = Integrals.schwarz_helpers.J_tri_calculator(ints3c2e, df_coeff, indicesA, indicesB, indicesC, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + with threadpool_limits(limits=ncores, user_api='blas'): + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + durationDF_Jtri += timer() - startDF_Jtri + if DF_algo==8: + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + startDF_gamma = timer() + # df_coeff_1 = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator_algo8(ints3c2e, dmat_tri, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, basis.bfs_nao, auxbasis.bfs_nao) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + durationDF_gamma += timer() - startDF_gamma + startDF_coeff = timer() + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Density fitting', controller.info()) + df_coeff = scipy.linalg.solve(ints2c2e, gamma_alpha, assume_a='pos', overwrite_a=False, overwrite_b=False) + durationDF_coeff += timer() - startDF_coeff + with threadpool_limits(limits=ncores, user_api='blas'): + Ecoul_temp = np.dot(df_coeff, gamma_alpha) # (rho^~|rho^~) Coulomb energy due to interactions b/w auxiliary density + startDF_Jtri = timer() + #J_tri = contract('pP,P', ints3c2e, df_coeff) + J_tri = Integrals.schwarz_helpers.J_tri_calculator_algo8(ints3c2e, df_coeff, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, basis.bfs_nao, auxbasis.bfs_nao, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + with threadpool_limits(limits=ncores, user_api='blas'): + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + durationDF_Jtri += timer() - startDF_Jtri + durationDF = durationDF + timer() - startDF + + + + + else: + dmat_diff = dmat-dmat_old + if not isDF: + # J_diff = np.einsum('ijkl,lk',ints4c2e,dmat_diff) + J_diff = contract('ijkl,ij',ints4c2e,dmat_diff) + J += J_diff + + + else: + startDF = timer() + # Using DF calculate the density fitting coefficients of the auxiliary basis + if DF_algo==1: + df_coeff = contract('ijk,jk', df_coeff0, dmat_diff) + J_diff = contract('ijk,k',ints3c2e,df_coeff) + J += J_diff + if DF_algo==2: + df_coeff = contract('ijk,jk', Qpq, dmat) # Not exactly the same thing as above (not the auxiliary density coeffs) + J = contract('ijk,i',Qpq,df_coeff) + if DF_algo==3: + df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # This is actually the gamma_alpha in this paper () + scipy.linalg.solve(ints2c2e, df_coeff, assume_a='pos', overwrite_a=False, overwrite_b=True) # This gives the actual df coeff + J = contract('ijk,k', ints3c2e, df_coeff) + if DF_algo==4 or DF_algo==5: # Fastest and triangular (half the memory of algo 3) + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + scipy.linalg.solve(ints2c2e, df_coeff, assume_a='pos', overwrite_a=False, overwrite_b=True) + J_tri = contract('pP,P', ints3c2e, df_coeff) + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + if DF_algo==6: + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + startDF_gamma = timer() + # df_coeff_1 = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator(ints3c2e, dmat_tri, indicesA, indicesB, indicesC, auxbasis.bfs_nao, ncores) + # Integrals.schwarz_helpers.df_coeff_calculator.parallel_diagnostics(level=4) + durationDF_gamma += timer() - startDF_gamma + startDF_coeff = timer() + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Density fitting', controller.info()) + df_coeff = scipy.linalg.solve(ints2c2e, gamma_alpha, assume_a='pos', overwrite_a=False, overwrite_b=False) + durationDF_coeff += timer() - startDF_coeff + with threadpool_limits(limits=ncores, user_api='blas'): + Ecoul_temp = np.dot(df_coeff, gamma_alpha) # (rho^~|rho^~) Coulomb energy due to interactions b/w auxiliary density + startDF_Jtri = timer() + #J_tri = contract('pP,P', ints3c2e, df_coeff) + J_tri = Integrals.schwarz_helpers.J_tri_calculator(ints3c2e, df_coeff, indicesA, indicesB, indicesC, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # if self.use_gpu: + # J_tri = Integrals.schwarz_helpers.J_tri_calculator_cupy(ints3c2e, df_coeff, indicesA, indicesB, indicesC, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # else: + # J_tri = Integrals.schwarz_helpers.J_tri_calculator(ints3c2e, df_coeff, indicesA, indicesB, indicesC, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + with threadpool_limits(limits=ncores, user_api='blas'): + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + durationDF_Jtri += timer() - startDF_Jtri + if DF_algo==8: + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + startDF_gamma = timer() + # df_coeff_1 = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator_algo8(ints3c2e, dmat_tri, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, basis.bfs_nao, auxbasis.bfs_nao) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + durationDF_gamma += timer() - startDF_gamma + startDF_coeff = timer() + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Density fitting', controller.info()) + df_coeff = scipy.linalg.solve(ints2c2e, gamma_alpha, assume_a='pos', overwrite_a=False, overwrite_b=False) + durationDF_coeff += timer() - startDF_coeff + with threadpool_limits(limits=ncores, user_api='blas'): + Ecoul_temp = np.dot(df_coeff, gamma_alpha) # (rho^~|rho^~) Coulomb energy due to interactions b/w auxiliary density + startDF_Jtri = timer() + #J_tri = contract('pP,P', ints3c2e, df_coeff) + J_tri = Integrals.schwarz_helpers.J_tri_calculator_algo8(ints3c2e, df_coeff, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, basis.bfs_nao, auxbasis.bfs_nao, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + with threadpool_limits(limits=ncores, user_api='blas'): + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + durationDF_Jtri += timer() - startDF_Jtri + durationDF = durationDF + timer() - startDF + # J += J_diff + if self.use_gpu: + J = cp.asarray(J, dtype=cp.float64) + cp.cuda.Stream.null.synchronize() + + + # XC energy and potential + startxc = timer() + + + if not self.use_gpu: + if XC_algo==1: + # Much slower than JOBLIB version + # Still keeping it because, it can be useful when using GPUs + Exc, Vxc = Integrals.eval_xc_1(basis, dmat, grids.weights, grids.coords, funcid, blocksize=blocksize, debug=debug, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values) + if XC_algo==2: + # Much faster than above and stable too, therefore this should be default now. + # Used to unstable and had memory leaks, + # But now all that is fixed by using threadpoolctl, garbage collection or freeing up memory after XC evaluation at each iteration + # print(list_ao_values) + Exc, Vxc = Integrals.eval_xc_2(basis, dmat, grids.weights, grids.coords, funcid, ncores=ncores, blocksize=blocksize, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, debug=debug) + + if XC_algo==3: + # Much faster than above and stable too, therefore this should be default now. + # Used to unstable and had memory leaks, + # But now all that is fixed by using threadpoolctl, garbage collection or freeing up memory after XC evaluation at each iteration + # print(list_ao_values) + with threadpool_limits(limits=1, user_api='blas'): + Exc, Vxc = Integrals.eval_xc_3(basis, dmat, grids.weights, grids.coords, funcid, ncores=ncores, blocksize=blocksize, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, debug=debug) + else: # GPU + if XC_algo==1: + Exc, Vxc = Integrals.eval_xc_1_cupy(basis, dmat_cp, grids.weights, grids.coords, funcid, blocksize=blocksize, debug=debug, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, use_libxc=self.use_libxc,\ + nstreams=self.n_streams, ngpus=self.n_gpus, freemem=self.free_gpu_mem, threads_per_block=threads_per_block, + type=precision_XC) + if XC_algo==2: + Exc, Vxc = Integrals.eval_xc_2_cupy(basis, dmat_cp, grids.weights, cp.asnumpy(grids.coords), funcid, ncores=ncores, blocksize=blocksize, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, debug=debug) + if XC_algo==3: + # Default for GPUs + Exc, Vxc = Integrals.eval_xc_3_cupy(basis, dmat_cp, grids.weights, grids.coords, funcid, blocksize=blocksize, debug=debug, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, use_libxc=self.use_libxc,\ + nstreams=self.n_streams, ngpus=self.n_gpus, freemem=self.free_gpu_mem, threads_per_block=threads_per_block, + type=precision_XC) + + Vxc = cp.asarray(Vxc, dtype=cp.float64) + + durationxc = durationxc + timer() - startxc + + + dmat_old = dmat + + if self.use_gpu: + Enuc = contract('ij,ji->', dmat_cp, V) + Ekin = contract('ij,ji->', dmat_cp, T) + Ecoul = contract('ij,ji->', dmat_cp, J)*0.5 + else: + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Energy contractions', controller.info()) + Enuc = contract('ij,ji->', dmat, V) + Ekin = contract('ij,ji->', dmat, T) + Ecoul = contract('ij,ji->', dmat, J)*0.5 + if isDF and DF_algo==6: + Ecoul = Ecoul*2 - 0.5*Ecoul_temp # This is the correct formula for Coulomb energy with DF + + Etot_new = Exc + Enuc + Ekin + Enn + Ecoul + + print('\n\n\n------Iteration '+str(itr)+'--------\n\n', flush=True) + print('Energies') + print('Electron-Nuclear Energy ', Enuc, flush=True) + print('Nuclear repulsion Energy ', Enn, flush=True) + print('Kinetic Energy ', Ekin, flush=True) + print('Coulomb Energy ', Ecoul, flush=True) + print('Exchange-Correlation Energy ', Exc, flush=True) + print('-------------------------') + print('Total Energy ',Etot_new, flush=True) + print('-------------------------\n\n\n', flush=True) + + print('Energy difference : ',abs(Etot_new-Etot), flush=True) + + + KS = H + J + Vxc + + #### DIIS + startDIIS = timer() + diis_start_itr = 1 + if itr >= diis_start_itr: + if not self.use_gpu: + with threadpool_limits(limits=ncores, user_api='blas'): + # print('DIIS ', controller.info()) + KS = self.DIIS(S, dmat, KS) + else: + KS = self.DIIS_cupy(S, dmat_cp, KS) + cp.cuda.Stream.null.synchronize() + durationDIIS = durationDIIS + timer() - startDIIS + + #### Solve KS equation (Diagonalize KS matrix) + startKS = timer() + if self.use_gpu: + eigvalues, eigvectors = self.solve_cupy(KS, S, orthogonalize=True) # Orthogonalization is necessary with CUDA + mo_occ = self.getOcc_cupy(mol, eigvalues, eigvectors) + dmat = self.gen_dm_cupy(eigvectors, mo_occ) + dmat_cp = dmat + dmat = cp.asnumpy(dmat) + cp.cuda.Stream.null.synchronize() + else: + with threadpool_limits(limits=ncores, user_api='blas'): + # print('KS eigh', controller.info()) + eigvalues, eigvectors = self.solve(KS, S, orthogonalize=True) + mo_occ = self.getOcc(mol, eigvalues, eigvectors) + dmat = self.gen_dm(eigvectors, mo_occ) + durationKS = durationKS + timer() - startKS + + # Check when to switch to double precision for XC + if self.use_gpu: + if precision_XC is cp.float32: + if abs(Etot_new-Etot)/abs(Etot_new)<5e-7: + precision_XC = cp.float64 + print('\nSwitching to double precision for XC evaluation after '+str(itr) +' iterations!', flush=True) + + durationItr = timer() - startIter + print('\n\nTime taken for the previous iteration: '+str(durationItr)+'\n\n', flush=True) + + # Check convergence criteria + if abs(Etot_new-Etot)=max_itr and not scf_converged: + print('\nSCF NOT Converged after '+str(itr-1) +' iterations!', flush=True) + + + durationSCF = timer() - startSCF + # print(dmat) + print('\nTime taken : '+str(durationSCF) +' seconds.', flush=True) + print('\n\n', flush=True) + print('-------------------------------------', flush=True) + print('Profiling', flush=True) + print('-------------------------------------', flush=True) + print('Preprocessing ', durationXCpreprocessing + durationAO_values + durationgrids_prune_rho + durationSchwarz) + if isDF: + print('Density Fitting ', durationDF, flush=True) + if DF_algo==6: + print('DF (gamma) ', durationDF_gamma, flush=True) + print('DF (coeff) ', durationDF_coeff, flush=True) + print('DF (Jtri) ', durationDF_Jtri, flush=True) + print('DIIS ', durationDIIS, flush=True) + print('KS matrix diagonalization ', durationKS, flush=True) + print('One electron Integrals (S, T, Vnuc) ', duration1e, flush=True) + if isDF: + print('Coulomb Integrals (2c2e + 3c2e) ', durationCoulomb-durationSchwarz, flush=True) + if not isDF: + print('Coulomb Integrals (4c2e) ', durationCoulomb-durationSchwarz, flush=True) + print('Grids construction ', durationgrids, flush=True) + print('Exchange-Correlation Term ', durationxc, flush=True) + totalTime = durationXCpreprocessing + durationAO_values + duration1e + durationCoulomb + \ + durationgrids + durationxc + durationDF + durationKS + durationDIIS + durationgrids_prune_rho + print('Misc. ', durationSCF - totalTime, flush=True) + print('Complete SCF ', durationSCF, flush=True) + + if self.use_gpu: + for igpu in range(self.n_gpus): + cp.cuda.Device(igpu).use() + cp._default_memory_pool.free_all_blocks() + + # Switch back to main GPU + cp.cuda.Device(0).use() + return Etot, dmat + + + + + + + + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Data.py",".py","14156","145","# DATA.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +#Class to store element properties +class Data: + """""" + A container class holding atomic and basis set metadata used in calculations using PyFock. + + This includes element symbols, names, covalent and atomic radii, atomic masses, shell definitions, + and other constants and mappings relevant for electronic structure calculations. + + Note: Index 0 in all element-related lists corresponds to a ghost atom (used in some basis set techniques). + """""" + #IN ALL THE DATA THE FIRST ELEMENT CORRESPONDS TO GHOST ATOM + elementSymbols = [""Ghost"",""H"",""He"",""Li"",""Be"",""B"",""C"",""N"",""O"",""F"",""Ne"",""Na"",""Mg"",""Al"",""Si"",""P"",""S"",""Cl"",""Ar"",""K"",""Ca"",""Sc"",""Ti"",""V"",""Cr"",""Mn"",""Fe"",""Co"",""Ni"",""Cu"",""Zn"",""Ga"",""Ge"",""As"",""Se"",""Br"",""Kr"",""Rb"",""Sr"",""Y"",""Zr"",""Nb"",""Mo"",""Tc"",""Ru"",""Rh"",""Pd"",""Ag"",""Cd"",""In"",""Sn"",""Sb"",""Te"",""I"",""Xe"",""Cs"",""Ba"",""La"",""Ce"",""Pr"",""Nd"",""Pm"",""Sm"",""Eu"",""Gd"",""Tb"",""Dy"",""Ho"",""Er"",""Tm"",""Yb"",""Lu"",""Hf"",""Ta"",""W"",""Re"",""Os"",""Ir"",""Pt"",""Au"",""Hg"",""Tl"",""Pb"",""Bi"",""Po"",""At"",""Rn"",""Fr"",""Ra"",""Ac"",""Th"",""Pa"",""U"",""Np"",""Pu"",""Am"",""Cm"",""Bk"",""Cf"",""Es"",""Fm"",""Md"",""No"",""Lr"",""Rf"",""Db"",""Sg"",""Bh"",""Hs"",""Mt"",""Ds"",""Rg"",""Cn"",""Nh"",""Fl"",""Mc"",""Lv"",""Ts"",""Og""] + """"""List of chemical element symbols. Index 0 is reserved for the ghost atom."""""" + elementName = [""Ghost"",""Hydrogen"",""Helium"",""Lithium"",""Beryllium"",""Boron"",""Carbon"",""Nitrogen"",""Oxygen"",""Fluorine"",""Neon"",""Sodium"",""Magnesium"",""Aluminum"",""Silicon"",""Phosphorus"",""Sulfur"",""Chlorine"",""Argon"",""Potassium"",""Calcium"",""Scandium"",""Titanium"",""Vanadium"",""Chromium"",""Manganese"",""Iron"",""Cobalt"",""Nickel"",""Copper"",""Zinc"",""Gallium"",""Germanium"",""Arsenic"",""Selenium"",""Bromine"",""Krypton"",""Rubidium"",""Strontium"",""Yttrium"",""Zirconium"",""Niobium"",""Molybdenum"",""Technetium"",""Ruthenium"",""Rhodium"",""Palladium"",""Silver"",""Cadmium"",""Indium"",""Tin"",""Antimony"",""Tellurium"",""Iodine"",""Xenon"",""Cesium"",""Barium"",""Lanthanum"",""Cerium"",""Praseodymium"",""Neodymium"",""Promethium"",""Samarium"",""Europium"",""Gadolinium"",""Terbium"",""Dysprosium"",""Holmium"",""Erbium"",""Thulium"",""Ytterbium"",""Lutetium"",""Hafnium"",""Tantalum"",""Tungsten"",""Rhenium"",""Osmium"",""Iridium"",""Platinum"",""Gold"",""Mercury"",""Thallium"",""Lead"",""Bismuth"",""Polonium"",""Astatine"",""Radon"",""Francium"",""Radium"",""Actinium"",""Thorium"",""Protactinium"",""Uranium"",""Neptunium"",""Plutonium"",""Americium"",""Curium"",""Berkelium"",""Californium"",""Einsteinium"",""Fermium"",""Mendelevium"",""Nobelium"",""Lawrencium"",""Rutherfordium"",""Dubnium"",""Seaborgium"",""Bohrium"",""Hassium"",""Meitnerium"",""Darmstadtium"",""Roentgenium"",""Copernicium"",""Nihonium"",""Flerovium"",""Moscovium"",""Livermorium"",""Tennessine"",""Oganesson""] + """"""Full names of the elements corresponding to `elementSymbols`."""""" + covalentRadius = [""0"",""0.37"",""0.32"",""1.34"",""0.9"",""0.82"",""0.77"",""0.75"",""0.73"",""0.71"",""0.69"",""1.54"",""1.3"",""1.18"",""1.11"",""1.06"",""1.02"",""0.99"",""0.97"",""1.96"",""1.74"",""1.44"",""1.36"",""1.25"",""1.27"",""1.39"",""1.25"",""1.26"",""1.21"",""1.38"",""1.31"",""1.26"",""1.22"",""1.19"",""1.16"",""1.14"",""1.1"",""2.11"",""1.92"",""1.62"",""1.48"",""1.37"",""1.45"",""1.56"",""1.26"",""1.35"",""1.31"",""1.53"",""1.48"",""1.44"",""1.41"",""1.38"",""1.35"",""1.33"",""1.3"",""2.25"",""1.98"",""1.69"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""1.6"",""1.5"",""1.38"",""1.46"",""1.59"",""1.28"",""1.37"",""1.28"",""1.44"",""1.49"",""1.48"",""1.47"",""1.46"",""N/A"",""N/A"",""1.45"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A""] + """"""Covalent radii of elements in Ångströms. Some entries may be ""N/A"" if unknown or undefined."""""" + massNumber = [""0"",""1.007944"",""4.0026022"",""6.9412"",""9.0121823"",""10.8117"",""12.01078"",""14.00672"",""15.99943"",""18.99840325"",""20.17976"",""22.989769282"",""24.30506"",""26.98153868"",""28.08553"",""30.9737622"",""32.0655"",""35.4532"",""39.9481"",""39.09831"",""40.0784"",""44.9559126"",""47.8671"",""50.94151"",""51.99616"",""54.9380455"",""55.8452"",""58.9331955"",""58.69344"",""63.5463"",""65.382"",""69.7231"",""72.641"",""74.921602"",""78.963"",""79.9041"",""83.7982"",""85.46783"",""87.621"",""88.905852"",""91.2242"",""92.906382"",""95.962"",""[98]"",""101.072"",""102.905502"",""106.421"",""107.86822"",""112.4118"",""114.8183"",""118.7107"",""121.7601"",""127.603"",""126.904473"",""131.2936"",""132.90545192"",""137.3277"",""138.905477"",""140.1161"",""140.907652"",""144.2423"",""[145]"",""150.362"",""151.9641"",""157.253"",""158.925352"",""162.5001"",""164.930322"",""167.2593"",""168.934212"",""173.0545"",""174.96681"",""178.492"",""180.947882"",""183.841"",""186.2071"",""190.233"",""192.2173"",""195.0849"",""196.9665694"",""200.592"",""204.38332"",""207.21"",""208.980401"",""[209]"",""[210]"",""[222]"",""[223]"",""[226]"",""[227]"",""232.038062"",""231.035882"",""238.028913"",""[237]"",""[244]"",""[243]"",""[247]"",""[247]"",""[251]"",""[252]"",""[257]"",""[258]"",""[259]"",""[262]"",""[267]"",""[268]"",""[271]"",""[272]"",""[270]"",""[276]"",""[281]"",""[280]"",""[285]"",""[284]"",""[289]"",""[288]"",""[293]"",""[294]"",""[294]""] + """"""Atomic masses of elements in unified atomic mass units (u). Values in brackets indicate unstable isotopes."""""" + atomicRadius = [""0.4"",""0.53"",""0.31"",""1.67"",""1.12"",""0.87"",""0.67"",""0.56"",""0.73"",""0.42"",""0.38"",""1.9"",""1.45"",""1.18"",""1.11"",""0.98"",""0.88"",""0.79"",""0.71"",""2.43"",""1.94"",""1.84"",""1.76"",""1.71"",""1.66"",""1.61"",""1.56"",""1.52"",""1.49"",""1.45"",""1.42"",""1.36"",""1.25"",""1.14"",""1.03"",""0.94"",""0.88"",""2.65"",""2.19"",""2.12"",""2.06"",""1.98"",""1.9"",""1.83"",""1.78"",""1.73"",""1.69"",""1.65"",""1.61"",""1.56"",""1.45"",""1.33"",""1.23"",""1.15"",""1.08"",""2.98"",""2.53"",""1.95"",""1.85"",""2.47"",""2.06"",""2.05"",""2.38"",""2.31"",""2.33"",""2.25"",""2.28"",""2.26"",""2.26"",""2.22"",""2.22"",""2.17"",""2.08"",""2"",""1.93"",""1.88"",""1.85"",""1.8"",""1.77"",""1.74"",""1.71"",""1.56"",""1.54"",""1.43"",""1.35"",""1.27"",""1.2"",""N/A"",""N/A"",""1.95"",""1.8"",""1.8"",""1.75"",""1.75"",""1.75"",""1.75"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A"",""N/A""] + """"""Atomic radii in Ångströms, representing empirical or van der Waals sizes. ""N/A"" indicates missing data."""""" + CPKcolorRGB = [[255,255,255],[255,255,255],[217,255,255],[204,128,255],[194,255,0],[255,181,181],[144,144,144],[48,80,248],[255,13,13],[144,224,80],[179,227,245],[171,92,242],[138,255,0],[191,166,166],[240,200,160],[255,128,0],[255,255,48],[31,240,31],[128,209,227],[143,64,212],[61,255,0],[230,230,230],[191,194,199],[166,166,171],[138,153,199],[156,122,199],[224,102,51],[240,144,160],[80,208,80],[200,128,51],[125,128,176],[194,143,143],[102,143,143],[189,128,227],[255,161,0],[166,41,41],[92,184,209],[112,46,176],[0,255,0],[148,255,255],[148,224,224],[115,194,201],[84,181,181],[59,158,158],[36,143,143],[10,125,140],[0,105,133],[192,192,192],[255,217,143],[166,117,115],[102,128,128],[158,99,181],[212,122,0],[148,0,148],[66,158,176],[87,23,143],[0,201,0],[112,212,255],[255,255,199],[217,255,199],[199,255,199],[163,255,199],[143,255,199],[97,255,199],[69,255,199],[48,255,199],[31,255,199],[0,255,156],[0,230,117],[0,212,82],[0,191,56],[0,171,36],[77,194,255],[77,166,255],[33,148,214],[38,125,171],[38,102,150],[23,84,135],[208,208,224],[255,209,35],[184,184,208],[166,84,77],[87,89,97],[158,79,181],[171,92,0],[117,79,69],[66,130,150],[66,0,102],[0,125,0],[112,171,250],[0,186,255],[0,161,255],[0,143,255],[0,128,255],[0,107,255],[84,92,242],[120,92,227],[138,79,227],[161,54,212],[179,31,212],[179,31,186],[179,13,166],[189,13,135],[199,0,102],[204,0,89],[209,0,79],[217,0,69],[224,0,56],[230,0,46],[235,0,38]] + """"""RGB values used for coloring atoms in molecular visualizations (e.g., CPK coloring scheme)."""""" + Bohr2AngsFactor = 0.52917721092 + """"""Conversion factor from Bohr to Ångström (1 Bohr = 0.52917721092 Å)."""""" + Angs2BohrFactor = 1.88972612456 # Including more digits than currently used somehow increases the error drastically?! #Previosuly used value was 1.889725989 + """"""Conversion factor from Ångström to Bohr (1 Å = 1.88972612456 Bohr)."""""" + shell_dict = {'s':1, 'p':2, 'd':3, 'f':4, 'g':5, 'h':6, 'i':7, 'j':8} + """"""Mapping of orbital angular momentum shell labels to integer quantum numbers (e.g., 's' → 1, 'p' → 2, etc.)."""""" + # PySCF/HORTON ordering (for Cartesian GTOs https://github.com/sunqm/libcint/blob/master/doc/program_ref.pdf and https://theochem.github.io/horton/2.0.1/tech_ref_gaussian_basis.html#collected-notes-on-gaussian-basis-sets) + # shell_lmn = {'s':[0,0,0], 'px':[1,0,0], 'py':[0,1,0], 'pz':[0,0,1], 'dxx':[2,0,0], 'dxy':[1,1,0], 'dxz':[1,0,1], 'dyy':[0,2,0], 'dyz':[0,1,1], 'dzz':[0,0,2], 'fxxx':[3,0,0], 'fxxy':[2,1,0], 'fxxz':[2,0,1], 'fxyy':[1,2,0], 'fxyz':[1,1,1], 'fxzz':[1,0,2], 'fyyy':[0,3,0], 'fyyz':[0,2,1], 'fyzz':[0,1,2], 'fzzz':[0,0,3], 'gxxxx':[4,0,0], 'gxxxy':[3,1,0], 'gxxxz':[3,0,1], 'gxxyy':[2,2,0], 'gxxyz':[2,1,1], 'gxxzz':[2,0,2], 'gxyyy':[1,3,0], 'gxyyz':[1,2,1], 'gxyzz':[1,1,2], 'gxzzz':[1,0,3], 'gyyyy':[0,4,0], 'gyyyz':[0,3,1], 'gyyzz':[0,2,2], 'gyzzz':[0,1,3], 'gzzzz':[0,0,4] } + shell_lmn = { + 's': [0, 0, 0], + 'px': [1, 0, 0], + 'py': [0, 1, 0], + 'pz': [0, 0, 1], + 'dxx': [2, 0, 0], + 'dxy': [1, 1, 0], + 'dxz': [1, 0, 1], + 'dyy': [0, 2, 0], + 'dyz': [0, 1, 1], + 'dzz': [0, 0, 2], + 'fxxx': [3, 0, 0], + 'fxxy': [2, 1, 0], + 'fxxz': [2, 0, 1], + 'fxyy': [1, 2, 0], + 'fxyz': [1, 1, 1], + 'fxzz': [1, 0, 2], + 'fyyy': [0, 3, 0], + 'fyyz': [0, 2, 1], + 'fyzz': [0, 1, 2], + 'fzzz': [0, 0, 3], + 'gxxxx': [4, 0, 0], + 'gxxxy': [3, 1, 0], + 'gxxxz': [3, 0, 1], + 'gxxyy': [2, 2, 0], + 'gxxyz': [2, 1, 1], + 'gxxzz': [2, 0, 2], + 'gxyyy': [1, 3, 0], + 'gxyyz': [1, 2, 1], + 'gxyzz': [1, 1, 2], + 'gxzzz': [1, 0, 3], + 'gyyyy': [0, 4, 0], + 'gyyyz': [0, 3, 1], + 'gyyzz': [0, 2, 2], + 'gyzzz': [0, 1, 3], + 'gzzzz': [0, 0, 4], + 'hxxxxx':[5,0,0], + 'hxxxxy':[4,1,0], + 'hxxxxz':[4,0,1], + 'hxxxyy':[3,2,0], + 'hxxxyz':[3,1,1], + 'hxxxzz':[3,0,2], + 'hxxyyy':[2,3,0], + 'hxxyyz':[2,2,1], + 'hxxyzz':[2,1,2], + 'hxxzzz':[2,0,3], + 'hxyyyy':[1,4,0], + 'hxyyyz':[1,3,1], + 'hxyyzz':[1,2,2], + 'hxyzzz':[1,1,3], + 'hxzzzz':[1,0,4], + 'hyyyyy':[0,5,0], + 'hyyyyz':[0,4,1], + 'hyyyzz':[0,3,2], + 'hyyzzz':[0,2,3], + 'hyzzzz':[0,1,4], + 'hzzzzz':[0,0,5], + 'ixxxxxx':[6,0,0], + 'ixxxxxy':[5,1,0], + 'ixxxxxz':[5,0,1], + 'ixxxxyy':[4,2,0], + 'ixxxxyz':[4,1,1], + 'ixxxxzz':[4,0,2], + 'ixxxyyy':[3,3,0], + 'ixxxyyz':[3,2,1], + 'ixxxyzz':[3,1,2], + 'ixxxzzz':[3,0,3], + 'ixxyyyy':[2,4,0], + 'ixxyyyz':[2,3,1], + 'ixxyyzz':[2,2,2], + 'ixxyzzz':[2,1,3], + 'ixxzzzz':[2,0,4], + 'ixyyyyy':[1,5,0], + 'ixyyyyz':[1,4,1], + 'ixyyyzz':[1,3,2], + 'ixyyzzz':[1,2,3], + 'ixyzzzz':[1,1,4], + 'ixzzzzz':[1,0,5], + 'iyyyyyy':[0,6,0], + 'iyyyyyz':[0,5,1], + 'iyyyyzz':[0,4,2], + 'iyyyzzz':[0,3,3], + 'iyyzzzz':[0,2,4], + 'iyzzzzz':[0,1,5], + 'izzzzzz':[0,0,6], + } + """"""Dictionary mapping Cartesian Gaussian orbital labels to their exponent tuples [lx, ly, lz] (PySCF/HORTON ordering)."""""" + # TURBOMOLE Ordering + shell_lmn_tmole = {'s':[0,0,0], 'px':[1,0,0], 'py':[0,1,0], 'pz':[0,0,1], 'dxx':[2,0,0], 'dyy':[0,2,0], 'dzz':[0,0,2], 'dxy':[1,1,0], 'dxz':[1,0,1], 'dyz':[0,1,1], 'fxxx':[3,0,0], 'fxxy':[2,1,0], 'fxxz':[2,0,1], 'fxyy':[1,2,0], 'fxyz':[1,1,1], 'fxzz':[1,0,2], 'fyyy':[0,3,0], 'fyyz':[0,2,1], 'fyzz':[0,1,2], 'fzzz':[0,0,3], 'gxxxx':[4,0,0], 'gxxxy':[3,1,0], 'gxxxz':[3,0,1], 'gxxyy':[2,2,0], 'gxxyz':[2,1,1], 'gxxzz':[2,0,2], 'gxyyy':[1,3,0], 'gxyyz':[1,2,1], 'gxyzz':[1,1,2], 'gxzzz':[1,0,3], 'gyyyy':[0,4,0], 'gyyyz':[0,3,1], 'gyyzz':[0,2,2], 'gyzzz':[0,1,3], 'gzzzz':[0,0,4] } + """"""Same as `shell_lmn`, but with the Cartesian basis ordering used in TURBOMOLE."""""" + shell_lmn_offset = [0,1,4,10,20,35,56,84] + """"""Offsets for indexing Cartesian basis function blocks for increasing angular momentum (used for shell loops)."""""" + # (l+1)*(l+2)/2 + shell_degen = [1,3,6,10,15,21,28,36] # Cartesian + """"""Degeneracy (number of basis functions) of Cartesian shells as a function of angular momentum."""""" + #First element is ghost element remember + elementPeriod=[""1"",""1"",""1"",""2"",""2"",""2"",""2"",""2"",""2"",""2"",""2"",""3"",""3"",""3"",""3"",""3"",""3"",""3"",""3"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""4"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""5"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""6"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7"",""7""] + """"""Period (row) of the periodic table for each element. Index 0 corresponds to the ghost atom.""""""","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Mol.py",".py","25608","550","# Mol.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +from . import Data +from . import Basis +import numpy as np +#Class to store molecular properties +class Mol: + """""" + Class to store molecular properties and handle molecular structure operations. + + This class provides functionality for creating, manipulating, and exporting molecular + structures. It supports reading from various coordinate file formats and automatically + generates basis set information. + + Attributes: + coordfile (str): Path to coordinate file + atoms (list): List of atoms with coordinates + charge (int): Molecular charge + basis (Basis): Basis set object for the molecule + nelectrons (int): Number of electrons + natoms (int): Number of atoms + coords (numpy.ndarray): Atomic coordinates in Angstroms + coordsBohrs (numpy.ndarray): Atomic coordinates in Bohr units + atomicSpecies (list): List of atomic symbols + Zcharges (list): List of atomic numbers + success (bool): Whether molecule was initialized successfully + label (str): Molecular label/description + """""" + def __init__(self, atoms=None, coordfile=None, charge=0, basis=None): + """""" + Initialize a Mol object with atomic coordinates and properties. + + Args: + atoms (list, optional): List of atoms in the format [[symbol, x, y, z], ...] + where symbol can be atomic symbol (str) or atomic number (int), + and x, y, z are coordinates in Angstroms. + coordfile (str, optional): Path to coordinate file (.xyz format supported). + charge (int, optional): Molecular charge. Defaults to 0. + basis (dict, optional): Basis set specification. If None, defaults to STO-3G + for all atoms. + + Raises: + ValueError: If neither atoms nor coordfile is provided. + TypeError: If coordfile is not a string. + + Note: + If both atoms and coordfile are provided, atoms takes precedence and + coordfile is ignored. + """""" + #If no atoms or coordfile is specified. + if atoms is None and coordfile is None: + print('Error: No atoms and their coords specified.\nPlease either specify .xyz/.mol/coord file or enter atoms manually.') + print('See manual for supported file formats.') + #If both atoms and coordfile are specified then atoms are considered and the coord file is not considered. + elif not coordfile is None and not atoms is None: + print('Remark: User provided both atoms as well as the coordfile.\nOnly atoms are being used.') + elif coordfile is not None and atoms is None: + if isinstance(coordfile, str): + atoms = self.readCoordsFile(coordfile) + else: + print('Error: The coordfile argument should be a string with the name of the coord file.') + + + #Coord file .xyz/.mol/TURBOMOLE coord file/QE input file/Orca input file + self.coordfile = coordfile + """"""str or None: Path to the coordinate file used to initialize the molecule. + Contains the filename of the original coordinate file (.xyz, .mol, TURBOMOLE coord, etc.) + if the molecule was created from a file, or None if created directly from atoms list."""""" + #Atoms and their coordinates + self.atoms = atoms + """"""list: List of atoms with their coordinates in the format [[symbol, x, y, z], ...] where: + - symbol: Atomic symbol (str) or atomic number (int) + - x, y, z: Cartesian coordinates in Angstroms (float) + This is the raw input data used to construct the molecule."""""" + #Molecular charge + self.charge = charge + """"""int: Net charge of the molecule in elementary charge units. + Positive values indicate cationic species, negative values indicate anionic species, + and 0 indicates a neutral molecule. Used to calculate the total number of electrons."""""" + #The basis object for the Mol object + self.basis = None + """"""Basis or None: Basis set object containing all basis function information for quantum + chemical calculations. Initialized as None and populated with a Basis instance that + handles basis set assignments for each atom in the molecule."""""" + + self.nelectrons = 0 + """"""int: Total number of electrons in the molecule. + Calculated as the sum of all atomic numbers (nuclear charges) adjusted by the molecular charge: + nelectrons = Σ(Z_i) - charge, where Z_i is the atomic number of atom i."""""" + self.natoms = 0 + """"""int: Total number of atoms in the molecule. + Incremented during atom validation and used for array dimensioning and iteration + over atomic properties."""""" + self.coords = [] + """"""numpy.ndarray: Atomic coordinates in Angstroms with shape (natoms, 3). + Each row contains the [x, y, z] coordinates of one atom. Initialized as empty list + and populated during atom validation to become a numpy array."""""" + self.coordsBohrs = [] + """"""numpy.ndarray: Atomic coordinates converted to Bohr units with shape (natoms, 3). + Calculated from self.coords using the conversion factor Data.Angs2BohrFactor. + Used for quantum chemical calculations requiring atomic units of length."""""" + self.atomicSpecies = [] + """"""list of str: List of atomic symbols as strings (e.g., ['H', 'C', 'N', 'O']). + Ordered the same as atoms appear in the molecule. Length equals natoms. + Used for identifying atom types and output formatting."""""" + + self.Zcharges = [] + """"""list of int: List of atomic numbers (nuclear charges) for each atom in the molecule. + Corresponds to the number of protons in each atomic nucleus. Used for calculating + electronic properties and nuclear contributions to various molecular properties."""""" + self.success = False + """"""bool: Flag indicating whether the molecule was successfully initialized and validated. + Set to True if all atoms have valid symbols/atomic numbers and properly formatted + coordinates, False otherwise. Used to prevent operations on invalid molecular data."""""" + + self.label = 'Generic mol' + """"""str: Descriptive label or name for the molecule. + Defaults to 'Generic mol' but can be customized. Used in output files and for + identification purposes when exporting molecular data to various file formats."""""" + #Validate if the atoms attribute are provided correctly + self.success = self.validateAtoms(atoms) + if self.success: + self.nelectrons = self.nelectrons+charge + self.coordsBohrs = self.coords*Data.Angs2BohrFactor + #Basis set names for the atoms. + #Either just one basis function can be specified for all atoms + #Or one can specify a particular basis set for a particular atom. + #'basis' is a dictionary specifying the basis set to be used for a particular atom + if basis is None: + #Default basis set is sto-3g for all atoms + self.basis = {'all':Basis.load(mol=self, basis_name='sto-3g')}#{'all','sto-3g'} + self.basis = Basis(self, self.basis) + else: + self.basis = Basis(self, basis) + + + + + + def validateAtoms(self, atoms): + """""" + Validate atomic symbols and coordinates provided in the atoms list. + + This method checks that atomic symbols are valid (either as strings matching + known element symbols or as integers representing atomic numbers), and that + coordinates are properly formatted as numerical values. + + Args: + atoms (list): List of atoms in format [[symbol, x, y, z], ...] where + symbol can be str (element symbol) or int (atomic number), + and x, y, z are numerical coordinates. + + Returns: + bool: True if all atoms are valid, False otherwise. + + Side Effects: + Updates the following instance attributes: + - atomicSpecies: List of atomic symbols + - Zcharges: List of atomic numbers + - nelectrons: Total number of electrons + - natoms: Number of atoms + - coords: Numpy array of coordinates + + Raises: + Prints error messages for invalid atomic symbols, coordinates, or formatting. + """""" + #Validate atomic symbols + for i in range(len(atoms)): + if isinstance(atoms[i][0], str): + elementSymbols = [x.lower() for x in Data.elementSymbols] + if atoms[i][0].lower() in elementSymbols: + self.atomicSpecies.append(atoms[i][0]) + Z = elementSymbols.index(atoms[i][0].lower()) + self.Zcharges.append(Z) + self.nelectrons = self.nelectrons + Z + self.natoms = self.natoms + 1 + else: + print('Error: Unknown atomic symbols found') + return False + elif isinstance(atoms[i][0], int): + if atoms[i][0]<=118 and atoms[i][0]>=0: + self.atomicSpecies.append(Data.elementSymbols[atoms[i][0]]) + Z = atoms[i][0] + self.Zcharges.append(Z) + self.nelectrons = self.nelectrons + Z + self.natoms = self.natoms + 1 + else: + print('Error: Found atomic number out of the valid range') + return False + else: + print('Error: Found something other than string or integer for atomic symbols/numbers') + return False + self.coords = np.zeros([self.natoms,3]) + #Validate atomic coords + for i in range(len(atoms)): + if len(atoms[i])==4: + #TODO: the following condition doesn't work + #FIXME + if ( isinstance(coordi, float) for coordi in atoms[i][1:4] ) or ( isinstance(coordi, int) for coordi in atoms[i][1:4]): + self.coords[i] = atoms[i][1:4] + else: + print('Error: Coordinates of atoms should be floats/integers.') + return False + + else: + print('Error: Illegal definition of coords in atoms. There should be all three x,y,z coordinates.\nSome seem to be missing.') + return False + + if self.natoms==self.coords.shape[0]: + return True + else: + print('Error: Some definitions of atomic symbols/coords were illegal') + + + def get_center_of_charge(self, units='angs'): + """""" + Calculate the center of charge (weighted by atomic numbers) of the molecule. + + The center of charge is computed as the weighted average of atomic positions, + where the weights are the atomic numbers (nuclear charges) of each atom. + + Returns: + numpy.ndarray or None: 3D coordinates of the center of charge in Angstroms. + Returns None if the molecule was not successfully initialized. + + Formula: + center_of_charge = Σ(Z_i * r_i) / Σ(Z_i) + where Z_i is the atomic number and r_i is the position of atom i. + """""" + if not self.success: + print(""Error: Mol object is not successfully initialized."") + return None + + # Use NumPy for efficient calculations + total_charge = np.sum(self.Zcharges) + if units=='angs': + coc = np.dot(self.Zcharges, self.coords) / total_charge + else: + coc = np.dot(self.Zcharges, self.coordsBohrs) / total_charge + + return coc + # # Use NumPy for efficient calculations + # total_mass = np.sum(self.Zcharges) + # com_x = np.sum(self.Zcharges * self.coords[:, 0]) / total_mass + # com_y = np.sum(self.Zcharges * self.coords[:, 1]) / total_mass + # com_z = np.sum(self.Zcharges * self.coords[:, 2]) / total_mass + + # com = np.array([com_x, com_y, com_z]) + # return com + + def get_nuc_dip_moment(self): + """""" + Calculate the nuclear contribution to the molecular dipole moment. + + The nuclear dipole moment is computed as the sum of nuclear charges + multiplied by their positions in atomic units (Bohr). + + Returns: + numpy.ndarray: 3D vector representing the nuclear dipole moment + in atomic units (e⋅a₀), where each component corresponds + to x, y, z directions. + + Formula: + μ_nuc = Σ(Z_i * r_i) + where Z_i is the nuclear charge and r_i is the position in Bohr units. + """""" + charges = self.Zcharges + coords = self.coordsBohrs + nuc_dip = np.einsum('i,ix->x', charges, coords) + return nuc_dip + + def get_elec_dip_moment(self, dipole_moment_matrix, dmat): + """""" + Calculate the electronic contribution to the molecular dipole moment. + + The electronic dipole moment is computed using the dipole moment integrals + and the density matrix from quantum chemical calculations. + + Args: + dipole_moment_matrix (numpy.ndarray): 3D array of dipole moment integrals + with shape (3, nbasis, nbasis), where + the first dimension corresponds to x, y, z. + dmat (numpy.ndarray): Density matrix with shape (nbasis, nbasis). + + Returns: + numpy.ndarray: 3D vector representing the electronic dipole moment + in atomic units (e⋅a₀), where each component corresponds + to x, y, z directions. + + Formula: + μ_elec = Σ_μν P_μν ⟨μ|r|ν⟩ + where P_μν is the density matrix and ⟨μ|r|ν⟩ are dipole integrals. + """""" + elec_dip = np.einsum('xij,ji->x', dipole_moment_matrix, dmat).real + return elec_dip + + def get_dipole_moment(self, dipole_moment_matrix, dmat): + """""" + Calculate the total molecular dipole moment. + + The total dipole moment is computed as the difference between nuclear + and electronic contributions: μ_total = μ_nuclear - μ_electronic + + Args: + dipole_moment_matrix (numpy.ndarray): 3D array of dipole moment integrals + with shape (3, nbasis, nbasis). + dmat (numpy.ndarray): Density matrix from quantum chemical calculation + with shape (nbasis, nbasis). + + Returns: + numpy.ndarray: 3D vector representing the total molecular dipole moment + in atomic units (e⋅a₀). Each component corresponds to + x, y, z directions. + + Note: + The sign convention follows: μ_total = μ_nuclear - μ_electronic + This gives the dipole moment vector pointing from negative to positive charge. + + TODO: Allow user to specify output units (e.g., Debye). + """""" + nuc_dip = self.get_nuc_dip_moment() + elec_dip = self.get_elec_dip_moment(dipole_moment_matrix, dmat) + mol_dip = nuc_dip - elec_dip + # TODO: allow the user to specify units (ex: DEBYE) + return mol_dip + + #Export coord file in TURBOMOLE format + def exportCoords(atomicSpecies, coords, filename='coord'): + """""" + Export molecular coordinates to TURBOMOLE format. + + Creates a coordinate file in TURBOMOLE format with atomic positions + converted from Angstroms to Bohr units. + + Args: + atomicSpecies (list): List of atomic symbols as strings. + coords (numpy.ndarray): Atomic coordinates in Angstroms with shape (natoms, 3). + filename (str, optional): Output filename. Defaults to 'coord'. + + File Format: + $coord + x_bohr y_bohr z_bohr element_symbol + ... + $end + + Note: + This is a static method that should be called as a class method. + Coordinates are automatically converted from Angstroms to Bohr units. + + Warning: + This method contains a bug - it references undefined variable 'coord' + instead of 'coords'. Should be fixed in implementation. + """""" + file = open(filename,'w') + file.write('$coord\n') + for i in range(len(atomicSpecies)): + file.write(str(coord[i,0]*Data.Angs2BohrFactor)+'\t'+str(coord[i,1]*Data.Angs2BohrFactor)+'\t'+str(coord[i,2]*Data.Angs2BohrFactor)+'\t'+atomicSpecies[i].lower()+'\n') + file.write('$end\n') + file.close() + + #Export the geometry in XYZ format + def exportXYZ(self, filename='coord', label='Generic Mol generated by CrysX (Python Library)'): + """""" + Export molecular geometry to XYZ format file. + + Creates a standard XYZ format file with atomic coordinates in Angstroms. + This method uses the molecule's current atomic species and coordinates. + + Args: + filename (str, optional): Base filename without extension. Defaults to 'coord'. + The '.xyz' extension will be automatically added. + label (str, optional): Comment line for the XYZ file. Defaults to + 'Generic Mol generated by CrysX (Python Library)'. + + File Format: + number_of_atoms + comment_line + element_symbol x_coord y_coord z_coord + ... + + Output: + Creates a file named '{filename}.xyz' in the current directory. + + Example: + mol.exportXYZ('water', 'H2O molecule') + # Creates 'water.xyz' with H2O coordinates + """""" + file = open(filename+'.xyz','w') + file.write(str(self.natoms)+'\n') + file.write(label+'\n') + for i in range(self.natoms): + file.write(self.atomicSpecies[i]+'\t'+str(self.coords[i,0])+'\t'+str(self.coords[i,1])+'\t'+str(self.coords[i,2])+'\n') + file.close() + #Export the geometry in XYZ format + def exportXYZs(atomicSpecies, coords, filename='coord', label='Generic Mol generated by CrysX (Python Library)'): + """""" + Export molecular geometry to XYZ format (static method version). + + Static method to create XYZ files from provided atomic species and coordinates, + without requiring a Mol object instance. + + Args: + atomicSpecies (list): List of atomic symbols as strings. + coords (numpy.ndarray): Atomic coordinates in Angstroms with shape (natoms, 3). + filename (str, optional): Base filename without extension. Defaults to 'coord'. + The '.xyz' extension will be automatically added. + label (str, optional): Comment line for the XYZ file. Defaults to + 'Generic Mol generated by CrysX (Python Library)'. + + File Format: + number_of_atoms + comment_line + element_symbol x_coord y_coord z_coord + ... + + Warning: + This method contains a bug - it references undefined variable 'coord' + instead of 'coords'. Should be fixed in implementation. + + Note: + This is a static method and should be called as a class method. + """""" + file = open(filename+'.xyz','w') + file.write(str(len(atomicSpecies))+'\n') + file.write(label+'\n') + for i in range(len(atomicSpecies)): + file.write(atomicSpecies[i]+'\t'+str(coord[i,0])+'\t'+str(coord[i,1])+'\t'+str(coord[i,2])+'\n') + file.close() + + # Read geometry from TURBOOLE coords file + def readCoordsFile(self, filename): + """""" + Read molecular coordinates from various file formats. + + Currently supports XYZ format files. This method serves as a dispatcher + to format-specific reading methods based on file extension. + + Args: + filename (str): Path to the coordinate file. File format is determined + by the file extension. + + Returns: + list: List of atoms in the format [[symbol, x, y, z], ...] where + symbol is the atomic symbol and x, y, z are coordinates in Angstroms. + + Supported Formats: + - .xyz: Standard XYZ coordinate format + + Future Extensions: + - .mol: MOL file format + - coord: TURBOMOLE coordinate format + - Other quantum chemistry input formats + + Raises: + Prints error message if file format is not supported. + """""" + if filename.endswith('.xyz'): + atoms = self.readXYZ(filename) + else: + print('Only xyz files for now') + return atoms + #Read geometry information from a .xyz file + def readXYZ(self, filename): + """""" + Read molecular geometry from an XYZ format file. + + Parses a standard XYZ file and extracts atomic symbols and coordinates. + The XYZ format consists of: + - Line 1: Number of atoms + - Line 2: Comment line (ignored) + - Lines 3+: atomic_symbol x_coordinate y_coordinate z_coordinate + + Args: + filename (str): Path to the XYZ file to read. + + Returns: + list: List of atoms in format [[symbol, x, y, z], ...] where: + - symbol (str): Atomic symbol (e.g., 'H', 'C', 'O') + - x, y, z (float): Coordinates in Angstroms + + File Format Expected: + number_of_atoms + comment_line + element_symbol x_coord y_coord z_coord + element_symbol x_coord y_coord z_coord + ... + + Error Handling: + - Prints error if the number of atoms read doesn't match the declared count + - Assumes coordinates are separated by whitespace + - Strips whitespace from all input + + Example: + For a file 'water.xyz': + 3 + Water molecule + O 0.000000 0.000000 0.000000 + H 0.000000 0.000000 0.970000 + H 0.944863 0.000000 -0.242498 + + Returns: [['O', 0.0, 0.0, 0.0], ['H', 0.0, 0.0, 0.97], ['H', 0.944863, 0.0, -0.242498]] + """""" + with open(filename, ""r"") as f: + lines = f.readlines() + + if len(lines) < 2: + raise ValueError(f""File {filename} does not contain enough lines for XYZ format"") + + # Read number of atoms from first line + try: + natoms = int(lines[0].strip()) + except ValueError: + raise ValueError(f""First line of {filename} must contain an integer atom count"") + + # The second line is the comment (can be blank) + comment_line = lines[1].rstrip(""\n"") + + atoms = [] + for i, line in enumerate(lines[2:2 + natoms], start=3): + parts = line.split() + if len(parts) < 4: + raise ValueError(f""Line {i} in {filename} does not have 4 columns: {line.strip()}"") + symbol = parts[0] + try: + x, y, z = map(float, parts[1:4]) + except ValueError: + raise ValueError(f""Invalid coordinates on line {i} in {filename}: {parts[1:4]}"") + atoms.append([symbol, x, y, z]) + + if len(atoms) != natoms: + raise ValueError( + f""Expected {natoms} atoms, but found {len(atoms)} in {filename}"" + ) + + return atoms +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/__init__.py",".py","1014","35",""""""" +.. include:: ../README.md + +Modules: +- `Mol`: Molecular properties +- `Basis`: Basis set management +- `Integrals`: 1e/2e integral routines +- `XC`, `Grids`: Exchange-correlation and grid definitions +- `Utils`, `Graphics`: Helper utilities and visualization + +This project benefits from the Python scientific stack: NumPy, SciPy, Opt_Einsum, NumExpr, Joblib, and more. + +Repository: https://github.com/manassharma07/PyFock +License: MIT +Author: Manas Sharma + +For usage examples, demos, and API documentation, refer to the online documentation or example notebooks. +"""""" + +__version__ = ""0.0.9"" +__author__ = 'Manas Sharma' +__credits__ = 'Phys Whiz (bragitoff.com)' + + +#NOTE: The order in which these statements appear is very important. +# The Data import comes before Basis import because Basis requires stuff from +# Data, therefore it should be imported first. +from .Data import Data +from .Basis import Basis +from .Mol import Mol +from .Grids import Grids +from .DFT import DFT +# from .PBC_ring import ring + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals_.py",".py","448969","8704","# Integrals.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P +# d88P Y88b Y88b d88P +# 888 888 Y88o88P +# 888 888d888 888 888 .d8888b Y888P +# 888 888P"" 888 888 88K d888b +# 888 888 888 888 888 ""Y8888b. d88888b +# Y88b d88P 888 Y88b 888 X88 d88P Y88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b +# 888 +# Y8b d88P +# ""Y88P"" +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +import numpy as np +import os +import ctypes +import scipy +import sys +import math +import functools +import numba_scipy +from scipy.special import factorial2, binom, hyp1f1, gammainc, gamma +from scipy.sparse import csc_matrix +from . import Basis +from opt_einsum import contract +from opt_einsum import contract_expression +try: + from numba import vectorize,jit,njit,prange,set_num_threads,get_num_threads + NUMBA_EXISTS = True +except Exception as e: + NUMBA_EXISTS = False + pass +try: + from joblib import Parallel, delayed + JOBLIB_EXISTS = True +except Exception as e: + JOBLIB_EXISTS = False + pass +try: + import pylibxc + LIBXC_EXISTS = True +except Exception as e: + LIBXC_EXISTS = False + pass +try: + import numexpr + NUMEXPR_EXISTS = True +except Exception as e: + NUMEXPR_EXISTS = False + pass +from timeit import default_timer as timer +from . import densfuncs +from autograd import grad +import autograd.numpy as npautograd +import gc +import psutil +import sparse +#The functions with @njit decorator are outside the class Integrals. +#these provide acceleration by using the JIT feature of Numba. + +#NOTE: For a function to work efficiently with Numba and take its advantage, it has to be cleverly written. +# First of all, it should only take in numpy arrays as arguments. +# The sizes of the lists should be predefined and not like Python. +# The loops can usually be replaced with prange to leverage parallel execution. +# Take care of race-condition when using prange. +# While numpy functions are supported, scipy functions are not supported so write your own. + + +# BIG TODO: Rewrite factorial and double factorial functions to use loops rather than recursion. +# Loops would definitely be faster. +#@njit(cache=True) +def fac1(n): + if n <= 0: + return 1 + else: + return n * doublefactorial(n-1) +#@njit(cache=True) +def fastFactorial1(n): + # UPDATE: Look up table versio is extremely slowww + # return fac(n) + # LOOKUP_TABLE = [ + # 1, 1, 2, 6, 24, 120, 720, 5040, 40320, + # 362880, 3628800, 39916800, 479001600, + # 6227020800, 87178291200, 1307674368000, + # 20922789888000, 355687428096000, 6402373705728000, + # 121645100408832000, 2432902008176640000] + # if n<=20: + # return LOOKUP_TABLE[n] + # else: + # Update + # loop is working the best + if n<= 1: + return 1 + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + +#@njit(cache=True) +def comb1(x, y): + # binom = fac(x) // fac(y) // fac(x - y) + binom = fastFactorial2(x) // fastFactorial2(y) // fastFactorial2(x - y) + return binom +#@njit(cache=True) +def doublefactorial1(n): +# Double Factorial Implementation based on recursion + if n <= 0: + return 1 + else: + return n * doublefactorial(n-2) + +# def doublefactorial1(n): +# # Double factorial implementation based on loops +# # Seems to be faster +# # The overlap matrix gets f****d up with this +# res = 1 +# for i in range(n, -1, -2): +# if(i == 0 or i == 1): +# return res +# else: +# res *= i + +#@njit(cache=True) +def c2kNumba1(k,la,lb,PA,PB): + temp = 0.0 + for i in range(la+1): + factor1 = comb(la,i) + factor2 = PA**(la-i) + for j in range(lb+1): + if (i+j)==k : + temp += factor1*comb(lb,j)*factor2*PB**(lb-j) + return temp +#@njit(cache=True) +def calcSNumba1(la,lb,gamma,PA,PB): + temp = 0.0 + fac1 = np.sqrt(np.pi/gamma) + fac2 = 2*gamma + for k in range(0, int((la+lb)/2)+1): + temp += c2kNumba(2*k,la,lb,PA,PB)*fac1*doublefactorial(2*k-1)/(fac2)**k + return temp + +#@njit(parallel=True, cache=True) +def matMulNumba1(A, B): + assert A.shape[1] == B.shape[0] + res = np.zeros((A.shape[0], B.shape[1]), ) + for i in range(A.shape[0]): + for j in range(B.shape[1]): + res[i,j] += A[i,:] * B[:,j] + # for k in prange(A.shape[1]): + # res[i,j] += A[i,k] * B[k,j] + return res +#@njit(parallel=True, cache=True) +def calcVtempNumba1(z, ao_val, nao): + # Try to simulate this + # v_temp = z @ ao_value_block # The fastest uptil now + # v_temp += v_temp.T + + V = np.zeros((nao, nao)) + V_temp = np.dot(z, ao_val) + for i in prange(nao): + for j in prange(i+1): + V[i,j] = V_temp[i,j] + V_temp[j,i] + V[j,i] = V[i,j] + + # New try (Extreeeeeemmmlyyyyy slowwwwwwwwwww) + # ao_val_trans = ao_val.T + # ncoords = ao_val.shape[0] + # for i in prange(nao): + # if np.abs(z[i,:]).max()<1e-8: + # continue + # for j in prange(i+1): + # if np.abs(ao_val[j,:]).max()<1e-8: + # continue + + # val = 0.0 + # for k in prange(ncoords): + # val += z[i,k]*ao_val[k,j] + z[k,i]*ao_val[j,k] + + # V[i,j] = val + # V[j,i] = val + + + return V + +#@njit(parallel=True, cache=True) +# def calcVtempNumba1(z, ao_val): +# assert z.shape[1] == ao_val.shape[0] +# res = np.zeros((z.shape[0], ao_val.shape[1])) +# # for k in range(ao_val.shape[0]): +# # for i in range(z.shape[0]): +# # if np.abs(z[i,k])<1E-10: +# # continue +# # for j in range(ao_val.shape[1]): +# # if np.abs(ao_val[k,j])< 1E-10: +# # continue +# # res[i,j]+=z[i,k]*ao_val[k,j] +# for i in range(z.shape[0]): +# for j in range(ao_val.shape[1]): +# val = 0.0 +# for k in prange(ao_val.shape[0]): +# if np.abs(z[i,k])<1E-10: +# continue +# if np.abs(ao_val[k,j])< 1E-10: +# continue +# val+=z[i,k]*ao_val[k,j] +# res[i,j] = val +# return res + +#@njit(parallel=True, cache=True) +def evalRhoNumba1_old(bf_values, densmat, coords): + # This is the Numba decorated faster version of evalRho. + # The arguments of this function are different than evalRho. + # Evaluates the value of density at a given grid ('coord') nx3 array + # For this we need the density matrix as well as the information + # the basis functions in the basis object. + # rho at the grid point m is given as: + # \rho^m = \sum_{\mu}\sum_{\nu} D_{\mu \nu} \mu^m \nu^m + rho = np.zeros((coords.shape[0])) + ncoords = coords.shape[0] + nbfs = bf_values.shape[1] + + # #Approach 1 (has the coords loop as the outer most) + # #Not very efficient! + # #Loop over grid points + # for m in prange(ncoords): + # #Loop over BFs + # for i in prange(nbfs): + # mu = bf_values[m,i] + # if abs(mu)<1.0e-6: #This condition helps in accelerating the speed by a factor of almost 2. + # continue + # for j in prange(nbfs): + # nu = bf_values[m,j] + # if abs(nu)<1.0e-6: #A value of 6-8 is good for an accuracy og 7-8 decimal places. + # continue + # if abs(densmat[i,j])<1.0e-9: + # continue + # rho[m] = rho[m] + densmat[i,j]*mu*nu + # #rho[m] = rho[m] + densmat[i,j]*bf_values[m,i]*bf_values[m,j] + + #New try + #!!!einsum Not supported by NUMBA!!! + #rho = np.einsum('ij,mi,mj->m',densmat,bf_values,bf_values) + #temp = np.dot(bf_values, densmat) + + #New try + #Loop over coords should be the innermost loop + #Loop over BFs + for i in range(nbfs): + for j in range(nbfs): + if abs(densmat[i,j])<1.0e-9: #A value of 10-14 is good for an accuracy of 7-8 decimal places. + continue + dens = densmat[i,j] + #rho = rho + #Loop over grid points + for m in prange(ncoords): + mu = bf_values[m,i] + if abs(mu)<1.0e-6: #This condition helps in accelerating the speed by a factor of almost 10-100. + continue + nu = bf_values[m,j] + if abs(nu)<1.0e-6: #A value of 10-14 is good for an accuracy of 7-8 decimal places. + continue + rho[m] = rho[m] + dens*mu*nu + # y = rho[m] + dens*mu*nu + # rho[m] = y + + + return rho + +#@njit(parallel=True, cache=True) +def evalRhoNumba1(bf_values, densmat): + # This is the Numba decorated faster version of evalRho. + # The arguments of this function are different than evalRho. + # Evaluates the value of density at a given grid ('coord') nx3 array + # For this we need the density matrix as well as the information + # the basis functions in the basis object. + # rho at the grid point m is given as: + # \rho^m = \sum_{\mu}\sum_{\nu} D_{\mu \nu} \mu^m \nu^m + rho = np.zeros((bf_values.shape[0])) + ncoords = bf_values.shape[0] + nbfs = bf_values.shape[1] + + # #Approach 1 (has the coords loop as the outer most) + # #Not very efficient! + # #Loop over grid points + # for m in prange(ncoords): + # #Loop over BFs + # for i in prange(nbfs): + # mu = bf_values[m,i] + # if abs(mu)<1.0e-6: #This condition helps in accelerating the speed by a factor of almost 2. + # continue + # for j in prange(nbfs): + # nu = bf_values[m,j] + # if abs(nu)<1.0e-6: #A value of 6-8 is good for an accuracy og 7-8 decimal places. + # continue + # if abs(densmat[i,j])<1.0e-9: + # continue + # rho[m] = rho[m] + densmat[i,j]*mu*nu + # #rho[m] = rho[m] + densmat[i,j]*bf_values[m,i]*bf_values[m,j] + + #New try + #!!!einsum Not supported by NUMBA!!! + #rho = np.einsum('ij,mi,mj->m',densmat,bf_values,bf_values) + #temp = np.dot(bf_values, densmat) + + #New try (VERYYY SLOWWW) + #Loop over coords should be the innermost loop + #Loop over BFs + # for i in prange(nbfs): + # for j in prange(nbfs): + # if abs(densmat[i,j])<1.0e-9: #A value of 10-14 is good for an accuracy of 7-8 decimal places. + # continue + # dens = densmat[i,j] + + # mu = bf_values[:,i] + # nu = bf_values[:,j] + # rho = rho + dens*mu*nu + + # Lets try to simulate this + # tempo = bf_values @ densmat + # rho_block = contract('mi, mi -> m', bf_values, tempo) + # Finally the following is as fast as the above snippet (with @ and opt_einsum.contract) + # temp_value = np.dot(bf_values, densmat) + # for m in prange(ncoords): + # rho_temp = 0.0 + # for i in range(nbfs): + # rho_temp += bf_values[m,i]*temp_value[m,i] + # rho[m] = rho_temp + + # The following should have been faster than above, but is pretty much only as fast + # temp_value = np.dot(bf_values, densmat) + # for m in prange(ncoords): + # rho[m] = np.dot(bf_values[m,:], temp_value[m,:]) + + # The following is the fastest because here we utilize symmetry information and also skip calculation for small values + #Loop over BFs + for m in prange(ncoords): + rho_temp = 0.0 + for i in prange(nbfs): + mu = bf_values[m,i] + if abs(mu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + for j in prange(i+1): + dens = densmat[i,j] + if abs(dens)<1.0e-8: #A value of 9 is good for an accuracy of 7-8 decimal places. + continue + if i==j: # Diagonal terms + nu = mu + rho_temp += dens*mu*nu + else: # Non-diagonal terms + nu = bf_values[m,j] + if abs(nu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + rho_temp += 2*dens*mu*nu + rho[m] = rho_temp + + + return rho + +#@njit(cache=True) +def evalGTOandGradNumba1(alpha, coeff, lmn, x, y, z): + # A very low-level way to calculate the ao values as well as theor gradients simultaneously, without + # running similar calls again and again. + # value = np.zeros((4)) + # Prelims + # x = coord[0]-coordCenter[0] + # y = coord[1]-coordCenter[1] + # z = coord[2]-coordCenter[2] + xl = x**lmn[0] + ym = y**lmn[1] + zn = z**lmn[2] + exp = np.exp(-alpha*(x**2+y**2+z**2)) + factor2 = coeff*exp + + # AO Value + # value[0] = factor2*xl*ym*zn + value0 = factor2*xl*ym*zn + # Grad x + if np.abs(x-0)<1e-14: + # value[1] = 0.0 + value1 = 0.0 + else: + xl = x**(lmn[0]-1) + factor = (lmn[0]-2*alpha*x**2) + # value[1] = factor2*xl*ym*zn*factor + value1 = factor2*xl*ym*zn*factor + # Grad y + if np.abs(y-0)<1e-10: + # value[2] = 0.0 + value2 = 0.0 + else: + xl = x**lmn[0] + ym = y**(lmn[1]-1) + factor = (lmn[1]-2*alpha*y**2) + # value[2] = factor2*xl*ym*zn*factor + value2 = factor2*xl*ym*zn*factor + # Grad z + if np.abs(z-0)<1e-14: + # value[3] = 0.0 + value3 = 0.0 + else: + zn = z**(lmn[2]-1) + xl = x**lmn[0] + ym = y**lmn[1] + factor = (lmn[2]-2*alpha*z**2) + # value[3] = factor2*xl*ym*zn*factor + value3 = factor2*xl*ym*zn*factor + # return value + return value0, value1, value2, value3 + +#@njit(cache=True) +def evalGTONumba1(alpha, coeff, lmn, x, y, z): + #This function evaluates the value of a given Gaussian primitive + # with given values of alpha (exponent), coefficient, and angular momentum + # centered at 'coordCenter' (3 comp, numpy array). The value is calculated at + # a given 'coord'. + + # instead of writing the whole formula in 1 line, it was suggested to break it down so that Numba can compile them efficiently. + # Seems to provide a small speedup. + xl = x**lmn[0] + ym = y**lmn[1] + zn = z**lmn[2] + exp = np.exp(-alpha*(x**2+y**2+z**2)) + value = coeff*xl*ym*zn*exp + + + # oneliner + # value = coeff*((coord[0]-coordCenter[0])**lmn[0]*(coord[1]-coordCenter[1])**lmn[1]*(coord[2]-coordCenter[2])**lmn[2])*np.exp(-alpha*((coord[0]-coordCenter[0])**2+(coord[1]-coordCenter[1])**2+(coord[2]-coordCenter[2])**2)) + + + return value + +#@njit(cache=True) +def evalGTOgradxNumba1(alpha, coeff, coordCenter, lmn, coord): + # Returns the gradient of a given Gaussian primitive along x + # x = coord[0]-coordCenter[0] + # # The following is hack because the gradient can blow up if the coord is the same as Gaussian center + # if np.abs(x-0)<1e-14: + # return 0.0 + # value = coeff*((x)**(lmn[0]-1)*(coord[1]-coordCenter[1])**lmn[1]*(coord[2]-coordCenter[2])**lmn[2])*(lmn[0]-2*alpha*(coordCenter[0]-coord[0])**2)*np.exp(-alpha*((x)**2+(coord[1]-coordCenter[1])**2+(coord[2]-coordCenter[2])**2)) + + # NEW way (Here we split up the code in multiple lines rather than a single line as we had before) + # This helps NUMBA to compile more efficiently + x = (coord[0]-coordCenter[0]) + # The following is hack because the gradient can blow up if the coord is the same as Gaussian center + if np.abs(x-0)<1e-14: + return 0.0 + y = (coord[1]-coordCenter[1]) + z = (coord[2]-coordCenter[2]) + xl = x**(lmn[0]-1) + ym = y**lmn[1] + zn = z**lmn[2] + exp = np.exp(-alpha*(x**2+y**2+z**2)) + factor = (lmn[0]-2*alpha*x**2) + value = coeff*xl*ym*zn*factor*exp + + + return value + +#@njit(cache=True) +def evalGTOgradyNumba1(alpha, coeff, coordCenter, lmn, coord): + # Returns the gradient of a given Gaussian primitive along y + # y = coord[1]-coordCenter[1] + # # The following is hack because the gradient can blow up if the coord is the same as Gaussian center + # if np.abs(y-0)<1e-14: + # return 0.0 + # value = coeff*((coord[0]-coordCenter[0])**lmn[0]*(y)**(lmn[1]-1)*(coord[2]-coordCenter[2])**lmn[2])*(lmn[1]-2*alpha*(coordCenter[1]-coord[1])**2)*np.exp(-alpha*((coord[0]-coordCenter[0])**2+(y)**2+(coord[2]-coordCenter[2])**2)) + + # NEW way (Here we split up the code in multiple lines rather than a single line as we had before) + # This helps NUMBA to compile more efficiently + x = (coord[0]-coordCenter[0]) + y = (coord[1]-coordCenter[1]) + # The following is hack because the gradient can blow up if the coord is the same as Gaussian center + if np.abs(y-0)<1e-14: + return 0.0 + z = (coord[2]-coordCenter[2]) + xl = x**lmn[0] + ym = y**(lmn[1]-1) + zn = z**lmn[2] + exp = np.exp(-alpha*(x**2+y**2+z**2)) + factor = (lmn[1]-2*alpha*y**2) + value = coeff*xl*ym*zn*factor*exp + + return value + +#@njit(cache=True) +def evalGTOgradzNumba1(alpha, coeff, coordCenter, lmn, coord): + # Returns the gradient of a given Gaussian primitive along z + # z = coord[2]-coordCenter[2] + # # The following is hack because the gradient can blow up if the coord is the same as Gaussian center + # if np.abs(z-0)<1e-14: + # return 0.0 + # value = coeff*((coord[0]-coordCenter[0])**lmn[0]*(coord[1]-coordCenter[1])**lmn[1]*(z)**(lmn[2]-1))*(lmn[2]-2*alpha*(coordCenter[2]-coord[2])**2)*np.exp(-alpha*((coord[0]-coordCenter[0])**2+(coord[1]-coordCenter[1])**2+(z)**2)) + + # NEW way (Here we split up the code in multiple lines rather than a single line as we had before) + # This helps NUMBA to compile more efficiently + x = (coord[0]-coordCenter[0]) + y = (coord[1]-coordCenter[1]) + z = (coord[2]-coordCenter[2]) + # The following is hack because the gradient can blow up if the coord is the same as Gaussian center + if np.abs(z-0)<1e-14: + return 0.0 + xl = x**lmn[0] + ym = y**lmn[1] + zn = z**(lmn[2]-1) + exp = np.exp(-alpha*(x**2+y**2+z**2)) + factor = (lmn[2]-2*alpha*z**2) + value = coeff*xl*ym*zn*factor*exp + + return value + +#@njit(parallel=True, cache=True) +#TODO this is incomplete +def evalBFiNumba(coordi, Ni, Nik, dik, lmni, alphaik, coord): + #This function evaluates the value of a given Basis function at a given grid point (coord) + #'coord' is a 3 element 1d-array + value = 0.0 + #Loop over primitives + # nprim = 9 + for ik in prange(basis.bfs_nprim[i]): + dik = basis.bfs_coeffs[i][ik] + Nik = basis.bfs_prim_norms[i][ik] + alphaik = basis.bfs_expnts[i][ik] + value = value + evalGTONumba(alphaik, Ni*Nik*dik, coordi, lmni, coord) + # print(Ni*Nik*dik) + # print(Integrals.evalGTO(alphaik, Ni*Nik*dik, coordi, lmni, coord)) + + + return value + +#@njit(parallel=True, cache=True) +def evalBFsgradNumba1(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coord): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bfs_coords.shape[0] + ncoord = coord.shape[0] + result = np.zeros((3, ncoord, nao)) + + #TODO I guess a better way would be to iterate over BFs first, instead of coords. + #Also, it would be better to skip the loop over coords altoghether and use numpy instead for the evaluation, by just passing + #the coords array to evalGTO. I am pretty sure this would increase the speed substantially. This could be wrong though, + #since we are in fact using JIT so maybe no more optimization is possible. But worth a try. + + #Loop over grid points + for k in prange(ncoord): + #Loop over BFs + for i in range(nao): + valuex = 0.0 + valuey = 0.0 + valuez = 0.0 + coordi = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + valuex = valuex + evalGTOgradxNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + valuey = valuey + evalGTOgradyNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + valuez = valuez + evalGTOgradzNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + result[0,k,i] = valuex + result[1,k,i] = valuey + result[2,k,i] = valuez + + # Loop over BFs (This is lowerrr and could also have race condition) + # for i in range(nao): + # coordi = bfs_coords[i] + # Ni = bfs_contr_prim_norms[i] + # lmni = bfs_lmn[i] + # #Loop over primitives + # for ik in range(bfs_nprim[i]): + # dik = bfs_coeffs[i][ik] + # Nik = bfs_prim_norms[i][ik] + # alphaik = bfs_expnts[i][ik] + # #Loop over grid points + # for k in prange(ncoord): + # result[0,k,i] += evalGTOgradxNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + # result[1,k,i] += evalGTOgradyNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + # result[2,k,i] += evalGTOgradzNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + + + return result + + +#@njit(parallel=True, cache=True) +def evalBFsandgradNumba1(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bfs_coords.shape[0] + ncoord = coord.shape[0] + # result = np.zeros((4, ncoord, nao)) + result1 = np.zeros((ncoord,nao)) + result2 = np.zeros((3,ncoord,nao)) + + #TODO I guess a better way would be to iterate over BFs first, instead of coords. + #Also, it would be better to skip the loop over coords altoghether and use numpy instead for the evaluation, by just passing + #the coords array to evalGTO. I am pretty sure this would increase the speed substantially. This could be wrong though, + #since we are in fact using JIT so maybe no more optimization is possible. But worth a try. + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value_ao = 0.0 + valuex = 0.0 + valuey = 0.0 + valuez = 0.0 + # values[0] = 0.0 + # values[1] = 0.0 + # values[2] = 0.0 + # values[3] = 0.0 + coord_bf = bfs_coords[i] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)>bfs_radius_cutoff[i]): + continue + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + #cutoff_radius = 0 #Cutoff radius for this basis function + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i, ik] + Nik = bfs_prim_norms[i, ik] + alphaik = bfs_expnts[i, ik] + a,b,c,d = evalGTOandGradNumba(alphaik, Ni*Nik*dik, lmni, x, y, z) + value_ao = value_ao + a + valuex = valuex + b + valuey = valuey + c + valuez = valuez + d + # result[0,k,i] = value_ao + # result[1,k,i] = valuex + # result[2,k,i] = valuey + # result[3,k,i] = valuez + result1[k,i] = value_ao + result2[0,k,i] = valuex + result2[1,k,i] = valuey + result2[2,k,i] = valuez + + + + # Loop over BFs (This is lowerrr and could also have race condition) + # for i in range(nao): + # coordi = bfs_coords[i] + # Ni = bfs_contr_prim_norms[i] + # lmni = bfs_lmn[i] + # #Loop over primitives + # for ik in range(bfs_nprim[i]): + # dik = bfs_coeffs[i][ik] + # Nik = bfs_prim_norms[i][ik] + # alphaik = bfs_expnts[i][ik] + # #Loop over grid points + # for k in prange(ncoord): + # result[0,k,i] += evalGTOgradxNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + # result[1,k,i] += evalGTOgradyNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + # result[2,k,i] += evalGTOgradzNumba2(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + + + # return result + return result1, result2 + + +def evalBFsandRho_serialNumba1(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord, densmat): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bfs_coords.shape[0] + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + rho = np.zeros((nao)) + + #Loop over grid points + for k in range(ncoord): + rho_temp = 0.0 + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value = 0.0 + coord_bf = bfs_coords[i] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)<=bfs_radius_cutoff[i]): + # continue + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + value += evalGTONumba(alphaik, Ni*Nik*dik, lmni, x, y, z) + result[k,i] = value + # Rho at grid points + for ii in range(nao): + mu = result[k,ii] + if abs(mu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + for j in range(ii+1): + dens = densmat[ii,j] + if abs(dens)<1.0e-8: #A value of 9 is good for an accuracy of 7-8 decimal places. + continue + if ii==j: # Diagonal terms + nu = mu + rho_temp += dens*mu*nu + else: # Non-diagonal terms + nu = result[k,j] + if abs(nu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + rho_temp += 2*dens*mu*nu + rho[k] = rho_temp + + + return result, rho + + +def evalBFsandRhoNumba1(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord, densmat): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bfs_coords.shape[0] + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + rho = np.zeros((nao)) + + #TODO I guess a better way would be to iterate over BFs first, instead of coords. + #Also, it would be better to skip the loop over coords altoghether and use numpy instead for the evaluation, by just passing + #the coords array to evalGTO. I am pretty sure this would increase the speed substantially. This could be wrong though, + #since we are in fact using JIT so maybe no more optimization is possible. But worth a try. + + #Loop over grid points + for k in prange(ncoord): + rho_temp = 0.0 + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value = 0.0 + coord_bf = bfs_coords[i] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)<=bfs_radius_cutoff[i]): + # continue + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + value += evalGTONumba(alphaik, Ni*Nik*dik, lmni, x, y, z) + result[k,i] = value + # Rho at grid points + for ii in range(nao): + mu = result[k,ii] + if abs(mu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + for j in range(ii+1): + dens = densmat[ii,j] + if abs(dens)<1.0e-8: #A value of 9 is good for an accuracy of 7-8 decimal places. + continue + if ii==j: # Diagonal terms + nu = mu + rho_temp += dens*mu*nu + else: # Non-diagonal terms + nu = result[k,j] + if abs(mu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + rho_temp += 2*dens*mu*nu + rho[k] = rho_temp + + + return result, rho + +#@njit(parallel=True, cache=True) +def evalBFsNumba1(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bfs_coords.shape[0] + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + + #TODO I guess a better way would be to iterate over BFs first, instead of coords. + #Also, it would be better to skip the loop over coords altoghether and use numpy instead for the evaluation, by just passing + #the coords array to evalGTO. I am pretty sure this would increase the speed substantially. This could be wrong though, + #since we are in fact using JIT so maybe no more optimization is possible. But worth a try. + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value = 0.0 + coord_bf = bfs_coords[i] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)>bfs_radius_cutoff[i]): + continue + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + value += evalGTONumba(alphaik, Ni*Nik*dik, lmni, x, y, z) + result[k,i] = value + + #New try (doesn't work) + #Loop over BFs + # for i in prange(nao): + # coordi = bfs_coords[i] + # Ni = bfs_contr_prim_norms[i] + # lmni = bfs_lmn[i] + # for ik in prange(bfs_nprim[i]): + # dik = bfs_coeffs[i][ik] + # Nik = bfs_prim_norms[i][ik] + # alphaik = bfs_expnts[i][ik] + # result[:,i] = result[:,i] + evalGTONumba(alphaik, Ni*Nik*dik, coordi, lmni, coord) + + #New try to make the loop over coords as the innermost + #UPDATE: Somehow this is slower than the existing implementation + #This is strange and interesting as the similar thing greatly accelerated rho calcualiton + #but it slows down ao calculation. + #Loop over BFs + # for i in range(nao): + # coordi = bfs_coords[i] + # Ni = bfs_contr_prim_norms[i] + # lmni = bfs_lmn[i] + # #Loop over primitives + # for ik in range(bfs_nprim[i]): + # dik = bfs_coeffs[i][ik] + # Nik = bfs_prim_norms[i][ik] + # alphaik = bfs_expnts[i][ik] + # #Loop over grid points + # for k in prange(ncoord): + # result[k,i] += evalGTONumba(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + + + + return result + +def evalBFsSparseNumba1(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord, bf_indices): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bf_indices.shape[0] + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + + #TODO I guess a better way would be to iterate over BFs first, instead of coords. + #Also, it would be better to skip the loop over coords altoghether and use numpy instead for the evaluation, by just passing + #the coords array to evalGTO. I am pretty sure this would increase the speed substantially. This could be wrong though, + #since we are in fact using JIT so maybe no more optimization is possible. But worth a try. + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + # Actual index in original basis set + ibf = bf_indices[i] + value = 0.0 + coord_bf = bfs_coords[ibf] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + Ni = bfs_contr_prim_norms[ibf] + lmni = bfs_lmn[ibf] + for ik in range(bfs_nprim[ibf]): + dik = bfs_coeffs[ibf][ik] + Nik = bfs_prim_norms[ibf][ik] + alphaik = bfs_expnts[ibf][ik] + value += evalGTONumba(alphaik, Ni*Nik*dik, lmni, x, y, z) + result[k,i] = value + + return result + +def nonZeroBFIndicesNumba1_old(coords, bf_values, threshold): + nbfs = bf_values.shape[1] + ncoords = coords.shape[0] + count = 0 + indices = np.zeros((nbfs), dtype='uint16') + # Loop over the basis functions + for ibf in range(nbfs): + # Loop over the grid points and check if the value of the basis function is greater than the threshold + for igrd in range(ncoords): + if np.abs(bf_values[igrd, ibf]) > threshold: + indices[count] = ibf + count = count + 1 + break + + # Return the indices array and the number of non-zero bfs + return indices, count + +def nonZeroBFIndicesNumba1(coords, bfs_coords, bfs_radius_cutoff): + nbfs = bfs_coords.shape[0] + ncoords = coords.shape[0] + count = 0 + indices = np.zeros((nbfs), dtype='uint16') + # Loop over the basis functions + for ibf in range(nbfs): + coord_bf = bfs_coords[ibf] + # Loop over the grid points and check if the value of the basis function is greater than the threshold + for igrd in range(ncoords): + coord_grid = coords[igrd] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)= 0 and x < 0.0000001: + F = 1/(2*v+1) #- x/(2*v+3) + else: + part1 = np.sqrt(np.pi)/(4**v * x**(v+1/2)) * math.erf(np.sqrt(x)) + part2 = 0 + for k in range(0, v): + part2 += fac(v-k)/(4**k * fac(2*v-2*k)*x**(k+1)) + F = fac(2*v)/(2*fac(v)) * (part1 - np.exp(-x)*part2) + return F + +def FboysNumba1_old(v,x): + if x >= 0 and x < 0.0000001: + F = 1/(2*v+1) - x/(2*v+3) + else: + F = 0.5*x**(-(v+0.5))*incGammaNumba(v+0.5,x)*gammaNumba(v+0.5) + return F + + +# F2 in boys_test.py (was supposed to be faster) +#@njit(cache=True) +def FboysNumba1(v,x): + # From: https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + #from scipy.special import gammainc, gamma + if x >= 0 and x < 0.0000001: + F = 1/(2*v+1) - x/(2*v+3) + else: + F = 0.5*x**(-(v+0.5))*gammainc(v+0.5,x)*gamma(v+0.5) + # F = 0.5*x**(-(v+0.5))*numba_gamma(v+0.5)#*gammainc(v+0.5,x) + return F +#@njit(cache=True) +def FboysNumba1_jjgoings(v,x): + #from scipy.special import hyp1f1 + F = hyp1f1(v+0.5,v+1.5,-x)/(2.0*v+1.0) + return F + +#@njit(parallel=True,cache=True) +def nucMatSymmNumba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d, Z, coordsMol, natoms): + # This function calculates the nuclear potential matrix for a given basis object and mol object. + # This function calculates the nuclear potential matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The mol object is used to get information about the charges of nuclei and their positions. + # It is here, that we see the advantage of having the mol and basis objects be supplied separately. + # This allows to calculate the nuclear matrix of one molecule in the basis of another. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + #NOTE: This is more slower than the calculation of overlap and kinetic matrices + #when compared with PySCF. + #Benchmark: Cholestrol.xyz def2-QZVPPD (3963 BFs) 766 sec vs 30 sec of PySCF + #Using numba-scipy allows us to use scipy.special.gamma and gamminc, + #however, this prevents the caching functionality. Nevertheless, + #apart form the compilation overhead, it allows to perform calculaitons significantly faster and with good + #accuracy. + #Benchmark: Cholestrol.xyz def2-QZVPPD (3963 BFs) 760 sec vs 30 sec of PySCF using scipy gamma and 10^-8 screening + + #If the user doesn't provide a slice then calculate the complete kinetic matrix for all the BFs + m = b-a + n = d-c + V = np.zeros((m,n)) #The difference in syntax is due to Numba + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + + + #Loop pver BFs + for i in prange(a,b): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + for j in prange(c,i+1): + + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + screenfactor = np.exp(-alphaik*alphajk*gamma_inv*IJsq) + if abs(screenfactor)<1.0e-8: + # Going lower than E-8 doesn't change the max erroor. There could still be some effects from error compounding but the max error doesnt budge. + #TODO: This is quite low. But since this is the slowest part. + #But I had to do this because this is a very slow part of the program. + #Will have to check how the accuracy is affected and if the screening factor + #can be reduced further. + continue + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + epsilon = 0.25*gamma_inv + P = (alphaik*I + alphajk*J)*gamma_inv + PI = P - I + PJ = P - J + tempfac = (PIx2*gamma_inv)*screenfactor + + Vc = 0.0 + #Loop over nuclei + for iatom in prange(natoms): #Parallelising over atoms seems to be faster for Cholestrol.xyz with def2-QZVPPD (628 sec) + Rc = coordsMol[iatom] + Zc = Z[iatom] + PC = P - Rc + + fac1 = -Zc*tempfac + #print(fac1) + sum_Vl = 0.0 + + + for l in range(0,la+lb+1): + facl = c2kNumba(l,la,lb,PI[0],PJ[0]) + for r in range(0, int(l/2)+1): + for i1 in range(0, int((l-2*r)/2)+1): + v_lri = vlriNumbaPartial(PC[0],l,r,i1)*epsilon**(r+i1)*facl + sum_Vm = 0.0 + for m in range(0,ma+mb+1): + facm = c2kNumba(m,ma,mb,PI[1],PJ[1]) + for s in range(0, int(m/2)+1): + for j1 in range(0, int((m-2*s)/2)+1): + v_msj = vlriNumbaPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm + sum_Vn = 0.0 + for n in range(0,na+nb+1): + facn = c2kNumba(n,na,nb,PI[2],PJ[2]) + for t in range(0, int(n/2)+1): + for k in range(0, int((n-2*t)/2)+1): + v_ntk = vlriNumbaPartial(PC[2],n,t,k)*epsilon**(t+k)*facn + # This version of Boys function is 3.1 times slower with 842 BFs (sto-6g & Icosahectane_C120H242) + # F = FboysNumba2_jjgoings(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + # Seems to befficient for now (F2 in boys_test.py) + F = FboysNumba2(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + #TODO The numba implementation of Fboys gives wrong answers. + #Needs to fix that. + + sum_Vn += v_ntk*F + sum_Vm += v_msj*sum_Vn + sum_Vl += v_lri*sum_Vm + + Vc += sum_Vl*fac1 + #print(Vc) + V[i,j] += Vc*dik*djk*Nik*Njk*Ni*Nj + #print(dik*djk*Nik*Njk*Ni*Nj*Vc) + #print(i,j) + V[j,i] = V[i,j] #We save time by evaluating only the lower diagonal elements and then use symmetry Vi,j=Vj,i + + return V + +#@njit(parallel=True,cache=True) +def nucMatNumba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d, Z, coordsMol, natoms): + # This function calculates the nuclear potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The mol object is used to get information about the charges of nuclei and their positions. + # It is here, that we see the advantage of having the mol and basis objects be supplied separately. + # This allows to calculate the nuclear matrix of one molecule in the basis of another. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + #NOTE: This is more slower than the calculation of overlap and kinetic matrices + #when compared with PySCF. + #Benchmark: Cholestrol.xyz def2-QZVPPD (3963 BFs) 766 sec vs 30 sec of PySCF + #Using numba-scipy allows us to use scipy.special.gamma and gamminc, + #however, this prevents the caching functionality. Nevertheless, + #apart form the compilation overhead, it allows to perform calculaitons significantly faster and with good + #accuracy. + #Benchmark: Cholestrol.xyz def2-QZVPPD (3963 BFs) 760 sec vs 30 sec of PySCF using scipy gamma and 10^-8 screening + #Update: After parallelising over the atoms, now NUMBA is much better in performance. + + #If the user doesn't provide a slice then calculate the complete nuclear matrix for all the BFs + m = b-a + n = d-c + V = np.zeros((m,n)) #The difference in syntax is due to Numba + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + + + #Loop pver BFs + for i in prange(a,b): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + for j in prange(c,d): + + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + screenfactor = np.exp(-alphaik*alphajk*gamma_inv*IJsq) + if abs(screenfactor)<1.0e-8: + #TODO: This is quite low. But since this is the slowest part. + #But I had to do this because this is a very slow part of the program. + #Will have to check how the accuracy is affected and if the screening factor + #can be reduced further. + continue + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + epsilon = 0.25*gamma_inv + P = (alphaik*I + alphajk*J)*gamma_inv + PI = P - I + PJ = P - J + tempfac = (PIx2*gamma_inv)*screenfactor + + Vc = 0.0 + #Loop over nuclei + for iatom in prange(natoms): #Parallelising over atoms seems to be faster for Cholestrol.xyz with def2-QZVPPD (628 sec) + Rc = coordsMol[iatom] + Zc = Z[iatom] + PC = P - Rc + + fac1 = -Zc*tempfac + #print(fac1) + sum_Vl = 0.0 + # vMax = la+lb+ma+mb+na+nb + # Fmax = FboysNumba2(vMax,gamma*np.sum(PC**2)) + # Fboys_dict = dict() + + + for l in range(0,la+lb+1): + facl = c2kNumba(l,la,lb,PI[0],PJ[0]) + for r in range(0, int(l/2)+1): + for i1 in range(0, int((l-2*r)/2)+1): + v_lri = vlriNumbaPartial(PC[0],l,r,i1)*epsilon**(r+i1)*facl + sum_Vm = 0.0 + for m in range(0,ma+mb+1): + facm = c2kNumba(m,ma,mb,PI[1],PJ[1]) + for s in range(0, int(m/2)+1): + for j1 in range(0, int((m-2*s)/2)+1): + v_msj = vlriNumbaPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm + sum_Vn = 0.0 + for n in range(0,na+nb+1): + facn = c2kNumba(n,na,nb,PI[2],PJ[2]) + for t in range(0, int(n/2)+1): + for k in range(0, int((n-2*t)/2)+1): + v_ntk = vlriNumbaPartial(PC[2],n,t,k)*epsilon**(t+k)*facn + # This version of Boys function is 3.1 times slower with 842 BFs (sto-6g & Icosahectane_C120H242) + # F = FboysNumba2_jjgoings(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + # Seems to befficient for now (F2 in boys_test.py) + F = FboysNumba2(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + # Using dictionary for Fboys + # if l+m+n-2*(r+s+t)-(i1+j1+k) in Fboys_dict: + # F = Fboys_dict[l+m+n-2*(r+s+t)-(i1+j1+k)] + # else: + # Fboys_dict[l+m+n-2*(r+s+t)-(i1+j1+k)] = F = FboysNumba2(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + # Using recursion for Fboys + # vvv = vMax + # F=1 + # while not vvv == (l+m+n-2*(r+s+t)-(i1+j1+k)): + # F = FboysRecursiveNumba2(vvv, gamma*np.sum(PC**2), Fmax) + # vvv -= 1 + + sum_Vn += v_ntk*F + sum_Vm += v_msj*sum_Vn + sum_Vl += v_lri*sum_Vm + + Vc += sum_Vl*fac1 + #print(Vc) + V[i,j] += Vc*dik*djk*Nik*Njk*Ni*Nj + + + return V + +def thetaNumba1(l,la,lb,PA,PB,gamma_,r): + return c2kNumba(l,la,lb,PA,PB)*fastFactorial2(l)*(gamma_**(r-l))/(fastFactorial2(r)*fastFactorial2(l-2*r)) + +def gNumba1(lp,lq,rp,rq,i,la,lb,lc,ld,gammaP,gammaQ,PA,PB,QC,QD,PQ,delta): + temp = ((-1)**lp)*thetaNumba2(lp,la,lb,PA,PB,gammaP,rp)*thetaNumba2(lq,lc,ld,QC,QD,gammaQ,rq) + numerator = temp*((-1)**i)*((2*delta)**(2*(rp+rq)))*fastFactorial2(lp+lq-2*rp-2*rq)*(delta**i)*(PQ**(lp+lq-2*(rp+rq+i))) + denominator = ((4*delta)**(lp+lq))*fastFactorial2(i)*fastFactorial2(lp+lq-2*(rp+rq+i)) + # print(numerator/temp) + return (numerator/denominator) + +def innerLoop4c2eNumba1(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta): + sum1 = 0.0 + for lp in range(0,la+lb+1): + for rp in range(0, int(lp/2)+1): + for lq in range(0, lc+ld+1): + for rq in range(0, int(lq/2)+1): + for i1 in range(0,int((lp+lq-2*rp-2*rq)/2)+1): + gx = gNumba2(lp,lq,rp,rq,i1,la,lb,lc,ld,gammaP,gammaQ,PI[0],PJ[0],QK[0],QL[0],PQ[0],delta) + sum2 = 0.0 + for mp in range(0,ma+mb+1): + for sp in range(0, int(mp/2)+1): + for mq in range(0, mc+md+1): + for sq in range(0, int(mq/2)+1): + for j1 in range(0,int((mp+mq-2*sp-2*sq)/2)+1): + gy = gNumba2(mp,mq,sp,sq,j1,ma,mb,mc,md,gammaP,gammaQ,PI[1],PJ[1],QK[1],QL[1],PQ[1],delta) + sum3 = 0.0 + for np1 in range(0,na+nb+1): + for tp in range(0, int(np1/2)+1): + for nq in range(0, nc+nd+1): + for tq in range(0, int(nq/2)+1): + for k1 in range(0,int((np1+nq-2*tp-2*tq)/2)+1): + gz = gNumba2(np1,nq,tp,tq,k1,na,nb,nc,nd,gammaP,gammaQ,PI[2],PJ[2],QK[2],QL[2],PQ[2],delta) + v = lp+lq+mp+mq+np1+nq-2*(rp+rq+sp+sq+tp+tq)-(i1+j1+k1) + F = FboysNumba2(v,PQsqBy4delta) + # F = FboysNumba2(v,np.sum(PQ**2)/(4*delta)) + # F = FboysNumba1_jjgoings(v,PQsqBy4delta) + sum3 = sum3 + gz*F + sum2 = sum2 + gy*sum3 + sum1 = sum1 + gx*sum2 + return sum1 + + + +def fourCenterTwoElecNumba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD): + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + + # returns (AB|CD) + + m = indx_endA - indx_startA + n = indx_endB - indx_startB + o = indx_endC - indx_startC + p = indx_endD - indx_startD + fourC2E = np.zeros((m,n,o,p)) #The difference in syntax is due to Numba + + + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(indx_startB, indx_endB): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + for k in prange(indx_startC, indx_endC): #C + K = bfs_coords[k] + Nk = bfs_contr_prim_norms[k] + lmnk = bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + nprimk = bfs_nprim[k] + + for l in prange(indx_startD, indx_endD): #D + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff3 = tempcoeff2*Nl + npriml = bfs_nprim[l] + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in range(bfs_nprim[k]): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in range(bfs_nprim[l]): + alphalk = bfs_expnts[l][lk] + gammaQ = alphakk + alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-12: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q - L + tempcoeff7 = tempcoeff6*dlk*Nlk + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2eNumba2(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + # sum1 = FboysNumba2(la+lb+lc+ld+ma+mb+mc+md+na+nb+nc+nd,PQsqBy4delta) + # sum1 = 1.0 + + fourC2E[i,j,k,l] = fourC2E[i,j,k,l] + omega*sum1*tempcoeff7 + + + + + return fourC2E + +def rys2c2eSymmNumba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d): + # Two centered two electron integrals by hacking the 4c2e routines based on rys quadrature. + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + + # returns (A|C) + + m = b-a + n = d-c + twoC2E = np.zeros((m,n)) + + + + # pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + # twopisq = 19.739208802178716 #2*PI^2 + J = L = np.zeros((3)) + Nj = Nl = 1 + lnmj = lmnl = np.zeros((3),dtype=np.int32) + lb, mb, nb = int(0), int(0), int(0) + ld, md, nd = int(0), int(0), int(0) + alphajk = alphalk = 0.0 + djk, dlk = 1.0, 1.0 + Njk, Nlk = 1.0, 1.0 + #Loop pver BFs + for i in prange(a, b): #A + I = bfs_coords[i] + # J = I + # IJ = I #I - J + P = I + # IJsq = np.sum(IJ**2) + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + # nprimi = bfs_nprim[i] + + for k in range(c, i+1): #C + K = bfs_coords[k] + # L = K + # KL = K + Q = K + # KLsq = np.sum(KL**2) + Nk = bfs_contr_prim_norms[k] + lmnk = bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff1 = Ni*Nk + # nprimk = bfs_nprim[k] + + + norder = int((la+ma+na+lc+mc+nc)/2+1 ) + n = int(max(la,ma,na)) + m = int(max(lc,mc,nc)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + PQ = P - Q + PQsq = np.sum(PQ**2) + + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + alphajk = 0.0 + tempcoeff2 = tempcoeff1*dik*Nik + gammaP = alphaik + + for kk in range(bfs_nprim[k]): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + alphalk = 0.0 + tempcoeff3 = tempcoeff2*dkk*Nkk + gammaQ = alphakk + + + + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + + twoC2E[i,k] += tempcoeff3*coulomb_rysNumba2(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + + + twoC2E[k,i] = twoC2E[i,k] + + + + + + return twoC2E + +def rys3c2eSymmNumba_tri1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC): + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + + + m = indx_endA - indx_startA + n = indx_endB - indx_startB + o = indx_endC - indx_startC + + threeC2E = np.zeros((int(m*(n+1)/2.0),o),dtype=np.float64) + + + + + pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + L = np.zeros((3)) + alphalk = 0.0 + ld, md, nd = int(0), int(0), int(0) + #Loop over BFs + for i in range(0, indx_endA): #A + offset = int(i*(i+1)/2) + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + # nprimi = bfs_nprim[i] + + for j in range(0, i+1): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + # nprimj = bfs_nprim[j] + # if itriangle2kl: + continue + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff3 = tempcoeff2*Nl + # npriml = bfs_nprim[l] + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + + # val = 0.0 + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + # PI = P - I + # PJ = P - J + # fac1 = twopisq/gammaP*screenfactorAB + # onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in range(bfs_nprim[k]): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in range(bfs_nprim[l]): + alphalk = bfs_expnts[l][lk] + gammaQ = alphakk + alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + PQsq = np.sum(PQ**2) + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + # QK = Q - K + # QL = Q - L + tempcoeff7 = tempcoeff6*dlk*Nlk + + if norder<6: + fourC2E[i,j,k,l] += tempcoeff7*coulomb_rysNumba2(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + else: + T = rho*PQsq + sERI = 34.9868366552497256925 * (screenfactorAB+screenfactorKL) / ((gammaP*gammaQ) * np.sqrt(gammaP + gammaQ)) + fourC2E[i,j,k,l] += tempcoeff7*sERI*ChebGausIntNumba2(1E-8,50000, gammaP, gammaQ, la, lb, lc, ld,ma, mb, mc, md, na, nb, nc,nd, I[0], + J[0], K[0], L[0], I[1], J[1], K[1], L[1], I[2], J[2], K[2], + L[2], P[0], P[1], P[2], Q[0], Q[1], Q[2], T, sRys) + + # fourC2E[i,j,k,l] = val + fourC2E[j,i,k,l] = fourC2E[i,j,k,l] + fourC2E[i,j,l,k] = fourC2E[i,j,k,l] + fourC2E[j,i,l,k] = fourC2E[i,j,k,l] + fourC2E[k,l,i,j] = fourC2E[i,j,k,l] + fourC2E[k,l,j,i] = fourC2E[i,j,k,l] + fourC2E[l,k,i,j] = fourC2E[i,j,k,l] + fourC2E[l,k,j,i] = fourC2E[i,j,k,l] + + + + + return fourC2E + +""Form coulomb repulsion integral using Rys quadrature"" +def coulomb_rysNumba1(roots,weights,G,rpq2, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L): + X = rpq2*rho + + + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + # G = np.zeros((n+1,m+1)) + + roots, weights = RootsNumba2(norder,X,roots,weights) + + + ijkl = 0.0 + for i in range(norder): + G = RecurNumba2(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk) + + Ix = Int1dNumba2(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0], + alphaik,alphajk,alphakk,alphalk) + + G = RecurNumba2(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk) + Iy = Int1dNumba2(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1], + alphaik,alphajk,alphakk,alphalk) + + G = RecurNumba2(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk) + + Iz = Int1dNumba2(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2], + alphaik,alphajk,alphakk,alphalk) + ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + + + + val = 2*np.sqrt(rho/np.pi)*ijkl # ABD eq 5 & 9 + + + return val + + +def Int1dNumba1(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal): + #G = RecurNumba2(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal) + return ShiftNumba2(G,ix,jx,kx,lx,xi-xj,xk-xl) + +""Form G(n,m)=I(n,0,m,0) intermediate values for a Rys polynomial"" +def RecurNumba1(G,t,i,j,k,l,xi,xj,xk,xl,alphai,alphaj,alphak,alphal): + # print('RecurNumba1', G[0,0]) + # G1 = np.zeros((n1+1,m1+1)) + + n = i+j + m = k+l + A = alphai+alphaj + B = alphak+alphal + Px = (alphai*xi+alphaj*xj)/A + Qx = (alphak*xk+alphal*xl)/B + + C,Cp,B0,B1,B1p = RecurFactorsNumba2(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = np.pi*np.exp(-alphai*alphaj*(xi-xj)**2/(alphai+alphaj) + -alphak*alphal*(xk-xl)**2/(alphak+alphal))/np.sqrt(A*B) + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +""Compute and output I(i,j,k,l) from I(i+j,0,k+l,0) (G)"" +def ShiftNumba1(G,i,j,k,l,xij,xkl): + ijkl = 0.0 + for m in range(l+1) : + ijm0 = 0.0 + for n in range(j+1): + ijm0 += comb(j,n)*xij**(j-n)*G[n+i,m+k] + ijkl += comb(l,m)*xkl**(l-m)*ijm0 # I(i,j,k,l)<-I(i,j,m,0) + return ijkl + +def RecurFactorsNumba1(t,A,B,Px,Qx,xi,xk): + # Analogous versions taken from Gamess source code + ooopt = 1/(1+t) + fact = t*ooopt/(A+B) + B0 = 0.5*fact + # B1 = 0.5*ooopt/A + 0.5*fact + # B1p = 0.5*ooopt/B + 0.5*fact + B1 = 0.5*ooopt/A + B0 + B1p = 0.5*ooopt/B + B0 + C = (Px-xi)*ooopt + (B*(Qx-xi)+A*(Px-xi))*fact + Cp = (Qx-xk)*ooopt + (B*(Qx-xk)+A*(Px-xk))*fact + return C,Cp,B0,B1,B1p + +# Everything after this computes the Roots and Weights of the Rys polynomial. +# Would be nice to find a more intuitive way to do this. +""Roots(n,X,roots,weights) - Return roots and weights of nth order Rys quadrature"" +def RootsNumba1(n,X,roots,weights): + if n == 1: + return Root1Numba2(X,n,roots,weights) + elif n == 2: + return Root2Numba2(X,n,roots,weights) + elif n == 3: + return Root3Numba2(X,n,roots,weights) + elif n == 4: + return Root4Numba2(X,n,roots,weights) + elif n == 5: + return Root5Numba2(X,n,roots,weights) + +def nERIRysNumba1(t, q1, q2, q3, q4, a12, a34, + A, B, C, D, P, Q, sRys): + '''Calculate Rys polynomials for two-electron integrals + ''' + # base case + if q1+q2+q3+q4 == 0: return 1.0 + + # cdef double PQ,a1234,C00 + + #distance between the two gaussian centers + PQ = P - Q + a1234 = a12 + a34 + + C00 = P - A - a34 * (PQ) * t / a1234 + + if q1==1 and q2+q3+q4==0: return C00 + + # cdef double C01, D00, B00 + + if q2==1 and q1+q3+q4==0: + C01 = C00 + (A - B) + return C01 + + D00 = Q - C + a12 * (PQ) * t / a1234 + if q3==1 and q1+q2+q4==0: return D00 + + + if q1+q2+q3==0 and q4==1: + D01 = D00 + (C - D) + return D01 + + B00 = t / (2 * a1234) + + if q1==1 and q3==1 and q2+q4 == 0: return D00 * C00 + B00 + + # cdef int n, m, i, j + n , m = q1 + q2 , q3 + q4 + + if n > 0: sRys[1,0] = C00 + if m > 0: sRys[0,1] = D00 + + + B10 = 1 /(2 * a12) + -a34 * t/ ((2 * a12) * (a1234)) + B01 = 1 /(2 * a34) + -a12 * t / ((2 * a34) * (a1234)) + + for i in range(1, n+1): + sRys[i,0] = C00 * sRys[i-1,0] + (i - 1) * B10 * sRys[i-2,0] + + for i in range(1,m+1): + sRys[0,i] = D00 * sRys[0,i-1] + (i - 1) * B01 * sRys[0,i-2] + + if m * n > 0: + + for i in range(1,n+1): + sRys[i,1] = D00 * sRys[i,0] + i * B00 * sRys[i-1,0] + for j in range(2,m+1): + sRys[i,j] = (j-1) * B01 * sRys[i,j-2] + i * B00 * sRys[i-1,j-1] + D00 * sRys[i,j-1] + + if q2 + q4 == 0: return sRys[q1,q3] + + # cdef double Rys,Rys0,AB,CD,Poly1 + + Rys = 0 + + #Angular momentum transfer + AB,CD = A-B, C-D + + for i in range(q4+1): + Rys0 = 0 + for j in range(q2+1): + + # I(i,j,m,0)<-I(n,0,m,0) + Poly1 = comb(q2,j) * np.power(AB,q2-j) * sRys[j+q1,i+q3] + Rys0 += Poly1 + + Rys0 *= comb(q4, i) * np.power(CD, q4-i) + Rys += Rys0 # I(i,j,k,l)<-I(i,j,m,0) + + return Rys + +def ChebGausIntNumba1(eps,M,a12,a34, qx1, qx2, qx3, qx4, + qy1, qy2, qy3, qy4, qz1, qz2, qz3, qz4, x1, + x2, x3, x4, y1, y2, y3, y4, + z1, z2, z3, z4, Px, Py, Pz, + Qx, Qy, Qz, T, sRys): + + # cdef double c0,s0,c1,s1,q,p,chp,c,s,xp,t1,t2,ang1,ang2,err + # cdef int j,n,i + err,n,c0,s0 = 10,3,0.866025403784438646,.5 + c1 = s0 + s1 = c0 + t1,t2 = 0.7628537665044517,0.0160237616047743 + ang1 = (nERIRysNumba2(t1,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRysNumba2(t1,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRysNumba2(t1,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + ang2 = (nERIRysNumba2(t2,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRysNumba2(t2,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRysNumba2(t2,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + q = 0.28125 * (np.exp(-T*t1) * ang1 + np.exp(-T*t2) * ang2) + p = (0.5*np.exp(-T*0.25)* nERIRysNumba2(0.25,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRysNumba2(0.25,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRysNumba2(0.25,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + chp = q + p + j = 0 + while err > eps: + j = 1 - j + c1 = j * c1 + (1-j) * c0 + s1 = j * s1 + (1-j) * s0 + c0 = j * c0 + (1-j) * np.sqrt(0.5 * (1 + c0)) + s0 *= j + (1-j)/(2 * c0) + c,s = c0,s0 + + for i in range(1,n,2): + xp = 1 + 0.21220659078919378 * s * c * (3 + 2*s*s) - i/n + if np.ceil(3*(i+j+j)/3.) > (i + j): + + t1 = 0.25 * (-xp+1) * (-xp+1) + t2 = 0.25 * (xp+1) * (xp+1) + + ang1 = (nERIRysNumba2(t1,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRysNumba2(t1,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRysNumba2(t1,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + ang2 = (nERIRysNumba2(t2,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRysNumba2(t2,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRysNumba2(t2,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + chp += 0.5 * (np.exp(-T*t1) * ang1 + np.exp(-T*t2) * ang2) * s ** 4 + + xp = s + s = s*c1 + c*s1 + c = c*c1 - xp*s1 + + n *= (1+j) + p += (1-j)*(chp-q) + err = 16 * np.abs((1-j)*(q-3*p/2)+j*(chp-2*q))/(3*n) + q = (1 - j) * q + j * chp + print(err) + print('convgd') + ssss = 1.0 + return 16*q/(3*n) + +def Root1Numba1(X,n,roots,weights): + # roots = np.zeros((n)) + # weights = np.zeros((n)) + R12,PIE4 = 2.75255128608411E-01, 7.85398163397448E-01 + # R22,W22 = 2.72474487139158E+00, 9.17517095361369E-02 + # R13 = 1.90163509193487E-01 + # R23,W23 = 1.78449274854325E+00, 1.77231492083829E-01 + # R33,W33 = 5.52534374226326E+00, 5.11156880411248E-03 + if X < 3.0E-7: + roots0 = 0.5E+00-X/5.0E+00 + weights0 = 1.0E+00-X/3.0E+00 + elif X < 1.0: + F1 = ((((((((-8.36313918003957E-08*X+1.21222603512827E-06 )*X- + 1.15662609053481E-05 )*X+9.25197374512647E-05 )*X- + 6.40994113129432E-04 )*X+3.78787044215009E-03 )*X- + 1.85185172458485E-02 )*X+7.14285713298222E-02 )*X- + 1.99999999997023E-01 )*X+3.33333333333318E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 3.0: + Y = X-2.0E+00 + F1 = ((((((((((-1.61702782425558E-10*Y+1.96215250865776E-09 )*Y- + 2.14234468198419E-08 )*Y+2.17216556336318E-07 )*Y- + 1.98850171329371E-06 )*Y+1.62429321438911E-05 )*Y- + 1.16740298039895E-04 )*Y+7.24888732052332E-04 )*Y- + 3.79490003707156E-03 )*Y+1.61723488664661E-02 )*Y- + 5.29428148329736E-02 )*Y+1.15702180856167E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 5.0: + Y = X-4.0E+00 + F1 = ((((((((((-2.62453564772299E-11*Y+3.24031041623823E-10 )*Y- + 3.614965656163E-09)*Y+3.760256799971E-08)*Y- + 3.553558319675E-07)*Y+3.022556449731E-06)*Y- + 2.290098979647E-05)*Y+1.526537461148E-04)*Y- + 8.81947375894379E-04 )*Y+4.33207949514611E-03 )*Y- + 1.75257821619926E-02 )*Y+5.28406320615584E-02 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 10.0: + E = np.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X -3.1501078774085E-06)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + elif X < 15.0: + E = np.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + elif X < 33.0: + E = np.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + else: # X > 33 + weights0 = np.sqrt(PIE4/X) + roots0 = 0.5E+00/(X-0.5E+00) + + roots[0]=roots0 + weights[0]=weights0 + + return roots, weights + +def Root2Numba1(X,n, roots, weights): + # roots = np.zeros((n)) + # weights = np.zeros((n)) + R12,PIE4 = 2.75255128608411E-01, 7.85398163397448E-01 + R22,W22 = 2.72474487139158E+00, 9.17517095361369E-02 + # R13 = 1.90163509193487E-01 + # R23,W23 = 1.78449274854325E+00, 1.77231492083829E-01 + # R33,W33 = 5.52534374226326E+00, 5.11156880411248E-03 + if X < 3.E-7: + roots0 = 1.30693606237085E-01-2.90430236082028E-02 *X + roots1 = 2.86930639376291E+00-6.37623643058102E-01 *X + weights0 = 6.52145154862545E-01-1.22713621927067E-01 *X + weights1 = 3.47854845137453E-01-2.10619711404725E-01 *X + elif X < 1.0: + F1 = ((((((((-8.36313918003957E-08*X+1.21222603512827E-06 )*X- + 1.15662609053481E-05 )*X+9.25197374512647E-05 )*X- + 6.40994113129432E-04 )*X+3.78787044215009E-03 )*X- + 1.85185172458485E-02 )*X+7.14285713298222E-02 )*X- + 1.99999999997023E-01 )*X+3.33333333333318E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = (((((((-2.35234358048491E-09*X+2.49173650389842E-08)*X- + 4.558315364581E-08)*X-2.447252174587E-06)*X+ + 4.743292959463E-05)*X-5.33184749432408E-04 )*X+ + 4.44654947116579E-03 )*X-2.90430236084697E-02 )*X+1.30693606237085E-01 + roots1 = (((((((-2.47404902329170E-08*X+2.36809910635906E-07)*X+ + 1.835367736310E-06)*X-2.066168802076E-05)*X- + 1.345693393936E-04)*X-5.88154362858038E-05 )*X+ + 5.32735082098139E-02 )*X-6.37623643056745E-01 )*X+2.86930639376289E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 3.0: + Y = X-2.0E+00 + F1 = ((((((((((-1.61702782425558E-10*Y+1.96215250865776E-09 )*Y- + 2.14234468198419E-08 )*Y+2.17216556336318E-07 )*Y- + 1.98850171329371E-06 )*Y+1.62429321438911E-05 )*Y- + 1.16740298039895E-04 )*Y+7.24888732052332E-04 )*Y- + 3.79490003707156E-03 )*Y+1.61723488664661E-02 )*Y- + 5.29428148329736E-02 )*Y+1.15702180856167E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = (((((((((-6.36859636616415E-12*Y+8.47417064776270E-11)*Y- + 5.152207846962E-10)*Y-3.846389873308E-10)*Y+ + 8.472253388380E-08)*Y-1.85306035634293E-06 )*Y+ + 2.47191693238413E-05 )*Y-2.49018321709815E-04 )*Y+ + 2.19173220020161E-03 )*Y-1.63329339286794E-02 )*Y+8.68085688285261E-02 + roots1 = ((((((((( 1.45331350488343E-10*Y+2.07111465297976E-09)*Y- + 1.878920917404E-08)*Y-1.725838516261E-07)*Y+ + 2.247389642339E-06)*Y+9.76783813082564E-06 )*Y- + 1.93160765581969E-04 )*Y-1.58064140671893E-03 )*Y+ + 4.85928174507904E-02 )*Y-4.30761584997596E-01 )*Y+1.80400974537950E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 5.0: + Y = X-4.0E+00 + F1 = ((((((((((-2.62453564772299E-11*Y+3.24031041623823E-10 )*Y- + 3.614965656163E-09)*Y+3.760256799971E-08)*Y- + 3.553558319675E-07)*Y+3.022556449731E-06)*Y- + 2.290098979647E-05)*Y+1.526537461148E-04)*Y- + 8.81947375894379E-04 )*Y+4.33207949514611E-03 )*Y- + 1.75257821619926E-02 )*Y+5.28406320615584E-02 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = ((((((((-4.11560117487296E-12*Y+7.10910223886747E-11)*Y- + 1.73508862390291E-09 )*Y+5.93066856324744E-08 )*Y- + 9.76085576741771E-07 )*Y+1.08484384385679E-05 )*Y- + 1.12608004981982E-04 )*Y+1.16210907653515E-03 )*Y- + 9.89572595720351E-03 )*Y+6.12589701086408E-02 + roots1 = (((((((((-1.80555625241001E-10*Y+5.44072475994123E-10)*Y+ + 1.603498045240E-08)*Y-1.497986283037E-07)*Y- + 7.017002532106E-07)*Y+1.85882653064034E-05 )*Y- + 2.04685420150802E-05 )*Y-2.49327728643089E-03 )*Y+ + 3.56550690684281E-02 )*Y-2.60417417692375E-01 )*Y+1.12155283108289E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 10.0: + E = np.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X - + 3.1501078774085E-06)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + Y = X-7.5E+00 + roots0 = (((((((((((((-1.43632730148572E-16*Y+2.38198922570405E-16)* + Y+1.358319618800E-14)*Y-7.064522786879E-14)*Y- + 7.719300212748E-13)*Y+7.802544789997E-12)*Y+ + 6.628721099436E-11)*Y-1.775564159743E-09)*Y+ + 1.713828823990E-08)*Y-1.497500187053E-07)*Y+ + 2.283485114279E-06)*Y-3.76953869614706E-05 )*Y+ + 4.74791204651451E-04 )*Y-4.60448960876139E-03 )*Y+3.72458587837249E-02 + roots1 = (((((((((((( 2.48791622798900E-14*Y-1.36113510175724E-13)*Y- + 2.224334349799E-12)*Y+4.190559455515E-11)*Y- + 2.222722579924E-10)*Y-2.624183464275E-09)*Y+ + 6.128153450169E-08)*Y-4.383376014528E-07)*Y- + 2.49952200232910E-06 )*Y+1.03236647888320E-04 )*Y- + 1.44614664924989E-03 )*Y+1.35094294917224E-02 )*Y- + 9.53478510453887E-02 )*Y+5.44765245686790E-01 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 15.0: + E = np.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = ((((-1.01041157064226E-05*X+1.19483054115173E-03)*X - + 6.73760231824074E-02)*X+1.25705571069895E+00)*X + + (((-8.57609422987199E+03/X+5.91005939591842E+03)/X - + 1.70807677109425E+03)/X+2.64536689959503E+02)/X - + 2.38570496490846E+01)*E + R12/(X-R12) + roots1 = ((( 3.39024225137123E-04*X-9.34976436343509E-02)*X - + 4.22216483306320E+00)*X + + (((-2.08457050986847E+03/X - + 1.04999071905664E+03)/X+3.39891508992661E+02)/X - + 1.56184800325063E+02)/X+8.00839033297501E+00)*E + R22/(X-R22) + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 33.0: + E = np.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = ((((-1.14906395546354E-06*X+1.76003409708332E-04)*X - + 1.71984023644904E-02)*X-1.37292644149838E-01)*X + + (-4.75742064274859E+01/X+9.21005186542857E+00)/X - + 2.31080873898939E-02)*E + R12/(X-R12) + roots1 = ((( 3.64921633404158E-04*X-9.71850973831558E-02)*X - + 4.02886174850252E+00)*X + + (-1.35831002139173E+02/X - + 8.66891724287962E+01)/X+2.98011277766958E+00)*E + R22/(X-R22) + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + else: # X > 33 + weights0 = np.sqrt(PIE4/X) + if X < 40.0: + E = np.exp(-X) + roots0 = (-8.78947307498880E-01*X+1.09243702330261E+01)*E + R12/(X-R12) + roots1 = (-9.28903924275977E+00*X+8.10642367843811E+01)*E + R22/(X-R22) + weights1 = ( 4.46857389308400E+00*X-7.79250653461045E+01)*E + W22*weights0 + weights0 = weights0-weights1 + else: + roots0 = R12/(X-R12) + roots1 = R22/(X-R22) + weights1 = W22*weights0 + weights0 = weights0-weights1 + + roots[0] = roots0 + roots[1] = roots1 + weights[0]= weights0 + weights[1] = weights1 + + return roots, weights#[RT1,roots[2]],[weights1,weights[2]] + +def Root3Numba1(X,n,roots, weights): + # roots = np.zeros((n)) + # weights = np.zeros((n)) + R12,PIE4 = 2.75255128608411E-01, 7.85398163397448E-01 + # R22,W22 = 2.72474487139158E+00, 9.17517095361369E-02 + R13 = 1.90163509193487E-01 + R23,W23 = 1.78449274854325E+00, 1.77231492083829E-01 + R33,W33 = 5.52534374226326E+00, 5.11156880411248E-03 + if X < 3.0E-7: + roots0 = 6.03769246832797E-02-9.28875764357368E-03 *X + roots1 = 7.76823355931043E-01-1.19511285527878E-01 *X + roots2 = 6.66279971938567E+00-1.02504611068957E+00 *X + weights0 = 4.67913934572691E-01-5.64876917232519E-02 *X + weights1 = 3.60761573048137E-01-1.49077186455208E-01 *X + weights2 = 1.71324492379169E-01-1.27768455150979E-01 *X + elif X < 1.0: + roots0 = ((((((-5.10186691538870E-10*X+2.40134415703450E-08)*X- + 5.01081057744427E-07 )*X+7.58291285499256E-06 )*X- + 9.55085533670919E-05 )*X+1.02893039315878E-03 )*X- + 9.28875764374337E-03 )*X+6.03769246832810E-02 + roots1 = ((((((-1.29646524960555E-08*X+7.74602292865683E-08)*X+ + 1.56022811158727E-06 )*X-1.58051990661661E-05 )*X- + 3.30447806384059E-04 )*X+9.74266885190267E-03 )*X- + 1.19511285526388E-01 )*X+7.76823355931033E-01 + roots2 = ((((((-9.28536484109606E-09*X-3.02786290067014E-07)*X- + 2.50734477064200E-06 )*X-7.32728109752881E-06 )*X+ + 2.44217481700129E-04 )*X+4.94758452357327E-02 )*X- + 1.02504611065774E+00 )*X+6.66279971938553E+00 + F2 = ((((((((-7.60911486098850E-08*X+1.09552870123182E-06 )*X- + 1.03463270693454E-05 )*X+8.16324851790106E-05 )*X- + 5.55526624875562E-04 )*X+3.20512054753924E-03 )*X- + 1.51515139838540E-02 )*X+5.55555554649585E-02 )*X- + 1.42857142854412E-01 )*X+1.99999999999986E-01 + E = np.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 3.0: + Y = X-2.0E+00 + roots0 = (((((((( 1.44687969563318E-12*Y+4.85300143926755E-12)*Y- + 6.55098264095516E-10 )*Y+1.56592951656828E-08 )*Y- + 2.60122498274734E-07 )*Y+3.86118485517386E-06 )*Y- + 5.13430986707889E-05 )*Y+6.03194524398109E-04 )*Y- + 6.11219349825090E-03 )*Y+4.52578254679079E-02 + roots1 = ((((((( 6.95964248788138E-10*Y-5.35281831445517E-09)*Y- + 6.745205954533E-08)*Y+1.502366784525E-06)*Y+ + 9.923326947376E-07)*Y-3.89147469249594E-04 )*Y+ + 7.51549330892401E-03 )*Y-8.48778120363400E-02 )*Y+5.73928229597613E-01 + roots2 = ((((((((-2.81496588401439E-10*Y+3.61058041895031E-09)*Y+ + 4.53631789436255E-08 )*Y-1.40971837780847E-07 )*Y- + 6.05865557561067E-06 )*Y-5.15964042227127E-05 )*Y+ + 3.34761560498171E-05 )*Y+5.04871005319119E-02 )*Y- + 8.24708946991557E-01 )*Y+4.81234667357205E+00 + F2 = ((((((((((-1.48044231072140E-10*Y+1.78157031325097E-09 )*Y- + 1.92514145088973E-08 )*Y+1.92804632038796E-07 )*Y- + 1.73806555021045E-06 )*Y+1.39195169625425E-05 )*Y- + 9.74574633246452E-05 )*Y+5.83701488646511E-04 )*Y- + 2.89955494844975E-03 )*Y+1.13847001113810E-02 )*Y- + 3.23446977320647E-02 )*Y+5.29428148329709E-02 + E = np.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 5.0: + Y = X-4.0E+00 + roots0 = ((((((( 1.44265709189601E-11*Y-4.66622033006074E-10)*Y+ + 7.649155832025E-09)*Y-1.229940017368E-07)*Y+ + 2.026002142457E-06)*Y-2.87048671521677E-05 )*Y+ + 3.70326938096287E-04 )*Y-4.21006346373634E-03 )*Y+3.50898470729044E-02 + roots1 = ((((((((-2.65526039155651E-11*Y+1.97549041402552E-10)*Y+ + 2.15971131403034E-09 )*Y-7.95045680685193E-08 )*Y+ + 5.15021914287057E-07 )*Y+1.11788717230514E-05 )*Y- + 3.33739312603632E-04 )*Y+5.30601428208358E-03 )*Y- + 5.93483267268959E-02 )*Y+4.31180523260239E-01 + roots2 = ((((((((-3.92833750584041E-10*Y-4.16423229782280E-09)*Y+ + 4.42413039572867E-08 )*Y+6.40574545989551E-07 )*Y- + 3.05512456576552E-06 )*Y-1.05296443527943E-04 )*Y- + 6.14120969315617E-04 )*Y+4.89665802767005E-02 )*Y- + 6.24498381002855E-01 )*Y+3.36412312243724E+00 + F2 = ((((((((((-2.36788772599074E-11*Y+2.89147476459092E-10 )*Y- + 3.18111322308846E-09 )*Y+3.25336816562485E-08 )*Y- + 3.00873821471489E-07 )*Y+2.48749160874431E-06 )*Y- + 1.81353179793672E-05 )*Y+1.14504948737066E-04 )*Y- + 6.10614987696677E-04 )*Y+2.64584212770942E-03 )*Y- + 8.66415899015349E-03 )*Y+1.75257821619922E-02 + E = np.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 10.0: + E = np.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X - + 3.1501078774085E-06)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + Y = X-7.5E+00 + roots0 = ((((((((((( 5.74429401360115E-16*Y+7.11884203790984E-16)*Y- + 6.736701449826E-14)*Y-6.264613873998E-13)*Y+ + 1.315418927040E-11)*Y-4.23879635610964E-11 )*Y+ + 1.39032379769474E-09 )*Y-4.65449552856856E-08 )*Y+ + 7.34609900170759E-07 )*Y-1.08656008854077E-05 )*Y+ + 1.77930381549953E-04 )*Y-2.39864911618015E-03 )*Y+2.39112249488821E-02 + roots1 = ((((((((((( 1.13464096209120E-14*Y+6.99375313934242E-15)*Y- + 8.595618132088E-13)*Y-5.293620408757E-12)*Y- + 2.492175211635E-11)*Y+2.73681574882729E-09 )*Y- + 1.06656985608482E-08 )*Y-4.40252529648056E-07 )*Y+ + 9.68100917793911E-06 )*Y-1.68211091755327E-04 )*Y+ + 2.69443611274173E-03 )*Y-3.23845035189063E-02 )*Y+2.75969447451882E-01 + roots2 = (((((((((((( 6.66339416996191E-15*Y+1.84955640200794E-13)*Y- + 1.985141104444E-12)*Y-2.309293727603E-11)*Y+ + 3.917984522103E-10)*Y+1.663165279876E-09)*Y- + 6.205591993923E-08)*Y+8.769581622041E-09)*Y+ + 8.97224398620038E-06 )*Y-3.14232666170796E-05 )*Y- + 1.83917335649633E-03 )*Y+3.51246831672571E-02 )*Y- + 3.22335051270860E-01 )*Y+1.73582831755430E+00 + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 15.0: + E = np.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + Y = X-12.5E+00 + roots0 = ((((((((((( 4.42133001283090E-16*Y-2.77189767070441E-15)*Y- + 4.084026087887E-14)*Y+5.379885121517E-13)*Y+ + 1.882093066702E-12)*Y-8.67286219861085E-11 )*Y+ + 7.11372337079797E-10 )*Y-3.55578027040563E-09 )*Y+ + 1.29454702851936E-07 )*Y-4.14222202791434E-06 )*Y+ + 8.04427643593792E-05 )*Y-1.18587782909876E-03 )*Y+1.53435577063174E-02 + roots1 = ((((((((((( 6.85146742119357E-15*Y-1.08257654410279E-14)*Y- + 8.579165965128E-13)*Y+6.642452485783E-12)*Y+ + 4.798806828724E-11)*Y-1.13413908163831E-09 )*Y+ + 7.08558457182751E-09 )*Y-5.59678576054633E-08 )*Y+ + 2.51020389884249E-06 )*Y-6.63678914608681E-05 )*Y+ + 1.11888323089714E-03 )*Y-1.45361636398178E-02 )*Y+1.65077877454402E-01 + roots2 = (((((((((((( 3.20622388697743E-15*Y-2.73458804864628E-14)*Y- + 3.157134329361E-13)*Y+8.654129268056E-12)*Y- + 5.625235879301E-11)*Y-7.718080513708E-10)*Y+ + 2.064664199164E-08)*Y-1.567725007761E-07)*Y- + 1.57938204115055E-06 )*Y+6.27436306915967E-05 )*Y- + 1.01308723606946E-03 )*Y+1.13901881430697E-02 )*Y- + 1.01449652899450E-01 )*Y+7.77203937334739E-01 + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 33.0: + E = np.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + if X < 20: + roots0 = ((((((-2.43270989903742E-06*X+3.57901398988359E-04)*X - + 2.34112415981143E-02)*X+7.81425144913975E-01)*X - + 1.73209218219175E+01)*X+2.43517435690398E+02)*X + + (-1.97611541576986E+04/X+9.82441363463929E+03)/X - + 2.07970687843258E+03)*E + R13/(X-R13) + roots1 = (((((-2.62627010965435E-04*X+3.49187925428138E-02)*X - + 3.09337618731880E+00)*X+1.07037141010778E+02)*X - + 2.36659637247087E+03)*X + + ((-2.91669113681020E+06/X + + 1.41129505262758E+06)/X-2.91532335433779E+05)/X + + 3.35202872835409E+04)*E + R23/(X-R23) + roots2 = ((((( 9.31856404738601E-05*X-2.87029400759565E-02)*X - + 7.83503697918455E-01)*X-1.84338896480695E+01)*X + + 4.04996712650414E+02)*X + + (-1.89829509315154E+05/X + + 5.11498390849158E+04)/X-6.88145821789955E+03)*E + R33/(X-R33) + else: + roots0 = ((((-4.97561537069643E-04*X-5.00929599665316E-02)*X + + 1.31099142238996E+00)*X-1.88336409225481E+01)*X - + 6.60344754467191E+02 /X+1.64931462413877E+02)*E + R13/(X-R13) + roots1 = ((((-4.48218898474906E-03*X-5.17373211334924E-01)*X + + 1.13691058739678E+01)*X-1.65426392885291E+02)*X - + 6.30909125686731E+03 /X+1.52231757709236E+03)*E + R23/(X-R23) + roots2 = ((((-1.38368602394293E-02*X-1.77293428863008E+00)*X + + 1.73639054044562E+01)*X-3.57615122086961E+02)*X - + 1.45734701095912E+04 /X+2.69831813951849E+03)*E + R33/(X-R33) + + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + else :# X > 33 + weights0 = np.sqrt(PIE4/X) + if X < 47: + E = np.exp(-X) + roots0 = ((-7.39058467995275E+00*X+3.21318352526305E+02)*X - + 3.99433696473658E+03)*E + R13/(X-R13) + roots1 = ((-7.38726243906513E+01*X+3.13569966333873E+03)*X - + 3.86862867311321E+04)*E + R23/(X-R23) + roots2 = ((-2.63750565461336E+02*X+1.04412168692352E+04)*X - + 1.28094577915394E+05)*E + R33/(X-R33) + weights2 = ((( 1.52258947224714E-01*X-8.30661900042651E+00)*X + + 1.92977367967984E+02)*X-1.67787926005344E+03)*E + W33*weights0 + weights1 = (( 6.15072615497811E+01*X-2.91980647450269E+03)*X + + 3.80794303087338E+04)*E + W23*weights0 + weights0 = weights0-weights1-weights2 + else: + roots0 = R13/(X-R13) + roots1 = R23/(X-R23) + roots2 = R33/(X-R33) + weights1 = W23*weights0 + weights2 = W33*weights0 + weights0 = weights0-weights1-weights2 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + + return roots, weights#[roots1,roots2,roots[3]],[weights1,weights2,weights[3]] + +def Root4Numba1(X,n,roots, weights): + # roots = np.zeros((n)) + # weights = np.zeros((n)) + R14,PIE4 = 1.45303521503316E-01, 7.85398163397448E-01 + R24,W24 = 1.33909728812636E+00, 2.34479815323517E-01 + R34,W34 = 3.92696350135829E+00, 1.92704402415764E-02 + R44,W44 = 8.58863568901199E+00, 2.25229076750736E-04 + + if X <= 3.0E-7: + roots0 = 3.48198973061471E-02 -4.09645850660395E-03 *X + roots1 = 3.81567185080042E-01 -4.48902570656719E-02 *X + roots2 = 1.73730726945891E+00 -2.04389090547327E-01 *X + roots3 = 1.18463056481549E+01 -1.39368301742312E+00 *X + weights0 = 3.62683783378362E-01 -3.13844305713928E-02 *X + weights1 = 3.13706645877886E-01 -8.98046242557724E-02 *X + weights2 = 2.22381034453372E-01 -1.29314370958973E-01 *X + weights3 = 1.01228536290376E-01 -8.28299075414321E-02 *X + elif X <= 1.0: + roots0 = ((((((-1.95309614628539E-10*X+5.19765728707592E-09)*X- + 1.01756452250573E-07 )*X+1.72365935872131E-06 )*X- + 2.61203523522184E-05 )*X+3.52921308769880E-04 )*X- + 4.09645850658433E-03 )*X+3.48198973061469E-02 + roots1 = (((((-1.89554881382342E-08*X+3.07583114342365E-07)*X+ + 1.270981734393E-06)*X-1.417298563884E-04)*X+ + 3.226979163176E-03)*X-4.48902570678178E-02 )*X+3.81567185080039E-01 + roots2 = (((((( 1.77280535300416E-09*X+3.36524958870615E-08)*X- + 2.58341529013893E-07 )*X-1.13644895662320E-05 )*X- + 7.91549618884063E-05 )*X+1.03825827346828E-02 )*X- + 2.04389090525137E-01 )*X+1.73730726945889E+00 + roots3 = (((((-5.61188882415248E-08*X-2.49480733072460E-07)*X+ + 3.428685057114E-06)*X+1.679007454539E-04)*X+ + 4.722855585715E-02)*X-1.39368301737828E+00 )*X+1.18463056481543E+01 + weights0 = ((((((-1.14649303201279E-08*X+1.88015570196787E-07)*X- + 2.33305875372323E-06 )*X+2.68880044371597E-05 )*X- + 2.94268428977387E-04 )*X+3.06548909776613E-03 )*X- + 3.13844305680096E-02 )*X+3.62683783378335E-01 + weights1 = ((((((((-4.11720483772634E-09*X+6.54963481852134E-08)*X- + 7.20045285129626E-07 )*X+6.93779646721723E-06 )*X- + 6.05367572016373E-05 )*X+4.74241566251899E-04 )*X- + 3.26956188125316E-03 )*X+1.91883866626681E-02 )*X- + 8.98046242565811E-02 )*X+3.13706645877886E-01 + weights2 = ((((((((-3.41688436990215E-08*X+5.07238960340773E-07)*X- + 5.01675628408220E-06 )*X+4.20363420922845E-05 )*X- + 3.08040221166823E-04 )*X+1.94431864731239E-03 )*X- + 1.02477820460278E-02 )*X+4.28670143840073E-02 )*X- + 1.29314370962569E-01 )*X+2.22381034453369E-01 + weights3 = ((((((((( 4.99660550769508E-09*X-7.94585963310120E-08)*X+ + 8.359072409485E-07)*X-7.422369210610E-06)*X+ + 5.763374308160E-05)*X-3.86645606718233E-04 )*X+ + 2.18417516259781E-03 )*X-9.99791027771119E-03 )*X+ + 3.48791097377370E-02 )*X-8.28299075413889E-02 )*X+1.01228536290376E-01 + elif X <= 5.0: + Y = X-3.0E+00 + roots0 = (((((((((-1.48570633747284E-15*Y-1.33273068108777E-13)*Y+ + 4.068543696670E-12)*Y-9.163164161821E-11)*Y+ + 2.046819017845E-09)*Y-4.03076426299031E-08 )*Y+ + 7.29407420660149E-07 )*Y-1.23118059980833E-05 )*Y+ + 1.88796581246938E-04 )*Y-2.53262912046853E-03 )*Y+2.51198234505021E-02 + roots1 = ((((((((( 1.35830583483312E-13*Y-2.29772605964836E-12)*Y- + 3.821500128045E-12)*Y+6.844424214735E-10)*Y- + 1.048063352259E-08)*Y+1.50083186233363E-08 )*Y+ + 3.48848942324454E-06 )*Y-1.08694174399193E-04 )*Y+ + 2.08048885251999E-03 )*Y-2.91205805373793E-02 )*Y+2.72276489515713E-01 + roots2 = ((((((((( 5.02799392850289E-13*Y+1.07461812944084E-11)*Y- + 1.482277886411E-10)*Y-2.153585661215E-09)*Y+ + 3.654087802817E-08)*Y+5.15929575830120E-07 )*Y- + 9.52388379435709E-06 )*Y-2.16552440036426E-04 )*Y+ + 9.03551469568320E-03 )*Y-1.45505469175613E-01 )*Y+1.21449092319186E+00 + roots3 = (((((((((-1.08510370291979E-12*Y+6.41492397277798E-11)*Y+ + 7.542387436125E-10)*Y-2.213111836647E-09)*Y- + 1.448228963549E-07)*Y-1.95670833237101E-06 )*Y- + 1.07481314670844E-05 )*Y+1.49335941252765E-04 )*Y+ + 4.87791531990593E-02 )*Y-1.10559909038653E+00 )*Y+8.09502028611780E+00 + weights0 = ((((((((((-4.65801912689961E-14*Y+7.58669507106800E-13)*Y- + 1.186387548048E-11)*Y+1.862334710665E-10)*Y- + 2.799399389539E-09)*Y+4.148972684255E-08)*Y- + 5.933568079600E-07)*Y+8.168349266115E-06)*Y- + 1.08989176177409E-04 )*Y+1.41357961729531E-03 )*Y- + 1.87588361833659E-02 )*Y+2.89898651436026E-01 + weights1 = ((((((((((((-1.46345073267549E-14*Y+2.25644205432182E-13)*Y- + 3.116258693847E-12)*Y+4.321908756610E-11)*Y- + 5.673270062669E-10)*Y+7.006295962960E-09)*Y- + 8.120186517000E-08)*Y+8.775294645770E-07)*Y- + 8.77829235749024E-06 )*Y+8.04372147732379E-05 )*Y- + 6.64149238804153E-04 )*Y+4.81181506827225E-03 )*Y- + 2.88982669486183E-02 )*Y+1.56247249979288E-01 + weights2 = ((((((((((((( 9.06812118895365E-15*Y-1.40541322766087E-13)* + Y+1.919270015269E-12)*Y-2.605135739010E-11)*Y+ + 3.299685839012E-10)*Y-3.86354139348735E-09 )*Y+ + 4.16265847927498E-08 )*Y-4.09462835471470E-07 )*Y+ + 3.64018881086111E-06 )*Y-2.88665153269386E-05 )*Y+ + 2.00515819789028E-04 )*Y-1.18791896897934E-03 )*Y+ + 5.75223633388589E-03 )*Y-2.09400418772687E-02 )*Y+4.85368861938873E-02 + weights3 = ((((((((((((((-9.74835552342257E-16*Y+1.57857099317175E-14)* + Y-2.249993780112E-13)*Y+3.173422008953E-12)*Y- + 4.161159459680E-11)*Y+5.021343560166E-10)*Y- + 5.545047534808E-09)*Y+5.554146993491E-08)*Y- + 4.99048696190133E-07 )*Y+3.96650392371311E-06 )*Y- + 2.73816413291214E-05 )*Y+1.60106988333186E-04 )*Y- + 7.64560567879592E-04 )*Y+2.81330044426892E-03 )*Y- + 7.16227030134947E-03 )*Y+9.66077262223353E-03 + elif X <= 10.0: + Y = X-7.5E+00 + roots0 = ((((((((( 4.64217329776215E-15*Y-6.27892383644164E-15)*Y+ + 3.462236347446E-13)*Y-2.927229355350E-11)*Y+ + 5.090355371676E-10)*Y-9.97272656345253E-09 )*Y+ + 2.37835295639281E-07 )*Y-4.60301761310921E-06 )*Y+ + 8.42824204233222E-05 )*Y-1.37983082233081E-03 )*Y+1.66630865869375E-02 + roots1 = ((((((((( 2.93981127919047E-14*Y+8.47635639065744E-13)*Y- + 1.446314544774E-11)*Y-6.149155555753E-12)*Y+ + 8.484275604612E-10)*Y-6.10898827887652E-08 )*Y+ + 2.39156093611106E-06 )*Y-5.35837089462592E-05 )*Y+ + 1.00967602595557E-03 )*Y-1.57769317127372E-02 )*Y+1.74853819464285E-01 + roots2 = (((((((((( 2.93523563363000E-14*Y-6.40041776667020E-14)*Y- + 2.695740446312E-12)*Y+1.027082960169E-10)*Y- + 5.822038656780E-10)*Y-3.159991002539E-08)*Y+ + 4.327249251331E-07)*Y+4.856768455119E-06)*Y- + 2.54617989427762E-04 )*Y+5.54843378106589E-03 )*Y- + 7.95013029486684E-02 )*Y+7.20206142703162E-01 + roots3 = (((((((((((-1.62212382394553E-14*Y+7.68943641360593E-13)*Y+ + 5.764015756615E-12)*Y-1.380635298784E-10)*Y- + 1.476849808675E-09)*Y+1.84347052385605E-08 )*Y+ + 3.34382940759405E-07 )*Y-1.39428366421645E-06 )*Y- + 7.50249313713996E-05 )*Y-6.26495899187507E-04 )*Y+ + 4.69716410901162E-02 )*Y-6.66871297428209E-01 )*Y+4.11207530217806E+00 + weights0 = ((((((((((-1.65995045235997E-15*Y+6.91838935879598E-14)*Y- + 9.131223418888E-13)*Y+1.403341829454E-11)*Y- + 3.672235069444E-10)*Y+6.366962546990E-09)*Y- + 1.039220021671E-07)*Y+1.959098751715E-06)*Y- + 3.33474893152939E-05 )*Y+5.72164211151013E-04 )*Y- + 1.05583210553392E-02 )*Y+2.26696066029591E-01 + weights1 = ((((((((((((-3.57248951192047E-16*Y+6.25708409149331E-15)*Y- + 9.657033089714E-14)*Y+1.507864898748E-12)*Y- + 2.332522256110E-11)*Y+3.428545616603E-10)*Y- + 4.698730937661E-09)*Y+6.219977635130E-08)*Y- + 7.83008889613661E-07 )*Y+9.08621687041567E-06 )*Y- + 9.86368311253873E-05 )*Y+9.69632496710088E-04 )*Y- + 8.14594214284187E-03 )*Y+8.50218447733457E-02 + weights2 = ((((((((((((( 1.64742458534277E-16*Y-2.68512265928410E-15)* + Y+3.788890667676E-14)*Y-5.508918529823E-13)*Y+ + 7.555896810069E-12)*Y-9.69039768312637E-11 )*Y+ + 1.16034263529672E-09 )*Y-1.28771698573873E-08 )*Y+ + 1.31949431805798E-07 )*Y-1.23673915616005E-06 )*Y+ + 1.04189803544936E-05 )*Y-7.79566003744742E-05 )*Y+ + 5.03162624754434E-04 )*Y-2.55138844587555E-03 )*Y+1.13250730954014E-02 + weights3 = ((((((((((((((-1.55714130075679E-17*Y+2.57193722698891E-16)* + Y-3.626606654097E-15)*Y+5.234734676175E-14)*Y- + 7.067105402134E-13)*Y+8.793512664890E-12)*Y- + 1.006088923498E-10)*Y+1.050565098393E-09)*Y- + 9.91517881772662E-09 )*Y+8.35835975882941E-08 )*Y- + 6.19785782240693E-07 )*Y+3.95841149373135E-06 )*Y- + 2.11366761402403E-05 )*Y+9.00474771229507E-05 )*Y- + 2.78777909813289E-04 )*Y+5.26543779837487E-04 + elif X <= 15.0: + Y = X-12.5E+00 + roots0 = ((((((((((( 4.94869622744119E-17*Y+8.03568805739160E-16)*Y- + 5.599125915431E-15)*Y-1.378685560217E-13)*Y+ + 7.006511663249E-13)*Y+1.30391406991118E-11 )*Y+ + 8.06987313467541E-11 )*Y-5.20644072732933E-09 )*Y+ + 7.72794187755457E-08 )*Y-1.61512612564194E-06 )*Y+ + 4.15083811185831E-05 )*Y-7.87855975560199E-04 )*Y+1.14189319050009E-02 + roots1 = ((((((((((( 4.89224285522336E-16*Y+1.06390248099712E-14)*Y- + 5.446260182933E-14)*Y-1.613630106295E-12)*Y+ + 3.910179118937E-12)*Y+1.90712434258806E-10 )*Y+ + 8.78470199094761E-10 )*Y-5.97332993206797E-08 )*Y+ + 9.25750831481589E-07 )*Y-2.02362185197088E-05 )*Y+ + 4.92341968336776E-04 )*Y-8.68438439874703E-03 )*Y+1.15825965127958E-01 + roots2 = (((((((((( 6.12419396208408E-14*Y+1.12328861406073E-13)*Y- + 9.051094103059E-12)*Y-4.781797525341E-11)*Y+ + 1.660828868694E-09)*Y+4.499058798868E-10)*Y- + 2.519549641933E-07)*Y+4.977444040180E-06)*Y- + 1.25858350034589E-04 )*Y+2.70279176970044E-03 )*Y- + 3.99327850801083E-02 )*Y+4.33467200855434E-01 + roots3 = ((((((((((( 4.63414725924048E-14*Y-4.72757262693062E-14)*Y- + 1.001926833832E-11)*Y+6.074107718414E-11)*Y+ + 1.576976911942E-09)*Y-2.01186401974027E-08 )*Y- + 1.84530195217118E-07 )*Y+5.02333087806827E-06 )*Y+ + 9.66961790843006E-06 )*Y-1.58522208889528E-03 )*Y+ + 2.80539673938339E-02 )*Y-2.78953904330072E-01 )*Y+1.82835655238235E+00 + weights3 = ((((((((((((( 2.90401781000996E-18*Y-4.63389683098251E-17)* + Y+6.274018198326E-16)*Y-8.936002188168E-15)*Y+ + 1.194719074934E-13)*Y-1.45501321259466E-12 )*Y+ + 1.64090830181013E-11 )*Y-1.71987745310181E-10 )*Y+ + 1.63738403295718E-09 )*Y-1.39237504892842E-08 )*Y+ + 1.06527318142151E-07 )*Y-7.27634957230524E-07 )*Y+ + 4.12159381310339E-06 )*Y-1.74648169719173E-05 )*Y+8.50290130067818E-05 + weights2 = ((((((((((((-4.19569145459480E-17*Y+5.94344180261644E-16)*Y- + 1.148797566469E-14)*Y+1.881303962576E-13)*Y- + 2.413554618391E-12)*Y+3.372127423047E-11)*Y- + 4.933988617784E-10)*Y+6.116545396281E-09)*Y- + 6.69965691739299E-08 )*Y+7.52380085447161E-07 )*Y- + 8.08708393262321E-06 )*Y+6.88603417296672E-05 )*Y- + 4.67067112993427E-04 )*Y+5.42313365864597E-03 + weights1 = ((((((((((-6.22272689880615E-15*Y+1.04126809657554E-13)*Y- + 6.842418230913E-13)*Y+1.576841731919E-11)*Y- + 4.203948834175E-10)*Y+6.287255934781E-09)*Y- + 8.307159819228E-08)*Y+1.356478091922E-06)*Y- + 2.08065576105639E-05 )*Y+2.52396730332340E-04 )*Y- + 2.94484050194539E-03 )*Y+6.01396183129168E-02 + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*np.exp(-X) +np.sqrt(PIE4/X)-weights3-weights2-weights1 + elif X <= 20.0: + weights0 = np.sqrt(PIE4/X) + Y = X-17.5E+00 + roots0 = ((((((((((( 4.36701759531398E-17*Y-1.12860600219889E-16)*Y- + 6.149849164164E-15)*Y+5.820231579541E-14)*Y+ + 4.396602872143E-13)*Y-1.24330365320172E-11 )*Y+ + 6.71083474044549E-11 )*Y+2.43865205376067E-10 )*Y+ + 1.67559587099969E-08 )*Y-9.32738632357572E-07 )*Y+ + 2.39030487004977E-05 )*Y-4.68648206591515E-04 )*Y+8.34977776583956E-03 + roots1 = ((((((((((( 4.98913142288158E-16*Y-2.60732537093612E-16)*Y- + 7.775156445127E-14)*Y+5.766105220086E-13)*Y+ + 6.432696729600E-12)*Y-1.39571683725792E-10 )*Y+ + 5.95451479522191E-10 )*Y+2.42471442836205E-09 )*Y+ + 2.47485710143120E-07 )*Y-1.14710398652091E-05 )*Y+ + 2.71252453754519E-04 )*Y-4.96812745851408E-03 )*Y+8.26020602026780E-02 + roots2 = ((((((((((( 1.91498302509009E-15*Y+1.48840394311115E-14)*Y- + 4.316925145767E-13)*Y+1.186495793471E-12)*Y+ + 4.615806713055E-11)*Y-5.54336148667141E-10 )*Y+ + 3.48789978951367E-10 )*Y-2.79188977451042E-09 )*Y+ + 2.09563208958551E-06 )*Y-6.76512715080324E-05 )*Y+ + 1.32129867629062E-03 )*Y-2.05062147771513E-02 )*Y+2.88068671894324E-01 + roots3 = (((((((((((-5.43697691672942E-15*Y-1.12483395714468E-13)*Y+ + 2.826607936174E-12)*Y-1.266734493280E-11)*Y- + 4.258722866437E-10)*Y+9.45486578503261E-09 )*Y- + 5.86635622821309E-08 )*Y-1.28835028104639E-06 )*Y+ + 4.41413815691885E-05 )*Y-7.61738385590776E-04 )*Y+ + 9.66090902985550E-03 )*Y-1.01410568057649E-01 )*Y+9.54714798156712E-01 + weights3 = ((((((((((((-7.56882223582704E-19*Y+7.53541779268175E-18)*Y- + 1.157318032236E-16)*Y+2.411195002314E-15)*Y- + 3.601794386996E-14)*Y+4.082150659615E-13)*Y- + 4.289542980767E-12)*Y+5.086829642731E-11)*Y- + 6.35435561050807E-10 )*Y+6.82309323251123E-09 )*Y- + 5.63374555753167E-08 )*Y+3.57005361100431E-07 )*Y- + 2.40050045173721E-06 )*Y+4.94171300536397E-05 + weights2 = (((((((((((-5.54451040921657E-17*Y+2.68748367250999E-16)*Y+ + 1.349020069254E-14)*Y-2.507452792892E-13)*Y+ + 1.944339743818E-12)*Y-1.29816917658823E-11 )*Y+ + 3.49977768819641E-10 )*Y-8.67270669346398E-09 )*Y+ + 1.31381116840118E-07 )*Y-1.36790720600822E-06 )*Y+ + 1.19210697673160E-05 )*Y-1.42181943986587E-04 )*Y+4.12615396191829E-03 + weights1 = (((((((((((-1.86506057729700E-16*Y+1.16661114435809E-15)*Y+ + 2.563712856363E-14)*Y-4.498350984631E-13)*Y+ + 1.765194089338E-12)*Y+9.04483676345625E-12 )*Y+ + 4.98930345609785E-10 )*Y-2.11964170928181E-08 )*Y+ + 3.98295476005614E-07 )*Y-5.49390160829409E-06 )*Y+ + 7.74065155353262E-05 )*Y-1.48201933009105E-03 )*Y+4.97836392625268E-02 + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*np.exp(-X)+weights0-weights1-weights2-weights3 + elif X <= 35.0: + weights0 = np.sqrt(PIE4/X) + E = np.exp(-X) + roots0 = ((((((-4.45711399441838E-05*X+1.27267770241379E-03)*X - + 2.36954961381262E-01)*X+1.54330657903756E+01)*X - + 5.22799159267808E+02)*X+1.05951216669313E+04)*X + + (-2.51177235556236E+06/X+8.72975373557709E+05)/X - + 1.29194382386499E+05)*E + R14/(X-R14) + roots1 = (((((-7.85617372254488E-02*X+6.35653573484868E+00)*X - + 3.38296938763990E+02)*X+1.25120495802096E+04)*X - + 3.16847570511637E+05)*X + + ((-1.02427466127427E+09/X + + 3.70104713293016E+08)/X-5.87119005093822E+07)/X + + 5.38614211391604E+06)*E + R24/(X-R24) + roots2 = (((((-2.37900485051067E-01*X+1.84122184400896E+01)*X - + 1.00200731304146E+03)*X+3.75151841595736E+04)*X - + 9.50626663390130E+05)*X + + ((-2.88139014651985E+09/X + + 1.06625915044526E+09)/X-1.72465289687396E+08)/X + + 1.60419390230055E+07)*E + R34/(X-R34) + roots3 = ((((((-6.00691586407385E-04*X-3.64479545338439E-01)*X + + 1.57496131755179E+01)*X-6.54944248734901E+02)*X + + 1.70830039597097E+04)*X-2.90517939780207E+05)*X + + (3.49059698304732E+07/X-1.64944522586065E+07)/X + + 2.96817940164703E+06)*E + R44/(X-R44) + if X <= 25.0: + weights3 = ((((((( 2.33766206773151E-07*X- + 3.81542906607063E-05)*X +3.51416601267000E-03)*X- + 1.66538571864728E-01)*X +4.80006136831847E+00)*X- + 8.73165934223603E+01)*X +9.77683627474638E+02)*X + + 1.66000945117640E+04/X -6.14479071209961E+03)*E + W44*weights0 + else: + weights3 = (((((( 5.74245945342286E-06*X- + 7.58735928102351E-05)*X +2.35072857922892E-04)*X- + 3.78812134013125E-03)*X +3.09871652785805E-01)*X- + 7.11108633061306E+00)*X +5.55297573149528E+01)*E + W44*weights0 + + weights2 = (((((( 2.36392855180768E-04*X-9.16785337967013E-03)*X + + 4.62186525041313E-01)*X-1.96943786006540E+01)*X + + 4.99169195295559E+02)*X-6.21419845845090E+03)*X + + ((+5.21445053212414E+07/X-1.34113464389309E+07)/X + + 1.13673298305631E+06)/X-2.81501182042707E+03)*E + W34*weights0 + weights1 = (((((( 7.29841848989391E-04*X-3.53899555749875E-02)*X + + 2.07797425718513E+00)*X-1.00464709786287E+02)*X + + 3.15206108877819E+03)*X-6.27054715090012E+04)*X + + (+1.54721246264919E+07/X-5.26074391316381E+06)/X + + 7.67135400969617E+05)*E + W24*weights0 + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + weights0-weights1-weights2-weights3 + elif X <= 53.0: + weights0 = np.sqrt(PIE4/X) + E = np.exp(-X)*(X*X)**2 + roots3 = ((-2.19135070169653E-03*X-1.19108256987623E-01)*X - + 7.50238795695573E-01)*E + R44/(X-R44) + roots2 = ((-9.65842534508637E-04*X-4.49822013469279E-02)*X + + 6.08784033347757E-01)*E + R34/(X-R34) + roots1 = ((-3.62569791162153E-04*X-9.09231717268466E-03)*X + + 1.84336760556262E-01)*E + R24/(X-R24) + roots0 = ((-4.07557525914600E-05*X-6.88846864931685E-04)*X + + 1.74725309199384E-02)*E + R14/(X-R14) + weights3 = (( 5.76631982000990E-06*X-7.89187283804890E-05)*X + + 3.28297971853126E-04)*E + W44*weights0 + weights2 = (( 2.08294969857230E-04*X-3.77489954837361E-03)*X + + 2.09857151617436E-02)*E + W34*weights0 + weights1 = (( 6.16374517326469E-04*X-1.26711744680092E-02)*X + + 8.14504890732155E-02)*E + W24*weights0 + weights0 = weights0-weights1-weights2-weights3 + else: + weights0 = np.sqrt(PIE4/X) + roots0 = R14/(X-R14) + roots1 = R24/(X-R24) + roots2 = R34/(X-R34) + roots3 = R44/(X-R44) + weights3 = W44*weights0 + weights2 = W34*weights0 + weights1 = W24*weights0 + weights0 = weights0-weights1-weights2-weights3 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + roots[3] = roots3 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + weights[3] = weights3 + + return roots, weights#[roots1,roots2,roots3,roots[4]],[weights1,weights2,weights3,weights[4]] + +def Root5Numba1(X,n, roots, weights): + # roots = np.zeros((n)) + # weights = np.zeros((n)) + R15,PIE4 = 1.17581320211778E-01, 7.85398163397448E-01 + R25,W25 = 1.07456201243690E+00, 2.70967405960535E-01 + R35,W35 = 3.08593744371754E+00, 3.82231610015404E-02 + R45,W45 = 6.41472973366203E+00, 1.51614186862443E-03 + R55,W55 = 1.18071894899717E+01, 8.62130526143657E-06 + + + if X < 3.0E-7: + roots0 = 2.26659266316985E-02 -2.15865967920897E-03 *X + roots1 = 2.31271692140903E-01 -2.20258754389745E-02 *X + roots2 = 8.57346024118836E-01 -8.16520023025515E-02 *X + roots3 = 2.97353038120346E+00 -2.83193369647137E-01 *X + roots4 = 1.84151859759051E+01 -1.75382723579439E+00 *X + weights0 = 2.95524224714752E-01 -1.96867576909777E-02 *X + weights1 = 2.69266719309995E-01 -5.61737590184721E-02 *X + weights2 = 2.19086362515981E-01 -9.71152726793658E-02 *X + weights3 = 1.49451349150580E-01 -1.02979262193565E-01 *X + weights4 = 6.66713443086877E-02 -5.73782817488315E-02 *X + elif X < 1.0: + roots0 = ((((((-4.46679165328413E-11*X+1.21879111988031E-09)*X- + 2.62975022612104E-08 )*X+5.15106194905897E-07 )*X- + 9.27933625824749E-06 )*X+1.51794097682482E-04 )*X- + 2.15865967920301E-03 )*X+2.26659266316985E-02 + roots1 = (((((( 1.93117331714174E-10*X-4.57267589660699E-09)*X+ + 2.48339908218932E-08 )*X+1.50716729438474E-06 )*X- + 6.07268757707381E-05 )*X+1.37506939145643E-03 )*X- + 2.20258754419939E-02 )*X+2.31271692140905E-01 + roots2 = ((((( 4.84989776180094E-09*X+1.31538893944284E-07)*X- + 2.766753852879E-06)*X-7.651163510626E-05)*X+ + 4.033058545972E-03)*X-8.16520022916145E-02 )*X+8.57346024118779E-01 + roots3 = ((((-2.48581772214623E-07*X-4.34482635782585E-06)*X- + 7.46018257987630E-07 )*X+1.01210776517279E-02 )*X- + 2.83193369640005E-01 )*X+2.97353038120345E+00 + roots4 = (((((-8.92432153868554E-09*X+1.77288899268988E-08)*X+ + 3.040754680666E-06)*X+1.058229325071E-04)*X+ + 4.596379534985E-02)*X-1.75382723579114E+00 )*X+1.84151859759049E+01 + weights0 = ((((((-2.03822632771791E-09*X+3.89110229133810E-08)*X- + 5.84914787904823E-07 )*X+8.30316168666696E-06 )*X- + 1.13218402310546E-04 )*X+1.49128888586790E-03 )*X- + 1.96867576904816E-02 )*X+2.95524224714749E-01 + weights1 = ((((((( 8.62848118397570E-09*X-1.38975551148989E-07)*X+ + 1.602894068228E-06)*X-1.646364300836E-05)*X+ + 1.538445806778E-04)*X-1.28848868034502E-03 )*X+ + 9.38866933338584E-03 )*X-5.61737590178812E-02 )*X+2.69266719309991E-01 + weights2 = ((((((((-9.41953204205665E-09*X+1.47452251067755E-07)*X- + 1.57456991199322E-06 )*X+1.45098401798393E-05 )*X- + 1.18858834181513E-04 )*X+8.53697675984210E-04 )*X- + 5.22877807397165E-03 )*X+2.60854524809786E-02 )*X- + 9.71152726809059E-02 )*X+2.19086362515979E-01 + weights3 = ((((((((-3.84961617022042E-08*X+5.66595396544470E-07)*X- + 5.52351805403748E-06 )*X+4.53160377546073E-05 )*X- + 3.22542784865557E-04 )*X+1.95682017370967E-03 )*X- + 9.77232537679229E-03 )*X+3.79455945268632E-02 )*X- + 1.02979262192227E-01 )*X+1.49451349150573E-01 + weights4 = ((((((((( 4.09594812521430E-09*X-6.47097874264417E-08)*X+ + 6.743541482689E-07)*X-5.917993920224E-06)*X+ + 4.531969237381E-05)*X-2.99102856679638E-04 )*X+ + 1.65695765202643E-03 )*X-7.40671222520653E-03 )*X+ + 2.50889946832192E-02 )*X-5.73782817487958E-02 )*X+6.66713443086877E-02 + elif X < 5.0: + Y = X-3.0E+00 + roots0 = ((((((((-2.58163897135138E-14*Y+8.14127461488273E-13)*Y- + 2.11414838976129E-11 )*Y+5.09822003260014E-10 )*Y- + 1.16002134438663E-08 )*Y+2.46810694414540E-07 )*Y- + 4.92556826124502E-06 )*Y+9.02580687971053E-05 )*Y- + 1.45190025120726E-03 )*Y+1.73416786387475E-02 + roots1 = ((((((((( 1.04525287289788E-14*Y+5.44611782010773E-14)*Y- + 4.831059411392E-12)*Y+1.136643908832E-10)*Y- + 1.104373076913E-09)*Y-2.35346740649916E-08 )*Y+ + 1.43772622028764E-06 )*Y-4.23405023015273E-05 )*Y+ + 9.12034574793379E-04 )*Y-1.52479441718739E-02 )*Y+1.76055265928744E-01 + roots2 = (((((((((-6.89693150857911E-14*Y+5.92064260918861E-13)*Y+ + 1.847170956043E-11)*Y-3.390752744265E-10)*Y- + 2.995532064116E-09)*Y+1.57456141058535E-07 )*Y- + 3.95859409711346E-07 )*Y-9.58924580919747E-05 )*Y+ + 3.23551502557785E-03 )*Y-5.97587007636479E-02 )*Y+6.46432853383057E-01 + roots3 = ((((((((-3.61293809667763E-12*Y-2.70803518291085E-11)*Y+ + 8.83758848468769E-10 )*Y+1.59166632851267E-08 )*Y- + 1.32581997983422E-07 )*Y-7.60223407443995E-06 )*Y- + 7.41019244900952E-05 )*Y+9.81432631743423E-03 )*Y- + 2.23055570487771E-01 )*Y+2.21460798080643E+00 + roots4 = ((((((((( 7.12332088345321E-13*Y+3.16578501501894E-12)*Y- + 8.776668218053E-11)*Y-2.342817613343E-09)*Y- + 3.496962018025E-08)*Y-3.03172870136802E-07 )*Y+ + 1.50511293969805E-06 )*Y+1.37704919387696E-04 )*Y+ + 4.70723869619745E-02 )*Y-1.47486623003693E+00 )*Y+1.35704792175847E+01 + weights0 = ((((((((( 1.04348658616398E-13*Y-1.94147461891055E-12)*Y+ + 3.485512360993E-11)*Y-6.277497362235E-10)*Y+ + 1.100758247388E-08)*Y-1.88329804969573E-07 )*Y+ + 3.12338120839468E-06 )*Y-5.04404167403568E-05 )*Y+ + 8.00338056610995E-04 )*Y-1.30892406559521E-02 )*Y+2.47383140241103E-01 + weights1 = ((((((((((( 3.23496149760478E-14*Y-5.24314473469311E-13)*Y+ + 7.743219385056E-12)*Y-1.146022750992E-10)*Y+ + 1.615238462197E-09)*Y-2.15479017572233E-08 )*Y+ + 2.70933462557631E-07 )*Y-3.18750295288531E-06 )*Y+ + 3.47425221210099E-05 )*Y-3.45558237388223E-04 )*Y+ + 3.05779768191621E-03 )*Y-2.29118251223003E-02 )*Y+1.59834227924213E-01 + weights2 = ((((((((((((-3.42790561802876E-14*Y+5.26475736681542E-13)*Y- + 7.184330797139E-12)*Y+9.763932908544E-11)*Y- + 1.244014559219E-09)*Y+1.472744068942E-08)*Y- + 1.611749975234E-07)*Y+1.616487851917E-06)*Y- + 1.46852359124154E-05 )*Y+1.18900349101069E-04 )*Y- + 8.37562373221756E-04 )*Y+4.93752683045845E-03 )*Y- + 2.25514728915673E-02 )*Y+6.95211812453929E-02 + weights3 = ((((((((((((( 1.04072340345039E-14*Y-1.60808044529211E-13)* + Y+2.183534866798E-12)*Y-2.939403008391E-11)*Y+ + 3.679254029085E-10)*Y-4.23775673047899E-09 )*Y+ + 4.46559231067006E-08 )*Y-4.26488836563267E-07 )*Y+ + 3.64721335274973E-06 )*Y-2.74868382777722E-05 )*Y+ + 1.78586118867488E-04 )*Y-9.68428981886534E-04 )*Y+ + 4.16002324339929E-03 )*Y-1.28290192663141E-02 )*Y+2.22353727685016E-02 + weights4 = ((((((((((((((-8.16770412525963E-16*Y+1.31376515047977E-14)* + Y-1.856950818865E-13)*Y+2.596836515749E-12)*Y- + 3.372639523006E-11)*Y+4.025371849467E-10)*Y- + 4.389453269417E-09)*Y+4.332753856271E-08)*Y- + 3.82673275931962E-07 )*Y+2.98006900751543E-06 )*Y- + 2.00718990300052E-05 )*Y+1.13876001386361E-04 )*Y- + 5.23627942443563E-04 )*Y+1.83524565118203E-03 )*Y- + 4.37785737450783E-03 )*Y+5.36963805223095E-03 + elif X < 10.0: + Y = X-7.5E+00 + roots0 = ((((((((-1.13825201010775E-14*Y+1.89737681670375E-13)*Y- + 4.81561201185876E-12 )*Y+1.56666512163407E-10 )*Y- + 3.73782213255083E-09 )*Y+9.15858355075147E-08 )*Y- + 2.13775073585629E-06 )*Y+4.56547356365536E-05 )*Y- + 8.68003909323740E-04 )*Y+1.22703754069176E-02 + roots1 = (((((((((-3.67160504428358E-15*Y+1.27876280158297E-14)*Y- + 1.296476623788E-12)*Y+1.477175434354E-11)*Y+ + 5.464102147892E-10)*Y-2.42538340602723E-08 )*Y+ + 8.20460740637617E-07 )*Y-2.20379304598661E-05 )*Y+ + 4.90295372978785E-04 )*Y-9.14294111576119E-03 )*Y+1.22590403403690E-01 + roots2 = ((((((((( 1.39017367502123E-14*Y-6.96391385426890E-13)*Y+ + 1.176946020731E-12)*Y+1.725627235645E-10)*Y- + 3.686383856300E-09)*Y+2.87495324207095E-08 )*Y+ + 1.71307311000282E-06 )*Y-7.94273603184629E-05 )*Y+ + 2.00938064965897E-03 )*Y-3.63329491677178E-02 )*Y+4.34393683888443E-01 + roots3 = ((((((((((-1.27815158195209E-14*Y+1.99910415869821E-14)*Y+ + 3.753542914426E-12)*Y-2.708018219579E-11)*Y- + 1.190574776587E-09)*Y+1.106696436509E-08)*Y+ + 3.954955671326E-07)*Y-4.398596059588E-06)*Y- + 2.01087998907735E-04 )*Y+7.89092425542937E-03 )*Y- + 1.42056749162695E-01 )*Y+1.39964149420683E+00 + roots4 = ((((((((((-1.19442341030461E-13*Y-2.34074833275956E-12)*Y+ + 6.861649627426E-12)*Y+6.082671496226E-10)*Y+ + 5.381160105420E-09)*Y-6.253297138700E-08)*Y- + 2.135966835050E-06)*Y-2.373394341886E-05)*Y+ + 2.88711171412814E-06 )*Y+4.85221195290753E-02 )*Y- + 1.04346091985269E+00 )*Y+7.89901551676692E+00 + weights0 = ((((((((( 7.95526040108997E-15*Y-2.48593096128045E-13)*Y+ + 4.761246208720E-12)*Y-9.535763686605E-11)*Y+ + 2.225273630974E-09)*Y-4.49796778054865E-08 )*Y+ + 9.17812870287386E-07 )*Y-1.86764236490502E-05 )*Y+ + 3.76807779068053E-04 )*Y-8.10456360143408E-03 )*Y+2.01097936411496E-01 + weights1 = ((((((((((( 1.25678686624734E-15*Y-2.34266248891173E-14)*Y+ + 3.973252415832E-13)*Y-6.830539401049E-12)*Y+ + 1.140771033372E-10)*Y-1.82546185762009E-09 )*Y+ + 2.77209637550134E-08 )*Y-4.01726946190383E-07 )*Y+ + 5.48227244014763E-06 )*Y-6.95676245982121E-05 )*Y+ + 8.05193921815776E-04 )*Y-8.15528438784469E-03 )*Y+9.71769901268114E-02 + weights2 = ((((((((((((-8.20929494859896E-16*Y+1.37356038393016E-14)*Y- + 2.022863065220E-13)*Y+3.058055403795E-12)*Y- + 4.387890955243E-11)*Y+5.923946274445E-10)*Y- + 7.503659964159E-09)*Y+8.851599803902E-08)*Y- + 9.65561998415038E-07 )*Y+9.60884622778092E-06 )*Y- + 8.56551787594404E-05 )*Y+6.66057194311179E-04 )*Y- + 4.17753183902198E-03 )*Y+2.25443826852447E-02 + weights3 = ((((((((((((((-1.08764612488790E-17*Y+1.85299909689937E-16)* + Y-2.730195628655E-15)*Y+4.127368817265E-14)*Y- + 5.881379088074E-13)*Y+7.805245193391E-12)*Y- + 9.632707991704E-11)*Y+1.099047050624E-09)*Y- + 1.15042731790748E-08 )*Y+1.09415155268932E-07 )*Y- + 9.33687124875935E-07 )*Y+7.02338477986218E-06 )*Y- + 4.53759748787756E-05 )*Y+2.41722511389146E-04 )*Y- + 9.75935943447037E-04 )*Y+2.57520532789644E-03 + weights4 = ((((((((((((((( 7.28996979748849E-19*Y-1.26518146195173E-17) + *Y+1.886145834486E-16)*Y-2.876728287383E-15)*Y+ + 4.114588668138E-14)*Y-5.44436631413933E-13 )*Y+ + 6.64976446790959E-12 )*Y-7.44560069974940E-11 )*Y+ + 7.57553198166848E-10 )*Y-6.92956101109829E-09 )*Y+ + 5.62222859033624E-08 )*Y-3.97500114084351E-07 )*Y+ + 2.39039126138140E-06 )*Y-1.18023950002105E-05 )*Y+ + 4.52254031046244E-05 )*Y-1.21113782150370E-04 )*Y+1.75013126731224E-04 + elif X < 15.0: + Y = X-12.5E+00 + roots0 = ((((((((((-4.16387977337393E-17*Y+7.20872997373860E-16)*Y+ + 1.395993802064E-14)*Y+3.660484641252E-14)*Y- + 4.154857548139E-12)*Y+2.301379846544E-11)*Y- + 1.033307012866E-09)*Y+3.997777641049E-08)*Y- + 9.35118186333939E-07 )*Y+2.38589932752937E-05 )*Y- + 5.35185183652937E-04 )*Y+8.85218988709735E-03 + roots1 = ((((((((((-4.56279214732217E-16*Y+6.24941647247927E-15)*Y+ + 1.737896339191E-13)*Y+8.964205979517E-14)*Y- + 3.538906780633E-11)*Y+9.561341254948E-11)*Y- + 9.772831891310E-09)*Y+4.240340194620E-07)*Y- + 1.02384302866534E-05 )*Y+2.57987709704822E-04 )*Y- + 5.54735977651677E-03 )*Y+8.68245143991948E-02 + roots2 = ((((((((((-2.52879337929239E-15*Y+2.13925810087833E-14)*Y+ + 7.884307667104E-13)*Y-9.023398159510E-13)*Y- + 5.814101544957E-11)*Y-1.333480437968E-09)*Y- + 2.217064940373E-08)*Y+1.643290788086E-06)*Y- + 4.39602147345028E-05 )*Y+1.08648982748911E-03 )*Y- + 2.13014521653498E-02 )*Y+2.94150684465425E-01 + roots3 = ((((((((((-6.42391438038888E-15*Y+5.37848223438815E-15)*Y+ + 8.960828117859E-13)*Y+5.214153461337E-11)*Y- + 1.106601744067E-10)*Y-2.007890743962E-08)*Y+ + 1.543764346501E-07)*Y+4.520749076914E-06)*Y- + 1.88893338587047E-04 )*Y+4.73264487389288E-03 )*Y- + 7.91197893350253E-02 )*Y+8.60057928514554E-01 + roots4 = (((((((((((-2.24366166957225E-14*Y+4.87224967526081E-14)*Y+ + 5.587369053655E-12)*Y-3.045253104617E-12)*Y- + 1.223983883080E-09)*Y-2.05603889396319E-09 )*Y+ + 2.58604071603561E-07 )*Y+1.34240904266268E-06 )*Y- + 5.72877569731162E-05 )*Y-9.56275105032191E-04 )*Y+ + 4.23367010370921E-02 )*Y-5.76800927133412E-01 )*Y+3.87328263873381E+00 + weights0 = ((((((((( 8.98007931950169E-15*Y+7.25673623859497E-14)*Y+ + 5.851494250405E-14)*Y-4.234204823846E-11)*Y+ + 3.911507312679E-10)*Y-9.65094802088511E-09 )*Y+ + 3.42197444235714E-07 )*Y-7.51821178144509E-06 )*Y+ + 1.94218051498662E-04 )*Y-5.38533819142287E-03 )*Y+1.68122596736809E-01 + weights1 = ((((((((((-1.05490525395105E-15*Y+1.96855386549388E-14)*Y- + 5.500330153548E-13)*Y+1.003849567976E-11)*Y- + 1.720997242621E-10)*Y+3.533277061402E-09)*Y- + 6.389171736029E-08)*Y+1.046236652393E-06)*Y- + 1.73148206795827E-05 )*Y+2.57820531617185E-04 )*Y- + 3.46188265338350E-03 )*Y+7.03302497508176E-02 + weights2 = ((((((((((( 3.60020423754545E-16*Y-6.24245825017148E-15)*Y+ + 9.945311467434E-14)*Y-1.749051512721E-12)*Y+ + 2.768503957853E-11)*Y-4.08688551136506E-10 )*Y+ + 6.04189063303610E-09 )*Y-8.23540111024147E-08 )*Y+ + 1.01503783870262E-06 )*Y-1.20490761741576E-05 )*Y+ + 1.26928442448148E-04 )*Y-1.05539461930597E-03 )*Y+1.15543698537013E-02 + weights3 = ((((((((((((( 2.51163533058925E-18*Y-4.31723745510697E-17)* + Y+6.557620865832E-16)*Y-1.016528519495E-14)*Y+ + 1.491302084832E-13)*Y-2.06638666222265E-12 )*Y+ + 2.67958697789258E-11 )*Y-3.23322654638336E-10 )*Y+ + 3.63722952167779E-09 )*Y-3.75484943783021E-08 )*Y+ + 3.49164261987184E-07 )*Y-2.92658670674908E-06 )*Y+ + 2.12937256719543E-05 )*Y-1.19434130620929E-04 )*Y+6.45524336158384E-04 + weights4 = ((((((((((((((-1.29043630202811E-19*Y+2.16234952241296E-18)* + Y-3.107631557965E-17)*Y+4.570804313173E-16)*Y- + 6.301348858104E-15)*Y+8.031304476153E-14)*Y- + 9.446196472547E-13)*Y+1.018245804339E-11)*Y- + 9.96995451348129E-11 )*Y+8.77489010276305E-10 )*Y- + 6.84655877575364E-09 )*Y+4.64460857084983E-08 )*Y- + 2.66924538268397E-07 )*Y+1.24621276265907E-06 )*Y- + 4.30868944351523E-06 )*Y+9.94307982432868E-06 + elif X < 20.0: + Y = X-17.5E+00 + roots0 = (((((((((( 1.91875764545740E-16*Y+7.8357401095707E-16)*Y- + 3.260875931644E-14)*Y-1.186752035569E-13)*Y+ + 4.275180095653E-12)*Y+3.357056136731E-11)*Y- + 1.123776903884E-09)*Y+1.231203269887E-08)*Y- + 3.99851421361031E-07 )*Y+1.45418822817771E-05 )*Y- + 3.49912254976317E-04 )*Y+6.67768703938812E-03 + roots1 = (((((((((( 2.02778478673555E-15*Y+1.01640716785099E-14)*Y- + 3.385363492036E-13)*Y-1.615655871159E-12)*Y+ + 4.527419140333E-11)*Y+3.853670706486E-10)*Y- + 1.184607130107E-08)*Y+1.347873288827E-07)*Y- + 4.47788241748377E-06 )*Y+1.54942754358273E-04 )*Y- + 3.55524254280266E-03 )*Y+6.44912219301603E-02 + roots2 = (((((((((( 7.79850771456444E-15*Y+6.00464406395001E-14)*Y- + 1.249779730869E-12)*Y-1.020720636353E-11)*Y+ + 1.814709816693E-10)*Y+1.766397336977E-09)*Y- + 4.603559449010E-08)*Y+5.863956443581E-07)*Y- + 2.03797212506691E-05 )*Y+6.31405161185185E-04 )*Y- + 1.30102750145071E-02 )*Y+2.10244289044705E-01 + roots3 = (((((((((((-2.92397030777912E-15*Y+1.94152129078465E-14)*Y+ + 4.859447665850E-13)*Y-3.217227223463E-12)*Y- + 7.484522135512E-11)*Y+7.19101516047753E-10 )*Y+ + 6.88409355245582E-09 )*Y-1.44374545515769E-07 )*Y+ + 2.74941013315834E-06 )*Y-1.02790452049013E-04 )*Y+ + 2.59924221372643E-03 )*Y-4.35712368303551E-02 )*Y+5.62170709585029E-01 + roots4 = ((((((((((( 1.17976126840060E-14*Y+1.24156229350669E-13)*Y- + 3.892741622280E-12)*Y-7.755793199043E-12)*Y+ + 9.492190032313E-10)*Y-4.98680128123353E-09 )*Y- + 1.81502268782664E-07 )*Y+2.69463269394888E-06 )*Y+ + 2.50032154421640E-05 )*Y-1.33684303917681E-03 )*Y+ + 2.29121951862538E-02 )*Y-2.45653725061323E-01 )*Y+1.89999883453047E+00 + weights0 = (((((((((( 1.74841995087592E-15*Y-6.95671892641256E-16)*Y- + 3.000659497257E-13)*Y+2.021279817961E-13)*Y+ + 3.853596935400E-11)*Y+1.461418533652E-10)*Y- + 1.014517563435E-08)*Y+1.132736008979E-07)*Y- + 2.86605475073259E-06 )*Y+1.21958354908768E-04 )*Y- + 3.86293751153466E-03 )*Y+1.45298342081522E-01 + weights1 = ((((((((((-1.11199320525573E-15*Y+1.85007587796671E-15)*Y+ + 1.220613939709E-13)*Y+1.275068098526E-12)*Y- + 5.341838883262E-11)*Y+6.161037256669E-10)*Y- + 1.009147879750E-08)*Y+2.907862965346E-07)*Y- + 6.12300038720919E-06 )*Y+1.00104454489518E-04 )*Y- + 1.80677298502757E-03 )*Y+5.78009914536630E-02 + weights2 = ((((((((((-9.49816486853687E-16*Y+6.67922080354234E-15)*Y+ + 2.606163540537E-15)*Y+1.983799950150E-12)*Y- + 5.400548574357E-11)*Y+6.638043374114E-10)*Y- + 8.799518866802E-09)*Y+1.791418482685E-07)*Y- + 2.96075397351101E-06 )*Y+3.38028206156144E-05 )*Y- + 3.58426847857878E-04 )*Y+8.39213709428516E-03 + weights3 = ((((((((((( 1.33829971060180E-17*Y-3.44841877844140E-16)*Y+ + 4.745009557656E-15)*Y-6.033814209875E-14)*Y+ + 1.049256040808E-12)*Y-1.70859789556117E-11 )*Y+ + 2.15219425727959E-10 )*Y-2.52746574206884E-09 )*Y+ + 3.27761714422960E-08 )*Y-3.90387662925193E-07 )*Y+ + 3.46340204593870E-06 )*Y-2.43236345136782E-05 )*Y+3.54846978585226E-04 + weights4 = ((((((((((((( 2.69412277020887E-20*Y-4.24837886165685E-19)* + Y+6.030500065438E-18)*Y-9.069722758289E-17)*Y+ + 1.246599177672E-15)*Y-1.56872999797549E-14 )*Y+ + 1.87305099552692E-13 )*Y-2.09498886675861E-12 )*Y+ + 2.11630022068394E-11 )*Y-1.92566242323525E-10 )*Y+ + 1.62012436344069E-09 )*Y-1.23621614171556E-08 )*Y+ + 7.72165684563049E-08 )*Y-3.59858901591047E-07 )*Y+2.43682618601000E-06 + elif X < 25.0: + Y = X-22.5E+00 + roots0 = (((((((((-1.13927848238726E-15*Y+7.39404133595713E-15)*Y+ + 1.445982921243E-13)*Y-2.676703245252E-12)*Y+ + 5.823521627177E-12)*Y+2.17264723874381E-10 )*Y+ + 3.56242145897468E-09 )*Y-3.03763737404491E-07 )*Y+ + 9.46859114120901E-06 )*Y-2.30896753853196E-04 )*Y+5.24663913001114E-03 + roots1 = (((((((((( 2.89872355524581E-16*Y-1.22296292045864E-14)*Y+ + 6.184065097200E-14)*Y+1.649846591230E-12)*Y- + 2.729713905266E-11)*Y+3.709913790650E-11)*Y+ + 2.216486288382E-09)*Y+4.616160236414E-08)*Y- + 3.32380270861364E-06 )*Y+9.84635072633776E-05 )*Y- + 2.30092118015697E-03 )*Y+5.00845183695073E-02 + roots2 = (((((((((( 1.97068646590923E-15*Y-4.89419270626800E-14)*Y+ + 1.136466605916E-13)*Y+7.546203883874E-12)*Y- + 9.635646767455E-11)*Y-8.295965491209E-11)*Y+ + 7.534109114453E-09)*Y+2.699970652707E-07)*Y- + 1.42982334217081E-05 )*Y+3.78290946669264E-04 )*Y- + 8.03133015084373E-03 )*Y+1.58689469640791E-01 + roots3 = (((((((((( 1.33642069941389E-14*Y-1.55850612605745E-13)*Y- + 7.522712577474E-13)*Y+3.209520801187E-11)*Y- + 2.075594313618E-10)*Y-2.070575894402E-09)*Y+ + 7.323046997451E-09)*Y+1.851491550417E-06)*Y- + 6.37524802411383E-05 )*Y+1.36795464918785E-03 )*Y- + 2.42051126993146E-02 )*Y+3.97847167557815E-01 + roots4 = ((((((((((-6.07053986130526E-14*Y+1.04447493138843E-12)*Y- + 4.286617818951E-13)*Y-2.632066100073E-10)*Y+ + 4.804518986559E-09)*Y-1.835675889421E-08)*Y- + 1.068175391334E-06)*Y+3.292234974141E-05)*Y- + 5.94805357558251E-04 )*Y+8.29382168612791E-03 )*Y- + 9.93122509049447E-02 )*Y+1.09857804755042E+00 + weights0 = (((((((((-9.10338640266542E-15*Y+1.00438927627833E-13)*Y+ + 7.817349237071E-13)*Y-2.547619474232E-11)*Y+ + 1.479321506529E-10)*Y+1.52314028857627E-09 )*Y+ + 9.20072040917242E-09 )*Y-2.19427111221848E-06 )*Y+ + 8.65797782880311E-05 )*Y-2.82718629312875E-03 )*Y+1.28718310443295E-01 + weights1 = ((((((((( 5.52380927618760E-15*Y-6.43424400204124E-14)*Y- + 2.358734508092E-13)*Y+8.261326648131E-12)*Y+ + 9.229645304956E-11)*Y-5.68108973828949E-09 )*Y+ + 1.22477891136278E-07 )*Y-2.11919643127927E-06 )*Y+ + 4.23605032368922E-05 )*Y-1.14423444576221E-03 )*Y+5.06607252890186E-02 + weights2 = ((((((((( 3.99457454087556E-15*Y-5.11826702824182E-14)*Y- + 4.157593182747E-14)*Y+4.214670817758E-12)*Y+ + 6.705582751532E-11)*Y-3.36086411698418E-09 )*Y+ + 6.07453633298986E-08 )*Y-7.40736211041247E-07 )*Y+ + 8.84176371665149E-06 )*Y-1.72559275066834E-04 )*Y+7.16639814253567E-03 + weights3 = (((((((((((-2.14649508112234E-18*Y-2.45525846412281E-18)*Y+ + 6.126212599772E-16)*Y-8.526651626939E-15)*Y+ + 4.826636065733E-14)*Y-3.39554163649740E-13 )*Y+ + 1.67070784862985E-11 )*Y-4.42671979311163E-10 )*Y+ + 6.77368055908400E-09 )*Y-7.03520999708859E-08 )*Y+ + 6.04993294708874E-07 )*Y-7.80555094280483E-06 )*Y+2.85954806605017E-04 + weights4 = ((((((((((((-5.63938733073804E-21*Y+6.92182516324628E-20)*Y- + 1.586937691507E-18)*Y+3.357639744582E-17)*Y- + 4.810285046442E-16)*Y+5.386312669975E-15)*Y- + 6.117895297439E-14)*Y+8.441808227634E-13)*Y- + 1.18527596836592E-11 )*Y+1.36296870441445E-10 )*Y- + 1.17842611094141E-09 )*Y+7.80430641995926E-09 )*Y- + 5.97767417400540E-08 )*Y+1.65186146094969E-06 + elif X < 40.0: + weights0 = np.sqrt(PIE4/X) + E = np.exp(-X) + roots0 = ((((((((-1.73363958895356E-06*X+1.19921331441483E-04)*X - + 1.59437614121125E-02)*X+1.13467897349442E+00)*X - + 4.47216460864586E+01)*X+1.06251216612604E+03)*X - + 1.52073917378512E+04)*X+1.20662887111273E+05)*X - + 4.07186366852475E+05)*E + R15/(X-R15) + roots1 = ((((((((-1.60102542621710E-05*X+1.10331262112395E-03)*X - + 1.50043662589017E-01)*X+1.05563640866077E+01)*X - + 4.10468817024806E+02)*X+9.62604416506819E+03)*X - + 1.35888069838270E+05)*X+1.06107577038340E+06)*X - + 3.51190792816119E+06)*E + R25/(X-R25) + roots2 = ((((((((-4.48880032128422E-05*X+2.69025112122177E-03)*X - + 4.01048115525954E-01)*X+2.78360021977405E+01)*X - + 1.04891729356965E+03)*X+2.36985942687423E+04)*X - + 3.19504627257548E+05)*X+2.34879693563358E+06)*X - + 7.16341568174085E+06)*E + R35/(X-R35) + roots3 = ((((((((-6.38526371092582E-05*X-2.29263585792626E-03)*X - + 7.65735935499627E-02)*X+9.12692349152792E+00)*X - + 2.32077034386717E+02)*X+2.81839578728845E+02)*X + + 9.59529683876419E+04)*X-1.77638956809518E+06)*X + + 1.02489759645410E+07)*E + R45/(X-R45) + roots4 = ((((((((-3.59049364231569E-05*X-2.25963977930044E-02)*X + + 1.12594870794668E+00)*X-4.56752462103909E+01)*X + + 1.05804526830637E+03)*X-1.16003199605875E+04)*X - + 4.07297627297272E+04)*X+2.22215528319857E+06)*X - + 1.61196455032613E+07)*E + R55/(X-R55) + weights4 = (((((((((-4.61100906133970E-10*X+1.43069932644286E-07)*X - + 1.63960915431080E-05)*X+1.15791154612838E-03)*X - + 5.30573476742071E-02)*X+1.61156533367153E+00)*X - + 3.23248143316007E+01)*X+4.12007318109157E+02)*X - + 3.02260070158372E+03)*X+9.71575094154768E+03)*E + W55*weights0 + weights3 = (((((((((-2.40799435809950E-08*X+8.12621667601546E-06)*X - + 9.04491430884113E-04)*X+6.37686375770059E-02)*X - + 2.96135703135647E+00)*X+9.15142356996330E+01)*X - + 1.86971865249111E+03)*X+2.42945528916947E+04)*X - + 1.81852473229081E+05)*X+5.96854758661427E+05)*E + W45*weights0 + weights2 = (((((((( 1.83574464457207E-05*X-1.54837969489927E-03)*X + + 1.18520453711586E-01)*X-6.69649981309161E+00)*X + + 2.44789386487321E+02)*X-5.68832664556359E+03)*X + + 8.14507604229357E+04)*X-6.55181056671474E+05)*X + + 2.26410896607237E+06)*E + W35*weights0 + weights1 = (((((((( 2.77778345870650E-05*X-2.22835017655890E-03)*X + + 1.61077633475573E-01)*X-8.96743743396132E+00)*X + + 3.28062687293374E+02)*X-7.65722701219557E+03)*X + + 1.10255055017664E+05)*X-8.92528122219324E+05)*X + + 3.10638627744347E+06)*E + W25*weights0 + weights0 = weights0-0.01962E+00*E-weights1-weights2-weights3-weights4 + elif X < 59.0: + weights0 = np.sqrt(PIE4/X) + XXX = X**3 + E = XXX*np.exp(-X) + roots0 = (((-2.43758528330205E-02*X+2.07301567989771E+00)*X - + 6.45964225381113E+01)*X+7.14160088655470E+02)*E + R15/(X-R15) + roots1 = (((-2.28861955413636E-01*X+1.93190784733691E+01)*X - + 5.99774730340912E+02)*X+6.61844165304871E+03)*E + R25/(X-R25) + roots2 = (((-6.95053039285586E-01*X+5.76874090316016E+01)*X - + 1.77704143225520E+03)*X+1.95366082947811E+04)*E + R35/(X-R35) + roots3 = (((-1.58072809087018E+00*X+1.27050801091948E+02)*X - + 3.86687350914280E+03)*X+4.23024828121420E+04)*E + R45/(X-R45) + roots4 = (((-3.33963830405396E+00*X+2.51830424600204E+02)*X - + 7.57728527654961E+03)*X+8.21966816595690E+04)*E + R55/(X-R55) + E = XXX*E + weights4 = (( 1.35482430510942E-08*X-3.27722199212781E-07)*X + + 2.41522703684296E-06)*E + W55*weights0 + weights3 = (( 1.23464092261605E-06*X-3.55224564275590E-05)*X + + 3.03274662192286E-04)*E + W45*weights0 + weights2 = (( 1.34547929260279E-05*X-4.19389884772726E-04)*X + + 3.87706687610809E-03)*E + W35*weights0 + weights1 = (( 2.09539509123135E-05*X-6.87646614786982E-04)*X + + 6.68743788585688E-03)*E + W25*weights0 + weights0 = weights0-weights1-weights2-weights3-weights4 + else: + weights0 = np.sqrt(PIE4/X) + roots0 = R15/(X-R15) + roots1 = R25/(X-R25) + roots2 = R35/(X-R35) + roots3 = R45/(X-R45) + roots4 = R55/(X-R55) + weights1 = W25*weights0 + weights2 = W35*weights0 + weights3 = W45*weights0 + weights4 = W55*weights0 + weights0 = weights0-weights1-weights2-weights3-weights4 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + roots[3] = roots3 + roots[4] = roots4 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + weights[3] = weights3 + weights[4] = weights4 + + return roots, weights#[roots1,roots2,roots3,roots4,roots[5]],[weights1,weights2,weights3,weights4,weights[5]] + +def eri_4c2e_diagonal_numba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts): + # This function calculates the ""diagonal"" elements of the 4c2e ERI array + # Used to implement Schwarz screening + # http://vergil.chemistry.gatech.edu/notes/df.pdf + + + + # returns a 2D array whose elements are given as A[i,j] = (ij|ij) + nao = bfs_coords.shape[0] + fourC2E_diag = np.zeros((nao, nao),dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for i in prange(0, nao): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + K = I + Nk = Ni + lc, mc, nc = lmni + + nprimk = nprimi + + for j in range(0, i+1): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + tempcoeff2 = tempcoeff1*Nk + + L = J + KL = IJ + KLsq = IJsq + Nl = Nj + lmnl = lmnj + ld, md, nd = lmnj + tempcoeff3 = tempcoeff2*Nl + npriml = nprimj + + + + val = 0.0 + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + # if abs(screenfactorAB)<1.0e-8: + # #TODO: Check for optimal value for screening + # continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + dkk = dik + Nkk = Nik + alphakk = alphaik + tempcoeff6 = tempcoeff5*dkk*Nkk + + alphalk = alphajk + gammaQ = alphakk + alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + # if abs(screenfactorKL)<1.0e-8: + # #TODO: Check for optimal value for screening + # continue + # if abs(screenfactorAB*screenfactorKL)<1.0e-10: + # #TODO: Check for optimal value for screening + # continue + dlk = djk + Nlk = Njk + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q - L + tempcoeff7 = tempcoeff6*dlk*Nlk + + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2eNumba2(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + # sum1 = FboysNumba2(la+lb+lc+ld+ma+mb+mc+md+na+nb+nc+nd,PQsqBy4delta) + # sum1 = 1.0 + + val += omega*sum1*tempcoeff7 + + # BIG NOTE: This actually fixed an issue that I was getting where the energies of Crysx and PySCF only matched upto 10^-4 au and after + # this change the energies match upto 10^-5 to 10^-6 au + # But somehow this seems slower than before + fourC2E_diag[i,j] = val + fourC2E_diag[j,i] = val + + return fourC2E_diag + + +def fourCenterTwoElecSymmNumba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD): + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + + # returns (AB|CD) + + m = indx_endA - indx_startA + n = indx_endB - indx_startB + o = indx_endC - indx_startC + p = indx_endD - indx_startD + fourC2E = np.zeros((m,n,o,p),dtype=np.float64) #The difference in syntax is due to Numba + # print('Four Center Two electron ERI size in GB ',fourC2E.nbytes/1e9) + + + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for i in prange(0, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(0, i+1): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + for k in prange(0, indx_endC): #C + K = bfs_coords[k] + Nk = bfs_contr_prim_norms[k] + lmnk = bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + nprimk = bfs_nprim[k] + + for l in prange(0, k+1): #D + if itriangle2kl: + continue + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff3 = tempcoeff2*Nl + npriml = bfs_nprim[l] + + val = 0.0 + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in range(bfs_nprim[k]): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in range(bfs_nprim[l]): + alphalk = bfs_expnts[l][lk] + gammaQ = alphakk + alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q - L + tempcoeff7 = tempcoeff6*dlk*Nlk + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2eNumba2(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + # sum1 = FboysNumba2(la+lb+lc+ld+ma+mb+mc+md+na+nb+nc+nd,PQsqBy4delta) + # sum1 = 1.0 + + val += omega*sum1*tempcoeff7 + + # BIG NOTE: This actually fixed an issue that I was getting where the energies of Crysx and PySCF only matched upto 10^-4 au and after + # this change the energies match upto 10^-5 to 10^-6 au + # But somehow this seems slower than before + fourC2E[i,j,k,l] = val + fourC2E[j,i,k,l] = fourC2E[i,j,k,l] + fourC2E[i,j,l,k] = fourC2E[i,j,k,l] + fourC2E[j,i,l,k] = fourC2E[i,j,k,l] + fourC2E[k,l,i,j] = fourC2E[i,j,k,l] + fourC2E[k,l,j,i] = fourC2E[i,j,k,l] + fourC2E[l,k,i,j] = fourC2E[i,j,k,l] + fourC2E[l,k,j,i] = fourC2E[i,j,k,l] + + + + + return fourC2E + +def twoCenterTwoElecSymmNumba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d): + # This function calculates the two centered two electron integral matrix for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + + # returns (AB|CD) + + m = b-a + n = d-c + twoC2E = np.zeros((m,n)) #The difference in syntax is due to Numba + # print('Four Center Two electron ERI size in GB ',fourC2E.nbytes/1e9) + # print(comb(0,0)) + # print(c2kNumba(1,2,0,1.0,0.0)) + + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + J = L = np.zeros((3)) + Nj = Nl = 1 + lnmj = lmnl = np.zeros((3),dtype=np.int32) + lb, mb, nb = int(0), int(0), int(0) + ld, md, nd = int(0), int(0), int(0) + alphajk = alphalk = 0.0 + djk, dlk = 1.0, 1.0 + Njk, Nlk = 1.0, 1.0 + #Loop pver BFs + for i in prange(a, b): #A + I = bfs_coords[i] + IJ = I #- J + # IJsq = np.sum(IJ**2) + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + + + + for k in prange(c, i+1): #C + K = bfs_coords[k] + Nk = bfs_contr_prim_norms[k] + lmnk = bfs_lmn[k] + lc, mc, nc = lmnk + KL = K #- L + # KLsq = np.sum(KL**2) + + tempcoeff1 = Ni*Nk + + + + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff1*dik*Nik + gammaP = alphaik #+ alphajk + screenfactorAB = 1.0#np.exp(-alphaik*alphajk/gammaP*IJsq) + + P = I + PI = np.zeros((3)) + PJ = IJ#P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + + + for kk in range(bfs_nprim[k]): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + gammaQ = alphakk #+ alphalk + screenfactorKL = 1.0#np.exp(-alphakk*alphalk/gammaQ*KLsq) + Q = K#(alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + QK = Q - K #np.ones((3)) + QL = KL#Q - L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + sum1 = innerLoop4c2eNumba2(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + # sum1 = FboysNumba2(la+lb+lc+ld+ma+mb+mc+md+na+nb+nc+nd,PQsqBy4delta) + # sum1 = 1.0 + + twoC2E[i,k] += omega*sum1*tempcoeff5 + + + + twoC2E[k,i] = twoC2E[i,k] + + + + + return twoC2E + +def threeCenterTwoElecSymmNumba1(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC): + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + + # returns (AB|CD) + + m = indx_endA - indx_startA + n = indx_endB - indx_startB + o = indx_endC - indx_startC + + threeC2E = np.zeros((m,n,o),dtype=np.float64) #The difference in syntax is due to Numba + # print('Four Center Two electron ERI size in GB ',fourC2E.nbytes/1e9) + + + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = np.zeros((3)) + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + #Loop pver BFs + for i in prange(0, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + # nprimi = bfs_nprim[i] + + for j in prange(0, i+1): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + # nprimj = bfs_nprim[j] + + for k in prange(0, indx_endC): #C + K = aux_bfs_coords[k] + Nk = aux_bfs_contr_prim_norms[k] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + # nprimk = aux_bfs_nprim[k] + + + + KL = K #- L + KLsq = np.sum(KL**2) + + val = 0.0 + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(aux_bfs_nprim[k]): + dkk = aux_bfs_coeffs[k][kk] + Nkk = aux_bfs_prim_norms[k][kk] + alphakk = aux_bfs_expnts[k][kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + + Q = K#(alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))#*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2eNumba2(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + # sum1 = FboysNumba2(la+lb+lc+ld+ma+mb+mc+md+na+nb+nc+nd,PQsqBy4delta) + # sum1 = 1.0 + + val += omega*sum1*tempcoeff5 + + # BIG NOTE: This actually fixed an issue that I was getting where the energies of Crysx and PySCF only matched upto 10^-4 au and after + # this change the energies match upto 10^-5 to 10^-6 au + # But somehow this seems slower than before + threeC2E[i,j,k] = val + threeC2E[j,i,k] = val + + + + + + return threeC2E + +def fourCenterTwoElecFastNumba1(quadruplets, bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD): + # Here quadruplets is the list of indices (i,j,k,l) that have been generated using np.stack to circumvent having four different loops over i,j,k,l. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + # https://d-nb.info/1140164724/34 + + + + # returns (AB|CD) + + m = indx_endA - indx_startA + n = indx_endB - indx_startB + o = indx_endC - indx_startC + p = indx_endD - indx_startD + fourC2E = np.zeros((m,n,o,p)) #The difference in syntax is due to Numba + + nquads = quadruplets.shape[0] + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for indx_quad in prange(0,nquads): + # i = quadruplets[indx_quad, 0] + # j = quadruplets[indx_quad, 1] + # k = quadruplets[indx_quad, 2] + # l = quadruplets[indx_quad, 3] + + i,j,k,l = quadruplets[indx_quad] + + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + K = bfs_coords[k] + Nk = bfs_contr_prim_norms[k] + lmnk = bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + nprimk = bfs_nprim[k] + + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff3 = tempcoeff2*Nl + npriml = bfs_nprim[l] + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + alphaik = bfs_expnts[i,ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j,jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in prange(bfs_nprim[k]): + dkk = bfs_coeffs[k,kk] + Nkk = bfs_prim_norms[k,kk] + alphakk = bfs_expnts[k,kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in prange(bfs_nprim[l]): + alphalk = bfs_expnts[l,lk] + gammaQ = alphakk + alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l,lk] + Nlk = bfs_prim_norms[l,lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q - L + tempcoeff7 = tempcoeff6*dlk*Nlk + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2eNumba2(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + # sum1 = FboysNumba2(la+lb+lc+ld+ma+mb+mc+md+na+nb+nc+nd,PQsqBy4delta) + # sum1 = 1.0 + + fourC2E[i,j,k,l] = fourC2E[i,j,k,l] + omega*sum1*tempcoeff7 + + + + + return fourC2E + +def genQuadrupletsNumba1(n,quadruplets): + indx = 0 # Index to loop over quadruplets + for i in range(0,n): + for j in range(0,i+1): + for k in range(0,n): + for l in range(0,k+1): + if i= 0 and x < 0.0000001: + F = 1/(2*v+1) - x/(2*v+3) + else: + F = 0.5*x**(-(v+0.5))*gammainc(v+0.5,x)*gamma(v+0.5) + # From jj goings + # F = hyp1f1(v+0.5,v+1.5,-x)/(2.0*v+1.0) + return F + + def nucMat(basis, mol, slice=None): + # This function calculates the nuclear potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The mol object is used to get information about the charges of nuclei and their positions. + # It is here, that we see the advantage of having the mol and basis objects be supplied separately. + # This allows to calculate the nuclear matrix of one molecule in the basis of another. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + #V = np.zeros([basis.bfs_nao,basis.bfs_nao]) + V = np.zeros([slice[1]-slice[0],slice[3]-slice[2]]) + #Get the nuclear charges of the molecule + Z = mol.Zcharges + #Get the coordinates of molecule's nuclei + coordsMol = mol.coordsBohrs + #Get the total number of nuclei + natoms = mol.natoms + + #durationFboys = 0.0 + #Loop pver BFs + for i in range(slice[0],slice[1]): + for j in range(slice[2],slice[3]): + I = basis.bfs_coords[i] + J = basis.bfs_coords[j] + IJ = I - J + Ni = basis.bfs_contr_prim_norms[i] + Nj = basis.bfs_contr_prim_norms[j] + lmni = basis.bfs_lmn[i] + lmnj = basis.bfs_lmn[j] + la, ma, na = lmni + lb, mb, nb = lmnj + #Loop over primitives + for ik in range(basis.bfs_nprim[i]): + for jk in range(basis.bfs_nprim[j]): + dik = basis.bfs_coeffs[i][ik] + djk = basis.bfs_coeffs[j][jk] + Nik = basis.bfs_prim_norms[i][ik] + Njk = basis.bfs_prim_norms[j][jk] + alphaik = basis.bfs_expnts[i][ik] + alphajk = basis.bfs_expnts[j][jk] + gamma = alphaik + alphajk + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + + Vc = 0.0 + #Loop over nuclei + for iatom in range(natoms): + Rc = coordsMol[iatom] + Zc = Z[iatom] + PC = P - Rc + + fac1 = -Zc*(2*np.pi/gamma)*np.exp(-alphaik*alphajk/gamma*np.sum(IJ**2)) + #print(fac1) + sum_Vl = 0.0 + + for l in range(0,la+lb+1): + for r in range(0, int(l/2)+1): + for i1 in range(0, int((l-2*r)/2)+1): + v_lri = Integrals.vlri(la,lb,PI[0],PJ[0],PC[0],gamma,l,r,i1)#*math.factorial(l) + sum_Vm = 0.0 + for m in range(0,ma+mb+1): + for s in range(0, int(m/2)+1): + for j1 in range(0, int((m-2*s)/2)+1): + v_msj = Integrals.vlri(ma,mb,PI[1],PJ[1],PC[1],gamma,m,s,j1)#*math.factorial(l) + sum_Vn = 0.0 + for n in range(0,na+nb+1): + for t in range(0, int(n/2)+1): + for k in range(0, int((n-2*t)/2)+1): + v_ntk = Integrals.vlri(na,nb,PI[2],PJ[2],PC[2],gamma,n,t,k)#*math.factorial(l) + #startFboys = timer() + F = Integrals.Fboys(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + #durationFboys = durationFboys + timer() - startFboys + sum_Vn = sum_Vn + v_ntk*F + sum_Vm = sum_Vm + v_msj*sum_Vn + sum_Vl = sum_Vl + v_lri*sum_Vm + + Vc = Vc + sum_Vl*fac1 + #print(Vc) + V[i,j] = V[i,j] + Vc*dik*djk*Nik*Njk*Ni*Nj + #print(dik*djk*Nik*Njk*Ni*Nj*Vc) + #print(i,j) + + #print(durationFboys) + return V + + def theta(l,la,lb,PA,PB,gamma,r): + return Integrals.c2k(l,la,lb,PA,PB)*math.factorial(l)*(gamma**(r-l))/math.factorial(r)/math.factorial(l-2*r) + + def g(lp,lq,rp,rq,i,la,lb,lc,ld,gammaP,gammaQ,PA,PB,QC,QD,PQ,delta): + temp = ((-1)**lp)*Integrals.theta(lp,la,lb,PA,PB,gammaP,rp)*Integrals.theta(lq,lc,ld,QC,QD,gammaQ,rq) + numerator = temp*((-1)**i)*((2*delta)**(2*(rp+rq)))*math.factorial(lp+lq-2*rp-2*rq)*(delta**i)*(PQ**(lp+lq-2*(rp+rq+i))) + denominator = ((4*delta)**(lp+lq))*math.factorial(i)*math.factorial(lp+lq-2*(rp+rq+i)) + # print(numerator/temp) + return (numerator/denominator) + + def fourCenterTwoElec(basis, slice=None): + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + + # returns (AB|CD) + import itertools + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao] + + fourC2E = np.zeros([slice[1]-slice[0],slice[3]-slice[2],slice[5]-slice[4],slice[7]-slice[6]]) + durationFboys = 0.0 + + + #Loop pver BFs + for i,j,k,l in itertools.product(range(slice[0],slice[1]), range(slice[2],slice[3]), range(slice[4],slice[5]), range(slice[6],slice[7])): + I = basis.bfs_coords[i] + J = basis.bfs_coords[j] + K = basis.bfs_coords[k] + L = basis.bfs_coords[l] + IJ = I - J + KL = K - L + Ni = basis.bfs_contr_prim_norms[i] + Nj = basis.bfs_contr_prim_norms[j] + Nk = basis.bfs_contr_prim_norms[k] + Nl = basis.bfs_contr_prim_norms[l] + lmni = basis.bfs_lmn[i] + lmnj = basis.bfs_lmn[j] + lmnk = basis.bfs_lmn[k] + lmnl = basis.bfs_lmn[l] + la, ma, na = lmni + lb, mb, nb = lmnj + lc, mc, nc = lmnk + ld, md, nd = lmnl + #Loop over primitives + for ik in range(basis.bfs_nprim[i]): + for jk in range(basis.bfs_nprim[j]): + for kk in range(basis.bfs_nprim[k]): + for lk in range(basis.bfs_nprim[l]): + dik = basis.bfs_coeffs[i][ik] + djk = basis.bfs_coeffs[j][jk] + dkk = basis.bfs_coeffs[k][kk] + dlk = basis.bfs_coeffs[l][lk] + Nik = basis.bfs_prim_norms[i][ik] + Njk = basis.bfs_prim_norms[j][jk] + Nkk = basis.bfs_prim_norms[k][kk] + Nlk = basis.bfs_prim_norms[l][lk] + alphaik = basis.bfs_expnts[i][ik] + alphajk = basis.bfs_expnts[j][jk] + alphakk = basis.bfs_expnts[k][kk] + alphalk = basis.bfs_expnts[l][lk] + gammaP = alphaik + alphajk + gammaQ = alphakk + alphalk + P = (alphaik*I + alphajk*J)/gammaP + Q = (alphakk*K + alphalk*L)/gammaQ + PI = P - I + PJ = P - J + PQ = P - Q + QK = Q - K + QL = Q - L + + omega = (2*np.pi**2/gammaP/gammaQ)*np.sqrt(np.pi/(gammaP + gammaQ))*np.exp(-alphaik*alphajk/gammaP*np.sum(IJ**2))*np.exp(-alphakk*alphalk/gammaQ*np.sum(KL**2)) + delta = 0.25*(1/gammaP + 1/gammaQ) + # print(omega) + + sum1 = 0.0 + for lp in range(0,la+lb+1): + for rp in range(0, int(lp/2)+1): + for lq in range(0, lc+ld+1): + for rq in range(0, int(lq/2)+1): + for i1 in range(0,int((lp+lq-2*rp-2*rq)/2)+1): + gx = Integrals.g(lp,lq,rp,rq,i1,la,lb,lc,ld,gammaP,gammaQ,PI[0],PJ[0],QK[0],QL[0],PQ[0],delta) + sum2 = 0.0 + + for mp in range(0,ma+mb+1): + for sp in range(0, int(mp/2)+1): + for mq in range(0, mc+md+1): + for sq in range(0, int(mq/2)+1): + for j1 in range(0,int((mp+mq-2*sp-2*sq)/2)+1): + gy = Integrals.g(mp,mq,sp,sq,j1,ma,mb,mc,md,gammaP,gammaQ,PI[1],PJ[1],QK[1],QL[1],PQ[1],delta) + sum3 = 0.0 + + for np1 in range(0,na+nb+1): + for tp in range(0, int(np1/2)+1): + for nq in range(0, nc+nd+1): + for tq in range(0, int(nq/2)+1): + for k1 in range(0,int((np1+nq-2*tp-2*tq)/2)+1): + gz = Integrals.g(np1,nq,tp,tq,k1,na,nb,nc,nd,gammaP,gammaQ,PI[2],PJ[2],QK[2],QL[2],PQ[2],delta) + v = lp+lq+mp+mq+np1+nq-2*(rp+rq+sp+sq+tp+tq)-(i1+j1+k1) + # start = timer() + F = Integrals.Fboys(v,np.sum(PQ**2)/(4*delta)) + # durationFboys = durationFboys + timer() - start + sum3 = sum3 + gz*F + #sum1 = sum1 + gx*gy*gz*F + + sum2 = sum2 + gy*sum3 + sum1 = sum1 + gx*sum2 + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + # sum12 = innerLoop4c2eNumba1(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + # if(abs(sum1-sum12)>1.0e-10): + # print('yes') + # print(sum1) + # print(sum12) + fourC2E[i,j,k,l] = fourC2E[i,j,k,l] + dik*djk*dkk*dlk*Nik*Njk*Nkk*Nlk*Ni*Nj*Nk*Nl*omega*sum1 + # for i in range(slice[0],slice[1]): + # for j in range(slice[2],slice[3]): + # for k in range(slice[4],slice[5]): + # for l in range(slice[6],slice[7]): + # I = basis.bfs_coords[i] + # J = basis.bfs_coords[j] + # K = basis.bfs_coords[k] + # L = basis.bfs_coords[l] + # IJ = I - J + # KL = K - L + # Ni = basis.bfs_contr_prim_norms[i] + # Nj = basis.bfs_contr_prim_norms[j] + # Nk = basis.bfs_contr_prim_norms[k] + # Nl = basis.bfs_contr_prim_norms[l] + # lmni = basis.bfs_lmn[i] + # lmnj = basis.bfs_lmn[j] + # lmnk = basis.bfs_lmn[k] + # lmnl = basis.bfs_lmn[l] + # la, ma, na = lmni + # lb, mb, nb = lmnj + # lc, mc, nc = lmnk + # ld, md, nd = lmnl + # #Loop over primitives + # for ik in range(basis.bfs_nprim[i]): + # for jk in range(basis.bfs_nprim[j]): + # for kk in range(basis.bfs_nprim[k]): + # for lk in range(basis.bfs_nprim[l]): + # dik = basis.bfs_coeffs[i][ik] + # djk = basis.bfs_coeffs[j][jk] + # dkk = basis.bfs_coeffs[k][kk] + # dlk = basis.bfs_coeffs[l][lk] + # Nik = basis.bfs_prim_norms[i][ik] + # Njk = basis.bfs_prim_norms[j][jk] + # Nkk = basis.bfs_prim_norms[k][kk] + # Nlk = basis.bfs_prim_norms[l][lk] + # alphaik = basis.bfs_expnts[i][ik] + # alphajk = basis.bfs_expnts[j][jk] + # alphakk = basis.bfs_expnts[k][kk] + # alphalk = basis.bfs_expnts[l][lk] + # gammaP = alphaik + alphajk + # gammaQ = alphakk + alphalk + # P = (alphaik*I + alphajk*J)/gammaP + # Q = (alphakk*K + alphalk*L)/gammaQ + # PI = P - I + # PJ = P - J + # PQ = P - Q + # QK = Q - K + # QL = Q - L + + # omega = (2*np.pi**2/gammaP/gammaQ)*np.sqrt(np.pi/(gammaP + gammaQ))*np.exp(-alphaik*alphajk/gammaP*IJ**2)*np.exp(-alphakk*alphalk/gammaQ*KL**2) + # delta = 0.25*(1/gammaP + 1/gammaQ) + + # sum1 = 0.0 + # for lp in range(0,la+lb+1): + # for rp in range(0, int(l/2)+1): + # for lq in range(0, int(l/2)+1): + # for rq in range(0, int(l/2)+1): + # for i1 in range(): + # gx = g(lp,lq,rp,rq,i1,la,lb,lc,ld,gammaP,gammaQ,PI[0],PJ[0],QK[0],QL[0],PQ[0],delta) + # sum2 = 0.0 + # for mp in range(0,la+lb+1): + # for sp in range(0, int(l/2)+1): + # for mq in range(0, int(l/2)+1): + # for sq in range(0, int(l/2)+1): + # for j1 in range(): + # gy = g(mp,mq,sp,sq,j1,ma,mb,mc,md,gammaP,gammaQ,PI[1],PJ[1],QK[1],QL[1],PQ[1],delta) + # sum3 = 0.0 + # for np in range(0,la+lb+1): + # for tp in range(0, int(l/2)+1): + # for nq in range(0, int(l/2)+1): + # for tq in range(0, int(l/2)+1): + # for k1 in range(): + # gz = g(mp,mq,tp,tq,k1,na,nb,nc,nd,gammaP,gammaQ,PI[2],PJ[2],QK[2],QL[2],PQ[2],delta) + # v = lp+lq+mp+mq+np+nq-2*(rp+rq+sp+sq+tp+tq)-(i1+j1+k1) + # F = Integrals.Fboys(v,np.sum(PQ**2)/4/delta) + # sum3 = sum3 + gz*F + # sum2 = sum2 + gy*sum3 + # sum1 = sum1 + gx*sum2 + + + # fourC2E[i,j,k,l] = fourC2E[i,j,k,l] + dik*djk*dkk*dlk*Nik*Njk*Nkk*Nlk*Ni*Nj*Nk*Nl*omega*sum1 + + + # print(durationFboys) + return fourC2E + + def fourCenterTwoElecNumbawrap(basis, slice1=None): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + #If the user doesn't provide a slice then calculate the complete set of 4c2e integrals for all the BFs + if slice1==None: + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice1[0]) + indx_endA = int(slice1[1]) + indx_startB = int(slice1[2]) + indx_endB = int(slice1[3]) + indx_startC = int(slice1[4]) + indx_endC = int(slice1[5]) + indx_startD = int(slice1[6]) + indx_endD = int(slice1[7]) + + ints4c2e = fourCenterTwoElecNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD) + + return ints4c2e + + def fourCenterTwoElecSymmNumbawrap(basis): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice1[0]) + indx_endA = int(slice1[1]) + indx_startB = int(slice1[2]) + indx_endB = int(slice1[3]) + indx_startC = int(slice1[4]) + indx_endC = int(slice1[5]) + indx_startD = int(slice1[6]) + indx_endD = int(slice1[7]) + + ints4c2e = fourCenterTwoElecSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD) + + return ints4c2e + + def fourCenterTwoElecDiagSymmNumbawrap(basis): + # Used for Schwarz inequality test + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + ints4c2e_diag = eri_4c2e_diagonal_numba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts) + + return ints4c2e_diag + @njit(parallel=True, cache=True) + def calc_indices_3c2e_schwarz(eri_4c2e_diag, ints2c2e, nao, naux, threshold): + # This function will return a numpy array of the same size as ints3c2e array (nao*nao*naux) + # The array will have a value of 1 where there is a significant contribution and 0 otherwise. + # Later on this array can be used to find the indices of non-zero arrays + indices = np.zeros((nao, nao, naux), dtype=np.uint8) + # Loop over the lower-triangular ints3c2e array + for i in range(nao): + for j in range(i+1): + for k in prange(naux): + if np.sqrt(eri_4c2e_diag[i,j])*np.sqrt(ints2c2e[k,k])>threshold: + indices[i,j,k] = 1 + return indices + + + def RystwoCenterTwoElecSymmNumbawrap(basis): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + slice = [0,basis.bfs_nao,0,basis.bfs_nao,0] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + ints2c2e = rys2c2eSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + return ints2c2e + + def twoCenterTwoElecSymmNumbawrap(basis): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + slice = [0,basis.bfs_nao,0,basis.bfs_nao,0] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + ints2c2e = twoCenterTwoElecSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + return ints2c2e + + def RysthreeCenterTwoElecSymmNumbawrap(basis, auxbasis): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + + slice = [0,basis.bfs_nao,0,basis.bfs_nao,0,auxbasis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + e = int(slice[4]) + f = int(slice[5]) + + ints3c2e = rys3c2eSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,a,b,c,d,e,f) + # ints3c2e = threeCenterTwoElecSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,a,b,c,d,e,f) + # ints3c2e = rys3c2eSymmNumba_tri2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,a,b,c,d,e,f) + return ints3c2e + + def RysthreeCenterTwoElecSymmTriNumbawrap(basis, auxbasis): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + + slice = [0,basis.bfs_nao,0,basis.bfs_nao,0,auxbasis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + e = int(slice[4]) + f = int(slice[5]) + + ints3c2e = rys3c2eSymmNumba_tri2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,a,b,c,d,e,f) + return ints3c2e + + def RysthreeCenterTwoElecSymmTriSchwarzNumbawrap(basis, auxbasis, indicesA, indicesB, indicesC): + # Wrapper for hybrid Rys+conv. 3c2e integral calculator + # using a list of significant contributions obtained via Schwarz screening. + # It returns the 3c2e integrals in triangular form. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + + + ints3c2e = rys3c2eSymmNumba_tri_schwarz2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, basis.bfs_nao, auxbasis.bfs_nao) + return ints3c2e + + def threeCenterTwoElecSymmNumbawrap(basis, auxbasis): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + + slice = [0,basis.bfs_nao,0,basis.bfs_nao,0,auxbasis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + e = int(slice[4]) + f = int(slice[5]) + + ints3c2e = threeCenterTwoElecSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,a,b,c,d,e,f) + return ints3c2e + + def multipoleMomentSymmNumbawrap(basis, auxbasis): + # The multipole moments are calculated using the Obara-saika recurrence formula here: http://www.esqc.org/lectures/WK4.pdf + # Furhtermore, the above resource can be useful in implementing analytical derivatives, as well as Obara-Saika based 4c2e, 3c2e or 2c2e + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + + slice = [0,basis.bfs_nao,0,basis.bfs_nao,0,auxbasis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + e = int(slice[4]) + f = int(slice[5]) + + ints3c2e = threeCenterTwoElecSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,a,b,c,d,e,f) + return ints3c2e + + def RysfourCenterTwoElecSymmNumbawrap(basis): + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice1[0]) + indx_endA = int(slice1[1]) + indx_startB = int(slice1[2]) + indx_endB = int(slice1[3]) + indx_startC = int(slice1[4]) + indx_endC = int(slice1[5]) + indx_startD = int(slice1[6]) + indx_endD = int(slice1[7]) + + ints4c2e = rys4c2eSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD) + + return ints4c2e + + + + def fourCenterTwoElecFastNumbawrap(basis, slice1=None): + # This implementation is based on quadruplets, i.e., instead of running loops on (ij|kl), we can simply generate a list of indices(quadruplets) + # by using np.stack. Why is this efficient? Because this allows more efficient parallelization as the prange of Numba is only being used once over + # a relatively larger list rather than 4 different pranges over smaller lists. + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + #If the user doesn't provide a slice then calculate the complete set of 4c2e integrals for all the BFs + if slice1==None: + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao] + + + #Get a list of quadruplets + #The quadruplets list is just a combinations of the i,j,k,l indices for the BFs + durationQuadruplets = 0.0 + start = timer() + quadruplets = [] + # Method 1 to generate the quadruplets list (Slow af) + # import itertools + # for i,j,k,l in itertools.product(range(slice1[0],slice1[1]), range(slice1[2],slice1[3]), range(slice1[4],slice1[5]), range(slice1[6],slice1[7])): + # quadruplets.append([i,j,k,l]) + # Method 2 to generate the quadruplets (Again slow af) + # quadruplets = [[i,j,k,l] for i,j,k,l in itertools.product(range(slice1[0],slice1[1]), range(slice1[2],slice1[3]), range(slice1[4],slice1[5]), range(slice1[6],slice1[7]))] + # Method 3 Extremely efficient way to generate the list with numpy instead of itertools + quadruplets = np.stack(np.meshgrid(range(slice1[0],slice1[1]), range(slice1[2],slice1[3]), range(slice1[4],slice1[5]), range(slice1[6],slice1[7])),-1).reshape(-1,4) + # quadruplets = np.array(quadruplets, dtype=int) + durationQuadruplets = timer() - start + # print(quadruplets) + # print(durationQuadruplets) + + + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice1[0]) + indx_endA = int(slice1[1]) + indx_startB = int(slice1[2]) + indx_endB = int(slice1[3]) + indx_startC = int(slice1[4]) + indx_endC = int(slice1[5]) + indx_startD = int(slice1[6]) + indx_endD = int(slice1[7]) + + + + ints4c2e = fourCenterTwoElecFastNumba2(quadruplets, bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD) + + return ints4c2e + # returns (AB|CD) + + + def fourCenterTwoElecFastSymmNumbawrap(basis): + # This one uses symmetrically unique quadruplets + # This implementation is based on quadruplets, i.e., instead of running loops on (ij|kl), we can simply generate a list of indices(quadruplets) + # by using np.stack. Why is this efficient? Because this allows more efficient parallelization as the prange of Numba is only being used once over + # a relatively larger list rather than 4 different pranges over smaller lists. + # This is robust Numba implementation + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the electron-electron Coulomb potential matrix for a given basis object and mol object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # https://chemistry.stackexchange.com/questions/82532/practical-differences-between-storing-2-electron-integrals-and-calculating-them + # Density matrix based screening Section (5.1.2): https://www.diva-portal.org/smash/get/diva2:740301/FULLTEXT02.pdf + # Lots of notes on screening and efficiencies (3.3 pg 31): https://www.zora.uzh.ch/id/eprint/44716/1/Diss.123456.pdf + # In the above resource in section 3.4 it also says that storing in 64 bit floating point precision is usually not required. + # So, the storage requirements can be reduced by 4 to 8 times. + + + # This function calculates the 4c2e integrals for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao,0,basis.bfs_nao] + + + + #Get a list of quadruplets + #The quadruplets list is just a combinations of the i,j,k,l indices for the BFs + # durationQuadruplets = 0.0 + # start = timer() + quadruplets = [] + n=basis.bfs_nao + size=int(n*(n+1)*(n*n+n+2)/8) + # print(size) + quadruplets = np.zeros((size,4),dtype=np.int) + print('Quadruplets size in MB: ',quadruplets.nbytes/1e6, flush=True) + quadruplets = genQuadrupletsNumba2(basis.bfs_nao,quadruplets) + # durationQuadruplets=timer()-start + # print('Duration quads: ', durationQuadruplets) + + + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice1[0]) + indx_endA = int(slice1[1]) + indx_startB = int(slice1[2]) + indx_endB = int(slice1[3]) + indx_startC = int(slice1[4]) + indx_endC = int(slice1[5]) + indx_startD = int(slice1[6]) + indx_endD = int(slice1[7]) + + + + ints4c2e = fourCenterTwoElecFastSymmNumba2(quadruplets, bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,indx_startA,indx_endA,indx_startB,indx_endB,indx_startC,indx_endC,indx_startD,indx_endD) + + return ints4c2e + # returns (AB|CD) + + + def overlapMat(basis, slice=None): + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + #S = np.zeros([basis.bfs_nao,basis.bfs_nao]) + S = np.zeros([slice[1]-slice[0],slice[3]-slice[2]]) + #Loop pver BFs + for i in range(slice[0],slice[1]): + for j in range(slice[2],slice[3]): + S[i,j]=0 + I = basis.bfs_coords[i] + J = basis.bfs_coords[j] + IJ = I - J + Ni = basis.bfs_contr_prim_norms[i] + Nj = basis.bfs_contr_prim_norms[j] + lmni = basis.bfs_lmn[i] + lmnj = basis.bfs_lmn[j] + #Loop over primitives + for ik in range(basis.bfs_nprim[i]): + for jk in range(basis.bfs_nprim[j]): + dik = basis.bfs_coeffs[i][ik] + djk = basis.bfs_coeffs[j][jk] + Nik = basis.bfs_prim_norms[i][ik] + Njk = basis.bfs_prim_norms[j][jk] + alphaik = basis.bfs_expnts[i][ik] + alphajk = basis.bfs_expnts[j][jk] + gamma = alphaik + alphajk + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + Sx = Integrals.calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = Integrals.calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = Integrals.calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + temp = dik*djk + temp = temp*Nik*Njk + temp = temp*Ni*Nj + temp = temp*np.exp(-alphaik*alphajk/gamma*sum(IJ**2))*Sx*Sy*Sz + S[i,j] = S[i,j] + temp + return S + + def overlapMatOS(basis, slice=None): + # This function calculates the overlap matrix for a given basis object using the OBARA-SAIKA recurrence relations. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #sys.setrecursionlimit(1500) + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + #S = np.zeros([basis.bfs_nao,basis.bfs_nao]) + S = np.zeros([slice[1]-slice[0],slice[3]-slice[2]]) + #Loop pver BFs + for i in range(slice[0],slice[1]): + for j in range(slice[2],slice[3]): + S[i,j]=0 + I = basis.bfs_coords[i] + J = basis.bfs_coords[j] + IJ = I - J + Ni = basis.bfs_contr_prim_norms[i] + Nj = basis.bfs_contr_prim_norms[j] + lmni = basis.bfs_lmn[i] #i in OS notation + lmnj = basis.bfs_lmn[j] #j in OS notation + #Loop over primitives + for ik in range(basis.bfs_nprim[i]): + for jk in range(basis.bfs_nprim[j]): + alphaik = basis.bfs_expnts[i][ik] + alphajk = basis.bfs_expnts[j][jk] + gamma = alphaik + alphajk #p in OS notation + Kab = np.exp(-alphaik*alphajk/gamma*(IJ**2)) + #if Kab<1.0e-12: + # continue + dik = basis.bfs_coeffs[i][ik] + djk = basis.bfs_coeffs[j][jk] + Nik = basis.bfs_prim_norms[i][ik] + Njk = basis.bfs_prim_norms[j][jk] + + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + + # Sx = Integrals.overlapPrimitivesOS(lmni[0],lmnj[0],gamma,PI[0],PJ[0],Kab[0]) + # Sy = Integrals.overlapPrimitivesOS(lmni[1],lmnj[1],gamma,PI[1],PJ[1],Kab[1]) + # Sz = Integrals.overlapPrimitivesOS(lmni[2],lmnj[2],gamma,PI[2],PJ[2],Kab[2]) + + Sx = Integrals.overlapPrimitivesOS_2(lmni[0],lmnj[0],gamma,PI[0],PJ[0],Kab[0]) + Sy = Integrals.overlapPrimitivesOS_2(lmni[1],lmnj[1],gamma,PI[1],PJ[1],Kab[1]) + Sz = Integrals.overlapPrimitivesOS_2(lmni[2],lmnj[2],gamma,PI[2],PJ[2],Kab[2]) + + temp = dik*djk + temp = temp*Nik*Njk + temp = temp*Ni*Nj + temp = temp*Sx*Sy*Sz + S[i,j] = S[i,j] + temp + return S + + @functools.lru_cache(10) + def overlapPrimitivesOS(i, j, p, PA, PB, Kab): + #Calculates and returns the overlap integral of two Gaussian primitives using OBARA-SAIKA scheme. + #This function uses the recursion technique, which was found to be slow when compiled with NUMBA. + #This could have been used in the overlapMat function, but wasn't. + #But instead it would probably be used to evaluate the kinMat (KE mat). + + if i==0 and j==0: + return Kab*np.sqrt(np.pi/p) + elif i==1 and j==0: + return PA*Integrals.overlapPrimitivesOS(0,0,p,PA,PB,Kab) + elif j==0: + return PA*Integrals.overlapPrimitivesOS(i-1,0,p,PA,PB,Kab) + 1/2/p*((i-1)*Integrals.overlapPrimitivesOS(i-2,0,p,PA,PB,Kab)) + elif i==0 and j==1: + return PB*Integrals.overlapPrimitivesOS(0,0,p,PA,PB,Kab) + elif i==0: + return PB*Integrals.overlapPrimitivesOS(0,j-1,p,PA,PB,Kab) + 1/2/p*((j-1)*Integrals.overlapPrimitivesOS(0,j-2,p,PA,PB,Kab)) + elif i==1 and j==1: + return PA*Integrals.overlapPrimitivesOS(0,1,p,PA,PB,Kab) + 1/2/p*(Integrals.overlapPrimitivesOS(0,0,p,PA,PB,Kab)) + elif i==1: + return PB*Integrals.overlapPrimitivesOS(1,j-1,p,PA,PB,Kab) + 1/2/p*(Integrals.overlapPrimitivesOS(0,j-1,p,PA,PB,Kab) + (j-1)*Integrals.overlapPrimitivesOS(1,j-2,p,PA,PB,Kab)) + elif j==1: + return PA*Integrals.overlapPrimitivesOS(i-1,1,p,PA,PB,Kab) + 1/2/p*((i-1)*Integrals.overlapPrimitivesOS(i-2,1,p,PA,PB,Kab) + Integrals.overlapPrimitivesOS(i-1,0,p,PA,PB,Kab)) + else: + return PA*Integrals.overlapPrimitivesOS(i-1,j,p,PA,PB,Kab) + 1/2/p*((i-1)*Integrals.overlapPrimitivesOS(i-2,j,p,PA,PB,Kab) + j*Integrals.overlapPrimitivesOS(i-1,j-1,p,PA,PB,Kab)) + + def overlapPrimitivesOS_2(i, j, p, PA, PB, Kab): + #Calculates and returns the overlap integral of two Gaussian primitives using OBARA-SAIKA scheme. + #This function uses loops instead fo recursion of function. + #This could have been used in the overlapMat function, but wasn't. + #But instead it would probably be used to evaluate the kinMat (KE mat). + + S = np.empty((i+3,j+3)) + S[0,:] = 0.0 + S[:,0] = 0.0 + S[1,1] = Kab*np.sqrt(np.pi/p) + for ii in range(1,i+2): + for jj in range(1,j+2): + # S[ii+2,jj+1] = PA*S[ii+1,jj+1] + 0.5/p*((ii+1)*S[ii,jj+1] + (jj+1)*S[ii+1,jj]) + # S[ii+1,jj+2] = PB*S[ii+1,jj+1] + 0.5/p*((ii+1)*S[ii,jj+1] + (jj+1)*S[ii+1,jj]) + S[ii+1,jj] = PA*S[ii,jj] + 0.5/p*((ii-1)*S[ii-1,jj] + (jj-1)*S[ii,jj-1]) + S[ii,jj+1] = PB*S[ii,jj] + 0.5/p*((ii-1)*S[ii-1,jj] + (jj-1)*S[ii,jj-1]) + + + Sij = S[i+1,j+1] + return Sij + + + + + + def overlapMatNumba(basis, slice=None): + #This is a semi-numba implementation. + #Basically, the function is the same as before (pure python) except + #that calcS and c2k are Numba versions + + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #If the user doesn't provide a slice then calculate the complete overlap matrix fora ll the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + #S = np.zeros([basis.bfs_nao,basis.bfs_nao]) + S = np.zeros([slice[1]-slice[0],slice[3]-slice[2]]) + for i in range(slice[0],slice[1]): + for j in range(slice[2],slice[3]): + S[i,j]=0 + I = basis.bfs_coords[i] + J = basis.bfs_coords[j] + IJ = I - J + Ni = basis.bfs_contr_prim_norms[i] + Nj = basis.bfs_contr_prim_norms[j] + lmni = basis.bfs_lmn[i] + lmnj = basis.bfs_lmn[j] + for ik in range(basis.bfs_nprim[i]): + for jk in range(basis.bfs_nprim[j]): + dik = basis.bfs_coeffs[i][ik] + djk = basis.bfs_coeffs[j][jk] + Nik = basis.bfs_prim_norms[i][ik] + Njk = basis.bfs_prim_norms[j][jk] + alphaik = basis.bfs_expnts[i][ik] + alphajk = basis.bfs_expnts[j][jk] + gamma = alphaik + alphajk + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + Sx = calcSNumba(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcSNumba(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcSNumba(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + temp = dik*djk + temp = temp*Nik*Njk + temp = temp*Ni*Nj + temp = temp*np.exp(-alphaik*alphajk/gamma*sum(IJ**2))*Sx*Sy*Sz + S[i,j] = S[i,j] + temp + return S + + def overlapMatSymmNumbawrap(basis): + #This is robust Numba implementation + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice1[0]) + b = int(slice1[1]) + c = int(slice1[2]) + d = int(slice1[3]) + + #start=timer() + S = overlapMatSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + #duration = timer() - start + #print('Duration Inside: ',duration) + return S + + def overlapMatNumbawrap(basis, slice1=None): + #This is robust Numba implementation + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice1==None: + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice1[0]) + b = int(slice1[1]) + c = int(slice1[2]) + d = int(slice1[3]) + + #start=timer() + S = overlapMatNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + #duration = timer() - start + #print('Duration Inside: ',duration) + return S + + def overlapMatSymmCwrap(basis): + _liboverlap = ctypes.CDLL('/Users/admin/Python/FDE/crysxdft/overlap.so') + _liboverlap.overlapMat.argtypes = (ctypes.c_int, ctypes.c_int, + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=2, + flags='C_CONTIGUOUS' + ), + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=1, + flags='C_CONTIGUOUS' + ), + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=2, + flags='C_CONTIGUOUS' + ), + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=1, + flags='C_CONTIGUOUS' + ), + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=2, + flags='C_CONTIGUOUS' + ), + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=2, + flags='C_CONTIGUOUS' + ), + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=2, + flags='C_CONTIGUOUS' + ), + np.ctypeslib.ndpointer(dtype=np.float64, + ndim=2, + flags='C_CONTIGUOUS' + ) + ) + _liboverlap.overlapMat.restype = None + start=timer() + #This is robust Numba implementation + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + # print(bfs_coords) + # exit() + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn], dtype=np.float64) + bfs_nprim = np.array([basis.bfs_nprim], dtype=np.float64) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice1[0]) + b = int(slice1[1]) + c = int(slice1[2]) + d = int(slice1[3]) + + S = np.zeros((basis.bfs_nao, basis.bfs_nao), dtype= np.float64) + _liboverlap.overlapMat(basis.bfs_nao, maxnprim, bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, S) + #S = overlapMatNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + duration = timer() - start + print('Duration using C (serial) for overlap matrix: ',duration, flush=True) + return S + + def overlapMatOSNumbawrap(basis, slice1=None): + #This is robust Numba implementation + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice1==None: + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice1[0]) + b = int(slice1[1]) + c = int(slice1[2]) + d = int(slice1[3]) + + #start=timer() + S = overlapMatOSNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + #duration = timer() - start + #print('Duration Inside: ',duration) + return S + + def overlapMatNumerical(basis, coords, weights, slice=None): + #Calculates the overlap matrix numerically on a given grid. + # coords - cooridnates of grid points (m x 3) array + # weights - weights of grid points (m) array + #If the user doesn't provide a slice then calculate the complete overlap matrix fora ll the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + #S = np.zeros([basis.bfs_nao,basis.bfs_nao]) + S = np.zeros([slice[1]-slice[0],slice[3]-slice[2]]) + + blocksize = 50000 + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + for iblock in range(nblocks+1): + offset = iblock*blocksize + #rho_block = rho[offset : min(offset+blocksize,ngrids)] + #ao_value_block = ao_value[offset : min(offset+blocksize,ngrids)] + weights_block = weights[offset : min(offset+blocksize,ngrids)] + coords_block = coords[offset : min(offset+blocksize,ngrids)] + + #BF values at grid points (m x nbf) + # bf_values = Integrals.evalBFs(basis, coords) + bf_values = Integrals.evalBFsNumbawrap(basis, coords_block) + #Scale them with weights + bf_values = bf_values.T*np.sqrt(weights_block) + bf_values = bf_values.T + # S = np.einsum('mi,mj->ij',bf_values,bf_values) + S += contract('mi,mj->ij',bf_values,bf_values) + + return S + + def nucMatNumerical(basis, coords, weights, mol, slice=None): + #Calculates the overlap matrix numerically on a given grid. + # coords - cooridnates of grid points (m x 3) array + # weights - weights of grid points (m) array + #If the user doesn't provide a slice then calculate the complete overlap matrix fora ll the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + #S = np.zeros([basis.bfs_nao,basis.bfs_nao]) + Vnuc = np.zeros([slice[1]-slice[0],slice[3]-slice[2]]) + + blocksize = 50000 + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + for iblock in range(nblocks+1): + offset = iblock*blocksize + #rho_block = rho[offset : min(offset+blocksize,ngrids)] + #ao_value_block = ao_value[offset : min(offset+blocksize,ngrids)] + weights_block = weights[offset : min(offset+blocksize,ngrids)] + coords_block = coords[offset : min(offset+blocksize,ngrids)] + + #BF values at grid points (m x nbf) + # bf_values = Integrals.evalBFs(basis, coords) + bf_values = Integrals.evalBFsNumbawrap(basis, coords_block) + #Scale them with weights + bf_values = bf_values.T*np.sqrt(weights_block) + bf_values = bf_values.T + # Loop over nuclei + for iatom in range(mol.natoms): + Rc = mol.coordsBohrs[iatom] + Zc = mol.Zcharges[iatom] + pot = -Zc/np.linalg.norm(coords_block-Rc,ord=2,axis=1) #https://stackoverflow.com/questions/1401712/how-can-the-euclidean-distance-be-calculated-with-numpy + + Vnuc += contract('mi,m,mj->ij',bf_values,pot,bf_values) + + return Vnuc + + + def kinMatSymmNumbawrap(basis): + #This is robust Numba implementation + # SYmmetric version of the normal function + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice1[0]) + b = int(slice1[1]) + c = int(slice1[2]) + d = int(slice1[3]) + + #start=timer() + T = kinMatSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + #duration = timer() - start + #print('Duration Inside: ',duration) + return T + + def kinMatNumbawrap(basis, slice1=None): + #This is robust Numba implementation + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice1==None: + slice1 = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice1[0]) + b = int(slice1[1]) + c = int(slice1[2]) + d = int(slice1[3]) + + #start=timer() + T = kinMatNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d) + #duration = timer() - start + #print('Duration Inside: ',duration) + return T + + def nucMatNumbawrap(basis, mol, slice=None): + #This is robust Numba implementation + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the nuclear matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + coordsBohrs = np.array([mol.coordsBohrs]) + Z = np.array([mol.Zcharges]) + natoms = mol.natoms + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + #If the user doesn't provide a slice then calculate the complete overlap matrix for all the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + #start=timer() + V = nucMatNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d, Z[0], coordsBohrs[0], natoms) + #duration = timer() - start + #print('Duration Inside: ',duration) + return V + + def nucMatSymmNumbawrap(basis, mol): + #Symmetric variant + #This is robust Numba implementation + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the nuclear matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + coordsBohrs = np.array([mol.coordsBohrs]) + Z = np.array([mol.Zcharges]) + natoms = mol.natoms + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + #start=timer() + V = nucMatSymmNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,a,b,c,d, Z[0], coordsBohrs[0], natoms) + #duration = timer() - start + #print('Duration Inside: ',duration) + return V + + def overlapPrimitives(alphaA, coordA, lmnA, alphaB, coordB, lmnB): + #Calculates and returns the overlap integral of two Gaussian primitives. + #This could have been used in the overlapMat function, but wasn't. + #But instead it would probably be used to evaluate the kinMat (KE mat). + + AB = coordA - coordB + gamma = alphaA + alphaB + P = (alphaA*coordA + alphaB*coordB)/gamma + PA = P - coordA + PB = P - coordB + Sx = Integrals.calcS(lmnA[0],lmnB[0],gamma,PA[0],PB[0]) + Sy = Integrals.calcS(lmnA[1],lmnB[1],gamma,PA[1],PB[1]) + Sz = Integrals.calcS(lmnA[2],lmnB[2],gamma,PA[2],PB[2]) + out = np.exp(-alphaA*alphaB/gamma*sum(AB**2))*Sx*Sy*Sz + + return out + + def kinMat(basis, slice=None): + # This function calculates the kinetic matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + #If the user doesn't provide a slice then calculate the complete kinetic matrix for all the BFs + if slice==None: + slice = [0,basis.bfs_nao,0,basis.bfs_nao] + T = np.zeros([slice[1]-slice[0],slice[3]-slice[2]]) + for i in range(slice[0],slice[1]): + for j in range(slice[2],slice[3]): + T[i,j]=0 + I = basis.bfs_coords[i] + J = basis.bfs_coords[j] + IJ = I - J + Ni = basis.bfs_contr_prim_norms[i] + Nj = basis.bfs_contr_prim_norms[j] + lmni = basis.bfs_lmn[i] + lmnj = basis.bfs_lmn[j] + for ik in range(basis.bfs_nprim[i]): + for jk in range(basis.bfs_nprim[j]): + dik = basis.bfs_coeffs[i][ik] + djk = basis.bfs_coeffs[j][jk] + Nik = basis.bfs_prim_norms[i][ik] + Njk = basis.bfs_prim_norms[j][jk] + alphaik = basis.bfs_expnts[i][ik] + alphajk = basis.bfs_expnts[j][jk] + temp = dik*djk #coeff of primitives as read from basis set + temp = temp*Nik*Njk #normalization factors of primitives + temp = temp*Ni*Nj #normalization factor of the contraction of primitives + + overlap1 = Integrals.overlapPrimitives(alphaik, I, lmni, alphajk, J, lmnj) + overlap2 = Integrals.overlapPrimitives(alphaik, I, lmni, alphajk, J, [lmnj[0]+2,lmnj[1],lmnj[2]]) + overlap3 = Integrals.overlapPrimitives(alphaik, I, lmni, alphajk, J, [lmnj[0],lmnj[1]+2,lmnj[2]]) + overlap4 = Integrals.overlapPrimitives(alphaik, I, lmni, alphajk, J, [lmnj[0],lmnj[1],lmnj[2]+2]) + overlap5 = Integrals.overlapPrimitives(alphaik, I, lmni, alphajk, J, [lmnj[0]-2,lmnj[1],lmnj[2]]) + overlap6 = Integrals.overlapPrimitives(alphaik, I, lmni, alphajk, J, [lmnj[0],lmnj[1]-2,lmnj[2]]) + overlap7 = Integrals.overlapPrimitives(alphaik, I, lmni, alphajk, J, [lmnj[0],lmnj[1],lmnj[2]-2]) + + part1 = overlap1*alphajk*(2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + part2 = 2*alphajk**2*(overlap2+overlap3+overlap4) + part3 = (lmnj[0]*(lmnj[0]-1))*overlap5 + part4 = (lmnj[1]*(lmnj[1]-1))*overlap6 + part5 = (lmnj[2]*(lmnj[2]-1))*overlap7 + + result = temp*(part1 - part2 - 0.5*(part3+part4+part5)) + + T[i,j] = T[i,j] + result + return T + + def evalGTO(alpha, coeff, coordCenter, lmn, coord): + #This function evaluates the value of a given Gaussian primitive + # with given values of alpha (exponent), coefficient, and angular momentum + # centered at 'coordCenter' (3 comp, numpy array). The value is calculated at + # a given 'coord'. + + # alpha = float(alpha) + # coeff = float(coeff) + # coordCenter = np.float_(coordCenter) + # lmn = np.float_(lmn) + # coord = np.float_(coord) + + value = coeff*((coord[0]-coordCenter[0])**lmn[0]*(coord[1]-coordCenter[1])**lmn[1]*(coord[2]-coordCenter[2])**lmn[2])*np.exp(-alpha*((coord[0]-coordCenter[0])**2+(coord[1]-coordCenter[1])**2+(coord[2]-coordCenter[2])**2)) + + return value + + def evalGTOautograd(coordx, coordy, coordz, alpha, coeff, coordCenterx, coordCentery, coordCenterz, lmn): + #This function evaluates the value of a given Gaussian primitive + # with given values of alpha (exponent), coefficient, and angular momentum + # centered at 'coordCenter' (3 comp, numpy array). The value is calculated at + # a given 'coord'. + + # Although, this function uses autograd, it would be better to use explicit expressions for derivatives. + # As these can then be used with NUMBA. + # The following are the derivative expressions evaluated using Wolfram alpha + # First derivative wrt x: + # https://www.wolframalpha.com/input/?i=d%28x%5El+y%5Em+z%5En+exp%28-alpha+%28%28x-a%29%5E2+%2B+%28y-b%29%5E2+%2B+%28z-c%29%5E2%29%29%29%2Fdx + # Second derivative wrt x: + # https://www.wolframalpha.com/input/?i=d2%28x%5El+y%5Em+z%5En+exp%28-alpha+%28%28x-a%29%5E2+%2B+%28y-b%29%5E2+%2B+%28z-c%29%5E2%29%29%29%2Fdx2 + + value = coeff*((coordx-coordCenterx)**lmn[0]*(coordy-coordCentery)**lmn[1]*(coordz-coordCenterz)**lmn[2])*npautograd.exp(-alpha*((coordx-coordCenterx)**2+(coordy-coordCentery)**2+(coordz-coordCenterz)**2)) + + return value + + def evalBFi(basis, i, coord): + #This function evaluates the value of a given Basis function at a given grid point (coord) + #'coord' is a 3 element 1d-array + value = 0.0 + coordi = basis.bfs_coords[i] + Ni = basis.bfs_contr_prim_norms[i] + lmni = basis.bfs_lmn[i] + # print(lmni) + #Loop over primitives + for ik in range(basis.bfs_nprim[i]): + dik = basis.bfs_coeffs[i][ik] + Nik = basis.bfs_prim_norms[i][ik] + alphaik = basis.bfs_expnts[i][ik] + value = value + Integrals.evalGTO(alphaik, Ni*Nik*dik, coordi, lmni, coord) + # print(Ni*Nik*dik) + # print(Integrals.evalGTO(alphaik, Ni*Nik*dik, coordi, lmni, coord)) + + + return value + + + + def evalBFs(basis, coord): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = basis.bfs_nao + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + #Loop over grid points + for k in range(ncoord): + #Loop over BFs + for i in range(nao): + value = 0.0 + coordi = basis.bfs_coords[i] + Ni = basis.bfs_contr_prim_norms[i] + lmni = basis.bfs_lmn[i] + for ik in range(basis.bfs_nprim[i]): + dik = basis.bfs_coeffs[i][ik] + Nik = basis.bfs_prim_norms[i][ik] + alphaik = basis.bfs_expnts[i][ik] + value = value + Integrals.evalGTO(alphaik, Ni*Nik*dik, coordi, lmni, coord[k]) + result[k,i] = value + #result[k,i] = Integrals.evalBFi(basis,i,coord[k]) + + + return result + + def evalBFsNumbawrap(basis, coord, parallel=True, non_zero_indices=None): + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + + if parallel: + if non_zero_indices is not None: + bf_values = evalBFsSparseNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord, non_zero_indices) + else: + bf_values = evalBFsNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + else: + if non_zero_indices is not None: + bf_values = evalBFsSparse_serialNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord, non_zero_indices) + else: + bf_values = evalBFs_serialNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + return bf_values + + def evalBFsgradNumbawrap(basis, coord, deriv=1): + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + bf_grad_values = evalBFsgradNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coord) + + return bf_grad_values + + def evalBFsandgradNumbawrap(basis, coord, deriv=1): + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomodate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + + # bf_grad_values = evalBFsandgradNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coord) + bf_values, bf_grad_values = evalBFsandgradNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + + # return bf_grad_values + return bf_values, bf_grad_values + + + + + def evalRhoi(basis, densmat, coord): + # Evaluates the value of density at a given point ('coord') + # For this we need the density matrix as well as the information + # the basis functions in the basis object. + # rho at the grid point m is given as: + # \rho^m = \sum_{\mu}\sum_{\nu} D_{\mu \nu} \mu^m \nu^m + rho = 0.0 + #Loop over BFs + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nao): + mu = evalBFi(basis, i, coord) + nu = evalBFi(basis, j, coord) + rho = rho + densmat[i,j]*mu*nu + + return rho + + def evalRho(basis, densmat, coords): + # Evaluates the value of density at a given grid ('coord') nx3 array + # For this we need the density matrix as well as the information + # the basis functions in the basis object. + # rho at the grid point m is given as: + # \rho^m = \sum_{\mu}\sum_{\nu} D_{\mu \nu} \mu^m \nu^m + rho = np.zeros((coords.shape[0])) + bf_values = Integrals.evalBFs(basis, coords) + #Loop over grid points + # for m in range(coords.shape[0]): + # #Loop over BFs + # for i in range(basis.bfs_nao): + # for j in range(basis.bfs_nao): + # mu = bf_values[m,i] + # nu = bf_values[m,j] + # rho[m] = rho[m] + densmat[i,j]*mu*nu + + # Instead of the above loops, the performance can be greatly (drastically) 4-5 times improved with einsum + # But still extreeemely slower (at least more than 100 times) than the Numba version + # This goes on to show the power of NUMBA especially when loops are concerned. + rho = np.einsum('ij,mi,mj->m',densmat,bf_values,bf_values) + #TODO What if we save some things that can be reused in SCF iterations. + #For example the bf_values should be calculated only once at the start of SCF. + #Similarly one should look for any other such optimizaitons that can be made. + + return rho + + def evalRhoNumbawrap(basis, densmat, coords): + # Evaluates the value of density at a given grid ('coord') nx3 array + # For this we need the density matrix as well as the information + # the basis functions in the basis object. + # rho at the grid point m is given as: + # \rho^m = \sum_{\mu}\sum_{\nu} D_{\mu \nu} \mu^m \nu^m + bf_values = Integrals.evalBFsNumbawrap(basis, coords) + + rho = evalRhoNumba2(bf_values, densmat) + + return rho + + def funcgrad(func, partial, deriv=1): + #func: the function whose derivative is required + #deriv: the order of derivative + for i in range(deriv): + func = grad(func, partial) + return func + + def evalBFigrad(basis, i, coord, deriv=1): + #This function evaluates the value of the derivative of a given Basis function at a given grid point (coord) + #'coord' is a 3 element 1d-array + value = 0.0 + coordi = basis.bfs_coords[i] + Ni = basis.bfs_contr_prim_norms[i] + lmni = basis.bfs_lmn[i] + # print(lmni) + #Loop over primitives + for ik in range(basis.bfs_nprim[i]): + dik = basis.bfs_coeffs[i][ik] + Nik = basis.bfs_prim_norms[i][ik] + alphaik = basis.bfs_expnts[i][ik] + gradGTO = Integrals.funcgrad(Integrals.evalGTO, deriv) + value = value + gradGTO(alphaik, Ni*Nik*dik, coordi, lmni, coord) + # print(Ni*Nik*dik) + # print(Integrals.evalGTO(alphaik, Ni*Nik*dik, coordi, lmni, coord)) + + + return value + + def evalBFsgrad(basis, coord, deriv=1): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = basis.bfs_nao + ncoord = coord.shape[0] + if deriv==1: + result = np.zeros((3, ncoord, nao)) + #Loop over BFs + for i in range(nao): + coordi = basis.bfs_coords[i] + Ni = basis.bfs_contr_prim_norms[i] + lmni = basis.bfs_lmn[i] + for ik in range(basis.bfs_nprim[i]): + dik = basis.bfs_coeffs[i][ik] + Nik = basis.bfs_prim_norms[i][ik] + alphaik = basis.bfs_expnts[i][ik] + # gradGTOx = grad(Integrals.evalGTOautograd, 0) + # gradGTOy = grad(Integrals.evalGTOautograd, 1) + # gradGTOz = grad(Integrals.evalGTOautograd, 2) + gradGTOx = Integrals.funcgrad(Integrals.evalGTOautograd, 0, deriv=1) + gradGTOy = Integrals.funcgrad(Integrals.evalGTOautograd, 1, deriv=1) + gradGTOz = Integrals.funcgrad(Integrals.evalGTOautograd, 2, deriv=1) + for k in range(ncoord): + value = gradGTOx(*coord[k], alphaik, Ni*Nik*dik, *coordi, lmni) + result[0, k,i] = result[0, k,i] + value + value = gradGTOy(*coord[k], alphaik, Ni*Nik*dik, *coordi, lmni) + result[1, k,i] = result[1, k,i] + value + value = gradGTOz(*coord[k], alphaik, Ni*Nik*dik, *coordi, lmni) + result[2, k,i] = result[2, k,i] + value + + return result + + + + def eval_dens_func2(basis, dmat, weights, coords, funcid=[1,7], moCoeff=None, moOcc=None, spin=0, rho_grid_old=0, blocksize=50000, debug=False, list_nonzero_indices=None, count_nonzero_indices=None): + # This uses blocks + # Stable + Memory Efficient and approx 3 times slower than eval_dens_func3 + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #This function uses the divide and conquer approach to calculate the required stuff. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + + + + #OUTPUT + #Functional energy + efunc = 0.0 + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + v = np.zeros((basis.bfs_nao, basis.bfs_nao)) + #TODO it only works for LDA functionals for now. + #Need to make it work for GGA, Hybrid, range-separated Hybrid and MetaGGA functionals as well. + + #Calculate number of blocks/batches + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + nelec = 0.0 + + if list_nonzero_indices is not None: + dmat_orig = dmat + + # fig = plt.figure() + # ax = fig.add_subplot(111, projection='3d') + # ax = Axes3D(fig) + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to evalbfnumba1 faster by skipping the mediator evalbfnumbawrap function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = evalBFsNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + + + + # OPT EINSUM STUFF TO GENERATE AN EXPRESSION AND PATH ONCE AND USE IT AGAIN + # eq = 'ij,mi,mj->m' + # # mark the first arrays as constant + # constant = [0] + # # supplied ops are now mix of shapes and arrays + # ops = dmat, (ngrids, basis.bfs_nao), (ngrids, basis.bfs_nao) + # expr_rho = contract_expression(eq, *ops, constants=constant) + + + # Sparse stuff + # dmat[np.abs(dmat) < 1.0E-10] = 0 + # dmat_sp = sparse.COO(dmat) + + # eq = 'mi,ij,mj->m' + # # mark the first arrays as constant + # constant = [0] + # # supplied ops are now mix of shapes and arrays + # ops = dmat, (ngrids, basis.bfs_nao), (ngrids, basis.bfs_nao) + # expr_rho = contract_expression(eq, *ops, constants=constant) + + # print('Number of blocks: ', nblocks) + + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + + # print('\n\n------------------------------------------------------') + # print('Exchange-Correlation Functional') + # print('------------------------------------------------------\n') + # print('XC Functional IDs supplied: ', funcid) + # print('\n\nDescription of exchange functional: \n') + # print('The Exchange function belongs to the family:', xc_family_dict[x_family_code]) + # print(funcx.describe()) + # print('\n\nDescription of correlation functional: \n') + # print(' The Correlation function belongs to the family:', xc_family_dict[c_family_code]) + # print(funcc.describe()) + # print('------------------------------------------------------\n') + # print('\n\n') + + + # def get_ordered_list(points, x, y, z): + # points.sort(key = lambda p: (p[0] - x)**2 + (p[1] - y)**2 + (p[2] - z)**2) + # # print(points[0:10]) + # return points + + # coords_weights = np.c_[coords, weights] + + # coords_weights = np.array(get_ordered_list(coords_weights.tolist(), min(coords[:,0]), min(coords[:,1]), min(coords[:,2]))) + # print(min(coords[:,0])) + # print(min(coords[:,1])) + # print(min(coords[:,2])) + + # print(max(coords[:,0])) + # print(max(coords[:,1])) + # print(max(coords[:,2])) + + # exit() + # print(coords[:,0]) + # ax.scatter(coords[:,0], coords[:,1], 0.0) + # plt.show() + for iblock in range(nblocks+1): + offset = iblock*blocksize + + weights_block = weights[offset : min(offset+blocksize,ngrids)] + coords_block = coords[offset : min(offset+blocksize,ngrids)] + + if list_nonzero_indices is not None: + non_zero_indices = list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]] + # Get the subset of density matrix corresponding to the siginificant basis functions + dmat = dmat_orig[np.ix_(non_zero_indices, non_zero_indices)] + + # weights_block = coords_weights[offset : min(offset+blocksize,ngrids),3] + # coords_block = coords_weights[offset : min(offset+blocksize,ngrids),0:3] + # fig = plt.figure() + # ax = fig.add_subplot(111, projection='3d') + # ax = Axes3D(fig) + # ax.scatter(coords_block[:,0], coords_block[:,1], coords_block[:,2]) + # ax.set_xlabel('x') + # ax.set_ylabel('y') + # ax.set_zlabel('z') + # ax.scatter(coords[:,0], coords[:,1], coords[:,2]) + # plt.show() + + + # print(coords_block.shape) + # print(np.max(coords_block[:,0])) + # print(np.max(coords_block[:,1])) + # print(np.max(coords_block[:,2])) + # print(np.min(coords_block[:,0])) + # print(np.min(coords_block[:,1])) + # print(np.min(coords_block[:,2])) + + # exit() + + # Evaluating the BF values on grid points, takes up a lot of memory which + # which leads to problems for large systems(not in terms of nbfs but in terms of natoms) + # Because large number of atoms or spatial coverage leads to a very large grid. + # So we can try to see how is the performance if everything is evaluated for grid blocks. + # UPDATE: Evaluating AO values and everything else as well inside the + # blocks loop offered significant!!! improvement in speed as well as memory used was + # extremely low for large systems as well. + # So, this should be final. Everything is calculated fairly fast. + # The V calculation takes the longest. + # Benchmark for Cholesterol.xyz with def2-TZVPP basis (PySCF 253 sec, CrysX 578 sec) + # Benchmark for Cholesterol.xyz with def2-TZVPP basis (PySCF 1215 sec, CrysX 2673 sec out of which V took 2500 sec) + # Duration for AO values: 37.74370314400039 + # Duration for Rho at grid points: 19.064996759999076 + # Duration for LibXC computaitons at grid points: 0.06629791900036253 + # Duration for calculation of total density functional energy: 0.12889835499981928 + # Duration for calculation of F: 0.0027878710004642926 + # Duration for calculation of z : 10.410915866001005 + # Duration for V: 511.2656810230003 + # Seems like the calculaiotn of AO values and V could use some further optimization. + # Although, it is unclear if it it is possible or not. + if debug: + startAO = timer() + if NUMBA_EXISTS: + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + # ao_value_block = Integrals.evalBFsNumbawrap(basis, coords_block) + if list_nonzero_indices is not None: + ao_value_block = evalBFsSparseNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block, non_zero_indices) + else: + ao_value_block = evalBFsNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + # nonzero_indices, count = nonZeroBFIndicesNumba2(coords_block, ao_value_block, 1e-10) + # if debug: + # print('Number of non-zero bfs in this batch: ', count) + # ao_value_block, rho_block = evalBFsandRhoNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block, dmat) + + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # ao_value_block = Integrals.evalBFsNumbawrap(basis, coords_block) + # ao_values_grad_block = Integrals.evalBFsgradNumbawrap(basis, coords_block, deriv=1) + + # Calculating ao values and gradients together, didn't really do much improvement in computational speed + ao_value_block, ao_values_grad_block = Integrals.evalBFsandgradNumbawrap(basis, coords_block, deriv=1) + + # ao_value_block = ao_values_and_grad_block[0,:,:] + # ao_values_grad_block = ao_values_and_grad_block[1:4,:,:] + + else: + ao_value_block = Integrals.evalBFs(basis, coords_block) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + ao_values_grad_block = Integrals.evalBFsgrad(basis, coords_block, deriv=1) + if debug: + durationAO = durationAO + timer() - startAO + print('Duration for AO values: ', durationAO) + + #UPDATE: Calculating rho in blocks seems to offer either the same speed + # or most likely slower than just calculating the Rho altogether. + #However, this would still be useful in cases where grids are too large to fit in memory. + #So, it would be preferable that it works at same speed at before and not slower. + if debug: + startRho = timer() + if NUMBA_EXISTS: + # Although, in intial test the numpy einsum was deemed to be slow, + # which is why the Numba version was created. + # But now in real application of DFT, einsum is at least 3-5 times faster. + # rho_block = np.einsum('ij,mi,mj->m',dmat,ao_value_block,ao_value_block) + if moOcc is not None: + pos = moOcc > 1.0E-12 + if pos.sum()>0: + cpos = contract('ij,j->ij', moCoeff[:,pos], np.sqrt(moOcc[pos])) + # rho_block = contract('ij,mi,mj->m',cpos,ao_value_block,ao_value_block[:,pos]) + tempC = contract('ij,mi->mj',cpos,ao_value_block) + rho_block = contract('mi,mi->m', tempC, tempC) + + else: + # if xctype == 'LDA' or xctype == 'HF': + rho_block = np.zeros(blocksize) + neg = moOcc < -1.0E-12 + if neg.sum() > 0: + cneg = contract('ij,j->ij', moCoeff[:,neg], np.sqrt(-moOcc[neg])) + rho_block = contract('ij,mi,mj->m',cneg,ao_value_block,ao_value_block) + else: + # rho_block = np.zeros(blocksize) + # rho_block = contract('ij,mi,mj->m',dmat,ao_value_block,ao_value_block) + # print(mask.sum) + # maskdmat = np.invert(np.isclose(np.abs(dmat),0.0,atol=1E-12) ) + # print(maskdmat) + # print(dmat[maskdmat].shape) + # rho_block = evalRhoNumba2(ao_value_block[:,maskdmat[0,:]], dmat[maskdmat], coords_block) + # rho_block = contract('ij,mi,mj->m',dmat[maskdmat],ao_value_block[:,maskdmat[0,:]],ao_value_block[:,maskdmat[0,:]]) + # rho_block = contract('ij,mi,mj->m',dmat,ao_value_block,ao_value_block) # Original (pretty fast) + + # Sparse stuff (slows down the program) + # ao_value_block[np.abs(ao_value_block) < 1.0E-8] = 0 + # ao_value_block_sp = sparse.COO(ao_value_block) + + + # rho_block = expr_rho(ao_value_block,ao_value_block) # Probably the fastest uptil now + if list_nonzero_indices is not None: + rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block) # Original (pretty fast) + else: + rho_block = evalRhoNumba2(ao_value_block, dmat) # This is by-far the fastest now <----- + # Some tricks to make the evalrho faster when density matrix is almost converged (Turns out it makes no difference) + # rho_block += rho_grid_old[offset : min(offset+blocksize,ngrids)] + # rho_grid[offset : min(offset+blocksize,ngrids)] = rho_block + + # The following two also offer the same speed as the above + # tempo = dmat @ ao_value_block.T + # rho_block = contract('mi, im -> m', ao_value_block, tempo) + + # The following two also offers the same speed as the above examples + # tempo = ao_value_block @ dmat + # rho_block = contract('mi, mi -> m', ao_value_block, tempo) + + # Sparse version of the above (Extremely slowww (Probably due to the todense call)) + # tempo = (ao_value_block_sp @ dmat_sp) + # rho_block = contract('mi, mi -> m', ao_value_block, tempo.todense()) + + # tempo = dmat @ ao_value_block.T + # rho_block = np.tensordot(ao_value_block, tempo, [1,0]) + + # rho_block = np.tensordot(tempo, ao_value_block.T, axes=1) + + # rho_block = contract('mi,mi->m', ao_value_block, ao_value_block @ dmat) # As fast as using the expressions and constant of opt_einsum + # rho_block = np.diagonal(ao_value_block @ dmat @ ao_value_block.T) # Extremely slowwwwwwwwww! + + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + rho_grad_block_x = contract('ij,mi,mj->m',dmat,ao_values_grad_block[0],ao_value_block)+\ + contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[0]) + rho_grad_block_y = contract('ij,mi,mj->m',dmat,ao_values_grad_block[1],ao_value_block)+\ + contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[1]) + rho_grad_block_z = contract('ij,mi,mj->m',dmat,ao_values_grad_block[2],ao_value_block)+\ + contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[2]) + sigma_block = np.zeros((3,weights_block.shape[0])) + sigma_block[1] = rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2 + else: + rho_block = contract('ij,mi,mj->m',dmat,ao_value_block,ao_value_block) + # rho_block = np.einsum('ij,mi,mj->m',dmat,ao_value_block,ao_value_block) + # rho_block = Integrals.evalRho(basis, dmat, coords_block) + #rho_block = Integrals.evalRho(basis, dmat, coords_block) + if debug: + durationRho = durationRho + timer() - startRho + print('Duration for Rho at grid points: ',durationRho) + + + #TODO + #Although. the XC energy and matrix calculation is now much more optimized than before, + #one more optimization that can be made is to perform the following calculations in blocks. + #i.e divide the rho, weights and ao_values in block os smaller arrays. + #This will reduce the burden on memory as well as offer speed improvements. + + #LibXC stuff + # Exchange + # startLibxc = timer() + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[x_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block[1] + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # startLibxc = timer() + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[c_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block[1] + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # startE = timer() + #ENERGY----------- + e = retx['zk'] + retc['zk'] # Functional values at grid points + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + den = rho_block*weights_block #elementwise multiply + efunc = efunc + np.dot(den, e) #Multiply with functional values at grid points and sum + nelec = nelec + np.sum(den) + # durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + vrho = retx['vrho'] + retc['vrho'] + vsigma = 0 + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma = retx['vsigma'] + if xc_family_dict[c_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma += retc['vsigma'] + + + # startF = timer() + # F = np.multiply(weights_block,vrho[:,0]) #This is fast enough. + v_rho_temp = vrho[:,0] + F = numexpr.evaluate('(weights_block*v_rho_temp)') + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + Ftemp = 2*weights_block*vsigma[:,0] + Fx = Ftemp*rho_grad_block_x + Fy = Ftemp*rho_grad_block_y + Fz = Ftemp*rho_grad_block_z + # Ftemp = 2*np.multiply(weights_block,vsigma.T) + # Fx = Ftemp*rho_grad_block_x + # Fy = Ftemp*rho_grad_block_y + # Fz = Ftemp*rho_grad_block_z + # durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + # startZ = timer() + #TODO: If possible optimize z calculation. It is the slowest part right now + #Tried to do this with NUMBA. But that was slower. + #UPDATE: Using numexpr: Numexpr is faster than einsum. + #NUMEXPR should be used whenever available makes the calculation significantly faster (more than 5 times for C12H12) + if NUMEXPR_EXISTS: + ao_value_block_T = ao_value_block.T + z = numexpr.evaluate('(0.5*F*ao_value_block_T)') + # z = 0.5*np.einsum('m,mi->mi',F,ao_value_block) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + z = z + Fx*ao_values_grad_block[0].T + Fy*ao_values_grad_block[1].T + Fz*ao_values_grad_block[2].T + + # z = z + else: + z = 0.5*np.einsum('m,mi->mi',F,ao_value_block, optimize=True) + #z = 0.5*(np.multiply(F,ao_value.T)).T #This just made it slower Try NUMBA maybe. UPDATE: NUMBA IS 5-10 times slower for C12H12. + #z = calcZ2(F,ao_value) + # durationZ = durationZ + timer() - startZ + # print('Duration for calculation of z : ',durationZ) + # Free memory + F = 0 + ao_value_block_T = 0 + vrho = 0 + + if debug: + startV = timer() + #TODO: If possible optimize this, very slow right now + #UPDATE: After improving the calculaiton time of z using numexpr, + #now this (v) remains the slowest part of this code. + #Perhaps one could try using gemm from blas directly with the help of scipy. + + # v_temp = np.einsum('mi,mj->ij',ao_value_block, z, optimize=True)#.sum(axis=0) + # v_temp = v_temp.sum(axis=0) + + #Dot seems only very slightly faster. Needs more testing. But considering how slow einsum is + #dot should be much faster. + #TODO: An important thing to check in the future is to maybe use an optimized einsum + # here or maybe anywhere else in the code. Optimized einsum: https://github.com/dgasmith/opt_einsum + # TODO: It turns out that numpy is not parallelized on MacOS test machine and neither was pyscf + # which might explain why the calculation of density using numpy was slower. + # This also explains how the performance reached a level equivalent to PySCF. + # So, I need to perform tests with numpy and pyscf parallelised properly. + # v_temp = np.zeros((basis.bfs_nao,basis.bfs_nao)) + # print(mask2.shape) + # print(z.shape) + # print(mask2.ndim) + # print(ao_value_block.shape) + + # print(mask2.sum()) + # print(mask2) + # mask3 = np.outer(mask2, mask2) + + # mask3 = np.outer(np.ones(basis.bfs_nao, dtype=bool), mask2) + # v_temp2 = np.dot(z,ao_value_block[:,mask2]) + # np.putmask(v_temp,mask3,v_temp2) + + # print(v_temp.shape) + # print(v_temp2.shape) + # print(mask3.shape) + # print(mask3.sum()) + + # print(v_temp.sum()) + # x=np.dot(z,ao_value_block) + # print(x.sum()) + + # print(np.abs(v_temp-x)) + # exit() + # print(z.max()) + # print(z.min()) + # print(ao_value_block[:,mask2].max()) + # print(ao_value_block[:,mask2].min()) + # print(z.sum()) + # print(z[mask2,:].sum()) + # print(z.shape) + # print(z[mask2,:].shape) + + # v_temp2 = np.dot(z[maskdmat[0,:],:],ao_value_block[:,maskdmat[0,:]]) + # np.putmask(v_temp,maskdmat,v_temp2) + + # v_temp = np.dot(z,ao_value_block) + # print(z.flags) + # print(ao_value_block.flags) + + # v_temp = calcVtempNumba2(z, ao_value_block, mask, blocksize, basis.bfs_nao) + # print(z.shape) + # print(ao_value_block.shape) + # v_temp = calcVtempNumba2(z.copy(order='F'), ao_value_block.copy(order='F')) + + # v_temp = calcVtempNumba2(z, ao_value_block, basis.bfs_nao) # Almost as fast as the following snippet + # v += v_temp + + # v_temp = z @ ao_value_block # The fastest uptil now + # v_temp += v_temp.T + # v += v_temp + + # Numexpr + v_temp = z @ ao_value_block # The fastest uptil now + # v_temp = np.matmul(z, ao_value_block) + v_temp_T = v_temp.T + if list_nonzero_indices is not None: + v[np.ix_(non_zero_indices, non_zero_indices)] += numexpr.evaluate('(v_temp + v_temp_T)') + else: + v = numexpr.evaluate('(v + v_temp + v_temp_T)') + + # Sparse version (Very slow) + # z[np.abs(z) < 1.0E-10] = 0 + # z_sp = sparse.COO(z) + # v_temp_sp = z_sp @ ao_value_block_sp + # v_temp_sp += v_temp_sp.T + # v += v_temp_sp.todense() + + + + # v_temp = numexpr.evaluate('(z@ao_value_block)') + # v_temp = scipy.linalg.blas.dsyr2k(1.0,z.T,ao_value_block) + # v_temp = scipy.linalg.blas.dgemm(1.0,z,ao_value_block) + # print(z.shape) + # print(ao_value_block.shape) + # v_temp = ao_value_block.T + # v_temp = csc_matrix(ao_value_block.T)@csc_matrix(z) + # v_temp = matMulNumba2(ao_value_block.T,z.T) + # v_temp = contract('mi,mj->ij',ao_value_block, z)#.sum(axis=0) + # v_temp = v_temp.sum(axis=0) + # v_temp += v_temp.T + # v += v_temp + if debug: + durationV = durationV + timer() - startV + print('Duration for V: ',durationV) + + # exit() + + print('Number of electrons: ', nelec) + + return efunc, v#, rho_grid + + # @controller.wrap(limits=1, user_api='blas') + @threadpool_limits.wrap(limits=1, user_api='blas') + def block_dens_func(iblock, blocksize, weights_block, coords_block, ngrids, basis, dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, funcx=None, funcc=None, x_family_code=None, c_family_code=None, xc_family_dict=None): + ### Setting the number of threads explicitly as whoen below doesn't work + ### Therefore use threadpoolctl https://github.com/numpy/numpy/issues/11826 + # https://github.com/joblib/threadpoolctl + # https://stackoverflow.com/questions/29559338/set-max-number-of-threads-at-runtime-on-numpy-openblas + # numexpr.set_num_threads(1) + # set_num_threads(1) # Numba + # os.environ['OMP_NUM_THREADS'] = '1' + # os.environ[""OPENBLAS_NUM_THREADS""] = ""1"" # export OPENBLAS_NUM_THREADS=4 + # os.environ[""MKL_NUM_THREADS""] = ""1"" # export MKL_NUM_THREADS=6 + # os.environ[""VECLIB_MAXIMUM_THREADS""] = ""1"" # export VECLIB_MAXIMUM_THREADS=4 + # os.environ[""NUMEXPR_NUM_THREADS""] = ""1"" # export NUMEXPR_NUM_THREADS=6 + # os.system(""export OMP_NUM_THREADS=1"") + # os.system(""export OPENBLAS_NUM_THREADS=1"") + # os.system(""export MKL_NUM_THREADS=1"") + # os.system(""export NUMEXPR_NUM_THREADS=1"") + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + + if funcx is None: + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + + bfs_coords = bfs_data_as_np_arrays[0] + bfs_contr_prim_norms = bfs_data_as_np_arrays[1] + bfs_nprim = bfs_data_as_np_arrays[2] + bfs_lmn = bfs_data_as_np_arrays[3] + bfs_coeffs = bfs_data_as_np_arrays[4] + bfs_prim_norms = bfs_data_as_np_arrays[5] + bfs_expnts = bfs_data_as_np_arrays[6] + bfs_radius_cutoff = bfs_data_as_np_arrays[7] + # startAO = timer() + # LDA + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + if ao_values is not None: + ao_value_block = ao_values + elif NUMBA_EXISTS: + # ao_value_block = Integrals.evalBFsNumbawrap(basis, coords_block, parallel=False) + if non_zero_indices is not None: + ao_value_block = evalBFsSparse_serialNumba2(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block, non_zero_indices) + else: + ao_value_block = evalBFs_serialNumba2(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + # ao_value_block, rho_block = evalBFsandRho_serialNumba2(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block, dmat) + else: + ao_value_block = Integrals.evalBFs(basis, coords_block) + # durationAO = durationAO + timer() - startAO + # print('Duration for AO values: ', durationAO) + + #UPDATE: Calculating rho in blocks seems to offer either the same speed + # or most likely slower than just calculating the Rho altogether. + #However, this would still be useful in cases where grids are too large to fit in memory. + #So, it would be preferable that it works at same speed at before and not slower. + # startRho = timer() + if NUMBA_EXISTS: + if non_zero_indices is not None: + rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block) # Original (pretty fast) + else: + rho_block = evalRho_serialNumba2(ao_value_block, dmat) # This is by-far the fastest now <----- + else: + rho_block = contract('ij,mi,mj->m',dmat,ao_value_block,ao_value_block) + # rho_block = Integrals.evalRho(basis, dmat, coords_block) + #rho_block = Integrals.evalRho(basis, dmat, coords_block) + # durationRho = durationRho + timer() - startRho + # print('Duration for Rho at grid points: ',durationRho) + + + + #TODO + #Although. the XC energy and matrix calculation is now much more optimized than before, + #one more optimization that can be made is to perform the following calculations in blocks. + #i.e divide the rho, weights and ao_values in block os smaller arrays. + #This will reduce the burden on memory as well as offer speed improvements. + + #LibXC stuff + # Exchange + # startLibxc = timer() + + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # startLibxc = timer() + + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # startE = timer() + #ENERGY----------- + e = retx['zk'] + retc['zk'] # Functional values at grid points + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + den = rho_block*weights_block #elementwise multiply + efunc = np.dot(den, e) #Multiply with functional values at grid points and sum + nelec = np.sum(den) + # durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + vrho = retx['vrho'] + retc['vrho'] + retx = 0 + retc = 0 + func = 0 + startF = timer() + v_rho_temp = vrho[:,0] + F = numexpr.evaluate('(weights_block*v_rho_temp)') + # durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + # startZ = timer() + #TODO: If possible optimize z calculation. It is the slowest part right now + #Tried to do this with NUMBA. But that was slower. + #UPDATE: Using numexpr: Numexpr is faster than einsum. + #NUMEXPR should be used whenever available makes the calculation significantly faster (more than 5 times for C12H12) + if NUMEXPR_EXISTS: + ao_value_block_T = ao_value_block.T + z = numexpr.evaluate('(0.5*F*ao_value_block_T)') + else: + z = 0.5*np.einsum('m,mi->mi',F,ao_value_block, optimize=True) + #z = 0.5*(np.multiply(F,ao_value.T)).T #This just made it slower Try NUMBA maybe. UPDATE: NUMBA IS 5-10 times slower for C12H12. + #z = calcZ2(F,ao_value) + # durationZ = durationZ + timer() - startZ + # Free memory + F = 0 + v_rho_temp = 0 + # print('Duration for calculation of z : ',durationZ) + # startV = timer() + # with threadpool_limits(limits=1, user_api='blas'): + v_temp = z @ ao_value_block # The fastest uptil now + v_temp_T = v_temp.T + v = numexpr.evaluate('(v_temp + v_temp_T)') + + # free up memory + # print(""F size: %0.3f MB"" % (F.nbytes / 1e6)) + # print(""AO block size: %0.3f MB"" % (ao_value_block.nbytes / 1e6)) + # print(""Rho block size: %0.3f MB"" % (rho_block.nbytes / 1e6)) + # print(""z size: %0.3f MB"" % (z.nbytes / 1e6)) + # print(""vrho size: %0.3f MB"" % (vrho.nbytes / 1e6)) + # print(""temp size: %0.3f MB"" % (temp.nbytes / 1e6)) + # print(""Weights block size: %0.3f MB"" % (weights_block.nbytes / 1e6)) + # print(""Coords block size: %0.3f MB"" % (coords_block.nbytes / 1e6)) + # print(""Vxc size: %0.3f MB"" % (v.nbytes / 1e6)) + # print(""dmat size: %0.3f MB"" % (dmat.nbytes / 1e6)) + # memory_usage_sum = (F.nbytes+ao_value_block.nbytes+rho_block.nbytes+z.nbytes+vrho.nbytes+temp.nbytes+weights_block.nbytes+coords_block.nbytes +v.nbytes +dmat.nbytes)/1e6 + # print('\nMemory usage while evaulating one block:'+str( memory_usage_sum) +' MB') + F = 0 + z = 0 + ao_value_block = 0 + rho_block = 0 + temp = 0 + retx = 0 + retc = 0 + vrho = 0 + weights_block=0 + coords_block=0 + func = 0 + dmat = 0 + v_temp_T = 0 + v_temp = 0 + del ao_value_block + del rho_block + del z + del temp + del F + del weights_block + del coords_block + del dmat + del vrho + + # gc.collect() # Too slowww + # Getting % usage of virtual_memory ( 3rd field) + # print('RAM memory % used:', psutil.virtual_memory()[2]) + + + + return efunc, v, nelec + + def eval_dens_func3(basis, dmat, weights, coords, funcid=[1,7], spin=0, ncores=2, blocksize=50000, list_nonzero_indices=None, count_nonzero_indices=None, list_ao_values=None): + # Fast but unstable on my Macbook pro with 16 Gigs of RAM + # Could be a MacOs or my laptop issue (Needs extensive testing) + # This uses parallelized blocks using joblib + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #This function uses the divide and conquer approach to calculate the required stuff. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + + #OUTPUT + #Functional energy + efunc = 0.0 + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + v = np.zeros((basis.bfs_nao, basis.bfs_nao)) + nelec = 0 + + #TODO it only works for LDA functionals for now. + #Need to make it work for GGA, Hybrid, range-separated Hybrid and MetaGGA functionals as well. + + + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + + # print('Number of blocks: ', nblocks) + + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to evalbfnumba1 faster by skipping the mediator evalbfnumbawrap function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = evalBFsNumba2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + bfs_data_as_np_arrays = [bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff] + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + if list_nonzero_indices is not None: + if list_ao_values is not None: + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(Integrals.block_dens_func)(iblock, blocksize, weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], ngrids, basis, dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict) for iblock in range(nblocks+1)) + else: + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(Integrals.block_dens_func)(iblock, blocksize, weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], ngrids, basis, dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict) for iblock in range(nblocks+1)) + else: + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(Integrals.block_dens_func)(iblock, blocksize, weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], ngrids, basis, dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict) for iblock in range(nblocks+1)) + + # print(len(output)) + for iblock in range(0,len(output)): + non_zero_indices = list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]] + efunc += output[iblock][0] + if list_nonzero_indices is not None: + v[np.ix_(non_zero_indices, non_zero_indices)] += output[iblock][1] + else: + v += output[iblock][1] + nelec += output[iblock][2] + # v = numexpr.evaluate('(v + output[iblock][1])') + + + + + print('Number of electrons: ', nelec) + + ####### Free memory + ## The following is very important to prevent memory leaks and also to make sure that the number of + # threads used by the program is same as that specified by the user + # gc.collect() # Avoiding using it for now, as it is usually quite slow, although in this case it might not make much difference + # Anyway, the following also works + output = 0 + non_zero_indices = 0 + coords = 0 + + return efunc, v + + + def nonzero_ao_indices(basis, coords, blocksize, nblocks, ngrids): + bfs_coords = np.array([basis.bfs_coords]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Calculate the value of basis functions for all grid points in batches + # and find the indices of basis functions that have a significant contribution to those batches for each batch + list_nonzero_indices = [] + count_nonzero_indices = [] + # Loop over batches + for iblock in range(nblocks+1): + offset = iblock*blocksize + coords_block = coords[offset : min(offset+blocksize,ngrids)] + nonzero_indices, count = nonZeroBFIndicesNumba2(coords_block, bfs_coords[0], bfs_radius_cutoff) + list_nonzero_indices.append(nonzero_indices) + count_nonzero_indices.append(count) + return list_nonzero_indices, count_nonzero_indices + + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Graphics_old.py",".py","28528","752","# Graphics.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +# This modeule contains some functionalities for visualization of molecules, isosurfaces (density, orbitals, etc.), +# or even analysis (bond lengths, bond angles, etc.) +# A big limitiation of the module is the need for OpenGL. This is not a problem for MacOS or Linux (UBUNTU) +# because there the library can be rather easily installed. However, for Windows, if I remember correctly, some +# DLLs were needed to be downloaded and installed and stuff. Will have to check it again and document it. + +''' +TODO: Startegy for this module: +1. Allow to open the graphics window to visualize the molecule. (Already done) +2. Make sure that when the molecule is rotated or stuff in the graphical window then it only happens in the visualizer and the actual coordinates aren't affected. +3. It would also be good to allow a list of molecules to be visualized. That is, a list of mol objects would be passed and visualized simultaneously. +4. When multiple molecules are opened we should allow the user to select a particular molecule and change it's properties. +5. +''' +import numpy as np +import numpy.linalg as la +import scipy +from . import Mol +from . import Data + + +from OpenGL.GLUT import * +from OpenGL.GLU import * +from OpenGL.GL import * +import platform + +from datetime import datetime +import tkinter as tk +from tkinter import ttk +#from tkinter import * +from tkinter.tix import * +from tkinter.filedialog import askopenfilename +import threading + + +# Unfortunately we are going to need some global static variables here. +# The reason being, we would need some information about the molecule like the +# coordinates, charges, etc. But this information can't really be passed to functions like +# display() because these are just GLUT callback functions and can't be given arguments. +# https://stackoverflow.com/questions/12299295/passing-1-argument-pointer-to-glutdisplayfunc +# Hence we create some global variables now. +xCoord = [] +yCoord = [] +zCoord = [] +atomicNumber = [] +atomicSpecies = [] +totalNumAtoms = 0 +numAtomsSubsystem = [] +maxDistance = 0.0 +bondStart = [] +bondEnd = [] +bondLengths = [] +colorIDs = [] +indexDisplayList = 0 +basicColors = False +_mouse_dragging = False +_previous_mouse_position = None +last_time = 0 +stopGlutMainLoop = False +isOrtho = True +isPerspective = False +isGlutInitialized = False +isGlutOpen = False +width = 700 +height = 700 +aspectRatio = width/height +fieldOfView = 40 +basicColors = False +isSelectionMode = False +eye = [0, 0, -10] +center = [0, 0, 0] +up = [0, 1, 0] +camera = eye, center, up +activeSubsystem = 0 + + +def cursor_pos_callback(xpos, ypos): + print(xpos, ypos) + +def cylinder_between(x1, y1, z1, x2, y2, z2, height, rad): + v = [x2-x1, y2-y1, z2-z1] + axis = (1, 0, 0) if np.hypot(v[0], v[1]) < 0.001 else np.cross(v, (0, 0, 1)) + angle = -np.arctan2(np.hypot(v[0], v[1]), v[2])*180/np.pi + + glPushMatrix() + glTranslate(x1, y1, z1) + glRotate(angle, *axis) + quadratic = gluNewQuadric() + gluCylinder(quadratic, rad, rad, height, 20, 20) + glPopMatrix() + +def calculateBondPositions(): + global xCoord, yCoord, zCoord, atomicNumber, bondStart, bondEnd, bondLengths + bondStart = [] + bondEnd = [] + bondLengths = [] + for i in range(totalNumAtoms): + for j in range(i,totalNumAtoms): + bondLength = calculateBondLength([xCoord[i],yCoord[i],zCoord[i]],[xCoord[j],yCoord[j],zCoord[j]]) + if bondLength<=(float(Data.covalentRadius[atomicNumber[i]])+float(Data.covalentRadius[atomicNumber[j]])): + bondStart.append(i) + bondEnd.append(j) + bondLengths.append(bondLength) + + +def calculateBondLength(posA, posB): + return np.sqrt(np.power(posA[0]-posB[0],2)+np.power(posA[1]-posB[1],2)+np.power(posA[2]-posB[2],2)) + + +def draw_sphere(xyz, radius, color): + global basicColors + # Draws a sphere at a given position, + # with a given radius and color. + glPushMatrix() + color = [i * 1/255 for i in color] + color.append(0.7) + if basicColors: + glColor4f(color[0],color[1],color[2],color[3]) + #print('test if basic was on or not before color selection') + else: + glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,color) + #glMaterialfv(GL_FRONT,GL_DIFFUSE,color) + no_mat = [0.0, 0.0, 0.0, 1.0] + mat_specular = [1.0, 1.0, 1.0, 1.0] + high_shininess = 30.0 + glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular) + glMaterialf(GL_FRONT, GL_SHININESS, high_shininess) + glMaterialfv(GL_FRONT, GL_EMISSION, no_mat) + + # print(xyz) + glTranslate(xyz[0], xyz[1], xyz[2]) + glutSolidSphere(radius, 35, 35) + glPopMatrix() + +def genColorIDs(natoms): + #Generates unique color IDs for the atoms + colorIDs = [] + # print('Color IDs generated!') + i = 1 + for r in range(255): + for g in range(255): + for b in range(255): + colorIDs.append([r,g,b]) + if i==natoms: + return + i = i+1 + print(colorIDs) + return colorIDs + +def drawBonds(): + global xCoord, yCoord, zCoord, atomicNumber, bondStart, bondEnd, bondLengths, basicColors + for i in range(len(bondStart)): + startIndex = bondStart[i] + endIndex = bondEnd[i] + x1 = xCoord[startIndex] + y1 = yCoord[startIndex] + z1 = zCoord[startIndex] + x2 = xCoord[endIndex] + y2 = yCoord[endIndex] + z2 = zCoord[endIndex] + #Draw half the bond with the color of the first atom + if not basicColors: + color = Data.CPKcolorRGB[atomicNumber[startIndex]] + color = [i * 1/255 for i in color] + color.append(1.0) + glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,color) + #glMaterialfv(GL_FRONT,GL_DIFFUSE,color) + no_mat = [0.0, 0.0, 0.0, 1.0] + mat_specular = [1.0, 1.0, 1.0, 1.0] + high_shininess = 30.0 + glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular) + glMaterialf(GL_FRONT, GL_SHININESS, high_shininess) + glMaterialfv(GL_FRONT, GL_EMISSION, no_mat) + cylinder_between(x1, y1, z1, x2, y2, z2, bondLengths[i]/2.0, 0.1) + #Draw the remaining half the bond with the color of the second atom + if not basicColors: + color = Data.CPKcolorRGB[atomicNumber[endIndex]] + color = [i * 1/255 for i in color] + color.append(1.0) + glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,color) + #glMaterialfv(GL_FRONT,GL_DIFFUSE,color) + no_mat = [0.0, 0.0, 0.0, 1.0] + mat_specular = [1.0, 1.0, 1.0, 1.0] + high_shininess = 30.0 + glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular) + glMaterialf(GL_FRONT, GL_SHININESS, high_shininess) + glMaterialfv(GL_FRONT, GL_EMISSION, no_mat) + cylinder_between((x2+x1)/2.0, (y2+y1)/2.0, (z2+z1)/2.0, x2, y2, z2, bondLengths[i]/2.0, 0.1) + +def setOrthographicCamera(): + global maxDistance + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + glOrtho(-maxDistance/2, maxDistance/2, -maxDistance/2, maxDistance/2, -100.0, 100.0) + glMatrixMode(GL_MODELVIEW) + +def setPerspectiveCamera(): + global maxDistance, fieldOfView, aspectRatio, eye, center, up, camera + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + + gluPerspective(fieldOfView,aspectRatio,1,100) + + glMatrixMode(GL_MODELVIEW) + +def setCameraPosition(cam_distance): + global maxDistance, eye, center, up, camera + glLoadIdentity() + eye, center, up = camera + eye[2] = -cam_distance + gluLookAt(eye[0], eye[1], eye[2], + center[0], center[1], center[2], + up[0], up[1], up[2]) + camera = eye, center, up + +def display(): + global isSelectionMode, selectedAtoms, totalNumAtoms, xCoord, yCoord, zCoord, atomicNumber, colorIDs, isOrtho, isPersepective, indexDisplayList, basicColors + + glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) + glPushMatrix() + # if isSelectionMode: + # #Light needs to be disabled while drawing text, to calculate it's color without the influence of light + # glDisable(GL_LIGHTING) + # glDisable(GL_LIGHT0) + # for i in range(len(selectedAtoms)): + # print('teste') + # glRasterPos3d(xCoord[selectedAtoms[i]]+float(atomicRadius[atomicNumber[selectedAtoms[i]]])/2+0.1, yCoord[selectedAtoms[i]], zCoord[selectedAtoms[i]]) + # glColor4f(0.0, 0.0, 0.0, 1.0) + # color = [0,0,0,1] + # #glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,color) + # glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, ord('t')) + # #Light needs to be enabled after drawing text, cuz rest of the atoms and bonds should be calculated with light + # #Or we could try drawing text after the atoms and bonds are drawn and then even if we disbale lights we dont need to renale them maybe + # glEnable(GL_LIGHTING) + # glEnable(GL_LIGHT0) + if basicColors: + #If the atoms are being drawn with basic colors then also disable the light. + #This needed to be added here, because the text stuff required some changes to the lighting stuff. + #So the light related statements in mouse click callback may now be redundant + if isSelectionMode: + glDisable(GL_LIGHTING) + glDisable(GL_LIGHT0) + for i in range(totalNumAtoms): + print(colorIDs) + draw_sphere([xCoord[i],yCoord[i],zCoord[i]],float(Data.atomicRadius[atomicNumber[i]])/2,colorIDs[i]) + else: + # print('here') + for i in range(totalNumAtoms): + draw_sphere([xCoord[i],yCoord[i],zCoord[i]],float(Data.atomicRadius[atomicNumber[i]])/2,Data.CPKcolorRGB[atomicNumber[i]]) + + if isOrtho: + #print('Ortho') + setOrthographicCamera() + elif isPerspective: + #print('Perspective') + setPerspectiveCamera() + drawBonds() + #drawOrbital() + if indexDisplayList !=0: + glCallList(indexDisplayList) + glPopMatrix() + glutSwapBuffers() + return + +def _create_rotation_matrix(angle, x, y, z): + """""" Creates a 3x3 rotation matrix. """""" + if la.norm((x, y, z)) < 0.0001: + return np.eye(3, dtype=np.float32) + x, y, z = np.array((x, y, z))/la.norm((x, y, z)) + matrix = np.zeros((3, 3), dtype=np.float32) + cos = np.cos(angle) + sin = np.sin(angle) + matrix[0, 0] = x*x*(1-cos)+cos + matrix[1, 0] = x*y*(1-cos)+sin*z + matrix[0, 1] = x*y*(1-cos)-sin*z + matrix[2, 0] = x*z*(1-cos)-sin*y + matrix[0, 2] = x*z*(1-cos)+sin*y + matrix[1, 1] = y*y*(1-cos)+cos + matrix[1, 2] = y*z*(1-cos)-sin*x + matrix[2, 1] = y*z*(1-cos)+sin*x + matrix[2, 2] = z*z*(1-cos)+cos + return matrix + + +def mouseMoveCallback(x, y): + """""" Mouse move event handler for GLUT. """""" + global _previous_mouse_position, camera, eye, center, up, maxDistance + if _mouse_dragging: + width = glutGet(GLUT_WINDOW_WIDTH) + height = glutGet(GLUT_WINDOW_HEIGHT) + # Set matrix mode + glMatrixMode(GL_MODELVIEW) + dx = (x-_previous_mouse_position[0])/width + dy = (y-_previous_mouse_position[1])/height + glRotatef(dx,1,0,0) + glRotatef(dy,0,1,0) +# rotation_intensity = la.norm((dx, dy)) * 4 +# eye, center, up = camera +# camera_distance = la.norm(center-eye) +# forward = (center-eye)/camera_distance +# right = np.cross(forward, up) +# rotation_axis = (up*dx+right*dy) +# rotation_matrix = _create_rotation_matrix(-rotation_intensity, +# rotation_axis[0], +# rotation_axis[1], +# rotation_axis[2]) +# forward = np.dot(rotation_matrix, forward) +# up = np.dot(rotation_matrix, up) +# eye = center-forward*camera_distance +# camera = eye, center, up +# _previous_mouse_position = (x, y) + #print(_mouse_dragging) + # Reset matrix + glLoadIdentity() +# gluLookAt(eye[0], eye[1], eye[2], +# center[0], center[1], center[2], +# up[0], up[1], up[2]) +# + setOrthographicCamera() + glutPostRedisplay() + + +def _mouse_move_callback(x, y): + """""" Mouse move event handler for GLUT. """""" + global _previous_mouse_position, camera, eye, center, up, maxDistance, _mouse_dragging + if _mouse_dragging: + width = glutGet(GLUT_WINDOW_WIDTH) + height = glutGet(GLUT_WINDOW_HEIGHT) + dx = (x-_previous_mouse_position[0])/width + dy = (y-_previous_mouse_position[1])/height + glRotatef(dx,1,0,0) + glRotatef(dy,0,1,0) + rotation_intensity = la.norm((dx, dy)) * 4 + eye, center, up = camera + camera_distance = la.norm(center-eye) + forward = (center-eye)/camera_distance + right = np.cross(forward, up) + rotation_axis = (up*dx+right*dy) + rotation_matrix = _create_rotation_matrix(-rotation_intensity, + rotation_axis[0], + rotation_axis[1], + rotation_axis[2]) + forward = np.dot(rotation_matrix, forward) + up = np.dot(rotation_matrix, up) + eye = center-forward*camera_distance + camera = eye, center, up + _previous_mouse_position = (x, y) + #print(_mouse_dragging) + # Set matrix mode + glMatrixMode(GL_MODELVIEW) + # Reset matrix + glLoadIdentity() + #eye[2] = -maxDistance + gluLookAt(eye[0], eye[1], eye[2], + center[0], center[1], center[2], + up[0], up[1], up[2]) + glutPostRedisplay() + +def colorPicking(x, y): + global totalNumAtoms, colorIDs, selectedAtoms, selectedBonds + #glReadBuffer(GL_COLOR_ATTACHMENT0) + + data = glReadPixels(x, 700-y, 1, 1, GL_RGB, GL_FLOAT) + #glEnable(GL_LIGHTING) + #glEnable(GL_LIGHT0) + # print(data[0,0]*255) + # print(colorIDs) + for i in range(totalNumAtoms): + if abs(data[0,0][0]*255-colorIDs[i][0])<0.0001 and abs(data[0,0][1]*255-colorIDs[i][1])<0.0001 and abs(data[0,0][2]*255-colorIDs[i][2])<0.0001: + if i not in selectedAtoms: + selectedAtoms.append(i) + print('Selected atom: #'+str(i)) + else: + selectedAtoms.remove(i) + print('Deselected atom: #'+str(i)) + #glEnable(GL_LIGHTING) + +def bondLengthButton(): + global isSelectionMode, selectedAtoms, selectedBonds + if isSelectionMode: + if len(selectedAtoms)<2: + print('Please select 2 atoms to calculate their bond length!') + elif len(selectedAtoms)==2: + posA = [xCoord[selectedAtoms[0]], yCoord[selectedAtoms[0]], zCoord[selectedAtoms[0]]] + posB = [xCoord[selectedAtoms[1]], yCoord[selectedAtoms[1]], zCoord[selectedAtoms[1]]] + bL = calculateBondLength(posA, posB) + print(bL) + elif len(selectedAtoms)>2: + print(""Please select only two atoms for their bond length!"") + +def toggleSelectionMode(): + global isSelectionMode + if isSelectionMode: + isSelectionMode = False + print('Selection mode off') + else: + isSelectionMode = True + print('Selection mode on') + #print(colorIDs) + +def comCalculator(subsystem): + global xCoord, yCoord, zCoord, atomicSpecies, atomicNumber + com = [0, 0, 0] + if(subsystem==0): + for i in range(numAtomsSubsystem[subsystem]): + com[0] = com[0] + xCoord[i] + com[1] = com[1] + yCoord[i] + com[2] = com[2] + zCoord[i] + else: + for i in range(numAtomsSubsystem[subsystem-1],numAtomsSubsystem[subsystem-1]+numAtomsSubsystem[subsystem]): + com[0] = com[0] + xCoord[i] + com[1] = com[1] + yCoord[i] + com[2] = com[2] + zCoord[i] + + com[0] = com[0]/numAtomsSubsystem[subsystem] + com[1] = com[1]/numAtomsSubsystem[subsystem] + com[2] = com[2]/numAtomsSubsystem[subsystem] + + return com + +def shiftMol2ScreenCenter(com, subsystem): + global xCoord, yCoord, zCoord + if(subsystem==0): + for i in range(numAtomsSubsystem[subsystem]): + xCoord[i] = xCoord[i] - com[0] + yCoord[i] = yCoord[i] - com[1] + zCoord[i] = zCoord[i] - com[2] + else: + for i in range(numAtomsSubsystem[subsystem-1],numAtomsSubsystem[subsystem-1]+numAtomsSubsystem[subsystem]): + xCoord[i] = xCoord[i] - com[0] + yCoord[i] = yCoord[i] - com[1] + zCoord[i] = zCoord[i] - com[2] + + +def _mouse_click_callback(button, status, x, y): + """""" Mouse click event handler for GLUT. """""" + global _mouse_dragging, _previous_mouse_position, MOLECULES + global isSelectionMode, basicColors + if button == GLUT_LEFT_BUTTON: + if status == GLUT_UP: + _mouse_dragging = False + _previous_mouse_position = None + basicColors = False + print('basic off') + #glEnable(GL_LIGHTING) + #glEnable(GL_LIGHT0) + #glutPostRedisplay() + elif status == GLUT_DOWN: + if isSelectionMode: + print('basic on') + glDisable(GL_LIGHTING) + glDisable(GL_LIGHT0) + basicColors = True + display() + #For some reason I need to display twice to ensure that the selection via colorpicking works properly + display() + colorPicking(x, y) + basicColors = False + print('basic off') + glEnable(GL_LIGHTING) + glEnable(GL_LIGHT0) + display() + _mouse_dragging = True + print('Dragging') + _previous_mouse_position = (x, y) + +#Timer callback +def timer(msecs): + global isOrtho + + #if (orthoCamera): + #print('Ortho') + + glutTimerFunc(1, timer, 11) + + +# The idle callback +def idle(): + global last_time + time = glutGet(GLUT_ELAPSED_TIME) + if last_time == 0 or time >= last_time + 40: + last_time = time + #glutPostRedisplay() + + +# The visibility callback +def visible(vis): + if vis == GLUT_VISIBLE: + glutIdleFunc(idle) + else: + glutIdleFunc(None) + +# Special keys callback +def specialKeyCallback(key, x, y): + # global stopGlutMainLoop + # global isOrtho, isPersepective + # Zoom In + if key == GLUT_KEY_UP: + zoomIn() + #Zoom out + if key == GLUT_KEY_DOWN: + zoomOut() + isOrtho = True + +def translateSubsystems(i, axis, sign): + global xCoord, yCoord, zCoord + if(activeSubsystem==0): + for i in range(numAtomsSubsystem[activeSubsystem]): + if(axis=='z'): + if(sign=='+'): + zCoord[i] = zCoord[i] + 0.1 + elif sign=='-': + zCoord[i] = zCoord[i] - 0.1 + if(axis=='y'): + if(sign=='+'): + yCoord[i] = yCoord[i] + 0.1 + elif sign=='-': + yCoord[i] = yCoord[i] - 0.1 + if(axis=='x'): + if(sign=='+'): + xCoord[i] = xCoord[i] + 0.1 + elif sign=='-': + xCoord[i] = xCoord[i] - 0.1 + else: + for i in range(numAtomsSubsystem[activeSubsystem-1],numAtomsSubsystem[activeSubsystem-1]+numAtomsSubsystem[activeSubsystem]): + if(axis=='z'): + if(sign=='+'): + zCoord[i] = zCoord[i] + 0.1 + elif sign=='-': + zCoord[i] = zCoord[i] - 0.1 + if(axis=='y'): + if(sign=='+'): + yCoord[i] = yCoord[i] + 0.1 + elif sign=='-': + yCoord[i] = yCoord[i] - 0.1 + if(axis=='x'): + if(sign=='+'): + xCoord[i] = xCoord[i] + 0.1 + elif sign=='-': + xCoord[i] = xCoord[i] - 0.1 + #Recalculate bonds after translation + calculateBondPositions() + +#Keyboard callback +def keyboardCallback(key, x, y): + global activeSubsystem, xCoord, yCoord, zCoord, isOrtho, isPersepective, maxDistance, activeSubsystem, numAtomsSubsystem + # print(key, activeSubsystem, numAtomsSubsystem) + # Convert bytes object key to string + key = key.decode(""utf-8"") + #key = key.lower + if key == 'w': + translateSubsystems(activeSubsystem,'z','+') + if key == 's': + translateSubsystems(activeSubsystem,'z','-') + if key == 'd': + translateSubsystems(activeSubsystem,'x','+') + if key == 'a': + translateSubsystems(activeSubsystem,'x','-') + if key == 'e': + translateSubsystems(activeSubsystem,'y','+') + if key == 'q': + translateSubsystems(activeSubsystem,'y','-') + if key == 'p': + isOrtho = False + isPerspective = True + setPerspectiveCamera() + setCameraPosition(maxDistance) + if key == 'o': + isPerspective = False + isOrtho = True + setOrthographicCamera() + setCameraPosition(10) + if key == 'k': + create('png') + glutPostRedisplay() + +def windowReshapeFunc(newWidth, newHeight ): + # global isOrtho + if isOrtho: + setOrthographicCamera() + + glViewport(0, 0, newWidth, newHeight) +# glMatrixMode(GL_PROJECTION) +# glLoadIdentity() +# gluPerspective(40.,newWidth/newHeight,1.,40.) +# glMatrixMode(GL_MODELVIEW) +# + +def launchOpenGLWindow(title): + global isOrtho, isGlutOpen, camera, indexDisplayList, isPerspective + isOrtho = True + print(""CrysX - 3D Viewer Window is now being initialized!"") + glutInit(sys.argv) + if(platform.system()=='Linux'): + glutSetOption(GLUT_MULTISAMPLE, 8) + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_MULTISAMPLE) + else: + #glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ) + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_MULTISAMPLE) + #glEnable(GL_MULTISAMPLE) + + glutInitWindowSize(700,700) + glutInitWindowPosition(270, 0) + glutCreateWindow(title) + + isGlutOpen = True + #Background color + #glClearColor(1.,1.,1.,1.) + glClearColor(1,1,1,1.) + glShadeModel(GL_SMOOTH) + glEnable(GL_POLYGON_SMOOTH) + glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST) + # glDisable(GL_CULL_FACE) + # glEnable(GL_CULL_FACE) + # glCullFace(GL_BACK) + glEnable(GL_DEPTH_TEST) + glEnable(GL_LIGHTING) + lightZeroPosition = [10.,4.,10.,1.] + lightZeroColor = [1.0,1.0,1.0,1.0] #green tinged + glLightfv(GL_LIGHT0, GL_POSITION, lightZeroPosition) + glLightfv(GL_LIGHT0, GL_DIFFUSE, lightZeroColor) + glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0.1) + glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05) + glEnable(GL_LIGHT0) + glEnable( GL_BLEND ) + # glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) + + glutDisplayFunc(display) + #glMatrixMode(GL_PROJECTION) + #gluPerspective(40.,1.,1.,40.) + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + glOrtho(0.0, 700.0, 0.0, 700.0, -40, 40.0) + glMatrixMode(GL_MODELVIEW) + # Set up the camera (it will be changed during mouse rotation) + camera_distance = -4*2.5 + camera = ((0, 0, camera_distance), + (0, 0, 0), + (0, 1, 0)) + camera = np.array(camera) + eye, center, up = camera + + gluLookAt(eye[0], eye[1], eye[2], + center[0], center[1], center[2], + up[0], up[1], up[2]) + glPushMatrix() + glutMouseFunc(_mouse_click_callback) + glutMotionFunc(_mouse_move_callback) + #glutPassiveMotionFunc(cursor_pos_callback) + #glutMotionFunc(mouseMoveCallback) + # Set the callback for special function + glutSpecialFunc(specialKeyCallback) + glutKeyboardFunc(keyboardCallback) + glutVisibilityFunc(visible) + glutReshapeFunc(windowReshapeFunc) + glutTimerFunc(1, timer, 1) + if(platform.system()=='Linux'): + thread1 = threading.Thread(target = glutMainLoop) + thread1.start() + print(""CrysX - 3D Viewer Window created successfully!"") + +def initializeGlobalVars(mol): + global xCoord, yCoord, zCoord, atomicSpecies, atomicNumber, totalNumAtoms, maxDistance, colorIDs, numAtomsSubsystem + totalNumAtoms = mol.natoms + for i in range(mol.natoms): + xCoord.append(mol.coords[i][0]) + yCoord.append(mol.coords[i][1]) + zCoord.append(mol.coords[i][2]) + atomicNumber.append(mol.Zcharges[i]) + atomicSpecies.append(mol.atomicSpecies[i]) + + maxDistance = calculateMaxDistance() + colorIDs = genColorIDs(mol.natoms) + print(colorIDs) + numAtomsSubsystem.append(totalNumAtoms) + # print(numAtomsSubsystem[0]) + +def calculateMaxDistance(): + global xCoord, yCoord, zCoord, totalNumAtoms, maxDistance + maxDistance = 0.0 + # print(totalNumAtoms) + for i in range(totalNumAtoms): + for j in range(totalNumAtoms): + newDistance = np.sqrt(np.power((xCoord[i]-xCoord[j]),2) + np.power((yCoord[i]-yCoord[j]),2) + np.power((zCoord[i]-zCoord[j]),2)) + if (newDistance>=maxDistance): + maxDistance = newDistance + # print(maxDistance) + #Slightly increase it + maxDistance = maxDistance + 5 + return maxDistance + +def visualize(mol, angle='orthographic', cameraPos = None, width=700, height=700, fieldOfView=40, title='CrysX-3D Viewer'): + # This function simply takes in a mol object and + # visualizes it using OpenGL + # INPUT: + # mol: the mol object to visualize + # angle: can take two values- 'orthographic' or 'perspective' + # cameraPos: the position of the camera (3x3 array) + # width, height: the width and the height of the GLUT window + # fieldOfView: exactly what it says + # title: the title of the GLUT window + # -------------------------------- + + # Default camera position + if cameraPos is None: + eye = [0, 0, -10] + center = [0, 0, 0] + up = [0, 1, 0] + cameraPos = eye, center, up + #Initialize the global variables + initializeGlobalVars(mol) + # The reason to create a Tkinter window instead of just a GLUT window is to allow the closing of window on MacOs. + # Moreover, I guess it would enable using some options like bond lengths, angles, point group symmetry etc. + root=tk.Tk() + root.title('CrysX') + tk.Button(root, text = ""Selection Mode"", command = lambda: toggleSelectionMode()).grid(row =1, column=0, padx = 1, pady = 10) + tk.Button(root, text = ""Bond Length"", command = lambda: bondLengthButton()).grid(row =2, column=0, padx = 1, pady = 10) + launchOpenGLWindow('CrysX - 3D Viewer') + COM = comCalculator(0) + print('COM: ', comCalculator(0)) + shiftMol2ScreenCenter(COM,0) + calculateBondPositions() + + # isGlutOpen = True + + if (isGlutOpen): + # Set matrix mode + #glMatrixMode(GL_MODELVIEW) + # Reset matrix + #glLoadIdentity() + setOrthographicCamera() + glutPostRedisplay() + + # glutMainLoop() + tk.mainloop() +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/DFT.py",".py","76202","1680","# DFT.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +from re import T +from pyfock.Utils import print_pyfock_logo +from pyfock.Utils import print_scientist +# Print system information +from pyfock.Utils import print_sys_info +import pyfock.Mol as Mol +import pyfock.Basis as Basis +# import pyfock.Integrals as Integrals +import pyfock.Integrals as Integrals +import pyfock.Grids as Grids +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +# controller = ThreadpoolController() +import numpy as np +from numpy.linalg import eig, multi_dot as dot +import scipy + +from timeit import default_timer as timer +import numba +from opt_einsum import contract +import pylibxc +# import sparse +# import dask.array as da +from scipy.sparse import csr_matrix, csc_matrix +# from memory_profiler import profile +import os +from numba import njit, prange, cuda +import numexpr +try: + import cupy as cp + from cupy import fuse + import cupyx + CUPY_AVAILABLE = True +except Exception as e: + print('Cupy is not installed. GPU acceleration is not availble.') + CUPY_AVAILABLE = False + pass +from pyfock.DFT_Helper_Coulomb import density_fitting_prelims_for_DFT_development +from pyfock.DFT_Helper_Coulomb import Jmat_from_density_fitting + +# @njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +# def compute_B(errVecs): +# nKS = errVecs.shape[0] +# B = np.zeros((nKS + 1, nKS + 1)) +# B[-1, :] = B[:, -1] = -1.0 +# B[-1, -1] = 0.0 +# for i in prange(nKS): +# # errVec_i_conj_T = errVecs[i].conj().T +# errVec_i_conj_T = errVecs[i].T +# for j in range(i + 1): +# # B[i, j] = B[j, i] = np.real(np.trace(np.dot(errVec_i_conj_T, errVecs[j]))) +# B[i, j] = B[j, i] = np.trace(np.dot(errVec_i_conj_T, errVecs[j])) +# return B + +class DFT: + """""" + A class for performing Density Functional Theory (DFT) calculations + with optional support for density fitting (DF), GPU acceleration, and LibXC. + + Parameters + ---------- + mol : Molecule + Molecular object on which the DFT calculation is to be performed. + + basis : Basis + Orbital basis set used for the SCF calculation. + + auxbasis : Basis, optional + Auxiliary basis set for density fitting (DF). If None, a default will be assigned. + + conv_crit : float, optional + Convergence criterion for the SCF cycle in Hartrees (default is 1e-7). + + dmat_guess_method : str, optional + Method for the initial density matrix guess (e.g., 'core', 'huckel'). + + xc : list or str, optional + Exchange-correlation functional specification. If None, defaults to LDA (`[1, 7]`). + + grids : object, optional + Precomputed numerical integration grids. If None, they will be generated automatically. + + gridsLevel : int, optional + Level of numerical integration grid refinement (default is 3). + + blocksize : int, optional + Block size for XC grid evaluations. Defaults depend on whether GPU is used. + + save_ao_values : bool, optional + If True, saves AO values to reuse during XC evaluation. Increases speed but uses more memory. + + use_gpu : bool, optional + Whether to use GPU acceleration. + + ncores : int, optional + Number of CPU cores to use (default is 2). + + Attributes + ---------- + dmat : ndarray + Initial guess for the density matrix, will be computed during setup. + + KSmats : list + List of Kohn–Sham matrices used in DIIS extrapolation. + + errVecs : list + List of error vectors for DIIS. + + max_itr : int + Maximum number of SCF iterations (default is 50). + + isDF : bool + Whether to use density fitting for Coulomb integrals. + + rys : bool + Whether to use Rys quadrature for evaluating electron repulsion integrals. + + DF_algo : int + Algorithm selector for DF (reserved for developer use). + + XC_algo : int + Algorithm selector for XC evaluation (2 for CPU, 3 for GPU). + + sortGrids : bool + Whether to sort DFT integration grids (not recommended). + + xc_bf_screen : bool + Enable basis function screening for XC term evaluation. + + threshold_schwarz : float + Threshold for Schwarz screening (default is 1e-9). + + strict_schwarz : bool + If True, applies stricter Schwarz screening. + + cholesky : bool + If True, uses Cholesky decomposition for DF. + + orthogonalize : bool + If True, orthogonalizes AO basis functions. + + sao : bool + If True, uses SAO basis instead of CAO basis. + + keep_ao_in_gpu : bool + Whether to retain AO values in GPU memory during SCF (if `save_ao_values` is True). + + use_libxc : bool + Whether to use LibXC for XC functional evaluation (recommended off for GPU). + + n_streams : int + Number of CUDA streams to use (if applicable). + + n_gpus : int + Number of GPUs to use. + + free_gpu_mem : bool + Whether to forcibly free GPU memory after use. + + max_threads_per_block : int + Maximum threads per CUDA block supported by the device. + + threads_x : int + CUDA thread configuration (X dimension). + + threads_y : int + CUDA thread configuration (Y dimension). + + dynamic_precision : bool + Whether to use precision switching during XC evaluation for performance gains. + + keep_ints3c2e_in_gpu : bool + Whether to keep 3-center 2-electron integrals in GPU memory to avoid transfers. + + debug : bool + If True, prints debugging output during DFT calculations. + + Notes + ----- + - This class supports SCF DFT calculations with density fitting (DF). + - GPU support is optional and provides significant speed-up for large systems. + - The class is tightly integrated with PyFock and LibXC libraries. + + Examples + -------- + >>> mol = Molecule(...) + >>> basis = Basis(mol, ...) + >>> dft = DFT(mol, basis, xc='PBE', use_gpu=True) + >>> dft.run_scf() + """""" + def __init__(self, mol, basis, auxbasis=None, conv_crit=1e-7, dmat_guess_method=None, + xc=None, grids=None, gridsLevel=3, blocksize=None, + save_ao_values=False, use_gpu=False, ncores=1): + + self.mol = mol + """""" Molecular object for which the DFT calculation will be performed """""" + if self.mol is None: + print('ERROR: A Mol object is required to initialize a DFT object.') + + self.basis = basis + """""" Basis object for corresponding to the molecule for the DFT calculation """""" + if self.basis is None: + print('ERROR: A Basis object is required to initialize a DFT object.') + + + self.dmat_guess_method = dmat_guess_method + """""" Initial guess for the density matrix """""" + if self.dmat_guess_method is None: + self.dmat_guess_method = 'core' + + self.dmat = None + """""" Initial density matrix guess for SCF. Will get updated at each SCF iteration. """""" + + self.xc = xc + """""" Exchange-Correlation Functional """""" + if self.xc is None: + self.xc = [1, 7] #LDA + print(""XC not specified, defaulting to LDA functional (LibXC codes: 1, 7)"") + + # DIIS + self.KSmats = [] + self.errVecs = [] + self.diisSpace = 6 + + self.conv_crit = conv_crit + """""" Convergence criterion for SCF (in Hartrees) """""" + # if self.conv_crit is None: + # self.conv_crit = 1.0E-7 + + self.max_itr = 50 + """""" Maximum number of iterations for SCF """""" + # if self.max_itr is None: + # self.max_itr = 50 + + self.ncores = ncores + """""" Number of cores to be used for DFT calculation """""" + if self.ncores is None: + self.ncores = 2 + + self.grids = grids + """""" Atomic grids for DFT calculation (If None or not supplied, will be generated using NumGrid) """""" + self.gridsLevel = gridsLevel + """""" Atomic grids for DFT calculation """""" + + self.isDF = True + """""" Use density fitting (DF) for two-electron Coulomb integrals. This is only for developers. Users should not change it. """""" + + self.auxbasis = auxbasis + """""" Basis object to be used as the auxiliary basis for DF """""" + if self.auxbasis is None: + auxbasis = Basis(mol, {'all':Basis.load(mol=mol, basis_name='def2-universal-jfit')}) + + self.rys = True + """""" Use rys quadrature for the evaluation of two electron integrals (with and without DF)"""""" + + self.DF_algo = 10 + """""" This is only for developers. Users should not change it. """""" + + self.blocksize = blocksize + """""" Block size for the evaulation of XC term on grids. For CPUs a value of ~5000 is recommended. For GPUs, a value >20480 is recommended. """""" + if blocksize is None: + if use_gpu: + self.blocksize = 20480 + else: + self.blocksize = 5000 + + self.XC_algo = None + """""" This is only for developers. Users should not change it. The algorithm for XC evaluation should be 2 for CPU and 3 for GPU."""""" + if use_gpu: + self.XC_algo = 3 + else: + self.XC_algo = 2 + + self.debug = False + """""" Turn on printing debug statements """""" + self.sortGrids = False + """""" Enable/Disable sorting of DFT grids. Doesn't seem to offer any signficant advantage."""""" + self.save_ao_values = save_ao_values + """""" Whether to save atomic orbital (AO) values for reuse during XC evaluation. Improves performance but requires more memory. """""" + self.xc_bf_screen = True + """""" Enable screening of basis functions for XC term evaluation to reduce computation time drastically. """""" + self.threshold_schwarz = 1e-09 + """""" Threshold for Schwarz screening of two-electron integrals. Smaller values increase accuracy but reduce sparsity. """""" + self.strict_schwarz = True + """""" If True, enforce stricter Schwarz screening to aggressively eliminate small two-electron integrals. """""" + self.cholesky = True + """""" Whether to use Cholesky decomposition for DF. Slightly speeds up calculations. """""" + self.orthogonalize = True + """""" Apply orthogonalization to the AO basis. Should be True for most standard calculations. """""" + + self.mo_occupations = None + """""" Molecular orbital occupations. Will be computed during SCF. """""" + self.mo_coefficients = None + """""" Molecular orbital coefficients. Will be computed during SCF. """""" + self.mo_energies = None + """""" Molecular orbital energies. Will be computed during SCF. """""" + self.Total_energy = None + """""" Total energy of the system. Will be computed during SCF. """""" + self.J_energy = None + """""" Coulomb energy contribution. Will be computed during SCF. """""" + self.XC_energy = None + """""" Exchange-correlation energy contribution. Will be computed during SCF. """""" + self.Nuclear_rep_energy = None + """""" Nuclear repulsion energy. Will be computed during SCF. """""" + self.Kinetic_energy = None + """""" Kinetic energy contribution. Will be computed during SCF. """""" + self.Nuc_energy = None + """""" Nuclear potential energy contribution. Will be computed during SCF. """""" + + self.converged = False + """""" Whether the SCF has converged or not. Will be updated during SCF. """""" + self.niter = 0 + """""" Number of SCF iterations performed. Will be updated during SCF. """""" + self.scf_energies = [] + """""" List of SCF energies at each iteration. """""" + + # CAO or SAO + self.sao = False + """""" Whether to use SAO basis or CAO basis. Default is CAO basis. """""" + + + # GPU acceleration + self.use_gpu = use_gpu + """""" Whether to use GPU acceleration or not """""" + self.keep_ao_in_gpu = True + """""" Whether to keep the atomic orbitals for XC evaluation in GPU memory or CPU memory. Only relevant if save_ao_values = True. """""" + self.use_libxc = True + """""" Whether to use LibXC's version of XC functionals or PyFock implementations. + Only relevant when GPU is used. For GPU calculations it is recommended to use PyFock + implementation as it avoids CPU-GPU transfers."""""" + self.n_streams = 1 + self.n_gpus = 1 + """""" Number of GPUs to be used """""" + self.free_gpu_mem = False + """""" Whether the GPU memory should be freed by force or not"""""" + try: + self.max_threads_per_block = cuda.get_current_device().MAX_THREADS_PER_BLOCK + except: + self.max_threads_per_block = 1024 + + self.threads_x = int(self.max_threads_per_block/16) + self.threads_y = int(self.max_threads_per_block/64) + self.dynamic_precision = False # Only for the XC term + """""" Whether to use dynamic precision switching for XC term or not """""" + self.keep_ints3c2e_in_gpu = True + """""" Whether to keep the 3c2e integrals in GPU memory or not. + Recommended to keep in GPU memory to avoid CPU-GPU transfers at each iteration."""""" + + # self.max_threads_per_block = 1024 + # self.threads_x = 64 + # self.threads_y = 16 + + # if self.use_gpu: + # try: + # global cp + # global cupy_scipy + # import cupy as cp + # import cupyx.scipy as cupy_scipy + # # from cupy.linalg import eig, multi_dot as dot + # except ModuleNotFoundError: + # print('Cupy was not found!') + + # def removeLinearDep(self, H, S): + # return 1 + + def nuclear_rep_energy(self, mol=None): + """""" + Compute the nuclear-nuclear repulsion energy. + + Parameters + ---------- + mol : Molecule, optional + Molecule object containing nuclear coordinates and charges. + If None, uses `self.mol`. + + Returns + ------- + float + The nuclear repulsion energy in Hartrees. + """""" + # Nuclear-nuclear energy + if mol is None: + mol = self.mol + + e = 0 + for i in range(mol.natoms): + for j in range(i, mol.natoms): + if (i!=j): + dist = mol.coordsBohrs[i]-mol.coordsBohrs[j] + e = e + mol.Zcharges[i]*mol.Zcharges[j]/np.sqrt(np.sum(dist**2)) + + return e + + # full density matrix for RKS/RHF + def gen_dm(self, mo_coeff, mo_occ): + """""" + Generate the density matrix from molecular orbital coefficients and occupations. + + Parameters + ---------- + mo_coeff : ndarray + Molecular orbital coefficient matrix. + + mo_occ : ndarray + Array of MO occupation numbers. + + Returns + ------- + ndarray + Density matrix (RHF/RKS type). + """""" + mocc = mo_coeff[:,mo_occ>0] + + return np.dot(mocc*mo_occ[mo_occ>0], mocc.conj().T) + + def getOcc(self, mol=None, energy_mo=None, coeff_mo=None): + """""" + Assign occupation numbers to molecular orbitals based on their energies. + + Parameters + ---------- + mol : Molecule + Molecule object to extract the number of electrons. + + energy_mo : ndarray + Array of MO energies. + + coeff_mo : ndarray + Array of MO coefficients (not used but kept for compatibility). + + Returns + ------- + ndarray + Array of MO occupations (0 or 2 for RHF). + """""" + e_idx = np.argsort(energy_mo) + e_sort = energy_mo[e_idx] + nmo = energy_mo.size + occ_mo = np.zeros(nmo) + nocc = mol.nelectrons // 2 + occ_mo[e_idx[:nocc]] = 2 + return occ_mo + + def gen_dm_cupy(self, mo_coeff, mo_occ): + """""" + Generate the density matrix using CuPy for GPU acceleration. + + Parameters + ---------- + mo_coeff : cp.ndarray + Molecular orbital coefficient matrix (on GPU). + + mo_occ : cp.ndarray + Array of MO occupation numbers (on GPU). + + Returns + ------- + cp.ndarray + Density matrix (RHF/RKS type) computed on the GPU. + """""" + mocc = mo_coeff[:,mo_occ>0] + return cp.dot(mocc*mo_occ[mo_occ>0], mocc.conj().T) + + def getOcc_cupy(self, mol=None, energy_mo=None, coeff_mo=None): + """""" + Assign occupation numbers to MOs using CuPy (for GPU-based calculations). + + Parameters + ---------- + mol : Molecule + Molecule object to determine number of electrons. + + energy_mo : cp.ndarray + MO energy array on the GPU. + + coeff_mo : cp.ndarray + MO coefficients array on the GPU (not used). + + Returns + ------- + cp.ndarray + Array of MO occupations (on GPU). + """""" + e_idx = cp.argsort(energy_mo) + e_sort = energy_mo[e_idx] + nmo = energy_mo.size + occ_mo = cp.zeros(nmo) + nocc = mol.nelectrons // 2 + occ_mo[e_idx[:nocc]] = 2 + return occ_mo + + def solve(self, H, S, orthogonalize=False, x=None): + """""" + Solve the generalized or canonical eigenvalue equation. + + Parameters + ---------- + H : ndarray + Hamiltonian matrix. + + S : ndarray + Overlap matrix. + + orthogonalize : bool, optional + If True, solve using orthogonalized basis. + + x : ndarray, optional + Transformation matrix (if already computed). + + Returns + ------- + tuple of (ndarray, ndarray) + Eigenvalues and eigenvectors of the system. + """""" + if not orthogonalize: + #Solve the generalized eigenvalue equation HC = SCE + eigvalues, eigvectors = scipy.linalg.eigh(H, S) + + else: + if x is None: + eig_val_s, eig_vec_s = scipy.linalg.eigh(S) + # Removing the eigenvectors assoicated to the smallest eigenvalue. + x = eig_vec_s[:,eig_val_s>1e-7] / np.sqrt(eig_val_s[eig_val_s>1e-7]) + xHx = x.T @ H @ x + #Solve the canonical eigenvalue equation HC = CE + eigvalues, eigvectors = scipy.linalg.eigh(xHx) + eigvectors = np.dot(x, eigvectors) + + idx = np.argmax(np.abs(eigvectors.real), axis=0) + eigvectors[:,eigvectors[idx,np.arange(len(eigvalues))].real<0] *= -1 + return eigvalues, eigvectors # E, C + + def solve_cupy(self, H, S, orthogonalize=True): + """""" + Solve the generalized eigenvalue problem using CuPy (GPU). + + Parameters + ---------- + H : cp.ndarray + Hamiltonian matrix (on GPU). + + S : cp.ndarray + Overlap matrix (on GPU). + + orthogonalize : bool, optional + If True, solve using orthogonalized basis. + + Returns + ------- + tuple of (cp.ndarray, cp.ndarray) + Eigenvalues and eigenvectors (on GPU). + """""" + eig_val_s, eig_vec_s = cp.linalg.eigh(S) + # Removing the eigenvectors assoicated to the smallest eigenvalue. + x = eig_vec_s[:,eig_val_s>1e-7] / cp.sqrt(eig_val_s[eig_val_s>1e-7]) + xhx = x.T @ H @ x + #Solve the canonical eigenvalue equation HC = SCE + eigvalues, eigvectors = cp.linalg.eigh(xhx) + eigvectors = cp.dot(x, eigvectors) + + idx = cp.argmax(cp.abs(eigvectors.real), axis=0) + eigvectors[:,eigvectors[idx,cp.arange(len(eigvalues))].real<0] *= -1 + return eigvalues, eigvectors # E, C + + + def getCoreH(self, mol=None, basis=None): + """""" + Compute the core Hamiltonian matrix (T + V). + + Parameters + ---------- + mol : Molecule, optional + Molecule object. + + basis : Basis, optional + Basis set object. + + Returns + ------- + ndarray + Core Hamiltonian matrix. + """""" + #Get the core Hamiltonian + if mol is None: + mol = self.mol + if basis is None: + basis = self.basis + nao = basis.bfs_nao + H = np.empty((nao,nao)) + Vmat = Integrals.nuc_mat_symm(basis, mol) + Tmat = Integrals.kin_mat_symm(basis) + H = Vmat + Tmat + + return H + + + def guessCoreH(self, mol=None, basis=None, Hcore=None, S=None): + """""" + Generate a guess density matrix using the core Hamiltonian. + + Parameters + ---------- + mol : Molecule, optional + Molecule object. + + basis : Basis, optional + Basis set. + + Hcore : ndarray, optional + Core Hamiltonian. If None, it will be computed. + + S : ndarray, optional + Overlap matrix. If None, it will be computed. + + Returns + ------- + ndarray + Initial guess density matrix. + """""" + #Get a guess for the density matrix using the core Hamiltonian + if mol is None: + mol = self.mol + if basis is None: + basis = self.basis + if Hcore is None: + Hcore = self.getCoreH(mol, basis) + if S is None: + S = Integrals.overlap_mat_symm(basis) + + eigvalues, eigvectors = scipy.linalg.eigh(Hcore, S) + # print(eigvalues) + idx = np.argmax(abs(eigvectors.real), axis=0) + eigvectors[:,eigvectors[idx,np.arange(len(eigvalues))].real<0] *= -1 + mo_occ = self.getOcc(mol, eigvalues, eigvectors) + # print(mo_occ) + dmat = self.gen_dm(eigvectors, mo_occ) + + return dmat + + + def DIIS(self,S,D,F): + """""" + Perform Direct Inversion in the Iterative Subspace (DIIS) to improve SCF convergence. + + Adapted from + ---------- + McMurchie-Davidson project: + https://github.com/jjgoings/McMurchie-Davidson + Licensed under the BSD-3-Clause license + + Parameters + ---------- + S : ndarray + Overlap matrix. + + D : ndarray + Density matrix. + + F : ndarray + Fock matrix. + + Returns + ------- + ndarray + DIIS-extrapolated Fock matrix. + """""" + FDS = dot([F,D,S]) + # SDF = np.conjugate(FDS).T + errVec = FDS - np.conjugate(FDS).T + self.KSmats.append(F) + self.errVecs.append(errVec) + nKS = len(self.KSmats) + if nKS > self.diisSpace: + self.KSmats.pop(0) + self.errVecs.pop(0) + nKS = nKS - 1 + B = np.zeros((nKS + 1,nKS + 1)) + B[-1,:] = B[:,-1] = -1.0 + B[-1,-1] = 0.0 + # B is symmetric + for i in range(nKS): + for j in range(i+1): + B[i,j] = B[j,i] = \ + np.real(np.trace(np.dot(np.conjugate(self.errVecs[i]).T, self.errVecs[j]))) + # for i in range(nKS): + # for j in range(i+1): + # print(self.errVecs[i].shape) + # B[i,j] = np.real(np.dot(np.conjugate(self.errVecs[i]).T, self.errVecs[j])) + # B[j,i] = B[i,j] + + residual = np.zeros((nKS + 1, 1)) + residual[-1] = -1.0 + weights = scipy.linalg.solve(B,residual) + + # weights is 1 x numFock + 1, but first numFock values + # should sum to one if we are doing DIIS correctly + assert np.isclose(sum(weights[:-1]),1.0) + + F = np.zeros(F.shape) + for i, KS in enumerate(self.KSmats): + weight = weights[i] + F += numexpr.evaluate('(weight * KS)') + + return F + + def DIIS_cupy(self,S,D,F): + """""" + Perform DIIS on GPU using CuPy to accelerate SCF convergence. + + Adapted from + ---------- + McMurchie-Davidson project: + https://github.com/jjgoings/McMurchie-Davidson + Licensed under the BSD-3-Clause license + + Parameters + ---------- + S : cp.ndarray + Overlap matrix (on GPU). + + D : cp.ndarray + Density matrix (on GPU). + + F : cp.ndarray + Fock matrix (on GPU). + + Returns + ------- + cp.ndarray + DIIS-extrapolated Fock matrix (on GPU). + """""" + FDS = F @ D @ S + errVec = FDS - cp.conjugate(FDS).T + self.KSmats.append(F) + self.errVecs.append(errVec) + nKS = len(self.KSmats) + if nKS > self.diisSpace: + self.KSmats.pop(0) + self.errVecs.pop(0) + nKS = nKS - 1 + B = cp.zeros((nKS + 1,nKS + 1)) + B[-1,:] = B[:,-1] = -1.0 + B[-1,-1] = 0.0 + # B is symmetric + for i in range(nKS): + for j in range(i+1): + B[i,j] = B[j,i] = \ + cp.real(cp.trace(cp.dot(cp.conjugate(self.errVecs[i]).T, self.errVecs[j]))) + + residual = cp.zeros((nKS + 1, 1)) + residual[-1] = -1.0 + weights = cp.linalg.solve(B,residual) + + # weights is 1 x numFock + 1, but first numFock values + # should sum to one if we are doing DIIS correctly + assert cp.isclose(sum(weights[:-1]),1.0) + + F = cp.zeros(F.shape) + for i, KS in enumerate(self.KSmats): + weight = weights[i] + F += weight * KS + + return F + + # @profile + def scf(self): + """""" + Perform Self-Consistent Field (SCF) calculation for Density Functional Theory (DFT). + + This method implements a complete DFT SCF procedure including: + - One-electron integral calculation (overlap, kinetic, nuclear attraction) + - Two-electron integral calculation (4-center ERIs or density fitting) + - Grid generation and pruning for exchange-correlation evaluation + - Iterative SCF cycles with DIIS convergence acceleration + - Exchange-correlation energy and potential evaluation using LibXC + - GPU acceleration support for performance-critical operations + + The implementation supports multiple algorithmic variants: + - Density fitting (DF) + - Schwarz screening for integral sparsity + - Multiple XC evaluation algorithms (CPU/GPU optimized) + - Dynamic precision switching for GPU calculations + + SCF Procedure: + 1. Initialize one-electron integrals (S, T, V_nuc) + 2. Calculate/prepare two-electron integrals with optional screening + 3. Generate and prune integration grids for XC evaluation + 4. Iterative SCF loop: + - Build Coulomb matrix J from density matrix + - Evaluate exchange-correlation energy/potential on grids + - Form Kohn-Sham matrix: H_KS = H_core + J + V_xc + - Apply DIIS convergence acceleration + - Diagonalize KS matrix to get new orbitals + - Generate new density matrix from occupied orbitals + - Check energy convergence + 5. Return converged total energy and density matrix + + Computational Features: + - Multi-threading support via Numba and configurable core count + - GPU acceleration using CuPy for grid-based operations + - Memory-efficient batched evaluation of XC terms + - Multiple density fitting algorithms (DF_algo 1-10) + - Basis function screening for XC evaluation efficiency + - Optional Cholesky decomposition for 2-center integrals + + Returns: + -------- + tuple[float, numpy.ndarray] + Etot : float + Converged total electronic energy in atomic units + dmat : numpy.ndarray, shape (nbf, nbf) + Converged density matrix in atomic orbital basis + + Raises: + ------- + ConvergenceError + If SCF fails to converge within max_itr iterations + + Notes: + ------ + - Uses class attributes for all computational parameters (basis, xc, conv_crit, etc.) + - Extensive timing and profiling information printed during execution + - Memory usage information displayed for large arrays + - GPU memory automatically freed after completion + - Supports both Cartesian (CAO) and Spherical (SAO) atomic orbital bases + + The function performs comprehensive error checking and provides detailed + timing breakdowns for performance analysis. GPU acceleration is automatically + enabled when CuPy is available and use_gpu=True. + + Example Energy Components: + - Electron-nuclear attraction energy + - Nuclear repulsion energy + - Kinetic energy + - Coulomb (electron-electron repulsion) energy + - Exchange-correlation energy + """""" + #### Timings + duration1e = 0 + durationDIIS = 0 + durationAO_values = 0 + durationCoulomb = 0 + durationgrids = 0 + durationItr = 0 + durationxc = 0 + durationXCpreprocessing = 0 + durationDF = 0 + durationKS = 0 + durationSCF = 0 + durationgrids_prune_rho = 0 + durationSchwarz = 0 + duration2c2e = 0 + durationDF_coeff = 0 + durationDF_gamma = 0 + durationDF_Jtri = 0 + durationDF_cholesky = 0 + startSCF = timer() + + mol = self.mol + basis = self.basis + dmat = self.dmat + xc = self.xc + conv_crit = self.conv_crit + max_itr = self.max_itr + ncores = self.ncores + grids = self.grids + gridsLevel = self.gridsLevel + isDF = self.isDF + auxbasis = self.auxbasis + rys = self.rys + DF_algo = self.DF_algo + blocksize = self.blocksize + XC_algo = self.XC_algo + debug = self.debug + sortGrids = self.sortGrids + save_ao_values = self.save_ao_values + xc_bf_screen = self.xc_bf_screen + threshold_schwarz = self.threshold_schwarz + strict_schwarz = self.strict_schwarz + cholesky = self.cholesky + orthogonalize = self.orthogonalize + + print_pyfock_logo() + print_scientist() + print('\n\nNumber of atoms:', mol.natoms) + print('\n\nNumber of basis functions (atomic orbitals):', basis.bfs_nao) + if isDF: + print('\n\nNumber of auxiliary basis functions:', auxbasis.bfs_nao) + print(""\n"" + ""=""*70 + ""\n"") + + print_sys_info() + print(""\n"" + ""=""*70 + ""\n"") + #### Set number of cores + numba.set_num_threads(ncores) + os.environ['RAYON_NUM_THREADS'] = str(ncores) + + print('Running DFT using '+str(numba.get_num_threads())+' threads for Numba.\n\n', flush=True) + if grids is None: + sortGrids = True + if xc_bf_screen==False: + if save_ao_values==True: + print('Warning! AO screening is set to False, but AO values are requested to be saved. \ + AO values can only be saved when XC_BF_SCREEN=TRUE. AO values will not be saved.', flush=True) + save_ao_values = False + if CUPY_AVAILABLE: + if self.use_gpu: + print('GPU acceleration is enabled. Currently this only accelerates AO values and XC term evaluation.', flush=True) + print('GPU(s) information:') + # print(cp.cuda.Device.mem_info()) + print(cuda.detect()) + print('Max threads per block supported by the GPU: ', cuda.get_current_device().MAX_THREADS_PER_BLOCK, flush=True) + print('The user has specified to use '+str(self.n_gpus)+' GPU(s).') + + # For CUDA computations + threads_per_block = (self.threads_x, self.threads_y) + print('Threads per block configuration for the XC term: ', threads_per_block, flush=True) + print('Threads per block configuration for the all other calculations: ', (32, 32), flush=True) + if self.dynamic_precision: + print('\n\nWill use dynamic precision. ') + print('This means that the XC term will be evaluated in single precision until the ') + print('relative energy difference b/w successive iterations is less than 5.0E-7.') + precision_XC = cp.float32 + else: + precision_XC = cp.float64 + + if XC_algo is None: + XC_algo = 3 + if blocksize is None: + blocksize = 20480 + streams = [] + nb_streams = [] + for i in range(self.n_gpus): + cp.cuda.Device(i).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + streams.append(cp_stream) + nb_streams.append(nb_stream) + # Switch back to main GPU + cp.cuda.Device(0).use() + streams[0].use() + + + else: + if self.use_gpu: + print('GPU acceleration requested but cannot be enabled as Cupy is not installed.', flush=True) + self.use_gpu = False + + if XC_algo is None: + XC_algo = 2 + if blocksize is None: + blocksize = 5000 + if isDF: + isSchwarz = True + else: + isSchwarz = False # Schwarz screening is not yet implemented for 4c2e integrals + if strict_schwarz: + if not (DF_algo==6 or DF_algo==10): + print('Warning: The stricter variation of Schwarz screening is only compatible with DF algo #6 or #10 so turning it off.') + strict_schwarz = False + if cholesky: + if not (DF_algo==6 or DF_algo==10): + print('Warning: The Cholesky decomposition of 2c2e integrls is only compatible with DF algo #6 or #10 so turning it off.') + cholesky = False + + if self.sao: + print('\n\nSpherical Atomic Orbitals are being used!\n\n') + # Get the CAO to SAO transformation matrix + c2sph_mat = basis.cart2sph_basis() # CAO --> SAO + # Calculate the pseudoinverse transformation matrix (for back transformation of SAO dmat to CAO dmat) + sph2c_mat_pseudo = basis.sph2cart_basis() # SAO --> CAO + + + eigvectors = None + # DF_algo = 1 # Worst algorithm for more than 500 bfs/auxbfs (requires 2x mem of 3c2e integrals and a large prefactor) + # DF_algo = 2 # Sligthly better (2x memory efficient) algorithm than above (requires 1x mem of 3c2e integrals and a large prefactor) + # DF_algo = 3 # Memory effcient without any prefactor. (Can easily be converted into a sparse version, unlike the others) (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + # DF_algo = 4 # Same as 3, except now we use triangular version of ints3c2e to save on memory + # DF_algo = 5 # Same as 4 in terms of memory requirements, however faster in performance due to the use of Schwarz screening. + # DF_algo = 6 # Much cheaper than 4 and 5 in terms of memory requirements because the indices of significant (ij|P) are efficiently calculated without duplicates/temporary arrays. + # The speed maybe same or just slightly slower. + # DF_algo = 7 # The significant indices (ij|P) are stored even more efficiently by using shell indices instead of bf indices. + # DF_algo = 8 # Similar to 6, except that here the significant indices are not stored resulting in 50% memory savings. The drawback is that it only works in serial which is useful for Google colab or Kaggle perhaps. + # DF_algo = 9 # + + if not strict_schwarz: # If a stricter variant of Schwarz screening is not requested + start1e = timer() + print('\nCalculating one electron integrals...\n\n', flush=True) + # One electron integrals + if not self.use_gpu: + S = Integrals.overlap_mat_symm(basis) + V = Integrals.nuc_mat_symm(basis, mol) + T = Integrals.kin_mat_symm(basis) + # Core hamiltonian + H = T + V + else: + S = Integrals.overlap_mat_symm_cupy(basis, cp_stream=streams[0]) + V = Integrals.nuc_mat_symm_cupy(basis, mol, cp_stream = streams[0]) + T = Integrals.kin_mat_symm_cupy(basis, cp_stream = streams[0]) + # Core hamiltonian + H = T + V + + print('Core H size in GB ',round(H.nbytes/1e9, 4), flush=True) + print('done!', flush=True) + duration1e = timer() - start1e + print('Time taken '+str(round(duration1e, 2))+' seconds.\n', flush=True) + else: + start1e = timer() + print('\nCalculating overlap and kinetic integrals...\n\n', flush=True) + # One electron integrals + if not self.use_gpu: + S = Integrals.overlap_mat_symm(basis) + T = Integrals.kin_mat_symm(basis) + # Core hamiltonian + H = T + else: + S = Integrals.overlap_mat_symm_cupy(basis, cp_stream = streams[0]) + T = Integrals.kin_mat_symm_cupy(basis, cp_stream = streams[0]) + # Core hamiltonian + H = T + + print('Core H size in GB ',(round(H.nbytes/1e9, 4))*2, flush=True) # Factor of 2 because nuclear matrix will also be included here later + print('done!', flush=True) + duration1e = timer() - start1e + print('Time taken '+str(round(duration1e, 2))+' seconds.\n', flush=True) + + + if dmat is None: + if self.dmat_guess_method=='core': + dmat = self.guessCoreH(mol, basis, Hcore=H, S=S) + + if self.use_gpu: + dmat_cp = cp.asarray(dmat, dtype=cp.float64) + streams[0].synchronize() + cp.cuda.Stream.null.synchronize() + + + if self.sao: + # It is possible that the supplied density matrix to the SCF was in SAO format already. + # In such a case we need to transform this density matrix to CAO basis so that the J and XC term evaluations can be done properly + if not dmat.shape==S.shape: + dmat = np.dot(sph2c_mat_pseudo, np.dot(dmat, sph2c_mat_pseudo.T)) # Convert to CAO from SAO (SAO --> CAO) + # Later the dmat will be converted back to SAO after J and XC term evaluations + if not isDF: # 4c2e ERI case + + print('\nCalculating four centered two electron integrals (ERIs)...\n\n', flush=True) + if not isSchwarz: + start_4c2e = timer() + # Four centered two electron integrals (ERIs) + if rys: + ints4c2e = Integrals.rys_4c2e_symm(basis) + else: + ints4c2e = Integrals.conv_4c2e_symm(basis) + print('Four Center Two electron ERI size in GB ',ints4c2e.nbytes/1e9, flush=True) + print('done!') + durationCoulomb = timer() - start_4c2e + print('Time taken '+str(round(durationCoulomb, 2))+' seconds.\n', flush=True) + else: + print('\n\nPerforming Schwarz screening...') + # threshold_schwarz = 1e-09 + print('Threshold ', threshold_schwarz) + startSchwarz = timer() + nints4c2e_sym8 = int(basis.bfs_nao**4/8) + nints4c2e = int(basis.bfs_nao**4) + duration_4c2e_diag = 0.0 + start_4c2e_diag = timer() + # Diagonal elements of ERI 4c2e array + ints4c2e_diag = Integrals.schwarz_helpers.eri_4c2e_diag(basis) + duration_4c2e_diag = timer() - start_4c2e_diag + print('Time taken to evaluate the ""diagonal"" of 4c2e ERI tensor: ', round(duration_4c2e_diag, 2)) + # Calculate the square roots required for + duration_square_roots = 0.0 + start_square_roots = timer() + sqrt_ints4c2e_diag = np.sqrt(np.abs(ints4c2e_diag)) + duration_square_roots = timer() - start_square_roots + print('Time taken to evaluate the square roots needed: ', round(duration_square_roots, 2)) + chunksize = int(1e9) # Results in 2 GB chunks + duration_indices_calc = 0.0 + duration_concatenation = 0.0 + start_indices_calc = timer() + # indices_temp = [] + ijkl = [0, 0, 0, 0] + if chunksize0: + indicesA = np.concatenate([indicesA, indices_temp[0][0:count]]) + indicesB = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC = np.concatenate([indicesC, indices_temp[2][0:count]]) + indicesD = np.concatenate([indicesD, indices_temp[3][0:count]]) + else: + + indicesA = indices_temp[0][0:count] + indicesB = indices_temp[1][0:count] + indicesC = indices_temp[2][0:count] + indicesD = indices_temp[3][0:count] + # duration_concatenation += timer() - start_concatenation + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if countm', dmat, ao_value_block, ao_value_block) + zero_indices = np.where(np.abs(rho_block*weights_block) < threshold_rho)[0] + ndeleted += len(zero_indices) + weightsNew_block = np.delete(weights_block, zero_indices) + coordsNew_block = np.delete(coords_block, zero_indices, 0) + if weightsNew_block.shape[0]>0: + if weightsNew is None: + weightsNew = weightsNew_block + coordsNew = coordsNew_block + else: + weightsNew = np.concatenate((weightsNew, weightsNew_block)) + coordsNew = np.concatenate([coordsNew, coordsNew_block], axis=0) + + grids.coords = coordsNew + grids.weights = weightsNew + print('done!', flush=True) + durationgrids_prune_rho = timer() - startGrids_prune_rho + print('Time taken '+str(round(durationgrids_prune_rho, 2))+' seconds.\n', flush=True) + print('\nDeleted '+ str(ndeleted) + ' grid points.', flush=True) + + else: + print('\nUsing the user supplied grids!\n\n', flush=True) + + + # Grid information initial + print('\nNo. of supplied/generated grid points: ', grids.coords.shape[0], flush=True) + + # Prune grids based on weights + # start_pruning_weights = timer() + # print('\nPruning grids based on weights....', flush=True) + # zero_indices = np.where(np.logical_and(grids.weights>=-1.0e-12, grids.weights<=1.e-12)) + # grids.weights = np.delete(grids.weights, zero_indices) + # grids.coords = np.delete(grids.coords, zero_indices, 0) + # print('done!', flush=True) + # duration_pruning_weights = timer() - start_pruning_weights + # print('\nTime taken '+str(duration_pruning_weights)+' seconds.\n', flush=True) + # print('\nNo. of grid points after screening by weights: ', grids.coords.shape[0], flush=True) + + print('Size (in GB) for storing the coordinates of grid: ', round(grids.coords.nbytes/1e9, 3), flush=True) + print('Size (in GB) for storing the weights of grid: ', round(grids.weights.nbytes/1e9, 3), flush=True) + print('Size (in GB) for storing the density at gridpoints: ', round(grids.weights.nbytes/1e9, 3), flush=True) + + # Sort the grids for slightly better performance with batching (doesn't seem to make much difference) + if sortGrids: + print('\nSorting grids ....', flush=True) + # Function to sort grids + def get_ordered_list(points, x, y, z): + points.sort(key = lambda p: (p[0] - x)**2 + (p[1] - y)**2 + (p[2] - z)**2) + # print(points[0:10]) + return points + # Make a single array of coords and weights + coords_weights = np.c_[grids.coords, grids.weights] + coords_weights = np.array(get_ordered_list(coords_weights.tolist(), min(grids.coords[:,0]), min(grids.coords[:,1]), min(grids.coords[:,2]))) + # Now go back to two arrays for coords and weights + grids.weights = coords_weights[:,3] + grids.coords = coords_weights[:,0:3] + coords_weights = 0#None + print('done!', flush=True) + + # blocksize = 10000 + ngrids = grids.coords.shape[0] + nblocks = ngrids//blocksize + print('\nWill use batching to evaluate the XC term for memory efficiency.', flush=True) + print('Batch size: ', blocksize, flush=True) + print('No. of batches: ', nblocks+1, flush=True) + + + #### Some preliminary stuff for XC evaluation + durationXCpreprocessing = 0 + list_nonzero_indices = None + count_nonzero_indices = None + list_ao_values = None + list_ao_grad_values = None + if xc_bf_screen: + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(xc[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(xc[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + ### Find the list of significanlty contributing bfs for xc evaluations + startXCpreprocessing = timer() + print('\nPreliminary processing for XC term evaluations...', flush=True) + print('Calculating the value of basis functions (atomic orbitals) and get the indices of siginificantly contributing functions...', flush=True) + # Calculate the value of basis functions for all grid points in batches + # and find the indices of basis functions that have a significant contribution to those batches for each batch + if not self.use_gpu: + list_nonzero_indices, count_nonzero_indices = Integrals.bf_val_helpers.nonzero_ao_indices(basis, grids.coords, blocksize, nblocks, ngrids) + else: + list_nonzero_indices, count_nonzero_indices = Integrals.bf_val_helpers.nonzero_ao_indices_cupy(basis, grids.coords, blocksize, nblocks, ngrids, streams[0]) + print('done!', flush=True) + durationXCpreprocessing = timer() - startXCpreprocessing + print('Time taken '+str(round(durationXCpreprocessing, 2))+' seconds.\n', flush=True) + print('Maximum no. of basis functions contributing to a batch of grid points: ', max(count_nonzero_indices)) + print('Average no. of basis functions contributing to a batch of grid points: ', int(np.mean(count_nonzero_indices))) + + + durationAO_values = 0 + if save_ao_values: + startAO_values = timer() + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + print('\nYou have asked to save the values of significant basis functions on grid points so as to avoid recalculation for each SCF cycle.', flush=True) + memory_required = sum(count_nonzero_indices*blocksize)*8/1024/1024/1024 + print('Please note: This will require addtional memory that is approximately: '+ str(np.round(memory_required,1))+ ' GB', flush=True) + print('Calculating the value of significantly contributing basis functions (atomic orbitals)...', flush=True) + list_ao_values = [] + # Loop over batches + for iblock in range(nblocks+1): + offset = iblock*blocksize + coords_block = grids.coords[offset : min(offset+blocksize,ngrids)] + ao_values_block = Integrals.bf_val_helpers.eval_bfs(basis, coords_block, parallel=True, non_zero_indices=list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]]) + if self.use_gpu and self.keep_ao_in_gpu: + list_ao_values.append(cp.asarray(ao_values_block)) + else: + list_ao_values.append(ao_values_block) + #Free memory + ao_values_block = 0 + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + print('\nYou have asked to save the values of significant basis functions and their gradients on grid points so as to avoid recalculation for each SCF cycle.', flush=True) + memory_required = 4*sum(count_nonzero_indices*blocksize)*8/1024/1024/1024 + print('Please note: This will require addtional memory that is approximately: '+ str(np.round(memory_required,1))+ ' GB', flush=True) + print('Calculating the value of significantly contributing basis functions (atomic orbitals)...', flush=True) + list_ao_values = [] + list_ao_grad_values = [] + # Loop over batches + for iblock in range(nblocks+1): + offset = iblock*blocksize + coords_block = grids.coords[offset : min(offset+blocksize,ngrids)] + # ao_values_block = Integrals.bf_val_helpers.eval_bfs(basis, coords_block, parallel=True, non_zero_indices=list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]]) + ao_values_block, ao_grad_values_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, parallel=True, non_zero_indices=list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]]) + if self.use_gpu and self.keep_ao_in_gpu: + list_ao_values.append(cp.asarray(ao_values_block)) + list_ao_grad_values.append(cp.asarray(ao_grad_values_block)) + else: + list_ao_values.append(ao_values_block) + list_ao_grad_values.append(ao_grad_values_block) + #Free memory + ao_values_block = 0 + ao_grad_values_block =0 + print('done!', flush=True) + durationAO_values = timer() - startAO_values + print('Time taken '+str(round(durationAO_values, 2))+' seconds.\n', flush=True) + + if self.use_gpu: + grids.coords = cp.asarray(grids.coords, dtype=cp.float64) + grids.weights = cp.asarray(grids.weights, dtype=cp.float64) + + #-------XC Stuff start---------------------- + + funcid = self.xc + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + + print('\n\n------------------------------------------------------', flush=True) + print('Exchange-Correlation Functional') + print('------------------------------------------------------\n', flush=True) + print(""PyFock utilizes LibXC's pylibxc library. Citation:"") + print(pylibxc.util.xc_reference()) + print('\n\n') + print('XC Functional IDs supplied: ', funcid, flush=True) + print('\n\nDescription of exchange functional: \n') + print('The Exchange function belongs to the family:', xc_family_dict[x_family_code], flush=True) + print(funcx.describe()) + print('\n\nDescription of correlation functional: \n', flush=True) + print(' The Correlation function belongs to the family:', xc_family_dict[c_family_code], flush=True) + print(funcc.describe()) + print('------------------------------------------------------\n', flush=True) + print('\n\n', flush=True) + #-------XC Stuff end---------------------- + + Etot = 0 + + itr = 1 + Enn = self.nuclear_rep_energy(mol) + #diis = scf.CDIIS() + dmat_old = 0 + J_diff = 0 + Ecoul = 0.0 + Ecoul_temp = 0.0 + + durationxc = 0 + + startKS = timer() + if self.sao: + ######### + # I use a trick to calculate the DFT energy in SAO basis. + # The trick is to get rid of the extra information in the CAO basis matrices. + # The following does just that. + # Going from CAO --> SAO we lose the extra information then we go back to from SAO --> CAO + # This way all the integrals (potential matrices and density matrices) can still be calculated + # in the CAO basis. In fact even the KS matrix is diagonalized in the CAO basis with the extra information + # removed by forward and backward transformation: CAO --> SAO followed by SAO --> CAO. + # This also helps in reducing the number of transformations needed for calculation of various energy contributions. + ######### + # Convert the overlap matrix from CAO to SAO basis + S = np.dot(c2sph_mat, np.dot(S, c2sph_mat.T)) # CAO --> SAO + # Convert back to SAO so that now we lose the extra information that the CAO basis had + S = np.dot(sph2c_mat_pseudo, np.dot(S, sph2c_mat_pseudo.T)) + if orthogonalize: + if not self.use_gpu: + eig_val_s, eig_vec_s = scipy.linalg.eigh(S) + # Removing the eigenvectors assoicated to the smallest eigenvalue. + x = eig_vec_s[:,eig_val_s>1e-7] / np.sqrt(eig_val_s[eig_val_s>1e-7]) + else: + x = None + durationKS = durationKS + timer() - startKS + + + while not (scf_converged or itr==max_itr+1): + startIter = timer() + if itr==1: + dmat_diff = dmat # This is in CAO basis + # Coulomb (Hartree) matrix + if not isDF: + J = contract('ijkl,ij',ints4c2e,dmat) # This is in CAO basis + else: + J, durationDF, durationDF_coeff, durationDF_gamma, durationDF_Jtri, Ecoul_temp = Jmat_from_density_fitting(dmat, DF_algo, cholesky, cho_decomp_ints2c2e, df_coeff0, Qpq, ints3c2e, ints2c2e, indices_dmat_tri, indices_dmat_tri_2, indicesA, indicesB, indicesC, offsets_3c2e, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, strict_schwarz, basis, auxbasis, self.use_gpu, self.keep_ints3c2e_in_gpu, durationDF_gamma, ncores, durationDF_coeff, durationDF_Jtri, durationDF) + + + + + else: + dmat_diff = dmat-dmat_old + if not isDF: + # J_diff = contract('ijkl,ij',ints4c2e,dmat_diff) + # J += J_diff + J = contract('ijkl,ij', ints4c2e, dmat) + else: + J, durationDF, durationDF_coeff, durationDF_gamma, durationDF_Jtri, Ecoul_temp = Jmat_from_density_fitting(dmat, DF_algo, cholesky, cho_decomp_ints2c2e, df_coeff0, Qpq, ints3c2e, ints2c2e, indices_dmat_tri, indices_dmat_tri_2, indicesA, indicesB, indicesC, offsets_3c2e, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, strict_schwarz, basis, auxbasis, self.use_gpu, self.keep_ints3c2e_in_gpu, durationDF_gamma, ncores, durationDF_coeff, durationDF_Jtri, durationDF) + # J += J_diff + if self.use_gpu: + J = cp.asarray(J, dtype=cp.float64) + streams[0].synchronize() + cp.cuda.Stream.null.synchronize() + + + # XC energy and potential + startxc = timer() + + if not self.use_gpu: + if XC_algo==1: + # Much slower than JOBLIB version + # Still keeping it because, it can be useful when using GPUs + Exc, Vxc = Integrals.eval_xc_1(basis, dmat, grids.weights, grids.coords, funcid, blocksize=blocksize, debug=debug, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values) + if XC_algo==2: + # Much faster than above and stable too, therefore this should be default now. + # Used to unstable and had memory leaks, + # But now all that is fixed by using threadpoolctl, garbage collection or freeing up memory after XC evaluation at each iteration + + Exc, Vxc = Integrals.eval_xc_2(basis, dmat, grids.weights, grids.coords, funcid, ncores=ncores, blocksize=blocksize, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, debug=debug) + + if XC_algo==3: + with threadpool_limits(limits=1, user_api='blas'): + Exc, Vxc = Integrals.eval_xc_3(basis, dmat, grids.weights, grids.coords, funcid, ncores=ncores, blocksize=blocksize, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, debug=debug) + else: # GPU + if XC_algo==1: + Exc, Vxc = Integrals.eval_xc_1_cupy(basis, dmat_cp, grids.weights, grids.coords, funcid, blocksize=blocksize, debug=debug, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, use_libxc=self.use_libxc,\ + nstreams=self.n_streams, ngpus=self.n_gpus, freemem=self.free_gpu_mem, threads_per_block=threads_per_block, + type=precision_XC) + if XC_algo==2: + Exc, Vxc = Integrals.eval_xc_2_cupy(basis, dmat_cp, grids.weights, cp.asnumpy(grids.coords), funcid, ncores=ncores, blocksize=blocksize, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, debug=debug) + if XC_algo==3: + # Default for GPUs + Exc, Vxc = Integrals.eval_xc_3_cupy(basis, dmat_cp, grids.weights, grids.coords, funcid, blocksize=blocksize, debug=debug, \ + list_nonzero_indices=list_nonzero_indices, count_nonzero_indices=count_nonzero_indices, \ + list_ao_values=list_ao_values, list_ao_grad_values=list_ao_grad_values, use_libxc=self.use_libxc,\ + nstreams=self.n_streams, ngpus=self.n_gpus, freemem=self.free_gpu_mem, threads_per_block=threads_per_block, + type=precision_XC, streams=streams, nb_streams=nb_streams) + + Vxc = cp.asarray(Vxc, dtype=cp.float64) + + durationxc = durationxc + timer() - startxc + + + dmat_old = dmat # This is in CAO basis + + + if self.use_gpu: + Enuc = contract('ij,ji->', dmat_cp, V) + Ekin = contract('ij,ji->', dmat_cp, T) + Ecoul = contract('ij,ji->', dmat_cp, J)*0.5 + else: + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Energy contractions', controller.info()) + Enuc = contract('ij,ji->', dmat, V) + Ekin = contract('ij,ji->', dmat, T) + Ecoul = contract('ij,ji->', dmat, J)*0.5 + if isDF and (DF_algo==6 or DF_algo==10): + Ecoul = Ecoul*2 - 0.5*Ecoul_temp # This is the correct formula for Coulomb energy with DF + + Etot_new = Exc + Enuc + Ekin + Enn + Ecoul + self.scf_energies.append(Etot_new) + self.Total_energy = Etot_new + self.XC_energy = Exc + self.Kinetic_energy = Ekin + self.Nuclear_repulsion_energy = Enn + self.J_energy = Ecoul + self.Nuc_energy = Enuc + + # Set label width and numeric format + label_w = 30 + num_fmt = ""{:>20.13f}"" # 20-wide, 10 decimal places + + print(f""\n\n\n------Iteration {itr}--------\n\n"", flush=True) + print(""Energies (in Hartrees)\n"") + print(f""{'Electron-Nuclear Energy':<{label_w}}{num_fmt.format(Enuc)}"") + print(f""{'Nuclear repulsion Energy':<{label_w}}{num_fmt.format(Enn)}"") + print(f""{'Kinetic Energy':<{label_w}}{num_fmt.format(Ekin)}"") + print(f""{'Coulomb Energy':<{label_w}}{num_fmt.format(Ecoul)}"") + print(f""{'Exchange-Correlation Energy':<{label_w}}{num_fmt.format(Exc)}"") + print('-' * (label_w + 20)) + print(f""{'Total Energy':<{label_w}}{num_fmt.format(Etot_new)}"") + print('-' * (label_w + 20) + ""\n\n\n"", flush=True) + + + + print('Energy difference : ',abs(Etot_new-Etot), flush=True) + + # Check convergence criteria + if abs(Etot_new-Etot)=max_itr and not scf_converged: + print('\nSCF NOT Converged after '+str(itr-1) +' iterations!', flush=True) + + + + if not scf_converged: + KS = H + J + Vxc + if self.sao: + # The following gets rid of the extra information in the CAO basis KS matrix by going to SAO and then back to CAO. + # This way even though the matrix dimensions would be that of CAO but the information would be the same as SAO + # leading to the same energy as SAO basis PySCF or TURBOMOLE calculations + KS = np.dot(c2sph_mat, np.dot(KS, c2sph_mat.T)) # CAO --> SAO + KS = np.dot(sph2c_mat_pseudo, np.dot(KS, sph2c_mat_pseudo.T)) #SAO --> CAO + + + #### DIIS + startDIIS = timer() + diis_start_itr = 1 + if itr >= diis_start_itr: + if not self.use_gpu: + with threadpool_limits(limits=ncores, user_api='blas'): + # print('DIIS ', controller.info()) + KS = self.DIIS(S, dmat, KS) + else: + KS = self.DIIS_cupy(S, dmat_cp, KS) + streams[0].synchronize() + cp.cuda.Stream.null.synchronize() + durationDIIS = durationDIIS + timer() - startDIIS + + #### Solve KS equation (Diagonalize KS matrix) + startKS = timer() + if self.use_gpu: + eigvalues, eigvectors = self.solve_cupy(KS, S, orthogonalize=True) # Orthogonalization is necessary with CUDA + mo_occ = self.getOcc_cupy(mol, eigvalues, eigvectors) + dmat = self.gen_dm_cupy(eigvectors, mo_occ) + dmat_cp = dmat + dmat = cp.asnumpy(dmat) + streams[0].synchronize() + cp.cuda.Stream.null.synchronize() + # HOMO-LUMO gap + occupied = cp.where(mo_occ > 1e-8)[0] + if len(occupied) < len(eigvalues): + homo_idx = occupied[-1] + lumo_idx = homo_idx + 1 + gap = (eigvalues[lumo_idx] - eigvalues[homo_idx]) + print(f""\n\nHOMO-LUMO gap: {gap} au"", flush=True) + print(f""HOMO-LUMO gap: {gap*27.211324570273:.3f} eV"", flush=True) + else: + with threadpool_limits(limits=ncores, user_api='blas'): + # print('KS eigh', controller.info()) + eigvalues, eigvectors = self.solve(KS, S, orthogonalize=orthogonalize, x=x) + mo_occ = self.getOcc(mol, eigvalues, eigvectors) + dmat = self.gen_dm(eigvectors, mo_occ) + # HOMO-LUMO gap + occupied = np.where(mo_occ > 1e-8)[0] + if len(occupied) < len(eigvalues): + homo_idx = occupied[-1] + lumo_idx = homo_idx + 1 + gap = (eigvalues[lumo_idx] - eigvalues[homo_idx]) + print(f""\n\nHOMO-LUMO gap: {gap} au"", flush=True) + print(f""HOMO-LUMO gap: {gap*27.211324570273:.3f} eV"", flush=True) + durationKS = durationKS + timer() - startKS + + self.dmat = dmat + self.mo_coefficients = eigvectors + self.mo_energies = eigvalues + self.mo_occupations = mo_occ + + # Check when to switch to double precision for XC + if self.use_gpu: + if precision_XC is cp.float32: + if abs(Etot_new-Etot)/abs(Etot_new)<5e-7: + precision_XC = cp.float64 + print('\nSwitching to double precision for XC evaluation after '+str(itr) +' iterations!', flush=True) + + + + durationItr = timer() - startIter + print('\n\nTime taken for the previous iteration: '+str(round(durationItr, 2))+' seconds \n\n', flush=True) + + + self.converged = scf_converged + self.niter = itr-1 + + + durationSCF = timer() - startSCF + # print(dmat) + print('\nTime taken : '+str(round(durationSCF, 2)) +' seconds.', flush=True) + print('\n\n', flush=True) + print('-------------------------------------------------------------', flush=True) + print('Profiling (Wall times in seconds)', flush=True) + print('-------------------------------------------------------------', flush=True) + print('Preprocessing ', round(durationXCpreprocessing + durationAO_values + durationgrids_prune_rho + durationSchwarz, 2), flush=True) + if isDF: + print('Density Fitting ', round(durationDF, 2), flush=True) + if DF_algo==6 or DF_algo==10: + print(' DF (gamma) ', round(durationDF_gamma, 2), flush=True) + print(' DF (coeff) ', round(durationDF_coeff, 2), flush=True) + print(' DF (Jtri) ', round(durationDF_Jtri, 2), flush=True) + if cholesky: + print(' DF (Cholesky) ', round(durationDF_cholesky, 2), flush=True) + print('DIIS ', round(durationDIIS, 2), flush=True) + print('KS matrix diagonalization ', round(durationKS, 2), flush=True) + print('One electron Integrals (S, T, Vnuc) ', round(duration1e, 2), flush=True) + if isDF: + print('Coulomb Integrals (2c2e + 3c2e) ', round(durationCoulomb-durationSchwarz-durationDF_cholesky, 2), flush=True) + if not isDF: + print('Coulomb Integrals (4c2e) ', round(durationCoulomb-durationSchwarz, 2), flush=True) + print('Grids construction ', round(durationgrids, 2), flush=True) + print('Exchange-Correlation Term ', round(durationxc, 2), flush=True) + totalTime = round(durationXCpreprocessing + durationAO_values + duration1e + durationCoulomb - durationDF_cholesky + \ + durationgrids + durationxc + durationDF + durationKS + durationDIIS + durationgrids_prune_rho, 2) + print('Misc. ', round(durationSCF - totalTime, 2), flush=True) + print('Complete SCF ', round(durationSCF, 2), flush=True) + + if self.use_gpu: + # Free memory of all GPUs + for igpu in range(self.n_gpus): + cp.cuda.Device(igpu).use() + cp._default_memory_pool.free_all_blocks() + + # Switch back to main GPU + cp.cuda.Device(0).use() + return Etot, dmat + + + + + + + + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/densfuncs.py",".py","1294","39","import numpy as np +import pylibxc + +# https://th.fhi-berlin.mpg.de/th/Meetings/DFT-workshop-Berlin2011/presentations/2011-07-13_DellaSala_Fabio.pdf +# http://alps.comp-phys.org/mediawiki/images/8/83/Lecture2.pdf +# https://en.wikipedia.org/wiki/Local-density_approximation +# https://th.fhi-berlin.mpg.de/th/publications/santra_dissertation.pdf - Very good resource +# Dfauto: a good article. It also made me realize that instead of taking the derivative wrt density +# it can be better to take the derivative wrt density matrix elements +# https://www.sciencedirect.com/science/article/pii/S0010465501001485 + + + +def lda_x(rho): + # name = ""LDA"" + # full_name = ""LDA (PZ parametrization)"" + # citation = ""J. P. Perdew and A. Zunger, PRB 23, 5048 (1981)"" + + lda_x_param = -0.7385587663820223 #-3/4*np.pow(3/np.pi,1/3) + return lda_x_param*np.power(rho,1/3) + + +#def test(): +# # TESTING +# funcid = 1 +# rho = [1,2,3] +# #LibXC stuff +# # Create a LibXC object +# func = pylibxc.LibXCFunctional(funcid, ""unpolarized"") +# # Input dictionary for libxc +# inp = {} +# # Input dictionary needs density values at grid points +# inp['rho'] = rho +# # Calculate the necessary quantities using LibXC +# ret = func.compute(inp) +# print(ret['zk']) +# +# print(lda_x(rho)) +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Graphics.py",".py","9061","246","import numpy as np +from OpenGL.GLUT import * +from OpenGL.GLU import * +from OpenGL.GL import * +from . import Data +import sys + +# Global variables +xCoord, yCoord, zCoord, atomicNumber, totalNumAtoms = [], [], [], [], 0 +bondStart, bondEnd, bondLengths = [], [], [] +maxDistance, selectedAtom = 0.0, -1 +_mouse_dragging, _previous_mouse_position = False, None +zoom_factor = 1.0 # New zoom variable +min_zoom, max_zoom = 0.1, 5.0 # Zoom limits + +def initializeGlobalVars(mol): + global xCoord, yCoord, zCoord, atomicNumber, totalNumAtoms, maxDistance + totalNumAtoms = mol.natoms + xCoord = [mol.coords[i][0] for i in range(mol.natoms)] + yCoord = [mol.coords[i][1] for i in range(mol.natoms)] + zCoord = [mol.coords[i][2] for i in range(mol.natoms)] + atomicNumber = [mol.Zcharges[i] for i in range(mol.natoms)] + + # Center molecule and calculate max distance + com = [sum(xCoord)/totalNumAtoms, sum(yCoord)/totalNumAtoms, sum(zCoord)/totalNumAtoms] + for i in range(totalNumAtoms): + xCoord[i] -= com[0]; yCoord[i] -= com[1]; zCoord[i] -= com[2] + + maxDistance = max(np.sqrt(x**2 + y**2 + z**2) for x,y,z in zip(xCoord, yCoord, zCoord)) * 2 + 5 + calculateBonds() + +def calculateBonds(): + global bondStart, bondEnd, bondLengths + bondStart, bondEnd, bondLengths = [], [], [] + for i in range(totalNumAtoms): + for j in range(i+1, totalNumAtoms): + dist = np.sqrt((xCoord[i]-xCoord[j])**2 + (yCoord[i]-yCoord[j])**2 + (zCoord[i]-zCoord[j])**2) + if dist <= (float(Data.covalentRadius[atomicNumber[i]]) + float(Data.covalentRadius[atomicNumber[j]])): + bondStart.append(i); bondEnd.append(j); bondLengths.append(dist) + +def update_projection(): + """"""Update the projection matrix based on current zoom factor"""""" + global zoom_factor, maxDistance + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + + # Apply zoom by adjusting the orthographic viewing volume + view_size = (maxDistance/2) / zoom_factor + glOrtho(-view_size, view_size, -view_size, view_size, -100, 100) + + glMatrixMode(GL_MODELVIEW) + +def zoom_in(): + """"""Zoom in function"""""" + global zoom_factor + zoom_factor = min(zoom_factor * 1.2, max_zoom) + update_projection() + glutPostRedisplay() + +def zoom_out(): + """"""Zoom out function"""""" + global zoom_factor + zoom_factor = max(zoom_factor / 1.2, min_zoom) + update_projection() + glutPostRedisplay() + +def mouse_wheel(wheel, direction, x, y): + """"""Handle mouse wheel for zooming"""""" + if direction > 0: + zoom_in() + else: + zoom_out() + +def draw_sphere(xyz, radius, color): + glPushMatrix() + color = [c/255.0 for c in color] + [1.0] + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color) + glMaterialfv(GL_FRONT, GL_SPECULAR, [1.0, 1.0, 1.0, 1.0]) + glMaterialf(GL_FRONT, GL_SHININESS, 30.0) + glTranslate(*xyz) + glutSolidSphere(radius, 20, 20) + glPopMatrix() + +def cylinder_between(x1, y1, z1, x2, y2, z2, length, radius): + v = [x2-x1, y2-y1, z2-z1] + axis = (1, 0, 0) if np.hypot(v[0], v[1]) < 0.001 else np.cross(v, (0, 0, 1)) + angle = -np.arctan2(np.hypot(v[0], v[1]), v[2]) * 180/np.pi + glPushMatrix() + glTranslate(x1, y1, z1) + glRotate(angle, *axis) + gluCylinder(gluNewQuadric(), radius, radius, length, 10, 10) + glPopMatrix() + +def display(): + global selectedAtom + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) + + # Draw atoms + for i in range(totalNumAtoms): + draw_sphere([xCoord[i], yCoord[i], zCoord[i]], + float(Data.atomicRadius[atomicNumber[i]])/2, + Data.CPKcolorRGB[atomicNumber[i]]) + + # Draw bonds + for i in range(len(bondStart)): + start, end = bondStart[i], bondEnd[i] + x1, y1, z1 = xCoord[start], yCoord[start], zCoord[start] + x2, y2, z2 = xCoord[end], yCoord[end], zCoord[end] + + # First half with start atom color + color = [c/255.0 for c in Data.CPKcolorRGB[atomicNumber[start]]] + [1.0] + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color) + cylinder_between(x1, y1, z1, (x1+x2)/2, (y1+y2)/2, (z1+z2)/2, bondLengths[i]/2, 0.1) + + # Second half with end atom color + color = [c/255.0 for c in Data.CPKcolorRGB[atomicNumber[end]]] + [1.0] + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color) + cylinder_between((x1+x2)/2, (y1+y2)/2, (z1+z2)/2, x2, y2, z2, bondLengths[i]/2, 0.1) + + # Display selected atom info and zoom level + if selectedAtom >= 0: + glDisable(GL_LIGHTING) + glColor3f(1, 1, 1) + glRasterPos3f(maxDistance/3/zoom_factor, maxDistance/3/zoom_factor, 0) + info = f""Atom {selectedAtom}: {Data.elementSymbols[atomicNumber[selectedAtom]]} ({xCoord[selectedAtom]:.3f}, {yCoord[selectedAtom]:.3f}, {zCoord[selectedAtom]:.3f})"" + for char in info: + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, ord(char)) + glEnable(GL_LIGHTING) + + # Display zoom level + glDisable(GL_LIGHTING) + glColor3f(0.8, 0.8, 0.8) + glRasterPos3f(-maxDistance/2.5/zoom_factor, maxDistance/2.5/zoom_factor, 0) + zoom_info = f""Zoom: {zoom_factor:.2f}x"" + for char in zoom_info: + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, ord(char)) + glEnable(GL_LIGHTING) + + glutSwapBuffers() + +def mouse_click(button, state, x, y): + global _mouse_dragging, _previous_mouse_position, selectedAtom + if button == GLUT_LEFT_BUTTON: + if state == GLUT_DOWN: + _mouse_dragging = True + _previous_mouse_position = (x, y) + + # Check for atom selection + viewport = glGetIntegerv(GL_VIEWPORT) + modelview = glGetDoublev(GL_MODELVIEW_MATRIX) + projection = glGetDoublev(GL_PROJECTION_MATRIX) + + winY = viewport[3] - y + _, _, winZ = gluUnProject(x, winY, 0.5, modelview, projection, viewport) + + min_dist, closest = float('inf'), -1 + for i in range(totalNumAtoms): + winX, winY, _ = gluProject(xCoord[i], yCoord[i], zCoord[i], modelview, projection, viewport) + dist = np.sqrt((x - winX)**2 + (y - (viewport[3] - winY))**2) + if dist < 20 and dist < min_dist: # 20 pixel tolerance + min_dist, closest = dist, i + + selectedAtom = closest + print(f""Selected atom {selectedAtom}: {Data.elementSymbols[atomicNumber[selectedAtom]] if selectedAtom >= 0 else 'None'}"") + glutPostRedisplay() + else: + _mouse_dragging = False + +def mouse_motion(x, y): + global _previous_mouse_position + if _mouse_dragging and _previous_mouse_position: + dx, dy = (x - _previous_mouse_position[0])/100.0, (y - _previous_mouse_position[1])/100.0 + glRotatef(dx * 50, 0, 1, 0) + glRotatef(dy * 50, 1, 0, 0) + _previous_mouse_position = (x, y) + glutPostRedisplay() + +def keyboard(key, x, y): + global zoom_factor + if key == b'\x1b': # Escape key + glutLeaveMainLoop() + elif key == b'+' or key == b'=': # Plus key for zoom in + zoom_in() + print(f""Zoom: {zoom_factor:.2f}x"") + elif key == b'-': # Minus key for zoom out + zoom_out() + print(f""Zoom: {zoom_factor:.2f}x"") + elif key == b'r' or key == b'R': # Reset zoom + zoom_factor = 1.0 + update_projection() + glutPostRedisplay() + print(""Zoom reset to 1.0x"") + +def special_keys(key, x, y): + """"""Handle special keys like Page Up/Down for zooming"""""" + if key == GLUT_KEY_PAGE_UP: + zoom_in() + print(f""Zoom: {zoom_factor:.2f}x"") + elif key == GLUT_KEY_PAGE_DOWN: + zoom_out() + print(f""Zoom: {zoom_factor:.2f}x"") + +def visualize(mol, title='PyFock | CrysX - 3D Viewer'): + initializeGlobalVars(mol) + + glutInit(sys.argv) + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH) + glutInitWindowSize(700, 700) + glutCreateWindow(title) + + glClearColor(0.1, 0.1, 0.1, 1.0) + glEnable(GL_DEPTH_TEST) + glEnable(GL_LIGHTING) + glEnable(GL_LIGHT0) + glLightfv(GL_LIGHT0, GL_POSITION, [10, 10, 10, 1]) + glLightfv(GL_LIGHT0, GL_DIFFUSE, [1, 1, 1, 1]) + + # Set initial projection with zoom support + update_projection() + glMatrixMode(GL_MODELVIEW) + glLoadIdentity() + + glutDisplayFunc(display) + glutMouseFunc(mouse_click) + glutMotionFunc(mouse_motion) + glutKeyboardFunc(keyboard) + glutSpecialFunc(special_keys) + + # Register mouse wheel callback if available + try: + glutMouseWheelFunc(mouse_wheel) + except: + pass # Mouse wheel not supported in older PyOpenGL versions + + print(""Controls:"") + print(""- Click atoms to see coordinates"") + print(""- Drag to rotate"") + print(""- Mouse wheel: Zoom in/out"") + print(""- '+' or '=': Zoom in"") + print(""- '-': Zoom out"") + print(""- 'R': Reset zoom"") + print(""- Page Up/Down: Zoom in/out"") + print(""- ESC: Exit"") + print(f""Current zoom: {zoom_factor:.2f}x"") + + glutMainLoop()","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Basis.py",".py","47260","914","# Basis.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +import numpy as np +import scipy +from scipy.special import factorial2, binom +import re +from . import Data +from collections import Counter + +import sys +import os + +# print(__file__) +# print(sys.argv[0]) +# print(sys.path[0]) + +#Class to store basis function properties +class Basis: + """""" + Class to store and manage basis function properties for a given molecular system. + + This class processes atomic basis set information for each atom in the molecule, + including primitive Gaussian functions, shells, and contracted basis functions (AOs). + It also supports TURBOMOLE-style shell ordering. + """""" + def __init__(self, mol, basis, tmoleFormat=False): + """""" + Initialize a Basis object for storing basis function properties. + + Args: + mol: Mol object containing molecular information + basis: Dictionary specifying the basis set to be used for each atom, or None to use mol.basis + tmoleFormat (bool): Whether to use TURBOMOLE format ordering for basis functions + + Returns: + None + + Raises: + None - prints error message if mol is None + """""" + if mol is None: + print('Error: Please provide a Mol object.') + return None + #Basis set name + #If no basis set name is provided specifically, + #then use the basis set name of the mol. + #'basis' is a dictionary specifying the basis set to be used for a particular atom + if basis is None: + self.basis = mol.basis + else: + self.basis = basis + + + self.basisSet = '' + """"""Basis set name or label. + Type: str + """""" + + self.nao = 0 + """"""Number of basis functions (atomic orbitals). + Type: int + """""" + + self.nshells = 0 + """"""Number of shells. + Type: int + """""" + + self.totalnprims = 0 + """"""Total number of primitive Gaussian functions. + Type: int + """""" + + self.nprims = [] + """"""Number of primitives in each shell. + Type: List[int] + """""" + + self.prim_coeffs = [] + """"""Primitive contraction coefficients. + Type: List[float] + """""" + #Exponents of primitives + self.prim_expnts = [] + """"""Exponents of primitives. + Type: List[float] + """""" + #Coords of primitives + self.prim_coords = [] + """"""Coordinates of each primitive function. + Type: List[List[float]] + """""" + #Normalization factors of primitives + self.prim_norms = [] + """"""Normalization constants of primitives. + Type: List[float] + """""" + # This list contains the indices of atoms (first = #0) that correspond to a particular primitive function + self.prim_atoms = [] #(This list should be of the size of the number of self.totalnprims) + """"""Atom index corresponding to each primitive. + Type: List[int] + """""" + # A list of tuples (2D list) that gives the number of primitives belonging to each atomic index + self.nprims_atoms = [] # Size is the same as that of no. of atoms. Looks like this: [(0, 12), (1, 5), (2, 5)] + """"""Number of primitives per atom as (atom_index, nprims). + Type: List[Tuple[int, int]] + """""" + # This list contains the indices of shells (first = #0) that correspond to a particular primitive function + self.prim_shells = [] #(This list should be of the size of the number of self.totalnprims) + """"""Shell index corresponding to each primitive. + Type: List[int] + """""" + # A list of tuples (2D list) that gives the number of primitives belonging to each shell index + self.nprims_shells = [] # Size is the same as that of no. of shells. Looks like this: [(0, 12), (1, 5), (2, 5)] + """"""Number of primitives per shell as (shell_index, nprims). + Type: List[Tuple[int, int]] + """""" + # A special 2d list that contains the angular momentum of shell in the first index and the no. of primitives corresponding to the shell as second index + self.nprims_shell_l_list = [] # This will be of the same size as the no. of shells + """"""Angular momentum and primitive count per shell as (l, nprims). + Type: List[Tuple[int, int]] + """""" + # A list of size natoms, that contains the values of the largest primitive exponents for all the atoms + self.alpha_max = [] + """"""Maximum exponent among primitives for each atom. + Type: List[float] + """""" + # A list of size natoms, that contains the list of the smallest primitive exponents for each shell for all the atoms + self.alpha_min = [] + """"""Minimum exponent of primitives per shell for each atom. + Type: List[List[float]] + """""" + #Number of contractions + self.ncontrs = 0 + """"""Total number of contracted basis functions. + Type: int + """""" + #Normalization factors for contractions + self.contrs_norm = [] + """"""Normalization factors for contracted basis functions. + Type: List[float] + """""" + #Degeneracy of shells + self.shell_degen = [] + """"""Degeneracy of each shell. + Type: List[int] + """""" + #Shells + self.shellsLabel = [] + """"""Label of each shell (e.g., 'S', 'P', etc.). + Type: List[str] + """""" + self.shells = [] + """"""Shell index (0: s, 1: p, 2:d). + Type: List[int] + """""" + self.shell_coords = [] + """"""Coordinates of each shell center. + Type: List[List[float]] + """""" + #--------------------------------- + #Information for basis function + #--------------------------------- + #Coordinates of basis functions (This list should be of the size of the number of AOs/BFs) + self.bfs_coords = [] + """"""Coordinates of basis functions (same as their parent shell). + Type: List[List[float]] + """""" + # Number of primitives corresponding to each basis function (This list should be of the size of the number of AOs/BFs) + self.bfs_nprim = [] + """"""Number of primitives corresponding to each basis function. + Type: List[int] + """""" + # Radius cutoff for each basis function (This list should be of the size of the number of AOs/BFs) + # This is used to accelerate the evaluation of AOs on grid points, as those gridpoints farther than the radius cutoff + # of the basis function can be discarded for calcualtion. + self.bfs_radius_cutoff = [] + """"""Radius cutoff for each basis function to speed up AO evaluation. + Type: List[float] + """""" + #A list of the size of number of atomic orbitals (BFs), + #that contains lists of primitive contraction coefficients/exponents + #corresponding to every basis function + self.bfs_expnts = [] + """"""Primitive exponents used in each basis function. + Type: List[List[float]] + """""" + + self.bfs_coeffs = [] + """"""Primitive coefficients for each basis function. + Type: List[List[float]] + """""" + # A list of the size of number of AOs (BFs) + # that contains the lists of normalization factors for + # every primitive corresponding to the basis functions + self.bfs_prim_norms = [] + """"""Primitive normalization constants per basis function. + Type: List[List[float]] + """""" + # Normalization factor for the contraction of primitives making up a BF (This list should be of the size of the number of AOs/BFs) + self.bfs_contr_prim_norms = [] + """"""Normalization for the contraction of primitives forming a BF. + Type: List[float] + """""" + # l,m,n indices of BFs (This list should be of the size of the number of AOs/BFs) + self.bfs_lmn = [] + """"""Cartesian angular momentum indices (l, m, n) per basis function. + Type: List[Tuple[int, int, int]] + """""" + # Angular momentum of a basis function (This list should be of the size of the number of AOs/BFs) + self.bfs_lm = [] + """"""Angular momentum `l` for each basis function. + Type: List[int] + """""" + # Label of a basis function (This list should be of the size of the number of AOs/BFs) + self.bfs_label = [] + """"""Label for each basis function. + Type: List[str] + """""" + # Number of BFs in a shell + self.bfs_nbfshell = [] + """"""Number of BFs in the shell of each basis function. + Type: List[int] + """""" + # Shell index of each bf + self.bfs_shell_index =[] + """"""Shell index for each basis function. + Type: List[int] + """""" + # BF offset index of each shell (This should be of the size of the number of shells) + self.shell_bfs_offset =[] + """"""Offset index of the first basis function in each shell. + Type: List[int] + """""" + # Total number of basis functions (BFs) also called Atomic orbitals (AOs) + self.bfs_nao = [] + """"""Index of each basis function (redundant with `nao`). + Type: List[int] + """""" + # This list contains the indices of atoms (first = #0) that correspond to a particular bf + self.bfs_atoms = [] #(This list should be of the size of the number of AOs/BFs) + """"""Atom index corresponding to each basis function. + Type: List[int] + """""" + #--------------------------------- + #If all data was parsed successfully. + self.success = False + """"""Indicates if basis parsing was successful. + Type: bool + """""" + #Convert the keys of basis dictionary to lower case to avoid ambiguity + self.basisSet = self.createCompleteBasisSet(mol, basis) + self.readBasisFunctionInfo(mol, self.basisSet) + self.totalnprims = sum(self.nprims) + self.nshells = len(self.nprims) + # Now lets create information about the basis functions + # A basis function is a combination of gaussian primitives, + # so we need + # number of primitives for a given bf, + # the exponents and contraction coefficients of the primitives, + # the l,m,n triplet information, + # the angular momentum l+m+n, + # coords, + # normalization factors of primitives, + # normalization factor for the contraction. + #--------------------------------------- + offset = 0 + ishell = 0 + # Loop through all the shells + for i in range(len(self.nprims)): + # Number of primitives in a shell + numprim = self.nprims[i] + # Angular momentum of a shell + lm = self.shells[i] - 1 + # no of bfs in this shell + nbf_shell = Data.shell_degen[lm] + self.bfs_nbfshell.append(nbf_shell) + # Assign the lmn triplets and other information corresponding to basis functions + # by looping through the degeneracy of the shells. + # Example: If the degeneracy is 1 then we loop through [0,1) that is we look + # for the 0th element in the Data.shell_lmn dictionary as that corresponds to the 's' lmn triplet. + # Similarly if the denegeracy was 3 as for 'p' shell, then we loop from [1,3] and get the + # lmn triplets corresponding to 'p' shell and so on. + offset_shell_labels = Data.shell_lmn_offset[lm] + for j in range(offset_shell_labels, nbf_shell + offset_shell_labels): + #Assign the label to the basis function + if tmoleFormat: + label = list(Data.shell_lmn_tmole)[j] + else: + label = list(Data.shell_lmn)[j] + self.bfs_label.append(label) + # Assign l,m,n triplet for a basis function + if tmoleFormat: + lmn = Data.shell_lmn_tmole[label] + else: + lmn = Data.shell_lmn[label] + self.bfs_lmn.append(lmn) + # Assign the number of primitives in a basis function + self.bfs_nprim.append(numprim) + # Assign the the total angular momentum of a basis function + self.bfs_lm.append(sum(lmn)) + # Assign the exponents and contraction coefficients + expnts = self.prim_expnts[offset : offset+numprim ] + self.bfs_expnts.append(expnts) + coeffs = self.prim_coeffs[offset : offset+numprim ] + self.bfs_coeffs.append(coeffs) + # Assign Radius Cutoffs + radius_cutoff = 0.0 + # Loop over primitives + eeta_log = np.log(1.0E-9) + for iprim_ in range(len(expnts)): + radius_cutoff = np.maximum(radius_cutoff, np.sqrt(1.0/expnts[iprim_]*(np.log(expnts[iprim_])/2.0 - eeta_log))) + self.bfs_radius_cutoff.append(radius_cutoff) + # Assign the normalization factors for all the primitives corresponding to a BF + norms = [] + for k in range(offset,offset+numprim): + norms.append(self.normalizationFactor(self.prim_expnts[k],lmn[0],lmn[1],lmn[2])) + self.bfs_prim_norms.append(norms) + self.bfs_contr_prim_norms.append(self.normalizationFactorContraction(expnts, coeffs, norms, lmn[0],lmn[1],lmn[2], lm)) + # Assign coordinates to the basis functions + self.bfs_coords.append(self.shell_coords[i]) + # Assign shell index to the basis functions + self.bfs_shell_index.append(ishell) + + ishell += 1 + offset = offset + numprim + self.bfs_nao = len(self.bfs_label) + + ##### The following was mainly developed to calculated alpha_min and alpha_max for numgrid + + # Calculate the number of primitives corresponding to each atom + cnt = Counter(self.prim_atoms) # Gives a Counter object similar to a dictionary + # Convert the Counter object to a list + self.nprims_atoms = list(cnt.items()) #a list of tuples, each containing a value and its count in the list + ### Start processing to calculate alpha_min and alpha_max for grid generation + ## Calculate alpha_max (https://github.com/dftlibs/numgrid) + self.alpha_max = [] + offset = 0 + for iat in range(mol.natoms): + alpha_max = max(self.prim_expnts[offset : offset + self.nprims_atoms[iat][1]]) + self.alpha_max.append(alpha_max) + offset = offset + self.nprims_atoms[iat][1] + + # Calculate the number of primitives corresponding to each shell + cnt = Counter(self.prim_shells) # Gives a Counter object similar to a dictionary + # Convert the Counter object to a list + self.nprims_shells = list(cnt.items()) #a list of tuples, each containing a value and its count in the list + # Make a list that is pretty much the same as nprims_shells, however, it contains the shell angular momentum in the first index + for ishell in range(self.nshells): + self.nprims_shell_l_list.append((self.shells[ishell], self.nprims_shells[ishell][1])) + # Create self.nprims_angmom_list + # self.calc_nprim_for_each_angular_momentum_l() + ## Calculate alpha_min + ishell_offset = 0 + iprim_offset = 0 + for iat in range(mol.natoms): + alpha_min_dict_iatom = {} + nshell_atom = 0 + sum_prim = 0 + for ishell in range(ishell_offset, self.nshells): + nshell_atom = nshell_atom + 1 + sum_prim = sum_prim + self.nprims_shells[ishell][1] + if sum_prim==self.nprims_atoms[iat][1]: + break + subset_nprims_shell_l_list = self.nprims_shell_l_list[ishell_offset : ishell_offset + nshell_atom] + ishell_offset = ishell_offset + nshell_atom + # Create self.nprims_angmom_list + subset_nprims_angmom_list = self.calc_nprim_for_each_angular_momentum_l(subset_nprims_shell_l_list) + # alpha_min + for i in range(len(subset_nprims_angmom_list)): + alpha_min_dict_iatom[subset_nprims_angmom_list[i][0] - 1] = min(self.prim_expnts[iprim_offset : iprim_offset + subset_nprims_angmom_list[i][1]]) + iprim_offset = iprim_offset + subset_nprims_angmom_list[i][1] + + self.alpha_min.append(alpha_min_dict_iatom) + + # Calculate the BF offset index for a given shell + self.shell_bfs_offset = np.cumsum(self.bfs_nbfshell) - self.bfs_nbfshell + + + + # NORMALIZATION STUFF + #Normalization factor for a primitive gaussian + def normalizationFactor(self, alpha, l, m, n): + """""" + Calculate the normalization factor for a primitive Gaussian function. + + Args: + alpha (float): Exponent of the Gaussian primitive + l (int): Angular momentum quantum number in x-direction + m (int): Angular momentum quantum number in y-direction + n (int): Angular momentum quantum number in z-direction + + Returns: + float: Normalization factor for the primitive Gaussian + """""" + return np.sqrt((2*alpha/np.pi)**(3/2)*(4*alpha)**(l+m+n)/(factorial2(2*l-1)*factorial2(2*m-1)*factorial2(2*n-1))) + + #Normalization factor for a contraction of gaussians + def normalizationFactorContraction(self, alphas, coeffs, norms, l, m, n, lm): + """""" + Calculate the normalization factor for a contraction of Gaussian primitives. + + Args: + alphas (list): List of exponents for the primitive Gaussians + coeffs (list): List of contraction coefficients + norms (list): List of normalization factors for individual primitives + l (int): Angular momentum quantum number in x-direction + m (int): Angular momentum quantum number in y-direction + n (int): Angular momentum quantum number in z-direction + lm (int): Total angular momentum (l+m+n) + + Returns: + float: Normalization factor for the contracted Gaussian + """""" + + temp = np.pi**(3/2)*factorial2(2*l-1)*factorial2(2*m-1)*factorial2(2*n-1)/(2**lm) + sum = 0.0 + for i in range(len(alphas)): + for j in range(len(alphas)): + sum = sum + (coeffs[i]*coeffs[j]*norms[i]*norms[j]/((alphas[i]+alphas[j])**(lm+3/2))) + factor = np.power(temp*sum,-1/2) + return factor + + + def readBasisSetFromFile(key, filename): + """""" + Read the basis set block corresponding to a particular atom from a TURBOMOLE format file. + + Args: + key (str): Atomic species symbol to search for + filename (str): Path to the basis set file + + Returns: + str or bool: Basis set string for the atom, or False if not found + """""" + #This functions returns the basis set block corresponding to a particular atom (key) + #The file to be read from is assumed to follow TURBOMOLE's format + basisString = '' + lookfor = '' + file = open(filename, 'r') + fileContentsInString=file.read() + file.close() + lines = fileContentsInString.splitlines() + pattern = re.compile('\*\n(.*)\n\*') + result = pattern.findall(fileContentsInString) + if len(result)==0: + print('The basis set corresponding to atom',key, ' was not found in ',filename) + return False + for res in result: + if res.split()[0].lower()==key.lower(): + lookfor = res + basisString = '\n*\n'+lookfor+'\n*' + + currentLineNo = 0 + startReading = False + for line in lines: + line = line.strip() + if line==lookfor: + startReading = True + currentLineNo = 1 + if startReading and currentLineNo>=3: + if line.strip()=='*': + break + else: + basisString = basisString + '\n'+line + currentLineNo = currentLineNo + 1 + basisString = basisString + '\n*' + return basisString + + + + + + #Loads the complete basis set as a string for a given mol/atom and a standard basis set available in the + #CrysX library or same directory as the python script. + def load( atom=None, mol=None, basis_name=None): + """""" + Load the complete basis set as a string for a given atom/molecule from the CrysX library. + + Args: + atom (str, optional): Atomic species symbol + mol (Mol, optional): Mol object containing molecular information + basis_name (str, optional): Name of the basis set to load + + Returns: + str: Complete basis set string in TURBOMOLE format + """""" + # The CrysX library contains basis sets in the TURBOMOLE format. + # The basis sets are downloaded from https://www.basissetexchange.org + # BSSE Github: https://github.com/MolSSI-BSE/basis_set_exchange + # License of BSSE: BSD 3 + + # We (CrysX) have saved the basis sets in the 'BasisSets' directory. + # The basis set name should be in lower-case and followed by '.version' and '.tm' extension. + # Ex: def2-tzvp.1.tm + # We can't expect the user to enter the basis set name with such an extension + # or in lower or upper case. So we should process this input name. + basis_name = basis_name.strip() + #The basis set for atom / mol + basisSet = basis_name+'\n' + basis_name = basis_name.replace("" "", """") + basis_name = basis_name.lower() + basis_name = basis_name+'.1.tm' + # Here we need to create the path name to the BasisSets directory supplied with crysx + # Since, the path should be with respect to hte module's location and not the working directory we can follow + # this link for various methods: https://stackoverflow.com/questions/4060221/how-to-reliably-open-a-file-in-the-same-directory-as-a-python-script + # Method 1: __file__ + # Method 2: sys.argv[0] + # Method 3: sys.path[0] (probably not relevant to our purpose) + # Currently we use method 1 + temp = __file__ + temp = temp.replace('Basis.py', '') + basis_name = temp + 'BasisSets/'+basis_name + #basis_name = 'BasisSets/'+basis_name + + if basis_name is None: + print('Error: A basis set name is needed!') + return basisSet + #If mol is provided then load the same basis set to all atoms + if not mol is None: + for i in range(mol.natoms): + basisSet = basisSet + Basis.readBasisSetFromFile( mol.atomicSpecies[i], basis_name) + elif atom is not None: + basisSet = Basis.readBasisSetFromFile(atom, basis_name) + basisSet = basisSet.replace('D+', 'E+') + basisSet = basisSet.replace('D-', 'E-') + return basisSet + + #Loads the complete basis set as a string for a given mol/atom from a file + #specified by the user. + def loadfromfile( atom=None, mol=None, basis_name=None): + """""" + Load the complete basis set as a string for a given atom/molecule from a user-specified file. + + Args: + atom (str, optional): Atomic species symbol + mol (Mol, optional): Mol object containing molecular information + basis_name (str, optional): Path to the basis set file + + Returns: + str: Complete basis set string in TURBOMOLE format + """""" + #The basis set for atom / mol + basisSet = '' + if basis_name is None: + print('Error: A basis set name is needed!') + return basisSet + #If mol is provided then load the same basis set to all atoms + if not mol is None: + for i in range(mol.natoms): + basisSet = basisSet + Basis.readBasisSetFromFile( mol.atomicSpecies[i], basis_name) + elif atom is not None: + basisSet = Basis.readBasisSetFromFile(atom, basis_name) + basisSet = basisSet.replace('D+', 'E+') + basisSet = basisSet.replace('D-', 'E-') + return basisSet + + #Creates the complete basis set for a given molecule along with basis dictionary + def createCompleteBasisSet(self, mol, basis): + """""" + Create the complete basis set string for a given molecule using the basis dictionary. + + Args: + mol: Mol object containing molecular information + basis (dict): Dictionary mapping atom types to basis set strings + + Returns: + str: Complete basis set string for all atoms in the molecule + """""" + totBasisSet = '' + if basis is None: + print('Error: Please provide a basis dictionary.') + return totBasisSet + else: + if 'all' in basis: + return basis['all'] + else: + #TODO Change this loop to only read the basis set for unique atoms + #TODO otherwise the basis set contains repeat basis sets for repeated atoms + #TODO The current form may(it doesn't yet) cause problem when creating basis function information + #TODO For even further generality let users label atoms, so that different basis may be used for same atoms with different labels + for i in range(mol.natoms): + if mol.atomicSpecies[i].lower() in basis: + totBasisSet = totBasisSet+ basis[mol.atomicSpecies[i].lower()]+'\n' + totBasisSet = totBasisSet.replace('D+', 'E+') + totBasisSet = totBasisSet.replace('D-', 'E-') + return totBasisSet + totBasisSet = totBasisSet.replace('D+', 'E+') + totBasisSet = totBasisSet.replace('D-', 'E-') + return totBasisSet + + + def cart2sph(l, ordering='pyscf'): + """""" + Get the transformation matrix from Cartesian to real spherical harmonics for a given angular momentum. + + Args: + l (int): Angular momentum quantum number + ordering (str): Ordering convention ('pyscf' or other) + + Returns: + numpy.ndarray: Transformation matrix from Cartesian to spherical basis + """""" + # This routine is used to get the transformation matrix from cartesian to real spherical basis for a given l + # This assumes that the basis functions are normalized. + # TODO: Make it work for both normalized and unnormalized basis functions. + + # REFERENCE: + # https://theochem.github.io/horton/2.0.1/tech_ref_gaussian_basis.html#collected-notes-on-gaussian-basis-sets + # https://onlinelibrary.wiley.com/doi/epdf/10.1002/qua.560540202 + # PySCF ordering: https://github.com/pyscf/pyscf/issues/1023 + # https://en.wikipedia.org/wiki/Table_of_spherical_harmonics#Real_spherical_harmonics + l0 = np.array([[1.0]]) + l1 = np.array([[0, 0, 1.0], + [1.0, 0, 0], + [0, 1.0, 0]]) + l1_pyscf = np.array([[1.0, 0, 0], + [0, 1.0, 0], + [0, 0, 1.0]]) + l2 = np.array([[-0.5, 0, 0, -0.5, 0, 1.0], + [0, 0, 1.0, 0, 0, 0], + [0, 0, 0, 0, 1.0, 0], + [0.86602540378443864676, 0, 0, -0.86602540378443864676, 0, 0], + [0, 1.0, 0, 0, 0, 0], + ]) + # I don't remember what this was for (perhaps TURBOMOLE??) + l2_alternative =np.array([[-0.5, 0, 0, -0.5, 0, 1], + [0, 0, 0.7071067811865475, 0, 0, 0], + [0, 0, 0, 0, 0.7071067811865475, 0], + [0.6123724356957945, 0, 0, -0.6123724356957945, 0, 0], + [0, 0.7071067811865475, 0, 0, 0, 0], + ]) + l2_pyscf = np.array([[0, 1.0, 0, 0, 0, 0], + [0, 0, 0, 0, 1.0, 0], + [-0.5, 0, 0, -0.5, 0, 1.0], + [0, 0, 1.0, 0, 0, 0], + [0.86602540378443864676, 0, 0, -0.86602540378443864676, 0, 0], + ]) + l3 = np.array([[0, 0, -0.67082039324993690892, 0, 0, 0, 0, -0.67082039324993690892, 0, 1.0], + [-0.61237243569579452455, 0, 0, -0.27386127875258305673, 0, 1.0954451150103322269, 0, 0, 0, 0], + [0, -0.27386127875258305673, 0, 0, 0, 0, -0.61237243569579452455, 0, 1.0954451150103322269, 0], + [0, 0, 0.86602540378443864676, 0, 0, 0, 0, -0.86602540378443864676, 0, 0], + [0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0], + [0.790569415042094833, 0, 0, -1.0606601717798212866, 0, 0, 0, 0, 0, 0], + [0, 1.0606601717798212866, 0, 0, 0, 0, -0.790569415042094833, 0, 0, 0], + ]) + l3_pyscf = np.array([[0, 1.0606601717798212866, 0, 0, 0, 0, -0.790569415042094833, 0, 0, 0], + [0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0], + [0, -0.27386127875258305673, 0, 0, 0, 0, -0.61237243569579452455, 0, 1.0954451150103322269, 0], + [0, 0, -0.67082039324993690892, 0, 0, 0, 0, -0.67082039324993690892, 0, 1.0], + [-0.61237243569579452455, 0, 0, -0.27386127875258305673, 0, 1.0954451150103322269, 0, 0, 0, 0], + [0, 0, 0.86602540378443864676, 0, 0, 0, 0, -0.86602540378443864676, 0, 0], + [0.790569415042094833, 0, 0, -1.0606601717798212866, 0, 0, 0, 0, 0, 0], + ]) + l4 = np.array([[0.375, 0, 0, 0.21957751641341996535, 0, -0.87831006565367986142, 0, 0, 0, 0, 0.375, 0, -0.87831006565367986142, 0, 1.0], + [0, 0, -0.89642145700079522998, 0, 0, 0, 0, -0.40089186286863657703, 0, 1.19522860933439364, 0, 0, 0, 0, 0], + [0, 0, 0, 0, -0.40089186286863657703, 0, 0, 0, 0, 0, 0, -0.89642145700079522998, 0, 1.19522860933439364, 0], + [-0.5590169943749474241, 0, 0, 0, 0, 0.9819805060619657157, 0, 0, 0, 0, 0.5590169943749474241, 0, -0.9819805060619657157, 0, 0], + [0, -0.42257712736425828875, 0, 0, 0, 0, -0.42257712736425828875, 0, 1.1338934190276816816, 0, 0, 0, 0, 0, 0], + [0, 0, 0.790569415042094833, 0, 0, 0, 0, -1.0606601717798212866, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1.0606601717798212866, 0, 0, 0, 0, 0, 0, -0.790569415042094833, 0, 0, 0], + [0.73950997288745200532, 0, 0, -1.2990381056766579701, 0, 0, 0, 0, 0, 0, 0.73950997288745200532, 0, 0, 0, 0], + [0, 1.1180339887498948482, 0, 0, 0, 0, -1.1180339887498948482, 0, 0, 0, 0, 0, 0, 0, 0], + ]) + l4_pyscf = np.array([[0, 1.1180339887498948482, 0, 0, 0, 0, -1.1180339887498948482, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1.0606601717798212866, 0, 0, 0, 0, 0, 0, -0.790569415042094833, 0, 0, 0], + [0, -0.42257712736425828875, 0, 0, 0, 0, -0.42257712736425828875, 0, 1.1338934190276816816, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, -0.40089186286863657703, 0, 0, 0, 0, 0, 0, -0.89642145700079522998, 0, 1.19522860933439364, 0], + [0.375, 0, 0, 0.21957751641341996535, 0, -0.87831006565367986142, 0, 0, 0, 0, 0.375, 0, -0.87831006565367986142, 0, 1.0], + [0, 0, -0.89642145700079522998, 0, 0, 0, 0, -0.40089186286863657703, 0, 1.19522860933439364, 0, 0, 0, 0, 0], + [-0.5590169943749474241, 0, 0, 0, 0, 0.9819805060619657157, 0, 0, 0, 0, 0.5590169943749474241, 0, -0.9819805060619657157, 0, 0], + [0, 0, 0.790569415042094833, 0, 0, 0, 0, -1.0606601717798212866, 0, 0, 0, 0, 0, 0, 0], + [0.73950997288745200532, 0, 0, -1.2990381056766579701, 0, 0, 0, 0, 0, 0, 0.73950997288745200532, 0, 0, 0, 0], + ]) + l5 = np.array([[0, 0, 0.625, 0, 0, 0, 0, 0.36596252735569994226, 0, -1.0910894511799619063, 0, 0, 0, 0, 0, 0, 0.625, 0, -1.0910894511799619063, 0, 1.0], + [0.48412291827592711065, 0, 0, 0.21128856368212914438, 0, -1.2677313820927748663, 0, 0, 0, 0, 0.16137430609197570355, 0, -0.56694670951384084082, 0, 1.2909944487358056284, 0, 0, 0, 0, 0, 0], + [0, 0.16137430609197570355, 0, 0, 0, 0, 0.21128856368212914438, 0, -0.56694670951384084082, 0, 0, 0, 0, 0, 0, 0.48412291827592711065, 0, -1.2677313820927748663, 0, 1.2909944487358056284, 0], + [0, 0, -0.85391256382996653193, 0, 0, 0, 0, 0, 0, 1.1180339887498948482, 0, 0, 0, 0, 0, 0, 0.85391256382996653193, 0, -1.1180339887498948482, 0, 0], + [0, 0, 0, 0, -0.6454972243679028142, 0, 0, 0, 0, 0, 0, -0.6454972243679028142, 0, 1.2909944487358056284, 0, 0, 0, 0, 0, 0, 0], + [-0.52291251658379721749, 0, 0, 0.22821773229381921394, 0, 0.91287092917527685576, 0, 0, 0, 0, 0.52291251658379721749, 0, -1.2247448713915890491, 0, 0, 0, 0, 0, 0, 0, 0], + [0, -0.52291251658379721749, 0, 0, 0, 0, -0.22821773229381921394, 0, 1.2247448713915890491, 0, 0, 0, 0, 0, 0, 0.52291251658379721749, 0, -0.91287092917527685576, 0, 0, 0], + [0, 0, 0.73950997288745200532, 0, 0, 0, 0, -1.2990381056766579701, 0, 0, 0, 0, 0, 0, 0, 0, 0.73950997288745200532, 0, 0, 0, 0], + [0, 0, 0, 0, 1.1180339887498948482, 0, 0, 0, 0, 0, 0, -1.1180339887498948482, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0.7015607600201140098, 0, 0, -1.5309310892394863114, 0, 0, 0, 0, 0, 0, 1.169267933366856683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 1.169267933366856683, 0, 0, 0, 0, -1.5309310892394863114, 0, 0, 0, 0, 0, 0, 0, 0, 0.7015607600201140098, 0, 0, 0, 0, 0], + ]) + l6 = np.array([[-0.3125, 0, 0, -0.16319780245846672329, 0, 0.97918681475080033975, 0, 0, 0, 0, -0.16319780245846672329, 0, 0.57335309036732873772, 0, -1.3055824196677337863, 0, 0, 0, 0, 0, 0, -0.3125, 0, 0.97918681475080033975, 0, -1.3055824196677337863, 0, 1.0], + [0, 0, 0.86356159963469679725, 0, 0, 0, 0, 0.37688918072220452831, 0, -1.6854996561581052156, 0, 0, 0, 0, 0, 0, 0.28785386654489893242, 0, -0.75377836144440905662, 0, 1.3816985594155148756, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0.28785386654489893242, 0, 0, 0, 0, 0, 0, 0.37688918072220452831, 0, -0.75377836144440905662, 0, 0, 0, 0, 0, 0, 0, 0, 0.86356159963469679725, 0, -1.6854996561581052156, 0, 1.3816985594155148756, 0], + [0.45285552331841995543, 0, 0, 0.078832027985861408788, 0, -1.2613124477737825406, 0, 0, 0, 0, -0.078832027985861408788, 0, 0, 0, 1.2613124477737825406, 0, 0, 0, 0, 0, 0, -0.45285552331841995543, 0, 1.2613124477737825406, 0, -1.2613124477737825406, 0, 0], + [0, 0.27308215547040717681, 0, 0, 0, 0, 0.26650089544451304287, 0, -0.95346258924559231545, 0, 0, 0, 0, 0, 0, 0.27308215547040717681, 0, -0.95346258924559231545, 0, 1.4564381625088382763, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, -0.81924646641122153043, 0, 0, 0, 0, 0.35754847096709711829, 0, 1.0660035817780521715, 0, 0, 0, 0, 0, 0, 0.81924646641122153043, 0, -1.4301938838683884732, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, -0.81924646641122153043, 0, 0, 0, 0, 0, 0, -0.35754847096709711829, 0, 1.4301938838683884732, 0, 0, 0, 0, 0, 0, 0, 0, 0.81924646641122153043, 0, -1.0660035817780521715, 0, 0, 0], + [-0.49607837082461073572, 0, 0, 0.43178079981734839863, 0, 0.86356159963469679725, 0, 0, 0, 0, 0.43178079981734839863, 0, -1.5169496905422946941, 0, 0, 0, 0, 0, 0, 0, 0, -0.49607837082461073572, 0, 0.86356159963469679725, 0, 0, 0, 0], + [0, -0.59829302641309923139, 0, 0, 0, 0, 0, 0, 1.3055824196677337863, 0, 0, 0, 0, 0, 0, 0.59829302641309923139, 0, -1.3055824196677337863, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0.7015607600201140098, 0, 0, 0, 0, -1.5309310892394863114, 0, 0, 0, 0, 0, 0, 0, 0, 1.169267933366856683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 1.169267933366856683, 0, 0, 0, 0, 0, 0, -1.5309310892394863114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.7015607600201140098, 0, 0, 0, 0, 0], + [0.67169328938139615748, 0, 0, -1.7539019000502850245, 0, 0, 0, 0, 0, 0, 1.7539019000502850245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.67169328938139615748, 0, 0, 0, 0, 0, 0], + [0, 1.2151388809514737933, 0, 0, 0, 0, -1.9764235376052370825, 0, 0, 0, 0, 0, 0, 0, 0, 1.2151388809514737933, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + ]) + if ordering=='pyscf': + c2s_l = [l0,l1_pyscf,l2_pyscf,l3_pyscf,l4_pyscf,l5,l6] # PYSCF ordering of SAOs + else: + c2s_l = [l0,l1,l2,l3,l4,l5,l6] # HORTON ordering of SAOs + return c2s_l[l] + + def cart2sph_basis(self): + """""" + Return the complete Cartesian to spherical harmonic basis transformation matrix for all shells. + + Returns: + matrix: Block diagonal transformation matrix for the entire basis set + """""" + # Returns the complete Cartesian to Spherical (real) basis transformation matrix + cart2sph = [] + for i in range(self.nshells): + l = self.shells[i]-1 + cart2sph.append(Basis.cart2sph(l)) + + return scipy.linalg.block_diag(*cart2sph) + + def sph2cart_basis(self): + """""" + Return the complete spherical to Cartesian basis transformation matrix for all shells. + + Returns: + matrix: Block diagonal transformation matrix (pseudoinverse of cart2sph) + """""" + # Returns the complete Cartesian to Spherical (real) basis transformation matrix + sph2cart = [] + for i in range(self.nshells): + l = self.shells[i]-1 + sph2cart_pseudo = np.linalg.pinv(Basis.cart2sph(l)) + sph2cart.append(sph2cart_pseudo) + + return scipy.linalg.block_diag(*sph2cart) + + + # #Probably won't be used + # def readBasisFunctionsfromFile(self, mol, basis_name): + # #This function will read and parse the basis sets for the basis functions and other properties. + # #Returns true if successful or false if failed. + # if mol is None: + # print('Error: Please provide a Mol object.') + # return False + # if basis_name is None: + # print('Error: Please provide a basis set name dictionary for Mol atoms.') + # return False + # #If all atoms are assigned the same basis set + # if 'all' in basis_name: + # for i in range(mol.natoms): + # self.basis_name_local[mol.atomicSpecies[i]] = basis_name['all'] + # else: + # for i in range(mol.natoms): + # #If a particular basis set is assigned to an atom + # if mol.atomicSpecies[i] in basis_name: + # self.basis_name_local[mol.atomicSpecies[i]] = basis_name[mol.atomicSpecies[i]] + # else: + # #Or assign the default basis set + # self.basis_name_local[mol.atomicSpecies[i]] = basis_name_local['default'] + + def readBasisFunctionInfo(self, mol, basisSet): + """""" + Read and parse the basis set information to populate basis function properties. + + Args: + mol: Mol object containing molecular information + basisSet (str): Complete basis set string in TURBOMOLE format + + Returns: + None - populates internal data structures with basis function information + """""" + #TODO Add error checks, + #TODO Like check if the basis set contains the needed atoms or not, and other checks that you can think of + #TODO Also, add error messages explaining what is happening + + #Read the basis set and set the basis set information + indx_shell = 0 + for i in range(mol.natoms): + lookfor = '' + lines = basisSet.splitlines() + pattern = re.compile('\*\n(.*)\n\*') + result = pattern.findall(basisSet) + if len(result)==0: + print('The basis set corresponding to atom ',mol.atomicSpecies[i], ' was not found in the provided basis set.') + for res in result: + if res.split()[0].lower()==mol.atomicSpecies[i].lower(): + lookfor = res + startReading = False + #print(lines) + currentLineNo = 0 + while currentLineNo1, 'p'->2, 'd'->3, etc. + l = Data.shell_dict[splitLine[1]] + self.shells.append(l) + self.shell_degen.append(Data.shell_degen[l-1]) + self.shell_coords.append(mol.coordsBohrs[i]) + #create the information for basis functions + #for ibf in range(int(l*(l+1)/2.0)): + # self.bfcoords.append(mol.coords[i]) + #Run a loop over the number of primitives in the current shell + #and read the exponents and contraction coefficients + for k in range(int(splitLine[0])): + currentLineNo = currentLineNo + 1 + line = lines[currentLineNo].strip() + splitLine = line.split() + if '*' in line: + startReading = False + currentLineNo = currentLineNo + 1 + break + splitLine[0] = splitLine[0].replace('D+', 'E+') + splitLine[1] = splitLine[1].replace('D-', 'E-') + self.prim_expnts.append(float(splitLine[0])) + self.prim_coeffs.append(float(splitLine[1])) + self.prim_coords.append(mol.coordsBohrs[i]) + self.prim_atoms.append(i) + self.prim_shells.append(indx_shell) + #self.prim_norms.append(float(normalizationFactor())) + #print(self.prim_coeffs, self.prim_expnts) + #print(currentLineNo) + + indx_shell +=1 + for ibf in range(int(l*(l+1)/2.0)): + self.bfs_atoms.append(i) + + currentLineNo = currentLineNo + 1 + + + + #Now that the reading of shells and their primitives is done + + #Run a loop over shells, and create information for + # basis functions + #for i in range(shells + + def calc_nprim_for_each_angular_momentum_l(self, tuple_list): + """""" + Calculate the number of primitives for each angular momentum quantum number. + + Args: + tuple_list (list): List of tuples containing (angular_momentum, num_primitives) + + Returns: + list: List of tuples with summed primitives for each unique angular momentum + """""" + # Initialize the list of tuples + # tuple_list = [(0,12),(0,5),(1,2)] + # tuple_list = self.nprims_shells + + # Create a dictionary to store the sums of each common angular momentum + sums_dict = {} + + # Loop through each tuple in the list + for t in tuple_list: + # Get the first element of the tuple + key = t[0] + + # Check if the element is already in the dictionary + if key in sums_dict: + # If it is, add the second element of the tuple to the sum + sums_dict[key] += t[1] + else: + # If it isn't, add the element to the dictionary with the value of the second element of the tuple + sums_dict[key] = t[1] + + # Initialize the list of tuples to return + result = [] + + # Loop through each key-value pair in the dictionary + for key, value in sums_dict.items(): + # Append a tuple with the key and value to the result list + result.append((key, value)) + + # self.nprims_angmom_list = result + return result + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/DFT_Helper_Coulomb.py",".py","51492","820","import pyfock.Mol as Mol +import pyfock.Basis as Basis +import pyfock.Integrals as Integrals +from timeit import default_timer as timer +import numba +import numpy as np +from numpy.linalg import eig, multi_dot as dot +import scipy +try: + import cupy as cp + from cupy import fuse + import cupyx + CUPY_AVAILABLE = True +except Exception as e: + CUPY_AVAILABLE = False + pass +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +from opt_einsum import contract + +def density_fitting_prelims_for_DFT_development(mol, basis, auxbasis, T, dmat, use_gpu=False, keep_ints3c2e_in_gpu=True, threshold_schwarz=1e-9, strict_schwarz=False, rys=True, DF_algo=6, cholesky=True): + startCoulomb = timer() + if not rys: + if DF_algo>4: + print('ERROR: Density fitting algorithms 4 and higher are only supported if rys quadrature is enabled! Please pass rys=True to the scf function.') + exit() + + # List of stuff that would be returned + H = None # In case of strict schwarz and algorithm 6 + V = None + ints3c2e = None + ints2c2e = None + nsignificant = None + indicesA = None + indicesB = None + indicesC = None + offsets_3c2e = None + indices = None + ints4c2e_diag = None + sqrt_ints4c2e_diag = None + sqrt_diag_ints2c2e = None + indices_dmat_tri = None + indices_dmat_tri_2 = None + df_coeff0 = None + Qpq = None + cho_decomp_ints2c2e = None + durationDF_cholesky = 0 + + + print('Stricter version of Schwarz screening: ', strict_schwarz, flush=True) + print('\nCalculating three centered two electron and two-centered two-electron integrals...\n\n', flush=True) + if rys: + start2c2e = timer() + if not use_gpu: + ints2c2e = Integrals.rys_2c2e_symm(auxbasis) + else: + ints2c2e = Integrals.rys_2c2e_symm_cupy(auxbasis) + duration2c2e = timer() - start2c2e + print('Time taken for two-centered two-electron integrals '+str(round(duration2c2e, 2))+' seconds.\n', flush=True) + if DF_algo==4: #Triangular version + ints3c2e = Integrals.rys_3c2e_tri(basis, auxbasis) + # ints3c2e_pyscf = Integrals.rys_3c2e_tri(basis, auxbasis) + # print(ints3c2e_pyscf.shape) + elif DF_algo==5: + print('\n\nPerforming Schwarz screening...') + # threshold_schwarz = 1e-11 + print('Threshold ', threshold_schwarz) + startSchwarz = timer() + nints3c2e_tri = int(basis.bfs_nao*(basis.bfs_nao+1)/2.0)*auxbasis.bfs_nao + nints3c2e = basis.bfs_nao*basis.bfs_nao*auxbasis.bfs_nao + # This is based on Schwarz inequality screening + # Diagonal elements of ERI 4c2e array + ints4c2e_diag = Integrals.schwarz_helpers.eri_4c2e_diag(basis) + # Calculate the indices of the ints3c2e array based on Schwarz inequality + indices_temp = Integrals.schwarz_helpers.calc_indices_3c2e_schwarz(ints4c2e_diag, ints2c2e, basis.bfs_nao, auxbasis.bfs_nao, threshold_schwarz) + print('Size of temporary array used to calculate the significant indices of 3c2e ERI in GB ', indices_temp.nbytes/1e9, flush=True) + if basis.bfs_nao<65500 and auxbasis.bfs_nao<65500: + indices = [a.astype(np.uint16) for a in indices_temp.nonzero()] # Will work as long as the no. of max(Bfs,auxbfs) is less than 65535 + else: + indices = [a.astype(np.uint32) for a in indices_temp.nonzero()] # Will work as long as the no. of Bfs/auxbfs is less than 4294967295 + + # Get rid of temp variables + indices_temp=0 + + print('Size of permanent array storing the significant indices of 3c2e ERI in GB ', indices[0].nbytes/1e9+indices[1].nbytes/1e9+indices[2].nbytes/1e9, flush=True) + + nsignificant = len(indices[0]) + print('No. of elements in the standard three-centered two electron ERI tensor: ', nints3c2e, flush=True) + print('No. of elements in the triangular three-centered two electron ERI tensor: ', nints3c2e_tri, flush=True) + print('No. of significant triplets based on Schwarz inequality and triangularity: ' + str(nsignificant) + ' or '+str(np.round(nsignificant/nints3c2e*100,1)) + '% of original', flush=True) + print('Schwarz screening done!') + durationSchwarz = timer() - startSchwarz + print('Time taken '+str(round(durationSchwarz, 2))+' seconds.\n', flush=True) + + ints3c2e = Integrals.schwarz_helpers.rys_3c2e_tri_schwarz(basis, auxbasis, indices[0], indices[1], indices[2]) + # ints3c2e = Integrals.schwarz_helpers.rys_3c2e_tri_schwarz_sparse(basis, auxbasis, indices[0], indices[1], indices[2]) + # print('here') + # indices_ssss = [] + # for itemp in range(indices[0].shape[0]): + # i = indices[0][itemp] + # j = indices[1][itemp] + # offset = int(i*(i+1)/2) + # indices_ssss.append(j + offset) + # coords = np.array([np.array(indices_ssss), indices[2]]) + # print(coords) + # print(indices) + # ints3c2e = sparse.COO(coords, ints3c2e, shape=(int(basis.bfs_nao*(basis.bfs_nao+1)/2.0), auxbasis.bfs_nao)) + # print('here') + # Get rid of variables no longer needed + indices=0 + elif DF_algo==6: + # TODO: The Schwarz can also be made more efficient (work on this) + # Takes a lot of time and most of the stuff is only done serially + # Also gets slower with more number of cores + print('\n\nPerforming Schwarz screening...') + # threshold_schwarz = 1e-09 + print('Threshold ', threshold_schwarz) + startSchwarz = timer() + nints3c2e_tri = int(basis.bfs_nao*(basis.bfs_nao+1)/2.0)*auxbasis.bfs_nao + nints3c2e = basis.bfs_nao*basis.bfs_nao*auxbasis.bfs_nao + # This is based on Schwarz inequality screening + # Diagonal elements of ERI 4c2e array + duration_4c2e_diag = 0.0 + start_4c2e_diag = timer() + ints4c2e_diag = Integrals.schwarz_helpers.eri_4c2e_diag(basis) + duration_4c2e_diag = timer() - start_4c2e_diag + print('Time taken to evaluate the ""diagonal"" of 4c2e ERI tensor: ', round(duration_4c2e_diag, 2)) + + # Calculate the square roots required for + duration_square_roots = 0.0 + start_square_roots = timer() + sqrt_ints4c2e_diag = np.sqrt(np.abs(ints4c2e_diag)) + sqrt_diag_ints2c2e = np.sqrt(np.abs(np.diag(ints2c2e))) + duration_square_roots = timer() - start_square_roots + print('Time taken to evaluate the square roots needed: ', round(duration_square_roots, 2)) + # print(ints4c2e_diag.max()) + # print(ints4c2e_diag.min()) + # print(ints2c2e.max()) + # print(np.diag(ints2c2e).min()) + + # Create a mask for dmat based on sqrt_ints4c2e_diag + # Create a boolean mask for elements satisfying the condition + # mask = sqrt_ints4c2e_diag**2 < 1e-17 + + # bfs_coords = np.array([basis.bfs_coords])[0] + # bfs_radius_cutoff = np.array([basis.bfs_radius_cutoff])[0] + auxbfs_lm = np.array(auxbasis.bfs_lm) + + # Calculate the indices of the ints3c2e array based on Schwarz inequality + # indices_temp = Integrals.schwarz_helpers.calc_indices_3c2e_schwarz(ints4c2e_diag, ints2c2e, basis.bfs_nao, auxbasis.bfs_nao, threshold_schwarz) + # print('Size of temporary array used to calculate the significant indices of 3c2e ERI in GB ', indices_temp.nbytes/1e9, flush=True) + # print('here2') + # if basis.bfs_nao<65500 and auxbasis.bfs_nao<65500: + # indices = [a.astype(np.uint16) for a in indices_temp.nonzero()] # Will work as long as the no. of max(Bfs,auxbfs) is less than 65535 + # else: + # indices = [a.astype(np.uint32) for a in indices_temp.nonzero()] # Will work as long as the no. of Bfs/auxbfs is less than 4294967295 + chunksize = int(1e9) # Results in 2 GB chunks + duration_indices_calc = 0.0 + duration_concatenation = 0.0 + start_indices_calc = timer() + # indices_temp = [] + ijk = [0, 0, 0] + if chunksize0: + indicesA = np.concatenate([indicesA, indices_temp[0][0:count]]) + indicesB = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC = np.concatenate([indicesC, indices_temp[2][0:count]]) + else: + + indicesA = indices_temp[0][0:count] + indicesB = indices_temp[1][0:count] + indicesC = indices_temp[2][0:count] + # duration_concatenation += timer() - start_concatenation + # Get rid of temp variables + del indices_temp + + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if count0: + indicesA_shell = np.concatenate([indicesA, indices_temp[0][0:count]]) + indicesB_shell = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC_shell = np.concatenate([indicesC, indices_temp[2][0:count]]) + else: + + indicesA_shell = indices_temp[0][0:count] + indicesB_shell = indices_temp[1][0:count] + indicesC_shell = indices_temp[2][0:count] + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if count0: + offset = np.concatenate([offset, indices_temp[0][0:np.argmax(indices_temp[0])]]) + indicesB = np.concatenate([indicesB, indices_temp[1][0:count]]) + indicesC = np.concatenate([indicesC, indices_temp[2][0:count]]) + else: + + offset = indices_temp[0][0:np.argmax(indices_temp[0])] + indicesB = indices_temp[1][0:count] + indicesC = indices_temp[2][0:count] + # duration_concatenation += timer() - start_concatenation + # Break out of the for loop if the nol. of significant triplets found is less than the chunksize + # This is because, it means that there are no more significant triplets to be found from all possible configurations. + if count SAO + # sph2c_mat_pseudo = auxbasis.sph2cart_basis() # SAO --> CAO + # ints2c2e = np.dot(c2sph_mat, np.dot(ints2c2e, c2sph_mat.T)) # CAO --> SAO + # ints2c2e = np.dot(sph2c_mat_pseudo, np.dot(ints2c2e, sph2c_mat_pseudo.T)) #SAO --> CAO + duration2c2e = timer() - start2c2e + print('Time taken for two-centered two-electron integrals '+str(round(duration2c2e, 2))+' seconds.\n', flush=True) + ints3c2e = Integrals.conv_3c2e_symm(basis, auxbasis) + + + + #### Dask array stuff (Doesn't work) + # ints3c2e_dask = da.from_array(ints3c2e, chunks=(1000, 1000, 1500)) # Around 11 Gigs + # ints3c2e_dask = da.from_array(ints3c2e, chunks=(400, 400, 400)) + # ints2c2e_dask = da.from_array(ints2c2e, chunks=(400, 400)) + # # ints3c2e = 0 + # temp_dask = da.from_array(ints3c2e.reshape(basis.bfs_nao*basis.bfs_nao, auxbasis.bfs_nao).T, chunks=(400, 400)) + # df_coeff0 = da.linalg.solve(ints2c2e_dask, temp_dask) + + + # Compute the intermediate DF coefficients (df_coeff0) + if DF_algo==1: + #The following solve step is very sloww and makes the Coulomb time much longer. + df_coeff0 = scipy.linalg.solve(ints2c2e, ints3c2e.reshape(basis.bfs_nao*basis.bfs_nao, auxbasis.bfs_nao).T) + df_coeff0 = df_coeff0.reshape(auxbasis.bfs_nao, basis.bfs_nao, basis.bfs_nao) + print('Three Center Two electron ERI size in GB ',ints3c2e.nbytes/1e9, flush=True) + print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + print('Intermediate Auxiliary Density fitting coefficients size in GB ',df_coeff0.nbytes/1e9, flush=True) + + ## Alternative based on Psi4numpy tutorial + # https://github.com/psi4/psi4numpy/blob/master/Tutorials/03_Hartree-Fock/density-fitting.ipynb + # metric_inverse_sqrt = scipy.linalg.inv(scipy.linalg.sqrtm(ints2c2e)) + # metric_inverse_sqrt = scipy.linalg.sqrtm(scipy.linalg.inv(ints2c2e)) + if DF_algo==2: + ##### This version requires double the memory of a 3c2e array, as the result of the scipy solve (Qpq) is also of the same size. + ##### We later don't require the ints3c2e array and get rid of it to free memory but still we did require it at some point so + ##### the memory requirement of the program as a whole is still 2x int3c2e array. + # # metric_sqrt = scipy.linalg.fractional_matrix_power(ints2c2e, 0.5) + # metric_sqrt = scipy.linalg.sqrtm(ints2c2e) + # print('Sqrt done!') + # #TODO: The following solve step is very sloww and makes the Coulomb time much longer. Try to make it faster. + # Qpq = scipy.linalg.solve(metric_sqrt, ints3c2e.reshape(basis.bfs_nao*basis.bfs_nao, auxbasis.bfs_nao).T, \ + # assume_a='pos', overwrite_a=False, overwrite_b=True) + # print('Solve done!') + # Qpq = Qpq.reshape(auxbasis.bfs_nao, basis.bfs_nao, basis.bfs_nao) + # print('Reshape done!') + # # metric_inverse_sqrt = scipy.linalg.fractional_matrix_power(ints2c2e, -0.5) #Unstable + # # print('Sqrt inverse done!') + # # # Build the Qpq object + # # Qpq = contract('QP,pqP->Qpq', metric_inverse_sqrt, ints3c2e) + # # print('Contraction done!') + # ints3c2e = 0 + # print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + # print('Intermediate Auxiliary Density fitting coefficients size in GB ',Qpq.nbytes/1e9, flush=True) + + ##### New version, that as far as I can understand doesn't involve any creation of new arrays of the size of int3c2e array + ##### This is done by not storing the result of scipy solve in an array but rather overwriting the original array. + ##### A lot of reshaping is involved, but it is checked that it does not result in copies of arrays by using + ##### np.shares_memory(a,b) https://stackoverflow.com/questions/69447431/numpy-reshape-copying-data-or-not + metric_sqrt = scipy.linalg.sqrtm(ints2c2e) + print('Sqrt done!') + ints3c2e_reshape = ints3c2e.reshape(basis.bfs_nao*basis.bfs_nao, auxbasis.bfs_nao).T + print('Reshape done!') + print(np.shares_memory(ints3c2e_reshape, ints3c2e)) + #TODO: The following solve step is very sloww and makes the Coulomb time much longer. Try to make it faster. + scipy.linalg.solve(metric_sqrt, ints3c2e_reshape, \ + assume_a='pos', overwrite_a=False, overwrite_b=True) + print('Solve done!') + Qpq = ints3c2e_reshape.reshape(auxbasis.bfs_nao, basis.bfs_nao, basis.bfs_nao) + print(np.shares_memory(Qpq, ints3c2e_reshape)) + print(np.shares_memory(Qpq, ints3c2e)) + print('Reshape done!') + print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + print('Intermediate Auxiliary Density fitting coefficients size in GB ',Qpq.nbytes/1e9, flush=True) + + ##### Sparse version of above (The solve is very slow and the reshape after solve on sparse matrix doesn't work) + # metric_sqrt = scipy.linalg.sqrtm(ints2c2e) + # print('Sqrt done!') + # ints3c2e_reshape = ints3c2e.reshape(basis.bfs_nao*basis.bfs_nao, auxbasis.bfs_nao).T + # print('Reshape done!') + # ints3c2e_reshape[np.abs(ints3c2e_reshape) < 1E-09] = 0# fill most of the array with zeros (1E-09 is optimal i guess) + # ints3c2e_reshape_sparse = csc_matrix(ints3c2e_reshape) + # metric_sqrt[np.abs(metric_sqrt) < 1E-09] = 0# fill most of the array with zeros (1E-09 is optimal i guess) + # metric_sqrt_sparse = csc_matrix(metric_sqrt) + # print('Sparsification done!') + # print('ints3c2e Sparse size in GB ',(ints3c2e_reshape_sparse.data.nbytes + ints3c2e_reshape_sparse.indptr.nbytes + ints3c2e_reshape_sparse.indices.nbytes)/1e9, flush=True) + # # Sparse solve + # Qpq_sparse = scipy.sparse.linalg.spsolve(metric_sqrt_sparse, ints3c2e_reshape_sparse) + # print('Sparse Solve done!') + # Qpq_sparse = Qpq_sparse.reshape(auxbasis.bfs_nao, basis.bfs_nao, basis.bfs_nao) + # print('Reshape done!') + # print('Qpq Sparse size in GB ',(Qpq_sparse.data.nbytes + Qpq_sparse.indptr.nbytes + Qpq_sparse.indices.nbytes)/1e9, flush=True) + # Qpq = sparse.COO.from_scipy_sparse(Qpq_sparse) + + if DF_algo==3: # Best algorithm (Memory efficient and fast without any prefactor linalg.solve) + #https://aip.scitation.org/doi/pdf/10.1063/1.1567253 + print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + print('Three Center Two electron ERI size in GB ',ints3c2e.nbytes/1e9, flush=True) + if DF_algo==4 or DF_algo==5 or DF_algo==6 or DF_algo==8 or DF_algo==10: + indices_dmat_tri = np.tril_indices_from(dmat) # Lower triangular including diagonal + indices_dmat_tri_2 = np.tril_indices_from(dmat, k=-1) # lower tri, without the diagonal + print('Two Center Two electron ERI size in GB ',ints2c2e.nbytes/1e9, flush=True) + print('Three Center Two electron ERI size in GB ',ints3c2e.nbytes/1e9, flush=True) + + + + + print('Three-centered two electron evaluation done!', flush=True) + + ### TESTING SOME SPARSE STUFF + # Unfortunately, the current settings only provide small memory savings and the error is also quite large (0.00001 Ha) + # Anyway this is not very useful as we are making a sparse array from an already calculated array which may not fit into memory + # So I don't see much use for this right now. + # df_coeff0[np.abs(df_coeff0) < 1E-09] = 0# fill most of the array with zeros (1E-09 is optimal i guess) + # df_coeff0_sp = sparse.COO(df_coeff0) # convert to sparse array + # ints3c2e[np.abs(ints3c2e) < 1E-07] = 0# fill most of the array with zeros (1E-07 is optimal i guess) + # ints3c2e_sp = sparse.COO(ints3c2e) # convert to sparse array + # print('Sparse Three Center Two electron ERI size in GB ',ints3c2e_sp.nbytes/1e9, flush=True) + # print('Intermediate Sparse Auxiliary Density fitting coefficients size in GB ',df_coeff0_sp.nbytes/1e9, flush=True) + + if cholesky: + startDF_cholesky = timer() + if use_gpu: + cho_decomp_ints2c2e = scipy.linalg.cho_factor(cp.asnumpy(ints2c2e)) + else: + cho_decomp_ints2c2e = scipy.linalg.cho_factor(ints2c2e) + durationDF_cholesky = timer() - startDF_cholesky + print('Time taken for Cholesky factorization of two-centered two-electron integrals '+str(round(durationDF_cholesky, 2))+' seconds.\n', flush=True) + + + durationCoulomb = timer() - startCoulomb + print('Time taken for Coulomb term related calculations (integrals, screening, prelims..) with the density fitting approximation '+str(round(durationCoulomb, 2))+' seconds.\n', flush=True) + result = [ + H, + V, + ints3c2e, + ints2c2e, + nsignificant, + indicesA, + indicesB, + indicesC, + offsets_3c2e, + indices, + ints4c2e_diag, + sqrt_ints4c2e_diag, + sqrt_diag_ints2c2e, + indices_dmat_tri, + indices_dmat_tri_2, + df_coeff0, + Qpq, + cho_decomp_ints2c2e, + durationDF_cholesky, + durationCoulomb + ] + + return result + +def Jmat_from_density_fitting(dmat, DF_algo, cholesky, cho_decomp_ints2c2e, df_coeff0, Qpq, ints3c2e, ints2c2e, indices_dmat_tri, indices_dmat_tri_2, indicesA, indicesB, indicesC, offsets_3c2e, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, basis, auxbasis, use_gpu, keep_ints3c2e_in_gpu, durationDF_gamma, ncores, durationDF_coeff, durationDF_Jtri, durationDF): + Ecoul_temp = 0 + startDF = timer() + # Using DF calculate the density fitting coefficients of the auxiliary basis + if DF_algo==1: + df_coeff = contract('ijk,jk', df_coeff0, dmat) + J = contract('ijk,k',ints3c2e,df_coeff) + if DF_algo==2: + df_coeff = contract('ijk,jk', Qpq, dmat) # Not exactly the same thing as above (not the auxiliary density coeffs) + J = contract('ijk,i',Qpq,df_coeff) + if DF_algo==3: # Fastest + df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + scipy.linalg.solve(ints2c2e, df_coeff, assume_a='pos', overwrite_a=False, overwrite_b=True) # This gives the actual df coeff + J = contract('ijk,k', ints3c2e, df_coeff) + if DF_algo==4 or DF_algo==5: # Fastest and triangular (half the memory of algo 3) + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + scipy.linalg.solve(ints2c2e, df_coeff, assume_a='pos', overwrite_a=False, overwrite_b=True) + J_tri = contract('pP,P', ints3c2e, df_coeff) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + if DF_algo==6: + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + startDF_gamma = timer() + # df_coeff_1 = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator(ints3c2e, dmat_tri, indicesA, indicesB, indicesC, auxbasis.bfs_nao, ncores) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + durationDF_gamma += timer() - startDF_gamma + startDF_coeff = timer() + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Density fitting', controller.info()) + if not cholesky: + df_coeff = scipy.linalg.solve(ints2c2e, gamma_alpha, assume_a='pos', overwrite_a=False, overwrite_b=False) + else: + df_coeff = scipy.linalg.cho_solve(cho_decomp_ints2c2e, gamma_alpha, overwrite_b=False, check_finite=True) + durationDF_coeff += timer() - startDF_coeff + with threadpool_limits(limits=ncores, user_api='blas'): + Ecoul_temp = np.dot(df_coeff, gamma_alpha) # (rho^~|rho^~) Coulomb energy due to interactions b/w auxiliary density + startDF_Jtri = timer() + #J_tri = contract('pP,P', ints3c2e, df_coeff) + J_tri = Integrals.schwarz_helpers.J_tri_calculator(ints3c2e, df_coeff, indicesA, indicesB, indicesC, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + with threadpool_limits(limits=ncores, user_api='blas'): + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + durationDF_Jtri += timer() - startDF_Jtri + if DF_algo==8: + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + startDF_gamma = timer() + # df_coeff_1 = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator_algo8(ints3c2e, dmat_tri, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, basis.bfs_nao, auxbasis.bfs_nao) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + durationDF_gamma += timer() - startDF_gamma + startDF_coeff = timer() + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Density fitting', controller.info()) + df_coeff = scipy.linalg.solve(ints2c2e, gamma_alpha, assume_a='pos', overwrite_a=False, overwrite_b=False) + durationDF_coeff += timer() - startDF_coeff + with threadpool_limits(limits=ncores, user_api='blas'): + Ecoul_temp = np.dot(df_coeff, gamma_alpha) # (rho^~|rho^~) Coulomb energy due to interactions b/w auxiliary density + startDF_Jtri = timer() + #J_tri = contract('pP,P', ints3c2e, df_coeff) + J_tri = Integrals.schwarz_helpers.J_tri_calculator_algo8(ints3c2e, df_coeff, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold_schwarz, basis.bfs_nao, auxbasis.bfs_nao, int(basis.bfs_nao*(basis.bfs_nao+1)/2)) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + with threadpool_limits(limits=ncores, user_api='blas'): + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + durationDF_Jtri += timer() - startDF_Jtri + if DF_algo==10: + dmat_temp = dmat.copy() + dmat_temp[indices_dmat_tri_2] = 2*dmat[indices_dmat_tri_2] # Double the non-diagonal elements of the triangular density matrix + dmat_tri = dmat_temp[indices_dmat_tri] + startDF_gamma = timer() + auxbfs_lm = np.array(auxbasis.bfs_lm) + if use_gpu: + ints3c2e_cp = cp.asarray(ints3c2e) + dmat_tri_cp = cp.array(dmat_tri) + offsets_3c2e_cp = cp.array(offsets_3c2e) + sqrt_ints4c2e_diag_cp = cp.array(sqrt_ints4c2e_diag) + sqrt_diag_ints2c2e_cp = cp.array(sqrt_diag_ints2c2e) + gamma_alpha = Integrals.schwarz_helpers_cupy.df_coeff_calculator_algo10_cupy(ints3c2e, dmat_tri_cp, basis.bfs_nao, offsets_3c2e_cp, auxbasis.bfs_nao, sqrt_ints4c2e_diag_cp, sqrt_diag_ints2c2e_cp, threshold, strict_schwarz) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + # gamma_alpha = cp.asnumpy(gamma_alpha) + else: + # df_coeff_1 = contract('pP,p->P', ints3c2e, dmat_tri) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + # gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator_algo10_serial(ints3c2e, dmat_tri, indicesA, indicesB, offsets_3c2e, auxbasis.bfs_nao, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator_algo10_parallel(ints3c2e, dmat_tri, indicesA, indicesB, offsets_3c2e, auxbasis.bfs_nao, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, ncores, strict_schwarz, auxbfs_lm) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + # gamma_alpha = Integrals.schwarz_helpers.df_coeff_calculator_algo10_parallel(ints3c2e, dmat_tri, indicesA, indicesB, offsets_3c2e, auxbasis.bfs_nao, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, ncores, strict_schwarz, auxbfs_lm) # This is actually the gamma_alpha (and not df_coeff (c_alpha)) in this paper (https://aip.scitation.org/doi/pdf/10.1063/1.1567253) + durationDF_gamma += timer() - startDF_gamma + startDF_coeff = timer() + with threadpool_limits(limits=ncores, user_api='blas'): + # print('Density fitting', controller.info()) + if not cholesky: + if not use_gpu: + df_coeff = scipy.linalg.solve(ints2c2e, gamma_alpha, assume_a='pos', overwrite_a=False, overwrite_b=False) + else: + df_coeff = cp.linalg.solve(ints2c2e, gamma_alpha) + # print(df_coeff[0:10]) + else: + df_coeff = scipy.linalg.cho_solve(cho_decomp_ints2c2e, gamma_alpha, overwrite_b=False, check_finite=True) + durationDF_coeff += timer() - startDF_coeff + if use_gpu: + Ecoul_temp = cp.dot(df_coeff, gamma_alpha) + else: + with threadpool_limits(limits=ncores, user_api='blas'): + Ecoul_temp = np.dot(df_coeff, gamma_alpha) # (rho^~|rho^~) Coulomb energy due to interactions b/w auxiliary density + startDF_Jtri = timer() + #J_tri = contract('pP,P', ints3c2e, df_coeff) + if use_gpu: + df_coeff_cp = cp.asarray(df_coeff) + J_tri = Integrals.schwarz_helpers_cupy.J_tri_calculator_algo10_cupy(ints3c2e_cp, df_coeff_cp, int(basis.bfs_nao*(basis.bfs_nao+1)/2), basis.bfs_nao, offsets_3c2e_cp, sqrt_ints4c2e_diag_cp, sqrt_diag_ints2c2e_cp, threshold, auxbasis.bfs_nao, strict_schwarz, auxbfs_lm) + # J_tri = Integrals.schwarz_helpers_cupy.J_tri_calculator_algo10_cupy(ints3c2e_cp, df_coeff, int(basis.bfs_nao*(basis.bfs_nao+1)/2), basis.bfs_nao, offsets_3c2e, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, auxbasis.bfs_nao, strict_schwarz, auxbfs_lm) + J = cp.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - cp.diag(cp.diag(J)) + else: + J_tri = Integrals.schwarz_helpers.J_tri_calculator_algo10(ints3c2e, df_coeff, indicesA, indicesB, offsets_3c2e, int(basis.bfs_nao*(basis.bfs_nao+1)/2), sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, auxbasis.bfs_nao, strict_schwarz, auxbfs_lm) + # https://stackoverflow.com/questions/17527693/transform-the-upper-lower-triangular-part-of-a-symmetric-matrix-2d-array-into + with threadpool_limits(limits=ncores, user_api='blas'): + J = np.zeros((basis.bfs_nao, basis.bfs_nao)) + J[indices_dmat_tri] = J_tri + J += J.T - np.diag(np.diag(J)) + durationDF_Jtri += timer() - startDF_Jtri + durationDF = durationDF + timer() - startDF + + # Free memory + if use_gpu: + if not keep_ints3c2e_in_gpu: + ints3c2e_cp = None + dmat_tri_cp = None + offsets_3c2e_cp = None + sqrt_ints4c2e_diag_cp = None + sqrt_diag_ints2c2e_cp = None + df_coeff_cp = None + cp.cuda.Device(0).use() + cp._default_memory_pool.free_all_blocks() + return J, durationDF, durationDF_coeff, durationDF_gamma, durationDF_Jtri, Ecoul_temp +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/PBC_ring.py",".py","11432","268",""""""" +Cyclic Boundary Condition (CBC) Ring Generator for PyFock +This is a way to emulate the PBC + +Simple interface for creating ring supercells from 1D periodic systems and +performing systematic convergence studies with extrapolation to thermodynamic limit. + +Usage: + # Create ring supercells + import PBC_ring + ring_mol = PBC_ring.ring(unit_mol, N=10, periodicity=2.5) + + # Run DFT as usual + basis = Basis(ring_mol, {'all': Basis.load(mol=ring_mol, basis_name='def2-SVP')}) + auxbasis = Basis(ring_mol, {'all': Basis.load(mol=ring_mol, basis_name='def2-universal-jfit')}) + dft_obj = DFT(ring_mol, basis, auxbasis, xc=[1, 7]) + energy = dft_obj.scf() + + # Convergence study utilities + energies = PBC_ring.convergence_study(unit_mol, ring_sizes=[8,10,12,15], periodicity=2.5) + tdl_energy = PBC_ring.extrapolate_tdl(energies) +"""""" + +import numpy as np +import math +import matplotlib.pyplot as plt +from typing import List, Tuple, Dict, Optional +from pyfock import Mol, Basis, DFT + +def ring(mol: Mol, N: int, periodicity: float, periodic_dir: str = 'x', + output_xyz: bool = True, xyz_filename: Optional[str] = None) -> Mol: + """""" + Create a ring supercell from a 1D periodic unit cell. + + Args: + mol: PyFock Mol object containing the unit cell + N: Number of unit cells to include in the ring + periodicity: Length of unit cell along periodic direction (Angstrom) + periodic_dir: Direction of periodicity ('x', 'y', or 'z'). Default: 'x' + output_xyz: Whether to save XYZ file of the ring. Default: False + xyz_filename: Custom filename for XYZ output. If None, auto-generates name + + Returns: + Mol: New PyFock Mol object containing the ring structure + + Example: + >>> unit_mol = Mol(coordfile='lih_unit.xyz') # LiH unit cell + >>> ring_mol = ring(unit_mol, N=10, periodicity=3.2) + >>> # Now use ring_mol in normal PyFock DFT workflow + """""" + + # Determine periodic direction index + dir_map = {'x': 0, 'y': 1, 'z': 2} + if periodic_dir.lower() not in dir_map: + raise ValueError(""periodic_dir must be 'x', 'y', or 'z'"") + periodic_idx = dir_map[periodic_dir.lower()] + + # Calculate ring radius from circumference = N * periodicity + circumference = N * periodicity + radius = circumference / (2.0 * math.pi) + + # Build ring coordinates + ring_atoms = [] + + for unit_idx in range(N): + # Angular position for this unit + unit_angle = 2.0 * math.pi * unit_idx / N + + # Add all atoms from this unit cell + for atom in mol.atoms: + symbol = atom[0] + orig_coords = np.array([atom[1], atom[2], atom[3]]) + + # Position along periodic direction within unit cell + periodic_pos = orig_coords[periodic_idx] + + # Total angle for this atom + atom_angle = unit_angle + (2.0 * math.pi * periodic_pos / periodicity) / N + + # Ring coordinates (place periodic direction in xy-plane) + if periodic_idx == 0: # x-direction periodic + x_ring = radius * math.cos(atom_angle) + y_ring = radius * math.sin(atom_angle) + z_ring = orig_coords[2] + elif periodic_idx == 1: # y-direction periodic + x_ring = orig_coords[0] + y_ring = radius * math.cos(atom_angle) + z_ring = radius * math.sin(atom_angle) + else: # z-direction periodic + x_ring = radius * math.cos(atom_angle) + y_ring = orig_coords[1] + z_ring = radius * math.sin(atom_angle) + + ring_atoms.append([symbol, x_ring, y_ring, z_ring]) + + # Create new Mol object for ring + ring_mol = Mol(atoms=ring_atoms) + ring_mol.label = f""Ring_{N}units_R{radius:.2f}A"" + + # Save XYZ file if requested + if output_xyz: + if xyz_filename is None: + xyz_filename = f""ring_{N}_units"" + ring_mol.exportXYZ(xyz_filename, + label=f""Ring with {N} units, R={radius:.3f} A, circumference={circumference:.3f} A"") + print(f""Saved ring structure: {xyz_filename}"") + + print(f""Created ring: {N} units, {len(ring_atoms)} atoms, radius={radius:.3f} A"") + return ring_mol + + +def ring_preserve_bonds(mol: Mol, N: int, periodicity: float, target_radius: float, + periodic_dir: str = 'x', output_xyz: bool = True, + xyz_filename: Optional[str] = None) -> Mol: + """""" + Create a ring supercell that preserves interatomic spacing from the unit cell. + + This version prioritizes maintaining correct bond lengths over fitting exactly + around a complete circle. The ring may span less than or more than 2π radians. + + Args: + mol: PyFock Mol object containing the unit cell + N: Number of unit cells to include in the ring + periodicity: Length of unit cell along periodic direction (Angstrom) + target_radius: Desired radius for the ring (Angstrom) + periodic_dir: Direction of periodicity ('x', 'y', or 'z'). Default: 'x' + output_xyz: Whether to save XYZ file of the ring. Default: True + xyz_filename: Custom filename for XYZ output. If None, auto-generates name + + Returns: + Mol: New PyFock Mol object containing the ring structure + + Example: + >>> unit_mol = Mol(coordfile='lih_unit.xyz') # LiH unit cell, 3.2 Å period + >>> # Create ring with 5 Å radius, preserving bond lengths + >>> ring_mol = ring_preserve_bonds(unit_mol, N=10, periodicity=3.2, target_radius=5.0) + >>> # Bonds remain 3.2 Å apart, but ring spans ~6.4 radians (not full 2π circle) + """""" + + # Determine periodic direction index + dir_map = {'x': 0, 'y': 1, 'z': 2} + if periodic_dir.lower() not in dir_map: + raise ValueError(""periodic_dir must be 'x', 'y', or 'z'"") + periodic_idx = dir_map[periodic_dir.lower()] + + # Calculate angular spacing to preserve bond lengths + angular_spacing_per_unit = periodicity / target_radius # radians per unit cell + total_angle_spanned = N * angular_spacing_per_unit + + # Provide feedback about circle closure + angle_deficit = 2.0 * math.pi - total_angle_spanned + if abs(angle_deficit) > 0.1: # More than ~6 degrees off + if angle_deficit > 0: + print(f""Note: Ring spans {total_angle_spanned:.3f} rad ({total_angle_spanned*180/math.pi:.1f}°)"") + print(f"" Gap of {angle_deficit:.3f} rad ({angle_deficit*180/math.pi:.1f}°) to complete circle"") + else: + print(f""Note: Ring spans {total_angle_spanned:.3f} rad ({total_angle_spanned*180/math.pi:.1f}°)"") + print(f"" Overlaps by {-angle_deficit:.3f} rad ({-angle_deficit*180/math.pi:.1f}°) beyond full circle"") + else: + print(f""Ring nearly closes: {total_angle_spanned:.3f} rad (~2π)"") + + # Build ring coordinates + ring_atoms = [] + + for unit_idx in range(N): + # Angular position for this unit (preserves spacing) + unit_angle = angular_spacing_per_unit * unit_idx + + # Add all atoms from this unit cell + for atom in mol.atoms: + symbol = atom[0] + orig_coords = np.array([atom[1], atom[2], atom[3]]) + + # Position along periodic direction within unit cell + periodic_pos = orig_coords[periodic_idx] + + # Total angle for this atom (includes intra-unit-cell position) + atom_angle = unit_angle + (periodic_pos / target_radius) + + # Ring coordinates (place periodic direction in appropriate plane) + if periodic_idx == 0: # x-direction periodic + x_ring = target_radius * math.cos(atom_angle) + y_ring = target_radius * math.sin(atom_angle) + z_ring = orig_coords[2] + elif periodic_idx == 1: # y-direction periodic + x_ring = orig_coords[0] + y_ring = target_radius * math.cos(atom_angle) + z_ring = target_radius * math.sin(atom_angle) + else: # z-direction periodic + x_ring = target_radius * math.cos(atom_angle) + y_ring = orig_coords[1] + z_ring = target_radius * math.sin(atom_angle) + + ring_atoms.append([symbol, x_ring, y_ring, z_ring]) + + # Calculate actual circumference spanned + actual_circumference = total_angle_spanned * target_radius + + # Create new Mol object for ring + ring_mol = Mol(atoms=ring_atoms) + ring_mol.label = f""Ring_{N}units_R{target_radius:.2f}A_bondpreserved"" + + # Save XYZ file if requested + if output_xyz: + if xyz_filename is None: + xyz_filename = f""ring_{N}units_R{target_radius:.1f}A_bonds_preserved.xyz"" + + ring_mol.exportXYZ(xyz_filename, + label=f""Bond-preserving ring: {N} units, R={target_radius:.3f} A, "" + f""span={total_angle_spanned:.3f} rad, arc_length={actual_circumference:.3f} A"") + print(f""Saved ring structure: {xyz_filename}"") + + print(f""Created bond-preserving ring: {N} units, {len(ring_atoms)} atoms"") + print(f"" Radius: {target_radius:.3f} A"") + print(f"" Arc length: {actual_circumference:.3f} A (vs {N*periodicity:.3f} A linear)"") + print(f"" Bond spacing preserved: {periodicity:.3f} A"") + + return ring_mol + + +def suggest_radius_for_closure(N: int, periodicity: float) -> float: + """""" + Suggest a radius that would give near-perfect ring closure. + + Args: + N: Number of unit cells + periodicity: Unit cell length + + Returns: + float: Suggested radius for ~perfect circle closure + """""" + ideal_radius = (N * periodicity) / (2.0 * math.pi) + return ideal_radius + + +def ring_with_closure_optimization(mol: Mol, N: int, periodicity: float, + target_radius: Optional[float] = None, + optimize_closure: bool = True, + periodic_dir: str = 'x', + output_xyz: bool = True, + xyz_filename: Optional[str] = None) -> Mol: + """""" + Create a ring with option to optimize for perfect closure or preserve bonds. + + Args: + mol: PyFock Mol object containing the unit cell + N: Number of unit cells + periodicity: Unit cell length (Angstrom) + target_radius: Desired radius. If None and optimize_closure=True, calculates optimal + optimize_closure: If True and target_radius=None, optimizes for perfect ring closure + periodic_dir: Direction of periodicity ('x', 'y', or 'z') + output_xyz: Whether to save XYZ file + xyz_filename: Custom filename for XYZ output + + Returns: + Mol: Ring structure + """""" + + if target_radius is None: + if optimize_closure: + target_radius = suggest_radius_for_closure(N, periodicity) + print(f""Using closure-optimized radius: {target_radius:.3f} A"") + else: + raise ValueError(""Must provide target_radius if optimize_closure=False"") + + return ring_preserve_bonds(mol, N, periodicity, target_radius, + periodic_dir, output_xyz, xyz_filename) +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Grids.py",".py","13563","311","__all__ = [""Grids""] +# Grids.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +import numpy as np +from . import Data +from . import Mol +from . import Basis +import numgrid +from joblib import Parallel, delayed +#import multiprocessing +import os +from timeit import default_timer as timer + + +#TODO Change it to return actual cores rather than threads +#num_cores = multiprocessing.cpu_count() +num_cores = os.cpu_count() +""""""Number of CPU cores to use for parallel grid generation via Joblib's threading backend."""""" + +lebedevOrdering = { + 0 : 1 , + 3 : 6 , + 5 : 14 , + 7 : 26 , + 9 : 38 , + 11 : 50 , + 13 : 74 , + 15 : 86 , + 17 : 110 , + 19 : 146 , + 21 : 170 , + 23 : 194 , + 25 : 230 , + 27 : 266 , + 29 : 302 , + 31 : 350 , + 35 : 434 , + 41 : 590 , + 47 : 770 , + 53 : 974 , + 59 : 1202, + 65 : 1454, + 71 : 1730, + 77 : 2030, + 83 : 2354, + 89 : 2702, + 95 : 3074, + 101: 3470, + 107: 3890, + 113: 4334, + 119: 4802, + 125: 5294, + 131: 5810 +} + +# Period 1 2 3 4 5 6 7 # level +Mapping = np.array([[11, 15, 17, 17, 17, 17, 17], # 0 + [17, 23, 23, 23, 23, 23, 23], # 1 + [23, 29, 29, 29, 29, 29, 29], # 2 + [29, 29, 35, 35, 35, 35, 35], # 3 + [35, 41, 41, 41, 41, 41, 41], # 4 This is the minimum that user can specify. + [41, 47, 47, 47, 47, 47, 47], # 5 + [47, 53, 53, 53, 53, 53, 53], # 6 + [53, 59, 59, 59, 59, 59, 59], # 7 + [59, 59, 59, 59, 59, 59, 59], # 8 + [65, 65, 65, 65, 65, 65, 65]]) # 9 This is the maximum that user can specify. + +def max_ang(charge, level): + #Mapping the LEBEDEV order with level of grids + period = int(Data.elementPeriod[charge]) + index = Mapping[level+1,period] + return lebedevOrdering[index] + + +def min_ang(charge, level): + #Mapping the LEBEDEV order with level of grids + period = int(Data.elementPeriod[charge]) + index = Mapping[level-3,period] + return lebedevOrdering[index] + + + +def genGridiNewAPI(radial_precision,proton_charges,center_coordinates_bohr,basis_set_name,center_index,level,alpha_min, alpha_max): + #This function generates the grid for a given atom (center_index) + #This function is used to enable the generation of grids in parallel using joblib library + #The idea being, that grids are generated atom-by-atom, + #so it would be better to generate them parallely. + + # min_num_angular_points = 110#110#86#min_ang(proton_charges[center_index], level - 4) + # max_num_angular_points = 434#302#max_ang(proton_charges[center_index], level) + min_num_angular_points = min_ang(proton_charges[center_index], level) + max_num_angular_points = max_ang(proton_charges[center_index], level) + hardness = 3 + # alpha_max = [ + # 11720.0, # O + # 13.01, # H + # 13.01, # H + # ] + # alpha_min = [ + # {0: 0.3023, 1: 0.2753, 2: 1.185}, # O + # {0: 0.122, 1: 0.727}, # H + # {0: 0.122, 1: 0.727}, # H + # ] + + # atom grid using explicit basis set parameters + coordinates, weights = numgrid.atom_grid( + alpha_min[center_index], + alpha_max[center_index], + radial_precision, + min_num_angular_points, + max_num_angular_points, + proton_charges, + center_index, + center_coordinates_bohr, + hardness + ) + + # Doesn't seem to be working + # The problem is that the REST API request to basis set exchange results in a timeout + # coordinates, weights = numgrid.atom_grid_bse(basis_set_name,radial_precision, + # min_num_angular_points, + # max_num_angular_points, + # proton_charges,center_index, + # center_coordinates_bohr, + # hardness + # ) + + + coordinates = np.array(coordinates) + x = coordinates[:,0] + y = coordinates[:,1] + z = coordinates[:,2] + + + return x,y,z,weights + +class Grids: + """""" + Class for generating molecular integration grids for DFT and other quantum chemistry calculations. + + This class uses the `numgrid` library to generate atom-centered grids composed of: + 1. A `level` indicating the fineness of the grid (from 3 to 8, with 0 reserved internally). + 2. `coords`: a (N, 3) NumPy array of Cartesian coordinates (in Bohrs) for the N grid points. + 3. `weights`: a NumPy array of length N containing the integration weights for each grid point. + + Grid density depends not only on the level but also on the basis set and the radial precision, + making it more flexible and customizable than typical grid generation schemes. + """""" + + #Class for the generation of molecular grids for numerical integration. + #The grid has three main components. + # 1. The grid 'level' refers to the coarsness or fineness of the grid. level = 4 (coarse) to 9 (fine) + # Although, internally CrysX would treat 0 as the minimum limit. + # This is to allow us to set a smaller min_num_angular_points and a larger max_num_angular_points. + # 2. The grid 'coords' (Bohrs) refer to a (N,3) numpy array with 3D cartesian coordinates + # of N grid points. + # 3. The grid 'weights' that is an N-element numpy array with the weights corresponding to the grid points. + + #In order to initialize a Grids object we need to provide the Mol object, Basis object and level (integer). + #One very important thing to note here is that, we use the 'numgrid' library to generate grids. + # https://github.com/dftlibs/numgrid + #Because of the way numgrid is implemented, there are mainly three ways to control the density of grids + # 1. Basis set: for radial grid + # 2. LEBEDEV ORDER or min/max angular points. We take care of this using the 'level' keyword. + # 3. Final the radial_precision. + # So, unlike other packages where the grid size would just depend on the level specified, + # here even the size of basis set also affect the grid size. + + + def __init__(self, mol=None, basis=None, level=3, radial_precision=1.0e-13, ncores = os.cpu_count()): + """""" + Initialize a Grids object for molecular numerical integration using atom-centered grids. + + Parameters + ---------- + mol : object + A Mol object containing atomic coordinates (`mol.coordsBohrs`) and nuclear charges (`mol.Zcharges`). + Required for placing atom-centered grid points. + + basis : object or None + A Basis object specifying the basis set to use. If None, defaults to 'def2-QZVPP'. + Affects the radial distribution of the grid. + + level : int, default=3 + Grid resolution level. Valid values are 3 (coarse) to 8 (fine). + Internally mapped to a min/max angular point scheme used by the `numgrid` library. + + radial_precision : float, default=1.0e-13 + Precision used in radial grid generation. Lower values increase the number of radial points. + + ncores : int, optional + Number of CPU cores to use for parallel grid generation. Defaults to the number of available cores. + + Raises + ------ + ValueError + If `mol` is None or `level` is outside the supported range [3, 8]. + + Notes + ----- + Uses the `numgrid` library for generating atomic-centered numerical integration grids. + The final grid coordinates and weights are stored in the `coords` and `weights` attributes, respectively. + """""" + # For level user can enter an integer from 3 to 8. + + # To get the same energies as PySCF (level=5) upto 1e-7 au, use the following settings + # radial_precision=1.0e-13 + # level=3 + # pruning by density with threshold = 1e-011 + # alpha_min and alpha_max corresponding to QZVP + + + # As a default we can use the def2-TZVP basis set, in case no basis set is provided + # or a custom basis set is provided, in which case we won't have a specific name to search for in BSE database. + + if basis is None: + basis_set_name = 'def2-QZVPP' + else: + basis_set_name = basis.basisSet.splitlines()[0] #TODO FIXME But this would only work if the basis set was + #specified from CrysX lib using Basis.load() + #If a user specified basis set was given via a string + #or a file, then this would fail. + + if mol is None: + print(""ERROR: Can't generate grids without molecular information!"") + return + + if level<3 or level>8: + print(""ERROR: Enter a valid value for level between 3 to 8!"") + return + + self.level = level + """"""The chosen grid level (integer between 3 and 8). Controls the angular resolution and density of the integration grid."""""" + + + #Create the atomic coordinate arrays needed by numgrid + x_coordinates_bohr = [] + y_coordinates_bohr = [] + z_coordinates_bohr = [] + center_coordinates_bohrs = [] + for i in range (mol.natoms): + x_coordinates_bohr.append(mol.coordsBohrs[i][0]) + y_coordinates_bohr.append(mol.coordsBohrs[i][1]) + z_coordinates_bohr.append(mol.coordsBohrs[i][2]) + center_coordinates_bohrs.append((mol.coordsBohrs[i][0],mol.coordsBohrs[i][1],mol.coordsBohrs[i][2])) + + + #Get the required values + num_centers = mol.natoms + proton_charges = mol.Zcharges + + #Now start the grid stuff + + + #Create arrays to store the returned grid points and their weights + #These will later be turned into numpy arrays + x_grid = [] + y_grid = [] + z_grid = [] + w_grid = [] + + + print('Grid generation using '+str(ncores)+' threads for Joblib.') + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(genGridiNewAPI)(radial_precision,proton_charges,center_coordinates_bohrs,basis_set_name,center_index,level,basis.alpha_min, basis.alpha_max) for center_index in range(num_centers)) + num_total_grid_points = 0 + for center_index in range(num_centers): + num_total_grid_points = num_total_grid_points + len(output[center_index][0]) + x_grid.extend(output[center_index][0]) + y_grid.extend(output[center_index][1]) + z_grid.extend(output[center_index][2]) + w_grid.extend(output[center_index][3]) + + + #print(num_total_grid_points) + #Now create the numpy arrays that store the grid points and weights + #self.coords = np.empty((len(num_total_grid_points),3)) + #self.weights = np.empty((len(num_total_grid_points))) + self.coords = np.empty((len(x_grid),3)) + """"""A NumPy array of shape (N, 3), storing the Cartesian coordinates of N grid points (in Bohrs)."""""" + self.weights = np.empty((len(x_grid))) + """"""A NumPy array of length N, storing the quadrature weights corresponding to each grid point."""""" + #Convert the Python arrays x_grid, y_grid, z_grid to the Grids.coords numpy arrays + self.coords[:,0] = np.array(x_grid) + self.coords[:,1] = np.array(y_grid) + self.coords[:,2] = np.array(z_grid) + # center_coordinates_bohrs = np.array(center_coordinates_bohrs) + # self.coords = self.coords[(np.abs(np.subtract.outer(self.coords,center_coordinates_bohrs)) > 1e-5).all(1)] + self.weights[:] = np.array(w_grid) + return + + + + + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/HF.py",".py","2146","44","# HF.py +# Author: Manas Sharma (manassharma07@live.com) +# This is a part of CrysX (https://bragitoff.com/crysx) +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" +from re import T +import pyfock.Mol as Mol +import pyfock.Basis as Basis +import pyfock.Integrals as Integrals +import pyfock.Grids as Grids +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +controller = ThreadpoolController() +import numpy as np +from numpy.linalg import eig, multi_dot as dot +import scipy +from timeit import default_timer as timer +import numba +from opt_einsum import contract +# import sparse +# import dask.array as da +from scipy.sparse import csr_matrix, csc_matrix +# from memory_profiler import profile +import os +from numba import njit, prange, cuda +import numexpr +try: + import cupy as cp + from cupy import fuse + import cupyx +except Exception as e: + print('Cupy is not installed. GPU acceleration is not availble.') + pass +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/BasisSets/__init__.py",".py","0","0","","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/xcfunc_handler.py",".py","4174","130","from pyfock.XC import lda_x, lda_x_cupy, lda_c_vwn, lda_c_vwn_cupy, lda_c_pw, lda_c_pw_cupy, lda_c_pw_mod, lda_c_pw_mod_cupy +from pyfock.XC import gga_x_pbe, gga_x_pbe_cupy, gga_c_pbe, gga_c_pbe_cupy, gga_x_b88, gga_x_b88_cupy, gga_c_lyp, gga_c_lyp_cupy +#LibXC IDs of implemented functionals + +# 1 - LDA_X +# 7 - LDA_C_VWN +# 12 - LDA_C_PW +# 13 - LDA_C_PW_MOD +# 101 - GGA_X_PBE +# 106 - GGA_X_B88 +# 130 - GGA_C_PBE +# 131 - GGA_C_LYP + +def check_implemented(funcid): + """""" + Check if the given functional ID is implemented in PyFock. + + Parameters + ---------- + funcid : int + LibXC-style functional ID (e.g., 1 for LDA_X, 101 for GGA_X_PBE). + + Raises + ------ + SystemExit + If the functional ID is not supported by PyFock, prints an error and exits. + + Notes + ----- + Implemented functional IDs in PyFock: + - 1 : LDA_X + - 7 : LDA_C_VWN + - 12 : LDA_C_PW + - 13 : LDA_C_PW_MOD + - 101 : GGA_X_PBE + - 106 : GGA_X_B88 + - 131 : GGA_C_LYP + For unsupported functionals, you can use LibXC directly. + """""" + if funcid not in [1, 7, 12, 13, 101, 106, 131]: + print('ERROR: The specified functional is not implemented in PyFock. You need to use LibXC to calculate the functional values.') + exit() + +def func_compute(funcid, rho, sigma=None, use_gpu=True): + """""" + Compute exchange-correlation energy and potential using the specified functional. + + Parameters + ---------- + funcid : int + Identifier for the XC functional. Matches LibXC IDs: + - 1 : LDA_X + - 7 : LDA_C_VWN + - 12 : LDA_C_PW + - 13 : LDA_C_PW_MOD + - 101 : GGA_X_PBE + - 106 : GGA_X_B88 + - 130 : GGA_C_PBE + - 131 : GGA_C_LYP + + rho : ndarray + Electron density array. Should be shape-compatible with the expected input of the XC functional. + + sigma : ndarray, optional + Gradient of the density (∇ρ·∇ρ), required for GGA functionals. + + use_gpu : bool, default=True + Whether to use CuPy (GPU) versions of the functionals. If False, falls back to CPU (NumPy) versions. + + Returns + ------- + energy_density : ndarray + The exchange-correlation energy density at each grid point. + + potential : ndarray or tuple + The exchange-correlation potential, and for GGA, possibly its derivative with respect to sigma. + + Raises + ------ + SystemExit + If the functional is not implemented in PyFock. + + Notes + ----- + For unsupported functionals (i.e., other than those listed above), use LibXC. + """""" + if use_gpu: + if funcid==1: + return lda_x_cupy(rho) + elif funcid==7: + return lda_c_vwn_cupy(rho) + elif funcid==12: + return lda_c_pw_cupy(rho) + elif funcid==13: + return lda_c_pw_mod_cupy(rho) + elif funcid==101: + return gga_x_pbe_cupy(rho, sigma) + elif funcid==106: + return gga_x_b88_cupy(rho, sigma) + elif funcid==130: + return gga_c_pbe_cupy(rho, sigma) + elif funcid==131: + return gga_c_lyp_cupy(rho, sigma) + else: + print('The specified functional is not implemented in PyFock. You need to use LibXC to calculate the functional values.') + exit() + else: + if funcid==1: + return lda_x(rho) + elif funcid==7: + return lda_c_vwn(rho) + elif funcid==12: + return lda_c_pw(rho) + elif funcid==13: + return lda_c_pw_mod(rho) + elif funcid==101: + return gga_x_pbe(rho, sigma) + elif funcid==106: + return gga_x_b88(rho, sigma) + elif funcid==130: + return gga_c_pbe(rho, sigma) + elif funcid==131: + return gga_c_lyp(rho, sigma) + else: + print('The specified functional is not implemented in PyFock. You need to use LibXC to calculate the functional values.') + exit() + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/gga_x_b88.py",".py","5083","158","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np + +def gga_x_b88_e(rho, sigma): + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # The restricted Becke 88 exchange energy density. + # Corresponds to 106 id in Libxc + + # rho_cutoff = 1e-12 # define rho_cutoff constant + rho = np.maximum(rho, 1e-12) + + beta = 0.0042 # beta parameter + beta6 = 6 * beta + const = (3 / 2) * ((3 / (4 * np.pi)) ** (1 / 3)) + two_m13 = 2 ** (-1 / 3) + two_m43 = 1 / 2 * two_m13 + + + rho_13 = rho ** (1 / 3) + rho_43 = two_m43 * rho * rho_13 + gg = 1 / 2 * np.sqrt(sigma) + x = gg / rho_43 + x2 = x ** 2 + log_term = np.log(x + np.sqrt(1 + x2)) + ex = - two_m13 * rho_13 * (const + beta * x2 / (1 + beta6 * x * log_term)) + + return ex + +def gga_x_b88_v(rho, sigma): + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # The restricted Becke 88 exchange potential. These equations are + # essentially the same as in the appendix of JCP 98(7) 5612-5626. + # Note that (A5) is in error because the gamma variables should be square + # rooted. Note that (A6) is in error because the power of rho_alpha should + # be 1/3 not 4/3. + # Corresponds to 106 id in Libxc + + rho = np.maximum(rho, 1e-12) + sigma = np.maximum(sigma, 1e-12) + + beta = 0.0042 # beta parameter + beta2 = 2 * beta + beta6 = 6 * beta + bbta6 = 6 * beta * beta + const = 3 / 2 * (3 / (4 * np.pi)) ** (1 / 3) + + rho1 = 0.5 * rho + rho_13 = rho1 ** (1 / 3) + rho_43 = rho1 * rho_13 + gg = 0.5 * np.sqrt(sigma) + x = gg / rho_43 + x2 = x * x + sq = np.sqrt(1 + x2) + as_ = np.log(x + sq) + d = 1 / (1 + beta6 * x * as_) + d2 = d * d + g0 = const + beta * x2 * d + g1 = (beta2 * x + bbta6 * x2 * (as_ - x / sq)) * d2 + gg = 0.5 * g1 / gg # a factor 1/2 x 2 which cancel, here + vx = -4 / 3 * rho_13 * (g0 - x * g1) + vsigma = -0.5*gg # This works (verified) + + return vx, vsigma + + +def gga_x_b88(rho, sigma): + # Corresponds to 106 id in Libxc + ex = gga_x_b88_e(rho, sigma) + vx, vsigma = gga_x_b88_v(rho, sigma) + return ex, vx, vsigma + +@fuse(kernel_name='gga_x_b88_e_cupy') +def gga_x_b88_e_cupy(rho, sigma): + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # The restricted Becke 88 exchange energy density. + # Corresponds to 106 id in Libxc + + # rho_cutoff = 1e-12 # define rho_cutoff constant + # rho = cp.maximum(rho, 1e-12) + + beta = 0.0042 # beta parameter + beta6 = 6 * beta + const = (3 / 2) * ((3 / (4 * cp.pi)) ** (1 / 3)) + two_m13 = 2 ** (-1 / 3) + two_m43 = 1 / 2 * two_m13 + + + rho_13 = rho ** (1 / 3) + rho_43 = two_m43 * rho * rho_13 + gg = 1 / 2 * cp.sqrt(sigma) + x = gg / rho_43 + x2 = x ** 2 + log_term = cp.log(x + cp.sqrt(1 + x2)) + ex = - two_m13 * rho_13 * (const + beta * x2 / (1 + beta6 * x * log_term)) + + return ex + +@fuse(kernel_name='gga_x_b88_v_cupy') +def gga_x_b88_v_cupy(rho, sigma): + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # The restricted Becke 88 exchange potential. These equations are + # essentially the same as in the appendix of JCP 98(7) 5612-5626. + # Note that (A5) is in error because the gamma variables should be square + # rooted. Note that (A6) is in error because the power of rho_alpha should + # be 1/3 not 4/3. + # Corresponds to 106 id in Libxc + + # rho = cp.maximum(rho, 1e-12) + # sigma = cp.maximum(sigma, 1e-12) + + beta = 0.0042 # beta parameter + beta2 = 2 * beta + beta6 = 6 * beta + bbta6 = 6 * beta * beta + const = 3 / 2 * (3 / (4 * cp.pi)) ** (1 / 3) + + rho1 = 0.5 * rho + rho_13 = rho1 ** (1 / 3) + rho_43 = rho1 * rho_13 + gg = 0.5 * cp.sqrt(sigma) + # print(cp.min(gg)) + x = gg / rho_43 + x2 = x * x + # print(cp.min(x2)) + sq = cp.sqrt(1 + x2) + # print(cp.isnan(cp.sum(sq))) + as_ = cp.log(x + sq) + # sq = cp.sqrt(1 + x2) + # as_ = cp.log(cp.maximum(x + sq, 1e-12)) + d = 1 / (1 + beta6 * x * as_) + d2 = d * d + g0 = const + beta * x2 * d + g1 = (beta2 * x + bbta6 * x2 * (as_ - x / sq)) * d2 + gg = 0.5 * g1 / gg # a factor 1/2 x 2 which cancel, here + vx = -4 / 3 * rho_13 * (g0 - x * g1) + vsigma = -0.5*gg # This works (verified) + + return vx, vsigma + + +def gga_x_b88_cupy(rho, sigma): + # Corresponds to 106 id in Libxc + ex = gga_x_b88_e_cupy(rho, sigma) + vx, vsigma = gga_x_b88_v_cupy(rho, sigma) + vsigma[cp.isnan(vsigma)] = 0 + vx[cp.isnan(vx)] = 0 + ex[cp.isnan(ex)] = 0 + return ex, vx, vsigma","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/lda_c_pw.py",".py","5140","186","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np + +# The following implementation of the Perdew-Wang parametrization of the correlation functional +# has been taken from this repository (https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_c_pw.py) +# pretty much as is. The repo has the Apache 2.0 license. + +def lda_c_pw_(rho): + """""" + Compute the LDA correlation energy and potential using the Perdew-Wang (PW92) parametrization. + + This is the spin-unpolarized version of the LDA_C_PW correlation functional (LibXC ID 12). + + Parameters + ---------- + rho : ndarray + Electron density array (assumed to be spin-unpolarized). Should be non-negative. + + Returns + ------- + ec : ndarray + Correlation energy density at each grid point. + + vc : ndarray + Correlation potential (functional derivative of correlation energy with respect to density). + + Notes + ----- + Reference: + - J.P. Perdew and Y. Wang, Phys. Rev. B 45, 13244 (1992). + + Implementation adapted from: + https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_c_pw.py + Licensed under the Apache License, Version 2.0. + + """""" + + rho = np.maximum(rho, 1e-12) + + A = 0.031091 + a1 = 0.2137 + b1 = 7.5957 + b2 = 3.5876 + b3 = 1.6382 + b4 = 0.49294 + + rs = (3 / (4 * np.pi * rho))**(1 / 3) + rs12 = np.sqrt(rs) + rs32 = rs * rs12 + rs2 = rs**2 + + om = 2 * A * (b1 * rs12 + b2 * rs + b3 * rs32 + b4 * rs2) + olog = np.log(1 + 1 / om) + ec = -2 * A * (1 + a1 * rs) * olog + + dom = 2 * A * (0.5 * b1 * rs12 + b2 * rs + 1.5 * b3 * rs32 + 2 * b4 * rs2) + vc = -2 * A * (1 + 2 / 3 * a1 * rs) * olog - 2 / 3 * A * (1 + a1 * rs) * dom / (om * (om + 1)) + + return ec, vc + +def lda_c_pw(rho): + """""" + Numerically stable wrapper for the Perdew-Wang (PW92) LDA correlation functional. + + This calls `lda_c_pw_`, then replaces any NaNs in the result with zeros to ensure + downstream stability in SCF or post-processing steps. + + Parameters + ---------- + rho : ndarray + Electron density array (non-negative, spin-unpolarized). + + Returns + ------- + ec : ndarray + Correlation energy density with NaNs replaced by 0. + + vc : ndarray + Correlation potential with NaNs replaced by 0. + + Notes + ----- + This is the CPU-based version. Use `lda_c_pw_cupy` for GPU acceleration. + """""" + ec, vc = lda_c_pw_(rho) + vc[np.isnan(vc)] = 0 + ec[np.isnan(ec)] = 0 + return ec, vc + + +@fuse(kernel_name='lda_c_pw_cupy_') +def lda_c_pw_cupy_(rho): + """""" + GPU-accelerated implementation of the LDA_C_PW correlation functional using CuPy. + + This function computes the Perdew-Wang LDA correlation energy and potential for spin-unpolarized systems. + + Parameters + ---------- + rho : cupy.ndarray + Electron density array on GPU (non-negative, spin-unpolarized). + + Returns + ------- + ec : cupy.ndarray + Correlation energy density at each grid point. + + vc : cupy.ndarray + Correlation potential (functional derivative of correlation energy with respect to density). + + Notes + ----- + Reference: + - J.P. Perdew and Y. Wang, Phys. Rev. B 45, 13244 (1992). + + Implementation adapted from: + https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_c_pw.py + Licensed under the Apache License, Version 2.0. + + This version uses CuPy's `@fuse` decorator to enable kernel fusion for performance optimization. + + """""" + + rho = cp.maximum(rho, 1e-12) + + A = 0.031091 + a1 = 0.2137 + b1 = 7.5957 + b2 = 3.5876 + b3 = 1.6382 + b4 = 0.49294 + + rs = (3 / (4 * cp.pi * rho))**(1 / 3) + rs12 = cp.sqrt(rs) + rs32 = rs * rs12 + rs2 = rs**2 + + om = 2 * A * (b1 * rs12 + b2 * rs + b3 * rs32 + b4 * rs2) + olog = cp.log(1 + 1 / om) + ec = -2 * A * (1 + a1 * rs) * olog + + dom = 2 * A * (0.5 * b1 * rs12 + b2 * rs + 1.5 * b3 * rs32 + 2 * b4 * rs2) + vc = -2 * A * (1 + 2 / 3 * a1 * rs) * olog - 2 / 3 * A * (1 + a1 * rs) * dom / (om * (om + 1)) + + return ec, vc + +def lda_c_pw_cupy(rho): + """""" + Numerically stable GPU wrapper for the Perdew-Wang LDA correlation functional. + + This function calls `lda_c_pw_cupy_` and replaces any NaNs in the resulting arrays + with zeros to ensure stability during molecular dynamics or SCF procedures. + + Parameters + ---------- + rho : cupy.ndarray + Electron density array on GPU (non-negative, spin-unpolarized). + + Returns + ------- + ec : cupy.ndarray + Correlation energy density with NaNs replaced by 0. + + vc : cupy.ndarray + Correlation potential with NaNs replaced by 0. + + Notes + ----- + Use this function for production GPU workflows where numerical robustness is critical. + """""" + ec, vc = lda_c_pw_cupy_(rho) + vc[cp.isnan(vc)] = 0 + ec[cp.isnan(ec)] = 0 + return ec, vc + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/lda_x.py",".py","2911","93","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np + +# The following implementation of the Slater exchange has been taken from this repository (https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_x.py) +# pretty much as is. The repo has the Apache 2.0 license. + +def lda_x(rho): + """""" + Compute the LDA exchange energy and potential using the Slater exchange functional (spin-unpolarized). + + This is the standard Local Density Approximation (LDA) exchange functional corresponding to + `LDA_X` with ID 1 in the LibXC functional library. + + Parameters + ---------- + rho : ndarray + Electron density array (assumed to be spin-paired / spin-unpolarized). + + Returns + ------- + ex : ndarray + Exchange energy density at each point. + + vx : ndarray + Exchange potential (functional derivative of exchange energy with respect to density). + + Notes + ----- + This implementation is based on: + - Phys. Rev. 81, 385 (1951) — the original Slater exchange. + Code adapted from the `eminus` repository: + https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_x.py + Licensed under the Apache License, Version 2.0. + + """""" + + pi34 = (3 / (4 * np.pi))**(1 / 3) + f = -3 / 4 * (3 / (2 * np.pi))**(2 / 3) + rs = pi34 * np.power(rho, -1 / 3) + ex = f / rs + vx = 4 / 3 * ex + # return {'zk':ex, 'vrho':vx} + return ex, vx + +@fuse(kernel_name='lda_x_cupy') +def lda_x_cupy(rho): + """""" + GPU-accelerated version of the LDA exchange functional using CuPy. + + This is the same as `lda_x` but leverages CuPy for GPU computation. It corresponds to + `LDA_X` with ID 1 in LibXC for spin-unpolarized electron density. + + Parameters + ---------- + rho : cupy.ndarray + Electron density array (spin-unpolarized), on GPU. + + Returns + ------- + ex : cupy.ndarray + Exchange energy density at each point. + + vx : cupy.ndarray + Exchange potential (functional derivative of exchange energy with respect to density). + + Notes + ----- + Based on the Slater exchange: + - Phys. Rev. 81, 385 (1951) + Adapted from: https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_x.py + Licensed under the Apache License, Version 2.0. + + This version is fused using CuPy's `@fuse` decorator for better performance. + + """""" + + pi34 = (3 / (4 * cp.pi))**(1 / 3) + f = -3 / 4 * (3 / (2 * cp.pi))**(2 / 3) + rs = pi34 * cp.power(rho, -1 / 3) + ex = f / rs + vx = 4 / 3 * ex + # return {'zk':ex, 'vrho':vx} + return ex, vx","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/__init__.py",".py","1643","39",""""""" +This module provides a collection of exchange-correlation (XC) functionals +commonly used in density functional theory (DFT) calculations. It includes +both exchange-only (X) and correlation (C) functionals within the LDA and GGA +frameworks, along with their respective CuPy-accelerated implementations +for GPU computation. + +Available functionals: +- LDA exchange and correlation (X: lda_x, C: lda_c_vwn, lda_c_pw, lda_c_pw_mod) +- GGA exchange and correlation (X: gga_x_pbe, gga_x_b88; C: gga_c_pbe, gga_c_lyp) +- CuPy variants for GPU-accelerated computation (e.g., lda_x_cupy, gga_c_pbe_cupy) + +Also includes utility functions: +- `check_implemented`: verifies if a given XC functional is implemented. +- `func_compute`: generic interface to compute XC energy and potential. + +All components can be imported directly from this module. +"""""" +from .lda_x import lda_x, lda_x_cupy +from .lda_c_vwn import lda_c_vwn, lda_c_vwn_cupy +from .lda_c_pw import lda_c_pw, lda_c_pw_cupy +from .lda_c_pw_mod import lda_c_pw_mod, lda_c_pw_mod_cupy +from .gga_x_pbe import gga_x_pbe, gga_x_pbe_cupy +from .gga_c_pbe import gga_c_pbe, gga_c_pbe_cupy +from .gga_x_b88 import gga_x_b88, gga_x_b88_cupy +from .gga_c_lyp import gga_c_lyp, gga_c_lyp_cupy +from .xcfunc_handler import check_implemented, func_compute + +__all__ = [ + 'lda_x', 'lda_x_cupy', 'lda_c_vwn', 'lda_c_vwn_cupy', + 'lda_c_pw', 'lda_c_pw_cupy', 'lda_c_pw_mod', 'lda_c_pw_mod_cupy', + 'gga_x_pbe', 'gga_x_pbe_cupy', 'gga_c_pbe', 'gga_c_pbe_cupy', + 'gga_x_b88', 'gga_x_b88_cupy', 'gga_c_lyp', 'gga_c_lyp_cupy', + 'check_implemented', 'func_compute' +] + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/gga_c_pbe.py",".py","4186","133","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np +# from pyfock.XC import lda_c_pw_mod, lda_c_pw_mod_cupy +from pyfock.XC.lda_c_pw_mod import lda_c_pw_mod_, lda_c_pw_mod_cupy_ + +# The following implementation of the PBE correlation has been taken from this repository (https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_c_pbe.py) +# pretty much as is. The repo has the Apache 2.0 license. + + +def gga_c_pbe_cupy_(rho, sigma): + # Taken from: https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_c_pbe.py + # Perdew-Burke-Ernzerhof parametrization of the correlation functional (spin-paired). + # Corresponds to the functional with the label GGA_C_PBE and ID 130 in Libxc. + # Reference: Phys. Rev. Lett. 78, 1396. + + rho = np.maximum(rho, 1e-12) + + beta = 0.06672455060314922 + gamma = (1 - np.log(2)) / np.pi**2 + + pi34 = (3 / (4 * np.pi))**(1 / 3) + rs = pi34 * rho**(-1 / 3) + norm_dn = np.sqrt(sigma) + ec, vc = lda_c_pw_mod_(rho) + + kf = (9 / 4 * np.pi)**(1 / 3) / rs + ks = np.sqrt(4 * kf / np.pi) + divt = 2 * ks * rho + t = norm_dn / divt + expec = np.exp(-ec / gamma) + A = beta / (gamma * (expec - 1)) + t2 = t**2 + At2 = A * t2 + A2t4 = At2**2 + divsum = 1 + At2 + A2t4 + div = (1 + At2) / divsum + nolog = 1 + beta / gamma * t2 * div + gec = gamma * np.log(nolog) + + factor = A2t4 * (2 + At2) / divsum**2 + dgec = beta * t2 / nolog * (-7 / 3 * div - factor * (A * expec * (vc - ec) / beta - 7 / 3)) + gvc = gec + dgec + + vsigmac = beta / (divt * ks) * (div - factor) / nolog + + ec += gec + vc += gvc + vsigma = 0.5*vsigmac + + + return ec, vc, vsigma + +def gga_c_pbe(rho, sigma): + # Taken from: https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_c_pbe.py + # Perdew-Burke-Ernzerhof parametrization of the correlation functional (spin-paired). + # Corresponds to the functional with the label GGA_C_PBE and ID 130 in Libxc. + # Reference: Phys. Rev. Lett. 78, 1396. + + ec, vc, vsigma = gga_c_pbe_(rho, sigma) + + vsigma[np.isnan(vsigma)] = 0 + vc[np.isnan(vc)] = 0 + ec[np.isnan(ec)] = 0 + + return ec, vc, vsigma + +@fuse(kernel_name='pbe_c_pbe_cupy_') +def gga_c_pbe_cupy_(rho, sigma): + # Taken from: https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_c_pbe.py + # Perdew-Burke-Ernzerhof parametrization of the correlation functional (spin-paired). + # Corresponds to the functional with the label GGA_C_PBE and ID 130 in Libxc. + # Reference: Phys. Rev. Lett. 78, 1396. + + rho = cp.maximum(rho, 1e-12) + + beta = 0.06672455060314922 + gamma = (1 - cp.log(2)) / cp.pi**2 + + pi34 = (3 / (4 * cp.pi))**(1 / 3) + rs = pi34 * rho**(-1 / 3) + norm_dn = cp.sqrt(sigma) + ec, vc = lda_c_pw_mod_cupy_(rho) + + kf = (9 / 4 * cp.pi)**(1 / 3) / rs + ks = cp.sqrt(4 * kf / cp.pi) + divt = 2 * ks * rho + t = norm_dn / divt + expec = cp.exp(-ec / gamma) + A = beta / (gamma * (expec - 1)) + t2 = t**2 + At2 = A * t2 + A2t4 = At2**2 + divsum = 1 + At2 + A2t4 + div = (1 + At2) / divsum + nolog = 1 + beta / gamma * t2 * div + gec = gamma * cp.log(nolog) + + factor = A2t4 * (2 + At2) / divsum**2 + dgec = beta * t2 / nolog * (-7 / 3 * div - factor * (A * expec * (vc - ec) / beta - 7 / 3)) + gvc = gec + dgec + + vsigmac = beta / (divt * ks) * (div - factor) / nolog + + ec += gec + vc += gvc + vsigma = 0.5*vsigmac + + + return ec, vc, vsigma + +def gga_c_pbe_cupy(rho, sigma): + # Taken from: https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_c_pbe.py + # Perdew-Burke-Ernzerhof parametrization of the correlation functional (spin-paired). + # Corresponds to the functional with the label GGA_C_PBE and ID 130 in Libxc. + # Reference: Phys. Rev. Lett. 78, 1396. + + ec, vc, vsigma = gga_c_pbe_cupy_(rho, sigma) + + vsigma[cp.isnan(vsigma)] = 0 + vc[cp.isnan(vc)] = 0 + ec[cp.isnan(ec)] = 0 + + return ec, vc, vsigma","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/lda_c_pw_mod.py",".py","2418","88","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np + +# The following implementation of the Perdew-Wang parametrization of the correlation functional +# has been taken from this repository (https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_c_pw.py) +# pretty much as is. The repo has the Apache 2.0 license. + +def lda_c_pw_mod_(rho): + # From https://github.com/wangenau/eminus + # Corresponds to the functional with the label LDA_C_PW_MOD and ID 13 in Libxc. + # Reference: Phys. Rev. B 45, 13244. + + rho = np.maximum(rho, 1e-12) + + A = 0.0310907 + a1 = 0.2137 + b1 = 7.5957 + b2 = 3.5876 + b3 = 1.6382 + b4 = 0.49294 + + rs = (3 / (4 * np.pi * rho))**(1 / 3) + rs12 = np.sqrt(rs) + rs32 = rs * rs12 + rs2 = rs**2 + + om = 2 * A * (b1 * rs12 + b2 * rs + b3 * rs32 + b4 * rs2) + olog = np.log(1 + 1 / om) + ec = -2 * A * (1 + a1 * rs) * olog + + dom = 2 * A * (0.5 * b1 * rs12 + b2 * rs + 1.5 * b3 * rs32 + 2 * b4 * rs2) + vc = -2 * A * (1 + 2 / 3 * a1 * rs) * olog - 2 / 3 * A * (1 + a1 * rs) * dom / (om * (om + 1)) + + return ec, vc + +def lda_c_pw_mod(rho): + ec, vc = lda_c_pw_mod_(rho) + vc[np.isnan(vc)] = 0 + ec[np.isnan(ec)] = 0 + return ec, vc + + +@fuse(kernel_name='lda_c_pw_mod_cupy_') +def lda_c_pw_mod_cupy_(rho): + # From https://github.com/wangenau/eminus + # Corresponds to the functional with the label LDA_C_PW_MOD and ID 13 in Libxc. + # Reference: Phys. Rev. B 45, 13244. + + rho = cp.maximum(rho, 1e-12) + + A = 0.0310907 + a1 = 0.2137 + b1 = 7.5957 + b2 = 3.5876 + b3 = 1.6382 + b4 = 0.49294 + + rs = (3 / (4 * cp.pi * rho))**(1 / 3) + rs12 = cp.sqrt(rs) + rs32 = rs * rs12 + rs2 = rs**2 + + om = 2 * A * (b1 * rs12 + b2 * rs + b3 * rs32 + b4 * rs2) + olog = cp.log(1 + 1 / om) + ec = -2 * A * (1 + a1 * rs) * olog + + dom = 2 * A * (0.5 * b1 * rs12 + b2 * rs + 1.5 * b3 * rs32 + 2 * b4 * rs2) + vc = -2 * A * (1 + 2 / 3 * a1 * rs) * olog - 2 / 3 * A * (1 + a1 * rs) * dom / (om * (om + 1)) + + return ec, vc + +def lda_c_pw_mod_cupy(rho): + ec, vc = lda_c_pw_mod_cupy_(rho) + vc[cp.isnan(vc)] = 0 + ec[cp.isnan(ec)] = 0 + return ec, vc + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/lda_c_vwn.py",".py","5222","171","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np + +# The following implementation of the Vosko-Wilk-Nusair parametrization of the correlation functional +# has been taken from this repository (https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_x.py) +# pretty much as is. The repo has the Apache 2.0 license. + +def lda_c_vwn_(rho): + """""" + Compute the correlation energy and potential using the Vosko-Wilk-Nusair (VWN) LDA correlation functional. + + This function implements the spin-unpolarized LDA_C_VWN functional (LibXC ID 7) based on the + parametrization by Vosko, Wilk, and Nusair. + + Parameters + ---------- + rho : ndarray + Electron density array (assumed to be spin-unpolarized). + + Returns + ------- + ec : ndarray + Correlation energy density at each grid point. + + vc : ndarray + Correlation potential (functional derivative of correlation energy with respect to density). + + Notes + ----- + This is the raw implementation of the VWN correlation functional adapted from: + - Phys. Rev. B 22, 3812 (1980) + Code source: https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_x.py + Licensed under the Apache License, Version 2.0. + + """""" + + rho = np.maximum(rho, 1e-12) + + a = 0.0310907 + b = 3.72744 + c = 12.9352 + x0 = -0.10498 + pi34 = (3 / (4 * np.pi))**(1 / 3) + rs = pi34 * np.power(rho, -1 / 3) + q = np.sqrt(4 * c - b * b) + f1 = 2 * b / q + f2 = b * x0 / (x0 * x0 + b * x0 + c) + f3 = 2 * (2 * x0 + b) / q + rs12 = np.sqrt(rs) + fx = rs + b * rs12 + c + qx = np.arctan(q / (2 * rs12 + b)) + ec = a * (np.log(rs / fx) + f1 * qx - f2 * (np.log((rs12 - x0)**2 / fx) + f3 * qx)) + tx = 2 * rs12 + b + tt = tx * tx + q * q + vc = ec - rs12 * a / 6 * (2 / rs12 - tx / fx - 4 * b / tt - + f2 * (2 / (rs12 - x0) - tx / fx - 4 * (2 * x0 + b) / tt)) + return ec, vc + +def lda_c_vwn(rho): + """""" + Wrapper function for `lda_c_vwn_` providing the LDA correlation energy and potential using VWN parametrization. + + Parameters + ---------- + rho : ndarray + Electron density array (spin-unpolarized). + + Returns + ------- + ec : ndarray + Correlation energy density. + + vc : ndarray + Correlation potential. + + Notes + ----- + This function is equivalent to `lda_c_vwn_` but kept as a public-facing interface in PyFock. + """""" + ec, vc = lda_c_vwn_(rho) + return ec, vc + +@fuse(kernel_name='lda_c_vwn_cupy_') +def lda_c_vwn_cupy_(rho): + """""" + GPU-accelerated implementation of the LDA_C_VWN correlation functional using CuPy. + + This is a CuPy version of the Vosko-Wilk-Nusair LDA correlation functional (LibXC ID 7) for spin-unpolarized densities. + + Parameters + ---------- + rho : cupy.ndarray + Electron density array (spin-unpolarized), allocated on GPU. + + Returns + ------- + ec : cupy.ndarray + Correlation energy density at each grid point. + + vc : cupy.ndarray + Correlation potential (functional derivative of correlation energy with respect to density). + + Notes + ----- + Based on: + - Vosko, Wilk, and Nusair, Phys. Rev. B 22, 3812 (1980) + Adapted from: https://github.com/wangenau/eminus/blob/main/eminus/xc/lda_x.py + Licensed under the Apache License, Version 2.0. + + """""" + + rho = cp.maximum(rho, 1e-12) + + a = 0.0310907 + b = 3.72744 + c = 12.9352 + x0 = -0.10498 + pi34 = (3 / (4 * cp.pi))**(1 / 3) + rs = pi34 * cp.power(rho, -1 / 3) + q = cp.sqrt(4 * c - b * b) + f1 = 2 * b / q + f2 = b * x0 / (x0 * x0 + b * x0 + c) + f3 = 2 * (2 * x0 + b) / q + rs12 = cp.sqrt(rs) + fx = rs + b * rs12 + c + qx = cp.arctan(q / (2 * rs12 + b)) + ec = a * (cp.log(rs / fx) + f1 * qx - f2 * (cp.log((rs12 - x0)**2 / fx) + f3 * qx)) + tx = 2 * rs12 + b + tt = tx * tx + q * q + vc = ec - rs12 * a / 6 * (2 / rs12 - tx / fx - 4 * b / tt - + f2 * (2 / (rs12 - x0) - tx / fx - 4 * (2 * x0 + b) / tt)) + return ec, vc + +def lda_c_vwn_cupy(rho): + """""" + Safe wrapper for the GPU-based VWN LDA correlation functional. + + This function calls `lda_c_vwn_cupy_`, and replaces any NaNs in the result with zeros + to ensure numerical stability in downstream calculations. + + Parameters + ---------- + rho : cupy.ndarray + Electron density array on GPU. + + Returns + ------- + ec : cupy.ndarray + Correlation energy density with NaNs replaced by 0. + + vc : cupy.ndarray + Correlation potential with NaNs replaced by 0. + + Notes + ----- + This is a numerically safe version of `lda_c_vwn_cupy_` intended for production use. + """""" + ec, vc = lda_c_vwn_cupy_(rho) + vc[cp.isnan(vc)] = 0 + ec[cp.isnan(ec)] = 0 + return ec, vc","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/gga_x_pbe.py",".py","7313","250","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np +from pyfock.XC import lda_x + +# The following implementation of the PBE exchange has been taken from this repository (https://github.com/wangenau/eminus/blob/main/eminus/xc/) +# pretty much as is. The repo has the Apache 2.0 license. + +def gga_x_pbe(rho, sigma): + """""" + Compute the restricted PBE (Perdew–Burke–Ernzerhof) exchange energy density and potential + using NumPy arrays for electron density and its gradient. + + Adapted from + ---------- + Eminus project: + https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_x_pbe.py + Licensed under the Apache License, Version 2.0. + + Reference + ---------- + J. P. Perdew, K. Burke, and M. Ernzerhof, + ""Generalized Gradient Approximation Made Simple"", + Phys. Rev. Lett. 77, 3865 (1996). + https://doi.org/10.1103/PhysRevLett.77.3865 + + Parameters + ---------- + rho : ndarray + Electron density array. + sigma : ndarray + Gradient of the electron density, defined as ∇ρ·∇ρ. + + Returns + ------- + ex : ndarray + Exchange energy density. + vx : ndarray + Functional derivative of the exchange energy with respect to density. + vsigma : ndarray + Functional derivative of the exchange energy with respect to the density gradient term σ. + """""" + + mu = 0.2195149727645171 # Functional parameter + + # rho_cutoff = 1e-12 # define rho_cutoff constant + rho = np.maximum(rho, 1e-12) + + ex, vx = lda_x(rho) + gex, gvx, vsigmax = pbe_x_temp(rho, sigma) + + ex += gex/rho + vx += gvx + vsigma = 0.5*vsigmax + + vsigma[np.isnan(vsigma)] = 0 + vx[np.isnan(vx)] = 0 + ex[np.isnan(ex)] = 0 + + return ex, vx, vsigma + +def pbe_x_temp(rho, sigma): + """""" + Intermediate computation for PBE exchange: enhancement factor, + exchange potential and derivative with respect to σ. + + Adapted from + ---------- + Eminus project: + https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_x_pbe.py + Licensed under the Apache License, Version 2.0. + + Reference + ---------- + J. P. Perdew, K. Burke, and M. Ernzerhof, + ""Generalized Gradient Approximation Made Simple"", + Phys. Rev. Lett. 77, 3865 (1996). + https://doi.org/10.1103/PhysRevLett.77.3865 + + Parameters + ---------- + rho : ndarray + Electron density array. + sigma : ndarray + Gradient of the electron density, defined as ∇ρ·∇ρ. + + Returns + ------- + gex : ndarray + Gradient correction to the exchange energy density. + gvx : ndarray + Correction to the exchange potential (derivative with respect to density). + vsigmax : ndarray + Derivative of the exchange energy with respect to σ. + """""" + + + mu = 0.2195149727645171 + kappa = 0.804 + + norm_dn = np.sqrt(sigma) + kf = (3 * np.pi**2 * rho)**(1 / 3) + # Handle divisions by zero + divkf = 1 / kf + # divkf = np.divide(1, kf, + # out=np.zeros_like(kf), where=(kf > 0)) + # Handle divisions by zero + s = norm_dn * divkf / (2 * rho) + # s = np.divide(norm_dn * divkf, 2 * rho, + # out=np.zeros_like(rho), where=(rho > 0)) + f1 = 1 + mu * s**2 / kappa + Fx = kappa - kappa / f1 + exunif = -3 * kf / (4 * np.pi) + # In Fx a '1 + ' is missing, since n * exunif is the Slater exchange that is added later + sx = exunif * Fx + + dsdn = -4 / 3 * s + dFxds = 2 * mu * s / f1**2 + dexunif = exunif / 3 + exunifdFx = exunif * dFxds + vx = sx + dexunif * Fx + exunifdFx * dsdn # dFx/dn = dFx/ds * ds/dn + + # Handle divisions by zero + vsigmax = exunifdFx * divkf / (2 * norm_dn) + # vsigmax = np.divide(exunifdFx * divkf, 2 * norm_dn, + # out=np.zeros_like(norm_dn), where=(norm_dn > 0)) + return sx * rho, np.array([vx]), vsigmax + +@fuse(kernel_name='pbe_x_temp_cupy') +def pbe_x_temp_cupy(rho, sigma): + """""" + CuPy-accelerated version of `pbe_x_temp`. Computes the enhancement factor, + exchange potential, and σ-derivative for the PBE exchange functional. + + Adapted from + ---------- + Eminus project: + https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_x_pbe.py + Licensed under the Apache License, Version 2.0. + + Reference + ---------- + J. P. Perdew, K. Burke, and M. Ernzerhof, + ""Generalized Gradient Approximation Made Simple"", + Phys. Rev. Lett. 77, 3865 (1996). + https://doi.org/10.1103/PhysRevLett.77.3865 + + Parameters + ---------- + rho : cp.ndarray + Electron density array (CuPy). + sigma : cp.ndarray + Gradient of the electron density, defined as ∇ρ·∇ρ (CuPy). + + Returns + ------- + gex : cp.ndarray + Gradient correction to the exchange energy density. + gvx : cp.ndarray + Correction to the exchange potential (derivative with respect to density). + vsigmax : cp.ndarray + Derivative of the exchange energy with respect to σ. + """""" + + + mu = 0.2195149727645171 + kappa = 0.804 + + norm_dn = cp.sqrt(sigma) + kf = (3 * cp.pi**2 * rho)**(1 / 3) + divkf = 1 / kf + s = norm_dn * divkf / (2 * rho) + f1 = 1 + mu * s**2 / kappa + Fx = kappa - kappa / f1 + exunif = -3 * kf / (4 * cp.pi) + # In Fx a '1 + ' is missing, since n * exunif is the Slater exchange that is added later + sx = exunif * Fx + + dsdn = -4 / 3 * s + dFxds = 2 * mu * s / f1**2 + dexunif = exunif / 3 + exunifdFx = exunif * dFxds + vx = sx + dexunif * Fx + exunifdFx * dsdn # dFx/dn = dFx/ds * ds/dn + + vsigmax = exunifdFx * divkf / (2 * norm_dn) + + return sx * rho, vx, vsigmax + +# @fuse(kernel_name='gga_x_pbe_cupy') +def gga_x_pbe_cupy(rho, sigma): + """""" + Compute the restricted PBE exchange energy density and potential + using CuPy for GPU acceleration. + + Adapted from + ---------- + Eminus project: + https://github.com/wangenau/eminus/blob/main/eminus/xc/gga_x_pbe.py + Licensed under the Apache License, Version 2.0. + + Reference + ---------- + J. P. Perdew, K. Burke, and M. Ernzerhof, + ""Generalized Gradient Approximation Made Simple"", + Phys. Rev. Lett. 77, 3865 (1996). + https://doi.org/10.1103/PhysRevLett.77.3865 + + Parameters + ---------- + rho : cp.ndarray + Electron density array (CuPy). + sigma : cp.ndarray + Gradient of the electron density, defined as ∇ρ·∇ρ (CuPy). + + Returns + ------- + ex : cp.ndarray + Exchange energy density. + vx : cp.ndarray + Functional derivative of the exchange energy with respect to density. + vsigma : cp.ndarray + Functional derivative of the exchange energy with respect to the density gradient term σ. + """""" + + mu = 0.2195149727645171 # Functional parameter + + # rho_cutoff = 1e-12 # define rho_cutoff constant + rho = cp.maximum(rho, 1e-12) + + ex, vx = lda_x(rho) + gex, gvx, vsigmax = pbe_x_temp_cupy(rho, sigma) + + ex += gex/rho + vx += gvx + vsigma = 0.5*vsigmax + + vsigma[cp.isnan(vsigma)] = 0 + vx[cp.isnan(vx)] = 0 + ex[cp.isnan(ex)] = 0 + + return ex, vx, vsigma","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/XC/gga_c_lyp.py",".py","4947","151","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numpy as np + + +def gga_c_lyp_e(rho, sigma): + # Corresponds to 106 id in Libxc + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # Return the values of the Lee-Yang-Parr energy density and potential + rho = np.maximum(rho, 1e-12) + # Constants + a = 0.04918 + b = 0.132 + c = 0.2533 + d = 0.349 + const = (3/10) * (3 * np.pi ** 2) ** (2/3) + fac = 2 ** (11/3) * const + + rho_13 = rho ** (1 / 3) + rho_m13 = 1 / rho_13 + rho1 = 1/2 * rho + gg = 1/4 * sigma + gamma_inv = 1 / (1 + d * rho_m13) + a_b_omega = a * b * np.exp(-c * rho_m13) * gamma_inv * rho_m13 ** 11 + delta = (c + d * gamma_inv) * rho_m13 + ec = - a * gamma_inv + 1/2 * a_b_omega * rho1 * gg * (6 + 14 * delta) * (1/9) - a_b_omega * fac * rho1 ** (11/3) + + return ec + + +def gga_c_lyp_v(rho, sigma): + # Corresponds to 106 id in Libxc + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # Return the derivatives of the LYP correlation functional. + rho = np.maximum(rho, 1e-12) + const = (3 / 10) * (3 * np.pi ** 2) ** (2 / 3) + two_13 = 2 ** (1 / 3) + two_m13 = 1 / two_13 + two_113 = 16 * two_m13 + two_m113 = 1 / two_113 + a = 0.04918 + b = 0.132 + c = 0.2533 + d = 0.349 + e = two_113 * const + ab9 = a * b / 9 + + rho1 = 0.5 * rho + aa = 1/4 * sigma + rho_13 = rho1 ** (1 / 3) + rho_m13 = 1 / rho_13 + rho_83 = rho1 ** 3 * rho_m13 + rho_m83 = 1 / rho_83 + p_third = two_m13 * rho_m13 + gamma_inv = 1 / (1 + d * p_third) + mu = d * gamma_inv * p_third + abw9_pa = two_m113 * ab9 * np.exp(-c * p_third) * rho_m83 * gamma_inv + delta = c * p_third + mu + vc = -a * gamma_inv * (1 + mu / 3) \ + + abw9_pa * aa * (7 / 3 * (mu ** 2 + delta ** 2) - 13 * delta - 5) \ + - abw9_pa * e * (3 * delta + 9) * rho_83 + fac = abw9_pa * rho1 * (6 + 14 * delta) + vsigma = 0.25*fac # Final (works) + + return vc, vsigma + +def gga_c_lyp(rho, sigma): + # Corresponds to 131 id in Libxc + ec = gga_c_lyp_e(rho, sigma) + vc, vsigma = gga_c_lyp_v(rho, sigma) + return ec, vc, vsigma + +@fuse(kernel_name='gga_c_lyp_e_cupy') +def gga_c_lyp_e_cupy(rho, sigma): + # Corresponds to 106 id in Libxc + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # Return the values of the Lee-Yang-Parr energy density and potential + # rho = cp.maximum(rho, 1e-12) + # Constants + a = 0.04918 + b = 0.132 + c = 0.2533 + d = 0.349 + const = (3/10) * (3 * cp.pi ** 2) ** (2/3) + fac = 2 ** (11/3) * const + + rho_13 = rho ** (1 / 3) + rho_m13 = 1 / rho_13 + rho1 = 1/2 * rho + gg = 1/4 * sigma + gamma_inv = 1 / (1 + d * rho_m13) + a_b_omega = a * b * cp.exp(-c * rho_m13) * gamma_inv * rho_m13 ** 11 + delta = (c + d * gamma_inv) * rho_m13 + ec = - a * gamma_inv + 1/2 * a_b_omega * rho1 * gg * (6 + 14 * delta) * (1/9) - a_b_omega * fac * rho1 ** (11/3) + + return ec + +@fuse(kernel_name='gga_c_lyp_v_cupy') +def gga_c_lyp_v_cupy(rho, sigma): + # Corresponds to 106 id in Libxc + # Adapted from https://github.com/dylan-jayatilaka/tonto/blob/master/foofiles/dft_functional.foo + # Return the derivatives of the LYP correlation functional. + # rho = cp.maximum(rho, 1e-12) + const = (3 / 10) * (3 * cp.pi ** 2) ** (2 / 3) + two_13 = 2 ** (1 / 3) + two_m13 = 1 / two_13 + two_113 = 16 * two_m13 + two_m113 = 1 / two_113 + a = 0.04918 + b = 0.132 + c = 0.2533 + d = 0.349 + e = two_113 * const + ab9 = a * b / 9 + + rho1 = 0.5 * rho + aa = 1/4 * sigma + rho_13 = rho1 ** (1 / 3) + rho_m13 = 1 / rho_13 + rho_83 = rho1 ** 3 * rho_m13 + rho_m83 = 1 / rho_83 + p_third = two_m13 * rho_m13 + gamma_inv = 1 / (1 + d * p_third) + mu = d * gamma_inv * p_third + abw9_pa = two_m113 * ab9 * cp.exp(-c * p_third) * rho_m83 * gamma_inv + delta = c * p_third + mu + vc = -a * gamma_inv * (1 + mu / 3) \ + + abw9_pa * aa * (7 / 3 * (mu ** 2 + delta ** 2) - 13 * delta - 5) \ + - abw9_pa * e * (3 * delta + 9) * rho_83 + fac = abw9_pa * rho1 * (6 + 14 * delta) + vsigma = 0.25*fac # Final (works) + + return vc, vsigma + +def gga_c_lyp_cupy(rho, sigma): + # Corresponds to 131 id in Libxc + ec = gga_c_lyp_e_cupy(rho, sigma) + vc, vsigma = gga_c_lyp_v_cupy(rho, sigma) + vsigma[cp.isnan(vsigma)] = 0 + vc[cp.isnan(vc)] = 0 + ec[cp.isnan(ec)] = 0 + return ec, vc, vsigma","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/print_scientist.py",".py","23194","456",""""""" +Scientist Profile Display Module + +This module provides functions to display scientist profiles with ASCII art banners, +portraits, and inspirational quotes in an aesthetically formatted terminal interface. + +Functions: + get_stylish_name(name): Returns ASCII art banner for scientist name + print_aesthetic_quote(quote, author): Prints formatted quote in decorative box + display_scientist_profile(name): Displays complete scientist profile + get_random_scientist(): Returns randomly selected scientist name + main(): Main execution function + +Examples: + >>> display_scientist_profile(""bohr"") + # Displays Bohr's banner, portrait, and quote + + >>> scientist = get_random_scientist() + >>> display_scientist_profile(scientist) + # Displays random scientist profile +"""""" + +import random +import os +import time + + +def get_stylish_name(name): + """""" + Return ASCII art banner for a scientist's name. + + Provides pre-generated ASCII art banners for supported scientist names. + If the name is not found in the banner dictionary, returns the name in uppercase. + + Args: + name (str): Lowercase scientist name (e.g., 'dalton', 'bohr', 'rutherford') + + Returns: + str: Multi-line ASCII art string representing the name, or uppercase name if not found + + Examples: + >>> banner = get_stylish_name('bohr') + >>> print(banner) + ____ _ + | __ ) ___| |__ _ __ + | _ \ / _ \ '_ \| '__| + | |_) | (_) | | | | | + |____/ \___/|_| |_|_| + + >>> banner = get_stylish_name('unknown') + >>> print(banner) + UNKNOWN + + Note: + Supported scientists: dalton, bohr, rutherford, dirac, schrodinger + """""" + banners = { + ""dalton"": "" ____ _ _ \n| _ \ __ _| | |_ ___ _ __ \n| | | |/ _` | | __/ _ \| '_ \ \n| |_| | (_| | | || (_) | | | |\n|____/ \__,_|_|\__\___/|_| |_|"", + ""bohr"": "" ____ _ \n| __ ) ___| |__ _ __ \n| _ \ / _ \ '_ \| '__|\n| |_) | (_) | | | | | \n|____/ \___/|_| |_|_| "", + ""rutherford"": "" ____ _ _ __ _ \n| _ \ _ _| |_| |__ ___ _ __ / _| ___ _ __ __| |\n| |_) | | | | __| '_ \ / _ \ '__| |_ / _ \| '__/ _` |\n| _ <| |_| | |_| | | | __/ | | _| (_) | | | (_| |\n|_| \_\\\\__,_|\__|_| |_|\___|_| |_| \___/|_| \__,_|"", + ""dirac"": "" ____ _ \n| _ \(_)_ __ __ _ ___ \n| | | | | '__/ _` |/ __| \n| |_| | | | | (_| | (__ \n|____/|_|_| \__,_|\___| "", + ""schrodinger"": "" ____ _ _ _ \n / ___| ___| |__ _ __ ___ __| (_)_ __ __ _ ___ _ __ \n \___ \ / __| '_ \| '__/ _ \ / _` | | '_ \ / _` |/ _ \ '__|\n ___) | (__| | | | | | (_) | (_| | | | | | (_| | __/ | \n |____/ \___|_| |_|_| \___/ \__,_|_|_| |_|\__, |\___|_| \n |___/ "", + } + return banners.get(name, name.upper()) + + +def print_aesthetic_quote(quote, author): + """""" + Print a quote in a decorative boxed format with centered text. + + Creates a visually appealing bordered box using Unicode box-drawing characters + and centers the quote text within it. The quote is word-wrapped to fit within + a fixed width of 60 characters. + + Args: + quote (str): The quote text to display + author (str): The name of the quote's author + + Returns: + None: Prints directly to stdout + + Examples: + >>> print_aesthetic_quote(""Science is beautiful."", ""Einstein"") + + ╔════════════════════════════════════════════════════════════╗ + ║ Science is beautiful. ║ + ╠════════════════════════════════════════════════════════════╣ + ║ ~ Einstein ║ + ╚════════════════════════════════════════════════════════════╝ + + Note: + - Box width is fixed at 60 characters + - Long quotes are automatically word-wrapped + - Author name is right-aligned at the bottom + """""" + width = 70 + horizontal_line = ""═"" * width + + print(f""\n ╔{horizontal_line}╗"") + + # Wrap text simply for display + words = quote.split() + line = """" + for word in words: + if len(line) + len(word) + 1 > width - 4: + print(f"" ║ {line.center(width - 4)} ║"") + line = word + else: + line = f""{line} {word}"" if line else word + if line: + print(f"" ║ {line.center(width - 4)} ║"") + + print(f"" ╠{horizontal_line}╣"") + print(f"" ║ {f'~ {author}'.rjust(width - 4)} ║"") + print(f"" ╚{horizontal_line}╝\n"") + + +def display_scientist_profile(name): + """""" + Display complete scientist profile with banner, portrait, and quote. + + Orchestrates the display of a scientist's profile by: + 1. Printing a stylish ASCII art name banner + 2. Reading and displaying ASCII portrait from file (ascii_{name}.txt) + 3. Printing an inspirational quote in decorative format + + Args: + name (str): Lowercase scientist name (e.g., 'dalton', 'bohr', 'rutherford') + + Returns: + None: Prints directly to stdout + + Examples: + >>> display_scientist_profile('bohr') + ================================================================ + ____ _ + | __ ) ___| |__ _ __ + | _ \ / _ \ '_ \| '__| + | |_) | (_) | | | | | + |____/ \___/|_| |_|_| + ================================================================ + + [ASCII portrait from ascii_bohr.txt] + + ╔════════════════════════════════════════════════════════════╗ + ║ An expert is a person who has made all the mistakes... ║ + ╠════════════════════════════════════════════════════════════╣ + ║ ~ bohr ║ + ╚════════════════════════════════════════════════════════════╝ + + Note: + - Requires ASCII portrait file named 'ascii_{name}.txt' in current directory + - If portrait file not found, displays error message + - Supported scientists: dalton, bohr, rutherford, dirac, schrodinger + + Raises: + FileNotFoundError: Caught internally and displays error message if portrait file missing + """""" + # Data definition + data = { + ""dalton"": ""If I have succeeded better than many who surround me, it has been chiefly - nay, I may say, almost solely - by universal assiduity."", + ""bohr"": ""An expert is a person who has made all the mistakes that can be made in a very narrow field."", + ""rutherford"": ""All science is either physics or stamp collecting."", + ""dirac"": ""God used beautiful mathematics in creating the world."", + ""schrodinger"": ""The task is not so much to see what no one has yet seen, but to think what nobody has yet thought about that which everybody sees."" + } + + # Print Stylish Name + print(""\n"" + ""=""*70) + print(get_stylish_name(name)) + print(""=""*70 + ""\n"") + portrait = ASCII_ART[name] + # Indent the portrait slightly for looks + print(""\n"".join(["" "" + line for line in portrait.split('\n')])) + + # Print Quote + quote = data.get(name, ""Science is beautiful."") + print_aesthetic_quote(quote, name) + + +def get_random_scientist(): + """""" + Return a randomly selected scientist name from predefined list. + + Selects and returns one scientist name from a weighted list where + some scientists may appear multiple times to increase selection probability. + + Returns: + str: Lowercase scientist name (e.g., 'dalton', 'bohr', 'rutherford') + + Examples: + >>> scientist = get_random_scientist() + >>> print(scientist) + bohr + + >>> scientist = get_random_scientist() + >>> print(scientist) + dalton + + Note: + - List includes: dalton (appears twice), bohr, rutherford, dirac, schrodinger + - Each call returns a new random selection + - Uses random.choice() for uniform distribution among list items + """""" + names_list = [""dalton"", ""bohr"", ""rutherford"", ""dirac"", ""dalton"", ""schrodinger""] + return random.choice(names_list) + +def print_scientist(): + """""" + Main execution function for scientist profile display. + + 1. Randomly selects a scientist from the predefined list + 2. Calls display_scientist_profile() to show complete profile + + Returns: + None: Prints directly to stdout + + Examples: + >>> print_scientist() + Randomly selected: bohr... + [1 second pause] + [Displays complete Bohr profile with banner, portrait, and quote] + + Note: + - Includes 1-second delay for suspense effect + - Can be called directly as entry point for the module + """""" + print(""\n\n Time to get inspired by a great quantum chemist :)\n"") + selected_name = get_random_scientist() + display_scientist_profile(selected_name) + + + +ASCII_ART = { + 'dalton': ''' +...................................................................... +............... .,,,,,,... ........... +........ . ...... ..,,. ...... +...... .,,.. ...... ... +.... . ... .... .. .. .... +. .... ,. .,,,,. ,.., , ., + . ..,. . , + .,. .,,,. .. .,. + ,. ,. ,,: + ,. .. .,, + ,. ,. + . .. . , .. .. ,. + , ... .:;+;,. :-;,.,..:. + ,;-;,.. .,,;;:,:,...,-;,;:,,;,, + .....::;;;-;.;; ,,.. :. .-. :..,+:, + :.,.,., ., .:, ., ::. :, , + .. , .,.... ..... .. + ., ..,. ., .,: + .. ,,, :, .,.. + , . . . .,,::,. :;. + ,, .. .,. .. + .,,, .........,.. ., + . ..... .... .;:.. + ., :.,,,. . .:;:,;, + . , . ,. ..::;:,::, + : : : ... . . .,,:;:;:,,.,. + . , . .. .,,:;;:,,::::. .. + , : ,.. ...,,::,:,,,:,:::. , + ,. , ,, ,..,,. . . ,,:::. ..... + ..., ,. . ... .,,,,,,. , ..... + ....: ,,. .,. ,.,.,.. .. . + .,... , ,.. ,.. .. , ,, , + . , ., .. , ,, , ,. , + , , , .. , .. ., , + , ,. , ,. ., + .. , .. . .. +.. ., ,. .: +.... . . . + +''', + + 'dirac': ''' + ..,.,,.,,,,,,...... ,- + ..,,::::::,,,,,::;:,,,:, ,- + .,:::::,,,....,,,,::,.,::,. ,- + ,:;::,:;:,::,,,,,,,,,..,:-:;; .- + .,:;::;:,,,::;:,,,;,,:,..,:;;::; .+ + :,:::::;---::;-+::::+::;..,:--::;, .% +,::::::::;;,,...;-;:;;+;:..;::.,--:.. .? +,:::::::,. .,,::::,..,. .;;, .,* +:::::;;, :+, ,+ +::::-; ,-,:* +;;:;-. :--? +;;:;: ;+? +::--, .+* +;-+:. -? +:;:, ;* +:;::,. -* +;;;;;, .,;;:-;:,. .,,, ;* +::::; .. .:-??*?;. .;+**;,, ,* +--;;- .:-+++--;;, ,-**+;;: .;* +.,;:-. .,,;??;,;,,. .++;*%*:;..:+ +. ,;;. .. ... ,,.,,. ,,+ +:; .. .... ,,- +.. , ,,- + . ,.- + . . ..- +. .,:-;:,:::. ...+ +.,;:, ,::,,;-;. , ,+ + .:.: .,,,;-;-++--::. , ,- +,.: , :;:,,::,,,,,,:: ,. ,- +. , ., ,:::::::::,,,. , ,- + .:, ,:. ..,,,,. ,. ,- + ,.. .:,. ,;;;;, .. ,- + : , ,,,. ,. ,- + ,. . ...... ,.... ,- + ., ,. ....::,. . .,. ..,:- + ., . .......,:::::,::::, ,- + , .. ..........:,, ,+ + +''', + + 'schrodinger': ''' + :-----;. + ::::;;;;;;;;;;;;;;;;;:::;, + .,;;;;:::;;:,,,,,,,,,,::;;:,.. + .-------;;;;;;,.,,.,;,..,;;;;;;;;;;; + ,:;;;;;;;;;;:::::,... :..,:::::::::..;; + :----;---;;:,,,,,,.. ,...,,,,,:--;..::. + .;-------+, .;+--;--; + ;;;;;;;: . ,;:::::, + ;-;;;;:: .. ,-;;;;;. + ;-----:.. . . ,;---. + .:;;;;:,,.. .:;;, + :;-----;;, .;+-. + :------;::; ;;;; + :;;;;;:,,,. .:::. + ;+-+-;;;;:.,:::-:,,. ,-;;:,. .--:. + ..;--+-,...--:;-:. .;,:: .;;:;-:. .: .:,. + ,;,:-;,,;+*-,.,;. ..+*-,.+-...;, ;+-:. .. + -; .+: . .,;. .+; .; ;,. ;... + ...;;. ,,. ., ,:,,, ., .,. . + ..:+ ,::. ..,,,,..:, ..,,.. . + ....,:::, .. ,. . + . ,:,,... :.... + ..,;;:::. .,;*-, . ..,. + .,,,, . . .. . + .,,,: ... ,..,,. . .. + -;;;;. ;;;:,,,,...... ,. + .,;...,.. .. . + .:;- ;;,,. . + ,;:::; .-;::::. , , + .,...,,,,, ,;-;:,,... . . + .;;;;;;;;;;;,. .:+++-,.,,.... . . . , + ,,,:,::.,,,,::,,:,,. .;:;;:.... . . + .. .,:;;:,:,,;;;;;::::., .::;. .. .. + , ,-;;;;;;;, ,;-:., . + . ..,,... ....+-,,,,...::,,,,,,.,. + ., , .:;;+%;;--;;;;;---;;;::, + , .:;;?;;:;;:;:;-+;;;:;, + .. ,;::-:,,,,,,::;;;::,. + ,,. ,;::. . ... + +''', + + 'bohr': ''' + + ., ...... + ..,,..,., ,,.,.,,,,.. + ,:,. ..., ,. ,.,., .,:,,... + .,,. ., .,,,..,,,..,.,,: + .,,,..,... .. .. .. ....,,,....,. + .,,....,,. . ..,,,,,,,,. + ::, .. .,.,,:, + ;,,..... .,,,:, + :,,:,. ,,::: + :::,, .:,::. + ;,,. . ,,:;; + ,..,,. ..::::, + ..,.. ... ..,:::. + ,....... . .. ..::, + . .,,:. .,...,:;;::, .;+::::::,:,. + .....,. . .,:;::,... .-:-+++;,..:;,, + ..:...:, .:::;:.:. .-;:::,,;,..::,. + ,,, . ,, . . . ,, ...:.,. + .,. , . .: . .,,, + ,. , .. .:: + .. , .,,, + , . ,;: ::. + , . .;:.,:-;, .., + ... ..,,. ., + . . .., + , ..,,,,,:;::,. .,, + .,. .:,,,..,,..,,,. ., + .... ...,... .,. + ., .. .. .,,,,....., + .,. , , .,, + ... .. . ..::.. + ... ,. .....,;:., ..,... + . . , .,,,..,;;. ., .. . + . .. .:::. ., .. + , ;:,. ., . + ,. .. .:, ., + .. ., ,: .., + , ,....,,., .. + ,. ., .: ., + . . . + +''', + + 'rutherford': ''' + + ........ + .... . .,.,,,.. + .. ....,,:,,,::,::, + ., ....,:::,..,::,::::::, + ., ..... .,:::;:;;.. + :..... .......,:, + :,... ..::::: + ... .... :::;, + .. ... .:::: + .. ... ..;:; + . . .... ..,:;. + . ,. ..., ...,:. + ,.;-;--:. :--+--;-;:....:, ....: + ,,.,;++-: ,**+++;,,,,....,, ....-. + . -++:.,. .,;:;,:;,;:,. ..: .,:,:, + . . ... . ..:.,,:.:;. + .. .. ...,,: ,:. + . .. .....,-, ., + . . . , .....,:,.,. + . ,,,;-;.: ..... .,. + , ..::,,;++;. ....;.., + .. ,.,.;,,.:-;:,. ....,+,. + : ..,:;;:,,:;;-;;+; ....:-. + ..,+**-,,::;--+++++, ....::;. + ,.,:. ........... ...::.;;, + . .,,,. ...;,.,:,.. + ., ..,;,.., , .,. + .. .,,::.,:, , .,.. + .,, ..,,:;;:,,,::, .. ,...... + ..,. .,.::;;;;;:,,,,::, , .. ..... + .... .. , ... .,,::, , , + ..... .. ,. .,.:,. .: .. + ... . .,.. .:: .,,, , + .. .. -;.... , ,,.,: . + :;:...,.....,;:,: .. + . ,. ... .;, .. .,. + . ., , ,-. , .. + . ... , ,;, , . + .., ,..:; . , + .. , :. , , + + + :;--+-:;;, ;-;;;;+;--;;---; + ....... ... . .... .... + + +''', + +}","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/__init__.py",".py","617","13","from .system_information import print_sys_info +from .system_information import get_cpu_model +from .print_logo import print_pyfock_logo +from .write_density_cube import write_density_cube +from .write_orbital_cube import write_orbital_cube +from .print_scientist import print_scientist, display_scientist_profile, get_stylish_name, get_random_scientist, print_aesthetic_quote + + +__all__ = ['print_sys_info', 'get_cpu_model', 'print_pyfock_logo', 'write_density_cube', 'write_orbital_cube', 'print_scientist', 'display_scientist_profile', 'get_stylish_name', 'get_random_scientist', 'print_aesthetic_quote'] + + + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/Cube.py",".py","3533","102","import numpy as np +import numba + +def generate_cube_coords(mol, nx=100, ny=100, nz=100, padding=5.0): + """""" + Generate coordinates for a cube file centered at molecule's COM. + + Parameters: + ----------- + mol : molecule object + Molecule with get_center_of_charge() method and atomic coordinates + nx, ny, nz : int + Number of grid points in each direction + padding : float + Extra space around molecule in Bohr + + Returns: + -------- + coords : ndarray, shape (nx*ny*nz, 3) + Grid coordinates in Bohr + origin : ndarray, shape (3,) + Origin of the cube + spacing : ndarray, shape (3,) + Grid spacing in each direction + """""" + COM = mol.get_center_of_charge(units='bohrs') # Center of Charge in Bohrs + + # Get molecular extents + atom_coords = mol.coordsBohrs # Atomic coordinates in Bohrs + min_coords = np.min(atom_coords, axis=0) + max_coords = np.max(atom_coords, axis=0) + + # Calculate cube dimensions with padding + extents = max_coords - min_coords + 2 * padding + + # Grid spacing + spacing = extents / np.array([nx-1, ny-1, nz-1]) + + # Origin such that COM is at center + origin = COM - extents / 2.0 + + # Generate grid coordinates + x = np.linspace(origin[0], origin[0] + extents[0], nx) + y = np.linspace(origin[1], origin[1] + extents[1], ny) + z = np.linspace(origin[2], origin[2] + extents[2], nz) + + # Create meshgrid and flatten + X, Y, Z = np.meshgrid(x, y, z, indexing='ij') + coords = np.column_stack([X.ravel(), Y.ravel(), Z.ravel()]) + + return coords, origin, spacing + + +def write_cube_file(filename, mol, density_values, origin, spacing, nx, ny, nz): + """""" + Write a cube file with density values. + + Parameters: + ----------- + filename : str + Output cube file name + mol : molecule object + Molecule with atomic information + density_values : ndarray, shape (nx*ny*nz,) + Density values at grid points + origin : ndarray, shape (3,) + Origin coordinates + spacing : ndarray, shape (3,) + Grid spacing + nx, ny, nz : int + Number of grid points in each direction + """""" + atoms = mol.atomicSpecies # Assuming returns list of atoms + coords = mol.coordsBohrs # Atomic coordinates in Angstroms + + with open(filename, 'w') as f: + # Header lines + f.write(""Cube file\n"") + f.write(""Generated by PyFock\n"") + + # Number of atoms and origin + f.write(f""{mol.natoms:5d} {origin[0]:12.6f} {origin[1]:12.6f} {origin[2]:12.6f}\n"") + + # Grid dimensions and spacing + f.write(f""{nx:5d} {spacing[0]:12.6f} {0.0:12.6f} {0.0:12.6f}\n"") + f.write(f""{ny:5d} {0.0:12.6f} {spacing[1]:12.6f} {0.0:12.6f}\n"") + f.write(f""{nz:5d} {0.0:12.6f} {0.0:12.6f} {spacing[2]:12.6f}\n"") + + # Atomic information + for i in range(mol.natoms): + atomic_num = mol.Zcharges[i] # Assuming atom object has this + charge = float(atomic_num) # Nuclear charge + f.write(f""{atomic_num:5d} {charge:12.6f} {coords[i,0]:12.6f} {coords[i,1]:12.6f} {coords[i,2]:12.6f}\n"") + + # Density values + density_3d = density_values.reshape(nx, ny, nz) + for i in range(nx): + for j in range(ny): + for k in range(0, nz, 6): # 6 values per line + line_vals = density_3d[i, j, k:k+6] + f.write("""".join(f""{val:13.5E}"" for val in line_vals) + ""\n"") +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/print_logo.py",".py","3481","73","import pyfock +def print_pyfock_logo(): + """"""Print PyFock logo with gradient colors using ANSI escape codes."""""" + + # ANSI color codes for gradient (blue to purple to pink) + colors = [ + '\033[38;5;39m', # Bright blue + '\033[38;5;45m', # Cyan blue + '\033[38;5;51m', # Light cyan + '\033[38;5;87m', # Light blue + '\033[38;5;123m', # Light purple + '\033[38;5;159m', # Very light blue + '\033[38;5;195m', # Light cyan-white + '\033[38;5;225m', # Light pink + '\033[38;5;219m', # Pink + '\033[38;5;213m', # Magenta pink + ] + + reset = '\033[0m' # Reset color + + # ASCII art for PyFock + + logo_lines = [ + ""██████ ██ ██ ███████ ██████ ██████ ██ ██"", + ""██░░░██ ░██ ██░ ██░░░░░ ██░░░░██ ██░░░░░ ██ ██░ "", + ""██████ ░████░ █████ ██ ██ ██ █████░ "", + ""██░░░░ ░██░ ██░░░ ██ ██ ██ ██░░██ "", + ""██ ██ ██ ░██████░ ░██████ ██ ░██"", + ""░░ ░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░"" + ] + + # Alternative block-style logo + block_logo = [ + ""████████ ██ ██ ███████ ████████ ████████ ██ ██"", + ""██ ██ ██ ██ ██ ██ ██ ██ ██ ██ "", + ""████████ ████ ██████ ██ ██ ██ █��███ "", + ""██ ██ ██ ██ ██ ██ ██ ██ "", + ""██ ██ ██ ████████ ████████ ██ ██"" + ] + + print(""\n"" + ""=""*70) + print(""PyFock Python Program for Quantum Chemistry Simulations"") + print("" by Manas Sharma"") + print(""=""*70) + + # Print the logo with gradient colors + for line in logo_lines: + colored_line = """" + chars_per_color = len(line) // len(colors) + + for i, char in enumerate(line): + if char == ' ': + colored_line += char + else: + color_index = min(i // max(1, chars_per_color), len(colors) - 1) + colored_line += colors[color_index] + char + reset + + print(colored_line) + + print(""\n"" + ""=""*70) + print(""\nVersion: "", pyfock.__version__) + print(""Citation: M. Sharma, PyFock: A Pure Python Gaussian Basis\nDFT Code for CPU and GPU"") + print(""\n"" + ""=""*70) + print(""\n📧 Contact Information:"") + print("" Developer: Dr. Manas Sharma (PhD Physics)"") + print("" Email: manassharma07@live.com"") + print("" Website: https://manas.bragitoff.com/"") + print(""\n📚 Resources:"") + print("" Documentation: https://pyfock-docs.bragitoff.com"") + print("" Official Website: https://pyfock.bragitoff.com/"") + print("" GitHub Repo: https://github.com/manassharma07/pyfock"") + print("" Web GUI: https://pyfock-gui.bragitoff.com/"") + print(""\n"" + ""=""*70 + ""\n"")","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/system_information.py",".py","3479","108","import platform +import psutil +import subprocess +import sys + + +def get_cpu_model(): + """""" + Return CPU model information in a cross-platform manner. + + Retrieves the CPU model string using platform-specific methods: + - Windows: Uses platform.processor() + - macOS: Executes sysctl command to get brand string + - Linux: Reads from /proc/cpuinfo + - Other: Returns ""Unknown CPU"" + + Returns: + str: The CPU model name/description, or an error message if retrieval fails. + + Examples: + >>> cpu_model = get_cpu_model() + >>> print(cpu_model) + Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz + + Note: + On some systems, CPU model information may not be available or + may require elevated privileges to access. + + Raises: + No exceptions are raised directly, but any underlying system errors + are caught and returned as descriptive error messages. + """""" + system = platform.system() + + try: + if system == ""Windows"": + return platform.processor() + elif system == ""Darwin"": # macOS + command = [""sysctl"", ""-n"", ""machdep.cpu.brand_string""] + return subprocess.check_output(command).strip().decode() + elif system == ""Linux"": + with open(""/proc/cpuinfo"", ""r"") as f: + for line in f: + if ""model name"" in line: + return line.split("":"")[1].strip() + else: + return ""Unknown CPU"" + except Exception as e: + return f""Error getting CPU model: {e}"" + + +def print_sys_info(): + """""" + Print comprehensive system information to stdout. + + Displays detailed system specifications including: + - Operating system name and version + - System architecture (32-bit/64-bit) + - CPU model and specifications + - Number of physical CPU cores + - Number of logical CPU threads + - Total system memory in gigabytes + + The information is formatted in a human-readable format with + labeled key-value pairs. + + Returns: + None: This function only prints to stdout and returns nothing. + + Examples: + >>> from pyfock import Utils + >>> Utils.print_sys_info() + Operating System: Linux 5.15.0 + System Type: 64bit + CPU Model: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz + Number of Cores: 6 + Number of Threads: 12 + Memory (GB): 15.54 + + Note: + Some information may show as ""Unavailable"" if the system + doesn't provide access to certain hardware details. + + Dependencies: + Requires psutil, platform modules and the get_cpu_model() function. + """""" + print(""\n============= System Information ============="") + # Get system specifications + system_info = platform.uname() + os = f""{system_info.system} {system_info.release}"" + system_type = platform.architecture()[0] + num_cores = psutil.cpu_count(logical=False) or ""Unavailable"" + num_threads = psutil.cpu_count(logical=True) or ""Unavailable"" + memory = round(psutil.virtual_memory().total / (1024 ** 3), 2) # in GB + cpu_model = get_cpu_model() + + # Print system specifications + print('Operating System:', os) + print('System Type:', system_type) + print('CPU Model:', cpu_model) + print('Number of Cores:', num_cores) + print('Number of Threads:', num_threads) + print('Memory (GB):', memory) + + +if __name__ == ""__main__"": + print_sys_info() +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/write_density_cube.py",".py","1354","29","import numba +import numpy as np +from opt_einsum import contract +from pyfock import Integrals +from .Cube import generate_cube_coords, write_cube_file +import os + +def write_density_cube(mol, basis, dmat, cube_file, nx=100, ny=100, nz=100, ncores=1): + """"""Write the electron density of a molecule as a cube file."""""" + numba.set_num_threads(ncores) + os.environ['OMP_NUM_THREADS'] = str(ncores) + os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 + os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 + os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 + os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 + + + # Generate a grid of coordinates for the cube file + coords, origin, spacing = generate_cube_coords(mol, nx=nx, ny=ny, nz=nz, padding=5.0) # shape: (ncoord, 3) + # Calculate ao and density values at these coordinates + bf_values = Integrals.bf_val_helpers.eval_bfs(basis, coords, parallel=True, non_zero_indices=None) # shape: (ncoord, nao) + dens_values = Integrals.bf_val_helpers.eval_rho(bf_values, dmat) # shape: (ncoord, 1) + # dens_values = contract('mj,mj->m', bf_values @ dmat, bf_values) + + # Write the cube file + write_cube_file(cube_file, mol, dens_values, origin, spacing, nx, ny, nz) + + + ","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/ascii_data.py",".py","13354","226","# Auto-generated file. Do not edit manually. + +ASCII_ART = { + 'dalton': ''' +...................................................................... +............... .,,,,,,... ........... +........ . ...... ..,,. ...... +...... .,,.. ...... ... +.... . ... .... .. .. .... +. .... ,. .,,,,. ,.., , ., + . ..,. . , + .,. .,,,. .. .,. + ,. ,. ,,: + ,. .. .,, + ,. ,. + . .. . , .. .. ,. + , ... .:;+;,. :-;,.,..:. + ,;-;,.. .,,;;:,:,...,-;,;:,,;,, + .....::;;;-;.;; ,,.. :. .-. :..,+:, + :.,.,., ., .:, ., ::. :, , + .. , .,.... ..... .. + ., ..,. ., .,: + .. ,,, :, .,.. + , . . . .,,::,. :;. + ,, .. .,. .. + .,,, .........,.. ., + . ..... .... .;:.. + ., :.,,,. . .:;:,;, + . , . ,. ..::;:,::, + : : : ... . . .,,:;:;:,,.,. + . , . .. .,,:;;:,,::::. .. + , : ,.. ...,,::,:,,,:,:::. , + ,. , ,, ,..,,. . . ,,:::. ..... + ..., ,. . ... .,,,,,,. , ..... + ....: ,,. .,. ,.,.,.. .. . + .,... , ,.. ,.. .. , ,, , + . , ., .. , ,, , ,. , + , , , .. , .. ., , + , ,. , ,. ., + .. , .. . .. +.. ., ,. .: +.... . . . + +''', + + 'dirac': ''' + ..,.,,.,,,,,,...... ,- + ..,,::::::,,,,,::;:,,,:, ,- + .,:::::,,,....,,,,::,.,::,. ,- + ,:;::,:;:,::,,,,,,,,,..,:-:;; .- + .,:;::;:,,,::;:,,,;,,:,..,:;;::; .+ + :,:::::;---::;-+::::+::;..,:--::;, .% +,::::::::;;,,...;-;:;;+;:..;::.,--:.. .? +,:::::::,. .,,::::,..,. .;;, .,* +:::::;;, :+, ,+ +::::-; ,-,:* +;;:;-. :--? +;;:;: ;+? +::--, .+* +;-+:. -? +:;:, ;* +:;::,. -* +;;;;;, .,;;:-;:,. .,,, ;* +::::; .. .:-??*?;. .;+**;,, ,* +--;;- .:-+++--;;, ,-**+;;: .;* +.,;:-. .,,;??;,;,,. .++;*%*:;..:+ +. ,;;. .. ... ,,.,,. ,,+ +:; .. .... ,,- +.. , ,,- + . ,.- + . . ..- +. .,:-;:,:::. ...+ +.,;:, ,::,,;-;. , ,+ + .:.: .,,,;-;-++--::. , ,- +,.: , :;:,,::,,,,,,:: ,. ,- +. , ., ,:::::::::,,,. , ,- + .:, ,:. ..,,,,. ,. ,- + ,.. .:,. ,;;;;, .. ,- + : , ,,,. ,. ,- + ,. . ...... ,.... ,- + ., ,. ....::,. . .,. ..,:- + ., . .......,:::::,::::, ,- + , .. ..........:,, ,+ + +''', + + 'schrodinger': ''' + :-----;. + ::::;;;;;;;;;;;;;;;;;:::;, + .,;;;;:::;;:,,,,,,,,,,::;;:,.. + .-------;;;;;;,.,,.,;,..,;;;;;;;;;;; + ,:;;;;;;;;;;:::::,... :..,:::::::::..;; + :----;---;;:,,,,,,.. ,...,,,,,:--;..::. + .;-------+, .;+--;--; + ;;;;;;;: . ,;:::::, + ;-;;;;:: .. ,-;;;;;. + ;-----:.. . . ,;---. + .:;;;;:,,.. .:;;, + :;-----;;, .;+-. + :------;::; ;;;; + :;;;;;:,,,. .:::. + ;+-+-;;;;:.,:::-:,,. ,-;;:,. .--:. + ..;--+-,...--:;-:. .;,:: .;;:;-:. .: .:,. + ,;,:-;,,;+*-,.,;. ..+*-,.+-...;, ;+-:. .. + -; .+: . .,;. .+; .; ;,. ;... + ...;;. ,,. ., ,:,,, ., .,. . + ..:+ ,::. ..,,,,..:, ..,,.. . + ....,:::, .. ,. . + . ,:,,... :.... + ..,;;:::. .,;*-, . ..,. + .,,,, . . .. . + .,,,: ... ,..,,. . .. + -;;;;. ;;;:,,,,...... ,. + .,;...,.. .. . + .:;- ;;,,. . + ,;:::; .-;::::. , , + .,...,,,,, ,;-;:,,... . . + .;;;;;;;;;;;,. .:+++-,.,,.... . . . , + ,,,:,::.,,,,::,,:,,. .;:;;:.... . . + .. .,:;;:,:,,;;;;;::::., .::;. .. .. + , ,-;;;;;;;, ,;-:., . + . ..,,... ....+-,,,,...::,,,,,,.,. + ., , .:;;+%;;--;;;;;---;;;::, + , .:;;?;;:;;:;:;-+;;;:;, + .. ,;::-:,,,,,,::;;;::,. + ,,. ,;::. . ... + +''', + + 'bohr': ''' + + ., ...... + ..,,..,., ,,.,.,,,,.. + ,:,. ..., ,. ,.,., .,:,,... + .,,. ., .,,,..,,,..,.,,: + .,,,..,... .. .. .. ....,,,....,. + .,,....,,. . ..,,,,,,,,. + ::, .. .,.,,:, + ;,,..... .,,,:, + :,,:,. ,,::: + :::,, .:,::. + ;,,. . ,,:;; + ,..,,. ..::::, + ..,.. ... ..,:::. + ,....... . .. ..::, + . .,,:. .,...,:;;::, .;+::::::,:,. + .....,. . .,:;::,... .-:-+++;,..:;,, + ..:...:, .:::;:.:. .-;:::,,;,..::,. + ,,, . ,, . . . ,, ...:.,. + .,. , . .: . .,,, + ,. , .. .:: + .. , .,,, + , . ,;: ::. + , . .;:.,:-;, .., + ... ..,,. ., + . . .., + , ..,,,,,:;::,. .,, + .,. .:,,,..,,..,,,. ., + .... ...,... .,. + ., .. .. .,,,,....., + .,. , , .,, + ... .. . ..::.. + ... ,. .....,;:., ..,... + . . , .,,,..,;;. ., .. . + . .. .:::. ., .. + , ;:,. ., . + ,. .. .:, ., + .. ., ,: .., + , ,....,,., .. + ,. ., .: ., + . . . + +''', + + 'rutherford': ''' + + ........ + .... . .,.,,,.. + .. ....,,:,,,::,::, + ., ....,:::,..,::,::::::, + ., ..... .,:::;:;;.. + :..... .......,:, + :,... ..::::: + ... .... :::;, + .. ... .:::: + .. ... ..;:; + . . .... ..,:;. + . ,. ..., ...,:. + ,.;-;--:. :--+--;-;:....:, ....: + ,,.,;++-: ,**+++;,,,,....,, ....-. + . -++:.,. .,;:;,:;,;:,. ..: .,:,:, + . . ... . ..:.,,:.:;. + .. .. ...,,: ,:. + . .. .....,-, ., + . . . , .....,:,.,. + . ,,,;-;.: ..... .,. + , ..::,,;++;. ....;.., + .. ,.,.;,,.:-;:,. ....,+,. + : ..,:;;:,,:;;-;;+; ....:-. + ..,+**-,,::;--+++++, ....::;. + ,.,:. ........... ...::.;;, + . .,,,. ...;,.,:,.. + ., ..,;,.., , .,. + .. .,,::.,:, , .,.. + .,, ..,,:;;:,,,::, .. ,...... + ..,. .,.::;;;;;:,,,,::, , .. ..... + .... .. , ... .,,::, , , + ..... .. ,. .,.:,. .: .. + ... . .,.. .:: .,,, , + .. .. -;.... , ,,.,: . + :;:...,.....,;:,: .. + . ,. ... .;, .. .,. + . ., , ,-. , .. + . ... , ,;, , . + .., ,..:; . , + .. , :. , , + + + :;--+-:;;, ;-;;;;+;--;;---; + ....... ... . .... .... + + +''', + +} +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/rotate.py",".py","481","16","# A Python script to rotate a molecule about an axis by theta degrees +import numpy as np + +def rotate2D(mol_in, theta, mol_out): + # Rotates a molecules in the xy plane by theta degrees + mol_out = mol_in + for i in range(natoms): + x = mol_in.coords[i][0] + y = mol_in.coords[i][1] + # Rotate + x1 = x*np.cos(theta) - y*np.sin(theta) + y1 = x*np.sin(theta) + y*np.cos(theta) + mol_out.coords[i][0] = x1 + mol_out.coords[i][1] = y1 + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/write_orbital_cube.py",".py","1304","30","import numba +import numpy as np +from opt_einsum import contract +from pyfock import Integrals +from .Cube import generate_cube_coords, write_cube_file +import os + +def write_orbital_cube(mol, basis, mo_coeffs, cube_file, nx=100, ny=100, nz=100, ncores=1): + """"""Write the molecular orbital of a molecule as a cube file."""""" + numba.set_num_threads(ncores) + os.environ['OMP_NUM_THREADS'] = str(ncores) + os.environ[""OPENBLAS_NUM_THREADS""] = str(ncores) # export OPENBLAS_NUM_THREADS=4 + os.environ[""MKL_NUM_THREADS""] = str(ncores) # export MKL_NUM_THREADS=4 + os.environ[""VECLIB_MAXIMUM_THREADS""] = str(ncores) # export VECLIB_MAXIMUM_THREADS=4 + os.environ[""NUMEXPR_NUM_THREADS""] = str(ncores) # export NUMEXPR_NUM_THREADS=4 + + + # Generate a grid of coordinates for the cube file + coords, origin, spacing = generate_cube_coords(mol, nx=nx, ny=ny, nz=nz, padding=5.0) # shape: (ncoord, 3) + # Calculate ao and density values at these coordinates + bf_values = Integrals.bf_val_helpers.eval_bfs(basis, coords, parallel=True, non_zero_indices=None) # shape: (ncoord, nao) + # compute all MO values on the grid (G x N) + psi_grid = bf_values @ mo_coeffs # matrix multiply + + + # Write the cube file + write_cube_file(cube_file, mol, psi_grid, origin, spacing, nx, ny, nz) + + + ","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/ascii/ascii.py",".py","2467","78","from PIL import Image +import sys + +# ASCII characters from dense to sparse (dark to light) +ASCII_CHARS = ['@', '#', 'S', '%', '?', '*', '+', '-', ';', ':', ',', '.', ' '] + +def resize_image(image, new_width=40): + """"""Resize image while maintaining aspect ratio"""""" + width, height = image.size + aspect_ratio = height / width + # Characters are taller than wide, so adjust height + # Limit height to keep it on one screen (~25 lines max) + new_height = int(new_width * aspect_ratio * 0.55) + # new_height = min(new_height, 25) # Cap at 25 lines + return image.resize((new_width, new_height)) + +def grayscale_image(image): + """"""Convert image to grayscale"""""" + return image.convert('L') + +def pixels_to_ascii(image): + """"""Map each pixel to an ASCII character based on brightness"""""" + pixels = image.getdata() + ascii_str = '' + for pixel in pixels: + # Map 0-255 brightness to ASCII_CHARS index + ascii_str += ASCII_CHARS[pixel * len(ASCII_CHARS) // 256] + return ascii_str + +def image_to_ascii(image_path, new_width=40): + """"""Convert image to ASCII art + + Size presets: + - 25: tiny (icon-sized) + - 40: small (default, fits on screen) + - 60: medium + - 80: large + + Height is automatically capped at 25 lines to fit on one screen + """""" + try: + image = Image.open(image_path) + except Exception as e: + print(f""Unable to open image: {e}"") + return None + + # Process the image + image = resize_image(image, new_width) + image = grayscale_image(image) + + # Convert pixels to ASCII + ascii_str = pixels_to_ascii(image) + + # Split into lines based on image width + img_width = image.width + ascii_art = '\n'.join([ascii_str[i:i+img_width] + for i in range(0, len(ascii_str), img_width)]) + + return ascii_art + +def save_ascii_art(ascii_art, output_file='ascii_art.txt'): + """"""Save ASCII art to a text file"""""" + with open(output_file, 'w') as f: + f.write(ascii_art) + print(f""ASCII art saved to {output_file}"") + +# Example usage +if __name__ == '__main__': + # Replace 'your_image.jpg' with your image path + image_path = 'rutherford.png' + + # Generate ASCII art (40 wide, max 25 lines - fits on one screen) + # Try 25 for tiny, 60 for more detail (may scroll on tall images) + ascii_art = image_to_ascii(image_path, new_width=70) + + if ascii_art: + # Print to console + print(ascii_art)","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/ascii/ascii_data.py",".py","13354","226","# Auto-generated file. Do not edit manually. + +ASCII_ART = { + 'dalton': ''' +...................................................................... +............... .,,,,,,... ........... +........ . ...... ..,,. ...... +...... .,,.. ...... ... +.... . ... .... .. .. .... +. .... ,. .,,,,. ,.., , ., + . ..,. . , + .,. .,,,. .. .,. + ,. ,. ,,: + ,. .. .,, + ,. ,. + . .. . , .. .. ,. + , ... .:;+;,. :-;,.,..:. + ,;-;,.. .,,;;:,:,...,-;,;:,,;,, + .....::;;;-;.;; ,,.. :. .-. :..,+:, + :.,.,., ., .:, ., ::. :, , + .. , .,.... ..... .. + ., ..,. ., .,: + .. ,,, :, .,.. + , . . . .,,::,. :;. + ,, .. .,. .. + .,,, .........,.. ., + . ..... .... .;:.. + ., :.,,,. . .:;:,;, + . , . ,. ..::;:,::, + : : : ... . . .,,:;:;:,,.,. + . , . .. .,,:;;:,,::::. .. + , : ,.. ...,,::,:,,,:,:::. , + ,. , ,, ,..,,. . . ,,:::. ..... + ..., ,. . ... .,,,,,,. , ..... + ....: ,,. .,. ,.,.,.. .. . + .,... , ,.. ,.. .. , ,, , + . , ., .. , ,, , ,. , + , , , .. , .. ., , + , ,. , ,. ., + .. , .. . .. +.. ., ,. .: +.... . . . + +''', + + 'dirac': ''' + ..,.,,.,,,,,,...... ,- + ..,,::::::,,,,,::;:,,,:, ,- + .,:::::,,,....,,,,::,.,::,. ,- + ,:;::,:;:,::,,,,,,,,,..,:-:;; .- + .,:;::;:,,,::;:,,,;,,:,..,:;;::; .+ + :,:::::;---::;-+::::+::;..,:--::;, .% +,::::::::;;,,...;-;:;;+;:..;::.,--:.. .? +,:::::::,. .,,::::,..,. .;;, .,* +:::::;;, :+, ,+ +::::-; ,-,:* +;;:;-. :--? +;;:;: ;+? +::--, .+* +;-+:. -? +:;:, ;* +:;::,. -* +;;;;;, .,;;:-;:,. .,,, ;* +::::; .. .:-??*?;. .;+**;,, ,* +--;;- .:-+++--;;, ,-**+;;: .;* +.,;:-. .,,;??;,;,,. .++;*%*:;..:+ +. ,;;. .. ... ,,.,,. ,,+ +:; .. .... ,,- +.. , ,,- + . ,.- + . . ..- +. .,:-;:,:::. ...+ +.,;:, ,::,,;-;. , ,+ + .:.: .,,,;-;-++--::. , ,- +,.: , :;:,,::,,,,,,:: ,. ,- +. , ., ,:::::::::,,,. , ,- + .:, ,:. ..,,,,. ,. ,- + ,.. .:,. ,;;;;, .. ,- + : , ,,,. ,. ,- + ,. . ...... ,.... ,- + ., ,. ....::,. . .,. ..,:- + ., . .......,:::::,::::, ,- + , .. ..........:,, ,+ + +''', + + 'schrodinger': ''' + :-----;. + ::::;;;;;;;;;;;;;;;;;:::;, + .,;;;;:::;;:,,,,,,,,,,::;;:,.. + .-------;;;;;;,.,,.,;,..,;;;;;;;;;;; + ,:;;;;;;;;;;:::::,... :..,:::::::::..;; + :----;---;;:,,,,,,.. ,...,,,,,:--;..::. + .;-------+, .;+--;--; + ;;;;;;;: . ,;:::::, + ;-;;;;:: .. ,-;;;;;. + ;-----:.. . . ,;---. + .:;;;;:,,.. .:;;, + :;-----;;, .;+-. + :------;::; ;;;; + :;;;;;:,,,. .:::. + ;+-+-;;;;:.,:::-:,,. ,-;;:,. .--:. + ..;--+-,...--:;-:. .;,:: .;;:;-:. .: .:,. + ,;,:-;,,;+*-,.,;. ..+*-,.+-...;, ;+-:. .. + -; .+: . .,;. .+; .; ;,. ;... + ...;;. ,,. ., ,:,,, ., .,. . + ..:+ ,::. ..,,,,..:, ..,,.. . + ....,:::, .. ,. . + . ,:,,... :.... + ..,;;:::. .,;*-, . ..,. + .,,,, . . .. . + .,,,: ... ,..,,. . .. + -;;;;. ;;;:,,,,...... ,. + .,;...,.. .. . + .:;- ;;,,. . + ,;:::; .-;::::. , , + .,...,,,,, ,;-;:,,... . . + .;;;;;;;;;;;,. .:+++-,.,,.... . . . , + ,,,:,::.,,,,::,,:,,. .;:;;:.... . . + .. .,:;;:,:,,;;;;;::::., .::;. .. .. + , ,-;;;;;;;, ,;-:., . + . ..,,... ....+-,,,,...::,,,,,,.,. + ., , .:;;+%;;--;;;;;---;;;::, + , .:;;?;;:;;:;:;-+;;;:;, + .. ,;::-:,,,,,,::;;;::,. + ,,. ,;::. . ... + +''', + + 'bohr': ''' + + ., ...... + ..,,..,., ,,.,.,,,,.. + ,:,. ..., ,. ,.,., .,:,,... + .,,. ., .,,,..,,,..,.,,: + .,,,..,... .. .. .. ....,,,....,. + .,,....,,. . ..,,,,,,,,. + ::, .. .,.,,:, + ;,,..... .,,,:, + :,,:,. ,,::: + :::,, .:,::. + ;,,. . ,,:;; + ,..,,. ..::::, + ..,.. ... ..,:::. + ,....... . .. ..::, + . .,,:. .,...,:;;::, .;+::::::,:,. + .....,. . .,:;::,... .-:-+++;,..:;,, + ..:...:, .:::;:.:. .-;:::,,;,..::,. + ,,, . ,, . . . ,, ...:.,. + .,. , . .: . .,,, + ,. , .. .:: + .. , .,,, + , . ,;: ::. + , . .;:.,:-;, .., + ... ..,,. ., + . . .., + , ..,,,,,:;::,. .,, + .,. .:,,,..,,..,,,. ., + .... ...,... .,. + ., .. .. .,,,,....., + .,. , , .,, + ... .. . ..::.. + ... ,. .....,;:., ..,... + . . , .,,,..,;;. ., .. . + . .. .:::. ., .. + , ;:,. ., . + ,. .. .:, ., + .. ., ,: .., + , ,....,,., .. + ,. ., .: ., + . . . + +''', + + 'rutherford': ''' + + ........ + .... . .,.,,,.. + .. ....,,:,,,::,::, + ., ....,:::,..,::,::::::, + ., ..... .,:::;:;;.. + :..... .......,:, + :,... ..::::: + ... .... :::;, + .. ... .:::: + .. ... ..;:; + . . .... ..,:;. + . ,. ..., ...,:. + ,.;-;--:. :--+--;-;:....:, ....: + ,,.,;++-: ,**+++;,,,,....,, ....-. + . -++:.,. .,;:;,:;,;:,. ..: .,:,:, + . . ... . ..:.,,:.:;. + .. .. ...,,: ,:. + . .. .....,-, ., + . . . , .....,:,.,. + . ,,,;-;.: ..... .,. + , ..::,,;++;. ....;.., + .. ,.,.;,,.:-;:,. ....,+,. + : ..,:;;:,,:;;-;;+; ....:-. + ..,+**-,,::;--+++++, ....::;. + ,.,:. ........... ...::.;;, + . .,,,. ...;,.,:,.. + ., ..,;,.., , .,. + .. .,,::.,:, , .,.. + .,, ..,,:;;:,,,::, .. ,...... + ..,. .,.::;;;;;:,,,,::, , .. ..... + .... .. , ... .,,::, , , + ..... .. ,. .,.:,. .: .. + ... . .,.. .:: .,,, , + .. .. -;.... , ,,.,: . + :;:...,.....,;:,: .. + . ,. ... .;, .. .,. + . ., , ,-. , .. + . ... , ,;, , . + .., ,..:; . , + .. , :. , , + + + :;--+-:;;, ;-;;;;+;--;;---; + ....... ... . .... .... + + +''', + +} +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Utils/ascii/generator_script.py",".py","1020","45","from pathlib import Path + +FILES = [ + ""ascii_dalton.txt"", + ""ascii_dirac.txt"", + ""ascii_schrodinger.txt"", + ""ascii_bohr.txt"", + ""ascii_rutherford.txt"", +] + +OUTPUT = ""ascii_data.py"" + + +def escape_triple_quotes(text: str) -> str: + """"""Escape triple quotes so we can safely embed text in ''' ... '''"""""" + return text.replace(""'''"", ""\\'\\'\\'"") + + +def main(): + data = {} + + for fname in FILES: + path = Path(fname) + if not path.exists(): + raise FileNotFoundError(f""Missing file: {fname}"") + + key = path.stem.replace(""ascii_"", """") + text = path.read_text(encoding=""utf-8"") + data[key] = escape_triple_quotes(text) + + with open(OUTPUT, ""w"", encoding=""utf-8"") as f: + f.write(""# Auto-generated file. Do not edit manually.\n\n"") + f.write(""ASCII_ART = {\n"") + + for key, text in data.items(): + f.write(f"" '{key}': '''\n{text}\n''',\n\n"") + + f.write(""}\n"") + + print(f""Generated {OUTPUT}"") + + +if __name__ == ""__main__"": + main() +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/kin_mat_symm_shell_cupy.py",".py","13289","318","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba + + +def kin_mat_symm_shell_cupy(basis, slice=None, cp_stream=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + bfs_offset = cp.array([basis.shell_bfs_offset]) + bfs_nbfshell = cp.array([basis.bfs_nbfshell]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + matrix_shape = (basis.bfs_nao, basis.bfs_nao) + + # Initialize the matrix with zeros + T = cp.zeros(matrix_shape) + + thread_x = 32 + thread_y = 32 + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((basis.nshells + (thread_x - 1))//thread_x, (basis.nshells + (thread_y - 1))//thread_y) + kin_mat_symm_shell_internal_cuda[blocks_per_grid, (32, 32), nb_stream](bfs_offset[0], bfs_nbfshell[0], bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, basis.nshells, T) + blocks_per_grid = ((basis.bfs_nao + (thread_x - 1))//thread_x, (basis.bfs_nao + (thread_y - 1))//thread_y) + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](0,basis.bfs_nao,0,basis.bfs_nao,T) + if cp_stream is None: + cuda.synchronize() + else: + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + return T #+ T.T - cp.diag(cp.diag(T)) + +LOOKUP_TABLE = np.array([ + 1, 1, 2, 6, 24, 120, 720, 5040, 40320, + 362880, 3628800, 39916800, 479001600, + 6227020800, 87178291200, 1307674368000, + 20922789888000, 355687428096000, 6402373705728000, + 121645100408832000, 2432902008176640000], dtype='int64') + +@cuda.jit(fastmath=True, cache=True, device=True) +def fastFactorial(n): + # This is the way to access global constant arrays (which need to be on host, i.e. created using numpy for some reason) + # See https://stackoverflow.com/questions/63311574/in-numba-how-to-copy-an-array-into-constant-memory-when-targeting-cuda + LOOKUP_TABLE_ = cuda.const.array_like(LOOKUP_TABLE) + # 2-3x faster than the fastFactorial_old for values less than 21 + if n<= 1: + return 1 + elif n<=20: + return LOOKUP_TABLE_[n] + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + # factorial = 1 + # for i in range(2, n+1): + # factorial *= i + # return factorial + +LOOKUP_TABLE_COMB = np.array([[ 1, 0, 0, 0, 0, 0], + [ 1, 1, 0, 0, 0, 0], + [ 1, 2, 1, 0, 0, 0], + [ 1, 3, 3, 1, 0, 0], + [ 1, 4, 6, 4, 1, 0], + [ 1, 5, 10, 10, 5, 1]]) + +@cuda.jit(fastmath=True, cache=True, device=True) +def comb(x, y): + table = cuda.const.array_like(LOOKUP_TABLE_COMB) + if y == 0: + return 1 + if x == y: + return 1 + if x<=5 and y<=5: + return table[x,y] + binom = fastFactorial(x) // fastFactorial(y) // fastFactorial(x - y) + return binom + +@cuda.jit(fastmath=True, cache=True, device=True) +def doublefactorial(n): + if n <= 0: + return 1 + else: + result = 1 + for i in range(n, 0, -2): + result *= i + return result + + +@cuda.jit(fastmath=True, cache=True, device=True) +def c2k(k,la,lb,PA,PB): + temp = 0.0 + for i in range(la+1): + if i>k: + continue + factor1 = comb(la,i) + factor2 = PA**(la-i) + for j in range(lb+1): + # if j>k: + # continue + if (i+j)==k : + temp += factor1*comb(lb,j)*factor2*PB**(lb-j) + return temp + +@cuda.jit(fastmath=True, cache=True, device=True) +def calcS(la,lb,fac1,fac2,PA,PB): + temp = 0.0 + # fac1 = math.sqrt(math.pi/gamma) + # fac2 = 2*gamma + for k in range(0, int((la+lb)/2)+1): + temp += c2k(2*k,la,lb,PA,PB)*fac1*doublefactorial(2*k-1)/(fac2)**k + return temp + +@cuda.jit(fastmath=True, cache=True)#(device=True) +def symmetrize(start_row, end_row, start_col, end_col, out): + #T + T.T - cp.diag(cp.diag(T)) + i, j = cuda.grid(2) + if i>=start_row and i=start_col and ji: + out[i-start_row, j-start_col] = out[j-start_col, i-start_row] + + +@cuda.jit(fastmath=True, cache=True, max_registers=60)#(device=True) +def kin_mat_symm_shell_internal_cuda(bfs_offset, bfs_nbfshell, bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, nshells, out): + # This function calculates the kinetic energy matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the kinetic matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + ishell, jshell = cuda.grid(2) + if ishell>=0 and ishell=0 and jshell<=ishell: + # result = cuda.local.array((20,20), numba.float64) + # result[:,:] = 0.0 + # print(ishell, jshell) + i = bfs_offset[ishell] + j = bfs_offset[jshell] + I = bfs_coords[i] + # Ni = bfs_contr_prim_norms[i] + # lmni = bfs_lmn[i] + result_sum = 0.0 + J = bfs_coords[j] + # IJ = I - J + IJ = cuda.local.array((3), numba.float64) + P = cuda.local.array((3), numba.float64) + PI = cuda.local.array((3), numba.float64) + PJ = cuda.local.array((3), numba.float64) + IJ[0] = I[0] - J[0] + IJ[1] = I[1] - J[1] + IJ[2] = I[2] - J[2] + # Nj = bfs_contr_prim_norms[j] + # lmnj = bfs_lmn[j] + #Some factors to save FLOPS + fac1 = IJ[0]**2 + IJ[1]**2 + IJ[2]**2 + # fac2 = Ni*Nj + # fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + # fac4 = (lmnj[0]*(lmnj[0]-1)) + # fac5 = (lmnj[1]*(lmnj[1]-1)) + # fac6 = (lmnj[2]*(lmnj[2]-1)) + for ik in range(bfs_nprim[i]): + for jk in range(bfs_nprim[j]): + alphaik = bfs_expnts[i,ik] + alphajk = bfs_expnts[j,jk] + alphajksq = alphajk*alphajk + gamma = alphaik + alphajk + fac_1 = math.sqrt(math.pi/gamma) + fac_2 = 2*gamma + temp_1 = math.exp(-alphaik*alphajk/gamma*fac1) + if (abs(temp_1)<1.0e-9): + continue + + dik = bfs_coeffs[i,ik] + djk = bfs_coeffs[j,jk] + + # P = (alphaik*I + alphajk*J)/gamma + P[0] = (alphaik*I[0] + alphajk*J[0])/gamma + P[1] = (alphaik*I[1] + alphajk*J[1])/gamma + P[2] = (alphaik*I[2] + alphajk*J[2])/gamma + + # PI = P - I + PI[0] = P[0] - I[0] + PI[1] = P[1] - I[1] + PI[2] = P[2] - I[2] + # PJ = P - J + PJ[0] = P[0] - J[0] + PJ[1] = P[1] - J[1] + PJ[2] = P[2] - J[2] + + temp1 = dik*djk #coeff of primitives as read from basis set + + + + for ibf in range(i, i + bfs_nbfshell[ishell]): + Ni = bfs_contr_prim_norms[ibf] + lmni = bfs_lmn[ibf] + Nik = bfs_prim_norms[ibf,ik] + temp2 = temp1*Ni*Nik + + for jbf in range(j, j + min(bfs_nbfshell[jshell], ibf+1)): + Nj = bfs_contr_prim_norms[jbf] + lmnj = bfs_lmn[jbf] + Njk = bfs_prim_norms[jbf,jk] + temp = temp2*Nj*Njk + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + + + Sx = calcS(lmni[0],lmnj[0],fac_1,fac_2,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],fac_1,fac_2,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],fac_1,fac_2,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]+2,fac_1,fac_2,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],fac_1,fac_2,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]+2,fac_1,fac_2,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],fac_1,fac_2,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]+2,fac_1,fac_2,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-2,fac_1,fac_2,PI[0],PJ[0]) + Sz = calcS(lmni[2],lmnj[2],fac_1,fac_2,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],fac_1,fac_2,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-2,fac_1,fac_2,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + if lmnj[2]==0: + part5 = 0 + else: + Sy = calcS(lmni[1],lmnj[1],fac_1,fac_2,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-2,fac_1,fac_2,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + part5 = fac6*overlap7 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajksq*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + + + # result[ibf-i, jbf-j] += temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + out[ibf, jbf] += temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + # out[ibf:ibf+bfs_nbfshell[ishell], jbf:jbf+bfs_nbfshell[jshell]] = result[0:bfs_nbfshell[ishell], 0:bfs_nbfshell[jshell]] + # for ibf in range(i, i + bfs_nbfshell[ishell]): + # for jbf in range(j, j + min(bfs_nbfshell[jshell], ibf+1)): + # out[ibf, jbf] = result[ibf-i, jbf-j] +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/overlap_mat_symm_cupy.py",".py","11052","280","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba + + +def overlap_mat_symm_cupy(basis, slice=None, cp_stream=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # Infer the matrix shape from the start and end indices + num_rows = b - a + num_cols = d - c + start_row = a + end_row = b + start_col = c + end_col = d + matrix_shape = (num_rows, num_cols) + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # Initialize the matrix with zeros + S = cp.zeros(matrix_shape) + + thread_x = 24 + thread_y = 16 + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + blocks_per_grid = ((num_rows + (thread_x - 1))//thread_x, (num_cols + (thread_y - 1))//thread_y) + overlap_mat_symm_internal_cuda[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, S) + if both_tri_symm: + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](a,b,c,d,S) + + # cuda.synchronize() + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + # cp._default_memory_pool.free_all_blocks() + return S + +LOOKUP_TABLE = np.array([ + 1, 1, 2, 6, 24, 120, 720, 5040, 40320, + 362880, 3628800, 39916800, 479001600, + 6227020800, 87178291200, 1307674368000, + 20922789888000, 355687428096000, 6402373705728000, + 121645100408832000, 2432902008176640000], dtype='int64') + +@cuda.jit(fastmath=True, cache=True, device=True) +def fastFactorial(n): + # This is the way to access global constant arrays (which need to be on host, i.e. created using numpy for some reason) + # See https://stackoverflow.com/questions/63311574/in-numba-how-to-copy-an-array-into-constant-memory-when-targeting-cuda + LOOKUP_TABLE_ = cuda.const.array_like(LOOKUP_TABLE) + # 2-3x faster than the fastFactorial_old for values less than 21 + if n<= 1: + return 1 + elif n<=20: + return LOOKUP_TABLE_[n] + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + # factorial = 1 + # for i in range(2, n+1): + # factorial *= i + # return factorial + +@cuda.jit(fastmath=True, cache=True, device=True) +def comb(x, y): + if y == 0: + return 1 + if x == y: + return 1 + binom = fastFactorial(x) // fastFactorial(y) // fastFactorial(x - y) + return binom + +@cuda.jit(fastmath=True, cache=True, device=True) +def doublefactorial(n): + if n <= 0: + return 1 + else: + result = 1 + for i in range(n, 0, -2): + result *= i + return result + + +@cuda.jit(fastmath=True, cache=True, device=True) +def c2k(k,la,lb,PA,PB): + temp = 0.0 + for i in range(la+1): + if i>k: + continue + factor1 = comb(la,i) + factor2 = PA**(la-i) + for j in range(lb+1): + # if j>k: + # continue + if (i+j)==k : + temp += factor1*comb(lb,j)*factor2*PB**(lb-j) + return temp + +@cuda.jit(fastmath=True, cache=True, device=True) +def calcS(la,lb,gamma,PA,PB): + temp = 0.0 + fac1 = math.sqrt(math.pi/gamma) + fac2 = 2*gamma + for k in range(0, int((la+lb)/2)+1): + temp += c2k(2*k,la,lb,PA,PB)*fac1*doublefactorial(2*k-1)/(fac2)**k + return temp + +@cuda.jit(fastmath=True, cache=True)#(device=True) +def overlap_mat_symm_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, out): + # This function calculates the overlap matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + + i, j = cuda.grid(2) + if i>=start_row and i=start_col and ji: + # out[i-start_row, j-start_col] = out[j-start_col, i-start_row] + + # return out + +@cuda.jit(fastmath=True, cache=True)#(device=True) +def symmetrize(start_row, end_row, start_col, end_col, out): + #T + T.T - cp.diag(cp.diag(T)) + i, j = cuda.grid(2) + if i>=start_row and i=start_col and ji: + out[i-start_row, j-start_col] = out[j-start_col, i-start_row]","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/overlap_mat_grad_symm.py",".py","22095","387","import numpy as np +from numba import njit , prange + +from .integral_helpers import calcS + +def overlap_mat_grad_symm(basis, slice=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + bfs_atoms = np.array([basis.bfs_atoms]) + natoms = max(basis.bfs_atoms) + 1 + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + dS = overlap_mat_grad_symm_internal_new(natoms, bfs_atoms[0], bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d) + return dS + +@njit(parallel=True, fastmath=True, cache=True) +def overlap_mat_grad_symm_internal(natoms, bfs_atoms, bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col): + # This function calculates the overlap matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (natoms, 3, num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # is_ibf_on_atom = False + # is_jbf_on_atom = False + + # Initialize the matrix with zeros + dS = np.zeros(matrix_shape) + + for iatom in prange(natoms): + for dir in range(3): + for i in range(start_row, end_row): + I = bfs_coords[i] + lmni = bfs_lmn[i] + Ni = bfs_contr_prim_norms[i] + if iatom==bfs_atoms[i]: + is_ibf_on_atom = True + else: + is_ibf_on_atom = False + for j in range(start_col, end_col): #Because we are only evaluating the lower triangular matrix. + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result = 0.0 + if iatom==bfs_atoms[j]: + is_jbf_on_atom = True + else: + is_jbf_on_atom = False + + # if not is_ibf_on_atom and not is_jbf_on_atom: + # continue + if is_ibf_on_atom or is_jbf_on_atom: + + J = bfs_coords[j] + IJ = I - J + tempfac = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + for ik in range(bfs_nprim[i]): + alphaik = bfs_expnts[i][ik] + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + for jk in range(bfs_nprim[j]): + + + alphajk = bfs_expnts[j][jk] + gamma = alphaik + alphajk + screenfactor = np.exp(-alphaik*alphajk/gamma*tempfac) + if (abs(screenfactor)<1.0e-12): + continue + + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + + temp = dik*djk + temp = temp*Nik*Njk + temp = temp*Ni*Nj + if is_ibf_on_atom and not is_jbf_on_atom: + if dir==0: #x + lfactor = lmni[0] + Sx = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==1: #y + lfactor = lmni[1] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==2: #z + lfactor = lmni[2] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + tempA = -lfactor*temp*screenfactor*Sx*Sy*Sz + if dir==0: #x + Sx = calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + if dir==1: #y + Sy = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + if dir==2: #z + Sz = calcS(lmni[2]+1,lmnj[2],gamma,PI[2],PJ[2]) + tempB = 2*alphaik*temp*screenfactor*Sx*Sy*Sz + result += tempA + tempB + if not is_ibf_on_atom and is_jbf_on_atom: + if dir==0: #x + lfactor = lmnj[0] + Sx = calcS(lmni[0],lmnj[0]-1,gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==1: #y + lfactor = lmnj[1] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==2: #z + lfactor = lmnj[2] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-1,gamma,PI[2],PJ[2]) + tempA = -lfactor*temp*screenfactor*Sx*Sy*Sz + if dir==0: #x + Sx = calcS(lmni[0],lmnj[0]+1,gamma,PI[0],PJ[0]) + if dir==1: #y + Sy = calcS(lmni[1],lmnj[1]+1,gamma,PI[1],PJ[1]) + if dir==2: #z + Sz = calcS(lmni[2],lmnj[2]+1,gamma,PI[2],PJ[2]) + tempB = 2*alphajk*temp*screenfactor*Sx*Sy*Sz + result += tempA + tempB + if is_ibf_on_atom and is_jbf_on_atom: + continue + # Apply chain rule and compute the derivative of bra + if dir==0: #x + lfactor = lmni[0] + Sx = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==1: #y + lfactor = lmni[1] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==2: #z + lfactor = lmni[2] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + tempA = -lfactor*temp*screenfactor*Sx*Sy*Sz + if dir==0: #x + Sx = calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + if dir==1: #y + Sy = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + if dir==2: #z + Sz = calcS(lmni[2]+1,lmnj[2],gamma,PI[2],PJ[2]) + tempB = 2*alphaik*temp*screenfactor*Sx*Sy*Sz + result += tempA + tempB + + # Now compute the derivative of the ket + if dir==0: #x + lfactor = lmnj[0] + Sx = calcS(lmni[0],lmnj[0]-1,gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==1: #y + lfactor = lmnj[1] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==2: #z + lfactor = lmnj[2] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-1,gamma,PI[2],PJ[2]) + tempA = -lfactor*temp*screenfactor*Sx*Sy*Sz + if dir==0: #x + Sx = calcS(lmni[0],lmnj[0]+1,gamma,PI[0],PJ[0]) + if dir==1: #y + Sy = calcS(lmni[1],lmnj[1]+1,gamma,PI[1],PJ[1]) + if dir==2: #z + Sz = calcS(lmni[2],lmnj[2]+1,gamma,PI[2],PJ[2]) + tempB = 2*alphajk*temp*screenfactor*Sx*Sy*Sz + result += tempA + tempB + + dS[iatom, dir, i - start_row, j - start_col] = result + if both_tri_symm: + dS[iatom, dir, j - start_col, i - start_row] = result + + # if both_tri_symm: + # #We save time by evaluating only the lower diagonal elements and then use symmetry Si,j=Sj,i + # for i in prange(start_row, end_row): + # for j in prange(start_col, end_col): + # if j>i: + # dS[:, :, i-start_row, j-start_col] = dS[:, :, j-start_col, i-start_row] + return dS + +@njit(parallel=True, fastmath=True, cache=True) +def overlap_mat_grad_symm_internal_new(natoms, bfs_atoms, bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col): + # This function calculates the overlap matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (natoms, 3, num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # is_ibf_on_atom = False + # is_jbf_on_atom = False + + # Initialize the matrix with zeros + dS = np.zeros(matrix_shape) + + + for i in prange(start_row, end_row): + I = bfs_coords[i] + lmni = bfs_lmn[i] + Ni = bfs_contr_prim_norms[i] + for j in range(start_col, end_col): #Because we are only evaluating the lower triangular matrix. + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result = np.zeros(3)#0.0 + + if bfs_atoms[i]==bfs_atoms[j]: + continue + + J = bfs_coords[j] + IJ = I - J + tempfac = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + for ik in range(bfs_nprim[i]): + alphaik = bfs_expnts[i][ik] + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + for jk in range(bfs_nprim[j]): + + + alphajk = bfs_expnts[j][jk] + gamma = alphaik + alphajk + screenfactor = np.exp(-alphaik*alphajk/gamma*tempfac) + if (abs(screenfactor)<1.0e-12): + continue + + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + + temp = dik*djk + temp = temp*Nik*Njk + temp = temp*Ni*Nj + + for dir in range(3): + if dir==0: #x + lfactor = lmni[0] + Sx = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==1: #y + lfactor = lmni[1] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + if dir==2: #z + lfactor = lmni[2] + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + tempA = -lfactor*temp*screenfactor*Sx*Sy*Sz + if dir==0: #x + Sx = calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + if dir==1: #y + Sy = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + if dir==2: #z + Sz = calcS(lmni[2]+1,lmnj[2],gamma,PI[2],PJ[2]) + tempB = 2*alphaik*temp*screenfactor*Sx*Sy*Sz + result[dir] += tempA + tempB + + + + dS[bfs_atoms[i], dir, i - start_row, j - start_col] = result[dir] + dS[bfs_atoms[j], dir, i - start_row, j - start_col] = -result[dir] + if both_tri_symm: + dS[bfs_atoms[i], dir, j - start_col, i - start_row] = result[dir] + dS[bfs_atoms[j], dir, j - start_col, i - start_row] = -result[dir] + + # if both_tri_symm: + # #We save time by evaluating only the lower diagonal elements and then use symmetry Si,j=Sj,i + # for i in prange(start_row, end_row): + # for j in prange(start_col, end_col): + # if j>i: + # dS[:, :, i-start_row, j-start_col] = dS[:, :, j-start_col, i-start_row] + return dS","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/nuc_mat_grad_symm.py",".py","20842","404","import numpy as np +from numba import njit , prange + +from .integral_helpers import c2k, vlriPartial, Fboys, fastFactorial + +def nuc_mat_grad_symm(basis, mol, slice=None, sqrt_ints4c2e_diag=None): + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the nuclear matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + coordsBohrs = np.array([mol.coordsBohrs]) + Z = np.array([mol.Zcharges]) + natoms = mol.natoms + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # print([a,b,c,d]) + + if sqrt_ints4c2e_diag is None: + #Create dummy array + sqrt_ints4c2e_diag = np.zeros((1,1), dtype=np.float64) + isSchwarz = False + else: + isSchwarz = True + + V = nuc_mat_grad_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, Z[0], coordsBohrs[0], natoms, sqrt_ints4c2e_diag, isSchwarz) + + return V + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def nuc_mat_grad_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, Z, coordsMol, natoms, sqrt_ints4c2e_diag, isSchwarz = False): + # This function calculates the nuclear potential matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + #Using numba-scipy allows us to use scipy.special.gamma and gamminc, + #however, this prevents the caching functionality. Nevertheless, + #apart form the compilation overhead, it allows to perform calculaitons significantly faster and with good + #accuracy. + + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (natoms, 3, num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # print(both_tri_symm) + + # Initialize the matrix with zeros + V = np.zeros(matrix_shape) + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + + + #Loop over BFs + for i in prange(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + for j in prange(start_col, end_col): + + + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + if isSchwarz: + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if sqrt_ij*sqrt_ij<1e-13: + continue + result = 0.0 + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + temp_NiNj = Ni*Nj + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + + facl = np.zeros(la+lb+1) + facm = np.zeros(ma+mb+1) + facn = np.zeros(na+nb+1) + F_ = np.zeros((la+lb+ma+mb+na+nb+1)) + vntk = np.zeros((na+nb+1, (na+nb)//2+1, (na+nb)//2+1)) # Good for upto j shells; j orbitals have an angular momentum of 7; + vmsj = np.zeros((ma+mb+1, (ma+mb)//2+1, (ma+mb)//2+1)) # Good for upto j shells; j orbitals have an angular momentum of 7; + + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + temp_alphaikIjsq = alphaik*IJsq + temp_alphaikI = alphaik*I + temp_NiNjNikdik = temp_NiNj*Nik*dik + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + # screenfactor = np.exp(-alphaik*alphajk*gamma_inv*IJsq) + screenfactor = np.exp(-temp_alphaikIjsq*alphajk*gamma_inv) + if abs(screenfactor)<1.0e-8: + # Going lower than E-8 doesn't change the max erroor. There could still be some effects from error compounding but the max error doesnt budge. + #TODO: This is quite low. But since this is the slowest part. + #But I had to do this because this is a very slow part of the program. + #Will have to check how the accuracy is affected and if the screening factor + #can be reduced further. + continue + + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + # screenfactor_2 = djk*Njk*temp_NiNjNikdik*screenfactor*gamma_inv*np.sqrt(gamma_inv)*15.5031383401 + # if abs(screenfactor_2)<1.0e-10: # The threshold used here should be the same as Schwarz screening threshold (for 4c2e and 3c2e ERIs) + # continue + + epsilon = 0.25*gamma_inv + P = (temp_alphaikI + alphajk*J)*gamma_inv + PI = P - I + PJ = P - J + tempfac = (PIx2*gamma_inv)*screenfactor + + for l in range(0, la+lb+1): + facl[l] = c2k(l,la,lb,PI[0],PJ[0]) + for m in range(0, ma+mb+1): + facm[m] = c2k(m,ma,mb,PI[1],PJ[1]) + for n in range(0, na+nb+1): + facn[n] = c2k(n,na,nb,PI[2],PJ[2]) + + + Vc = 0.0 + #Loop over nuclei + for iatom in prange(natoms): #Parallelising over atoms seems to be faster for Cholestrol.xyz with def2-QZVPPD (628 sec) + Rc = coordsMol[iatom] + Zc = Z[iatom] + PC = P - Rc + temp_gamma_sum_PCsq = gamma*np.sum(PC**2) + + fac1 = -Zc*tempfac + #print(fac1) + sum_Vl = 0.0 + + for li in range(la+lb+ma+mb+na+nb + 1): + F_[li] = Fboys(li,temp_gamma_sum_PCsq) + for m in range(0,ma+mb+1): + for s in range(0, int(m/2)+1): + for j1 in range(0, int((m-2*s)/2)+1): + vmsj[m,s,j1] = vlriPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm[m] + for n in range(0,na+nb+1): + for t in range(0, int(n/2)+1): + for k in range(0, int((n-2*t)/2)+1): + vntk[n,t,k] = vlriPartial(PC[2],n,t,k)*epsilon**(t+k)*facn[n] + + + for l in range(0,la+lb+1): + # facl = c2k(l,la,lb,PI[0],PJ[0]) + # fac_l = fastFactorial(l) + for r in range(0, int(l/2)+1): + # fac_r = fastFactorial(r) + for i1 in range(0, int((l-2*r)/2)+1): + v_lri = vlriPartial(PC[0],l,r,i1)*epsilon**(r+i1)*facl[l] + # v_lri = (-1)**l*((-1)**i1*fac_l*PC[0]**(l-2*r-2*i1)/(fac_r*fastFactorial(i1)*fastFactorial(l-2*r-2*i1)))*epsilon**(r+i1)*facl[l] + sum_Vm = 0.0 + for m in range(0,ma+mb+1): + # facm = c2k(m,ma,mb,PI[1],PJ[1]) + # fac_m = fastFactorial(m) + for s in range(0, int(m/2)+1): + # fac_s = fastFactorial(s) + for j1 in range(0, int((m-2*s)/2)+1): + # v_msj = vlriPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm[m] + v_msj = vmsj[m,s,j1] + # v_msj = (-1)**m*((-1)**j1*fac_m*PC[1]**(m-2*s-2*j1)/(fac_s*fastFactorial(j1)*fastFactorial(m-2*s-2*j1)))*epsilon**(s+j1)*facm[m] + sum_Vn = 0.0 + for n in range(0,na+nb+1): + # facn = c2k(n,na,nb,PI[2],PJ[2]) + # fac_n = fastFactorial(n) + for t in range(0, int(n/2)+1): + # fac_t = fastFactorial(t) + for k in range(0, int((n-2*t)/2)+1): + # v_ntk = vlriPartial(PC[2],n,t,k)*epsilon**(t+k)*facn[n] + v_ntk = vntk[n,t,k] + # v_ntk = (-1)**n*((-1)**k*fac_n*PC[2]**(n-2*t-2*k)/(fac_t*fastFactorial(k)*fastFactorial(n-2*t-2*k)))*epsilon**(t+k)*facn[n] + # F = Fboys(l+m+n-2*(r+s+t)-(i1+j1+k),temp_gamma_sum_PCsq) + F = F_[l+m+n-2*(r+s+t)-(i1+j1+k)] + + sum_Vn += v_ntk*F + sum_Vm += v_msj*sum_Vn + sum_Vl += v_lri*sum_Vm + + Vc += sum_Vl*fac1 + result += Vc*djk*Njk*temp_NiNjNikdik + V[i - start_row, j - start_col] = result + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Vi,j=Vj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + V[i-start_row, j-start_col] = V[j-start_col, i-start_row] + + return V + +# This version parallelizes over atoms +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def nuc_mat_grad_symm_internal2(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, Z, coordsMol, natoms): + # This function calculates the nuclear potential matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + #Using numba-scipy allows us to use scipy.special.gamma and gamminc, + #however, this prevents the caching functionality. Nevertheless, + #apart form the compilation overhead, it allows to perform calculaitons significantly faster and with good + #accuracy. + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (natoms, 3, num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # print(both_tri_symm) + + # Initialize the matrix with zeros + V = np.zeros(matrix_shape) + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + + #Loop over nuclei + for iatom in prange(natoms): #Parallelising over atoms seems to be faster for Cholestrol.xyz with def2-QZVPPD (628 sec) + Rc = coordsMol[iatom] + Zc = Z[iatom] + + #Loop over BFs + for i in range(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + for j in range(start_col, end_col): + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result = 0.0 + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + screenfactor = np.exp(-alphaik*alphajk*gamma_inv*IJsq) + if abs(screenfactor)<1.0e-8: + # Going lower than E-8 doesn't change the max erroor. There could still be some effects from error compounding but the max error doesnt budge. + #TODO: This is quite low. But since this is the slowest part. + #But I had to do this because this is a very slow part of the program. + #Will have to check how the accuracy is affected and if the screening factor + #can be reduced further. + continue + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + epsilon = 0.25*gamma_inv + P = (alphaik*I + alphajk*J)*gamma_inv + PC = P - Rc + PI = P - I + PJ = P - J + tempfac = (PIx2*gamma_inv)*screenfactor + + Vc = 0.0 + + + fac1 = -Zc*tempfac + #print(fac1) + sum_Vl = 0.0 + + + for l in range(0,la+lb+1): + facl = c2k(l,la,lb,PI[0],PJ[0]) + for r in range(0, int(l/2)+1): + for i1 in range(0, int((l-2*r)/2)+1): + v_lri = vlriPartial(PC[0],l,r,i1)*epsilon**(r+i1)*facl + sum_Vm = 0.0 + for m in range(0,ma+mb+1): + facm = c2k(m,ma,mb,PI[1],PJ[1]) + for s in range(0, int(m/2)+1): + for j1 in range(0, int((m-2*s)/2)+1): + v_msj = vlriPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm + sum_Vn = 0.0 + for n in range(0,na+nb+1): + facn = c2k(n,na,nb,PI[2],PJ[2]) + for t in range(0, int(n/2)+1): + for k in range(0, int((n-2*t)/2)+1): + v_ntk = vlriPartial(PC[2],n,t,k)*epsilon**(t+k)*facn + F = Fboys(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + + sum_Vn += v_ntk*F + sum_Vm += v_msj*sum_Vn + sum_Vl += v_lri*sum_Vm + + Vc += sum_Vl*fac1 + result += Vc*dik*djk*Nik*Njk*Ni*Nj + V[i - start_row, j - start_col] += result + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Vi,j=Vj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + V[i-start_row, j-start_col] = V[j-start_col, i-start_row] + + return V + ","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/dipole_moment_mat_symm.py",".py","11569","254","import numpy as np +from numba import njit , prange + +from .integral_helpers import hermite_gauss_coeff + +def dipole_moment_mat_symm(basis, slice=None, origin=np.zeros((3))): + """""" + Compute the dipole moment integral matrix in the atomic orbital (AO) basis + using symmetry and the McMurchie–Davidson algorithm. + + This routine evaluates the matrix elements: + + μ_ij^(k) = ⟨ χ_i | r_k | χ_j ⟩ + + where: + - χ_i, χ_j are Gaussian-type atomic orbitals (AOs) + - r_k is the k-th Cartesian coordinate (x, y, or z) + - origin is the coordinate origin for the dipole operator + + The implementation follows the McMurchie–Davidson scheme for Gaussian + integrals, adapted from: + + https://github.com/jjgoings/McMurchie-Davidson + + Symmetries exploited + -------------------- + The dipole moment matrix is symmetric for real-valued AOs: + + μ_ij^(k) = μ_ji^(k) + + This halves the number of unique integrals from N_bf^2 to + N_bf*(N_bf+1)/2 for each Cartesian component. + + Parameters + ---------- + basis : object + Basis set object containing: + - bfs_coords : Cartesian coordinates of AO centers + - bfs_coeffs : Contraction coefficients + - bfs_expnts : Gaussian exponents + - bfs_prim_norms : Primitive normalization constants + - bfs_contr_prim_norms : Contraction normalization factors + - bfs_lmn : Angular momentum quantum numbers (ℓ, m, n) + - bfs_nprim : Number of primitives per basis function + - bfs_nao : Number of atomic orbitals + + slice : list of int, optional + A 4-element list [row_start, row_end, col_start, col_end] + specifying the sub-block of the matrix to compute. + If None (default), computes the full symmetric matrix. + + origin : ndarray of shape (3,), optional + Origin of the dipole operator in Cartesian coordinates. + Default is (0.0, 0.0, 0.0). + + Returns + ------- + M : ndarray of shape (3, n_rows, n_cols) + The computed dipole moment integrals for the requested block, + with the first dimension indexing the x, y, z components. + + Notes + ----- + - Basis set data are pre-packed into NumPy arrays for compatibility + with Numba JIT compilation. + - The algorithm avoids redundant evaluations by exploiting matrix + symmetry when `slice` covers the full range. + - The dipole moment integrals are typically used in computing + molecular dipole moments from density matrices. + + Examples + -------- + >>> mu_full = dipole_moment_mat_symm(basis) + >>> mu_block = dipole_moment_mat_symm(basis, slice=[0, 5, 0, 5]) + >>> mu_shifted = dipole_moment_mat_symm(basis, origin=np.array([1.0, 0.0, 0.0])) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + + M = dipole_moment_mat_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, origin) + + return M + +@njit(parallel=True, fastmath=True, error_model=""numpy"", nogil=True, cache=False) +def dipole_moment_mat_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, origin): + # This function calculates the dipole moment matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the dipole moment matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://github.com/jjgoings/McMurchie-Davidson/blob/8c9d176204498655a358edf41698e59cf970a548/mmd/backup/reference-integrals.py#L29 + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (3, num_rows, num_cols) # Default: (3, nao, nao) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + + # Initialize the matrix with zeros + M = np.zeros(matrix_shape) + + PI = 3.141592653589793 + + + #Loop over BFs + for i in prange(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + for j in prange(start_col, end_col): + + + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result_x = 0.0 + result_y = 0.0 + result_z = 0.0 + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + temp_gamma = alphaik*alphajk*gamma_inv + screenfactor = np.exp(-temp_gamma*IJsq) + if abs(screenfactor)<1.0e-8: + continue + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + # epsilon = 0.25*gamma_inv + P = (alphaik*I + alphajk*J)*gamma_inv + # PI = P - I + # PJ = P - J + PC = P - origin + # tempfac = (PIx2*gamma_inv) + + norm_contr_factor = dik*djk*Nik*Njk*Ni*Nj + + D_x = hermite_gauss_coeff(la,lb,1,IJ[0],alphaik,alphajk,gamma,temp_gamma) + PC[0]*hermite_gauss_coeff(la,lb,0,IJ[0],alphaik,alphajk,gamma,temp_gamma) + # D = E(l1,l2,0,A[0]-B[0],a,b,1+n[0],A[0]-gOrigin[0]) + S2_x = hermite_gauss_coeff(ma,mb,0,IJ[1],alphaik,alphajk) + S3_x = hermite_gauss_coeff(na,nb,0,IJ[2],alphaik,alphajk) + result_x += D_x*S2_x*S3_x*np.power(PI/gamma,1.5)*norm_contr_factor + + + S1_y = hermite_gauss_coeff(la,lb,0,IJ[0],alphaik,alphajk) + D_y = hermite_gauss_coeff(ma,mb,1,IJ[1],alphaik,alphajk,gamma,temp_gamma) + PC[1]*hermite_gauss_coeff(ma,mb,0,IJ[1],alphaik,alphajk,gamma,temp_gamma) + # D = E(m1,m2,0,A[1]-B[1],a,b,1+n[1],A[1]-gOrigin[1]) + S3_y = hermite_gauss_coeff(na,nb,0,IJ[2],alphaik,alphajk) + result_y += S1_y*D_y*S3_y*np.power(PI/(gamma),1.5)*norm_contr_factor + + + S1_z = hermite_gauss_coeff(la,lb,0,IJ[0],alphaik,alphajk) + S2_z = hermite_gauss_coeff(ma,mb,0,IJ[1],alphaik,alphajk) + D_z = hermite_gauss_coeff(na,nb,1,IJ[2],alphaik,alphajk,gamma,temp_gamma) + PC[2]*hermite_gauss_coeff(na,nb,0,IJ[2],alphaik,alphajk,gamma,temp_gamma) + # D = E(n1,n2,0,A[2]-B[2],a,b,1+n[2],A[2]-gOrigin[2]) + result_z += S1_z*S2_z*D_z*np.power(PI/(gamma),1.5)*norm_contr_factor + # print(result_y) + + M[0, i - start_row, j - start_col] = result_x + M[1, i - start_row, j - start_col] = result_y + M[2, i - start_row, j - start_col] = result_z + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Mi,j=Mj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + M[0, i-start_row, j-start_col] = M[0, j-start_col, i-start_row] + M[1, i-start_row, j-start_col] = M[1, j-start_col, i-start_row] + M[2, i-start_row, j-start_col] = M[2, j-start_col, i-start_row] + + return M","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/nuc_mat_symm.py",".py","24370","479","import numpy as np +from numba import njit , prange + +from .integral_helpers import c2k, vlriPartial, Fboys, fastFactorial + +def nuc_mat_symm(basis, mol, slice=None, sqrt_ints4c2e_diag=None): + """""" + Compute the nuclear attraction matrix for a given basis and molecular geometry. + + This function evaluates the one-electron nuclear attraction integrals + ⟨χ_i | V_nuc | χ_j⟩, where V_nuc is the Coulombic potential from the atomic nuclei. + The integrals are computed between all basis functions defined in `basis` and + and the nuclei within the `mol` object. + So in principle, it can be used to compute the nuclear potential matrix due to the + nuclei in one molecule, in the basis of another molecule. + + Efficient Numba-accelerated routines are used to improve performance. + A partial block of the matrix can be computed by specifying a `slice`. + + Parameters + ---------- + basis : object + Basis set object with fields including: + - bfs_coords: Cartesian coordinates of basis function centers. + - bfs_coeffs: Contraction coefficients. + - bfs_expnts: Gaussian exponents. + - bfs_prim_norms: Normalization constants for primitives. + - bfs_contr_prim_norms: Normalization constants for contracted functions. + - bfs_lmn: Angular momentum quantum numbers (ℓ, m, n). + - bfs_nprim: Number of primitives per basis function. + - bfs_nao: Number of atomic orbitals (contracted basis functions). + + mol : object + Molecule object containing: + - coordsBohrs: Cartesian coordinates of nuclei (in Bohr). + - Zcharges: Nuclear charges. + - natoms: Number of atoms. + + slice : list of int, optional + A 4-element list `[start_row, end_row, start_col, end_col]` defining + the sub-block of the matrix to compute. Rows and columns refer to AOs. + If `None` (default), the entire nuclear attraction matrix is computed. + + sqrt_ints4c2e_diag : ndarray, optional + Optional Schwarz screening preconditioner. + If provided, Schwarz screening is enabled to skip insignificant integrals. + If `None` (default), all integrals are computed without screening. + + Returns + ------- + V : ndarray of shape (end_row - start_row, end_col - start_col) + The computed (sub)matrix of nuclear attraction integrals. + + Notes + ----- + The integrals are evaluated using standard expressions over contracted Gaussians. + If Schwarz screening is used (`sqrt_ints4c2e_diag` is not None), a threshold-based + pruning is applied using precomputed upper bounds. + + Examples + -------- + >>> V = nuc_mat_symm(basis, mol) + >>> V_block = nuc_mat_symm(basis, mol, slice=[0, 10, 0, 10]) + >>> V_schwarz = nuc_mat_symm(basis, mol, sqrt_ints4c2e_diag=sqrt_diag) + """""" + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the nuclear matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + coordsBohrs = np.array([mol.coordsBohrs]) + Z = np.array([mol.Zcharges]) + natoms = mol.natoms + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # print([a,b,c,d]) + + if sqrt_ints4c2e_diag is None: + #Create dummy array + sqrt_ints4c2e_diag = np.zeros((1,1), dtype=np.float64) + isSchwarz = False + else: + isSchwarz = True + + V = nuc_mat_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, Z[0], coordsBohrs[0], natoms, sqrt_ints4c2e_diag, isSchwarz) + + return V + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def nuc_mat_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, Z, coordsMol, natoms, sqrt_ints4c2e_diag, isSchwarz = False): + # This function calculates the nuclear potential matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + #Using numba-scipy allows us to use scipy.special.gamma and gamminc, + #however, this prevents the caching functionality. Nevertheless, + #apart form the compilation overhead, it allows to perform calculaitons significantly faster and with good + #accuracy. + + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # print(both_tri_symm) + + # Initialize the matrix with zeros + V = np.zeros(matrix_shape) + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + + + #Loop over BFs + for i in prange(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + for j in prange(start_col, end_col): + + + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + if isSchwarz: + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if sqrt_ij*sqrt_ij<1e-13: + continue + result = 0.0 + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + # IJsq = IJ[0]*IJ[0] + IJ[1]*IJ[1] + IJ[2]*IJ[2] #Dot product + + Nj = bfs_contr_prim_norms[j] + + temp_NiNj = Ni*Nj + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + + facl = np.zeros(la+lb+1) + facm = np.zeros(ma+mb+1) + facn = np.zeros(na+nb+1) + F_ = np.zeros((la+lb+ma+mb+na+nb+1)) + vntk = np.zeros((na+nb+1, (na+nb)//2+1, (na+nb)//2+1)) # Good for upto j shells; j orbitals have an angular momentum of 7; + vmsj = np.zeros((ma+mb+1, (ma+mb)//2+1, (ma+mb)//2+1)) # Good for upto j shells; j orbitals have an angular momentum of 7; + + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + temp_alphaikIjsq = alphaik*IJsq + temp_alphaikI = alphaik*I + temp_NiNjNikdik = temp_NiNj*Nik*dik + if abs(temp_NiNjNikdik)<1e-10: + continue + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + # screenfactor = np.exp(-alphaik*alphajk*gamma_inv*IJsq) + screenfactor = np.exp(-temp_alphaikIjsq*alphajk*gamma_inv) + if screenfactor<1.0e-8: + # Going lower than E-8 doesn't change the max error. There could still be some effects from error compounding but the max error doesnt budge. + #TODO: This is quite low. But since this is the slowest part. + #But I had to do this because this is a very slow part of the program. + #Will have to check how the accuracy is affected and if the screening factor + #can be reduced further. + continue + tempfac = (PIx2*gamma_inv)*screenfactor + if abs(tempfac)<1e-10: + continue + + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + # screenfactor_2 = djk*Njk*temp_NiNjNikdik*screenfactor*gamma_inv*np.sqrt(gamma_inv)*15.5031383401 + # if abs(screenfactor_2)<1.0e-10: # The threshold used here should be the same as Schwarz screening threshold (for 4c2e and 3c2e ERIs) + # continue + + epsilon = 0.25*gamma_inv + P = (temp_alphaikI + alphajk*J)*gamma_inv + PI = P - I + PJ = P - J + + + for l in range(0, la+lb+1): + facl[l] = c2k(l,la,lb,PI[0],PJ[0]) + for m in range(0, ma+mb+1): + facm[m] = c2k(m,ma,mb,PI[1],PJ[1]) + for n in range(0, na+nb+1): + facn[n] = c2k(n,na,nb,PI[2],PJ[2]) + + + Vc = 0.0 + #Loop over nuclei + for iatom in range(natoms): #Parallelising over atoms seems to be faster for Cholestrol.xyz with def2-QZVPPD (628 sec) + Rc = coordsMol[iatom] + Zc = Z[iatom] + PC = P - Rc + temp_gamma_sum_PCsq = gamma*np.sum(PC**2) + # temp_gamma_sum_PCsq = gamma*(PC[0]*PC[0] + PC[1]*PC[1] + PC[2]*PC[2]) #Dot product + + fac1 = -Zc*tempfac + # if abs(fac1)<1e-10: + # continue + sum_Vl = 0.0 + + for li in range(la+lb+ma+mb+na+nb + 1): + F_[li] = Fboys(li,temp_gamma_sum_PCsq) + for m in range(0,ma+mb+1): + # if abs(facm[m])<1e-10: + # continue + for s in range(0, int(m/2)+1): + for j1 in range(0, int((m-2*s)/2)+1): + vmsj[m,s,j1] = vlriPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm[m] + for n in range(0,na+nb+1): + # if abs(facn[n])<1e-10: + # continue + for t in range(0, int(n/2)+1): + for k in range(0, int((n-2*t)/2)+1): + vntk[n,t,k] = vlriPartial(PC[2],n,t,k)*epsilon**(t+k)*facn[n] + + + for l in range(0,la+lb+1): + # if abs(facl[l])<1e-10: + # continue + # facl = c2k(l,la,lb,PI[0],PJ[0]) + # fac_l = fastFactorial(l) + for r in range(0, int(l/2)+1): + # fac_r = fastFactorial(r) + for i1 in range(0, int((l-2*r)/2)+1): + v_lri = vlriPartial(PC[0],l,r,i1)*epsilon**(r+i1)*facl[l] + if abs(v_lri)< 1e-10: + continue + # v_lri = (-1)**l*((-1)**i1*fac_l*PC[0]**(l-2*r-2*i1)/(fac_r*fastFactorial(i1)*fastFactorial(l-2*r-2*i1)))*epsilon**(r+i1)*facl[l] + sum_Vm = 0.0 + for m in range(0,ma+mb+1): + # facm = c2k(m,ma,mb,PI[1],PJ[1]) + # fac_m = fastFactorial(m) + for s in range(0, int(m/2)+1): + # fac_s = fastFactorial(s) + for j1 in range(0, int((m-2*s)/2)+1): + # v_msj = vlriPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm[m] + v_msj = vmsj[m,s,j1] + # v_msj = (-1)**m*((-1)**j1*fac_m*PC[1]**(m-2*s-2*j1)/(fac_s*fastFactorial(j1)*fastFactorial(m-2*s-2*j1)))*epsilon**(s+j1)*facm[m] + sum_Vn = 0.0 + for n in range(0,na+nb+1): + # facn = c2k(n,na,nb,PI[2],PJ[2]) + # fac_n = fastFactorial(n) + for t in range(0, int(n/2)+1): + # fac_t = fastFactorial(t) + for k in range(0, int((n-2*t)/2)+1): + # v_ntk = vlriPartial(PC[2],n,t,k)*epsilon**(t+k)*facn[n] + v_ntk = vntk[n,t,k] + # v_ntk = (-1)**n*((-1)**k*fac_n*PC[2]**(n-2*t-2*k)/(fac_t*fastFactorial(k)*fastFactorial(n-2*t-2*k)))*epsilon**(t+k)*facn[n] + # F = Fboys(l+m+n-2*(r+s+t)-(i1+j1+k),temp_gamma_sum_PCsq) + F = F_[l+m+n-2*(r+s+t)-(i1+j1+k)] + + sum_Vn += v_ntk*F + sum_Vm += v_msj*sum_Vn + sum_Vl += v_lri*sum_Vm + + Vc += sum_Vl*fac1 + result += Vc*djk*Njk*temp_NiNjNikdik + V[i - start_row, j - start_col] = result + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Vi,j=Vj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + V[i-start_row, j-start_col] = V[j-start_col, i-start_row] + + return V + +# This version parallelizes over atoms +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def nuc_mat_symm_internal2(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, Z, coordsMol, natoms): + # This function calculates the nuclear potential matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + #Using numba-scipy allows us to use scipy.special.gamma and gamminc, + #however, this prevents the caching functionality. Nevertheless, + #apart form the compilation overhead, it allows to perform calculaitons significantly faster and with good + #accuracy. + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # print(both_tri_symm) + + # Initialize the matrix with zeros + V = np.zeros(matrix_shape) + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + + #Loop over nuclei + for iatom in prange(natoms): #Parallelising over atoms seems to be faster for Cholestrol.xyz with def2-QZVPPD (628 sec) + Rc = coordsMol[iatom] + Zc = Z[iatom] + + #Loop over BFs + for i in range(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + for j in range(start_col, end_col): + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result = 0.0 + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + screenfactor = np.exp(-alphaik*alphajk*gamma_inv*IJsq) + if abs(screenfactor)<1.0e-8: + # Going lower than E-8 doesn't change the max erroor. There could still be some effects from error compounding but the max error doesnt budge. + #TODO: This is quite low. But since this is the slowest part. + #But I had to do this because this is a very slow part of the program. + #Will have to check how the accuracy is affected and if the screening factor + #can be reduced further. + continue + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + epsilon = 0.25*gamma_inv + P = (alphaik*I + alphajk*J)*gamma_inv + PC = P - Rc + PI = P - I + PJ = P - J + tempfac = (PIx2*gamma_inv)*screenfactor + + Vc = 0.0 + + + fac1 = -Zc*tempfac + #print(fac1) + sum_Vl = 0.0 + + + for l in range(0,la+lb+1): + facl = c2k(l,la,lb,PI[0],PJ[0]) + for r in range(0, int(l/2)+1): + for i1 in range(0, int((l-2*r)/2)+1): + v_lri = vlriPartial(PC[0],l,r,i1)*epsilon**(r+i1)*facl + sum_Vm = 0.0 + for m in range(0,ma+mb+1): + facm = c2k(m,ma,mb,PI[1],PJ[1]) + for s in range(0, int(m/2)+1): + for j1 in range(0, int((m-2*s)/2)+1): + v_msj = vlriPartial(PC[1],m,s,j1)*epsilon**(s+j1)*facm + sum_Vn = 0.0 + for n in range(0,na+nb+1): + facn = c2k(n,na,nb,PI[2],PJ[2]) + for t in range(0, int(n/2)+1): + for k in range(0, int((n-2*t)/2)+1): + v_ntk = vlriPartial(PC[2],n,t,k)*epsilon**(t+k)*facn + F = Fboys(l+m+n-2*(r+s+t)-(i1+j1+k),gamma*np.sum(PC**2)) + + sum_Vn += v_ntk*F + sum_Vm += v_msj*sum_Vn + sum_Vl += v_lri*sum_Vm + + Vc += sum_Vl*fac1 + result += Vc*dik*djk*Nik*Njk*Ni*Nj + V[i - start_row, j - start_col] += result + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Vi,j=Vj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + V[i-start_row, j-start_col] = V[j-start_col, i-start_row] + + return V + ","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/integral_helpers.py",".py","12563","308","from scipy.special import factorial, factorial2, binom, hyp1f1, gammainc, gamma # , comb +import numpy as np +from numba import njit +import math +# +# +# .d8888b. Y88b d88P 8888888b. 8888888888 888 +# d88P Y88b Y88b d88P 888 Y88b 888 888 +# 888 888 Y88o88P 888 888 888 888 +# 888 888d888 888 888 .d8888b Y888P 888 d88P 888 888 8888888 .d88b. .d8888b 888 888 +# 888 888P"" 888 888 88K d888b 8888888P"" 888 888 888 d88""""88b d88P"" 888 .88P +# 888 888 888 888 888 ""Y8888b. d88888b 888888 888 888 888 888 888 888 888 888888K +# Y88b d88P 888 Y88b 888 X88 d88P Y88b 888 Y88b 888 888 Y88..88P Y88b. 888 ""88b +# ""Y8888P"" 888 ""Y88888 88888P' d88P Y88b 888 ""Y88888 888 ""Y88P"" ""Y8888P 888 888 +# 888 888 +# Y8b d88P Y8b d88P +# ""Y88P"" ""Y88P"" + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def fac(n): + if n <= 0: + return 1 + else: + return n * doublefactorial(n-1) + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def fastFactorial_old(n): + # loop is working the best + if n<= 1: + return 1 + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + +LOOKUP_TABLE = np.array([ + 1, 1, 2, 6, 24, 120, 720, 5040, 40320, + 362880, 3628800, 39916800, 479001600, + 6227020800, 87178291200, 1307674368000, + 20922789888000, 355687428096000, 6402373705728000, + 121645100408832000, 2432902008176640000], dtype='int64') + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def fastFactorial(n): + # 2-3x faster than the fastFactorial_old for values less than 21 + if n<= 1: + return 1 + elif n<=20: + return LOOKUP_TABLE[n] + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def comb(x, y): + if y == 0: + return 1 + if x == y: + return 1 + binom = fastFactorial(x) // fastFactorial(y) // fastFactorial(x - y) + return binom + +# More compilation time +# @njit(cache=True, fastmath=True, error_model=""numpy"") +# def comb(x, y): +# return binom(float(x), float(y)) + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def doublefactorial_old(n): +# Double Factorial Implementation based on recursion (not numba friendly) + if n <= 0: + return 1 + else: + return n * doublefactorial(n-2) + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def doublefactorial(n): + if n <= 0: + return 1 + else: + result = 1 + for i in range(n, 0, -2): + result *= i + return result + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def c2k(k,la,lb,PA,PB): + temp = 0.0 + for i in range(la+1): + if i>k: + continue + factor1 = comb(la,i) + factor2 = PA**(la-i) + for j in range(lb+1): + # if j>k: + # continue + if (i+j)==k : + temp += factor1*comb(lb,j)*factor2*PB**(lb-j) + return temp + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def calcS(la,lb,gamma,PA,PB): + temp = 0.0 + fac1 = np.sqrt(np.pi/gamma) + fac2 = 2*gamma + for k in range(0, int((la+lb)/2)+1): + temp += c2k(2*k,la,lb,PA,PB)*fac1*doublefactorial(2*k-1)/(fac2)**k + return temp + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def vlriPartial(Ci, l,r,i): + return (-1)**l*((-1)**i*fastFactorial(l)*Ci**(l-2*r-2*i)/(fastFactorial(r)*fastFactorial(i)*fastFactorial(l-2*r-2*i))) + + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def Fboys_old(v,x): + # From: https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + #from scipy.special import gammainc, gamma + if x >= 0 and x < 0.0000001: + F = 1/(2*v+1) - x/(2*v+3) + else: + F = 0.5*x**(-(v+0.5))*gammainc(v+0.5,x)*gamma(v+0.5) + return F + + +# Adapted from +# ---------- +# McMurchie-Davidson project: +# https://github.com/jjgoings/McMurchie-Davidson +# Licensed under the BSD-3-Clause license +@njit(cache=True) +def Fboys_jjgoings(v,x): + #from scipy.special import hyp1f1 + F = hyp1f1(v+0.5,v+1.5,-x)/(2.0*v+1.0) + return F + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def theta(l,la,lb,PA,PB,gamma_,r): + return c2k(l,la,lb,PA,PB)*fastFactorial(l)*(gamma_**(r-l))/(fastFactorial(r)*fastFactorial(l-2*r)) + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def g(lp,lq,rp,rq,i,la,lb,lc,ld,gammaP,gammaQ,PA,PB,QC,QD,PQ,delta): + temp = ((-1)**lp)*theta(lp,la,lb,PA,PB,gammaP,rp)*theta(lq,lc,ld,QC,QD,gammaQ,rq) + numerator = temp*((-1)**i)*((2*delta)**(2*(rp+rq)))*fastFactorial(lp+lq-2*rp-2*rq)*(delta**i)*(PQ**(lp+lq-2*(rp+rq+i))) + denominator = ((4*delta)**(lp+lq))*fastFactorial(i)*fastFactorial(lp+lq-2*(rp+rq+i)) + # print(numerator/temp) + return (numerator/denominator) + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta): + sum1 = 0.0 + for lp in range(0,la+lb+1): + for rp in range(0, int(lp/2)+1): + for lq in range(0, lc+ld+1): + for rq in range(0, int(lq/2)+1): + for i1 in range(0,int((lp+lq-2*rp-2*rq)/2)+1): + gx = g(lp,lq,rp,rq,i1,la,lb,lc,ld,gammaP,gammaQ,PI[0],PJ[0],QK[0],QL[0],PQ[0],delta) + sum2 = 0.0 + for mp in range(0,ma+mb+1): + for sp in range(0, int(mp/2)+1): + for mq in range(0, mc+md+1): + for sq in range(0, int(mq/2)+1): + for j1 in range(0,int((mp+mq-2*sp-2*sq)/2)+1): + gy = g(mp,mq,sp,sq,j1,ma,mb,mc,md,gammaP,gammaQ,PI[1],PJ[1],QK[1],QL[1],PQ[1],delta) + sum3 = 0.0 + for np1 in range(0,na+nb+1): + for tp in range(0, int(np1/2)+1): + for nq in range(0, nc+nd+1): + for tq in range(0, int(nq/2)+1): + for k1 in range(0,int((np1+nq-2*tp-2*tq)/2)+1): + gz = g(np1,nq,tp,tq,k1,na,nb,nc,nd,gammaP,gammaQ,PI[2],PJ[2],QK[2],QL[2],PQ[2],delta) + v = lp+lq+mp+mq+np1+nq-2*(rp+rq+sp+sq+tp+tq)-(i1+j1+k1) + F = Fboys(v,PQsqBy4delta) + sum3 = sum3 + gz*F + sum2 = sum2 + gy*sum3 + sum1 = sum1 + gx*sum2 + return sum1 + +@njit(cache=False, fastmath=True, error_model=""numpy"") +def hermite_gauss_coeff(i,j,t,Qx,a,b,p=None,q=None): + ''' Recursive definition of Hermite Gaussian coefficients. + Returns a float. + Adapted from + ---------- + McMurchie-Davidson project: + https://github.com/jjgoings/McMurchie-Davidson + Licensed under the BSD-3-Clause license + Source: https://github.com/jjgoings/McMurchie-Davidson/blob/master/mmd/integrals/reference.py + a: orbital exponent on Gaussian 'a' (e.g. alpha in the text) + b: orbital exponent on Gaussian 'b' (e.g. beta in the text) + i,j: orbital angular momentum number on Gaussian 'a' and 'b' + t: number nodes in Hermite (depends on type of integral, + e.g. always zero for overlap integrals) + Qx: distance between origins of Gaussian 'a' and 'b' + ''' + if p is None: + p = a + b + if q is None: + q = a*b/p + if (t < 0) or (t > (i + j)): + # out of bounds for t + return 0.0 + elif i == j == t == 0: + # base case + return np.exp(-q*Qx*Qx) # K_AB + elif j == 0: + # decrement index i + return (1/(2*p))*hermite_gauss_coeff(i-1,j,t-1,Qx,a,b,p,q) - \ + (q*Qx/a)*hermite_gauss_coeff(i-1,j,t,Qx,a,b,p,q) + \ + (t+1)*hermite_gauss_coeff(i-1,j,t+1,Qx,a,b,p,q) + else: + # decrement index j + return (1/(2*p))*hermite_gauss_coeff(i,j-1,t-1,Qx,a,b,p,q) + \ + (q*Qx/b)*hermite_gauss_coeff(i,j-1,t,Qx,a,b,p,q) + \ + (t+1)*hermite_gauss_coeff(i,j-1,t+1,Qx,a,b,p,q) + + + +@njit(cache=False, fastmath=True, error_model=""numpy"") +def aux_hermite_int(t,u,v,n,p,PCx,PCy,PCz,RPC,T=None,boys=None,n_min=None): + ''' Returns the Coulomb auxiliary Hermite integrals + Returns a float. + Adapted from + ---------- + McMurchie-Davidson project: + https://github.com/jjgoings/McMurchie-Davidson + Licensed under the BSD-3-Clause license + Source: https://github.com/jjgoings/McMurchie-Davidson/blob/master/mmd/integrals/reference.py + Arguments: + t,u,v: order of Coulomb Hermite derivative in x,y,z + (see defs in Helgaker and Taylor) + n: order of Boys function + PCx,y,z: Cartesian vector distance between Gaussian + composite center P and nuclear center C + RPC: Distance between P and C + ''' + if T is None: + T = p*RPC*RPC + val = 0.0 + # print(t,u,v,n) + if t == u == v == 0: + # print(t,u,v,n) + # print(n_min) + # print('here1') + if boys is None and n_min is None: + # print('Here') + val += np.power(-2*p,n)*Fboys(n,T) + else: + # print('sss') + val += boys[n-n_min] + elif t == u == 0: + # print('here2') + if v > 1: + # print('here3') + val += (v-1)*aux_hermite_int(t,u,v-2,n+1,p,PCx,PCy,PCz,RPC,T,boys,n_min) + # print('here4') + val += PCz*aux_hermite_int(t,u,v-1,n+1,p,PCx,PCy,PCz,RPC,T,boys,n_min) + elif t == 0: + # print('here5') + if u > 1: + # print('here6') + val += (u-1)*aux_hermite_int(t,u-2,v,n+1,p,PCx,PCy,PCz,RPC,T,boys,n_min) + val += PCy*aux_hermite_int(t,u-1,v,n+1,p,PCx,PCy,PCz,RPC,T,boys,n_min) + else: + if t > 1: + # print('here7') + val += (t-1)*aux_hermite_int(t-2,u,v,n+1,p,PCx,PCy,PCz,RPC,T,boys,n_min) + val += PCx*aux_hermite_int(t-1,u,v,n+1,p,PCx,PCy,PCz,RPC,T,boys,n_min) + return val + + +# Alternative boys implementation from this repo: https://github.com/peter-reinholdt/pyboys +# The repo has the BSD-3 license. +# This implementation is faster and it should help provide upto +# 10-40 percent speed up. +# Another advantage of this implementation is that it can be cached by Numba, since it is not dependent on the functions +# from numba scipy package. +import math +from .taylor import taylor + +TAYLOR_THRESHOLD = -25.0 + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def hyp0minus(x): + z = math.sqrt(-x) + return 0.5 * math.erf(z) * math.sqrt(math.pi) / z + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def hyp1f1_(m, z): + # print('here') + if z < TAYLOR_THRESHOLD: + return hyp0minus(z) if m == 0 else (hyp1f1_(m-1, z)*(2*m+1) - math.exp(z)) / (-2*z) + else: + # print('taylor') + return taylor(m, z) + + +@njit(cache=True, fastmath=True, error_model=""numpy"") +def Fboys(m, T): + return hyp1f1_(m, -T) / (2*m+1)","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/eval_xc_3.py",".py","22957","410","import numpy as np +import numexpr +import pylibxc +from timeit import default_timer as timer +# from time import process_time +from pyfock import Integrals +from opt_einsum import contract +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +import numba +# import ray + +# funcx_global = pylibxc.LibXCFunctional(1, ""unpolarized"") +# funcc_global = pylibxc.LibXCFunctional(7, ""unpolarized"") + +def eval_xc_3(basis, dmat, weights, coords, funcid=[1,7], spin=0, ncores=2, blocksize=5000, list_nonzero_indices=None, count_nonzero_indices=None, list_ao_values=None, list_ao_grad_values=None, debug=False): + # This performs parallelization at the blocks/batches level. + # Therefore, joblib is perfect for such embarrasingly parallel task + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + try: + import ray + except ImportError: + raise ImportError( + ""The 'ray' dependency is required for this feature.\n"" + ""Install it with: pip install ray"" + ) + # Start Ray. + if not ray.is_initialized(): + ray.init(num_cpus = ncores-1) + + #OUTPUT + #Functional energy + efunc = 0.0 + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + # with threadpool_limits(limits=1, user_api='blas'): + v = np.zeros((basis.bfs_nao, basis.bfs_nao)) + nelec = 0 + + # TODO it only works for LDA functionals for now. + # Need to make it work for GGA, Hybrid, range-separated Hybrid and MetaGGA functionals as well. + + + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + + # print('Number of blocks: ', nblocks) + + # Some stuff to note timings + timings = None + if debug: + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to evalbfnumba1 faster by skipping the mediator evalbfnumbawrap function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = Integrals.bf_val_helpers.eval_bfs(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + bfs_data_as_np_arrays = [bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff] + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + # weights_put = ray.put(weights) + # coords_put = ray.put(coords) + bfs_data_as_np_arrays = ray.put(bfs_data_as_np_arrays) + if list_nonzero_indices is not None: + if list_ao_values is not None: + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + # Launch four parallel square tasks + futures = [block_dens_func.remote(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], funcx=None, funcc=None, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in range(nblocks+1)] + # else: #GGA + # output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=batch_size)(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], list_ao_grad_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in block_indices) + # else: + # output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=batch_size)(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in block_indices) + # else: + # output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=batch_size)(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in block_indices) + + # Retrieve results + output = ray.get(futures) + + for iblock in range(nblocks+1): + efunc += output[iblock][0] + if list_nonzero_indices is not None: + non_zero_indices = list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]] + v[np.ix_(non_zero_indices, non_zero_indices)] += output[iblock][1] + # v[np.ix_(non_zero_indices, non_zero_indices)] = numexpr.evaluate(""(v_ + output_)"", {'v_':v[np.ix_(non_zero_indices, non_zero_indices)], 'output_':output[indx_block_output][1]}) + else: + v += output[iblock][1] + nelec += output[iblock][2] + if debug: + timings['durationLibxc'] += output[iblock][3]['durationLibxc'] + timings['durationE'] += output[iblock][3]['durationE'] + timings['durationF'] += output[iblock][3]['durationF'] + timings['durationZ'] += output[iblock][3]['durationZ'] + timings['durationV'] += output[iblock][3]['durationV'] + timings['durationRho'] += output[iblock][3]['durationRho'] + timings['durationAO'] += output[iblock][3]['durationAO'] + # v = numexpr.evaluate('(v + output[iblock][1])') + + + + numba.set_num_threads(ncores) + print('Number of electrons: ', nelec) + if debug: + print('Timings:', timings) + + ####### Free memory + ## The following is very important to prevent memory leaks and also to make sure that the number of + # threads used by the program is same as that specified by the user + # gc.collect() # Avoiding using it for now, as it is usually quite slow, although in this case it might not make much difference + # Anyway, the following also works + output = 0 + non_zero_indices = 0 + coords = 0 + + return efunc, v + +try: + import ray + @ray.remote(num_cpus=1) + def block_dens_func(weights_block, coords_block, dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, ao_grad_values=None, funcx=None, funcc=None, x_family_code=None, c_family_code=None, xc_family_dict=None, debug=False): + numba.set_num_threads(1) + with threadpool_limits(limits=1, user_api='blas'): + ### Use threadpoolctl https://github.com/numpy/numpy/issues/11826 + # to set the number of threads to 1 + # https://github.com/joblib/threadpoolctl + # https://stackoverflow.com/questions/29559338/set-max-number-of-threads-at-runtime-on-numpy-openblas + + # global funcx_global + # global funcc_global + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + + + if funcx is None: + # xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + # funcx = funcx_global + # funcc = funcc_global + # x_family_code = funcx.get_family() + # c_family_code = funcc.get_family() + + + bfs_coords = bfs_data_as_np_arrays[0] + bfs_contr_prim_norms = bfs_data_as_np_arrays[1] + bfs_nprim = bfs_data_as_np_arrays[2] + bfs_lmn = bfs_data_as_np_arrays[3] + bfs_coeffs = bfs_data_as_np_arrays[4] + bfs_prim_norms = bfs_data_as_np_arrays[5] + bfs_expnts = bfs_data_as_np_arrays[6] + bfs_radius_cutoff = bfs_data_as_np_arrays[7] + + if debug: + startAO = timer() + # AO and Grad values + # LDA + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block = ao_values + else: + # ao_value_block = Integrals.evalBFsNumbawrap(basis, coords_block, parallel=False) + if non_zero_indices is not None: + ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + ao_value_block = Integrals.bf_val_helpers.eval_bfs_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + # GGA/MGGA (# If either x or c functional is of GGA/MGGA type we need ao_grad_values) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block, ao_values_grad_block = ao_values, ao_grad_values + else: + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, deriv=1, parallel=True, non_zero_indices=non_zero_indices) + if non_zero_indices is not None: + # Calculating ao values and gradients together, didn't really do much improvement in computational speed + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + if debug: + durationAO = durationAO + timer() - startAO + # print('Duration for AO values: ', durationAO) + + if debug: + startRho = timer() + if non_zero_indices is not None: + rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block) # Original (pretty fast) + else: + rho_block = Integrals.bf_val_helpers.eval_rho(ao_value_block, dmat) # This is by-far the fastest now (when not using non_zero_indices) <----- + # If either x or c functional is of GGA/MGGA type we need rho_grad_values too + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # rho_grad_block_x = contract('ij,mi,mj->m',dmat,ao_values_grad_block[0],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[0]) + # rho_grad_block_y = contract('ij,mi,mj->m',dmat,ao_values_grad_block[1],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[1]) + # rho_grad_block_z = contract('ij,mi,mj->m',dmat,ao_values_grad_block[2],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[2]) + # Condense all of the above einsum calls into just two calls + rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = ( contract('ij,kmi,mj->km',dmat,ao_values_grad_block,ao_value_block)+\ + contract('ij,mi,kmj->km',dmat,ao_value_block,ao_values_grad_block) )[:] + sigma_block = numexpr.evaluate('(rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2)') + if debug: + durationRho = timer() - startRho + # print('Duration for Rho at grid points: ',durationRho) + + + + #LibXC stuff + # Exchange + if debug: + startLibxc = timer() + + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[x_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # startLibxc = timer() + + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[c_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + if debug: + durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + if debug: + startE = timer() + #ENERGY----------- + e = retx['zk'] + retc['zk'] # Functional values at grid points + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + den = numexpr.evaluate('(rho_block*weights_block)') #elementwise multiply + # den = rho_block*weights_block #elementwise multiply + efunc = np.dot(den, e) #Multiply with functional values at grid points and sum + nelec = np.sum(den) + if debug: + durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + vrho = retx['vrho'] + retc['vrho'] + vsigma = 0 + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma = retx['vsigma'] + if xc_family_dict[c_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma += retc['vsigma'] + retx = 0 + retc = 0 + func = 0 + + if debug: + startF = timer() + v_rho_temp = vrho[:,0] + # F = weights_block*v_rho_temp + F = numexpr.evaluate('(weights_block*v_rho_temp)') + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + vsigma_temp = vsigma[:,0] + Ftemp = numexpr.evaluate('(2*weights_block*vsigma_temp)') + # Ftemp = 2*weights_block*vsigma[:,0] + Fx = numexpr.evaluate('(Ftemp*rho_grad_block_x)') + Fy = numexpr.evaluate('(Ftemp*rho_grad_block_y)') + Fz = numexpr.evaluate('(Ftemp*rho_grad_block_z)') + # Fx = Ftemp*rho_grad_block_x + # Fy = Ftemp*rho_grad_block_y + # Fz = Ftemp*rho_grad_block_z + if debug: + durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + + if debug: + startZ = timer() + ao_value_block_T = ao_value_block.T + # z = 0.5*F*ao_value_block_T + z = numexpr.evaluate('(0.5*F*ao_value_block_T)') + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + ao_value_gradx_block_T = ao_values_grad_block[0].T + ao_value_grady_block_T = ao_values_grad_block[1].T + ao_value_gradz_block_T = ao_values_grad_block[2].T + z = numexpr.evaluate('(z + Fx*ao_value_gradx_block_T + Fy*ao_value_grady_block_T + Fz*ao_value_gradz_block_T)') + # z = z + Fx*ao_values_grad_block[0].T + Fy*ao_values_grad_block[1].T + Fz*ao_values_grad_block[2].T + if debug: + durationZ = durationZ + timer() - startZ + # Free memory + F = 0 + v_rho_temp = 0 + Fx = 0 + Fy = 0 + Fz = 0 + Ftemp = 0 + vsigma_temp = 0 + if debug: + startV = timer() + v_temp = z @ ao_value_block # The fastest uptil now + # v_temp = np.dot(z, ao_value_block) + v_temp_T = v_temp.T + # v = v_temp + v_temp_T + v = numexpr.evaluate('(v_temp + v_temp_T)') + + + if debug: + durationV = durationV + timer() - startV + z = 0 + ao_value_block = 0 + rho_block = 0 + temp = 0 + vrho = 0 + weights_block=0 + coords_block=0 + func = 0 + dmat = 0 + v_temp_T = 0 + v_temp = 0 + + + + profiling_timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + # print(durationRho) + return efunc, v, nelec, profiling_timings +except ImportError: + pass +# Extremely slow +# @njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +# def symmetric_matrix_product(A, B): +# n = A.shape[0] +# C = np.zeros((n, n)) +# for i in range(n): +# for j in range(i, n): +# C[i, j] = np.dot(A[i,:], B[:, j]) + +# # Copy the upper triangular elements to the lower triangular part +# C += np.tril(C, k=-1).T + +# return C","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_helpers.py",".py","1134893","37624","import numpy as np +from numba import njit +from .integral_helpers import comb +import math + +''' +Most of the functions here are adapted from the following repository (MIT license) using Julia language +https://github.com/rpmuller/MolecularIntegrals.jl + +More specifically from this file: +https://github.com/rpmuller/MolecularIntegrals.jl/blob/master/src/Rys.jl +''' + +""Form coulomb repulsion integral using Rys quadrature"" +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True, inline='always')#, locals=dict(ijkl=np.float32, Ix=np.float32, Iy=np.float32, Iz=np.float32, val=np.float32) +def coulomb_rys(roots,weights,G,rpq2, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L): + X = rpq2*rho + + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + # G = np.zeros((n+1,m+1)) + + roots, weights = Roots(norder,X,roots,weights) + A = alphaik+alphajk + B = alphakk+alphalk + Ap = alphaik*alphajk + Bp = alphakk*alphalk + ABsrt = np.sqrt(A*B) + + ijkl = 0.0 + for i in range(norder): + G = Recur(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + + Ix = Int1d(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0], + alphaik,alphajk,alphakk,alphalk) + + G = Recur(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + Iy = Int1d(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1], + alphaik,alphajk,alphakk,alphalk) + + G = Recur(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + + Iz = Int1d(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2], + alphaik,alphajk,alphakk,alphalk) + ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + + + + val = 2*np.sqrt(rho/np.pi)*ijkl # ABD eq 5 & 9 + + + return val + +""Form coulomb repulsion integral using Rys quadrature"" +@njit(cache=True, fastmath=True, error_model='numpy', nogil=True, inline='always')#, locals=dict(ijkl=np.float32, Ix=np.float32, Iy=np.float32, Iz=np.float32, val=np.float32) +def coulomb_rys_3c2e(roots,weights,G,rpq2, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L,P): + X = rpq2*rho + roots, weights = Roots(norder,X,roots,weights) + A = alphaik+alphajk + B = alphakk#+alphalk + Ap = alphaik*alphajk + ABsrt = np.sqrt(A*B) + # value = np.pi*np.exp(-Ap*(I-J)**2/A )/ABsrt + IJ = I-J + # KL = K + + ijkl = 0.0 + tot_ang = la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd + pi = 3.141592653589793 + + if tot_ang==1 and (la+ma+na==1): + ooopt = 1/(1+roots[0]) + G00_x = pi*math.exp(-Ap*(IJ[0])**2/A)/ABsrt + G00_y = pi*math.exp(-Ap*(IJ[1])**2/A)/ABsrt + G00_z = pi*math.exp(-Ap*(IJ[2])**2/A)/ABsrt + + + for i in range(norder): + root_i = roots[i] + weight_i = weights[i] + if tot_ang==0: + G00 = np.pi / ABsrt + Ap_over_A = Ap / A + exp_factor = math.exp(-Ap_over_A * (IJ[0]*IJ[0] + IJ[1]*IJ[1] + IJ[2]*IJ[2])) + ijkl += G00 * G00 * G00 * exp_factor * weights[0] + return 2*np.sqrt(rho/pi)*ijkl + elif tot_ang == 1 and la + ma + na == 1: + ooopt = 1.0 / (1.0 + roots[0]) + G00_base = pi / ABsrt + + # Vectorize the exponential calculations + Ap_IJ2 = Ap * (IJ * IJ) / A # Element-wise for all 3 components + G00_vec = G00_base * np.exp(-Ap_IJ2) # [G00_x, G00_y, G00_z] + + # Compute C factor for the dimension with l=1 + if la == 1: + C = (P[0]-I[0])*ooopt + (B*(K[0]-I[0])+A*(P[0]-I[0]))*roots[0]*ooopt/(A+B) + Ix = C * G00_vec[0] + Iy = G00_vec[1] + Iz = G00_vec[2] + elif ma == 1: + C = (P[1]-I[1])*ooopt + (B*(K[1]-I[1])+A*(P[1]-I[1]))*roots[0]*ooopt/(A+B) + Ix = G00_vec[0] + Iy = C * G00_vec[1] + Iz = G00_vec[2] + else: # na == 1 + C = (P[2]-I[2])*ooopt + (B*(K[2]-I[2])+A*(P[2]-I[2]))*roots[0]*ooopt/(A+B) + Ix = G00_vec[0] + Iy = G00_vec[1] + Iz = C * G00_vec[2] + + ijkl += Ix * Iy * Iz * weights[0] + return 2*np.sqrt(rho/pi)*ijkl + else: + G = Recur_3c2e(G,root_i,la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + Ix = Shift_3c2e(G,la,lb,lc,ld,IJ[0]) + G = Recur_3c2e(G,root_i,ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + Iy = Shift_3c2e(G,ma,mb,mc,md,IJ[1]) + G = Recur_3c2e(G,root_i,na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + Iz = Shift_3c2e(G,na,nb,nc,nd,IJ[2]) + ijkl += Ix*Iy*Iz*weight_i # ABD eq 5 & 9 + + + val = 2*np.sqrt(rho/pi)*ijkl # ABD eq 5 & 9 + + return val + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True)#, locals=dict(ijkl=np.float32, Ix=np.float32, Iy=np.float32, Iz=np.float32, val=np.float32) +def coulomb_rys_new(roots,weights,G,rpq2, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L): + X = rpq2*rho + # print('s') + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + # G = np.zeros((n+1,m+1)) + + roots, weights = Roots(norder,X,roots,weights) + A = alphaik+alphajk + B = alphakk+alphalk + Ap = alphaik*alphajk + Bp = alphakk*alphalk + ABsrt = np.sqrt(A*B) + + value = np.pi*np.exp(-Ap*(I-J)**2/A - Bp*(K-L)**2/B)/ABsrt + P = (alphaik*I+alphajk*J)/A + Q = (alphakk*K+alphalk*L)/B + IJ = I-J + KL = K-L + + + ijkl = 0.0 + for i in range(norder): + G = Recur_new(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],A,B,value[0],P[0],Q[0]) + # Ix = Int1d(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0], + # alphaik,alphajk,alphakk,alphalk) + Ix = Shift(G,la,lb,lc,ld,IJ[0],KL[0]) + + G = Recur_new(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],A,B,value[1],P[1],Q[1]) + # Iy = Int1d(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1], + # alphaik,alphajk,alphakk,alphalk) + Iy = Shift(G,ma,mb,mc,md,IJ[1],KL[1]) + + G = Recur_new(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],A,B,value[2],P[2],Q[2]) + # Iz = Int1d(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2], + # alphaik,alphajk,alphakk,alphalk) + Iz = Shift(G,na,nb,nc,nd,IJ[2],KL[2]) + + ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + + + + val = 2*np.sqrt(rho/np.pi)*ijkl # ABD eq 5 & 9 + + + return val + +""Should be Faster but isn't"" +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True)#, locals=dict(ijkl=np.float32, Ix=np.float32, Iy=np.float32, Iz=np.float32, val=np.float32) +def coulomb_rys_fast(roots,weights,G,norder,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L,X,A,B,Ap,Bp,ABsrt,factor,P,Q): + + roots, weights = Roots(norder,X,roots,weights) + + ijkl = 0.0 + for i in range(norder): + G = Recur_fast(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt,P[0],Q[0]) + + Ix = Int1d(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0], + alphaik,alphajk,alphakk,alphalk) + + G = Recur_fast(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt,P[1],Q[1]) + Iy = Int1d(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1], + alphaik,alphajk,alphakk,alphalk) + + G = Recur_fast(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt,P[2],Q[2]) + + Iz = Int1d(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2], + alphaik,alphajk,alphakk,alphalk) + ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + + + + val = factor*ijkl # ABD eq 5 & 9 + + + return val + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True, inline='always') +def Int1d(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal): + #G = RecurNumba2(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal) + return Shift(G,ix,jx,kx,lx,xi-xj,xk-xl) + +""Form G(n,m)=I(n,0,m,0) intermediate values for a Rys polynomial"" +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True, inline='always') +def Recur(G,t,i,j,k,l,xi,xj,xk,xl,alphai,alphaj,alphak,alphal,A,B,Ap,Bp,ABsrt): + # print('RecurNumba1', G[0,0]) + # G1 = np.zeros((n1+1,m1+1)) + + n = i+j + m = k+l + # A = alphai+alphaj + # B = alphak+alphal + Px = (alphai*xi+alphaj*xj)/A + Qx = (alphak*xk+alphal*xl)/B + + C,Cp,B0,B1,B1p = RecurFactors(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = np.pi*np.exp(-Ap*(xi-xj)**2/A - Bp*(xk-xl)**2/B)/ABsrt + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True, inline='always') +def Recur_3c2e(G,t,i,j,k,l,xi,xj,xk,xl,alphai,alphaj,alphak,alphal,A,B,Ap,ABsrt): + + n = i+j + m = k+l + Px = (alphai*xi+alphaj*xj)/A + Qx = (alphak*xk+alphal*xl)/B + pi = 3.141592653589793 + + C,Cp,B0,B1,B1p = RecurFactors(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = pi*np.exp(-Ap*(xi-xj)**2/A)/ABsrt + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +""Faster"" +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def Recur_fast(G,t,i,j,k,l,xi,xj,xk,xl,alphai,alphaj,alphak,alphal,A,B,Ap,Bp,ABsrt,Px,Qx): + # print('RecurNumba1', G[0,0]) + # G1 = np.zeros((n1+1,m1+1)) + + n = i+j + m = k+l + # A = alphai+alphaj + # B = alphak+alphal + # Px = (alphai*xi+alphaj*xj)/A + # Qx = (alphak*xk+alphal*xl)/B + + C,Cp,B0,B1,B1p = RecurFactors(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = np.pi*np.exp(-Ap*(xi-xj)**2/A + -Bp*(xk-xl)**2/B)/ABsrt + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +""Form G(n,m)=I(n,0,m,0) intermediate values for a Rys polynomial"" +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def Recur_new(G,t,i,j,k,l,xi,xj,xk,xl,A,B,value,Px,Qx): + # print('RecurNumba1', G[0,0]) + # G1 = np.zeros((n1+1,m1+1)) + + n = i+j + m = k+l + # A = alphai+alphaj + # B = alphak+alphal + # Px = (alphai*xi+alphaj*xj)/A + # Qx = (alphak*xk+alphal*xl)/B + + C,Cp,B0,B1,B1p = RecurFactors(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = value + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +# LOOKUP_TABLE_COMB = np.array([[ 1, 0, 0, 0, 0, 0], +# [ 1, 1, 0, 0, 0, 0], +# [ 1, 2, 1, 0, 0, 0], +# [ 1, 3, 3, 1, 0, 0], +# [ 1, 4, 6, 4, 1, 0], +# [ 1, 5, 10, 10, 5, 1]]) +LOOKUP_TABLE_COMB = np.array([ + [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 4, 6, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 5, 10, 10, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 6, 15, 20, 15, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 7, 21, 35, 35, 21, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0], + [ 1, 8, 28, 56, 70, 56, 28, 8, 1, 0, 0, 0, 0, 0, 0, 0], + [ 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 0, 0, 0, 0, 0, 0], + [ 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 0, 0, 0, 0, 0], + [ 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1, 0, 0, 0, 0], + [ 1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1, 0, 0, 0], + [ 1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1, 0, 0], + [ 1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1, 0], + [ 1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1] +]) +""Compute and output I(i,j,k,l) from I(i+j,0,k+l,0) (G)"" +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True, inline='always')#, locals=dict(ijkl=np.float32) +def Shift(G,i,j,k,l,xij,xkl): + + ijkl = 0.0 + for m in range(l+1): + ijm0 = 0.0 + if m<=5 and l<=5: + comb_2_ = LOOKUP_TABLE_COMB[l,m] + else: + comb_2_ = comb(l,m) + for n in range(j+1): + if n<=10 and j<=10: + comb_1_ = LOOKUP_TABLE_COMB[j,n] + else: + comb_1_ = comb(j,n) + ijm0 += comb_1_*xij**(j-n)*G[n+i,m+k] + + ijkl += comb_2_*xkl**(l-m)*ijm0 # I(i,j,k,l)<-I(i,j,m,0) + return ijkl + +@njit(cache=True, fastmath=True, error_model='numpy', nogil=True, inline='always') +def Shift_3c2e(G, i, j, k, l, xij): + if j == 0: # Common case - early exit + return G[i, k] + + else: + ijm0 = 0.0 + for n in range(j + 1): + if n < 10 and j < 10: + comb_1_ = LOOKUP_TABLE_COMB[j, n] + else: + comb_1_ = comb(j, n) + ijm0 += comb_1_ * xij**(j - n) * G[n + i, k] + + return ijm0 + +@njit(cache=True, fastmath=True, error_model='numpy', nogil=True, inline='always') +def RecurFactors(t, A, B, Px, Qx, xi, xk): + t_plus_1_inv = 1.0 / (1.0 + t) + A_plus_B_inv = 1.0 / (A + B) + fact = t * t_plus_1_inv * A_plus_B_inv + + half_t_plus_1_inv = 0.5 * t_plus_1_inv + B0 = 0.5 * fact + + # Combine divisions + A_inv = 1.0 / A + B_inv = 1.0 / B + B1 = half_t_plus_1_inv * A_inv + B0 + B1p = half_t_plus_1_inv * B_inv + B0 + + # Pre-compute differences + Px_xi = Px - xi + Qx_xi = Qx - xi + Qx_xk = Qx - xk + Px_xk = Px - xk + + # Algebraically simplified (factor out common terms) + # C = Px_xi * ooopt + (B*Qx_xi + A*Px_xi) * fact + # = Px_xi * (ooopt + A*fact) + B*Qx_xi*fact + C_factor = t_plus_1_inv + A * fact # ooopt + A*fact + C = Px_xi * C_factor + B * Qx_xi * fact + + # Cp = Qx_xk * ooopt + (B*Qx_xk + A*Px_xk) * fact + # = Qx_xk * (ooopt + B*fact) + A*Px_xk*fact + Cp_factor = t_plus_1_inv + B * fact # ooopt + B*fact + Cp = Qx_xk * Cp_factor + A * Px_xk * fact + + return C, Cp, B0, B1, B1p + +# @njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +# def RecurFactors_3c2e(t,A,B,Px,Qx,xi,xk): +# ooopt = 1/(1+t) +# fact = t*ooopt/(A+B) +# B0 = 0.5*fact +# # B1 = 0.5*ooopt/A + 0.5*fact +# # B1p = 0.5*ooopt/B + 0.5*fact +# B1 = 0.5*ooopt/A + B0 +# B1p = 0.5*ooopt/B + B0 +# C = (Px-xi)*ooopt + (B*(Qx-xi)+A*(Px-xi))*fact +# Cp = (Qx-xk)*ooopt + (B*(Qx-xk)+A*(Px-xk))*fact +# return C,Cp,B0,B1,B1p + +""Roots(n,X,roots,weights) - Return roots and weights of nth order Rys quadrature"" +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def Roots(n,X,roots,weights): + + PIE4 = 7.85398163397448E-01 + if X < 3.0E-7: + off = n * (n - 1) // 2 + for i in range(n): + roots[i] = POLY_SMALLX_R0[off+i] + POLY_SMALLX_R1[off+i] * X + weights[i] = POLY_SMALLX_W0[off+i] + POLY_SMALLX_W1[off+i] * X + return roots, weights + elif X > 35+n*5: + off = n * (n - 1) // 2 + t = np.sqrt(PIE4 / X) + for i in range(n): + rt = POLY_LARGEX_RT[off+i] + roots[i] = rt / (X - rt) + weights[i] = POLY_LARGEX_WW[off+i] * t + return roots, weights + + + if n == 1: + return Root1(X,n,roots,weights) + elif n == 2: + return Root2(X,n,roots,weights) + elif n == 3: + return Root3(X,n,roots,weights) + elif n == 4: + return Root4(X,n,roots,weights) + elif n == 5: + return Root5(X,n,roots,weights) + elif n>5 and n<11: + return Rootn(X,n,roots,weights) + +@njit(cache=True,fastmath=True, error_model='numpy') +def nERIRys(t, q1, q2, q3, q4, a12, a34, + A, B, C, D, P, Q, sRys): + '''Calculate Rys polynomials for two-electron integrals + ''' + # base case + if q1+q2+q3+q4 == 0: return 1.0 + + # cdef double PQ,a1234,C00 + + #distance between the two gaussian centers + PQ = P - Q + a1234 = a12 + a34 + + C00 = P - A - a34 * (PQ) * t / a1234 + + if q1==1 and q2+q3+q4==0: return C00 + + # cdef double C01, D00, B00 + + if q2==1 and q1+q3+q4==0: + C01 = C00 + (A - B) + return C01 + + D00 = Q - C + a12 * (PQ) * t / a1234 + if q3==1 and q1+q2+q4==0: return D00 + + + if q1+q2+q3==0 and q4==1: + D01 = D00 + (C - D) + return D01 + + B00 = t / (2 * a1234) + + if q1==1 and q3==1 and q2+q4 == 0: return D00 * C00 + B00 + + # cdef int n, m, i, j + n , m = q1 + q2 , q3 + q4 + + if n > 0: sRys[1,0] = C00 + if m > 0: sRys[0,1] = D00 + + + B10 = 1 /(2 * a12) + -a34 * t/ ((2 * a12) * (a1234)) + B01 = 1 /(2 * a34) + -a12 * t / ((2 * a34) * (a1234)) + + for i in range(1, n+1): + sRys[i,0] = C00 * sRys[i-1,0] + (i - 1) * B10 * sRys[i-2,0] + + for i in range(1,m+1): + sRys[0,i] = D00 * sRys[0,i-1] + (i - 1) * B01 * sRys[0,i-2] + + if m * n > 0: + + for i in range(1,n+1): + sRys[i,1] = D00 * sRys[i,0] + i * B00 * sRys[i-1,0] + for j in range(2,m+1): + sRys[i,j] = (j-1) * B01 * sRys[i,j-2] + i * B00 * sRys[i-1,j-1] + D00 * sRys[i,j-1] + + if q2 + q4 == 0: return sRys[q1,q3] + + # cdef double Rys,Rys0,AB,CD,Poly1 + + Rys = 0 + + #Angular momentum transfer + AB,CD = A-B, C-D + + for i in range(q4+1): + Rys0 = 0 + for j in range(q2+1): + + # I(i,j,m,0)<-I(n,0,m,0) + Poly1 = comb(q2,j) * np.power(AB,q2-j) * sRys[j+q1,i+q3] + Rys0 += Poly1 + + Rys0 *= comb(q4, i) * np.power(CD, q4-i) + Rys += Rys0 # I(i,j,k,l)<-I(i,j,m,0) + + return Rys + +@njit(cache=True,fastmath=True, error_model='numpy') +def ChebGausInt(eps,M,a12,a34, qx1, qx2, qx3, qx4, + qy1, qy2, qy3, qy4, qz1, qz2, qz3, qz4, x1, + x2, x3, x4, y1, y2, y3, y4, + z1, z2, z3, z4, Px, Py, Pz, + Qx, Qy, Qz, T, sRys): + + # cdef double c0,s0,c1,s1,q,p,chp,c,s,xp,t1,t2,ang1,ang2,err + # cdef int j,n,i + err,n,c0,s0 = 10,3,0.866025403784438646,.5 + c1 = s0 + s1 = c0 + t1,t2 = 0.7628537665044517,0.0160237616047743 + ang1 = (nERIRys(t1,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRys(t1,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRys(t1,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + ang2 = (nERIRys(t2,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRys(t2,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRys(t2,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + q = 0.28125 * (np.exp(-T*t1) * ang1 + np.exp(-T*t2) * ang2) + p = (0.5*np.exp(-T*0.25)* nERIRys(0.25,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRys(0.25,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRys(0.25,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + chp = q + p + j = 0 + while err > eps: + j = 1 - j + c1 = j * c1 + (1-j) * c0 + s1 = j * s1 + (1-j) * s0 + c0 = j * c0 + (1-j) * np.sqrt(0.5 * (1 + c0)) + s0 *= j + (1-j)/(2 * c0) + c,s = c0,s0 + + for i in range(1,n,2): + xp = 1 + 0.21220659078919378 * s * c * (3 + 2*s*s) - i/n + if np.ceil(3*(i+j+j)/3.) > (i + j): + + t1 = 0.25 * (-xp+1) * (-xp+1) + t2 = 0.25 * (xp+1) * (xp+1) + + ang1 = (nERIRys(t1,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRys(t1,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRys(t1,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + ang2 = (nERIRys(t2,qx1,qx2,qx3,qx4,a12,a34,x1,x2,x3,x4,Px,Qx,sRys)* + nERIRys(t2,qy1,qy2,qy3,qy4,a12,a34,y1,y2,y3,y4,Py,Qy,sRys)* + nERIRys(t2,qz1,qz2,qz3,qz4,a12,a34,z1,z2,z3,z4,Pz,Qz,sRys)) + + chp += 0.5 * (np.exp(-T*t1) * ang1 + np.exp(-T*t2) * ang2) * s ** 4 + + xp = s + s = s*c1 + c*s1 + c = c*c1 - xp*s1 + + n *= (1+j) + p += (1-j)*(chp-q) + err = 16 * np.abs((1-j)*(q-3*p/2)+j*(chp-2*q))/(3*n) + q = (1 - j) * q + j * chp + print(err) + print('convgd') + ssss = 1.0 + return 16*q/(3*n) + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def clenshaw_d1(roots_or_weights, x, u, n): + # Reference: https://github.com/sunqm/libcint/blob/master/src/polyfits.c (BSD-2 Clause license) + i = 0 + u2 = u * 2.0 + + # while i < n - 1: + # d0, d1, g0, g1 = 0, 0, x[13 + 14 * i], x[13 + 14 + 14 * i] + # d0 = u2 * g0 - d0 + x[12 + 14 * i] + # d1 = u2 * g1 - d1 + x[12 + 14 + 14 * i] + # g0 = u2 * d0 - g0 + x[11 + 14 * i] + # g1 = u2 * d1 - g1 + x[11 + 14 + 14 * i] + # d0 = u2 * g0 - d0 + x[10 + 14 * i] + # d1 = u2 * g1 - d1 + x[10 + 14 + 14 * i] + # g0 = u2 * d0 - g0 + x[9 + 14 * i] + # g1 = u2 * d1 - g1 + x[9 + 14 + 14 * i] + # d0 = u2 * g0 - d0 + x[8 + 14 * i] + # d1 = u2 * g1 - d1 + x[8 + 14 + 14 * i] + # g0 = u2 * d0 - g0 + x[7 + 14 * i] + # g1 = u2 * d1 - g1 + x[7 + 14 + 14 * i] + # d0 = u2 * g0 - d0 + x[6 + 14 * i] + # d1 = u2 * g1 - d1 + x[6 + 14 + 14 * i] + # g0 = u2 * d0 - g0 + x[5 + 14 * i] + # g1 = u2 * d1 - g1 + x[5 + 14 + 14 * i] + # d0 = u2 * g0 - d0 + x[4 + 14 * i] + # d1 = u2 * g1 - d1 + x[4 + 14 + 14 * i] + # g0 = u2 * d0 - g0 + x[3 + 14 * i] + # g1 = u2 * d1 - g1 + x[3 + 14 + 14 * i] + # d0 = u2 * g0 - d0 + x[2 + 14 * i] + # d1 = u2 * g1 - d1 + x[2 + 14 + 14 * i] + # g0 = u2 * d0 - g0 + x[1 + 14 * i] + # g1 = u2 * d1 - g1 + x[1 + 14 + 14 * i] + # roots_or_weights[i] = u * g0 - d0 + x[14 * i] * 0.5 + # roots_or_weights[i + 1] = u * g1 - d1 + x[14 * i + 14] * 0.5 + # i += 2 + + # if i < n: + # d0, g0 = 0, x[13 + 14 * i] + # d0 = u2 * g0 - d0 + x[12 + 14 * i] + # g0 = u2 * d0 - g0 + x[11 + 14 * i] + # d0 = u2 * g0 - d0 + x[10 + 14 * i] + # g0 = u2 * d0 - g0 + x[9 + 14 * i] + # d0 = u2 * g0 - d0 + x[8 + 14 * i] + # g0 = u2 * d0 - g0 + x[7 + 14 * i] + # d0 = u2 * g0 - d0 + x[6 + 14 * i] + # g0 = u2 * d0 - g0 + x[5 + 14 * i] + # d0 = u2 * g0 - d0 + x[4 + 14 * i] + # g0 = u2 * d0 - g0 + x[3 + 14 * i] + # d0 = u2 * g0 - d0 + x[2 + 14 * i] + # g0 = u2 * d0 - g0 + x[1 + 14 * i] + # roots_or_weights[i] = u * g0 - d0 + x[14 * i] * 0.5 + + for i in range(n): + d0 = 0 + g0 = x[13 + 14 * i] + d0 = u2 * g0 - d0 + x[12 + 14 * i] + g0 = u2 * d0 - g0 + x[11 + 14 * i] + d0 = u2 * g0 - d0 + x[10 + 14 * i] + g0 = u2 * d0 - g0 + x[9 + 14 * i] + d0 = u2 * g0 - d0 + x[8 + 14 * i] + g0 = u2 * d0 - g0 + x[7 + 14 * i] + d0 = u2 * g0 - d0 + x[6 + 14 * i] + g0 = u2 * d0 - g0 + x[5 + 14 * i] + d0 = u2 * g0 - d0 + x[4 + 14 * i] + g0 = u2 * d0 - g0 + x[3 + 14 * i] + d0 = u2 * g0 - d0 + x[2 + 14 * i] + g0 = u2 * d0 - g0 + x[1 + 14 * i] + roots_or_weights[i] = u * g0 - d0 + x[14 * i] * 0.5 + + return roots_or_weights + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def Rootn(X,n,roots,weights): + datax = DATA_X[((n - 1) * n // 2 - 15) * 14 * 31:] + dataw = DATA_W[((n - 1) * n // 2 - 15) * 14 * 31:] + + if X <= 40.0: + it = int(X * 0.4) + tt = (X - it * 2.5) * 0.8 - 1.0 + else: + X -= 40.0 + it = int(X * 0.25) + tt = (X - it * 4) * 0.5 - 1.0 + it += 16 + + offset = n * 14 * it + roots = clenshaw_d1(roots, datax[offset:], tt, n) + weights = clenshaw_d1(weights, dataw[offset:], tt, n) + return roots, weights + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True, inline='always') +def Root1(X,n,roots,weights): + if X < 3.0E-7: + roots0 = 0.5E+00-X/5.0E+00 + weights0 = 1.0E+00-X/3.0E+00 + elif X < 1.0: + F1 = ((((((((-8.36313918003957E-08*X+1.21222603512827E-06 )*X- + 1.15662609053481E-05 )*X+9.25197374512647E-05 )*X- + 6.40994113129432E-04 )*X+3.78787044215009E-03 )*X- + 1.85185172458485E-02 )*X+7.14285713298222E-02 )*X- + 1.99999999997023E-01 )*X+3.33333333333318E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 3.0: + Y = X-2.0E+00 + F1 = ((((((((((-1.61702782425558E-10*Y+1.96215250865776E-09 )*Y- + 2.14234468198419E-08 )*Y+2.17216556336318E-07 )*Y- + 1.98850171329371E-06 )*Y+1.62429321438911E-05 )*Y- + 1.16740298039895E-04 )*Y+7.24888732052332E-04 )*Y- + 3.79490003707156E-03 )*Y+1.61723488664661E-02 )*Y- + 5.29428148329736E-02 )*Y+1.15702180856167E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 5.0: + Y = X-4.0E+00 + F1 = ((((((((((-2.62453564772299E-11*Y+3.24031041623823E-10 )*Y- + 3.614965656163E-09)*Y+3.760256799971E-08)*Y- + 3.553558319675E-07)*Y+3.022556449731E-06)*Y- + 2.290098979647E-05)*Y+1.526537461148E-04)*Y- + 8.81947375894379E-04 )*Y+4.33207949514611E-03 )*Y- + 1.75257821619926E-02 )*Y+5.28406320615584E-02 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 10.0: + E = np.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X -3.1501078774085E-06)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + elif X < 15.0: + E = np.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + elif X < 33.0: + E = np.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + else: # X > 33 + weights0 = np.sqrt(PIE4/X) + roots0 = 0.5E+00/(X-0.5E+00) + + roots[0]=roots0 + weights[0]=weights0 + + return roots, weights + +R12,PIE4 = 2.75255128608411E-01, 7.85398163397448E-01 +R22,W22 = 2.72474487139158E+00, 9.17517095361369E-02 + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True, inline='always') +def Root2(X,n, roots, weights): + + if X < 3.E-7: + roots0 = 1.30693606237085E-01-2.90430236082028E-02 *X + roots1 = 2.86930639376291E+00-6.37623643058102E-01 *X + weights0 = 6.52145154862545E-01-1.22713621927067E-01 *X + weights1 = 3.47854845137453E-01-2.10619711404725E-01 *X + elif X < 1.0: + F1 = ((((((((-8.36313918003957E-08*X+1.21222603512827E-06 )*X- + 1.15662609053481E-05 )*X+9.25197374512647E-05 )*X- + 6.40994113129432E-04 )*X+3.78787044215009E-03 )*X- + 1.85185172458485E-02 )*X+7.14285713298222E-02 )*X- + 1.99999999997023E-01 )*X+3.33333333333318E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = (((((((-2.35234358048491E-09*X+2.49173650389842E-08)*X- + 4.558315364581E-08)*X-2.447252174587E-06)*X+ + 4.743292959463E-05)*X-5.33184749432408E-04 )*X+ + 4.44654947116579E-03 )*X-2.90430236084697E-02 )*X+1.30693606237085E-01 + roots1 = (((((((-2.47404902329170E-08*X+2.36809910635906E-07)*X+ + 1.835367736310E-06)*X-2.066168802076E-05)*X- + 1.345693393936E-04)*X-5.88154362858038E-05 )*X+ + 5.32735082098139E-02 )*X-6.37623643056745E-01 )*X+2.86930639376289E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 3.0: + Y = X-2.0E+00 + F1 = ((((((((((-1.61702782425558E-10*Y+1.96215250865776E-09 )*Y- + 2.14234468198419E-08 )*Y+2.17216556336318E-07 )*Y- + 1.98850171329371E-06 )*Y+1.62429321438911E-05 )*Y- + 1.16740298039895E-04 )*Y+7.24888732052332E-04 )*Y- + 3.79490003707156E-03 )*Y+1.61723488664661E-02 )*Y- + 5.29428148329736E-02 )*Y+1.15702180856167E-01 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = (((((((((-6.36859636616415E-12*Y+8.47417064776270E-11)*Y- + 5.152207846962E-10)*Y-3.846389873308E-10)*Y+ + 8.472253388380E-08)*Y-1.85306035634293E-06 )*Y+ + 2.47191693238413E-05 )*Y-2.49018321709815E-04 )*Y+ + 2.19173220020161E-03 )*Y-1.63329339286794E-02 )*Y+8.68085688285261E-02 + roots1 = ((((((((( 1.45331350488343E-10*Y+2.07111465297976E-09)*Y- + 1.878920917404E-08)*Y-1.725838516261E-07)*Y+ + 2.247389642339E-06)*Y+9.76783813082564E-06 )*Y- + 1.93160765581969E-04 )*Y-1.58064140671893E-03 )*Y+ + 4.85928174507904E-02 )*Y-4.30761584997596E-01 )*Y+1.80400974537950E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 5.0: + Y = X-4.0E+00 + F1 = ((((((((((-2.62453564772299E-11*Y+3.24031041623823E-10 )*Y- + 3.614965656163E-09)*Y+3.760256799971E-08)*Y- + 3.553558319675E-07)*Y+3.022556449731E-06)*Y- + 2.290098979647E-05)*Y+1.526537461148E-04)*Y- + 8.81947375894379E-04 )*Y+4.33207949514611E-03 )*Y- + 1.75257821619926E-02 )*Y+5.28406320615584E-02 + weights0 = (X+X)*F1+np.exp(-X) + roots0 = ((((((((-4.11560117487296E-12*Y+7.10910223886747E-11)*Y- + 1.73508862390291E-09 )*Y+5.93066856324744E-08 )*Y- + 9.76085576741771E-07 )*Y+1.08484384385679E-05 )*Y- + 1.12608004981982E-04 )*Y+1.16210907653515E-03 )*Y- + 9.89572595720351E-03 )*Y+6.12589701086408E-02 + roots1 = (((((((((-1.80555625241001E-10*Y+5.44072475994123E-10)*Y+ + 1.603498045240E-08)*Y-1.497986283037E-07)*Y- + 7.017002532106E-07)*Y+1.85882653064034E-05 )*Y- + 2.04685420150802E-05 )*Y-2.49327728643089E-03 )*Y+ + 3.56550690684281E-02 )*Y-2.60417417692375E-01 )*Y+1.12155283108289E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 10.0: + E = np.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X - + 3.1501078774085E-06)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + Y = X-7.5E+00 + roots0 = (((((((((((((-1.43632730148572E-16*Y+2.38198922570405E-16)* + Y+1.358319618800E-14)*Y-7.064522786879E-14)*Y- + 7.719300212748E-13)*Y+7.802544789997E-12)*Y+ + 6.628721099436E-11)*Y-1.775564159743E-09)*Y+ + 1.713828823990E-08)*Y-1.497500187053E-07)*Y+ + 2.283485114279E-06)*Y-3.76953869614706E-05 )*Y+ + 4.74791204651451E-04 )*Y-4.60448960876139E-03 )*Y+3.72458587837249E-02 + roots1 = (((((((((((( 2.48791622798900E-14*Y-1.36113510175724E-13)*Y- + 2.224334349799E-12)*Y+4.190559455515E-11)*Y- + 2.222722579924E-10)*Y-2.624183464275E-09)*Y+ + 6.128153450169E-08)*Y-4.383376014528E-07)*Y- + 2.49952200232910E-06 )*Y+1.03236647888320E-04 )*Y- + 1.44614664924989E-03 )*Y+1.35094294917224E-02 )*Y- + 9.53478510453887E-02 )*Y+5.44765245686790E-01 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 15.0: + E = np.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = ((((-1.01041157064226E-05*X+1.19483054115173E-03)*X - + 6.73760231824074E-02)*X+1.25705571069895E+00)*X + + (((-8.57609422987199E+03/X+5.91005939591842E+03)/X - + 1.70807677109425E+03)/X+2.64536689959503E+02)/X - + 2.38570496490846E+01)*E + R12/(X-R12) + roots1 = ((( 3.39024225137123E-04*X-9.34976436343509E-02)*X - + 4.22216483306320E+00)*X + + (((-2.08457050986847E+03/X - + 1.04999071905664E+03)/X+3.39891508992661E+02)/X - + 1.56184800325063E+02)/X+8.00839033297501E+00)*E + R22/(X-R22) + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 33.0: + E = np.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = ((((-1.14906395546354E-06*X+1.76003409708332E-04)*X - + 1.71984023644904E-02)*X-1.37292644149838E-01)*X + + (-4.75742064274859E+01/X+9.21005186542857E+00)/X - + 2.31080873898939E-02)*E + R12/(X-R12) + roots1 = ((( 3.64921633404158E-04*X-9.71850973831558E-02)*X - + 4.02886174850252E+00)*X + + (-1.35831002139173E+02/X - + 8.66891724287962E+01)/X+2.98011277766958E+00)*E + R22/(X-R22) + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + else: # X > 33 + weights0 = np.sqrt(PIE4/X) + if X < 40.0: + E = np.exp(-X) + roots0 = (-8.78947307498880E-01*X+1.09243702330261E+01)*E + R12/(X-R12) + roots1 = (-9.28903924275977E+00*X+8.10642367843811E+01)*E + R22/(X-R22) + weights1 = ( 4.46857389308400E+00*X-7.79250653461045E+01)*E + W22*weights0 + weights0 = weights0-weights1 + else: + roots0 = R12/(X-R12) + roots1 = R22/(X-R22) + weights1 = W22*weights0 + weights0 = weights0-weights1 + + roots[0] = roots0 + roots[1] = roots1 + weights[0]= weights0 + weights[1] = weights1 + + return roots, weights + +R13 = 1.90163509193487E-01 +R23,W23 = 1.78449274854325E+00, 1.77231492083829E-01 +R33,W33 = 5.52534374226326E+00, 5.11156880411248E-03 + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def Root3(X,n,roots, weights): + + if X < 3.0E-7: + roots0 = 6.03769246832797E-02-9.28875764357368E-03 *X + roots1 = 7.76823355931043E-01-1.19511285527878E-01 *X + roots2 = 6.66279971938567E+00-1.02504611068957E+00 *X + weights0 = 4.67913934572691E-01-5.64876917232519E-02 *X + weights1 = 3.60761573048137E-01-1.49077186455208E-01 *X + weights2 = 1.71324492379169E-01-1.27768455150979E-01 *X + elif X < 1.0: + roots0 = ((((((-5.10186691538870E-10*X+2.40134415703450E-08)*X- + 5.01081057744427E-07 )*X+7.58291285499256E-06 )*X- + 9.55085533670919E-05 )*X+1.02893039315878E-03 )*X- + 9.28875764374337E-03 )*X+6.03769246832810E-02 + roots1 = ((((((-1.29646524960555E-08*X+7.74602292865683E-08)*X+ + 1.56022811158727E-06 )*X-1.58051990661661E-05 )*X- + 3.30447806384059E-04 )*X+9.74266885190267E-03 )*X- + 1.19511285526388E-01 )*X+7.76823355931033E-01 + roots2 = ((((((-9.28536484109606E-09*X-3.02786290067014E-07)*X- + 2.50734477064200E-06 )*X-7.32728109752881E-06 )*X+ + 2.44217481700129E-04 )*X+4.94758452357327E-02 )*X- + 1.02504611065774E+00 )*X+6.66279971938553E+00 + F2 = ((((((((-7.60911486098850E-08*X+1.09552870123182E-06 )*X- + 1.03463270693454E-05 )*X+8.16324851790106E-05 )*X- + 5.55526624875562E-04 )*X+3.20512054753924E-03 )*X- + 1.51515139838540E-02 )*X+5.55555554649585E-02 )*X- + 1.42857142854412E-01 )*X+1.99999999999986E-01 + E = np.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 3.0: + Y = X-2.0E+00 + roots0 = (((((((( 1.44687969563318E-12*Y+4.85300143926755E-12)*Y- + 6.55098264095516E-10 )*Y+1.56592951656828E-08 )*Y- + 2.60122498274734E-07 )*Y+3.86118485517386E-06 )*Y- + 5.13430986707889E-05 )*Y+6.03194524398109E-04 )*Y- + 6.11219349825090E-03 )*Y+4.52578254679079E-02 + roots1 = ((((((( 6.95964248788138E-10*Y-5.35281831445517E-09)*Y- + 6.745205954533E-08)*Y+1.502366784525E-06)*Y+ + 9.923326947376E-07)*Y-3.89147469249594E-04 )*Y+ + 7.51549330892401E-03 )*Y-8.48778120363400E-02 )*Y+5.73928229597613E-01 + roots2 = ((((((((-2.81496588401439E-10*Y+3.61058041895031E-09)*Y+ + 4.53631789436255E-08 )*Y-1.40971837780847E-07 )*Y- + 6.05865557561067E-06 )*Y-5.15964042227127E-05 )*Y+ + 3.34761560498171E-05 )*Y+5.04871005319119E-02 )*Y- + 8.24708946991557E-01 )*Y+4.81234667357205E+00 + F2 = ((((((((((-1.48044231072140E-10*Y+1.78157031325097E-09 )*Y- + 1.92514145088973E-08 )*Y+1.92804632038796E-07 )*Y- + 1.73806555021045E-06 )*Y+1.39195169625425E-05 )*Y- + 9.74574633246452E-05 )*Y+5.83701488646511E-04 )*Y- + 2.89955494844975E-03 )*Y+1.13847001113810E-02 )*Y- + 3.23446977320647E-02 )*Y+5.29428148329709E-02 + E = np.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 5.0: + Y = X-4.0E+00 + roots0 = ((((((( 1.44265709189601E-11*Y-4.66622033006074E-10)*Y+ + 7.649155832025E-09)*Y-1.229940017368E-07)*Y+ + 2.026002142457E-06)*Y-2.87048671521677E-05 )*Y+ + 3.70326938096287E-04 )*Y-4.21006346373634E-03 )*Y+3.50898470729044E-02 + roots1 = ((((((((-2.65526039155651E-11*Y+1.97549041402552E-10)*Y+ + 2.15971131403034E-09 )*Y-7.95045680685193E-08 )*Y+ + 5.15021914287057E-07 )*Y+1.11788717230514E-05 )*Y- + 3.33739312603632E-04 )*Y+5.30601428208358E-03 )*Y- + 5.93483267268959E-02 )*Y+4.31180523260239E-01 + roots2 = ((((((((-3.92833750584041E-10*Y-4.16423229782280E-09)*Y+ + 4.42413039572867E-08 )*Y+6.40574545989551E-07 )*Y- + 3.05512456576552E-06 )*Y-1.05296443527943E-04 )*Y- + 6.14120969315617E-04 )*Y+4.89665802767005E-02 )*Y- + 6.24498381002855E-01 )*Y+3.36412312243724E+00 + F2 = ((((((((((-2.36788772599074E-11*Y+2.89147476459092E-10 )*Y- + 3.18111322308846E-09 )*Y+3.25336816562485E-08 )*Y- + 3.00873821471489E-07 )*Y+2.48749160874431E-06 )*Y- + 1.81353179793672E-05 )*Y+1.14504948737066E-04 )*Y- + 6.10614987696677E-04 )*Y+2.64584212770942E-03 )*Y- + 8.66415899015349E-03 )*Y+1.75257821619922E-02 + E = np.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 10.0: + E = np.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X - + 3.1501078774085E-06)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + Y = X-7.5E+00 + roots0 = ((((((((((( 5.74429401360115E-16*Y+7.11884203790984E-16)*Y- + 6.736701449826E-14)*Y-6.264613873998E-13)*Y+ + 1.315418927040E-11)*Y-4.23879635610964E-11 )*Y+ + 1.39032379769474E-09 )*Y-4.65449552856856E-08 )*Y+ + 7.34609900170759E-07 )*Y-1.08656008854077E-05 )*Y+ + 1.77930381549953E-04 )*Y-2.39864911618015E-03 )*Y+2.39112249488821E-02 + roots1 = ((((((((((( 1.13464096209120E-14*Y+6.99375313934242E-15)*Y- + 8.595618132088E-13)*Y-5.293620408757E-12)*Y- + 2.492175211635E-11)*Y+2.73681574882729E-09 )*Y- + 1.06656985608482E-08 )*Y-4.40252529648056E-07 )*Y+ + 9.68100917793911E-06 )*Y-1.68211091755327E-04 )*Y+ + 2.69443611274173E-03 )*Y-3.23845035189063E-02 )*Y+2.75969447451882E-01 + roots2 = (((((((((((( 6.66339416996191E-15*Y+1.84955640200794E-13)*Y- + 1.985141104444E-12)*Y-2.309293727603E-11)*Y+ + 3.917984522103E-10)*Y+1.663165279876E-09)*Y- + 6.205591993923E-08)*Y+8.769581622041E-09)*Y+ + 8.97224398620038E-06 )*Y-3.14232666170796E-05 )*Y- + 1.83917335649633E-03 )*Y+3.51246831672571E-02 )*Y- + 3.22335051270860E-01 )*Y+1.73582831755430E+00 + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 15.0: + E = np.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + Y = X-12.5E+00 + roots0 = ((((((((((( 4.42133001283090E-16*Y-2.77189767070441E-15)*Y- + 4.084026087887E-14)*Y+5.379885121517E-13)*Y+ + 1.882093066702E-12)*Y-8.67286219861085E-11 )*Y+ + 7.11372337079797E-10 )*Y-3.55578027040563E-09 )*Y+ + 1.29454702851936E-07 )*Y-4.14222202791434E-06 )*Y+ + 8.04427643593792E-05 )*Y-1.18587782909876E-03 )*Y+1.53435577063174E-02 + roots1 = ((((((((((( 6.85146742119357E-15*Y-1.08257654410279E-14)*Y- + 8.579165965128E-13)*Y+6.642452485783E-12)*Y+ + 4.798806828724E-11)*Y-1.13413908163831E-09 )*Y+ + 7.08558457182751E-09 )*Y-5.59678576054633E-08 )*Y+ + 2.51020389884249E-06 )*Y-6.63678914608681E-05 )*Y+ + 1.11888323089714E-03 )*Y-1.45361636398178E-02 )*Y+1.65077877454402E-01 + roots2 = (((((((((((( 3.20622388697743E-15*Y-2.73458804864628E-14)*Y- + 3.157134329361E-13)*Y+8.654129268056E-12)*Y- + 5.625235879301E-11)*Y-7.718080513708E-10)*Y+ + 2.064664199164E-08)*Y-1.567725007761E-07)*Y- + 1.57938204115055E-06 )*Y+6.27436306915967E-05 )*Y- + 1.01308723606946E-03 )*Y+1.13901881430697E-02 )*Y- + 1.01449652899450E-01 )*Y+7.77203937334739E-01 + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 33.0: + E = np.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + np.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + if X < 20: + roots0 = ((((((-2.43270989903742E-06*X+3.57901398988359E-04)*X - + 2.34112415981143E-02)*X+7.81425144913975E-01)*X - + 1.73209218219175E+01)*X+2.43517435690398E+02)*X + + (-1.97611541576986E+04/X+9.82441363463929E+03)/X - + 2.07970687843258E+03)*E + R13/(X-R13) + roots1 = (((((-2.62627010965435E-04*X+3.49187925428138E-02)*X - + 3.09337618731880E+00)*X+1.07037141010778E+02)*X - + 2.36659637247087E+03)*X + + ((-2.91669113681020E+06/X + + 1.41129505262758E+06)/X-2.91532335433779E+05)/X + + 3.35202872835409E+04)*E + R23/(X-R23) + roots2 = ((((( 9.31856404738601E-05*X-2.87029400759565E-02)*X - + 7.83503697918455E-01)*X-1.84338896480695E+01)*X + + 4.04996712650414E+02)*X + + (-1.89829509315154E+05/X + + 5.11498390849158E+04)/X-6.88145821789955E+03)*E + R33/(X-R33) + else: + roots0 = ((((-4.97561537069643E-04*X-5.00929599665316E-02)*X + + 1.31099142238996E+00)*X-1.88336409225481E+01)*X - + 6.60344754467191E+02 /X+1.64931462413877E+02)*E + R13/(X-R13) + roots1 = ((((-4.48218898474906E-03*X-5.17373211334924E-01)*X + + 1.13691058739678E+01)*X-1.65426392885291E+02)*X - + 6.30909125686731E+03 /X+1.52231757709236E+03)*E + R23/(X-R23) + roots2 = ((((-1.38368602394293E-02*X-1.77293428863008E+00)*X + + 1.73639054044562E+01)*X-3.57615122086961E+02)*X - + 1.45734701095912E+04 /X+2.69831813951849E+03)*E + R33/(X-R33) + + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + else :# X > 33 + weights0 = np.sqrt(PIE4/X) + if X < 47: + E = np.exp(-X) + roots0 = ((-7.39058467995275E+00*X+3.21318352526305E+02)*X - + 3.99433696473658E+03)*E + R13/(X-R13) + roots1 = ((-7.38726243906513E+01*X+3.13569966333873E+03)*X - + 3.86862867311321E+04)*E + R23/(X-R23) + roots2 = ((-2.63750565461336E+02*X+1.04412168692352E+04)*X - + 1.28094577915394E+05)*E + R33/(X-R33) + weights2 = ((( 1.52258947224714E-01*X-8.30661900042651E+00)*X + + 1.92977367967984E+02)*X-1.67787926005344E+03)*E + W33*weights0 + weights1 = (( 6.15072615497811E+01*X-2.91980647450269E+03)*X + + 3.80794303087338E+04)*E + W23*weights0 + weights0 = weights0-weights1-weights2 + else: + roots0 = R13/(X-R13) + roots1 = R23/(X-R23) + roots2 = R33/(X-R33) + weights1 = W23*weights0 + weights2 = W33*weights0 + weights0 = weights0-weights1-weights2 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + + return roots, weights + +R14,PIE4 = 1.45303521503316E-01, 7.85398163397448E-01 +R24,W24 = 1.33909728812636E+00, 2.34479815323517E-01 +R34,W34 = 3.92696350135829E+00, 1.92704402415764E-02 +R44,W44 = 8.58863568901199E+00, 2.25229076750736E-04 + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def Root4(X,n,roots, weights): + + if X <= 3.0E-7: + roots0 = 3.48198973061471E-02 -4.09645850660395E-03 *X + roots1 = 3.81567185080042E-01 -4.48902570656719E-02 *X + roots2 = 1.73730726945891E+00 -2.04389090547327E-01 *X + roots3 = 1.18463056481549E+01 -1.39368301742312E+00 *X + weights0 = 3.62683783378362E-01 -3.13844305713928E-02 *X + weights1 = 3.13706645877886E-01 -8.98046242557724E-02 *X + weights2 = 2.22381034453372E-01 -1.29314370958973E-01 *X + weights3 = 1.01228536290376E-01 -8.28299075414321E-02 *X + elif X <= 1.0: + roots0 = ((((((-1.95309614628539E-10*X+5.19765728707592E-09)*X- + 1.01756452250573E-07 )*X+1.72365935872131E-06 )*X- + 2.61203523522184E-05 )*X+3.52921308769880E-04 )*X- + 4.09645850658433E-03 )*X+3.48198973061469E-02 + roots1 = (((((-1.89554881382342E-08*X+3.07583114342365E-07)*X+ + 1.270981734393E-06)*X-1.417298563884E-04)*X+ + 3.226979163176E-03)*X-4.48902570678178E-02 )*X+3.81567185080039E-01 + roots2 = (((((( 1.77280535300416E-09*X+3.36524958870615E-08)*X- + 2.58341529013893E-07 )*X-1.13644895662320E-05 )*X- + 7.91549618884063E-05 )*X+1.03825827346828E-02 )*X- + 2.04389090525137E-01 )*X+1.73730726945889E+00 + roots3 = (((((-5.61188882415248E-08*X-2.49480733072460E-07)*X+ + 3.428685057114E-06)*X+1.679007454539E-04)*X+ + 4.722855585715E-02)*X-1.39368301737828E+00 )*X+1.18463056481543E+01 + weights0 = ((((((-1.14649303201279E-08*X+1.88015570196787E-07)*X- + 2.33305875372323E-06 )*X+2.68880044371597E-05 )*X- + 2.94268428977387E-04 )*X+3.06548909776613E-03 )*X- + 3.13844305680096E-02 )*X+3.62683783378335E-01 + weights1 = ((((((((-4.11720483772634E-09*X+6.54963481852134E-08)*X- + 7.20045285129626E-07 )*X+6.93779646721723E-06 )*X- + 6.05367572016373E-05 )*X+4.74241566251899E-04 )*X- + 3.26956188125316E-03 )*X+1.91883866626681E-02 )*X- + 8.98046242565811E-02 )*X+3.13706645877886E-01 + weights2 = ((((((((-3.41688436990215E-08*X+5.07238960340773E-07)*X- + 5.01675628408220E-06 )*X+4.20363420922845E-05 )*X- + 3.08040221166823E-04 )*X+1.94431864731239E-03 )*X- + 1.02477820460278E-02 )*X+4.28670143840073E-02 )*X- + 1.29314370962569E-01 )*X+2.22381034453369E-01 + weights3 = ((((((((( 4.99660550769508E-09*X-7.94585963310120E-08)*X+ + 8.359072409485E-07)*X-7.422369210610E-06)*X+ + 5.763374308160E-05)*X-3.86645606718233E-04 )*X+ + 2.18417516259781E-03 )*X-9.99791027771119E-03 )*X+ + 3.48791097377370E-02 )*X-8.28299075413889E-02 )*X+1.01228536290376E-01 + elif X <= 5.0: + Y = X-3.0E+00 + roots0 = (((((((((-1.48570633747284E-15*Y-1.33273068108777E-13)*Y+ + 4.068543696670E-12)*Y-9.163164161821E-11)*Y+ + 2.046819017845E-09)*Y-4.03076426299031E-08 )*Y+ + 7.29407420660149E-07 )*Y-1.23118059980833E-05 )*Y+ + 1.88796581246938E-04 )*Y-2.53262912046853E-03 )*Y+2.51198234505021E-02 + roots1 = ((((((((( 1.35830583483312E-13*Y-2.29772605964836E-12)*Y- + 3.821500128045E-12)*Y+6.844424214735E-10)*Y- + 1.048063352259E-08)*Y+1.50083186233363E-08 )*Y+ + 3.48848942324454E-06 )*Y-1.08694174399193E-04 )*Y+ + 2.08048885251999E-03 )*Y-2.91205805373793E-02 )*Y+2.72276489515713E-01 + roots2 = ((((((((( 5.02799392850289E-13*Y+1.07461812944084E-11)*Y- + 1.482277886411E-10)*Y-2.153585661215E-09)*Y+ + 3.654087802817E-08)*Y+5.15929575830120E-07 )*Y- + 9.52388379435709E-06 )*Y-2.16552440036426E-04 )*Y+ + 9.03551469568320E-03 )*Y-1.45505469175613E-01 )*Y+1.21449092319186E+00 + roots3 = (((((((((-1.08510370291979E-12*Y+6.41492397277798E-11)*Y+ + 7.542387436125E-10)*Y-2.213111836647E-09)*Y- + 1.448228963549E-07)*Y-1.95670833237101E-06 )*Y- + 1.07481314670844E-05 )*Y+1.49335941252765E-04 )*Y+ + 4.87791531990593E-02 )*Y-1.10559909038653E+00 )*Y+8.09502028611780E+00 + weights0 = ((((((((((-4.65801912689961E-14*Y+7.58669507106800E-13)*Y- + 1.186387548048E-11)*Y+1.862334710665E-10)*Y- + 2.799399389539E-09)*Y+4.148972684255E-08)*Y- + 5.933568079600E-07)*Y+8.168349266115E-06)*Y- + 1.08989176177409E-04 )*Y+1.41357961729531E-03 )*Y- + 1.87588361833659E-02 )*Y+2.89898651436026E-01 + weights1 = ((((((((((((-1.46345073267549E-14*Y+2.25644205432182E-13)*Y- + 3.116258693847E-12)*Y+4.321908756610E-11)*Y- + 5.673270062669E-10)*Y+7.006295962960E-09)*Y- + 8.120186517000E-08)*Y+8.775294645770E-07)*Y- + 8.77829235749024E-06 )*Y+8.04372147732379E-05 )*Y- + 6.64149238804153E-04 )*Y+4.81181506827225E-03 )*Y- + 2.88982669486183E-02 )*Y+1.56247249979288E-01 + weights2 = ((((((((((((( 9.06812118895365E-15*Y-1.40541322766087E-13)* + Y+1.919270015269E-12)*Y-2.605135739010E-11)*Y+ + 3.299685839012E-10)*Y-3.86354139348735E-09 )*Y+ + 4.16265847927498E-08 )*Y-4.09462835471470E-07 )*Y+ + 3.64018881086111E-06 )*Y-2.88665153269386E-05 )*Y+ + 2.00515819789028E-04 )*Y-1.18791896897934E-03 )*Y+ + 5.75223633388589E-03 )*Y-2.09400418772687E-02 )*Y+4.85368861938873E-02 + weights3 = ((((((((((((((-9.74835552342257E-16*Y+1.57857099317175E-14)* + Y-2.249993780112E-13)*Y+3.173422008953E-12)*Y- + 4.161159459680E-11)*Y+5.021343560166E-10)*Y- + 5.545047534808E-09)*Y+5.554146993491E-08)*Y- + 4.99048696190133E-07 )*Y+3.96650392371311E-06 )*Y- + 2.73816413291214E-05 )*Y+1.60106988333186E-04 )*Y- + 7.64560567879592E-04 )*Y+2.81330044426892E-03 )*Y- + 7.16227030134947E-03 )*Y+9.66077262223353E-03 + elif X <= 10.0: + Y = X-7.5E+00 + roots0 = ((((((((( 4.64217329776215E-15*Y-6.27892383644164E-15)*Y+ + 3.462236347446E-13)*Y-2.927229355350E-11)*Y+ + 5.090355371676E-10)*Y-9.97272656345253E-09 )*Y+ + 2.37835295639281E-07 )*Y-4.60301761310921E-06 )*Y+ + 8.42824204233222E-05 )*Y-1.37983082233081E-03 )*Y+1.66630865869375E-02 + roots1 = ((((((((( 2.93981127919047E-14*Y+8.47635639065744E-13)*Y- + 1.446314544774E-11)*Y-6.149155555753E-12)*Y+ + 8.484275604612E-10)*Y-6.10898827887652E-08 )*Y+ + 2.39156093611106E-06 )*Y-5.35837089462592E-05 )*Y+ + 1.00967602595557E-03 )*Y-1.57769317127372E-02 )*Y+1.74853819464285E-01 + roots2 = (((((((((( 2.93523563363000E-14*Y-6.40041776667020E-14)*Y- + 2.695740446312E-12)*Y+1.027082960169E-10)*Y- + 5.822038656780E-10)*Y-3.159991002539E-08)*Y+ + 4.327249251331E-07)*Y+4.856768455119E-06)*Y- + 2.54617989427762E-04 )*Y+5.54843378106589E-03 )*Y- + 7.95013029486684E-02 )*Y+7.20206142703162E-01 + roots3 = (((((((((((-1.62212382394553E-14*Y+7.68943641360593E-13)*Y+ + 5.764015756615E-12)*Y-1.380635298784E-10)*Y- + 1.476849808675E-09)*Y+1.84347052385605E-08 )*Y+ + 3.34382940759405E-07 )*Y-1.39428366421645E-06 )*Y- + 7.50249313713996E-05 )*Y-6.26495899187507E-04 )*Y+ + 4.69716410901162E-02 )*Y-6.66871297428209E-01 )*Y+4.11207530217806E+00 + weights0 = ((((((((((-1.65995045235997E-15*Y+6.91838935879598E-14)*Y- + 9.131223418888E-13)*Y+1.403341829454E-11)*Y- + 3.672235069444E-10)*Y+6.366962546990E-09)*Y- + 1.039220021671E-07)*Y+1.959098751715E-06)*Y- + 3.33474893152939E-05 )*Y+5.72164211151013E-04 )*Y- + 1.05583210553392E-02 )*Y+2.26696066029591E-01 + weights1 = ((((((((((((-3.57248951192047E-16*Y+6.25708409149331E-15)*Y- + 9.657033089714E-14)*Y+1.507864898748E-12)*Y- + 2.332522256110E-11)*Y+3.428545616603E-10)*Y- + 4.698730937661E-09)*Y+6.219977635130E-08)*Y- + 7.83008889613661E-07 )*Y+9.08621687041567E-06 )*Y- + 9.86368311253873E-05 )*Y+9.69632496710088E-04 )*Y- + 8.14594214284187E-03 )*Y+8.50218447733457E-02 + weights2 = ((((((((((((( 1.64742458534277E-16*Y-2.68512265928410E-15)* + Y+3.788890667676E-14)*Y-5.508918529823E-13)*Y+ + 7.555896810069E-12)*Y-9.69039768312637E-11 )*Y+ + 1.16034263529672E-09 )*Y-1.28771698573873E-08 )*Y+ + 1.31949431805798E-07 )*Y-1.23673915616005E-06 )*Y+ + 1.04189803544936E-05 )*Y-7.79566003744742E-05 )*Y+ + 5.03162624754434E-04 )*Y-2.55138844587555E-03 )*Y+1.13250730954014E-02 + weights3 = ((((((((((((((-1.55714130075679E-17*Y+2.57193722698891E-16)* + Y-3.626606654097E-15)*Y+5.234734676175E-14)*Y- + 7.067105402134E-13)*Y+8.793512664890E-12)*Y- + 1.006088923498E-10)*Y+1.050565098393E-09)*Y- + 9.91517881772662E-09 )*Y+8.35835975882941E-08 )*Y- + 6.19785782240693E-07 )*Y+3.95841149373135E-06 )*Y- + 2.11366761402403E-05 )*Y+9.00474771229507E-05 )*Y- + 2.78777909813289E-04 )*Y+5.26543779837487E-04 + elif X <= 15.0: + Y = X-12.5E+00 + roots0 = ((((((((((( 4.94869622744119E-17*Y+8.03568805739160E-16)*Y- + 5.599125915431E-15)*Y-1.378685560217E-13)*Y+ + 7.006511663249E-13)*Y+1.30391406991118E-11 )*Y+ + 8.06987313467541E-11 )*Y-5.20644072732933E-09 )*Y+ + 7.72794187755457E-08 )*Y-1.61512612564194E-06 )*Y+ + 4.15083811185831E-05 )*Y-7.87855975560199E-04 )*Y+1.14189319050009E-02 + roots1 = ((((((((((( 4.89224285522336E-16*Y+1.06390248099712E-14)*Y- + 5.446260182933E-14)*Y-1.613630106295E-12)*Y+ + 3.910179118937E-12)*Y+1.90712434258806E-10 )*Y+ + 8.78470199094761E-10 )*Y-5.97332993206797E-08 )*Y+ + 9.25750831481589E-07 )*Y-2.02362185197088E-05 )*Y+ + 4.92341968336776E-04 )*Y-8.68438439874703E-03 )*Y+1.15825965127958E-01 + roots2 = (((((((((( 6.12419396208408E-14*Y+1.12328861406073E-13)*Y- + 9.051094103059E-12)*Y-4.781797525341E-11)*Y+ + 1.660828868694E-09)*Y+4.499058798868E-10)*Y- + 2.519549641933E-07)*Y+4.977444040180E-06)*Y- + 1.25858350034589E-04 )*Y+2.70279176970044E-03 )*Y- + 3.99327850801083E-02 )*Y+4.33467200855434E-01 + roots3 = ((((((((((( 4.63414725924048E-14*Y-4.72757262693062E-14)*Y- + 1.001926833832E-11)*Y+6.074107718414E-11)*Y+ + 1.576976911942E-09)*Y-2.01186401974027E-08 )*Y- + 1.84530195217118E-07 )*Y+5.02333087806827E-06 )*Y+ + 9.66961790843006E-06 )*Y-1.58522208889528E-03 )*Y+ + 2.80539673938339E-02 )*Y-2.78953904330072E-01 )*Y+1.82835655238235E+00 + weights3 = ((((((((((((( 2.90401781000996E-18*Y-4.63389683098251E-17)* + Y+6.274018198326E-16)*Y-8.936002188168E-15)*Y+ + 1.194719074934E-13)*Y-1.45501321259466E-12 )*Y+ + 1.64090830181013E-11 )*Y-1.71987745310181E-10 )*Y+ + 1.63738403295718E-09 )*Y-1.39237504892842E-08 )*Y+ + 1.06527318142151E-07 )*Y-7.27634957230524E-07 )*Y+ + 4.12159381310339E-06 )*Y-1.74648169719173E-05 )*Y+8.50290130067818E-05 + weights2 = ((((((((((((-4.19569145459480E-17*Y+5.94344180261644E-16)*Y- + 1.148797566469E-14)*Y+1.881303962576E-13)*Y- + 2.413554618391E-12)*Y+3.372127423047E-11)*Y- + 4.933988617784E-10)*Y+6.116545396281E-09)*Y- + 6.69965691739299E-08 )*Y+7.52380085447161E-07 )*Y- + 8.08708393262321E-06 )*Y+6.88603417296672E-05 )*Y- + 4.67067112993427E-04 )*Y+5.42313365864597E-03 + weights1 = ((((((((((-6.22272689880615E-15*Y+1.04126809657554E-13)*Y- + 6.842418230913E-13)*Y+1.576841731919E-11)*Y- + 4.203948834175E-10)*Y+6.287255934781E-09)*Y- + 8.307159819228E-08)*Y+1.356478091922E-06)*Y- + 2.08065576105639E-05 )*Y+2.52396730332340E-04 )*Y- + 2.94484050194539E-03 )*Y+6.01396183129168E-02 + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*np.exp(-X) +np.sqrt(PIE4/X)-weights3-weights2-weights1 + elif X <= 20.0: + weights0 = np.sqrt(PIE4/X) + Y = X-17.5E+00 + roots0 = ((((((((((( 4.36701759531398E-17*Y-1.12860600219889E-16)*Y- + 6.149849164164E-15)*Y+5.820231579541E-14)*Y+ + 4.396602872143E-13)*Y-1.24330365320172E-11 )*Y+ + 6.71083474044549E-11 )*Y+2.43865205376067E-10 )*Y+ + 1.67559587099969E-08 )*Y-9.32738632357572E-07 )*Y+ + 2.39030487004977E-05 )*Y-4.68648206591515E-04 )*Y+8.34977776583956E-03 + roots1 = ((((((((((( 4.98913142288158E-16*Y-2.60732537093612E-16)*Y- + 7.775156445127E-14)*Y+5.766105220086E-13)*Y+ + 6.432696729600E-12)*Y-1.39571683725792E-10 )*Y+ + 5.95451479522191E-10 )*Y+2.42471442836205E-09 )*Y+ + 2.47485710143120E-07 )*Y-1.14710398652091E-05 )*Y+ + 2.71252453754519E-04 )*Y-4.96812745851408E-03 )*Y+8.26020602026780E-02 + roots2 = ((((((((((( 1.91498302509009E-15*Y+1.48840394311115E-14)*Y- + 4.316925145767E-13)*Y+1.186495793471E-12)*Y+ + 4.615806713055E-11)*Y-5.54336148667141E-10 )*Y+ + 3.48789978951367E-10 )*Y-2.79188977451042E-09 )*Y+ + 2.09563208958551E-06 )*Y-6.76512715080324E-05 )*Y+ + 1.32129867629062E-03 )*Y-2.05062147771513E-02 )*Y+2.88068671894324E-01 + roots3 = (((((((((((-5.43697691672942E-15*Y-1.12483395714468E-13)*Y+ + 2.826607936174E-12)*Y-1.266734493280E-11)*Y- + 4.258722866437E-10)*Y+9.45486578503261E-09 )*Y- + 5.86635622821309E-08 )*Y-1.28835028104639E-06 )*Y+ + 4.41413815691885E-05 )*Y-7.61738385590776E-04 )*Y+ + 9.66090902985550E-03 )*Y-1.01410568057649E-01 )*Y+9.54714798156712E-01 + weights3 = ((((((((((((-7.56882223582704E-19*Y+7.53541779268175E-18)*Y- + 1.157318032236E-16)*Y+2.411195002314E-15)*Y- + 3.601794386996E-14)*Y+4.082150659615E-13)*Y- + 4.289542980767E-12)*Y+5.086829642731E-11)*Y- + 6.35435561050807E-10 )*Y+6.82309323251123E-09 )*Y- + 5.63374555753167E-08 )*Y+3.57005361100431E-07 )*Y- + 2.40050045173721E-06 )*Y+4.94171300536397E-05 + weights2 = (((((((((((-5.54451040921657E-17*Y+2.68748367250999E-16)*Y+ + 1.349020069254E-14)*Y-2.507452792892E-13)*Y+ + 1.944339743818E-12)*Y-1.29816917658823E-11 )*Y+ + 3.49977768819641E-10 )*Y-8.67270669346398E-09 )*Y+ + 1.31381116840118E-07 )*Y-1.36790720600822E-06 )*Y+ + 1.19210697673160E-05 )*Y-1.42181943986587E-04 )*Y+4.12615396191829E-03 + weights1 = (((((((((((-1.86506057729700E-16*Y+1.16661114435809E-15)*Y+ + 2.563712856363E-14)*Y-4.498350984631E-13)*Y+ + 1.765194089338E-12)*Y+9.04483676345625E-12 )*Y+ + 4.98930345609785E-10 )*Y-2.11964170928181E-08 )*Y+ + 3.98295476005614E-07 )*Y-5.49390160829409E-06 )*Y+ + 7.74065155353262E-05 )*Y-1.48201933009105E-03 )*Y+4.97836392625268E-02 + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*np.exp(-X)+weights0-weights1-weights2-weights3 + elif X <= 35.0: + weights0 = np.sqrt(PIE4/X) + E = np.exp(-X) + roots0 = ((((((-4.45711399441838E-05*X+1.27267770241379E-03)*X - + 2.36954961381262E-01)*X+1.54330657903756E+01)*X - + 5.22799159267808E+02)*X+1.05951216669313E+04)*X + + (-2.51177235556236E+06/X+8.72975373557709E+05)/X - + 1.29194382386499E+05)*E + R14/(X-R14) + roots1 = (((((-7.85617372254488E-02*X+6.35653573484868E+00)*X - + 3.38296938763990E+02)*X+1.25120495802096E+04)*X - + 3.16847570511637E+05)*X + + ((-1.02427466127427E+09/X + + 3.70104713293016E+08)/X-5.87119005093822E+07)/X + + 5.38614211391604E+06)*E + R24/(X-R24) + roots2 = (((((-2.37900485051067E-01*X+1.84122184400896E+01)*X - + 1.00200731304146E+03)*X+3.75151841595736E+04)*X - + 9.50626663390130E+05)*X + + ((-2.88139014651985E+09/X + + 1.06625915044526E+09)/X-1.72465289687396E+08)/X + + 1.60419390230055E+07)*E + R34/(X-R34) + roots3 = ((((((-6.00691586407385E-04*X-3.64479545338439E-01)*X + + 1.57496131755179E+01)*X-6.54944248734901E+02)*X + + 1.70830039597097E+04)*X-2.90517939780207E+05)*X + + (3.49059698304732E+07/X-1.64944522586065E+07)/X + + 2.96817940164703E+06)*E + R44/(X-R44) + if X <= 25.0: + weights3 = ((((((( 2.33766206773151E-07*X- + 3.81542906607063E-05)*X +3.51416601267000E-03)*X- + 1.66538571864728E-01)*X +4.80006136831847E+00)*X- + 8.73165934223603E+01)*X +9.77683627474638E+02)*X + + 1.66000945117640E+04/X -6.14479071209961E+03)*E + W44*weights0 + else: + weights3 = (((((( 5.74245945342286E-06*X- + 7.58735928102351E-05)*X +2.35072857922892E-04)*X- + 3.78812134013125E-03)*X +3.09871652785805E-01)*X- + 7.11108633061306E+00)*X +5.55297573149528E+01)*E + W44*weights0 + + weights2 = (((((( 2.36392855180768E-04*X-9.16785337967013E-03)*X + + 4.62186525041313E-01)*X-1.96943786006540E+01)*X + + 4.99169195295559E+02)*X-6.21419845845090E+03)*X + + ((+5.21445053212414E+07/X-1.34113464389309E+07)/X + + 1.13673298305631E+06)/X-2.81501182042707E+03)*E + W34*weights0 + weights1 = (((((( 7.29841848989391E-04*X-3.53899555749875E-02)*X + + 2.07797425718513E+00)*X-1.00464709786287E+02)*X + + 3.15206108877819E+03)*X-6.27054715090012E+04)*X + + (+1.54721246264919E+07/X-5.26074391316381E+06)/X + + 7.67135400969617E+05)*E + W24*weights0 + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + weights0-weights1-weights2-weights3 + elif X <= 53.0: + weights0 = np.sqrt(PIE4/X) + E = np.exp(-X)*(X*X)**2 + roots3 = ((-2.19135070169653E-03*X-1.19108256987623E-01)*X - + 7.50238795695573E-01)*E + R44/(X-R44) + roots2 = ((-9.65842534508637E-04*X-4.49822013469279E-02)*X + + 6.08784033347757E-01)*E + R34/(X-R34) + roots1 = ((-3.62569791162153E-04*X-9.09231717268466E-03)*X + + 1.84336760556262E-01)*E + R24/(X-R24) + roots0 = ((-4.07557525914600E-05*X-6.88846864931685E-04)*X + + 1.74725309199384E-02)*E + R14/(X-R14) + weights3 = (( 5.76631982000990E-06*X-7.89187283804890E-05)*X + + 3.28297971853126E-04)*E + W44*weights0 + weights2 = (( 2.08294969857230E-04*X-3.77489954837361E-03)*X + + 2.09857151617436E-02)*E + W34*weights0 + weights1 = (( 6.16374517326469E-04*X-1.26711744680092E-02)*X + + 8.14504890732155E-02)*E + W24*weights0 + weights0 = weights0-weights1-weights2-weights3 + else: + weights0 = np.sqrt(PIE4/X) + roots0 = R14/(X-R14) + roots1 = R24/(X-R24) + roots2 = R34/(X-R34) + roots3 = R44/(X-R44) + weights3 = W44*weights0 + weights2 = W34*weights0 + weights1 = W24*weights0 + weights0 = weights0-weights1-weights2-weights3 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + roots[3] = roots3 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + weights[3] = weights3 + + return roots, weights + +R15,PIE4 = 1.17581320211778E-01, 7.85398163397448E-01 +R25,W25 = 1.07456201243690E+00, 2.70967405960535E-01 +R35,W35 = 3.08593744371754E+00, 3.82231610015404E-02 +R45,W45 = 6.41472973366203E+00, 1.51614186862443E-03 +R55,W55 = 1.18071894899717E+01, 8.62130526143657E-06 + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def Root5(X,n, roots, weights): + if X < 3.0E-7: + roots0 = 2.26659266316985E-02 -2.15865967920897E-03 *X + roots1 = 2.31271692140903E-01 -2.20258754389745E-02 *X + roots2 = 8.57346024118836E-01 -8.16520023025515E-02 *X + roots3 = 2.97353038120346E+00 -2.83193369647137E-01 *X + roots4 = 1.84151859759051E+01 -1.75382723579439E+00 *X + weights0 = 2.95524224714752E-01 -1.96867576909777E-02 *X + weights1 = 2.69266719309995E-01 -5.61737590184721E-02 *X + weights2 = 2.19086362515981E-01 -9.71152726793658E-02 *X + weights3 = 1.49451349150580E-01 -1.02979262193565E-01 *X + weights4 = 6.66713443086877E-02 -5.73782817488315E-02 *X + elif X < 1.0: + roots0 = ((((((-4.46679165328413E-11*X+1.21879111988031E-09)*X- + 2.62975022612104E-08 )*X+5.15106194905897E-07 )*X- + 9.27933625824749E-06 )*X+1.51794097682482E-04 )*X- + 2.15865967920301E-03 )*X+2.26659266316985E-02 + roots1 = (((((( 1.93117331714174E-10*X-4.57267589660699E-09)*X+ + 2.48339908218932E-08 )*X+1.50716729438474E-06 )*X- + 6.07268757707381E-05 )*X+1.37506939145643E-03 )*X- + 2.20258754419939E-02 )*X+2.31271692140905E-01 + roots2 = ((((( 4.84989776180094E-09*X+1.31538893944284E-07)*X- + 2.766753852879E-06)*X-7.651163510626E-05)*X+ + 4.033058545972E-03)*X-8.16520022916145E-02 )*X+8.57346024118779E-01 + roots3 = ((((-2.48581772214623E-07*X-4.34482635782585E-06)*X- + 7.46018257987630E-07 )*X+1.01210776517279E-02 )*X- + 2.83193369640005E-01 )*X+2.97353038120345E+00 + roots4 = (((((-8.92432153868554E-09*X+1.77288899268988E-08)*X+ + 3.040754680666E-06)*X+1.058229325071E-04)*X+ + 4.596379534985E-02)*X-1.75382723579114E+00 )*X+1.84151859759049E+01 + weights0 = ((((((-2.03822632771791E-09*X+3.89110229133810E-08)*X- + 5.84914787904823E-07 )*X+8.30316168666696E-06 )*X- + 1.13218402310546E-04 )*X+1.49128888586790E-03 )*X- + 1.96867576904816E-02 )*X+2.95524224714749E-01 + weights1 = ((((((( 8.62848118397570E-09*X-1.38975551148989E-07)*X+ + 1.602894068228E-06)*X-1.646364300836E-05)*X+ + 1.538445806778E-04)*X-1.28848868034502E-03 )*X+ + 9.38866933338584E-03 )*X-5.61737590178812E-02 )*X+2.69266719309991E-01 + weights2 = ((((((((-9.41953204205665E-09*X+1.47452251067755E-07)*X- + 1.57456991199322E-06 )*X+1.45098401798393E-05 )*X- + 1.18858834181513E-04 )*X+8.53697675984210E-04 )*X- + 5.22877807397165E-03 )*X+2.60854524809786E-02 )*X- + 9.71152726809059E-02 )*X+2.19086362515979E-01 + weights3 = ((((((((-3.84961617022042E-08*X+5.66595396544470E-07)*X- + 5.52351805403748E-06 )*X+4.53160377546073E-05 )*X- + 3.22542784865557E-04 )*X+1.95682017370967E-03 )*X- + 9.77232537679229E-03 )*X+3.79455945268632E-02 )*X- + 1.02979262192227E-01 )*X+1.49451349150573E-01 + weights4 = ((((((((( 4.09594812521430E-09*X-6.47097874264417E-08)*X+ + 6.743541482689E-07)*X-5.917993920224E-06)*X+ + 4.531969237381E-05)*X-2.99102856679638E-04 )*X+ + 1.65695765202643E-03 )*X-7.40671222520653E-03 )*X+ + 2.50889946832192E-02 )*X-5.73782817487958E-02 )*X+6.66713443086877E-02 + elif X < 5.0: + Y = X-3.0E+00 + roots0 = ((((((((-2.58163897135138E-14*Y+8.14127461488273E-13)*Y- + 2.11414838976129E-11 )*Y+5.09822003260014E-10 )*Y- + 1.16002134438663E-08 )*Y+2.46810694414540E-07 )*Y- + 4.92556826124502E-06 )*Y+9.02580687971053E-05 )*Y- + 1.45190025120726E-03 )*Y+1.73416786387475E-02 + roots1 = ((((((((( 1.04525287289788E-14*Y+5.44611782010773E-14)*Y- + 4.831059411392E-12)*Y+1.136643908832E-10)*Y- + 1.104373076913E-09)*Y-2.35346740649916E-08 )*Y+ + 1.43772622028764E-06 )*Y-4.23405023015273E-05 )*Y+ + 9.12034574793379E-04 )*Y-1.52479441718739E-02 )*Y+1.76055265928744E-01 + roots2 = (((((((((-6.89693150857911E-14*Y+5.92064260918861E-13)*Y+ + 1.847170956043E-11)*Y-3.390752744265E-10)*Y- + 2.995532064116E-09)*Y+1.57456141058535E-07 )*Y- + 3.95859409711346E-07 )*Y-9.58924580919747E-05 )*Y+ + 3.23551502557785E-03 )*Y-5.97587007636479E-02 )*Y+6.46432853383057E-01 + roots3 = ((((((((-3.61293809667763E-12*Y-2.70803518291085E-11)*Y+ + 8.83758848468769E-10 )*Y+1.59166632851267E-08 )*Y- + 1.32581997983422E-07 )*Y-7.60223407443995E-06 )*Y- + 7.41019244900952E-05 )*Y+9.81432631743423E-03 )*Y- + 2.23055570487771E-01 )*Y+2.21460798080643E+00 + roots4 = ((((((((( 7.12332088345321E-13*Y+3.16578501501894E-12)*Y- + 8.776668218053E-11)*Y-2.342817613343E-09)*Y- + 3.496962018025E-08)*Y-3.03172870136802E-07 )*Y+ + 1.50511293969805E-06 )*Y+1.37704919387696E-04 )*Y+ + 4.70723869619745E-02 )*Y-1.47486623003693E+00 )*Y+1.35704792175847E+01 + weights0 = ((((((((( 1.04348658616398E-13*Y-1.94147461891055E-12)*Y+ + 3.485512360993E-11)*Y-6.277497362235E-10)*Y+ + 1.100758247388E-08)*Y-1.88329804969573E-07 )*Y+ + 3.12338120839468E-06 )*Y-5.04404167403568E-05 )*Y+ + 8.00338056610995E-04 )*Y-1.30892406559521E-02 )*Y+2.47383140241103E-01 + weights1 = ((((((((((( 3.23496149760478E-14*Y-5.24314473469311E-13)*Y+ + 7.743219385056E-12)*Y-1.146022750992E-10)*Y+ + 1.615238462197E-09)*Y-2.15479017572233E-08 )*Y+ + 2.70933462557631E-07 )*Y-3.18750295288531E-06 )*Y+ + 3.47425221210099E-05 )*Y-3.45558237388223E-04 )*Y+ + 3.05779768191621E-03 )*Y-2.29118251223003E-02 )*Y+1.59834227924213E-01 + weights2 = ((((((((((((-3.42790561802876E-14*Y+5.26475736681542E-13)*Y- + 7.184330797139E-12)*Y+9.763932908544E-11)*Y- + 1.244014559219E-09)*Y+1.472744068942E-08)*Y- + 1.611749975234E-07)*Y+1.616487851917E-06)*Y- + 1.46852359124154E-05 )*Y+1.18900349101069E-04 )*Y- + 8.37562373221756E-04 )*Y+4.93752683045845E-03 )*Y- + 2.25514728915673E-02 )*Y+6.95211812453929E-02 + weights3 = ((((((((((((( 1.04072340345039E-14*Y-1.60808044529211E-13)* + Y+2.183534866798E-12)*Y-2.939403008391E-11)*Y+ + 3.679254029085E-10)*Y-4.23775673047899E-09 )*Y+ + 4.46559231067006E-08 )*Y-4.26488836563267E-07 )*Y+ + 3.64721335274973E-06 )*Y-2.74868382777722E-05 )*Y+ + 1.78586118867488E-04 )*Y-9.68428981886534E-04 )*Y+ + 4.16002324339929E-03 )*Y-1.28290192663141E-02 )*Y+2.22353727685016E-02 + weights4 = ((((((((((((((-8.16770412525963E-16*Y+1.31376515047977E-14)* + Y-1.856950818865E-13)*Y+2.596836515749E-12)*Y- + 3.372639523006E-11)*Y+4.025371849467E-10)*Y- + 4.389453269417E-09)*Y+4.332753856271E-08)*Y- + 3.82673275931962E-07 )*Y+2.98006900751543E-06 )*Y- + 2.00718990300052E-05 )*Y+1.13876001386361E-04 )*Y- + 5.23627942443563E-04 )*Y+1.83524565118203E-03 )*Y- + 4.37785737450783E-03 )*Y+5.36963805223095E-03 + elif X < 10.0: + Y = X-7.5E+00 + roots0 = ((((((((-1.13825201010775E-14*Y+1.89737681670375E-13)*Y- + 4.81561201185876E-12 )*Y+1.56666512163407E-10 )*Y- + 3.73782213255083E-09 )*Y+9.15858355075147E-08 )*Y- + 2.13775073585629E-06 )*Y+4.56547356365536E-05 )*Y- + 8.68003909323740E-04 )*Y+1.22703754069176E-02 + roots1 = (((((((((-3.67160504428358E-15*Y+1.27876280158297E-14)*Y- + 1.296476623788E-12)*Y+1.477175434354E-11)*Y+ + 5.464102147892E-10)*Y-2.42538340602723E-08 )*Y+ + 8.20460740637617E-07 )*Y-2.20379304598661E-05 )*Y+ + 4.90295372978785E-04 )*Y-9.14294111576119E-03 )*Y+1.22590403403690E-01 + roots2 = ((((((((( 1.39017367502123E-14*Y-6.96391385426890E-13)*Y+ + 1.176946020731E-12)*Y+1.725627235645E-10)*Y- + 3.686383856300E-09)*Y+2.87495324207095E-08 )*Y+ + 1.71307311000282E-06 )*Y-7.94273603184629E-05 )*Y+ + 2.00938064965897E-03 )*Y-3.63329491677178E-02 )*Y+4.34393683888443E-01 + roots3 = ((((((((((-1.27815158195209E-14*Y+1.99910415869821E-14)*Y+ + 3.753542914426E-12)*Y-2.708018219579E-11)*Y- + 1.190574776587E-09)*Y+1.106696436509E-08)*Y+ + 3.954955671326E-07)*Y-4.398596059588E-06)*Y- + 2.01087998907735E-04 )*Y+7.89092425542937E-03 )*Y- + 1.42056749162695E-01 )*Y+1.39964149420683E+00 + roots4 = ((((((((((-1.19442341030461E-13*Y-2.34074833275956E-12)*Y+ + 6.861649627426E-12)*Y+6.082671496226E-10)*Y+ + 5.381160105420E-09)*Y-6.253297138700E-08)*Y- + 2.135966835050E-06)*Y-2.373394341886E-05)*Y+ + 2.88711171412814E-06 )*Y+4.85221195290753E-02 )*Y- + 1.04346091985269E+00 )*Y+7.89901551676692E+00 + weights0 = ((((((((( 7.95526040108997E-15*Y-2.48593096128045E-13)*Y+ + 4.761246208720E-12)*Y-9.535763686605E-11)*Y+ + 2.225273630974E-09)*Y-4.49796778054865E-08 )*Y+ + 9.17812870287386E-07 )*Y-1.86764236490502E-05 )*Y+ + 3.76807779068053E-04 )*Y-8.10456360143408E-03 )*Y+2.01097936411496E-01 + weights1 = ((((((((((( 1.25678686624734E-15*Y-2.34266248891173E-14)*Y+ + 3.973252415832E-13)*Y-6.830539401049E-12)*Y+ + 1.140771033372E-10)*Y-1.82546185762009E-09 )*Y+ + 2.77209637550134E-08 )*Y-4.01726946190383E-07 )*Y+ + 5.48227244014763E-06 )*Y-6.95676245982121E-05 )*Y+ + 8.05193921815776E-04 )*Y-8.15528438784469E-03 )*Y+9.71769901268114E-02 + weights2 = ((((((((((((-8.20929494859896E-16*Y+1.37356038393016E-14)*Y- + 2.022863065220E-13)*Y+3.058055403795E-12)*Y- + 4.387890955243E-11)*Y+5.923946274445E-10)*Y- + 7.503659964159E-09)*Y+8.851599803902E-08)*Y- + 9.65561998415038E-07 )*Y+9.60884622778092E-06 )*Y- + 8.56551787594404E-05 )*Y+6.66057194311179E-04 )*Y- + 4.17753183902198E-03 )*Y+2.25443826852447E-02 + weights3 = ((((((((((((((-1.08764612488790E-17*Y+1.85299909689937E-16)* + Y-2.730195628655E-15)*Y+4.127368817265E-14)*Y- + 5.881379088074E-13)*Y+7.805245193391E-12)*Y- + 9.632707991704E-11)*Y+1.099047050624E-09)*Y- + 1.15042731790748E-08 )*Y+1.09415155268932E-07 )*Y- + 9.33687124875935E-07 )*Y+7.02338477986218E-06 )*Y- + 4.53759748787756E-05 )*Y+2.41722511389146E-04 )*Y- + 9.75935943447037E-04 )*Y+2.57520532789644E-03 + weights4 = ((((((((((((((( 7.28996979748849E-19*Y-1.26518146195173E-17) + *Y+1.886145834486E-16)*Y-2.876728287383E-15)*Y+ + 4.114588668138E-14)*Y-5.44436631413933E-13 )*Y+ + 6.64976446790959E-12 )*Y-7.44560069974940E-11 )*Y+ + 7.57553198166848E-10 )*Y-6.92956101109829E-09 )*Y+ + 5.62222859033624E-08 )*Y-3.97500114084351E-07 )*Y+ + 2.39039126138140E-06 )*Y-1.18023950002105E-05 )*Y+ + 4.52254031046244E-05 )*Y-1.21113782150370E-04 )*Y+1.75013126731224E-04 + elif X < 15.0: + Y = X-12.5E+00 + roots0 = ((((((((((-4.16387977337393E-17*Y+7.20872997373860E-16)*Y+ + 1.395993802064E-14)*Y+3.660484641252E-14)*Y- + 4.154857548139E-12)*Y+2.301379846544E-11)*Y- + 1.033307012866E-09)*Y+3.997777641049E-08)*Y- + 9.35118186333939E-07 )*Y+2.38589932752937E-05 )*Y- + 5.35185183652937E-04 )*Y+8.85218988709735E-03 + roots1 = ((((((((((-4.56279214732217E-16*Y+6.24941647247927E-15)*Y+ + 1.737896339191E-13)*Y+8.964205979517E-14)*Y- + 3.538906780633E-11)*Y+9.561341254948E-11)*Y- + 9.772831891310E-09)*Y+4.240340194620E-07)*Y- + 1.02384302866534E-05 )*Y+2.57987709704822E-04 )*Y- + 5.54735977651677E-03 )*Y+8.68245143991948E-02 + roots2 = ((((((((((-2.52879337929239E-15*Y+2.13925810087833E-14)*Y+ + 7.884307667104E-13)*Y-9.023398159510E-13)*Y- + 5.814101544957E-11)*Y-1.333480437968E-09)*Y- + 2.217064940373E-08)*Y+1.643290788086E-06)*Y- + 4.39602147345028E-05 )*Y+1.08648982748911E-03 )*Y- + 2.13014521653498E-02 )*Y+2.94150684465425E-01 + roots3 = ((((((((((-6.42391438038888E-15*Y+5.37848223438815E-15)*Y+ + 8.960828117859E-13)*Y+5.214153461337E-11)*Y- + 1.106601744067E-10)*Y-2.007890743962E-08)*Y+ + 1.543764346501E-07)*Y+4.520749076914E-06)*Y- + 1.88893338587047E-04 )*Y+4.73264487389288E-03 )*Y- + 7.91197893350253E-02 )*Y+8.60057928514554E-01 + roots4 = (((((((((((-2.24366166957225E-14*Y+4.87224967526081E-14)*Y+ + 5.587369053655E-12)*Y-3.045253104617E-12)*Y- + 1.223983883080E-09)*Y-2.05603889396319E-09 )*Y+ + 2.58604071603561E-07 )*Y+1.34240904266268E-06 )*Y- + 5.72877569731162E-05 )*Y-9.56275105032191E-04 )*Y+ + 4.23367010370921E-02 )*Y-5.76800927133412E-01 )*Y+3.87328263873381E+00 + weights0 = ((((((((( 8.98007931950169E-15*Y+7.25673623859497E-14)*Y+ + 5.851494250405E-14)*Y-4.234204823846E-11)*Y+ + 3.911507312679E-10)*Y-9.65094802088511E-09 )*Y+ + 3.42197444235714E-07 )*Y-7.51821178144509E-06 )*Y+ + 1.94218051498662E-04 )*Y-5.38533819142287E-03 )*Y+1.68122596736809E-01 + weights1 = ((((((((((-1.05490525395105E-15*Y+1.96855386549388E-14)*Y- + 5.500330153548E-13)*Y+1.003849567976E-11)*Y- + 1.720997242621E-10)*Y+3.533277061402E-09)*Y- + 6.389171736029E-08)*Y+1.046236652393E-06)*Y- + 1.73148206795827E-05 )*Y+2.57820531617185E-04 )*Y- + 3.46188265338350E-03 )*Y+7.03302497508176E-02 + weights2 = ((((((((((( 3.60020423754545E-16*Y-6.24245825017148E-15)*Y+ + 9.945311467434E-14)*Y-1.749051512721E-12)*Y+ + 2.768503957853E-11)*Y-4.08688551136506E-10 )*Y+ + 6.04189063303610E-09 )*Y-8.23540111024147E-08 )*Y+ + 1.01503783870262E-06 )*Y-1.20490761741576E-05 )*Y+ + 1.26928442448148E-04 )*Y-1.05539461930597E-03 )*Y+1.15543698537013E-02 + weights3 = ((((((((((((( 2.51163533058925E-18*Y-4.31723745510697E-17)* + Y+6.557620865832E-16)*Y-1.016528519495E-14)*Y+ + 1.491302084832E-13)*Y-2.06638666222265E-12 )*Y+ + 2.67958697789258E-11 )*Y-3.23322654638336E-10 )*Y+ + 3.63722952167779E-09 )*Y-3.75484943783021E-08 )*Y+ + 3.49164261987184E-07 )*Y-2.92658670674908E-06 )*Y+ + 2.12937256719543E-05 )*Y-1.19434130620929E-04 )*Y+6.45524336158384E-04 + weights4 = ((((((((((((((-1.29043630202811E-19*Y+2.16234952241296E-18)* + Y-3.107631557965E-17)*Y+4.570804313173E-16)*Y- + 6.301348858104E-15)*Y+8.031304476153E-14)*Y- + 9.446196472547E-13)*Y+1.018245804339E-11)*Y- + 9.96995451348129E-11 )*Y+8.77489010276305E-10 )*Y- + 6.84655877575364E-09 )*Y+4.64460857084983E-08 )*Y- + 2.66924538268397E-07 )*Y+1.24621276265907E-06 )*Y- + 4.30868944351523E-06 )*Y+9.94307982432868E-06 + elif X < 20.0: + Y = X-17.5E+00 + roots0 = (((((((((( 1.91875764545740E-16*Y+7.8357401095707E-16)*Y- + 3.260875931644E-14)*Y-1.186752035569E-13)*Y+ + 4.275180095653E-12)*Y+3.357056136731E-11)*Y- + 1.123776903884E-09)*Y+1.231203269887E-08)*Y- + 3.99851421361031E-07 )*Y+1.45418822817771E-05 )*Y- + 3.49912254976317E-04 )*Y+6.67768703938812E-03 + roots1 = (((((((((( 2.02778478673555E-15*Y+1.01640716785099E-14)*Y- + 3.385363492036E-13)*Y-1.615655871159E-12)*Y+ + 4.527419140333E-11)*Y+3.853670706486E-10)*Y- + 1.184607130107E-08)*Y+1.347873288827E-07)*Y- + 4.47788241748377E-06 )*Y+1.54942754358273E-04 )*Y- + 3.55524254280266E-03 )*Y+6.44912219301603E-02 + roots2 = (((((((((( 7.79850771456444E-15*Y+6.00464406395001E-14)*Y- + 1.249779730869E-12)*Y-1.020720636353E-11)*Y+ + 1.814709816693E-10)*Y+1.766397336977E-09)*Y- + 4.603559449010E-08)*Y+5.863956443581E-07)*Y- + 2.03797212506691E-05 )*Y+6.31405161185185E-04 )*Y- + 1.30102750145071E-02 )*Y+2.10244289044705E-01 + roots3 = (((((((((((-2.92397030777912E-15*Y+1.94152129078465E-14)*Y+ + 4.859447665850E-13)*Y-3.217227223463E-12)*Y- + 7.484522135512E-11)*Y+7.19101516047753E-10 )*Y+ + 6.88409355245582E-09 )*Y-1.44374545515769E-07 )*Y+ + 2.74941013315834E-06 )*Y-1.02790452049013E-04 )*Y+ + 2.59924221372643E-03 )*Y-4.35712368303551E-02 )*Y+5.62170709585029E-01 + roots4 = ((((((((((( 1.17976126840060E-14*Y+1.24156229350669E-13)*Y- + 3.892741622280E-12)*Y-7.755793199043E-12)*Y+ + 9.492190032313E-10)*Y-4.98680128123353E-09 )*Y- + 1.81502268782664E-07 )*Y+2.69463269394888E-06 )*Y+ + 2.50032154421640E-05 )*Y-1.33684303917681E-03 )*Y+ + 2.29121951862538E-02 )*Y-2.45653725061323E-01 )*Y+1.89999883453047E+00 + weights0 = (((((((((( 1.74841995087592E-15*Y-6.95671892641256E-16)*Y- + 3.000659497257E-13)*Y+2.021279817961E-13)*Y+ + 3.853596935400E-11)*Y+1.461418533652E-10)*Y- + 1.014517563435E-08)*Y+1.132736008979E-07)*Y- + 2.86605475073259E-06 )*Y+1.21958354908768E-04 )*Y- + 3.86293751153466E-03 )*Y+1.45298342081522E-01 + weights1 = ((((((((((-1.11199320525573E-15*Y+1.85007587796671E-15)*Y+ + 1.220613939709E-13)*Y+1.275068098526E-12)*Y- + 5.341838883262E-11)*Y+6.161037256669E-10)*Y- + 1.009147879750E-08)*Y+2.907862965346E-07)*Y- + 6.12300038720919E-06 )*Y+1.00104454489518E-04 )*Y- + 1.80677298502757E-03 )*Y+5.78009914536630E-02 + weights2 = ((((((((((-9.49816486853687E-16*Y+6.67922080354234E-15)*Y+ + 2.606163540537E-15)*Y+1.983799950150E-12)*Y- + 5.400548574357E-11)*Y+6.638043374114E-10)*Y- + 8.799518866802E-09)*Y+1.791418482685E-07)*Y- + 2.96075397351101E-06 )*Y+3.38028206156144E-05 )*Y- + 3.58426847857878E-04 )*Y+8.39213709428516E-03 + weights3 = ((((((((((( 1.33829971060180E-17*Y-3.44841877844140E-16)*Y+ + 4.745009557656E-15)*Y-6.033814209875E-14)*Y+ + 1.049256040808E-12)*Y-1.70859789556117E-11 )*Y+ + 2.15219425727959E-10 )*Y-2.52746574206884E-09 )*Y+ + 3.27761714422960E-08 )*Y-3.90387662925193E-07 )*Y+ + 3.46340204593870E-06 )*Y-2.43236345136782E-05 )*Y+3.54846978585226E-04 + weights4 = ((((((((((((( 2.69412277020887E-20*Y-4.24837886165685E-19)* + Y+6.030500065438E-18)*Y-9.069722758289E-17)*Y+ + 1.246599177672E-15)*Y-1.56872999797549E-14 )*Y+ + 1.87305099552692E-13 )*Y-2.09498886675861E-12 )*Y+ + 2.11630022068394E-11 )*Y-1.92566242323525E-10 )*Y+ + 1.62012436344069E-09 )*Y-1.23621614171556E-08 )*Y+ + 7.72165684563049E-08 )*Y-3.59858901591047E-07 )*Y+2.43682618601000E-06 + elif X < 25.0: + Y = X-22.5E+00 + roots0 = (((((((((-1.13927848238726E-15*Y+7.39404133595713E-15)*Y+ + 1.445982921243E-13)*Y-2.676703245252E-12)*Y+ + 5.823521627177E-12)*Y+2.17264723874381E-10 )*Y+ + 3.56242145897468E-09 )*Y-3.03763737404491E-07 )*Y+ + 9.46859114120901E-06 )*Y-2.30896753853196E-04 )*Y+5.24663913001114E-03 + roots1 = (((((((((( 2.89872355524581E-16*Y-1.22296292045864E-14)*Y+ + 6.184065097200E-14)*Y+1.649846591230E-12)*Y- + 2.729713905266E-11)*Y+3.709913790650E-11)*Y+ + 2.216486288382E-09)*Y+4.616160236414E-08)*Y- + 3.32380270861364E-06 )*Y+9.84635072633776E-05 )*Y- + 2.30092118015697E-03 )*Y+5.00845183695073E-02 + roots2 = (((((((((( 1.97068646590923E-15*Y-4.89419270626800E-14)*Y+ + 1.136466605916E-13)*Y+7.546203883874E-12)*Y- + 9.635646767455E-11)*Y-8.295965491209E-11)*Y+ + 7.534109114453E-09)*Y+2.699970652707E-07)*Y- + 1.42982334217081E-05 )*Y+3.78290946669264E-04 )*Y- + 8.03133015084373E-03 )*Y+1.58689469640791E-01 + roots3 = (((((((((( 1.33642069941389E-14*Y-1.55850612605745E-13)*Y- + 7.522712577474E-13)*Y+3.209520801187E-11)*Y- + 2.075594313618E-10)*Y-2.070575894402E-09)*Y+ + 7.323046997451E-09)*Y+1.851491550417E-06)*Y- + 6.37524802411383E-05 )*Y+1.36795464918785E-03 )*Y- + 2.42051126993146E-02 )*Y+3.97847167557815E-01 + roots4 = ((((((((((-6.07053986130526E-14*Y+1.04447493138843E-12)*Y- + 4.286617818951E-13)*Y-2.632066100073E-10)*Y+ + 4.804518986559E-09)*Y-1.835675889421E-08)*Y- + 1.068175391334E-06)*Y+3.292234974141E-05)*Y- + 5.94805357558251E-04 )*Y+8.29382168612791E-03 )*Y- + 9.93122509049447E-02 )*Y+1.09857804755042E+00 + weights0 = (((((((((-9.10338640266542E-15*Y+1.00438927627833E-13)*Y+ + 7.817349237071E-13)*Y-2.547619474232E-11)*Y+ + 1.479321506529E-10)*Y+1.52314028857627E-09 )*Y+ + 9.20072040917242E-09 )*Y-2.19427111221848E-06 )*Y+ + 8.65797782880311E-05 )*Y-2.82718629312875E-03 )*Y+1.28718310443295E-01 + weights1 = ((((((((( 5.52380927618760E-15*Y-6.43424400204124E-14)*Y- + 2.358734508092E-13)*Y+8.261326648131E-12)*Y+ + 9.229645304956E-11)*Y-5.68108973828949E-09 )*Y+ + 1.22477891136278E-07 )*Y-2.11919643127927E-06 )*Y+ + 4.23605032368922E-05 )*Y-1.14423444576221E-03 )*Y+5.06607252890186E-02 + weights2 = ((((((((( 3.99457454087556E-15*Y-5.11826702824182E-14)*Y- + 4.157593182747E-14)*Y+4.214670817758E-12)*Y+ + 6.705582751532E-11)*Y-3.36086411698418E-09 )*Y+ + 6.07453633298986E-08 )*Y-7.40736211041247E-07 )*Y+ + 8.84176371665149E-06 )*Y-1.72559275066834E-04 )*Y+7.16639814253567E-03 + weights3 = (((((((((((-2.14649508112234E-18*Y-2.45525846412281E-18)*Y+ + 6.126212599772E-16)*Y-8.526651626939E-15)*Y+ + 4.826636065733E-14)*Y-3.39554163649740E-13 )*Y+ + 1.67070784862985E-11 )*Y-4.42671979311163E-10 )*Y+ + 6.77368055908400E-09 )*Y-7.03520999708859E-08 )*Y+ + 6.04993294708874E-07 )*Y-7.80555094280483E-06 )*Y+2.85954806605017E-04 + weights4 = ((((((((((((-5.63938733073804E-21*Y+6.92182516324628E-20)*Y- + 1.586937691507E-18)*Y+3.357639744582E-17)*Y- + 4.810285046442E-16)*Y+5.386312669975E-15)*Y- + 6.117895297439E-14)*Y+8.441808227634E-13)*Y- + 1.18527596836592E-11 )*Y+1.36296870441445E-10 )*Y- + 1.17842611094141E-09 )*Y+7.80430641995926E-09 )*Y- + 5.97767417400540E-08 )*Y+1.65186146094969E-06 + elif X < 40.0: + weights0 = np.sqrt(PIE4/X) + E = np.exp(-X) + roots0 = ((((((((-1.73363958895356E-06*X+1.19921331441483E-04)*X - + 1.59437614121125E-02)*X+1.13467897349442E+00)*X - + 4.47216460864586E+01)*X+1.06251216612604E+03)*X - + 1.52073917378512E+04)*X+1.20662887111273E+05)*X - + 4.07186366852475E+05)*E + R15/(X-R15) + roots1 = ((((((((-1.60102542621710E-05*X+1.10331262112395E-03)*X - + 1.50043662589017E-01)*X+1.05563640866077E+01)*X - + 4.10468817024806E+02)*X+9.62604416506819E+03)*X - + 1.35888069838270E+05)*X+1.06107577038340E+06)*X - + 3.51190792816119E+06)*E + R25/(X-R25) + roots2 = ((((((((-4.48880032128422E-05*X+2.69025112122177E-03)*X - + 4.01048115525954E-01)*X+2.78360021977405E+01)*X - + 1.04891729356965E+03)*X+2.36985942687423E+04)*X - + 3.19504627257548E+05)*X+2.34879693563358E+06)*X - + 7.16341568174085E+06)*E + R35/(X-R35) + roots3 = ((((((((-6.38526371092582E-05*X-2.29263585792626E-03)*X - + 7.65735935499627E-02)*X+9.12692349152792E+00)*X - + 2.32077034386717E+02)*X+2.81839578728845E+02)*X + + 9.59529683876419E+04)*X-1.77638956809518E+06)*X + + 1.02489759645410E+07)*E + R45/(X-R45) + roots4 = ((((((((-3.59049364231569E-05*X-2.25963977930044E-02)*X + + 1.12594870794668E+00)*X-4.56752462103909E+01)*X + + 1.05804526830637E+03)*X-1.16003199605875E+04)*X - + 4.07297627297272E+04)*X+2.22215528319857E+06)*X - + 1.61196455032613E+07)*E + R55/(X-R55) + weights4 = (((((((((-4.61100906133970E-10*X+1.43069932644286E-07)*X - + 1.63960915431080E-05)*X+1.15791154612838E-03)*X - + 5.30573476742071E-02)*X+1.61156533367153E+00)*X - + 3.23248143316007E+01)*X+4.12007318109157E+02)*X - + 3.02260070158372E+03)*X+9.71575094154768E+03)*E + W55*weights0 + weights3 = (((((((((-2.40799435809950E-08*X+8.12621667601546E-06)*X - + 9.04491430884113E-04)*X+6.37686375770059E-02)*X - + 2.96135703135647E+00)*X+9.15142356996330E+01)*X - + 1.86971865249111E+03)*X+2.42945528916947E+04)*X - + 1.81852473229081E+05)*X+5.96854758661427E+05)*E + W45*weights0 + weights2 = (((((((( 1.83574464457207E-05*X-1.54837969489927E-03)*X + + 1.18520453711586E-01)*X-6.69649981309161E+00)*X + + 2.44789386487321E+02)*X-5.68832664556359E+03)*X + + 8.14507604229357E+04)*X-6.55181056671474E+05)*X + + 2.26410896607237E+06)*E + W35*weights0 + weights1 = (((((((( 2.77778345870650E-05*X-2.22835017655890E-03)*X + + 1.61077633475573E-01)*X-8.96743743396132E+00)*X + + 3.28062687293374E+02)*X-7.65722701219557E+03)*X + + 1.10255055017664E+05)*X-8.92528122219324E+05)*X + + 3.10638627744347E+06)*E + W25*weights0 + weights0 = weights0-0.01962E+00*E-weights1-weights2-weights3-weights4 + elif X < 59.0: + weights0 = np.sqrt(PIE4/X) + XXX = X**3 + E = XXX*np.exp(-X) + roots0 = (((-2.43758528330205E-02*X+2.07301567989771E+00)*X - + 6.45964225381113E+01)*X+7.14160088655470E+02)*E + R15/(X-R15) + roots1 = (((-2.28861955413636E-01*X+1.93190784733691E+01)*X - + 5.99774730340912E+02)*X+6.61844165304871E+03)*E + R25/(X-R25) + roots2 = (((-6.95053039285586E-01*X+5.76874090316016E+01)*X - + 1.77704143225520E+03)*X+1.95366082947811E+04)*E + R35/(X-R35) + roots3 = (((-1.58072809087018E+00*X+1.27050801091948E+02)*X - + 3.86687350914280E+03)*X+4.23024828121420E+04)*E + R45/(X-R45) + roots4 = (((-3.33963830405396E+00*X+2.51830424600204E+02)*X - + 7.57728527654961E+03)*X+8.21966816595690E+04)*E + R55/(X-R55) + E = XXX*E + weights4 = (( 1.35482430510942E-08*X-3.27722199212781E-07)*X + + 2.41522703684296E-06)*E + W55*weights0 + weights3 = (( 1.23464092261605E-06*X-3.55224564275590E-05)*X + + 3.03274662192286E-04)*E + W45*weights0 + weights2 = (( 1.34547929260279E-05*X-4.19389884772726E-04)*X + + 3.87706687610809E-03)*E + W35*weights0 + weights1 = (( 2.09539509123135E-05*X-6.87646614786982E-04)*X + + 6.68743788585688E-03)*E + W25*weights0 + weights0 = weights0-weights1-weights2-weights3-weights4 + else: + weights0 = np.sqrt(PIE4/X) + roots0 = R15/(X-R15) + roots1 = R25/(X-R25) + roots2 = R35/(X-R35) + roots3 = R45/(X-R45) + roots4 = R55/(X-R55) + weights1 = W25*weights0 + weights2 = W35*weights0 + weights3 = W45*weights0 + weights4 = W55*weights0 + weights0 = weights0-weights1-weights2-weights3-weights4 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + roots[3] = roots3 + roots[4] = roots4 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + weights[3] = weights3 + weights[4] = weights4 + + return roots, weights#[roots1,roots2,roots3,roots4,roots[5]],[weights1,weights2,weights3,weights4,weights[5]] + +# Reference: https://github.com/sunqm/libcint/blob/master/src/roots_for_x0.dat BSD-2 Clause license +POLY_SMALLX_R0 = np.array([ + # nroots = 1 + 5.0000000000000000e-01, + # nroots = 2 + 1.3069360623708470e-01, + 2.8693063937629151e+00, + # nroots = 3 + 6.0376924683279896e-02, + 7.7682335593104601e-01, + 6.6627997193856743e+00, + # nroots = 4 + 3.4819897306147152e-02, + 3.8156718508004406e-01, + 1.7373072694588976e+00, + 1.1846305648154912e+01, + # nroots = 5 + 2.2665926631698637e-02, + 2.3127169214090557e-01, + 8.5734602411883609e-01, + 2.9735303812034606e+00, + 1.8415185975905100e+01, + # nroots = 6 + 1.5933294950708051e-02, + 1.5647046776795465e-01, + 5.2658326320347937e-01, + 1.4554949383527416e+00, + 4.4772915489042244e+00, + 2.6368226486820891e+01, + # nroots = 7 + 1.1813808454790223e-02, + 1.1337832545962978e-01, + 3.6143546199827142e-01, + 8.9527303800610059e-01, + 2.1671830744997034e+00, + 6.2459217468839974e+00, + 3.5704994544697506e+01, + # nroots = 8 + 9.1096129361797583e-03, + 8.6130778786234360e-02, + 2.6546936423055723e-01, + 6.1752374342048377e-01, + 1.3290252120652055e+00, + 2.9891077977621077e+00, + 8.2783291650163164e+00, + 4.6425304325782918e+01, + # nroots = 9 + 7.2388268576176690e-03, + 6.7744856280706228e-02, + 2.0415049332589749e-01, + 4.5633199434791133e-01, + 9.1729173690437338e-01, + 1.8243932992566771e+00, + 3.9197868892557834e+00, + 1.0573996723107014e+01, + 5.8529065180664020e+01, + # nroots = 10 + 5.8908068184661301e-03, + 5.4725924879562259e-02, + 1.6232609261161096e-01, + 3.5315267858751925e-01, + 6.7944242243948438e-01, + 1.2573939988964797e+00, + 2.3797176188890110e+00, + 4.9584689501831161e+00, + 1.3132652926121416e+01, + 7.2016228580573340e+01, + # nroots = 11 + 4.8873361261651269e-03, + 4.5157008761019399e-02, + 1.3240037096506918e-01, + 2.8253618374640332e-01, + 5.2746670115882444e-01, + 9.3166748944873068e-01, + 1.6361250128213276e+00, + 2.9941113975093119e+00, + 6.1047380665207358e+00, + 1.5954143802284950e+01, + 8.6886766630657462e+01, + # nroots = 12 + 4.1201918467690364e-03, + 3.7911181291998906e-02, + 1.1018828563899001e-01, + 2.3179530831466225e-01, + 4.2345630230694603e-01, + 7.2421338523125789e-01, + 1.2113317522159244e+00, + 2.0525334008082456e+00, + 3.6670630733185123e+00, + 7.3583481234816475e+00, + 1.9038376627614220e+01, + 1.0314066236793083e+02, +]) + +POLY_SMALLX_R1 = np.array([ + # nroots = 1 + -2.0000000000000001e-01, + # nroots = 2 + -2.9043023608241049e-02, + -6.3762364305842567e-01, + # nroots = 3 + -9.2887576435815231e-03, + -1.1951128552785324e-01, + -1.0250461106747191e+00, + # nroots = 4 + -4.0964585066055473e-03, + -4.4890257068240479e-02, + -2.0438909052457618e-01, + -1.3936830174299895e+00, + # nroots = 5 + -2.1586596792093939e-03, + -2.2025875441991007e-02, + -8.1652002297032011e-02, + -2.8319336963842484e-01, + -1.7538272358004856e+00, + # nroots = 6 + -1.2746635960566440e-03, + -1.2517637421436372e-02, + -4.2126661056278353e-02, + -1.1643959506821934e-01, + -3.5818332391233798e-01, + -2.1094581189456711e+00, + # nroots = 7 + -8.1474541067518772e-04, + -7.8191948592848132e-03, + -2.4926583586087684e-02, + -6.1742968138351763e-02, + -1.4946090168963472e-01, + -4.3075322392303428e-01, + -2.4624134168756902e+00, + # nroots = 8 + -5.5209775370786412e-04, + -5.2200471991657189e-03, + -1.6089052377609530e-02, + -3.7425681419423255e-02, + -8.0546982549406398e-02, + -1.8115804834921864e-01, + -5.0171691909189797e-01, + -2.8136548076232071e+00, + # nroots = 9 + -3.9128793824960370e-04, + -3.6618841232814174e-03, + -1.1035161801399865e-02, + -2.4666594289076287e-02, + -4.9583337129966133e-02, + -9.8615854013874446e-02, + -2.1188037239220453e-01, + -5.7156739043821692e-01, + -3.1637332530088660e+00, + # nroots = 10 + -2.8735643016907951e-04, + -2.6695573111981587e-03, + -7.9183459810541930e-03, + -1.7226959931098500e-02, + -3.3143532801926071e-02, + -6.1336292629096574e-02, + -1.1608378628726883e-01, + -2.4187653415527396e-01, + -6.4061721590836185e-01, + -3.5129867600279674e+00, + # nroots = 11 + -2.1721493894067231e-04, + -2.0069781671564176e-03, + -5.8844609317808515e-03, + -1.2557163722062370e-02, + -2.3442964495947752e-02, + -4.1407443975499142e-02, + -7.2716667236503454e-02, + -1.3307161766708053e-01, + -2.7132169184536603e-01, + -7.0907305787933106e-01, + -3.8616340724736649e+00, + # nroots = 12 + -1.6817109578649129e-04, + -1.5473951547754655e-03, + -4.4974810464893881e-03, + -9.4610329924351942e-03, + -1.7283930706405961e-02, + -2.9559730009439098e-02, + -4.9442112335343846e-02, + -8.3776873502377364e-02, + -1.4967604380891888e-01, + -3.0034073973394482e-01, + -7.7707659704547827e-01, + -4.2098229537930951e+00, +]) + +POLY_SMALLX_W0 = np.array([ + # nroots = 1 + 1.0000000000000000e+00, + # nroots = 2 + 6.5214515486254609e-01, + 3.4785484513745385e-01, + # nroots = 3 + 4.6791393457269104e-01, + 3.6076157304813861e-01, + 1.7132449237917036e-01, + # nroots = 4 + 3.6268378337836199e-01, + 3.1370664587788727e-01, + 2.2238103445337448e-01, + 1.0122853629037626e-01, + # nroots = 5 + 2.9552422471475287e-01, + 2.6926671930999635e-01, + 2.1908636251598204e-01, + 1.4945134915058059e-01, + 6.6671344308688138e-02, + # nroots = 6 + 2.4914704581340277e-01, + 2.3349253653835481e-01, + 2.0316742672306592e-01, + 1.6007832854334622e-01, + 1.0693932599531843e-01, + 4.7175336386511828e-02, + # nroots = 7 + 2.1526385346315779e-01, + 2.0519846372129560e-01, + 1.8553839747793782e-01, + 1.5720316715819355e-01, + 1.2151857068790319e-01, + 8.0158087159760208e-02, + 3.5119460331751860e-02, + # nroots = 8 + 1.8945061045506850e-01, + 1.8260341504492358e-01, + 1.6915651939500254e-01, + 1.4959598881657674e-01, + 1.2462897125553388e-01, + 9.5158511682492786e-02, + 6.2253523938647894e-02, + 2.7152459411754096e-02, + # nroots = 9 + 1.6914238296314360e-01, + 1.6427648374583273e-01, + 1.5468467512626524e-01, + 1.4064291467065065e-01, + 1.2255520671147846e-01, + 1.0094204410628717e-01, + 7.6425730254889052e-02, + 4.9714548894969797e-02, + 2.1616013526483312e-02, + # nroots = 10 + 1.5275338713072584e-01, + 1.4917298647260374e-01, + 1.4209610931838204e-01, + 1.3168863844917664e-01, + 1.1819453196151841e-01, + 1.0193011981724044e-01, + 8.3276741576704755e-02, + 6.2672048334109068e-02, + 4.0601429800386939e-02, + 1.7614007139152118e-02, + # nroots = 11 + 1.3925187285563198e-01, + 1.3654149834601517e-01, + 1.3117350478706238e-01, + 1.2325237681051242e-01, + 1.1293229608053922e-01, + 1.0041414444288096e-01, + 8.5941606217067729e-02, + 6.9796468424520489e-02, + 5.2293335152683286e-02, + 3.3774901584814152e-02, + 1.4627995298272200e-02, + # nroots = 12 + 1.2793819534675216e-01, + 1.2583745634682830e-01, + 1.2167047292780339e-01, + 1.1550566805372560e-01, + 1.0744427011596563e-01, + 9.7618652104113884e-02, + 8.6190161531953274e-02, + 7.3346481411080300e-02, + 5.9298584915436783e-02, + 4.4277438817419808e-02, + 2.8531388628933663e-02, + 1.2341229799987200e-02, +]) + +POLY_SMALLX_W1 = np.array([ + # nroots = 1 + -3.3333333333333331e-01, + # nroots = 2 + -1.2271362192859778e-01, + -2.1061971140473557e-01, + # nroots = 3 + -5.6487691723447885e-02, + -1.4907718645889767e-01, + -1.2776845515098778e-01, + # nroots = 4 + -3.1384430571429409e-02, + -8.9804624256712817e-02, + -1.2931437096375242e-01, + -8.2829907541438680e-02, + # nroots = 5 + -1.9686757690986864e-02, + -5.6173759018728280e-02, + -9.7115272681211257e-02, + -1.0297926219357020e-01, + -5.7378281748836732e-02, + # nroots = 6 + -1.3404459326117429e-02, + -3.7140259226780728e-02, + -6.9798025993402457e-02, + -8.9903208869919593e-02, + -8.1202949733650345e-02, + -4.1884430183462780e-02, + # nroots = 7 + -9.6762784934135981e-03, + -2.5810077192692869e-02, + -5.0559277860857933e-02, + -7.1997207281479375e-02, + -7.8739057440032886e-02, + -6.4711830138776669e-02, + -3.1839604926079998e-02, + # nroots = 8 + -7.2956931243810877e-03, + -1.8697575943681034e-02, + -3.7385544074891822e-02, + -5.6452682904581976e-02, + -6.8429140245654982e-02, + -6.7705342645285799e-02, + -5.2380981359025407e-02, + -2.4986373035831237e-02, + # nroots = 9 + -5.6884471222090364e-03, + -1.4017609368068548e-02, + -2.8279396473125228e-02, + -4.4297481709585342e-02, + -5.7192383961753759e-02, + -6.2644131890598725e-02, + -5.8019794346925377e-02, + -4.3080183147849817e-02, + -2.0113905313217502e-02, + # nroots = 10 + -4.5548069078836916e-03, + -1.0812068870036251e-02, + -2.1858322694621932e-02, + -3.5065901484532154e-02, + -4.7201253922888042e-02, + -5.5107972224754838e-02, + -5.6377251364257981e-02, + -4.9866349375738916e-02, + -3.5958202071776788e-02, + -1.6531204416842745e-02, + # nroots = 11 + -3.7265960577018311e-03, + -8.5403678824716809e-03, + -1.7229332137015666e-02, + -2.8080687367955298e-02, + -3.8907666134333468e-02, + -4.7433694841593890e-02, + -5.1693920888210537e-02, + -5.0384549968286702e-02, + -4.3099530033836778e-02, + -3.0414471142145506e-02, + -1.3822516879781982e-02, + # nroots = 12 + -3.1038096899801901e-03, + -6.8830915722212487e-03, + -1.3819746842434521e-02, + -2.2762002213180321e-02, + -3.2198834723663874e-02, + -4.0484183390368120e-02, + -4.6081931636853396e-02, + -4.7795785285076720e-02, + -4.4950377862156901e-02, + -3.7497135400073503e-02, + -2.6030178540522940e-02, + -1.1726256176801588e-02, +]) + +POLY_LARGEX_RT = np.array([ + # nroots = 1 + 5.0000000000000000e-01, + # nroots = 2 + 2.7525512860841095e-01, + 2.7247448713915889e+00, + # nroots = 3 + 1.9016350919348812e-01, + 1.7844927485432516e+00, + 5.5253437422632601e+00, + # nroots = 4 + 1.4530352150331710e-01, + 1.3390972881263614e+00, + 3.9269635013582871e+00, + 8.5886356890120350e+00, + # nroots = 5 + 1.1758132021177814e-01, + 1.0745620124369040e+00, + 3.0859374437175502e+00, + 6.4147297336620301e+00, + 1.1807189489971737e+01, + # nroots = 6 + 9.8747014068481187e-02, + 8.9830283456961768e-01, + 2.5525898026681713e+00, + 5.1961525300544658e+00, + 9.1242480375311796e+00, + 1.5129959781108086e+01, + # nroots = 7 + 8.5115442997594035e-02, + 7.7213792004277704e-01, + 2.1805918884504591e+00, + 4.3897928867310139e+00, + 7.5540913261017844e+00, + 1.1989993039823879e+01, + 1.8528277495852493e+01, + # nroots = 8 + 7.4791882596818265e-02, + 6.7724908764928915e-01, + 1.9051136350314284e+00, + 3.8094763614849070e+00, + 6.4831454286271706e+00, + 1.0093323675221344e+01, + 1.4972627088426393e+01, + 2.1984272840962650e+01, + # nroots = 9 + 6.6702230958194400e-02, + 6.0323635708174872e-01, + 1.6923950797931788e+00, + 3.3691762702432690e+00, + 5.6944233429577551e+00, + 8.7697567302686021e+00, + 1.2771825354869193e+01, + 1.8046505467728981e+01, + 2.5485979166099078e+01, + # nroots = 10 + 6.0192063149587915e-02, + 5.4386750029464603e-01, + 1.5229441054044437e+00, + 3.0225133764515739e+00, + 5.0849077500985240e+00, + 7.7774392315254453e+00, + 1.1208130204348663e+01, + 1.5561163332189350e+01, + 2.1193892096301543e+01, + 2.9024950340236227e+01, + # nroots = 11 + 5.4839869578818493e-02, + 4.9517412335035643e-01, + 1.3846557400845998e+00, + 2.7419199401067025e+00, + 4.5977377004857116e+00, + 6.9993974695288363e+00, + 1.0018908275957234e+01, + 1.3769305866101691e+01, + 1.8441119680978193e+01, + 2.4401961242387042e+01, + 3.2594980091440817e+01, + # nroots = 12 + 5.0361889117293952e-02, + 4.5450668156378027e-01, + 1.2695899401039614e+00, + 2.5098480972321280e+00, + 4.1984156448784136e+00, + 6.3699753880306353e+00, + 9.0754342309612035e+00, + 1.2390447963809471e+01, + 1.6432195087675314e+01, + 2.1396755936166109e+01, + 2.7661108779846089e+01, + 3.6191360360615604e+01, +]) + +POLY_LARGEX_WW = np.array([ + # nroots = 1 + 1.0000000000000000e+00, + # nroots = 2 + 9.0824829046386302e-01, + 9.1751709536136983e-02, + # nroots = 3 + 8.1765693911205850e-01, + 1.7723149208382905e-01, + 5.1115688041124931e-03, + # nroots = 4 + 7.4602451535815473e-01, + 2.3447981532351803e-01, + 1.9270440241576533e-02, + 2.2522907675073554e-04, + # nroots = 5 + 6.8928466986403814e-01, + 2.7096740596053548e-01, + 3.8223161001540572e-02, + 1.5161418686244353e-03, + 8.6213052614365738e-06, + # nroots = 6 + 6.4332872302566002e-01, + 2.9393409609065996e-01, + 5.8233375824728303e-02, + 4.4067613750663976e-03, + 9.6743698451812559e-05, + 2.9998543352743358e-07, + # nroots = 7 + 6.0526925362603901e-01, + 3.0816667968502726e-01, + 7.7300217648506794e-02, + 8.8578382138948062e-03, + 4.0067910752148827e-04, + 5.3219826881352609e-06, + 9.7363225154967611e-09, + # nroots = 8 + 5.7313704247602426e-01, + 3.1667674550189923e-01, + 9.4569504708028052e-02, + 1.4533875202369467e-02, + 1.0519698531478185e-03, + 3.0600064324974545e-05, + 2.6189464325736453e-07, + 2.9956294463236794e-10, + # nroots = 9 + 5.4556646930857577e-01, + 3.2137060778702525e-01, + 1.0979326496044525e-01, + 2.1033035503882684e-02, + 2.1309695925833040e-03, + 1.0359792288232413e-04, + 2.0431047952739623e-06, + 1.1810976957673191e-08, + 8.8331775387174107e-12, + # nroots = 10 + 5.2158612689910977e-01, + 3.2347866796799990e-01, + 1.2301274412795381e-01, + 2.7995674894202006e-02, + 3.6602062621609857e-03, + 2.5765255992385888e-04, + 8.8042421804617054e-06, + 1.2254980519965896e-07, + 4.9641247246303573e-10, + 2.5156013448758539e-13, + # nroots = 11 + 5.0048719317386992e-01, + 3.2381258682735053e-01, + 1.3439262285778006e-01, + 3.5138145761611533e-02, + 5.6175220951544319e-03, + 5.2456660651192756e-04, + 2.6691954253619027e-05, + 6.6397074996280721e-07, + 6.7330283189164226e-09, + 1.9682757964692173e-11, + 6.9589212957542919e-15, + # nroots = 12 + 4.8174023109328062e-01, + 3.2291902573400016e-01, + 1.4413872803435665e-01, + 4.2252688817935091e-02, + 7.9532178583626174e-03, + 9.2943743755879136e-04, + 6.4190011305491828e-05, + 2.4353194908851625e-06, + 4.5349233469612837e-08, + 3.4373298559297163e-10, + 7.4299483055247976e-13, + 1.8780387378083912e-16, +]) + + +# Reference: https://raw.githubusercontent.com/sunqm/libcint/master/src/roots_xw.dat BSD-2 Clause license +DATA_X = np.array([ +# root=6 base[0]=0.0 */ + 2.89997626587128951e-02, + -1.38283203321371549e-03, + 4.90123491128919878e-05, + -1.52441499949787395e-06, + 4.36236281357860862e-08, + -1.17013639910324496e-09, + 2.95444793613339946e-11, + -7.00778192694614005e-13, + 1.53944148960478589e-14, + -3.05557470241521788e-16, + 5.03095618996754473e-18, + -5.27078930588344057e-20, + -5.52938274512611150e-22, + 7.34288597624025887e-23, + 2.84588229037201268e-01, + -1.37069245554686907e-02, + 4.57279273263211264e-04, + -1.19151902658947535e-05, + 2.31868175862158198e-07, + -2.40666613692062216e-09, + -4.14925950176661374e-11, + 2.91484083549932738e-12, + -7.76218456955175350e-14, + 7.55646276626551849e-16, + 3.05882706546193773e-17, + -1.81852027463530420e-18, + 4.69474231464040978e-20, + -1.77565247599077308e-22, + 9.56498423271649245e-01, + -4.69317552473567864e-02, + 1.37881347405555891e-03, + -2.34734388666831310e-05, + 1.96836923367212562e-08, + 1.01066035998163247e-08, + -1.74276354683884852e-10, + -4.34157183372568341e-12, + 2.21430382070096177e-13, + -5.13699515116067899e-16, + -1.95133599512945587e-16, + 4.37988639239853565e-18, + 1.05583599354709779e-19, + -6.16486231104738034e-21, + 2.63932146647556465e+00, + -1.32628167171575967e-01, + 3.18562831658534716e-03, + -2.11021235921111502e-05, + -6.89030214037582645e-07, + 3.96151583874924818e-09, + 4.95311642348988196e-10, + -5.83996206782267492e-14, + -4.37207974823855265e-13, + -2.56909195578923181e-15, + 4.15501392240978402e-16, + 4.89913088031447016e-18, + -4.07052571328727954e-19, + -6.29359661911105259e-21, + 8.10505826451101719e+00, + -4.17096656574409086e-01, + 7.67099846573592384e-03, + 4.58357577803379625e-06, + -6.81264308077427133e-07, + -2.68348765670797920e-08, + -3.77539657664350443e-10, + 9.28163114693297964e-12, + 6.12605559757070921e-13, + 1.07246744359508874e-14, + -2.57148758702041669e-16, + -1.93692365274355731e-17, + -3.31814614631768301e-19, + 1.41507918904700670e-20, + 4.76754169657270310e+01, + -2.49502133467614717e+00, + 3.55346670237348811e-02, + 3.86658222415551739e-05, + 6.73474403190260745e-07, + 5.15700133064762639e-09, + -2.53897719650546641e-10, + -1.68663983042339312e-11, + -6.55508927852116921e-13, + -2.00781038005366292e-14, + -5.19280341672476101e-16, + -1.03191364082005669e-17, + 1.81224635524630800e-19, + 4.71578193877246221e-20, +# root=6 base[1]=2.5 */ + 2.41514623624493191e-02, + -1.05359730703498519e-03, + 3.42436672357273534e-05, + -9.80920126639870240e-07, + 2.59714569092563626e-08, + -6.49754367218156943e-10, + 1.54158423290734186e-11, + -3.49918743590966772e-13, + 7.45574923202658746e-15, + -1.49782439204642031e-16, + 2.89689762125635828e-18, + -3.71143990289835741e-20, + 4.57633918305747464e-22, + -1.35562534874629082e-23, + 2.36255361428731103e-01, + -1.05614424586147251e-02, + 3.34857155278298014e-04, + -8.62139411311366450e-06, + 1.79063856108231992e-07, + -2.67338383561487307e-09, + 1.03986276172853932e-11, + 9.82730515122843196e-13, + -4.21707729344180405e-14, + 9.64768105296178460e-16, + -8.20535395361347847e-18, + -1.98282693596286827e-19, + 1.67537176138453487e-20, + -6.57155659654187536e-22, + 7.89074205723015565e-01, + -3.70088818400262920e-02, + 1.10487641059977496e-03, + -2.17962923432699425e-05, + 1.74045344477037519e-07, + 5.20529517033775149e-09, + -2.07724672886557101e-10, + 1.36513598082853843e-12, + 1.14869016789684925e-13, + -3.97862482747552507e-15, + 1.38009378005221868e-17, + 3.49426683163498923e-18, + -9.60416681248246944e-20, + -1.09640086492744088e-21, + 2.15792358555883412e+00, + -1.08333359518376013e-01, + 2.87089270113663302e-03, + -3.08758072809867335e-05, + -4.99158953672690265e-07, + 1.42813872263907458e-08, + 3.07428650646162037e-10, + -1.22626914580151985e-11, + -2.33610402330881400e-13, + 1.23923905003546688e-14, + 2.00507423836836081e-16, + -1.24164799043896645e-17, + -1.45057747697048514e-19, + 1.23316659393370929e-20, + 6.55943729617973492e+00, + -3.55737335305186531e-01, + 7.64163953185030640e-03, + -1.09708080122447594e-05, + -1.27495930604138799e-06, + -3.03205609175854409e-08, + 1.90297268007911366e-10, + 3.12852041504055657e-11, + 5.94500836833543670e-13, + -1.71591186797429265e-14, + -1.02500483277119244e-15, + -3.46747257397773112e-18, + 1.09672729711908181e-18, + 2.39554857123757847e-20, + 3.82670899229868624e+01, + -2.20870017112943362e+00, + 3.60650784642163463e-02, + 4.97221585991238269e-05, + 6.61774612764825730e-07, + -9.79772091720738812e-09, + -1.15946862372126015e-09, + -5.36794537415831388e-11, + -1.75148925114970675e-12, + -3.52598782635939549e-14, + 4.49617104344485998e-16, + 8.32215467423724689e-17, + 3.46135427795897414e-18, + 1.27342480471074780e-20, +# root=6 base[2]=5.0 */ + 2.04192392757231930e-02, + -8.20539690459389545e-04, + 2.45941052304795852e-05, + -6.52137987921387424e-07, + 1.60034198097767513e-08, + -3.74643297955200146e-10, + 8.29001244631777191e-12, + -1.78170579080302016e-13, + 3.79336978783639394e-15, + -6.29929650896577250e-17, + 1.46409150557070988e-18, + -3.35390228941886712e-20, + -1.83255512904345556e-22, + -7.17629381228593771e-25, + 1.98775639117839825e-01, + -8.25164555153998398e-03, + 2.46889853270684388e-04, + -6.16355512689772513e-06, + 1.29659751221831663e-07, + -2.21650914821821612e-09, + 2.37435033286846460e-11, + 1.18237077928694413e-13, + -1.40870881125713933e-14, + 5.94126571171459705e-16, + -9.11485088955823756e-18, + -7.34956791163173138e-21, + -3.67406191548698573e-21, + -8.41876257324238110e-23, + 6.57135338893597765e-01, + -2.91625108145569072e-02, + 8.62637290400617698e-04, + -1.84307323814717101e-05, + 2.33011848988457062e-07, + 9.71308057478946093e-10, + -1.37485241735337167e-10, + 3.07216713760747672e-12, + 5.82675196501357936e-15, + -1.74671356553385934e-15, + 6.55693793489175708e-17, + -8.14347248770510608e-19, + -5.88479511209354187e-20, + 1.77786485761348914e-21, + 1.76801733562839569e+00, + -8.69603375450031246e-02, + 2.46284469294889320e-03, + -3.63027747690264607e-05, + -1.70063285283965209e-07, + 1.71348437809904572e-08, + -6.88804596404140730e-11, + -1.21529813375949502e-11, + 2.22655098288444220e-13, + 9.58107712954967599e-15, + -2.94204056492142519e-16, + -6.46840412200197178e-18, + 2.93159991234746720e-19, + 1.70115147393956648e-21, + 5.25737404064612601e+00, + -2.95520479851193396e-01, + 7.36927143612369114e-03, + -3.56468092411331601e-05, + -1.75705567305208015e-06, + -1.39340332857735191e-08, + 1.18667615362417945e-09, + 3.32511899590856276e-11, + -6.39419306916243213e-13, + -4.37865645942659614e-14, + 1.01768180757297811e-16, + 4.91722261033668732e-17, + 3.95556618424909141e-19, + -5.22232156369183972e-20, + 3.00133277956503832e+01, + -1.91764063623421865e+00, + 3.67122129965768360e-02, + 5.65939473751099931e-05, + 2.92686678413286555e-08, + -6.28145064805655770e-08, + -3.55821711379942490e-09, + -1.16711518206810159e-10, + -1.42136989770328676e-12, + 9.58642701065193288e-14, + 6.57832920708477388e-15, + 1.34120741604202898e-16, + -4.21317731525692138e-18, + -3.02136651920364685e-19, +# root=6 base[3]=7.5 */ + 1.74864975377361682e-02, + -6.51243268136434523e-04, + 1.80884379509565028e-05, + -4.46688875978495300e-07, + 1.01592986650159208e-08, + -2.23596740798895444e-10, + 4.72297567607017589e-12, + -8.47726900947672329e-14, + 2.20735901251201299e-15, + -3.54300600303128233e-17, + -7.04577117135808501e-20, + -3.04936147370343985e-20, + 5.01984035314373504e-22, + 2.07524489210565133e-23, + 1.69296468548565837e-01, + -6.54027518935577142e-03, + 1.84013295382399734e-04, + -4.41224199722940581e-06, + 9.11073897215511221e-08, + -1.64070396074627944e-09, + 2.34375571500578466e-11, + -6.44661044484281927e-14, + 1.97466779075151648e-16, + 1.75070910677638752e-16, + -1.25534943050881573e-17, + -9.27402788082959290e-20, + 2.82961610612405053e-21, + 2.27533727688418290e-22, + 5.52976888854541548e-01, + -2.30822521588383775e-02, + 6.63977490354283818e-04, + -1.46973732945024261e-05, + 2.26329737959212788e-07, + -1.31747879782406988e-09, + -5.52895539043768273e-11, + 2.65268293359250142e-12, + -2.35667441616953221e-14, + -3.35391902506178127e-16, + 6.75780289264580321e-19, + -1.43603063161120152e-18, + 2.70980942070406031e-20, + 1.14889039163389268e-21, + 1.45679017162001734e+00, + -6.90214130499971906e-02, + 2.02162925910190708e-03, + -3.64700381276890432e-05, + 1.33725979079564444e-07, + 1.24317408903274712e-08, + -2.75760721580830027e-10, + -2.09071212237680681e-12, + 3.24306924599962653e-13, + -3.87317297807447103e-15, + -2.90997196497484063e-16, + 5.27989765896968614e-18, + 1.39656469027658465e-19, + -4.89494714318018655e-21, + 4.18980298086533498e+00, + -2.38765059585933220e-01, + 6.76937466419151763e-03, + -6.41843074086327500e-05, + -1.69320914741760650e-06, + 2.20828289205843465e-08, + 1.62420381975362063e-09, + -7.50560379199772270e-12, + -1.64690057227830347e-12, + -1.25183159660007890e-15, + 1.66708247150039985e-15, + 2.05011306976197255e-18, + -1.93826114645707115e-18, + -5.19482155771542270e-21, + 2.29343022455061494e+01, + -1.62134977544637571e+00, + 3.73345324413760990e-02, + 4.12287422526812195e-05, + -2.35147674587784725e-06, + -1.87376473250100393e-07, + -6.54291638523347288e-09, + -5.05919207328160033e-11, + 7.21990827483894363e-12, + 3.60076353185699206e-13, + 2.47412336395804041e-15, + -4.22165088255440825e-16, + -1.58036470727275657e-17, + 8.07092554431149250e-20, +# root=6 base[4]=10.0 */ + 1.51404903495444519e-02, + -5.25516833102428584e-04, + 1.35739465102777837e-05, + -3.14435983776376941e-07, + 6.66461219128240978e-09, + -1.32000026604654202e-10, + 3.13016271568758978e-12, + -3.71344801777256192e-14, + 6.50004090328724911e-16, + -5.42577844222905820e-17, + -5.15601001142205849e-19, + 1.82045338122402278e-20, + 1.51159008872799617e-21, + 1.97167574708225365e-23, + 1.45776194043866436e-01, + -5.25747338239249910e-03, + 1.38827282402733228e-04, + -3.18703526125818077e-06, + 6.37874564860362009e-08, + -1.09691946284387781e-09, + 2.19502670062308008e-11, + -5.81344328719571759e-14, + -2.85872064780974655e-15, + -3.28411641946624967e-16, + -9.70939776824393306e-18, + 3.05110311794337911e-19, + 1.33937622350971666e-20, + 1.96553275223947117e-22, + 4.70238344856594770e-01, + -1.84166968463217139e-02, + 5.08298549521011720e-04, + -1.13354331520321753e-05, + 1.92231538189671100e-07, + -1.85184418181754896e-09, + 6.07767502306266179e-12, + 1.61699309986173617e-12, + -4.56595365978760072e-14, + -1.02851047436468055e-15, + -1.90166070824060424e-17, + 7.69237216861560111e-19, + 5.75300298658756720e-20, + 3.35108617089568118e-22, + 1.21035215804075924e+00, + -5.45460283429880857e-02, + 1.60385803418643959e-03, + -3.27020791682584150e-05, + 3.16699142116019196e-07, + 6.08746946155022988e-09, + -2.22925508667059608e-10, + 4.34804196915565923e-12, + 4.32860262071526524e-14, + -9.68746601278576086e-15, + 1.42580949928735821e-17, + 7.43755137589725384e-18, + -5.13014612989985354e-23, + 6.08110071533064294e-22, + 3.33758518802031690e+00, + -1.88104914050611388e-01, + 5.85760471436954071e-03, + -8.57992101296635299e-05, + -9.08115866025065605e-07, + 5.29804014231015473e-08, + 7.54574242412148703e-10, + -4.94144795916179606e-11, + -6.96623865934016405e-13, + 4.36186309237878276e-14, + 1.83077006703673493e-16, + -4.83994046105695672e-17, + 5.68239380140610863e-19, + 7.36690233560399473e-20, + 1.70480407250511981e+01, + -1.32167433521356648e+00, + 3.74523766088867768e-02, + -3.47675567727798252e-05, + -7.59936054669503994e-06, + -3.23758349968106647e-07, + -2.90805194483703423e-09, + 3.59305880003704035e-10, + 1.58647098884533524e-11, + -7.19264555250576429e-14, + -2.52514323088178815e-14, + -5.30983271836163199e-16, + 2.20398613342550996e-17, + 1.21568770855795985e-18, +# root=6 base[5]=12.5 */ + 1.32340350817569518e-02, + -4.30381201746977819e-04, + 1.03657027397899196e-05, + -2.25175729152636185e-07, + 4.69579923202153630e-09, + -6.88855583723629157e-11, + 2.07554289716386982e-12, + -4.85835584533472958e-14, + -1.26296363136139254e-15, + -3.44606209074029495e-17, + 2.13862266038900650e-18, + 1.01096984592569864e-19, + 1.04685405450951843e-21, + -9.42608935783267168e-23, + 1.26747847874053049e-01, + -4.28396803436526755e-03, + 1.06072900312420681e-04, + -2.31421889294773768e-06, + 4.68785010770084658e-08, + -6.12707552385942808e-10, + 1.69438240919633837e-11, + -3.74774443866244491e-13, + -1.64757039059745359e-14, + -2.28964612906944089e-16, + 2.03860856405017724e-17, + 1.04732710410477392e-18, + 8.44943422412644789e-21, + -9.59470349409460597e-22, + 4.03913088949260035e-01, + -1.48448228442252909e-02, + 3.89564920321773555e-04, + -8.53614549527388712e-06, + 1.59311045984140762e-07, + -1.36466464755667862e-09, + 2.49174693735071006e-11, + -4.66283501677840360e-13, + -8.04527575433045504e-14, + -2.56947070186414980e-16, + 7.82832949979012581e-17, + 3.46900694844547797e-18, + 2.36574964453681729e-20, + -3.67666079589352734e-21, + 1.01547609586476173e+00, + -4.31911543060549061e-02, + 1.24502348509430332e-03, + -2.69113451524855113e-05, + 3.94315000643418847e-07, + 2.05239720177004368e-09, + -1.29683633690020323e-10, + 9.13167476432656820e-13, + -2.14532319437424597e-13, + -2.32749186220320720e-15, + 3.64195577478999822e-16, + 8.51318259890870260e-18, + -3.55422143220222019e-20, + -9.78509099119074810e-21, + 2.67212898451711611e+00, + -1.45524978475152889e-01, + 4.77763517456631162e-03, + -9.13656188975043074e-05, + 2.13553648470698804e-07, + 5.33823569932830279e-08, + -7.14632399504081320e-10, + -4.83744731947635660e-11, + 6.48404757145560603e-13, + 2.70033966071412856e-14, + -4.04929909966209460e-16, + 2.85832712420673411e-17, + 1.25513240776005502e-18, + -8.15670850882710247e-20, + 1.23543663826803751e+01, + -1.02628710057195227e+00, + 3.60912774083152685e-02, + -2.07603097991127498e-04, + -1.36989160786235030e-05, + -2.25482747335871821e-07, + 1.23442398234790369e-08, + 6.11876248302170748e-10, + -6.24874982333032130e-12, + -1.05080073603758703e-12, + -8.61302574375632236e-15, + 1.42009178014452271e-15, + 3.44732196429296689e-17, + -1.51991449959098192e-18, +# root=6 base[6]=15.0 */ + 1.16629322231756091e-02, + -3.57076537867782114e-04, + 8.07621473806772426e-06, + -1.58909954468269410e-07, + 3.68041594642224196e-09, + -4.03029082800683991e-11, + 1.30710383317795802e-13, + -8.38744318327764170e-14, + 3.02631590001734085e-17, + 1.23911278206785147e-16, + 4.34414968294729668e-18, + -1.04053916886561208e-19, + -1.10398402846066240e-20, + -1.94498136138933492e-22, + 1.11150188886904547e-01, + -3.53452634064009216e-03, + 8.24573968056017774e-05, + -1.64476561614880305e-06, + 3.75283251305749178e-08, + -3.91335994133558925e-10, + -5.37945977965227768e-13, + -7.90600170663002064e-13, + -2.09962842382105086e-18, + 1.31455595391935182e-15, + 4.15704000589112807e-17, + -1.11879248909761466e-18, + -1.12328818406620646e-19, + -1.85243792649084822e-21, + 3.50176744137509321e-01, + -1.20966119145284202e-02, + 3.01605178159966038e-04, + -6.18253514239158618e-06, + 1.35502719751725891e-07, + -1.19398705860130817e-09, + -1.96108039211150286e-11, + -2.30812567099564744e-12, + -1.48077774554144492e-15, + 5.10924302312763195e-15, + 1.32266900454141350e-16, + -4.69112903194405966e-18, + -4.02897045749050521e-19, + -5.71356917819130710e-21, + 8.60740723210926317e-01, + -3.44134499219930640e-02, + 9.60738615984781997e-04, + -2.04481657270052474e-05, + 4.02390911581958024e-07, + -1.48986416243364351e-09, + -1.89174198814864059e-10, + -3.89777000619524539e-12, + 2.69878349036345430e-14, + 1.59504960733174487e-14, + 3.48707634793882855e-16, + -1.95935249590744030e-17, + -1.21303058032972500e-18, + -1.06686630004831467e-20, + 2.15970626329511362e+00, + -1.11558350292117373e-01, + 3.73282980239354962e-03, + -8.07468523266913375e-05, + 1.01572041773103975e-06, + 2.31773698188610068e-08, + -1.63881032304561721e-09, + -1.25076585365613051e-11, + 1.63998988978734776e-12, + 3.21663963811609182e-14, + -2.51498446165189241e-17, + -6.38571003518047686e-17, + -4.57265003577499852e-18, + 6.13674938323525980e-21, + 8.80535155096320565e+00, + -7.51460374570884992e-01, + 3.22022310235155623e-02, + -4.41792176972699070e-04, + -1.41212229402781963e-05, + 2.19795348043152579e-07, + 2.13037485226859950e-08, + -1.23574899094602459e-10, + -3.35648172268223075e-11, + -4.62830908072780669e-14, + 5.08108952802054792e-14, + 3.45433743185525788e-16, + -7.32336664032961245e-17, + -7.80187049933304663e-19, +# root=6 base[7]=17.5 */ + 1.03530976813424932e-02, + -2.99157322252571452e-04, + 6.49452389957140653e-06, + -1.07036227499192868e-07, + 2.73668685922359924e-09, + -6.03181124597569240e-11, + -1.39370160348194159e-12, + 3.54124216091703812e-15, + 5.10677383929477102e-15, + 6.02258701284853734e-17, + -9.57131424743009805e-18, + -3.23857878422853815e-19, + 1.39410546167747821e-20, + 9.90807502717869867e-22, + 9.82199775989298224e-02, + -2.94424275808886481e-03, + 6.60432012089199862e-05, + -1.11451260595104221e-06, + 2.79937645548465862e-08, + -6.18882814294297855e-10, + -1.43074662675540664e-11, + 9.56125293328779599e-14, + 5.12744996420740823e-14, + 5.38840641129526522e-16, + -9.96025765556931272e-17, + -3.14942456349189978e-18, + 1.49088964307548766e-19, + 1.00128267292668143e-20, + 3.06195413912209613e-01, + -9.94575758530081427e-03, + 2.39497126173264383e-04, + -4.25075848779282951e-06, + 1.02457264068788955e-07, + -2.25540213328551141e-09, + -5.39771513810486727e-11, + 8.71838862146515289e-13, + 1.79120461958796448e-13, + 1.31101272008739029e-15, + -3.77752475918555824e-16, + -1.01548103301424109e-17, + 6.02925597305829202e-19, + 3.55245132258959485e-20, + 7.37054007708035530e-01, + -2.76036217071095220e-02, + 7.52126498957464309e-04, + -1.45230372882431699e-05, + 3.21270133590123325e-07, + -6.67516284421593710e-09, + -1.95207343409523022e-10, + 6.22494226958958330e-12, + 5.10180052823069467e-13, + -4.97382483932762954e-16, + -1.24449561703798212e-15, + -2.33860030887262940e-17, + 2.27989910038448903e-18, + 1.03100770759331346e-19, + 1.76748021839543457e+00, + -8.52740537295845202e-02, + 2.86970991222195446e-03, + -6.29242018664995999e-05, + 1.09212893153429093e-06, + -1.35604694402418018e-08, + -1.12907820288563408e-09, + 4.98153281974488006e-11, + 1.69329750185823725e-12, + -6.11887427124797715e-14, + -4.25898549396583750e-15, + 6.01516480122293649e-18, + 1.06886971873778773e-17, + 2.62755755941117112e-19, + 6.27639754649965731e+00, + -5.18389307904366770e-01, + 2.57719005983382855e-02, + -6.08028300117106012e-04, + -5.47638995882439682e-06, + 5.80265509373371073e-07, + 5.22106189710201734e-09, + -8.63462382756627666e-10, + -4.09901726589876000e-12, + 1.32815963537107304e-12, + 2.94111234640252098e-16, + -1.92662464167818176e-15, + 8.79099155751121325e-18, + 2.48856504994513830e-18, +# root=6 base[8]=20.0 */ + 9.25316296853543815e-03, + -2.51696466034173583e-04, + 5.42800285063852342e-06, + -7.43553522401918353e-08, + 1.29684069459521972e-09, + -7.51315684668603148e-11, + 7.14902765277269602e-13, + 1.17450999564524260e-13, + -2.88761196492360024e-16, + -2.93845916030238910e-16, + 6.69919821632301521e-20, + 6.74615321753873820e-19, + 2.24904685879492624e-21, + -1.54412273777000973e-21, + 8.74243730022755128e-02, + -2.46282342302807508e-03, + 5.48979635598017716e-05, + -7.80117367515182648e-07, + 1.33209370427934664e-08, + -7.57781235978353726e-10, + 8.08188412351098831e-12, + 1.18992728804966435e-12, + -5.74134022407130510e-15, + -2.97293233276297659e-15, + 6.74898874928680712e-18, + 6.90042612650129363e-18, + 8.48852375850748085e-21, + -1.59541553501225606e-20, + 2.69955632558871672e-01, + -8.20974705124186827e-03, + 1.96657058904001913e-04, + -3.02329595540112152e-06, + 4.94908426168449334e-08, + -2.68005384711702085e-09, + 3.52954555394094247e-11, + 4.26905241450431482e-12, + -4.44634747250894464e-14, + -1.05704858332847524e-14, + 7.61346378519257344e-17, + 2.51536897982065801e-17, + -9.52526617720573195e-20, + -5.95173741048393947e-20, + 6.37678207402474606e-01, + -2.22077125182747609e-02, + 6.03696133998843625e-04, + -1.06165349889392352e-05, + 1.63213176647323407e-07, + -7.79022555291159027e-09, + 1.36464444292828832e-10, + 1.30383265276801963e-11, + -2.85325264461460508e-13, + -3.08792937137772043e-14, + 5.66578986288318932e-16, + 7.67903390728323517e-17, + -1.13214333980644303e-18, + -1.90207518666122005e-19, + 1.46790053582446456e+00, + -6.50671753782474244e-02, + 2.20722783142043594e-03, + -4.85440645767096427e-05, + 6.82202377090629615e-07, + -2.08200809223619889e-08, + 5.08111625099120243e-10, + 4.56788619541982274e-11, + -2.14246632957205924e-12, + -8.54946496767695762e-14, + 4.89400358303860503e-15, + 2.12528755718517637e-16, + -1.13040753702188120e-17, + -5.84922266832989485e-19, + 4.56804736516683274e+00, + -3.42002812508379495e-01, + 1.83329331015666813e-02, + -6.03950246564678630e-04, + 5.52263791882460857e-06, + 4.41159128410412584e-07, + -1.44416288090930876e-08, + -3.69732619550004298e-10, + 2.74099774350919408e-11, + 1.27960747111147790e-13, + -4.25795940308950090e-14, + 3.57881708812490107e-16, + 5.53890085550774732e-17, + -9.43134792864193640e-19, +# root=6 base[9]=22.5 */ + 8.32793540035883101e-03, + -2.11591832455892238e-04, + 4.61642571310267052e-06, + -6.37096763732497884e-08, + 1.89657406231754691e-10, + -2.79984895313227617e-11, + 2.58621700105616964e-12, + -1.12671991798157993e-14, + -5.23850449638882769e-15, + 9.48331188812216969e-17, + 1.07303577844633205e-17, + -3.74984693665220581e-19, + -1.89147970269759415e-20, + 1.12310695393239839e-21, + 7.83959027418445614e-02, + -2.05849473043326001e-03, + 4.63768993695861810e-05, + -6.67874292473346908e-07, + 2.32689986356217276e-09, + -2.68587917356092367e-10, + 2.61073785115090030e-11, + -1.61563163016633669e-13, + -5.24718165450109271e-14, + 1.07997160764379138e-15, + 1.05731997422937797e-16, + -4.05460312475851631e-18, + -1.81921497587919762e-19, + 1.19186400768284227e-20, + 2.40047612847322733e-01, + -6.77174585876899084e-03, + 1.63604280124563737e-04, + -2.58039327316394275e-06, + 1.19488089407727551e-08, + -8.43708353261900064e-10, + 9.23253187024431118e-11, + -9.56987490261722318e-13, + -1.82280750051115900e-13, + 4.84520791216895105e-15, + 3.50963553954677395e-16, + -1.65858390348453985e-17, + -5.61779554728460072e-19, + 4.69355111819216509e-20, + 5.57748774605357767e-01, + -1.78535252622209484e-02, + 4.87671982244622458e-04, + -8.97858993443026310e-06, + 6.10381865237783409e-08, + -1.90803531111322417e-09, + 2.66373220844104991e-10, + -4.96434910581778726e-12, + -5.08149996792671607e-13, + 2.03212334438785712e-14, + 8.54237435299007295e-16, + -6.15271027323558020e-17, + -1.03783109937720345e-18, + 1.63090885342325797e-19, + 1.23948566071886757e+00, + -4.95797372104498646e-02, + 1.67939971971960817e-03, + -4.00229591190236203e-05, + 4.44997741791662177e-07, + -2.27936180100231546e-09, + 6.82387476790713243e-10, + -2.78136362168720135e-11, + -1.23152433337199985e-12, + 1.03969796625245609e-13, + 6.88631706418699382e-16, + -2.62707333657845732e-16, + 3.25948459015345682e-18, + 5.85030033051847086e-19, + 3.45030063815799304e+00, + -2.22288957407351440e-01, + 1.18404486112358119e-02, + -4.65621012054044496e-04, + 1.05333757545277978e-05, + 6.34335662558586744e-08, + -1.37999844496465345e-08, + 3.19743323215075966e-10, + 1.03722712754914363e-11, + -7.47121777041513625e-13, + 3.74429144943455839e-15, + 1.02937526899774614e-15, + -2.81472897902979375e-17, + -1.01087086983508125e-18, +# root=6 base[10]=25.0 */ + 7.55063121290101575e-03, + -1.77689259486627849e-04, + 3.86158102650686452e-06, + -6.21686233987638826e-08, + 1.48013458148481719e-10, + 1.64936970845545195e-11, + 8.00384162808121697e-13, + -8.08821363894145456e-14, + 1.05794594144400388e-15, + 1.34415818379221581e-16, + -6.19253959593365352e-18, + -9.79632274417487421e-20, + 1.58628312967826260e-20, + -2.67104909707931674e-22, + 7.08538064834258047e-02, + -1.71911089825948463e-03, + 3.85078117945539378e-05, + -6.43858634238180335e-07, + 2.10012483507667935e-09, + 1.68937997479458143e-10, + 7.35990701261668435e-12, + -8.13735979599573968e-13, + 1.23144455548366714e-14, + 1.30636956027913927e-15, + -6.49203728174482136e-17, + -8.02899792306529079e-19, + 1.60389181085615798e-19, + -3.13106905203015018e-21, + 2.15385969158631063e-01, + -5.58410483193755910e-03, + 1.33572180890790724e-04, + -2.42207635169975757e-06, + 1.25667612586338847e-08, + 6.10417313962711355e-10, + 2.02929191417684982e-11, + -2.85089721951006802e-12, + 5.66943134540623755e-14, + 4.19482830100554983e-15, + -2.48609746808947401e-16, + -1.27500421281220984e-18, + 5.65394579025154008e-19, + -1.46506280257847665e-20, + 4.93477104263251365e-01, + -1.43674974712052969e-02, + 3.85467280183015583e-04, + -8.03031318079210536e-06, + 6.93529860792816763e-08, + 1.76004655822672093e-09, + 2.64521280850987811e-11, + -8.02675816414927957e-12, + 2.38300810741374354e-13, + 9.48902381248215066e-15, + -8.21124686816620806e-16, + 5.96108474964949687e-18, + 1.57205574500463628e-18, + -6.31595228913794401e-20, + 1.06516714027031334e+00, + -3.79437766238721261e-02, + 1.24239878617855371e-03, + -3.26804245394411372e-05, + 4.90928927968484702e-07, + 3.48572384659511472e-09, + -1.51594235977672359e-10, + -1.89336256323716828e-11, + 1.12855746980053002e-12, + 4.82257428013774912e-15, + -2.78156950527739707e-15, + 8.92160048178570363e-17, + 2.97344959214602691e-18, + -3.01151797643126965e-19, + 2.71924992979148961e+00, + -1.47053775678687354e-01, + 7.25706994281298100e-03, + -3.01508141465877885e-04, + 9.31297245843517701e-06, + -1.44956261339579226e-07, + -3.65976794549741463e-09, + 3.11162634287661257e-10, + -7.13264377999780259e-12, + -1.53071040143278938e-13, + 1.54679809342682913e-14, + -3.28583501431273252e-16, + -1.13349685370315338e-17, + 8.74507675066384298e-19, +# root=6 base[11]=27.5 */ + 6.89702893174552138e-03, + -1.49711990967304082e-04, + 3.14218580029599472e-06, + -5.67786503361862214e-08, + 5.18997237888008210e-10, + 1.51112531928054994e-11, + -5.99196785825572450e-13, + -1.54032951550877972e-14, + 1.89379389617162770e-15, + -5.11745188502353733e-17, + -1.37500710529491074e-18, + 1.48933737080694159e-19, + -3.47464022683338966e-21, + -1.31283215524255798e-22, + 6.45457367801243881e-02, + -1.44109705910645705e-03, + 3.11073284134582244e-05, + -5.80193790671105997e-07, + 5.74955290856233838e-09, + 1.42560968977824949e-10, + -6.28203668327678482e-12, + -1.34279080953610452e-13, + 1.88018111042257022e-14, + -5.46060789466922508e-16, + -1.20698667404264746e-17, + 1.48963283730244766e-18, + -3.81602438627665428e-20, + -1.17218214475131306e-21, + 1.95008750876986242e-01, + -4.62738469217815248e-03, + 1.06139573888989927e-04, + -2.11919215415437778e-06, + 2.45931473338150603e-08, + 4.19662863609979042e-10, + -2.39715270282512019e-11, + -3.05025037818318453e-13, + 6.37843104737143318e-14, + -2.16090464165439280e-15, + -2.79118920979313754e-17, + 5.12718754538413844e-18, + -1.59099398116254238e-19, + -2.85907669906087881e-21, + 4.41594349608623760e-01, + -1.16477594718923279e-02, + 2.96868044586203698e-04, + -6.66343663053523558e-06, + 9.77582717983045427e-08, + 6.78667031414940206e-10, + -7.79947997068005186e-11, + 7.78401548318009868e-14, + 1.67087543536987051e-13, + -7.46458229635675229e-15, + 5.06973885873449487e-18, + 1.36823979074608010e-17, + -5.87186070592641598e-19, + -4.41143954830213482e-22, + 9.30979836972983810e-01, + -2.94363081641525123e-02, + 8.98699743211719255e-04, + -2.45761874573712638e-05, + 5.00965436220301656e-07, + -2.83244518474134479e-09, + -2.54535338422344893e-10, + 6.81508362653137884e-12, + 3.06177239708067349e-13, + -2.70686440963352233e-14, + 5.99251443989166515e-16, + 2.51268047409536064e-17, + -2.25844261876195147e-18, + 5.43441455256850512e-20, + 2.22749551265566348e+00, + -1.01175110517799316e-01, + 4.42879505633113867e-03, + -1.77997200080848235e-04, + 6.09932310052593941e-06, + -1.55647122592889774e-07, + 1.69396246885042662e-09, + 8.18858843474491415e-11, + -5.47559009462454473e-12, + 1.42229307255562404e-13, + 5.37860056516527619e-16, + -2.01135409808202585e-16, + 7.84290415406069030e-18, + -6.60120493286975638e-20, +# root=6 base[12]=30.0 */ + 6.34436355937524187e-03, + -1.27141128719288613e-04, + 2.51795300268849660e-06, + -4.68850998936813424e-08, + 6.70110131296693534e-10, + 5.77203185596820107e-13, + -4.76851417145857730e-13, + 1.45850561685667718e-14, + 1.33818604385342536e-16, + -3.01595830681710282e-17, + 1.21505319781992037e-18, + -9.58824964013198704e-21, + -1.43657049054848978e-21, + 8.06565034452199725e-23, + 5.92373947289669134e-02, + -1.21836261290574174e-03, + 2.47634327657585825e-05, + -4.73882624457666190e-07, + 7.05902409885943783e-09, + -4.31152739946563852e-12, + -4.66933387430719915e-12, + 1.52604423427175242e-13, + 9.19035382459299001e-16, + -2.93136989809208484e-16, + 1.24478471557455753e-17, + -1.24451535050109515e-19, + -1.34997197951543066e-20, + 8.13404955547089884e-22, + 1.78046414331536396e-01, + -3.87286598595602003e-03, + 8.32459584528353475e-05, + -1.68949552403692105e-06, + 2.74281025059801754e-08, + -9.87100845905747984e-11, + -1.52887666674790826e-11, + 5.80670531130850340e-13, + -1.81291536065668552e-16, + -9.43629533176038805e-16, + 4.52902277568358059e-17, + -6.57349325549518286e-19, + -3.94917184511039698e-20, + 2.84863399495761558e-21, + 3.99284890835471751e-01, + -9.56566171203352723e-03, + 2.26431682188549683e-04, + -5.08380480729462908e-06, + 9.49319998899462327e-08, + -7.89221197885442900e-10, + -3.65224427903429071e-11, + 1.88989080812744473e-12, + -1.95963924522271414e-14, + -2.17994766790440508e-15, + 1.36025641868453992e-16, + -3.06719584489747772e-18, + -6.58336079816172305e-20, + 7.84395907384241483e-21, + 8.25930436769562015e-01, + -2.32961977763739871e-02, + 6.49137386930379165e-04, + -1.72707273051652806e-05, + 4.01275299157118415e-07, + -6.25445925291732302e-09, + -3.49748516847313210e-11, + 6.35237400399969272e-12, + -1.79819185497877077e-13, + -1.97062178939251255e-15, + 3.78364241818580988e-16, + -1.51768460254958395e-17, + 1.48991521362527775e-19, + 1.61316987610800641e-20, + 1.88217954548377731e+00, + -7.28492011243257048e-02, + 2.78419445853281917e-03, + -1.02619908382795485e-04, + 3.49588425804222938e-06, + -1.02715989230402297e-07, + 2.26196995305808195e-09, + -1.87506262940912448e-11, + -1.24331531027480228e-12, + 7.62409734830563313e-14, + -2.22336691113004348e-15, + 2.10276636054468919e-17, + 1.43971187732340405e-18, + -8.88094904722276461e-20, +# root=6 base[13]=32.5 */ + 5.87277725624636791e-03, + -1.09068192639052923e-04, + 2.01840756204174319e-06, + -3.65550659907104970e-08, + 5.99643157869911099e-10, + -6.18588992625101775e-12, + -1.13401208854226082e-13, + 9.33916600394150070e-15, + -2.75884781247862665e-16, + 1.05973025539468009e-18, + 3.16648946745109310e-19, + -1.70183428368755599e-20, + 4.16365673393959664e-22, + 1.81792989548369129e-24, + 5.47268050021009686e-02, + -1.04112045762287707e-03, + 1.97358420047165538e-05, + -3.66298515156277689e-07, + 6.18530672012450587e-09, + -6.84926545003592855e-11, + -9.82095294330511492e-13, + 9.21459077794621409e-14, + -2.85737789841637897e-15, + 1.69264177897733944e-17, + 2.97972220804278719e-18, + -1.69477031737804893e-19, + 4.38987139243154991e-21, + 5.75273483230926216e-24, + 1.63768687643160632e-01, + -3.28078688652820149e-03, + 6.54898022506932275e-05, + -1.28115279890233276e-06, + 2.30048886741594988e-08, + -2.91838313123545524e-10, + -2.14213569833832334e-12, + 3.07993778174652741e-13, + -1.06547059680451544e-14, + 1.08824327407105930e-16, + 8.80105490622099109e-18, + -5.78826613674539260e-19, + 1.69104881610021172e-20, + -7.82248692311225352e-23, + 3.64293364369245753e-01, + -7.97383651755838828e-03, + 1.73909044346293732e-04, + -3.72269127519311691e-06, + 7.41090465647477299e-08, + -1.14347809245152225e-09, + 1.69622687338861031e-12, + 7.81357921295082501e-13, + -3.36319674514654907e-14, + 5.81422160809425025e-16, + 1.57053627811778465e-17, + -1.53969740512768815e-18, + 5.55174266892095683e-20, + -7.50071827959183719e-22, + 7.41960760119567464e-01, + -1.88324974947208859e-02, + 4.76272279558918898e-04, + -1.18479150727080883e-05, + 2.78846768552932693e-07, + -5.59968003216751241e-09, + 6.58696566520140119e-11, + 1.27451131668937651e-12, + -1.08468998670865535e-13, + 3.29983904670141931e-15, + -2.14972150738350329e-17, + -3.14027030406118561e-18, + 1.82013773666542426e-19, + -5.04038345327371925e-21, + 1.62869009625230698e+00, + -5.46886045330512507e-02, + 1.82949958144379052e-03, + -6.04031897553235258e-05, + 1.92739073577246220e-06, + -5.72430836075044194e-08, + 1.48431827232604206e-09, + -2.92886361465248326e-11, + 2.16897178112892388e-13, + 1.43217650513758130e-14, + -8.55758504426048371e-16, + 2.68164461934484748e-17, + -4.60951967581951408e-19, + -3.24028890011764973e-21, +# root=6 base[14]=35.0 */ + 5.46623793344348016e-03, + -9.45224636338026693e-05, + 1.63295279317248178e-06, + -2.80263674971187962e-08, + 4.65104204487476197e-10, + -6.67442001254055988e-12, + 4.08600636204409607e-14, + 2.43950544590453957e-15, + -1.39602997012230976e-16, + 4.14465975151402822e-18, + -5.17715894211928343e-20, + -2.03976842940403266e-21, + 1.57629320251878230e-22, + -5.45245626858110773e-24, + 5.08524898360323899e-02, + -8.99242432797009352e-04, + 1.58866725655517642e-05, + -2.78868880009321725e-07, + 4.73975312080598342e-09, + -7.03439280226354925e-11, + 5.06429621365259215e-13, + 2.23770481881166969e-14, + -1.37763373364096718e-15, + 4.24399023257602040e-17, + -5.88192993145813243e-19, + -1.78879666651961984e-20, + 1.52916159018338125e-21, + -5.50449216050923969e-23, + 1.51604250138530683e-01, + -2.81255626231139734e-03, + 5.21292530121229800e-05, + -9.60261017803832659e-07, + 1.71743811782884722e-08, + -2.73229299589304289e-10, + 2.55803619679419257e-12, + 6.08319277275601822e-14, + -4.61210495296736660e-15, + 1.54588223016465645e-16, + -2.59052723371398548e-18, + -4.19932746526110806e-20, + 4.90670451222143553e-21, + -1.93835197242471270e-22, + 3.34923858461043056e-01, + -6.74279042312054839e-03, + 1.35619331084331653e-04, + -2.71217113086636493e-06, + 5.28797381946534224e-08, + -9.40681925606470106e-10, + 1.19524221925363305e-11, + 6.89091819419024159e-14, + -1.18126795910980275e-14, + 4.69938379071723801e-16, + -1.02289737667697054e-17, + -5.96990355465249206e-21, + 1.13609659414836621e-20, + -5.47920688870482377e-22, + 6.73447288154485291e-01, + -1.55230901473215090e-02, + 3.57468077157017971e-04, + -8.19003444452612726e-06, + 1.83954910972728428e-07, + -3.88333353086448220e-09, + 6.86758787151069333e-11, + -6.13181232826094836e-13, + -2.12402219941375177e-14, + 1.42710445835711418e-15, + -4.53257725254530700e-17, + 7.08652691684786556e-19, + 1.27585131805756051e-20, + -1.35170911780303653e-21, + 1.43525667074776786e+00, + -4.25034568200743298e-02, + 1.25746165790727258e-03, + -3.70488108291142947e-05, + 1.07771661049014300e-06, + -3.03860030328740659e-08, + 8.03264912075260943e-10, + -1.87851457604066476e-11, + 3.42213791585057838e-13, + -2.62268854199246375e-15, + -1.30982042538412879e-16, + 7.95151133827843401e-18, + -2.59271812426394982e-19, + 5.52900087135693260e-21, +# root=6 base[15]=37.5 */ + 5.11231108350021848e-03, + -8.26873134774100079e-05, + 1.33709898500918237e-06, + -2.15835796589037282e-08, + 3.44870860643841897e-10, + -5.25774308126023286e-12, + 6.56897225510829514e-14, + -1.17603604860496082e-16, + -3.51965003775118197e-17, + 1.69754914537787504e-18, + -5.05673626714816057e-20, + 8.94967320928955227e-22, + 3.81669230363082715e-24, + -1.01246133429366581e-24, + 4.74901982552031615e-02, + -7.84347426899812609e-04, + 1.29513766939406244e-05, + -2.13487756939068292e-07, + 3.48475544849244438e-09, + -5.44226024203759797e-11, + 7.09012971418734792e-13, + -2.40143798544577839e-15, + -3.27985139041383099e-16, + 1.67069078667269952e-17, + -5.12469874637108134e-19, + 9.54917266012976111e-21, + 1.40950394959036519e-23, + -9.49705698305679006e-24, + 1.41121190307416183e-01, + -2.43733510929381629e-03, + 4.20863242064981922e-05, + -7.25514325190893336e-07, + 1.23946020515317127e-08, + -2.03678234528479996e-10, + 2.88327538322289702e-12, + -1.83934506326134739e-14, + -9.38887478936037480e-16, + 5.56260241714677773e-17, + -1.82659952403417996e-18, + 3.77482971979012903e-20, + -1.39940946114958564e-22, + -2.79051396402122806e-23, + 3.09935030283342683e-01, + -5.77496452706856202e-03, + 1.07579694224708977e-04, + -2.00095768084934132e-06, + 3.69266037487930994e-08, + -6.60461732449621316e-10, + 1.05997325610686815e-11, + -1.11604880404755851e-13, + -1.43877562705320188e-15, + 1.41329690189164287e-16, + -5.35462149802534123e-18, + 1.30369850410763938e-19, + -1.41378018386885972e-21, + -5.01520285289008538e-23, + 6.16515523635434604e-01, + -1.30117851151572983e-02, + 2.74556248357113268e-04, + -5.78525744294969239e-06, + 1.21143834041476844e-07, + -2.48139067205702544e-09, + 4.75929623768622378e-11, + -7.56477373512180285e-13, + 5.37117388252731249e-15, + 2.54530420880248656e-16, + -1.52624341207227910e-17, + 4.93662712665418068e-19, + -1.00764824772350593e-20, + 4.73699173979984583e-23, + 1.28290706204251381e+00, + -3.39691511237686858e-02, + 8.99236962714401451e-04, + -2.37775811657587325e-05, + 6.26113158914174609e-07, + -1.62919405194161529e-08, + 4.12241525347152489e-10, + -9.85285251835300259e-12, + 2.11220807948833536e-13, + -3.62933986109011263e-15, + 3.08330792654397930e-17, + 9.64267249529807649e-19, + -6.26396364140814677e-20, + 2.09344238093813383e-21, +# root=6 base[16]=40.0 */ + 4.71869812273837362e-03, + -1.12678642235890846e-04, + 2.69058452131645255e-06, + -6.42280356774541776e-08, + 1.53026650530053309e-09, + -3.60972132300982304e-11, + 8.15430454612056423e-13, + -1.54284528186019314e-14, + 7.41642663984828653e-17, + 1.61604311180477538e-17, + -1.28644227530090868e-18, + 6.61388056333285349e-20, + -2.48602632396396901e-21, + 5.65334269100866563e-23, + 4.37630644613905967e-02, + -1.06537892501055564e-03, + 2.59349900200459436e-05, + -6.31165483433301113e-07, + 1.53318440412269939e-08, + -3.68927133637584462e-10, + 8.52820835988665809e-12, + -1.68146838317850458e-13, + 1.21156843756759726e-15, + 1.46902910039188958e-16, + -1.24925045904162715e-17, + 6.58750028466825535e-19, + -2.53885140051347898e-20, + 6.12664727061761877e-22, + 1.29583998532233152e-01, + -3.28708559693888366e-03, + 8.33789118626537720e-05, + -2.11437086615899573e-06, + 5.35253566710320861e-08, + -1.34364327789285030e-09, + 3.25951435864671673e-11, + -6.96393117072251341e-13, + 8.06968877019786979e-15, + 3.88415268148018589e-16, + -4.02589067851166272e-17, + 2.26008871715580907e-18, + -9.20519481223020049e-20, + 2.48960694342192401e-21, + 2.82787885271811035e-01, + -7.68930760651611103e-03, + 2.09073591881832793e-04, + -5.68326812079549761e-06, + 1.54255558249458416e-07, + -4.15794267997172217e-09, + 1.09179909049511138e-10, + -2.62508970778963890e-12, + 4.57580273769349952e-14, + 3.67562672365626827e-16, + -9.47182465353218772e-17, + 6.17398567783564849e-18, + -2.78921708947591333e-19, + 8.90909162219871435e-21, + 5.56104534187498056e-01, + -1.69309615674113380e-02, + 5.15456726223449506e-04, + -1.56891940189963934e-05, + 4.76953493086477946e-07, + -1.44264522684180323e-08, + 4.28973776947433417e-10, + -1.21345852711991220e-11, + 2.98725371636486918e-13, + -4.50349821449387733e-15, + -1.15130922082306523e-16, + 1.49953265149408676e-17, + -8.65314421401318006e-19, + 3.53879125943805673e-20, + 1.12929058785095804e+00, + -4.20860621210287847e-02, + 1.56839713332060479e-03, + -5.84370285409482605e-05, + 2.17545757328761968e-06, + -8.07522798031840504e-08, + 2.97336500612494580e-09, + -1.07411200274412931e-10, + 3.72948412968415411e-12, + -1.20010707906956251e-13, + 3.33147263737703630e-15, + -6.48253715095004717e-17, + -2.22464809367165795e-19, + 1.05348865816273912e-19, +# root=6 base[17]=44.0 */ + 4.30667471392791757e-03, + -9.38693325870488491e-05, + 2.04599388699920880e-06, + -4.45937654064569819e-08, + 9.71765406505131172e-10, + -2.11518724573744535e-11, + 4.57768958101208482e-13, + -9.66861524076944209e-15, + 1.85737036724487758e-16, + -2.30402330698745435e-18, + -5.51379644793241964e-20, + 6.69578540728433481e-21, + -3.90008507048801714e-22, + 1.73931840512035578e-23, + 3.98737699899556694e-02, + -8.84520693257441221e-04, + 1.96212936379042451e-05, + -4.35247876574971001e-07, + 9.65307882911748792e-09, + -2.13855072403918572e-10, + 4.71243177232604392e-12, + -1.01544826176753403e-13, + 2.01005337696547355e-15, + -2.76266130912187926e-17, + -4.14854959110035992e-19, + 6.30084218389708122e-20, + -3.80142706960865322e-21, + 1.72692308809335205e-22, + 1.17627198267911043e-01, + -2.70878185513924192e-03, + 6.23791208434899391e-05, + -1.43646222575313639e-06, + 3.30730893087371562e-08, + -7.60725170756829014e-10, + 1.74165376798193791e-11, + -3.91373408699009390e-13, + 8.22229909488190168e-15, + -1.33753009239441333e-16, + -3.11175526495662179e-19, + 1.86287740393131798e-19, + -1.23906044974958881e-20, + 5.88936978400866262e-22, + 2.54995833818608020e-01, + -6.25306532805599766e-03, + 1.53338701918289430e-04, + -3.76011314321417369e-06, + 9.21900199713943078e-08, + -2.25844285222024291e-09, + 5.51243812466861078e-11, + -1.32704617216512209e-12, + 3.05111329709016273e-14, + -6.03934106850460790e-16, + 5.90166049579012821e-18, + 3.33206464608125884e-19, + -3.02568569662534866e-20, + 1.59773875302261313e-21, + 4.95593820655389150e-01, + -1.34494533674758537e-02, + 3.64991132358202471e-04, + -9.90492420315315928e-06, + 2.68760382948607750e-07, + -7.28803465316676993e-09, + 1.97137967620008730e-10, + -5.28723866188529215e-12, + 1.38257990846653213e-13, + -3.37410967676731188e-15, + 6.77177840121297383e-17, + -5.22247290744103141e-19, + -4.89521285554753256e-20, + 3.91574693705076011e-21, + 9.82299562809673454e-01, + -3.18539353094352828e-02, + 1.03295440619016916e-03, + -3.34959015666207131e-05, + 1.08608235991999544e-06, + -3.52022276928338908e-08, + 1.13951127016941155e-09, + -3.67499968671601192e-11, + 1.17435656934216286e-12, + -3.67788008534623249e-14, + 1.10662658024136365e-15, + -3.08613545020936950e-17, + 7.40787108415637719e-19, + -1.21520836288191302e-20, +# root=6 base[18]=48.0 */ + 3.96087931143658794e-03, + -7.94062462067325511e-05, + 1.59190686265680763e-06, + -3.19138990236330742e-08, + 6.39786862677465865e-10, + -1.28246040788713135e-11, + 2.56912534147690739e-13, + -5.13137884211806588e-15, + 1.01219025776765251e-16, + -1.90442364773923903e-18, + 2.98889303779526432e-20, + -1.11930110718203951e-22, + -2.31314844821252043e-23, + 1.62782897240111540e-24, + 3.66198723151058975e-02, + -7.46106051282632941e-04, + 1.52014225638916644e-05, + -3.09718491219810478e-07, + 6.31020520536655672e-09, + -1.28550907105192841e-10, + 2.61731222509574934e-12, + -5.31422392941438931e-14, + 1.06681597293758724e-15, + -2.05316736727978209e-17, + 3.38167793039295881e-19, + -2.16800128134641219e-21, + -2.02420977387987340e-22, + 1.54763792215595918e-23, + 1.07692306897683582e-01, + -2.27072846408723486e-03, + 4.78790649395029059e-05, + -1.00954428497864382e-06, + 2.12862395827531053e-08, + -4.48778466800742376e-10, + 9.45681065128378869e-12, + -1.98811983010351562e-13, + 4.14090500225683854e-15, + -8.34329475644272007e-17, + 1.49983984491261925e-18, + -1.62666448915036342e-20, + -4.63989612365833119e-22, + 4.72203057785397030e-23, + 2.32182618614011654e-01, + -5.18478677284431918e-03, + 1.15779595587988085e-04, + -2.58542802719895404e-06, + 5.77334306811546897e-08, + -1.28910380985997801e-09, + 2.87720872627025402e-11, + -6.41037364922686357e-13, + 1.41869741766326915e-14, + -3.07039609219846469e-16, + 6.19853118696116243e-18, + -9.91113082491653728e-20, + 1.25265364635164725e-22, + 9.53998218005816461e-23, + 4.46973527235372259e-01, + -1.09414833364163949e-02, + 2.67836978111055666e-04, + -6.55638159891650572e-06, + 1.60491957005928233e-07, + -3.92840124144799821e-09, + 9.61287987434368467e-11, + -2.34959325830905242e-12, + 5.72024426840192469e-14, + -1.37603863371397195e-15, + 3.20300290309313527e-17, + -6.83651750904110894e-19, + 1.12975664674952612e-20, + -1.45144152925775286e-23, + 8.69222271703726790e-01, + -2.49480155577802044e-02, + 7.16046288728214861e-04, + -2.05515995987160964e-05, + 5.89856971738880961e-07, + -1.69289841083886756e-08, + 4.85787706724658908e-10, + -1.39324232948656516e-11, + 3.98941310983769723e-13, + -1.13757644884919631e-14, + 3.21274693655722578e-16, + -8.89325265022669834e-18, + 2.36786974899813314e-19, + -5.85772851265680265e-21, +# root=6 base[19]=52.0 */ + 3.66652183259818729e-03, + -6.80463716327695938e-05, + 1.26286133371547013e-06, + -2.34372315453645992e-08, + 4.34967168329421595e-10, + -8.07240480188857588e-12, + 1.49804720088242447e-13, + -2.77918526351395938e-15, + 5.14863427635843731e-17, + -9.48194335298743520e-19, + 1.70795809929367262e-20, + -2.84297061627258055e-22, + 3.42335913263486199e-24, + 3.08498176955238662e-26, + 3.38573229408866694e-02, + -6.37820263604413785e-04, + 1.20155597000418076e-05, + -2.26354769577016790e-07, + 4.26417314045726968e-09, + -8.03297573435933303e-11, + 1.51319719211339797e-12, + -2.84966038453682783e-14, + 5.35950130205666134e-16, + -1.00261440626294108e-17, + 1.83902964011425387e-19, + -3.15001097425288232e-21, + 4.14813053072322073e-23, + 1.30284582688843016e-25, + 9.93060979155745149e-02, + -1.93097465266549762e-03, + 3.75471713681313263e-05, + -7.30092403395746687e-07, + 1.41963924758533451e-08, + -2.76041843754360926e-10, + 5.36725061376309725e-12, + -1.04333674503998931e-13, + 2.02593495375063766e-15, + -3.91698844485144897e-17, + 7.45772794672778627e-19, + -1.34944613157510252e-20, + 2.04980305461300902e-22, + -1.04092780979029278e-24, + 2.13119312892753460e-01, + -4.36868969798165797e-03, + 8.95528858900138114e-05, + -1.83572629294350866e-06, + 3.76301435973431947e-08, + -7.71366961848227336e-10, + 1.58113840225047886e-11, + -3.24039362644084610e-13, + 6.63556236904741620e-15, + -1.35470441402245106e-16, + 2.73771088259536500e-18, + -5.36135407017126937e-20, + 9.55094536254429879e-22, + -1.21330018491809356e-23, + 4.07049363295099831e-01, + -9.07509451970500008e-03, + 2.02327646807888719e-04, + -4.51085910660252161e-06, + 1.00568728039716433e-07, + -2.24214894502806780e-09, + 4.99866619787695749e-11, + -1.11426794577306616e-12, + 2.48262047163834152e-14, + -5.52183317861314787e-16, + 1.22163302848375055e-17, + -2.66265367463621516e-19, + 5.58200818413985493e-21, + -1.05820157916547055e-22, + 7.79522097758550303e-01, + -2.00678650197910965e-02, + 5.16623202864534108e-04, + -1.32998458559496570e-05, + 3.42388406283177380e-07, + -8.81434483197565699e-09, + 2.26910284230509365e-10, + -5.84105080796251418e-12, + 1.50325691079309477e-13, + -3.86623389716750558e-15, + 9.92585709221610145e-17, + -2.53730439884506417e-18, + 6.42482194747256860e-20, + -1.59514320609231792e-21, +# root=6 base[20]=56.0 */ + 3.41291320135571558e-03, + -5.89612769428894993e-05, + 1.01861136573206677e-06, + -1.75974667024353854e-08, + 3.04012721055596030e-10, + -5.25210141390905109e-12, + 9.07345333049162031e-14, + -1.56747605091956126e-15, + 2.70750990656099473e-17, + -4.67373574314643259e-19, + 8.04672278627483283e-21, + -1.37186189514512102e-22, + 2.26044324884483066e-24, + -3.30920257855699675e-26, + 3.14825790002325884e-02, + -5.51511459978723593e-04, + 9.66137146348336854e-06, + -1.69247793993960736e-07, + 2.96488070635626512e-09, + -5.19387129821047397e-11, + 9.09857542300416381e-13, + -1.59384154142314680e-14, + 2.79165862012727634e-16, + -4.88685170568014405e-18, + 8.53440453649444843e-20, + -1.47755715456891760e-21, + 2.48337988539944660e-23, + -3.77829735920974132e-25, + 9.21324170934208486e-02, + -1.66215885888453983e-03, + 2.99869704721907923e-05, + -5.40994254399594465e-07, + 9.76006445851223038e-09, + -1.76080998301235600e-10, + 3.17666004697186701e-12, + -5.73086138591226899e-14, + 1.03376791685178926e-15, + -1.86389327980580712e-17, + 3.35431986497720669e-19, + -5.99614396222889921e-21, + 1.04843905046543044e-22, + -1.70917158657127202e-24, + 1.96950941173365313e-01, + -3.73119833980974482e-03, + 7.06868469970921265e-05, + -1.33914894195024179e-06, + 2.53699218636151586e-08, + -4.80628123375820058e-10, + 9.10537716283649419e-12, + -1.72496196306241862e-13, + 3.26758150653226712e-15, + -6.18765164764487034e-17, + 1.17021804050324198e-18, + -2.20345417071621144e-20, + 4.09274689484000438e-22, + -7.30317954724982443e-24, + 3.73678003597171016e-01, + -7.64867129991911050e-03, + 1.56557710286102326e-04, + -3.20451952432348958e-06, + 6.55920736896582319e-08, + -1.34257835953719045e-09, + 2.74806478251877894e-11, + -5.62482925165961405e-13, + 1.15124971052513300e-14, + -2.35582005485569139e-16, + 4.81733317222196488e-18, + -9.82873955634837612e-20, + 1.99248507640970452e-21, + -3.96969523497684793e-23, + 7.06621760226012863e-01, + -1.64918591262700580e-02, + 3.84903823551318582e-04, + -8.98327784218538578e-06, + 2.09660888551646279e-07, + -4.89327815309620539e-09, + 1.14204128871243821e-10, + -2.66539186702106517e-12, + 6.22056582760846497e-14, + -1.45165136345366931e-15, + 3.38673973443796861e-17, + -7.89562159025981646e-19, + 1.83736436631934520e-20, + -4.25546662105727991e-22, +# root=6 base[21]=60.0 */ + 3.19213556940260799e-03, + -5.15816550120537105e-05, + 8.33506934739305602e-07, + -1.34686219328293889e-08, + 2.17639192308144898e-10, + -3.51682722394624105e-12, + 5.68283222141398726e-14, + -9.18285644257524879e-16, + 1.48383584572078602e-17, + -2.39755596638290395e-19, + 3.87289957721128921e-21, + -6.24923712228789419e-23, + 1.00421674270901111e-24, + -1.59053835036648183e-26, + 2.94192955719600503e-02, + -4.81609859500932913e-04, + 7.88421518102461452e-06, + -1.29068887968054516e-07, + 2.11292784319881657e-09, + -3.45897759124504997e-11, + 5.66253254976153466e-13, + -9.26985380728331515e-15, + 1.51750635497813543e-16, + -2.48407733430927512e-18, + 4.06532597183693255e-20, + -6.64660868656442200e-22, + 1.08274796494867237e-23, + -1.74172515455217390e-25, + 8.59258835149566413e-02, + -1.44581927278982620e-03, + 2.43278658771246047e-05, + -4.09349265903413131e-07, + 6.88785533986575661e-09, + -1.15897483101666891e-10, + 1.95013144244304748e-12, + -3.28135390861266674e-14, + 5.52126246548162252e-16, + -9.28976205827096232e-18, + 1.56273906506628689e-19, + -2.62683915000935882e-21, + 4.40324048563499195e-23, + -7.31147365445211389e-25, + 1.83064229080111190e-01, + -3.22374288059520129e-03, + 5.67697917402269395e-05, + -9.99710390253996311e-07, + 1.76048005538074656e-08, + -3.10018778094016196e-10, + 5.45939856336594372e-12, + -9.61393203757309060e-14, + 1.69298973150305058e-15, + -2.98121676394005678e-17, + 5.24896299946452707e-19, + -9.23694149516959429e-21, + 1.62257796685564747e-22, + -2.83337619978872855e-24, + 3.45367459219563577e-01, + -6.53401726999842686e-03, + 1.23617267765137664e-04, + -2.33871877803150484e-06, + 4.42462902294534212e-08, + -8.37096863349468650e-10, + 1.58370576357196668e-11, + -2.99621440639215413e-13, + 5.66851524030425037e-15, + -1.07240073021592087e-16, + 2.02866725215838703e-18, + -3.83657496579113037e-20, + 7.24915632357421188e-22, + -1.36564345083385196e-23, + 6.46201841952020573e-01, + -1.37933797992154938e-02, + 2.94423992519934278e-04, + -6.28457191862823155e-06, + 1.34146146758206550e-07, + -2.86339127407644868e-09, + 6.11199723341693365e-11, + -1.30462405373104689e-12, + 2.78475272554991379e-14, + -5.94407193714175895e-16, + 1.26872649168938877e-17, + -2.70775502206129357e-19, + 5.77734639553947035e-21, + -1.23120760437838533e-22, +# root=6 base[22]=64.0 */ + 2.99819852860862095e-03, + -4.55057994611025149e-05, + 6.90674004684099962e-07, + -1.04828524361270450e-08, + 1.59105735021045550e-10, + -2.41486131927861913e-12, + 3.66520734568769464e-14, + -5.56294600956255486e-16, + 8.44327204388582530e-18, + -1.28148846639187397e-19, + 1.94495016553653743e-21, + -2.95159155759691058e-23, + 4.47728138431807171e-25, + -6.77891447792130552e-27, + 2.76099419403682024e-02, + -4.24204908866232511e-04, + 6.51757273139837013e-06, + -1.00137347353964302e-07, + 1.53853109836163438e-09, + -2.36383127614408179e-11, + 3.63183962485160821e-13, + -5.58003338783842040e-15, + 8.57327190951360195e-17, + -1.31720855074308262e-18, + 2.02373322265472514e-20, + -3.10892789428717985e-22, + 4.77418910149584896e-24, + -7.31915695100903637e-26, + 8.05031734912228930e-02, + -1.26913267412582360e-03, + 2.00078788783131508e-05, + -3.15424246309628234e-07, + 4.97266380640538851e-09, + -7.83940536423127966e-11, + 1.23588237436052914e-12, + -1.94836853960931523e-14, + 3.07160093055407163e-16, + -4.84235822271375090e-18, + 7.63381249901725595e-20, + -1.20335306258841760e-21, + 1.89632818180187138e-23, + -2.98436182299534046e-25, + 1.71007788409349437e-01, + -2.81321125294174473e-03, + 4.62795152623455761e-05, + -7.61334055750780988e-07, + 1.25245379312838678e-08, + -2.06038399238838224e-10, + 3.38949202281098958e-12, + -5.57597768421452374e-14, + 9.17291170917380298e-16, + -1.50901040051307736e-17, + 2.48240038628879782e-19, + -4.08346353668879405e-21, + 6.71581551846133683e-23, + -1.10344363917178252e-24, + 3.21046990190717696e-01, + -5.64645366104316558e-03, + 9.93077023626270190e-05, + -1.74658650197523222e-06, + 3.07183061921434245e-08, + -5.40262009904599930e-10, + 9.50192483216005592e-12, + -1.67116266031101872e-13, + 2.93917675424188136e-15, + -5.16930245832936739e-17, + 9.09148765814225933e-19, + -1.59891457557038269e-20, + 2.81170727098753858e-22, + -4.94120440207090120e-24, + 5.95307837978866994e-01, + -1.17070491952177037e-02, + 2.30225426435557980e-04, + -4.52750698258114039e-06, + 8.90358627721593306e-08, + -1.75093818347822015e-09, + 3.44331419594934715e-11, + -6.77146247897472737e-13, + 1.33164425575958977e-14, + -2.61874743833160225e-16, + 5.14988638951077063e-18, + -1.01273744141255411e-19, + 1.99150107382755108e-21, + -3.91427296578927064e-23, +# root=6 base[23]=68.0 */ + 2.82648603681692149e-03, + -4.04436918901064115e-05, + 5.78701678478428468e-07, + -8.28054059909978163e-09, + 1.18484799962813132e-10, + -1.69537817642228249e-12, + 2.42588683028851870e-14, + -3.47115879418733473e-16, + 4.96681978909060279e-18, + -7.10693230958388777e-20, + 1.01691619638051660e-21, + -1.45507121337046379e-23, + 2.08192840942862917e-25, + -2.97773908764521093e-27, + 2.60103400341561812e-02, + -3.76485535447570313e-04, + 5.44942350677102043e-06, + -7.88774435140626722e-08, + 1.14170812518486908e-09, + -1.65256045949676359e-11, + 2.39199144634082693e-13, + -3.46227758474040754e-15, + 5.01145833049135744e-17, + -7.25381089098734877e-19, + 1.04994756791778004e-20, + -1.51972661185796066e-22, + 2.19961990866497559e-24, + -3.18255111699013734e-26, + 7.57245611706654220e-02, + -1.12296697723726288e-03, + 1.66531811141595428e-05, + -2.46960459962138379e-07, + 3.66233144082546743e-09, + -5.43110082609716104e-11, + 8.05411979608184446e-13, + -1.19439589382142519e-14, + 1.77124443630313871e-16, + -2.62668856218419829e-18, + 3.89527450600344993e-20, + -5.77649901023530992e-22, + 8.56601730991787180e-24, + -1.26983930230111882e-25, + 1.60441983998952209e-01, + -2.47639936730493235e-03, + 3.82228745465281193e-05, + -5.89964671243088212e-07, + 9.10602139272131766e-09, + -1.40550154338410905e-10, + 2.16937178354473684e-12, + -3.34839469334794579e-14, + 5.16819971261296478e-16, + -7.97704135869518920e-18, + 1.23124353122175785e-19, + -1.90039584393039445e-21, + 2.93316015405982394e-23, + -4.52576658217301283e-25, + 2.99928163971232675e-01, + -4.92822070454014115e-03, + 8.09772546568405713e-05, + -1.33056455156598558e-06, + 2.18629543984054512e-08, + -3.59237569067390641e-10, + 5.90275351637293200e-12, + -9.69901311384160402e-14, + 1.59367747316302039e-15, + -2.61862472865406186e-17, + 4.30274715729984981e-19, + -7.06996438965433069e-21, + 1.16167336154835434e-22, + -1.90817092919962203e-24, + 5.51850170607431245e-01, + -1.00607469079738599e-02, + 1.83416865188042514e-04, + -3.34386171753568080e-06, + 6.09617396659127191e-08, + -1.11138976932105474e-09, + 2.02616793030292418e-11, + -3.69389442394511879e-13, + 6.73431635617131172e-15, + -1.22772902171142689e-16, + 2.23826451508413395e-18, + -4.08056056160756864e-20, + 7.43920505639528651e-22, + -1.35576229347805451e-23, +# root=6 base[24]=72.0 */ + 2.67338351598657388e-03, + -3.61817031902729558e-05, + 4.89684939673122628e-07, + -6.62741991115353486e-09, + 8.96958250503967784e-11, + -1.21394768088989690e-12, + 1.64296272544677847e-14, + -2.22359378290302047e-16, + 3.00942268400682679e-18, + -4.07296726730918554e-20, + 5.51237296138662876e-22, + -7.46046626925898404e-24, + 1.00969892493811063e-25, + -1.36625543248304080e-27, + 2.45860016491784190e-02, + -3.36388963888736695e-04, + 4.60251880890600001e-06, + -6.29722781076116505e-08, + 8.61595134035577864e-10, + -1.17884598953425822e-11, + 1.61291285439541333e-13, + -2.20680894524220421e-15, + 3.01938551258315909e-17, + -4.13116355575182708e-19, + 5.65231244659154372e-21, + -7.73356361598266014e-23, + 1.05811252219736529e-24, + -1.44742838909927764e-26, + 7.14816806191353182e-02, + -1.00067572684138799e-03, + 1.40085110145197319e-05, + -1.96105866845933352e-07, + 2.74529612544243412e-09, + -3.84315417868336514e-11, + 5.38005131889589301e-13, + -7.53156153440017637e-15, + 1.05434717309519250e-16, + -1.47598600515985962e-18, + 2.06624016114602950e-20, + -2.89253842660656152e-22, + 4.04926708824839807e-24, + -5.66740412280702012e-26, + 1.51106351628859825e-01, + -2.19665455154821132e-03, + 3.19330800249159209e-05, + -4.64215731672033276e-07, + 6.74837019678573578e-09, + -9.81020185348705366e-11, + 1.42612301334842145e-12, + -2.07317533210116103e-14, + 3.01380449513159616e-16, + -4.38121044215182575e-18, + 6.36902744059710394e-20, + -9.25874168681037423e-22, + 1.34595357203933067e-23, + -1.95620100177707418e-25, + 2.81417527648414323e-01, + -4.33882327369134509e-03, + 6.68948645723479047e-05, + -1.03136786724791193e-06, + 1.59013652900171875e-08, + -2.45163172244593435e-10, + 3.77986291912002992e-12, + -5.82769571511703532e-14, + 8.98499178993645860e-16, + -1.38528297785284471e-17, + 2.13579364855574188e-19, + -3.29291097190383423e-21, + 5.07691928698648919e-23, + -7.82556588691979138e-25, + 5.14309098280708143e-01, + -8.73886925557584675e-03, + 1.48486262680049507e-04, + -2.52300035163247900e-06, + 4.28694928368685283e-08, + -7.28415838268168586e-10, + 1.23768581878818145e-11, + -2.10301054057866542e-13, + 3.57332471840839206e-15, + -6.07160508130622455e-17, + 1.03165512137124852e-18, + -1.75293382271299636e-20, + 2.97849112094695240e-22, + -5.05942554335917576e-24, +# root=6 base[25]=76.0 */ + 2.53602015219610202e-03, + -3.25596583433593990e-05, + 4.18029545434904391e-07, + -5.36703115904018265e-09, + 6.89066688626992441e-11, + -8.84684450872771135e-13, + 1.13583574787736407e-14, + -1.45828588357457319e-16, + 1.87227574216561468e-18, + -2.40379234934740690e-20, + 3.08620011508291419e-22, + -3.96233505882074342e-24, + 5.08719274074995952e-26, + -6.53029960853896269e-28, + 2.33096090328424564e-02, + -3.02373777782162447e-04, + 3.92241248497282316e-06, + -5.08817921154347669e-08, + 6.60041945816978071e-10, + -8.56210742831922365e-12, + 1.11068219343477623e-13, + -1.44078422878136052e-15, + 1.86899475458437441e-17, + -2.42447225518561400e-19, + 3.14504128856270302e-21, + -4.07976798188757611e-23, + 5.29230018914159571e-25, + -6.86404237964385482e-27, + 6.76891923573638005e-02, + -8.97328187891168957e-04, + 1.18955160896738453e-05, + -1.57694035414444331e-07, + 2.09048591232441357e-09, + -2.77127244422433251e-11, + 3.67376355651213944e-13, + -4.87015944499170783e-15, + 6.45617298204303147e-17, + -8.55868683580096025e-19, + 1.13459041579346948e-20, + -1.50408046279912386e-22, + 1.99389800018895084e-24, + -2.64276254059208725e-26, + 1.42797791197760038e-01, + -1.96177464896051370e-03, + 2.69511155671469234e-05, + -3.70257934925699231e-07, + 5.08665172073816338e-09, + -6.98810836647579416e-11, + 9.60035426495147740e-13, + -1.31890916937069438e-14, + 1.81193458993706779e-16, + -2.48925933016664536e-18, + 3.41977686006619659e-20, + -4.69813382887228288e-22, + 6.45435617151261857e-24, + -8.86539888794775669e-26, + 2.65059820486880815e-01, + -3.84918800427805526e-03, + 5.58977526848940503e-05, + -8.11744906133160194e-07, + 1.17881267310983317e-08, + -1.71186700130171048e-10, + 2.48596634307472605e-12, + -3.61011027966607099e-14, + 5.24258756216637485e-16, + -7.61326447179583502e-18, + 1.10559518648178757e-19, + -1.60554083118494978e-21, + 2.33155958609085049e-23, + -3.38516614659358684e-25, + 4.81552776568487995e-01, + -7.66143408187071242e-03, + 1.21892293112968838e-04, + -1.93928851460013370e-06, + 3.08537959768664589e-08, + -4.90879370972947570e-10, + 7.80981883160158434e-12, + -1.24253072727504519e-13, + 1.97684817206430670e-15, + -3.14513646095467489e-17, + 5.00386599359454598e-19, + -7.96107736896233667e-21, + 1.26659560769538139e-22, + -2.01462477898321596e-24, +# root=6 base[26]=80.0 */ + 2.41208689779711348e-03, + -2.94555517848835842e-05, + 3.59700776843628015e-07, + -4.39253862249183596e-09, + 5.36401275509901733e-11, + -6.55034259449317232e-13, + 7.99904662128908737e-15, + -9.76815272277105209e-17, + 1.19285225017307604e-18, + -1.45666896394968676e-20, + 1.77883259990951491e-22, + -2.17224742700720177e-24, + 2.65267158933567826e-26, + -3.23886535489999427e-28, + 2.21592429106915768e-02, + -2.73269409441482538e-04, + 3.36997840754145273e-06, + -4.15588209836840156e-08, + 5.12506429622472019e-10, + -6.32026689369971456e-12, + 7.79419950633931977e-14, + -9.61186401876636198e-16, + 1.18534212319372112e-17, + -1.46177260329255064e-19, + 1.80266869872095097e-21, + -2.22306425843788425e-23, + 2.74149904027003009e-25, + -3.38032232877507857e-27, + 6.42789739857338449e-02, + -8.09203985938046358e-04, + 1.01870184020571244e-05, + -1.28243737953850941e-07, + 1.61445240160308769e-09, + -2.03242403771784674e-11, + 2.55860591801356420e-13, + -3.22101299836932522e-15, + 4.05491313161410287e-17, + -5.10470479699316488e-19, + 6.42628096052602629e-21, + -8.09000491321117623e-23, + 1.01844562101346538e-24, + -1.28191156915049895e-26, + 1.35355593618907172e-01, + -1.76265320077397111e-03, + 2.29539557481925212e-05, + -2.98915342086933873e-07, + 3.89259187893940287e-09, + -5.06908458769510277e-11, + 6.60115916498463734e-13, + -8.59628628553565212e-15, + 1.11944184431071530e-16, + -1.45778072194145734e-18, + 1.89837877101760467e-20, + -2.47214268773107964e-22, + 3.21932025969455400e-24, + -4.19161304082662737e-26, + 2.50499948084807189e-01, + -3.43800408868284767e-03, + 4.71851279977045812e-05, + -6.47595595214299611e-07, + 8.88797112008182666e-09, + -1.21983582370208937e-10, + 1.67417222297763428e-12, + -2.29772939745418161e-14, + 3.15353481048020055e-16, + -4.32809094560912977e-18, + 5.94011874151332911e-20, + -8.15255757525143714e-22, + 1.11890342932262142e-23, + -1.53535759770316444e-25, + 4.52720871896524990e-01, + -6.77167471813511918e-03, + 1.01288854423993088e-04, + -1.51505092278712608e-06, + 2.26617164513452781e-08, + -3.38967743458037890e-10, + 5.07018660090096961e-12, + -7.58384615175837327e-14, + 1.13437092124277617e-15, + -1.69676093262940548e-17, + 2.53796849715768010e-19, + -3.79622371388028037e-21, + 5.67828708181497427e-23, + -8.49152623761988815e-25, +# root=6 base[27]=84.0 */ + 2.29970543536013768e-03, + -2.67751295152945770e-05, + 3.11738864263948615e-07, + -3.62952938984158700e-09, + 4.22580727071934213e-11, + -4.92004476923214697e-13, + 5.72833519857327759e-15, + -6.66941576475388268e-17, + 7.76510191900161845e-19, + -9.04079306779783405e-21, + 1.05260613634013525e-22, + -1.22553372226373055e-24, + 1.42687071960530350e-26, + -1.66105925115941561e-28, + 2.11171113736012203e-02, + -2.48173992820575288e-04, + 2.91660775107251831e-06, + -3.42767615451405942e-08, + 4.02829753706300366e-10, + -4.73416399788455988e-12, + 5.56371731548082676e-14, + -6.53863076573005189e-16, + 7.68437536744925915e-18, + -9.03088534944256417e-20, + 1.06133402251728518e-21, + -1.24730839068098000e-23, + 1.46587045857368820e-25, + -1.72249261539414884e-27, + 6.11959855891208090e-02, + -7.33453274514382918e-04, + 8.79066985713367174e-06, + -1.05358963170874956e-07, + 1.26276055190875676e-09, + -1.51345852641961311e-11, + 1.81392799112220378e-13, + -2.17405016360799642e-15, + 2.60566799620194304e-17, + -3.12297564244872983e-19, + 3.74298524498474505e-21, + -4.48608639521822088e-23, + 5.37671655027406136e-25, + -6.44323953226836111e-27, + 1.28650926294821832e-01, + -1.59238254252906533e-03, + 1.97097855008090275e-05, + -2.43958743651455861e-07, + 3.01961016275665794e-09, + -3.73753586305160180e-11, + 4.62615158072064049e-13, + -5.72603962395951961e-15, + 7.08743092461224815e-17, + -8.77249904119368152e-19, + 1.08581995711845873e-20, + -1.34397846453215051e-22, + 1.66351526130109968e-24, + -2.05870797897642331e-26, + 2.37456861673428749e-01, + -3.08936236520946554e-03, + 4.01932366001643733e-05, + -5.22922233594070026e-07, + 6.80332527353352836e-09, + -8.85126540888869226e-11, + 1.15156774354694737e-12, + -1.49821320084476314e-14, + 1.94920603478455252e-16, + -2.53595694116922237e-18, + 3.29933187801802958e-20, + -4.29249829277531313e-22, + 5.58462796117335333e-24, + -7.26448562318989318e-26, + 4.27147723700533610e-01, + -6.02839792438802750e-03, + 8.50796563304276722e-05, + -1.20074155888415457e-06, + 1.69462401873374154e-08, + -2.39164751450595666e-10, + 3.37536690759086019e-12, + -4.76370438860959021e-14, + 6.72308525956709741e-16, + -9.48838796870731846e-18, + 1.33910998846911427e-19, + -1.88990539495082351e-21, + 2.66725085347666678e-23, + -3.76358026998835674e-25, +# root=6 base[28]=88.0 */ + 2.19733219353527437e-03, + -2.44446440920925256e-05, + 2.71939138991858358e-07, + -3.02523919092588694e-09, + 3.36548545245924309e-11, + -3.74399894219546913e-13, + 4.16508354505524194e-15, + -4.63352720049571666e-17, + 5.15465634374170202e-19, + -5.73439646997837808e-21, + 6.37933951014527997e-23, + -7.09681878437851537e-25, + 7.89499226430037607e-27, + -8.78184897168098090e-29, + 2.01686218501676770e-02, + -2.26383599243520992e-04, + 2.54105284868658729e-06, + -2.85221615054917240e-08, + 3.20148279232303564e-10, + -3.59351869863265417e-12, + 4.03356115746991636e-14, + -4.52748878619739851e-16, + 5.08190006520203076e-18, + -5.70420148834570890e-20, + 6.40270650782810140e-22, + -7.18674659523859410e-24, + 8.06679577431948639e-26, + -9.05347039143089621e-28, + 5.83952723161424714e-02, + -6.67863239131940580e-04, + 7.63831194705305690e-06, + -8.73589171883845330e-08, + 9.99118714347791582e-10, + -1.14268610176032745e-11, + 1.30688326462643982e-13, + -1.49467457837243387e-15, + 1.70945038145495885e-17, + -1.95508818370221540e-19, + 2.23602266992635136e-21, + -2.55732576261928878e-23, + 2.92479813909648409e-25, + -3.34463665824969991e-27, + 1.22579301086195164e-01, + -1.44564608864638090e-03, + 1.70493108958829164e-05, + -2.01072035754371179e-07, + 2.37135470221087835e-09, + -2.79667090582753830e-11, + 3.29827003451240211e-13, + -3.88983387280007405e-15, + 4.58749811254293752e-17, + -5.41029247540411548e-19, + 6.38065977386566017e-21, + -7.52506806878935529e-23, + 8.87473244924984420e-25, + -1.04650115672175399e-26, + 2.25705208489315329e-01, + -2.79119167841044256e-03, + 3.45173735146502345e-05, + -4.26860356300716939e-07, + 5.27878413761231223e-09, + -6.52802762313127064e-11, + 8.07290912782815200e-13, + -9.98339246532022177e-15, + 1.23459986404461076e-16, + -1.52677241688498368e-18, + 1.88808866811530887e-20, + -2.33491172568599780e-22, + 2.88747701907417266e-24, + -3.57026296337307420e-26, + 4.04310211688691912e-01, + -5.40112391244794952e-03, + 7.21528635049139313e-05, + -9.63880073175216414e-07, + 1.28763399030031154e-08, + -1.72013234749724662e-10, + 2.29790089046678731e-12, + -3.06973385512506339e-14, + 4.10081478291550753e-16, + -5.47822146069803542e-18, + 7.31827989341805064e-20, + -9.77638837389606370e-22, + 1.30601409054296172e-23, + -1.74437476812187782e-25, +# root=6 base[29]=92.0 */ + 2.10368694031128544e-03, + -2.24057242039258725e-05, + 2.38636494567060248e-07, + -2.54164409152534353e-09, + 2.70702714591307007e-11, + -2.88317156329800464e-13, + 3.07077757825972020e-15, + -3.27059098916618330e-17, + 3.48340612297850694e-19, + -3.71006899297351765e-21, + 3.95148066193700461e-23, + -4.20860082419026361e-25, + 4.48245156304523826e-27, + -4.77358013913167073e-29, + 1.93016927559013091e-02, + -2.07342300434873060e-04, + 2.22730876992543155e-06, + -2.39261566317239570e-08, + 2.57019133986058788e-10, + -2.76094636726382906e-12, + 2.96585889333858383e-14, + -3.18597966244195967e-16, + 3.42243740330736997e-18, + -3.67644461690614232e-20, + 3.94930379387375199e-22, + -4.24241409337466133e-24, + 4.55727845700811086e-26, + -4.89494670414596286e-28, + 5.58397551488449551e-02, + -6.10694539327023421e-04, + 6.67889426394735443e-06, + -7.30440927769647986e-08, + 7.98850719708279029e-10, + -8.73667463195170909e-12, + 9.55491204319903682e-14, + -1.04497818677350743e-15, + 1.14284611506151121e-17, + -1.24987991064570160e-19, + 1.36693800718002382e-21, + -1.49495923532687333e-23, + 1.63497032899723183e-25, + -1.78788040627729759e-27, + 1.17055082095441382e-01, + -1.31829793829905105e-03, + 1.48469372112055424e-05, + -1.67209200704579829e-07, + 1.88314373547446621e-09, + -2.12083444781372976e-11, + 2.38852652099872405e-13, + -2.69000673173493025e-15, + 3.02953982430706330e-17, + -3.41192883972560053e-19, + 3.84258305962800728e-21, + -4.32759452606073671e-23, + 4.87382414124094226e-25, + -5.48830290582006064e-27, + 2.15062182672692115e-01, + -2.53419898610922475e-03, + 2.98618958544239153e-05, + -3.51879559935245804e-07, + 4.14639530269070172e-09, + -4.88593142759964802e-11, + 5.75736855087467757e-13, + -6.78423205928727583e-15, + 7.99424324282121210e-17, + -9.42006766084977331e-19, + 1.11001969842074423e-20, + -1.30799881193992046e-22, + 1.54128873703044619e-24, + -1.81593529527573156e-26, + 3.83791529643689622e-01, + -4.86690822583860355e-03, + 6.17178698569147073e-05, + -7.82652000597099239e-07, + 9.92490757472268714e-09, + -1.25858990064086533e-10, + 1.59603354093646918e-12, + -2.02395002732591796e-14, + 2.56659625756301097e-16, + -3.25473270604406090e-18, + 4.12736711377076469e-20, + -5.23396568330458219e-22, + 6.63725695114380180e-24, + -8.41543497720650801e-26, +# root=6 base[30]=96.0 */ + 2.01769891064437160e-03, + -2.06116817353510052e-05, + 2.10557393731121670e-07, + -2.15093637792809664e-09, + 2.19727610601147471e-11, + -2.24461417622197341e-13, + 2.29297209682137992e-15, + -2.34237183944502174e-17, + 2.39283584908467502e-19, + -2.44438705428654646e-21, + 2.49704887756895179e-23, + -2.55084524606150102e-25, + 2.60580057401348826e-27, + -2.66166212845542869e-29, + 1.85062355681597686e-02, + -1.90606336165521781e-04, + 1.96316399694768243e-06, + -2.02197521679698549e-08, + 2.08254826580856991e-10, + -2.14493592374121288e-12, + 2.20919255149617608e-14, + -2.27537413848406471e-16, + 2.34353835141067871e-18, + -2.41374458452435465e-20, + 2.48605401136858099e-22, + -2.56052963808189746e-24, + 2.63723632863528580e-26, + -2.71595286757854165e-28, + 5.34985781619586320e-02, + -5.60564731070795422e-04, + 5.87366671258406536e-06, + -6.15450076293882931e-08, + 6.44876216075777383e-10, + -6.75709289962998278e-12, + 7.08016566839313643e-14, + -7.41868531874674527e-16, + 7.77339040303548069e-18, + -8.14505478555759940e-20, + 8.53448933091386731e-22, + -8.94254367306853794e-24, + 9.37010795611615399e-26, + -9.81703739968859371e-28, + 1.12007416467027596e-01, + -1.20706659988194459e-03, + 1.30081544821584952e-05, + -1.40184545780862229e-07, + 1.51072213223945141e-09, + -1.62805489586976130e-11, + 1.75450050502429628e-13, + -1.89076672410729419e-15, + 2.03761628723037748e-17, + -2.19587116752690586e-19, + 2.36641717804977249e-21, + -2.55020893000161462e-23, + 2.74827513901047870e-25, + -2.96138060428836397e-27, + 2.05377934294006220e-01, + -2.31113590797886416e-03, + 2.60074150785008303e-05, + -2.92663722946931937e-07, + 3.29337054338642294e-09, + -3.70605875809627314e-11, + 4.17046042573124707e-13, + -4.69305569551324451e-15, + 5.28113673619801400e-17, + -5.94290948924484198e-19, + 6.68760817255084158e-21, + -7.52562413249213882e-23, + 8.46865070654879514e-25, + -9.52864028663387749e-27, + 3.65255475991030143e-01, + -4.40821166550307755e-03, + 5.32020225984363701e-05, + -6.42086955740931873e-07, + 7.74924784052804831e-09, + -9.35244697887272140e-11, + 1.12873231431794336e-12, + -1.36224951637106645e-14, + 1.64407780419980152e-16, + -1.98421199184053559e-18, + 2.39471466527098329e-20, + -2.89014397233168283e-22, + 3.48806984179710056e-24, + -4.20908428737687786e-26, +# root=7 base[0]=0.0 */ + 2.17698169003663414e-02, + -9.00388533166411641e-04, + 2.77398856516153829e-05, + -7.52272087205286957e-07, + 1.88576835403994408e-08, + -4.45791918517815323e-10, + 1.00082617532786946e-11, + -2.13699719770689331e-13, + 4.31560210068295295e-15, + -8.15323208338981003e-17, + 1.40026388488924167e-18, + -2.06383759085473784e-20, + 2.02608816977337402e-22, + 1.00529391546118747e-24, + 2.08842926600831147e-01, + -8.69506768692059062e-03, + 2.55611283091824331e-04, + -6.06631136244537434e-06, + 1.15335481484192294e-07, + -1.53928800663169386e-09, + 3.65000180390809743e-12, + 5.59253510357823320e-13, + -2.04830279982893889e-14, + 4.10224267993781872e-16, + -3.10708791213844645e-18, + -1.26654974224177664e-19, + 6.39738967002332305e-21, + -1.59224904584232158e-22, + 6.65256543908556375e-01, + -2.80456922403081628e-02, + 7.48305949210435078e-04, + -1.31044007771253321e-05, + 9.01665470518738467e-08, + 2.62197604980704323e-09, + -9.04044106085457185e-11, + 5.11506359327406244e-13, + 4.11744236229754997e-14, + -1.25105401168636408e-15, + 1.83756063831323602e-18, + 8.10148924828152029e-19, + -2.09001957897295600e-20, + -8.62157086877372356e-23, + 1.64614257600417990e+00, + -7.05681784917052135e-02, + 1.61803133559422453e-03, + -1.57408378836372132e-05, + -1.94934741711401537e-07, + 5.80530431914956032e-09, + 7.52227413849002822e-11, + -3.68328076877764055e-12, + -2.97355145940334169e-14, + 2.67943702876386142e-15, + 6.28854044929080186e-18, + -2.06090769719397034e-18, + 6.97156671780374489e-21, + 1.59304181614939820e-21, + 3.98028028414261348e+00, + -1.73793949344110854e-01, + 3.24109616479511696e-03, + -8.34900399447002187e-06, + -4.66939082431400156e-07, + -4.69075757152077132e-09, + 1.69048801099545370e-10, + 5.19508837018899932e-12, + -3.67265241383516494e-14, + -4.17420866606925114e-15, + -3.34999199645459326e-17, + 2.69932933325790867e-18, + 6.52435919024000552e-20, + -1.25458285652966612e-21, + 1.14595357291161299e+01, + -5.08709034515915870e-01, + 7.45395770813983734e-03, + 8.90267743242692387e-06, + -2.19134166099043353e-07, + -1.21922370783600060e-08, + -2.80826775454521795e-10, + -1.95919052353406769e-12, + 1.10738219316225031e-13, + 4.83559991121635167e-15, + 8.03216698772997974e-17, + -8.59458266946322000e-19, + -8.98590380265432724e-20, + -2.40260549881449932e-21, + 6.54640522312565167e+01, + -2.93791074611183056e+00, + 3.50832316284655985e-02, + 2.59895480659062246e-05, + 4.46394164679727350e-07, + 5.51570608170696131e-09, + -4.61663238123931234e-12, + -3.31834951976833589e-12, + -1.44074409408090791e-13, + -4.46205737344564687e-15, + -1.14636852620945935e-16, + -2.57402909014293422e-18, + -5.40003887012227889e-20, + -9.58696242307729610e-22, +# root=7 base[1]=2.5 */ + 1.85613719641818456e-02, + -7.10051101941351365e-04, + 2.02660587926568209e-05, + -5.10610015309486508e-07, + 1.19295734034011777e-08, + -2.64157910779112828e-10, + 5.58444125350836287e-12, + -1.13356042529881797e-13, + 2.19607692188970145e-15, + -4.08077797671393017e-17, + 7.05003260719006116e-19, + -1.12190488235194719e-20, + 1.75838768902199611e-22, + -9.84195890755480402e-25, + 1.77732666227274266e-01, + -6.91227631404152127e-03, + 1.92898941360518015e-04, + -4.45831381966810020e-06, + 8.63654827866055846e-08, + -1.32524322499833805e-09, + 1.21406094034331961e-11, + 1.09537508097659516e-13, + -8.66105592761528641e-15, + 2.39922218107558538e-16, + -4.28521018469560301e-18, + 3.22883049710717994e-20, + 1.22456593771810400e-21, + -4.72645788255374932e-23, + 5.64089689587080056e-01, + -2.26604778352196383e-02, + 6.01076386873453279e-04, + -1.13530754740649026e-05, + 1.22668442266920211e-07, + 7.33317421992365102e-10, + -6.39877710525381983e-11, + 1.17501435379752939e-12, + 3.43567903569692156e-15, + -7.46048602690039273e-16, + 1.73127300810798845e-17, + -1.12417467994274680e-20, + -9.87187928708999185e-21, + 3.22789444029020914e-22, + 1.38849942437181073e+00, + -5.84232269418422379e-02, + 1.41447878363871928e-03, + -1.78687285879830895e-05, + -6.93134385467841799e-08, + 6.35228461054672334e-09, + -2.73351922407891319e-11, + -3.20374280025885082e-12, + 5.21624949002901344e-14, + 1.46000424708512729e-15, + -5.43841818711619090e-17, + -3.72063004911378167e-19, + 4.69974534405291523e-20, + -2.14211671620381270e-22, + 3.33614088076478055e+00, + -1.48398407899153734e-01, + 3.09382554275928166e-03, + -1.63048606146967778e-05, + -5.09688290668194167e-07, + 8.37646048424383867e-10, + 2.75182872927372739e-10, + 1.63071373227865580e-12, + -1.76651602502180029e-13, + -2.58124898356054664e-15, + 1.15646266145869914e-16, + 2.97122614377433351e-18, + -6.85000112102975366e-20, + -2.81440079259634209e-21, + 9.54452787107864076e+00, + -4.48730615771356700e-01, + 7.53049113683568281e-03, + 3.07037974485038134e-06, + -5.31998657881817571e-07, + -1.90104050818339966e-08, + -2.56358391681959998e-10, + 4.82283707715123949e-12, + 3.18988832293271015e-13, + 5.63323755648819522e-15, + -8.78861929482228206e-17, + -7.15060904915639258e-18, + -1.25013473290427252e-19, + 3.05960982558804006e-21, + 5.42758983325995814e+01, + -2.65586783340484045e+00, + 3.54414671621173585e-02, + 3.39651231451167549e-05, + 5.44616479824522095e-07, + 3.58253216051207747e-09, + -1.94050886707085981e-10, + -1.16522508160182978e-11, + -4.21430409625406097e-13, + -1.20085401898752385e-14, + -2.68069295126168554e-16, + -2.64876406382835436e-18, + 1.90270228180271059e-19, + 1.48176019456880977e-20, +# root=7 base[2]=5.0 */ + 1.60107234103867464e-02, + -5.69546109448793004e-04, + 1.51305830096720310e-05, + -3.55671922320905571e-07, + 7.76550893501215036e-09, + -1.61462060957039753e-10, + 3.20736920557898975e-12, + -6.19694505872458652e-14, + 1.13671667642504909e-15, + -2.02119690276274417e-17, + 3.74495989918828992e-19, + -4.46314721694220178e-21, + 9.12995547140105531e-23, + -2.57268070275141369e-24, + 1.52861754270501082e-01, + -5.56150073955290550e-03, + 1.46868577013442375e-04, + -3.27210307157153273e-06, + 6.28907622505254929e-08, + -1.02150081949442573e-09, + 1.24100094623689638e-11, + -5.89812449477877088e-14, + -2.66060925696420981e-15, + 1.07497588712656569e-16, + -2.20500576040066506e-18, + 5.11848172465100936e-20, + -2.37726042136383923e-22, + -2.22479661726021389e-23, + 4.82250125739498325e-01, + -1.83628205282427535e-02, + 4.76859858536704344e-04, + -9.34535193924667099e-06, + 1.24618521147222501e-07, + -4.15343771302801480e-10, + -3.26697631460033696e-11, + 9.81818618521301889e-13, + -1.19486798914276047e-14, + -1.50329310866972256e-16, + 1.13722566766100604e-17, + -1.74389394190148061e-19, + 5.92778391265651877e-22, + 5.09753590238662828e-23, + 1.17606580943662653e+00, + -4.79746609466500523e-02, + 1.19740288416535700e-03, + -1.80236563709298675e-05, + 4.50314181374479592e-08, + 4.84185268275736783e-09, + -8.87670518125405542e-11, + -1.10911604135948757e-12, + 6.70134699580512074e-14, + -4.74847510286684053e-16, + -3.16558543768984124e-17, + 1.06622266146609961e-18, + 6.32665142925861855e-21, + -9.78983098077367365e-22, + 2.79061821875525773e+00, + -1.24565439854732340e-01, + 2.85096542358609243e-03, + -2.39637240168603547e-05, + -4.26725843626482474e-07, + 7.30223226731302858e-09, + 2.35216366478176800e-10, + -4.43615658038281078e-12, + -1.66702271272329464e-13, + 3.29571575039936814e-15, + 1.38586010885595643e-16, + -2.27510792336302267e-18, + -1.10053753562471382e-19, + 1.60117947352766507e-21, + 7.87008188154590638e+00, + -3.88514760288560135e-01, + 7.50281401452264178e-03, + -8.74885881542564040e-06, + -9.56179995603962243e-07, + -2.22426459380816623e-08, + 4.33022841043077485e-11, + 1.69114489279629690e-11, + 3.73368252522394587e-13, + -4.95952948499225225e-15, + -4.28369541847200917e-16, + -4.98611498417558312e-18, + 2.81835347713118547e-19, + 1.00644454806301405e-20, + 4.42222852367918833e+01, + -2.37055451520597460e+00, + 3.59024948635120883e-02, + 4.28549474784141668e-05, + 5.33422987536159578e-07, + -6.98791148502596397e-09, + -7.88806206942697918e-10, + -3.40536215076901832e-11, + -1.02502583500799153e-12, + -1.88383481758780496e-14, + 1.78098278482865137e-16, + 3.19496516810617402e-17, + 1.25639687934371996e-18, + 1.30733158103893357e-20, +# root=7 base[3]=7.5 */ + 1.39502866037601765e-02, + -4.63682384290067524e-04, + 1.15135409647584789e-05, + -2.53598961726268532e-07, + 5.18422867275523860e-09, + -1.01773925424994579e-10, + 1.89076260814820503e-12, + -3.46736773241561858e-14, + 6.39284739284566210e-16, + -8.39885008581891966e-18, + 2.21586905472449241e-19, + -3.70476299836373121e-21, + -5.65708920386061898e-23, + -2.12472244576047176e-24, + 1.32739200047685774e-01, + -4.52795767475644602e-03, + 1.13017221226402044e-04, + -2.41380230009192039e-06, + 4.52689485785308118e-08, + -7.50028986154174902e-10, + 1.00507808298947437e-11, + -9.51931421418946689e-14, + 1.02827925867840060e-16, + 5.67631876765726246e-17, + -6.19888366000122498e-19, + 1.19771110091293853e-20, + -1.31548588198680054e-21, + -1.17196369283504911e-23, + 4.15765079791039605e-01, + -1.49634873044736695e-02, + 3.76290474127392285e-04, + -7.45197848771875359e-06, + 1.10463418098235025e-07, + -9.14955274725761043e-10, + -1.08033758592172602e-11, + 5.86270756239102377e-13, + -1.09310791351128098e-14, + 1.60337170090077463e-16, + 4.26051373169883184e-18, + -1.64976890110336634e-19, + -1.09522315361297646e-21, + -5.15711478014225527e-23, + 1.00198181781228435e+00, + -3.92417528826014064e-02, + 9.88243758795472396e-04, + -1.66506786313761358e-05, + 1.19209740006789634e-07, + 2.55883856060916891e-09, + -9.35843587984604204e-11, + 6.07712169470399474e-13, + 3.80407500445545029e-14, + -8.73025705371825439e-16, + 6.82457548214766354e-18, + 4.27995112539896720e-19, + -2.50726866467804918e-20, + -1.03059480875183512e-22, + 2.33600364308489716e+00, + -1.03011200319885726e-01, + 2.52811031227175584e-03, + -2.93676044532003307e-05, + -2.36821315556658437e-07, + 1.09956203305884287e-08, + 6.02622832249925451e-11, + -7.07505906524916648e-12, + 1.64448431463489760e-14, + 5.70527759483479826e-15, + -3.38317646195877003e-17, + -4.38988423508281942e-18, + 3.13220656754257222e-20, + 2.69817954684973479e-21, + 6.43499274521059927e+00, + -3.29204829414288525e-01, + 7.29202851425671261e-03, + -2.73681318135393752e-05, + -1.34645708074526352e-06, + -1.44594818470065189e-08, + 6.32649748445127204e-10, + 2.25708171130845296e-11, + -1.18733360029073415e-13, + -2.10249819943812127e-14, + -2.18275235566763220e-16, + 1.56689471488330820e-17, + 4.01400854828271836e-19, + -9.75999502735820350e-21, + 3.53179441688537281e+01, + -2.08115163707885742e+00, + 3.64589572930363037e-02, + 4.88453025917504071e-05, + 1.05759937887463099e-07, + -4.15570279963215495e-08, + -2.27239726012107518e-09, + -7.24992843024662508e-11, + -1.07375567346296189e-12, + 3.37252660760460830e-14, + 2.78259438088259032e-15, + 7.29967429007119279e-17, + -5.10358747162832777e-19, + -9.54219832806883809e-20, +# root=7 base[4]=10.0 */ + 1.22623053582094042e-02, + -3.82476855047546359e-04, + 8.90804662513026194e-06, + -1.84761127614686417e-07, + 3.53484894756910408e-09, + -6.59614969864742293e-11, + 1.17090906327331186e-12, + -1.77213391003831351e-14, + 4.48080160527520602e-16, + -3.81219259390158814e-18, + -1.78988424908370504e-20, + -6.98973850278002556e-21, + -3.09529182650658042e-23, + 3.41575059915323497e-24, + 1.16268178032520902e-01, + -3.72842854812791740e-03, + 8.79424375087631515e-05, + -1.79727452881106799e-06, + 3.24739896076109022e-08, + -5.38701959927615239e-10, + 7.70483545824204167e-12, + -6.41128597595122003e-14, + 1.65229102741867109e-15, + 2.34750502279819900e-17, + -1.48034917470336388e-18, + -4.56350414639431812e-20, + -6.19632696206334479e-22, + 4.04596404318855092e-23, + 3.61405927540579652e-01, + -1.22822696013563382e-02, + 2.96835421496134883e-04, + -5.84009715411993547e-06, + 9.07226060611413640e-08, + -1.01063942262328775e-09, + 1.72939222736432275e-12, + 3.46348343359341778e-13, + -4.02182541221147467e-15, + 1.65571744399420474e-16, + -4.45869994261370410e-18, + -2.20823517854452618e-19, + 2.83556289688372492e-22, + 1.15588004665543323e-22, + 8.59611206118725102e-01, + -3.20994761975851306e-02, + 8.01194283365831315e-04, + -1.44480312082236659e-05, + 1.49900891803928303e-07, + 6.27927135310185987e-10, + -6.37650643871243496e-11, + 1.39085470507272627e-12, + 1.29360856196403843e-14, + -5.58917400601072757e-16, + 1.83144162588023822e-18, + -5.09087871008415432e-19, + -7.49911003681074856e-21, + 6.32995419120007680e-22, + 1.96210801458556050e+00, + -8.42434764264537311e-02, + 2.16029939609246099e-03, + -3.13828795437691481e-05, + -1.74415511777471251e-08, + 1.02959992074046096e-08, + -1.03438492608461679e-10, + -3.85756005494291348e-12, + 1.58021814725864221e-13, + 1.33100146545906722e-15, + -1.56989585311022329e-16, + -6.85618981069359445e-19, + 9.69194253730746655e-20, + -2.01818559606489317e-22, + 5.23222786697350806e+00, + -2.72564123266044400e-01, + 6.82802844636225519e-03, + -5.02020868616189698e-05, + -1.43790416921924327e-06, + 7.15718847313420159e-09, + 1.09469004937490342e-09, + 6.56171826021947178e-12, + -8.33990407001660089e-13, + -1.29898626431917229e-14, + 6.13042697987956131e-16, + 1.43550696589409588e-17, + -5.27273850127038880e-19, + -1.69449676102534133e-20, + 2.75803218336275755e+01, + -1.78719269006068449e+00, + 3.70162223179515346e-02, + 4.01881026822172572e-05, + -1.44724713642770101e-06, + -1.22311618427723641e-07, + -4.41708312240899030e-09, + -6.09509672501991708e-11, + 2.69680576940738672e-12, + 1.80483705463095847e-13, + 3.26284341225426210e-15, + -1.04779576049152107e-16, + -6.92537414459520307e-18, + -8.81775517974572481e-20, +# root=7 base[5]=12.5 */ + 1.08621216419029585e-02, + -3.19210604102654783e-04, + 6.99127526301842978e-06, + -1.37371866637485425e-07, + 2.46421458627260596e-09, + -4.23404738343310988e-11, + 8.50355639911656314e-13, + -6.31281580450788713e-15, + 2.25698438830127496e-16, + -1.02944273985564020e-17, + -2.72615439795534025e-19, + -2.20062643996935708e-21, + 2.68346797270184235e-22, + 7.93281384229227032e-24, + 1.02636419503862361e-01, + -3.10308142532201561e-03, + 6.91682513585495335e-05, + -1.35433358364212832e-06, + 2.34360785060769940e-08, + -3.69082728078816203e-10, + 6.67166060566551694e-12, + -1.32406605827338353e-14, + 9.33362378320838181e-16, + -7.55247361836232370e-17, + -3.20414772970700884e-18, + -7.72995404758314045e-21, + 2.51254238870323191e-21, + 7.82392222881889414e-23, + 3.16615218037902768e-01, + -1.01647403593033304e-02, + 2.34812410807516925e-04, + -4.54489221075526604e-06, + 7.16526551269686033e-08, + -8.63478474650632545e-10, + 1.01715197046718277e-11, + 2.60867354291895789e-13, + -3.38686249039075507e-15, + -1.76598951441653034e-16, + -1.11481234225427478e-17, + -1.04436457252445866e-20, + 9.39348030502722161e-21, + 2.26918311220119702e-22, + 7.42992582540277113e-01, + -2.63421718362332989e-02, + 6.42391160983274206e-04, + -1.20184578371915011e-05, + 1.50471328397277984e-07, + -4.07547207143191841e-10, + -2.22135729117050688e-11, + 1.45179071153447204e-12, + -1.13408570357000557e-14, + -9.18792707416822301e-16, + -1.65307105538916672e-17, + -5.95787581114577827e-20, + 2.57491433760764877e-20, + 6.08808916054387903e-22, + 1.65732646026776687e+00, + -6.84575699023930867e-02, + 1.78831366712477527e-03, + -3.01757721871092427e-05, + 1.57887006448037136e-07, + 7.08968919125910585e-09, + -1.42047828335702130e-10, + 7.73080766940704992e-13, + 9.73933677265287596e-14, + -4.28668473283782180e-15, + -9.60947633798041479e-17, + 3.11627633725569111e-18, + 5.84091907226566433e-20, + -5.33575547773530724e-22, + 4.24687844073910981e+00, + -2.20720476507878349e-01, + 6.09694401459150853e-03, + -7.06314094369501187e-05, + -1.03388518194386373e-06, + 3.23767971436735540e-08, + 8.72779579718316825e-10, + -2.21782245800577456e-11, + -7.91321839048825677e-13, + 1.48405103388985381e-14, + 5.38175413547738862e-16, + -1.68482271252238110e-17, + -4.02063254035822640e-19, + 2.37415628996003823e-20, + 2.10260146024932233e+01, + -1.48975274968060223e+00, + 3.72591782236300836e-02, + -8.61919012429715838e-06, + -5.01371156886105430e-06, + -2.32481994400066507e-07, + -3.84160338006168473e-09, + 1.39340467059083080e-10, + 9.50387766257090484e-12, + 1.18456752653776022e-13, + -8.48726981166590659e-15, + -3.73731720276015969e-16, + 4.19690724298277363e-19, + 4.35493985783550761e-19, +# root=7 base[6]=15.0 */ + 9.68756953765914641e-03, + -2.69261394799658266e-04, + 5.55488471740261202e-06, + -1.03660588493778047e-07, + 1.80966327233602632e-09, + -2.36541665364237851e-11, + 7.04286891260075128e-13, + -7.02224424376649007e-15, + -3.18238977531651078e-16, + -1.77321132110150779e-17, + 7.48519066283443770e-20, + 2.15767008630408969e-20, + 6.87554562964241894e-22, + 1.89504818587622055e-24, + 9.12361868539723342e-02, + -2.60887381378749729e-03, + 5.49504127122730219e-05, + -1.02981572327395591e-06, + 1.76292392296845496e-08, + -2.13401472339214340e-10, + 6.14326826297801764e-12, + -4.95187537245152982e-14, + -3.73664196534297577e-15, + -1.59309834467290488e-16, + 6.70350391798331976e-19, + 2.18122350462427305e-19, + 6.51974399407552536e-21, + 1.47227952838310450e-23, + 2.79393749684135329e-01, + -8.48612160802400886e-03, + 1.86631459669594390e-04, + -3.52118399393832374e-06, + 5.73168956967709561e-08, + -5.52758009769870690e-10, + 1.44308406563514251e-11, + -2.64130984736233047e-14, + -1.63405011709069023e-14, + -4.53455302428130171e-16, + 2.84072344493593679e-18, + 7.44479120937667408e-19, + 2.07387009267975555e-20, + 7.45290541159045174e-24, + 6.47045556535807198e-01, + -2.17397438603839331e-02, + 5.12287150029876919e-04, + -9.69244152988345868e-06, + 1.39924482616920437e-07, + -5.28662731172353233e-10, + 7.57079215850090883e-12, + 4.53334150702419189e-13, + -5.28040058647812176e-14, + -1.15561381014751656e-15, + 1.91097628373945554e-17, + 1.90050203664121760e-18, + 5.10517045916604929e-20, + -1.37546983030717439e-22, + 1.40988922808272465e+00, + -5.55469241789027096e-02, + 1.44547169961251184e-03, + -2.66887924617418093e-05, + 2.68485027258189728e-07, + 4.13087916913614626e-09, + -1.03469606517137639e-10, + 9.94723976713559871e-13, + -8.57721467670646677e-14, + -4.58032508119791301e-15, + 1.02594147741435773e-16, + 6.05506347833769114e-18, + 6.83122850510064582e-20, + -6.33798869500364915e-22, + 3.45585534028905883e+00, + -1.75561073618091784e-01, + 5.17448475911819108e-03, + -8.11103262608181406e-05, + -2.39460886944420494e-07, + 4.36131639464836387e-08, + -1.97555123401558599e-12, + -3.63816122922324491e-11, + -6.25563923793633293e-14, + 2.09870801014098643e-14, + -1.17934697155219903e-16, + -2.02879764483607362e-18, + 8.70386969939195068e-19, + 5.29581224007696431e-21, + 1.56600743624310095e+01, + -1.19383350817670664e+00, + 3.65099318563150491e-02, + -1.29078838066146048e-04, + -1.00859174031896253e-05, + -2.42634231892625281e-07, + 4.32315269075422504e-09, + 4.18139773959186807e-10, + 4.43437846749193388e-12, + -4.49817960056486136e-13, + -1.50993764962917908e-14, + 2.77468900021812548e-16, + 2.41383101698305164e-17, + 1.04091496633245908e-19, +# root=7 base[7]=17.5 */ + 8.69217839980277775e-03, + -2.29336224943236470e-04, + 4.47180072424110093e-06, + -7.76667253957053362e-08, + 1.48148560070629009e-09, + -1.07744601589885547e-11, + 2.86690933469298619e-13, + -2.44507261660564807e-14, + -5.96114221301503315e-16, + 1.20716682688259613e-17, + 1.49103229701910328e-18, + 2.80106467258582579e-20, + -1.23736914298633946e-21, + -8.70602364389087609e-23, + 8.16080354557188470e-02, + -2.21418238438990259e-03, + 4.41681256264619729e-05, + -7.74657533145485612e-07, + 1.46334231480553789e-08, + -1.00665902957431961e-10, + 2.39147488366297460e-12, + -2.31889102262159665e-13, + -5.94769304367730791e-15, + 1.32237730780279967e-16, + 1.45338014438280596e-17, + 2.65501590110066693e-19, + -1.25312183464938156e-20, + -8.52495327883245218e-22, + 2.48188805219888203e-01, + -7.14722067445379416e-03, + 1.49572184647876061e-04, + -2.67522248746559979e-06, + 4.93047092002117024e-08, + -2.86791294117569232e-10, + 4.52295097923278981e-12, + -7.08929961952746079e-13, + -2.04815523860415698e-14, + 5.36215055304211061e-16, + 4.80197404729037956e-17, + 8.06032138869836502e-19, + -4.44600757812638251e-20, + -2.83622045137447323e-21, + 5.67599310120667888e-01, + -1.80693577981209906e-02, + 4.09096285976979742e-04, + -7.52788651819748062e-06, + 1.31080843740285402e-07, + -4.13978407879361149e-10, + -7.45982731618375616e-12, + -1.55427776844186719e-12, + -5.52848733938836068e-14, + 1.77941571583736758e-15, + 1.28340165560611867e-16, + 1.66229802631200947e-18, + -1.29657934023230010e-19, + -7.51245416593787997e-21, + 1.20891102640222337e+00, + -4.51857636289756115e-02, + 1.15327902656643601e-03, + -2.18646909937542260e-05, + 3.26423719057488945e-07, + 1.56138224396801589e-09, + -1.29956333944668105e-10, + -3.03627949039068501e-12, + -1.07699635585013915e-13, + 5.18555123187273902e-15, + 3.62247107099071254e-16, + 1.96340627766981733e-18, + -4.16595209941452730e-19, + -1.93414007132816786e-20, + 2.83023176290635270e+00, + -1.38059055142441489e-01, + 4.20601174613494458e-03, + -7.83079190648550036e-05, + 5.51513681660458911e-07, + 3.17894669959854883e-08, + -9.39231191649845852e-10, + -2.67126798587206630e-11, + 6.83007739599062329e-13, + 2.40534892069591783e-14, + 3.47759796957510997e-16, + 4.39200182640400413e-18, + -1.42876080340155895e-18, + -7.97274486072890664e-20, + 1.14548007437488497e+01, + -9.11005223053970137e-01, + 3.38619437585126054e-02, + -3.19593829207334050e-04, + -1.29455309293154137e-05, + -5.22590225370072976e-10, + 1.49867170890919970e-08, + 2.27501625590959844e-10, + -1.68469231813859576e-11, + -5.14867332342145870e-13, + 1.64679560923842139e-14, + 8.50086821766100666e-16, + -1.28414717337028780e-17, + -1.20707470289929118e-18, +# root=7 base[8]=20.0 */ + 7.84102843814813398e-03, + -1.96902088243653046e-04, + 3.67541305157863617e-06, + -5.55751057315433898e-08, + 1.27151985054281941e-09, + -1.34213879838687232e-11, + -5.11718313765794748e-13, + -2.43796300772933801e-14, + 9.28789627043967911e-16, + 6.28611287806418659e-17, + -7.62502036198337192e-20, + -1.17457079949050235e-19, + -2.92240264535717951e-21, + 1.33772303774079190e-22, + 7.34045501208394208e-02, + -1.89418560854649211e-03, + 3.62139502103967829e-05, + -5.56006998529612886e-07, + 1.25912516044179708e-08, + -1.34009054970177103e-10, + -5.19884058923964123e-12, + -2.28230206308848969e-13, + 9.30286690282520456e-15, + 6.14641161802579071e-16, + -1.46646589848686701e-18, + -1.16225888828897268e-18, + -2.79052522735989566e-20, + 1.35574163822944751e-21, + 2.21808121232526884e-01, + -6.06607830378989507e-03, + 1.22011716771691094e-04, + -1.93405156893708854e-06, + 4.27903903040382015e-08, + -4.58708681978320075e-10, + -1.88353291503157792e-11, + -6.74793413990283757e-13, + 3.23668701068256005e-14, + 2.03088262942390385e-15, + -1.02165119423532481e-17, + -3.94979524584921881e-18, + -8.70647363230892188e-20, + 4.84979687576590760e-21, + 5.01344623338169870e-01, + -1.51230488553965384e-02, + 3.30993961726206180e-04, + -5.52383487803048307e-06, + 1.16836112171491995e-07, + -1.21986260124447417e-09, + -5.90083434810216997e-11, + -1.33053003883880617e-12, + 9.22199899270815593e-14, + 5.25248050577613541e-15, + -5.25184302603678252e-17, + -1.08553391732116486e-17, + -1.98976731076932172e-19, + 1.45446735044709790e-20, + 1.04508561216225759e+00, + -3.69191383414119376e-02, + 9.22631908807632593e-04, + -1.65942965931996706e-05, + 3.18647953007255576e-07, + -2.69910463214431567e-09, + -2.16574260603328464e-10, + -1.01984690244646660e-12, + 2.83166016327287565e-13, + 1.24728511918685312e-14, + -2.55721516791186896e-16, + -3.05906969734367684e-17, + -3.43588113340033790e-19, + 4.76590672987778004e-20, + 2.33960451220022936e+00, + -1.07980410597510637e-01, + 3.33571194264257759e-03, + -6.58209431574862232e-05, + 9.17756727094232805e-07, + 3.61783236889170549e-09, + -1.23780223731524579e-09, + 1.03678263727257527e-11, + 1.58047800327489428e-12, + 1.17820899459537610e-14, + -1.73272989496477526e-15, + -8.81009233988216180e-17, + 3.35672641171093650e-19, + 2.17319336772807283e-19, + 8.32347674917456359e+00, + -6.58839477428159070e-01, + 2.88499202010778603e-02, + -5.06355821682617020e-04, + -9.20922796307826390e-06, + 3.63590362026551920e-07, + 1.22645876689804063e-08, + -4.26707975578811510e-10, + -1.75506339010793424e-11, + 5.31935278833142591e-13, + 2.42743309252664449e-14, + -6.49938606329240014e-16, + -3.07704173448582178e-17, + 8.01384799917007705e-19, +# root=7 base[9]=22.5 */ + 7.10845788020472626e-03, + -1.69846091724747724e-04, + 3.11912329041732711e-06, + -3.81927598086252665e-08, + 8.50256215750296358e-10, + -2.87407200404136451e-11, + -5.06594427504207005e-13, + 2.98998593055043945e-14, + 1.79853717262005748e-15, + -4.46930262054017881e-17, + -4.16012655315595543e-18, + 3.73843894609709595e-20, + 8.85699232520988556e-21, + 4.25903549772689894e-23, + 6.63694761158902108e-02, + -1.62799275093576386e-03, + 3.06362637235387374e-05, + -3.84098746086716119e-07, + 8.39616421976401392e-09, + -2.84489481184934859e-10, + -4.80767660302167586e-12, + 3.03745214008228548e-13, + 1.72881974667407636e-14, + -4.60748773739704543e-16, + -4.06102905450949774e-17, + 4.18718100784662752e-19, + 8.74371714198489178e-20, + 3.24058406443265618e-22, + 1.99364293288804006e-01, + -5.17205748656222788e-03, + 1.02517880139458257e-04, + -1.35091253149460825e-06, + 2.84174347145381627e-08, + -9.64756494601019032e-10, + -1.49094231417075805e-11, + 1.09120172893677187e-12, + 5.48529389071818391e-14, + -1.70077083040643975e-15, + -1.33624350240676725e-16, + 1.78911571782124586e-18, + 2.95156292335790214e-19, + 3.47237118304700767e-22, + 4.45770270864705442e-01, + -1.27108476353965175e-02, + 2.74853914101624830e-04, + -3.93134604790212886e-06, + 7.75932571988931873e-08, + -2.61355610757780678e-09, + -3.50136765211276371e-11, + 3.28941262152127509e-12, + 1.30724871172885176e-13, + -5.30683915113283919e-15, + -3.43090470837035885e-16, + 6.71698866443719595e-18, + 7.96276405381338056e-19, + -2.99456993938608404e-21, + 9.11024691050667745e-01, + -3.02538329993409551e-02, + 7.51421370107797112e-04, + -1.21973814570911038e-05, + 2.16961940454271553e-07, + -6.93538450654558760e-09, + -7.95775602712885111e-11, + 1.07864643318410253e-11, + 2.63111318108702866e-13, + -1.80140874037115114e-14, + -8.20081752452343321e-16, + 2.79135336625725414e-17, + 2.12094561642672929e-18, + -3.04500783162963538e-20, + 1.95639942204392714e+00, + -8.42085710757460998e-02, + 2.63164074619184939e-03, + -5.19715351033105599e-05, + 7.45492668221621066e-07, + -1.71335510190924061e-08, + -3.05844251759792178e-10, + 4.88471973962789303e-11, + 1.85575252292524845e-13, + -8.78441682484121114e-14, + -1.27240811707426010e-15, + 1.60480396451391973e-16, + 5.34001196343970864e-18, + -2.87204426292917551e-19, + 6.10852870108835244e+00, + -4.54217395225770815e-01, + 2.21680934327700870e-02, + -5.84461201803526567e-04, + -1.95770326361850546e-07, + 4.73739453402195311e-07, + -3.75075658931761186e-09, + -5.68908189375210067e-10, + 9.61456068165169350e-12, + 6.88822991184062817e-13, + -1.73081040150124946e-14, + -7.75852610328512741e-16, + 2.46312983172006405e-17, + 7.59148622065467687e-19, +# root=7 base[10]=25.0 */ + 6.47634250778982967e-03, + -1.46541274309619431e-04, + 2.72232393470467251e-06, + -2.94749265808076006e-08, + 2.45430970370007016e-10, + -2.67748666549693633e-11, + 7.17973616830978428e-13, + 3.94986246314289099e-14, + -1.44136117588901173e-15, + -8.14007667110486950e-17, + 3.33843298225733992e-18, + 1.58337053436392445e-19, + -7.42020810389630477e-21, + -3.07141463041278269e-22, + 6.03211183312351018e-02, + -1.39951083302015207e-03, + 2.66350267858767342e-05, + -2.97821952387082135e-07, + 2.46526163188016773e-09, + -2.59676959291147966e-10, + 7.25305066837718334e-12, + 3.79352738024549395e-13, + -1.46791205736193184e-14, + -7.79129259835386952e-16, + 3.39163369728055310e-17, + 1.51450391025373717e-18, + -7.54931491298862487e-20, + -2.93479352631263907e-21, + 1.80222575970342719e-01, + -4.41055885158518103e-03, + 8.83700582625787174e-05, + -1.05710765547963424e-06, + 8.69425462542360463e-09, + -8.43043519320619897e-10, + 2.56419022557597742e-11, + 1.20358951596464907e-12, + -5.28689299060412986e-14, + -2.44536135858412810e-15, + 1.21551729419485155e-16, + 4.73843246279376798e-18, + -2.71495437910359552e-19, + -9.13847635989742516e-21, + 3.99050164006162389e-01, + -1.06837050012302502e-02, + 2.33353445276901831e-04, + -3.11686379495974119e-06, + 2.58065675874558807e-08, + -2.12199831071232744e-09, + 7.42078669782299226e-11, + 2.89263330628690289e-12, + -1.58653119843210857e-13, + -5.67696135175700821e-15, + 3.61761909035293555e-16, + 1.08489868180405147e-17, + -8.13183462754893206e-19, + -2.04933008641925292e-20, + 8.01174332968061287e-01, + -2.47795910442900856e-02, + 6.21269424942191384e-04, + -9.82885867996249006e-06, + 8.54397307900346471e-08, + -5.00932616559425388e-09, + 2.18331128737078454e-10, + 6.18561415994379574e-12, + -5.04124875904305979e-13, + -1.04367976284390367e-14, + 1.13102887225278614e-15, + 1.83049159575344313e-17, + -2.56180146953184043e-18, + -3.01628749067904914e-20, + 1.65797294142712537e+00, + -6.54737134063955450e-02, + 2.06816637492212956e-03, + -4.27445775174077120e-05, + 4.31230817157506441e-07, + -1.02785642897960131e-08, + 6.89597051083995240e-10, + 9.82472029486416072e-12, + -2.02695910602910538e-12, + 6.15716457365773977e-15, + 4.33807089158675401e-15, + -4.25016318815720395e-17, + -9.49725177255702265e-18, + 1.48227338146215671e-19, + 4.60273496332054677e+00, + -3.04315228881306021e-01, + 1.54198233468626090e-02, + -5.21240363049381319e-04, + 7.34402735636713800e-06, + 2.44263384016363179e-07, + -1.28642598273003305e-08, + -4.01332133609143024e-11, + 1.75417530882837902e-11, + -2.60546711038266396e-13, + -1.93728682866944108e-14, + 6.28548586749044636e-16, + 1.80024226506859371e-17, + -9.80538284576540295e-19, +# root=7 base[11]=27.5 */ + 5.93154447017608683e-03, + -1.26143938797206587e-04, + 2.37829525081565767e-06, + -2.86373633916047160e-08, + -6.25465187113479907e-11, + -3.06846406355145153e-12, + 9.64025783962545222e-13, + -2.15334497668370840e-14, + -1.41857599001191022e-15, + 6.88601483385687287e-17, + 1.57446496530331503e-18, + -1.68160806497080262e-19, + 2.40605645708019972e-24, + 3.36111010277968394e-22, + 5.51271209110663143e-02, + -1.20037555463982869e-03, + 2.31641409113901787e-05, + -2.88035023947255661e-07, + -4.70933001871301719e-10, + -2.59102700944824873e-11, + 9.33994438179533840e-12, + -2.21196574246494047e-13, + -1.35152182429497433e-14, + 6.91639025640651505e-16, + 1.43063729442691792e-17, + -1.66665639965454689e-18, + 2.74735512759684267e-21, + 3.29315886794512730e-21, + 1.63915893937444435e-01, + -3.75299845416765662e-03, + 7.60928320726008323e-05, + -1.01209451060334560e-06, + -4.75102412863640785e-10, + -5.68516213758804490e-11, + 3.02089005770721078e-11, + -8.07868857152665908e-13, + -4.19896868258520060e-14, + 2.41819074262346208e-15, + 3.90210560571571382e-17, + -5.66103403360706665e-18, + 2.97001415977005445e-20, + 1.08891663724936236e-20, + 3.59818677448193291e-01, + -8.96197458395422281e-03, + 1.97388727995754203e-04, + -2.93083973960645760e-06, + 4.36939856902521507e-09, + -2.21719867755687643e-11, + 7.51326658580527737e-11, + -2.45190071002472310e-12, + -9.58058247223115691e-14, + 6.89111887284240473e-15, + 5.97215878912924352e-17, + -1.53194918269111355e-17, + 1.80477545815829151e-19, + 2.78853685787260624e-20, + 7.11274577501233130e-01, + -2.02635924378861826e-02, + 5.09219953967622119e-04, + -8.95385606931189165e-06, + 4.19350220762689824e-08, + 4.50944309262009635e-10, + 1.70283702599406489e-10, + -7.70221751758099897e-12, + -1.72650019378527829e-13, + 1.99429578925322914e-14, + -6.74196602252993215e-17, + -4.01190064908846610e-17, + 9.79089543037824873e-19, + 6.37192497078614880e-20, + 1.42607249209390075e+00, + -5.08726386494135277e-02, + 1.59272332159282495e-03, + -3.66157205385668282e-05, + 3.80146823979579775e-07, + 3.43545345248351965e-09, + 2.76807990312559747e-10, + -2.75817186825469255e-11, + 4.02927217440361565e-14, + 6.41377188498697155e-14, + -1.76394107208833849e-15, + -9.43235285363489336e-17, + 6.04873051387428199e-18, + 6.01698814675044404e-20, + 3.59575187998393186e+00, + -2.03714085906676529e-01, + 9.97821819947754783e-03, + -3.80821312360772981e-04, + 9.32724784335205511e-06, + -2.70402314571140654e-08, + -8.25135113487765527e-09, + 2.83026875061798292e-10, + 1.78687400803221387e-12, + -4.17195598012840209e-13, + 9.04373307551412054e-15, + 3.33255660695501148e-16, + -2.07367755681417874e-17, + -2.02019637911938561e-21, +# root=7 base[12]=30.0 */ + 5.46282355911997461e-03, + -1.08506964698986067e-04, + 2.02997455698390931e-06, + -2.91383178356922723e-08, + 4.23328807494507986e-11, + 1.01004162441067297e-11, + 1.09831272700845443e-13, + -2.76147779326092503e-14, + 7.46927645173049775e-16, + 2.60270658686800912e-17, + -2.17690961181580705e-18, + 2.07559704632411788e-20, + 3.30955894131949926e-21, + -1.41126608363521177e-22, + 5.06742054518306423e-02, + -1.02898941367788612e-03, + 1.96776633195954228e-05, + -2.90214071080435784e-07, + 5.99692472038446584e-10, + 9.87946238846671079e-11, + 8.87355128920154003e-13, + -2.67014574066213362e-13, + 7.59496787320274769e-15, + 2.39827479575012236e-16, + -2.14266905009323899e-17, + 2.36687349080298977e-19, + 3.16131674182764734e-20, + -1.42458893009977497e-21, + 1.50044436789751323e-01, + -3.19284166327352603e-03, + 6.39668740101920506e-05, + -9.98773656723427140e-07, + 3.36666983449379163e-09, + 3.25431649652384834e-10, + 1.58418129945036652e-12, + -8.59119781169687602e-13, + 2.71801767766991855e-14, + 6.83293997103476084e-16, + -7.16644919542126244e-17, + 1.02961501621631828e-18, + 9.85117592862351928e-20, + -5.02029570059818159e-21, + 3.26908530512495299e-01, + -7.52188490654700712e-03, + 1.62868358000869495e-04, + -2.79320775060394609e-06, + 1.55484639268851784e-08, + 8.28882293370124482e-10, + -2.09938370070047941e-12, + -2.11014250101458707e-12, + 7.99378899765753996e-14, + 1.24304729876538915e-15, + -1.88572549220359335e-16, + 3.84132126631457081e-18, + 2.23373739065616480e-19, + -1.43657159644965479e-20, + 6.37705591875584288e-01, + -1.66064657355839140e-02, + 4.06606075106750791e-04, + -8.06548786470920727e-06, + 7.36554783780184763e-08, + 1.90445687654556267e-09, + -3.32047420779284235e-11, + -4.62095824854875517e-12, + 2.39506953087041189e-13, + 5.16298314080627911e-16, + -4.69669285380255735e-16, + 1.49659027027765703e-17, + 3.72447873645627435e-19, + -4.06336963159656284e-20, + 1.24543704494055718e+00, + -3.97786552382204325e-02, + 1.19260233910637955e-03, + -2.98611306398064179e-05, + 4.60389661352145527e-07, + 2.49450908109343758e-09, + -2.50265458674357657e-10, + -6.26042679084420476e-12, + 7.90340934959318362e-13, + -1.55866702611232682e-14, + -1.00377725842197883e-15, + 6.74956116396046218e-17, + -5.60136913391254970e-19, + -1.08402087288895062e-19, + 2.91506027317021266e+00, + -1.39728441522230212e-01, + 6.25838846611611373e-03, + -2.44010526720396889e-04, + 7.43301058088584365e-06, + -1.34490472432284879e-07, + -1.20022771374119712e-09, + 1.82391551763315212e-10, + -5.55016006676046674e-12, + -8.55116523874355337e-15, + 7.10031400727597540e-15, + -2.43748708251509330e-16, + -6.43311773470786710e-19, + 3.49897294984932516e-19, +# root=7 base[13]=32.5 */ + 5.05909711970631368e-03, + -9.36390955945031410e-05, + 1.69092097983150531e-06, + -2.69102124288849474e-08, + 2.23766174878200358e-10, + 6.50408873930105137e-12, + -2.88159391335033488e-13, + -1.98914347068758771e-15, + 5.76910448179099449e-16, + -2.05893609214396980e-17, + -9.03382973166732472e-20, + 3.63294081715906735e-20, + -1.29617761984118316e-21, + -6.07236165330717311e-24, + 4.68514591063784180e-02, + -8.85187999863365016e-04, + 1.63159791485697791e-05, + -2.65652129053567257e-07, + 2.33986000982899826e-09, + 6.07455558103649062e-11, + -2.86374798861445810e-12, + -1.45554025922648979e-14, + 5.53730475706946397e-15, + -2.05536351062325503e-16, + -5.35020299701916111e-19, + 3.48524225146450085e-19, + -1.30102788262510628e-20, + -3.41731429124614300e-23, + 1.38222554802422931e-01, + -2.72765693634936844e-03, + 5.25084654553636908e-05, + -8.97061253409312690e-07, + 8.84950767382785825e-09, + 1.79225130302286567e-10, + -9.77307054914942810e-12, + -1.26469750588557008e-14, + 1.75104483227075575e-14, + -7.08263617300751519e-16, + 7.70419262791505438e-19, + 1.09927715072890700e-18, + -4.52942173596740188e-20, + 7.22109395179690396e-23, + 2.99222114231236291e-01, + -6.34761883848734831e-03, + 1.31338616262025319e-04, + -2.42933868973836776e-06, + 2.83488770214787191e-08, + 3.58076143146374129e-10, + -2.66018316751575122e-11, + 1.31169693908758659e-13, + 4.15122493679887535e-14, + -1.96055191875771637e-15, + 1.38417814891572074e-17, + 2.57866047230144042e-18, + -1.26993076054980415e-19, + 1.06066795135005198e-21, + 5.77204001177176740e-01, + -1.37182703152878161e-02, + 3.17923560694202559e-04, + -6.65477983576448283e-06, + 9.74812389984999225e-08, + 3.42425957354053555e-10, + -7.04397513568048447e-11, + 1.06901374578235111e-12, + 8.35330518868695124e-14, + -5.34241919820950257e-15, + 8.81875226614479515e-17, + 4.95547297765486508e-18, + -3.48604548530331575e-19, + 6.62249655070753407e-21, + 1.10331358771208254e+00, + -3.15443890030042556e-02, + 8.78998347978632972e-04, + -2.24386315270146370e-05, + 4.47993353983441003e-07, + -3.42620856691360957e-09, + -1.82130941383909582e-10, + 7.11847426214522645e-12, + 6.36047698718595940e-14, + -1.47103334579616161e-14, + 5.23281047385759534e-16, + 1.50926048063581803e-18, + -9.19053874030558866e-19, + 3.79336767974011975e-20, + 2.44031667733377633e+00, + -9.95594647433050012e-02, + 3.95389613201278453e-03, + -1.46779041331935364e-04, + 4.76939855626339154e-06, + -1.20905887626595109e-07, + 1.64928606968927402e-09, + 3.51006987187852844e-11, + -3.08046271968515367e-12, + 9.37690176886374851e-14, + -6.36130705798720006e-16, + -7.64500504142976736e-17, + 3.87897003389172932e-18, + -7.20330218406518302e-20, +# root=7 base[14]=35.0 */ + 4.70964621386584566e-03, + -8.13350800769468025e-05, + 1.39257539302928257e-06, + -2.26549981994811223e-08, + 2.88154511475064826e-10, + 3.54027868529491934e-13, + -1.88860263457033646e-13, + 6.00481492712179498e-15, + 1.68920555404198544e-18, + -8.50748767203120198e-18, + 3.83845295695046705e-19, + -5.56930302957823172e-21, + -2.72724598702222692e-22, + 1.94835899426460747e-23, + 4.35525634462913327e-02, + -7.66706476025795307e-04, + 1.33810791061889704e-05, + -2.22092168378478728e-07, + 2.91021318682009601e-09, + 7.11513911714144492e-13, + -1.80990970364322950e-12, + 5.98471419977706054e-14, + -7.53402729057647028e-17, + -8.06243588045900579e-17, + 3.76868562409850851e-18, + -5.89293667087338743e-20, + -2.48495118070253695e-21, + 1.88798614041535889e-22, + 1.28087542533732945e-01, + -2.34804843530350910e-03, + 4.26720764533914090e-05, + -7.38803955209289213e-07, + 1.02934287752493756e-08, + -1.79259336458409777e-11, + -5.69916355137136585e-12, + 2.05541370362902289e-13, + -9.11091646875658875e-16, + -2.47394340791756538e-16, + 1.25352393416100508e-17, + -2.26439695843509839e-19, + -6.87392677100857010e-21, + 6.09167115358340152e-22, + 2.75759764110978634e-01, + -5.40547389575251301e-03, + 1.05040235075590284e-04, + -1.94997011673496158e-06, + 2.99488533088981939e-08, + -1.43871000794311866e-10, + -1.33623696784888975e-11, + 5.66133224935267034e-13, + -5.40029467076082319e-15, + -5.50480671748528834e-16, + 3.26678011980278877e-17, + -7.28192054717587715e-19, + -1.15104258997901259e-20, + 1.49403903306066300e-21, + 5.26949380551561486e-01, + -1.14678070710683717e-02, + 2.47389371541366235e-04, + -5.11851852785311906e-06, + 9.07647535965975547e-08, + -8.34293051181153180e-10, + -2.58714255130422108e-11, + 1.53607074734050181e-12, + -2.69838239873713104e-14, + -9.34514266777771310e-16, + 8.02749061324638050e-17, + -2.39683846503853431e-18, + 4.75570003832931464e-22, + 3.19855550410300719e-21, + 9.89658298560506799e-01, + -2.54740174845464358e-02, + 6.49895740724706775e-04, + -1.59894203829309826e-05, + 3.51519574999562726e-07, + -5.52773765621731019e-09, + -7.07191072939986326e-12, + 4.33079499667214700e-12, + -1.46129731678287253e-13, + 5.08025393123570323e-16, + 1.74650626229782776e-16, + -8.72189413989041419e-18, + 1.69309726304448347e-19, + 3.76584967145580907e-21, + 2.09579391148219685e+00, + -7.38452415186828387e-02, + 2.57809110294332251e-03, + -8.74918969201838415e-05, + 2.78137559596700441e-06, + -7.78354389250629285e-08, + 1.70001475650041649e-09, + -1.82605317952929935e-11, + -5.79973436368852491e-13, + 4.15762584380472375e-14, + -1.29948204532943126e-15, + 1.80727963771253067e-17, + 4.44476802975207032e-19, + -3.67868687269763039e-20, +# root=7 base[15]=37.5 */ + 4.40497500046442732e-03, + -7.12043261750036508e-05, + 1.14796460107006919e-06, + -1.81795755846025243e-08, + 2.62698227589897313e-10, + -2.34629387978231029e-12, + -4.82784163679571815e-14, + 3.52871599854554107e-15, + -1.02111497271466735e-16, + 6.95517716913083980e-19, + 8.71499695927636835e-20, + -4.90504170684764348e-21, + 1.26927535067176155e-22, + -2.41724800845126769e-25, + 4.06840587537429590e-02, + -6.69538223823805531e-04, + 1.09896665172496473e-05, + -1.77235480258082051e-07, + 2.61632690943647813e-09, + -2.46791272771380326e-11, + -4.31599087193933810e-13, + 3.40397832544063866e-14, + -1.01474795666542278e-15, + 8.08746031146406899e-18, + 8.09048102226556520e-19, + -4.74519308899516176e-20, + 1.26998835174270854e-21, + -4.37280986725461539e-24, + 1.19325820084347820e-01, + -2.03940093135804475e-03, + 3.47637282094574824e-05, + -5.82587112014917928e-07, + 8.99221137726111592e-09, + -9.42436969496543474e-11, + -1.12687233954403353e-12, + 1.08906061279553722e-13, + -3.46505983686988549e-15, + 3.59313306326241310e-17, + 2.35882224915195954e-18, + -1.52788549825914530e-19, + 4.39187792368986052e-21, + -2.87621164068934642e-23, + 2.55681414247559136e-01, + -4.65091163041541581e-03, + 8.43778093710871553e-05, + -1.50635280093638431e-06, + 2.49974954398388393e-08, + -3.04772135197116697e-10, + -1.48477989454605330e-12, + 2.64404172285056815e-13, + -9.46339316456007471e-15, + 1.34924105825198877e-16, + 4.65165182712043620e-18, + -3.75515527364398176e-19, + 1.21862589184719736e-20, + -1.38516761751694915e-22, + 4.84680359513096071e-01, + -9.71111563665036544e-03, + 1.94055877915606204e-04, + -3.82085724183615654e-06, + 7.07823319609837613e-08, + -1.05043463423503095e-09, + 3.29122033955388904e-12, + 5.64522915234298695e-13, + -2.54120865227225725e-14, + 5.18316730476115132e-16, + 4.89235561330324790e-18, + -8.25511682485758607e-19, + 3.30984374715991496e-20, + -6.12401200578745956e-22, + 8.97069400758054525e-01, + -2.09550245635949789e-02, + 4.88181346414272776e-04, + -1.12264833276777333e-05, + 2.46554533577904984e-07, + -4.72138334609444142e-09, + 5.74897944145813501e-11, + 6.97543577607987096e-13, + -7.14711692604428648e-14, + 2.32472285437234589e-15, + -2.79348396907256546e-17, + -1.27477688438614002e-18, + 9.04794388649590398e-20, + -2.83002370068998996e-21, + 1.83594205328642590e+00, + -5.67684615670327047e-02, + 1.75047622268461483e-03, + -5.34237870514641289e-05, + 1.58511488593189524e-06, + -4.42012791514337740e-08, + 1.09229213400506143e-09, + -2.11856349540847783e-11, + 1.93139902628324786e-13, + 7.06116829968500057e-15, + -4.61539554280856041e-16, + 1.46974576478119822e-17, + -2.72235007459456432e-19, + 2.43514269676783310e-24, +# root=7 base[16]=40.0 */ + 4.06596993513669899e-03, + -9.70563152826895911e-05, + 2.31560345473913910e-06, + -5.50282015577823290e-08, + 1.27801643707287702e-09, + -2.65892145019500211e-11, + 2.94738824135652646e-13, + 1.62529409070928417e-14, + -1.61086279487368582e-15, + 8.21293301863306100e-17, + -2.38122329517466738e-18, + -1.90148501308580055e-20, + 7.17039513766326524e-21, + -4.83000689992580969e-22, + 3.75011653090001826e-02, + -9.10101503938209053e-04, + 2.20757485567755872e-05, + -5.33392871324919641e-07, + 1.26041443324234679e-08, + -2.68250817165620045e-10, + 3.23528388192746975e-12, + 1.46667534052874378e-13, + -1.54548255142376885e-14, + 8.05502809222954220e-16, + -2.41791167557267467e-17, + -1.20793661567086235e-19, + 6.72933464950193260e-20, + -4.67132613053613498e-21, + 1.09662236863346724e-01, + -2.75559796683078799e-03, + 6.92077426801449523e-05, + -1.73161672087469339e-06, + 4.24318383871477446e-08, + -9.46282864517967536e-10, + 1.32789577160041912e-11, + 3.94171785806062391e-13, + -4.88493182433525431e-14, + 2.67588795473121079e-15, + -8.62096098628604842e-17, + 6.68335858568412002e-20, + 2.01854286294476805e-19, + -1.50342838772923617e-20, + 2.33766414048815430e-01, + -6.21959098705807383e-03, + 1.65394403160025732e-04, + -4.38247768036424990e-06, + 1.13965806859749970e-07, + -2.73727790230019576e-09, + 4.67495952199955782e-11, + 5.89446431164709659e-13, + -1.15935915581233365e-13, + 6.98502383402212186e-15, + -2.51626951541992590e-16, + 2.27913572106999920e-18, + 4.28751713912185178e-19, + -3.69513143773253428e-20, + 4.39345863034238893e-01, + -1.27647194788207997e-02, + 3.70675560537263196e-04, + -1.07283612572135879e-05, + 3.05596576131165120e-07, + -8.18609379489284605e-09, + 1.75531737453444387e-10, + -6.17486623177082447e-13, + -2.36026672225130450e-13, + 1.74491315444937991e-14, + -7.45460338007849942e-16, + 1.48307254274929914e-17, + 6.42734070121741691e-19, + -8.16283079370905526e-20, + 8.00843538474321326e-01, + -2.67138556965877023e-02, + 8.90637698019740537e-04, + -2.96064132906327155e-05, + 9.72038224628564228e-07, + -3.06170824316928183e-08, + 8.53762505203853749e-10, + -1.59282514568464355e-11, + -2.24087787775893833e-13, + 4.26160338847644549e-14, + -2.51483519917167764e-15, + 8.84739454234643827e-17, + -8.43925037838967791e-19, + -1.35411947379145969e-19, + 1.58452651944964451e+00, + -6.76251328721455963e-02, + 2.88461077798375046e-03, + -1.22751394228530074e-04, + 5.18180647386678762e-06, + -2.14159923346522124e-07, + 8.44786729328877564e-09, + -3.03989852366947395e-10, + 9.12379328545256251e-12, + -1.71449733492663560e-13, + -2.73813092013679402e-15, + 4.71846430138906392e-16, + -2.75832054956292662e-17, + 1.06861143886924292e-18, +# root=7 base[17]=44.0 */ + 3.71105335481095944e-03, + -8.08626946555638916e-05, + 1.76188484848111335e-06, + -3.83712264686343842e-08, + 8.33010845937807894e-10, + -1.77741223077508329e-11, + 3.50079196072613702e-13, + -4.60191783118164820e-15, + -1.03826585204441305e-16, + 1.36030567721693384e-17, + -7.99556728720695956e-19, + 3.34963961084338274e-20, + -9.30533142564482150e-22, + 3.64495041506158584e-24, + 3.41777751176296218e-02, + -7.56046531322649633e-04, + 1.67236683086791073e-05, + -3.69756799096993457e-07, + 8.14997400569542820e-09, + -1.76687621030309658e-10, + 3.55267141823400839e-12, + -4.95914570268146155e-14, + -8.63908218431470387e-16, + 1.28466726561047700e-16, + -7.72155794235103833e-18, + 3.28592709475654231e-19, + -9.37910790492690859e-21, + 5.50310841848563081e-23, + 9.96301163990636757e-02, + -2.27482901193894237e-03, + 5.19379883635065579e-05, + -1.18530124297250813e-06, + 2.69715078515175565e-08, + -6.04523457466826173e-10, + 1.26802016916558917e-11, + -1.97618757946222031e-13, + -1.73861484096385469e-15, + 3.91041422498323010e-16, + -2.48000735028591163e-17, + 1.09257642340665298e-18, + -3.29587159934668670e-20, + 3.19150518262568834e-22, + 2.11240075913317754e-01, + -5.07955493761827904e-03, + 1.22138671286089854e-04, + -2.93559961102727729e-06, + 7.03704153820860514e-08, + -1.66500015165223866e-09, + 3.73246287818373659e-11, + -6.73751149893230581e-13, + 8.31498727821217391e-16, + 8.55577060639443873e-16, + -6.09545014631521888e-17, + 2.86118156105774125e-18, + -9.41759564798927944e-20, + 1.43794220143400951e-21, + 3.93505170184707431e-01, + -1.02421809631741186e-02, + 2.66570769625940605e-04, + -6.93523816602547013e-06, + 1.80018542535551217e-07, + -4.62424069993471928e-09, + 1.14171988618000777e-10, + -2.45465274474389630e-12, + 2.77989035502705500e-14, + 1.37804053388368166e-15, + -1.36071227273127189e-16, + 7.22917085649310071e-18, + -2.71437431374163018e-19, + 6.16976677433017887e-21, + 7.06308314406955406e-01, + -2.07855385084598256e-02, + 6.11654455079807383e-04, + -1.79927491449241545e-05, + 5.28319699982894996e-07, + -1.53985762467079990e-08, + 4.37832415218254429e-10, + -1.15757299601954089e-11, + 2.46681112617787865e-13, + -1.57729009664512408e-15, + -2.39971787223708229e-16, + 1.86778878440951062e-17, + -8.88466970500264166e-19, + 2.96162717409840576e-20, + 1.35248649313449243e+00, + -4.92970324433114823e-02, + 1.79674376628615080e-03, + -6.54672551211916710e-05, + 2.38245267254120610e-06, + -8.63449452329576010e-08, + 3.09446788497869840e-09, + -1.08070028774404071e-10, + 3.57958766768592480e-12, + -1.06986502807704728e-13, + 2.57982844487205212e-15, + -3.06116750500111376e-17, + -1.44034540020510254e-18, + 1.34210313474022433e-19, +# root=7 base[18]=48.0 */ + 3.41316423296822305e-03, + -6.84071366940053419e-05, + 1.37102020261235452e-06, + -2.74768706538771290e-08, + 5.50476869714356916e-10, + -1.10041526537966480e-11, + 2.17487240784065396e-13, + -4.08464133445884911e-15, + 6.09731569525515536e-17, + 1.40789477570740120e-19, + -7.90202352556410995e-20, + 5.20378242271789843e-21, + -2.46526200545920207e-22, + 9.21401366400508957e-24, + 3.13958766243043544e-02, + -6.38029618330562993e-04, + 1.29660376924315980e-05, + -2.63484416981582919e-07, + 5.35247818870507037e-09, + -1.08501981805655163e-10, + 2.17588819913102344e-12, + -4.16064826918141839e-14, + 6.46231573147136585e-16, + -1.06085280406424359e-19, + -7.28032535108197599e-19, + 4.96033923464276887e-20, + -2.38277059385202201e-21, + 9.01358438909373471e-23, + 9.12809947406236499e-02, + -1.90970414732277586e-03, + 3.99530583659473852e-05, + -8.35825622359906829e-07, + 1.74800041209217912e-08, + -3.64857372146761980e-10, + 7.54249266661644294e-12, + -1.49626867033071830e-13, + 2.50473234472191820e-15, + -1.13330898983419592e-17, + -2.07742721731290205e-18, + 1.54604944306316929e-19, + -7.67281946906453035e-21, + 2.98025450841386624e-22, + 1.92677015697917176e-01, + -4.22645893471693644e-03, + 9.27089373866229208e-05, + -2.03352279036822467e-06, + 4.45911438810134487e-08, + -9.76136050197224967e-10, + 2.11970836837435084e-11, + -4.45517364592557323e-13, + 8.27428230403756643e-15, + -8.24215217844974158e-17, + -3.82758026032940668e-18, + 3.57951701351825335e-19, + -1.89984258162339125e-20, + 7.74006369743658604e-22, + 3.56335447807879235e-01, + -8.39971026226794121e-03, + 1.98001182687313794e-04, + -4.66718342201482665e-06, + 1.09984184097011021e-07, + -2.58823658694788475e-09, + 6.05367668748524393e-11, + -1.38370500395168242e-12, + 2.92489072976030173e-14, + -4.64050882166926809e-16, + -2.07710404370629908e-18, + 6.94620698689096150e-19, + -4.34301234955945738e-20, + 1.93716007734358153e-21, + 6.31761277500301199e-01, + -1.66324339760435917e-02, + 4.37881706221737493e-04, + -1.15277079099042716e-05, + 3.03415812572608409e-07, + -7.97797732489042521e-09, + 2.08927604844884897e-10, + -5.39774606971196506e-12, + 1.33979686977828124e-13, + -2.97215015902060272e-15, + 4.53585209116129010e-17, + 4.93733148031927660e-19, + -8.72673557748756046e-20, + 5.01471536117588865e-21, + 1.17984033827553714e+00, + -3.75268120352522036e-02, + 1.19359851194043311e-03, + -3.79631580924579096e-05, + 1.20726389819170979e-06, + -3.83691165376877616e-08, + 1.21701309283138654e-09, + -3.83867286406380728e-11, + 1.19453809582051869e-12, + -3.61122942192960937e-14, + 1.03111133850202873e-15, + -2.63418953662415167e-17, + 5.26034262239194345e-19, + -3.59225893238209518e-21, +# root=7 base[19]=52.0 */ + 3.15957520256693455e-03, + -5.86231961203797808e-05, + 1.08770258654094281e-06, + -2.01813078293088448e-08, + 3.74433492541160368e-10, + -6.94546475263840574e-12, + 1.28660303771949804e-13, + -2.36739919276831400e-15, + 4.22995375033887877e-17, + -6.68730422760796431e-19, + 5.14578722137549844e-21, + 3.03668658674366441e-22, + -2.48876965136700296e-23, + 1.26830699266370850e-24, + 2.90330488734724633e-02, + -5.45640983768977644e-04, + 1.02546583209992853e-05, + -1.92723156678806362e-07, + 3.62187264351287662e-09, + -6.80514312508216271e-11, + 1.27698569707237207e-12, + -2.38118689078337039e-14, + 4.32087485227281620e-16, + -7.01717207946905999e-18, + 6.27563698256350079e-20, + 2.62694473169281947e-21, + -2.33405483524481126e-22, + 1.21194908281499114e-23, + 8.42239581104040902e-02, + -1.62594187097571266e-03, + 3.13887669739580565e-05, + -6.05957309478054530e-07, + 1.16976073129938929e-08, + -2.25768794858983873e-10, + 4.35240981504566482e-12, + -8.34423757750400911e-14, + 1.56295139792292098e-15, + -2.67369670073732158e-17, + 3.00197771765979061e-19, + 6.14461390262669424e-21, + -6.98798675737574145e-22, + 3.80282218561064777e-23, + 1.77115345025377485e-01, + -3.57159089534931761e-03, + 7.20223184749655521e-05, + -1.45234929493146110e-06, + 2.92862192361256992e-08, + -5.90442693598742281e-10, + 1.18923642305245673e-11, + -2.38454142462624116e-13, + 4.69591463255350111e-15, + -8.65794962342457680e-17, + 1.23290947377111117e-18, + 3.69428113481486530e-21, + -1.47390065416140384e-21, + 8.95654011198158094e-23, + 3.25587541550283743e-01, + -7.01328951114703423e-03, + 1.51069095198088710e-04, + -3.25407952711984612e-06, + 7.00923023946049497e-08, + -1.50955192956584633e-09, + 3.24859944342007359e-11, + -6.96817966716766015e-13, + 1.47642490175824129e-14, + -3.00193703395247897e-16, + 5.32847652120313101e-18, + -5.07360079111215093e-20, + -2.08887510426232542e-21, + 1.83505941885438777e-22, + 5.71464022936943317e-01, + -1.36107614315124775e-02, + 3.24172239319108055e-04, + -7.72090147631967607e-06, + 1.83887249273924566e-07, + -4.37911951008156969e-09, + 1.04231008222511144e-10, + -2.47584569004683148e-12, + 5.84060873967347892e-14, + -1.34970236869239579e-15, + 2.94649802403559328e-17, + -5.48004657042674806e-19, + 5.23286069539801077e-21, + 2.26153660229238525e-22, + 1.04634326146852485e+00, + -2.95214349496651304e-02, + 8.32914869746933574e-04, + -2.34997222812946357e-05, + 6.63007719969876961e-07, + -1.87044264933206442e-08, + 5.27535005924578235e-10, + -1.48648410041468605e-11, + 4.17756075163420511e-13, + -1.16625785784413628e-14, + 3.20757949800104011e-16, + -8.55625048998158511e-18, + 2.15118577797681366e-19, + -4.81478263305802003e-21, +# root=7 base[20]=56.0 */ + 2.94108299266060717e-03, + -5.07980010445846091e-05, + 8.77376418516834585e-07, + -1.51539268262390601e-08, + 2.61735926687008867e-10, + -4.52056641507400385e-12, + 7.80665477155293916e-14, + -1.34714353493444230e-15, + 2.31626913855950477e-17, + -3.92095276938641788e-19, + 6.23756077586027786e-21, + -7.57928807351962778e-23, + -3.96949530376115236e-25, + 8.82227494311132492e-26, + 2.70011793158061210e-02, + -4.71962919983381446e-04, + 8.24960240198335474e-06, + -1.44197606177108771e-07, + 2.52047290515680170e-09, + -4.40552499451583056e-11, + 7.69942855206513355e-13, + -1.34466525826790509e-14, + 2.34046133128321531e-16, + -4.01557853432793493e-18, + 6.51248679845218046e-20, + -8.35377240540460494e-22, + -1.60339430268899741e-24, + 8.02240198565373262e-25, + 7.81804396715803096e-02, + -1.40104579959515556e-03, + 2.51076778878338033e-05, + -4.49946275538355787e-07, + 8.06331771792444751e-09, + -1.44497095252755998e-10, + 2.58913483698145132e-12, + -4.63638656802994790e-14, + 8.27815960869757651e-16, + -1.46024236136565018e-17, + 2.46023176198049298e-19, + -3.46951455006704471e-21, + 1.17720122596848763e-23, + 2.20601283778280712e-24, + 1.63881137166143859e-01, + -3.05796613042931152e-03, + 5.70606040695047299e-05, + -1.06473114947134458e-06, + 1.98674728166167056e-08, + -3.70713482383186390e-10, + 6.91658168450817109e-12, + -1.28979853309015867e-13, + 2.39964130779449266e-15, + -4.42357178612506727e-17, + 7.88863579479680428e-19, + -1.25171027775635325e-20, + 1.14743404759976593e-22, + 3.59254516656149903e-24, + 2.99728379991608451e-01, + -5.94391619440827034e-03, + 1.17873853231503748e-04, + -2.33755689391174042e-06, + 4.63560127459875734e-08, + -9.19272254806987626e-10, + 1.82283974508616979e-11, + -3.61315445244631623e-13, + 7.15017258399024021e-15, + -1.40636724102439955e-16, + 2.71014537384355950e-18, + -4.89606356996286795e-20, + 7.10663819001027407e-22, + -1.40424921586480405e-24, + 5.21683767433983259e-01, + -1.13438460360578402e-02, + 2.46668285523363271e-04, + -5.36372151317697864e-06, + 1.16632190776811331e-07, + -2.53609890355228870e-09, + 5.51429779137896111e-11, + -1.19869089809230313e-12, + 2.60319679678807075e-14, + -5.63482997769488779e-16, + 1.20757298538521146e-17, + -2.51704797223537391e-19, + 4.87292376900323769e-21, + -7.61632978164455267e-23, + 9.40020179049828597e-01, + -2.38303331542001756e-02, + 6.04119762804238795e-04, + -1.53149610882915379e-05, + 3.88247110946742805e-07, + -9.84232461914759068e-09, + 2.49501920477981859e-10, + -6.32409607953228963e-12, + 1.60231898184482823e-13, + -4.05494848586945767e-15, + 1.02299812905878984e-16, + -2.56212087281803736e-18, + 6.31770073495071131e-20, + -1.50966817462717710e-21, +# root=7 base[21]=60.0 */ + 2.75086952227305420e-03, + -4.44414539766835534e-05, + 7.17970377547215108e-07, + -1.15991131922618013e-08, + 1.87388516389949647e-10, + -3.02733512486701124e-12, + 4.89072419554564463e-14, + -7.90051560831916543e-16, + 1.27577088900822613e-17, + -2.05637691286867439e-19, + 3.28913195292821238e-21, + -5.10499209759212331e-23, + 7.05791343175631543e-25, + -5.28057417640617971e-27, + 2.52352493402512451e-02, + -4.12263037402396074e-04, + 6.73505577607913129e-06, + -1.10029208298931995e-07, + 1.79752403794018691e-09, + -2.93657290584981880e-11, + 4.79735899422253510e-13, + -7.83672921169597205e-15, + 1.27971369051021272e-16, + -2.08622430790252971e-18, + 3.37704760202175981e-20, + -5.31982885123138103e-22, + 7.56614927479690238e-24, + -6.56455788621462661e-26, + 7.29466153408543372e-02, + -1.21978826807785318e-03, + 2.03968807932338323e-05, + -3.41069635431539857e-07, + 5.70324839321666200e-09, + -9.53676146396055002e-11, + 1.59468645086782365e-12, + -2.66639169769568319e-14, + 4.45694734636176351e-16, + -7.43922752527880362e-18, + 1.23439894427370789e-19, + -2.00350909870842203e-21, + 3.00370496703746489e-23, + -3.23231908335398863e-25, + 1.52488276007662793e-01, + -2.64769484920369339e-03, + 4.59726359997149830e-05, + -7.98235201090119900e-07, + 1.38599696886011798e-08, + -2.40654036387424898e-10, + 4.17849942044600650e-12, + -7.25481068698584334e-14, + 1.25928268907988638e-15, + -2.18342052672788132e-17, + 3.76910785067952234e-19, + -6.40434935605786089e-21, + 1.03163870087742731e-22, + -1.37405875456100388e-24, + 2.77677176768845180e-01, + -5.10177750260658661e-03, + 9.37352286620332875e-05, + -1.72220230459808710e-06, + 3.16421096343576696e-08, + -5.81361464749835724e-10, + 1.06812996183229338e-11, + -1.96239132968356912e-13, + 3.60469770233676772e-15, + -6.61640947742965674e-17, + 1.21099003128586375e-18, + -2.19525228364597756e-20, + 3.86186305864795923e-22, + -6.19799215832029957e-24, + 4.79887664163026917e-01, + -9.59967264877144635e-03, + 1.92031847759110882e-04, + -3.84140495604362808e-06, + 7.68434534849690952e-08, + -1.53717495895369050e-09, + 3.07494673454808166e-11, + -6.15093361868014806e-13, + 1.23025902320902646e-14, + -2.45960894222721785e-16, + 4.91013760600413474e-18, + -9.75732279901695635e-20, + 1.91400533951873984e-21, + -3.62749487732822817e-23, + 8.53332530928727406e-01, + -1.96399983462398273e-02, + 4.52027223442892526e-04, + -1.04036978451471963e-05, + 2.39447789467588620e-07, + -5.51104167852128899e-09, + 1.26839731179876684e-10, + -2.91925062207477721e-12, + 6.71840248758740857e-14, + -1.54592298429532035e-15, + 3.55541102339571309e-17, + -8.16574876599538446e-19, + 1.86914108352470766e-20, + -4.24435787105228880e-22, +# root=7 base[22]=64.0 */ + 2.58377607030830592e-03, + -3.92077001697445360e-05, + 5.94960132258134698e-07, + -9.02826631333275390e-09, + 1.37000090153362315e-10, + -2.07891771356780342e-12, + 3.15466599128583197e-14, + -4.78703907800040538e-16, + 7.26382950959593984e-18, + -1.10201047183573428e-19, + 1.67046301045218455e-21, + -2.52306248610264603e-23, + 3.75827421241370322e-25, + -5.32055024964468530e-27, + 2.36862319685854292e-02, + -3.63215977652534081e-04, + 5.56972702917871539e-06, + -8.54088505497042318e-08, + 1.30970003339989457e-09, + -2.00835627037514370e-11, + 3.07970647721624021e-13, + -4.72253869188101581e-15, + 7.24148587729426415e-17, + -1.11021391808046348e-18, + 1.70076995763364664e-20, + -2.59693700629326982e-22, + 3.91596021654253416e-24, + -5.64402716140076523e-26, + 6.83699056098677066e-02, + -1.07156588181488870e-03, + 1.67947202612601789e-05, + -2.63224719264131359e-07, + 4.12553773215636910e-09, + -6.46598086422043693e-11, + 1.01341644326412803e-12, + -1.58832490377866737e-14, + 2.48930657189181717e-16, + -3.90080585904781973e-18, + 6.10862232700221799e-20, + -9.54018527708547069e-22, + 1.47496464601612540e-23, + -2.20103366535001176e-25, + 1.42577273642809227e-01, + -2.31479265864021960e-03, + 3.75814806616584835e-05, + -6.10148681043754202e-07, + 9.90598036443886013e-09, + -1.60827092955036243e-10, + 2.61108302896566455e-12, + -4.23916532653508044e-14, + 6.88224232601763941e-16, + -1.11719736474656026e-17, + 1.81263975674020682e-19, + -2.93514330012409228e-21, + 4.71887247522833444e-23, + -7.40624413676349663e-25, + 2.58650032274913066e-01, + -4.42675631899185334e-03, + 7.57632672004594033e-05, + -1.29667689810768908e-06, + 2.21924294716760362e-08, + -3.79820054368365944e-10, + 6.50055904588162745e-12, + -1.11255664151005694e-13, + 1.90408418208490061e-15, + -3.25848274796364592e-17, + 5.57441873587399418e-19, + -9.52441649498195854e-21, + 1.62037805637459098e-22, + -2.71927205402795732e-24, + 4.44296259939380267e-01, + -8.22900603027355675e-03, + 1.52413032357654078e-04, + -2.82290866358454579e-06, + 5.22843299016896366e-08, + -9.68380957502814374e-10, + 1.79358006233238218e-11, + -3.32195957717075979e-13, + 6.15266447420868185e-15, + -1.13949324856529380e-16, + 2.10999497130846836e-18, + -3.90459899160854664e-20, + 7.21114620328405691e-22, + -1.32370780343966213e-23, + 7.81296400059412255e-01, + -1.64654527045908911e-02, + 3.47001640774730253e-04, + -7.31289572069207297e-06, + 1.54115823195719186e-07, + -3.24791804991187082e-09, + 6.84483199808228835e-11, + -1.44251391919199911e-12, + 3.04000996462514035e-14, + -6.40650930301450669e-16, + 1.35001525784174834e-17, + -2.84423741855007893e-19, + 5.98882521189530471e-21, + -1.25860321953824185e-22, +# root=7 base[23]=68.0 */ + 2.43582723657615949e-03, + -3.48470254183649229e-05, + 4.98522704020576080e-07, + -7.13188237528897381e-09, + 1.02028946272354252e-10, + -1.45962948672474337e-12, + 2.08815066384675385e-14, + -2.98731383576410391e-16, + 4.27364731418164291e-18, + -6.11377777882378378e-20, + 8.74551439494453277e-22, + -1.25054031035173750e-23, + 1.78534565913345205e-25, + -2.53288079482527806e-27, + 2.23164583306618425e-02, + -3.22429671310266489e-04, + 4.65848529370495362e-06, + -6.73061047467539614e-08, + 9.72443068480470281e-10, + -1.40499219069866173e-11, + 2.02994191974862528e-13, + -2.93287220592550529e-15, + 4.23742030402881039e-17, + -6.12214392323243458e-19, + 8.84449169186694272e-21, + -1.27729848138484561e-22, + 1.84199013500259204e-24, + -2.64128394277701155e-26, + 6.43338171282687027e-02, + -9.48811147472426340e-04, + 1.39933029587009082e-05, + -2.06376714909827090e-07, + 3.04369515605307637e-09, + -4.48891734359167903e-11, + 6.62036665287668403e-13, + -9.76387742668525862e-15, + 1.43999703528721264e-16, + -2.12371044981670826e-18, + 3.13185172145298781e-20, + -4.61723465171219873e-22, + 6.79909970173705701e-24, + -9.96601368356837652e-26, + 1.33876542619210115e-01, + -2.04095769637738407e-03, + 3.11145495461366111e-05, + -4.74343586412972167e-07, + 7.23140270813237294e-09, + -1.10243263210321581e-10, + 1.68066653744918632e-12, + -2.56218752582700270e-14, + 3.90606485539444083e-16, + -5.95475009245864331e-18, + 9.07749738238836914e-20, + -1.38348699328562317e-21, + 2.10675264460371113e-23, + -3.19754034671928876e-25, + 2.42064496073083640e-01, + -3.87738138472678087e-03, + 6.21077714678414800e-05, + -9.94840304267115093e-07, + 1.59353202847314118e-08, + -2.55251451230876256e-10, + 4.08860944327560158e-12, + -6.54911971703374852e-14, + 1.04903412348778821e-15, + -1.68032436190897915e-17, + 2.69142320803130350e-19, + -4.31032551542067024e-21, + 6.89936112648413925e-23, + -1.10207108875603668e-24, + 4.13622613847448695e-01, + -7.13231426453428234e-03, + 1.22986280403671478e-04, + -2.12071770899897769e-06, + 3.65686610294584585e-08, + -6.30572828640990455e-10, + 1.08733016252941070e-11, + -1.87494073297097269e-13, + 3.23305618323335825e-15, + -5.57489937102680245e-17, + 9.61285843617130254e-19, + -1.65743339998356972e-20, + 2.85698053798147040e-22, + -4.91915724726968553e-24, + 7.20484162983407894e-01, + -1.40029570050722203e-02, + 2.72154219286961240e-04, + -5.28944843909029432e-06, + 1.02802980066476976e-07, + -1.99802546606155225e-09, + 3.88325872658836278e-11, + -7.54729964990852097e-13, + 1.46685322102922538e-14, + -2.85089266516328265e-16, + 5.54079130927075890e-18, + -1.07684055174128014e-19, + 2.09264466255913606e-21, + -4.06419602537189293e-23, +# root=7 base[24]=72.0 */ + 2.30390993600210984e-03, + -3.11754770693535300e-05, + 4.21852588642500696e-07, + -5.70832023349896363e-09, + 7.72424319878720891e-11, + -1.04520998352724088e-12, + 1.41433131735636524e-14, + -1.91380971371453753e-16, + 2.58968097024697448e-18, + -3.50423515515455556e-20, + 4.74173455269497881e-22, + -6.41602747618641738e-24, + 8.68013233947379236e-26, + -1.17332797926615802e-27, + 2.10965074179338338e-02, + -2.88147741849765636e-04, + 3.93568089201945889e-06, + -5.37557017949773950e-08, + 7.34225043813592745e-10, + -1.00284508762938363e-11, + 1.36974116438444460e-13, + -1.87086802383566056e-15, + 2.55533424874794396e-17, + -3.49021176538023229e-19, + 4.76708690570218529e-21, + -6.51089249742880026e-23, + 8.89129723509300916e-25, + -1.21324529702705408e-26, + 6.07478661208792209e-02, + -8.46005970140652100e-04, + 1.17819134599616962e-05, + -1.64080975403330475e-07, + 2.28507589874771438e-09, + -3.18231400590492603e-11, + 4.43185384190770675e-13, + -6.17202701006140964e-15, + 8.59548000131062903e-17, + -1.19704922996141720e-18, + 1.66706106214840661e-20, + -2.32155692704453986e-22, + 3.23262374595158519e-24, + -4.49816717124463842e-26, + 1.26177067017850364e-01, + -1.81299729767877031e-03, + 2.60503693664484240e-05, + -3.74309297093709491e-07, + 5.37832872601140158e-09, + -7.72794587277833857e-11, + 1.11040344113842154e-12, + -1.59550260402031301e-14, + 2.29252550192396186e-16, + -3.29405221488469330e-18, + 4.73309167604703331e-20, + -6.80065095506175644e-22, + 9.77052031326142988e-24, + -1.40295645626642449e-25, + 2.27478734816236594e-01, + -3.42429332499988781e-03, + 5.15467293464144915e-05, + -7.75945590556886629e-07, + 1.16804997547493607e-08, + -1.75829434620912165e-10, + 2.64680370341522650e-12, + -3.98429861474830203e-14, + 5.99766191689556626e-16, + -9.02842145326123624e-18, + 1.35906543823991751e-19, + -2.04579924304910024e-21, + 3.07936562659124849e-23, + -4.63307487902786763e-25, + 3.86912847591144804e-01, + -6.24114623034916372e-03, + 1.00673592285975693e-04, + -1.62392801092505738e-06, + 2.61949745183971891e-08, + -4.22541322800685962e-10, + 6.81585580613987169e-12, + -1.09944015676668589e-13, + 1.77346558865906525e-15, + -2.86070961392728364e-17, + 4.61449337004109838e-19, + -7.44339479129191172e-21, + 1.20062005386543484e-22, + -1.93590165094259567e-24, + 6.68460651785850679e-01, + -1.20543945506529169e-02, + 2.17377683480080166e-04, + -3.91998595006370769e-06, + 7.06893624147993612e-08, + -1.27474588467295237e-09, + 2.29875756852347639e-11, + -4.14536448855904542e-13, + 7.47536249311821924e-15, + -1.34803670028517836e-16, + 2.43092105497821640e-18, + -4.38367929980290231e-20, + 7.90500978307765298e-22, + -1.42498891329286190e-23, +# root=7 base[25]=76.0 */ + 2.18555154396460729e-03, + -2.80551230963406174e-05, + 3.60133319264131083e-07, + -4.62289925440048547e-09, + 5.93424611751303345e-11, + -7.61757396054329789e-13, + 9.77840013438059793e-15, + -1.25521733717285297e-16, + 1.61127640665308988e-18, + -2.06833618056076896e-20, + 2.65504559123665901e-22, + -3.40817277576083049e-24, + 4.37486946985456579e-26, + -5.61447851767793055e-28, + 2.00030651183176235e-02, + -2.59057024141318430e-04, + 3.35501291227110168e-06, + -4.34503240312229837e-08, + 5.62719342006145582e-10, + -7.28770302459210733e-12, + 9.43820682886367750e-14, + -1.22232955566493832e-15, + 1.58302265607613311e-17, + -2.05015129758490109e-19, + 2.65512200792943057e-21, + -3.43860199817901513e-23, + 4.45321561486784924e-25, + -5.76590648618755151e-27, + 5.75407007962111458e-02, + -7.59049895789338570e-04, + 1.00130296698739648e-05, + -1.32087183893892119e-07, + 1.74243208341677841e-09, + -2.29853455555895755e-11, + 3.03211881395379217e-13, + -3.99982870214029598e-15, + 5.27638606913307909e-17, + -6.96036005931140987e-19, + 9.18177537859546719e-21, + -1.21121335594041871e-22, + 1.59775411004612904e-24, + -2.10718697586687048e-26, + 1.19315357638179714e-01, + -1.62120703907087994e-03, + 2.20282813173408447e-05, + -2.99311047942374537e-07, + 4.06691298924491712e-09, + -5.52595080452959761e-11, + 7.50843019509539600e-13, + -1.02021400327076670e-14, + 1.38622398526356340e-16, + -1.88354288212678830e-18, + 2.55927803708570977e-20, + -3.47743226090481949e-22, + 4.72494074149403861e-24, + -6.41857908062223454e-26, + 2.14551496395376212e-01, + -3.04623435665353753e-03, + 4.32508927299950720e-05, + -6.14082668280442438e-07, + 8.71883791708215130e-09, + -1.23791369712678293e-10, + 1.75760845184242297e-12, + -2.49547886410171316e-14, + 3.54311832648617251e-16, + -5.03057233157206108e-18, + 7.14248005141628727e-20, + -1.01409855897892817e-21, + 1.43982262361675470e-23, + -2.04381197457695101e-25, + 3.63444900629985024e-01, + -5.50717028903659287e-03, + 8.34484801956938683e-05, + -1.26446949730851388e-06, + 1.91601225794919197e-08, + -2.90327523153532185e-10, + 4.39924485566727137e-12, + -6.66604222540769418e-14, + 1.01008514394960261e-15, + -1.53055131511755480e-17, + 2.31919755171537018e-19, + -3.51420672361709803e-21, + 5.32495119640842049e-23, + -8.06676887694627597e-25, + 6.23448011283788683e-01, + -1.04860655635606124e-02, + 1.76370072585313459e-04, + -2.96645126956309272e-06, + 4.98941402341801931e-08, + -8.39193030146334173e-10, + 1.41147825875428539e-11, + -2.37403172149328100e-13, + 3.99299568708786552e-15, + -6.71600728558678525e-17, + 1.12959678714153066e-18, + -1.89992134912085054e-20, + 3.19556254775385504e-22, + -5.37322076896849269e-24, +# root=7 base[26]=80.0 */ + 2.07876320288208176e-03, + -2.53808951211212824e-05, + 3.09890917953630795e-07, + -3.78364831389370414e-09, + 4.61968832702987360e-11, + -5.64046086432202390e-13, + 6.88678467234824585e-15, + -8.40849786206025107e-17, + 1.02664508336580894e-18, + -1.25349395163766506e-20, + 1.53046759303503399e-22, + -1.86864129158824450e-24, + 2.28153557782380806e-26, + -2.78523243625709764e-28, + 1.90174174248436759e-02, + -2.34159808311762500e-04, + 2.88318937338843499e-06, + -3.55004602316390940e-08, + 4.37114082165530441e-10, + -5.38214771246677175e-12, + 6.62699171232564750e-14, + -8.15975731201423994e-16, + 1.00470382688554496e-17, + -1.23708308443192517e-19, + 1.52320959145044196e-21, + -1.87551429006261862e-23, + 2.30930145215940541e-25, + -2.84297395465421022e-27, + 5.46552971139245489e-02, + -6.84844446710651533e-04, + 8.58127100128649667e-06, + -1.07525456840905873e-07, + 1.34732067861641571e-09, + -1.68822627158110291e-11, + 2.11538944607938864e-13, + -2.65063551227079571e-15, + 3.32131212396214687e-17, + -4.16168655461770452e-19, + 5.21469642667814185e-21, + -6.53414279964462622e-23, + 8.18743417702424947e-25, + -1.02573943335986463e-26, + 1.13161692763482188e-01, + -1.45831959996813617e-03, + 1.87934273844436459e-05, + -2.42191706716464534e-07, + 3.12113493735493535e-09, + -4.02222001291480204e-11, + 5.18345222390989022e-13, + -6.67993716636174506e-15, + 8.60846374066170755e-17, + -1.10937641836418164e-18, + 1.42965811946641152e-20, + -1.84240627029137749e-22, + 2.37431485902917791e-24, + -3.05926980706953342e-26, + 2.03015020347933672e-01, + -2.72750602414446788e-03, + 3.66440330326035386e-05, + -4.92312444045186843e-07, + 6.61421580823495755e-09, + -8.88619641592034590e-11, + 1.19386014958013921e-12, + -1.60395065555302045e-14, + 2.15490709292833897e-16, + -2.89511684754950764e-18, + 3.88958830024860769e-20, + -5.22565981290402924e-22, + 7.02066784684740449e-24, + -9.43053869110098355e-26, + 3.42662114546253727e-01, + -4.89547236206679896e-03, + 6.99395953926645962e-05, + -9.99198165552398163e-07, + 1.42751322543100779e-08, + -2.03942929344012397e-10, + 2.91364855247650462e-12, + -4.16260956644693144e-14, + 5.94694867454927660e-16, + -8.49616037848900562e-18, + 1.21381139066658410e-19, + -1.73412217763662356e-21, + 2.47746799470891575e-23, + -3.53872943542790444e-25, + 5.84117835602405489e-01, + -9.20508968707555407e-03, + 1.45062641444115761e-04, + -2.28603638401152903e-06, + 3.60255562493499083e-08, + -5.67725304877708207e-10, + 8.94676044878714602e-12, + -1.40991641270927060e-13, + 2.22188165409734061e-15, + -3.50145443761132454e-17, + 5.51792805675449491e-19, + -8.69568057961622174e-21, + 1.37034858453853562e-22, + -2.15898967050998499e-24, +# # root=7 base[27]=84.0 */ + 1.98192699802038482e-03, + -2.30716200698178113e-05, + 2.68576821032105986e-07, + -3.12650384227142354e-09, + 3.63956436678853403e-11, + -4.23681832751966491e-13, + 4.93208190084472322e-15, + -5.74143850315973472e-17, + 6.68361084564491406e-19, + -7.78039404170300613e-21, + 9.05715977494056331e-23, + -1.05434431156077731e-24, + 1.22736248759205519e-26, + -1.42857881470165381e-28, + 1.81243689157445723e-02, + -2.12687075894135247e-04, + 2.49585475018120372e-06, + -2.92885259144881060e-08, + 3.43696984041783352e-10, + -4.03323872236870208e-12, + 4.73295238157471555e-14, + -5.55405712087045387e-16, + 6.51761268942156709e-18, + -7.64833242279331687e-20, + 8.97521707848446244e-22, + -1.05322985536588874e-23, + 1.23595118971202023e-25, + -1.45017199771085018e-27, + 5.20455333820300028e-02, + -6.21013015365134849e-04, + 7.40999544422105631e-06, + -8.84168787526823553e-08, + 1.05499989942143550e-09, + -1.25883745669479992e-11, + 1.50205866677913031e-13, + -1.79227288355382795e-15, + 2.13855967149836963e-17, + -2.55175286598898455e-19, + 3.04477951366676055e-21, + -3.63306427592569510e-23, + 4.33501173121802235e-25, + -5.17184511948478267e-27, + 1.07611825714678436e-01, + -1.31880547494211075e-03, + 1.61622374603021934e-05, + -1.98071606985603092e-07, + 2.42740905089545373e-09, + -2.97484065992215763e-11, + 3.64572956859401962e-13, + -4.46791798509809150e-15, + 5.47552711887060769e-17, + -6.71037322580692130e-19, + 8.22370299364497735e-21, + -1.00783202404649533e-22, + 1.23511916219141868e-24, + -1.51343664817546251e-26, + 1.92656258693260835e-01, + -2.45631135143953121e-03, + 3.13172564241316690e-05, + -3.99285924954111208e-07, + 5.09077959152292482e-09, + -6.49059614421516767e-11, + 8.27532159856927363e-13, + -1.05507947248504710e-14, + 1.34519568813217334e-16, + -1.71508543785496999e-18, + 2.18668412463779814e-20, + -2.78795873617602943e-22, + 3.55456618481555045e-24, + -4.53123117009336315e-26, + 3.24128421381815413e-01, + -4.38032140564919951e-03, + 5.91963380902858365e-05, + -7.99988429794245455e-07, + 1.08111668466479393e-08, + -1.46103773795975552e-10, + 1.97446890055515930e-12, + -2.66832768104527065e-14, + 3.60601912306563056e-16, + -4.87322977859560627e-18, + 6.58575776978727129e-20, + -8.90009443495728482e-22, + 1.20277240011847509e-23, + -1.62514816235311618e-25, + 5.49457524441697709e-01, + -8.14531262054656556e-03, + 1.20748401350676316e-04, + -1.79000820569679389e-06, + 2.65355842447673291e-08, + -3.93370951580096174e-10, + 5.83144143801969769e-12, + -8.64469252455088918e-14, + 1.28151349263308809e-15, + -1.89975158402642416e-17, + 2.81624508870553378e-19, + -4.17488078574663770e-21, + 6.18896014004102980e-23, + -9.17267212416686302e-25, +# # root=7 base[28]=88.0 */ + 1.89371330897837001e-03, + -2.10637828305495173e-05, + 2.34292564259324456e-07, + -2.60603739170708156e-09, + 2.89869672494532050e-11, + -3.22422185113188219e-13, + 3.58630361564028059e-15, + -3.98904734766811071e-17, + 4.43701940697488611e-19, + -4.93529895778263496e-21, + 5.48953555645516688e-23, + -6.10601320312861167e-25, + 6.79172146250836131e-27, + -7.55350044798235885e-29, + 1.73114527322514589e-02, + -1.94038355738880086e-04, + 2.17491183901072046e-06, + -2.43778684346023872e-08, + 2.73243475324083730e-10, + -3.06269586315456593e-12, + 3.43287463280082972e-14, + -3.84779578876837927e-16, + 4.31286720772275834e-18, + -4.83415039992644108e-20, + 5.41843951146334912e-22, + -6.07334987226652086e-24, + 6.80741712070363261e-26, + -7.62925024388788693e-28, + 4.96737029637716807e-02, + -5.65708043217576597e-04, + 6.44255553878200731e-06, + -7.33709240445197916e-08, + 8.35583405178440222e-10, + -9.51602608392862383e-12, + 1.08373086239870648e-13, + -1.23420487896592536e-15, + 1.40557193313530451e-17, + -1.60073298433286801e-19, + 1.82299178464431026e-21, + -2.07611080480030842e-23, + 2.36437488009109253e-25, + -2.69231467379242308e-27, + 1.02581022330785226e-01, + -1.19839708368268418e-03, + 1.40002072269088960e-05, + -1.63556641671777656e-07, + 1.91074136270885543e-09, + -2.23221296172925129e-11, + 2.60777036796225588e-13, + -3.04651321742725646e-15, + 3.55907210924975436e-17, + -4.15786618164165659e-19, + 4.85740402332915692e-21, + -5.67463520971451624e-23, + 6.62936084746681483e-25, + -7.74365688755745643e-27, + 1.83303576710730415e-01, + -2.22364644410347374e-03, + 2.69749428631011078e-05, + -3.27231671382426561e-07, + 3.96963090150642654e-09, + -4.81553922565728670e-11, + 5.84170634731895705e-13, + -7.08654450709886951e-15, + 8.59665140033432898e-17, + -1.04285544561321403e-18, + 1.26508268129327740e-20, + -1.53466541939839100e-22, + 1.86169483443125068e-24, + -2.25808028133839602e-26, + 3.07497356383458431e-01, + -3.94241603079547968e-03, + 5.05456188068525726e-05, + -6.48044133498549705e-07, + 8.30855787059730580e-09, + -1.06523815772215181e-10, + 1.36573921773224831e-12, + -1.75101088646710555e-14, + 2.24496674380793105e-16, + -2.87826633159062872e-18, + 3.69021817273540555e-20, + -4.73121962664255305e-22, + 6.06588485343297976e-24, + -7.77577779963085872e-26, + 5.18681666730352986e-01, + -7.25858041776160541e-03, + 1.01578661943535828e-04, + -1.42152100939608483e-06, + 1.98931738368213170e-08, + -2.78390795975724706e-10, + 3.89588086444734780e-12, + -5.45200772775879500e-14, + 7.62969641468742566e-16, + -1.06772165937467533e-17, + 1.49420039790411172e-19, + -2.09102700989935117e-21, + 2.92624322149581405e-23, + -4.09426708803240471e-25, +# # root=7 base[29]=92.0 */ + 1.81301932080959040e-03, + -1.93071091297664079e-05, + 2.05604241868892029e-07, + -2.18950978058688307e-09, + 2.33164113527511134e-11, + -2.48299890318360703e-13, + 2.64418201409177964e-15, + -2.81582827712162209e-17, + 2.99861690457802150e-19, + -3.19327119962132738e-21, + 3.40056141839339624e-23, + -3.62130781782042584e-25, + 3.85638385098316020e-27, + -4.10625414663133308e-29, + 1.65683443140305538e-02, + -1.77739258064935334e-04, + 1.90672304116237488e-06, + -2.04546412271579690e-08, + 2.19430058115147347e-10, + -2.35396699798811358e-12, + 2.52525140594430530e-14, + -2.70899917826962423e-16, + 2.90611720107938871e-18, + -3.11757834928389156e-20, + 3.34442628818998183e-22, + -3.58778062437755318e-24, + 3.84884237976811279e-26, + -4.12842500629723764e-28, + 4.75086783727970419e-02, + -5.17475725640469575e-04, + 5.63646760547351118e-06, + -6.13937340311595776e-08, + 6.68715025458239664e-10, + -7.28380171576880927e-12, + 7.93368855414625813e-14, + -8.64156062045504537e-16, + 9.41259156410475750e-18, + -1.02524166460007597e-19, + 1.11671739251222402e-21, + -1.21635491195844505e-23, + 1.32488242820217633e-25, + -1.44292198443361311e-27, + 9.79996986160151656e-02, + -1.09375827851515605e-03, + 1.22072535805220998e-05, + -1.36243119623715589e-07, + 1.52058671693524174e-09, + -1.69710145371437842e-11, + 1.89410660511649912e-13, + -2.11398076626107970e-15, + 2.35937864745818197e-17, + -2.63326312657187120e-19, + 2.93894102211840380e-21, + -3.28010301895011088e-23, + 3.66086817144735682e-25, + -4.08532496895818181e-27, + 1.74817154099182859e-01, + -2.02254284259202523e-03, + 2.33997605738357581e-05, + -2.70722964864921049e-07, + 3.13212280416248761e-09, + -3.62370191433502649e-11, + 4.19243317870690486e-13, + -4.85042544156056590e-15, + 5.61168800104590457e-17, + -6.49242888082254072e-19, + 7.51139991469739018e-21, + -8.69029599131071212e-23, + 1.00542167784600982e-24, + -1.16306450153025355e-26, + 2.92490161451561537e-01, + -3.56704838892083712e-03, + 4.35017511213275392e-05, + -5.30523319083552638e-07, + 6.46996925035140733e-09, + -7.89041698917292926e-11, + 9.62271656231554080e-13, + -1.17353334007214716e-14, + 1.43117641607997308e-16, + -1.74538367509589580e-18, + 2.12857348615833274e-20, + -2.59589060590751251e-22, + 3.16580467247881377e-24, + -3.86026631134143548e-26, + 4.91171687794970113e-01, + -6.50916572538684859e-03, + 8.62615649341683945e-05, + -1.14316609820984687e-06, + 1.51496060741959405e-08, + -2.00767469016723861e-10, + 2.66063529427582572e-12, + -3.52595976022216241e-14, + 4.67271566961956544e-16, + -6.19243361067952009e-18, + 8.20641287291096655e-20, + -1.08754031894068733e-21, + 1.44124348496950776e-23, + -1.90964699995600827e-25, +# # root=7 base[30]=96.0 */ + 1.73892263201114172e-03, + -1.77613858708223535e-05, + 1.81415102802702882e-07, + -1.85297700102224347e-09, + 1.89263391706229643e-11, + -1.93313955976703012e-13, + 1.97451209335654185e-15, + -2.01677007079668780e-17, + 2.05993244211890551e-19, + -2.10401856291802817e-21, + 2.14904820303142641e-23, + -2.19504155539759081e-25, + 2.24201922069255637e-27, + -2.28976343126154565e-29, + 1.58864200962347338e-02, + -1.63410987708754421e-04, + 1.68087906162569904e-06, + -1.72898680769697604e-08, + 1.77847142571870699e-10, + -1.82937232257487208e-12, + 1.88173003299761707e-14, + -1.93558625184693080e-16, + 1.99098386731417713e-18, + -2.04796699507586718e-20, + 2.10658101342443434e-22, + -2.16687259939835944e-24, + 2.22888974098662227e-26, + -2.29243932036275081e-28, + 4.55245360176430580e-02, + -4.75159431279253367e-04, + 4.95944615550005197e-06, + -5.17639018614975215e-08, + 5.40282412977740400e-10, + -5.63916310934380004e-12, + 5.88584040678262840e-14, + -6.14330825733932535e-16, + 6.41203867865715095e-18, + -6.69252433613027314e-20, + 6.98527944610904075e-22, + -7.29084071859477241e-24, + 7.60976825084794823e-26, + -7.94178173284109852e-28, + 9.38101788840922240e-02, + -1.00225060532892099e-03, + 1.07078601472801019e-05, + -1.14400797888349121e-07, + 1.22223697148447203e-09, + -1.30581538069471202e-11, + 1.39510900769748048e-13, + -1.49050866771317514e-15, + 1.59243190049693700e-17, + -1.70132479780263283e-19, + 1.81766395581126300e-21, + -1.94195856106419563e-23, + 2.07475259200674776e-25, + -2.21637432048275594e-27, + 1.67081938280067954e-01, + -1.84753926667754055e-03, + 2.04295052897563020e-05, + -2.25903012678444617e-07, + 2.49796411677114357e-09, + -2.76216977130718755e-11, + 3.05432003378221460e-13, + -3.37737056051718686e-15, + 3.73458962285727368e-17, + -4.12959117196101831e-19, + 4.56637140079855421e-21, + -5.04934917324003363e-23, + 5.58341064581653804e-25, + -6.17320421377878742e-27, + 2.78880012121049736e-01, + -3.24285196886516056e-03, + 3.77082918635562509e-05, + -4.38476775665077029e-07, + 5.09866327261184485e-09, + -5.92878998620848476e-11, + 6.89407180297273299e-13, + -8.01651367903123138e-15, + 9.32170325501740986e-17, + -1.08393941623138591e-18, + 1.26041842989096898e-20, + -1.46563045370811975e-22, + 1.70425355312211352e-24, + -1.98145961532724116e-26, + 4.66433770918913415e-01, + -5.87010866300481920e-03, + 7.38758165979250421e-05, + -9.29733432773725750e-07, + 1.17007742969773770e-08, + -1.47255239322050405e-10, + 1.85321970644249770e-12, + -2.33229275654882396e-14, + 2.93521026316524490e-16, + -3.69398707121960122e-18, + 4.64891413524204800e-20, + -5.85069796403519684e-22, + 7.36315294540627251e-24, + -9.26512313219113682e-26, + # root=8 base[0]=0.0 */ + 1.69469060087002708e-02, + -6.18885259074673506e-04, + 1.68602937790110815e-05, + -4.05157000964468486e-07, + 9.02760894094026473e-09, + -1.90453384231226411e-10, + 3.83717762170135867e-12, + -7.40783524224750053e-14, + 1.36796634977941170e-15, + -2.40420428586073272e-17, + 3.96970745684224095e-19, + -6.01706494976866720e-21, + 7.87086436826702170e-23, + -7.40346455314138668e-25, + 1.60192095195924533e-01, + -5.87710095415233669e-03, + 1.54230039698632909e-04, + -3.33900671280122066e-06, + 6.03267741033873284e-08, + -8.54114631625125155e-10, + 6.90292519597009037e-12, + 7.82889358888536786e-14, + -4.92589970068712535e-15, + 1.24318644910383911e-16, + -1.96230296343409034e-18, + 1.05009166709308028e-20, + 5.24892955802051147e-22, + -2.25588937744249405e-23, + 4.93504435521138429e-01, + -1.82654435040827991e-02, + 4.43992683530885796e-04, + -7.63690563454457992e-06, + 7.38832837773356169e-08, + 4.72113251994191049e-10, + -3.38808159383817163e-11, + 5.52320020193080116e-13, + 2.08097288295083780e-15, + -3.05810372205007304e-16, + 6.32401000238686906e-18, + 1.18434679520214939e-21, + -3.37588565994597583e-21, + 8.40523535986032336e-23, + 1.14721822957409780e+00, + -4.29762355138877811e-02, + 9.27878321110813323e-04, + -1.05509301972275912e-05, + -3.31151073157197852e-08, + 3.00272607040442028e-09, + -1.50931585790008188e-11, + -1.14638094736564841e-12, + 1.95977396189977267e-14, + 3.69454126035950003e-16, + -1.49483186455217939e-17, + -3.21279821324000123e-20, + 9.11378197562479405e-21, + -9.32017491930300858e-23, + 2.46714737607997447e+00, + -9.37218382840171865e-02, + 1.72075512691133325e-03, + -9.14440645470657453e-06, + -2.12618527501257486e-07, + 1.26205561399157552e-09, + 8.82296954997439850e-11, + -2.33803414149580020e-13, + -4.52666298419755981e-14, + -3.20520593158308009e-17, + 2.56028584914634347e-17, + 1.04245045374440180e-19, + -1.53370154152332589e-20, + -1.17924184179984957e-22, + 5.54460848164031628e+00, + -2.13591187612560879e-01, + 3.21063253099260074e-03, + -1.99866523786910072e-06, + -2.66810459894957399e-07, + -4.93262853177705323e-09, + 1.34290797815381505e-11, + 2.47905142117266725e-12, + 3.87049603744478219e-14, + -6.05338031550940132e-16, + -3.30425814724233386e-17, + -2.72795933794040826e-19, + 1.46080894336858130e-20, + 4.46329989987246888e-22, + 1.53458294992861415e+01, + -5.98155424345071407e-01, + 7.26799212507586723e-03, + 8.96144898338330676e-06, + -4.46427453855464876e-08, + -5.13618107848645034e-09, + -1.43546710226532289e-10, + -2.19570586362822405e-12, + -1.25309905434898718e-15, + 1.03419947764958816e-15, + 3.30372735427239506e-17, + 4.95093603988749397e-19, + -2.38027332743475711e-21, + -3.61205922733084948e-22, + 8.60248844763544156e+01, + -3.37809761694062161e+00, + 3.47822667651058945e-02, + 1.80854123590890343e-05, + 2.93211999358311257e-07, + 3.92991265101516376e-09, + 2.97697358900457574e-11, + -5.17287769942311216e-13, + -3.31218900321837286e-14, + -1.07081751093141475e-15, + -2.73849533957354289e-17, + -6.01991235534424437e-19, + -1.17165373045105914e-20, + -2.13441762915228322e-22, +# root=8 base[1]=2.5 */ + 1.47134597474066296e-02, + -5.01255088179424196e-04, + 1.27538361793607495e-05, + -2.86809611380115436e-07, + 5.99398614533166922e-09, + -1.19006723738549851e-10, + 2.26487009374850970e-12, + -4.15439151156120725e-14, + 7.33589880535415453e-16, + -1.24816676494003485e-17, + 2.02055385483200535e-19, + -3.12345536588796439e-21, + 4.37847810812921672e-23, + -5.29609173530811204e-25, + 1.38919138167741596e-01, + -4.78836128182326837e-03, + 1.19420142034222916e-04, + -2.50096254077421344e-06, + 4.50023536321834421e-08, + -6.76329229692652526e-10, + 7.45981393964573453e-12, + -2.16754845251811510e-14, + -1.70922670952115726e-15, + 5.92426522228844352e-17, + -1.24774668235287013e-18, + 1.72507827962653967e-20, + -8.53479200073912549e-23, + -3.98378252663305051e-24, + 4.26995127347349956e-01, + -1.50595204254477342e-02, + 3.59625535954319852e-04, + -6.41813550875911692e-06, + 7.64487723733202476e-08, + -1.56390322095604638e-10, + -1.88013788112548813e-11, + 4.89436212269756738e-13, + -4.68931241187479502e-15, + -8.51642549906337169e-17, + 4.19191836696881907e-18, + -7.17808450127281553e-20, + -9.22723917166342535e-23, + 3.71715128402102508e-23, + 9.89350550742663204e-01, + -3.60642732101914276e-02, + 7.99979665924974051e-04, + -1.06295386078696280e-05, + 2.11205907291314594e-08, + 2.33439618351141155e-09, + -3.72173587154445402e-11, + -4.17836013601755336e-13, + 2.27955270055129754e-14, + -1.52074687767824064e-16, + -9.22488218187154471e-18, + 2.27158490419905295e-19, + 1.24758082599156476e-21, + -1.47793937540880429e-22, + 2.11901892780238121e+00, + -8.04499180563345989e-02, + 1.59180344957356493e-03, + -1.22344372901288529e-05, + -1.67557283621803542e-07, + 3.14330378085952790e-09, + 6.26262516813735977e-11, + -1.50740821049011541e-12, + -2.88852640398524936e-14, + 8.66138107440845938e-16, + 1.43868926094900355e-17, + -5.50361649403754658e-19, + -7.58779725511020515e-21, + 3.66601790251026075e-22, + 4.74134990989767946e+00, + -1.88081893347993967e-01, + 3.15790573115895317e-03, + -7.01357331619457220e-06, + -3.56013988416370570e-07, + -3.66697459179886242e-09, + 9.50260972144215220e-11, + 3.10589117352767715e-12, + -7.33135409084723460e-15, + -1.88681961928885356e-15, + -2.26843399460409011e-17, + 8.47864060893177629e-19, + 2.67311459325461974e-20, + -1.66554838902008230e-22, + 1.30701476535782675e+01, + -5.39602606024014109e-01, + 7.36719143465135607e-03, + 7.21774446989586503e-06, + -1.86638500585457838e-07, + -9.27910076842669199e-09, + -1.97950074755616128e-10, + -1.34793205651189543e-12, + 6.40642093269747925e-14, + 2.66620436006036622e-15, + 4.26454092491110879e-17, + -3.43036948836485923e-19, + -3.78138724543471109e-20, + -9.27877960544595745e-22, + 7.30705055124571601e+01, + -3.09888543873179989e+00, + 3.50301397452366867e-02, + 2.34367888429836380e-05, + 3.76979381663580284e-07, + 4.30613807715830239e-09, + -7.21228790404691022e-12, + -2.46900988513669625e-12, + -9.96275570247585118e-14, + -2.90991622270488774e-15, + -7.11623511415200168e-17, + -1.50368601486464320e-18, + -2.47207152980206125e-20, + 2.74518824233913655e-23, +# root=8 base[2]=5.0 */ + 1.28927884317232011e-02, + -4.11524384734966134e-04, + 9.81758954063653128e-06, + -2.07346110074245652e-07, + 4.07532986929267193e-09, + -7.63213828254329197e-11, + 1.37246851001693856e-12, + -2.39339795653993570e-14, + 4.01609546493201887e-16, + -6.61305049763834013e-18, + 1.02926179055945707e-19, + -1.52289802361967720e-21, + 2.59636213568511347e-23, + -1.87410760314144506e-25, + 1.21502345615955590e-01, + -3.94177192617381662e-03, + 9.33131677414359410e-05, + -1.87970537127847000e-06, + 3.31922442685800743e-08, + -5.09095847222156949e-10, + 6.34726647667695588e-12, + -5.04870468625946641e-14, + -3.06278060020733358e-16, + 2.28956907938241184e-17, + -6.13298760496046522e-19, + 1.14809563678751042e-20, + -1.06209840248654181e-22, + 1.72112972079679869e-24, + 3.72052144816391928e-01, + -1.24701677756049647e-02, + 2.89776295661660463e-04, + -5.24016635766983288e-06, + 6.98227471321376672e-08, + -4.61956239246015076e-10, + -7.46331553573214782e-12, + 3.16659771210781042e-13, + -5.46987729809807070e-15, + 2.32705624934625901e-17, + 1.41988767974833265e-18, + -4.70113194796953619e-20, + 8.41856360543516148e-22, + 4.06141942656684826e-24, + 8.57097661623966833e-01, + -3.01656899751484749e-02, + 6.75828791426164575e-04, + -9.96921791618913268e-06, + 5.83255369152602203e-08, + 1.37609954751627140e-09, + -3.99209791948489518e-11, + 1.72440365415633872e-13, + 1.30771400400435815e-14, + -3.25950425009449098e-16, + -2.53721459507562094e-21, + 1.59889577159235877e-19, + -2.80121169583070997e-21, + -8.94244325279051501e-24, + 1.82170082472148609e+00, + -6.83430881429287623e-02, + 1.43120094761450627e-03, + -1.43465921557044938e-05, + -9.34868054197187511e-08, + 4.06692868317182163e-09, + 1.26643028119720262e-11, + -1.87262826019504151e-12, + 6.36987425673013006e-15, + 9.21834385181321880e-16, + -1.07652932061278380e-17, + -4.41913671522277658e-19, + 1.07709994975899206e-20, + 2.19808949712911904e-22, + 4.03887292601833181e+00, + -1.63256761639268722e-01, + 3.03762449131782198e-03, + -1.31443562461121164e-05, + -3.99922252356046978e-07, + -4.36112499979511436e-10, + 1.67770002524272546e-10, + 1.70239713402640290e-12, + -7.96490933238879476e-14, + -1.74324745003363894e-15, + 3.46931558912705152e-17, + 1.47321198274367377e-18, + -8.52319284836443326e-21, + -1.03041656182543325e-21, + 1.10300684114368011e+01, + -4.80385212257118610e-01, + 7.42890438817176302e-03, + 2.48132196704288912e-06, + -4.21173535004375525e-07, + -1.41521128795622559e-08, + -1.90572010550946805e-10, + 2.49886642333611104e-12, + 1.81062908162380739e-13, + 3.37918132757936372e-15, + -2.70556803954215121e-17, + -3.03411180133856114e-18, + -6.08623396681470642e-20, + 6.55652749234836496e-22, + 6.12373803226194511e+01, + -2.81741048028227725e+00, + 3.53502998451751468e-02, + 3.01165896476121304e-05, + 4.53416002089007912e-07, + 2.82321377999742219e-09, + -1.41482601265356498e-10, + -8.02952614264326063e-12, + -2.74027767598987486e-13, + -7.30749243290950785e-15, + -1.47475569694056633e-16, + -1.10053376620340746e-18, + 9.06538116946398622e-20, + 5.66668864347746237e-21, +# root=8 base[3]=7.5 */ + 1.13894393831374310e-02, + -3.41933207018475273e-04, + 7.67552777679401419e-06, + -1.52766840241277477e-07, + 2.83067833231774704e-09, + -5.01661627690205686e-11, + 8.51456504212972413e-13, + -1.42074254920181947e-14, + 2.24601852120651289e-16, + -3.50147060020890369e-18, + 6.01140054354160506e-20, + -5.04905231520141035e-22, + 1.51046970740235111e-23, + -3.39813010625502998e-25, + 1.07097201347192611e-01, + -3.27718664110333109e-03, + 7.36326233769838242e-05, + -1.42230024932675786e-06, + 2.44161328229809578e-08, + -3.74217271219026217e-10, + 4.89191131736851513e-12, + -5.09230711333784514e-14, + 1.86848393280124998e-16, + 7.28301143775564388e-18, + -1.90216587835418580e-19, + 8.22915128887760638e-21, + -5.23125462318579390e-23, + -8.59879390251685847e-25, + 3.26435464907930017e-01, + -1.03852454453307302e-02, + 2.33268275314709930e-04, + -4.20397575704279120e-06, + 5.94128180708876238e-08, + -5.53378072014690500e-10, + -8.63138991666790682e-13, + 1.62665045260432121e-13, + -3.99874820967162015e-15, + 5.06607581431434179e-17, + 2.31837448158278516e-19, + -8.96551983910638684e-21, + 5.93827464488970925e-22, + -1.34695823500793119e-23, + 7.46515243990272692e-01, + -2.52199529672631761e-02, + 5.62543262505738918e-04, + -8.86553442762875396e-06, + 7.68569315250805671e-08, + 5.12677047008743702e-10, + -3.09301212504185088e-11, + 4.14563776377573446e-13, + 2.68358214588422642e-15, + -2.23570059046986253e-16, + 4.25566983299400833e-18, + 4.20690608065411189e-20, + -1.87711944503845644e-21, + 1.91793602699743025e-23, + 1.57010962820995048e+00, + -5.76013419400556517e-02, + 1.25275784835485919e-03, + -1.51922139351548252e-05, + -1.31200740550663231e-08, + 3.79163906548159512e-09, + -3.26895938453296176e-11, + -1.24872933304335936e-12, + 2.86908969835424160e-14, + 2.76945862423769116e-16, + -1.70516016273520077e-17, + 1.46732321225779311e-19, + 9.72944072679373078e-21, + -2.32410247032023940e-22, + 3.43329631703425298e+00, + -1.39694658015188267e-01, + 2.84195092888863722e-03, + -1.93837182925111373e-05, + -3.66208917669265862e-07, + 3.82884435477484542e-09, + 1.72895224530820231e-10, + -1.47072848709277942e-12, + -1.04266769959862739e-13, + 6.37756589522387277e-16, + 7.29266807755888406e-17, + -5.95930008905993495e-20, + -4.76990341145127921e-20, + -1.73306653132256960e-22, + 9.22738669416144930e+00, + -4.20972388067233749e-01, + 7.40819846461086753e-03, + -6.73342078525155703e-06, + -7.40475427368557540e-07, + -1.71338545129550924e-08, + -2.44161989858030034e-11, + 9.72708066415538648e-12, + 2.45013935221110278e-13, + -9.67266919021761793e-16, + -1.95000671740892478e-16, + -3.53049587683923007e-18, + 7.19479367004430707e-20, + 4.12761071786187879e-21, + 5.05358097564580717e+01, + -2.53303652739690754e+00, + 3.57562331652377177e-02, + 3.75406806743061884e-05, + 4.51411238877639723e-07, + -4.54514735923077165e-09, + -5.36689334717376135e-10, + -2.21116417761255831e-11, + -6.33627942888155069e-13, + -1.15398702217260863e-14, + 3.96986125458002596e-17, + 1.33072493198696328e-17, + 5.38553129031924451e-19, + 8.21235047806853914e-21, +# root=8 base[4]=10.0 */ + 1.01338995002293823e-02, + -2.87161504516387567e-04, + 6.08422036922669884e-06, + -1.14514252613417333e-07, + 2.00324283440627924e-09, + -3.37935060015951677e-11, + 5.38426947730391807e-13, + -8.60671246761821528e-15, + 1.37849236528948070e-16, + -1.40800315660807331e-18, + 4.55272912775425757e-20, + -3.86382417829530531e-22, + -1.31011831067106723e-23, + -6.50105134752208593e-25, + 9.50671571432648160e-02, + -2.75028459179439601e-03, + 5.86813598040463485e-05, + -1.08560774749644397e-06, + 1.79947349202644558e-08, + -2.73039598733228878e-10, + 3.58255121250536881e-12, + -4.15663778180451825e-14, + 3.90109052736876160e-16, + 5.80459628646035737e-18, + 7.50590556997222766e-20, + 2.38747576446542670e-21, + -2.28116897817710103e-22, + -4.85716782292212162e-24, + 2.88328977921601004e-01, + -8.70557153153216079e-03, + 1.88158974520214400e-04, + -3.34172615373400235e-06, + 4.84396440344329494e-08, + -5.32159795084446215e-10, + 2.18446790070454652e-12, + 6.52854811840777559e-14, + -2.04884146926737355e-15, + 5.73451912996088868e-17, + 1.46806857985228858e-19, + -3.24580240010294786e-21, + -4.33040473315477687e-22, + -2.16810085038178010e-23, + 6.53992578475173003e-01, + -2.11237101963681340e-02, + 4.63753853154647803e-04, + -7.59009002745609326e-06, + 8.06505519727541809e-08, + -8.68489768616203479e-11, + -1.90822190923584523e-11, + 4.06643871958411992e-13, + -2.08060327945529049e-15, + -4.09949945368597337e-17, + 4.26618687727045005e-18, + -4.29578915529086047e-20, + -2.01306439492237357e-21, + -1.76048771920193462e-23, + 1.35859592662085116e+00, + -4.83066388989283751e-02, + 1.07152833668759553e-03, + -1.48480463917638037e-05, + 5.25945878003146063e-08, + 2.69620385521073146e-09, + -5.41351818639089344e-11, + -2.83897798653388761e-13, + 2.88242962838951365e-14, + -1.89184437150898840e-16, + -5.42940721116194374e-18, + 2.59886622719834330e-19, + -5.06059856981680698e-21, + -2.39390704611864572e-22, + 2.91838451541181909e+00, + -1.17981888802921139e-01, + 2.57739399533670182e-03, + -2.44253116717799109e-05, + -2.53260573296097036e-07, + 7.14760961342857432e-09, + 9.22420580273980783e-11, + -3.92190780087461883e-12, + -3.54358942010494746e-14, + 2.85537103035927359e-15, + 2.39103682729507625e-17, + -1.93468559385889001e-18, + -1.93327730453648831e-20, + 1.07093057921375470e-21, + 7.66119827184982771e+00, + -3.62257142891752482e-01, + 7.24518962744291183e-03, + -2.12467316472955911e-05, + -1.06272486068660997e-06, + -1.36575152083399178e-08, + 3.40414443033165525e-10, + 1.52931543696275579e-11, + 4.71734185902653041e-14, + -1.01130822023901297e-14, + -2.02874485804035125e-16, + 4.44065858894495918e-18, + 2.20675887363339134e-19, + -4.40043118318836395e-22, + 4.09787734830083821e+01, + -2.24507460948701887e+00, + 3.62441056612001142e-02, + 4.30799460714720029e-05, + 1.68241087468856297e-07, + -2.74818724636231956e-08, + -1.49088831182842725e-09, + -4.70863013612895046e-11, + -8.03427705267475463e-13, + 1.01138792462062586e-14, + 1.24161274675904541e-15, + 3.90217397351837867e-17, + 2.04004096076897660e-19, + -2.96318456433068354e-20, +# root=8 base[5]=12.5 */ + 9.07460473935171874e-03, + -2.43486720306224802e-04, + 4.88212788641949726e-06, + -8.72406721789476031e-08, + 1.43949487025508900e-09, + -2.33000171195890779e-11, + 3.53814292049025288e-13, + -4.70396209983665258e-15, + 1.13354865240894474e-16, + -2.17795573665254726e-19, + 4.79501372505709046e-21, + -1.61118482718992460e-21, + -3.01844944551926034e-23, + 2.39051003618122081e-25, + 8.49288131220339720e-02, + -2.32843483841371464e-03, + 4.72154736530524158e-05, + -8.37074320860027933e-07, + 1.33076725157646552e-08, + -1.99399213375695362e-10, + 2.62910184350365025e-12, + -2.51812032376246965e-14, + 6.43148446699544902e-16, + 6.90803022525326624e-18, + -1.32537479108995706e-19, + -1.27408243220363627e-20, + -3.30887453999236741e-22, + 3.30538760311647414e-24, + 2.56280825106192822e-01, + -7.34831475351886958e-03, + 1.52367899481753417e-04, + -2.64847592745802434e-06, + 3.84386934493001655e-08, + -4.63273073334744953e-10, + 3.40895296432343971e-12, + 3.30942060013846285e-14, + 5.36323362279802964e-18, + 5.08726498783065437e-17, + -7.64685549898482238e-19, + -4.23202462107319001e-20, + -9.15840524363512586e-22, + 1.01933298538124525e-23, + 5.76371567366278148e-01, + -1.77563417752324981e-02, + 3.80287537429903572e-04, + -6.33473119961015328e-06, + 7.52153363481259787e-08, + -4.16024215701622388e-10, + -8.64563734414380117e-12, + 3.43873747098096649e-13, + -1.21860078118594605e-15, + 6.10059738547900413e-17, + 5.15809448580173258e-20, + -1.47773291624546862e-19, + -1.81104470252924425e-21, + 4.37566303994327347e-23, + 1.18141038700401202e+00, + -4.04291792245670689e-02, + 8.99948618883235590e-04, + -1.36466517317030031e-05, + 9.33903413929380654e-08, + 1.39845959218035481e-09, + -5.03916445071311912e-11, + 5.04229404507529927e-13, + 1.99587469231905189e-14, + -2.81066109053333693e-16, + -2.16577472752016172e-18, + -1.35923498784776142e-19, + -8.03156339797795216e-21, + 1.43478601210856532e-22, + 2.48575676450038863e+00, + -9.85925832306492472e-02, + 2.26497944796142650e-03, + -2.72519743452207001e-05, + -9.73141500823457591e-08, + 8.01279880282459091e-09, + -1.76861610280540627e-11, + -3.40106760905647740e-12, + 6.30742296975206120e-14, + 2.04004212071882813e-15, + -6.15688542274967091e-17, + -1.52470414881335567e-18, + 3.29714557717281459e-20, + 6.99681996628043761e-22, + 6.32604703663746726e+00, + -3.05621686702128803e-01, + 6.88102607464083794e-03, + -3.98477327334985235e-05, + -1.22020066675793743e-06, + -5.58171083794520144e-10, + 7.26927550725605352e-10, + 9.96457712758730008e-12, + -3.90620846470450913e-13, + -1.16912235483672497e-14, + 1.67752032286757776e-16, + 1.00684946140089733e-17, + -6.53736213336059499e-20, + -9.04386507775286568e-21, + 3.25816454970490952e+01, + -1.95306497910665899e+00, + 3.67514474179991349e-02, + 3.89383864789857490e-05, + -8.58073637007898335e-07, + -8.12280015080618445e-08, + -3.02709869165182072e-09, + -5.41481364523072300e-11, + 8.40030966369734332e-13, + 8.92364146502795474e-14, + 2.35575856407721152e-15, + -1.20593639741477892e-17, + -2.70329951751730770e-18, + -6.83880608996333436e-20, +# root=8 base[6]=15.0 */ + 8.17265122605665903e-03, + -2.08258318128461329e-04, + 3.95944298795413002e-06, + -6.75129003257491366e-08, + 1.04982151568753622e-09, + -1.59888917209849109e-11, + 2.71057962861035603e-13, + -1.32552976903294755e-15, + 8.87165897174737563e-17, + -1.76231284031974745e-18, + -8.56760931944713326e-20, + -2.03627693696417063e-21, + 2.87513768471234245e-23, + 2.12872792295254055e-24, + 7.63116410673876505e-02, + -1.98755275449962214e-03, + 3.83270711522704574e-05, + -6.52822633004567904e-07, + 9.90632173184336106e-09, + -1.42274567495088867e-10, + 2.23469900547603985e-12, + -2.97827111857438159e-15, + 6.26907009618253061e-16, + -1.30736839065815263e-17, + -9.08179601171645579e-19, + -1.77471723942557399e-20, + 2.72774214909450646e-22, + 2.07747463967720824e-23, + 2.29138038739686273e-01, + -6.24671673964174220e-03, + 1.23985845406381822e-04, + -2.10280104370028500e-06, + 3.00726234279237279e-08, + -3.68940656210419017e-10, + 4.54688351707503511e-12, + 5.23844368376169864e-14, + 7.45693572803995282e-16, + -2.60388598808142988e-17, + -3.16395920761437003e-18, + -5.14936533806218474e-20, + 1.00710977077307855e-21, + 6.52079582557190845e-23, + 5.10977337534740728e-01, + -1.49983395902293891e-02, + 3.11189146167972330e-04, + -5.20590572286304081e-06, + 6.55846143680877533e-08, + -5.10677756641979951e-10, + 6.90611740818479906e-13, + 3.26622590533600285e-13, + -6.99877518913091567e-16, + -8.03069336515985776e-17, + -7.05016811475894072e-18, + -1.34017935873800102e-19, + 3.34962379830882520e-21, + 1.56078532374440268e-22, + 1.03309386391709968e+00, + -3.38574999800932558e-02, + 7.45880362818620722e-04, + -1.19883933556086897e-05, + 1.10739024354112650e-07, + 4.20310337200403168e-10, + -2.90669719720356339e-11, + 9.47286087959216768e-13, + 6.08218457958141120e-15, + -5.61526485057626996e-16, + -1.24799003448938944e-17, + -2.11302401818520386e-19, + 7.05153043334197895e-21, + 3.98727183875371549e-22, + 2.12553327966213601e+00, + -8.17954238829470964e-02, + 1.93375026559284300e-03, + -2.75776102338292616e-05, + 5.23795379802395632e-08, + 6.72184482155373511e-09, + -7.76111931256484001e-11, + -7.82053846557002353e-13, + 8.09921305571506206e-14, + -1.20444872925263309e-15, + -8.52987024988704622e-17, + 5.52696612244590982e-19, + 4.71513354838760707e-20, + -3.85536111909249554e-24, + 5.21016679481412481e+00, + -2.52812401467288117e-01, + 6.28860453933355497e-03, + -5.84472549213731660e-05, + -1.04301985041914029e-06, + 1.85005743619725432e-08, + 7.81359827803127248e-10, + -7.22884309674686172e-12, + -6.04008073070537171e-13, + 1.41374245870096256e-15, + 3.96205030628240237e-16, + -1.96783848322836352e-18, + -3.31913090220497888e-19, + 2.68619046976547576e-21, + 2.53598407891238651e+01, + -1.65756905234200058e+00, + 3.70687539845171790e-02, + 7.84842513237080160e-06, + -3.30150659572533502e-06, + -1.65490689148655228e-07, + -3.57352224187054398e-09, + 3.85477835598685559e-11, + 5.19546226057548459e-12, + 1.24759618061108065e-13, + -1.90016401697852484e-15, + -1.86247466386331146e-16, + -3.04582190634385880e-18, + 1.06026048423271320e-19, +# root=8 base[7]=17.5 */ + 7.39821199092032672e-03, + -1.79559891315337272e-04, + 3.24064057973829834e-06, + -5.29283794823177267e-08, + 7.93402375944014397e-10, + -9.69397329044687377e-12, + 2.58618942243628383e-13, + -2.95243265483554770e-16, + -5.08522076398722922e-17, + -6.09128242756529963e-18, + -9.48595063030161743e-20, + 2.98407883149616531e-21, + 1.98547764832867885e-22, + 3.99155455604076140e-24, + 6.89285914190828630e-02, + -1.70977447988251941e-03, + 3.13597476913258545e-05, + -5.14167224941294684e-07, + 7.59925812374589400e-09, + -8.80921313606978305e-11, + 2.30447842075084124e-12, + 1.42637636827378003e-15, + -6.17341536839921435e-16, + -5.64959993199462716e-17, + -9.19062767368285906e-19, + 3.02824496853884999e-20, + 1.89318078905452924e-21, + 3.75966916099559582e-23, + 2.05985992658625688e-01, + -5.34810433549127041e-03, + 1.01416346446736892e-04, + -1.67421361214387620e-06, + 2.39106634069579588e-08, + -2.41343274198492050e-10, + 6.01357155027321101e-12, + 3.38092258917266293e-14, + -2.78230105934485661e-15, + -1.69173332753712470e-16, + -2.87150224385418089e-18, + 1.04828940643815318e-19, + 5.98354183907318551e-21, + 1.13360135048616805e-22, + 4.55591543532020582e-01, + -1.27416261899075765e-02, + 2.54688540102154066e-04, + -4.23435098484150323e-06, + 5.62453665795045021e-08, + -3.91720295005837040e-10, + 8.65259740395022264e-12, + 1.96170037531704163e-13, + -9.41417356442452581e-15, + -3.99107264090048690e-16, + -5.94345097399203946e-18, + 2.75275346196993123e-19, + 1.46488202111904606e-20, + 2.48115038548950978e-22, + 9.08729943195353496e-01, + -2.84353408906675674e-02, + 6.12830212853379859e-04, + -1.01780843994876647e-05, + 1.14338452372001557e-07, + 4.05672517568252096e-11, + -3.60624688475582239e-12, + 7.13141754458151333e-13, + -2.38646115654539902e-14, + -1.06611850932568143e-15, + -6.14896386694700117e-18, + 7.01336472003896137e-19, + 3.21832717473236178e-20, + 4.99993944381935164e-22, + 1.82722842359443582e+00, + -6.76253581502594403e-02, + 1.61194674777004744e-03, + -2.57681535851394569e-05, + 1.67679817278353292e-07, + 4.82758191505071025e-09, + -7.39652598819072317e-11, + 5.45107491130691346e-13, + -1.17989989306290484e-14, + -3.45296481224851817e-15, + -9.59461161052957974e-18, + 2.98913218800820065e-18, + 6.00620628105417036e-20, + 5.18845379442534161e-22, + 4.29473716397221583e+00, + -2.05558490276645273e-01, + 5.50233915011527890e-03, + -7.12630890112422638e-05, + -5.12594022931571591e-07, + 3.27878045545374548e-08, + 3.35631354708747427e-10, + -2.30906675672921012e-11, + -3.23028209519784036e-13, + 1.20871868771807236e-14, + 9.78640833532780726e-17, + -6.88581814399971624e-18, + 2.32724433355725959e-19, + 1.37592595456588008e-20, + 1.93216276069171791e+01, + -1.36181877229191994e+00, + 3.67235876221690752e-02, + -7.53644668767002290e-05, + -7.27012133358969106e-06, + -2.16319347357458473e-07, + 3.03336915420966966e-10, + 2.44552534348645539e-10, + 6.17005432399210427e-12, + -1.26813864445117811e-13, + -9.95880948680104508e-15, + -7.90228523648503942e-17, + 9.20140493409453717e-18, + 2.76385137617430231e-19, +# root=8 base[8]=20.0 */ + 6.72808807365402831e-03, + -1.55972104266852439e-04, + 2.67633934884483459e-06, + -4.14566357105275772e-08, + 6.59046926033105226e-10, + -3.98915286866205760e-12, + 1.91809978171194816e-13, + -5.71294922330807560e-15, + -2.76846599198114925e-16, + -3.90624635611727721e-18, + 2.91339321954336424e-19, + 1.42989877383731190e-20, + 1.30719116157075839e-22, + -1.30012142461432110e-23, + 6.25549387093277953e-02, + -1.48162408846060274e-03, + 2.58707473115598478e-05, + -4.03721207354391070e-07, + 6.37359384325919197e-09, + -3.65728808481939449e-11, + 1.73553634017145532e-12, + -5.35178562342024180e-14, + -2.70720541449027329e-15, + -3.47732546590287297e-17, + 2.82862092284912524e-18, + 1.36950508334588650e-19, + 1.17871455243882408e-21, + -1.26334307336329068e-22, + 1.86097759606324381e-01, + -4.61094741656195833e-03, + 8.34875968602731555e-05, + -1.32235275998142180e-06, + 2.05259940174256310e-08, + -1.01810663764845739e-10, + 4.72043181367770339e-12, + -1.60043803504832731e-13, + -8.93798883823278446e-15, + -9.24408445267647465e-17, + 9.24081964886062729e-18, + 4.32035600826190796e-19, + 3.24071264092136256e-21, + -4.12526827618963485e-22, + 4.08399157911111976e-01, + -1.08925839256309824e-02, + 2.09057133303518276e-04, + -3.38474211028006302e-06, + 5.06968742359651283e-08, + -1.66264296998353751e-10, + 7.64550019072380860e-12, + -3.43283024690974387e-13, + -2.30077733847021897e-14, + -1.57692625589903455e-16, + 2.38866136846195359e-17, + 1.03055068732848730e-18, + 5.87727111858600722e-21, + -1.05417651043258412e-21, + 8.04064309141435452e-01, + -2.39900902572172149e-02, + 5.01695050013017626e-04, + -8.34209975886197916e-06, + 1.15305451639016525e-07, + 7.22191902810859449e-11, + 5.80777000693536226e-14, + -6.21732151817187010e-13, + -5.46412246416767728e-14, + -1.88472139736724495e-16, + 6.20700289328413406e-17, + 2.23249535650936732e-18, + 5.53638530862278995e-21, + -2.59129331135194136e-21, + 1.58063305527407993e+00, + -5.59143177285823037e-02, + 1.32170911800005516e-03, + -2.24063322948795452e-05, + 2.47021905339898466e-07, + 3.08274389191795123e-09, + -8.14540621448477711e-11, + -1.58541003963234119e-12, + -1.03333877824095475e-13, + -3.45357002378868635e-16, + 1.82529067365230855e-16, + 5.10516910163384316e-18, + -3.47527798270118976e-20, + -6.89283228277889417e-21, + 3.55499567634602176e+00, + -1.65048308232650986e-01, + 4.62039109907007566e-03, + -7.40163898250741618e-05, + 1.67078502822940872e-07, + 3.23357210601044649e-08, + -3.86923640958850370e-10, + -2.60244683940832308e-11, + 1.53212880006931774e-13, + 1.49068986477841003e-14, + 1.75383869705864825e-16, + 9.39659737748147067e-18, + 5.27180352727976552e-20, + -3.04335069054968688e-20, + 1.44529959441628719e+01, + -1.07393835694900464e+00, + 3.49869475613430875e-02, + -2.23253653151962012e-04, + -1.08817223511569982e-05, + -1.11525094826800597e-07, + 8.68672883616955080e-09, + 2.94691731800842655e-10, + -4.94058960738585835e-12, + -4.30204355052607005e-13, + -8.66256512363768096e-16, + 4.85684397363977042e-16, + 7.73997200434546054e-18, + -4.47288603627368660e-19, +# root=8 base[9]=22.5 */ + 6.14411708915457537e-03, + -1.36376831573064325e-04, + 2.24011205277010758e-06, + -3.13730573399058852e-08, + 6.07008033507786947e-10, + -2.32530694129536008e-12, + -9.02070304623462328e-14, + -1.33741666489746954e-14, + -6.59851094559874127e-17, + 1.83400720047207453e-17, + 6.49743219897808831e-19, + -9.99648221893417347e-21, + -1.28856828303674179e-21, + -2.43092962608335457e-23, + 5.70140802294509877e-02, + -1.29234726397210102e-03, + 2.16193221200672845e-05, + -3.06022655626251671e-07, + 5.88557324870718554e-09, + -2.27758836252057213e-11, + -9.40867035896092465e-13, + -1.26934908226037978e-13, + -5.76798172620583659e-16, + 1.78491173451081698e-16, + 6.15699615567411773e-18, + -1.00679064431031358e-19, + -1.24249501077001854e-20, + -2.28664061463919005e-22, + 1.68896988928458225e-01, + -4.00106123017126246e-03, + 6.95370188446197752e-05, + -1.00618325221097136e-06, + 1.90918648995803628e-08, + -7.42290661104135696e-11, + -3.54640806011822564e-12, + -3.92492814563085569e-13, + -1.44739571991679666e-15, + 5.83851685117531404e-16, + 1.90117280660970503e-17, + -3.53111879204940917e-19, + -3.98622252783221607e-20, + -6.93771020122972105e-22, + 3.67935684934377394e-01, + -9.36901517093502618e-03, + 1.73217171993960691e-04, + -2.59497481839235928e-06, + 4.80066620555460111e-08, + -1.77830126675395791e-10, + -1.13211235937025498e-11, + -9.03464141671686939e-13, + -1.88878179717543853e-15, + 1.48983446893201721e-15, + 4.39812298817235351e-17, + -1.00628547786629686e-18, + -9.86488941184727825e-20, + -1.54561632817035065e-21, + 7.15541439347523012e-01, + -2.03455207822934858e-02, + 4.12682589614555033e-04, + -6.49493124149969903e-06, + 1.14382941053231412e-07, + -3.17535864272221533e-10, + -3.84096100939467803e-11, + -1.82959287363261968e-12, + 2.66418906821196529e-15, + 3.62891002510121009e-15, + 9.19104274742848064e-17, + -2.90447148731798886e-18, + -2.31107333630802521e-19, + -2.92797662360233744e-21, + 1.37652029149224742e+00, + -4.63450640968440380e-02, + 1.07818118453697283e-03, + -1.80883497322997782e-05, + 2.83766661292667370e-07, + 2.69763053551757572e-10, + -1.61850476370473160e-10, + -3.34070662191251310e-12, + 5.25814091763868123e-14, + 9.16243272843616329e-15, + 1.84716865567851311e-16, + -9.76563450687814523e-18, + -5.80047057867250665e-19, + -3.78521344358492907e-21, + 2.96322686137749747e+00, + -1.31547814127970897e-01, + 3.76730330315965369e-03, + -6.69047854126555758e-05, + 6.67107667023005948e-07, + 1.54204199873664440e-08, + -9.52950981907564441e-10, + -1.06146307961233959e-11, + 8.70113766176612912e-13, + 2.36757997577278395e-14, + -8.50817894206331183e-17, + -3.71259572677081161e-17, + -1.69278123030534666e-18, + 1.13600900102822143e-20, + 1.06957717315901455e+01, + -8.07802701735060080e-01, + 3.12328480559662218e-02, + -4.01570617576635955e-04, + -1.05094419076371774e-05, + 1.64656312114822392e-07, + 1.26057515192642712e-08, + -7.36184431793365692e-11, + -1.56488385178640968e-11, + -3.07575616896599269e-14, + 1.83472073063357615e-14, + 1.51465676844000984e-16, + -1.99985883532765658e-17, + -2.53340848879198283e-19, +# root=8 base[10]=25.0 */ + 5.63229391732949971e-03, + -1.19801652242411747e-04, + 1.91965420524851843e-06, + -2.22729603412298673e-08, + 5.10397263907741225e-10, + -8.47596860297382283e-12, + -3.69918924065079353e-13, + -1.92309076345571339e-15, + 7.82091170575896209e-16, + 1.70040410085857555e-17, + -1.05780251701846435e-18, + -5.06422918966033703e-20, + 8.53529964413832394e-22, + 1.06237959817805947e-22, + 5.21695398437314745e-02, + -1.13252933349946780e-03, + 1.84898607568294758e-05, + -2.17880807652255423e-07, + 4.93567211702714898e-09, + -8.28765917354350048e-11, + -3.55358334340766234e-12, + -1.48162704719253140e-14, + 7.54666547306855143e-15, + 1.58892754981012070e-16, + -1.03559261790239414e-17, + -4.82876314580927011e-19, + 8.60945446925693476e-21, + 1.02564473632771812e-21, + 1.53935989141915114e-01, + -3.48802969990660199e-03, + 5.92218591013960076e-05, + -7.20755359637322310e-07, + 1.59361103934165059e-08, + -2.73194398980400138e-10, + -1.13287327384294605e-11, + -2.13698068263317272e-14, + 2.42346190205818065e-14, + 4.74522908002199834e-16, + -3.43022891624757554e-17, + -1.51085593295624287e-18, + 3.02925801994541297e-20, + 3.29877455291049072e-21, + 3.33051788536689708e-01, + -8.09518569159035049e-03, + 1.46498703014816343e-04, + -1.87808145329214592e-06, + 3.98915628792693835e-08, + -7.01979326012953882e-10, + -2.79065427207839645e-11, + 6.16116247747911860e-14, + 5.99764720214053349e-14, + 1.02246328304219106e-15, + -8.94504753948427728e-17, + -3.57056601934758844e-18, + 8.67190011523476283e-20, + 8.19476031708900064e-21, + 6.40311442005721543e-01, + -1.73255924967014203e-02, + 3.45308926680132594e-04, + -4.78121898072084525e-06, + 9.52881825115253519e-08, + -1.70824132423737370e-09, + -6.61596202993918523e-11, + 6.11831537166835548e-13, + 1.40026996004673384e-13, + 1.78245157325309091e-15, + -2.26869688910780683e-16, + -7.66964262071273106e-18, + 2.51417251687784202e-19, + 1.92696217828260681e-20, + 1.20712384013764318e+00, + -3.85117615404147948e-02, + 8.87787421221742723e-04, + -1.37401767023946722e-05, + 2.45110121217896914e-07, + -4.22073290232891735e-09, + -1.79226213466152661e-10, + 3.75329613865125201e-12, + 3.46265224008878357e-13, + 1.39027791486674676e-15, + -6.35059322052084810e-16, + -1.56216048807113713e-17, + 8.57532458829628024e-19, + 4.76752961918286526e-20, + 2.49250429552222430e+00, + -1.04424238049595081e-01, + 3.03452066834670109e-03, + -5.50418126693355908e-05, + 7.41930431195746140e-07, + -7.20761001921825743e-09, + -7.61028120045082282e-10, + 2.59408121909856055e-11, + 1.12139949842984516e-12, + -2.51916769447445145e-14, + -2.20617995580856221e-15, + -9.82172152976802544e-18, + 4.06232208307863470e-18, + 1.20321694293909993e-19, + 7.93018696291460046e+00, + -5.79724307250222282e-01, + 2.55627211141840789e-02, + -5.28620652660267130e-04, + -4.63614886510253003e-06, + 3.89912633190461497e-07, + 4.36668096520423929e-09, + -4.54845190713231947e-10, + -4.56855513466652522e-12, + 5.53228233400551902e-13, + 4.84465525863081533e-15, + -6.34492823501640324e-16, + -4.68201619959329767e-18, + 6.36737747753889992e-19, +# root=8 base[11]=27.5 */ + 5.18228424164161958e-03, + -1.05390579923246257e-04, + 1.69430127533052442e-06, + -1.59088859321240012e-08, + 2.63409776214234607e-10, + -1.49818698128888696e-11, + -5.79999745308735613e-14, + 2.18446872872348706e-14, + 3.36279614173698951e-16, + -4.09211749928424545e-17, + -8.69941810717713992e-19, + 7.17339234632452116e-20, + 2.08526252095795902e-21, + -1.21118612952632082e-22, + 4.79203943027818394e-02, + -9.93880877746856906e-04, + 1.62802814968650837e-05, + -1.56421287562127860e-07, + 2.54209480633763052e-09, + -1.44211992168706173e-10, + -4.71011751897414828e-13, + 2.11164871770814311e-13, + 3.05192436135814169e-15, + -3.97031088955697765e-16, + -8.06755753323600423e-18, + 7.00453822371023599e-19, + 1.96063466458780860e-20, + -1.19139434037602794e-21, + 1.40882100578413300e-01, + -3.04502194216049434e-03, + 5.18779543110112413e-05, + -5.22799386693333623e-07, + 8.18218743220165181e-09, + -4.60719286787035264e-10, + -9.16972320148898332e-13, + 6.81047314432687584e-13, + 8.46395367334378489e-15, + -1.28995536682173977e-15, + -2.36272552230145334e-17, + 2.30712094090916556e-18, + 5.93145609640992399e-20, + -3.98609428633063008e-21, + 3.02885927769173890e-01, + -7.00377750836492403e-03, + 1.27221499216653673e-04, + -1.38388816909152484e-06, + 2.04510790564409793e-08, + -1.13025890257776491e-09, + 1.22037710933953023e-13, + 1.70050972519114419e-12, + 1.52356344082556599e-14, + -3.25533593727475152e-15, + -4.85945120870396475e-17, + 5.95795064777669524e-18, + 1.30543916019991024e-19, + -1.05682848669739456e-20, + 5.76203183381116535e-01, + -1.47697918374672180e-02, + 2.95713148357533038e-04, + -3.60121242154490475e-06, + 4.92369627728251060e-08, + -2.59801622847653064e-09, + 8.63351979963705475e-12, + 4.04419558213811465e-12, + 1.30716902983926738e-14, + -7.83228808739596351e-15, + -7.34933785653616523e-17, + 1.48655211192013376e-17, + 2.35942243245169356e-19, + -2.74969924908517430e-20, + 1.06632121149556847e+00, + -3.20099893969680790e-02, + 7.43042519603553508e-04, + -1.06704630774670086e-05, + 1.32166011832843591e-07, + -6.15360769865359802e-09, + 5.05723908131744636e-11, + 1.03862916073019085e-11, + -7.04743165452885211e-14, + -2.01387251100629928e-14, + 1.18902689164258065e-17, + 4.03973874629982786e-17, + 2.24886986527614043e-19, + -8.00337916487633760e-20, + 2.11944061542892204e+00, + -8.26042101820123609e-02, + 2.43808806308664630e-03, + -4.50130218840358813e-05, + 4.89286504459760993e-07, + -1.40982866077227008e-08, + 2.23894450876500570e-10, + 3.32687312454405300e-11, + -9.00506398329928209e-13, + -6.04097289014579031e-14, + 1.58959275552640980e-15, + 1.26598773593929959e-16, + -2.48703059033618014e-18, + -2.83376216841075176e-19, + 5.97913912748560161e+00, + -4.01249575945479497e-01, + 1.90379636431894511e-02, + -5.39108197274472097e-04, + 3.17171985159820788e-06, + 3.43749101430019422e-07, + -7.47019454479552024e-09, + -2.98794521658691084e-10, + 1.23530255611934127e-11, + 2.36130245560541814e-13, + -1.70528830125287794e-14, + -1.54972925293270207e-16, + 2.01787228419922992e-17, + 1.19040889463951229e-19, +# root=8 base[12]=30.0 */ + 4.78669346347363519e-03, + -9.25503554065415041e-05, + 1.51912957296719527e-06, + -1.39556729228942014e-08, + -4.24450795276713714e-13, + -9.24956880403222947e-12, + 4.74726385130246768e-13, + 9.16589006185654817e-15, + -9.31535789278013708e-16, + -9.96612128480589485e-18, + 1.86235238990093746e-18, + 2.62584241789096317e-21, + -3.52900198475970131e-21, + 2.49095543824154298e-23, + 4.41941618207211881e-02, + -8.70668422550563339e-04, + 1.45556797799791860e-05, + -1.37405052993769979e-07, + 2.19102487740235561e-11, + -8.73162823377597785e-11, + 4.60132491002475172e-12, + 8.40910975881458338e-14, + -9.02018621109284080e-15, + -8.71792163448180232e-17, + 1.79917854695657526e-17, + 7.69407340214508472e-21, + -3.40413542988021951e-20, + 2.75536018335059427e-22, + 1.29494575803559775e-01, + -2.65354274923214339e-03, + 4.60996960055640756e-05, + -4.60332290929879429e-07, + 2.61882196549372242e-10, + -2.67378573364212311e-10, + 1.49097727684661866e-11, + 2.40319952280767171e-13, + -2.91766967817149773e-14, + -2.17676051527351775e-16, + 5.78935144602787711e-17, + -9.85045672150496361e-20, + -1.09145722602909360e-19, + 1.13236465101758973e-21, + 2.76806872732002940e-01, + -6.04850694242590418e-03, + 1.11876218968853179e-04, + -1.22158485449278322e-06, + 1.55169566171971824e-09, + -6.09124508453097180e-10, + 3.73974304558926953e-11, + 4.71482009270090007e-13, + -7.30352802121454616e-14, + -2.72940910328981708e-16, + 1.43494347345595512e-16, + -7.76359177584477040e-19, + -2.68543637578195398e-19, + 3.88545016102075663e-21, + 5.21595750707462447e-01, + -1.25672451290358683e-02, + 2.55647173648739174e-04, + -3.18177304530065998e-06, + 7.68990486568317896e-09, + -1.23337475334551288e-09, + 8.87306719314424569e-11, + 6.41704834193834466e-13, + -1.73182694112938989e-13, + 4.01615823533092704e-16, + 3.33587994534471121e-16, + -3.92986010954514077e-18, + -6.14022694017559906e-19, + 1.34362732982502808e-20, + 9.49398482429485768e-01, + -2.65503629581682193e-02, + 6.24078856857020799e-04, + -9.38803665211687881e-06, + 4.09037113404497300e-08, + -2.29062862417284167e-09, + 2.19995199932027685e-10, + -2.96553149207260559e-13, + -4.32698212904630807e-13, + 5.60599736425895241e-15, + 7.92943704305279434e-16, + -1.92384363025917269e-17, + -1.38855271242320380e-18, + 5.28572402099198589e-20, + 1.82477576699533550e+00, + -6.51453142003409064e-02, + 1.93722437844841494e-03, + -3.89097687159420191e-05, + 3.13437147844402811e-07, + -2.16811001649906431e-09, + 5.57947800814076048e-10, + -1.09240116895823632e-11, + -1.18599173335100045e-12, + 4.53780438283396420e-14, + 1.73689343954602345e-15, + -1.15449212851077222e-16, + -2.10967378446714115e-18, + 2.66126315861069320e-19, + 4.63959001800231530e+00, + -2.73511793706025241e-01, + 1.30627580966951908e-02, + -4.45088990171712043e-04, + 7.82308178480702811e-06, + 1.11868076843326759e-07, + -9.95754877729846550e-09, + 1.04166758849208293e-10, + 9.41711738544622229e-12, + -3.19010552960360601e-13, + -5.68492082465043043e-15, + 4.98398305416935750e-16, + -2.23607602867904192e-19, + -6.41849257260871405e-19, +# root=8 base[13]=32.5 */ + 4.43972408616026288e-03, + -8.10771569470386273e-05, + 1.34761422453431892e-06, + -1.47961787067742019e-08, + -6.77615043699016857e-11, + 1.99493998008510449e-12, + 3.51343300270332340e-13, + -1.42520297113548195e-14, + -2.77334886225310695e-16, + 3.13622869078220624e-17, + -1.97720880618117874e-19, + -5.16356314086928430e-20, + 1.49141628959868313e-21, + 5.88723148208690804e-23, + 4.09338207829541972e-02, + -7.60904601684374922e-04, + 1.28715164032133301e-05, + -1.44802648154481760e-07, + -5.93485672194405558e-10, + 2.03726881573412367e-11, + 3.31682354426083070e-12, + -1.38823330649426877e-13, + -2.51488701090434489e-15, + 3.02126878143059354e-16, + -2.20643970308623773e-18, + -4.91614880621946285e-19, + 1.48350605702194419e-20, + 5.47051109783034362e-22, + 1.19582743361824312e-01, + -2.30704622090855110e-03, + 4.04891331561686726e-05, + -4.79038171023944314e-07, + -1.48508622681644471e-09, + 7.27695966285523143e-11, + 1.01482876826396653e-11, + -4.54345686157733517e-13, + -6.97019974363437487e-15, + 9.66062376318569101e-16, + -9.13640817209725347e-18, + -1.53101732293664702e-18, + 5.06581541651609668e-20, + 1.60716869451840881e-21, + 2.54309803287762815e-01, + -5.21231656316774837e-03, + 9.71233971804981244e-05, + -1.24547873991996358e-06, + -1.86094236235679882e-09, + 2.08125191896096628e-10, + 2.30127131244507115e-11, + -1.15711043773764111e-12, + -1.26249648706208334e-14, + 2.36739048158474219e-15, + -3.11987775498175385e-17, + -3.57163842535733636e-18, + 1.37721619422196333e-19, + 3.30997632204081253e-21, + 4.75176724451781718e-01, + -1.06738365750205805e-02, + 2.17756446652174170e-04, + -3.14457072469382759e-06, + 2.87927678960405054e-09, + 5.75079693596255506e-10, + 4.57575822142820155e-11, + -2.80339632082621773e-12, + -1.20372001089258594e-14, + 5.39519806629349694e-15, + -1.05104586605844292e-16, + -7.39606408459937338e-18, + 3.65503991573505892e-19, + 4.94398609869386165e-21, + 8.52482128735346789e-01, + -2.19989646364140007e-02, + 5.14699881120934217e-04, + -8.84007027215062874e-06, + 4.05424236569816958e-08, + 1.67443939385101837e-09, + 7.84911110333459835e-11, + -7.14864066375249291e-12, + 4.28751117073666884e-14, + 1.23684775083425052e-14, + -3.89948287260790472e-16, + -1.33161180562384471e-17, + 1.05372035900176227e-18, + -1.24346786662771298e-21, + 1.59235401354604722e+00, + -5.14292553891278065e-02, + 1.50090092622212471e-03, + -3.36732312120706153e-05, + 3.64380069829735605e-07, + 5.00106016909647416e-09, + 3.68133156303305704e-12, + -1.92078927143450462e-11, + 5.24449882986379721e-13, + 2.52047956403699983e-14, + -1.76471351722674863e-15, + 1.08432047335519572e-18, + 3.34528487019689220e-18, + -9.44518293218270384e-20, + 3.72385057266956165e+00, + -1.88153528725513525e-01, + 8.50835028651418003e-03, + -3.13544397635970122e-04, + 8.03536781570829065e-06, + -6.92447953747570549e-08, + -4.63193851969617290e-09, + 2.16483567216650942e-10, + -1.61487320557892266e-12, + -2.02175837622912252e-13, + 7.82214068445192194e-15, + 3.11084785588101716e-17, + -1.08342962443053519e-17, + 2.40919356254913868e-19, +# root=8 base[14]=35.0 */ + 4.13583364493279922e-03, + -7.10195860320946834e-05, + 1.16596829604819884e-06, + -1.52446125525914079e-08, + 2.29050058368479535e-11, + 5.54119616582757197e-12, + -3.16470346799751542e-14, + -9.56047709245604588e-15, + 3.86110076414298489e-16, + 2.47714946843054597e-18, + -7.01117452893604473e-19, + 1.88202944947146589e-20, + 5.13312820475478226e-22, + -4.66817386646643256e-23, + 3.80849816521132770e-02, + -6.64992174509360622e-04, + 1.11006175367014849e-05, + -1.48082690329686244e-07, + 2.85976815122188749e-10, + 5.28955207760137708e-11, + -3.57671161318655823e-13, + -9.02057039382734313e-14, + 3.75192422806048337e-15, + 1.96340844356914782e-17, + -6.67805887601100284e-18, + 1.86272533861077956e-19, + 4.65692477361789151e-21, + -4.49328600364254835e-22, + 1.10965634710638625e-01, + -2.00635636366535775e-03, + 3.46769007443202074e-05, + -4.82335132707032258e-07, + 1.36440352227149745e-09, + 1.65693424851711078e-10, + -1.49947354472390894e-12, + -2.75566684645077914e-13, + 1.22151355331319095e-14, + 3.39332240643444578e-17, + -2.08240741002903309e-17, + 6.29293838772345433e-19, + 1.28974802787111003e-20, + -1.43244379141651119e-21, + 2.34919736074605257e-01, + -4.49516213576562924e-03, + 8.22034377162627976e-05, + -1.22290335067993542e-06, + 5.24932083131645091e-09, + 3.90808371083814375e-10, + -5.11846456244901953e-12, + -6.22386843841111372e-13, + 3.08221550738380860e-14, + -3.63984927542424841e-17, + -4.87614064942591456e-17, + 1.67995714605514693e-18, + 2.31346761454971474e-20, + -3.47866332013389317e-21, + 4.35729083048453314e-01, + -9.08080826832290654e-03, + 1.80800307743902332e-04, + -2.97236606420749030e-06, + 1.94015595989528812e-08, + 8.28226944873363488e-10, + -1.68866316222524768e-11, + -1.22405447564598623e-12, + 7.34843508132887900e-14, + -5.28451567387414513e-16, + -1.02229090862905907e-16, + 4.32983912231087355e-18, + 1.99651489453913749e-20, + -7.72016891096009370e-21, + 7.72069003224358452e-01, + -1.82917631319090869e-02, + 4.13777676644071874e-04, + -7.88230465061748240e-06, + 7.87643339187154199e-08, + 1.60190049813246107e-09, + -5.96520251268618162e-11, + -2.01950843901201351e-12, + 1.81772604624088034e-13, + -3.05640132983583162e-15, + -1.94955983653311981e-16, + 1.19031001617467807e-17, + -9.62884829556267850e-20, + -1.62026531893861567e-20, + 1.40824131011579090e+00, + -4.09323647516511430e-02, + 1.13471570870184797e-03, + -2.71806679087992320e-05, + 4.33433938188583867e-07, + 9.25939754519434280e-10, + -2.49005255050494060e-10, + 5.64589872103611787e-13, + 4.54225809554290467e-13, + -1.73153860290501940e-14, + -1.46710692323131784e-16, + 3.50236775190868013e-17, + -1.07099422290715330e-18, + -1.82361534481348820e-20, + 3.08644976285937522e+00, + -1.33086161444571249e-01, + 5.45717830904788887e-03, + -2.00207216979769942e-04, + 5.97873907507167382e-06, + -1.18150855823969868e-07, + 2.20385065124389607e-11, + 1.04378683192200289e-10, + -3.94129406074990633e-12, + 3.73526385196007399e-14, + 2.91223850623713115e-15, + -1.47260496521378959e-16, + 1.89986092217181969e-18, + 1.08790971342666505e-19, +# root=8 base[15]=37.5 */ + 3.86927133442076460e-03, + -6.24095474553664181e-05, + 9.88566240410915042e-07, + -1.40992052757524067e-08, + 1.11451538588684392e-10, + 2.89809120779535141e-12, + -1.41323855125206454e-13, + 5.69502112625613871e-16, + 1.85076192301297807e-16, + -8.33111485289496011e-18, + 7.12776452741477664e-20, + 8.87891527272382829e-21, + -4.46782993885380297e-22, + 5.08521887937623276e-24, + 3.55915765126729108e-02, + -5.83143335899812248e-04, + 9.38270854511221487e-06, + -1.36131205953170271e-07, + 1.12100991684175007e-09, + 2.68064087426509255e-11, + -1.36401153623540588e-12, + 6.77709997085515009e-15, + 1.73840824843937843e-15, + -8.03983137294318253e-17, + 7.58914916004591014e-19, + 8.28968665418174056e-20, + -4.30983173557777247e-21, + 5.32054763354706966e-23, + 1.03459210030439716e-01, + -1.75149286464788227e-03, + 2.91175695584978712e-05, + -4.37808558628846985e-07, + 3.91009252149551457e-09, + 7.80758962460224354e-11, + -4.37691987820052438e-12, + 3.03904476772073112e-14, + 5.25606195613073123e-15, + -2.57945780220269835e-16, + 2.91558731568354125e-18, + 2.46973356113642795e-19, + -1.38074025921464485e-20, + 1.98637449489532245e-22, + 2.18164119559987379e-01, + -3.89427716613750243e-03, + 6.82572372172663181e-05, + -1.08709803544486605e-06, + 1.09590640234084880e-08, + 1.59252868362143854e-10, + -1.07756533195814657e-11, + 1.10017823103669565e-13, + 1.16354414323455266e-14, + -6.35084612450612688e-16, + 9.14062610936728160e-18, + 5.29589714892112355e-19, + -3.38497604953719213e-20, + 6.02737476451262063e-22, + 4.02081635725879405e-01, + -7.77072618331152865e-03, + 1.47448518427161960e-04, + -2.55874826308741847e-06, + 3.03618863185481150e-08, + 2.40461637868788467e-10, + -2.46773053376226406e-11, + 3.80107026402223894e-13, + 2.19439825485453500e-14, + -1.45547357101222126e-15, + 2.80837071415287946e-17, + 9.22520447558995976e-19, + -7.66355416782439185e-20, + 1.78980535922724443e-21, + 7.04956091676763652e-01, + -1.53365919808003855e-02, + 3.27529058468531734e-04, + -6.45260463112311224e-06, + 9.47490562609442902e-08, + 1.61106268830915104e-11, + -5.68628370824083217e-11, + 1.39499795826336917e-12, + 3.18849028844923544e-14, + -3.36180329040595346e-15, + 9.32651276726908223e-17, + 9.37132388848208399e-19, + -1.70373252524737589e-19, + 5.69630736076841500e-21, + 1.26076735405321294e+00, + -3.30419980626526638e-02, + 8.49786508679907493e-04, + -2.03946495402961440e-05, + 3.99559094603245597e-07, + -3.77705176394355574e-09, + -1.18593835775991650e-10, + 6.08634845750458614e-12, + -4.15942305264251819e-14, + -7.12782317348845588e-15, + 3.56180233029343524e-16, + -4.85531773758302128e-18, + -2.99424460574775659e-19, + 1.97128595004704785e-20, + 2.62826837960116810e+00, + -9.75879017336914872e-02, + 3.55290842348128045e-03, + -1.22663949012264323e-04, + 3.79138408464217305e-06, + -9.50324464718591620e-08, + 1.47809024675664166e-09, + 1.16720054378342051e-11, + -1.73732449486411927e-12, + 6.05203899055286146e-14, + -8.21963828617577026e-16, + -2.54987995779446448e-17, + 1.84756304091979293e-18, + -4.86870576167215465e-20, +# root=8 base[16]=40.0 */ + 3.57185353814229705e-03, + -8.52035692163540144e-05, + 2.02293304321169539e-06, + -4.65239713858726760e-08, + 9.03043979856653387e-10, + -3.72106003286506663e-12, + -1.00207879143598083e-12, + 6.44434493925155450e-14, + -1.51081733899476130e-15, + -8.51613837606253989e-17, + 1.05889247277833417e-17, + -4.91851502398995583e-19, + 3.08458912922848276e-21, + 1.21295097380669618e-21, + 3.28161665742953551e-02, + -7.94222170816802353e-04, + 1.91317132901965852e-05, + -4.46596985086079628e-07, + 8.84202116330309249e-09, + -4.39988363457384417e-11, + -9.38893840119503088e-12, + 6.19976282934510024e-13, + -1.51725851055479025e-14, + -7.73382464180356368e-16, + 1.00514537763709398e-16, + -4.77903442380761511e-18, + 3.73401968606233085e-20, + 1.12735814766384836e-20, + 9.51462287726216188e-02, + -2.37331211341553112e-03, + 5.89212334952443463e-05, + -1.41873853309695815e-06, + 2.92573675170743097e-08, + -1.96514247709068014e-10, + -2.82112340648343456e-11, + 1.97627895755121987e-12, + -5.26810689625279073e-14, + -2.15516329607940104e-15, + 3.11211893884666728e-16, + -1.55475756623679067e-17, + 1.70657099915189955e-19, + 3.32421799891595793e-20, + 1.99766907789692388e-01, + -5.23161900186517714e-03, + 1.36362716462360881e-04, + -3.45168845789945611e-06, + 7.59104379100115738e-08, + -7.15178345156418794e-10, + -6.15909716199534407e-11, + 4.81536316280453898e-12, + -1.46019500193095007e-13, + -3.98687648066813960e-15, + 7.20547608321896902e-16, + -3.91208221679198573e-17, + 6.24864869856442057e-19, + 6.98666089949042682e-20, + 3.65642329927193144e-01, + -1.02971717329097111e-02, + 2.88612901284784971e-04, + -7.87006257249994384e-06, + 1.89969253327731834e-07, + -2.52154290846419805e-09, + -1.12040635033755761e-10, + 1.08674217179832263e-11, + -3.94221362847176992e-13, + -4.39825283727090603e-15, + 1.48748865847575160e-15, + -9.25351228132520299e-17, + 2.15855433596227088e-18, + 1.16551295197059233e-19, + 6.33898195150544685e-01, + -1.98740147581916993e-02, + 6.20112781080520929e-04, + -1.88703848940448286e-05, + 5.19955086765608961e-07, + -9.72998871763471789e-09, + -1.37643213802120002e-10, + 2.45645715823552580e-11, + -1.15429956535950945e-12, + 8.49197168677226862e-15, + 2.80112137891375766e-15, + -2.24456052565695817e-16, + 7.76151490035751099e-18, + 9.77447623762669793e-20, + 1.11094153155539233e+00, + -4.11289212065393817e-02, + 1.51527509268766089e-03, + -5.46242037011074997e-05, + 1.83043001720530387e-06, + -4.93397514817492150e-08, + 4.97077128781885288e-10, + 5.07852014470459124e-11, + -3.98311796499914137e-12, + 1.24569055528889881e-13, + 2.59753664552521710e-15, + -5.39751812081475579e-16, + 3.10676657465897937e-17, + -6.93815170890414347e-19, + 2.20750915142955861e+00, + -1.10445378277958764e-01, + 5.49805236272471638e-03, + -2.69055646029942952e-04, + 1.26085599344110630e-05, + -5.39935363457160163e-07, + 1.94180924464493564e-08, + -4.69495886514177224e-10, + -2.18988905797550899e-12, + 1.03664984879209532e-12, + -6.57906892516650427e-14, + 2.32768010080404960e-15, + -2.08253309143557611e-17, + -3.42752568446126479e-18, +# root=8 base[17]=44.0 */ + 3.26020215477281503e-03, + -7.10191855621242522e-05, + 1.54605305072904978e-06, + -3.34772229938327771e-08, + 7.01653463253946404e-10, + -1.24122255382686073e-11, + 3.72902287200207198e-14, + 1.38850648032065523e-14, + -9.88359199389086292e-16, + 4.06924179662303635e-17, + -6.95354376200595457e-19, + -4.45096068231797714e-20, + 4.80327841974095612e-21, + -2.37640070306620046e-22, + 2.99146812481699276e-02, + -6.60321729996455492e-04, + 1.45661286296324894e-05, + -3.19622030716035812e-07, + 6.79402764438915784e-09, + -1.22747264402377292e-10, + 4.95713781576379173e-13, + 1.29071558794734861e-13, + -9.41758667253045897e-15, + 3.94064966849904048e-16, + -7.10497770407879511e-18, + -4.02784273572397089e-19, + 4.53336766369948608e-20, + -2.28415060299543115e-21, + 8.64985317076327614e-02, + -1.96254316588699400e-03, + 4.44986264370031683e-05, + -1.00377047752807039e-06, + 2.19694320236635050e-08, + -4.14262462054252514e-10, + 2.52024785876195654e-12, + 3.80729261161146597e-13, + -2.94110935520502540e-14, + 1.27393759391360264e-15, + -2.54494200505069510e-17, + -1.11320081628388040e-18, + 1.38611312752780200e-19, + -7.26471499966356628e-21, + 1.80787195782381643e-01, + -4.28717205217601146e-03, + 1.01599211015108830e-04, + -2.39583899726754288e-06, + 5.49499015933101676e-08, + -1.10682254881060371e-09, + 1.00897408387019519e-11, + 8.00521066499776734e-13, + -6.92155919653283065e-14, + 3.17921790855629974e-15, + -7.34050266364550583e-17, + -2.02362717546338763e-18, + 3.13886066734200304e-19, + -1.76171932599414575e-20, + 3.28540528755432826e-01, + -8.31873018884644704e-03, + 2.10494213445106053e-04, + -5.30143976709106421e-06, + 1.30280609784883690e-07, + -2.87874618570297663e-09, + 3.78944128585330117e-11, + 1.33111163098952990e-12, + -1.47513972463113491e-13, + 7.46606835250755034e-15, + -2.07077844556097317e-16, + -2.10563753505497487e-18, + 6.23140451043604847e-19, + -3.93723299814432220e-20, + 5.63069570823990562e-01, + -1.56925354870680323e-02, + 4.37056315355854505e-04, + -1.21204198081379655e-05, + 3.29280151637214005e-07, + -8.25888841271967923e-09, + 1.52195319500363537e-10, + 1.00066936620042988e-12, + -2.99882705676182101e-13, + 1.81832345223652789e-14, + -6.35207294892377004e-16, + 4.81875435152056343e-18, + 1.08109237710944395e-18, + -8.71884201838431556e-20, + 9.67130015626574857e-01, + -3.12000547933581653e-02, + 1.00585627027237313e-03, + -3.23054342608360275e-05, + 1.02134559434705976e-06, + -3.06411893367281414e-08, + 7.85848551651696963e-10, + -1.10902790156138969e-11, + -4.36842007299375574e-13, + 4.71822065712365042e-14, + -2.32902777821251486e-15, + 6.30513029436500692e-17, + 5.59097970356077137e-19, + -1.73892754621626157e-19, + 1.83718866543172843e+00, + -7.66239747139521726e-02, + 3.19358772708650419e-03, + -1.32700086914088746e-04, + 5.45906899515049852e-06, + -2.18831972939449047e-07, + 8.29189433517830247e-09, + -2.81121903720267804e-10, + 7.57378003967573632e-12, + -9.68138528886585943e-14, + -5.19318098591161430e-15, + 4.98271974081693477e-16, + -2.44020608178503371e-17, + 7.85807676258513500e-19, +# root=8 base[18]=48.0 */ + 2.99856350304111754e-03, + -6.00849203148867472e-05, + 1.20389022646349467e-06, + -2.41051399008791802e-08, + 4.80278599256325947e-10, + -9.30561748783194363e-12, + 1.56725666067385927e-13, + -8.66504684860455361e-16, + -1.25331825835847777e-16, + 9.75284945549286748e-18, + -4.77012810093690693e-19, + 1.63682331494778381e-20, + -2.76379267461597343e-22, + -1.08008783918776845e-23, + 2.74845344027609163e-02, + -5.57464832408681400e-04, + 1.13061751235693086e-05, + -2.29149346775338908e-07, + 4.62200891367131144e-09, + -9.07465760127555105e-11, + 1.55970814282807971e-12, + -1.01217964781446011e-14, + -1.14765981413136714e-15, + 9.21529851801964235e-17, + -4.56195047824191235e-18, + 1.58644767279859684e-19, + -2.80380660592110588e-21, + -9.55336062185106809e-23, + 7.92916981117167824e-02, + -1.64935590566272637e-03, + 3.43060047921154009e-05, + -7.13078503645616400e-07, + 1.47540328738529315e-08, + -2.97710427807345874e-10, + 5.33005007047269423e-12, + -4.45656120002926177e-14, + -3.26212676685421185e-15, + 2.82529411536940251e-16, + -1.43664026995341604e-17, + 5.13827451646574438e-19, + -9.91104988051474618e-21, + -2.48594935157311520e-22, + 1.65101030680878003e-01, + -3.57600554235206966e-03, + 7.74489654006261071e-05, + -1.67631243543423530e-06, + 3.61281967852943177e-08, + -7.61452616256954354e-10, + 1.45057408447840095e-11, + -1.60566673283592066e-13, + -6.30252689857801437e-15, + 6.43224284529993069e-16, + -3.43477677871181858e-17, + 1.28663750450219938e-18, + -2.80842379149727040e-20, + -3.82456401396068550e-22, + 2.98275310427758344e-01, + -6.85783062987224863e-03, + 1.57661314106253561e-04, + -3.62243111038724379e-06, + 8.29129378839856388e-08, + -1.86239072448651320e-09, + 3.86466232326757597e-11, + -5.62955849887357412e-13, + -8.03481555765923422e-15, + 1.29019477456075327e-15, + -7.54844986295444891e-17, + 3.04063014222360030e-18, + -7.75729620196162110e-20, + -7.85053563942960879e-23, + 5.06482684219258683e-01, + -1.26995749175896639e-02, + 3.18406956963401616e-04, + -7.97870393861260476e-06, + 1.99285365240414739e-07, + -4.90486248650871639e-09, + 1.14136001759941871e-10, + -2.16132077756296740e-12, + 8.20144940252720120e-15, + 2.28282912456834933e-15, + -1.64914339440676796e-16, + 7.51054249308407057e-18, + -2.32325411259140483e-19, + 2.80351862397185235e-21, + 8.56306748264232143e-01, + -2.44665625635644389e-02, + 6.99012697897725336e-04, + -1.99609122320992419e-05, + 5.68551294868178041e-07, + -1.60297335107393666e-08, + 4.36911210702266783e-10, + -1.07719163075955471e-11, + 1.91772398190453171e-13, + 1.08020323781413199e-15, + -3.34894902451689576e-16, + 2.04884201444704198e-17, + -8.31245257982904811e-19, + 2.19169591154909334e-20, + 1.57343718183565828e+00, + -5.62338403317474561e-02, + 2.00962048520265035e-03, + -7.17880155368827861e-05, + 2.56007001097309825e-06, + -9.07932278027151650e-08, + 3.17304797412886228e-09, + -1.07263824641869340e-10, + 3.38909784683278616e-12, + -9.36589893496866289e-14, + 1.89846248549865873e-15, + -3.27015706790969994e-18, + -2.24231007995541972e-18, + 1.44585248098780905e-19, +# root=8 base[19]=52.0 */ + 2.77582144961239412e-03, + -5.14930891101108001e-05, + 9.55220351891090945e-07, + -1.77185070208804901e-08, + 3.28468473410767703e-10, + -6.06574313339846467e-12, + 1.09711918553160250e-13, + -1.79583375157164043e-15, + 1.60816425637498597e-17, + 7.56266770268090696e-19, + -6.87359708591230848e-20, + 3.64016466107331420e-21, + -1.48649546355177591e-22, + 4.62325102868799937e-24, + 2.54197673443282042e-02, + -4.76882811103670427e-04, + 8.94641349127619577e-06, + -1.67824562807977299e-07, + 3.14637520991265263e-09, + -5.87682019829197320e-11, + 1.07606591591598021e-12, + -1.79329306007438848e-14, + 1.73929466768951600e-16, + 6.69800253800842047e-18, + -6.43479432739884558e-19, + 3.45262640493855648e-20, + -1.42189033819753187e-21, + 4.47138699578511727e-23, + 7.31940992000924412e-02, + -1.40553255038199988e-03, + 2.69900036128269777e-05, + -5.18244729849750986e-07, + 9.94548904069564278e-09, + -1.90194998682337042e-10, + 3.57175978511306573e-12, + -6.17071728899462745e-14, + 6.87598131753398681e-16, + 1.73889132290240545e-17, + -1.93143995778289773e-18, + 1.06807080458968398e-19, + -4.48076445518310864e-21, + 1.44192801186407054e-22, + 1.51921283903368065e-01, + -3.02809299673309322e-03, + 6.03555189066417569e-05, + -1.20291711213114567e-06, + 2.39623878610618021e-08, + -4.75838497782053244e-10, + 9.30157863891864712e-12, + -1.69714326763799773e-13, + 2.24373339428776121e-15, + 2.57416257207479310e-17, + -4.22006284122163760e-18, + 2.47604906197988575e-19, + -1.07340806007084689e-20, + 3.58661593612607405e-22, + 2.73119749623144337e-01, + -5.75039523635841477e-03, + 1.21070816342262172e-04, + -2.54890477771264114e-06, + 5.36371191677486489e-08, + -1.12566627334802204e-09, + 2.33248373672989856e-11, + -4.58683810633250156e-13, + 7.28680421692923826e-15, + -5.46046101088010222e-18, + -7.75900710446005640e-18, + 5.16304121034387570e-19, + -2.37253647644757020e-20, + 8.40057986976909313e-22, + 4.60240309386788948e-01, + -1.04876775439869830e-02, + 2.38985291295787882e-04, + -5.44549438522217935e-06, + 1.24030662546921550e-07, + -2.81895329778545789e-09, + 6.34678942484761775e-11, + -1.37928784751531225e-12, + 2.64754822229131880e-14, + -2.89721818978260029e-16, + -1.03878077158182564e-17, + 1.01751797046622026e-18, + -5.27790475016887136e-20, + 2.05429617995029500e-21, + 7.68297973739587081e-01, + -1.96990613665586137e-02, + 5.05078093767525054e-04, + -1.29493638753392608e-05, + 3.31893205182880047e-07, + -8.49335171342091937e-09, + 2.16042857455575693e-10, + -5.38654858701468196e-12, + 1.26593764381473214e-13, + -2.49982507097268870e-15, + 2.24509783991654547e-17, + 1.41821862606513599e-18, + -1.16815936686279284e-19, + 5.59843361446717242e-21, + 1.37602957877206444e+00, + -4.30217834897520107e-02, + 1.34507396749617520e-03, + -4.20517977675101683e-05, + 1.31439466512012885e-06, + -4.10470162037529371e-08, + 1.27816113325453501e-09, + -3.94882875195888980e-11, + 1.19749949136747912e-12, + -3.49199675142859813e-14, + 9.42412527088881986e-16, + -2.17183118522939057e-17, + 3.28489549734383843e-19, + 3.38931560211472704e-21, +# root=8 base[20]=56.0 */ + 2.58390106163016537e-03, + -4.46208416011107989e-05, + 7.70547499408149080e-07, + -1.33063315887040646e-08, + 2.29769140401417406e-10, + -3.96584215819879857e-12, + 6.82689477167906385e-14, + -1.15913682769138822e-15, + 1.84674818734523519e-17, + -2.13868254874953834e-19, + -2.51044322779151237e-21, + 3.62955110996566486e-22, + -2.05588292427766162e-23, + 8.99946569302238767e-25, + 2.36437249975224584e-02, + -4.12592275127385429e-04, + 7.19989340437237822e-06, + -1.25640118011623420e-07, + 2.19232805400825856e-09, + -3.82383141921392619e-11, + 6.65244985683295343e-13, + -1.14231113432172715e-14, + 1.84783713997917401e-16, + -2.23678224092488070e-18, + -1.93779772270479709e-20, + 3.35207220925532028e-21, + -1.93534045495442375e-22, + 8.54073006713298560e-24, + 6.79678951679815319e-02, + -1.21204465309885127e-03, + 2.16139030952898358e-05, + -3.85429657421531880e-07, + 6.87278896420047539e-09, + -1.22503357233071588e-10, + 2.17841898600148855e-12, + -3.82843744044540066e-14, + 6.38530509251676538e-16, + -8.38139407469207048e-18, + -2.87320414896368870e-20, + 9.73736092428614615e-21, + -5.88730826754484718e-22, + 2.64640217068131985e-23, + 1.40691516701160618e-01, + -2.59712298519110957e-03, + 4.79420831438518119e-05, + -8.84990724072948189e-07, + 1.63357101304736482e-08, + -3.01426029823107331e-10, + 5.55045892788444134e-12, + -1.01193183473659575e-13, + 1.76819066590086448e-15, + -2.58255100635068527e-17, + 7.08523659143776891e-20, + 1.98190381057106929e-20, + -1.32317208659140863e-21, + 6.16040310429459466e-23, + 2.51880150513000167e-01, + -4.89112005075126310e-03, + 9.49778820777582699e-05, + -1.84431114422625335e-06, + 3.58117419281933382e-08, + -6.95154404975354775e-10, + 1.34710132099443409e-11, + -2.59018277446559938e-13, + 4.82637579609186643e-15, + -7.97543819857112309e-17, + 7.11139404127689130e-19, + 3.01568131406308627e-20, + -2.59945865884661242e-21, + 1.29854119510602094e-22, + 4.21742090498415767e-01, + -8.80724838715795863e-03, + 1.83921848151794216e-04, + -3.84082137822114842e-06, + 8.02041930933543533e-08, + -1.67440306005991198e-09, + 3.49111953081944460e-11, + -7.23899638370877971e-13, + 1.47060478617255161e-14, + -2.78612340433234942e-16, + 4.09108257961209659e-18, + 6.42219417929311205e-21, + -4.41241529110076199e-21, + 2.64638612472388636e-22, + 6.96711283366049927e-01, + -1.62010353229807627e-02, + 3.76731965814771849e-04, + -8.76032261578379451e-06, + 2.03701004057841994e-07, + -4.73571083139451500e-09, + 1.10003396265930441e-10, + -2.54679510774402856e-12, + 5.83183907883276453e-14, + -1.29253890009227710e-15, + 2.61338075372406386e-17, + -3.94543515910542239e-19, + -1.03013569206217771e-21, + 4.50845220062689513e-22, + 1.22270184995625764e+00, + -3.39753203374487597e-02, + 9.44074629346681364e-04, + -2.62329618551681001e-05, + 7.28916668482286506e-07, + -2.02515998123828571e-08, + 5.62407216527914081e-10, + -1.55963398860345127e-11, + 4.30779677835526442e-13, + -1.17819132805889454e-14, + 3.15356964127771993e-16, + -8.08055310415669630e-18, + 1.90064202750540913e-19, + -3.73075743435619506e-21, +# root=8 base[21]=60.0 */ + 2.41681612501159875e-03, + -3.90381682522216860e-05, + 6.30572806736091195e-07, + -1.01854643923177957e-08, + 1.64522101196328975e-10, + -2.65735480191550647e-12, + 4.29092444012005018e-14, + -6.91726039788416189e-16, + 1.10590545775231821e-17, + -1.70349853719635966e-19, + 2.22195834570832156e-21, + -5.86043553243500430e-24, + -1.41969686351378509e-24, + 9.06596576761320978e-26, + 2.20997772622799904e-02, + -3.60480521042588298e-04, + 5.87997788272413657e-06, + -9.59112111420306455e-08, + 1.56444721401816061e-09, + -2.55173071970170599e-11, + 4.16092023763331163e-13, + -6.77421586342489624e-15, + 1.09428120412424990e-16, + -1.70729812576414228e-18, + 2.28801396240054749e-20, + -9.12188228579124474e-23, + -1.27495076297043733e-23, + 8.45640757549724785e-25, + 6.34386612335690325e-02, + -1.05593405590506196e-03, + 1.75759807945116269e-05, + -2.92551371184589555e-07, + 4.86948065067789501e-09, + -8.10487907531537833e-11, + 1.34865237703233033e-12, + -2.24095107128691224e-14, + 3.69779781692766234e-16, + -5.92041622861604378e-18, + 8.35064426375468895e-20, + -5.34563501966098090e-22, + -3.44011015753310425e-23, + 2.51787671978271049e-24, + 1.31008561566182125e-01, + -2.25203805830834344e-03, + 3.87125480811988589e-05, + -6.65468636792003511e-07, + 1.14393536839533969e-08, + -1.96634739219496924e-10, + 3.37925906253321016e-12, + -5.80030744149820030e-14, + 9.89863384980490146e-16, + -1.64900441460859411e-17, + 2.49651942993717886e-19, + -2.36137973939060813e-21, + -5.75214208078070055e-23, + 5.41909090143171128e-24, + 2.33707637618923492e-01, + -4.21103672180300065e-03, + 7.58761238255318491e-05, + -1.36716538921855179e-06, + 2.46340150231043710e-08, + -4.43849904277119173e-10, + 7.99568533288708592e-12, + -1.43896875832147444e-13, + 2.57833958326511154e-15, + -4.53993415007544304e-17, + 7.49636479875879277e-19, + -9.58182350125890077e-21, + -2.81890305954372889e-23, + 9.64787883437853871e-24, + 3.89191722037353416e-01, + -7.50069752032585073e-03, + 1.44557188985361992e-04, + -2.78597720825555323e-06, + 5.36925295515501840e-08, + -1.03475915080755223e-09, + 1.99389295885416101e-11, + -3.83934858810519448e-13, + 7.37089768777869740e-15, + -1.39956047828267907e-16, + 2.56061169043744419e-18, + -4.14362574254433754e-20, + 3.89644118297719984e-22, + 1.13280171377049253e-23, + 6.37338843347625250e-01, + -1.35586414178660592e-02, + 2.88444290703385414e-04, + -6.13631375095648837e-06, + 1.30542484556322598e-07, + -2.77707736833824725e-09, + 5.90719089124214314e-11, + -1.25597993035190827e-12, + 2.66594630842711128e-14, + -5.62676180649513263e-16, + 1.16755436980277703e-17, + -2.31081578466600443e-19, + 4.00704875531896981e-21, + -4.25147952607249174e-23, + 1.10015659829037671e+00, + -2.75102963338480083e-02, + 6.87916955275371289e-04, + -1.72019079422024229e-05, + 4.30146378369867115e-07, + -1.07559985141388378e-08, + 2.68944006239537188e-10, + -6.72332567065700867e-12, + 1.67963282354766830e-13, + -4.18797779730734663e-15, + 1.03908936418255492e-16, + -2.54917678933252545e-18, + 6.10781118737767575e-20, + -1.39627292185938874e-21, +# root=8 base[22]=64.0 */ + 2.27003679403200466e-03, + -3.44414437357765617e-05, + 5.22552342383409149e-07, + -7.92826641053022970e-09, + 1.20289164082538163e-10, + -1.82504371828475371e-12, + 2.76890862350352348e-14, + -4.20020553330706050e-16, + 6.36537132925650908e-18, + -9.60233498422266652e-20, + 1.41949284283897157e-21, + -1.92778927334637085e-23, + 1.69818437690541749e-25, + 3.41714150329826273e-27, + 2.07451992650437567e-02, + -3.17654461255923056e-04, + 4.86398589121818478e-06, + -7.44782802068609671e-08, + 1.14042521529738368e-09, + -1.74623430580711411e-11, + 2.67378945328616355e-13, + -4.09337620002857507e-15, + 6.26107156856542973e-17, + -9.53535472168170452e-19, + 1.42509747934418758e-20, + -1.97069007583733008e-22, + 1.86833177093370939e-24, + 2.75984003662915646e-26, + 5.94756274654247227e-02, + -9.28156914568799242e-04, + 1.44845089138777807e-05, + -2.26040433926073972e-07, + 3.52751064816450209e-09, + -5.50489635106931311e-11, + 8.59052537650905442e-13, + -1.34037475340915428e-14, + 2.08970898253460435e-16, + -3.24559426639577404e-18, + 4.95975117290598366e-20, + -7.10289454762514919e-22, + 7.61545693026315621e-24, + 5.11754241727969270e-26, + 1.22573266147433357e-01, + -1.97144142211383823e-03, + 3.17082296530980337e-05, + -5.09988166521516115e-07, + 8.20253431768000573e-09, + -1.31927320259429568e-10, + 2.12183847290255280e-12, + -3.41220047357722351e-14, + 5.48359802461863541e-16, + -8.78519887307831291e-18, + 1.38957286213931849e-19, + -2.09277128121411790e-21, + 2.58948157035419379e-23, + -3.46187452943674000e-26, + 2.17982251906109870e-01, + -3.66356431151581598e-03, + 6.15724597661962240e-05, + -1.03483039069552241e-06, + 1.73920874387191094e-08, + -2.92302901080305384e-10, + 4.91254857501491761e-12, + -8.25535640672092842e-14, + 1.38656169491510859e-15, + -2.32350793786574746e-17, + 3.85841180822574653e-19, + -6.20040732823259554e-21, + 8.86115258479307081e-23, + -7.18099160204970187e-25, + 3.61308849746550531e-01, + -6.46478284417998771e-03, + 1.15672276391820699e-04, + -2.06968671173249041e-06, + 3.70322261753242954e-08, + -6.62604062479047639e-10, + 1.18555670963373090e-11, + -2.12108208630914909e-13, + 3.79346082720964807e-15, + -6.77422807896228226e-17, + 1.20298716662468882e-18, + -2.09662969786152004e-20, + 3.44299008829054233e-22, + -4.62227252245573885e-24, + 5.87298155078030848e-01, + -1.15138963612725336e-02, + 2.25728291464590301e-04, + -4.42537075583188198e-06, + 8.67587383718216082e-08, + -1.70088940363115675e-09, + 3.33453035471940334e-11, + -6.53690156656299973e-13, + 1.28119881117363504e-14, + -2.50903995399972314e-16, + 4.90005467470574106e-18, + -9.48951693779995623e-20, + 1.79506014149224776e-21, + -3.18822213462902044e-23, + 9.99960889580852497e-01, + -2.27300019151022957e-02, + 5.16673193219303341e-04, + -1.17444417090722182e-05, + 2.66961570070023983e-07, + -6.06826653821892139e-09, + 1.37936161162848667e-10, + -3.13531445831608214e-12, + 7.12597649673883028e-14, + -1.61910919388821330e-15, + 3.67553823810344116e-17, + -8.32426226096003572e-19, + 1.87473229253682313e-20, + -4.16906088741461623e-22, +# root=8 base[23]=68.0 */ + 2.14007211511192544e-03, + -3.06114209174877902e-05, + 4.37863324256046432e-07, + -6.26316206786694401e-09, + 8.95877683906618179e-11, + -1.28145593177811882e-12, + 1.83297992022526056e-14, + -2.62183406462699265e-16, + 3.74983918181929774e-18, + -5.36048574257156302e-20, + 7.64467004028370685e-22, + -1.07898215112943609e-23, + 1.46039596012050654e-25, + -1.65854310359613314e-27, + 1.95471504094672059e-02, + -2.82031791672656437e-04, + 4.06923412558524635e-06, + -5.87120559594287906e-08, + 8.47114056717933006e-10, + -1.22223968078312580e-11, + 1.76347771257464211e-13, + -2.54435264157225928e-15, + 3.67068021148233532e-17, + -5.29312580597217850e-19, + 7.61567846937255417e-21, + -1.08526837806933048e-22, + 1.48833750606992993e-24, + -1.74497439325222762e-26, + 5.59788255786598521e-02, + -8.22248280445168748e-04, + 1.20776423517584725e-05, + -1.77403161494280139e-07, + 2.60579672945212183e-09, + -3.82753887999925132e-11, + 5.62209076012123693e-13, + -8.25791384114805867e-15, + 1.21285401923116062e-16, + -1.78060034189597981e-18, + 2.60904178601383617e-20, + -3.79171632018694838e-22, + 5.33683650162712073e-24, + -6.62908588667394730e-26, + 1.15158979259905536e-01, + -1.74020796065466510e-03, + 2.62968963897486391e-05, + -3.97381677372554548e-07, + 6.00497456127384309e-09, + -9.07432668353952009e-11, + 1.37125082105801072e-12, + -2.07211752716661062e-14, + 3.13099797354873443e-16, + -4.72936194627600750e-18, + 7.13256896091239412e-20, + -1.06884846333383791e-21, + 1.56359324281012975e-23, + -2.09371689364012792e-25, + 2.04240647761614907e-01, + -3.21633209256455554e-03, + 5.06500162516063682e-05, + -7.97624146896418379e-07, + 1.25607909574460180e-08, + -1.97804240806778432e-10, + 3.11496787107574409e-12, + -4.90532114910686138e-14, + 7.72428778205281816e-16, + -1.21600992219162587e-17, + 1.91216249226301583e-19, + -2.99351188418558775e-21, + 4.61199549798236666e-23, + -6.72744397521201450e-25, + 3.37156186503503652e-01, + -5.62959266145115610e-03, + 9.39989085134447765e-05, + -1.56952648572810106e-06, + 2.62068292212763356e-08, + -4.37582794217601854e-10, + 7.30643437155375483e-12, + -1.21996578560993657e-13, + 2.03691795137986874e-15, + -3.40035203398695957e-17, + 5.67233984037221836e-19, + -9.43718128092930259e-21, + 1.55600275175673093e-22, + -2.49358406793313753e-24, + 5.44548122718652938e-01, + -9.89922014501001639e-03, + 1.79955738306078255e-04, + -3.27137564593378753e-06, + 5.94696148287788762e-08, + -1.08108484535182362e-09, + 1.96527833819944031e-11, + -3.57261573866269135e-13, + 6.49439350468494036e-15, + -1.18045207687094994e-16, + 2.14484671360583997e-18, + -3.89216115757823181e-20, + 7.03510994398533416e-22, + -1.25706849505857592e-23, + 9.16506739167220918e-01, + -1.90959226794404531e-02, + 3.97874066113556896e-04, + -8.28992528480038838e-06, + 1.72725156579336618e-07, + -3.59882340374692018e-09, + 7.49834227175032297e-11, + -1.56231614811946965e-12, + 3.25512786467952614e-14, + -6.78188130204948748e-16, + 1.41278316308932761e-17, + -2.94191632175299286e-19, + 6.11958335713723054e-21, + -1.26906826765086446e-22, +# root=8 base[24]=72.0 */ + 2.02418825957775958e-03, + -2.73865822271705235e-05, + 3.70531190728796199e-07, + -5.01316163323553321e-09, + 6.78263804768600500e-11, + -9.17667960027563512e-13, + 1.24157348246188108e-14, + -1.67980461470857398e-16, + 2.27269759981285233e-18, + -3.07471007234836824e-20, + 4.15872033393980364e-22, + -5.61835721775932179e-24, + 7.55236730469557511e-26, + -9.95066529424091699e-28, + 1.84799714166971538e-02, + -2.52082877637978449e-04, + 3.43862962582328616e-06, + -4.69058978261361417e-08, + 6.39837227860754290e-10, + -8.72793593634578875e-12, + 1.19056614613687731e-13, + -1.62403360242462338e-15, + 2.21530330716498694e-17, + -3.02170540308455164e-19, + 4.12069706810027084e-21, + -5.61330203542108746e-23, + 7.61128105557160309e-25, + -1.01328305449681143e-26, + 5.28705215755885041e-02, + -7.33487492919459054e-04, + 1.01758765798540948e-05, + -1.41172774118269692e-07, + 1.95852926925866886e-09, + -2.71712223622254657e-11, + 3.76953886922659282e-13, + -5.22958006843052894e-15, + 7.25508359686442536e-17, + -1.00647006344898279e-18, + 1.39595470173679256e-20, + -1.93435326437994685e-22, + 2.66991626058352388e-24, + -3.62926542622535675e-26, + 1.08590834343520432e-01, + -1.54740097259104849e-03, + 2.20502014229407051e-05, + -3.14211630566264067e-07, + 4.47746243887590257e-09, + -6.38030793392176725e-11, + 9.09182929448105423e-13, + -1.29556886906907936e-14, + 1.84615083407302753e-16, + -2.63062872452553696e-18, + 3.74783550265491092e-20, + -5.33556495754152328e-22, + 7.57302378721474245e-24, + -1.06259700993010972e-25, + 1.92129557799838258e-01, + -2.84627778980033877e-03, + 4.21658038951860828e-05, + -6.24659695658021928e-07, + 9.25393799743417816e-09, + -1.37091232108830553e-10, + 2.03091957997572337e-12, + -3.00867613027127921e-14, + 4.45713838882710068e-16, + -6.60276470309171892e-18, + 9.78008745185682891e-20, + -1.44787521446137407e-21, + 2.13905307453030566e-23, + -3.13614046620648954e-25, + 3.16031772417886325e-01, + -4.94641890672203530e-03, + 7.74196208609731728e-05, + -1.21174486162012719e-06, + 1.89658072665363180e-08, + -2.96846186523917508e-10, + 4.64613235018427373e-12, + -7.27195905481249576e-14, + 1.13817697363595836e-15, + -1.78139657447784437e-17, + 2.78789871352436447e-19, + -4.36166196291204000e-21, + 6.81554457671998686e-23, + -1.06037080407283522e-24, + 5.07602770242956414e-01, + -8.60191661314835959e-03, + 1.45769435780753191e-04, + -2.47023185197290385e-06, + 4.18609385672775725e-08, + -7.09382060888881317e-10, + 1.20212994007275342e-11, + -2.03714739221703775e-13, + 3.45217306765134660e-15, + -5.85003227501448152e-17, + 9.91300574870011229e-19, + -1.67950657651933025e-20, + 2.84389823610547697e-22, + -4.80570450035884208e-24, + 8.45918832975616097e-01, + -1.62687664130772743e-02, + 3.12881981443155466e-04, + -6.01736676388803274e-06, + 1.15726391704649027e-07, + -2.22565753080636782e-09, + 4.28039894317810022e-11, + -8.23208911735360039e-13, + 1.58319872399050141e-14, + -3.04480108083238196e-16, + 5.85565403741221732e-18, + -1.12607750313933974e-19, + 2.16515468826454390e-21, + -4.15957332646649792e-23, +# root=8 base[25]=76.0 */ + 1.92021375924548900e-03, + -2.46458127346772285e-05, + 3.16327326803058771e-07, + -4.06003968134304456e-09, + 5.21103326075829905e-11, + -6.68832566849715573e-13, + 8.58442031508175588e-15, + -1.10180439013214330e-16, + 1.41415741534325011e-18, + -1.81505296053647390e-20, + 2.32954498738752868e-22, + -2.98952927636779561e-24, + 3.83442770454998909e-26, + -4.90603354237448317e-28, + 1.75233225220964781e-02, + -2.26663617136582446e-04, + 2.93188664813067907e-06, + -3.79238601502309325e-08, + 4.90543919725511107e-10, + -6.34516992669522232e-12, + 8.20745694250323758e-14, + -1.06163183481284484e-15, + 1.37321644888860080e-17, + -1.77624324352864284e-19, + 2.29750628663203813e-21, + -2.97142101419279804e-23, + 3.84109268281717940e-25, + -4.95400356182234422e-27, + 5.00893578651388643e-02, + -6.58362389565423658e-04, + 8.65335581185035409e-06, + -1.13737613194233676e-07, + 1.49493964367876631e-09, + -1.96491246234271250e-11, + 2.58263332883099348e-13, + -3.39455040921733543e-15, + 4.46171206813361801e-17, + -5.86434300543490850e-19, + 7.70777616576956622e-21, + -1.01297371562460801e-22, + 1.33070488673985239e-24, + -1.74469226187091904e-26, + 1.02731754086218180e-01, + -1.38495349493845846e-03, + 1.86709182589430376e-05, + -2.51707504911946026e-07, + 3.39333433659006766e-09, + -4.57464226714175010e-11, + 6.16719415719121468e-13, + -8.31415419859385509e-15, + 1.12085214551315354e-16, + -1.51104485905134345e-18, + 2.03704089134698060e-20, + -2.74593087804226704e-22, + 3.70027997481818921e-24, + -4.97866705190523483e-26, + 1.81374924217156175e-01, + -2.53661043889498840e-03, + 3.54756455253160639e-05, + -4.96142965483822046e-07, + 6.93878401745744162e-09, + -9.70420361681609533e-11, + 1.35717680366322412e-12, + -1.89807308818998383e-14, + 2.65453999261473128e-16, + -3.71248461355757111e-18, + 5.19200455836649965e-20, + -7.26075680930451512e-22, + 1.01514343553833940e-23, + -1.41772398318648296e-25, + 2.97399451827833783e-01, + -4.38048199831548787e-03, + 6.45213782998769531e-05, + -9.50353924361230836e-07, + 1.39980360817453173e-08, + -2.06181096308981884e-10, + 3.03690060307988873e-12, + -4.47313795240110927e-14, + 6.58861129653024476e-16, + -9.70453683375034209e-18, + 1.42939549238077237e-19, + -2.10530503465852347e-21, + 3.10039085646361413e-23, + -4.56242857425267293e-25, + 4.75354447685307602e-01, + -7.54393129210709484e-03, + 1.19723081622851807e-04, + -1.90001946176193112e-06, + 3.01535335201926121e-08, + -4.78540142104180374e-10, + 7.59448860005808145e-12, + -1.20525427788603789e-13, + 1.91275238062531124e-15, + -3.03555718324943788e-17, + 4.81743896108839460e-19, + -7.64515370912813005e-21, + 1.21318361234001808e-22, + -1.92422062855399649e-24, + 7.85432951734772122e-01, + -1.40261220835330522e-02, + 2.50475995777346976e-04, + -4.47295582390664770e-06, + 7.98772502712763318e-08, + -1.42643374079417147e-09, + 2.54730001864721303e-11, + -4.54892301544000981e-13, + 8.12338499117171144e-15, + -1.45065889296927776e-16, + 2.59055504981028987e-18, + -4.62612703905406646e-20, + 8.26100268013759116e-22, + -1.47462047269846856e-23, +# root=8 base[26]=80.0 */ + 1.82640193822583476e-03, + -2.22968507717616353e-05, + 2.72201613419842458e-07, + -3.32305755224319465e-09, + 4.05681338796266325e-11, + -4.95258797207421355e-13, + 6.04615624627354760e-15, + -7.38119249059342376e-17, + 9.01101426851920966e-19, + -1.10007094305712938e-20, + 1.34297185683068385e-22, + -1.63948975279255696e-24, + 2.00137362746601688e-26, + -2.44219422903813966e-28, + 1.66608724984440050e-02, + -2.04904437408900714e-04, + 2.52002579539448578e-06, + -3.09926426667798660e-08, + 3.81164312373917858e-10, + -4.68776524095972411e-12, + 5.76526768835288052e-14, + -7.09043854145938929e-16, + 8.72020508436037064e-18, + -1.07245771369004719e-19, + 1.31896387994610798e-21, + -1.62211441142800020e-23, + 1.99484560802053240e-25, + -2.45231660456993237e-27, + 4.75862551948879123e-02, + -5.94216153043046176e-04, + 7.42005932366796875e-06, + -9.26553074748651396e-08, + 1.15699964498097733e-09, + -1.44476146579393736e-11, + 1.80409363208312397e-13, + -2.25279666849525931e-15, + 2.81309824795882819e-17, + -3.51275365155080898e-19, + 4.38641602040312538e-21, + -5.47732257978443279e-23, + 6.83925686337358385e-25, + -8.53692077820390764e-27, + 9.74727625280955162e-02, + -1.24680979730309332e-03, + 1.59484006642663660e-05, + -2.04001832755941703e-07, + 2.60946214254843368e-09, + -3.33785857756373175e-11, + 4.26957712712942081e-13, + -5.46137241563248125e-15, + 6.98584116976037751e-17, + -8.93584295709093956e-19, + 1.14301464339248743e-20, + -1.46205977088930727e-22, + 1.87009774537107201e-24, + -2.39127901577672052e-26, + 1.71760869412890566e-01, + -2.27486962573843904e-03, + 3.01292828325593095e-05, + -3.99044267738824143e-07, + 5.28510182268495519e-09, + -6.99980015577824081e-11, + 9.27081517861170998e-13, + -1.22786382236886471e-14, + 1.62623188622395571e-16, + -2.15384609132999992e-18, + 2.85263652616608358e-20, + -3.77812263746357125e-22, + 5.00374975800250588e-24, + -6.62515672226410590e-26, + 2.80842631071695770e-01, + -3.90641011448395435e-03, + 5.43366223436590723e-05, + -7.55800963337060169e-07, + 1.05128929907753350e-08, + -1.46230190740845124e-10, + 2.03400421698650408e-12, + -2.82921954860291291e-14, + 3.93533259407472337e-16, + -5.47389146047881140e-18, + 7.61396073942000278e-20, + -1.05906759469729197e-21, + 1.47309402317914956e-23, + -2.04846219271678917e-25, + 4.46960584961997975e-01, + -6.66981408506559133e-03, + 9.95309685598362879e-05, + -1.48526084477197550e-06, + 2.21639536812026971e-08, + -3.30743818161621431e-10, + 4.93555774361839198e-12, + -7.36513544666807237e-14, + 1.09906969455155524e-15, + -1.64009760652435764e-17, + 2.44745091400864308e-19, + -3.65222502004966846e-21, + 5.45001746169243719e-23, + -8.13073226992775054e-25, + 7.33024196940218697e-01, + -1.22172613056625301e-02, + 2.03624211088640884e-04, + -3.39379000776910833e-06, + 5.65640527480728633e-08, + -9.42748978541322082e-10, + 1.57127290778060383e-11, + -2.61882919405978267e-13, + 4.36478365102496779e-15, + -7.27475303912876306e-17, + 1.21247758023373006e-18, + -2.02082585818197615e-20, + 3.36808430279584037e-22, + -5.61193665788261396e-24, +# root=8 base[27]=84.0 */ + 1.74133185478072866e-03, + -2.02684149306282439e-05, + 2.35916343385243667e-07, + -2.74597304558626550e-09, + 3.19620415393234404e-11, + -3.72025537905448938e-13, + 4.33023030392289494e-15, + -5.04021701954472047e-17, + 5.86661349368969247e-19, + -6.82850619971741951e-21, + 7.94811019604463315e-23, + -9.25127727408065218e-25, + 1.07680630955175653e-26, + -1.25315613348404109e-28, + 1.58793572704828412e-02, + -1.86134869527163803e-04, + 2.18183828625708571e-06, + -2.55751021797797438e-08, + 2.99786586213083264e-10, + -3.51404254971310131e-12, + 4.11909525264132984e-14, + -4.82832676459195174e-16, + 5.65967472275384097e-18, + -6.63416518640305830e-20, + 7.77644372957251655e-22, + -9.11539418714059777e-24, + 1.06848413479564793e-25, + -1.25225351282684277e-27, + 4.53214868671503665e-02, + -5.39008960784535265e-04, + 6.41043972492890732e-06, + -7.62394328419577284e-08, + 9.06716445278872086e-10, + -1.07835890364096870e-11, + 1.28249347530621804e-13, + -1.52527095398433868e-15, + 1.81400648192517039e-17, + -2.15739993514861702e-19, + 2.56579785544761682e-21, + -3.05150384593586591e-23, + 3.62914102997748915e-25, + -4.31543759856618657e-27, + 9.27261330152824303e-02, + -1.12835226542552466e-03, + 1.37305287462066040e-05, + -1.67082058881058432e-07, + 2.03316382900693197e-09, + -2.47408679498794790e-11, + 3.01063071338280131e-13, + -3.66353246305588557e-15, + 4.45802602716304579e-17, + -5.42481770079125599e-19, + 6.60127241499938880e-21, + -8.03285491025246645e-23, + 9.77486889681330969e-25, + -1.18927364600673351e-26, + 1.63115030507890085e-01, + -2.05165102329824206e-03, + 2.58055429244891877e-05, + -3.24580563685289666e-07, + 4.08255476858266746e-09, + -5.13501278363483051e-11, + 6.45878813195726337e-13, + -8.12382478513845087e-15, + 1.02180978338546520e-16, + -1.28522616898766722e-18, + 1.61654958576374625e-20, + -2.03328530899554987e-22, + 2.55744738232103126e-24, + -3.21619437877025878e-26, + 2.66032699795050898e-01, + -3.50534235362643222e-03, + 4.61876492085123579e-05, + -6.08585046536630366e-07, + 8.01893504464524185e-09, + -1.05660366806634730e-10, + 1.39221892324946074e-12, + -1.83443763112958744e-14, + 2.41712087207132683e-16, + -3.18488519801181934e-18, + 4.19651880672785994e-20, + -5.52948197097788655e-22, + 7.28583172505707165e-24, + -9.59833603964307726e-26, + 4.21768841189311572e-01, + -5.93929439135586386e-03, + 8.36363771390069783e-05, + -1.17775666939810381e-06, + 1.65850174261618880e-08, + -2.33548075058789165e-10, + 3.28879385297992983e-12, + -4.63123706038240343e-14, + 6.52164825413223535e-16, + -9.18370084603864363e-18, + 1.29323685266493722e-19, + -1.82111910023700502e-21, + 2.56447406886529992e-23, + -3.61052999584158033e-25, + 6.87175196233182572e-01, + -1.07370952980312857e-02, + 1.67766846171038395e-04, + -2.62135278610568308e-06, + 4.09585718874251380e-08, + -6.39976663937447965e-10, + 9.99961940825241203e-12, + -1.56243803776416923e-13, + 2.44130553468844830e-15, + -3.81453379464042045e-17, + 5.96019943581710764e-19, + -9.31279601908427499e-21, + 1.45512149134378103e-22, + -2.27306590616802871e-24, +# root=8 base[28]=88.0 */ + 1.66383573396666914e-03, + -1.85047282442303858e-05, + 2.05804551736882792e-07, + -2.28890221767106036e-09, + 2.54565475731435353e-11, + -2.83120794475433624e-13, + 3.14879242889989638e-15, + -3.50200124949237950e-17, + 3.89483048700336984e-19, + -4.33172446875026561e-21, + 4.81762601957806857e-23, + -5.35803217501714137e-25, + 5.95905500258666018e-27, + -6.62666428256979467e-29, + 1.51678919865331774e-02, + -1.69831239982553287e-04, + 1.90155956408573900e-06, + -2.12913052753863590e-08, + 2.38393626416663802e-10, + -2.66923612155325373e-12, + 2.98867951282320685e-14, + -3.34635259806148690e-16, + 3.74683055196938347e-18, + -4.19523608337459234e-20, + 4.69730493373720909e-22, + -5.25945905280955438e-24, + 5.88888746600839092e-26, + -6.59280543154229105e-28, + 4.32625517176491864e-02, + -4.91153681012058518e-04, + 5.57599884412927597e-06, + -6.33035327062277673e-08, + 7.18676126934199889e-10, + -8.15902925705517470e-12, + 9.26283146503591756e-14, + -1.05159626280225625e-15, + 1.19386248572526062e-17, + -1.35537533135963426e-19, + 1.53873858678632548e-21, + -1.74690822950356328e-23, + 1.98323969797115240e-25, + -2.25124999143338146e-27, + 8.84204483462148472e-02, + -1.02601017135946410e-03, + 1.19055816999613881e-05, + -1.38149581330803018e-07, + 1.60305538216060852e-09, + -1.86014791613468096e-11, + 2.15847207052252166e-13, + -2.50464043140861876e-15, + 2.90632608847367573e-17, + -3.37243271253715167e-19, + 3.91329189409994715e-21, + -4.54089202787495569e-23, + 5.26914319074047938e-25, + -6.11335843594274058e-27, + 1.55298118228728355e-01, + -1.85974903111433025e-03, + 2.22711420986869134e-05, + -2.66704680084014983e-07, + 3.19388139429589006e-09, + -3.82478416112334666e-11, + 4.58031218857571562e-13, + -5.48508330424758819e-15, + 6.56857821312020872e-17, + -7.86610108062029681e-19, + 9.41992983503995156e-21, + -1.12806935005444468e-22, + 1.35090201495450784e-24, + -1.61751856551544598e-26, + 2.52706961703493216e-01, + -3.16302170829191450e-03, + 3.95901492372206432e-05, + -4.95532456358579175e-07, + 6.20236144686994455e-09, + -7.76322257482501138e-11, + 9.71688368413502624e-13, + -1.21621952249768505e-14, + 1.52228839498396431e-16, + -1.90538131747282956e-18, + 2.38488184194848799e-20, + -2.98505145818594930e-22, + 3.73625680975657770e-24, + -4.67577250462555204e-26, + 3.99266269387000106e-01, + -5.32255372923881240e-03, + 7.09540984870293216e-05, + -9.45877552057524136e-07, + 1.26093398769611404e-08, + -1.68093060023309918e-10, + 2.24082125659876271e-12, + -2.98720238853876091e-14, + 3.98219094150499461e-16, + -5.30859400396496846e-18, + 7.07680034648672102e-20, + -9.43396735559418780e-22, + 1.25762671948360375e-23, + -1.67622329324482179e-25, + 6.46726405765125412e-01, + -9.51053957017418405e-03, + 1.39858775070177366e-04, + -2.05671579617561180e-06, + 3.02453661853946024e-08, + -4.44778115376732294e-10, + 6.54075638249268884e-12, + -9.61861489490503872e-14, + 1.41448094200574520e-15, + -2.08008778473781931e-17, + 3.05890666967359375e-19, + -4.49832455846556606e-21, + 6.61508330179906927e-23, + -9.72581311507390597e-25, +# root=8 base[29]=92.0 */ + 1.59294497689035854e-03, + -1.69616401811934288e-05, + 1.80607140742487484e-07, + -1.92310053383537820e-09, + 2.04771286895628936e-11, + -2.18039978665416254e-13, + 2.32168450065179895e-15, + -2.47212412767312383e-17, + 2.63231188425798677e-19, + -2.80287942578457953e-21, + 2.98449933600760307e-23, + -3.17788777085984264e-25, + 3.38380718686709680e-27, + -3.60266075524525875e-29, + 1.45174603352078851e-02, + -1.55579721979315588e-04, + 1.66730608055865077e-06, + -1.78680713071170052e-08, + 1.91487319550375128e-10, + -2.05211815636656046e-12, + 2.19919989353709321e-14, + -2.35682343958789234e-16, + 2.52574435896517921e-18, + -2.70677236961886783e-20, + 2.90077522323733897e-22, + -3.10868285706469068e-24, + 3.33149175936883663e-26, + -3.56985965187805783e-28, + 4.13826024590201527e-02, + -4.49400443636610710e-04, + 4.88033005997575186e-06, + -5.29986603964327021e-08, + 5.75546729278051914e-10, + -6.25023415884219369e-12, + 6.78753349695109275e-14, + -7.37102159716893985e-16, + 8.00466906128110478e-18, + -8.69278782206744364e-20, + 9.44006048242821705e-22, + -1.02515721574424588e-23, + 1.11328447812556840e-25, + -1.20884488660014880e-27, + 8.44969780634705625e-02, + -9.36987223359381683e-04, + 1.03902539103735586e-05, + -1.15217554338652868e-07, + 1.27764777860978594e-09, + -1.41678397493886164e-11, + 1.57107214151580780e-13, + -1.74216233208837521e-15, + 1.93188429170137446e-17, + -2.14226702503570389e-19, + 2.37556049513453022e-21, + -2.63425968100742822e-23, + 2.92113118569559421e-25, + -3.23884455383087285e-27, + 1.48196345215333702e-01, + -1.69356748249086908e-03, + 1.93538566257010095e-05, + -2.21173215806716697e-07, + 2.52753713827373302e-09, + -2.88843473295418899e-11, + 3.30086354823402560e-13, + -3.77218153477479857e-15, + 4.31079725752860260e-17, + -4.92631990885696351e-19, + 5.62973074031474185e-21, + -6.43357896477355772e-23, + 7.35220545768631129e-25, + -8.40090163531457211e-27, + 2.40652892637004318e-01, + -2.86850933607241858e-03, + 3.41917594298194775e-05, + -4.07555380142968680e-07, + 4.85793625871789793e-09, + -5.79051236803383398e-11, + 6.90211474557302658e-13, + -8.22711099349632571e-15, + 9.80646624896773691e-17, + -1.16890097100369593e-18, + 1.39329442939380696e-20, + -1.66076460899295779e-22, + 1.97958087672642344e-24, + -2.35926491370262406e-26, + 3.79043960789123335e-01, + -4.79713115457315077e-03, + 6.07118690567373288e-05, + -7.68361532256333271e-07, + 9.72428379201388326e-09, + -1.23069273119306439e-10, + 1.55754874189834352e-12, + -1.97121346531089587e-14, + 2.49474216843656603e-16, + -3.15731329779596581e-18, + 3.99585471597320835e-20, + -5.05710184292345610e-22, + 6.40020223315897845e-24, + -8.09871544763605842e-26, + 6.10776465041671823e-01, + -8.48278983852494839e-03, + 1.17813516995407847e-04, + -1.63625706295239495e-06, + 2.27252122196297286e-08, + -3.15619887681567496e-10, + 4.38349761214000466e-12, + -6.08803566111710724e-14, + 8.45538916419355250e-16, + -1.17432961790340041e-17, + 1.63097170881398448e-19, + -2.26518063867182301e-21, + 3.14600375822851406e-23, + -4.36849539653955963e-25, +# root=8 base[30]=96.0 */ + 1.52784942447275053e-03, + -1.56038349561190994e-05, + 1.59361034823066664e-07, + -1.62754473443847573e-09, + 1.66220172047665066e-11, + -1.69759669340749544e-13, + 1.73374536794586938e-15, + -1.77066379343615875e-17, + 1.80836836097718614e-19, + -1.84687581069355477e-21, + 1.88620323912196728e-23, + -1.92636810648048318e-25, + 1.96738822100695302e-27, + -2.00907226577365857e-29, + 1.39205300117127024e-02, + -1.43049799619782597e-04, + 1.47000474508098658e-06, + -1.51060257078597110e-08, + 1.55232160610438557e-10, + -1.59519281601958525e-12, + 1.63924802068970788e-14, + -1.68451991906537788e-16, + 1.73104211315909277e-18, + -1.77884913297998563e-20, + 1.82797646212038765e-22, + -1.87846056379524943e-24, + 1.93033888452125455e-26, + -1.98344050575467750e-28, + 3.96592672359805179e-02, + -4.12754148306232027e-04, + 4.29574217623062749e-06, + -4.47079718529094763e-08, + 4.65298582922504448e-10, + -4.84259880949176232e-12, + 5.03993867387226876e-14, + -5.24532029921718369e-16, + 5.45907139386435555e-18, + -5.68153302051624947e-20, + 5.91306014031697417e-22, + -6.15402217835479394e-24, + 6.40480353251191816e-26, + -6.66508251597466788e-28, + 8.09069805048406310e-02, + -8.59068396128616720e-04, + 9.12156781308677945e-06, + -9.68525902520617011e-08, + 1.02837850145405846e-09, + -1.09192984875320101e-11, + 1.15940851827642785e-13, + -1.23105720920328622e-15, + 1.30713361894535823e-17, + -1.38791136999789591e-19, + 1.47368099404559855e-21, + -1.56475097672371168e-23, + 1.66144884485397685e-25, + -1.76392355359386557e-27, + 1.41715843835058447e-01, + -1.54870672904234923e-03, + 1.69246604167465743e-05, + -1.84956986917279383e-07, + 2.02125692138966181e-09, + -2.20888089190856728e-11, + 2.41392113145331137e-13, + -2.63799431206171569e-15, + 2.88286717398997093e-17, + -3.15047045584769584e-19, + 3.44291411776005745e-21, + -3.76250397732367938e-23, + 4.11175982934849714e-25, + -4.49289895795262742e-27, + 2.29696705561114406e-01, + -2.61329909309197198e-03, + 2.97319551591839109e-05, + -3.38265589240998460e-07, + 3.84850603507033620e-09, + -4.37851178868230911e-11, + 4.98150848898941965e-13, + -5.66754825007355722e-15, + 6.44806753574740856e-17, + -7.33607780841180535e-19, + 8.34638243347677157e-21, + -9.49582345471984563e-23, + 1.08035621706904720e-24, + -1.22898084437554695e-26, + 3.60771933652955956e-01, + -4.34584729034012164e-03, + 5.23499388650457354e-05, + -6.30605706110658814e-07, + 7.59625637012623453e-09, + -9.15042637285581875e-11, + 1.10225746374675944e-12, + -1.32777585095875797e-14, + 1.59943458617753642e-16, + -1.92667383851715275e-18, + 2.32086520578557666e-20, + -2.79570687856103012e-22, + 3.36769958213611978e-24, + -4.05613167926716761e-26, + 5.78614103921186951e-01, + -7.61308605926387487e-03, + 1.00168798086630400e-04, + -1.31796593812448232e-06, + 1.73410707449447765e-08, + -2.28164268804325585e-10, + 3.00205992609703919e-12, + -3.94994529472388744e-14, + 5.19712071557267870e-16, + -6.83808552191625846e-18, + 8.99717673763044719e-20, + -1.18379901781075666e-21, + 1.55757757489384419e-23, + -2.04902015915163345e-25, +# root=9 base[0]=0.0 */ + 1.35683006972334326e-02, + -4.43607400043899913e-04, + 1.08307401446566973e-05, + -2.33596297774629671e-07, + 4.68177075118849630e-09, + -8.90897088672236107e-11, + 1.62512578136060688e-12, + -2.85445339925645837e-14, + 4.82919035999979748e-16, + -7.85257635861952352e-18, + 1.21916250333440309e-19, + -1.78684940808575021e-21, + 2.41109764249986331e-23, + -2.84186778764373738e-25, + 1.26959051789267890e-01, + -4.16471808683120150e-03, + 9.86227733315914775e-05, + -1.95582222893770712e-06, + 3.32300971964937518e-08, + -4.68796403126265395e-10, + 4.77879088620894210e-12, + -9.28655496553580231e-15, + -1.09548768179586079e-15, + 3.44628456148186799e-17, + -6.65550324572800706e-19, + 8.44060761715827021e-21, + -2.70144596932032470e-23, + -2.17021342534255759e-24, + 3.82475025320030360e-01, + -1.26272764368530275e-02, + 2.81003753650410301e-04, + -4.64960289997075985e-06, + 5.08117320639066962e-08, + -7.24415327865169724e-11, + -1.14242806831328651e-11, + 2.68213744634426282e-13, + -2.23616892554526461e-15, + -4.42298424767661022e-17, + 1.89658143008142580e-18, + -2.85262577010708171e-20, + -7.17586866285387042e-23, + 1.36970789168609407e-23, + 8.54564317729498812e-01, + -2.84670349296474966e-02, + 5.75812949400783558e-04, + -6.97622889730326947e-06, + 1.26779729126555084e-08, + 1.28391642290517352e-09, + -1.90296475066133231e-11, + -1.79886575231349398e-13, + 9.54482510802416555e-15, + -6.52267201412179850e-17, + -3.05562107718715173e-18, + 7.44548358319878461e-20, + 2.45079971705169757e-22, + -3.84613616287432794e-23, + 1.71690005489939201e+00, + -5.78078594319405212e-02, + 1.02654767018898682e-03, + -7.38602240134023570e-06, + -8.20653920292212270e-08, + 1.62699750354024151e-09, + 2.19076876077530942e-11, + -6.35496402298929813e-13, + -6.77451643111233030e-15, + 2.90641021370221109e-16, + 2.03642275621707276e-18, + -1.42344572934671191e-19, + -4.65098899530524006e-22, + 7.18781221689112524e-23, + 3.41283238063643335e+00, + -1.16220126895126702e-01, + 1.75240037654669279e-03, + -4.74641118249211270e-06, + -1.65505320355898543e-07, + -7.16713523991772078e-10, + 4.48858682718828214e-11, + 6.62717413336642953e-13, + -1.21144750077762048e-14, + -3.92583636762534218e-16, + 1.96689238746750901e-18, + 2.02302050662366260e-19, + 8.68115821796522659e-22, + -9.31820022411102726e-23, + 7.32877043805366402e+00, + -2.52250033264349083e-01, + 3.15267331365191731e-03, + 8.98594980113704288e-07, + -1.41164087044512909e-07, + -3.43642167953206522e-09, + -2.57241309607894672e-11, + 7.03842823092457765e-13, + 2.41310744852497647e-14, + 1.98928834880051355e-16, + -6.42188319001159534e-18, + -2.23760234919659103e-19, + -1.70334223814256608e-21, + 7.09208427126124898e-23, + 1.97616655371919165e+01, + -6.86052525102584743e-01, + 7.11925995278420848e-03, + 7.84922270903972781e-06, + 1.66790282511384717e-08, + -2.06539232655644243e-09, + -6.72794375874714943e-11, + -1.26653189546463165e-12, + -1.28483503000877045e-14, + 1.00045145901093778e-16, + 8.02065826765291361e-18, + 1.99172627740952798e-19, + 2.64023898787686345e-21, + -5.66531849953565045e-24, + 1.09356031967805251e+02, + -3.81648916112280956e+00, + 3.45728498445044483e-02, + 1.30080033282947810e-05, + 1.96381383782992627e-07, + 2.61016479351778289e-09, + 2.62443172718592758e-11, + 4.40379375622037807e-14, + -7.34142870376132676e-15, + -2.72415705105442877e-16, + -7.03071911724925824e-18, + -1.52546795224574005e-19, + -2.92029390849295569e-21, + -5.00711114154680868e-23, +# root=9 base[1]=2.5 */ + 1.19510447226312978e-02, + -3.67023540047811442e-04, + 8.42442632875218725e-06, + -1.71066525012038962e-07, + 3.23329541094770912e-09, + -5.81624373495036100e-11, + 1.00563951339610486e-12, + -1.68084123524682386e-14, + 2.71803656773374680e-16, + -4.25535606224040552e-18, + 6.41523270492337022e-20, + -9.29562520327600475e-22, + 1.26643960684875676e-23, + -1.62546167511558546e-25, + 1.11741372388522123e-01, + -3.46124954784381676e-03, + 7.80533914410993216e-05, + -1.49306321473529396e-06, + 2.49637964002770913e-08, + -3.60206935895791920e-10, + 4.18191052126930861e-12, + -2.89383264130566886e-14, + -2.50112219868663909e-16, + 1.46164025271407516e-17, + -3.46972658435832963e-19, + 5.75726323369122142e-21, + -6.54494785717104299e-23, + 1.32214972262971920e-25, + 3.36127869116798039e-01, + -1.05888014184089673e-02, + 2.29996972468710022e-04, + -3.86070935980000389e-06, + 4.71830607916780527e-08, + -2.65598855241895797e-10, + -5.06522735465263841e-12, + 1.83390970265145469e-13, + -2.75976582164760921e-15, + 7.44822657294611922e-18, + 7.44050541748471080e-19, + -2.12551594620011896e-20, + 2.65136371549665942e-22, + 1.03180089540127479e-24, + 7.49386222526950085e-01, + -2.41901576777666903e-02, + 4.94079032263172627e-04, + -6.59389574157480269e-06, + 3.35478102538541954e-08, + 7.98422671216504255e-10, + -2.02745664525019331e-11, + 7.07461510932843358e-14, + 5.77245165260739972e-15, + -1.24417718732052403e-16, + -8.01386098757611895e-20, + 5.16453789001113134e-20, + -9.05720154290512159e-22, + -5.84144679498887172e-24, + 1.50150398514556915e+00, + -4.99697016797023899e-02, + 9.31186165471306442e-04, + -8.41654517366483370e-06, + -4.57934099495526468e-08, + 1.92468561144052965e-09, + 2.69322083032876675e-12, + -6.81269778681632429e-13, + 3.67899980428641384e-15, + 2.52764826726229666e-16, + -3.51390096892971305e-18, + -8.73012370898809194e-20, + 2.31736659798854912e-21, + 2.28460050942574326e-23, + 2.97556507424969618e+00, + -1.02474450631743041e-01, + 1.67928649225979922e-03, + -7.44527681633035838e-06, + -1.67842374058394804e-07, + 5.27332056460542190e-10, + 5.60994406001099236e-11, + 8.14887609551163427e-14, + -2.27133421493965605e-14, + -1.42653058246540640e-16, + 9.88288349437619170e-18, + 1.13990335260696600e-19, + -4.44078696041886691e-21, + -7.97894573794092396e-23, + 6.37022005152403992e+00, + -2.27029312250787263e-01, + 3.14755023394289526e-03, + -1.93506825316283260e-06, + -2.13998998630135287e-07, + -3.72570082555989449e-09, + 5.40160706731629180e-12, + 1.52103438520981087e-12, + 2.42048414954320059e-14, + -2.60758481668076113e-16, + -1.61523312999876015e-17, + -1.62701850934108909e-19, + 5.23177802914421418e-21, + 1.79297802278814241e-22, + 1.71319616078805979e+01, + -6.28720918513702487e-01, + 7.21336965126116638e-03, + 7.68506673737020449e-06, + -4.38648205255667499e-08, + -4.14610772034891930e-09, + -1.07405828772225036e-10, + -1.53891108317722740e-12, + -1.05097744651529928e-15, + 6.28537429561859083e-16, + 1.89693385281740133e-17, + 2.70223926899673718e-19, + -1.07745733993476690e-21, + -1.68761266597541180e-22, + 9.46443104500628181e+01, + -3.53922437300646164e+00, + 3.47496317606406507e-02, + 1.66017580480392832e-05, + 2.54799280329066014e-07, + 3.21689953050908634e-09, + 2.22371054818891343e-11, + -4.18112385155432575e-13, + -2.42843055968473454e-14, + -7.40446690620158796e-16, + -1.80034393175912484e-17, + -3.79745406555666239e-19, + -7.18737411346919155e-21, + -1.23261413139090115e-22, +# root=9 base[2]=5.0 */ + 1.06058751979215011e-02, + -3.07040481816570055e-04, + 6.64748671402196798e-06, + -1.27472421536485109e-07, + 2.27781610096820653e-09, + -3.88175169472969525e-11, + 6.36857347560821744e-13, + -1.01369423391223731e-14, + 1.56372879392830908e-16, + -2.35497005714759095e-18, + 3.40675271471668524e-20, + -4.86733326339277888e-22, + 6.50862073046984111e-24, + -7.81910489336870220e-26, + 9.90406628042979076e-02, + -2.90221279821656526e-03, + 6.23123050811907609e-05, + -1.14610875798937517e-06, + 1.86947610155094805e-08, + -2.70067062748696373e-10, + 3.32219899482783426e-12, + -3.07595499817607394e-14, + 7.92291623749498043e-17, + 4.92859073199011564e-18, + -1.57446902243415494e-19, + 3.02141877155812495e-21, + -4.54518439092151567e-23, + 5.17311254309683670e-25, + 2.97176742790256854e-01, + -8.92174456337485947e-03, + 1.88005691750694717e-04, + -3.15331005978539024e-06, + 4.10214508460679766e-08, + -3.35112262297831673e-10, + -1.09487915595090453e-12, + 1.03508644803775220e-13, + -2.14715731487860422e-15, + 2.22295350078300763e-17, + 8.28183698575715560e-20, + -9.32194800866760336e-21, + 2.05836232926936449e-22, + -2.10565703531261504e-24, + 6.60043991962039445e-01, + -2.05438608882748570e-02, + 4.18616821973708030e-04, + -5.95482459160059727e-06, + 4.49013652310660485e-08, + 3.52411833878039754e-10, + -1.63634761363125461e-11, + 1.86844191845858262e-13, + 1.66462001060846993e-15, + -9.51501816883319744e-17, + 1.23594832378995513e-18, + 1.00694743488216314e-20, + -6.87740772573101709e-22, + 1.03833724848678859e-23, + 1.31587076307937645e+00, + -4.29337448785612197e-02, + 8.27056193107107186e-04, + -8.84392749109078925e-06, + -8.09803403167470115e-09, + 1.78100930604783946e-09, + -1.35930416754415535e-11, + -4.50539220516113275e-13, + 9.63523803769123557e-15, + 6.96776765471368273e-17, + -4.81223822136642212e-18, + 2.41004669229716133e-20, + 1.83900750798296369e-21, + -3.21429406804136174e-23, + 2.59190721596412210e+00, + -8.94419105622929617e-02, + 1.57441379251181506e-03, + -9.97396243460120665e-06, + -1.44081158296829960e-07, + 1.81711646664154975e-09, + 4.80137872892175743e-11, + -6.45613437670363035e-13, + -2.01737638776580755e-14, + 2.80493503988011127e-16, + 9.37940562472808036e-18, + -1.39606375213480553e-19, + -4.74748000137456749e-21, + 7.49376074747603669e-23, + 5.51222705145427483e+00, + -2.02005540926569194e-01, + 3.10139238590208689e-03, + -5.93222269562591795e-06, + -2.83368453920635957e-07, + -3.01084749901503658e-09, + 5.64805147453334637e-11, + 2.01245736856397563e-12, + 2.37468067148932328e-15, + -9.44065629987809311e-16, + -1.46954219592254296e-17, + 2.86359808310692482e-19, + 1.21099713873374185e-20, + 1.97177220769001481e-23, + 1.47330495264586450e+01, + -5.70664293269662837e-01, + 7.29814981759320438e-03, + 6.16539985398450605e-06, + -1.55964727672587699e-07, + -7.21804193186125992e-09, + -1.46396938516079596e-10, + -1.04330937679071776e-12, + 3.76659392544906090e-14, + 1.56808189381131745e-15, + 2.53264319789797975e-17, + -1.09076086048701194e-19, + -1.70343125776608351e-20, + -4.21949500959816539e-22, + 8.10447732935200236e+01, + -3.26035607849479758e+00, + 3.49755151918264701e-02, + 2.12163159178740564e-05, + 3.22946484249609354e-07, + 3.49175707611926082e-09, + -5.57106433668435142e-12, + -1.80045332637189376e-12, + -6.90342723706409426e-14, + -1.92070941670958633e-15, + -4.46846384565424639e-17, + -8.77719581003771707e-19, + -1.20303340548188739e-20, + 9.04765993695837991e-23, +# root=9 base[3]=7.5 */ + 9.47518830288169439e-03, + -2.59413746548616062e-04, + 5.31331731509419074e-06, + -9.64949538383912720e-08, + 1.63394199690794041e-09, + -2.64433849366212829e-11, + 4.11990189760411228e-13, + -6.26336718947366526e-15, + 9.17091030743309873e-17, + -1.34037372739754686e-18, + 1.84248368828047630e-20, + -2.42073724579396595e-22, + 4.24456406564499787e-24, + -1.47824835525975611e-26, + 8.83483755149239713e-02, + -2.45402638598674538e-03, + 5.01887018502326842e-05, + -8.86157121299416486e-07, + 1.40230217622824016e-08, + -2.00256727231142199e-10, + 2.51576856020376224e-12, + -2.63751665586797589e-14, + 1.70224928702937133e-16, + 7.48151986608378863e-19, + -6.24233282659059696e-20, + 1.53555587373059489e-21, + -1.57335754621557915e-23, + 5.91047311606040264e-25, + 2.64273278356597474e-01, + -7.55841436594483634e-03, + 1.53880608514435981e-04, + -2.55115725697888059e-06, + 3.42542319698902201e-08, + -3.33629153633345142e-10, + 9.62443110670005133e-13, + 4.75995673989513666e-14, + -1.36237790397817037e-15, + 1.98799273038219622e-17, + -1.45421224379124658e-19, + -1.73436319627081380e-21, + 1.21138877603712524e-22, + -9.56061605790747819e-25, + 5.84131635756582002e-01, + -1.74681385463809104e-02, + 3.51637969811397714e-04, + -5.19950485639964770e-06, + 4.84650910796228475e-08, + 2.56752903481790256e-11, + -1.08304998025594105e-11, + 1.95214771384661339e-13, + -8.37672055936523722e-16, + -4.45305779961738807e-17, + 1.15531755516991576e-18, + -9.14995271497656268e-21, + -1.20325126192824024e-22, + 9.68297102841528685e-24, + 1.15669683573968785e+00, + -3.67414332283524520e-02, + 7.21259530148650376e-04, + -8.70990495740478128e-06, + 2.34232997681471973e-08, + 1.33930203686096260e-09, + -2.17607727044782600e-11, + -1.35856449506894215e-13, + 9.12441695232394619e-15, + -8.19599486000684322e-17, + -2.43728013399237183e-18, + 7.01092972737499075e-20, + 1.53029515207236456e-22, + -2.46801154942419889e-23, + 2.25852095700822497e+00, + -7.73614070633018847e-02, + 1.44227691295386196e-03, + -1.19332289053863695e-05, + -9.80089049319140099e-08, + 2.69113042780861538e-09, + 2.28467251847257485e-11, + -1.07251721896339479e-12, + -5.28250084223186184e-15, + 4.84185524711447896e-16, + 1.29543460525943883e-19, + -2.30190955892434120e-19, + 1.42888170508179736e-21, + 1.25953141834752339e-22, + 4.75326218750001139e+00, + -1.77560228492679911e-01, + 3.00130552958207579e-03, + -1.08553258012533602e-05, + -3.25566971659056054e-07, + -1.00520575579459311e-09, + 1.08167097289959877e-10, + 1.46581330301213324e-12, + -3.76622518026021546e-14, + -1.11994693042312364e-15, + 9.21934358491884678e-18, + 7.25093095437361004e-19, + 2.65805309747402622e-21, + -3.73097143973476879e-22, + 1.25675553577486063e+01, + -5.12037826477083624e-01, + 7.35176006310081075e-03, + 2.31742674242575418e-06, + -3.36878001763054274e-07, + -1.08873141775526701e-08, + -1.48993711892891864e-10, + 1.23376820134394461e-12, + 1.08437270250685016e-13, + 2.16859928416898661e-15, + -4.75700566686811995e-18, + -1.38870306441172729e-18, + -3.22502526140090518e-20, + 6.20312977477298602e-23, + 6.85647004828412463e+01, + -2.97944057867623524e+00, + 3.52633351679806500e-02, + 2.69122894770078101e-05, + 3.85748485280041090e-07, + 2.42521493645018028e-09, + -1.00244790178445457e-10, + -5.54447662877176779e-12, + -1.80785791343254647e-13, + -4.58319745954601732e-15, + -8.77191841349755578e-17, + -6.84231988192270040e-19, + 4.01244000953651247e-20, + 2.40995062278664617e-21, +# root=9 base[4]=10.0 */ + 8.51579128091276699e-03, + -2.21131510794776059e-04, + 4.29637420056573380e-06, + -7.40997740255178296e-08, + 1.19128833308263200e-09, + -1.83684433180625161e-11, + 2.71358180988829714e-13, + -3.97582277213599343e-15, + 5.46851939219585906e-17, + -7.58518616832784291e-19, + 1.20460849218847221e-20, + -5.39848203942662208e-23, + 3.34826021865327758e-24, + -4.41771836753607076e-26, + 7.92729501678586940e-02, + -2.09152232868324572e-03, + 4.07788246389576798e-05, + -6.90789130472526304e-07, + 1.05650868104522991e-08, + -1.48114058213209883e-10, + 1.85485630098993074e-12, + -2.08558540063883920e-14, + 1.67224379746202921e-16, + -5.19847628864525551e-19, + -1.96104465487944032e-21, + 1.37487899978471914e-21, + 3.59069647754454753e-24, + -5.09960078573192420e-26, + 2.36320320328654410e-01, + -6.44100493961646207e-03, + 1.26340040272024308e-04, + -2.05484260968334900e-06, + 2.78977842883441402e-08, + -2.98844172364283030e-10, + 1.78408334900598893e-12, + 1.42785056193559844e-14, + -7.55337916535167147e-16, + 1.40967667490406535e-17, + -1.08749087544145065e-19, + 3.04468070452526866e-21, + 7.25871437782514165e-23, + -1.62304035260257458e-24, + 5.19508684104192486e-01, + -1.48914722972494397e-02, + 2.93872669292147184e-04, + -4.43229037605194062e-06, + 4.68011795350739065e-08, + -1.72876350291296540e-10, + -5.92194779603298453e-12, + 1.50855454617339672e-13, + -1.70980823153960720e-15, + -6.53417259330215976e-18, + 7.70382251578981617e-19, + -5.98791344621895260e-21, + 1.69259426821661806e-22, + 1.09814549110118104e-25, + 1.02062074368739264e+00, + -3.13812140543114904e-02, + 6.19779137055594511e-04, + -8.14995997168829861e-06, + 4.48356124875635074e-08, + 8.01139999426685653e-10, + -2.20198438950821615e-11, + 9.61038060784513823e-14, + 5.15410350401584478e-15, + -1.19274153819251836e-16, + 4.63220936036328057e-19, + 5.59203441139867975e-20, + -6.01122480068071617e-22, + -8.77850078914519324e-24, + 1.97121277275037077e+00, + -6.64184124730397563e-02, + 1.29151368015400039e-03, + -1.30513494602043494e-05, + -4.11672761140222178e-08, + 2.87567064303096328e-09, + -7.02787434634945295e-12, + -9.79420111801359483e-13, + 1.01335517007669460e-14, + 3.26551048865994610e-16, + -6.66688434463393658e-18, + -5.17310045872422250e-20, + 4.72617976951121127e-21, + -1.79333927373991894e-23, + 4.09009135027480930e+00, + -1.54159947850424028e-01, + 2.83961191568638015e-03, + -1.60731158311272047e-05, + -3.17234189200817421e-07, + 1.91396458854179375e-09, + 1.27142873277908398e-10, + -2.51701445505371068e-13, + -6.38653764302482177e-14, + -1.51355577632355197e-16, + 3.63663349657204872e-17, + 3.37138166168680988e-19, + -1.82830976354111971e-20, + -3.08466656954858269e-22, + 1.06370556766993882e+01, + -4.53221861234788304e-01, + 7.33946493391769619e-03, + -4.98919511608803561e-06, + -5.85267721299165093e-07, + -1.35891220075917687e-08, + -5.52118122546788180e-11, + 5.77143617478865708e-12, + 1.64627515302754820e-13, + 3.67110301799274637e-16, + -9.18788394551510048e-17, + -2.21954709139680721e-18, + 1.22473042903546599e-20, + 1.69486141008843286e-21, + 5.72133483974310408e+01, + -2.69593466415142480e+00, + 3.56243144166279238e-02, + 3.32748400405407025e-05, + 3.93503477699779852e-07, + -2.67450846710823335e-09, + -3.66193922629884368e-10, + -1.46491728998131799e-11, + -4.06872455481383630e-13, + -7.54092889220591566e-15, + -1.43422634166815031e-17, + 5.71966010754942620e-18, + 2.49409752300097645e-19, + 4.75609260865404615e-21, +# root=9 base[5]=12.5 */ + 7.69479896928558678e-03, + -1.90019071492975559e-04, + 3.51046814115794501e-06, + -5.76588438787596581e-08, + 8.80955024899942881e-10, + -1.30159575595403619e-11, + 1.81077059569059092e-13, + -2.57209652387063040e-15, + 3.58206133398918699e-17, + -2.89828805017034004e-19, + 1.17992085458220987e-20, + -3.47855784732195330e-24, + -2.47118815702404456e-24, + -1.80406145326165437e-25, + 7.15106008910675744e-02, + -1.79578626751508816e-03, + 3.34131662782746576e-05, + -5.43215130289124511e-07, + 8.00372936066506032e-09, + -1.10015262532785627e-10, + 1.34358003102935869e-12, + -1.56998748452605655e-14, + 1.61735073319921580e-16, + 5.98454737086669838e-19, + 5.46242433183574383e-20, + 8.64873900773789938e-22, + -3.80898115127914960e-23, + -1.52945692054740186e-24, + 2.12431706690279248e-01, + -5.52176749835943132e-03, + 1.04170680802106029e-04, + -1.65387412362077965e-06, + 2.23692528842700319e-08, + -2.53513598673519517e-10, + 1.91754806983084348e-12, + -2.30485886386637686e-15, + -2.87550267137511275e-16, + 1.30188646248755293e-17, + 5.55656907882126326e-20, + 2.98120616738660169e-21, + -1.08696238383698617e-22, + -5.31391517973194171e-24, + 4.64325473716788728e-01, + -1.27408172281689679e-02, + 2.45042639575537987e-04, + -3.71752980922583636e-06, + 4.22323905443112425e-08, + -2.70513342385283625e-10, + -2.45928796473139054e-12, + 9.79382733657219351e-14, + -1.43515974624357086e-15, + 2.09037732495617562e-17, + 6.23949874123714128e-19, + -3.43922996616190198e-21, + -1.74082448186142569e-22, + -1.23149590302617343e-23, + 9.04411551028789562e-01, + -2.68009468354419057e-02, + 5.26722777109409567e-04, + -7.33192011411491353e-06, + 5.58719165100378504e-08, + 3.19860948279103016e-10, + -1.76148411696869623e-11, + 2.00142395249260556e-13, + 1.69636254648152728e-15, + -6.18467723182742903e-17, + 2.10112917748760583e-18, + 1.33374024981708838e-20, + -1.25969629454831553e-21, + -1.76084706648254734e-23, + 1.72520126603304313e+00, + -5.67196970127342229e-02, + 1.13279006164923157e-03, + -1.32676271158659676e-05, + 1.26667398712447088e-08, + 2.42354103659931551e-09, + -2.85189101728252297e-11, + -5.19299857392713803e-13, + 1.70860467376908919e-14, + 7.17538159436305690e-17, + -5.00482607478549308e-18, + 9.03356722017973335e-20, + 2.33232034787081127e-22, + -1.25770321142067226e-22, + 3.51754713276191255e+00, + -1.32296892085975365e-01, + 2.61806382785033940e-03, + -2.06833475361893901e-05, + -2.50188383291702903e-07, + 4.65529312309758522e-09, + 9.27502103953598737e-11, + -2.09003703233671413e-12, + -4.22082555151854266e-14, + 1.30411772644046316e-15, + 2.86896161576490141e-17, + -6.97703526610490339e-19, + -1.96473606769312339e-20, + 2.74725216895588474e-22, + 8.94096831124289437e+00, + -3.94925623207942389e-01, + 7.21438253675389229e-03, + -1.65342079548861378e-05, + -8.54189502281948834e-07, + -1.23971953243007577e-08, + 1.76075652442197933e-10, + 1.03750016092662814e-11, + 9.22659010551180717e-14, + -4.74102263918585393e-15, + -1.42001535757082171e-16, + 7.15638187440136907e-19, + 1.05504034487169140e-19, + 1.10576672773091677e-21, + 4.70022685120383841e+01, + -2.40924390202655658e+00, + 3.60576252232622865e-02, + 3.84964017187803097e-05, + 2.10271827014463908e-07, + -1.80947836708569114e-08, + -9.96226036540164185e-10, + -3.13891597536970730e-11, + -5.90558490851502688e-13, + 1.12767914259654235e-15, + 5.60717918045507915e-16, + 2.07089400118045159e-17, + 2.64679444752270580e-19, + -8.22628358592646060e-21, +# root=9 base[6]=15.0 */ + 6.98682209928915519e-03, + -1.64481693708760587e-04, + 2.89524653323228096e-06, + -4.54322401445979108e-08, + 6.58901026308395711e-10, + -9.41125623304430911e-12, + 1.24168674640857739e-13, + -1.50552147363346354e-15, + 3.32668601560539319e-17, + 1.08667708315681256e-19, + 5.52310374701774032e-21, + -3.58019510705288930e-22, + -1.16928797900462296e-23, + -1.04851666155834917e-25, + 6.48236485794125572e-02, + -1.55253478748192618e-03, + 2.75956257600007716e-05, + -4.31144402533770267e-07, + 6.09344161888180668e-09, + -8.24236122024865785e-11, + 9.82905916250329423e-13, + -9.72812263625126229e-15, + 2.24639399600266723e-16, + 2.70072844541179810e-18, + 2.21632405634856349e-20, + -2.99904743577562483e-21, + -1.17388430345169844e-22, + -8.45071383307918596e-25, + 1.91893775172136516e-01, + -4.76207283336852784e-03, + 8.63123278334760604e-05, + -1.33406268747885391e-06, + 1.77504987394170176e-08, + -2.08854212624446305e-10, + 1.79856062846203977e-12, + -3.45581654475443869e-15, + 2.31235764101821077e-16, + 1.53073552012552121e-17, + -2.85716035707952952e-20, + -8.91101519892770896e-21, + -3.62615874306208127e-22, + -2.38185225382362679e-24, + 4.17016008890185697e-01, + -1.09478580618834649e-02, + 2.04300010021937414e-04, + -3.08745108859005046e-06, + 3.64307409123362364e-08, + -3.00962430144333796e-10, + -2.15350797183374681e-13, + 6.83299452617489594e-14, + -3.09785296953836303e-16, + 3.79964684056918733e-17, + 5.50644229987614039e-20, + -2.72551914597992797e-20, + -7.54637676025254539e-22, + -4.74240158702436690e-24, + 8.05100022004386240e-01, + -2.29235528331287186e-02, + 4.44245568794195351e-04, + -6.40776630656706425e-06, + 5.85206092509558539e-08, + -3.09838794504884319e-11, + -1.14691137820583208e-11, + 2.34972550464778332e-13, + 9.38335924526481432e-16, + 1.29622705062869554e-17, + 1.05307142650363334e-18, + -6.63097844344422897e-20, + -1.87829788952576204e-21, + 3.75300129227604027e-24, + 1.51544817128415055e+00, + -4.82873550586092395e-02, + 9.76262826414879873e-04, + -1.27181950787202954e-05, + 5.34402462799413977e-08, + 1.62757366917323774e-09, + -3.52498772397913631e-11, + 3.71975133722461771e-14, + 1.68897347319730862e-14, + -6.75312441873054818e-17, + -2.88263382795143832e-18, + -3.18437026584384903e-20, + -4.36401888523760614e-21, + -1.71562913127631993e-23, + 3.02859076672156879e+00, + -1.12405479363668737e-01, + 2.34925021050116098e-03, + -2.38425918631875933e-05, + -1.40144125570468687e-07, + 6.07596262352199305e-09, + 2.35384498098199849e-11, + -2.54208444354237761e-12, + 1.59544810150687882e-14, + 1.62815657195007840e-15, + -1.57050877531009251e-17, + -1.12945925950104565e-18, + 3.76606445758520022e-21, + 5.16539434152764364e-22, + 7.47508898294085533e+00, + -3.38253389859445919e-01, + 6.92681062682932135e-03, + -3.18527971296829121e-05, + -1.03542253531314213e-06, + -4.54540123332725661e-09, + 4.75251350280649461e-10, + 9.65526461090999088e-12, + -1.58897184337878578e-13, + -8.24618283912427338e-15, + 2.23060029651942318e-18, + 5.38895997402379402e-18, + 4.77609061467199829e-20, + -3.50374674806576998e-21, + 3.79451724986688390e+01, + -2.11891545538057757e+00, + 3.65227133564943671e-02, + 3.73316325571072111e-05, + -4.72071396534662919e-07, + -5.44471695558643347e-08, + -2.09169561386416990e-09, + -4.33971290004213939e-11, + 8.94972045824526810e-14, + 4.29075551094178430e-14, + 1.46536467061874972e-15, + 1.08223670375228848e-17, + -9.36098546756546144e-19, + -3.68919846818053630e-20, +# root=9 base[7]=17.5 */ + 6.37200182561539243e-03, + -1.43334563223338689e-04, + 2.40759337515946395e-06, + -3.62458231658295087e-08, + 4.97701434350884521e-10, + -6.81258328842119478e-12, + 9.75808544379178521e-14, + -3.76822623251592847e-16, + 3.58012118929368061e-17, + -1.55300052482423014e-19, + -2.26135238344068026e-20, + -8.69895005415541299e-22, + -4.86791154771828970e-24, + 4.47664156223526904e-25, + 5.90244571759787062e-02, + -1.35092464973880734e-03, + 2.29564001817521685e-05, + -3.45632255405771325e-07, + 4.66337891364188266e-09, + -6.12025394120966036e-11, + 8.24997977373026243e-13, + -1.17271028279329220e-15, + 2.90613842869447821e-16, + -7.26870960736524847e-19, + -2.31393915687889323e-19, + -7.98404726887710529e-21, + -4.54345999884886638e-23, + 4.35372527096648519e-24, + 1.74131509060803019e-01, + -4.13108338536600540e-03, + 7.18773368444189381e-05, + -1.08113766002212020e-06, + 1.40036065890931666e-08, + -1.65537226855976365e-10, + 1.88068522053657119e-12, + 1.14616596985762199e-14, + 6.20090895402304488e-16, + 1.21235344612409753e-18, + -7.89622460966568948e-19, + -2.38234512091921048e-20, + -1.18265868512465429e-22, + 1.38724750663696753e-23, + 3.76272118402697808e-01, + -9.45220255684642470e-03, + 1.70550166736987822e-04, + -2.55234789649926134e-06, + 3.05141880314210030e-08, + -2.83083071777084993e-10, + 1.75101605430655661e-12, + 7.77400786220651687e-14, + 7.11884410636581008e-16, + 5.77846018046467170e-18, + -1.88842247082944761e-18, + -5.62454181821578009e-20, + -1.24709653585658362e-22, + 3.31999198129302911e-23, + 7.20049050821540582e-01, + -1.96613763435655661e-02, + 3.72907731114296504e-04, + -5.48904465326616864e-06, + 5.57011483596613641e-08, + -2.23346409564846483e-10, + -4.38187577577155745e-12, + 2.73396034222942059e-13, + 1.23764867380484274e-15, + -2.67954614390139784e-17, + -3.48847678987510737e-18, + -1.24681800062558577e-19, + 9.56055953796757540e-23, + 7.86269156292247749e-23, + 1.33697578727784028e+00, + -4.10710086948850792e-02, + 8.29703584527882688e-04, + -1.16472898592307225e-05, + 7.79189029936645277e-08, + 8.51971100964145535e-10, + -2.71995744548369987e-11, + 5.10185479400650723e-13, + 1.15081095474027489e-14, + -2.68028761842076954e-16, + -8.26351897494038268e-18, + -1.77450114624939440e-19, + 5.79940774760304782e-23, + 1.84972166720921839e-22, + 2.61470328886657777e+00, + -9.47847201149102647e-02, + 2.05373260067193792e-03, + -2.51045797538423038e-05, + -1.82363339159244486e-08, + 5.89196739276828030e-09, + -3.30763339781074895e-11, + -1.30525327916198650e-12, + 5.24333760639882456e-14, + 1.48312395781937813e-16, + -5.28156357622215264e-17, + -3.89631252739609576e-19, + 2.47079182752598607e-20, + 2.61517671204259247e-22, + 6.23008243412036489e+00, + -2.84651954286752273e-01, + 6.44440278570034171e-03, + -4.84489265251650969e-05, + -9.94465290866023265e-07, + 9.26834472361989725e-09, + 6.32664535279256075e-10, + 3.12254582962805571e-13, + -3.96297104416033583e-13, + -3.48638917283818505e-15, + 2.15039245581364704e-16, + 2.58428520364834866e-18, + -1.55728888642653930e-19, + -2.37055370226651055e-21, + 3.00563962004507275e+01, + -1.82517266568476821e+00, + 3.68795368446417984e-02, + 1.79543650188838437e-05, + -2.15222366381949536e-06, + -1.17069660852138875e-07, + -2.95357902101366748e-09, + -4.65222197811801175e-12, + 2.63229651356103969e-12, + 9.09161794047301668e-14, + 2.83929323803615015e-16, + -7.70284138388062688e-17, + -2.38804843968273929e-18, + 4.16340206732120973e-21, +# root=9 base[8]=20.0 */ + 5.83460887948858940e-03, + -1.25687778175292086e-04, + 2.01633422008207295e-06, + -2.92467686668866444e-08, + 3.84632907235787419e-10, + -4.48107436272783949e-12, + 1.00548146670038148e-13, + 4.30189655835673250e-16, + 4.89557115538037315e-18, + -1.77731831108679246e-18, + -5.35717787097598562e-20, + -1.50952599183296502e-22, + 4.40960285435625460e-23, + 1.50532130360557851e-24, + 5.39634698403940877e-02, + -1.18268137797521091e-03, + 1.92196014166065491e-05, + -2.79728132694729625e-07, + 3.63970839421229247e-09, + -4.08509408820085536e-11, + 9.01695768702063779e-13, + 5.23858591337438382e-15, + 1.52013261481391561e-17, + -1.65283730371422014e-17, + -5.11264361119624412e-19, + -1.06474514428048262e-21, + 4.19858600285975259e-22, + 1.41751505153456370e-23, + 1.58680113014409929e-01, + -3.60438530104612975e-03, + 6.01471118960638922e-05, + -8.80966069201740975e-07, + 1.11810231629158538e-08, + -1.14535793593273795e-10, + 2.43070400442283217e-12, + 2.38896280133920502e-14, + -1.47913795183320480e-16, + -4.94901513246564601e-17, + -1.58961472496841688e-18, + -1.20322946392492346e-21, + 1.31698256353146567e-21, + 4.30841028973265881e-23, + 3.41009305932311935e-01, + -8.20242566185225806e-03, + 1.42674042421351232e-04, + -2.10634805052168725e-06, + 2.54609258017958041e-08, + -2.12810287397849063e-10, + 4.14675791982563712e-12, + 8.46371761266022640e-14, + -9.94139285534477076e-16, + -1.12773961900835079e-16, + -3.62448375857365549e-18, + 3.34216681364459580e-21, + 3.16486320961651852e-21, + 9.67202334540298830e-23, + 6.46973812701078677e-01, + -1.69268013610054495e-02, + 3.12227845385255713e-04, + -4.63661533176237923e-06, + 5.08176471892811874e-08, + -2.34283431070332907e-10, + 3.43189699609504212e-12, + 2.60694915102635426e-13, + -3.41775969862223017e-15, + -2.56295847119040532e-16, + -6.95142372893480863e-18, + 2.22730539713643109e-20, + 7.04479915924910633e-21, + 1.94467395996472574e-22, + 1.18511318622386641e+00, + -3.49701647484404812e-02, + 6.97878504215987947e-04, + -1.02942740769938562e-05, + 8.97552961691718956e-08, + 4.00666103644038641e-10, + -9.74550014308530374e-12, + 6.46661776701847782e-13, + -5.66782130122043609e-15, + -7.12375651398011058e-16, + -1.17187581780265701e-17, + 1.37836225451290709e-19, + 1.48526103333271358e-20, + 3.87698593130290335e-22, + 2.26652057471886659e+00, + -7.95562119211287444e-02, + 1.75445004030424308e-03, + -2.45058765628457901e-05, + 8.96506189917981742e-08, + 4.83910722564279895e-09, + -4.83212966524854756e-11, + 3.94763275631514215e-14, + 1.91160566605409107e-14, + -1.91426300452010704e-15, + -3.95150619868848888e-17, + 1.09911673874465288e-18, + 3.86111307744414807e-20, + 4.04108043537612264e-22, + 5.19054628354604652e+00, + -2.35673420464452582e-01, + 5.77628052777552463e-03, + -6.20761262314154639e-05, + -6.64222439853273364e-07, + 2.30705102221051128e-08, + 4.57434675681195986e-10, + -1.26348420779968724e-11, + -3.60809346934286172e-13, + 5.08259496504081440e-15, + 1.62466044892723498e-16, + -3.99971013217303696e-18, + -3.34265405106874730e-20, + 7.00515155542932524e-21, + 2.33460507913677802e+01, + -1.53006232645346762e+00, + 3.67990082742324920e-02, + -3.88989057567584541e-05, + -5.15134761334312622e-06, + -1.77096851392486325e-07, + -1.44449078012727952e-09, + 1.25681986552667358e-10, + 5.02449588123830849e-12, + 6.95025402732046092e-15, + -4.86964954155436427e-15, + -1.23426523351750500e-16, + 1.86271261287540078e-18, + 1.58655038892564201e-19, +# root=9 base[9]=22.5 */ + 5.36203617465705155e-03, + -1.10862269993060702e-04, + 1.69977497800962302e-06, + -2.36749846482907416e-08, + 3.19906846493627099e-10, + -1.97903553870774293e-12, + 1.02380040674212210e-13, + -8.13822358557981935e-16, + -9.13559664368490576e-17, + -3.12544039826536323e-18, + 1.64905039915706151e-20, + 3.96836464706378201e-21, + 1.17136259775492218e-22, + 2.37691548666694273e-26, + 4.95203242920166792e-02, + -1.04141574761934422e-03, + 1.61892435167383059e-05, + -2.26810668841325208e-07, + 3.04843098663465668e-09, + -1.80800692369408119e-11, + 9.39305039503551730e-13, + -7.36292644052495041e-15, + -8.84253115980976691e-16, + -2.91256011030713668e-17, + 1.67815732871214094e-19, + 3.78268258064713029e-20, + 1.09922163578423410e-21, + -1.82155215061920048e-25, + 1.45162063332824803e-01, + -3.16260603647955732e-03, + 5.05841147633910126e-05, + -7.17033226333381592e-07, + 9.51657510951423505e-09, + -5.07687795804371230e-11, + 2.68439030235131441e-12, + -2.02608605890133164e-14, + -2.85406780607855770e-15, + -8.68960858121517837e-17, + 5.99553654911851564e-19, + 1.18232247239409044e-19, + 3.32864571243236315e-21, + -3.27737502648840802e-24, + 3.10331704626372107e-01, + -7.15549745574794224e-03, + 1.19721097838377321e-04, + -1.72693185467985646e-06, + 2.23539555125247158e-08, + -9.31287085928244312e-11, + 5.27956960819382220e-12, + -3.63682009902110655e-14, + -7.08001158783667849e-15, + -1.90922552833458026e-16, + 1.74953768317726122e-18, + 2.78796831958844398e-19, + 7.47962056973300889e-21, + -1.83267107544186029e-23, + 5.83928964558829922e-01, + -1.46380297852432666e-02, + 2.61332796698889828e-04, + -3.85441044666588636e-06, + 4.74403867804795409e-08, + -8.69472244582960913e-11, + 7.47755899417777387e-12, + -4.05387394977802146e-14, + -1.62277317010571829e-14, + -3.77392463052879975e-16, + 5.16287591487496097e-18, + 5.99375196656072160e-19, + 1.50208305332017174e-20, + -7.41935409925868517e-23, + 1.05565141758554537e+00, + -2.98562940562363717e-02, + 5.83202212919638088e-04, + -8.80133450798438764e-06, + 9.66798104960283323e-08, + 3.37196268487123535e-10, + 1.46493544140066571e-12, + -8.05428435285933640e-15, + -3.58356079233005977e-14, + -7.76884005645384445e-16, + 1.70950477948481135e-17, + 1.29715350828720750e-18, + 2.85433993004877036e-20, + -2.64809087296857428e-22, + 1.97454809345297777e+00, + -6.66655588242457131e-02, + 1.47197775017963452e-03, + -2.23595007590670933e-05, + 1.74981926193285025e-07, + 3.69019468374509105e-09, + -5.04641564376347481e-11, + -6.25893748948553493e-13, + -6.10269282913315362e-14, + -1.90182794464593788e-15, + 5.72291777279751886e-17, + 3.39728960009845910e-18, + 4.60474006718481432e-20, + -1.09603861968791715e-21, + 4.33535052674714638e+00, + -1.92585240059107987e-01, + 4.98438072415614483e-03, + -6.85571262190793652e-05, + -1.27572578843872646e-07, + 2.87046329449285648e-08, + -2.34236921433584751e-11, + -2.03147656011716854e-11, + -9.73940010284973237e-14, + 8.96365284200860464e-15, + 8.45589943720609469e-17, + 2.90815098194326595e-18, + 2.42107863019837285e-19, + -2.63115772356875168e-21, + 1.78092896479916796e+01, + -1.23921276664794644e+00, + 3.57187391082183503e-02, + -1.50028236210811593e-04, + -8.66564600256917257e-06, + -1.52695603020157686e-07, + 4.04675158407156363e-09, + 2.45075290164581597e-10, + 9.22901023266627498e-13, + -2.40031367050024107e-13, + -5.41827860192846161e-15, + 1.52396263304782316e-16, + 8.10117247071617667e-18, + -2.06571409036136214e-20, +# root=9 base[10]=25.0 */ + 4.94410408572321276e-03, + -9.83156624180706691e-05, + 1.44547436531471641e-06, + -1.87545162202437726e-08, + 3.00952025797040017e-10, + -2.14945213552150536e-13, + 2.50850880504520073e-14, + -4.97974836460563030e-15, + -1.37015750278704614e-16, + 2.31823988859183507e-18, + 2.67907159465306201e-19, + 5.07482816533934859e-21, + -1.88959830849808255e-22, + -1.28301073406862778e-23, + 4.55975952275764068e-02, + -9.21979683596107634e-04, + 1.37518448829630343e-05, + -1.79842557046316991e-07, + 2.87540308064784608e-09, + -2.03403713326215788e-12, + 2.11654826156844545e-13, + -4.70545182251311138e-14, + -1.29055409722477934e-15, + 2.28826780197590189e-17, + 2.54056407816113624e-18, + 4.72559822615322433e-20, + -1.82118838094294714e-21, + -1.21616357784717843e-22, + 1.33270069567893445e-01, + -2.78981846022165322e-03, + 4.28700915920155419e-05, + -5.69802212604064839e-07, + 9.03545505542501919e-09, + -5.89632481935312878e-12, + 4.72695186985220164e-13, + -1.44354687206479161e-13, + -3.93801003544229800e-15, + 7.67273025319854836e-17, + 7.86458040368911224e-18, + 1.40483272128713132e-19, + -5.83007072427045742e-21, + -3.76164114598255116e-22, + 2.83502454562496620e-01, + -6.27464179612727529e-03, + 1.01102518756407956e-04, + -1.37816258406547290e-06, + 2.15207211663458706e-08, + -9.40733691071149497e-12, + 3.19202683452152928e-13, + -3.29929240373706887e-13, + -8.95181748468670472e-15, + 2.01357446500046571e-16, + 1.83271605396648884e-17, + 3.04028761202014948e-19, + -1.43296604792948181e-20, + -8.75351991758878113e-22, + 5.29283349633328237e-01, + -1.27195508256814117e-02, + 2.19604451732975089e-04, + -3.10110195081978170e-06, + 4.70575020875410242e-08, + 1.05711153749951295e-11, + -2.33285361970557654e-12, + -6.75163230542715209e-13, + -1.82359151344322513e-14, + 5.00725001473228769e-16, + 3.90774890530373430e-17, + 5.64977170064589477e-19, + -3.29963500090741086e-20, + -1.86006980367663426e-21, + 9.44926378934573097e-01, + -2.55863293415041076e-02, + 4.87089793809411336e-04, + -7.20126398124987777e-06, + 1.03004909874543349e-07, + 2.22085118753411965e-10, + -1.73346459679763585e-11, + -1.33990966799410869e-12, + -3.51419653310847408e-14, + 1.28425459487280808e-15, + 8.43494887033583138e-17, + 9.07273462773048383e-19, + -7.93739786409195695e-20, + -3.96642384700907008e-21, + 1.72981217195505588e+00, + -5.59102640901362330e-02, + 1.22265719592425321e-03, + -1.90456868278780269e-05, + 2.33928364456190213e-07, + 2.00836043145983557e-09, + -1.00653224119613518e-10, + -2.91740805841068469e-12, + -4.95262836444092449e-14, + 3.54423363268015191e-15, + 1.99646433910009342e-16, + 9.02782495512124661e-19, + -2.26602386405269220e-19, + -9.12240319279749817e-21, + 3.63955641794084128e+00, + -1.55993175194193257e-01, + 4.16775960507814475e-03, + -6.62317053887917804e-05, + 3.94383759080339214e-07, + 2.12952682965193539e-08, + -5.80481509379066483e-10, + -1.72190486980600255e-11, + 3.36547285122402074e-13, + 1.65352928696102633e-14, + 2.59148087117279872e-16, + -3.17884647246850752e-18, + -7.56297734985007203e-19, + -2.88702499445327816e-20, + 1.34089597951299915e+01, + -9.63207642263513519e-01, + 3.30090855838362091e-02, + -3.05553316701879260e-04, + -1.02131961211420048e-05, + 2.10713311328494053e-08, + 9.83184001626148600e-09, + 1.13766611774323953e-10, + -9.10562596755960000e-12, + -2.30658238151778782e-13, + 7.20235436837964576e-15, + 3.17222360626393991e-16, + -4.45829923431860960e-18, + -3.62657968981848321e-19, +# root=9 base[11]=27.5 */ + 4.57265876191188803e-03, + -8.75706052565579433e-05, + 1.24912840276918378e-06, + -1.39955137551802349e-08, + 2.89437767565402707e-10, + -1.62409436776711202e-12, + -1.47129383213730330e-13, + -5.78446056148101932e-15, + 1.50883330160456197e-16, + 1.24379844757304017e-17, + 6.52101733891991914e-20, + -1.76128423337700982e-20, + -5.32748333967251797e-22, + 1.34717605045827869e-23, + 4.21171372625666202e-02, + -8.19819064659039359e-04, + 1.18679345693978275e-05, + -1.34400311136679436e-07, + 2.76067014230693347e-09, + -1.59105298552544972e-11, + -1.40849043310051777e-12, + -5.39839179022978498e-14, + 1.45958768419646090e-15, + 1.17770259023864617e-16, + 5.61768961058575407e-19, + -1.68133559128666691e-19, + -5.00590639371592351e-21, + 1.30698623960711881e-22, + 1.22756865723455191e-01, + -2.47176322749090597e-03, + 3.68937194663404070e-05, + -4.27136877256216136e-07, + 8.64930606432702895e-09, + -5.24061695443923330e-11, + -4.45220413157992603e-12, + -1.61229214800560117e-13, + 4.70522398968136847e-15, + 3.63300673346982534e-16, + 1.36371042488129325e-18, + -5.27766283677793622e-19, + -1.51851858879933917e-20, + 4.24280433651172313e-22, + 2.59925014539149513e-01, + -5.52614890823513796e-03, + 8.66160059122918002e-05, + -1.03850475244939287e-06, + 2.05416278602499267e-08, + -1.32890727091436861e-10, + -1.07679432452457379e-11, + -3.51616777891499321e-13, + 1.16749794247463666e-14, + 8.40778996540946703e-16, + 1.69879758792368457e-18, + -1.25786183697934471e-18, + -3.41126836362922774e-20, + 1.06729830300720353e-21, + 4.81701156794141327e-01, + -1.10988078087522965e-02, + 1.86886142354795472e-04, + -2.35682236085536504e-06, + 4.49487594197559520e-08, + -3.10289891086971622e-10, + -2.44629760863442346e-11, + -6.61987285994780529e-13, + 2.71774643523676978e-14, + 1.76601698098448717e-15, + -1.41562230442889194e-18, + -2.77137360444267665e-18, + -6.80455153302286046e-20, + 2.54746872118520635e-21, + 8.49866930935755938e-01, + -2.20071336126918642e-02, + 4.10597759983484143e-04, + -5.55451805573307217e-06, + 9.98581749514399116e-08, + -7.04966417489821141e-10, + -5.90073223262804784e-11, + -1.09174248382959684e-12, + 6.61016510750801741e-14, + 3.66564920287856534e-15, + -2.05399199336346133e-17, + -6.25076076414535319e-18, + -1.28157919827534922e-19, + 6.46357302735127538e-21, + 1.52437876191180433e+00, + -4.69775150987739171e-02, + 1.01738715593387001e-03, + -1.51417057359727364e-05, + 2.43090884542235413e-07, + -1.39621267585281339e-09, + -1.75126344224306208e-10, + -1.09625668378967502e-12, + 1.91334429647497645e-13, + 7.73401948927619279e-15, + -1.20742567771216934e-16, + -1.58115345751630171e-17, + -2.14798590861866060e-19, + 1.97165778994494869e-20, + 3.07742132953912506e+00, + -1.25696195526825899e-01, + 3.42206422949373895e-03, + -5.74057023932176685e-05, + 6.50741374901843943e-07, + 3.39544272022824946e-09, + -8.13562160788429100e-10, + 3.99739217863993663e-12, + 9.60042010674757687e-13, + 1.01946749558843324e-14, + -9.14996234895210050e-16, + -4.45700331354566436e-17, + 9.10299343923711023e-20, + 8.63700521897573840e-20, + 1.00572812071877760e+01, + -7.16461479679314062e-01, + 2.84187829013642784e-02, + -4.52355700848190180e-04, + -7.36771374373841048e-06, + 2.57220261800383048e-07, + 8.21498105033390223e-09, + -2.33782468149440410e-10, + -9.86073865878627074e-12, + 2.18066383300758660e-13, + 1.13700738971707463e-14, + -1.89681436353819835e-16, + -1.18042636844405374e-17, + 1.62796122621508684e-19, +# root=9 base[12]=30.0 */ + 4.24140479068244123e-03, + -7.81745662324156922e-05, + 1.10715933048655947e-06, + -9.85633801168678084e-09, + 2.13027596012590305e-10, + -6.16495773089777385e-12, + -1.80872709227838631e-13, + 4.91859407228394419e-15, + 4.23134912664414822e-16, + -3.21935427119819897e-18, + -7.60978110240762718e-19, + -4.85220453920524721e-21, + 1.21325741903260960e-21, + 2.51827372837206399e-23, + 3.90185442612911645e-02, + -7.30614013195311470e-04, + 1.05026355754368801e-05, + -9.49824592650315209e-08, + 2.02512868944568494e-09, + -5.89163864567872640e-11, + -1.69558282349185380e-12, + 4.78584829235135858e-14, + 3.99214214548578432e-15, + -3.27948202358927869e-17, + -7.22700157598812388e-18, + -4.23416124972599815e-20, + 1.15943032726606163e-20, + 2.34504743834043453e-22, + 1.13430811517175795e-01, + -2.19488666272332896e-03, + 3.25418853103903377e-05, + -3.04019070487920313e-07, + 6.30344410557750306e-09, + -1.85246629476149969e-10, + -5.12168234121944325e-12, + 1.56168580255349007e-13, + 1.22174372300323177e-14, + -1.16472636509460041e-16, + -2.24336986230679336e-17, + -1.06513243218631766e-19, + 3.64720541949002645e-20, + 6.96545882047676634e-22, + 2.39134840198377441e-01, + -4.87778732684010941e-03, + 7.59861816711530431e-05, + -7.47391517484198729e-07, + 1.48308849678254786e-08, + -4.41848349132786142e-10, + -1.14541581604045357e-11, + 3.95219773242347199e-13, + 2.78743489935306417e-14, + -3.29861306689841439e-16, + -5.24462403401796681e-17, + -1.49787606289059335e-19, + 8.71937340238108468e-20, + 1.50068413005523364e-21, + 4.40133336042899281e-01, + -9.70532061834209619e-03, + 1.62599805244052190e-04, + -1.72302550486997720e-06, + 3.21051544454964010e-08, + -9.69764926084252101e-10, + -2.28846738546478869e-11, + 9.47470182748378614e-13, + 5.71272360763559273e-14, + -8.99693948247660585e-16, + -1.11880844925156379e-16, + 2.53744860784314726e-20, + 1.92755205377424429e-19, + 2.74146130879247469e-21, + 7.68022083980954839e-01, + -1.89634076265924253e-02, + 3.52800438127579691e-04, + -4.15122803443697244e-06, + 7.08069269090680947e-08, + -2.14702722230899010e-09, + -4.46085109584866112e-11, + 2.40042030526159466e-12, + 1.13603477981112002e-13, + -2.61282875036720659e-15, + -2.38246253233087661e-16, + 1.30900309523551147e-18, + 4.35205590758373878e-19, + 4.07051206394719476e-21, + 1.35168481463973533e+00, + -3.95026964918201995e-02, + 8.57369637430033965e-04, + -1.16993056489313806e-05, + 1.75084934143873504e-07, + -5.08608498971441835e-09, + -9.28411535191721043e-11, + 7.20243972203551514e-12, + 2.23529810095987084e-13, + -9.02799056493525354e-15, + -5.34395988843424105e-16, + 8.66967100705540215e-18, + 1.08950912793777852e-18, + 3.78367647597004589e-22, + 2.62527528739879745e+00, + -1.00899437013491036e-01, + 2.79472897811806637e-03, + -4.74097624181756775e-05, + 5.50648351411926758e-07, + -1.13118154792242238e-08, + -2.85416794520001540e-10, + 3.05015698786998888e-11, + 3.39113651459895115e-13, + -4.65941815753037610e-14, + -1.07451173304322112e-15, + 6.51654992848556354e-17, + 3.02372600933459028e-18, + -7.74553711764628924e-20, + 7.60951461926858386e+00, + -5.12380985319584870e-01, + 2.24803108918127381e-02, + -5.21119236808053970e-04, + -9.25773207233314164e-07, + 3.50000420525766399e-07, + -1.07876072704770270e-09, + -3.60479712668420219e-10, + 2.97581672021631785e-12, + 3.86018870062538791e-13, + -4.52316961388088698e-15, + -3.94995298157246137e-16, + 4.88116352226550736e-18, + 3.56811515836738459e-19, +# root=9 base[13]=32.5 */ + 3.94573991485490296e-03, + -6.97430221025290351e-05, + 1.00468818466591338e-06, + -7.59917666268686277e-09, + 6.41880572684400222e-11, + -7.63047058182830631e-12, + 9.00533104051293273e-14, + 1.13989527812994447e-14, + -1.28817065991588816e-16, + -2.05284564899163488e-17, + 2.24704884925654634e-19, + 3.60416681018524671e-20, + -3.75557392849385653e-22, + -6.31778056632309084e-23, + 3.62575570851531789e-02, + -6.50701960104270232e-04, + 9.51301248338007627e-06, + -7.35357288247596172e-08, + 6.11385060969087078e-10, + -7.20779136396842700e-11, + 8.87643080699566539e-13, + 1.07616117658767466e-13, + -1.28924888732442954e-15, + -1.94049928152733175e-16, + 2.25555198617594689e-18, + 3.41410464007237672e-19, + -3.79220007088147280e-21, + -5.99960963830028547e-22, + 1.05150836642029497e-01, + -1.94774466914525587e-03, + 2.93606387285712479e-05, + -2.37308774206567961e-07, + 1.91384454641310362e-09, + -2.21209394945467108e-10, + 2.96548478346342035e-12, + 3.29861968101803668e-13, + -4.43591499503615568e-15, + -5.96232170256535822e-16, + 7.80621352614624126e-18, + 1.05364713576010207e-18, + -1.32768565685147630e-20, + -1.86129108181353011e-21, + 2.20787385885462539e-01, + -4.30248217751413170e-03, + 6.81153105984221930e-05, + -5.90429172566081477e-07, + 4.56601555021532933e-09, + -5.07513092422103690e-10, + 7.72811567493506705e-12, + 7.55018512618004602e-13, + -1.20623039421820899e-14, + -1.36904257083133612e-15, + 2.14146796185619735e-17, + 2.43668324243002950e-18, + -3.70430115917706113e-20, + -4.34102030460822055e-21, + 4.03792911255485554e-01, + -8.48010505377928131e-03, + 1.44301065750119866e-04, + -1.38227621523046930e-06, + 1.02036542344543180e-08, + -1.05176849215018308e-09, + 1.90318117142609912e-11, + 1.55823223313926880e-12, + -3.14269146629036850e-14, + -2.83237112598756679e-15, + 5.64676799695190626e-17, + 5.09445453690408642e-18, + -9.98978120847057345e-20, + -9.18984311316242348e-21, + 6.97520345758927629e-01, + -1.63245071916951062e-02, + 3.08254323668490874e-04, + -3.39146027742949849e-06, + 2.41477395942694204e-08, + -2.14352207871498424e-09, + 4.86486215779482636e-11, + 3.15381053956741776e-12, + -8.67107753485358092e-14, + -5.70811461316442671e-15, + 1.58275591240622722e-16, + 1.04139074807047226e-17, + -2.88266852464593266e-19, + -1.91141808728823290e-20, + 1.20655931032808472e+00, + -3.31658180170411598e-02, + 7.30248654376240984e-04, + -9.75471814252068208e-06, + 6.98876530888824184e-08, + -4.49977294559516002e-09, + 1.39065096161792758e-10, + 6.57277861504903036e-12, + -2.79594221548725198e-13, + -1.14063846746281615e-14, + 5.20783614463305380e-16, + 2.10538645678466675e-17, + -9.83569597814949664e-19, + -3.94188291526249591e-20, + 2.26297757289375090e+00, + -8.06856524594609381e-02, + 2.27080251471915807e-03, + -4.04904460020887022e-05, + 3.24320173771290018e-07, + -8.36061496745851213e-09, + 4.50292250184761281e-10, + 1.34243980864758859e-11, + -1.21158552193055098e-12, + -1.50650898891515561e-14, + 2.32512343597806523e-15, + 2.19154921446364277e-17, + -4.49795660282605601e-18, + -3.64231637831162536e-20, + 5.88038574835765626e+00, + -3.57296904694256512e-01, + 1.63558614376617430e-02, + -4.84430185433104197e-04, + 5.10092607258658670e-06, + 2.24612050660836996e-07, + -8.16492874536863919e-09, + -1.05284846664197084e-10, + 1.04772445054904530e-11, + -1.85383412993401190e-14, + -1.16926988463674520e-14, + 1.32365253022012272e-16, + 1.21753447168553708e-17, + -1.96254234057698967e-19, +# root=9 base[14]=35.0 */ + 3.68227620255497622e-03, + -6.20631756355866462e-05, + 9.15263893823981519e-07, + -7.58307748002555097e-09, + -4.58208199624708784e-11, + -2.66083307610196153e-12, + 2.67448189875538774e-13, + -4.20892226174008206e-16, + -4.39575854396119081e-16, + 6.36418300187966855e-18, + 6.75179837569692393e-19, + -1.98108915410905958e-20, + -8.97926254344580803e-22, + 4.55645011863927568e-23, + 3.38014740284535223e-02, + -5.78058825452426681e-04, + 8.64789365084420923e-06, + -7.32594285535365590e-08, + -4.20265331382373608e-10, + -2.44979622903495965e-11, + 2.53526976655298732e-12, + -5.52417206780104196e-15, + -4.15351899080142339e-15, + 6.30478249226515656e-17, + 6.34943760701641249e-18, + -1.92304301909844134e-19, + -8.37731058216967959e-21, + 4.39080657612846732e-22, + 9.78119326868664846e-02, + -1.72402728543060184e-03, + 2.65705940164484172e-05, + -2.35579514919428568e-07, + -1.20355537117811011e-09, + -7.10583744402738117e-11, + 7.83695168467907077e-12, + -2.71119445993438327e-14, + -1.27506418376142059e-14, + 2.12814441166003338e-16, + 1.92857833209616641e-17, + -6.24207936909964682e-19, + -2.49868998439827997e-20, + 1.40438350949569366e-21, + 2.04623285965122997e-01, + -3.78533353629130790e-03, + 6.11828447077374305e-05, + -5.82584716898518972e-07, + -2.40029504279121500e-09, + -1.47380750341316685e-10, + 1.81802423383607398e-11, + -1.01536637098476834e-13, + -2.92324076842841719e-14, + 5.63677108088591060e-16, + 4.33630638949238005e-17, + -1.56447208427636806e-18, + -5.42578904929816502e-20, + 3.44102772817200537e-21, + 3.72078344457767385e-01, + -7.39064602168067099e-03, + 1.28112947701225868e-04, + -1.35067605970670449e-06, + -3.63214011185928458e-09, + -2.55221970502659678e-10, + 3.82535524654818138e-11, + -3.40930394525348455e-13, + -6.03354330856898014e-14, + 1.42171205143180582e-15, + 8.63561361048493026e-17, + -3.68381017599713528e-18, + -1.00796656819791846e-19, + 7.84773545258443633e-21, + 6.36902278060719862e-01, + -1.40174211088463178e-02, + 2.68730029576920459e-04, + -3.26210514053948130e-06, + -2.10720664666295072e-09, + -3.59889265348038743e-10, + 7.94728499295006131e-11, + -1.13319037585219188e-12, + -1.21264572431436804e-13, + 3.76699220196410006e-15, + 1.61075294473081350e-16, + -8.99560633324195294e-18, + -1.58298512500521659e-19, + 1.83101228112858953e-20, + 1.08485823849523855e+00, + -2.77784823983588253e-02, + 6.17638701236103253e-04, + -9.13396579835946124e-06, + 2.19555380518189113e-08, + -1.73627048841895950e-10, + 1.70437146823079996e-10, + -4.10199555715306530e-12, + -2.43172678773264883e-13, + 1.14502001628179056e-14, + 2.59161602141102911e-16, + -2.46861324547471886e-17, + -9.44164960296400631e-20, + 4.65660263354391680e-20, + 1.97360350796908257e+00, + -6.43831406719223009e-02, + 1.81259396798781765e-03, + -3.60030643633878637e-05, + 2.73144581701840823e-07, + 2.69549099318820454e-09, + 3.22956114372389326e-10, + -1.77324503417028427e-11, + -3.67566428591576340e-13, + 4.38021892859194139e-14, + -1.65097264824830882e-16, + -7.87665077920715186e-17, + 1.72195879192806215e-18, + 1.18002148820972770e-19, + 4.67839405327251878e+00, + -2.48045296675276555e-01, + 1.11449705912113426e-02, + -3.77881464899236508e-04, + 7.57760904675738476e-06, + 2.77615999583292039e-08, + -7.05561579803692958e-09, + 1.48528119727046686e-10, + 3.95131223896190293e-12, + -2.55809606379201303e-13, + 9.43381302751202618e-16, + 2.83183546488851109e-16, + -6.34714303164194634e-18, + -2.48162003664679548e-19, +# root=9 base[15]=37.5 */ + 3.44807118889878554e-03, + -5.51194162068812887e-05, + 8.19170787904191517e-07, + -8.42165206394892534e-09, + -4.26049700903834470e-11, + 2.37409133393459670e-12, + 1.18292049963251492e-13, + -7.71165652854196515e-15, + 1.46558860809838749e-17, + 1.18875109034506083e-17, + -3.18317420679935303e-19, + -1.11319778750530889e-20, + 7.81971428380707716e-22, + -1.55582680332417282e-24, + 3.16218524227278100e-02, + -5.12523422012633903e-04, + 7.72226732092861555e-06, + -8.08799197123472087e-08, + -3.78193378857647006e-10, + 2.28329317827089876e-11, + 1.09477297004897374e-12, + -7.32766412850780081e-14, + 1.88176746721602276e-16, + 1.11880508178684561e-16, + -3.08426704768100660e-18, + -1.02603756109737159e-19, + 7.46202532675574131e-21, + -2.09502477441991191e-23, + 9.13225230191890558e-02, + -1.52314353976125590e-03, + 2.36118814796171748e-05, + -2.56943263173497654e-07, + -9.99195981216466392e-10, + 7.26539335439352992e-11, + 3.21091776268412739e-12, + -2.27611440807036230e-13, + 9.03867720504506968e-16, + 3.40456715250899296e-16, + -9.97018713495700451e-18, + -2.97732750133008631e-19, + 2.33787260811486707e-20, + -1.05863288658076468e-22, + 1.90415564106277968e-01, + -3.32456913108084701e-03, + 5.39344074937553550e-05, + -6.23403903120147501e-07, + -1.65025678633244786e-09, + 1.76045191941894277e-10, + 6.78604327609014115e-12, + -5.31988682152084972e-13, + 3.33739145924280172e-15, + 7.68308548836267580e-16, + -2.48022721891296246e-17, + -6.13619280486555812e-19, + 5.53583213886043792e-20, + -4.07374834306915469e-22, + 3.44461382644318692e-01, + -6.43165610643451138e-03, + 1.11532634647373854e-04, + -1.40614213699902129e-06, + -1.19661340285624878e-09, + 3.92687631997397580e-10, + 1.21184616494396609e-11, + -1.13108991104103912e-12, + 1.11055157823214416e-14, + 1.54189083043583790e-15, + -5.76513634238055212e-17, + -1.02573141217383848e-18, + 1.19722089170583194e-19, + -1.40656672572934841e-21, + 5.84883575985864823e-01, + -1.20246879368787560e-02, + 2.29436259730582951e-04, + -3.26656326333346504e-06, + 5.56199661366292617e-09, + 8.78220426836007941e-10, + 1.80792307712350486e-11, + -2.38229293826482745e-12, + 3.66615959215129673e-14, + 2.93391173297508760e-15, + -1.37659543177382322e-16, + -1.18792154832369866e-18, + 2.56803421867391078e-19, + -4.82233765359577281e-21, + 9.82941956764506131e-01, + -2.32688913490613769e-02, + 5.10610692396577348e-04, + -8.63789910226015796e-06, + 4.72551334729195062e-08, + 2.06201754834334741e-09, + 1.14551905592478818e-11, + -5.20228364767575941e-12, + 1.31684792981341069e-13, + 5.12235700028396431e-15, + -3.62694595420134789e-16, + 1.47497506931104989e-18, + 5.62979847268033711e-19, + -1.80135404524073706e-20, + 1.74244888490382088e+00, + -5.15302823111880026e-02, + 1.40944115963620377e-03, + -3.09559497625661986e-05, + 3.63056123248156766e-07, + 4.43838642780134818e-09, + -1.39907152875639330e-10, + -1.03288682822854094e-11, + 5.63442223038566796e-13, + 2.26061940955083261e-15, + -1.06649208293852967e-15, + 2.86212821177936378e-17, + 9.54866022847318540e-19, + -7.78661240374467642e-20, + 3.83871292460671887e+00, + -1.74972605673823417e-01, + 7.33062055125974742e-03, + -2.59829746525267868e-04, + 6.81664205666692513e-06, + -8.51422778998305834e-08, + -2.34945558946192922e-09, + 1.52809594378573449e-10, + -2.57075679080503569e-12, + -7.90705782939078712e-14, + 5.20781659902257305e-15, + -6.60371909940595738e-17, + -4.15003530532540180e-18, + 1.98399619890208452e-19, +# root=9 base[16]=40.0 */ + 3.18439947508916297e-03, + -7.57379847844804130e-05, + 1.75418265984859484e-06, + -3.47911637290128020e-08, + 2.18741980345891743e-10, + 2.65974472730973307e-11, + -1.08979980634451200e-12, + -4.39359515024419979e-14, + 6.55866773398841857e-15, + -2.24115735557231089e-16, + -1.03665023329690269e-17, + 1.37151890643639154e-18, + -4.04567411324836667e-20, + -2.52007137710199556e-21, + 2.91728041496551044e-02, + -7.02819705365942881e-04, + 1.64882261240339146e-05, + -3.31841143449837072e-07, + 2.23380318408762010e-09, + 2.48808091316625463e-10, + -1.05055265519902761e-11, + -3.99341232569780296e-13, + 6.18849980763717005e-14, + -2.17213736027596949e-15, + -9.45025792226352867e-17, + 1.29713807691136066e-17, + -3.96206688054992024e-19, + -2.30629940384955057e-20, + 8.40611260289242379e-02, + -2.07975843767852506e-03, + 5.01040016880299649e-05, + -1.03935365200169085e-06, + 7.95628367356383008e-09, + 7.46993389635747323e-10, + -3.35973973153655639e-11, + -1.12256446629692659e-12, + 1.89368975377557860e-13, + -7.02286574733452858e-15, + -2.67402296033970241e-16, + 3.98797546996355171e-17, + -1.30708091001092700e-18, + -6.58170586587629445e-20, + 1.74626499264972368e-01, + -4.50750310665237828e-03, + 1.13283517408267685e-04, + -2.46539522066982790e-06, + 2.25305475839646404e-08, + 1.64511839652772648e-09, + -8.21254020934927222e-11, + -2.17563577671529450e-12, + 4.31567073966968268e-13, + -1.74566799153929043e-14, + -5.24626410552161083e-16, + 9.15297024807733368e-17, + -3.34373562623815254e-18, + -1.31134949646564710e-19, + 3.14095420207903597e-01, + -8.62541986783591820e-03, + 2.30593267257558009e-04, + -5.38001204348897847e-06, + 6.10053693154368674e-08, + 3.15935294520772743e-09, + -1.85895497618652339e-10, + -3.17919659638571396e-12, + 8.81090764839543412e-13, + -4.04466405294989766e-14, + -7.86771466362202443e-16, + 1.88586379922113825e-16, + -8.02909470741287156e-18, + -2.02801428291780138e-19, + 5.28623794247202516e-01, + -1.58563603532864833e-02, + 4.62935137289353699e-04, + -1.19159779126490435e-05, + 1.73529775212007579e-07, + 5.49056387537860357e-09, + -4.26663022031750245e-10, + -2.00772557162035554e-12, + 1.73374346485467869e-12, + -9.57975309049554529e-14, + -5.72565193474068220e-16, + 3.74707886328194767e-16, + -1.98000767207415944e-17, + -1.68948655650892552e-19, + 8.75664647000055862e-01, + -2.98516970102678837e-02, + 9.90187819226932830e-04, + -2.93377965141652565e-05, + 5.71248308678809597e-07, + 7.15567368145555934e-09, + -1.05885431922250557e-09, + 1.33518367047821750e-11, + 3.31035918568329325e-12, + -2.48137870302105235e-13, + 2.91069396257996845e-15, + 7.17258663473144816e-16, + -5.33497626633018865e-17, + 6.51417115461395029e-19, + 1.51122627701993939e+00, + -6.28243071283083043e-02, + 2.53969396051278041e-03, + -9.32617121926310823e-05, + 2.59531037491962716e-06, + -1.90438960660824780e-08, + -2.84507519743051354e-09, + 1.29402649706677727e-10, + 3.91988711843541118e-12, + -7.09848641853783739e-13, + 2.89975716142482460e-14, + 7.84634811082423770e-16, + -1.54248478309061138e-16, + 6.94482622019880110e-18, + 3.10572024711380790e+00, + -1.87040819340329206e-01, + 1.09371508733751305e-02, + -5.94343543803867820e-04, + 2.79310702737899211e-05, + -9.93484617747443782e-07, + 1.59013447799280310e-08, + 9.40876232317387762e-10, + -9.16256217321027250e-11, + 3.41070624544085104e-12, + 1.28633678493348398e-14, + -9.15502182080355490e-15, + 5.13272202681563983e-16, + -6.78732392610946430e-18, +# root=9 base[17]=44.0 */ + 2.90699510023554025e-03, + -6.32845161687842141e-05, + 1.37029318541658900e-06, + -2.85537096371028444e-08, + 4.77261001717565343e-10, + 1.26016721668745309e-12, + -6.78970567460622233e-13, + 3.48785046445049289e-14, + -4.31594163604298247e-16, + -6.99573337433165793e-17, + 5.97258141132258090e-18, + -2.01844503387753092e-19, + -3.35835909358835212e-21, + 7.77316551608895753e-22, + 2.66013536338615131e-02, + -5.85951529692855036e-04, + 1.28375128826289646e-05, + -2.70775759931320099e-07, + 4.60605707710758135e-09, + 8.42474008546479314e-12, + -6.35430628614577295e-12, + 3.32274768699352488e-13, + -4.40121473331466210e-15, + -6.46457270460625403e-16, + 5.63815578424690049e-17, + -1.94766936431313084e-18, + -2.87905862437968318e-20, + 7.26583876398385653e-21, + 7.64689408947958199e-02, + -1.72581466078006326e-03, + 3.87401283712215626e-05, + -8.37907384462537961e-07, + 1.47727181248536180e-08, + 2.94213444738384083e-12, + -1.90997480326792602e-11, + 1.03751637358652881e-12, + -1.56147554124273816e-14, + -1.88928185361120354e-15, + 1.72692834770621297e-16, + -6.24024398391324665e-18, + -6.91913725970795562e-20, + 2.17778210335499160e-20, + 1.58232704088341808e-01, + -3.71165649034552658e-03, + 8.65947395437379532e-05, + -1.94910050144002188e-06, + 3.63272969526207922e-08, + -8.26032455902727475e-11, + -4.21778636946647314e-11, + 2.44446886172936830e-12, + -4.38414090924073853e-14, + -3.96478737779358756e-15, + 3.94140317830065884e-16, + -1.52899795467638173e-17, + -8.51115607470956952e-20, + 4.78287143439435753e-20, + 2.82902149563358574e-01, + -7.01907076096561222e-03, + 1.73207475586780851e-04, + -4.13080777825843267e-06, + 8.32576586214179069e-08, + -4.71051687965846678e-10, + -8.15380327735486111e-11, + 5.25575010443357070e-12, + -1.16717627556549584e-13, + -6.97775205854423437e-15, + 8.06399127747144410e-16, + -3.46872307472277870e-17, + 6.40611045656287718e-20, + 9.14871327878519631e-20, + 4.71773058470760343e-01, + -1.26726859817670717e-02, + 3.38559374152463998e-04, + -8.76168346753223375e-06, + 1.96416040874825808e-07, + -1.98823196274060479e-09, + -1.44489338641966165e-10, + 1.12437581557855317e-11, + -3.21148915243723688e-13, + -1.00232245193278554e-14, + 1.59248251608011815e-15, + -7.96497774248530492e-17, + 9.12933735943856894e-19, + 1.58553240718193731e-19, + 7.70095024088090607e-01, + -2.31799393415235803e-02, + 6.93889487052432399e-04, + -2.01816778230372025e-05, + 5.23137895795496867e-07, + -8.41966719698438743e-09, + -2.07794579908276703e-10, + 2.52182288539811377e-11, + -9.83868935690757000e-13, + -4.55283232350062139e-15, + 3.07307939903393603e-15, + -1.96494544807827823e-16, + 4.79661206536793959e-18, + 2.15339821354926985e-19, + 1.29441208149254439e+00, + -4.63240952755342508e-02, + 1.64859891196390959e-03, + -5.72291136095671313e-05, + 1.82766111010362162e-06, + -4.52812479778458267e-08, + 2.54216146284055645e-10, + 5.61988836720479861e-11, + -3.64689230185211004e-12, + 8.55419113615496169e-14, + 4.13640657980580248e-15, + -5.13989195054428684e-16, + 2.38654472664745879e-17, + -2.47417966900199774e-19, + 2.49631664451920532e+00, + -1.21825123218646567e-01, + 5.91103636094453787e-03, + -2.81292311626659417e-04, + 1.27511059196289166e-05, + -5.22687012354619969e-07, + 1.75851866022540588e-08, + -3.63716280123185220e-10, + -5.75275750816304802e-12, + 1.03223948858685005e-12, + -5.61836726874223938e-14, + 1.63361948024956128e-15, + 5.20358025251568186e-18, + -3.57776712104200867e-18, +# root=9 base[18]=48.0 */ + 2.67379199193740723e-03, + -5.35652994750907419e-05, + 1.07223028977220495e-06, + -2.13143412900226197e-08, + 4.05301847987285219e-10, + -5.97905343253335397e-12, + -4.34141572619637784e-14, + 1.03764651102167392e-14, + -6.01059978752759586e-16, + 1.99294969674123702e-17, + -6.44317689742508574e-20, + -4.04060231664623277e-20, + 2.92891796496522239e-21, + -1.10194056432001178e-22, + 2.44441036426493973e-02, + -4.95022881071945672e-04, + 1.00167042303278090e-05, + -2.01295188392540000e-07, + 3.87310924701110471e-09, + -5.83461011632152869e-11, + -3.52696315490107860e-13, + 9.67503873495550501e-14, + -5.68322436596986039e-15, + 1.91197813917249413e-16, + -8.14738772213997456e-19, + -3.73437601480338887e-19, + 2.75618866318877355e-20, + -1.05295357336049959e-21, + 7.01273710726034172e-02, + -1.45220908668324314e-03, + 3.00482200466313892e-05, + -6.17557654237562400e-07, + 1.21742516576052842e-08, + -1.91258071487887202e-10, + -7.03712645337296031e-13, + 2.88462697081858521e-13, + -1.74704850899338080e-14, + 6.05701193983634808e-16, + -3.83871398028252600e-18, + -1.09201136256127503e-18, + 8.38557090152757932e-20, + -3.30722541687643080e-21, + 1.44636919566097255e-01, + -3.10295659010991452e-03, + 6.65149970772300732e-05, + -1.41652823364697027e-06, + 2.90144871500026105e-08, + -4.85627213052984558e-10, + -1.33647868480378220e-13, + 6.27956656702837836e-13, + -4.01380486747413563e-14, + 1.46019509496362527e-15, + -1.38929220948201774e-17, + -2.29603670843018817e-18, + 1.89259183010151711e-19, + -7.85773989235419860e-21, + 2.57313661631859592e-01, + -5.81023800652182183e-03, + 1.31090532530837834e-04, + -2.93926592960433083e-06, + 6.36141192836639866e-08, + -1.16025577151952340e-09, + 4.70704421004021216e-12, + 1.18386139618031052e-12, + -8.31044234575962613e-14, + 3.24710414862168121e-15, + -4.51725176156548593e-17, + -4.06621802947970011e-18, + 3.80494097758390867e-19, + -1.70669785487394415e-20, + 4.25903815039554379e-01, + -1.03351512254244177e-02, + 2.50591853976221864e-04, + -6.04055475187854945e-06, + 1.41181182749402895e-07, + -2.87888623388648219e-09, + 2.67027734346467383e-11, + 1.99437193295879542e-12, + -1.67950717705203958e-13, + 7.30156780871003220e-15, + -1.44693822272815028e-16, + -5.99020982930872214e-18, + 7.30670754009099954e-19, + -3.68922961491610378e-20, + 6.87126641987356512e-01, + -1.84688658220146171e-02, + 4.96005067655744931e-04, + -1.32498869530390884e-05, + 3.45023108875379169e-07, + -8.12947840368531280e-09, + 1.26313075537281259e-10, + 2.42348483548829479e-12, + -3.42428196658157213e-13, + 1.77806848108287007e-14, + -4.98624841797416241e-16, + -3.85274902606239456e-18, + 1.34145168079007215e-18, + -8.33527155242085934e-20, + 1.13175992021705585e+00, + -3.54500161222570873e-02, + 1.10947362438192825e-03, + -3.45610953918454067e-05, + 1.05601860462633435e-06, + -3.02672620115816732e-08, + 7.13282393677842326e-10, + -6.75064669005010314e-12, + -5.95859476942771445e-13, + 4.87074416828156479e-14, + -2.05429163430906612e-15, + 3.95303877245912538e-17, + 1.55704134819024600e-18, + -1.86902549946014465e-19, + 2.08622970903298288e+00, + -8.52336405868218683e-02, + 3.47928215588519125e-03, + -1.41496241837645194e-04, + 5.68535802187683400e-06, + -2.21522683214087901e-07, + 8.07949259978357707e-09, + -2.58406788924154327e-10, + 6.20460807980549795e-12, + -3.84051039090003208e-14, + -6.72602646040983139e-15, + 4.90291646700626266e-16, + -2.07599459161999492e-17, + 5.47956652075369771e-19, +# root=9 base[19]=52.0 */ + 2.47521022070896135e-03, + -4.59094000798481336e-05, + 8.51430717692651718e-07, + -1.57752172086582157e-08, + 2.90177545426822609e-10, + -5.11397994450500764e-12, + 7.10319548956972114e-14, + 4.01538720967775541e-16, + -1.08126025120416666e-16, + 6.67325661804697800e-18, + -2.80689704293412896e-19, + 7.62975283782729681e-21, + -1.78215534386863731e-23, + -1.23836248190164741e-23, + 2.26103516344180536e-02, + -4.23586268828853756e-04, + 7.93477433251200547e-06, + -1.48494202136412192e-07, + 2.75934300019922462e-09, + -4.91864977365755013e-11, + 6.98466518169719130e-13, + 3.02982982413134996e-15, + -1.00230564052640265e-15, + 6.27375299494271981e-17, + -2.66121364063040161e-18, + 7.33731926877414107e-20, + -2.45690560531935553e-22, + -1.13935660883347859e-22, + 6.47566680897051355e-02, + -1.23844152215822774e-03, + 2.36823406227113904e-05, + -4.52442941872016470e-07, + 8.58503388469919155e-09, + -1.56646610288912414e-10, + 2.32385570629962670e-12, + 4.25357393384488625e-15, + -2.94955960420953398e-15, + 1.90532767986720110e-16, + -8.22880860679057688e-18, + 2.33559560891122954e-19, + -1.25434097934311928e-21, + -3.29857846694123919e-22, + 1.33191869836036120e-01, + -2.63165626105168029e-03, + 5.19922548536902885e-05, + -1.02624327477350083e-06, + 2.01269367425233074e-08, + -3.80931161708187413e-10, + 6.02842618798411938e-12, + -1.00311777005054455e-14, + -6.26684683356752113e-15, + 4.28993521975449655e-16, + -1.90983335766099103e-17, + 5.67167456540612469e-19, + -4.76671337407392026e-21, + -6.81050000030413176e-22, + 2.35968973968620210e-01, + -4.88698086547299099e-03, + 1.01200886865426346e-04, + -2.09385672638029484e-06, + 4.30686410831137263e-08, + -8.58791143119100808e-10, + 1.48010962563859097e-11, + -8.76855981025114905e-14, + -1.12771584782983709e-14, + 8.60329556858414002e-16, + -4.02188271556880240e-17, + 1.27399793763282279e-18, + -1.59033338981963382e-20, + -1.16580067882512401e-21, + 3.88162400113770567e-01, + -8.58605206284376865e-03, + 1.89902800803540056e-04, + -4.19672364588942366e-06, + 9.22649245559567866e-08, + -1.97698314662203519e-09, + 3.79330195586076205e-11, + -4.09510513396640794e-13, + -1.70018695599588258e-14, + 1.64963364779827411e-15, + -8.37618047837254255e-17, + 2.90496871989030109e-18, + -5.15111863749249821e-20, + -1.58322472312414567e-21, + 6.20297871840229553e-01, + -1.50542139346783455e-02, + 3.65320002691014816e-04, + -8.85847210866954822e-06, + 2.13869351964660383e-07, + -5.06255803860064067e-09, + 1.11108305188150271e-10, + -1.81126140905745191e-12, + -1.09076904116219630e-14, + 3.03101327178170637e-15, + -1.82034815661175083e-16, + 7.23042653214219751e-18, + -1.77693357413525639e-19, + -4.28796577693325391e-22, + 1.00543674869213562e+00, + -2.79863053753466144e-02, + 7.78921313778539411e-04, + -2.16645458106308411e-05, + 6.00527496978648223e-07, + -1.64243034679157530e-08, + 4.29801635256182332e-10, + -9.84617675505535642e-12, + 1.38084904065285653e-13, + 3.37093973076469766e-15, + -4.01692097864081043e-16, + 2.08759127881146631e-17, + -7.28303250890326464e-19, + 1.39953280870909951e-20, + 1.79202236631744483e+00, + -6.29237190678021974e-02, + 2.20923432681564358e-03, + -7.75230040957263042e-05, + 2.71425910331636467e-06, + -9.43606767615720308e-08, + 3.22035593687713298e-09, + -1.05469820412609604e-10, + 3.17781144956089250e-12, + -8.07459020157148059e-14, + 1.30249322603412723e-15, + 1.78001090785496983e-17, + -2.72466269939453587e-18, + 1.43255425312381314e-19, +# root=9 base[20]=56.0 */ + 2.30409853156384467e-03, + -3.97834096440115171e-05, + 6.86908379739479083e-07, + -1.18589952676115535e-08, + 2.04544633399554581e-10, + -3.50566356384309521e-12, + 5.79827105354717275e-14, + -7.94411819772366980e-16, + -3.91710020190147111e-19, + 8.19010725741104850e-19, + -5.32869947954889529e-20, + 2.45517741016844915e-21, + -8.73367285658059031e-23, + 2.15945545483333659e-24, + 2.10326458072598275e-02, + -3.66554148262894475e-04, + 6.38819590173128796e-06, + -1.11319435026531225e-07, + 1.93803691968455218e-09, + -3.35326539923199770e-11, + 5.60629124854249812e-13, + -7.83940242572567384e-15, + 4.69296343786098246e-18, + 7.52419569808539099e-18, + -4.98372190653999638e-19, + 2.31275338140745551e-20, + -8.28235432097375524e-22, + 2.07422886121510469e-23, + 6.01504409010222285e-02, + -1.06858369867292497e-03, + 1.89834056285358778e-05, + -3.37204395944509853e-07, + 5.98446011054715858e-09, + -1.05588223866957747e-10, + 1.80462834959286277e-12, + -2.62675899060721240e-14, + 7.00543847900744976e-17, + 2.16852744453627578e-17, + -1.49664698092083237e-18, + 7.05516227255201132e-20, + -2.56250598007808764e-21, + 6.58657282033099813e-23, + 1.23426154112290576e-01, + -2.26003294414677718e-03, + 4.13826397807892033e-05, + -7.57663587807370959e-07, + 1.38601806413311193e-08, + -2.52192059390733719e-10, + 4.46085146352643255e-12, + -6.88653732031113819e-14, + 3.80133896118505480e-16, + 4.42049381776417980e-17, + -3.30496912528582379e-18, + 1.60169357843240370e-19, + -5.95464171037506113e-21, + 1.59337582198912288e-22, + 2.17896099449284897e-01, + -4.16735032103352290e-03, + 7.97014833127931901e-05, + -1.52415588706079740e-06, + 2.91243031741229026e-08, + -5.53891501125735945e-10, + 1.02856268914009340e-11, + -1.71473866888480127e-13, + 1.53490992835419214e-15, + 7.26933491620233252e-17, + -6.41446204858381933e-18, + 3.26144907549074536e-19, + -1.25725147501457984e-20, + 3.56004753789790803e-22, + 3.56569531600147482e-01, + -7.24588195805616654e-03, + 1.47242813260186527e-04, + -2.99182308551202981e-06, + 6.07487430914051164e-08, + -1.22859429126744406e-09, + 2.43827518600578453e-11, + -4.47286135736063140e-13, + 5.73062456440283071e-15, + 8.20578543078606158e-17, + -1.15766564070621581e-17, + 6.44853847633244344e-19, + -2.63424910880409170e-20, + 8.06179690460384405e-22, + 5.65325954499796945e-01, + -1.25055271120530446e-02, + 2.76631027073968665e-04, + -6.11873715189257044e-06, + 1.35259115199582986e-07, + -2.98065379646135196e-09, + 6.47942113635742467e-11, + -1.33812342627257548e-12, + 2.28834687432620279e-14, + -1.02897730177096372e-16, + -1.82813207751845972e-17, + 1.28052579638342539e-18, + -5.81955992137852426e-20, + 1.99151557614327918e-21, + 9.04509516724629981e-01, + -2.26532396739191032e-02, + 5.67339836780667473e-04, + -1.42076517574652512e-05, + 3.55629740224815010e-07, + -8.88209493403485605e-09, + 2.19955399467545174e-10, + -5.29691426220359220e-12, + 1.17397132927876721e-13, + -1.99959020671631302e-15, + 4.64387044613911495e-19, + 2.20875998988197954e-18, + -1.37355941122574799e-19, + 5.75091708721417419e-21, + 1.57066582952266165e+00, + -4.83530692499979653e-02, + 1.48853832050809139e-03, + -4.58213364063670445e-05, + 1.41005607677443309e-06, + -4.33376017761003792e-08, + 1.32671748968323277e-09, + -4.01894511372433373e-11, + 1.18810653289741126e-12, + -3.33853032341990105e-14, + 8.47648696652267605e-16, + -1.72477275307993106e-17, + 1.55008425611448704e-19, + 8.78757715316809981e-21, +# root=9 base[21]=60.0 */ + 2.15512623711473913e-03, + -3.48066124039279347e-05, + 5.62147711222581885e-07, + -9.07892794843626051e-09, + 1.46613688943991758e-10, + -2.36579235409087776e-12, + 3.79889046188248584e-14, + -5.94245991416514707e-16, + 8.15314676964510796e-18, + -3.84839347652487599e-20, + -4.58798666696283089e-21, + 3.26082794344383007e-22, + -1.57085185130085057e-23, + 6.13981701547277130e-25, + 1.96608626203081324e-02, + -3.20311349264915048e-04, + 5.21845246395956988e-06, + -8.50171626526842864e-08, + 1.38493069124504151e-09, + -2.25434300123097818e-11, + 3.65224690269666518e-13, + -5.77040254397649516e-15, + 8.05455748059335912e-17, + -4.42625734932354965e-19, + -4.14517124171063016e-20, + 3.03230299666315954e-21, + -1.47249571152162255e-22, + 5.78404961757708812e-24, + 5.61563172897071028e-02, + -9.31420897411276336e-04, + 1.54487370897024336e-05, + -2.56233278052342022e-07, + 4.24948305430542115e-09, + -7.04244978361791927e-11, + 1.16197442814342575e-12, + -1.87366515832099864e-14, + 2.70551995137829200e-16, + -1.88513224713061989e-18, + -1.14683198768479414e-19, + 8.99110904966763493e-21, + -4.44527372314472025e-22, + 1.76497557863910909e-23, + 1.14995422864931002e-01, + -1.96191835887914168e-03, + 3.34719453464218898e-05, + -5.71053289989023821e-07, + 9.74165042571853405e-09, + -1.66073344531118835e-10, + 2.82000396930707239e-12, + -4.69362864243538081e-14, + 7.12370103724134196e-16, + -6.41624362203867575e-18, + -2.13486737809838842e-19, + 1.93998705628222415e-20, + -9.91603360857085719e-22, + 4.01078488787096869e-23, + 2.02396260232085845e-01, + -3.59573853415966205e-03, + 6.38812448116030850e-05, + -1.13489180253643872e-06, + 2.01603802578961432e-08, + -3.57920151205445692e-10, + 6.33291483203721552e-12, + -1.10226612853450632e-13, + 1.78589321560932891e-15, + -2.04897953261452393e-17, + -2.72015181822246365e-19, + 3.60778207341778066e-20, + -1.96280714653168286e-21, + 8.18941804089771708e-23, + 3.29735611936824380e-01, + -6.19670377144061063e-03, + 1.16454228207356027e-04, + -2.18849633101196373e-06, + 4.11247514011965758e-08, + -7.72399758886271519e-10, + 1.44675853401582599e-11, + -2.67618608568555327e-13, + 4.70508447053128708e-15, + -6.71405712809245930e-17, + 4.76066360826390357e-20, + 5.93511907931611479e-20, + -3.69819990759081266e-21, + 1.63169437523644316e-22, + 5.19311505996607359e-01, + -1.05534269125402147e-02, + 2.14466128363807772e-04, + -4.35833118857555582e-06, + 8.85631800628612811e-08, + -1.79891782132303820e-09, + 3.64662051049498823e-11, + -7.32893072817415168e-13, + 1.42678959294787875e-14, + -2.48453717374806143e-16, + 2.65267113634935666e-18, + 6.68105722927925253e-20, + -6.63721412247175345e-21, + 3.31883308428240398e-22, + 8.22015051638497418e-01, + -1.87116165134403496e-02, + 4.25934175494274648e-04, + -9.69550298443663912e-06, + 2.20686183055004199e-07, + -5.02172877703719469e-09, + 1.14119553988279979e-10, + -2.58045250582874576e-12, + 5.73980797157304060e-14, + -1.21617187483087262e-15, + 2.23597922206638682e-17, + -2.34091939822338142e-19, + -7.08618417395991691e-21, + 6.45900723440797694e-22, + 1.39805452280048614e+00, + -3.83169135118071949e-02, + 1.05016264441329952e-03, + -2.87819227939625552e-05, + 7.88799674991160319e-07, + -2.16141661514027925e-08, + 5.91869398123721064e-10, + -1.61736102939254384e-11, + 4.39446706348015175e-13, + -1.17774685223095413e-14, + 3.06459280910509751e-16, + -7.51433608225594667e-18, + 1.63422657982572690e-19, + -2.67106673145617793e-21, +# root=9 base[22]=64.0 */ + 2.02425608460181285e-03, + -3.07086405100881964e-05, + 4.65860298669981978e-07, + -7.06724960740805818e-09, + 1.07211424598327091e-10, + -1.62628533194548468e-12, + 2.46550839660971793e-14, + -3.72522945116713548e-16, + 5.53139230972056386e-18, + -7.55794545916436303e-20, + 6.37674306425941766e-22, + 1.77686807854314743e-23, + -1.57838632571428106e-24, + 7.88766684509607566e-26, + 1.84571413840883096e-02, + -2.82299276382560842e-04, + 4.31772585472392364e-06, + -6.60389235675981529e-08, + 1.01004535954736310e-09, + -1.54471238520781923e-11, + 2.36110930809811094e-13, + -3.59731262041217311e-15, + 5.39052015987948601e-17, + -7.46915167303145773e-19, + 6.68441028418385235e-21, + 1.53568971532420000e-22, + -1.45617901930208053e-23, + 7.35956725542854075e-25, + 5.26598418370688923e-02, + -8.19072357140730734e-04, + 1.27398689714304647e-05, + -1.98156024921884136e-07, + 3.08209272424047790e-09, + -4.79348748071220178e-11, + 7.45133670430694259e-13, + -1.15483596399518754e-14, + 1.76309212798012760e-16, + -2.51150564457728996e-18, + 2.49369830655322620e-20, + 3.75985275680069986e-22, + -4.23959141220007739e-23, + 2.19939957544952560e-24, + 1.07643336089546154e-01, + -1.71913420627170825e-03, + 2.74556915921376034e-05, + -4.38484888712161733e-07, + 7.00282326051093588e-09, + -1.11830835739061450e-10, + 1.78504156940631241e-12, + -2.84180469939624106e-14, + 4.46628771731154415e-16, + -6.62860365670725363e-18, + 7.49161331998859337e-20, + 4.81767403637325396e-22, + -8.82729228772056735e-23, + 4.81966624339452026e-24, + 1.88956240307067563e-01, + -3.13417491413549255e-03, + 5.19858554135952275e-05, + -8.62277013413591504e-07, + 1.43022700379160680e-08, + -2.37211711468765334e-10, + 3.93271995853251039e-12, + -6.50578418210296620e-14, + 1.06518018866387458e-15, + -1.66931478814255722e-17, + 2.16848895599477629e-19, + -3.26832566181388990e-22, + -1.52407195492301331e-22, + 9.24984483287683827e-24, + 3.06660123138216112e-01, + -5.35999481807883718e-03, + 9.36852903623216246e-05, + -1.63748794385029274e-06, + 2.86207950709625338e-08, + -5.00221147554458107e-10, + 8.73976897534521083e-12, + -1.52440206350362643e-13, + 2.63872287455421775e-15, + -4.43113418975339391e-17, + 6.62412324907849305e-19, + -5.43370617700826394e-21, + -2.03867562579979617e-22, + 1.64113558081358650e-23, + 4.80228777475306123e-01, + -9.02526522466386150e-03, + 1.69617922038814873e-04, + -3.18774220187282094e-06, + 5.99089802519141937e-08, + -1.12585329484239324e-09, + 2.11526042510338742e-11, + -3.96939911026500244e-13, + 7.41163094691277542e-15, + -1.35866379281150390e-16, + 2.33952770258354515e-18, + -3.21294950070726139e-20, + 2.13636620176626811e-23, + 2.49978952582845969e-23, + 7.53322439435489155e-01, + -1.57162752411885570e-02, + 3.27882562869391764e-04, + -6.84048245419416798e-06, + 1.42709510123958145e-07, + -2.97718010380550343e-09, + 6.20990488795520963e-11, + -1.29434027544972400e-12, + 2.69042245046071567e-14, + -5.54186768063548257e-16, + 1.11121131565887612e-17, + -2.06549171964002245e-19, + 3.04209879709974162e-21, + -6.91932570628354517e-24, + 1.25966713396282426e+00, + -3.11110938728918450e-02, + 7.68377673109680724e-04, + -1.89772793452984642e-05, + 4.68696316031397802e-07, + -1.15755187910203930e-08, + 2.85858581561100504e-10, + -7.05699608822033626e-12, + 1.74033310816471026e-13, + -4.27922695200816187e-15, + 1.04452381361464398e-16, + -2.50817481911774136e-18, + 5.82272551693558870e-20, + -1.26391328197393116e-21, +# root=9 base[23]=68.0 */ + 1.90837632974750907e-03, + -2.72941039217144886e-05, + 3.90367504655608973e-07, + -5.58313909841772916e-09, + 7.98514677720173216e-11, + -1.14204762505686484e-12, + 1.63328157965418856e-14, + -2.33494431503618450e-16, + 3.33097774325525266e-18, + -4.70156307623469495e-20, + 6.31869390508149101e-22, + -6.68980894981157685e-24, + -2.60416976296114480e-26, + 6.02913280143454920e-27, + 1.73923681636182180e-02, + -2.50674241661070216e-04, + 3.61293957093663964e-06, + -5.20728871557975555e-08, + 7.50520031864390591e-10, + -1.08170750966922980e-11, + 1.55895528591025591e-13, + -2.24595995788659423e-15, + 3.22916713668055784e-17, + -4.59612972263798247e-19, + 6.24746016555749892e-21, + -6.82184618852584049e-23, + -1.49340401715909237e-25, + 5.48289487001121052e-26, + 4.95734252541635625e-02, + -7.25893616320460403e-04, + 1.06291130241145877e-05, + -1.55639936679484711e-07, + 2.27900221109715232e-09, + -3.33707149546647018e-11, + 4.88611795222099470e-13, + -7.15185011225844529e-15, + 1.04488991459358428e-16, + -1.51281700159442322e-18, + 2.10338865674169709e-20, + -2.43167358429931131e-22, + 1.91574407827944457e-25, + 1.54163501351939281e-25, + 1.01175247995488729e-01, + -1.51878727459093719e-03, + 2.27992006102264149e-05, + -3.42249059370442460e-07, + 5.13765103287564147e-09, + -7.71230522635311533e-11, + 1.15766668991179468e-12, + -1.73722164704742470e-14, + 2.60275169178471520e-16, + -3.86980530208385578e-18, + 5.56612975064041110e-20, + -6.94344531459517282e-22, + 3.06655646502788753e-24, + 2.97673375339886703e-25, + 1.77190836512413241e-01, + -2.75611721022307439e-03, + 4.28700614223560060e-05, + -6.66822894515649148e-07, + 1.03720980773666378e-08, + -1.61331905189803889e-10, + 2.50932109235346798e-12, + -3.90197741353545625e-14, + 6.05966572590934846e-16, + -9.35418544398298330e-18, + 1.40839843697109490e-19, + -1.91904662286361103e-21, + 1.56470401476634963e-23, + 4.22960521119179465e-25, + 2.86604732615035052e-01, + -4.68201992115530041e-03, + 7.64862123886450682e-05, + -1.24949070014276634e-06, + 2.04118628836678866e-08, + -3.33449536274630800e-10, + 5.44707017540592660e-12, + -8.89633309473204432e-14, + 1.45155776941804456e-15, + -2.35824844478453778e-17, + 3.76693573219260333e-19, + -5.65279111826096209e-21, + 6.60161408856148269e-23, + 1.64413396485313055e-25, + 4.46620288741940930e-01, + -7.80658730937662960e-03, + 1.36453284141988993e-04, + -2.38510081435819629e-06, + 4.16897471780065284e-08, + -7.28702102557315329e-10, + 1.27367761834474887e-11, + -2.22591112272980801e-13, + 3.88748702096812179e-15, + -6.77092645464539668e-17, + 1.16759463381301977e-18, + -1.94703413110920765e-20, + 2.90620327114324962e-22, + -2.71126335828500819e-24, + 6.95233012720056665e-01, + -1.33867949238656147e-02, + 2.57764338430477226e-04, + -4.96328294192726331e-06, + 9.55685607678659317e-08, + -1.84017753957061194e-09, + 3.54320791064224198e-11, + -6.82173914705064338e-13, + 1.31289260751945363e-14, + -2.52317338987640711e-16, + 4.82629562848033674e-18, + -9.10168019480845041e-20, + 1.64986292864112932e-21, + -2.67964161699811846e-23, + 1.14623400225408023e+00, + -2.57629626223236964e-02, + 5.79053002229458860e-04, + -1.30148993338686566e-05, + 2.92525121220396407e-07, + -6.57483209520050988e-09, + 1.47775304092834773e-10, + -3.32124330440910852e-12, + 7.46331452913214492e-14, + -1.67626803827036870e-15, + 3.75946386555192212e-17, + -8.40024713848727055e-19, + 1.86080924502490702e-20, + -4.04501093878682365e-22, +# root=9 base[24]=72.0 */ + 1.80505001168341909e-03, + -2.44190427231610798e-05, + 3.30345222294017652e-07, + -4.46896983843888006e-09, + 6.04570278091095208e-11, + -8.17873073220007878e-13, + 1.10642731370103872e-14, + -1.49673317204567690e-16, + 2.02427172907692628e-18, + -2.73437604322156038e-20, + 3.67129135458005467e-22, + -4.79714627254616313e-24, + 5.55870711473416278e-26, + -2.89527324728520272e-28, + 1.64437887566589724e-02, + -2.24081301688156714e-04, + 3.05358032119806717e-06, + -4.16114716716912665e-08, + 5.67044025795878939e-10, + -7.72716590082269992e-12, + 1.05298361725268027e-13, + -1.43485510966876727e-15, + 1.95479606610906719e-17, + -2.66002545052465342e-19, + 3.59904246753056118e-21, + -4.74722840714729298e-23, + 5.60479267358811442e-25, + -3.34145954067003103e-27, + 4.68289010567562794e-02, + -6.47758436947016018e-04, + 8.96008625141398585e-06, + -1.23939945369237778e-07, + 1.71439300889020618e-09, + -2.37142414869368089e-11, + 3.28024382755896093e-13, + -4.53721250894520044e-15, + 6.27461184356962994e-17, + -8.66811890397547076e-19, + 1.19138929308030789e-20, + -1.60148074628676063e-22, + 1.95931450862157013e-24, + -1.43638650378438853e-26, + 9.54407049108996763e-02, + -1.35153236037285256e-03, + 1.91390007268626560e-05, + -2.71026693864706111e-07, + 3.83799896577611340e-09, + -5.43497335526556324e-11, + 7.69640998147620412e-13, + -1.08984960718208462e-14, + 1.54301663835040792e-16, + -2.18264347802531285e-18, + 3.07436706136719043e-20, + -4.25299553482839492e-22, + 5.46796332019783538e-24, + -4.97632973636584814e-26, + 1.66805294397241594e-01, + -2.44256866951515252e-03, + 3.57671003507967217e-05, + -5.23745955747620402e-07, + 7.66933327550200334e-09, + -1.12303770950299720e-10, + 1.64448340466872534e-12, + -2.40798687063836312e-14, + 3.52547447664727662e-16, + -5.15785356310269065e-18, + 7.52148554286041998e-20, + -1.08223110830922341e-21, + 1.47882368859170470e-23, + -1.63543463227508593e-25, + 2.69012694381138173e-01, + -4.12501829792277699e-03, + 6.32526877325403062e-05, + -9.69911452709938607e-07, + 1.48725408858749856e-08, + -2.28054203122370418e-10, + 3.49695202976142924e-12, + -5.36207448863436798e-14, + 8.22108694241307009e-16, + -1.25978799773629048e-17, + 1.92608529808746566e-19, + -2.91863478247654514e-21, + 4.28221309307523874e-23, + -5.59456958935501668e-25, + 4.17410597147401696e-01, + -6.81911557008448542e-03, + 1.11401908489749453e-04, + -1.81994058350191856e-06, + 2.97318389112775036e-08, + -4.85720224691174314e-10, + 7.93504828825957841e-12, + -1.29630369757245735e-13, + 2.11753976467567614e-15, + -3.45786352922146191e-17, + 5.63868836515085357e-19, + -9.14797875040964983e-21, + 1.45887078417185856e-22, + -2.20271439806263451e-24, + 6.45466206099257200e-01, + -1.15394491489911009e-02, + 2.06298773458785594e-04, + -3.68814691563750615e-06, + 6.59355700208364985e-08, + -1.17877578407322796e-09, + 2.10737546161425078e-11, + -3.76745972888266496e-13, + 6.73497693136392256e-15, + -1.20376801867999382e-16, + 2.15004357844052092e-18, + -3.83122030486345630e-20, + 6.77855870049188622e-22, + -1.17532535578244091e-23, + 1.05155842768042262e+00, + -2.16845681915268894e-02, + 4.47165354916724610e-04, + -9.22115913404897979e-06, + 1.90152865608430127e-07, + -3.92121050985171045e-09, + 8.08606114708429432e-11, + -1.66744632386503330e-12, + 3.43841479836743520e-14, + -7.08979540556794908e-16, + 1.46153103172496892e-17, + -3.01083048882899112e-19, + 6.19128469197714902e-21, + -1.26710097361880544e-22, +# root=9 base[25]=76.0 */ + 1.71234140916572564e-03, + -2.19755031929803920e-05, + 2.82024798321499582e-07, + -3.61939320106522710e-09, + 4.64498411930478222e-11, + -5.96118613441713720e-13, + 7.65034400280526556e-15, + -9.81811073099733650e-17, + 1.25998646041184871e-18, + -1.61677518110199078e-20, + 2.07320805563164821e-22, + -2.64992752857892198e-24, + 3.33916508496653563e-26, + -3.96342454916682355e-28, + 1.55933616696377602e-02, + -2.01506690006192460e-04, + 2.60398924727765786e-06, + -3.36502971583627743e-08, + 4.34849143796653440e-10, + -5.61937890804847221e-12, + 7.26169244835759592e-14, + -9.38395918610094107e-16, + 1.21262276351611479e-17, + -1.56680022062485173e-19, + 2.02314161619438623e-21, + -2.60447094492714921e-23, + 3.30852362689732877e-25, + -3.97693560234914415e-27, + 4.43724233142571908e-02, + -5.81594015098613930e-04, + 7.62301387052744427e-06, + -9.99156438102591788e-08, + 1.30960483759443900e-09, + -1.71651274787590865e-11, + 2.24985039802376679e-13, + -2.94889329806476710e-15, + 3.86506242173063061e-17, + -5.06532173597632945e-19, + 6.63454484768788250e-21, + -8.66663405915792106e-23, + 1.11909246339924545e-24, + -1.37861474090017859e-26, + 9.03215739575994742e-02, + -1.21046226867205643e-03, + 1.62222472401193433e-05, + -2.17405624497176041e-07, + 2.91360405864597755e-09, + -3.90472340213742401e-11, + 5.23298964600968789e-13, + -7.01307377129744613e-15, + 9.39853030850844220e-17, + -1.25942166005932388e-18, + 1.68684491896193824e-20, + -2.25434820558191519e-22, + 2.98490436717061621e-24, + -3.80981919915861492e-26, + 1.57570224864210934e-01, + -2.17964343561984162e-03, + 3.01506551156098493e-05, + -4.17069135627616739e-07, + 5.76924987729274951e-09, + -7.98050974848398835e-11, + 1.10393064654461121e-12, + -1.52704569180929988e-14, + 2.11230419932901618e-16, + -2.92165139097413912e-18, + 4.03960045469425964e-20, + -5.57599883202895622e-22, + 7.64448858104001320e-24, + -1.02125952951288167e-25, + 2.53456239425624508e-01, + -3.66182656516963112e-03, + 5.29044927975302271e-05, + -7.64341321925656876e-07, + 1.10428741257864866e-08, + -1.59542683150034023e-10, + 2.30500332208195386e-12, + -3.33016290255715993e-14, + 4.81121641466885785e-16, + -6.95056543622543039e-18, + 1.00385257336508566e-19, + -1.44818422651605187e-21, + 2.07990439283684699e-23, + -2.93931595046436407e-25, + 3.91788771384730672e-01, + -6.00784707324905718e-03, + 9.21267506657660299e-05, + -1.41270875952812097e-06, + 2.16630459610402679e-08, + -3.32189876676808094e-10, + 5.09393245207475849e-12, + -7.81122980848448657e-14, + 1.19779490644493383e-15, + -1.83666261883747998e-17, + 2.81581181046671649e-19, + -4.31403014164729224e-21, + 6.59294304021634188e-23, + -9.98938820372661127e-25, + 6.02352052821170547e-01, + -1.00497849295287673e-02, + 1.67673002283690183e-04, + -2.79749625350303991e-06, + 4.66740928115463575e-08, + -7.78721649587052396e-10, + 1.29923751365771864e-11, + -2.16767658162079462e-13, + 3.61658326636314720e-15, + -6.03383392087493279e-17, + 1.00658491742709727e-18, + -1.67867314819563607e-20, + 2.79642507281879976e-22, + -4.64136969608603704e-24, + 9.71339929655497092e-01, + -1.85034852659288415e-02, + 3.52481100105414655e-04, + -6.71456885676795030e-06, + 1.27908800895407237e-07, + -2.43659145919739746e-09, + 4.64157071359409199e-11, + -8.84192914511287596e-13, + 1.68433387706462892e-14, + -3.20852641430916270e-16, + 6.11180437735696701e-18, + -1.16409509501744426e-19, + 2.21653053071684328e-21, + -4.21540827677687353e-23, +# root=9 base[26]=80.0 */ + 1.62869343775748137e-03, + -1.98812469396760251e-05, + 2.42687770892166167e-07, + -2.96245775319802566e-09, + 3.61623327997883616e-11, + -4.41428846868330714e-13, + 5.38846380708117137e-15, + -6.57762527605977745e-17, + 8.02920482615783819e-19, + -9.80101526001836393e-21, + 1.19630309303865669e-22, + -1.45969733278459511e-24, + 1.77818770759042376e-26, + -2.15057360951991116e-28, + 1.48265977602705795e-02, + -1.82179678934414580e-04, + 2.23850649712467901e-06, + -2.75053253299205951e-08, + 3.37967712983079441e-10, + -4.15272945648592834e-12, + 5.10260619951253196e-14, + -6.26975207545092629e-16, + 7.70385255590886687e-18, + -9.46587774103110724e-20, + 1.16301916729495176e-21, + -1.42847494101508152e-23, + 1.75184461141801978e-25, + -2.13398106987088622e-27, + 4.21608926186394992e-02, + -5.25073957304624385e-04, + 6.53929847105346331e-06, + -8.14407644827403013e-08, + 1.01426753151099057e-09, + -1.26317407420786140e-11, + 1.57316354065443035e-13, + -1.95922561364017704e-15, + 2.44002547482439968e-17, + -3.03878529740001071e-19, + 3.78426393616877454e-21, + -4.71127290381815075e-23, + 5.85752451073214756e-25, + -7.24016054005344630e-27, + 8.57238037926094792e-02, + -1.09038248719689175e-03, + 1.38693561856063175e-05, + -1.76414279630291444e-07, + 2.24393963456562320e-09, + -2.85422760658952218e-11, + 3.63049652197496429e-13, + -4.61788767074693631e-15, + 5.87381298866958568e-17, + -7.47124852238330840e-19, + 9.50267080026469564e-21, + -1.20835547456742159e-22, + 1.53486792014334952e-24, + -1.94046887453479314e-26, + 1.49304430774666402e-01, + -1.95700089843103917e-03, + 2.56512984684087090e-05, + -3.36223204411044659e-07, + 4.40703004959950215e-09, + -5.77649417394553478e-11, + 7.57151275774162181e-13, + -9.92432334209487348e-15, + 1.30082435233616489e-16, + -1.70503544573567137e-18, + 2.23476518436164635e-20, + -2.92853819327552100e-22, + 3.83457495974948986e-24, + -5.00360485766046492e-26, + 2.39601258669381645e-01, + -3.27249977773310828e-03, + 4.46961541634972894e-05, + -6.10464883931305003e-07, + 8.33779508367363927e-09, + -1.13878502348158252e-10, + 1.55536481000720126e-12, + -2.12433366717904271e-14, + 2.90143474167657706e-16, + -3.96278597002435422e-18, + 5.41223473843943758e-20, + -7.39089831922027725e-22, + 1.00874567040910067e-23, + -1.37362651203200148e-25, + 3.69131748346076538e-01, + -5.33321591314719380e-03, + 7.70543094807357682e-05, + -1.11328074958252821e-06, + 1.60846815127564096e-08, + -2.32391496057381334e-10, + 3.35759254073258456e-12, + -4.85104950109263284e-14, + 7.00879151700454680e-16, + -1.01262590425656354e-17, + 1.46301004147918714e-19, + -2.11354606981867557e-21, + 3.05238601974286998e-23, + -4.40224997823112635e-25, + 5.64639560921985528e-01, + -8.83106833509116583e-03, + 1.38119560399988509e-04, + -2.16021575657455226e-06, + 3.37861784439991988e-08, + -5.28422148961655153e-10, + 8.26462113909754085e-12, + -1.29260209715829024e-13, + 2.02165286975179389e-15, + -3.16189480171645581e-17, + 4.94520309954621411e-19, + -7.73399542445780660e-21, + 1.20937320688995544e-22, + -1.88971052335095883e-24, + 9.02500062198087205e-01, + -1.59744927307445446e-02, + 2.82752798246782252e-04, + -5.00480023141121885e-06, + 8.85863040394289081e-08, + -1.56800129737763993e-09, + 2.77540425602410390e-11, + -4.91253961405839289e-13, + 8.69532452470215948e-15, + -1.53909396683096253e-16, + 2.72422452160813981e-18, + -4.82186325089171944e-20, + 8.53429555942675090e-22, + -1.50982503955990552e-23, +# root=9 base[27]=84.0 */ + 1.55283936320787142e-03, + -1.80727348212310060e-05, + 2.10339685905295379e-07, + -2.44804031621858843e-09, + 2.84915391213890067e-11, + -3.31599032903548753e-13, + 3.85931830338861362e-15, + -4.49167097704399348e-17, + 5.22763450548198060e-19, + -6.08418062658096969e-21, + 7.08103102649537874e-23, + -8.24094212964976282e-25, + 9.58926159633995222e-27, + -1.11480070703186781e-28, + 1.41317267119812576e-02, + -1.65505862940218125e-04, + 1.93834704179223415e-06, + -2.27012456699415038e-08, + 2.65869085281923771e-10, + -3.11376615735177749e-12, + 3.64673450288806456e-14, + -4.27092840299839902e-16, + 5.00196192300221533e-18, + -5.85811767532142358e-20, + 6.86077909098738501e-22, + -8.03480798141924664e-24, + 9.40827035665523401e-26, + -1.10070037886340281e-27, + 4.01594018047340059e-02, + -4.76410799498795266e-04, + 5.65165913034882871e-06, + -6.70456063532405889e-08, + 7.95361720786986606e-10, + -9.43537244570666223e-12, + 1.11931779858709500e-13, + -1.32784616888599072e-15, + 1.57522309085709937e-17, + -1.86868468205387580e-19, + 2.21680678775122146e-21, + -2.62970965810248959e-23, + 3.11909053367157107e-25, + -3.69668437735542857e-27, + 8.15715841572434014e-02, + -9.87325683828930815e-04, + 1.19503870866245156e-05, + -1.44645028341823671e-07, + 1.75075368455342210e-09, + -2.11907626459659330e-11, + 2.56488633883783680e-13, + -3.10448564379255774e-15, + 3.75760514858826497e-17, + -4.54812429657654263e-19, + 5.50492846822140792e-21, + -6.66286631736999187e-23, + 8.06345939694449897e-25, + -9.75207035916009168e-27, + 1.41862879078042958e-01, + -1.76681233749156940e-03, + 2.20045289944735930e-05, + -2.74052476312050462e-07, + 3.41315007427553988e-09, + -4.25086231099418131e-11, + 5.29417985398361992e-13, + -6.59356571530576757e-15, + 8.21186779170393247e-17, + -1.02273544815534059e-18, + 1.27374709661455745e-20, + -1.58633671932272641e-22, + 1.97546976562811048e-24, + -2.45875507571361421e-26, + 2.27182991654165944e-01, + -2.94212582969553349e-03, + 3.81019033807698820e-05, + -4.93437441248613896e-07, + 6.39024528486459914e-09, + -8.27566604842551098e-11, + 1.07173739676851892e-12, + -1.38794996036096225e-14, + 1.79745986638744683e-16, + -2.32779325040883051e-18, + 3.01459191170521364e-20, + -3.90397629860696380e-22, + 5.05545714137023726e-24, + -6.54385801263898133e-26, + 3.48952888354146395e-01, + -4.76617079093858559e-03, + 6.50987132261268052e-05, + -8.89150357715127381e-07, + 1.21444544667264998e-08, + -1.65874953542860517e-10, + 2.26560198825598441e-12, + -3.09447099806068292e-14, + 4.22658097850533347e-16, + -5.77287081216294224e-18, + 7.88485610973592900e-20, + -1.07694189031765801e-21, + 1.47087462293170574e-23, + -2.00824908247496687e-25, + 5.31373020421332165e-01, + -7.82135116968699085e-03, + 1.15123522965197462e-04, + -1.69451866466185353e-06, + 2.49418488151292532e-08, + -3.67122437324928073e-10, + 5.40372467528208979e-12, + -7.95381519741296404e-14, + 1.17073274283648003e-15, + -1.72321693348905082e-17, + 2.53642336677486213e-19, + -3.73337618827469005e-21, + 5.49508542241355896e-23, + -8.08585444562897125e-25, + 8.42776916468023329e-01, + -1.39307746392932311e-02, + 2.30270286547568038e-04, + -3.80627827523001852e-06, + 6.29162994739959365e-08, + -1.03998195954792202e-09, + 1.71904972912654836e-11, + -2.84152233147193343e-13, + 4.69692580027792630e-15, + -7.76383485978122436e-17, + 1.28333109597507128e-18, + -2.12129221602825034e-20, + 3.50638725449567325e-22, + -5.79419038929450272e-24, +# root=9 base[28]=88.0 */ + 1.48373812281260564e-03, + -1.65002468981838007e-05, + 1.83494744466715777e-07, + -2.04059499561852048e-09, + 2.26929002693897470e-11, + -2.52361553241641438e-13, + 2.80644398871110302e-15, + -3.12096979595890985e-17, + 3.47074533387152919e-19, + -3.85972090083526024e-21, + 4.29228802682930052e-23, + -4.77332070339840958e-25, + 5.30818149980015803e-27, + -5.90179354775741009e-29, + 1.34990877380038836e-02, + -1.51020872925913520e-04, + 1.68954410119845609e-06, + -1.89017532119201923e-08, + 2.11463124419570130e-10, + -2.36574102346521298e-12, + 2.64666977037256523e-14, + -2.96095844667415925e-16, + 3.31256847529718935e-18, + -3.70593150293741409e-20, + 4.14600405483324221e-22, + -4.63832227693751800e-24, + 5.18902648729042179e-26, + -5.80397298036174431e-28, + 3.83393773198197133e-02, + -4.34212829509585921e-04, + 4.91767979792549597e-06, + -5.56952097022035222e-08, + 6.30776404978381820e-10, + -7.14386165706464544e-12, + 8.09078446295753128e-14, + -9.16322240042060347e-16, + 1.03778124923758239e-17, + -1.17533964527242457e-19, + 1.33113094591909377e-21, + -1.50756884740441667e-23, + 1.70737139945982617e-25, + -1.93328500348499046e-27, + 7.78031269857035884e-02, + -8.98219517914112761e-04, + 1.03697413409888987e-05, + -1.19716320269597969e-07, + 1.38209786219378927e-09, + -1.59560074713466007e-11, + 1.84208500255614331e-13, + -2.12664550307552094e-15, + 2.45516415172388466e-17, + -2.83443135477813724e-19, + 3.27228563035077821e-21, + -3.77777080265145201e-23, + 4.36129460357466073e-25, + -5.03402292122384631e-27, + 1.35128104960272860e-01, + -1.60306266681235722e-03, + 1.90175827188803925e-05, + -2.25610925858943912e-07, + 2.67648578787904086e-09, + -3.17519027298308438e-11, + 3.76681741200834747e-13, + -4.46868130234499044e-15, + 5.30132211715889548e-17, + -6.28910702288308605e-19, + 7.46094189483314206e-21, + -8.85110826045200814e-23, + 1.05002136234725153e-24, + -1.24543469855160493e-26, + 2.15988916244268858e-01, + -2.65937477519688275e-03, + 3.27436903611998012e-05, + -4.03158392141518356e-07, + 4.96390869083707434e-09, + -6.11183841663374027e-11, + 7.52523286683403894e-13, + -9.26548213527450589e-15, + 1.14081730477347456e-16, + -1.40463718971035269e-18, + 1.72946642851065708e-20, + -2.12941162741840219e-22, + 2.62183079459595822e-24, + -3.22754854602014768e-26, + 3.30866562750748328e-01, + -4.28499130526709474e-03, + 5.54941252859285510e-05, + -7.18694093373022785e-07, + 9.30767350936092325e-09, + -1.20541948173977038e-10, + 1.56111634707357679e-12, + -2.02177273950854440e-14, + 2.61836025397508299e-16, + -3.39098956143181309e-18, + 4.39160676933637268e-20, + -5.68748318586876751e-22, + 7.36572171636430041e-24, + -9.53742687093967270e-26, + 5.01809704073518992e-01, + -6.97543141826239849e-03, + 9.69623406560378269e-05, + -1.34782996803360339e-06, + 1.87355793026175300e-08, + -2.60434876896967459e-10, + 3.62018830619812529e-12, + -5.03226124079118996e-14, + 6.99512041678956063e-16, + -9.72360268692274155e-18, + 1.35163422582730678e-19, + -1.87884514816045356e-21, + 2.61169244810884344e-23, + -3.62966188200167117e-25, + 7.90471109517325243e-01, + -1.22556478996707716e-02, + 1.90014414989080955e-04, + -2.94602767631823564e-06, + 4.56758981687176924e-08, + -7.08169746768509303e-10, + 1.09796284327122007e-11, + -1.70230712403157295e-13, + 2.63929654680338449e-15, + -4.09202670582952233e-17, + 6.34437309151673873e-19, + -9.83646169212434100e-21, + 1.52506660974333833e-22, + -2.36392353045861483e-24, +# root=9 base[29]=92.0 */ + 1.42052620250746422e-03, + -1.51244262355024929e-05, + 1.61030657899430122e-07, + -1.71450290938337342e-09, + 1.82544135671344470e-11, + -1.94355817570265763e-13, + 2.06931784931038397e-15, + -2.20321491516193965e-17, + 2.34577590926634895e-19, + -2.49756142843885062e-21, + 2.65916827585937337e-23, + -2.83123142197642080e-25, + 3.01442416188669844e-27, + -3.20908465697808014e-29, + 1.29206771459403000e-02, + -1.38357671172189200e-04, + 1.48156671325901440e-06, + -1.58649672782171792e-08, + 1.69885827270803264e-10, + -1.81917767628155904e-12, + 1.94801854340985639e-14, + -2.08598439542348348e-16, + 2.23372149622904400e-18, + -2.39192187206683001e-20, + 2.56132649875915695e-22, + -2.74272841643295852e-24, + 2.93697428161836840e-26, + -3.14459638271612543e-28, + 3.66772047581655491e-02, + -3.97383403958794976e-04, + 4.30549630984956871e-06, + -4.66483962074328721e-08, + 5.05417427428149505e-10, + -5.47600339381565204e-12, + 5.93303901717248369e-14, + -6.42821953268347075e-16, + 6.96472856806897745e-18, + -7.54601543683123639e-20, + 8.17581715582726562e-22, + -8.85818142988008672e-24, + 9.59748632743162772e-26, + -1.03972146827622113e-27, + 7.43675669354791347e-02, + -8.20654826878323496e-04, + 9.05602230422562311e-06, + -9.99342686944208435e-08, + 1.10278638059762711e-09, + -1.21693771027608130e-11, + 1.34290504193677809e-13, + -1.48191147035013195e-15, + 1.63530669431274478e-17, + -1.80458011706905799e-19, + 1.99137527414365016e-21, + -2.19750557022062141e-23, + 2.42497052888549327e-25, + -2.67564233940594590e-27, + 1.29003957103961731e-01, + -1.46106859508607291e-03, + 1.65477206084962268e-05, + -1.87415606808466626e-07, + 2.12262525494600806e-09, + -2.40403563484290603e-11, + 2.72275443821219597e-13, + -3.08372788780590458e-15, + 3.49255795846766732e-17, + -3.95558930606237914e-19, + 4.48000766834608751e-21, + -5.07395097108354063e-23, + 5.74663307331670786e-25, + -6.50763901103625964e-27, + 2.05846467341721240e-01, + -2.41551360625864636e-03, + 2.83449410493626872e-05, + -3.32614844731209828e-07, + 3.90308220231951867e-09, + -4.58008742525250513e-11, + 5.37452191255367818e-13, + -6.30675423968533384e-15, + 7.40068599099735338e-17, + -8.68436455964699811e-19, + 1.01907021485212190e-20, + -1.19583188932143283e-22, + 1.40325284867690030e-24, + -1.64642104510057848e-26, + 3.14563230935692273e-01, + -3.87317482131818713e-03, + 4.76898814647538935e-05, + -5.87199106429240620e-07, + 7.23010374530123366e-09, + -8.90232965197810612e-11, + 1.09613189553063590e-12, + -1.34965248348656674e-14, + 1.66180897860146687e-16, + -2.04616307558463204e-18, + 2.51941308599233789e-20, + -3.10211927581460439e-22, + 3.81959627785325606e-24, + -4.70229624764731104e-26, + 4.75363649263310928e-01, + -6.25969985166139123e-03, + 8.24291935103038025e-05, + -1.08544692297918213e-06, + 1.42934192660476412e-08, + -1.88219092053091466e-10, + 2.47851308030562759e-12, + -3.26376406457780297e-14, + 4.29780094850784531e-16, + -5.65944492534932726e-18, + 7.45248955088086018e-20, + -9.81361235933477115e-22, + 1.29227916060334777e-23, + -1.70140691951641871e-25, + 7.44281078956902986e-01, + -1.08655088666756300e-02, + 1.58621905446346628e-04, + -2.31566778842709027e-06, + 3.38056543405506559e-08, + -4.93517365100461205e-10, + 7.20469384209177799e-12, + -1.05178899524598765e-13, + 1.53547133946917889e-15, + -2.24158290656607329e-17, + 3.27241139814468866e-19, + -4.77728313497809429e-21, + 6.97419395618281006e-23, + -1.01792184391042687e-24, +# root=9 base[30]=96.0 */ + 1.36248132696024189e-03, + -1.39137907838848197e-05, + 1.42088974099655551e-07, + -1.45102631441577611e-09, + 1.48180207399507927e-11, + -1.51323057664886256e-13, + 1.54532566682846914e-15, + -1.57810148261626850e-17, + 1.61157246191188430e-19, + -1.64575334844933737e-21, + 1.68065919576596368e-23, + -1.71630535700606151e-25, + 1.75270737050186519e-27, + -1.78969383633143724e-29, + 1.23898075782107615e-02, + -1.27223056366790641e-04, + 1.30637267521187765e-06, + -1.34143103874190410e-08, + 1.37743024317952299e-10, + -1.41439553732482144e-12, + 1.45235284756482581e-14, + -1.49132879605338775e-16, + 1.53135071934479258e-18, + -1.57244668725092751e-20, + 1.61464552020064288e-22, + -1.65797679393880022e-24, + 1.70247074715991105e-26, + -1.74797355201656050e-28, + 3.51531975097533547e-02, + -3.65048932483194697e-04, + 3.79085638141868886e-06, + -3.93662077212192721e-08, + 4.08799003292818731e-10, + -4.24517967990902058e-12, + 4.40841351606670610e-14, + -4.57792394996778245e-16, + 4.75395232652915835e-18, + -4.93674926971865164e-20, + 5.12657503259770901e-22, + -5.32369982258262706e-24, + 5.52840384681466533e-26, + -5.74035741418622676e-28, + 7.12226494155467071e-02, + -7.52720961162159103e-04, + 7.95517788263023878e-06, + -8.40747878823263204e-08, + 8.88549578871397345e-10, + -9.39069100260538549e-12, + 9.92460967888774420e-14, + -1.04888849234449998e-15, + 1.10852426940360539e-17, + -1.17155070775644461e-19, + 1.23816058550800636e-21, + -1.30855763024281413e-23, + 1.38295706661389243e-25, + -1.46142278684996216e-27, + 1.23410972316810322e-01, + -1.33713979697143610e-03, + 1.44877137184767993e-05, + -1.56972254706606828e-07, + 1.70077137265978687e-09, + -1.84276085443604268e-11, + 1.99660437683071902e-13, + -2.16329157848772427e-15, + 2.34389471832472325e-17, + -2.53957557276078702e-19, + 2.75159290650092504e-21, + -2.98131055217889792e-23, + 3.23020603134164821e-25, + -3.49946881908114131e-27, + 1.96614065637990665e-01, + -2.20372329582007188e-03, + 2.47001472086018730e-05, + -2.76848401649975355e-07, + 3.10301946174046284e-09, + -3.47797918375330014e-11, + 3.89824793294515843e-13, + -4.36930071854989941e-15, + 4.89727413369060358e-17, + -5.48904629861607604e-19, + 6.15232646014456031e-21, + -6.89575539240426589e-23, + 7.72901765439570187e-25, + -8.66187901677881565e-27, + 2.99791551547991808e-01, + -3.51800136429572183e-03, + 4.12831300124390243e-05, + -4.84450302072333448e-07, + 5.68493946818614960e-09, + -6.67117692334817462e-11, + 7.82850930808661958e-13, + -9.18661859681627062e-15, + 1.07803360666454784e-16, + -1.26505356101964026e-18, + 1.48451820159382251e-20, + -1.74205610631525892e-22, + 2.04427223678055196e-24, + -2.39858700468759867e-26, + 4.51566359164462916e-01, + -5.64874647772835303e-03, + 7.06614567761175606e-05, + -8.83920263267167259e-07, + 1.10571599774655263e-08, + -1.38316533569849793e-10, + 1.73023303432041115e-12, + -2.16438792657973785e-14, + 2.70748217364444644e-16, + -3.38685114162365376e-18, + 4.23668926128341869e-20, + -5.29977111462847503e-22, + 6.62960417296323701e-24, + -8.29182475362369409e-26, + 7.03193066861987348e-01, + -9.69918424333885733e-03, + 1.33781431330147487e-04, + -1.84525532454283194e-06, + 2.54517176180515504e-08, + -3.51057071123488291e-10, + 4.84215128563191301e-12, + -6.67880837662402208e-14, + 9.21212054314589189e-16, + -1.27063332428003773e-17, + 1.75259218207183379e-19, + -2.41736092904415547e-21, + 3.33428031899742817e-23, + -4.59811797274245835e-25, +# root=10 base[0]=0.0 */ + 1.11092106245711687e-02, + -3.28784578168335353e-04, + 7.27205149964053536e-06, + -1.42241377695380698e-07, + 2.58952613651888362e-09, + -4.48499117042991643e-11, + 7.46627729699738549e-13, + -1.20086716047464199e-14, + 1.86896667007273853e-16, + -2.81320881367856533e-18, + 4.08108760646741868e-20, + -5.67071187664506963e-22, + 7.45230627011769988e-24, + -9.05352302688774553e-26, + 1.03193943450807096e-01, + -3.06170926002693848e-03, + 6.60192584269721835e-05, + -1.20517847306524850e-06, + 1.91915366976300583e-08, + -2.62802847299129249e-10, + 2.87439267375410743e-12, + -1.79876046066493463e-14, + -1.84654832712329723e-16, + 9.26907805624264039e-18, + -2.04472934782099081e-19, + 3.17554579260378969e-21, + -3.26585393502284069e-23, + 2.71291226147468927e-26, + 3.06025594885118379e-01, + -9.12346074769865983e-03, + 1.86855133045841907e-04, + -2.94555145864624771e-06, + 3.35719300401456314e-08, + -1.68467558236144723e-10, + -3.43547097157829374e-12, + 1.11962998745431752e-13, + -1.53711144813764710e-15, + 2.77550372405307222e-18, + 3.96393383194310636e-19, + -1.01577842107314945e-20, + 1.13559345901373374e-22, + 6.30043875971544573e-25, + 6.65582533837136170e-01, + -1.99785082021920121e-02, + 3.78216569693064979e-04, + -4.66574832795953813e-06, + 2.16547477862931971e-08, + 4.94431372670272835e-10, + -1.15436035003457621e-11, + 3.75186074559544520e-14, + 2.82049160117575883e-15, + -5.66092592319170816e-17, + -2.09757611812295934e-20, + 2.00189911462090957e-20, + -3.29621759601117723e-22, + -1.76702007102434343e-24, + 1.28006799170929941e+00, + -3.87438500153016313e-02, + 6.59085851813389582e-04, + -5.51705418916477652e-06, + -2.52773166196419466e-08, + 1.05952198759700501e-09, + 6.52783367696531491e-14, + -3.01820457820921331e-13, + 2.08544671686849653e-15, + 8.68925163210019764e-17, + -1.40185137075284885e-18, + -2.14636557254579730e-20, + 7.07698783056198340e-22, + 2.78741798788326078e-24, + 2.36797055987392469e+00, + -7.23290887468877874e-02, + 1.07495759624538301e-03, + -4.75876709843327000e-06, + -8.56959225984169818e-08, + 4.77914621434524392e-10, + 2.30515974502004687e-11, + -7.91501541034049664e-14, + -7.69945137582820126e-15, + 9.61004262715409861e-18, + 2.85301529479327944e-18, + 2.65890959951759754e-21, + -1.12313006242905239e-21, + -3.55229754448681763e-24, + 4.47975279540587490e+00, + -1.38089747557984782e-01, + 1.74950027489788784e-03, + -2.08575498481280919e-06, + -1.13589474906965966e-07, + -1.17378057529775321e-09, + 1.44170083724649286e-11, + 5.18257755061028311e-13, + 1.56391278229827239e-15, + -1.60687206643317063e-16, + -2.53644898506482716e-18, + 2.96308022933280704e-20, + 1.36076699374317996e-21, + 5.12884178032672602e-24, + 9.33075370812941074e+00, + -2.90003827428548799e-01, + 3.09042361557931768e-03, + 2.08658689458520210e-06, + -7.04274010022328166e-08, + -2.11496298581660290e-09, + -2.63355356468744167e-11, + 5.89008139509781627e-14, + 9.35441556263800714e-15, + 1.76099144090975165e-16, + 4.88219937550116667e-19, + -5.28696065167791284e-20, + -1.32295084128526340e-21, + -8.73958405609443743e-24, + 2.47056720958188301e+01, + -7.72821194993166372e-01, + 7.00221581987648181e-03, + 6.56813734243490736e-06, + 3.48038532783495001e-08, + -7.62639656773078888e-10, + -3.08230946742048730e-11, + -6.40966203649616457e-13, + -8.78401980936922399e-15, + -5.07027857482098866e-17, + 1.32221487782851031e-18, + 5.34136846526499881e-20, + 1.07365456134033480e-21, + 1.24955302902170239e-23, + 1.35456370707429727e+02, + -4.25363095888058051e+00, + 3.44217676882572765e-02, + 9.63298848116673162e-06, + 1.34984011406878470e-07, + 1.72429347991599510e-09, + 1.85241394546492280e-11, + 1.21720708729978191e-13, + -1.18064251089373792e-15, + -7.07933508984875256e-17, + -1.92014638084799786e-18, + -4.13009803771739587e-20, + -7.76318221803231924e-22, + -1.31249900541645033e-23, +# root=10 base[1]=2.5 */ + 9.90052662023037031e-03, + -2.76793769672964418e-04, + 5.78701678106575138e-06, + -1.07114603323122336e-07, + 1.84761595781929762e-09, + -3.03733573106295910e-11, + 4.80881347188373353e-13, + -7.37645834753582046e-15, + 1.09838674078581946e-16, + -1.58942213611272457e-18, + 2.22931076610529241e-20, + -3.02493815628715178e-22, + 3.93169000455703881e-24, + -4.86931683169462893e-26, + 9.19186934698673075e-02, + -2.58655965660251411e-03, + 5.32377066113668497e-05, + -9.36593943493966646e-07, + 1.45822104641992943e-08, + -2.00270814144299113e-10, + 2.32837423326712549e-12, + -1.98897777998860853e-14, + 3.14079712032320208e-17, + 3.44179369685663601e-18, + -9.71672644066472162e-20, + 1.77182497043443473e-21, + -2.42722694957777783e-23, + 2.18132325506671609e-25, + 2.72310095438068500e-01, + -7.76115487173625190e-03, + 1.54608396910635361e-04, + -2.43886725507777538e-06, + 2.96039981418515167e-08, + -2.18675596144061987e-10, + -9.56876621370945727e-13, + 6.66579751715055759e-14, + -1.24462009392947047e-15, + 1.13220037799207527e-17, + 7.01517676601778373e-20, + -4.83274288149099162e-21, + 9.54917368994275259e-23, + -8.93690179800430326e-25, + 5.91374555292537685e-01, + -1.71701852993349224e-02, + 3.24585375548706130e-04, + -4.25469940474045678e-06, + 2.89028223208150923e-08, + 2.38338624163729398e-10, + -9.52844065147531026e-12, + 9.64449799882547099e-14, + 9.36697637805011538e-16, + -4.45365488578894345e-17, + 5.12549609557989627e-19, + 4.83548574977443767e-21, + -2.60010827778249866e-22, + 3.24314790525914213e-24, + 1.13521107004599564e+00, + -3.37412598035733771e-02, + 5.91146687603499605e-04, + -5.75458734503063726e-06, + -4.70602468520274438e-09, + 9.69686834474660129e-10, + -7.06604845736429981e-12, + -1.97104489429690699e-13, + 4.06771080165585438e-15, + 2.18459284196629425e-17, + -1.61981248338684732e-18, + 9.71181078759981545e-21, + 4.87025884442646653e-22, + -9.12916735884818416e-24, + 2.09546014970205441e+00, + -6.39802421027893392e-02, + 1.01003513585510587e-03, + -6.02461888950838929e-06, + -7.09244553042586847e-08, + 9.77812507611663603e-10, + 1.75917341437003267e-11, + -2.98690184487994283e-13, + -5.41434759029007811e-15, + 1.10524974808610855e-16, + 1.83852365533571824e-18, + -4.50083113650836266e-20, + -6.60735523497588406e-22, + 1.92669173470434543e-23, + 3.95518150549495306e+00, + -1.24226395289927946e-01, + 1.71286639153524645e-03, + -4.06723082409961849e-06, + -1.32425335213007393e-07, + -6.53943298116637788e-10, + 2.86400717994677062e-11, + 4.59870317609644507e-13, + -5.55815216090794992e-15, + -2.17091690977384842e-16, + 1.48842450155243502e-19, + 8.75422119939465466e-20, + 7.40366884613775781e-22, + -3.01349846123565380e-23, + 8.22031219994869922e+00, + -2.65202870926934176e-01, + 3.10719767249498626e-03, + 5.88257466152555631e-07, + -1.18713863672970197e-07, + -2.68754106884855633e-09, + -1.95476533805490763e-11, + 4.57735219461947641e-13, + 1.53082993361601280e-14, + 1.29715540383330519e-16, + -3.27638420341550418e-18, + -1.15736468415179246e-19, + -9.73813038910051837e-22, + 2.85526531424425604e-23, + 2.17269334150371058e+01, + -7.16480184216010785e-01, + 7.08372301252767345e-03, + 6.95609288744779193e-06, + 1.05302415125854553e-08, + -1.75071130420215552e-09, + -5.28755373655229618e-11, + -9.35456472724381423e-13, + -8.93667929929095370e-15, + 6.65066597209685627e-17, + 5.01102249307081947e-18, + 1.17742283570049574e-19, + 1.48051199338269195e-21, + -2.91162823577748168e-24, + 1.18993382755578409e+02, + -3.97775493509561651e+00, + 3.45515411982911802e-02, + 1.20938209233619261e-05, + 1.74157427027790969e-07, + 2.20251519325971183e-09, + 2.08902768384091041e-11, + 2.40147823382920503e-14, + -5.67043938392050776e-15, + -1.97839646881247227e-16, + -4.86078678868116537e-18, + -1.00868992424258418e-19, + -1.85902491608549580e-21, + -3.11744580216452960e-23, +# root=10 base[2]=5.0 */ + 8.87845645535887025e-03, + -2.35179000119781673e-04, + 4.66082146054699084e-06, + -8.18491155229702259e-08, + 1.34067933377398081e-09, + -2.09608240014607059e-11, + 3.16037391754265107e-13, + -4.62807113326766705e-15, + 6.59088387224591595e-17, + -9.16320486536565334e-19, + 1.23678326742190032e-20, + -1.63465674141380777e-22, + 2.05760249985457104e-24, + -2.57516537149831885e-26, + 8.23582989528224702e-02, + -2.20193376481099719e-03, + 4.32756180760798543e-05, + -7.32471783295941880e-07, + 1.10914802150729239e-08, + -1.50868137150472214e-10, + 1.79959950572016723e-12, + -1.75187812020007272e-14, + 1.01311124648553316e-16, + 8.10982492910000266e-19, + -4.09548183033988485e-20, + 8.65862442150674328e-22, + -1.39558351298190240e-23, + 1.65871003794299743e-25, + 2.43564779358017652e-01, + -6.63363869195670534e-03, + 1.28037155692782161e-04, + -2.00088059240783163e-06, + 2.51303962341863238e-08, + -2.23357033576094879e-10, + 4.15050379425285059e-13, + 3.35509632418262601e-14, + -8.26750111313968784e-16, + 1.10515172431100131e-17, + -5.87915943058399582e-20, + -1.41161031861382584e-21, + 4.79351737763037851e-23, + -8.11639818113479573e-25, + 5.27575303356584757e-01, + -1.47695800045844917e-02, + 2.76423325921645933e-04, + -3.76558358719038745e-06, + 3.16132622437913858e-08, + 4.41152794184837909e-11, + -6.61972219295357799e-12, + 1.04945016981799317e-13, + -2.75141711025324040e-16, + -2.28247176382945442e-17, + 5.12965528192545393e-19, + -3.43555118958307701e-21, + -8.91033692987054404e-23, + 2.80237397075938258e-24, + 1.00926707986814002e+00, + -2.92881806953114408e-02, + 5.22245529212135443e-04, + -5.68555465388497830e-06, + 1.26223862488470231e-08, + 7.48890260598590290e-10, + -1.07270094708952160e-11, + -6.56842094884900588e-14, + 3.84046788649757142e-15, + -2.92996493412632399e-17, + -8.54691319418177124e-19, + 2.11461164646755951e-20, + 3.42764816067019241e-24, + -7.68236752153654433e-24, + 1.85521676600441743e+00, + -5.62068142335152773e-02, + 9.31642119022237482e-04, + -6.98316506825079060e-06, + -4.79076853106419385e-08, + 1.28415591959343087e-09, + 7.47762377466018099e-12, + -3.98369063372074964e-13, + -6.45606153132452916e-16, + 1.39006202163429224e-16, + -4.52214678809519079e-19, + -5.02669937861858580e-20, + 4.26287646157362519e-22, + 1.76558958206856139e-23, + 3.48532084525807218e+00, + -1.10755442332737916e-01, + 1.65104705613226257e-03, + -6.24939463095611135e-06, + -1.37721338184805782e-07, + 1.60850713159739727e-10, + 3.79052841887739181e-11, + 1.66012478770200482e-13, + -1.22905140435593699e-14, + -1.30264725247601900e-16, + 4.10843536874735509e-18, + 7.55299733784785093e-20, + -1.33748613204779377e-21, + -4.05624863042310814e-23, + 7.20920943737708697e+00, + -2.40353568191257722e-01, + 3.10101828762791897e-03, + -1.76126318074478805e-06, + -1.75817708733610861e-07, + -2.94437828796815547e-09, + 5.88179958069595600e-13, + 9.86520518059281588e-13, + 1.63189012838779542e-14, + -1.09485773394702930e-16, + -8.60679031131782233e-18, + -1.02936270891763268e-19, + 1.97526724561721286e-21, + 8.08529620771689513e-23, + 1.89748808237841438e+01, + -6.59476798902900563e-01, + 7.16680257524971581e-03, + 6.76607035967370973e-06, + -3.94474392851083851e-08, + -3.36248416167566245e-09, + -8.23716634331626332e-11, + -1.13312788017208090e-12, + -1.51088446880205121e-15, + 3.89035540723965925e-16, + 1.14563706761242087e-17, + 1.61394153987188197e-19, + -3.33097939232308969e-22, + -8.11746803214283711e-23, + 1.03636178317199196e+02, + -3.70071120718113677e+00, + 3.47149275854372885e-02, + 1.52597434630971170e-05, + 2.23136294131528813e-07, + 2.68327612793265168e-09, + 1.76249314026930251e-11, + -3.19444978327563876e-13, + -1.76510758488639989e-14, + -5.14285507068282894e-16, + -1.19861185280969828e-17, + -2.43121730612391255e-19, + -4.39656444918345538e-21, + -6.78032746630874561e-23, +# root=10 base[3]=7.5 */ + 8.00656900613226120e-03, + -2.01485906772881201e-04, + 3.79472723574527133e-06, + -6.33799961362114488e-08, + 9.87929119078021727e-10, + -1.47200178460272204e-11, + 2.11626455835865950e-13, + -2.96381526171700247e-15, + 4.03259660126218737e-17, + -5.40577524133729664e-19, + 6.94616302145050021e-21, + -9.05607849567177215e-23, + 1.10129565152480080e-24, + -1.15289162646207336e-26, + 7.41912809445758048e-02, + -1.88808545688512030e-03, + 3.54583280378176110e-05, + -5.76960264170161618e-07, + 8.46826072351362851e-09, + -1.13180401260739681e-10, + 1.35697460199731711e-12, + -1.40619761166166194e-14, + 1.08614890727519425e-16, + -2.34328763467987129e-19, + -1.48683375437613875e-20, + 3.75223806167890288e-22, + -6.94481218984032318e-24, + 1.14209410935666618e-25, + 2.18935960742375896e-01, + -5.69888285033357585e-03, + 1.06294197321019844e-04, + -1.63372000294357697e-06, + 2.08250040855469271e-08, + -2.04763182301163602e-10, + 1.04013904294754928e-12, + 1.29201013818970535e-14, + -4.81041903314115474e-16, + 7.99951720694445648e-18, + -8.33079841977993135e-20, + 4.82518522030067505e-23, + 1.67298945206274093e-23, + -3.69687036875667804e-25, + 4.72645735380940180e-01, + -1.27303267714145817e-02, + 2.34275018630607029e-04, + -3.26037228628140319e-06, + 3.11369748725955028e-08, + -8.11175257273218563e-11, + -3.90181790603483917e-12, + 8.66018270054247857e-14, + -7.71966861954533323e-16, + -6.13323780304228880e-18, + 3.11252895929711421e-19, + -4.92398309805520272e-21, + 1.30977439908231294e-23, + 1.21614478293868762e-24, + 9.00044414058724374e-01, + -2.53786445012327486e-02, + 4.55678440754825158e-04, + -5.37815196540309086e-06, + 2.49436563901003830e-08, + 4.82093101597829833e-10, + -1.10409173237569271e-11, + 3.55077292085499366e-14, + 2.38599635237360199e-15, + -4.60113354823845988e-17, + -3.15966133651983493e-20, + 1.44629029398167272e-20, + -2.23352767400087084e-22, + -1.01964156472324366e-24, + 1.64474929620126109e+00, + -4.90999036268553318e-02, + 8.44113790570429285e-04, + -7.53824954218165344e-06, + -2.13266574274924127e-08, + 1.33183271140139597e-09, + -3.26131370174105937e-12, + -3.46303206933396570e-13, + 3.57486800073553708e-15, + 8.53185491269011266e-17, + -1.97187328572876210e-18, + -1.53234243749742308e-20, + 8.63314703340660596e-22, + -1.07345576886851277e-24, + 3.06818872223036143e+00, + -9.78839269599135198e-02, + 1.56310164249614104e-03, + -8.37703381668070560e-06, + -1.25274035668936788e-07, + 1.07885205769471911e-09, + 3.65995144610238788e-11, + -2.65503823098934597e-13, + -1.34412501727554371e-14, + 7.53319938891441373e-17, + 5.43167581103561504e-18, + -2.39874925461998958e-20, + -2.37967535370829821e-21, + 8.04510403423054621e-24, + 6.29720425466027312e+00, + -2.15682204710726633e-01, + 3.06109188957312582e-03, + -5.03429818713645501e-06, + -2.32046413754075265e-07, + -2.54597881058344544e-09, + 3.44149682730187927e-11, + 1.37265746073281150e-12, + 5.45621082817296996e-15, + -5.01096950732430977e-16, + -9.54223157199936640e-18, + 9.21105748768519457e-20, + 5.82825120289104287e-21, + 4.20370383427206819e-23, + 1.64521338604338787e+01, + -6.01834198732541070e-01, + 7.24161200573719167e-03, + 5.47881495132825543e-06, + -1.28996995870793977e-07, + -5.70916742022598174e-09, + -1.11964247741808771e-10, + -8.56103911180394582e-13, + 2.22700258623052956e-14, + 9.64567454401110485e-16, + 1.60975013643450175e-17, + -1.20679611427465803e-20, + -8.05862047541979649e-21, + -2.10966541835999028e-22, + 8.93900232950847453e+01, + -3.42219441847713846e+00, + 3.49212993751359668e-02, + 1.92777856647601367e-05, + 2.79890903220861823e-07, + 2.91410483634511627e-09, + -2.81196705937749103e-12, + -1.29820862213447995e-12, + -4.80331698499859333e-14, + -1.28244443148729309e-15, + -2.85445932953549280e-17, + -5.30623237970787173e-19, + -6.69254257769761996e-21, + 4.95658957213651975e-23, +# root=10 base[4]=10.0 */ + 7.25687610045588211e-03, + -1.73922323682118075e-04, + 3.12011592923051797e-06, + -4.96781771479532467e-08, + 7.38280892121317391e-10, + -1.05072475924279680e-11, + 1.44121490672230905e-13, + -1.93806735008816116e-15, + 2.50352399008325263e-17, + -3.28488798580992240e-19, + 3.97580152174229920e-21, + -4.64236492341485301e-23, + 8.51347589617420320e-25, + 1.37624936502749554e-27, + 6.71654620890425602e-02, + -1.62997073264831388e-03, + 2.92784416346170194e-05, + -4.57934400303250975e-07, + 6.50041810716883811e-09, + -8.49562781575342794e-11, + 1.00997408314320672e-12, + -1.08087735634342114e-14, + 9.27146580854579589e-17, + -5.75825622520762669e-19, + -3.58710763068808469e-21, + 1.86426962009839958e-22, + -7.71950994414978680e-25, + 1.28523566255179556e-25, + 1.97724571940841060e-01, + -4.92158536406416859e-03, + 8.85582752534429241e-05, + -1.33183081633185510e-06, + 1.70007333269241604e-08, + -1.76954706538293221e-10, + 1.22518688652279533e-12, + 1.50739527894616946e-15, + -2.50767229352141904e-16, + 4.89587296340293952e-18, + -6.80553346052534679e-20, + 5.91462756060196144e-22, + 9.87104767289170672e-24, + 8.10590811441032750e-26, + 4.25236797438371006e-01, + -1.10043077073275833e-02, + 1.98071809574038797e-04, + -2.77947508509396683e-06, + 2.87595887294129746e-08, + -1.48582650057277356e-10, + -1.84123445354828329e-12, + 6.03644044422260930e-14, + -8.17760168797771808e-16, + 2.35843006295323079e-18, + 1.26532822529884399e-19, + -3.13531660445159465e-21, + 5.62509395562299757e-23, + 5.91134883273541767e-25, + 8.05422380923658476e-01, + -2.19839421112277937e-02, + 3.93808007559732348e-04, + -4.91584213175108450e-06, + 3.20543817882966414e-08, + 2.36157502679455623e-10, + -9.22225399948534229e-12, + 8.61677549110983365e-14, + 8.31401122275028560e-16, + -3.76827414979898233e-17, + 3.75361870601081944e-19, + 4.65879328760694677e-21, + -1.48708069310011237e-22, + 3.16219674897695407e-24, + 1.46127702142442706e+00, + -4.27126486889425269e-02, + 7.52464290770353322e-04, + -7.67366898882513763e-06, + 3.81866730842830288e-09, + 1.15240431650971645e-09, + -1.10072003607580384e-11, + -1.98600235581567390e-13, + 5.17034130330914694e-15, + 4.43148386885267722e-18, + -1.81615972159246670e-18, + 1.95304945372410253e-20, + 5.16920656858031076e-22, + -9.47780357659485692e-24, + 2.70098041413463541e+00, + -8.58133519999280392e-02, + 1.45140865523303076e-03, + -1.01644321539227675e-05, + -9.57506387327587053e-08, + 1.82334605146867562e-09, + 2.38290725617524168e-11, + -6.14244885163612012e-13, + -7.35346388252553924e-15, + 2.41678688404719234e-16, + 2.29057290000421473e-18, + -1.03732208362554638e-19, + -5.33208804704318480e-22, + 5.40226803220401841e-23, + 5.48297653856860556e+00, + -1.91501745352292058e-01, + 2.97690492447578005e-03, + -9.09633478781912462e-06, + -2.71570664251845993e-07, + -1.25808917007421937e-09, + 7.21275217781583588e-11, + 1.19797409867726564e-12, + -1.77031433867384768e-14, + -7.17062292222140945e-16, + 7.48292913400270628e-19, + 3.60009391297953073e-19, + 3.80420829573169464e-21, + -1.30989666748919271e-22, + 1.41610170361144174e+01, + -5.43683066267061865e-01, + 7.29071528743174390e-03, + 2.34914689175994275e-06, + -2.71425402596550732e-07, + -8.56707883768992397e-09, + -1.19898520597236493e-10, + 5.26901005905351726e-13, + 6.71240614207695493e-14, + 1.44389881864512042e-15, + 3.12337194096236752e-18, + -6.58557165448740688e-19, + -1.77652801878570347e-20, + -7.28703588585475266e-23, + 7.62615647184199048e+01, + -3.14181823003478433e+00, + 3.51813711033914095e-02, + 2.42025130332617096e-05, + 3.33442513836385859e-07, + 2.18497114542810256e-09, + -6.94806982800087454e-11, + -3.84464448235756296e-12, + -1.21039010111096174e-13, + -2.95387988826289970e-15, + -5.50827918406904510e-17, + -4.96355313315342796e-19, + 1.70247893592911851e-20, + 1.08793074819743744e-21, +# root=10 base[5]=12.5 */ + 6.60759699618620761e-03, + -1.51159971808939006e-04, + 2.58847997759865067e-06, + -3.93758596304918523e-08, + 5.58754768809232779e-10, + -7.61890990494916483e-12, + 9.94929120663723776e-14, + -1.29871332667097439e-15, + 1.56928485280463675e-17, + -1.97804742492225766e-19, + 2.88071079620960727e-21, + -2.32809954094366063e-24, + 9.50408708510798395e-25, + -3.33335100948488469e-27, + 6.10815673020341926e-02, + -1.41607700134527498e-03, + 2.43551967692417117e-05, + -3.66300828642004311e-07, + 5.02082107257536609e-09, + -6.40331369133059584e-11, + 7.45644669967814244e-13, + -8.18491567428413444e-15, + 7.14524022982222796e-17, + -5.42937452554376765e-19, + 6.05471853681776414e-21, + 2.95565422768455635e-22, + 4.47391969056394264e-24, + 2.46759460025686758e-26, + 1.79360130502038750e-01, + -4.27268142142609494e-03, + 7.40967650785259675e-05, + -1.08653424365168101e-06, + 1.37550436978410045e-08, + -1.47805011517254856e-10, + 1.17814047075538846e-12, + -4.16239439752082255e-15, + -1.15812573364185814e-16, + 2.85613229449783966e-18, + -2.93245405327463560e-20, + 1.21964095248448025e-21, + 1.53151259540074064e-23, + -4.92890621805690238e-26, + 3.84188204955304424e-01, + -9.54556422984732464e-03, + 1.67374632074108602e-04, + -2.34497308943414514e-06, + 2.54681049176548191e-08, + -1.75339226410682189e-10, + -4.98971082404596270e-13, + 3.63131127183726368e-14, + -6.67057331576085539e-16, + 5.54803203889385001e-18, + 5.65913028297747191e-20, + 7.50175288756317282e-23, + 6.97222809609790526e-23, + -3.56241607695612390e-25, + 7.23426625485749208e-01, + -1.90604346129385482e-02, + 3.38014370524928698e-04, + -4.37635320763545123e-06, + 3.47702409329033376e-08, + 4.56402112188963491e-11, + -6.61855654135416935e-12, + 9.42653591635918363e-14, + -2.20138589930693758e-16, + -2.00575747794740435e-17, + 4.83564867608661128e-19, + 1.53063941110326437e-21, + 5.12457543863568255e-24, + 1.60117966284091198e-24, + 1.30188630496741364e+00, + -3.70585814231946462e-02, + 6.61456586026264344e-04, + -7.44409597919808833e-06, + 2.38701782943845986e-08, + 8.39892568821969546e-10, + -1.43160958106900173e-11, + -4.25709216242800343e-14, + 4.28302995975323771e-15, + -4.54588115671722581e-17, + -5.81576032134816177e-19, + 3.28716578087329751e-20, + 4.89404194541164243e-23, + -8.68262728049554461e-24, + 2.38014415054364026e+00, + -7.47130769119538490e-02, + 1.32153057497314745e-03, + -1.13798525038016390e-05, + -5.50595727958136001e-08, + 2.17071537967062270e-09, + 4.71774002381442891e-12, + -7.01635352086995839e-13, + 1.90076774126254617e-15, + 2.44335692057515374e-16, + -1.87827548348086387e-18, + -6.67392015248854260e-20, + 1.78600362583419815e-21, + 2.13343306993663088e-23, + 4.76380274216574318e+00, + -1.68198247572527743e-01, + 2.84118018979906449e-03, + -1.35387494376205517e-05, + -2.77133538500107168e-07, + 7.88640198878327104e-10, + 9.40905138557013223e-11, + 2.57245791755072790e-13, + -3.88877158090468461e-14, + -3.46717268304019499e-16, + 1.75109341708219867e-17, + 3.21200713239088599e-19, + -6.12247460355819282e-21, + -2.08101973346305181e-22, + 1.21029921294221960e+01, + -4.85332405598899341e-01, + 7.28671304110595133e-03, + -3.51074632277026149e-06, + -4.68891576642749946e-07, + -1.09776736364009639e-08, + -6.74895459764860088e-11, + 3.45903888889354077e-12, + 1.12116402990441736e-13, + 7.46519566523530645e-16, + -4.31876372739741797e-17, + -1.34017640393536367e-18, + -3.97973726881172710e-21, + 6.82013347669302416e-22, + 6.42591645407740941e+01, + -2.85911233024577838e+00, + 3.55048383142534188e-02, + 2.97506970520760715e-05, + 3.49010358626613853e-07, + -1.32615234335200560e-09, + -2.50507671529632220e-10, + -9.86257332144805772e-12, + -2.68199832210181917e-13, + -5.08266752112091836e-15, + -3.04730825257744201e-17, + 2.44166212292773412e-18, + 1.19997737426006589e-19, + 2.67715997744530135e-21, +# root=10 base[6]=15.0 */ + 6.04158050836114437e-03, + -1.32200987297143442e-04, + 2.16497040480680463e-06, + -3.15364893974850723e-08, + 4.27577655349471177e-10, + -5.61647792784283956e-12, + 6.92499168875619930e-14, + -8.87696056097519624e-16, + 1.07315211459865845e-17, + -7.30606759952058426e-20, + 3.56138044319806397e-21, + 2.39089958763515476e-23, + -2.55074262956816502e-25, + -4.85021237190081656e-26, + 5.57809107623081571e-02, + -1.23754358561181514e-03, + 2.04022712038356735e-05, + -2.95314154162417346e-07, + 3.90181664526323236e-09, + -4.86451156983508888e-11, + 5.46037875532666398e-13, + -6.13539961679351820e-15, + 5.99296358029482094e-17, + 1.39479758389740448e-20, + 2.25619862114071130e-20, + 3.82587077719255063e-22, + -4.84851265134627622e-24, + -4.30045968143614447e-25, + 1.63377374492172045e-01, + -3.72853447830478633e-03, + 6.22861396347360312e-05, + -8.88612052110426037e-07, + 1.10704752734318307e-08, + -1.21257249717549362e-10, + 1.02421880778193543e-12, + -6.33315317253255451e-15, + -1.94905635612970178e-17, + 2.92699282919514988e-18, + 3.49228893567241230e-20, + 1.44696261955765897e-21, + -1.73615073644948827e-23, + -1.35428453948290264e-24, + 3.48515149134867031e-01, + -8.31246775116030977e-03, + 1.41562907122112585e-04, + -1.96588351558767836e-06, + 2.19123030297788216e-08, + -1.77324058167042034e-10, + 2.52400540568027556e-13, + 1.86598731133309639e-14, + -4.17864070757506846e-16, + 8.70443759480902359e-18, + 1.15311744590810281e-19, + 1.88092633380390703e-21, + -2.12754288705683568e-23, + -3.39397769202151706e-24, + 6.52273892054041404e-01, + -1.65569094248712544e-02, + 2.88840642522461837e-04, + -3.82048163892796079e-06, + 3.43019373227713028e-08, + -8.28582943298068843e-11, + -4.15887401408270420e-12, + 7.95423185854489370e-14, + -5.76388911604263315e-16, + 7.68209359006732837e-19, + 5.56375171649765905e-19, + 1.03491083017403426e-21, + -9.08801652163438181e-23, + -5.75516844252331538e-24, + 1.16368022867922583e+00, + -3.21165982537465547e-02, + 5.74912348307647387e-04, + -6.94660552964348898e-06, + 3.72088809719862755e-08, + 4.95887039674807258e-10, + -1.38510224170376700e-11, + 6.66135223278207573e-14, + 2.57012812374423772e-15, + -4.08292914085838085e-17, + 7.41401393854769186e-19, + 2.27973287097292100e-20, + -5.17794768963096915e-22, + -1.40822730644121890e-23, + 2.10155468145552726e+00, + -6.46987342964323725e-02, + 1.18112148766078896e-03, + -1.19137971231144376e-05, + -1.20365667530088700e-08, + 2.06256102942388669e-09, + -1.28830100309408242e-11, + -5.18728642423349494e-13, + 8.87842785502227485e-15, + 1.36878494188816049e-16, + -2.87979416914693526e-18, + 1.46927043528035919e-20, + 9.83772137970422737e-22, + -4.87373001770624213e-23, + 4.13533585742790510e+00, + -1.46192048952883430e-01, + 2.65302870140072004e-03, + -1.77241860760063811e-05, + -2.38951781572963692e-07, + 2.98649654661825251e-09, + 8.30874315223580598e-11, + -1.03066818855675681e-12, + -3.63993114606893847e-14, + 5.16030695668242691e-16, + 2.19814278046788728e-17, + -1.70442285986760410e-19, + -1.25120967543448140e-20, + 1.41092008190894100e-24, + 1.02777805604814318e+01, + -4.27351819642393216e-01, + 7.19214810337420220e-03, + -1.28170433754692433e-05, + -6.94649398931664909e-07, + -1.10196927320543043e-08, + 8.05959841660534254e-11, + 7.03072421319530080e-12, + 9.42872398079275281e-14, + -2.06129002977937770e-15, + -9.04512412128967964e-17, + -3.98791253353296845e-19, + 4.60988456148676739e-20, + 9.75773312541164572e-22, + 5.33931817131658306e+01, + -2.57355534214666903e+00, + 3.58931149321136747e-02, + 3.46824842536251119e-05, + 2.34259953175911719e-07, + -1.17920860877395388e-08, + -6.74196650337583446e-10, + -2.12765040415270884e-11, + -4.28285972335568887e-13, + -1.99218724125873588e-15, + 2.47779996252672765e-16, + 1.09034980013895600e-17, + 1.98435988633983493e-19, + -1.44405771288798366e-21, +# root=10 base[7]=17.5 */ + 5.54517293801465132e-03, + -1.16286663986794195e-04, + 1.82414416526991684e-06, + -2.55113553353613409e-08, + 3.30048736311598841e-10, + -4.21534700711533421e-12, + 4.90118133472917215e-14, + -5.57460682355643548e-16, + 1.08081973073945499e-17, + 7.59648820408891782e-20, + 3.23136612384719631e-21, + -6.76559488418677870e-23, + -3.79425178110266767e-24, + -7.31184235242340350e-26, + 5.11361351890290972e-02, + -1.08750878972088140e-03, + 1.72031263780650168e-05, + -2.40010710448982438e-07, + 3.04719521084648323e-09, + -3.73776186119956501e-11, + 4.02566821793169354e-13, + -4.01043542957664417e-15, + 7.94085743070140102e-17, + 1.08685609834700563e-18, + 2.42464403292104122e-20, + -5.66989179123109402e-22, + -3.69320980585048429e-23, + -6.63358361651994243e-25, + 1.49396298924955623e-01, + -3.27006350408661894e-03, + 5.26096923143466968e-05, + -7.29610222744891459e-07, + 8.87687192604671762e-09, + -9.87647691588675556e-11, + 8.56520503489556790e-13, + -4.90333113316367276e-15, + 1.21960961639578799e-16, + 5.04943102473828641e-18, + 4.93240317244871574e-20, + -1.58495056081544133e-21, + -1.14743045969485646e-22, + -1.95305757084424788e-24, + 3.17388940117766138e-01, + -7.26863336528431065e-03, + 1.19960347002469927e-04, + -1.64317488091219173e-06, + 1.84622649833857021e-08, + -1.66183091102779229e-10, + 6.41854439072855736e-13, + 1.13069554504805964e-14, + -9.58517045103282306e-18, + 1.39355123875249752e-17, + 1.00812337039084137e-19, + -4.40452310864094605e-21, + -2.50218638198747824e-22, + -4.35407994472549029e-24, + 5.90390313952094403e-01, + -1.44203948420248210e-02, + 2.46217577833982612e-04, + -3.28960955636934169e-06, + 3.18169408490299601e-08, + -1.57850094168640018e-10, + -2.15520966024746710e-12, + 6.57966282129736088e-14, + -1.58228847802538580e-16, + 2.13467662521471386e-17, + 3.72823132727320680e-19, + -1.27528197992008145e-20, + -5.02622286906036510e-22, + -7.66329404264658915e-24, + 1.04389962995104524e+00, + -2.78399755405123045e-02, + 4.95396015218572115e-04, + -6.28919694013613617e-06, + 4.39965970145654470e-08, + 1.94023596429038784e-10, + -1.10058562188971284e-11, + 1.32475582422566112e-13, + 1.78896027793858352e-15, + -1.19143534338194815e-18, + 9.23033289411662390e-19, + -2.06668157351515067e-20, + -1.26515729579600222e-21, + -1.02816874497211767e-23, + 1.86075158644202010e+00, + -5.58218946470220995e-02, + 1.03829529358629596e-03, + -1.17974817498290757e-05, + 2.51287313601895573e-08, + 1.61497944436878370e-09, + -2.28379295425355552e-11, + -1.76322316303330258e-13, + 1.19405687954237494e-14, + 3.82953263638062000e-17, + -2.21880247330533603e-18, + -8.35223771123642189e-21, + -1.89594818545188756e-21, + -4.27264015609714827e-23, + 3.59158412711218267e+00, + -1.25878389161910548e-01, + 2.41968922854746745e-03, + -2.09731338378613671e-05, + -1.62205445077452099e-07, + 4.52534837177056590e-09, + 4.17888252488234623e-11, + -1.75341860973910863e-12, + -5.34146925024544356e-15, + 1.07986330285611820e-15, + 2.64210771453898559e-18, + -6.49866411528411592e-19, + -5.26436348769765306e-21, + 2.50907063203686137e-22, + 8.68218601793040712e+00, + -3.70634511253967736e-01, + 6.96491991587131973e-03, + -2.55175456099845807e-05, + -8.78374768195464269e-07, + -6.47569182266271697e-09, + 3.03582803095253256e-10, + 8.17315508542974330e-12, + -4.22763902784097106e-14, + -5.24295374205045760e-15, + -4.72904644188687366e-17, + 2.44977731557096103e-18, + 5.54639212982717354e-20, + -9.63940309731458034e-22, + 4.36759438205490014e+01, + -2.28470669960946671e+00, + 3.63205424833520432e-02, + 3.54343681707239424e-05, + -2.19596962418216746e-07, + -3.66422566367924086e-08, + -1.45279422400579633e-09, + -3.31348078934693310e-11, + -1.85315952874588890e-13, + 1.95734651804752222e-14, + 8.50248780062007705e-16, + 1.29490864032918079e-17, + -2.52850734945062090e-19, + -1.72485158382109325e-20, +# root=10 base[8]=20.0 */ + 5.10739251134947284e-03, + -1.02834297920784056e-04, + 1.54710475414278060e-06, + -2.08456840196785097e-08, + 2.56455608340844279e-10, + -3.18407981251847039e-12, + 3.87823190741970812e-14, + -1.52419125777369400e-16, + 1.45779584916873628e-17, + 8.08852132834620958e-20, + -4.77667548718054391e-21, + -3.08427102703191343e-22, + -5.13601431550897092e-24, + 5.58957343512305385e-26, + 4.70442085485251113e-02, + -9.60629025928674742e-04, + 1.45924690408453888e-05, + -1.96743557344205244e-07, + 2.38881923334618599e-09, + -2.87353855173023738e-11, + 3.32610753186340727e-13, + -7.40603835825640109e-16, + 1.24455757380197572e-16, + 9.35600608438005827e-19, + -4.88454224761900027e-20, + -2.85706495406097046e-21, + -4.80651367330988607e-23, + 5.55981177785238450e-25, + 1.37105569308567737e-01, + -2.88193580485391785e-03, + 4.46448789861190741e-05, + -6.02302232744732315e-07, + 7.09904563276216408e-09, + -7.92385690066268512e-11, + 8.02584843984748515e-13, + 2.04241340817304367e-15, + 3.05451775634923169e-16, + 3.71808498332659574e-18, + -1.67619193572851329e-19, + -8.53422062534053744e-21, + -1.42293602177298687e-22, + 1.84471292751633260e-24, + 2.90115654919746224e-01, + -6.38304785490794932e-03, + 1.01907962153895292e-04, + -1.37341783199617432e-06, + 1.53201389323454359e-08, + -1.46536445695471179e-10, + 1.03176440407587063e-12, + 1.91867819656245974e-14, + 4.80941883185510402e-16, + 9.93622470580762786e-18, + -4.12533037912843308e-19, + -1.93861434736678505e-20, + -2.97042566585982076e-22, + 4.61170012784015443e-24, + 5.36410087657960166e-01, + -1.26001563592562753e-02, + 2.09685112909738453e-04, + -2.80797898875829318e-06, + 2.82922340490585614e-08, + -1.87262372879219250e-10, + -2.56395332040404022e-13, + 7.43377783560793024e-14, + 6.70752730544052127e-16, + 1.69228595814044319e-17, + -8.06304418486216128e-19, + -4.11426405830835427e-20, + -5.19810543593470079e-22, + 1.09575245986348765e-23, + 9.40005259329059206e-01, + -2.41665133846387069e-02, + 4.24234621243167536e-04, + -5.56718019019554196e-06, + 4.55701081676747496e-08, + -1.89857436108726452e-11, + -6.46651827915127660e-12, + 1.93263677602950967e-13, + 2.02071540619535606e-15, + -1.23907773404002202e-18, + -1.38273210021793705e-18, + -8.18516403885631887e-20, + -9.44560162542250124e-22, + 2.89880314602960967e-23, + 1.65319275970012947e+00, + -4.80727202629859796e-02, + 9.00104596121671327e-04, + -1.11676978379814752e-05, + 5.17734851777385967e-08, + 1.05141231612868822e-09, + -2.23535454705350677e-11, + 2.08147975292973417e-13, + 1.13496695797892998e-14, + -8.94192974814947750e-17, + -4.98062132105324516e-18, + -1.15685108292956597e-19, + -1.65222091924463555e-21, + 6.28771924969976227e-23, + 3.12513876695791382e+00, + -1.07564555769871978e-01, + 2.15555769617225635e-03, + -2.28064568044581090e-05, + -6.55952727228697162e-08, + 4.95502861205552088e-09, + -4.04740409950339098e-12, + -1.34030738568344461e-12, + 2.82332983608166755e-14, + 5.89355541591363277e-16, + -2.65091128072123557e-17, + -5.59232893275124216e-19, + 9.10479108659036252e-21, + 2.62064646623483072e-22, + 7.30880077308378606e+00, + -3.16385816054263691e-01, + 6.57159470156904943e-03, + -4.01390378221145433e-05, + -9.18050717277761690e-07, + 3.22209580337136626e-09, + 4.83922685215847495e-10, + 3.68283857610140479e-12, + -2.33861212900569197e-13, + -4.46663420801441955e-15, + 9.03318892607813330e-17, + 2.96848593521212683e-18, + -4.64444989829413392e-20, + -2.30853175680979716e-21, + 3.51207635280787400e+01, + -1.99257082323268353e+00, + 3.66934853700960836e-02, + 2.38469356065417022e-05, + -1.37603624562980194e-06, + -8.24054032378543642e-08, + -2.30608475644003764e-09, + -2.04735378548104721e-11, + 1.20942052912635455e-12, + 5.76944138688067694e-14, + 7.77859404046802201e-16, + -2.52622556527795183e-17, + -1.34483051639059395e-18, + -1.65073852423359917e-20, +# root=10 base[9]=22.5 */ + 4.71931723156527802e-03, + -9.13928113203522587e-05, + 1.31963696479504659e-06, + -1.72017617330533821e-08, + 2.02012805240005491e-10, + -2.25115860324514372e-12, + 4.10482672020496015e-14, + 2.93637257278662024e-16, + 1.02609588581316596e-17, + -4.33030667234695065e-19, + -2.13802071781448991e-20, + -3.56091553680427271e-22, + 6.47120246418397345e-24, + 4.42390791465097156e-25, + 4.34210827070314262e-02, + -8.52724066716536609e-04, + 1.24433133219662989e-05, + -1.62685127333951727e-07, + 1.89464565621258644e-09, + -2.05406420952172869e-11, + 3.68410294428762944e-13, + 3.12439468242029805e-15, + 8.78589164221526442e-17, + -4.00775903769501303e-18, + -2.02351530600571295e-19, + -3.26455669941663291e-21, + 6.20162601166392169e-23, + 4.15507181557353327e-24, + 1.26248945205914037e-01, + -2.55186980193250609e-03, + 3.80499564437377009e-05, + -5.00308815289754514e-07, + 5.71752716451573692e-09, + -5.81284570961015834e-11, + 1.00275939311876538e-12, + 1.18324350009713768e-14, + 2.14175366601121207e-16, + -1.18617874085757992e-17, + -6.21131983240196502e-19, + -9.43925185975179630e-21, + 1.96864818717152567e-22, + 1.25814349079589175e-23, + 2.66115212693657177e-01, + -5.62975408588757466e-03, + 8.68059063454710119e-05, + -1.15017931246636082e-06, + 1.26903801398375628e-08, + -1.13416812819663159e-10, + 1.80485237008327286e-12, + 3.52504424901290155e-14, + 3.08249959485608591e-16, + -2.62897759983406121e-17, + -1.40906341986587258e-18, + -1.98465735477520765e-20, + 4.80222997907483769e-22, + 2.81534628193484208e-23, + 4.89161508346196927e-01, + -1.10500460637269066e-02, + 1.78582791979975543e-04, + -2.38484394631865293e-06, + 2.46678613271964181e-08, + -1.65766684922417547e-10, + 2.15060262460261691e-12, + 9.54660753238933526e-14, + 2.19327226892744083e-16, + -5.55208047088367188e-17, + -2.79722761942222360e-18, + -3.67529336229293659e-20, + 1.09096550530376533e-21, + 5.61225409796905942e-23, + 8.49721257652078621e-01, + -2.10275399861005602e-02, + 3.61768676347550065e-04, + -4.84756292096528397e-06, + 4.41123549392942891e-08, + -1.02546690257063707e-10, + -2.76175206110021441e-13, + 2.38986356047696473e-13, + 4.55549601558121723e-17, + -1.34106933196878870e-16, + -5.14316640378364447e-18, + -6.24677818944744799e-20, + 2.44290379092233085e-21, + 1.09423203761831898e-22, + 1.47447657199645388e+00, + -4.13924291775756778e-02, + 7.71669064895331405e-04, + -1.01975788603786004e-05, + 6.81025878551370228e-08, + 6.21292610771823594e-10, + -1.22607185717121868e-11, + 4.70657748758544930e-13, + 3.22273586396004737e-15, + -3.96993603474796565e-16, + -1.00240485659138725e-17, + -5.81711791573283364e-20, + 5.35786472784740358e-21, + 2.15711768906411703e-22, + 2.72762080677372465e+00, + -9.14252039470261624e-02, + 1.87880623551084131e-03, + -2.30792064953554392e-05, + 3.00749224316225504e-08, + 4.52090497485945323e-09, + -2.74296981349224857e-11, + -3.40556825925740364e-13, + 2.59440171522000845e-14, + -7.88725698266248488e-16, + -3.70095471341726309e-17, + 1.79958018475845513e-19, + 2.16860864683572591e-20, + 2.71253842677067077e-22, + 6.14501167924532243e+00, + -2.65980338138309791e-01, + 6.00601965030983335e-03, + -5.36630462578616406e-05, + -7.34007116000591719e-07, + 1.51097590414090224e-08, + 4.64290964710346438e-10, + -5.47508044950382854e-12, + -3.06755068210604407e-13, + 7.62722331250775915e-16, + 1.41257265732207086e-16, + -9.56978628300732144e-19, + -8.00699326693727052e-20, + 1.86693918061069787e-21, + 2.77386695250340196e+01, + -1.69839792035230563e+00, + 3.67831343182801127e-02, + -1.44517592668997503e-05, + -3.59274918299730700e-06, + -1.38199498571658631e-07, + -2.00099387699635050e-09, + 5.40801079971373863e-11, + 3.39411044674405052e-12, + 4.63747458045247291e-14, + -1.81506257598731768e-15, + -8.67359513946362242e-17, + -5.39064889862693730e-19, + 6.04066780893798310e-20, +# root=10 base[10]=25.0 */ + 4.37362636266982758e-03, + -8.16095109258143628e-05, + 1.13130539239211691e-06, + -1.42729997548463492e-08, + 1.67614325675065910e-10, + -1.15114150968075819e-12, + 5.02129438746839877e-14, + 1.86322981228577835e-16, + -2.29309439026642913e-17, + -1.40714595210335939e-18, + -1.95399295199008016e-20, + 7.30456819828858045e-22, + 4.23126326822528120e-23, + 7.90436655638019951e-25, + 4.01976058944635076e-02, + -7.60499040098670787e-04, + 1.06610672290257878e-05, + -1.35143733928380900e-07, + 1.58019200107590154e-09, + -1.05259271792813206e-11, + 4.61215215737924181e-13, + 1.87413668655482505e-15, + -2.21871427753619430e-16, + -1.31335619953363769e-17, + -1.80592055205510050e-19, + 6.96726942650579341e-21, + 3.96485916377984716e-22, + 7.33209296054099252e-24, + 1.16614332296124182e-01, + -2.27000907326341348e-03, + 3.25613307943323782e-05, + -4.16701623669058597e-07, + 4.82410838873256560e-09, + -2.98935354515134789e-11, + 1.32822478683345167e-12, + 6.52538340673255284e-15, + -7.14093939478817264e-16, + -3.93267744493536017e-17, + -5.28086342609188763e-19, + 2.17860390962664431e-20, + 1.19681220164126441e-21, + 2.16466598822517159e-23, + 2.44902344372501607e-01, + -4.98721906544459352e-03, + 7.41557322396389697e-05, + -9.62586038199782111e-07, + 1.09356846547826448e-08, + -5.84362482664803440e-11, + 2.70328953373643446e-12, + 1.80423855653192931e-14, + -1.75529899299918855e-15, + -8.68841190729744991e-17, + -1.10953732896483242e-18, + 5.12951363053577165e-20, + 2.67494154419943316e-21, + 4.65381739608637539e-23, + 4.47646569282837747e-01, + -9.72937586123114387e-03, + 1.52234907237333198e-04, + -2.01298504307830448e-06, + 2.20784551120217256e-08, + -8.39557218744130571e-11, + 4.45578478297932321e-12, + 4.71647917978900430e-14, + -3.95190517256544354e-15, + -1.71642725328986692e-16, + -1.95534958877506672e-18, + 1.09594075897908038e-19, + 5.33940170207284030e-21, + 8.71489263621065385e-23, + 7.71047725943918016e-01, + -1.83542221816519018e-02, + 3.07769929419352353e-04, + -4.15632652313522636e-06, + 4.25136295661359011e-08, + -3.46727566915337417e-11, + 5.41002842376894686e-12, + 1.21132802857027245e-13, + -8.65959486672930210e-15, + -3.36077397437329000e-16, + -2.83146353173514931e-18, + 2.31752158822791405e-19, + 1.03153268840964534e-20, + 1.52498385988173559e-22, + 1.32050583730195314e+00, + -3.56891736232747003e-02, + 6.56206553794754627e-04, + -9.02002485504567465e-06, + 7.86473455579224410e-08, + 4.80843319999627737e-10, + -3.37678148849284305e-13, + 2.69095865025385307e-13, + -1.78778962061493873e-14, + -7.26839355749023243e-16, + -2.17839693473443793e-18, + 5.34271801451519912e-19, + 1.99470612710235786e-20, + 2.57206756386173161e-22, + 2.39024717382407781e+00, + -7.74877469066835439e-02, + 1.60760516326770644e-03, + -2.19124163655622736e-05, + 1.13476127285240701e-07, + 3.80628263539567571e-09, + -3.14582567168782834e-11, + -2.14215607120819068e-13, + -2.39732294472553969e-14, + -1.74512362129181316e-15, + -1.32390509048877993e-19, + 1.65037452655179661e-18, + 4.02121413371433393e-20, + 2.65899225912351836e-22, + 5.17286121636535157e+00, + -2.20681094369497149e-01, + 5.30334299875674913e-03, + -6.24555574766934811e-05, + -3.38292042780244865e-07, + 2.33652395761870994e-08, + 1.84740441318865605e-10, + -1.38910688432860995e-11, + -1.94224006184269984e-13, + 4.98492176836519644e-15, + 7.22774689525235579e-17, + -5.27040675061220871e-19, + 1.17019624868563090e-19, + 3.66131523434544317e-21, + 2.15308359785975121e+01, + -1.40602727136830730e+00, + 3.61671140861211937e-02, + -9.59079509001751985e-05, + -6.64677225567829497e-06, + -1.54923006762536394e-07, + 1.14179862418906966e-09, + 1.68035480860803718e-10, + 2.87168905043973708e-12, + -9.55957954244817088e-14, + -4.69799084165272620e-15, + -5.02405959616767238e-18, + 4.19955082901029851e-18, + 8.32972252040506729e-20, +# root=10 base[11]=27.5 */ + 4.06426705111192967e-03, + -7.31999044614115160e-05, + 9.75572589041820149e-07, + -1.17102287421738718e-08, + 1.56425521290055343e-10, + -1.62538296927415411e-14, + 3.70273367620013094e-14, + -1.40539567128588085e-15, + -7.36583077171295212e-17, + -8.49425949532515738e-19, + 6.50902050753355920e-20, + 3.02307409025087428e-21, + 2.49149635558684512e-23, + -2.53399420044417729e-24, + 3.73165065221408715e-02, + -6.81279671816260087e-04, + 9.18604302395682505e-06, + -1.10945899371377570e-07, + 1.47850163397086981e-09, + -9.43373252504982877e-14, + 3.38592332741019617e-13, + -1.32057795136565492e-14, + -6.92365772256858790e-16, + -7.71826522686894543e-18, + 6.15831271563856995e-19, + 2.83008436902281723e-20, + 2.26132783749765433e-22, + -2.39392635396803795e-23, + 1.08025414778256473e-01, + -2.02824207433659675e-03, + 2.80099257988062617e-05, + -3.42568864852347958e-07, + 4.54059362204335855e-09, + 2.07414651256040722e-13, + 9.65529615914315009e-13, + -4.00389293491777333e-14, + -2.10345421521413385e-15, + -2.17557873643723542e-17, + 1.89639024893726985e-18, + 8.52260342659822696e-20, + 6.35777227737997545e-22, + -7.34955971427309804e-23, + 2.26070914664581263e-01, + -4.43726849770081661e-03, + 6.36274860411377495e-05, + -7.93421073751084014e-07, + 1.04109721254031674e-08, + 3.11672878590371054e-12, + 1.92871940357670912e-12, + -8.97910651698471227e-14, + -4.74877477921368473e-15, + -4.29452065567952481e-17, + 4.37610842349982223e-18, + 1.89533046730616431e-19, + 1.24805508035715536e-21, + -1.68770847505078283e-22, + 4.11020196089917633e-01, + -8.60220348763577822e-03, + 1.30162471127679178e-04, + -1.66723638802795629e-06, + 2.14766679631755944e-08, + 1.86157793837966814e-11, + 3.04841585114890629e-12, + -1.78824341274933534e-13, + -9.60961605487308339e-15, + -6.86222456712222287e-17, + 9.16444109260289672e-18, + 3.74589514957496422e-19, + 1.96001250607706097e-21, + -3.50678603417946359e-22, + 7.02255592423650432e-01, + -1.60800066512344249e-02, + 2.61976763792252400e-04, + -3.47415737021374608e-06, + 4.31832897806824277e-08, + 9.32623435177184238e-11, + 3.10956908600423927e-12, + -3.41957049458845713e-13, + -1.88854881661121324e-14, + -8.55646997980791280e-17, + 1.91110546044775254e-17, + 7.11970761171842241e-19, + 2.20879236960692308e-21, + -7.20885861193549885e-22, + 1.18759409501242796e+00, + -3.08503553558660409e-02, + 5.55835864191440380e-04, + -7.68407832693983492e-06, + 8.83592179008632380e-08, + 4.75199137645604578e-10, + -4.51127582279688901e-12, + -6.74499138527718002e-13, + -3.72107814082804880e-14, + -4.57190403914163758e-17, + 4.28401534661399281e-17, + 1.36716494133100785e-18, + -9.65307314419104201e-22, + -1.56929264273841603e-21, + 2.10440336926784832e+00, + -6.56423360001039263e-02, + 1.35791825258576616e-03, + -1.95331252896966956e-05, + 1.80884662197856983e-07, + 2.83868660471001728e-09, + -5.66570762712718075e-11, + -1.81150687780639424e-12, + -6.42919206837617790e-14, + 2.43823945425191409e-16, + 1.09585448628519540e-16, + 2.85081779870751756e-18, + -2.68629266962712371e-20, + -3.96095188328883262e-21, + 4.37016174359023069e+00, + -1.81307852162804900e-01, + 4.53721496076997001e-03, + -6.40314443618280249e-05, + 1.38994624234505407e-07, + 2.26160426885850772e-08, + -2.59965041655592187e-10, + -1.66070509022465144e-11, + 4.92642037885252074e-14, + 9.32448955033413571e-15, + 1.84509925057434451e-16, + 4.15389605308025045e-18, + -8.59027900646568014e-20, + -1.46699139225662033e-20, + 1.64752714505327127e+01, + -1.12331915086605716e+00, + 3.42854091051132612e-02, + -2.23821626813220764e-04, + -9.05447099669795739e-06, + -6.50907066149693877e-08, + 6.37428650150080263e-09, + 1.72150202635671029e-10, + -3.39386189090765345e-12, + -2.20214439831663556e-13, + 1.35684427122451969e-16, + 2.13061832162246315e-16, + 2.60201122979015860e-18, + -1.68354516217589856e-19, +# root=10 base[12]=30.0 */ + 3.78624694246075836e-03, + -6.59146644571064486e-05, + 8.50163941547022863e-07, + -9.18004253674132013e-09, + 1.60389487044971014e-10, + 1.30013884193591768e-13, + -3.48382942448124909e-14, + -3.49471380380490575e-15, + -2.71052654744225449e-17, + 4.05268466172815042e-18, + 1.48794434578033809e-19, + -1.40602555442277905e-21, + -2.36655379870254876e-22, + -4.88378419995801379e-24, + 3.47305028193282336e-02, + -6.12712665253082288e-04, + 7.99754150720638634e-06, + -8.70353415135153035e-08, + 1.51471240325612325e-09, + 1.06474447134557939e-12, + -3.35229730282179673e-13, + -3.26778960904924175e-14, + -2.44674437956659972e-16, + 3.82943471663230803e-17, + 1.38840064246085850e-18, + -1.37089026240048553e-20, + -2.22687179139923658e-21, + -4.54160220280181796e-23, + 1.00336321384175364e-01, + -1.81936489736140151e-03, + 2.43378336759082120e-05, + -2.69147825890392189e-07, + 4.64577275737553796e-09, + 2.30162393848438117e-12, + -1.06935979778148169e-12, + -9.81369885544267907e-14, + -6.79265499229548360e-16, + 1.17597133189055088e-16, + 4.15218112958659399e-18, + -4.47950499761880310e-20, + -6.77987280055009240e-21, + -1.34819294357499695e-22, + 2.09283598401708848e-01, + -3.96348547588594707e-03, + 5.51130011590826081e-05, + -6.24998781176036075e-07, + 1.06434392757060371e-08, + 2.24313791652293362e-12, + -2.61209335844792930e-12, + -2.17087426669623969e-13, + -1.29997314139618295e-15, + 2.70021536739244993e-16, + 9.12905530255037067e-18, + -1.12778478503887856e-19, + -1.53580514210050968e-20, + -2.92579710707255993e-22, + 3.78575575253675523e-01, + -7.63504628842037823e-03, + 1.12236399186385554e-04, + -1.31898176008595023e-06, + 2.19975006823136121e-08, + -2.02963812320044026e-12, + -5.95090610677608577e-12, + -4.24802595316709615e-13, + -1.92557550203802850e-15, + 5.60291402519041054e-16, + 1.77319042004240182e-17, + -2.64482393041858655e-19, + -3.12586529650534987e-20, + -5.55671118552334146e-22, + 6.41879934974139643e-01, + -1.41390592242340365e-02, + 2.24495353710518595e-04, + -2.76870489962466641e-06, + 4.46781978851954258e-08, + -1.14158656388451146e-11, + -1.40034417254578224e-11, + -7.92143517703796872e-13, + -1.71748754170491328e-15, + 1.14601397148500318e-15, + 3.28418534687623235e-17, + -6.32595515491236661e-19, + -6.23121852128082758e-20, + -9.86561527630578678e-22, + 1.07253684138944561e+00, + -2.67478277736051158e-02, + 4.72380845671790516e-04, + -6.20890530054352339e-06, + 9.46007199896006237e-08, + 1.87298834686395863e-11, + -3.73443549200723394e-11, + -1.45937813725704914e-12, + 3.51720185994066790e-15, + 2.45655566254366012e-15, + 6.04086128536273449e-17, + -1.66293191855175513e-18, + -1.29622516242886911e-19, + -1.64303821227639637e-21, + 1.86215062058074721e+00, + -5.56636457750590077e-02, + 1.14246360790957622e-03, + -1.62796465469760945e-05, + 2.18912247847120659e-07, + 6.81260449487041026e-10, + -1.27678608941807570e-10, + -2.69696543767200566e-12, + 4.33237013931522153e-14, + 5.80186474137879387e-15, + 1.09103859316005723e-16, + -5.25759453833901674e-18, + -3.02694712523402876e-19, + -2.00742001992567360e-21, + 3.71275438318122797e+00, + -1.48014417718662028e-01, + 3.79559511765508806e-03, + -5.86783291815942920e-05, + 4.93701085892071964e-07, + 1.13418058027599849e-08, + -6.41112427961046878e-10, + -8.08039840776166194e-12, + 5.27170151890698550e-13, + 1.59078234695623660e-14, + -4.45950740145214236e-17, + -2.11268423496732107e-17, + -8.08602340048252231e-19, + 6.29509177563190244e-21, + 1.25100201030940337e+01, + -8.62280141917411425e-01, + 3.07180350536967635e-02, + -3.69467222385631454e-04, + -8.52886727079214082e-06, + 1.26648293893045909e-07, + 8.60044684824193208e-09, + -4.31881557835865621e-11, + -8.89845246822450921e-12, + -2.75115634087721588e-14, + 8.54968293846867661e-15, + 8.50147159017677577e-17, + -7.43973640569324617e-18, + -1.11248835951190750e-19, +# root=10 base[13]=32.5 */ + 3.53555450114240947e-03, + -5.95106317866476742e-05, + 7.55248813445570696e-07, + -6.67139146099688783e-09, + 1.46896266500598444e-10, + -1.80950067365378244e-12, + -1.16490498285088010e-13, + -1.22013057338945158e-15, + 1.77565710432312049e-16, + 5.13580356787925902e-18, + -1.72187003301661139e-19, + -1.10381376259866108e-20, + 4.35617154549712479e-23, + 1.73901815518114357e-23, + 3.24015764601495934e-02, + -5.52500791638851517e-04, + 7.09697049320725413e-06, + -6.33741410142774062e-08, + 1.38346300801936014e-09, + -1.72554083299600837e-11, + -1.09312363329352887e-12, + -1.09772298447304387e-14, + 1.67437782920665896e-15, + 4.77239321718910769e-17, + -1.64000546928606730e-18, + -1.03436990897102248e-19, + 4.46826116072316069e-22, + 1.63964844555694326e-22, + 9.34295834451722568e-02, + -1.63632784776196255e-03, + 2.15485261709810948e-05, + -1.96760270367748880e-07, + 4.22002158846317403e-09, + -5.39460028716370445e-11, + -3.30957507589565899e-12, + -3.01956963373198690e-14, + 5.11921889565664682e-15, + 1.41439311040067954e-16, + -5.11892862646663635e-18, + -3.12141103896076595e-19, + 1.59783644764306221e-21, + 5.01284919066519612e-22, + 1.94268015933095589e-01, + -3.54971525053266856e-03, + 4.86196767677622295e-05, + -4.59766114050854990e-07, + 9.59051612079973369e-09, + -1.27086796118520670e-10, + -7.43438986327279602e-12, + -5.64398683213432429e-14, + 1.16687457830191451e-14, + 3.06074567162153187e-16, + -1.20573733440422315e-17, + -6.96555510124522404e-19, + 4.50730143573609549e-21, + 1.14315159786237719e-21, + 3.49739285366081787e-01, + -6.79455603114283505e-03, + 9.84831536373041987e-05, + -9.78997052699981428e-07, + 1.96228316933939213e-08, + -2.72101705680704521e-10, + -1.49706002279965500e-11, + -7.77997775788146381e-14, + 2.39426468382865941e-14, + 5.78561553067150261e-16, + -2.59472368090253034e-17, + -1.38414765829045354e-18, + 1.19592319322104746e-20, + 2.34968151161292701e-21, + 5.88722142322050779e-01, + -1.24640137198563997e-02, + 1.95473655321123664e-04, + -2.08103398503966782e-06, + 3.94478293664045744e-08, + -5.75055694291703057e-10, + -2.95306032066468418e-11, + -4.30404226821627206e-14, + 4.81867425834562683e-14, + 1.01896430396173333e-15, + -5.58508730444325273e-17, + -2.65355806303088725e-18, + 3.23990819915535756e-20, + 4.74950537167469667e-21, + 9.72667634394936420e-01, + -2.32414289990472700e-02, + 4.06775396029263481e-04, + -4.75349023447834347e-06, + 8.31585345582217254e-08, + -1.26239862735908383e-09, + -6.13901801348924215e-11, + 2.80595428601140208e-13, + 1.01287105688342419e-13, + 1.67104887340042025e-15, + -1.29075967581950155e-16, + -5.14827447340347284e-18, + 9.62942287823558481e-20, + 1.00655610382199822e-20, + 1.65662213593334240e+00, + -4.72459688417755375e-02, + 9.67976140836085581e-04, + -1.28547509384497430e-05, + 1.97466544078683846e-07, + -2.92524721331906654e-09, + -1.50210920369442390e-10, + 2.17976220930190534e-12, + 2.39602411934717763e-13, + 1.92601795018941542e-15, + -3.48398879163558462e-16, + -1.02523595051423454e-17, + 3.47364608504480959e-19, + 2.38973746886344590e-20, + 3.17717187521470823e+00, + -1.20320342459300761e-01, + 3.14351411386177941e-03, + -4.98368373806273922e-05, + 5.60219628143727724e-07, + -4.39243338895883428e-09, + -5.60806423086438264e-10, + 1.52664362710296861e-11, + 7.71681895368987523e-13, + -1.09551875270522667e-14, + -1.25329694843660354e-15, + -1.18544965140409158e-17, + 1.79527078058586834e-18, + 6.32067770647550328e-20, + 9.52137383963931683e+00, + -6.36329131825044025e-01, + 2.55830787430087921e-02, + -4.75428370552819944e-04, + -4.19110343963056253e-06, + 2.87873402256854802e-07, + 3.73580719273826834e-09, + -2.77177672116536067e-10, + -3.85323693595995095e-12, + 2.77581394357125590e-13, + 4.10465065613197125e-15, + -2.58538585790261394e-16, + -4.06377355324768483e-18, + 2.02965249642939512e-19, +# root=10 base[14]=35.0 */ + 3.30914046019416654e-03, + -5.37526546903055859e-05, + 6.87607409304069872e-07, + -4.76098802682418420e-09, + 8.37830409339887493e-11, + -4.27069220878575904e-12, + -5.75176713308890701e-14, + 5.31452786107380574e-15, + 1.51410109725508412e-16, + -7.60111420922400930e-18, + -3.03740877917044499e-19, + 9.80541491618791718e-21, + 5.65883196633556305e-22, + -1.10157635661790027e-23, + 3.03007933464069824e-02, + -4.98426197551832370e-04, + 6.45329636838217879e-06, + -4.54063127817081682e-08, + 7.86848084714815087e-10, + -4.01840051743403297e-11, + -5.26498753796206999e-13, + 5.01926871327285240e-14, + 1.40136737697615594e-15, + -7.20744859648294442e-17, + -2.82860297462674138e-18, + 9.35376981623336755e-20, + 5.29582467317439259e-21, + -1.06106444445448901e-22, + 8.72155718024910237e-02, + -1.47234624325956248e-03, + 1.95430516346456888e-05, + -1.42099794184090490e-07, + 2.38689000650012072e-09, + -1.22301555459626015e-10, + -1.50998121383822827e-12, + 1.53966557344127766e-13, + 4.11674931595264323e-15, + -2.22896596060542781e-16, + -8.42105241327052116e-18, + 2.92882520304082705e-19, + 1.59328686483944859e-20, + -3.38824948970141016e-22, + 1.80815477066786384e-01, + -3.18047340672287116e-03, + 4.39084505662385620e-05, + -3.36037211585758519e-07, + 5.38144050107318344e-09, + -2.76713062196559197e-10, + -3.08455388632746870e-12, + 3.52868928075584316e-13, + 8.76858531988189571e-15, + -5.17362599734454939e-16, + -1.83563700893364125e-17, + 6.93232238036974493e-19, + 3.53517328275467564e-20, + -8.26567313629915175e-22, + 3.24069221762215254e-01, + -6.04888244398878346e-03, + 8.83782403450058466e-05, + -7.27117190532043298e-07, + 1.09061754272861620e-08, + -5.61376801315611731e-10, + -5.28243121389605149e-12, + 7.30168546957683202e-13, + 1.61181183563129205e-14, + -1.08973117262266653e-15, + -3.50791836790104691e-17, + 1.50183677349469108e-18, + 6.94999195498600930e-20, + -1.86751200307279805e-21, + 5.41849201520878010e-01, + -1.09904969333837754e-02, + 1.73790960204513639e-04, + -1.57741615549148025e-06, + 2.17346166557760402e-08, + -1.11015690617024321e-09, + -7.74222513255078396e-12, + 1.48898847107596122e-12, + 2.69122762273605608e-14, + -2.27501558416569759e-15, + -6.28159970678186176e-17, + 3.26068087966310531e-18, + 1.30418266017760778e-19, + -4.28888844181204849e-21, + 8.85877856788862661e-01, + -2.01951719597406841e-02, + 3.56648110194411475e-04, + -3.69543832672030382e-06, + 4.57842081210704442e-08, + -2.26366800515038061e-09, + -8.07022645520571660e-12, + 3.19792175650036489e-12, + 3.88716761554929447e-14, + -5.03109964884707911e-15, + -1.06162921084441417e-16, + 7.61502949697089138e-18, + 2.40820196522691616e-19, + -1.07980576098634164e-20, + 1.48221748018668942e+00, + -4.00710298905878268e-02, + 8.30204633433593740e-04, + -1.03231087792751155e-05, + 1.12205867224767776e-07, + -4.97765289774885212e-09, + 6.43557542872989240e-12, + 7.83448530041542540e-12, + 2.10001105828983013e-14, + -1.27188105121297836e-14, + -1.38705663586285755e-16, + 2.07773586447284996e-17, + 4.09409647064085614e-19, + -3.27187577515598381e-20, + 2.74260055996732488e+00, + -9.74225468563516411e-02, + 2.59448622735912156e-03, + -4.21199125738055591e-05, + 3.84030553439401649e-07, + -1.06345184871912928e-08, + 8.70314800119308624e-11, + 2.47705671335526136e-11, + -3.72371745013385054e-13, + -4.09556262128978584e-14, + 4.39188194104129741e-16, + 7.27497326955908731e-17, + -1.99078678011904534e-19, + -1.34062738959063031e-19, + 7.34824471904277665e+00, + -4.55169512846179347e-01, + 1.96738271938470821e-02, + -4.94319474986885769e-04, + 1.80372239596691205e-06, + 2.80243692616238729e-07, + -4.16186790458246352e-09, + -2.32926749106640067e-10, + 6.13273427246487308e-12, + 1.98230670494253187e-13, + -7.42536974893574799e-15, + -1.70694784745006920e-16, + 7.48750985438785805e-18, + 1.67182270600917807e-19, +# root=10 base[15]=37.5 */ + 3.10479306376943353e-03, + -4.84642345996358964e-05, + 6.35610740440508268e-07, + -4.12217590836990009e-09, + -1.84223710800951513e-12, + -3.62674614425114631e-12, + 1.07938848339276729e-13, + 4.62274488790623513e-15, + -1.89668820817344773e-16, + -6.77034563684446104e-18, + 3.43042018249350816e-19, + 9.40620995838520276e-21, + -6.00089055435749061e-22, + -1.25492826438680000e-23, + 2.84071096081753190e-02, + -4.48828229231598946e-04, + 5.95665906720912982e-06, + -3.94000751123859291e-08, + -1.53466063626759206e-11, + -3.38018430439523774e-11, + 1.02419103286964094e-12, + 4.29156695964474110e-14, + -1.79963666446268436e-15, + -6.27151798563309550e-17, + 3.25253398712243293e-18, + 8.68700325350014168e-20, + -5.68940155512095381e-21, + -1.15358683569334954e-22, + 8.16287411508907490e-02, + -1.32236409518184323e-03, + 1.79843065776737321e-05, + -1.23824721059890317e-07, + -3.27454309850246276e-11, + -1.00843627998853616e-10, + 3.17089483864397665e-12, + 1.26931043578737330e-13, + -5.57229744658818281e-15, + -1.84552098724716888e-16, + 1.00563483785205463e-17, + 2.53865104829127323e-19, + -1.75893697210517060e-20, + -3.33450404983724394e-22, + 1.68772080910172179e-01, + -2.84430045644826560e-03, + 4.02069607161046865e-05, + -2.94556248471577977e-07, + -1.43998134086911291e-11, + -2.20849789809168308e-10, + 7.36634943561338610e-12, + 2.73751625518915883e-13, + -1.29538167413486083e-14, + -3.94138818508096688e-16, + 2.33260711543189992e-17, + 5.34954034602312274e-19, + -4.07967849992866001e-20, + -6.87464893492162733e-22, + 3.01235534546177242e-01, + -5.37465276293377318e-03, + 8.03273758676240448e-05, + -6.41855485713811643e-07, + 1.91727685124854068e-10, + -4.26466786693814975e-10, + 1.55058652422102069e-11, + 5.14865235409098734e-13, + -2.73237722087650302e-14, + -7.27215395770754134e-16, + 4.90489736151291259e-17, + 9.61275926394392621e-19, + -8.57837688508756981e-20, + -1.17981986867155052e-21, + 5.00554114174378006e-01, + -9.67165266758574990e-03, + 1.56223693033434119e-04, + -1.40253155787448924e-06, + 1.19570258244980212e-09, + -7.83007563593418326e-10, + 3.22161294920400003e-11, + 9.01212148451114888e-13, + -5.70648862703502078e-14, + -1.22057747047897945e-15, + 1.01973539716044710e-16, + 1.51876680245878029e-18, + -1.78310947679736386e-19, + -1.65255806704509123e-21, + 8.10535831274204255e-01, + -1.75102704734892561e-02, + 3.15254312877938131e-04, + -3.30491402168499707e-06, + 5.79577462236499048e-09, + -1.42042556237254972e-09, + 7.01723730790239194e-11, + 1.47986776106130063e-12, + -1.25844961208951388e-13, + -1.77817902746014025e-15, + 2.23119237827147179e-16, + 1.80163415298574253e-18, + -3.89473654128825280e-19, + -9.78882657739978208e-22, + 1.33446569495392175e+00, + -3.39015366796561260e-02, + 7.14036221578937848e-04, + -9.24532064652397453e-06, + 3.05741300325446087e-08, + -2.52960975623990875e-09, + 1.69597794488873818e-10, + 1.96372623821254178e-12, + -3.14211167693652340e-13, + -1.01963071364357185e-15, + 5.46334347755658333e-16, + -1.59996550664194579e-18, + -9.42982901226562669e-19, + 8.56666236666160701e-21, + 2.39134937120459146e+00, + -7.85983651289165475e-02, + 2.11981553821051971e-03, + -3.73669972293078328e-05, + 2.36561435919341754e-07, + -2.67256597277718244e-09, + 4.47640403427786042e-10, + -2.18942673767448626e-12, + -9.48429642926187710e-13, + 1.66388496381631668e-14, + 1.51535187904630475e-15, + -4.30429195348500071e-17, + -2.36309422179046103e-18, + 9.69883746889476528e-20, + 5.80597821477792930e+00, + -3.20634069239171648e-01, + 1.40775732577147830e-02, + -4.27804194704297660e-04, + 6.01580116724442889e-06, + 1.28582292688986717e-07, + -7.32243688396007833e-09, + 1.26378875326336369e-11, + 7.20951947592579187e-12, + -1.27815460016887444e-13, + -5.93200346112254860e-15, + 2.13403506544466207e-16, + 4.36922474544037981e-18, + -2.75943471838810657e-19, +# root=10 base[16]=40.0 */ + 2.87107289947026141e-03, + -6.75563794914990721e-05, + 1.45172991562952738e-06, + -1.94879044831376485e-08, + -2.62538054521298922e-10, + 5.94470490885418924e-12, + 1.83770899263701019e-12, + -9.56742467202974731e-14, + -3.87562745681201339e-15, + 4.96615398569052379e-16, + -7.01824191929088761e-19, + -1.92029628692339041e-18, + 6.37744632246823627e-20, + 5.45833827875279188e-21, + 2.62444926881373192e-02, + -6.24638431256625631e-04, + 1.35761378109896217e-05, + -1.85313705051365034e-07, + -2.40060273312795673e-09, + 5.84423738526863136e-11, + 1.71020429429715685e-11, + -9.06888918221377636e-13, + -3.55285787433824413e-14, + 4.67504030824571798e-15, + -1.05373339979584901e-17, + -1.79719395130844913e-17, + 6.13815043196816051e-19, + 5.05878640321138034e-20, + 7.52686453979082848e-02, + -1.83416762175596924e-03, + 4.08071682438978554e-05, + -5.76342413708688647e-07, + -6.85962062798733479e-09, + 1.93456163069618194e-10, + 5.08469334560738092e-11, + -2.80171265712398084e-12, + -1.02169023546537881e-13, + 1.42398069825280952e-14, + -5.70961408099343488e-17, + -5.40646032328433816e-17, + 1.95532581306731629e-18, + 1.48956424184569151e-19, + 1.55132286105356398e-01, + -3.92360065025789025e-03, + 9.05737365708047577e-05, + -1.34897204889754508e-06, + -1.38604529147307055e-08, + 4.92503800003142332e-10, + 1.10639280825765801e-10, + -6.48593210547342262e-12, + -2.09332358714191694e-13, + 3.22378891024367865e-14, + -2.20912126247586245e-16, + -1.19874467388153129e-16, + 4.74140552912051265e-18, + 3.17967725911897308e-19, + 2.75575590155090644e-01, + -7.35316293888969939e-03, + 1.78992579721783162e-04, + -2.87311527238580105e-06, + -2.29687963061912169e-08, + 1.15511522992864294e-09, + 2.11117203290018348e-10, + -1.35798733710568820e-11, + -3.58491210643954798e-13, + 6.53623528393894196e-14, + -7.26811855650000809e-16, + -2.35143462129266908e-16, + 1.05718241358868392e-17, + 5.83892761629045617e-19, + 4.54682014063040651e-01, + -1.30706311721415034e-02, + 3.42534539923430045e-04, + -6.08545426175042757e-06, + -2.98802416813915592e-08, + 2.69683405953439696e-09, + 3.78723023440219375e-10, + -2.79853529572013595e-11, + -5.16168337957236059e-13, + 1.28718049929993319e-13, + -2.25079672931016797e-15, + -4.38789128828367795e-16, + 2.36288099406182087e-17, + 9.61507871644263184e-19, + 7.28312514302699054e-01, + -2.32251727219246785e-02, + 6.74448016433184042e-04, + -1.37368653353752160e-05, + -9.85502632143021780e-09, + 6.60263742948582473e-09, + 6.52519142641282544e-10, + -6.01648823535682743e-11, + -4.54812572420917220e-13, + 2.58923419056863031e-13, + -7.12018980275797238e-15, + -8.00242510690907262e-16, + 5.63058274450352129e-17, + 1.29162892840184566e-18, + 1.17785010990563288e+00, + -4.36072206282129213e-02, + 1.46758448528734749e-03, + -3.60961008226357301e-05, + 1.90381539973205637e-07, + 1.77721985864635622e-08, + 9.94763758532785891e-10, + -1.42112912498994961e-10, + 1.21792658767040455e-12, + 5.47408657668567009e-13, + -2.51195788003091432e-14, + -1.33406395313432059e-15, + 1.51641483798504260e-16, + -3.33962279640908906e-20, + 2.03926731701619124e+00, + -9.53528070078379919e-02, + 4.03919298929794786e-03, + -1.31423530255751341e-04, + 1.97278651846124840e-06, + 5.16034144175636404e-08, + -2.44958312162085118e-10, + -3.60381538049238646e-10, + 1.48878106633279356e-11, + 1.04340279027401962e-12, + -1.08411292648561838e-13, + 8.17704319000531140e-18, + 4.57982890095162136e-16, + -1.86929287265570333e-17, + 4.48532060088529771e+00, + -3.30302164235732665e-01, + 2.18266959986687069e-02, + -1.17731499768897185e-03, + 4.40086716161775988e-05, + -5.21411592759915727e-07, + -5.76374549558566973e-08, + 3.80443416085263605e-09, + -3.13302835941204379e-11, + -8.38176807352239031e-12, + 4.36763245857012494e-13, + 5.40932126777201923e-15, + -1.46285272516179715e-15, + 3.96632932407180358e-17, +# root=10 base[17]=44.0 */ + 2.62251873177424093e-03, + -5.69296498534624138e-05, + 1.20167340738416233e-06, + -2.13182286243010703e-08, + 6.79387370843178169e-11, + 1.74123846864913244e-11, + -5.40781550307844302e-13, + -3.41010379704789100e-14, + 3.73673418969512135e-15, + -8.99784532784997643e-17, + -7.61680494870061266e-18, + 7.03780800848724717e-19, + -1.19598442365075289e-20, + -1.68921594652848990e-21, + 2.39483949488343700e-02, + -5.25389682945882593e-04, + 1.12074310056765982e-05, + -2.01276206921042307e-07, + 7.13436191016927113e-10, + 1.62268258478595860e-10, + -5.17046254690730055e-12, + -3.12929523722334967e-13, + 3.50313569269190914e-14, + -8.67413124603903234e-16, + -7.01312559258232078e-17, + 6.61618294970259163e-18, + -1.17706910294460208e-19, + -1.56057076428190548e-20, + 6.85392121406322441e-02, + -1.53665640065718664e-03, + 3.34977633623175048e-05, + -6.16908294438662682e-07, + 2.64116708035154939e-09, + 4.83739135836816439e-10, + -1.62473912489764999e-11, + -9.02140897916788991e-13, + 1.05776808645680277e-13, + -2.77034823239985496e-15, + -2.03653478575674244e-16, + 2.00908976625437252e-17, + -3.90838100888160541e-19, + -4.56398007890772809e-20, + 1.40780996053370494e-01, + -3.26616560186386963e-03, + 7.36723516031599396e-05, + -1.41133067669506935e-06, + 7.68501902414671905e-09, + 1.05641974988142891e-09, + -3.85598165868177828e-11, + -1.85825420083358690e-12, + 2.36078204156359688e-13, + -6.73365957169046495e-15, + -4.24793527795010561e-16, + 4.52347989246803631e-17, + -1.00160154357861559e-18, + -9.63234228149083728e-20, + 2.48803412611472374e-01, + -6.06248863692082467e-03, + 1.43606466544031009e-04, + -2.90994727653010990e-06, + 2.07332705726246277e-08, + 2.02342282932367482e-09, + -8.33615685513406265e-11, + -3.22090799608058997e-12, + 4.68361095276591770e-13, + -1.50187226985288990e-14, + -7.52190096112466325e-16, + 9.08442311350785736e-17, + -2.37776862291968239e-18, + -1.73749655937135703e-19, + 4.07413929840259426e-01, + -1.06245773905055546e-02, + 2.69309498584563412e-04, + -5.89423173670957238e-06, + 5.58789204753090059e-08, + 3.63511737494703454e-09, + -1.78498823577178872e-10, + -4.79508878751523542e-12, + 8.92464078995385196e-13, + -3.34265543699895141e-14, + -1.16687172362657606e-15, + 1.75895740699737729e-16, + -5.66340020903829476e-18, + -2.78081494011021082e-19, + 6.45172144414200677e-01, + -1.84787367828781954e-02, + 5.14323952528562985e-04, + -1.25063024818440006e-05, + 1.60272565517880926e-07, + 6.20310209696024986e-09, + -4.00958281202126146e-10, + -5.00968469634206880e-12, + 1.70354165907094981e-12, + -7.87090928464601199e-14, + -1.38404734364891986e-15, + 3.42464534435029573e-16, + -1.43006611639844009e-17, + -3.54926259451285476e-19, + 1.02427148244241684e+00, + -3.35177522179505791e-02, + 1.06548774296855598e-03, + -3.00263755324794858e-05, + 5.33929850517012767e-07, + 8.77085795667302959e-09, + -9.96857200140973234e-10, + 6.07730466765657066e-12, + 3.27125432114388017e-12, + -2.07423880767953008e-13, + 6.08000227859135019e-16, + 6.71750667211351158e-16, + -4.03125347550761133e-17, + 3.50375228881458911e-20, + 1.71333811698074068e+00, + -6.87469997599531313e-02, + 2.67791826086264057e-03, + -9.41994188662599927e-05, + 2.45975443609195902e-06, + -1.19576713387675248e-08, + -2.78219229699900962e-09, + 1.05447402262107203e-10, + 4.55303635350630277e-12, + -6.23560284316076996e-13, + 2.04370292208892364e-14, + 9.44357677429196233e-16, + -1.26666843579189621e-16, + 4.42110450337516953e-18, + 3.43930147212329240e+00, + -2.01347509983907241e-01, + 1.14247610084146582e-02, + -5.99997383683395827e-04, + 2.70316585703366712e-05, + -9.03747472274646586e-07, + 1.17942133247371238e-08, + 9.59769505014823338e-10, + -7.99997545530397826e-11, + 2.55330107087276078e-12, + 3.42455162156356951e-14, + -7.92301300602880122e-15, + 3.68051900147207498e-16, + -1.26824246375427556e-18, +# root=10 base[18]=48.0 */ + 2.41246094649276866e-03, + -4.82999656651587843e-05, + 9.61176711415363903e-07, + -1.82809145022578665e-08, + 2.62531707387263119e-10, + 2.60242222559615832e-12, + -4.55267719399646806e-13, + 1.92125170669414543e-14, + -2.30427941339755465e-17, + -5.08043253364219899e-17, + 3.35445082072938385e-18, + -7.71456795323640679e-20, + -4.09230764545284406e-21, + 4.59715360911893818e-22, + 2.20113931976842793e-02, + -4.45001731938068521e-04, + 8.94219912266292325e-06, + -1.71806535014937511e-07, + 2.50733177682755383e-09, + 2.28182195556067916e-11, + -4.24475150529874868e-12, + 1.81612915989992423e-13, + -3.65881693790604428e-16, + -4.70458221369835645e-16, + 3.14888079704762249e-17, + -7.42851831064319092e-19, + -3.72042116326310143e-20, + 4.29109802771882640e-21, + 6.28834513861418060e-02, + -1.29698954780376407e-03, + 2.65890048209200023e-05, + -5.21594798015894244e-07, + 7.86417351815121216e-09, + 5.88539770541175394e-11, + -1.26684084540008937e-11, + 5.57846834583970825e-13, + -2.05134634663929670e-15, + -1.38375151652833337e-15, + 9.53360074524742648e-17, + -2.36664973520653590e-18, + -1.04992718343806183e-19, + 1.28359547491023099e-20, + 1.28792440185973550e-01, + -2.74119844009340814e-03, + 5.79897580359733843e-05, + -1.17535053883983395e-06, + 1.86288209608950631e-08, + 9.44669344011694643e-11, + -2.77272715369507970e-11, + 1.27940806724586676e-12, + -8.01078096455261904e-15, + -2.95496435328840436e-15, + 2.13673281607822085e-16, + -5.72808500338099927e-18, + -2.07617072412146120e-19, + 2.81901136409009896e-20, + 2.26641064860485048e-01, + -5.04535904609067828e-03, + 1.11634687581477752e-04, + -2.37056802199869944e-06, + 4.02574563225011847e-08, + 7.47489534688696591e-11, + -5.33358058743413929e-11, + 2.64150540976262620e-12, + -2.61757862854146055e-14, + -5.46343305441520396e-15, + 4.26472775490450355e-16, + -1.26895146046773940e-17, + -3.31638969519446304e-19, + 5.44707516129912043e-20, + 3.68803390752975413e-01, + -8.73385578593485409e-03, + 2.05570312561438671e-04, + -4.65399215477957011e-06, + 8.65719121508037617e-08, + -1.91108152568240529e-10, + -9.66836815375650681e-11, + 5.33207723434406934e-12, + -7.94478140987619214e-14, + -9.26768810466450226e-15, + 8.19573437625958403e-16, + -2.79400974159410205e-17, + -4.00964453670588625e-19, + 9.92791904701483116e-20, + 5.78605709620035102e-01, + -1.49147242912952040e-02, + 3.82098847104170379e-04, + -9.44217093199243939e-06, + 1.97767626160881462e-07, + -1.43872221161985445e-09, + -1.68768637945413012e-10, + 1.11095724126011221e-11, + -2.42663312039887996e-13, + -1.42085565380835615e-14, + 1.58456562168556603e-15, + -6.46425670670134849e-17, + -5.96816020742620029e-20, + 1.74408801726094867e-19, + 9.05179290905237410e-01, + -2.62841298934447104e-02, + 7.58501998149367163e-04, + -2.11885782800193164e-05, + 5.19304420911451382e-07, + -7.14414380971522107e-09, + -2.61610744158657744e-10, + 2.49668498208968048e-11, + -8.10120920652699798e-13, + -1.44825220437156411e-14, + 3.12123134382341691e-15, + -1.65181770128068665e-16, + 2.46470529318684142e-18, + 2.74408749416063986e-19, + 1.47493519143391194e+00, + -5.12124675747787569e-02, + 1.76701730432247722e-03, + -5.92889720151591702e-05, + 1.81174641630742614e-06, + -4.13878096676378956e-08, + 5.62914118770749456e-11, + 5.88890528575248917e-11, + -3.26866575901160045e-12, + 5.33815632575202014e-14, + 5.02885883195970369e-15, + -4.67840256315224379e-16, + 1.76449615782910036e-17, + 4.76005128624546445e-20, + 2.77983730283439678e+00, + -1.32642451536986089e-01, + 6.28798515698004382e-03, + -2.91696405469043954e-04, + 1.28247695468443367e-05, + -5.04796876616767693e-07, + 1.59381478642308733e-08, + -2.78095749680500497e-10, + -8.12852531997078512e-12, + 9.92215854816555793e-13, + -4.73797525263515952e-14, + 1.10976705682429865e-15, + 2.04651170472191091e-17, + -3.38948839535752791e-18, +# root=10 base[19]=52.0 */ + 2.23335277001387783e-03, + -4.14156780959913678e-05, + 7.67267749705957335e-07, + -1.40903398466188272e-08, + 2.44047550504594902e-10, + -2.90646148722501916e-12, + -6.25320140930088621e-14, + 7.44384930378776670e-15, + -3.67118528863460933e-16, + 9.49716331527963316e-18, + 1.46737786564040110e-19, + -3.05934352066343886e-20, + 1.71684495428483707e-21, + -4.76639329698890327e-23, + 2.03623771963720515e-02, + -3.81022123420028929e-04, + 7.12272933165974485e-06, + -1.31997714667855313e-07, + 2.30943128165484871e-09, + -2.81270145116350186e-11, + -5.60119336983435362e-13, + 6.92507705290229422e-14, + -3.44795366684000315e-15, + 9.05663284927125531e-17, + 1.27885786399294997e-18, + -2.83464445236478404e-19, + 1.60866021381513069e-20, + -4.53915960026639398e-22, + 5.80843085385281607e-02, + -1.10716842851920965e-03, + 2.10835000778859829e-05, + -3.98069524032043929e-07, + 7.11003697379299403e-09, + -9.05229745611177995e-11, + -1.52507069074703557e-12, + 2.05718307665565873e-13, + -1.04513704225676870e-14, + 2.83146660607348434e-16, + 3.25185361575047504e-18, + -8.34860001934685088e-19, + 4.85162078738597575e-20, + -1.41487339399200354e-21, + 1.18673270604060521e-01, + -2.32866601347183006e-03, + 4.56493948587173540e-05, + -8.87456838255068300e-07, + 1.63707065843856133e-08, + -2.22577913235877013e-10, + -2.79284165827729769e-12, + 4.46807089147919704e-13, + -2.34768659432276030e-14, + 6.67111894611848842e-16, + 5.05793293099296090e-18, + -1.78740473747871728e-18, + 1.08057446343615761e-19, + -3.31581350751255758e-21, + 2.08080797894675401e-01, + -4.25534425564757981e-03, + 8.69380723033894855e-05, + -1.76198946422816350e-06, + 3.40206247390082381e-08, + -5.04384330086188006e-10, + -3.67314486399458392e-12, + 8.49265471908373877e-13, + -4.70521768077019187e-14, + 1.42922565037659702e-15, + 3.49525180162837654e-18, + -3.32128188642972437e-18, + 2.13651052120388369e-19, + -7.04022789305754983e-21, + 3.36835490668555781e-01, + -7.29002412494734846e-03, + 1.57620019179934142e-04, + -3.38209705742925639e-06, + 6.94803645752057090e-08, + -1.14757160105917799e-09, + -1.47009775812732223e-12, + 1.51052853752074635e-12, + -9.11382302096524391e-14, + 3.02955943533434802e-15, + -1.19303744687474189e-17, + -5.69500797506520002e-18, + 4.04911370607982043e-19, + -1.46966750840470513e-20, + 5.24414598766030138e-01, + -1.22605313455429136e-02, + 2.86360540067586290e-04, + -6.64096447916581859e-06, + 1.48325145472156649e-07, + -2.79542554322885291e-09, + 1.49430258502360300e-11, + 2.54875924602445740e-12, + -1.79113585770506508e-13, + 6.73907036795297064e-15, + -7.90338521815400040e-17, + -8.99139909613831855e-18, + 7.66553263864780290e-19, + -3.18046027369816617e-20, + 8.10751956626023174e-01, + -2.11040266705523685e-02, + 5.48793629019412622e-04, + -1.41790752184426171e-05, + 3.55236763948093832e-07, + -7.88095671239729233e-09, + 1.00338029493220895e-10, + 3.62095010248727949e-12, + -3.67608652247859694e-13, + 1.66742626987812533e-14, + -3.59209558548434555e-16, + -1.06846069366418127e-17, + 1.45934957661397555e-18, + -7.43980030900266936e-20, + 1.29446749289186203e+00, + -3.94898142652836959e-02, + 1.20348433964393505e-03, + -3.64714955421747351e-05, + 1.08010985889987130e-06, + -2.96458298235416313e-08, + 6.40766743712640953e-10, + -2.96447172513341233e-12, + -7.09946853400520029e-13, + 4.81732918706343707e-14, + -1.74725444214416529e-15, + 1.94425324512066125e-17, + 2.20682371259271087e-18, + -1.83675554896343595e-19, + 2.33177226408996141e+00, + -9.34980867565428919e-02, + 3.74515604543444606e-03, + -1.49346953112826743e-04, + 5.87161430548225857e-06, + -2.22767184793185373e-07, + 7.83411377157319784e-09, + -2.36590031000327802e-10, + 5.01299592433034460e-12, + 6.71625843400076358e-15, + -7.60820645568799446e-15, + 4.63386872251786093e-16, + -1.72047993607666532e-17, + 3.58771170671548931e-19, +# root=10 base[20]=56.0 */ + 2.07898302835105757e-03, + -3.58921700129453871e-05, + 6.19574894629641677e-07, + -1.06810973636926865e-08, + 1.82274846310010388e-10, + -2.92072414044881251e-12, + 3.12707162685609167e-14, + 7.68815704146833147e-16, + -8.49823041770956486e-17, + 4.50148178816761543e-18, + -1.63941455786744489e-19, + 3.23963471510891989e-21, + 7.19906085235971223e-23, + -1.03029888715118469e-23, + 1.89430480877352848e-02, + -3.29793015081905009e-04, + 5.74087839953185924e-06, + -9.98039286663382691e-08, + 1.71781148229132159e-09, + -2.78055354638379094e-11, + 3.05956346592578206e-13, + 6.85820075443192702e-15, + -7.88117517680790973e-16, + 4.20888774455866139e-17, + -1.54358773114004004e-18, + 3.10772870163819685e-20, + 6.36963119117102283e-22, + -9.52895154736587556e-23, + 5.39652591702026244e-02, + -9.55816970810699257e-04, + 1.69270185233291302e-05, + -2.99383290887471142e-07, + 5.24412113548218806e-09, + -8.66513001788509049e-11, + 1.00547931417830814e-12, + 1.84810611737957119e-14, + -2.32548554224750166e-15, + 1.26398432844621705e-16, + -4.70350559461910320e-18, + 9.82896993705761417e-20, + 1.68516844233496060e-21, + -2.79574859929788093e-22, + 1.10027380149481629e-01, + -2.00196204540783367e-03, + 3.64213553195174298e-05, + -6.61776660802183924e-07, + 1.19144500723088249e-08, + -2.03252678214719108e-10, + 2.54532346176644860e-12, + 3.30386348645902492e-14, + -4.99323982170337936e-15, + 2.79723712108686839e-16, + -1.06562314584187592e-17, + 2.35468817826831247e-19, + 2.90708704646774930e-21, + -5.94801047645441154e-22, + 1.92328569292674639e-01, + -3.63592960107162909e-03, + 6.87277663031024696e-05, + -1.29754654141868629e-06, + 2.42884396015109182e-08, + -4.33281429742216439e-10, + 5.97591961069736304e-12, + 4.03505713817863481e-14, + -9.31490575094356807e-15, + 5.48374040135646345e-16, + -2.16365739307187421e-17, + 5.15255268393945080e-19, + 3.25266933081995253e-21, + -1.09457291948415880e-21, + 3.09964703451556411e-01, + -6.17421121539773760e-03, + 1.22969011463501543e-04, + -2.44629293956139829e-06, + 4.82898257481482412e-08, + -9.14660630258744099e-10, + 1.41519474670322505e-11, + 1.89805091729612006e-15, + -1.60424719644261409e-14, + 1.02840860021652253e-15, + -4.27472212595830508e-17, + 1.12004125520002308e-18, + -8.54028882363775881e-22, + -1.84883371008956750e-21, + 4.79501144185786654e-01, + -1.02521091316582318e-02, + 2.19170224220735543e-04, + -4.68036615044361692e-06, + 9.92730024293457136e-08, + -2.03595796713855140e-09, + 3.60054303149688306e-11, + -2.38610053031276216e-13, + -2.53368672754160886e-14, + 1.92352553532336270e-15, + -8.67578699424399309e-17, + 2.56591583510279553e-18, + -2.25634234460592194e-20, + -2.84496808039065630e-21, + 7.34160744826173217e-01, + -1.73086823387531528e-02, + 4.08019869130756864e-04, + -9.60878181729511625e-06, + 2.25008493716479588e-07, + -5.13670049435027908e-09, + 1.06284402709164973e-10, + -1.44099037356000449e-12, + -2.85169829906455123e-14, + 3.61437736893929354e-15, + -1.89418435933978145e-16, + 6.58589062458720994e-18, + -1.18520517025584846e-19, + -3.16772515519261633e-21, + 1.15335401578786434e+00, + -3.13586841646120509e-02, + 8.52505102900018297e-04, + -2.31556647378330437e-05, + 6.26222238706096429e-07, + -1.66498260804455721e-08, + 4.18717698176887021e-10, + -8.87049298477354950e-12, + 8.77000965400943032e-14, + 5.27578717051141320e-15, + -4.44417681637658333e-16, + 2.02612102766082056e-17, + -6.04372711564306475e-19, + 6.75728160056862210e-21, + 2.00823182618343976e+00, + -6.93905418356035031e-02, + 2.39734007138987706e-03, + -8.27658877229793793e-05, + 2.84935997791134706e-06, + -9.72337983291518723e-08, + 3.24416714522121123e-09, + -1.03009120181268344e-10, + 2.95824524078533715e-12, + -6.86242528620106706e-14, + 7.93158156832462343e-16, + 3.35351082514648352e-17, + -2.97301614894329465e-18, + 1.35049617960587262e-19, +# root=10 base[21]=60.0 */ + 1.94458028132737763e-03, + -3.14028400027755505e-05, + 5.07114607713063174e-07, + -8.18791740269648512e-09, + 1.32014783601961452e-10, + -2.10749148089617328e-12, + 3.17467151761225958e-14, + -3.35290420086349301e-16, + -6.09199723090767080e-18, + 7.22945861316071555e-19, + -3.96546524347460571e-20, + 1.63010150399926572e-21, + -5.00969346237244395e-23, + 8.77241976146080429e-25, + 1.77087523728756621e-02, + -2.88228837187278506e-04, + 4.69116855776504127e-06, + -7.63405516479250492e-08, + 1.24056779593516055e-09, + -1.99653215102669791e-11, + 3.03740205064873077e-13, + -3.29681550194886412e-15, + -5.32688898678207998e-17, + 6.67780476092893330e-18, + -3.69433838691791354e-19, + 1.52611841309007025e-20, + -4.71977415961470880e-22, + 8.42358842678614271e-24, + 5.03919217898430721e-02, + -8.33467599387836518e-04, + 1.37851235099345247e-05, + -2.27962957214062766e-07, + 3.76467254966719378e-09, + -6.15986900831140279e-11, + 9.56106887412392236e-13, + -1.09378422176447791e-14, + -1.36275508567721350e-16, + 1.95328694498541527e-17, + -1.10106689349422325e-18, + 4.59606445303203056e-20, + -1.44001549099195073e-21, + 2.66895474264864116e-23, + 1.02556174349344012e-01, + -1.73940255336073259e-03, + 2.95007140749620519e-05, + -5.00262806628863063e-07, + 8.47228910778452978e-09, + -1.42254283219480637e-10, + 2.27720420803155664e-12, + -2.80619069347757716e-14, + -2.13140573242570245e-16, + 4.13005313422673567e-17, + -2.40657661435846901e-18, + 1.02212505177061648e-19, + -3.26923408931503603e-21, + 6.40826512479680173e-23, + 1.78794404016867664e-01, + -3.14239110715223459e-03, + 5.52281730820763003e-05, + -9.70502266209173757e-07, + 1.70335872116295138e-08, + -2.96648177586724720e-10, + 4.95651167942875732e-12, + -6.69919425071799351e-14, + -1.41390978061126660e-16, + 7.50245091292655617e-17, + -4.62888797605177274e-18, + 2.02026327841749286e-19, + -6.65871797380140836e-21, + 1.40537431746865030e-22, + 2.87066302344712032e-01, + -5.29601967270020447e-03, + 9.77037148547710499e-05, + -1.80223258834441771e-06, + 3.32070639153911641e-08, + -6.07734987822650242e-10, + 1.07478509997739925e-11, + -1.61786772636568277e-13, + 5.77175838917988130e-16, + 1.22868401699914447e-16, + -8.42923511577638772e-18, + 3.84264374540414431e-19, + -1.32197241806792240e-20, + 3.06003884741420719e-22, + 4.41678129348220871e-01, + -8.69920800896058222e-03, + 1.71335608330594013e-04, + -3.37409601265160800e-06, + 6.63808612454826710e-08, + -1.29865224512702127e-09, + 2.47407854814254084e-11, + -4.20949050159532510e-13, + 3.87413992730730957e-15, + 1.71540391808553582e-16, + -1.50051051148496609e-17, + 7.38289179986011895e-19, + -2.70559849562095417e-20, + 7.01526121549884685e-22, + 6.70801222282089937e-01, + -1.44515215367374411e-02, + 3.11334588016371459e-04, + -6.70637207445491936e-06, + 1.44340873763400115e-07, + -3.09316691450439348e-09, + 6.50515284567773940e-11, + -1.27428571288321077e-12, + 1.88684555064797947e-14, + 8.37868278203316074e-17, + -2.53656310008212338e-17, + 1.47760320956430242e-18, + -6.01331323470318137e-20, + 1.80095984472491721e-21, + 1.04001062406171618e+00, + -2.55019343245167368e-02, + 6.25320253628618389e-04, + -1.53314867536251613e-05, + 3.75650784883923076e-07, + -9.17642623234809473e-09, + 2.21602414197084854e-10, + -5.15533045842456783e-12, + 1.07176836038926770e-13, + -1.49724652284725663e-15, + -1.97849352540358019e-17, + 2.85133859989434282e-18, + -1.49712100035899533e-19, + 5.57650884335283556e-21, + 1.76366569580487731e+00, + -5.35340497895231901e-02, + 1.62494202203590792e-03, + -4.93180929110109817e-05, + 1.49618145412412275e-06, + -4.53145313167086152e-08, + 1.36533154460800411e-09, + -4.05834436600134667e-11, + 1.16971426621673889e-12, + -3.16345707031644121e-14, + 7.51523501403406716e-16, + -1.30769626925690894e-17, + 7.69057143763344558e-21, + 1.27565303861719018e-20, +# root=10 base[22]=64.0 */ + 1.82650726208840220e-03, + -2.77059862358922049e-05, + 4.20266995262135570e-07, + -6.37484664408287922e-09, + 9.66812487493251252e-11, + -1.46436159410288234e-12, + 2.19933945764811193e-14, + -3.15137267371779759e-16, + 3.45551329281103250e-18, + 2.91322211955973025e-20, + -4.76523045369999597e-21, + 2.68841483833832991e-22, + -1.16162711411207380e-23, + 4.09299065790348233e-25, + 1.66255332501303379e-02, + -2.54054337243334201e-04, + 3.88219283121132351e-06, + -5.93226343531611928e-08, + 9.06343478653842536e-10, + -1.38296340458999414e-11, + 2.09300127357107043e-13, + -3.02713810625546667e-15, + 3.39771202837788073e-17, + 2.37323192303875685e-19, + -4.37710762287599423e-20, + 2.49617740188587642e-21, + -1.08339818499875571e-22, + 3.83197173568273984e-24, + 4.72626199298855840e-02, + -7.33190903590109412e-04, + 1.13740675602383501e-05, + -1.76444235921519139e-07, + 2.73671911280797709e-09, + -4.23957257654416913e-11, + 6.51713557382898156e-13, + -9.60561220329006658e-15, + 1.12770040422359554e-16, + 4.86794197742119642e-19, + -1.26441076095827820e-19, + 7.38641071792959566e-21, + -3.23699052729113761e-22, + 1.15414663846216723e-23, + 9.60355465403392450e-02, + -1.52530326435922200e-03, + 2.42258958724692053e-05, + -3.84765907106403431e-07, + 6.11008754312181824e-09, + -9.69175049892938795e-11, + 1.52648349752749351e-12, + -2.31598522198866950e-14, + 2.89742376023796469e-16, + 2.28892831185240958e-19, + -2.61250710426400595e-19, + 1.59504007894432597e-20, + -7.10719666747830177e-22, + 2.56755166563358947e-23, + 1.67040727685116325e-01, + -2.74292873238882748e-03, + 4.50408038352147021e-05, + -7.39590024591871473e-07, + 1.21426682332881252e-08, + -1.99152853236274827e-10, + 3.24611587728325795e-12, + -5.12584824667136790e-14, + 6.94013175261069701e-16, + -2.22742505840212527e-18, + -4.54562061481412346e-19, + 3.00917596239245173e-20, + -1.37814213381867034e-21, + 5.07950406595993614e-23, + 2.67320152734320249e-01, + -4.59270486553603474e-03, + 7.89050560279953308e-05, + -1.35560982475485908e-06, + 2.32866953348427259e-08, + -3.99655026362205023e-10, + 6.82336718109760613e-12, + -1.13575396575350504e-13, + 1.68625571080640763e-15, + -1.24310512439929255e-17, + -6.78050443698874293e-19, + 5.30633517894388351e-20, + -2.54797583193619416e-21, + 9.68485255787861533e-23, + 4.09389364678758694e-01, + -7.47420721864853425e-03, + 1.36456167141835741e-04, + -2.49123752042854967e-06, + 4.54764513886920883e-08, + -8.29517466211024598e-10, + 1.50685581507901052e-11, + -2.68608501546582122e-13, + 4.42966264791056127e-15, + -5.10497371236535024e-17, + -6.90360382872488046e-19, + 8.88416439316489595e-20, + -4.68286655784334177e-21, + 1.87278809940287733e-22, + 6.17516660147477081e-01, + -1.22476957452009663e-02, + 2.42917919698281499e-04, + -4.81791461403639524e-06, + 9.55466451882523822e-08, + -1.89369208309007759e-09, + 3.74194210747938264e-11, + -7.30116393665775970e-13, + 1.35928429169803979e-14, + -2.13131559395311408e-16, + 1.11348178185658413e-18, + 1.26781186662892247e-19, + -8.63378882217831420e-21, + 3.82136556885045011e-22, + 9.46970777052493884e-01, + -2.11453950214945639e-02, + 4.72165747791232992e-04, + -1.05430949096030214e-05, + 2.35400393656115215e-07, + -5.25362191318818190e-09, + 1.17024715585984092e-10, + -2.58809051327235569e-12, + 5.59192713401233133e-14, + -1.12749792828415008e-15, + 1.83475470693887589e-17, + -7.39985266338333161e-20, + -1.26724372154065224e-20, + 8.04586629557033636e-22, + 1.57227666892583184e+00, + -4.25537819701678893e-02, + 1.15171971926386531e-03, + -3.11710338429129998e-05, + 8.43590032636527587e-07, + -2.28245637963300155e-08, + 6.16977016973246189e-10, + -1.66293243591811048e-11, + 4.44739086401710800e-13, + -1.16790782124628813e-14, + 2.95037049996448989e-16, + -6.89242719184708979e-18, + 1.36475413158374819e-19, + -1.67763120477049867e-21, +# root=10 base[23]=68.0 */ + 1.72195750939826172e-03, + -2.46255990827058122e-05, + 3.52169008506359589e-07, + -5.03633738493802332e-09, + 7.20230182346053509e-11, + -1.02982821820137614e-12, + 1.47096765617763817e-14, + -2.08767029913888763e-16, + 2.86304587937222945e-18, + -3.27678168945104443e-20, + -9.23081023055471617e-24, + 2.46852177281291811e-23, + -1.46201625399765940e-24, + 6.45907989442490373e-26, + 1.56672448575367884e-02, + -2.25617137486024279e-04, + 3.24901334181539685e-06, + -4.67875452522752562e-08, + 6.73754906541088257e-10, + -9.70089594036266699e-12, + 1.39533563774087858e-13, + -1.99461112098853903e-15, + 2.75899680956250677e-17, + -3.21619728016630118e-19, + 2.05198751173679336e-22, + 2.24653650779420066e-22, + -1.35248305875210304e-23, + 6.00534212193437542e-25, + 4.44994040105954961e-02, + -6.49982643278436932e-04, + 9.49400117023605525e-06, + -1.38674358727030444e-07, + 2.02551823657079690e-09, + -2.95812732382650854e-11, + 4.31596782725289051e-13, + -6.26082317919014835e-15, + 8.81169406535395688e-17, + -1.06433637471387378e-18, + 2.50327114741752053e-21, + 6.35164356525348885e-22, + -3.97018862473975565e-23, + 1.78252729758730592e-24, + 9.02948727044914218e-02, + -1.34843831866050725e-03, + 2.01371978316401387e-05, + -3.00722806104106778e-07, + 4.49083487854461140e-09, + -6.70551601873040734e-11, + 1.00035093252462818e-12, + -1.48463653143268996e-14, + 2.14577046812788055e-16, + -2.72663116500259399e-18, + 1.26824888778721510e-20, + 1.25805214881450165e-21, + -8.45423821990813842e-23, + 3.87156519254110776e-24, + 1.56737752357206717e-01, + -2.41507727364599504e-03, + 3.72124619486720321e-05, + -5.73383473675051763e-07, + 8.83477955095900283e-09, + -1.36111703182123603e-10, + 2.09533808586301355e-12, + -3.21127325727616129e-14, + 4.81439686209300641e-16, + -6.52069118673160004e-18, + 4.76480444305280025e-20, + 2.00288311646029299e-21, + -1.55745203397788893e-22, + 7.38238102316486292e-24, + 2.50116995782469098e-01, + -4.02075432043129486e-03, + 6.46356062720361622e-05, + -1.03904781941495388e-06, + 1.67029625354934436e-08, + -2.68476658491701188e-10, + 4.31250779388056802e-12, + -6.90202428113422415e-14, + 1.08586557179316055e-15, + -1.58604707207728249e-17, + 1.60659874422580306e-19, + 2.32854460248117772e-21, + -2.62910162376107938e-22, + 1.32931317491508410e-23, + 3.81502447664804289e-01, + -6.49091249669783450e-03, + 1.10436881870327086e-04, + -1.87897917471498345e-06, + 3.19686760006356743e-08, + -5.43862565416542382e-10, + 9.24742566135257470e-12, + -1.56802606327288995e-13, + 2.62629103882601457e-15, + -4.18675566330394297e-17, + 5.44825817461921127e-19, + -4.82356552084008967e-22, + -3.98805873560867329e-22, + 2.33350172898296911e-23, + 5.72079658509061839e-01, + -1.05122162150695104e-02, + 1.93166592817013564e-04, + -3.54951684461423078e-06, + 6.52231873257162276e-08, + -1.19840661746898039e-09, + 2.20106611489067020e-11, + -4.03490667238493041e-13, + 7.33866810662797948e-15, + -1.29684132550454867e-16, + 2.07285863700239651e-18, + -2.16443892973894695e-20, + -3.73994890731196221e-22, + 3.87712157644314608e-23, + 8.69223554751549554e-01, + -1.78172118306126441e-02, + 3.65214452671645275e-04, + -7.48610138404631082e-06, + 1.53447507913739383e-07, + -3.14515164647526197e-09, + 6.44479625693200143e-11, + -1.31912339613974264e-12, + 2.68869006086414559e-14, + -5.40589906369633706e-16, + 1.04393831205785163e-17, + -1.79376424266666425e-19, + 2.01849747136487619e-21, + 2.90038587049190052e-23, + 1.41840400431075175e+00, + -3.46369272447460547e-02, + 8.45821501418925008e-04, + -2.06546428619765586e-05, + 5.04375587591989686e-07, + -1.23162019512604991e-08, + 3.00705060944169134e-10, + -7.33821187657872748e-12, + 1.78799821609183565e-13, + -4.33811476548724441e-15, + 1.04174151196448514e-16, + -2.44568313345078913e-18, + 5.48235291756790405e-20, + -1.11953616170767814e-21, +# root=10 base[24]=72.0 */ + 1.62873279442067565e-03, + -2.20318508251076534e-05, + 2.98024604674882120e-07, + -4.03137507942405874e-09, + 5.45322808515072471e-11, + -7.37646060883541803e-13, + 9.97685818498087693e-15, + -1.34837686353541825e-16, + 1.81431264210038652e-18, + -2.38607700959662882e-20, + 2.80203018855013481e-22, + -1.42637400418525344e-24, + -9.79522127959815317e-26, + 6.51466836788792040e-27, + 1.48134453311962160e-02, + -2.01701222272680281e-04, + 2.74638221256289568e-06, + -3.73949858909817714e-08, + 5.09172743442632874e-10, + -6.93283629082377008e-12, + 9.43863892069958922e-14, + -1.28407332683044777e-15, + 1.73950545239461430e-17, + -2.30555412168113770e-19, + 2.74574984356543052e-21, + -1.55182135096428837e-23, + -8.73993715596815214e-25, + 5.99727082053746106e-26, + 4.20415609941857046e-02, + -5.80177643385025566e-04, + 8.00650802264995803e-06, + -1.10490578059482066e-07, + 1.52477843731645390e-09, + -2.10417807215461934e-11, + 2.90344279137870390e-13, + -4.00355819521024982e-15, + 5.49887292800561913e-17, + -7.40383925671602022e-19, + 9.06229593670352397e-21, + -6.07997522429792603e-23, + -2.35421668164805168e-24, + 1.74141344531894668e-25, + 8.52020596470349223e-02, + -1.20064802137630450e-03, + 1.69192583664834592e-05, + -2.38422306658894953e-07, + 3.35978793120304871e-09, + -4.73447074669563979e-11, + 6.67097859389390874e-13, + -9.39373921784453423e-15, + 1.31819038578866552e-16, + -1.81817810166080803e-18, + 2.31538205069992547e-20, + -1.88757274435063655e-22, + -4.18770205213760579e-24, + 3.63490181075837733e-25, + 1.47632405948757428e-01, + -2.14268746260470747e-03, + 3.10982504061700621e-05, + -4.51349572450327671e-07, + 6.55072795831714260e-09, + -9.50738603218327440e-11, + 1.37973508779154353e-12, + -2.00122998757879157e-14, + 2.89419299447013638e-16, + -4.12716164269483683e-18, + 5.52928256677532100e-20, + -5.45055197297472394e-22, + -4.94639375401327874e-24, + 6.45452296364339899e-25, + 2.34995098838345073e-01, + -3.54937510608452356e-03, + 5.36098991517219378e-05, + -8.09725907111738801e-07, + 1.22301158081478348e-08, + -1.84722025054775340e-10, + 2.78981303012135420e-12, + -4.21152308884758703e-14, + 6.34301395723049314e-16, + -9.45161175854423247e-18, + 1.34637037438409139e-19, + -1.57815920586524871e-21, + 9.97703469600718487e-25, + 1.00894990201304055e-24, + 3.57174261852327313e-01, + -5.68966806390634565e-03, + 9.06345330371878207e-05, + -1.44377802799698686e-06, + 2.29988803960258782e-08, + -3.66360943837046600e-10, + 5.83560436975552224e-12, + -9.29209853506320015e-14, + 1.47707333697333610e-15, + -2.33054992926909463e-17, + 3.57085819312196650e-19, + -4.88985512613621721e-21, + 3.76141979864093877e-23, + 1.21946315264811534e-24, + 5.32874553697668452e-01, + -9.12117198523030269e-03, + 1.56126385064464502e-04, + -2.67240282482363589e-06, + 4.57432628027376758e-08, + -7.82977485665827126e-10, + 1.34014518731677423e-11, + -2.29323877257114764e-13, + 3.91975398254639874e-15, + -6.66935008016239262e-17, + 1.11606272340879221e-18, + -1.76537076169224082e-20, + 2.28390160315458946e-22, + -5.43037714486901373e-25, + 8.03282435304985998e-01, + -1.52173819451964509e-02, + 2.88278071756931933e-04, + -5.46113909185984912e-06, + 1.03455726952726230e-07, + -1.95985315890302866e-09, + 3.71260957947336257e-11, + -7.03186334362750174e-13, + 1.33103552894829929e-14, + -2.51366040375388734e-16, + 4.71131066209512879e-18, + -8.63440110312438486e-20, + 1.48568825491664615e-21, + -2.11824333104784643e-23, + 1.29199152088373470e+00, + -2.87410662329259207e-02, + 6.39360915763165444e-04, + -1.42229361499070041e-05, + 3.16396880256377033e-07, + -7.03839554577898775e-09, + 1.56569790378781024e-10, + -3.48266942023280446e-12, + 7.74476248470387526e-14, + -1.72092112493352206e-15, + 3.81551383533984855e-17, + -8.41271847919674852e-19, + 1.83166794158399377e-20, + -3.88253016130725316e-22, +# root=10 base[25]=76.0 */ + 1.54508696167645829e-03, + -1.98273698358659642e-05, + 2.54435254561035062e-07, + -3.26504719175171760e-09, + 4.18988004010741435e-11, + -5.37666765366647646e-13, + 6.89954162773553749e-15, + -8.85306283079406563e-17, + 1.13540462967703478e-18, + -1.45207967035221013e-20, + 1.83102323802198987e-22, + -2.15962888594950603e-24, + 1.76682485272797763e-26, + 2.52092077381312274e-28, + 1.40479231058965350e-02, + -1.81396423592065811e-04, + 2.34231510434776224e-06, + -3.02455797757113237e-08, + 3.90551634560471538e-10, + -5.04306414774047709e-12, + 6.51187533275874613e-14, + -8.40784952605913671e-16, + 1.08506390746463615e-17, + -1.39655830116519737e-19, + 1.77345686953646432e-21, + -2.11450252601830326e-23, + 1.80223998253431430e-25, + 2.09929406709254317e-27, + 3.98411034961939706e-02, + -5.21044086644644930e-04, + 6.81424248498694614e-06, + -8.91170275973246518e-08, + 1.16547712386139468e-09, + -1.52421531102518917e-11, + 1.99335501724778750e-13, + -2.60670701697263766e-15, + 3.40726773212900299e-17, + -4.44273850531093049e-19, + 5.72282483922072447e-21, + -6.97037563515132657e-23, + 6.39522655063582791e-25, + 4.62557747794661268e-27, + 8.06532574962930265e-02, + -1.07589108681397337e-03, + 1.43520753661282611e-05, + -1.91452525370716686e-07, + 2.55392092423732840e-09, + -3.40685246286492904e-11, + 4.54459606186777167e-13, + -6.06190756221792540e-15, + 8.08259737167318834e-17, + -1.07537082552882245e-18, + 1.41593459562468187e-20, + -1.77942541708774028e-22, + 1.79376145701170445e-24, + 3.80785553532511401e-27, + 1.39527264144465257e-01, + -1.91391813904710360e-03, + 2.62535258869474305e-05, + -3.60123874594263223e-07, + 4.93987712659193971e-09, + -6.77610221412641884e-11, + 9.29480396241535879e-13, + -1.27490001095119454e-14, + 1.74809701488972399e-16, + -2.39266788015206451e-18, + 3.24762572902780777e-20, + -4.25166291464155932e-22, + 4.75262641136878376e-24, + -1.34357856507753648e-26, + 2.21598171343168032e-01, + -3.15629514297796230e-03, + 4.49561427526310538e-05, + -6.40325021513973089e-07, + 9.12035752532187600e-09, + -1.29904102911841218e-10, + 1.85025179810734770e-12, + -2.63522973192373505e-14, + 3.75222180012626964e-16, + -5.33532150115458954e-18, + 7.53920965376255792e-20, + -1.03829947401700283e-21, + 1.28948436277712449e-23, + -9.25226613905271593e-26, + 3.35764169727861328e-01, + -5.02814891217310492e-03, + 7.52977349872320674e-05, + -1.12760161856837219e-06, + 1.68861029157444544e-08, + -2.52873220433383962e-10, + 3.78681200814210239e-12, + -5.67059610616344602e-14, + 8.48976783019693804e-16, + -1.26980636143766148e-17, + 1.89124293981501366e-19, + -2.77086867437269382e-21, + 3.82120131647182661e-23, + -4.13439896247262442e-25, + 4.98700912560721799e-01, + -7.98908055480563283e-03, + 1.27983339255446243e-04, + -2.05026534650236969e-06, + 3.28448038799773150e-08, + -5.26166265314372848e-10, + 8.42902613423747756e-12, + -1.35026901217992588e-13, + 2.16273745448888931e-15, + -3.46192701880739966e-17, + 5.52772491365463064e-19, + -8.74652570062982848e-21, + 1.34256898818141643e-22, + -1.86489777284450301e-24, + 7.46646469031995719e-01, + -1.31478465894951345e-02, + 2.31523052775243267e-04, + -4.07693558462551202e-06, + 7.17915668798698330e-08, + -1.26419132454272645e-09, + 2.22613163492294601e-11, + -3.91995960077436673e-13, + 6.90204820234040647e-15, + -1.21487654994568871e-16, + 2.13581351468631841e-18, + -3.73997806631745267e-20, + 6.47140791002346382e-22, + -1.08289069194937627e-23, + 1.18628497082543305e+00, + -2.42323381996876891e-02, + 4.94995914783304038e-04, + -1.01113211718111110e-05, + 2.06544757225480825e-07, + -4.21910476578593953e-09, + 8.61838094517386110e-11, + -1.76046538504865089e-12, + 3.59595856014434997e-14, + -7.34428202653183981e-16, + 1.49939611839596956e-17, + -3.05776425678179381e-19, + 6.21803639535831137e-21, + -1.25551612365070540e-22, +# root=10 base[26]=80.0 */ + 1.46961538333809918e-03, + -1.79379762958229307e-05, + 2.18949119087719254e-07, + -2.67247073644660038e-09, + 3.26199064347761436e-11, + -3.98155228434247171e-13, + 4.85983755321433854e-15, + -5.93182057460238705e-17, + 7.23990394891648149e-19, + -8.83376643983096858e-21, + 1.07606669707081251e-22, + -1.30011517698355195e-24, + 1.51308213974414358e-26, + -1.47558060804031401e-28, + 1.33576563043421945e-02, + -1.64010611378172206e-04, + 2.01378745125164756e-06, + -2.47260824309950554e-08, + 3.03596661628809436e-10, + -3.72768006249078324e-12, + 4.57698928964597127e-14, + -5.61976523034055626e-16, + 6.89978767010469318e-18, + -8.46889623814165795e-20, + 1.03784053599649283e-21, + -1.26201651447507818e-23, + 1.48144288547181872e-25, + -1.47628257779179718e-27, + 3.78596011203023997e-02, + -4.70512348427963589e-04, + 5.84744327635527440e-06, + -7.26709787002705816e-08, + 9.03141912433102425e-10, + -1.12240849978001168e-11, + 1.39490791926314134e-13, + -1.73355376555856544e-15, + 2.15431787488343489e-17, + -2.67649118349468051e-19, + 3.32044709333088292e-21, + -4.09071831922794776e-23, + 4.88483098125979315e-25, + -5.06837638358927427e-27, + 7.65656929196128488e-02, + -9.69617739223147413e-04, + 1.22791099294879746e-05, + -1.55501012901600240e-07, + 1.96924410382560547e-09, + -2.49382428013025835e-11, + 3.15814315874053623e-13, + -3.99940335145822482e-15, + 5.06455516853308143e-17, + -6.41187442131926491e-19, + 8.10753567275565586e-21, + -1.01912704163417645e-22, + 1.24838777133217027e-24, + -1.36797636583985834e-26, + 1.32266048943551096e-01, + -1.71992791322038148e-03, + 2.23651651365666866e-05, + -2.90826497709407526e-07, + 3.78177628647828719e-09, + -4.91765051827866272e-11, + 6.39468549755290926e-13, + -8.31531027712290257e-15, + 1.08124202016631251e-16, + -1.40566520412593105e-18, + 1.82558376250417050e-20, + -2.35988430361080379e-22, + 2.99065522604094021e-24, + -3.49438444822789960e-26, + 2.09646884579793774e-01, + -2.82508379733606256e-03, + 3.80692442805539733e-05, + -5.12999777457614036e-07, + 6.91289713951429698e-09, + -9.31543162809168753e-11, + 1.25529445433096031e-12, + -1.69155583874952043e-14, + 2.27937110972431293e-16, + -3.07097799215105704e-18, + 4.13433599359499591e-20, + -5.54689982435695900e-22, + 7.33913555275297833e-24, + -9.20196511028555065e-26, + 3.16776655013162545e-01, + -4.47565364857597028e-03, + 6.32353276808293160e-05, + -8.93435234017624011e-07, + 1.26231102412093625e-08, + -1.78348576808949437e-10, + 2.51983848577369489e-12, + -3.56019882573531693e-14, + 5.02998484773601225e-16, + -7.10576001218490640e-18, + 1.00328491880873320e-19, + -1.41337660315350962e-21, + 1.97375766902940849e-23, + -2.67043820933166379e-25, + 4.68648144368902952e-01, + -7.05542701025424230e-03, + 1.06218387704324732e-04, + -1.59910177864264004e-06, + 2.40742355419884142e-08, + -3.62433958439884083e-10, + 5.45638605339078789e-12, + -8.21448213676006122e-14, + 1.23665621988048141e-15, + -1.86159942735224812e-17, + 2.80145039225766219e-19, + -4.21033824125526312e-21, + 6.29807731773630947e-23, + -9.27254290483481103e-25, + 6.97474855897503021e-01, + -1.14735776094238694e-02, + 1.88742263670565189e-04, + -3.10484168867824505e-06, + 5.10751629224512697e-08, + -8.40194904263717338e-10, + 1.38213417564215545e-11, + -2.27362924415885506e-13, + 3.74011815080496319e-15, + -6.15224604964424444e-17, + 1.01183873953841271e-18, + -1.66314026672285638e-20, + 2.72823199504108061e-22, + -4.44731423832299690e-24, + 1.09657877882048238e+00, + -2.07072916945119055e-02, + 3.91027017474724042e-04, + -7.38397520026139160e-06, + 1.39435607076924206e-07, + -2.63303809697187257e-09, + 4.97210765555942484e-11, + -9.38909066405335503e-13, + 1.77298412450474010e-14, + -3.34795289625873740e-16, + 6.32163445100286045e-18, + -1.19344019969791810e-19, + 2.25186484262207707e-21, + -4.24153154683083829e-23, +# root=10 base[27]=84.0 */ + 1.40117533308432699e-03, + -1.63063559718854111e-05, + 1.89767289505495999e-07, + -2.20844094333967589e-09, + 2.57010120673902447e-11, + -2.99098791347422880e-13, + 3.48079992860680941e-15, + -4.05082248216023758e-17, + 4.71417235154358164e-19, + -5.48599044371534623e-21, + 6.38307113751891062e-23, + -7.42001220498833291e-25, + 8.58700685426940500e-27, + -9.74003130387678151e-29, + 1.27320648447347088e-02, + -1.49009888599529105e-04, + 1.74393919377399236e-06, + -2.04102153223354147e-08, + 2.38871223703258526e-10, + -2.79563249288613657e-12, + 3.27187193165754493e-14, + -3.82923717512225460e-16, + 4.48153088201209112e-18, + -5.24479292183198021e-20, + 6.13703477096197688e-22, + -7.17477854383238440e-24, + 8.35266580896917864e-26, + -9.54207226115278247e-28, + 3.60659135331431596e-02, + -4.26991310050683632e-04, + 5.05523251728894709e-06, + -5.98498732911658939e-08, + 7.08574198880301087e-10, + -8.38894661840308415e-12, + 9.93183509251346642e-14, + -1.17584841037739723e-15, + 1.39210325816343575e-17, + -1.64808767799864611e-19, + 1.95084894479512388e-21, + -2.30740242279847689e-23, + 2.71885281870398862e-25, + -3.15074372775027616e-27, + 7.28725790128872258e-02, + -8.78348681092867693e-04, + 1.05869233122623499e-05, + -1.27606436519510987e-07, + 1.53806749635251056e-09, + -1.85386542695326278e-11, + 2.23450325026984630e-13, + -2.69329275586715843e-15, + 3.24626959541491711e-17, + -3.91269190880548875e-19, + 4.71530461392025043e-21, + -5.67871841313909693e-23, + 6.81737500440720278e-25, + -8.07275068012478906e-27, + 1.25723437148344219e-01, + -1.55400731796384475e-03, + 1.92083417305196818e-05, + -2.37425131631609039e-07, + 2.93469857491933311e-09, + -3.62744062460566072e-11, + 4.48370571961853827e-13, + -5.54209161079484027e-15, + 6.85029007192560461e-17, + -8.46712252461303975e-19, + 1.04644385866454852e-20, + -1.29258996517742616e-22, + 1.59269231203639554e-24, + -1.94200507951033104e-26, + 1.98919149675512358e-01, + -2.54340522759152797e-03, + 3.25202986353042775e-05, + -4.15808622166156941e-07, + 5.31658125679044336e-09, + -6.79784752193881888e-11, + 8.69181275474583938e-13, + -1.11134562700511849e-14, + 1.42097628671527903e-16, + -1.81684495512729005e-18, + 2.32280621269243621e-20, + -2.96847469465460727e-22, + 3.78688724480147064e-24, + -4.79568844069388670e-26, + 2.99822419434531529e-01, + -4.00947373367759041e-03, + 5.36180037881799890e-05, + -7.17024358082756737e-07, + 9.58864361870562538e-09, + -1.28227284058809661e-10, + 1.71476137689574150e-12, + -2.29312016694741828e-14, + 3.06654322268106028e-16, + -4.10078001271318943e-18, + 5.48350866753061051e-20, + -7.33048489784700539e-22, + 9.78833573976076716e-24, + -1.30103865243587864e-25, + 4.42012970840546915e-01, + -6.27639685619483557e-03, + 8.91221753548793850e-05, + -1.26549711908560160e-06, + 1.79695227528600173e-08, + -2.55159606370985871e-10, + 3.62315814409590450e-12, + -5.14472969495540539e-14, + 7.30528625634891834e-16, + -1.03731023360170202e-17, + 1.47286931687837229e-19, + -2.09098079106297975e-21, + 2.96659346024420724e-23, + -4.19827856609072449e-25, + 6.54382518299367999e-01, + -1.00999492998890029e-02, + 1.55885851176542798e-04, + -2.40599213667761469e-06, + 3.71348529468687177e-08, + -5.73151207917525601e-10, + 8.84619902087139722e-12, + -1.36535044348069565e-13, + 2.10732344956349118e-15, + -3.25249336261004357e-17, + 5.01987996842843351e-19, + -7.74705402820042345e-21, + 1.19524261140837038e-22, + -1.84186863783957057e-24, + 1.01949361043722653e+00, + -1.78992010002751757e-02, + 3.14255423641426565e-04, + -5.51736757881872576e-06, + 9.68681610633937384e-08, + -1.70070970892763206e-09, + 2.98592792815453630e-11, + -5.24237901472685620e-13, + 9.20401544997295553e-15, + -1.61594096509972248e-16, + 2.83707343672324999e-18, + -4.98086404336965951e-20, + 8.74385782874498306e-22, + -1.53413077295471127e-23, +# root=10 base[28]=88.0 */ + 1.33882764906381453e-03, + -1.48876590843106383e-05, + 1.65549608394793035e-07, + -1.84089873931192438e-09, + 2.04706504663281580e-11, + -2.27632037212965071e-13, + 2.53125049475957903e-15, + -2.81473067887898259e-17, + 3.12995731015675295e-19, + -3.48047793506625974e-21, + 3.87019068952761406e-23, + -4.30314178908099248e-25, + 4.78221461867477807e-27, + -5.30174713504163370e-29, + 1.21624635936056231e-02, + -1.35977081567605984e-04, + 1.52023202941898538e-06, + -1.69962864081444906e-08, + 1.90019514171502146e-10, + -2.12442970678675954e-12, + 2.37512530114653215e-14, + -2.65540438326281106e-16, + 2.96875706597877858e-18, + -3.31907905295854905e-20, + 3.71068278946028691e-22, + -4.14812411982283692e-24, + 4.63500885950910485e-26, + -5.16715967497511899e-28, + 3.44345397001629000e-02, + -3.89241473547878233e-04, + 4.39991142756562918e-06, + -4.97357601540430586e-08, + 5.62203553126813105e-10, + -6.35504180570409551e-12, + 7.18361809503060918e-14, + -8.12022460680440237e-16, + 9.17894375716663758e-18, + -1.03756758490251215e-19, + 1.17282694034803094e-21, + -1.32561281416320372e-23, + 1.49768578765267403e-25, + -1.68861876176906058e-27, + 6.95194326778159621e-02, + -7.99386454132991649e-04, + 9.19194358234702341e-06, + -1.05695845087245283e-07, + 1.21536991260619850e-09, + -1.39752326372605889e-11, + 1.60697680953337672e-13, + -1.84782209880762741e-15, + 2.12476340406080569e-17, + -2.44320622836993632e-19, + 2.80933997005331840e-21, + -3.23011924135342925e-23, + 3.71262948461623381e-25, + -4.25981382412787927e-27, + 1.19797755750312249e-01, + -1.41099033594122448e-03, + 1.66187898567052240e-05, + -1.95737822765851687e-07, + 2.30542028573254579e-09, + -2.71534781413815027e-11, + 3.19816467720029452e-13, + -3.76683123645847788e-15, + 4.43661143590857147e-17, + -5.22547634257773034e-19, + 6.15454456724734817e-21, + -7.24839313437570010e-23, + 8.53430182760816370e-25, + -1.00345081367353867e-26, + 1.89236166103559311e-01, + -2.30185199608041232e-03, + 2.79995241975007013e-05, + -3.40583737190706186e-07, + 4.14283047159408672e-09, + -5.03930236135123642e-11, + 6.12976282249096202e-13, + -7.45618907220629914e-15, + 9.06964028956962233e-17, + -1.10322125470911332e-18, + 1.34193572417423675e-20, + -1.63223457267335469e-22, + 1.98493447462107578e-24, + -2.41137758694671653e-26, + 2.84591360849147157e-01, + -3.61252014795164370e-03, + 4.58562824269035491e-05, + -5.82086341914098059e-07, + 7.38883510616686017e-09, + -9.37917286127706632e-11, + 1.19056498148917856e-12, + -1.51126859861597452e-14, + 1.91836014066323071e-16, + -2.43510774836967942e-18, + 3.09103370777016909e-20, + -3.92352805653387311e-22, + 4.97957446529369845e-24, + -6.31534627545858310e-26, + 4.18243585311852073e-01, + -5.61963500489512900e-03, + 7.55069502493209535e-05, + -1.01453199913827508e-06, + 1.36315289367816956e-08, + -1.83156944547517760e-10, + 2.46094670787671312e-12, + -3.30659512182797640e-14, + 4.44283087835471412e-16, + -5.96950392399915444e-18, + 8.02075239895273627e-20, + -1.07766645817115652e-21, + 1.44783992407071845e-23, + -1.94422973228960697e-25, + 6.16307237653836881e-01, + -8.95905161857614776e-03, + 1.30234728720461049e-04, + -1.89317857368934212e-06, + 2.75205019968094408e-08, + -4.00056307699421255e-10, + 5.81548436445115293e-12, + -8.45377446659525023e-14, + 1.22889673479053229e-15, + -1.78640509006167713e-17, + 2.59683073181753896e-19, + -3.77488318397474940e-21, + 5.48716472167237180e-23, + -7.97341541628856969e-25, + 9.52539653516314533e-01, + -1.56259977895051964e-02, + 2.56337682128228179e-04, + -4.20510793383776012e-06, + 6.89829625833243112e-08, + -1.13163543028570109e-09, + 1.85639859146445207e-11, + -3.04534094235875720e-13, + 4.99574884401874399e-15, + -8.19530638568945931e-17, + 1.34440294459626237e-18, + -2.20542546866194444e-20, + 3.61784969716834618e-22, + -5.93302649132203841e-24, +# root=10 base[29]=92.0 */ + 1.28179332819603874e-03, + -1.36463831481584483e-05, + 1.45283774638169068e-07, + -1.54673769188140847e-09, + 1.64670658746327472e-11, + -1.75313668203446731e-13, + 1.86644557588232770e-15, + -1.98707785468818676e-17, + 2.11550679426329971e-19, + -2.25223591038324338e-21, + 2.39779881114996552e-23, + -2.55274806077318667e-25, + 2.71758245972885932e-27, + -2.89203702295522583e-29, + 1.16416562112252597e-02, + -1.24582401496854949e-04, + 1.33321019630848213e-06, + -1.42672593093782673e-08, + 1.52680116581972483e-10, + -1.63389600576960320e-12, + 1.74850282841504895e-14, + -1.87114854378350648e-16, + 2.00239698032663270e-18, + -2.14285119467196512e-20, + 2.29315429080446517e-22, + -2.45398020115067502e-24, + 2.62596783796916600e-26, + -2.80904851593198603e-28, + 3.29443963442586432e-02, + -3.56285666414301802e-04, + 3.85314317997527335e-06, + -4.16708101530080667e-08, + 4.50659717974961530e-10, + -4.87377568745057090e-12, + 5.27087034790552319e-14, + -5.70031858822616792e-16, + 6.16475630863828973e-18, + -6.66703324193905424e-20, + 7.21022477054612074e-22, + -7.79761540637889255e-24, + 8.43251834472485284e-26, + -9.11619943994262813e-28, + 6.64613653848170755e-02, + -7.30613688406158866e-04, + 8.03167913562596574e-06, + -8.82927198891757431e-08, + 9.70607049133170462e-10, + -1.06699402282160804e-11, + 1.17295278809707098e-13, + -1.28943387694192491e-15, + 1.41748219000769624e-17, + -1.55824619802447395e-19, + 1.71298705188777097e-21, + -1.88308244952881056e-23, + 2.06999673834854646e-25, + -2.27480194340607404e-27, + 1.14405653044649738e-01, + -1.28684708910289177e-03, + 1.44745944510826820e-05, + -1.62811795043458706e-07, + 1.83132458009866297e-09, + -2.05989358246570535e-11, + 2.31699045387135952e-13, + -2.60617577360797570e-15, + 2.93145447471277682e-17, + -3.29733099561694856e-19, + 3.70886948882004134e-21, + -4.17175035916079011e-23, + 4.69227163550227966e-25, + -5.27637079951646321e-27, + 1.80452362140376105e-01, + -2.09314870623226101e-03, + 2.42793801889582464e-05, + -2.81627531099315359e-07, + 3.26672533053529962e-09, + -3.78922271671527265e-11, + 4.39529110681422510e-13, + -5.09829728132177326e-15, + 5.91374589869071691e-17, + -6.85962091633739756e-19, + 7.95677852113862095e-21, + -9.22938389852909796e-23, + 1.07053118692950769e-24, + -1.24144092871866645e-26, + 2.70833403459412370e-01, + -3.27173341372421827e-03, + 3.95233357250322819e-05, + -4.77451512485953240e-07, + 5.76773044564662788e-09, + -6.96755872021772015e-11, + 8.41698046884211393e-13, + -1.01679171918544513e-14, + 1.22830912001399528e-16, + -1.48382715843451458e-18, + 1.79249822749060329e-20, + -2.16537419392527421e-22, + 2.61578015401178971e-24, + -3.15921643021912259e-26, + 3.96900944012684553e-01, + -5.06082816606082987e-03, + 6.45299088166844027e-05, + -8.22811799818607589e-07, + 1.04915576410170694e-08, + -1.33776377243640542e-10, + 1.70576378818552084e-12, + -2.17499543444602108e-14, + 2.77330608702756502e-16, + -3.53620337934773003e-18, + 4.50896143261852667e-20, + -5.74930120499991781e-22, + 7.33077844614709233e-24, + -9.34543555072805938e-26, + 5.82420728976241975e-01, + -8.00112329595194065e-03, + 1.09917059630678011e-04, + -1.51000797650069629e-06, + 2.07440418871673537e-08, + -2.84975497154873762e-10, + 3.91490888859322550e-12, + -5.37818575476481476e-14, + 7.38839208414265370e-16, + -1.01499535664564725e-17, + 1.39437021085932844e-19, + -1.91554231270243630e-21, + 2.63150195598015277e-23, + -3.61432304936364032e-25, + 8.93841880735413818e-01, + -1.37599541438540082e-02, + 2.11823077572944495e-04, + -3.26084053212570122e-06, + 5.01979345110882349e-08, + -7.72755553156098172e-10, + 1.18959305936784682e-11, + -1.83127981468872292e-13, + 2.81910332540373052e-15, + -4.33977558633059098e-17, + 6.68072380653097846e-19, + -1.02844156372851393e-20, + 1.58319765935081473e-22, + -2.43660864096624319e-24, +# root=10 base[30]=96.0 */ + 1.22942077479416020e-03, + -1.25541288690165106e-05, + 1.28195451786034332e-07, + -1.30905728546283467e-09, + 1.33673305312211535e-11, + -1.36499393506270912e-13, + 1.39385230160284086e-15, + -1.42332078435951844e-17, + 1.45341227990681315e-19, + -1.48413994066280988e-21, + 1.51551707653510682e-23, + -1.54755649783003897e-25, + 1.58026666506986552e-27, + -1.61346331828106990e-29, + 1.11636291879201269e-02, + -1.14562363114939774e-04, + 1.17565128880140766e-06, + -1.20646599396146688e-08, + 1.23808837573702879e-10, + -1.27053960393830033e-12, + 1.30384140323171752e-14, + -1.33801606749110847e-16, + 1.37308647300371408e-18, + -1.40907608022260607e-20, + 1.44600885376964244e-22, + -1.48390866891850045e-24, + 1.52279577990848712e-26, + -1.56250376367619643e-28, + 3.15779008056814026e-02, + -3.27345127415633536e-04, + 3.39334882018118060e-06, + -3.51763788461847545e-08, + 3.64647931674799471e-10, + -3.78003985731280817e-12, + 3.91849235425321523e-14, + -4.06201598584119346e-16, + 4.21079648758569299e-18, + -4.36502635329236677e-20, + 4.52490480661873710e-22, + -4.69063628992708624e-24, + 4.86242041948875007e-26, + -5.03985686796579197e-28, + 6.36610597628674835e-02, + -6.70349582757786460e-04, + 7.05876661144821276e-06, + -7.43286597866045288e-08, + 7.82679180341786477e-10, + -8.24159484508867186e-12, + 8.67838155089234760e-14, + -9.13831700607609256e-16, + 9.62262803125151529e-18, + -1.01326063725092781e-19, + 1.06696115653160634e-21, + -1.12350708499470808e-23, + 1.18304613015607231e-25, + -1.24558196791201297e-27, + 1.09478148782586132e-01, + -1.17839664269055416e-03, + 1.26839799809005026e-05, + -1.36527330719943060e-07, + 1.46954757588537381e-09, + -1.58178590792024904e-11, + 1.70259656748389953e-13, + -1.83263427537853055e-15, + 1.97260375533453696e-17, + -2.12326353826071966e-19, + 2.28542996738800836e-21, + -2.45998094752864809e-23, + 2.64785674617470159e-25, + -2.84971435322344333e-27, + 1.72448016606937343e-01, + -1.91159733571203772e-03, + 2.11901791960323231e-05, + -2.34894496854226333e-07, + 2.60382057848412815e-09, + -2.88635182847078955e-11, + 3.19953953296310877e-13, + -3.54671011366776419e-15, + 3.93155092686539248e-17, + -4.35814940222181366e-19, + 4.83103627708634059e-21, + -5.35523257254074325e-23, + 5.93629616275132380e-25, + -6.57953736480009986e-27, + 2.58344640472636444e-01, + -2.97699480404771573e-03, + 3.43049426034669418e-05, + -3.95307739679982553e-07, + 4.55526805152243866e-09, + -5.24919320780235027e-11, + 6.04882720859992438e-13, + -6.97027317285924270e-15, + 8.03208727669859746e-17, + -9.25565239820400526e-19, + 1.06656084328437505e-20, + -1.22903465992094198e-22, + 1.41625698720903496e-24, + -1.63177270132562090e-26, + 3.77631353894975708e-01, + -4.58142000670119266e-03, + 5.55817441039055897e-05, + -6.74317192729175563e-07, + 8.18080979179225192e-09, + -9.92495068656822178e-11, + 1.20409407670979737e-12, + -1.46080579262379899e-14, + 1.77224820189634513e-16, + -2.15008982774432705e-18, + 2.60848685603664619e-20, + -3.16461319616727123e-22, + 3.83930198508230479e-24, + -4.65713111211079834e-26, + 5.52067581658029938e-01, + -7.18902717871121744e-03, + 9.36155526847476897e-05, + -1.21906225788422160e-06, + 1.58746356345531055e-08, + -2.06719595246108298e-10, + 2.69190374142447482e-12, + -3.50539857822013430e-14, + 4.56473201391768871e-16, + -5.94419659742982196e-18, + 7.74053603209273666e-20, + -1.00797293943623309e-21, + 1.31258225801512871e-23, + -1.70895190738046659e-25, + 8.41961254142634341e-01, + -1.22093178063706620e-02, + 1.77047863620226142e-04, + -2.56737898952308063e-06, + 3.72296775632552339e-08, + -5.39869219589064383e-10, + 7.82866770100563704e-12, + -1.13523860495768791e-13, + 1.64621457840560990e-15, + -2.38718311967828302e-17, + 3.46166489030945512e-19, + -5.01977553924174874e-21, + 7.27919736599412960e-23, + -1.05533701258006745e-24, + ]) + +DATA_W = np.array([ +# root=6 base[0]=0.0 */ + 4.68191818023631134e-01, + -1.45170048876671811e-02, + 5.14736742524254552e-04, + -1.87036507785185037e-05, + 6.67536123709177513e-07, + -2.31759441798646411e-08, + 7.81990082225856950e-10, + -2.57077791673372889e-11, + 8.24809968383298353e-13, + -2.58951252400149340e-14, + 7.95836164769633417e-16, + -2.40116164443139403e-17, + 7.11294842847795793e-19, + -2.05705362037095823e-20, + 3.93060289803588703e-01, + -3.41407175855545156e-02, + 2.63809148379061907e-03, + -1.72927802762273911e-04, + 1.00892255988079650e-05, + -5.37668473839741412e-07, + 2.65821244248589374e-08, + -1.23199373512337088e-09, + 5.39279377464798182e-11, + -2.24191389608054918e-12, + 8.88956201267968428e-14, + -3.37327724935385425e-15, + 1.22829739434203260e-16, + -4.29641198711664959e-18, + 2.84443237569889595e-01, + -5.35165649536975194e-02, + 6.71552139047160157e-03, + -6.55826564387053564e-04, + 5.37807668379012532e-05, + -3.85213441562946824e-06, + 2.46918298785757218e-07, + -1.43970828330915504e-08, + 7.72567401493197438e-10, + -3.84884038456033174e-11, + 1.79220972850254478e-12, + -7.84234668696407315e-14, + 3.23890943391757566e-15, + -1.26546876303908709e-16, + 1.83282975178210544e-01, + -5.67049390826931954e-02, + 1.02283008049457811e-02, + -1.34754798285909461e-03, + 1.42330195985579952e-04, + -1.26704203204518809e-05, + 9.80650538416785238e-07, + -6.73928579149659400e-08, + 4.17527442149567287e-09, + -2.35886037569073280e-10, + 1.22616899242814583e-11, + -5.90674739792320390e-13, + 2.65251154325464704e-14, + -1.11424694305173885e-15, + 1.03896381402773130e-01, + -4.31695643334346832e-02, + 9.97625123813350272e-03, + -1.61832679208380849e-03, + 2.03881594416244709e-04, + -2.10995683419174559e-05, + 1.85859136822596246e-06, + -1.42800495147289160e-07, + 9.74221449719899707e-09, + -5.98226682446005856e-10, + 3.34191216499979397e-11, + -1.71314606472487005e-12, + 8.11626659871168706e-14, + -3.56936536666364523e-15, + 4.16052301993916837e-02, + -1.99753438949547175e-02, + 5.28383322123325561e-03, + -9.62930751830167104e-04, + 1.33970091236807924e-04, + -1.50888090216179426e-05, + 1.42876346622049582e-06, + -1.16781302153728025e-07, + 8.40082788574310538e-09, + -5.39841138124837779e-10, + 3.13553296478549325e-11, + -1.66186507698389844e-12, + 8.10099167284629402e-14, + -3.65004953302808627e-15, +# root=6 base[1]=2.5 */ + 4.17155083137000005e-01, + -1.11449485771202075e-02, + 3.41823488291325935e-04, + -1.09118055813648477e-05, + 3.45810759720881999e-07, + -1.07471572373508267e-08, + 3.25780728429269817e-10, + -9.67626775311538982e-12, + 2.80534496080717475e-13, + -8.00022846801872112e-15, + 2.24922321001069558e-16, + -6.09833415233773570e-18, + 1.67262054692295004e-19, + -4.54743170794528569e-21, + 2.88587611840684821e-01, + -1.92309940894317306e-02, + 1.26365710855329749e-03, + -7.18449473731826816e-05, + 3.68349363898150533e-06, + -1.74337460788710900e-07, + 7.72299831440342323e-09, + -3.23135026415614565e-10, + 1.28547558332750252e-11, + -4.88561320110636826e-13, + 1.78077210491884708e-14, + -6.24385928702716386e-16, + 2.11044012329474462e-17, + -6.88463117443852515e-19, + 1.42910179144594279e-01, + -2.09284395462391026e-02, + 2.22762534807030479e-03, + -1.89087560196073856e-04, + 1.37310667291856548e-05, + -8.83157550689539699e-07, + 5.14055298259851936e-08, + -2.74732859513953949e-09, + 1.36222669916050447e-10, + -6.31517417534588108e-12, + 2.75369375191326774e-13, + -1.13475722846743325e-14, + 4.43617949947926821e-16, + -1.64850900845028700e-17, + 5.45445230596317901e-02, + -1.41493274770410141e-02, + 2.23489955190636202e-03, + -2.63768564524528143e-04, + 2.53765068972166642e-05, + -2.08404250130034368e-06, + 1.50328686537516992e-07, + -9.70988178895214196e-09, + 5.69437347431642903e-10, + -3.06386104503710886e-11, + 1.52480368747261987e-12, + -7.06496240426108824e-14, + 3.06390708701844445e-15, + -1.24750855274864580e-16, + 1.77343211575596328e-02, + -6.75490258202208951e-03, + 1.44893413960767679e-03, + -2.20819636279448591e-04, + 2.63909482570249985e-05, + -2.61105940626611467e-06, + 2.21265163202742761e-07, + -1.64391299485153366e-08, + 1.08914449680438210e-09, + -6.51831146276956964e-11, + 3.55984739234370767e-12, + -1.78866992257285796e-13, + 8.32463349620918878e-15, + -3.60356505061188825e-16, + 4.72539699959455793e-03, + -2.21518460663758937e-03, + 5.72560307240309427e-04, + -1.02247097224854549e-04, + 1.39767395383156464e-05, + -1.55017118126920609e-06, + 1.44821651304338729e-07, + -1.16971796059622002e-08, + 8.32608663767503504e-10, + -5.30009020864407181e-11, + 3.05240676143082268e-12, + -1.60545027993881942e-13, + 7.77171884606819991e-15, + -3.47961119296329795e-16, +# root=6 base[2]=5.0 */ + 3.77329416787099470e-01, + -8.85403591385736793e-03, + 2.38148487246577975e-04, + -6.75031486428278884e-06, + 1.91413238548058651e-07, + -5.38008339972967587e-09, + 1.47137716455541723e-10, + -3.98276468520526180e-12, + 1.06334938348770256e-13, + -2.65900159075596356e-15, + 7.22461400024153150e-17, + -1.83212971309187276e-18, + 3.90150430163120251e-20, + -1.12115563963452872e-21, + 2.27554159813722040e-01, + -1.17804240462867655e-02, + 6.65926627477751460e-04, + -3.31408114645354430e-05, + 1.50306476825697915e-06, + -6.34757980014641235e-08, + 2.52854383092215081e-09, + -9.57254752107926009e-11, + 3.46533809217320651e-12, + -1.20526439775060013e-13, + 4.03488872911787977e-15, + -1.30605572444797412e-16, + 4.09588684641017930e-18, + -1.24227216458328094e-19, + 8.43949784291552901e-02, + -9.45703259758133401e-03, + 8.56219775183533326e-04, + -6.30536059562193321e-05, + 4.04371944665094265e-06, + -2.32722484773040642e-07, + 1.22504705467316944e-08, + -5.97335570141015105e-10, + 2.72297906051278521e-11, + -1.16852490355850389e-12, + 4.74481560583060409e-14, + -1.83091083615263687e-15, + 6.73676664625364821e-17, + -2.36727313084406641e-18, + 2.04097206707036308e-02, + -4.26657538838944549e-03, + 5.80002216162412332e-04, + -6.04146637790853956e-05, + 5.22691111518635367e-06, + -3.91453396417903992e-07, + 2.60393168010074406e-08, + -1.56539584104934713e-09, + 8.61141299520317380e-11, + -4.37566741001166845e-12, + 2.06865109268564120e-13, + -9.15226471277159976e-15, + 3.80742959328500406e-16, + -1.49330507074160235e-17, + 3.68715872237146414e-03, + -1.24140524904209934e-03, + 2.41291598801732921e-04, + -3.39104364461449096e-05, + 3.78714993754307889e-06, + -3.53744523711329626e-07, + 2.85334393089216037e-08, + -2.03133973435264007e-09, + 1.29672905288676980e-10, + -7.51224189960992153e-12, + 3.98693799503765508e-13, + -1.95328502658825273e-14, + 8.88948856516279198e-16, + -3.77242879488612060e-17, + 5.79451636598775897e-04, + -2.62053319040160494e-04, + 6.55312504808748314e-05, + -1.13773347385315944e-05, + 1.51842618011678788e-06, + -1.64991702962037420e-07, + 1.51434455191529470e-08, + -1.20440686711523522e-09, + 8.45770089409020738e-11, + -5.31980548727645398e-12, + 3.03130090339795197e-13, + -1.57922267141875163e-14, + 7.57946113407316190e-16, + -3.36738619313614446e-17, +# root=6 base[3]=7.5 */ + 3.45274716165393625e-01, + -7.22789346269617043e-03, + 1.72501958346824431e-04, + -4.38861146105355426e-06, + 1.11765104556036951e-07, + -2.87438646149411771e-09, + 7.20632063705209864e-11, + -1.68538231332832501e-12, + 4.70351056657959583e-14, + -9.83618014082293022e-16, + 1.87267547671509744e-17, + -8.01696933008078663e-19, + 1.27410945240841445e-20, + -8.30433816331086628e-23, + 1.89040941277889757e-01, + -7.71375658167449286e-03, + 3.79276823308924297e-04, + -1.66788050327132906e-05, + 6.74355837555567690e-07, + -2.55451111353602958e-08, + 9.19099720624716013e-10, + -3.16390191126760252e-11, + 1.04200187162417684e-12, + -3.32977018249296182e-14, + 1.02803733451909276e-15, + -3.05159607907473562e-17, + 8.90467913651848670e-19, + -2.52703039353914159e-20, + 5.66639301667590592e-02, + -4.80635211448494307e-03, + 3.73774197268526333e-04, + -2.39246415987457100e-05, + 1.35616662358083609e-06, + -6.97880051259604242e-08, + 3.31735218545783127e-09, + -1.47308701292392552e-10, + 6.15291188746158675e-12, + -2.43657599805355952e-13, + 9.18138760306680043e-15, + -3.30205592317476125e-16, + 1.13868972029684372e-17, + -3.76721259096403982e-19, + 9.46337511260488332e-03, + -1.53548384554592649e-03, + 1.78035865755750021e-04, + -1.61879157905600738e-05, + 1.24748066392798258e-06, + -8.44160455543823997e-08, + 5.13274728938088365e-09, + -2.84769737577538421e-10, + 1.45745734641415764e-11, + -6.93923642346831190e-13, + 3.09317151761374129e-14, + -1.29743181113215102e-15, + 5.14266850627481261e-17, + -1.93054882283549458e-18, + 9.68586144770995226e-04, + -2.74904184441717564e-04, + 4.71593392395835140e-05, + -5.98656606440910942e-06, + 6.14381763976919960e-07, + -5.34177689196649317e-08, + 4.05174639751307310e-09, + -2.73498092280869380e-10, + 1.66677245370123845e-11, + -9.27149489296234463e-13, + 4.74780520365848638e-14, + -2.25375627819199041e-15, + 9.97401012020856004e-17, + -4.12901292874793212e-18, + 7.93287853526754262e-05, + -3.39088527720763101e-05, + 8.07874091105822177e-06, + -1.34770522506889579e-06, + 1.74002509804248405e-07, + -1.83878589577965010e-08, + 1.64821584123497879e-09, + -1.28449547190732996e-10, + 8.86250845316805276e-12, + -5.48920237681161827e-13, + 3.08568370059416203e-14, + -1.58834304744020980e-15, + 7.54194864457617078e-17, + -3.31875698693940335e-18, +# root=6 base[4]=10.0 */ + 3.18827481866619911e-01, + -6.03195815049238204e-03, + 1.28938061325087252e-04, + -2.97966663859969121e-06, + 6.85041367149113779e-08, + -1.57014186133236208e-09, + 4.13042008838960736e-11, + -6.60597582185885443e-13, + 1.82358506065557928e-14, + -7.59137647247794932e-16, + -2.67049397568455822e-18, + -1.24297230185435746e-19, + 1.84910727760999041e-20, + 2.79346044360133957e-22, + 1.63202778977313168e-01, + -5.32900384731320800e-03, + 2.30205850626734180e-04, + -9.02307408295638983e-06, + 3.27911047001866241e-07, + -1.12268862412911840e-08, + 3.64206201155060692e-10, + -1.15669739183915529e-11, + 3.47222469700969040e-13, + -9.99906592095395937e-15, + 2.95191509416479238e-16, + -8.03463698717538583e-18, + 2.07340346519148988e-19, + -5.84236140631585012e-21, + 4.20100488411195988e-02, + -2.67927115766216284e-03, + 1.81769608736457482e-04, + -1.01518372412932536e-05, + 5.10454571870744344e-07, + -2.35491200676961502e-08, + 1.00871019505559570e-09, + -4.09198029121740293e-11, + 1.56385294493765842e-12, + -5.68557349185710523e-14, + 1.99333645580087330e-15, + -6.65874278717046351e-17, + 2.13799573714822659e-18, + -6.66820231328615778e-20, + 5.29158258853149304e-03, + -6.44158043463991773e-04, + 6.38706006682949258e-05, + -5.03390488505124383e-06, + 3.43640646262803234e-07, + -2.08886559039705501e-08, + 1.15305560310036971e-09, + -5.86829769748726609e-11, + 2.77579083914087017e-12, + -1.22994005188495391e-13, + 5.13692177084674943e-15, + -2.02947504256816389e-16, + 7.61573811078754250e-18, + -2.72016020983090393e-19, + 3.28887784554604697e-04, + -7.43261375670293482e-05, + 1.09966599023506976e-05, + -1.23532140878189378e-06, + 1.14580694929033757e-07, + -9.14040595945251942e-09, + 6.43680550285769047e-10, + -4.07346216640908748e-11, + 2.34613132607048498e-12, + -1.24179473966657122e-13, + 6.08625217718657279e-15, + -2.77903861649323150e-16, + 1.18817420021716971e-17, + -4.77043680507022902e-19, + 1.27486665043532230e-05, + -4.96988531521788296e-06, + 1.10208719693227234e-06, + -1.73629273953878329e-07, + 2.14021372020620018e-08, + -2.17683795105342885e-09, + 1.88975510130737533e-10, + -1.43331008935790546e-11, + 9.66208888689675495e-13, + -5.86542467826475595e-14, + 3.23996054444918595e-15, + -1.64233021597131493e-16, + 7.69316777640203277e-18, + -3.34481371874110856e-19, +# root=6 base[5]=12.5 */ + 2.96559769729653255e-01, + -5.12690877060698481e-03, + 9.88815859409316971e-05, + -2.08639562711147924e-06, + 4.57471005270350350e-08, + -7.60792390254910195e-10, + 2.67466431603570645e-11, + -5.27642805336974828e-13, + -9.53260821801762294e-15, + -6.57090185715639487e-16, + 1.68586757295867374e-17, + 1.09420858488562693e-18, + 2.56189424827427062e-20, + -6.30584116345197438e-22, + 1.44991037279162877e-01, + -3.84571974144156661e-03, + 1.47282676311431897e-04, + -5.18898000811044474e-06, + 1.69875887771945136e-07, + -5.38245178075939009e-09, + 1.54715227359297067e-10, + -4.48920002572752949e-12, + 1.34858116136324508e-13, + -3.17051298314096189e-15, + 8.24032576072390068e-17, + -2.88452656391880580e-18, + 4.70857042041512249e-20, + -1.01687126553872807e-21, + 3.35873766866301091e-02, + -1.60239876943137462e-03, + 9.68063293149483656e-05, + -4.74464110200351739e-06, + 2.11583546293715892e-07, + -8.88991342615114902e-09, + 3.39491758790235808e-10, + -1.25630627012529867e-11, + 4.50853909768321178e-13, + -1.46574878419426065e-14, + 4.74252072497283446e-16, + -1.54291649618715002e-17, + 4.36919210801827490e-19, + -1.28155394660592231e-20, + 3.45402427637573521e-03, + -3.05519864419411728e-04, + 2.63539163702975755e-05, + -1.79359011061269047e-06, + 1.08071416362226813e-07, + -5.90678846615049462e-09, + 2.94021121074663704e-10, + -1.36695344283692310e-11, + 5.96649590798967183e-13, + -2.44116070227756146e-14, + 9.50593494881439030e-16, + -3.52865041704568138e-17, + 1.24240130434052688e-18, + -4.20541944103014978e-20, + 1.44418100385246121e-04, + -2.43715738807830716e-05, + 3.07736134178902285e-06, + -3.00412820390031395e-07, + 2.48229222216219007e-08, + -1.79443297914477116e-09, + 1.15889078457392425e-10, + -6.80096493462977794e-12, + 3.66508818382448217e-13, + -1.82843867018446008e-14, + 8.50430406992626184e-16, + -3.70611362181466567e-17, + 1.51967046055729818e-18, + -5.87932119962650671e-20, + 2.57994127350127131e-06, + -8.61910882473275149e-07, + 1.72220744072318338e-07, + -2.50103314736324385e-08, + 2.89018599895033168e-09, + -2.78932583013581154e-10, + 2.31854466407425399e-11, + -1.69567796854620897e-12, + 1.10833652139056921e-13, + -6.55279054210784860e-15, + 3.53804069031813762e-16, + -1.75819715325471577e-17, + 8.09405839279486434e-19, + -3.46577724479243971e-20, +# root=6 base[6]=15.0 */ + 2.77491967339250301e-01, + -4.42451790222428681e-03, + 7.78317168957591538e-05, + -1.44714826834489239e-06, + 3.55081557720509463e-08, + -3.45228482925283195e-10, + 5.68688759527908722e-12, + -9.74764102333049309e-13, + -8.01375672230387703e-15, + 1.06155220356956529e-15, + 6.01733267597964096e-17, + -2.90110983540143417e-19, + -1.14906448329349519e-19, + -3.54491367378146139e-21, + 1.31626194541458380e-01, + -2.87737438653630885e-03, + 9.83258660457975132e-05, + -3.16554485180482591e-06, + 9.13146847110561402e-08, + -2.77820530391371802e-09, + 7.55512520903842023e-11, + -1.57583712582656188e-12, + 5.49774648552805372e-14, + -1.80114366103707643e-15, + 2.80869525202515610e-18, + -4.81207977098118218e-19, + 7.39482959689951886e-20, + 1.07574739562402069e-21, + 2.84325421484197781e-02, + -1.00926971272586284e-03, + 5.54816866879268369e-05, + -2.43444383184781117e-06, + 9.35143716906356675e-08, + -3.71689222696208716e-09, + 1.30274836730826356e-10, + -3.95160314310466245e-12, + 1.44061343372047034e-13, + -4.79233548822390029e-15, + 1.01407696050970838e-16, + -3.64291186744093245e-18, + 1.54546722730094652e-19, + -1.10461527563710576e-21, + 2.54945979654272632e-03, + -1.58390848263457963e-04, + 1.22685920053622466e-05, + -7.25761023728989655e-07, + 3.79620858098028946e-08, + -1.89499287341237527e-09, + 8.52528497487483417e-11, + -3.53512593181441544e-12, + 1.44497774755663694e-13, + -5.50959301936984835e-15, + 1.92101244583339894e-16, + -6.82367474315634636e-18, + 2.32415951887642443e-19, + -6.82363261662803788e-21, + 8.02091609142491333e-05, + -9.41239587266456864e-06, + 1.02778666307976460e-06, + -8.61208197498668325e-08, + 6.24692169907977015e-09, + -4.06821311496517784e-10, + 2.38534881844151072e-11, + -1.28313766955130354e-12, + 6.42478984510965313e-14, + -2.99469935165438573e-15, + 1.30822095041556666e-16, + -5.40959597956567502e-18, + 2.11222208657113418e-19, + -7.79495567493040015e-21, + 7.13770090953643770e-07, + -1.84331548476049947e-07, + 3.20448290787845413e-08, + -4.15850090200853095e-09, + 4.40167679782111988e-10, + -3.95882655591804103e-11, + 3.10414853858773586e-12, + -2.16263305252530515e-13, + 1.35701479135637054e-14, + -7.74851053974961798e-16, + 4.06069122781402013e-17, + -1.96671748470714290e-18, + 8.85311238544556862e-20, + -3.71732637478430668e-21, +# root=6 base[7]=17.5 */ + 2.60942167579689355e-01, + -3.86219179798217172e-03, + 6.36455631439158357e-05, + -9.36042897564814893e-07, + 2.78102831759948247e-08, + -5.16000365743422733e-10, + -1.68359143647699419e-11, + -2.93007458036049778e-13, + 5.32715828395281370e-14, + 1.35129481091780282e-15, + -8.34174813225920578e-17, + -4.71854039382349626e-18, + 8.18921969831274722e-20, + 1.19083120289333139e-20, + 1.21479556423961216e-01, + -2.22152141815064839e-03, + 6.75570096684519154e-05, + -2.06268902588668855e-06, + 5.10851058498729371e-08, + -1.35461041403290574e-09, + 4.65464351710817858e-11, + -8.08614643628063137e-13, + -3.16290438397271316e-15, + -1.07205394922863033e-15, + 5.27370322050581389e-17, + 1.81066973466348249e-18, + -4.42910409996285241e-20, + -5.50143072015824622e-21, + 2.51278138156887654e-02, + -6.61534689531638356e-04, + 3.32586547374815698e-05, + -1.39309839384549182e-06, + 4.35796271500512917e-08, + -1.53400713233009788e-09, + 6.26032359864987478e-11, + -1.51115421269022760e-12, + 2.40574655683770899e-14, + -2.01784378801122385e-15, + 7.46064004835290509e-17, + 1.21079593808291669e-18, + -4.95681252631228788e-21, + -6.19822848100859332e-21, + 2.06855944562495293e-03, + -8.70468121672368444e-05, + 6.23965365937886204e-06, + -3.36572027537258066e-07, + 1.45830555606576193e-08, + -6.56003405375520124e-10, + 2.91439573097690570e-11, + -1.03344086373449333e-12, + 3.48476265927829727e-14, + -1.47973140034511820e-15, + 5.03360997646975660e-17, + -1.04136324957921159e-18, + 4.40220232245394013e-20, + -2.30725899444430283e-21, + 5.42391863200009726e-05, + -4.08824442571865048e-06, + 4.00771776298219223e-07, + -2.91870302673448880e-08, + 1.80521852860120777e-09, + -1.05578598778125963e-10, + 5.68278942270876255e-12, + -2.74566309374069877e-13, + 1.25600293815648997e-14, + -5.55546451279612332e-16, + 2.25387187303070965e-17, + -8.51193628985905649e-19, + 3.24450509775633039e-20, + -1.16802861110227637e-21, + 2.86700993124422041e-07, + -4.92498560989164560e-08, + 7.33436026238274195e-09, + -8.24110445137198532e-10, + 7.76051764436059616e-11, + -6.38044052458438428e-12, + 4.64106169305008846e-13, + -3.03118176419878727e-14, + 1.80370624824297263e-15, + -9.85120404282212231e-17, + 4.96241784664659592e-18, + -2.32364170289598592e-19, + 1.01755316205603386e-20, + -4.16510682933396448e-22, +# root=6 base[8]=20.0 */ + 2.46450056741052664e-01, + -3.39131855745477672e-03, + 5.46725583535227199e-05, + -5.94630640475733054e-07, + 1.38622197137774814e-08, + -8.11497341627713891e-10, + -1.03330665436693493e-13, + 1.29123750061206118e-12, + 1.65670746579344486e-14, + -3.17176536502655573e-15, + -4.67283675394746134e-17, + 7.10307261660684203e-18, + 1.37427271269424205e-19, + -1.58008773431133555e-20, + 1.13534968457799354e-01, + -1.76788406903298782e-03, + 4.69892876374249056e-05, + -1.40956321136232499e-06, + 3.31816216598935714e-08, + -5.39109110371967693e-10, + 2.01495318223223032e-11, + -1.03746065138366120e-12, + 3.60509607942743851e-15, + 1.23911373708120425e-15, + 2.06280252428685668e-17, + -3.35090621675472176e-18, + -4.41873379144447895e-20, + 7.25993203915400992e-21, + 2.29221843404541423e-02, + -4.52349219639591185e-04, + 1.99401323257969692e-05, + -8.73093265180268070e-07, + 2.47430430272741258e-08, + -4.96963089846252788e-10, + 2.46469766792983671e-11, + -1.27104158034778194e-12, + 9.77056847498836746e-15, + 9.90046408467592372e-16, + 3.62557381997688834e-17, + -3.57301264794543111e-18, + -6.45678859268005422e-20, + 7.08200537987670924e-21, + 1.79917274599261049e-03, + -5.01101163078388208e-05, + 3.26835217093691696e-06, + -1.78279620918778600e-07, + 6.60086967086063196e-09, + -2.14870941864291008e-10, + 1.01765252154697118e-11, + -4.50222797145242666e-13, + 9.66814575964931258e-15, + -1.23180159899146064e-16, + 1.74959119328985729e-17, + -8.96444627287783754e-19, + -8.22436634367388742e-21, + 9.24202048918989546e-22, + 4.26099576903338876e-05, + -1.91468942235372395e-06, + 1.72560122875149144e-07, + -1.17697365437617629e-08, + 6.09102730778597459e-10, + -2.97011343123042635e-11, + 1.53538027607915791e-12, + -7.14861577821566708e-14, + 2.71243468969607410e-15, + -1.03436070330591234e-16, + 4.69438324982959018e-18, + -1.76532831662275258e-19, + 4.16204988963988979e-21, + -1.36662099632647905e-22, + 1.65073367271511216e-07, + -1.58593949488079989e-08, + 2.06807833373170411e-09, + -2.00930902720114556e-10, + 1.61940557651068332e-11, + -1.18419108614536941e-12, + 7.93789316374793133e-14, + -4.79557386762537488e-15, + 2.64053849674487807e-16, + -1.36271495789464509e-17, + 6.60841982028222557e-19, + -2.95365567022991747e-20, + 1.22603756596436859e-21, + -4.91212816891723455e-23, +# root=6 base[9]=22.5 */ + 2.33718121346730701e-01, + -2.97988352343996803e-03, + 4.83649515032879643e-05, + -4.90793204582873591e-07, + 4.01015367117551357e-10, + -4.23170195289068592e-10, + 2.73061740124667545e-11, + 2.36176464496476580e-13, + -6.04387249440426518e-14, + 2.20544740326546077e-16, + 1.37166592124359268e-16, + -2.46447108873967405e-18, + -2.77725233330625300e-19, + 9.47166700096097677e-21, + 1.07119953890115263e-01, + -1.45129837325641900e-03, + 3.29640000198776862e-05, + -9.47754572941666236e-07, + 2.51225402844813010e-08, + -3.51182285193807762e-10, + -1.05911542409622987e-12, + -3.20242502648924274e-13, + 3.14745585082977505e-14, + -2.48275418732564103e-16, + -5.73625756079256988e-17, + 1.21341716914599319e-18, + 1.14691535378054129e-19, + -4.49282222661843239e-21, + 2.13741746233564803e-02, + -3.28609003139971679e-04, + 1.15839270419622763e-05, + -5.35585889036040785e-07, + 1.81699145968039288e-08, + -2.62013768159612059e-10, + -1.01115641246472250e-12, + -4.12551391096878912e-13, + 3.56021311293712660e-14, + -2.51610420248146338e-16, + -6.08697154173000288e-17, + 9.78573559960934696e-19, + 1.36890115927135037e-19, + -4.34572285475166821e-21, + 1.63966640089349518e-03, + -3.09844765729363878e-05, + 1.65360616387197632e-06, + -9.74523412595765662e-08, + 3.89940513103535829e-09, + -8.81267448792926984e-11, + 1.75563101070566213e-12, + -1.51748627318021371e-13, + 8.90997965720380732e-15, + -1.05565912600368133e-16, + -9.07808930348876193e-18, + 4.83513898946622672e-20, + 2.99663243868373419e-20, + -7.38308476442129070e-22, + 3.70050128506496306e-05, + -9.68401276935603463e-07, + 7.51696745477638715e-08, + -5.31217610925737999e-09, + 2.61200094520583381e-10, + -9.52884335261294353e-12, + 3.74147305892450964e-13, + -2.02868657951652835e-14, + 9.34851076636346008e-16, + -2.40122304194274949e-17, + 3.29852472498349021e-19, + -2.97754645444299398e-20, + 2.49524174642848321e-21, + -5.22066156205835057e-23, + 1.23934966404469628e-07, + -5.85482899720777019e-09, + 6.72063254775882834e-10, + -6.06731556606302530e-11, + 4.20157809356675997e-12, + -2.54544855970303012e-13, + 1.51586459046947379e-14, + -8.77917787277270625e-16, + 4.54959462446185659e-17, + -2.07198628760959539e-18, + 9.05459722428778407e-20, + -4.11854789978851776e-21, + 1.78061111941925434e-22, + -6.24125946196110806e-24, +# root=6 base[10]=25.0 */ + 2.22534719670072545e-01, + -2.61682830114286355e-03, + 4.23474946457848758e-05, + -5.17758048219361534e-07, + -1.95991272826744546e-09, + 1.29858005948501884e-10, + 1.35800214845558701e-11, + -8.70579810036109265e-13, + 3.60683448788004110e-16, + 1.78339507023897816e-15, + -5.28827416341216384e-17, + -2.20678287404387531e-18, + 1.75965538079174771e-19, + -5.46026901253224954e-22, + 1.01779077585325367e-01, + -1.22679561634927818e-03, + 2.37625640879455607e-05, + -6.04597343334899567e-07, + 1.76259146164467736e-08, + -3.90674459402535065e-10, + 4.86107030979253787e-13, + 2.63058729666080511e-13, + 1.76305441454920792e-15, + -8.11431544424064951e-16, + 2.46803830626302409e-17, + 8.69293810410620527e-19, + -7.53214008603649586e-20, + 4.21903936111385676e-22, + 2.02108047811700303e-02, + -2.57121216723999282e-04, + 6.71833648328150632e-06, + -2.89964128074001221e-07, + 1.23312927571919826e-08, + -3.17701860027694071e-10, + -4.45194322079288534e-13, + 2.70302616602350714e-13, + 3.17426317307539027e-15, + -9.17717049843597863e-16, + 2.61224083298096617e-17, + 1.04756013882094449e-18, + -8.29259582687961331e-20, + 1.47228940636669200e-22, + 1.53611311361928323e-03, + -2.14968214713900962e-05, + 8.05079469318421906e-07, + -4.78040559909802642e-08, + 2.35794423900825687e-09, + -7.03162243245831009e-11, + 5.43188791552188525e-13, + 2.42331916026587020e-14, + 1.52439183341888744e-15, + -1.98035687584291412e-16, + 5.26164444135150548e-18, + 2.02830460485069456e-19, + -1.53049342159598694e-20, + -5.16828335119342879e-23, + 3.40146805868908841e-05, + -5.63041441816585743e-07, + 3.13877584022151221e-08, + -2.31163457304102912e-09, + 1.28710623520536945e-10, + -4.72462672980063675e-12, + 1.06513161241952157e-13, + -2.61389891596599285e-15, + 2.21045693916182990e-16, + -1.44440016326402801e-17, + 3.92232047021852543e-19, + 5.96549144551101263e-21, + -5.67657041788294079e-22, + -1.30466150456950740e-23, + 1.07883393260773847e-07, + -2.53823072885832405e-09, + 2.26120548344582579e-10, + -2.04979567131048707e-11, + 1.38467349452840583e-12, + -7.17077947572908031e-14, + 3.24830019133839474e-15, + -1.58630708606171548e-16, + 8.64903610358744872e-18, + -4.29391974673922055e-19, + 1.65177824743978270e-20, + -4.92086624401272031e-22, + 1.67865225717233249e-23, + -9.59491724475856444e-25, +# root=6 base[11]=27.5 */ + 2.12705221774807274e-01, + -2.30316030350787406e-03, + 3.60680543945171643e-05, + -5.18299460046831210e-07, + 2.11948107537401027e-09, + 2.07079533645816306e-10, + -4.34320944786676028e-12, + -3.01180586094298760e-13, + 2.18623254842455126e-14, + -3.56523688481874264e-16, + -2.56784659043985715e-17, + 1.68483488581179303e-18, + -2.02321200279242809e-20, + -2.27182234285979365e-21, + 9.72121519475128981e-02, + -1.06149930897583345e-03, + 1.79502062385903494e-05, + -3.82108964481341268e-07, + 1.04717947304480271e-08, + -3.03622345515593034e-10, + 5.76756343608651563e-12, + 6.32076170076985846e-14, + -8.34774135462088369e-15, + 1.38101685595287537e-16, + 1.11908377849713813e-17, + -7.28574682697152065e-19, + 9.42456291048072079e-21, + 9.24432421577882370e-22, + 1.92718850861829175e-02, + -2.14412868608896025e-04, + 4.21784427678955475e-06, + -1.41606952108219116e-07, + 6.44320695426944308e-09, + -2.48351279709835319e-10, + 5.22994375024065379e-12, + 7.39225354143761191e-14, + -8.87278979864104706e-15, + 1.36390045990721043e-16, + 1.29376168173304896e-17, + -8.14545625158537689e-19, + 9.54657459243163929e-21, + 1.10068450449908464e-21, + 1.46014591497074602e-03, + -1.68103940281238565e-05, + 4.14396677374417806e-07, + -2.03575435751236047e-08, + 1.14350421704649270e-09, + -4.85514014082814392e-11, + 1.16505670550427527e-12, + 5.39286051364387369e-15, + -1.36821934333636719e-15, + 1.60191501333161048e-17, + 2.74699396731475089e-18, + -1.61118647345921606e-19, + 1.74587707837262100e-21, + 2.23300468758020360e-22, + 3.21300259487122941e-05, + -3.94250734040924227e-07, + 1.32914449536822773e-08, + -8.84865422396370497e-10, + 5.63538935165501262e-11, + -2.61574465286779942e-12, + 7.63807484421234964e-14, + -7.91023551657400346e-16, + -2.29172921416654516e-17, + -7.18373835654105011e-19, + 1.79321713023891506e-19, + -9.08184453407953996e-21, + 1.07986396667358160e-22, + 1.09462257959049034e-23, + 1.00206203303379593e-07, + -1.42374363595991668e-09, + 7.63733501485559886e-11, + -6.67331325490090561e-12, + 4.85140965273366494e-13, + -2.63591574608127959e-14, + 1.06969461731448771e-15, + -3.46095822308372676e-17, + 1.21539742889179082e-18, + -6.55255400049623026e-20, + 3.81729839065123128e-21, + -1.64873541299350593e-22, + 4.20618208355673545e-24, + -1.84464823871358904e-26, +# root=6 base[12]=30.0 */ + 2.04031449925086705e-01, + -2.03864890709769091e-03, + 3.01654238269362339e-05, + -4.58559642677450092e-07, + 4.87824491672676101e-09, + 6.48642377723334902e-11, + -5.61534021180903146e-12, + 1.12591931625598179e-13, + 4.13865904663402386e-15, + -3.83932971997865546e-16, + 1.15957611565295280e-17, + 6.27832780195026035e-20, + -2.09242487500923399e-20, + 8.60789544856893511e-22, + 9.32277933206452913e-02, + -9.33802155704284063e-04, + 1.41946679796442031e-05, + -2.55482028041275446e-07, + 5.79726648960728490e-09, + -1.67805737775807037e-10, + 4.85550504417387669e-12, + -8.86639428763574138e-14, + -1.16846038969691470e-15, + 1.55934531704635577e-16, + -4.83201884352635887e-18, + -2.84740659785654948e-20, + 8.90057072030791585e-21, + -3.65313400850289203e-22, + 1.84729910922195213e-02, + -1.86046457107522366e-04, + 2.99599560666382622e-06, + -7.12246092998118135e-08, + 2.76052821244734192e-09, + -1.23478178257979970e-10, + 4.43117213055531915e-12, + -8.86704075292012404e-14, + -1.24640454795432972e-15, + 1.68134257915583615e-16, + -5.24147715709339537e-18, + -3.55452984783299836e-20, + 1.01157547430522899e-20, + -4.13704874049837837e-22, + 1.39834168130508027e-03, + -1.42253442316884489e-05, + 2.52711099814696148e-07, + -8.33631067286328695e-09, + 4.42792271912641504e-10, + -2.27342478716691464e-11, + 8.72555478972469948e-13, + -1.93326235915072709e-14, + -1.30394120391843243e-16, + 2.86976439307023357e-17, + -9.16550123363206918e-19, + -8.93531514485037408e-21, + 2.00896384041025550e-21, + -8.14650337112295882e-23, + 3.07155966834422048e-05, + -3.18436689416308215e-07, + 6.65516022469341385e-09, + -3.11100707882137993e-10, + 2.01716616626763468e-11, + -1.12253650378554964e-12, + 4.60934470133910528e-14, + -1.19502177420338412e-15, + 5.98586367863862200e-18, + 9.42892356075460953e-19, + -3.13580124186392977e-20, + -7.80159302953971192e-22, + 1.07954279044569545e-22, + -4.29735015376456050e-24, + 9.53692199992405978e-08, + -1.03350756837758057e-09, + 2.92339832156963313e-11, + -2.00399223567011079e-12, + 1.52541560014466923e-13, + -9.33558225026451267e-15, + 4.34843817304162110e-16, + -1.48799734170480102e-17, + 3.48705305119131060e-19, + -5.65657432937246181e-21, + 2.27948744002431492e-22, + -2.20616990780280009e-23, + 1.41067155117544406e-24, + -5.49438743446810182e-26, +# root=6 base[13]=32.5 */ + 1.96326601087425251e-01, + -1.81795253457434037e-03, + 2.51533931595432631e-05, + -3.76243473565999894e-07, + 5.11772268848147938e-09, + -2.67852916388575571e-11, + -2.07878219514763353e-12, + 1.06865143025256184e-13, + -2.34991057547728476e-15, + -2.81639718586678100e-17, + 4.60487905631852443e-18, + -1.90126436842051415e-19, + 3.21348016299546145e-21, + 9.14080295528672377e-23, + 8.97022191839739053e-02, + -8.31149329751513415e-04, + 1.15928087048302952e-05, + -1.84109634878487643e-07, + 3.40081190736685167e-09, + -8.13946358191546307e-11, + 2.43954831646046310e-12, + -7.09016501268228192e-14, + 1.38115123450353704e-15, + 7.27893634206102777e-18, + -1.91612048778581254e-18, + 8.02636060822499044e-20, + -1.33897823769861146e-21, + -3.95270164668887961e-23, + 1.77721827444455548e-02, + -1.64900870228696771e-04, + 2.34115896831428601e-06, + -4.19020157731475025e-08, + 1.14861760654906102e-09, + -4.72432847224344849e-11, + 2.02369289178028918e-12, + -6.94461965445986206e-14, + 1.47112460744017386e-15, + 6.46626559412313758e-18, + -2.06119877724492153e-18, + 8.84277450833473510e-20, + -1.50281164527314841e-21, + -4.41904113471381837e-23, + 1.34498279281495907e-03, + -1.25114359374233509e-05, + 1.83362874202136040e-07, + -3.93407947279241207e-09, + 1.54375005911741884e-10, + -8.05437521495743800e-12, + 3.79201849141792842e-13, + -1.36667269775964884e-14, + 3.10728094980673076e-16, + 9.82159116623477464e-21, + -3.58679231958696435e-19, + 1.62320314998813524e-20, + -2.79824805622561345e-22, + -8.65629796691126143e-24, + 2.95306114285872142e-05, + -2.76011079991821045e-07, + 4.28280439319020903e-09, + -1.18529064587527783e-10, + 6.28488638982073460e-12, + -3.73871358382086480e-13, + 1.86261466878929965e-14, + -7.06922153152746964e-16, + 1.79451284791048504e-17, + -1.30175759404888336e-19, + -1.29581948317953815e-20, + 6.75789995531718737e-22, + -1.15295229318197387e-23, + -4.58795211949538967e-25, + 9.15943818392107288e-08, + -8.65460477206468688e-10, + 1.51684066475900291e-11, + -6.11004856595530566e-13, + 4.22904774960527685e-14, + -2.79354343779766858e-15, + 1.49697420653988191e-16, + -6.27330388949792357e-18, + 1.95988221012834968e-19, + -3.92766267365059463e-21, + 1.54504334010729772e-23, + 1.56499215975562950e-24, + 8.34044433647087380e-27, + -6.15065030653207155e-27, +# root=6 base[14]=35.0 */ + 1.89430545484684937e-01, + -1.63344696195144427e-03, + 2.11057191217018011e-05, + -3.00494174416677331e-07, + 4.28107245185564192e-09, + -4.92825001717241998e-11, + -1.18335027041126256e-13, + 3.76349002239133096e-14, + -1.60769193762311766e-15, + 3.85657989156692476e-17, + -1.20917739803204397e-19, + -3.76949253183923671e-20, + 1.99743894127344758e-21, + -5.59045279749672421e-23, + 8.65502796501378818e-02, + -7.46425141691508349e-04, + 9.66492580839525608e-06, + -1.40124635328985709e-07, + 2.22300210201168601e-09, + -4.18129953184992960e-11, + 1.04082616375236349e-12, + -3.16557843351382560e-14, + 9.23063280865635270e-16, + -1.96719087461431504e-17, + 8.41211019337880345e-20, + 1.59487989382111009e-20, + -8.50924948832740504e-22, + 2.35681625404124074e-23, + 1.71472177004048931e-02, + -1.47928033777847460e-04, + 1.92439079548154449e-06, + -2.90110950171153443e-08, + 5.58799314334437474e-10, + -1.68802615009917442e-11, + 6.96975616457905464e-13, + -2.83575960651389482e-14, + 9.43026110931084610e-16, + -2.15837452125573027e-17, + 1.19201599520054192e-19, + 1.68085066949718948e-20, + -9.34281731767230752e-22, + 2.65152106405476288e-23, + 1.29761835834521630e-03, + -1.12009749412398167e-05, + 1.46951454857113919e-07, + -2.36891837738081029e-09, + 5.88449021737156961e-11, + -2.49088571154660331e-12, + 1.22848354729527188e-13, + -5.35373192966712986e-15, + 1.84793374248334182e-16, + -4.43804903865919385e-18, + 3.53937710849729879e-20, + 2.85253996518533271e-21, + -1.72017318607757708e-22, + 5.04570382804422422e-24, + 2.84879112924540481e-05, + -2.46167977349756216e-07, + 3.27997563062785806e-09, + -5.91447820572150715e-11, + 1.98243370495247914e-12, + -1.06153189042398858e-13, + 5.73564349395024664e-15, + -2.60827826270753192e-16, + 9.37191510928468737e-18, + -2.42530298676015645e-19, + 2.95076287418667057e-21, + 9.66700444154023598e-23, + -7.31984090946823839e-24, + 2.29453782649296123e-25, + 8.83407304533530603e-08, + -7.65166731159709150e-10, + 1.05488095267652554e-11, + -2.34697035819993708e-13, + 1.12527980216194452e-14, + -7.23299869331184262e-16, + 4.21318237760004839e-17, + -2.03035607021430774e-18, + 7.88395667037039591e-20, + -2.36432204664954833e-21, + 4.78506719956893201e-23, + -2.26139014420048425e-25, + -2.71460214777288397e-26, + 1.09463443554744648e-27, +# root=6 base[15]=37.5 */ + 1.83213157219807243e-01, + -1.47793498081207173e-03, + 1.78785071721924207e-05, + -2.39767190574388930e-07, + 3.32747255790674348e-09, + -4.40959248353651779e-11, + 4.05117729377374263e-13, + 5.53478517351237896e-15, + -5.16062304605399082e-16, + 1.99439924719061234e-17, + -5.05462484118614544e-19, + 5.93305195975484954e-21, + 1.92562911029201297e-22, + -1.48427741060601401e-23, + 8.37093478046417178e-02, + -6.75283079177584349e-04, + 8.17294193421432982e-06, + -1.10138713279752148e-07, + 1.57938032804617479e-09, + -2.47397799760525581e-11, + 4.71274532007298856e-13, + -1.19859066458198495e-14, + 3.63407679769915549e-16, + -1.05549000759445199e-17, + 2.41132422876206526e-19, + -2.73295690111998487e-21, + -8.33769805149129464e-23, + 6.39468592594217627e-24, + 1.65842777905757556e-02, + -1.33794321293429077e-04, + 1.62109646511790086e-06, + -2.20795756501512395e-08, + 3.38929727159434297e-10, + -6.93217653668077098e-12, + 2.20467003602996602e-13, + -8.85652172474998659e-15, + 3.41580006375875103e-16, + -1.10410628220131212e-17, + 2.67501435642215710e-19, + -3.32736798121984864e-21, + -8.22944420675851271e-23, + 6.92123148543592679e-24, + 1.25500430215113603e-03, + -1.01260213396333864e-05, + 1.22934282405183449e-07, + -1.70645444148423867e-09, + 2.92441937678372966e-11, + -8.07125487124570705e-13, + 3.45160600661160514e-14, + -1.58934245677860826e-15, + 6.46269434957736211e-17, + -2.15122418156969520e-18, + 5.39192860866149005e-20, + -7.48971876094339133e-22, + -1.23739324190230598e-23, + 1.25366102675664610e-24, + 2.75518212516570395e-05, + -2.22350843476988304e-07, + 2.70919381210028110e-09, + -3.88987711147992443e-11, + 7.88633244982600690e-13, + -2.93855339835069357e-14, + 1.50539389618877442e-15, + -7.41763800447567412e-17, + 3.11959703998805326e-18, + -1.07200444696012155e-19, + 2.83024722393144603e-21, + -4.63782399141004650e-23, + -2.49871782181194749e-25, + 5.16620047469521000e-26, + 8.54342328508637898e-08, + -6.89801676966465313e-10, + 8.47088629524659081e-12, + -1.30523881110805836e-13, + 3.47881597561554612e-15, + -1.75487069995342568e-16, + 1.02467152697940025e-17, + -5.34951972468915106e-19, + 2.35879290048154877e-20, + -8.61784359481772183e-22, + 2.52738577157001204e-23, + -5.42662984871681915e-25, + 5.39431063431365743e-27, + 1.73138118069044914e-28, +# root=6 base[16]=40.0 */ + 1.76022446455379983e-01, + -2.09683890658592977e-03, + 3.74642734440892023e-05, + -7.43464672719161699e-07, + 1.54488400994005441e-08, + -3.25070776020737861e-10, + 6.46853172698656097e-12, + -8.98362798477311900e-14, + -1.74279376993770363e-15, + 2.58270519433866733e-16, + -1.62141000630941990e-17, + 7.36650503671982647e-19, + -2.36753250447090994e-20, + 3.08804959097316361e-22, + 8.04238973768299642e-02, + -9.58040646175089736e-04, + 1.71185964908443390e-05, + -3.39983373278921449e-07, + 7.10818278336533193e-09, + -1.55062439629888935e-10, + 3.65715809971408576e-12, + -1.03718604344980433e-13, + 3.91612883002722143e-15, + -1.81051836453672367e-16, + 8.45884676053157650e-18, + -3.44485273553426133e-19, + 1.05065857264614835e-20, + -1.28292131313646367e-22, + 1.59333537654981414e-02, + -1.89806021184870581e-04, + 3.39206797186118143e-06, + -6.74865109002212529e-08, + 1.43000078917250323e-09, + -3.35910711436588108e-11, + 1.03355010430370019e-12, + -4.82484760710756096e-14, + 2.86798189263383278e-15, + -1.69399917565999497e-16, + 8.81671175849950045e-18, + -3.78604225354044751e-19, + 1.20576386019657163e-20, + -1.70839146198848597e-22, + 1.20574345610716636e-03, + -1.43636485922292318e-05, + 2.56770496540299383e-07, + -5.12464477760214898e-09, + 1.11182167982735689e-10, + -2.93575664676932544e-12, + 1.20856142382324406e-13, + -7.50091265318619278e-15, + 5.10310046086191352e-16, + -3.17444308200071517e-17, + 1.69465024246810297e-18, + -7.43693498358197887e-20, + 2.45387261521889097e-21, + -4.07076019560555589e-23, + 2.64702673240697160e-05, + -3.15341237416017165e-07, + 5.64009204945927446e-09, + -1.13202350849068115e-10, + 2.55918949858014230e-12, + -8.02976103252864129e-14, + 4.38783353884191699e-15, + -3.23269508436706322e-16, + 2.34737613398323706e-17, + -1.50449405100713331e-18, + 8.22410202319716188e-20, + -3.72051257069590505e-21, + 1.29963736358663559e-22, + -2.67757080920812446e-24, + 8.20798114083532145e-08, + -9.77878801943505898e-10, + 1.75091476810250376e-11, + -3.55651792716726237e-13, + 8.73259854629563561e-15, + -3.57673472249479636e-16, + 2.57594713273001116e-17, + -2.14231847616843653e-18, + 1.63776811610110542e-19, + -1.08955020149764868e-20, + 6.21441718918669615e-22, + -2.99018952509532349e-23, + 1.16821695026344758e-24, + -3.30516336223499040e-26, +# root=6 base[17]=44.0 */ + 1.68183360433110274e-01, + -1.82905267513910940e-03, + 2.98361236353812165e-05, + -5.40751894605543175e-07, + 1.02878078525515759e-08, + -2.00953660128172264e-10, + 3.95940192631831887e-12, + -7.56037755356436447e-14, + 1.19707478341228773e-15, + -1.19747695079286667e-18, + -1.34353505173659513e-18, + 9.64492075919426464e-20, + -4.89471403230059585e-21, + 1.98726691640230108e-22, + 7.68422464323693932e-02, + -8.35686440651392309e-04, + 1.36320722538970887e-05, + -2.47085176269074463e-07, + 4.70361306915362536e-09, + -9.22555864971366318e-11, + 1.85964491657280787e-12, + -3.94398016738695834e-14, + 9.52552245195648408e-16, + -2.96106279447245938e-17, + 1.19710364872732357e-18, + -5.40299804058121863e-20, + 2.34458106181438092e-21, + -8.91954487788058123e-23, + 1.52237645230947558e-02, + -1.65563886873879078e-04, + 2.70078027969769275e-06, + -4.89596116758551935e-08, + 9.33239901363264729e-10, + -1.84694787653159533e-11, + 3.90533315152703648e-13, + -9.95794883415828092e-15, + 3.66851751748371126e-16, + -1.86740257150183225e-17, + 1.03850812611391838e-18, + -5.43364343223918980e-20, + 2.51614470246124449e-21, + -9.91110807896803843e-23, + 1.15204550335268829e-03, + -1.25289199726821229e-05, + 2.04383733984038167e-07, + -3.70602581040914837e-09, + 7.08072414595315969e-11, + -1.42364306600641168e-12, + 3.25563793462789928e-14, + -1.04627770066821620e-15, + 5.22151224027538354e-17, + -3.18287944130097581e-18, + 1.90191048569668221e-19, + -1.02487228396715379e-20, + 4.82783443250706108e-22, + -1.93315274630519432e-23, + 2.52913958801559194e-05, + -2.75053757223080091e-07, + 4.48710441208753084e-09, + -8.14007585209271716e-11, + 1.56168035610638306e-12, + -3.22735401930560150e-14, + 8.33480180954014905e-16, + -3.46447560935726120e-17, + 2.13138658122861772e-18, + -1.42000185524045277e-19, + 8.78786085839031439e-21, + -4.83112831369693237e-22, + 2.31845063221977138e-23, + -9.50979933631602001e-25, + 7.84242383182626155e-08, + -8.52897150735796431e-10, + 1.39148194425702027e-11, + -2.52668258937560172e-13, + 4.88895317966430430e-15, + -1.06724485811971749e-16, + 3.37044131105188071e-18, + -1.86008899490016394e-19, + 1.33694974168836275e-20, + -9.46776011972762227e-22, + 6.05468712375227267e-23, + -3.42676806257338791e-24, + 1.70272470064289983e-25, + -7.33292787804619563e-27, +# root=6 base[18]=48.0 */ + 1.61307016637013578e-01, + -1.61379666528636118e-03, + 2.42170403098847183e-05, + -4.03781290902274213e-07, + 7.06886093222566027e-09, + -1.27266038650651576e-10, + 2.33125662587023275e-12, + -4.30267596613683963e-14, + 7.82847463281512324e-16, + -1.30014863615768861e-17, + 1.30796920152294419e-19, + 4.16359452697477047e-21, + -4.16338774293540938e-22, + 2.28856932274206999e-23, + 7.37004744903655556e-02, + -7.37336690210967376e-04, + 1.10646643609239736e-05, + -1.84486868303690191e-07, + 3.22990544856835453e-09, + -5.81725747559590797e-11, + 1.06818509835092287e-12, + -1.99696288416787020e-14, + 3.85082523315025870e-16, + -8.05168142897450998e-18, + 2.03247007980652377e-19, + -6.74862269133794984e-21, + 2.73720634345840688e-22, + -1.16169124511624575e-23, + 1.46013255654887739e-02, + -1.46079024490879751e-04, + 2.19210111195445669e-06, + -3.65504179163510568e-08, + 6.39974666682645541e-10, + -1.15359338645990285e-11, + 2.12946959344114975e-13, + -4.09151701438469758e-15, + 8.82330629605201067e-17, + -2.51745906809788173e-18, + 1.03114777308287738e-19, + -5.13813221720930085e-21, + 2.58842896508643615e-22, + -1.20811865638002782e-23, + 1.10494294169450908e-03, + -1.10544070520782889e-05, + 1.65885620403789293e-07, + -2.76597663166226750e-09, + 4.84395594866998895e-11, + -8.74437117318014863e-13, + 1.62919189599803898e-14, + -3.27833867877755647e-16, + 8.29211900713982360e-18, + -3.15815538853936349e-19, + 1.63863543590426399e-20, + -9.11063145436649358e-22, + 4.79005891359860624e-23, + -2.27929720459596975e-24, + 2.42573304601999097e-05, + -2.42682604945716385e-07, + 3.64177337695103883e-09, + -6.07248674675337750e-11, + 1.06379999370846625e-12, + -1.92533188699384440e-14, + 3.64528828254193568e-16, + -7.90653196937845965e-18, + 2.45404919728434115e-19, + -1.18885070155046803e-20, + 7.02254319008091658e-22, + -4.10624118369304789e-23, + 2.20784598170358639e-24, + -1.06647846209422064e-25, + 7.52177757747004728e-08, + -7.52516824948013791e-10, + 1.12925602575747241e-11, + -1.88310143909861099e-13, + 3.30104540388914570e-15, + -6.00553628923540282e-17, + 1.17392193703402004e-18, + -2.90752738835455207e-20, + 1.17363778788041462e-21, + -6.96345932771089427e-23, + 4.48283961291409845e-24, + -2.72010360158254874e-25, + 1.49851638893692462e-26, + -7.41187402427848537e-28, +# root=6 base[19]=52.0 */ + 1.55211097268809189e-01, + -1.43769465338954082e-03, + 1.99751192021575959e-05, + -3.08365955102649639e-07, + 4.99839802351946273e-09, + -8.33341865046186094e-11, + 1.41495729619003409e-12, + -2.43237211077573203e-14, + 4.21009457613781462e-16, + -7.25449783830464458e-18, + 1.19946924578590118e-19, + -1.64324715518946091e-21, + 2.67617149388533620e-24, + 1.26890073923994052e-24, + 7.09152754208112746e-02, + -6.56876435954993924e-04, + 9.12654528676906351e-06, + -1.40891109374261414e-07, + 2.28375484244401570e-09, + -3.80763084568028812e-11, + 6.46647716022548708e-13, + -1.11303888194485231e-14, + 1.93922105485744721e-16, + -3.44124121772503037e-18, + 6.39139548706012277e-20, + -1.33721795091965273e-21, + 3.51973001479824861e-23, + -1.19462121332642370e-24, + 1.40495299467594814e-02, + -1.30138466203449536e-04, + 1.80812492289597100e-06, + -2.79129599832581659e-08, + 4.52454595870241950e-10, + -7.54412087767157898e-12, + 1.28181020969793899e-13, + -2.21246663662635080e-15, + 3.90970866008589137e-17, + -7.36747710466151369e-19, + 1.66239440368431530e-20, + -5.20478435847513759e-22, + 2.18157150831450046e-23, + -1.01406775932328358e-24, + 1.06318627476281128e-03, + -9.84811819409311129e-06, + 1.36828331918004510e-07, + -2.11229217359827155e-09, + 3.42396035903350150e-11, + -5.70968200407306996e-13, + 9.70916808333961770e-15, + -1.68405867756013308e-16, + 3.04927724761509317e-18, + -6.31297383980310182e-20, + 1.79154566220730017e-21, + -7.39495951954231252e-23, + 3.66783101657923581e-24, + -1.82951990034130693e-25, + 2.33406267363260079e-05, + -2.16200356808104251e-07, + 3.00385690767043615e-09, + -4.63722372715170368e-11, + 7.51696388598217218e-13, + -1.25375081295571887e-14, + 2.13499264923789777e-16, + -3.73455215646953565e-18, + 7.04276806518660206e-20, + -1.67126955296730679e-21, + 6.01040105570436667e-23, + -2.97901789599406346e-24, + 1.60285079943533089e-25, + -8.25684020201717286e-27, + 7.23752362515929063e-08, + -6.70399823720297750e-10, + 9.31444172509124092e-12, + -1.43792849221312109e-13, + 2.33099102297127837e-15, + -3.88935641798532913e-17, + 6.64172273668306951e-19, + -1.18126319433066482e-20, + 2.40228586074958369e-22, + -6.99061096305730983e-24, + 3.19647223441576355e-25, + -1.80557730940657757e-26, + 1.02415526107601992e-27, + -5.41393516562440192e-29, +# root=6 base[20]=56.0 */ + 1.49758250952601563e-01, + -1.29145143001406200e-03, + 1.67049772529205251e-05, + -2.40086917181961114e-07, + 3.62309132190676653e-09, + -5.62371851906622633e-11, + 8.89064630993442439e-13, + -1.42372565337954255e-14, + 2.30123616007187252e-16, + -3.74237408384484610e-18, + 6.08824228567058219e-20, + -9.74034190896655658e-22, + 1.44355894838251842e-23, + -1.50749414895907873e-25, + 6.84238936493710842e-02, + -5.90058542629264514e-04, + 7.63243147455660526e-06, + -1.09694670449135248e-07, + 1.65537505188425085e-09, + -2.56945842248959818e-11, + 4.06217316372064631e-13, + -6.50576773040551278e-15, + 1.05221244775344084e-16, + -1.71648949157834207e-18, + 2.83122936687004875e-20, + -4.78396265967184717e-22, + 8.63013867257197469e-24, + -1.81526665839252030e-25, + 1.35559445715016484e-02, + -1.16900697575553428e-04, + 1.51211532590085035e-06, + -2.17323927554731540e-08, + 3.27958297239246189e-10, + -5.09056223834694788e-12, + 8.04818513603041684e-14, + -1.28926005091808772e-15, + 2.08800847376378051e-17, + -3.42921677657868808e-19, + 5.82333499023892130e-21, + -1.09228268384310124e-22, + 2.59256394258035956e-24, + -8.49408520680878446e-26, + 1.02583461965432068e-03, + -8.84636124162078200e-06, + 1.14428046530115536e-07, + -1.64458051978375241e-09, + 2.48179877750431431e-11, + -3.85227311135227800e-13, + 6.09082422947959306e-15, + -9.76107344706993304e-17, + 1.58458220927228265e-18, + -2.63297349119778696e-20, + 4.69215963666540286e-22, + -1.01972646748543891e-23, + 3.14602972874534842e-25, + -1.30226732839296487e-26, + 2.25206283387847854e-05, + -1.94208315747325462e-07, + 2.51209256814541167e-09, + -3.61042513147748466e-11, + 5.44841722740046858e-13, + -8.45720022820752205e-15, + 1.33730801680054952e-16, + -2.14466851779310458e-18, + 3.49573906242145293e-20, + -5.92456803201487455e-22, + 1.13915667251654132e-23, + -2.98080609610519408e-25, + 1.14838995312406217e-26, + -5.42519798523527368e-28, + 6.98325633986986237e-08, + -6.02206311642228899e-10, + 7.78956355222262927e-12, + -1.11953047266428878e-13, + 1.68946445307429787e-15, + -2.62250526196824545e-17, + 4.14772427935432818e-19, + -6.66095711118523578e-21, + 1.09433023458638134e-22, + -1.92562890554634089e-24, + 4.20769958941287205e-26, + -1.38854912414465567e-27, + 6.45661124357068885e-29, + -3.32610694914451817e-30, +# root=6 base[21]=60.0 */ + 1.44842765564677706e-01, + -1.16842886872401590e-03, + 1.41380524051439374e-05, + -1.90078077465476082e-07, + 2.68326044581293689e-09, + -3.89607749476972683e-11, + 5.76183462030275769e-13, + -8.63169639571024468e-15, + 1.30550302412348497e-16, + -1.98890301189516228e-18, + 3.04616073563424165e-20, + -4.67651824516429016e-22, + 7.14103073361860493e-24, + -1.05760257333572785e-25, + 6.61780297501618903e-02, + -5.33850069308153068e-04, + 6.45961466611690791e-06, + -8.68458471366894354e-08, + 1.22597004561330185e-09, + -1.78010111515475481e-11, + 2.63256045802782450e-13, + -3.94382129051804656e-15, + 5.96514567540374266e-17, + -9.09031401069817432e-19, + 1.39417374566357677e-20, + -2.15337280658185149e-22, + 3.36835054623956086e-24, + -5.44159503376394121e-26, + 1.31110004896905687e-02, + -1.05764836858522108e-04, + 1.27976023733697245e-06, + -1.72056489279595196e-08, + 2.42885658241221779e-10, + -3.52668608451633889e-12, + 5.21556692538535262e-14, + -7.81354264404337823e-16, + 1.18195166486084814e-17, + -1.80228052560584968e-19, + 2.77240980775584066e-21, + -4.33813742068406621e-23, + 7.12923042169702085e-25, + -1.34151643669865552e-26, + 9.92163853257411023e-04, + -8.00366441598548758e-06, + 9.68447716518320682e-08, + -1.30202290898336727e-09, + 1.83801672782423178e-11, + -2.66879121035695535e-13, + 3.94685446360870872e-15, + -5.91303904147410351e-17, + 8.94634715371738793e-19, + -1.36561844427932742e-20, + 2.11162221635995854e-22, + -3.37812259915731782e-24, + 6.00047559836792338e-26, + -1.36604731054249265e-27, + 2.17814382184216266e-05, + -1.75708197216730983e-07, + 2.12607867563731718e-09, + -2.85839195033678277e-11, + 4.03508461945054337e-13, + -5.85892763363229856e-15, + 8.66478288439480921e-17, + -1.29819421343836710e-18, + 1.96479137799949125e-20, + -3.00459927450410734e-22, + 4.68704387365303119e-24, + -7.77641556052877639e-26, + 1.54732990595185845e-27, + -4.33852677707172229e-29, + 6.75404630107287641e-08, + -5.44840651751612594e-10, + 6.59260131449487646e-12, + -8.86337788840696495e-14, + 1.25120996187861375e-15, + -1.81675488493876351e-17, + 2.68683899148061274e-19, + -4.02593001539597398e-21, + 6.09698015535911862e-23, + -9.35617597984871642e-25, + 1.48427617468548742e-26, + -2.63006257502592752e-28, + 6.20641553863837926e-30, + -2.17313649376180227e-31, +# root=6 base[22]=64.0 */ + 1.40381770978469017e-01, + -1.06377306549716570e-03, + 1.20912223871463973e-05, + -1.52702743705185033e-07, + 2.02493897422011377e-09, + -2.76191989032476858e-11, + 3.83688599083309502e-13, + -5.39946010707477475e-15, + 7.67144084157129567e-17, + -1.09800544483322131e-18, + 1.58072969943632143e-20, + -2.28603212500891183e-22, + 3.31585603245028906e-24, + -4.80615280427210786e-26, + 6.41398207219741057e-02, + -4.86033287899767421e-04, + 5.52442693105578428e-06, + -6.97692195872225127e-08, + 9.25185812665587182e-10, + -1.26190919781441774e-11, + 1.75305665713016969e-13, + -2.46699135755547983e-15, + 3.50506307324304627e-17, + -5.01687267355063232e-19, + 7.22334202358359462e-21, + -1.04523390639337394e-22, + 1.51992184473911315e-24, + -2.22519330190525986e-26, + 1.27071963923551991e-02, + -9.62915139619247132e-05, + 1.09448353890419630e-06, + -1.38224766695883435e-08, + 1.83295146533456201e-10, + -2.50005816922921354e-12, + 3.47310588069160376e-14, + -4.88753863594003346e-16, + 6.94419458874984010e-18, + -9.93985552920950632e-20, + 1.43152080847323005e-21, + -2.07403132122884934e-23, + 3.03237537205122992e-25, + -4.53448400770920542e-27, + 9.61606320330054306e-04, + -7.28677873237754184e-06, + 8.28241144639108306e-08, + -1.04600421051717632e-09, + 1.38707049442773475e-11, + -1.89189789180593289e-13, + 2.62824418414466132e-15, + -3.69861189530958520e-17, + 5.25504493242364260e-19, + -7.52265037767544936e-21, + 1.08388562442090190e-22, + -1.57376973151050306e-24, + 2.32258515445137943e-26, + -3.59778895938605082e-28, + 2.11105943720328160e-05, + -1.59970069711313395e-07, + 1.81827661458517323e-09, + -2.29634208291327014e-11, + 3.04510089780339476e-13, + -4.15337233965594093e-15, + 5.76991038177153586e-17, + -8.11976722112848409e-19, + 1.15369589479346301e-20, + -1.65176040915155288e-22, + 2.38171600896250746e-24, + -3.47088739293094719e-26, + 5.20326169413087471e-28, + -8.52411571260265474e-30, + 6.54602925674841943e-08, + -4.96039447341367795e-10, + 5.63816049253027287e-12, + -7.12055861662823933e-14, + 9.44232993478610170e-16, + -1.28788885875216187e-17, + 1.78915072082173629e-19, + -2.51781706588215246e-21, + 3.57759298189342382e-23, + -5.12344959051671467e-25, + 7.39831735438573902e-27, + -1.08569940734619786e-28, + 1.67574423849347678e-30, + -3.01933590679997749e-32, +# root=6 base[23]=68.0 */ + 1.36309258899767999e-01, + -9.73861201703823151e-04, + 1.04364462558011597e-05, + -1.24269302596888179e-07, + 1.55368739107698171e-09, + -1.99800931328276389e-11, + 2.61697812870895120e-13, + -3.47221346581261532e-15, + 4.65123803964489316e-17, + -6.27675961398285301e-19, + 8.52016251087556218e-21, + -1.16204935672588444e-22, + 1.59103972374320176e-24, + -2.18441629093247454e-26, + 6.22791076621849807e-02, + -4.44952948306585091e-04, + 4.76836691228472609e-06, + -5.67781039822294347e-08, + 7.09873012929552802e-10, + -9.12881767437622034e-12, + 1.19568593233620422e-13, + -1.58643929246360406e-15, + 2.12513102966490588e-17, + -2.86782952920417566e-19, + 3.89286843022743046e-21, + -5.30966875248960217e-23, + 7.27149485361501792e-25, + -9.99332606214037772e-27, + 1.23385572846306368e-02, + -8.81527954996635840e-05, + 9.44695107394696992e-07, + -1.12487142927678576e-08, + 1.40637995055402080e-10, + -1.80857504454830211e-12, + 2.36885852381667980e-14, + -3.14300804527661104e-16, + 4.21025087523299645e-18, + -5.68168406505956745e-20, + 7.71262347428988897e-22, + -1.05207135034584756e-23, + 1.44150833014727972e-25, + -1.98534531899614496e-27, + 9.33709868196673748e-04, + -6.67088810858683417e-06, + 7.14890018228123870e-08, + -8.51236923205109475e-10, + 1.06426611161163666e-11, + -1.36862384315748617e-13, + 1.79261364463457349e-15, + -2.37844503199304732e-17, + 3.18607497632670631e-19, + -4.29959605002640485e-21, + 5.83670338293899530e-23, + -7.96322521783609036e-25, + 1.09202783108944742e-26, + -1.50959890888837359e-28, + 2.04981704798889025e-05, + -1.46449134104338233e-07, + 1.56943157260626061e-09, + -1.86876032536150926e-11, + 2.33643329037246480e-13, + -3.00460409436470507e-15, + 3.93540887704467305e-17, + -5.22151306974435042e-19, + 6.99455185271656818e-21, + -9.43921413213443755e-23, + 1.28144757464191118e-24, + -1.74885575627774578e-26, + 2.40174563045905522e-28, + -3.34086931572689788e-30, + 6.35612722723389628e-08, + -4.54113370556025757e-10, + 4.86653516698969122e-12, + -5.79470172575559377e-14, + 7.24487449813965231e-16, + -9.31675633996135382e-18, + 1.22030211036862219e-19, + -1.61910133796411477e-21, + 2.16889617356059318e-23, + -2.92699959840770946e-25, + 3.97406006435355317e-27, + -5.42668779737063224e-29, + 7.47292289890625900e-31, + -1.05169118117257074e-32, +# root=6 base[24]=72.0 */ + 1.32571911948254961e-01, + -8.95940260533929517e-04, + 9.08220358887372628e-06, + -1.02296140967847000e-07, + 1.20980647961315929e-09, + -1.47165729509758238e-11, + 1.82333391302587271e-13, + -2.28838709971075017e-15, + 2.89967049995636781e-17, + -3.70145841797682425e-19, + 4.75274078706590461e-21, + -6.13179600963213828e-23, + 7.94232925198502757e-25, + -1.03197455851735729e-26, + 6.05715300915712768e-02, + -4.09351209118587807e-04, + 4.14961932657323215e-06, + -4.67386619822197236e-08, + 5.52755319796363435e-10, + -6.72393818767816724e-12, + 8.33073336432431595e-14, + -1.04555411714978663e-15, + 1.32484686459536002e-17, + -1.69118045809461184e-19, + 2.17150825954155908e-21, + -2.80160327895671027e-23, + 3.62889948220617245e-25, + -4.71556775775155290e-27, + 1.20002569385940401e-02, + -8.10994815571079551e-05, + 8.22110619311630637e-07, + -9.25972898331790068e-09, + 1.09510290589056618e-10, + -1.33212725141304252e-12, + 1.65046088078899651e-14, + -2.07142168694509777e-16, + 2.62474851237873040e-18, + -3.35051883571832640e-20, + 4.30213664673954197e-22, + -5.55050831795783505e-24, + 7.18982871576847884e-26, + -9.34457239880225969e-28, + 9.08109276148348480e-04, + -6.13713455217570010e-06, + 6.22125245515312593e-08, + -7.00722145150874721e-10, + 8.28709845356048910e-12, + -1.00807601061823065e-13, + 1.24897228837039603e-15, + -1.56753082247839189e-17, + 1.98625631943773370e-19, + -2.53547785715594501e-21, + 3.25561463924187378e-23, + -4.20036855590981454e-25, + 5.44130733485991899e-27, + -7.07432621604846309e-29, + 1.99361486805411321e-05, + -1.34731392045238689e-07, + 1.36578071805595962e-09, + -1.53832817661918849e-11, + 1.81930557523471166e-13, + -2.21307652715432736e-15, + 2.74192742279524802e-17, + -3.44127394662404896e-19, + 4.36052206108295592e-21, + -5.56625747651249901e-23, + 7.14723697507201049e-25, + -9.22151638734556775e-27, + 1.19472644938521173e-28, + -1.55412688995116642e-30, + 6.18185401272247373e-08, + -4.17778684288954163e-10, + 4.23504918011293801e-12, + -4.77008892936679670e-14, + 5.64135112103520900e-16, + -6.86236656437393487e-18, + 8.50224150776725319e-20, + -1.06707940322353648e-21, + 1.35212253013097615e-23, + -1.72600223337819245e-25, + 2.21625335791573420e-27, + -2.85957560502076380e-29, + 3.70562096185004526e-31, + -4.82523928623693443e-33, +# root=6 base[25]=76.0 */ + 1.29126128553008729e-01, + -8.27884704697229691e-04, + 7.96179325303460948e-06, + -8.50761710218040295e-08, + 9.54539004472602780e-10, + -1.10157375881854337e-11, + 1.29479866805233574e-13, + -1.54168155827924583e-15, + 1.85328836624575085e-17, + -2.24438010748719811e-19, + 2.73399028635662284e-21, + -3.34634303893429313e-23, + 4.11209985049867983e-25, + -5.06919649434044563e-27, + 5.89971666419767740e-02, + -3.78256921590546056e-04, + 3.63770871613655546e-06, + -3.88709325934309744e-08, + 4.36124720412583653e-10, + -5.03304260305653376e-12, + 5.91587881118474895e-14, + -7.04387600182945355e-16, + 8.46759396456888036e-18, + -1.02544751888747902e-19, + 1.24914833381576811e-21, + -1.52893003960385011e-23, + 1.87880368634273563e-25, + -2.31611371362262369e-27, + 1.16883485902115006e-02, + -7.49391709442686369e-05, + 7.20692364802523777e-07, + -7.70099711628143703e-09, + 8.64037724375145795e-11, + -9.97131892299503754e-13, + 1.17203685702002344e-14, + -1.39551240916455600e-16, + 1.67757531095446207e-18, + -2.03158709582401614e-20, + 2.47477692832696531e-22, + -3.02907406349898965e-24, + 3.72224509900206485e-26, + -4.58870242409252464e-28, + 8.84505876160857790e-04, + -5.67095826610944895e-06, + 5.45377840720750053e-08, + -5.82766431808274788e-10, + 6.53853227028726055e-12, + -7.54571110916215972e-14, + 8.86928961050688265e-16, + -1.05604219202967664e-17, + 1.26949090695600858e-19, + -1.53738636121833865e-21, + 1.87276680426645181e-23, + -2.29222864371581154e-25, + 2.81679478324771520e-27, + -3.47257149735327975e-29, + 1.94179721748316757e-05, + -1.24497205483707411e-07, + 1.19729354222621079e-09, + -1.27937446909863989e-11, + 1.43543464334920800e-13, + -1.65654533572782429e-15, + 1.94711672946482294e-17, + -2.31837893518296299e-19, + 2.78697292001963043e-21, + -3.37509649893383020e-23, + 4.11137396880475052e-25, + -5.03224612488597170e-27, + 6.18390475678702596e-29, + -7.62389954317073720e-31, + 6.02117646349025331e-08, + -3.86044246371110524e-10, + 3.71259966356596960e-12, + -3.96711838495263517e-14, + 4.45103392444911235e-16, + -5.13665984093450467e-18, + 6.03767134842741431e-20, + -7.18889107899418830e-22, + 8.64191985007704781e-24, + -1.04655898090205401e-25, + 1.27486645365479335e-27, + -1.56041741123308084e-29, + 1.91755739391148668e-31, + -2.36426687714213364e-33, +# root=6 base[26]=80.0 */ + 1.25935858403138146e-01, + -7.68030095520723225e-04, + 7.02575408682183819e-06, + -7.14107830786600425e-08, + 7.62120084507804702e-10, + -8.36598738891090041e-12, + 9.35362124383608024e-14, + -1.05936625755240716e-15, + 1.21134649593262775e-17, + -1.39539040960936505e-19, + 1.61685188063100984e-21, + -1.88242516340410558e-23, + 2.20031641824956826e-25, + -2.58013428542134483e-27, + 5.75395460831169686e-02, + -3.50909610930433572e-04, + 3.21003649137995621e-06, + -3.26272762649755436e-08, + 3.48209352597807945e-10, + -3.82238325921505574e-12, + 4.27362887289122305e-14, + -4.84019836514928930e-16, + 5.53458946581969729e-18, + -6.37547810665031234e-20, + 7.38732595623948666e-22, + -8.60071887677500213e-24, + 1.00531511593168690e-25, + -1.17885285512019245e-27, + 1.13995690068189274e-02, + -6.95212005874893004e-05, + 6.35963176439268181e-07, + -6.46402192241600520e-09, + 6.89862331903791875e-11, + -7.57279552935511748e-13, + 8.46679033159819079e-15, + -9.58926147785811048e-17, + 1.09649691110514374e-18, + -1.26309134563280798e-20, + 1.46355573271927453e-22, + -1.70394969976053926e-24, + 1.99170180566702371e-26, + -2.33551235383188755e-28, + 8.62652725867246186e-04, + -5.26095794994417316e-06, + 4.81259745327529149e-08, + -4.89159382087363520e-10, + 5.22047474543963957e-12, + -5.73064885341430063e-14, + 6.40717184530711874e-16, + -7.25659237479628518e-18, + 8.29764747131694529e-20, + -9.55833675142410183e-22, + 1.10753341168836584e-23, + -1.28944958585936824e-25, + 1.50720408118215865e-27, + -1.76738313371926953e-29, + 1.89382197212068294e-05, + -1.15496276325921178e-07, + 1.05653208141457566e-09, + -1.07387452434548633e-11, + 1.14607529558033603e-13, + -1.25807620931077165e-15, + 1.40659647341078982e-17, + -1.59307374456171914e-19, + 1.82162145106389398e-21, + -2.09838648348621091e-23, + 2.43142006361758232e-25, + -2.83078944518721179e-27, + 3.30883800344439185e-29, + -3.88003334756348979e-31, + 5.87241354653583894e-08, + -3.58133925815264190e-10, + 3.27612278164723306e-12, + -3.32989868999381881e-14, + 3.55378076196875365e-16, + -3.90107617447329948e-18, + 4.36161176003245891e-20, + -4.93984544293404827e-22, + 5.64853225320018092e-24, + -6.50673265192114613e-26, + 7.53941223879969347e-28, + -8.77778897952284174e-30, + 1.02601453366920116e-31, + -1.20313908826391141e-33, +# root=6 base[27]=84.0 */ + 1.22970999696354888e-01, + -7.15056454676179349e-04, + 6.23683598265504999e-06, + -6.04428009598167041e-08, + 6.15054570024755706e-10, + -6.43749536833409732e-12, + 6.86260495024082865e-14, + -7.41079600845150644e-16, + 8.07972575689802893e-18, + -8.87428721414556899e-20, + 9.80432050690966918e-22, + -1.08836484644689978e-23, + 1.21297393042748140e-25, + -1.35619998401750005e-27, + 5.61849150324214425e-02, + -3.26706184779894360e-04, + 2.84958324012884894e-06, + -2.76160529282053725e-08, + 2.81015758532275702e-10, + -2.94126364089548595e-12, + 3.13549436031618492e-14, + -3.38596047105160613e-16, + 3.69159156434111550e-18, + -4.05462323914917204e-20, + 4.47955140706434000e-22, + -4.97269166224048907e-24, + 5.54202518139324494e-26, + -6.19641900272724046e-28, + 1.11311934079068899e-02, + -6.47260875672030038e-05, + 5.64551217341890374e-07, + -5.47121280025898015e-09, + 5.56740320259875732e-11, + -5.82714674064376757e-13, + 6.21195104307665230e-15, + -6.70816728174699390e-17, + 7.31367479370116836e-19, + -8.03290268341370073e-21, + 8.87475812336316567e-23, + -9.85175340173842416e-25, + 1.09797006980717888e-26, + -1.22761677665463312e-28, + 8.42343629811137659e-04, + -4.89809183497814727e-06, + 4.27219350345908795e-08, + -4.14029392963886816e-10, + 4.21308520159927438e-12, + -4.40964392323772056e-14, + 4.70084131870152533e-16, + -5.07634875293622983e-18, + 5.53456143225489716e-20, + -6.07883104426088150e-22, + 6.71589801887208048e-24, + -7.45523094355211756e-26, + 8.30879568265025835e-28, + -9.28988730061470806e-30, + 1.84923646141438888e-05, + -1.07530106384594368e-07, + 9.37894668780905426e-10, + -9.08938136966441865e-12, + 9.24918346161126259e-14, + -9.68069803832193988e-16, + 1.03199773325481259e-17, + -1.11443464075382216e-19, + 1.21502821846003839e-21, + -1.33451427818074790e-23, + 1.47437257903284872e-25, + -1.63668181137089672e-27, + 1.82406894474509341e-29, + -2.03945300055687128e-31, + 5.73416160896977930e-08, + -3.33432214162257220e-10, + 2.90824873681513922e-12, + -2.81845955272539252e-14, + 2.86801141046747116e-16, + -3.00181659823634906e-18, + 3.20004602226411781e-20, + -3.45566857785451595e-22, + 3.76759181946413888e-24, + -4.13809737254583061e-26, + 4.57177371869290711e-28, + -5.07506655471522922e-30, + 5.65612191966821803e-32, + -6.32399282559854469e-34, +# root=6 base[28]=88.0 */ + 1.20206193572779604e-01, + -6.67904963026280012e-04, + 5.56659065026750905e-06, + -5.15490034926713386e-08, + 5.01233529282505132e-10, + -5.01295941158862967e-12, + 5.10642624745834238e-14, + -5.26918851938369986e-16, + 5.48941818433072331e-18, + -5.76121388877596049e-20, + 6.08203399504216730e-22, + -6.45144019704473484e-24, + 6.87043867322214160e-26, + -7.34027499513441597e-28, + 5.49216871370821480e-02, + -3.05162873279271911e-04, + 2.54335106226531296e-06, + -2.35525155393819849e-08, + 2.29011419958172874e-10, + -2.29039935673088057e-12, + 2.33310394760723679e-14, + -2.40746932189217920e-16, + 2.50809129815692050e-18, + -2.63227357364001372e-20, + 2.77885488515441406e-22, + -2.94763497267266364e-24, + 3.13907355554604267e-26, + -3.35373973499961865e-28, + 1.08809263386558126e-02, + -6.04579887933268470e-05, + 5.03881381006700312e-07, + -4.66615648631505081e-09, + 4.53710823750968411e-11, + -4.53767318263366133e-13, + 4.62227828707779903e-15, + -4.76960882295917878e-17, + 4.96895818181258135e-19, + -5.21498452633849159e-21, + 5.50538719545117885e-23, + -5.83976944025050090e-25, + 6.21904204684125822e-27, + -6.64433252332205152e-29, + 8.23404881393973234e-04, + -4.57510707657609790e-06, + 3.81307965747802727e-08, + -3.53107438521140243e-10, + 3.43341821633891887e-12, + -3.43384573377477378e-14, + 3.49786992971356184e-16, + -3.60936106442722925e-18, + 3.76021700267669580e-20, + -3.94639535435653367e-22, + 4.16615511376766218e-24, + -4.41919604517314123e-26, + 4.70620738256755977e-28, + -5.02804238527652620e-30, + 1.80765933912472829e-05, + -1.00439470561158468e-07, + 8.37103253747740740e-10, + -7.75193314225379957e-12, + 7.53754397639576619e-14, + -7.53848252546564321e-16, + 7.67903784440278750e-18, + -7.92379955938552615e-20, + 8.25498067308183811e-22, + -8.66370673701362247e-24, + 9.14615564004802382e-26, + -9.70166826285028927e-28, + 1.03317577285868104e-29, + -1.10382973345648581e-31, + 5.60523816222870321e-08, + -3.11445381991084212e-10, + 2.59571203604358740e-12, + -2.40374004877742735e-14, + 2.33726168595616177e-16, + -2.33755271374827742e-18, + 2.38113648091939455e-20, + -2.45703284456402477e-22, + 2.55972636523845364e-24, + -2.68646523037249217e-26, + 2.83606426974348046e-28, + -3.00831910310970214e-30, + 3.20369893222115103e-32, + -3.42278468756528576e-34, +# root=6 base[29]=92.0 */ + 1.17619904390742047e-01, + -6.25717465088081789e-04, + 4.99301527244315982e-06, + -4.42694348765390524e-08, + 4.12129736032437014e-10, + -3.94637340214139473e-12, + 3.84885200888756729e-14, + -3.80248976647851893e-16, + 3.79280754596404506e-18, + -3.81117301269284221e-20, + 3.85215440816257108e-22, + -3.91220585972577226e-24, + 3.98895992145708805e-26, + -4.08039195868048004e-28, + 5.37400228560658277e-02, + -2.85887588920024857e-04, + 2.28128696628069361e-06, + -2.02265122932507900e-08, + 1.88300284282417912e-10, + -1.80308084697220383e-12, + 1.75852374645794320e-14, + -1.73734103950348351e-16, + 1.73291727505273331e-18, + -1.74130837694053789e-20, + 1.76003259832720348e-22, + -1.78746984542272503e-24, + 1.82253844250395861e-26, + -1.86431334295264846e-28, + 1.06468184175595951e-02, + -5.66392250188978673e-05, + 4.51961997734699884e-07, + -4.00721831070957524e-09, + 3.73055095287043700e-11, + -3.57221179851540953e-13, + 3.48393655537700076e-15, + -3.44196998697033438e-17, + 3.43320575235972317e-19, + -3.44982996153872662e-21, + 3.48692584920930362e-23, + -3.54128373227103980e-25, + 3.61076062606939539e-27, + -3.69352385559147665e-29, + 8.05688962821967270e-04, + -4.28612536354083152e-06, + 3.42018412363682461e-08, + -3.03242850392937269e-10, + 2.82306282505532407e-12, + -2.70324101158660984e-14, + 2.63643946928760683e-16, + -2.60468162422377552e-18, + 2.59804936394058975e-20, + -2.61062959338218282e-22, + 2.63870159207108593e-24, + -2.67983645953625622e-26, + 2.73241251043534248e-28, + -2.79504288435189241e-30, + 1.76876675252304971e-05, + -9.40953195340221941e-08, + 7.50849055224398876e-10, + -6.65723246147867600e-12, + 6.19760217113093100e-14, + -5.93455172651746531e-16, + 5.78789916890777812e-18, + -5.71817968276274561e-20, + 5.70361957082851762e-22, + -5.73123753831139654e-24, + 5.79286531312112508e-26, + -5.88317061625227460e-28, + 5.99859328633446254e-30, + -6.13608868678046862e-32, + 5.48463899515717437e-08, + -2.91773269732662159e-10, + 2.32825272291350058e-12, + -2.06429234979507649e-14, + 1.92176896675428116e-16, + -1.84020158517825048e-18, + 1.79472717002100769e-20, + -1.77310836630436261e-22, + 1.76859352806619450e-24, + -1.77715738088742823e-26, + 1.79626708523590316e-28, + -1.82426919389227931e-30, + 1.86005976281559238e-32, + -1.90269470468863877e-34, +# root=6 base[30]=96.0 */ + 1.15193709036950989e-01, + -5.87791865930573608e-04, + 4.49889514715099008e-06, + -3.82599782934495149e-08, + 3.41642970480666761e-10, + -3.13786696623599930e-12, + 2.93538713889352409e-14, + -2.78163445526805147e-16, + 2.66128044123985711e-18, + -2.56499389422827043e-20, + 2.48673321534858322e-22, + -2.42239547405153948e-24, + 2.36908618733384355e-26, + -2.32447337800476046e-28, + 5.26315047490210561e-02, + -2.68559547581173901e-04, + 2.05552562967367808e-06, + -1.74808177120436100e-08, + 1.56095187607467383e-10, + -1.43367777212790748e-12, + 1.34116561948129001e-14, + -1.27091668691316692e-16, + 1.21592746125279041e-18, + -1.17193455661698832e-20, + 1.13617759274672692e-22, + -1.10678195851540629e-24, + 1.08242517722602329e-26, + -1.06204177864557950e-28, + 1.04272020055998747e-02, + -5.32062434185581019e-05, + 4.07234812504462555e-07, + -3.46324921500438894e-09, + 3.09251286096916381e-11, + -2.84036107502591052e-13, + 2.65707866495248101e-15, + -2.51790350474024959e-17, + 2.40896043597820306e-19, + -2.32180296145072802e-21, + 2.25096229535925333e-23, + -2.19272451217767308e-25, + 2.14446955919886237e-27, + -2.10408655753168967e-29, + 7.89069676925376637e-04, + -4.02633738966096595e-06, + 3.08171493908999233e-08, + -2.62078449974208882e-10, + 2.34023290503244252e-12, + -2.14941917747298171e-14, + 2.01072176658070557e-16, + -1.90540214330523286e-18, + 1.82296039908165389e-20, + -1.75700471870826140e-22, + 1.70339664486846091e-24, + -1.65932569588864625e-26, + 1.62280916908636032e-28, + -1.59224967477312278e-30, + 1.73228165504622094e-05, + -8.83920723492203135e-08, + 6.76543328324139181e-10, + -5.75353108032569316e-12, + 5.13762301159446442e-14, + -4.71872068972320957e-16, + 4.41423176115699410e-18, + -4.18301865456877370e-20, + 4.00203042842759665e-22, + -3.85723483115907873e-24, + 3.73954651339655788e-26, + -3.64279549296267057e-28, + 3.56262904972029608e-30, + -3.49554035929348870e-32, + 5.37150503440283253e-08, + -2.74088489156497900e-10, + 2.09784354841984300e-12, + -1.78407022169486728e-14, + 1.59308780943634544e-16, + -1.46319346319653353e-18, + 1.36877672629068019e-20, + -1.29708155117636519e-22, + 1.24096024058851001e-24, + -1.19606163663336594e-26, + 1.15956853001257613e-28, + -1.12956771624168740e-30, + 1.10470949229055294e-32, + -1.08390645278071689e-34, +# root=7 base[0]=0.0 */ + 4.08427546530376773e-01, + -1.07194133735321814e-02, + 3.20466358447717679e-04, + -9.88925408898335678e-06, + 3.01927897125757393e-07, + -9.01373829642861443e-09, + 2.62574924080278269e-10, + -7.47595644989844576e-12, + 2.08364077803493883e-13, + -5.69678248366882226e-15, + 1.52944932098950463e-16, + -4.03933931188566217e-18, + 1.04932917388534399e-19, + -2.68580928599462552e-21, + 3.57096729556732329e-01, + -2.49474506326113031e-02, + 1.60867913875746278e-03, + -8.93009577451073721e-05, + 4.45448014115909750e-06, + -2.04585265763753710e-07, + 8.77880718477090858e-09, + -3.55409768184551529e-10, + 1.36710988031753063e-11, + -5.02266609801520962e-13, + 1.76960729127642080e-14, + -5.99809661870595730e-16, + 1.96089522230851183e-17, + -6.19026934165545219e-19, + 2.77669612443939062e-01, + -4.19257674455023113e-02, + 4.38695349782221040e-03, + -3.63535941993188159e-04, + 2.56419087520354420e-05, + -1.59762667665497580e-06, + 8.99542770793386363e-08, + -4.64773536276231292e-09, + 2.22782435276166754e-10, + -9.98804074555123924e-12, + 4.21473192693350879e-13, + -1.68233572196655918e-14, + 6.37761969267554851e-16, + -2.30121065172076434e-17, + 1.96872137787354934e-01, + -5.01703589110845394e-02, + 7.64356956060294624e-03, + -8.66459776646676095e-04, + 7.99475941295169860e-05, + -6.29759286574927551e-06, + 4.36130694462114975e-07, + -2.70850899658440743e-08, + 1.52995169402379482e-09, + -7.94472354519928070e-11, + 3.82400890839821385e-12, + -1.71734756391674633e-13, + 7.23484837013367002e-15, + -2.86809552577083693e-16, + 1.28883709341404890e-01, + -4.62466652140177820e-02, + 9.32341825418646873e-03, + -1.33957350642275870e-03, + 1.51560060203022112e-04, + -1.42574879933401297e-05, + 1.15373778283328508e-06, + -8.21942102688436604e-08, + 5.24235318855477417e-09, + -3.03155934607303761e-10, + 1.60532914838911832e-11, + -7.84651757586852105e-13, + 3.56321230221804825e-14, + -1.50933333029215385e-15, + 7.49670713431007524e-02, + -3.30680271411809418e-02, + 8.04675638231481215e-03, + -1.36150838892143519e-03, + 1.77518127618552597e-04, + -1.88948869196445851e-05, + 1.70331426469857277e-06, + -1.33392230419312220e-07, + 9.24530979390330721e-09, + -5.75201346576465145e-10, + 3.24839998620119946e-11, + -1.68028304791736574e-12, + 8.02017486596963319e-14, + -3.54883923569866061e-15, + 3.05631251745759717e-02, + -1.49464520200727619e-02, + 4.02689168896739648e-03, + -7.45995718882767282e-04, + 1.05295311457639018e-04, + -1.20105830581872061e-05, + 1.15010938497392310e-06, + -9.49472878219686785e-08, + 6.89136037900681221e-09, + -4.46409550233242726e-10, + 2.61174199420888329e-11, + -1.39340986911978744e-12, + 6.83339527099023965e-14, + -3.09590976374214185e-15, +# root=7 base[1]=2.5 */ + 3.70026076548772176e-01, + -8.56002427814723556e-03, + 2.25774031590966263e-04, + -6.21789511422653903e-06, + 1.70935515680696379e-07, + -4.62492213806620994e-09, + 1.22531391145861304e-10, + -3.18460687818280633e-12, + 8.11272715512720267e-14, + -2.03540650873776764e-15, + 5.01086069378029611e-17, + -1.21770348839140189e-18, + 2.93499458319627233e-20, + -6.82071373979690070e-22, + 2.77636229765424014e-01, + -1.54032464848352715e-02, + 8.59262953694924642e-04, + -4.19839053454561364e-05, + 1.86261610435924567e-06, + -7.67283390733310530e-08, + 2.97382430874295052e-09, + -1.09393272333102645e-10, + 3.84339700347091311e-12, + -1.29575961260750516e-13, + 4.20735422755784525e-15, + -1.31948231637376954e-16, + 4.00607688050290660e-18, + -1.17881863896665714e-19, + 1.59922134292820012e-01, + -1.91443027023336168e-02, + 1.71825050069161810e-03, + -1.24681163745211747e-04, + 7.82244118985154940e-06, + -4.38632630380727931e-07, + 2.24367200330989649e-08, + -1.06145800689318593e-09, + 4.69043586935007449e-11, + -1.95021244128659760e-12, + 7.67312732368359447e-14, + -2.86966751428487274e-15, + 1.02384198340177917e-16, + -3.49161131930596365e-18, + 7.41827427564365899e-02, + -1.57117786536252087e-02, + 2.08454353432500515e-03, + -2.10295626334193296e-04, + 1.75411955810349526e-05, + -1.26408390185425945e-06, + 8.08597429039402747e-08, + -4.67555884051718241e-09, + 2.47591245666332121e-10, + -1.21246740852145386e-11, + 5.53243826009869954e-13, + -2.36638219127796698e-14, + 9.53452977657449535e-16, + -3.62897088088309139e-17, + 2.97115905415779903e-02, + -9.47561094860407786e-03, + 1.73087634671336191e-03, + -2.28744060891828679e-04, + 2.40839152590301962e-05, + -2.12799056789534980e-06, + 1.62969531779167796e-07, + -1.10575084238636984e-08, + 6.75284995565504496e-10, + -3.75640049094650262e-11, + 1.92110281316653952e-12, + -9.10043661706678354e-14, + 4.01755568243751367e-15, + -1.65901410892157396e-16, + 1.09132509996791600e-02, + -4.55628901505415393e-03, + 1.05366062527819477e-03, + -1.70566604787897341e-04, + 2.14041898738559268e-05, + -2.20370072830854219e-06, + 1.92959915505996980e-07, + -1.47295347933320483e-08, + 9.98056780024349604e-10, + -6.08596014409041133e-11, + 3.37597754280063689e-12, + -1.71850487834961724e-13, + 8.08539239372202382e-15, + -3.53173873389292287e-16, + 3.26509043435514734e-03, + -1.57254479589216765e-03, + 4.17131951375205668e-04, + -7.61903549606389127e-05, + 1.06192722966327849e-05, + -1.19775416790098859e-06, + 1.13547543991323556e-07, + -9.28969328892054665e-09, + 6.68786564024225618e-10, + -4.30042586437922692e-11, + 2.49914694176028849e-12, + -1.32518191473488152e-13, + 6.46232836354790008e-15, + -2.91271411921180647e-16, +# root=7 base[2]=5.0 */ + 3.38983321347566868e-01, + -7.01192005490760151e-03, + 1.64962438494822996e-04, + -4.08892230885278935e-06, + 1.01893884100164136e-07, + -2.51691717248647560e-09, + 6.09458606106872140e-11, + -1.45838859399197134e-12, + 3.40364415695369839e-14, + -7.87333168700770186e-16, + 1.81956057559176528e-17, + -3.89103376700949263e-19, + 9.14129024943634759e-21, + -2.07257932439721094e-22, + 2.27168606334642614e-01, + -1.01334885457304864e-02, + 4.93843294740470089e-04, + -2.14177774196404819e-05, + 8.50674367591912704e-07, + -3.15933985774074029e-08, + 1.11067816426639474e-09, + -3.72473556447087236e-11, + 1.19852686232335892e-12, + -3.71534769160621233e-14, + 1.11332972958575764e-15, + -3.23419998491838551e-17, + 9.12004308171066035e-19, + -2.50114691109619316e-20, + 1.03676216859525869e-01, + -9.77206483927139762e-03, + 7.56571664495048007e-04, + -4.81620582523513855e-05, + 2.68971362828275627e-06, + -1.35718730123144428e-07, + 6.30162770989058739e-09, + -2.72579567611733841e-10, + 1.10824880504034400e-11, + -4.26332291121961137e-13, + 1.55973219389822941e-14, + -5.44901626100711961e-16, + 1.82364002794942163e-17, + -5.85732015950637473e-19, + 3.35630880636670903e-02, + -5.76459705585742610e-03, + 6.60502860749541182e-04, + -5.88382841533361501e-05, + 4.40554374056311709e-06, + -2.88499925174683355e-07, + 1.69353313494669132e-08, + -9.06009288838460678e-10, + 4.47000823917087298e-11, + -2.05194319557512178e-12, + 8.82426582254525332e-14, + -3.57448508601635136e-15, + 1.36990049769268390e-16, + -4.97964357900272447e-18, + 8.36620026900123173e-03, + -2.29859694074484007e-03, + 3.73315024140031919e-04, + -4.47050546970465473e-05, + 4.32561759163350833e-06, + -3.55090936848162035e-07, + 2.54887847424212033e-08, + -1.63285272785511898e-09, + 9.47354372602391341e-11, + -5.03320029538815968e-12, + 2.46990045802466347e-13, + -1.12722369821073205e-14, + 4.81155302552246032e-16, + -1.92735834191141286e-17, + 1.83066726883950970e-03, + -7.07967731337965332e-04, + 1.53026504454616678e-04, + -2.33874938936131933e-05, + 2.79398744531357280e-06, + -2.75706871663120763e-07, + 2.32668042013963897e-08, + -1.71961292336018611e-09, + 1.13252245931848745e-10, + -6.73432371248030927e-12, + 3.65304746480365006e-13, + -1.82283025177706676e-14, + 8.42451988898237761e-16, + -3.62152297384408737e-17, + 3.66785916407495630e-04, + -1.72891346347455295e-04, + 4.48981682783519627e-05, + -8.04757652395892801e-06, + 1.10325402881716930e-06, + -1.22641209706501059e-07, + 1.14781816951392025e-08, + -9.28426000650035061e-10, + 6.61626908791676695e-11, + -4.21568483717204796e-12, + 2.42977992256943229e-13, + -1.27880329159312344e-14, + 6.19385610506391996e-16, + -2.77444146110289352e-17, +# root=7 base[3]=7.5 */ + 3.13298941262963482e-01, + -5.86414402860065131e-03, + 1.24240205000195113e-04, + -2.79381493231569617e-06, + 6.34158375422934235e-08, + -1.44303393511299740e-09, + 3.19377786098342199e-11, + -7.09391606449664444e-13, + 1.55997560660881768e-14, + -3.05022940788947076e-16, + 7.65354074413290084e-18, + -1.46499754054828592e-19, + 1.95535303182160813e-21, + -8.76921019649876372e-23, + 1.93181767962337630e-01, + -7.01951521254395167e-03, + 3.01524046488003288e-04, + -1.17035060995796315e-05, + 4.18978046148233217e-07, + -1.41039530737599864e-08, + 4.51885484042736009e-10, + -1.38668887396426262e-11, + 4.09926903130526955e-13, + -1.17256691145058879e-14, + 3.24490204978206126e-16, + -8.75253069769692293e-18, + 2.30011946107552756e-19, + -5.86035707963812010e-21, + 7.38480720465753970e-02, + -5.46305119122303656e-03, + 3.68202827649654631e-04, + -2.06452634703111874e-05, + 1.02907213819285475e-06, + -4.67982486076609462e-08, + 1.97421896106766740e-09, + -7.80880210041414478e-11, + 2.91979287294725686e-12, + -1.03842976880038177e-13, + 3.52704026045252825e-15, + -1.14905581304308152e-16, + 3.60046889506044759e-18, + -1.08627912889157423e-19, + 1.78543265843739973e-02, + -2.43500011041299091e-03, + 2.40415441441750241e-04, + -1.88268604671790144e-05, + 1.26009745726268143e-06, + -7.46563548072477872e-08, + 4.00346495220678436e-09, + -1.97231359360375182e-10, + 9.02282875920790429e-12, + -3.86384605233064790e-13, + 1.55837973778733472e-14, + -5.94912285098843700e-16, + 2.15816126465682393e-17, + -7.45644084701822906e-19, + 2.89758338097062442e-03, + -6.63114896380294448e-04, + 9.41642924646720567e-05, + -1.00791917454203443e-05, + 8.85945792114672430e-07, + -6.68782394391318487e-08, + 4.45787767883254822e-09, + -2.67345929177471118e-10, + 1.46205731901651763e-11, + -7.36527501762656316e-13, + 3.44474637502062382e-14, + -1.50520474769102919e-15, + 6.17634231685230750e-17, + -2.38709278895503798e-18, + 3.66039431929262020e-04, + -1.27308513101330733e-04, + 2.51966486563767338e-05, + -3.57758395471133603e-06, + 4.01567331769363277e-07, + -3.75633949700753984e-08, + 3.02655356592229327e-09, + -2.14830278335016848e-10, + 1.36553130610552689e-11, + -7.86946047022102979e-13, + 4.15186800944489913e-14, + -2.02114273352954458e-15, + 9.13703930444378112e-17, + -3.85106725092249624e-18, + 4.41469836206203589e-05, + -2.01650893530704012e-05, + 5.08346313001480232e-06, + -8.88024503033425041e-07, + 1.19075900371493253e-07, + -1.29859513216697057e-08, + 1.19528621990014072e-09, + -9.52786115444407656e-11, + 6.70272077650134935e-12, + -4.22200466015438109e-13, + 2.40856306823134978e-14, + -1.25599000873010564e-15, + 6.03285138680108625e-17, + -2.68201325828614039e-18, +# root=7 base[4]=10.0 */ + 2.91639642737198723e-01, + -4.98902903354517431e-03, + 9.59685932192574351e-05, + -1.97425016905486303e-06, + 4.08665515484761114e-08, + -8.66798087806919013e-10, + 1.77665951482412762e-11, + -3.38327387405523079e-13, + 8.72857406348298716e-15, + -1.13088070299787020e-16, + 2.07567133396948769e-18, + -1.24437131224829486e-19, + -2.16493616190065864e-22, + 6.92521919884223819e-24, + 1.69175383340182284e-01, + -5.07330085107507260e-03, + 1.93598143966576032e-04, + -6.77681875453683520e-06, + 2.20182021871824810e-07, + -6.75177198465966418e-09, + 1.98092758342311675e-10, + -5.59359917720072396e-12, + 1.51789003961005109e-13, + -4.03910493032296636e-15, + 1.03681099401531860e-16, + -2.56475181873918039e-18, + 6.39656567268555886e-20, + -1.52601162323421367e-21, + 5.66367882628750277e-02, + -3.28594960940737854e-03, + 1.95048527281267876e-04, + -9.68320026571550345e-06, + 4.32616387990735093e-07, + -1.77759442127188700e-08, + 6.82736193600694611e-10, + -2.47442859579807975e-11, + 8.50426475859947170e-13, + -2.79999465745340309e-14, + 8.83056898044695402e-16, + -2.67594504731420259e-17, + 7.85578472663936510e-19, + -2.22416778337779547e-20, + 1.08980482536107162e-02, + -1.15958314657727793e-03, + 9.90929020103087366e-05, + -6.81102407726019802e-06, + 4.06940042217998762e-07, + -2.17654523548125611e-08, + 1.06353907598965703e-09, + -4.81140609835988769e-11, + 2.03402085495310373e-12, + -8.09799742883269987e-14, + 3.05196625699774691e-15, + -1.09366481223566672e-16, + 3.74094438804576446e-18, + -1.22351836891397020e-19, + 1.22766861801907202e-03, + -2.26146161413783503e-04, + 2.77556030291673904e-05, + -2.62614264762214607e-06, + 2.07727200915772823e-07, + -1.42943898877230754e-08, + 8.77613502450549666e-10, + -4.88949763281951285e-11, + 2.50216923315889959e-12, + -1.18697429173245054e-13, + 5.25660496693987144e-15, + -2.18556524659716940e-16, + 8.57082212256078359e-18, + -3.17855214498715108e-19, + 9.01434302078534661e-05, + -2.71291769705099802e-05, + 4.80323130629517222e-06, + -6.22193806901576711e-07, + 6.46550312338328937e-08, + -5.66202477226875687e-09, + 4.30912399140443387e-10, + -2.91027134237553582e-11, + 1.77080786908507498e-12, + -9.81910800041012978e-14, + 5.00642428881181122e-15, + -2.36414217306162735e-16, + 1.04014056548207801e-17, + -4.27896238412911015e-19, + 5.85408254945858756e-06, + -2.54924282479529533e-06, + 6.15867642984161802e-07, + -1.03803809545227475e-07, + 1.35059982027805277e-08, + -1.43566668480634883e-09, + 1.29271735939531266e-10, + -1.01101106871576595e-11, + 6.99500308064700244e-13, + -4.34210413837427141e-14, + 2.44518278219454943e-15, + -1.26044886979784104e-16, + 5.99197524460281660e-18, + -2.63922057818204959e-19, +# root=7 base[5]=12.5 */ + 2.73083109443806704e-01, + -4.30610944882538031e-03, + 7.56962081050025653e-05, + -1.43860309251024574e-06, + 2.71756302966912420e-08, + -5.25970609075096086e-10, + 1.16437695678769170e-11, + -1.18855629493993618e-13, + 4.83707119703354784e-15, + -1.37617298194628684e-16, + -3.04377799477536641e-18, + -8.48586838692002602e-20, + 2.74185707860727900e-21, + 1.10061071627103421e-22, + 1.51537564665796626e-01, + -3.79872743404363437e-03, + 1.29669378287511214e-04, + -4.12073047286840591e-06, + 1.22358178487741212e-07, + -3.43847821409706361e-09, + 9.22652926489721280e-11, + -2.43881726643765309e-12, + 6.03572362320491531e-14, + -1.46917952882424052e-15, + 3.73121173265688225e-17, + -8.07938244018638852e-19, + 1.80358431239517164e-20, + -4.74193399200015494e-22, + 4.60144311150033139e-02, + -2.09489863865768879e-03, + 1.11000654707465746e-04, + -4.90535892623805941e-06, + 1.97508642603576008e-07, + -7.36369173715027607e-09, + 2.57280153324763200e-10, + -8.61700245092675726e-12, + 2.71609625978561356e-13, + -8.24692078223628988e-15, + 2.44869009353872633e-16, + -6.83844043449888610e-18, + 1.87024792197202720e-19, + -5.05378585204505662e-21, + 7.44931242678521441e-03, + -6.08990010927426182e-04, + 4.55595399566674199e-05, + -2.74907247184257994e-06, + 1.46795760259872477e-07, + -7.08889178629228473e-09, + 3.15111732367753853e-10, + -1.30899751145691082e-11, + 5.10176975023657672e-13, + -1.88342562842443406e-14, + 6.62458349012494770e-16, + -2.22055027738736358e-17, + 7.13963327258483607e-19, + -2.20535678083477324e-20, + 6.25878437089655553e-04, + -8.97369484934274316e-05, + 9.48916513201059624e-06, + -7.87188776773254052e-07, + 5.56753837408086367e-08, + -3.47007569249354351e-09, + 1.94960345179073956e-10, + -1.00291515563672369e-11, + 4.77289152586168061e-13, + -2.11921802240463117e-14, + 8.83499180137784821e-16, + -3.47522632771150223e-17, + 1.29527924803413693e-18, + -4.58491648175201176e-20, + 2.80188759580081397e-05, + -6.95826153384425050e-06, + 1.07742010100073440e-06, + -1.24978842190606163e-07, + 1.18426182724237684e-08, + -9.58344661417361260e-10, + 6.81105170805566568e-11, + -4.33283841352501515e-12, + 2.50110117678386203e-13, + -1.32369931818210104e-14, + 6.47532721029270009e-16, + -2.94697499408387878e-17, + 1.25448228515557444e-18, + -5.01069904369789713e-20, + 8.91049041224544137e-07, + -3.59888181192343442e-07, + 8.17237338125937874e-08, + -1.30974172786453386e-08, + 1.63484551438178255e-09, + -1.67858924948670621e-10, + 1.46774653136919606e-11, + -1.11944243254294218e-12, + 7.57913003112443420e-14, + -4.61672797816045363e-15, + 2.55714377874772304e-16, + -1.29903415078411294e-17, + 6.09574108818076254e-19, + -2.65405324599693184e-20, +# root=7 base[6]=15.0 */ + 2.56969977203170385e-01, + -3.76290636195295144e-03, + 6.07413933767356792e-05, + -1.07364959893644459e-06, + 1.92486469179343485e-08, + -2.74506868599476549e-10, + 9.54372056092191587e-12, + -7.08468402403587961e-14, + -2.67736844594968306e-15, + -2.70413324435886092e-16, + -1.32723805675284069e-18, + 2.28840759730870272e-19, + 1.06985783937118688e-20, + 1.26823775440030422e-22, + 1.38145145161137739e-01, + -2.93043208033398964e-03, + 9.00321598517498463e-05, + -2.61266993536744701e-06, + 7.11542734684274186e-08, + -1.86536100975003595e-09, + 4.47794911879410538e-11, + -1.12299571879758643e-12, + 2.75320456801904734e-14, + -5.05890000532091337e-16, + 1.38708448754534999e-17, + -3.81809316710822551e-19, + 2.25971455635820639e-21, + -1.62687915143675477e-22, + 3.91014485089338365e-02, + -1.39798737229465805e-03, + 6.71357662624039246e-05, + -2.65523052649619062e-06, + 9.65568378326815224e-08, + -3.32100704219014797e-09, + 1.03760482478579838e-10, + -3.24731568399055042e-12, + 9.70370750432381592e-14, + -2.55160188461546496e-15, + 7.37808513423516576e-17, + -2.04162922135234747e-18, + 4.39998140426040963e-20, + -1.29861164399793457e-21, + 5.57828063626889404e-03, + -3.45153351804983047e-04, + 2.30403432764625936e-05, + -1.22162478939316147e-06, + 5.83727580106250141e-08, + -2.56148848240829072e-09, + 1.02993698854956859e-10, + -3.93955819662823330e-12, + 1.42202472064738115e-13, + -4.81814477225786325e-15, + 1.58774145818252761e-16, + -4.99695474703304927e-18, + 1.48737010692923282e-19, + -4.38221771810304203e-21, + 3.74979248474154882e-04, + -4.04610741449526942e-05, + 3.71908608740877697e-06, + -2.68903770528909762e-07, + 1.69437195663756368e-08, + -9.53954179342746695e-10, + 4.87755115449331574e-11, + -2.30753240962211358e-12, + 1.01695825980880162e-13, + -4.20271150102422597e-15, + 1.64225796397554979e-16, + -6.08241879723687755e-18, + 2.14282810589722017e-19, + -7.20988982248261258e-21, + 1.10910617351549412e-05, + -2.15037044130851906e-06, + 2.86701832940129301e-07, + -2.92709973371839774e-08, + 2.49469306940622000e-09, + -1.84305619901177081e-10, + 1.20963233929627361e-11, + -7.17592971509973005e-13, + 3.89376979349102288e-14, + -1.95037714924447130e-15, + 9.08392490243478517e-17, + -3.95633032094090743e-18, + 1.61899979511342477e-19, + -6.24200241913005769e-21, + 1.64936956220278583e-07, + -5.89661982138934782e-08, + 1.22424393033596726e-08, + -1.82767831905653723e-09, + 2.15458496957364038e-10, + -2.11052620772868778e-11, + 1.77423486794527705e-12, + -1.30889457093707766e-13, + 8.61312436734017858e-15, + -5.11931738580604940e-16, + 2.77563205646212736e-17, + -1.38391739196522452e-18, + 6.38799469822899477e-20, + -2.74111047671999932e-21, +# root=7 base[7]=17.5 */ + 2.42815554510079912e-01, + -3.32361561346317157e-03, + 4.95620949936624968e-05, + -7.98109752258740023e-07, + 1.58008590760213477e-08, + -8.76437836873519986e-11, + 4.98414910260854335e-12, + -2.93511431969108937e-13, + -9.54170078406801160e-15, + 2.66840017692101569e-17, + 1.88881332681658674e-17, + 5.45196570176944477e-19, + -9.04231780649091522e-21, + -1.16094652991790238e-21, + 1.27689374604265826e-01, + -2.31873142669964966e-03, + 6.44436351676693891e-05, + -1.72335087262470837e-06, + 4.25016750793228997e-08, + -1.08221467110146610e-09, + 2.35109348152242897e-11, + -4.58032064658387048e-13, + 1.54180998797013091e-14, + -2.70149081436997436e-16, + -1.58962505702353769e-18, + -2.90523618577995015e-19, + 6.43415705274155244e-21, + 3.82785394328063133e-22, + 3.44132431865815797e-02, + -9.66388811057686823e-04, + 4.27175765865882393e-05, + -1.53189784779910658e-06, + 4.91893796072778128e-08, + -1.63926347144151001e-09, + 4.56901485034663887e-11, + -1.18869007164737286e-12, + 4.09358052676123323e-14, + -9.52985448332870628e-16, + 1.42424064387024213e-17, + -8.67484142649404641e-19, + 1.83093231021288456e-20, + 2.58577799760746974e-22, + 4.49166094043494928e-03, + -2.06766744828934334e-04, + 1.26451405428648911e-05, + -5.93142110532628459e-07, + 2.50348917693438369e-08, + -1.02430507354151952e-09, + 3.70654655429749383e-11, + -1.26967843593344796e-12, + 4.45339914863955681e-14, + -1.37221926782288449e-15, + 3.94633505902557110e-17, + -1.29738166714129049e-18, + 3.51132954071849511e-20, + -8.05372146106515661e-22, + 2.57211867229649612e-04, + -2.01311457498038928e-05, + 1.64798848011147956e-06, + -1.03615079100613922e-07, + 5.77583431264123636e-09, + -2.95677353636231058e-10, + 1.36879218762278413e-11, + -5.91389967092022333e-13, + 2.42419025819072393e-14, + -9.26585411549274868e-16, + 3.36403332323981843e-17, + -1.18012323498408832e-18, + 3.89491509196810207e-20, + -1.23058734024722069e-21, + 5.53813322792811931e-06, + -7.86782145935883164e-07, + 9.04070827260301249e-08, + -8.00750495376357566e-09, + 6.06580496310372916e-10, + -4.05629724482560466e-11, + 2.43360843072851015e-12, + -1.33387972738495846e-13, + 6.74944712505140827e-15, + -3.17274229147562432e-16, + 1.39613358272769796e-17, + -5.77998209788571971e-19, + 2.25772537865053912e-20, + -8.34994217796786367e-22, + 3.99104575859189491e-08, + -1.16881683305168841e-08, + 2.14449216625656917e-09, + -2.90318277174231941e-10, + 3.16751007039788161e-11, + -2.91303092832214746e-12, + 2.32381423362914632e-13, + -1.64053610660569168e-14, + 1.03996068992351472e-15, + -5.98633818546234595e-17, + 3.15725340787075615e-18, + -1.53681466967407265e-19, + 6.94608681809885610e-21, + -2.92608420733886218e-22, +# root=7 base[8]=20.0 */ + 2.30259354654290621e-01, + -2.96123745666958043e-03, + 4.14558819153416807e-05, + -5.56164651584882347e-07, + 1.44258819740892655e-08, + -9.41689088854955397e-11, + -6.13342453466601513e-12, + -4.08388393020141772e-13, + 7.82982027387255826e-15, + 8.88995088620949403e-16, + 9.44755776173016360e-18, + -1.40123260599289046e-18, + -5.39779114333201570e-20, + 1.06599663125175740e-21, + 1.19328953144115624e-01, + -1.87580651235713745e-03, + 4.72188667898837663e-05, + -1.18930094992204739e-06, + 2.57080140348702111e-08, + -6.25996243733609366e-10, + 1.59395581715877666e-11, + -1.48871566609374939e-13, + 2.87344350706750126e-15, + -4.20776500700598458e-16, + -1.46148924767940366e-19, + 4.70256753435155613e-19, + 1.77701564175686731e-20, + -5.06086560126185125e-22, + 3.11307789904750713e-02, + -6.86951071152746553e-04, + 2.81427227893788646e-05, + -9.56603080368934126e-07, + 2.53135896917638031e-08, + -8.23365684873086538e-10, + 2.60288051160177819e-11, + -3.73858752990250513e-13, + 1.05988663408191493e-14, + -8.10051124787789034e-16, + 3.21850207305700436e-18, + 5.17789009545476017e-19, + 3.25918977807954143e-20, + -6.01193341565083463e-22, + 3.82973244020353700e-03, + -1.28559875430116270e-04, + 7.38415992017591587e-06, + -3.17825728427145159e-07, + 1.12355943885486789e-08, + -4.37350414036502434e-10, + 1.56903375194068145e-11, + -4.16857176286099435e-13, + 1.35196660867204565e-14, + -5.40384166967584420e-16, + 1.02538467295285680e-17, + -1.60693242465544150e-19, + 1.66893870901398516e-20, + -2.95137436771603611e-22, + 1.96924021910118861e-04, + -1.07058851092767853e-05, + 8.09462513139791360e-07, + -4.50341169681385040e-08, + 2.15553819568528864e-09, + -1.01770561661704367e-10, + 4.36745176622103941e-12, + -1.65653984951260325e-13, + 6.31998654932865354e-15, + -2.35547520272629643e-16, + 7.48768696277401521e-18, + -2.39000096392346505e-19, + 8.51913407858003505e-21, + -2.30926633670236549e-22, + 3.40055265245395998e-06, + -3.28830886147376743e-07, + 3.34104360559463403e-08, + -2.55480853796264784e-09, + 1.69103454687683407e-10, + -1.02222267611694270e-11, + 5.58074701191046732e-13, + -2.78957931958614115e-14, + 1.31007177973046524e-15, + -5.76002511463114627e-17, + 2.36425429590654801e-18, + -9.25038655480647649e-20, + 3.45213787265651683e-21, + -1.20634734206862759e-22, + 1.35127089302115061e-08, + -2.87964749209189496e-09, + 4.54324914419484816e-10, + -5.40695744763909118e-11, + 5.32911870458788403e-12, + -4.51769157107436137e-13, + 3.36595196118906550e-14, + -2.24359286141831443e-15, + 1.35518973831346837e-16, + -7.48412403247913290e-18, + 3.80834169690865856e-19, + -1.79762163274547422e-20, + 7.90966733688920993e-22, + -3.25391813972529987e-23, +# root=7 base[9]=22.5 */ + 2.19040696259128420e-01, + -2.65257347941546097e-03, + 3.60701602030009694e-05, + -3.51417812898923149e-07, + 1.04140467669347370e-08, + -3.21712100160531268e-10, + -9.58602876137406238e-12, + 2.77078656136322138e-13, + 2.79264409155246383e-14, + -2.74544471019973094e-16, + -5.97169601628716907e-17, + -2.33534833536875632e-19, + 1.17333476126674076e-19, + 2.07561576528199343e-21, + 1.12499621203564576e-01, + -1.54897279383125509e-03, + 3.50655990032702679e-05, + -8.58747604779902861e-07, + 1.66739083275848785e-08, + -2.95921787280483583e-10, + 1.10548934185250708e-11, + -2.51327389451408788e-13, + -6.31505693546665093e-15, + 6.44244164844122374e-17, + 2.08748961658077449e-17, + -2.39714425242864752e-20, + -3.96518525790558718e-20, + -4.75051550917980589e-22, + 2.87688850629482240e-02, + -5.01887950902204431e-04, + 1.86513358633444991e-05, + -6.52577074522863126e-07, + 1.43369774847199366e-08, + -3.10525827842265816e-10, + 1.64602437734547651e-11, + -4.12979399151407587e-13, + -8.21752415105881177e-15, + -7.73502154956092935e-18, + 3.40436103386653122e-17, + 8.02756572790358740e-20, + -5.90510248478219820e-20, + -1.17649713746785928e-21, + 3.41306959452712493e-03, + -8.22348420614927715e-05, + 4.41731819761062169e-06, + -1.90864667731633462e-07, + 5.49506257580151179e-09, + -1.67229017112111868e-10, + 7.69125898761220728e-12, + -2.19155082041598604e-13, + 1.30953596515964781e-15, + -1.19216840289387134e-16, + 1.19599071431931505e-17, + -1.65902515334660885e-20, + -1.32720751576495765e-20, + -4.66093517332032023e-22, + 1.64291771163485530e-04, + -5.92966174145256566e-06, + 4.23760772446788623e-07, + -2.23828468156211803e-08, + 8.83684119598691406e-10, + -3.59255989000435705e-11, + 1.60755749016037141e-12, + -5.61527309878103003e-14, + 1.52748698932944402e-15, + -6.12003015245202507e-17, + 2.60381223703373958e-18, + -4.61093635807429866e-20, + 4.91812700512095109e-22, + -9.69048740993025250e-23, + 2.47476005065621266e-06, + -1.50033349993591061e-07, + 1.40338000159358290e-08, + -9.56718519742161604e-10, + 5.35503804544831090e-11, + -2.88167913787120074e-12, + 1.47398397589891139e-13, + -6.65358096767742957e-15, + 2.78041678795368003e-16, + -1.17018723748508209e-17, + 4.61883767123991604e-19, + -1.58541061717328820e-20, + 5.50380086127078172e-22, + -2.08839657507052501e-23, + 6.55753052542002863e-09, + -8.71213368529743487e-10, + 1.18627113363569107e-10, + -1.21318163892432087e-11, + 1.04739695804878625e-12, + -8.03712970570615176e-14, + 5.51583244037111477e-15, + -3.41313686209980490e-16, + 1.93669114275004545e-17, + -1.01713768768960757e-18, + 4.94607514337577634e-20, + -2.23864211423415535e-21, + 9.53288909858275336e-23, + -3.81915164791116181e-24, +# root=7 base[10]=25.0 */ + 2.08984092856665582e-01, + -2.37859825459513100e-03, + 3.26110877507178215e-05, + -2.44582757556105114e-07, + 2.73457968802750630e-09, + -3.81927558123023980e-10, + 6.29124377447027313e-12, + 6.31251127868719116e-13, + -1.26413226306503357e-14, + -1.33004911545268719e-15, + 3.09558321302878199e-17, + 2.68276491876251718e-18, + -7.15620937483139427e-20, + -5.40286932398318628e-21, + 1.06805426354772276e-01, + -1.30550201779278509e-03, + 2.62053498176548956e-05, + -6.27620944646644421e-07, + 1.27487407033614178e-08, + -1.30643011274691961e-10, + 2.51352441823751062e-12, + -2.89268507509373127e-13, + 6.07234607686890937e-15, + 3.95752661691375009e-16, + -1.09502781199302747e-17, + -8.31400662091806858e-19, + 2.68102624360868381e-20, + 1.58438561963366061e-21, + 2.70151914603280509e-02, + -3.80455284990324392e-04, + 1.20494825392838677e-05, + -4.55787657979669100e-07, + 1.10175918061639600e-08, + -7.56040011120555520e-11, + 2.83375801853471463e-12, + -4.61630945637154772e-13, + 9.29891393881986916e-15, + 6.35095764909494066e-16, + -1.44459347666914361e-17, + -1.43672693360005857e-18, + 3.66717664195927655e-20, + 2.85631964155579373e-21, + 3.14214634610545740e-03, + -5.47622651578667685e-05, + 2.57104061267283254e-06, + -1.21692272693220323e-07, + 3.51821460710315441e-09, + -5.24729720111600985e-11, + 2.08423826697928179e-12, + -1.67622037443809740e-13, + 3.55805319127238819e-15, + 1.43458933256911164e-16, + -2.38165375730031917e-18, + -4.38251573209519283e-19, + 8.94687822166465676e-21, + 8.46097677859212277e-22, + 1.45933856766013550e-04, + -3.41689931844538487e-06, + 2.21814162563294018e-07, + -1.23507340503588356e-08, + 4.45839863616577909e-10, + -1.21037273059200155e-11, + 5.08493378571246794e-13, + -2.64741043199881064e-14, + 6.90483899877214212e-16, + -5.98254751570936438e-19, + 3.12450785117811476e-19, + -5.34297819213414175e-20, + 8.77975336627394740e-22, + 7.47233312814497890e-23, + 2.04250579772008864e-06, + -7.25062459823180481e-08, + 6.27641074010788982e-09, + -4.17982471843176811e-10, + 2.01217102886631335e-11, + -8.63162345829439638e-13, + 4.15901256524930249e-14, + -1.95376427242431120e-15, + 7.05209180074011324e-17, + -2.17220944968943306e-18, + 9.29928107891258450e-20, + -4.27321703648851461e-21, + 1.05354105423465147e-22, + -7.79731960942688207e-25, + 4.33373225299837667e-09, + -3.07259541692528683e-10, + 3.72716481080376130e-11, + -3.35875115571560423e-12, + 2.45802833354505191e-13, + -1.64401581872004293e-14, + 1.03646399579461757e-15, + -5.95704755605623780e-17, + 3.09220565581448636e-18, + -1.50385424123081450e-19, + 7.03494689329289857e-21, + -3.07810409433855278e-22, + 1.22314437560571578e-23, + -4.60179173262555241e-25, +# root=7 base[11]=27.5 */ + 1.99973271303916622e-01, + -2.12920806587506501e-03, + 2.97265573886384622e-05, + -2.48994422367612201e-07, + -2.34129076798287727e-09, + -9.60795774953315714e-11, + 1.37254499494445832e-11, + -1.56994403056396301e-13, + -2.34300032069477034e-14, + 7.36030341135809414e-16, + 3.38533275886554515e-17, + -2.11107705202391871e-18, + -2.90306615314030464e-20, + 4.76549494667905589e-21, + 1.01959651005056592e-01, + -1.12270625265196012e-03, + 1.98158845640122064e-05, + -4.43496756396014908e-07, + 1.02372408103138437e-08, + -1.36647653477949530e-10, + -1.59602036276663055e-12, + 6.83191498662405566e-15, + 8.23859386152711059e-15, + -2.61895508640506349e-16, + -9.83666162921073138e-18, + 6.83238056740957223e-19, + 6.72111740402896289e-21, + -1.47887663274847970e-21, + 2.56556088838946553e-02, + -3.03049953331337271e-04, + 7.58971369605749836e-06, + -2.91485054776542366e-07, + 9.37997879429350609e-09, + -1.14196538504210484e-10, + -3.78195827473908266e-12, + 1.20344753342090533e-14, + 1.36270682411578730e-14, + -4.07379800331360739e-16, + -1.73918182112295751e-17, + 1.08866817357585532e-18, + 1.61655079635033358e-20, + -2.50608095439444930e-21, + 2.95624506861979401e-03, + -3.91471231068434074e-05, + 1.41895938590402793e-06, + -7.23943412538096498e-08, + 2.67075001148237419e-09, + -4.25138951422275961e-11, + -5.30503332536683094e-13, + -1.51016602952782645e-14, + 4.27450082717689893e-15, + -1.19068163861304320e-16, + -4.88552589867537997e-18, + 2.89222547078993021e-19, + 5.90165358909297454e-21, + -7.21293406664040811e-22, + 1.35027694483117871e-04, + -2.12911180874941000e-06, + 1.09984565153351688e-07, + -6.69810977943441815e-09, + 2.78585525043056340e-10, + -6.32540685010024355e-12, + 6.94901181851982809e-14, + -5.72944887174608470e-15, + 5.14205216273396925e-16, + -1.36463083323307046e-17, + -3.66597309842462811e-19, + 2.14331272288488012e-20, + 7.90995004925698499e-22, + -6.92009490105526313e-23, + 1.82748404318415121e-06, + -3.79209938835178594e-08, + 2.75688917958574634e-09, + -1.94654480885613164e-10, + 9.48902841583983088e-12, + -3.20560233623701731e-13, + 1.01339208863645371e-14, + -5.12367768109317730e-16, + 2.69120150479679910e-17, + -8.11331507248068826e-19, + 6.37848679325067440e-21, + -9.31971605137217548e-23, + 4.65763786477740883e-23, + -2.44723003339457056e-24, + 3.51561187046218952e-09, + -1.21830565640518923e-10, + 1.29166301801721049e-11, + -1.11989286730160839e-12, + 7.26100540536845301e-14, + -3.96509477897422901e-15, + 2.12868550371631002e-16, + -1.17166217715946662e-17, + 5.96138698894498099e-19, + -2.59346012679034975e-20, + 1.01865014203749906e-21, + -4.24429054191712124e-23, + 1.89832331591818452e-24, + -7.29425394268636906e-26, +# root=7 base[12]=30.0 */ + 1.91912180330647247e-01, + -1.90402626871477684e-03, + 2.65014723401862502e-05, + -2.86579325545934548e-07, + -1.63932554008752620e-09, + 1.25198989398098218e-10, + 3.64236291896122642e-12, + -3.96878662952207288e-13, + 6.66633020433024088e-15, + 5.08467509143630165e-16, + -2.80509309705100631e-17, + -5.76669508783096544e-20, + 5.29849600301856356e-20, + -1.53984213575115360e-21, + 9.77558170929204717e-02, + -9.82901654912486005e-04, + 1.53809618949944165e-05, + -3.03171542864389515e-07, + 7.24845819091592180e-09, + -1.52872729055140328e-10, + 6.54853298813883655e-13, + 9.88696346959079879e-14, + -1.76837255386920508e-15, + -1.64222503138200825e-16, + 9.05602755032926090e-18, + 3.33433112461688425e-23, + -1.60560401202275034e-20, + 4.99423627292466927e-22, + 2.45460284924057873e-02, + -2.53974318255328630e-04, + 4.90303492974541385e-06, + -1.63809470124290986e-07, + 6.40289190286131844e-09, + -1.67669429486619473e-10, + 3.61149644264361546e-14, + 1.70262257861801221e-13, + -2.76455023245674191e-15, + -2.79998047996543537e-16, + 1.48895018493505240e-17, + 3.12035547327101267e-20, + -2.78649949728803742e-20, + 8.00285583022008495e-22, + 2.81779290205582322e-03, + -3.06128351115635448e-05, + 7.76468074722594826e-07, + -3.70809138212581996e-08, + 1.71912278580650529e-09, + -4.95365766675892047e-11, + 1.95887669592275577e-13, + 4.04500592320252309e-14, + -5.42209755470011446e-16, + -8.49143220189995143e-17, + 4.25268063627262217e-18, + 1.40766907834624518e-20, + -8.08720205474483912e-21, + 2.17568060486741921e-22, + 1.27856791918993682e-04, + -1.50415226393547111e-06, + 5.23877792530603091e-08, + -3.18968790737287889e-09, + 1.63239129043720119e-10, + -5.22762286860628437e-12, + 5.72732173375739402e-14, + 2.06910674224480350e-15, + 4.15382083720418318e-18, + -9.17923104673128642e-18, + 4.12434506770668905e-19, + 1.43788500943067802e-21, + -7.49246529784346463e-22, + 1.81983965435481857e-23, + 1.70820368461854182e-06, + -2.30479263435910190e-08, + 1.15338871459448923e-09, + -8.43585549111060462e-11, + 4.74352154043513130e-12, + -1.77143093468423392e-13, + 3.87630346396045218e-15, + -5.51333421682040286e-17, + 4.27039351556586435e-18, + -3.76955361260435633e-19, + 1.46395281910241214e-20, + -5.15040365543458685e-23, + -1.72282921357421416e-23, + 3.27571515119540491e-25, + 3.17152709699140061e-09, + -5.71537362248409150e-11, + 4.49965053675005215e-12, + -3.96573361204777098e-13, + 2.61038363465420843e-14, + -1.28644583298953374e-15, + 5.23601279731553971e-17, + -2.20635669192132764e-18, + 1.12680687641136697e-19, + -5.75224709246305782e-21, + 2.31868467894967538e-22, + -6.64150626066688078e-24, + 1.57443861034326068e-25, + -7.16089130395543266e-27, +# root=7 base[13]=32.5 */ + 1.84697958898375564e-01, + -1.70601150193419289e-03, + 2.29942077603480833e-05, + -2.91227604163155471e-07, + 1.00837284329902907e-09, + 1.13059253408725551e-10, + -3.13965870949845644e-12, + -8.02569980222053375e-14, + 8.67021502349340269e-15, + -2.26874252447151348e-16, + -4.77608364048090151e-18, + 5.52178990379415807e-19, + -1.42001950833020647e-20, + -3.15440546695290803e-22, + 9.40497538065422772e-02, + -8.72657397362082139e-04, + 1.23428147607730768e-05, + -2.10022469762008263e-07, + 4.52470733689242753e-09, + -1.13485300527047861e-10, + 2.19139341134436160e-12, + 8.08235165187908066e-15, + -2.49954667228691404e-15, + 6.86479095584750546e-17, + 1.49739732499094653e-18, + -1.72003835672088025e-19, + 4.51118751406272053e-21, + 8.92607302899615674e-23, + 2.35982619409717230e-02, + -2.21118836864081227e-04, + 3.44530342526992812e-06, + -8.67829065178965706e-08, + 3.36731254527172769e-09, + -1.25066568963499251e-10, + 2.79775546794023258e-12, + 2.13144734361797600e-14, + -4.16994326299191855e-15, + 1.12237012141583780e-16, + 2.62954303317792462e-18, + -2.91932367342073251e-19, + 7.45880479304007115e-21, + 1.67932976113354117e-22, + 2.70551191697607349e-03, + -2.57853319180323603e-05, + 4.65576980162013707e-07, + -1.69206488697174525e-08, + 8.49102333250902042e-10, + -3.49245480564376114e-11, + 8.41587808794436945e-13, + 3.27970657272430000e-15, + -1.08845720487616723e-15, + 2.93130849533506438e-17, + 8.12253078184786370e-19, + -8.44310758028710736e-20, + 2.10847650581676270e-21, + 5.15639446813184672e-23, + 1.22488898452055047e-04, + -1.20112614206742868e-06, + 2.66222952118526246e-08, + -1.32246164826568258e-09, + 7.63036604868403456e-11, + -3.34056485644434204e-12, + 8.84090953334801601e-14, + -2.43675671897252028e-16, + -8.02071806737020443e-17, + 2.12010399674755572e-18, + 8.91880437733955918e-20, + -8.08682831321231697e-21, + 1.96012586461898686e-22, + 5.12345701907880341e-24, + 1.62956048055365084e-06, + -1.68181270007714249e-08, + 4.94883084754703562e-10, + -3.21207380824139568e-11, + 2.04624161646416342e-12, + -9.60200594185532128e-14, + 2.92974258533255662e-15, + -3.78890219966333859e-17, + -8.43096300353442504e-19, + 1.38673662528780942e-20, + 3.59259367190010334e-21, + -2.48314028240361854e-22, + 5.98922293486494826e-24, + 1.29571580687261068e-25, + 2.99267184395900521e-09, + -3.46849861573736312e-11, + 1.57484011052552255e-12, + -1.32060745711478856e-13, + 9.42435905968227378e-15, + -5.03243101941851330e-16, + 1.98898440711309842e-17, + -5.95025487908335311e-19, + 1.68717828683064637e-20, + -7.77322654508891633e-22, + 4.73816126479971062e-23, + -2.26840981214503569e-24, + 6.87528994062787986e-26, + -7.75079436508252459e-28, +# root=7 base[14]=35.0 */ + 1.78220264884072943e-01, + -1.53561909270237356e-03, + 1.96566854815812361e-05, + -2.61400096435368505e-07, + 2.46232676053274790e-09, + 3.41693526151744453e-11, + -2.78053116448414288e-12, + 6.44989340568087696e-14, + 1.00940933829903690e-15, + -1.37684543756975030e-16, + 4.85704696580538868e-18, + -2.81636391457918283e-20, + -5.36219126333914970e-21, + 2.73577512350516318e-22, + 9.07421808004042207e-02, + -7.82919340745389454e-04, + 1.01911593573173585e-05, + -1.52982002154604762e-07, + 2.76278459132817105e-09, + -6.48104618928227141e-11, + 1.68571446572353582e-12, + -3.16332998851521128e-14, + -1.75705967354144165e-16, + 4.15089581300862344e-17, + -1.49527705785403430e-18, + 8.50777354474957887e-21, + 1.65684660246380385e-21, + -8.41745420480115581e-23, + 2.27633883430462675e-02, + -1.96972396485437727e-04, + 2.65645658694519915e-06, + -4.92858205082180851e-08, + 1.52469775541367276e-09, + -6.18765823997985834e-11, + 2.16592149933477249e-12, + -4.56373770609780461e-14, + -3.26703856142474028e-16, + 6.87917157750357643e-17, + -2.49383488504352811e-18, + 1.39009590238642067e-20, + 2.83475346423819001e-21, + -1.44179541933442282e-22, + 2.60879880103397251e-03, + -2.26879925549317940e-05, + 3.24491948075262730e-07, + -7.85160014603211108e-09, + 3.44166897392052718e-10, + -1.65057406343036387e-11, + 6.16429275862446270e-13, + -1.37597514146688844e-14, + -5.63340100057863693e-17, + 1.85005293725708065e-17, + -6.87911707670284905e-19, + 3.54843654714724529e-21, + 8.22598873131677149e-22, + -4.17128116920622190e-23, + 1.18033358029875590e-04, + -1.03522915246059887e-06, + 1.62299140011585784e-08, + -5.27315577130600465e-10, + 2.90019853751260156e-11, + -1.50944250419877778e-12, + 5.88840380635200040e-14, + -1.41811077958416316e-15, + 1.55557195244792303e-18, + 1.48493436325486883e-18, + -5.80743781963685912e-20, + 2.21295749572779144e-22, + 7.85264727465513474e-23, + -3.94225327016643093e-24, + 1.56838712309056230e-06, + -1.39673828378610078e-08, + 2.53783591577283598e-10, + -1.13271428308774904e-11, + 7.31442806619957504e-13, + -4.04629276866113693e-14, + 1.66645533692722123e-15, + -4.51838906202610450e-17, + 4.14018789250453198e-19, + 2.56950597164061714e-20, + -1.15350398479493348e-21, + -3.23199947810173329e-24, + 2.31675081900117235e-24, + -1.12521649047266807e-25, + 2.87188546523676893e-09, + -2.64826897705088144e-11, + 6.33364078313373593e-13, + -4.06550672790438488e-14, + 3.02403006467407693e-15, + -1.81448037690275891e-16, + 8.31337933749366975e-18, + -2.81314177294603926e-19, + 6.48755959389221523e-21, + -8.76461021098374442e-23, + 1.91322541501444789e-24, + -2.29534686932134170e-25, + 1.70550746985140976e-26, + -7.44306664718409454e-28, +# root=7 base[15]=37.5 */ + 1.72373417248732147e-01, + -1.39021153049175765e-03, + 1.67688072509515358e-05, + -2.19528258055658126e-07, + 2.62861437320457742e-09, + -1.05987630697958256e-11, + -1.02888269507575696e-12, + 4.97638768331285326e-14, + -1.13630665334188984e-15, + -4.65994650182580448e-18, + 1.57868744807871217e-18, + -6.88311082132812126e-20, + 1.35773632128676744e-21, + 1.65153299159512087e-23, + 8.77628825541018898e-02, + -7.08067446905061510e-04, + 8.58412875616515472e-06, + -1.17247631057542446e-07, + 1.80058715959315271e-09, + -3.46134274631909103e-11, + 8.72400032626562852e-13, + -2.32897675197766753e-14, + 4.52377164592378989e-16, + 5.06652824827908958e-19, + -4.86291893074610808e-19, + 2.13140970542289481e-20, + -4.15142690374407872e-22, + -5.28078657589978899e-24, + 2.20147383018395315e-02, + -1.77749609108955001e-04, + 2.17852090071607867e-06, + -3.23992738293087982e-08, + 7.04766993571795632e-10, + -2.47498704575051936e-11, + 9.91454018294160554e-13, + -3.30397639289303681e-14, + 7.06954328482331103e-16, + 6.11950265319009827e-19, + -7.98812457593598075e-19, + 3.57141966080152684e-20, + -7.08504862271181636e-22, + -8.73488050017227626e-24, + 2.52274685660209760e-03, + -2.03958299447400288e-05, + 2.54669700353072039e-07, + -4.31054306373044257e-09, + 1.31706210165216454e-10, + -6.09645558231857450e-12, + 2.72208451852317675e-13, + -9.48000560798148638e-15, + 2.11725270464858948e-16, + -2.63543955542303262e-19, + -2.15727569270702836e-19, + 9.98758137786800138e-21, + -2.01391676539462180e-22, + -2.48193987325326089e-24, + 1.14120705116812240e-04, + -9.24672808228450665e-07, + 1.19032483714178267e-08, + -2.40924141028407101e-10, + 9.91340490400666472e-12, + -5.32397874860843440e-13, + 2.50409840987586163e-14, + -9.00849546621799135e-16, + 2.12930942222035690e-17, + -9.96816383586493661e-20, + -1.75813702517076940e-20, + 8.72399391869687013e-22, + -1.80069565460128813e-23, + -2.32078957062947823e-25, + 1.51593239711882481e-06, + -1.23312473727932430e-08, + 1.67317278225626866e-10, + -4.32034115951893115e-12, + 2.29915438296149864e-13, + -1.35977401120704222e-14, + 6.67263458605126571e-16, + -2.50679066462744960e-17, + 6.48627561846187505e-19, + -6.61315981073183002e-21, + -3.28384739654970256e-22, + 1.96398425463701889e-23, + -4.16673939492497842e-25, + -6.94167630588377085e-27, + 2.77387075886459672e-09, + -2.27617571903122971e-11, + 3.44792746013810075e-13, + -1.27523447101887302e-14, + 8.62064103197386765e-16, + -5.56684931598154521e-17, + 2.91041059668154706e-18, + -1.19309025224168743e-19, + 3.67802342908389770e-21, + -7.46712861372790046e-23, + 4.08419632111940983e-25, + 2.82371746442849328e-26, + -3.83060076981666586e-28, + -6.28583174225279726e-29, +# root=7 base[16]=40.0 */ + 1.65608788397920370e-01, + -1.97271846757954023e-03, + 3.52268418630655175e-05, + -6.95313860046449087e-07, + 1.39296754971836573e-08, + -2.38190835714961908e-10, + 1.27750650892417524e-13, + 3.29642633072739535e-13, + -2.36569033932324910e-14, + 1.02968758754705813e-15, + -2.11751518571146226e-17, + -9.33091890899151413e-19, + 1.21776636206499278e-19, + -6.73884935699275516e-21, + 8.43181431697737765e-02, + -1.00445152049609843e-03, + 1.79538561199208077e-05, + -3.57696168512306970e-07, + 7.63222098890892189e-09, + -1.82416433333134433e-10, + 5.55045432963906891e-12, + -2.24666127993250967e-13, + 9.94464915025542107e-15, + -3.68707872940018151e-16, + 7.17793400153264707e-18, + 2.94646249959443583e-19, + -3.82217825240791232e-20, + 2.08624486504308073e-21, + 2.11503393092487973e-02, + -2.51989138291965162e-04, + 4.51353469610428981e-06, + -9.17245786989421672e-08, + 2.20840520953714798e-09, + -7.91325221076041754e-11, + 4.39732426013496312e-12, + -2.72422542958348187e-13, + 1.46885748669214177e-14, + -5.94769917002254519e-16, + 1.24914030970580189e-17, + 4.54140256834446530e-19, + -6.31070154754383290e-20, + 3.52697674810867640e-21, + 2.42363121918850793e-03, + -2.88820561790435565e-05, + 5.19181987368733482e-07, + -1.09071232657976013e-08, + 3.11567199620362953e-10, + -1.57463773353528591e-11, + 1.10927113101904680e-12, + -7.51382481736708038e-14, + 4.19572441953485158e-15, + -1.74351047841575955e-16, + 3.91519934810139841e-18, + 1.12284623525096792e-19, + -1.74447554457924628e-20, + 9.99959055079540373e-22, + 1.09632437231861268e-04, + -1.30695628086541775e-06, + 2.36333522042928990e-08, + -5.23350101470441016e-10, + 1.85503387190548405e-11, + -1.22562336997992155e-12, + 9.72376707300187864e-14, + -6.86501553710741399e-15, + 3.92583490225877525e-16, + -1.68209294354713658e-17, + 4.15880189765733977e-19, + 7.42338041701885678e-21, + -1.49642957766348122e-21, + 8.97496713280449672e-23, + 1.45620344906210387e-06, + -1.73710022489164021e-08, + 3.17391285121460165e-10, + -7.66213335888594704e-12, + 3.53433113937320492e-13, + -2.88000801886985569e-14, + 2.46186248660696260e-15, + -1.79636066070529351e-16, + 1.05892523224673837e-17, + -4.76548683969594039e-19, + 1.36213350274270366e-20, + 4.02266093806976767e-23, + -3.26999945364963498e-23, + 2.16871032336266691e-24, + 2.66413836072297157e-09, + -3.18245755741923053e-11, + 5.94583398134172677e-13, + -1.69202232563256686e-14, + 1.09493515896598685e-15, + -1.06783630460632874e-16, + 9.76149471874470913e-18, + -7.47088177966622936e-19, + 4.67509334392538928e-20, + -2.32660260280929058e-21, + 8.50459852672646134e-23, + -1.60598348996236160e-24, + -4.93367434790392793e-26, + 5.76429598502716955e-27, +# root=7 base[17]=44.0 */ + 1.58233586282373689e-01, + -1.72084023593289275e-03, + 2.80693561415569955e-05, + -5.08409188907674104e-07, + 9.62362328725863068e-09, + -1.82183496830403088e-10, + 3.03503600315337292e-12, + -1.40643007506332763e-14, + -2.79223437081358303e-15, + 2.20894065198382946e-16, + -1.13322084234462031e-17, + 4.21027613729620378e-19, + -8.95976373930036526e-21, + -1.62697496096022284e-22, + 8.05630279395101734e-02, + -8.76152843962268286e-04, + 1.42926596345323021e-05, + -2.59156851010044498e-07, + 4.94826147839613402e-09, + -9.88009726764283704e-11, + 2.15629818045017609e-12, + -5.82400846960258452e-14, + 2.14026150687548162e-15, + -9.41889475726423307e-17, + 3.99832785575864079e-18, + -1.37505790827895251e-19, + 2.76674145184612909e-21, + 5.64576183962327912e-23, + 2.02083526377504173e-02, + -2.19775744046202053e-04, + 3.58592887124947583e-06, + -6.51716375649542366e-08, + 1.26745340737176936e-09, + -2.80598971013764543e-11, + 8.72932866975274239e-13, + -4.24442708901880514e-14, + 2.48468709070193305e-15, + -1.37160218545998158e-16, + 6.40628151086812680e-18, + -2.31600252978690926e-19, + 4.97106109849916849e-21, + 7.83951625100271094e-23, + 2.31567761631746964e-03, + -2.51845990861412958e-05, + 4.11063053536342996e-07, + -7.50039779822602390e-09, + 1.50402215195001636e-10, + -3.86281386389994218e-12, + 1.65921604585114898e-13, + -1.04161403804091037e-14, + 6.75781812040443831e-16, + -3.87071116461737064e-17, + 1.84210840979887278e-18, + -6.78891011802655743e-20, + 1.53155308843580700e-21, + 1.72295699076633885e-23, + 1.04748378814111814e-04, + -1.13924584770633274e-06, + 1.86053874355576867e-08, + -3.41683990743885224e-10, + 7.18954136193052135e-12, + -2.23443303612776016e-13, + 1.24988918994047203e-14, + -8.95609525142196181e-16, + 6.07860504800473326e-17, + -3.55278798769095394e-18, + 1.71990725374805551e-19, + -6.50285408385407998e-21, + 1.57624500594032236e-22, + 7.67129752150064723e-25, + 1.39131193329073994e-06, + -1.51327285808869399e-08, + 2.47380336297016017e-10, + -4.59389743444449436e-12, + 1.04477838344440335e-13, + -4.11283339251653137e-15, + 2.84832263893769380e-16, + -2.21444679642500361e-17, + 1.55047977881929658e-18, + -9.25788479716583886e-20, + 4.59636496624992628e-21, + -1.81236968100492099e-22, + 4.90575839425422328e-24, + -2.11435555817537410e-26, + 2.54534643461324100e-09, + -2.76876450578588873e-11, + 4.53544596847513594e-13, + -8.61858464409418619e-15, + 2.26415474061418043e-16, + -1.21121969944954897e-17, + 1.00868513755481935e-18, + -8.37989700607086433e-20, + 6.08977456487351237e-21, + -3.77611278907396856e-22, + 1.97360834505420261e-23, + -8.47266179273861635e-25, + 2.77955489723284601e-26, + -5.19167286990524621e-28, +# root=7 base[18]=48.0 */ + 1.51764057308854755e-01, + -1.51832376084338268e-03, + 2.27842446045580108e-05, + -3.79868884487652857e-07, + 6.64654475152202675e-09, + -1.19190820198331350e-10, + 2.13402606784388412e-12, + -3.50812093441673696e-14, + 3.18313904796601609e-16, + 1.55437411018705159e-17, + -1.46107058521782848e-18, + 8.08982899031824621e-20, + -3.50070964710895547e-21, + 1.18780349718471980e-22, + 7.72691255299629426e-02, + -7.73039376967523057e-04, + 1.16004607641090137e-05, + -1.93427533033729199e-07, + 3.38757249247164570e-09, + -6.11571617981113998e-11, + 1.13803877708545820e-12, + -2.25770127928074076e-14, + 5.29795883734791848e-16, + -1.67314832504991425e-17, + 6.79560473742281895e-19, + -2.93005938944808176e-20, + 1.15540736827751823e-21, + -3.74819817590751538e-23, + 1.93821094135809800e-02, + -1.93908568787671761e-04, + 2.90989860136503074e-06, + -4.85305442988595875e-08, + 8.51647988252955453e-10, + -1.55953635906326565e-11, + 3.13298910209896116e-13, + -8.21585895647295353e-15, + 3.32395341809731313e-16, + -1.76034189887762487e-17, + 9.47338356412375656e-19, + -4.59864964904539232e-20, + 1.91004128117832771e-21, + -6.39979107367171839e-23, + 2.22099754242812515e-03, + -2.22200286526204788e-05, + 3.33455379841340028e-07, + -5.56333385736449037e-09, + 9.79636750790312514e-11, + -1.83692869951882886e-12, + 4.13650093232274766e-14, + -1.44435542370534189e-15, + 7.75563991664886105e-17, + -4.68247830564806455e-18, + 2.63945405638461514e-19, + -1.30590899573510028e-20, + 5.49234698916481944e-22, + -1.86791627466374839e-23, + 1.00465522731822354e-04, + -1.00511213034372182e-06, + 1.50843795700169824e-08, + -2.51816716606260530e-10, + 4.45884015226682394e-12, + -8.67837515158098015e-14, + 2.27779390283284681e-15, + -1.02985632184046227e-16, + 6.48340147086486975e-18, + -4.14377268039976845e-19, + 2.38688184119936186e-20, + -1.19659896883621664e-21, + 5.10207315918127060e-23, + -1.77171875632603138e-24, + 1.33442397220553785e-06, + -1.33503564754338475e-08, + 2.00373028337058462e-10, + -3.34839807519822472e-12, + 5.98486944946139199e-14, + -1.23714047645213332e-15, + 3.96381498748941011e-17, + -2.24528230280205466e-18, + 1.56248113740314011e-19, + -1.03449049288978524e-20, + 6.06980301745045835e-22, + -3.09449699896235084e-23, + 1.34812002185676562e-24, + -4.84512051916936871e-26, + 2.44126757452166362e-09, + -2.44240400026915946e-11, + 3.66632398608792974e-13, + -6.13930157061589438e-15, + 1.11830051946966622e-16, + -2.58417404009621754e-18, + 1.08760268333851156e-19, + -7.56091289004787133e-21, + 5.68029495924974487e-22, + -3.89230901822847709e-23, + 2.34766986886939366e-24, + -1.23571277096583707e-25, + 5.62396548022936546e-27, + -2.16540274291849506e-28, +# root=7 base[19]=52.0 */ + 1.46028774427777980e-01, + -1.35264030095837693e-03, + 1.87933802972868065e-05, + -2.90121464075286641e-07, + 4.70243079869569138e-09, + -7.83678209709763251e-11, + 1.32708242152572836e-12, + -2.24806343730996051e-14, + 3.62400659231448478e-16, + -4.37977632226700367e-18, + -4.27453612809425244e-20, + 7.16711242800355382e-21, + -4.26628946457453236e-22, + 1.96316836297932243e-23, + 7.43490641576359940e-02, + -6.88683057476033203e-04, + 9.56846377688312063e-06, + -1.47713664969675662e-07, + 2.39441790186586039e-09, + -3.99312863597165731e-11, + 6.79249696738840119e-13, + -1.17940315989961550e-14, + 2.13663450603926271e-16, + -4.35483507193468365e-18, + 1.14211374737177556e-19, + -4.02262272936019044e-21, + 1.64518730415455796e-22, + -6.64850702716599970e-24, + 1.86496439256234221e-02, + -1.72748568939623651e-04, + 2.40014669594302527e-06, + -3.70530290218108340e-08, + 6.00733053326445615e-10, + -1.00330309749019911e-11, + 1.72307164907582079e-13, + -3.14596042588143005e-15, + 6.93208057081837561e-17, + -2.24078844753240617e-18, + 1.02293706619282967e-19, + -5.17451149119485465e-21, + 2.49170668086390195e-22, + -1.07677971988366902e-23, + 2.13706421383381973e-03, + -1.97952742089531336e-05, + 2.75033571920450724e-07, + -4.24604168228095797e-09, + 6.88612421446319629e-11, + -1.15293033034525586e-12, + 2.01193902123810265e-14, + -3.97104196269760835e-16, + 1.10220979622789629e-17, + -4.82364184203119152e-19, + 2.62450499998246333e-20, + -1.41819955417909413e-21, + 6.99735857369454327e-23, + -3.05993431870419834e-24, + 9.66688443660271198e-05, + -8.95427719805295401e-07, + 1.24410231116513446e-08, + -1.92076791871108775e-10, + 3.11658742993859368e-12, + -5.23893335390577102e-14, + 9.37591602418596875e-16, + -2.06616365737957801e-17, + 7.26660930710263939e-19, + -3.86262037101527941e-20, + 2.27615539035545855e-21, + -1.26502200096503908e-22, + 6.32382214739944443e-24, + -2.79307942990356437e-25, + 1.28399486852901223e-06, + -1.18934374109214160e-08, + 1.65247628829101712e-10, + -2.55145443439335129e-12, + 4.14334046843742644e-14, + -7.01169557006638988e-16, + 1.30735073457675911e-17, + -3.35721840347599774e-19, + 1.48733560090267154e-20, + -9.01383927421013615e-22, + 5.56651062887598546e-23, + -3.15493017040229968e-24, + 1.59858850214737615e-25, + -7.16035120918704108e-27, + 2.34900956353392159e-09, + -2.17585059936950723e-11, + 3.02316147796963995e-13, + -4.66852864902935123e-15, + 7.59364244863869850e-17, + -1.30215791020319123e-18, + 2.62086178847773032e-20, + -8.43715527605248067e-22, + 4.70646813546827656e-23, + -3.15148300050605315e-24, + 2.02234035429627971e-25, + -1.17338236478911595e-26, + 6.08197844289625525e-28, + -2.79938843639820191e-29, +# root=7 base[20]=56.0 */ + 1.40898519735084438e-01, + -1.21504887708721063e-03, + 1.57167067692980007e-05, + -2.25883241314227795e-07, + 3.40873384248289244e-09, + -5.29080738496585999e-11, + 8.36215430067956818e-13, + -1.33693928850479316e-14, + 2.14262720802703549e-16, + -3.34806706835603336e-18, + 4.55038793752983173e-20, + -2.01555323563958263e-22, + -2.52623691941149238e-23, + 1.74792789070501665e-24, + 7.17370471736473309e-02, + -6.18629769091201087e-04, + 8.00200156461653999e-06, + -1.15006221804570589e-07, + 1.73553455894524623e-09, + -2.69394025040217299e-11, + 4.25965575219465720e-13, + -6.82876406686906728e-15, + 1.11014761146359167e-16, + -1.85317246271580148e-18, + 3.33164600461090933e-20, + -7.21011082313655647e-22, + 2.09015643168735064e-23, + -7.62757623936480695e-25, + 1.79944482183410637e-02, + -1.55176464826519756e-04, + 2.00721411688601636e-06, + -2.88480808184956764e-08, + 4.35346370695883332e-10, + -6.75841328615005897e-12, + 1.06963969657781901e-13, + -1.72465365833384458e-15, + 2.88807736998578405e-17, + -5.44737586422431356e-19, + 1.38238457827575622e-20, + -5.14548306420366859e-22, + 2.34984793093521883e-23, + -1.08699297000964447e-24, + 2.06198528187874139e-03, + -1.77816837831224815e-05, + 2.30006857998824018e-07, + -3.30571097702991617e-09, + 4.98876551157172930e-11, + -7.74632542904541196e-13, + 1.22792821803640946e-14, + -1.99901530518875454e-16, + 3.51023740300446590e-18, + -7.79752385890938669e-20, + 2.65141917194626457e-21, + -1.24320604604264252e-22, + 6.28140209174731364e-24, + -3.01379130071461625e-25, + 9.32726927952622228e-05, + -8.04344025056538394e-07, + 1.04042272035637535e-08, + -1.49532401573778546e-10, + 2.25673106256893713e-12, + -3.50534644066233588e-14, + 5.57062757431671748e-16, + -9.20800470252208386e-18, + 1.73462749333069446e-19, + -4.66899818277858887e-21, + 1.98654914642209300e-22, + -1.04691701520404191e-23, + 5.51794942491006685e-25, + -2.69128184909267918e-26, + 1.23888579938672873e-06, + -1.06836242495638162e-08, + 1.38193218554430290e-10, + -1.98616118841739658e-12, + 2.99768418382478353e-14, + -4.65889810080149548e-16, + 7.43491675477857840e-18, + -1.25989803317566555e-19, + 2.63273598728512127e-21, + -8.77604996113280708e-23, + 4.42703355728963051e-24, + -2.50091879835817053e-25, + 1.35233197366779929e-26, + -6.68346356340948224e-28, + 2.26648458168725028e-09, + -1.95451995682106842e-11, + 2.52818295424199324e-13, + -3.63362912655059446e-15, + 5.48483533458215261e-17, + -8.53369615521789057e-19, + 1.37296438194855297e-20, + -2.43789072606660746e-22, + 6.01584368498704738e-24, + -2.55659391943361168e-25, + 1.47987220928829562e-26, + -8.80147618345900860e-28, + 4.87514099593056006e-29, + -2.45383281233482316e-30, +# root=7 base[21]=60.0 */ + 1.36273835550349665e-01, + -1.09930435863633889e-03, + 1.33016420847243805e-05, + -1.78833012420732635e-07, + 2.52451742596121726e-09, + -3.66557370597607625e-11, + 5.42082762578270580e-13, + -8.11961746586430406e-15, + 1.22696784271085339e-16, + -1.86078664385730233e-18, + 2.79126778976467465e-20, + -3.92128723667655960e-22, + 3.95099521160847060e-24, + 4.52782924664284382e-26, + 6.93824362925258842e-02, + -5.59699624850169743e-04, + 6.77239568901946109e-06, + -9.10510113775334101e-08, + 1.28533297791629438e-09, + -1.86629886284329504e-11, + 2.76007439422882497e-13, + -4.13523338711013836e-15, + 6.25806615466739612e-17, + -9.56317976590565101e-19, + 1.48497982140156487e-20, + -2.40645293566216937e-22, + 4.38879229677266355e-24, + -1.01705742009805549e-25, + 1.74038200102882776e-02, + -1.40394486741135147e-04, + 1.69878087910216057e-06, + -2.28391452246782025e-08, + 3.22411955780387314e-10, + -4.68145489771192635e-12, + 6.92395788234542139e-14, + -1.03792615845865531e-15, + 1.57569903038648686e-17, + -2.44659475891237959e-19, + 4.06732083243769126e-21, + -8.23832767348591308e-23, + 2.37955993383699607e-24, + -9.27280296895886061e-26, + 1.99430514744944679e-03, + -1.60878156338029938e-05, + 1.94663440209817349e-07, + -2.61713984905135482e-09, + 3.69452762142205006e-11, + -5.36457844419144167e-13, + 7.93535174680093034e-15, + -1.19060910727199459e-16, + 1.81703966704366790e-18, + -2.89591590345102056e-20, + 5.32414186405739242e-22, + -1.37167521530343255e-23, + 5.21663241178157980e-25, + -2.37531584413106284e-26, + 9.02112216676261702e-05, + -7.27722888696201210e-07, + 8.80548645084817825e-09, + -1.18384808048594191e-10, + 1.67120244651348217e-12, + -2.42670403358107541e-14, + 3.59036040189265170e-16, + -5.39465564835082569e-18, + 8.30205778035585285e-20, + -1.37697626054796395e-21, + 2.89147512853696550e-23, + -9.33126541391708502e-25, + 4.18800611793732924e-26, + -2.04305864999180597e-27, + 1.19822209589213260e-06, + -9.66591106229211989e-09, + 1.16958050553430696e-10, + -1.57243564597624739e-12, + 2.21976889861607250e-14, + -3.22339562009876290e-16, + 4.77071741030881261e-18, + -7.18512425790864412e-20, + 1.12093239424755147e-21, + -1.97724164168132274e-23, + 4.91560411886527984e-25, + -1.93954669813679339e-26, + 9.68574949474729195e-28, + -4.91531843328307837e-29, + 2.19209220597149450e-09, + -1.76833396746652635e-11, + 2.13969380671822605e-13, + -2.87670048699386792e-15, + 4.06099907429234060e-17, + -5.89756728132589142e-19, + 8.73425578387711282e-21, + -1.32139598095340461e-22, + 2.11508204887889111e-24, + -4.14628261297082426e-26, + 1.28680233974487927e-27, + -6.10123354873448293e-29, + 3.29480790101401951e-30, + -1.72421560357058202e-31, +# root=7 base[22]=64.0 */ + 1.32076754389603535e-01, + -1.00084001589645843e-03, + 1.13759029984025116e-05, + -1.43668815465775243e-07, + 1.90514310264265600e-09, + -2.59852357513635006e-11, + 3.60988832848052199e-13, + -5.07995506704990626e-15, + 7.21692149183639064e-17, + -1.03248675516624334e-18, + 1.48306229590640277e-20, + -2.12311115526707298e-22, + 2.95238281500633978e-24, + -3.60216153562521841e-26, + 6.72455351399161849e-02, + -5.09567506936863522e-04, + 5.79192522139077048e-06, + -7.31475151993598468e-08, + 9.69984248137251614e-10, + -1.32301227256624034e-11, + 1.83794352169983462e-13, + -2.58646826256914713e-15, + 3.67499497159106429e-17, + -5.26156111291907701e-19, + 7.58615915839226457e-21, + -1.10452995565867260e-22, + 1.64587549504333818e-24, + -2.61989234297076944e-26, + 1.68678018905846147e-02, + -1.27819397065789581e-04, + 1.45284065355709322e-06, + -1.83482486695031493e-08, + 2.43309881357100320e-10, + -3.31863293925382691e-12, + 4.61030885915024027e-14, + -6.48819517850691910e-16, + 9.22137680063444187e-18, + -1.32234674688590242e-19, + 1.92177432120817643e-21, + -2.89672115977648653e-23, + 4.89300299864320353e-25, + -1.07872455772669638e-26, + 1.93288278760409514e-03, + -1.46468350835435635e-05, + 1.66481128463391193e-07, + -2.10252731971185353e-09, + 2.78809020087258075e-11, + -3.80282869081568019e-13, + 5.28301397352568356e-15, + -7.43544966041120126e-17, + 1.05726485327651205e-18, + -1.52016414303751542e-20, + 2.23849449982148671e-22, + -3.56266351218283051e-24, + 7.08469584775472196e-26, + -2.05280777817674524e-27, + 8.74328173059390448e-05, + -6.62540979828579600e-07, + 7.53067604082993350e-09, + -9.51065891515461287e-11, + 1.26117643218866425e-12, + -1.72019042954581993e-14, + 2.38978123100529123e-16, + -3.36382653387996882e-18, + 4.78668099646276056e-20, + -6.91149801427141681e-22, + 1.03876258541286380e-23, + -1.78749667838034709e-25, + 4.27694753566931098e-27, + -1.52329012556723720e-28, + 1.16131820038137040e-06, + -8.80013846178065799e-09, + 1.00025498720755324e-10, + -1.26324437916871370e-12, + 1.67514622411122559e-14, + -2.28483371007505195e-16, + 3.17429259096303631e-18, + -4.46893188665444533e-20, + 6.36698908211063931e-22, + -9.25666511222274755e-24, + 1.43705725551520038e-25, + -2.76123994705194901e-27, + 8.05201148365449305e-29, + -3.34623426343314756e-30, + 2.12457822669063679e-09, + -1.60994485082630072e-11, + 1.82992049025469493e-13, + -2.31104756089935231e-15, + 3.06460447128994289e-17, + -4.18002147730985512e-19, + 5.80752170684298598e-21, + -8.17899285332067807e-23, + 1.16795504187817571e-24, + -1.72002736065702538e-26, + 2.82962147417157164e-28, + -6.41759029524908051e-30, + 2.31810638824359622e-31, + -1.08862694143257998e-32, +# root=7 base[23]=68.0 */ + 1.28245173025315462e-01, + -9.16247357833369406e-04, + 9.81902378931309147e-06, + -1.16917503189823576e-07, + 1.46177090023152939e-09, + -1.87980661760158278e-11, + 2.46215682375004272e-13, + -3.26679322493762574e-15, + 4.37603772469947444e-17, + -5.90515208944527792e-19, + 8.01402742158516506e-21, + -1.09187180757813508e-22, + 1.48797216162438613e-24, + -2.00420308044643524e-26, + 6.52947244884522632e-02, + -4.66498016117936445e-04, + 4.99925601835715743e-06, + -5.95273566981703101e-08, + 7.44245776323531256e-10, + -9.57084425165851335e-12, + 1.25358233952895321e-13, + -1.66325733047516506e-15, + 2.22804217794569108e-17, + -3.00677926134741262e-19, + 4.08202340602833605e-21, + -5.57128708717580808e-23, + 7.65177839290547501e-25, + -1.06376077296757943e-26, + 1.63784625236428373e-02, + -1.17015889632784056e-04, + 1.25400831361394680e-06, + -1.49317818350185068e-08, + 1.86685857015402785e-10, + -2.40074097764323857e-12, + 3.14447458744045910e-14, + -4.17211278563692103e-16, + 5.58894272201783325e-18, + -7.54340597529782249e-20, + 1.02487035124542234e-21, + -1.40396908037009321e-23, + 1.95990553648335541e-25, + -2.89999625246615182e-27, + 1.87680934983202913e-03, + -1.34088602898357182e-05, + 1.43696914432770307e-07, + -1.71103409297189311e-09, + 2.13923476340771994e-11, + -2.75101123311651570e-13, + 3.60325855446352604e-15, + -4.78085595127289584e-17, + 6.40464962625456197e-19, + -8.64635018362510978e-21, + 1.17619977324539347e-22, + -1.62122725986185311e-24, + 2.32376076749421530e-26, + -3.76907304913742070e-28, + 8.48963682921043415e-05, + -6.06541917348224293e-07, + 6.50004550092325177e-09, + -7.73976219894576310e-11, + 9.67670285984326045e-13, + -1.24440390920246844e-14, + 1.62991466134185254e-16, + -2.16261236119041928e-18, + 2.89730179765325709e-20, + -3.91280556287646306e-22, + 5.33333927477036298e-24, + -7.42252624737653608e-26, + 1.10712247816016140e-27, + -2.02631634221460668e-29, + 1.12762805410788863e-06, + -8.05633616318942954e-09, + 8.63362450903286461e-11, + -1.02802666021846695e-12, + 1.28529900603134237e-14, + -1.65286812635367794e-16, + 2.16492275695747354e-18, + -2.87251289664735825e-20, + 3.84873456436737008e-22, + -5.20076162413168827e-24, + 7.11174823107999192e-26, + -1.00518623872916504e-27, + 1.59242119065367984e-29, + -3.39445995577623779e-31, + 2.06294365383657022e-09, + -1.47386964172442239e-11, + 1.57948188917954897e-13, + -1.88072748863932474e-15, + 2.35139547061202531e-17, + -3.02384719563619237e-19, + 3.96063956619526219e-21, + -5.25527547778955868e-23, + 7.04250194131076982e-25, + -9.52682199929000668e-27, + 1.31055533945047561e-28, + -1.90532042594162396e-30, + 3.33573839251025514e-32, + -8.66639881418502875e-34, +# root=7 base[24]=72.0 */ + 1.24728928345232137e-01, + -8.42936236760034397e-04, + 8.54489841781444907e-06, + -9.62442786652353914e-08, + 1.13823406090753211e-09, + -1.38459372338480674e-11, + 1.71546506311880611e-13, + -2.15300546965952594e-15, + 2.72812394036528840e-17, + -3.48246702697497288e-19, + 4.47147174995724481e-21, + -5.76836217000343946e-23, + 7.46812390222795867e-25, + -9.68379193196825242e-27, + 6.35044643000651499e-02, + -4.29172405028568048e-04, + 4.35054805425698401e-06, + -4.90017948498510307e-08, + 5.79520286524066122e-10, + -7.04951801840259212e-12, + 8.73411586589483535e-14, + -1.09618094148563021e-15, + 1.38899772816007987e-17, + -1.77307302610250796e-19, + 2.27668534794888106e-21, + -2.93747422902294090e-23, + 3.80598920825792455e-25, + -4.95195262836182733e-27, + 1.59293954721652330e-02, + -1.07653171171359904e-04, + 1.09128706526041501e-06, + -1.22915605638334607e-08, + 1.45366281436602396e-10, + -1.76829396036540671e-12, + 2.19085683002011032e-14, + -2.74964980867118693e-16, + 3.48415415835199654e-18, + -4.44761360274257531e-20, + 5.71124529029670746e-22, + -7.37137096821754774e-24, + 9.56644900935421693e-26, + -1.25362768593066314e-27, + 1.82535071995769166e-03, + -1.23359856214722077e-05, + 1.25050673375270540e-07, + -1.40849092259796909e-09, + 1.66575339926877027e-11, + -2.02628949250544644e-13, + 2.51050472783221497e-15, + -3.15082716988211882e-17, + 3.99250712551968930e-19, + -5.09662916071094852e-21, + 6.54534222608234888e-23, + -8.45266555837940899e-25, + 1.09995725992589524e-26, + -1.45852548092114220e-28, + 8.25686674022876773e-05, + -5.58011062050796029e-07, + 5.65659374139741361e-09, + -6.37122593806046416e-11, + 7.53493764026998235e-13, + -9.16580153020604148e-15, + 1.13561214042186505e-16, + -1.42525902191886639e-18, + 1.80599566208624167e-20, + -2.30550473881959128e-22, + 2.96133035719498934e-24, + -3.82764346519024763e-26, + 5.00223474748191769e-28, + -6.75471088723670615e-30, + 1.09671058522512821e-06, + -7.41172962671432757e-09, + 7.51331761513846516e-11, + -8.46252113214954116e-13, + 1.00082102998732996e-14, + -1.21743900887958840e-16, + 1.50836634198462907e-18, + -1.89308876328054991e-20, + 2.39881489509887579e-22, + -3.06242361312194746e-24, + 3.93460473852217421e-26, + -5.09287910325619606e-28, + 6.70144845892719667e-30, + -9.31099478230897599e-32, + 2.00638156672629750e-09, + -1.35594184107812006e-11, + 1.37452689625793384e-13, + -1.54817931345815930e-15, + 1.83095603885863564e-17, + -2.22724870406030834e-19, + 2.75948736670663565e-21, + -3.46332483896416526e-23, + 4.38858146473558273e-25, + -5.60309141910056265e-27, + 7.20235014336463257e-29, + -9.34699169284814570e-31, + 1.24541028723369107e-32, + -1.81907157786766143e-34, +# root=7 base[25]=76.0 */ + 1.21486998257004930e-01, + -7.78906862643717417e-04, + 7.49077180500278719e-06, + -8.00430459463053562e-08, + 8.98068266057345383e-10, + -1.03640441181262546e-11, + 1.21819809225050059e-13, + -1.45047533080916767e-15, + 1.74364735856965342e-17, + -2.11160156646201519e-19, + 2.57224270094665165e-21, + -3.14834304425518011e-23, + 3.86863296072665983e-25, + -4.76813614306670599e-27, + 6.18538685939808777e-02, + -3.96572500927163719e-04, + 3.81385021888487040e-06, + -4.07531021167567689e-08, + 4.57242316579966295e-10, + -5.27674757151965284e-12, + 6.20233159538004240e-14, + -7.38494755786509929e-16, + 8.87760353989236960e-18, + -1.07510088131813620e-19, + 1.30963466274218703e-21, + -1.60297180653555702e-23, + 1.96983909644454898e-25, + -2.42863309306672394e-27, + 1.55153617178981768e-02, + -9.94758442619903476e-05, + 9.56662324103094714e-07, + -1.02224668374224173e-08, + 1.14694199341057133e-10, + -1.32361401376697003e-12, + 1.55578657446885519e-14, + -1.85243278789963698e-16, + 2.22684933693274851e-18, + -2.69677447321619051e-20, + 3.28509274825272812e-22, + -4.02101093236223963e-24, + 4.94199579195285007e-26, + -6.09719620102710375e-28, + 1.77790655845396330e-03, + -1.13989450672695271e-05, + 1.09624013360042588e-07, + -1.17139330453903020e-09, + 1.31428176110759490e-11, + -1.51673037291964692e-13, + 1.78277710264145369e-15, + -2.12270428448024223e-17, + 2.55174895766587912e-19, + -3.09024045505395800e-21, + 3.76442546258864733e-23, + -4.60793206551229005e-25, + 5.66469615383031512e-27, + -6.99676710064740180e-29, + 8.04225586306689144e-05, + -5.15624583103756357e-07, + 4.95877783894570414e-09, + -5.29872879235614684e-11, + 5.94507633091264264e-13, + -6.86084073446356545e-15, + 8.06428751375949827e-17, + -9.60192846655917903e-19, + 1.15426899745962689e-20, + -1.39785521206595539e-22, + 1.70284044895366355e-24, + -2.08454938493834682e-26, + 2.56356695189096981e-28, + -3.17203110653775175e-30, + 1.06820509663087232e-06, + -6.84873519318196772e-09, + 6.58645018364596141e-11, + -7.03798685100887276e-13, + 7.89649191085819103e-15, + -9.11284740040561353e-17, + 1.07113143631093334e-18, + -1.27536722110011942e-20, + 1.53314770925205411e-22, + -1.85669461723001799e-24, + 2.26183411982509824e-26, + -2.76916150182690271e-28, + 3.40753281020673078e-30, + -4.22833569458884772e-32, + 1.95423208660223754e-09, + -1.25294459925079273e-11, + 1.20496076327352503e-13, + -1.28756731949288138e-15, + 1.44462687113854430e-17, + -1.66715351411456755e-19, + 1.95958571094593036e-21, + -2.33322590087560730e-23, + 2.80482560280511348e-25, + -3.39675882798442515e-27, + 4.13809364145190231e-29, + -5.06730590008439585e-31, + 6.24223814219361232e-33, + -7.78609511159960428e-35, +# root=7 base[26]=80.0 */ + 1.18485465194100498e-01, + -7.22593265371149641e-04, + 6.61010892268388720e-06, + -6.71861053732980348e-08, + 7.17032891915501633e-10, + -7.87105372647841026e-12, + 8.80025894414544116e-14, + -9.96693915459641359e-16, + 1.13968296729132425e-17, + -1.31283878404017189e-19, + 1.52119839959614432e-21, + -1.77105925659825320e-23, + 2.07013707710562255e-25, + -2.42744319265978165e-27, + 6.03256685864325404e-02, + -3.67901006069886361e-04, + 3.36546967627471980e-06, + -3.42071216897628497e-08, + 3.65069998521881352e-10, + -4.00746688847549505e-12, + 4.48056226718631771e-14, + -5.07456562289423436e-16, + 5.80257984339812644e-18, + -6.68418521396582422e-20, + 7.74502821823572066e-22, + -9.01717820641689014e-24, + 1.05399608332670655e-25, + -1.23594999355868576e-27, + 1.51320295766210096e-02, + -9.22839155465274774e-05, + 8.44191003165504391e-07, + -8.58047974054269480e-09, + 9.15737884820541612e-11, + -1.00522893330624836e-12, + 1.12389969876645808e-14, + -1.27289889949231366e-16, + 1.45551325803008147e-18, + -1.67665433756779987e-20, + 1.94275577316648646e-22, + -2.26186528658553051e-24, + 2.64386947810987248e-26, + -3.10046727111961868e-28, + 1.73398049727443711e-03, + -1.05748213720800895e-05, + 9.67359155658218695e-08, + -9.83237869845768692e-10, + 1.04934478541368246e-11, + -1.15189265051414734e-13, + 1.28787757711743774e-15, + -1.45861588389037011e-17, + 1.66787384294940287e-19, + -1.92127974017072710e-21, + 2.22620682482078489e-23, + -2.59188358363177998e-25, + 3.02968120739832530e-27, + -3.55325115951375932e-29, + 7.84355890602901872e-05, + -4.78345831934217052e-07, + 4.37579230713277734e-09, + -4.44761873786728869e-11, + 4.74664948658468394e-13, + -5.21051872963786427e-15, + 5.82563855690990547e-17, + -6.59796326865721300e-19, + 7.54452947414077828e-21, + -8.69079724680537732e-23, + 1.00701256598456554e-24, + -1.17243056302714375e-26, + 1.37050709312776065e-28, + -1.60759073434863255e-30, + 1.04181335956022885e-06, + -6.35358367508351983e-09, + 5.81210511560981593e-11, + -5.90750789897085336e-13, + 6.30469268801043581e-15, + -6.92082266219700970e-17, + 7.73784980916398312e-19, + -8.76368289348086307e-21, + 1.00209508377920569e-22, + -1.15434725325502072e-24, + 1.33755707391605117e-26, + -1.55728515168711666e-28, + 1.82046562941036432e-30, + -2.13589798307737559e-32, + 1.90594961765756469e-09, + -1.16235890672322547e-11, + 1.06329789508153833e-13, + -1.08075139544257050e-15, + 1.15341452554129871e-17, + -1.26613267015873325e-19, + 1.41560402905651180e-21, + -1.60327548110881756e-23, + 1.83328695015399905e-25, + -2.11182602561888435e-27, + 2.44700587090113720e-29, + -2.84903127411976144e-31, + 3.33079359899942875e-33, + -3.90960171505348856e-35, +# root=7 base[27]=84.0 */ + 1.15696008183505020e-01, + -6.72753556823654894e-04, + 5.86786338787344389e-06, + -5.68669915000146489e-08, + 5.78667805763924531e-10, + -6.05665171995890430e-12, + 6.45661172506420821e-14, + -6.97237167907036532e-16, + 7.60172739502307596e-18, + -8.34928241394025508e-20, + 9.22429467542796501e-22, + -1.02397689415031601e-23, + 1.14121380255423958e-25, + -1.27596489043661793e-27, + 5.89054449422782359e-02, + -3.42525625761802284e-04, + 2.98756291725256918e-06, + -2.89532498953987415e-08, + 2.94622823271753279e-10, + -3.08368257493182658e-12, + 3.28731814050048598e-14, + -3.54991207142836772e-16, + 3.87034212889152766e-18, + -4.25095216356174395e-20, + 4.69645579739932223e-22, + -5.21347453005162785e-24, + 5.81037662987452158e-26, + -6.49646224228075532e-28, + 1.47757821169187085e-02, + -8.59187808644347174e-05, + 7.49397254687856681e-07, + -7.26260386370601105e-09, + 7.39028904306004605e-11, + -7.73507812216566798e-13, + 8.24587551130661774e-15, + -8.90456346696427006e-17, + 9.70832697943651713e-19, + -1.06630453644217059e-20, + 1.17805424151712703e-22, + -1.30774287965863024e-24, + 1.45747042230439254e-26, + -1.62957494382066814e-28, + 1.69315807195472077e-03, + -9.84544007227572224e-06, + 8.58734922344708715e-08, + -8.32222366162483274e-10, + 8.46853821227396155e-12, + -8.86363229785003100e-14, + 9.44895544067601558e-16, + -1.02037465042827970e-17, + 1.11247797720316053e-19, + -1.22187924026431981e-21, + 1.34993336524353378e-23, + -1.49854402709344804e-25, + 1.67011925640108289e-27, + -1.86734816971509855e-29, + 7.65890106346074200e-05, + -4.45352697357651394e-07, + 3.88443696954046252e-09, + -3.76450897929400617e-11, + 3.83069350666513482e-13, + -4.00941199505410978e-15, + 4.27417947990745292e-17, + -4.61560478348857380e-19, + 5.03222877549705516e-21, + -5.52709900227360220e-23, + 6.10634464337877131e-25, + -6.77857866321072995e-27, + 7.55470536520860564e-29, + -8.44695842642775753e-31, + 1.01728635470949368e-06, + -5.91535545767045526e-09, + 5.15946699415523169e-11, + -5.00017376525130333e-13, + 5.08808274335396277e-15, + -5.32546390035081487e-17, + 5.67713883039741625e-19, + -6.13063379046186146e-21, + 6.68401071201688261e-23, + -7.34131753684137021e-25, + 8.11069581766401191e-27, + -9.00358940876240274e-29, + 1.00345063815971114e-30, + -1.12198420944837077e-32, + 1.86107859053109656e-09, + -1.08218707020754077e-11, + 9.43900752912018135e-14, + -9.14758789436623466e-16, + 9.30841332597265674e-18, + -9.74269123312815617e-20, + 1.03860643407703287e-21, + -1.12157125122638898e-23, + 1.22280901647039966e-25, + -1.34306030356772821e-27, + 1.48381474163692837e-29, + -1.64716714556087334e-31, + 1.83577964358967472e-33, + -2.05269918484154018e-35, +# root=7 base[28]=88.0 */ + 1.13094768601092702e-01, + -6.28391557838027894e-04, + 5.23726991744267960e-06, + -4.84993530561370091e-08, + 4.71580442941090955e-10, + -4.71639162517051673e-12, + 4.80432894237816673e-14, + -4.95746216233089297e-16, + 5.16466299161144217e-18, + -5.42037920187461529e-20, + 5.72221951770007133e-22, + -6.06977155184623617e-24, + 6.46398188181053508e-26, + -6.90602193896031191e-28, + 5.75810502858919021e-02, + -3.19939165521683044e-04, + 2.66650267034670028e-06, + -2.46929519526128471e-08, + 2.40100382490828920e-10, + -2.40130278965247165e-12, + 2.44607517962943143e-14, + -2.52404139988757315e-16, + 2.62953559312306094e-18, + -2.75973089895625394e-20, + 2.91340982518441109e-22, + -3.09036241867092117e-24, + 3.29107068302123826e-26, + -3.51613142110925836e-28, + 1.44435723033988963e-02, + -8.02532160660111442e-05, + 6.68862827703494962e-07, + -6.19395504495171637e-09, + 6.02265366359547422e-11, + -6.02340358373026836e-13, + 6.13571019304415470e-15, + -6.33127986987347290e-17, + 6.59590043527314732e-19, + -6.92248102220194118e-21, + 7.30796769262070390e-23, + -7.75183385308980584e-25, + 8.25528889121328279e-27, + -8.81983183364461658e-29, + 1.65509012246190944e-03, + -9.19622254221689122e-06, + 7.66450457102975967e-08, + -7.09765811291731416e-10, + 6.90136372099595603e-12, + -6.90222305508718015e-14, + 7.03091528984799689e-16, + -7.25501874127029575e-18, + 7.55824766215531794e-20, + -7.93247662387857843e-22, + 8.37420612966966667e-24, + -8.88283285159412902e-26, + 9.45974325924485823e-28, + -1.01066588883416560e-29, + 7.48670293046677825e-05, + -4.15985723808368386e-07, + 3.46699361284026442e-09, + -3.21058394780265466e-11, + 3.12179133286965420e-13, + -3.12218004759722807e-15, + 3.18039322391061598e-17, + -3.28176510354305976e-19, + 3.41892892456097302e-21, + -3.58820919822705104e-23, + 3.78802295700026920e-25, + -4.01809735588300194e-27, + 4.27905999684514867e-29, + -4.57169226176567531e-31, + 9.94414299103900713e-07, + -5.52529138420531055e-09, + 4.60500176850919944e-11, + -4.26442803437020768e-13, + 4.14649007587999647e-15, + -4.14700638257349237e-17, + 4.22432748835527971e-19, + -4.35897373730351980e-21, + 4.54116029720250215e-23, + -4.76600523699302463e-25, + 5.03140601405721812e-27, + -5.33700036326834674e-29, + 5.68362280693818881e-31, + -6.07231673937141726e-33, + 1.81923521692056418e-09, + -1.01082664227094121e-11, + 8.42463890433064766e-14, + -7.80157492419468245e-16, + 7.58581285431051633e-18, + -7.58675741365666684e-20, + 7.72821281990414337e-22, + -7.97454193869776255e-24, + 8.30784387045827401e-26, + -8.71918735450234247e-28, + 9.20472594680294972e-30, + -9.76379734224347267e-32, + 1.03979311914779174e-33, + -1.11090540953776859e-35, +# root=7 base[29]=92.0 */ + 1.10661484858512890e-01, + -5.88699881599308566e-04, + 4.69762738570362884e-06, + -4.16504453277777610e-08, + 3.87748049787449044e-10, + -3.71290507970759570e-12, + 3.62115307362630302e-14, + -3.57753363172195853e-16, + 3.56842421351147333e-18, + -3.58570317516183690e-20, + 3.62426010214746970e-22, + -3.68075889601946287e-24, + 3.75297216674335116e-26, + -3.83899504084186077e-28, + 5.63421686357995777e-02, + -2.99730552570765679e-04, + 2.39174916812173511e-06, + -2.12059002950680326e-08, + 1.97417972813747840e-10, + -1.89038782912652735e-12, + 1.84367322913797821e-14, + -1.82146483427767408e-16, + 1.81682686671781562e-18, + -1.82562427417375913e-20, + 1.84525514115414786e-22, + -1.87402092743605114e-24, + 1.91078758235446861e-26, + -1.95458527296530779e-28, + 1.41328124857224395e-02, + -7.51841080719964242e-05, + 5.99943937629503556e-07, + -5.31926654081069849e-09, + 4.95201242451883417e-11, + -4.74182967415308036e-13, + 4.62465124492875451e-15, + -4.56894393231249741e-17, + 4.55731010148890733e-19, + -4.57937742924126268e-21, + 4.62861929736798191e-23, + -4.70077510660913082e-25, + 4.79300022790556091e-27, + -4.90286201604694647e-29, + 1.61948012973363331e-03, + -8.61535304578267830e-06, + 6.87476245033805902e-08, + -6.09535184614000925e-10, + 5.67451505622405217e-12, + -5.43366647199924266e-14, + 5.29939161485115991e-16, + -5.23555656011386853e-18, + 5.22222534393930489e-20, + -5.24751231279388081e-22, + 5.30393861005363830e-24, + -5.38662201499679113e-26, + 5.49230288771552095e-28, + -5.61819379729615536e-30, + 7.32562322048934067e-05, + -3.89710433404821976e-07, + 3.10975840437313984e-09, + -2.75719659669304361e-11, + 2.56683354724015592e-13, + -2.45788710517980222e-15, + 2.39714866242947704e-17, + -2.36827325045804508e-19, + 2.36224295314948209e-21, + -2.37368136499797445e-23, + 2.39920546947487005e-25, + -2.43660682510022336e-27, + 2.48441096878727924e-29, + -2.54135711940882365e-31, + 9.73019037613661991e-07, + -5.17629230232555215e-09, + 4.13050745139473193e-11, + -3.66222053506967311e-13, + 3.40937259899539860e-15, + -3.26466550853448362e-17, + 3.18399024128116916e-19, + -3.14563674599389384e-21, + 3.13762706012994501e-23, + -3.15282002355501107e-25, + 3.18672217694671871e-27, + -3.23640018351796116e-29, + 3.29989563428879577e-31, + -3.37553410902341597e-33, + 1.78009357021119822e-09, + -9.46978865644967406e-12, + 7.55657337801914296e-14, + -6.69986400590997653e-16, + 6.23729033792620969e-18, + -5.97255537248794590e-20, + 5.82496368212943205e-22, + -5.75479772677451915e-24, + 5.74014437496942666e-26, + -5.76793920300485368e-28, + 5.82996163586421058e-30, + -5.92084528432614258e-32, + 6.03700743309527961e-34, + -6.17538544411744189e-36, +# root=7 base[30]=96.0 */ + 1.08378823757927290e-01, + -5.53017969267734157e-04, + 4.23273951620107707e-06, + -3.59965095239513675e-08, + 3.21431296859985116e-10, + -2.95223006319230117e-12, + 2.76172898717393535e-14, + -2.61707234628386236e-16, + 2.50383850231812612e-18, + -2.41324828870224864e-20, + 2.33961752887451943e-22, + -2.27908602254932348e-24, + 2.22893052488181368e-26, + -2.18695701837883803e-28, + 5.51799749707497303e-02, + -2.81563470099354871e-04, + 2.15505624127605471e-06, + -1.83272564297479310e-08, + 1.63653473072983729e-10, + -1.50309788708082897e-12, + 1.40610620326191856e-14, + -1.33245574695603158e-16, + 1.27480388786385211e-18, + -1.22868080268388324e-20, + 1.19119245077836004e-22, + -1.16037345047527406e-24, + 1.13483728946107460e-26, + -1.11346690655588798e-28, + 1.38412890045015273e-02, + -7.06270955146564867e-05, + 5.40572123714599823e-07, + -4.59719043073540779e-09, + 4.10506713457974487e-11, + -3.77035550816573357e-13, + 3.52706255134898893e-15, + -3.34231849309533799e-17, + 3.19770515396934792e-19, + -3.08201047449798412e-21, + 2.98797507248106835e-23, + -2.91066900451187075e-25, + 2.84661435757707959e-27, + -2.79300910934195466e-29, + 1.58607443036098560e-03, + -8.09316460699781033e-06, + 6.19442035283577092e-08, + -5.26792424558021005e-10, + 4.70399976111665232e-12, + -4.32045343676265108e-14, + 4.04166384009397560e-16, + -3.82996547380604883e-18, + 3.66425293113615119e-20, + -3.53167830403659110e-22, + 3.42392306056862952e-24, + -3.33533797469955490e-26, + 3.26193770388020109e-28, + -3.20051141334488656e-30, + 7.17451450200126391e-05, + -3.66089546168232720e-07, + 2.80200965365775236e-09, + -2.38291458281420655e-11, + 2.12782665538973193e-13, + -1.95433172894792740e-15, + 1.82822289281649572e-17, + -1.73246238057894956e-19, + 1.65750328548306764e-21, + -1.59753393180780974e-23, + 1.54879148051412253e-25, + -1.50872053747769608e-27, + 1.47551835696163188e-29, + -1.44773254012200097e-31, + 9.52948163721722814e-07, + -4.86255008170133047e-09, + 3.72174305792939228e-11, + -3.16508395845474485e-13, + 2.82626580991113722e-15, + -2.59582280011356112e-17, + 2.42831992059884645e-19, + -2.30112691782724299e-21, + 2.20156320239302488e-23, + -2.12190947049805143e-25, + 2.05716776648224234e-27, + -2.00394391222050587e-29, + 1.95984342871746310e-31, + -1.92293718781527370e-33, + 1.74337482969078268e-09, + -8.89581169603308938e-12, + 6.80875772343187918e-14, + -5.79037550739160484e-16, + 5.17052329034504469e-18, + -4.74893840435265499e-20, + 4.44249959145207463e-22, + -4.20980584378937337e-24, + 4.02765860635780560e-26, + -3.88193576795713610e-28, + 3.76349379868524626e-30, + -3.66612320631989462e-32, + 3.58544340523655667e-34, + -3.51792516620958112e-36, + # root=8 base[0]=0.0 */ + 3.62026985353205766e-01, + -8.21967169247591126e-03, + 2.11637589719356606e-04, + -5.65414308955532637e-06, + 1.50325490351670367e-07, + -3.92480346922230493e-09, + 1.00311659464138055e-10, + -2.51205203352069777e-12, + 6.17189444390914801e-14, + -1.49037469958129249e-15, + 3.54119960877608601e-17, + -8.29058869909935899e-19, + 1.91356664584000006e-20, + -4.35784807673988492e-22, + 3.25501219086986482e-01, + -1.87710575052660623e-02, + 1.03024404535001133e-03, + -4.92808675063600236e-05, + 2.13411859443973370e-06, + -8.56187820985115304e-08, + 3.22658601784206670e-09, + -1.15281616094922533e-10, + 3.93100415121687809e-12, + -1.28568338567628926e-13, + 4.04875408021722964e-15, + -1.23136209522103806e-16, + 3.62569162905593098e-18, + -1.03485970794482205e-19, + 2.66141370764159779e-01, + -3.29407890236906309e-02, + 2.92317659563199987e-03, + -2.08356436128618038e-04, + 1.27772845238301096e-05, + -6.98257632192828314e-07, + 3.47464590697754603e-08, + -1.59742422779586567e-09, + 6.85547136217001193e-11, + -2.76764170657975757e-12, + 1.05734880065604815e-13, + -3.84064387686925652e-15, + 1.33142462292881962e-16, + -4.41458323229601194e-18, + 2.01515248853045420e-01, + -4.27023871357566989e-02, + 5.54460929243084932e-03, + -5.44094759243125576e-04, + 4.40023468531914084e-05, + -3.06968336820566662e-06, + 1.89972986480232376e-07, + -1.06276751648236068e-08, + 5.44711426394221104e-10, + -2.58365843667000066e-11, + 1.14291693475664983e-12, + -4.74442496653151991e-14, + 1.85745044810587018e-15, + -6.87866125014667494e-17, + 1.43460294213292677e-01, + -4.41030056916754329e-02, + 7.71359949511442669e-03, + -9.75003043973956640e-04, + 9.82431817498310474e-05, + -8.31872845766514265e-06, + 6.11607551218894349e-07, + -3.99176441536666919e-08, + 2.34989248764434406e-09, + -1.26276038841462535e-10, + 6.25212904499080968e-12, + -2.87343357897933242e-13, + 1.23333414046298380e-14, + -4.96219553991764259e-16, + 9.56903403336124003e-02, + -3.76832614404289043e-02, + 8.20838682738045389e-03, + -1.25604604832243462e-03, + 1.49631824995028406e-04, + -1.46876242304621325e-05, + 1.23116559366237064e-06, + -9.03146980617078472e-08, + 5.90205086443426216e-09, + -3.48260851828932737e-10, + 1.87520607850449368e-11, + -9.29228850612189194e-13, + 4.26729662004949364e-14, + -1.82396575378317250e-15, + 5.67354008667712018e-02, + -2.60101249914593789e-02, + 6.55997690082847900e-03, + -1.14432270136976318e-03, + 1.53087318803302869e-04, + -1.66519228913833509e-05, + 1.52894012059229027e-06, + -1.21618053021704853e-07, + 8.54191178272377836e-09, + -5.37495414202022690e-10, + 3.06501236849439905e-11, + -1.59862951248407551e-12, + 7.68486570248679542e-14, + -3.42119864536887679e-15, + 2.34090727064109674e-02, + -1.15938372572488065e-02, + 3.16510413464343677e-03, + -5.93505545067102812e-04, + 8.46930091890757668e-05, + -9.75601635215949914e-06, + 9.42528177455216273e-07, + -7.84361512655380728e-08, + 5.73452295573187348e-09, + -3.73943481347875915e-10, + 2.20109929110501456e-11, + -1.18089605743175341e-12, + 5.82109462486339048e-14, + -2.64983663093752085e-15, +# root=8 base[1]=2.5 */ + 3.32155587713814981e-01, + -6.76230153904169243e-03, + 1.55995572759643343e-04, + -3.76654814119207477e-06, + 9.11805757636857601e-08, + -2.17950876653509939e-09, + 5.11615699415519826e-11, + -1.18006911249824136e-12, + 2.67447236291443334e-14, + -5.97133531235830241e-16, + 1.31241726817180109e-17, + -2.85147292945239159e-19, + 6.10055124443265619e-21, + -1.29057253564197033e-22, + 2.63832306706191733e-01, + -1.24214830713480443e-02, + 5.98385898266294786e-04, + -2.55138106836833348e-05, + 9.93342719411510354e-07, + -3.60753975460221420e-08, + 1.23772099563314051e-09, + -4.04553991272759432e-11, + 1.26733019689976072e-12, + -3.82230229736840028e-14, + 1.11380079166212374e-15, + -3.14443009433443574e-17, + 8.62000311355338327e-19, + -2.29726295886878386e-20, + 1.69117485971627346e-01, + -1.69087989571356477e-02, + 1.30252482933841370e-03, + -8.20251855117634773e-05, + 4.50369685141705137e-06, + -2.22566498770705818e-07, + 1.00951842057399862e-08, + -4.25854108767762162e-10, + 1.68654398791545671e-11, + -6.31511767697481548e-13, + 2.24786527141822885e-14, + -7.63886838075532555e-16, + 2.48693685088390774e-17, + -7.77205366977779816e-19, + 9.03638902532609006e-02, + -1.59388363172492005e-02, + 1.80600868794271452e-03, + -1.57774132399198061e-04, + 1.15222834333597249e-05, + -7.33719662216842155e-07, + 4.18078017805355659e-08, + -2.16904481631175153e-09, + 1.03741339087003606e-10, + -4.61667725235104895e-12, + 1.92534564724498160e-13, + -7.56755027730734362e-15, + 2.81623711275149035e-16, + -9.95020415558308818e-18, + 4.22149520238171566e-02, + -1.13466833682508757e-02, + 1.77711443702018219e-03, + -2.04393140405932601e-04, + 1.89666439572991237e-05, + -1.49308557194609452e-06, + 1.02849252273486832e-07, + -6.33016929309801040e-09, + 3.53375909250695240e-10, + -1.80946112812144780e-11, + 8.57321099390301301e-13, + -3.78481274934629026e-14, + 1.56573604282872741e-15, + -6.09059482716796159e-17, + 1.81845426097936719e-02, + -6.60458602781751822e-03, + 1.33755212838944392e-03, + -1.92085386576341103e-04, + 2.16472373382977928e-05, + -2.02341024667040421e-06, + 1.62405311586961427e-07, + -1.14610911732214423e-08, + 7.23431234599261985e-10, + -4.13747426215320600e-11, + 2.16587867267943738e-12, + -1.04621545014895820e-13, + 4.69449940910150889e-15, + -1.96483025328331465e-16, + 7.39193098690114556e-03, + -3.26656972179870542e-03, + 7.94790634686249058e-04, + -1.34262931954533845e-04, + 1.74593061489844527e-05, + -1.85207272560721089e-06, + 1.66309423947924666e-07, + -1.29691369702533717e-08, + 8.94876863181043491e-10, + -5.54198267031339493e-11, + 3.11522988445672758e-12, + -1.60388311723983993e-13, + 7.62000309403554990e-15, + -3.35636389800517761e-16, + 2.39641907365816670e-03, + -1.17453787585004811e-03, + 3.17127755266334934e-04, + -5.88584755068081547e-05, + 8.32087479591201263e-06, + -9.50405646027450306e-07, + 9.11139535531932137e-08, + -7.52939940284583620e-09, + 5.46963607331246918e-10, + -3.54581731059981079e-11, + 2.07589006087917593e-12, + -1.10818550045346133e-13, + 5.43754931591902719e-15, + -2.46470705656105881e-16, +# root=8 base[2]=5.0 */ + 3.07347184147444163e-01, + -5.67325905871450716e-03, + 1.18300962017144049e-04, + -2.59938306754579302e-06, + 5.76197755824434922e-08, + -1.26819086556683127e-09, + 2.74715253071284889e-11, + -5.87080517934273552e-13, + 1.23124947854345880e-14, + -2.56089471198390582e-16, + 5.21319556976998386e-18, + -1.05183682105070785e-19, + 2.14915969050361330e-21, + -3.99930126648025257e-23, + 2.22101866830171329e-01, + -8.63484404028497590e-03, + 3.68115279183089050e-04, + -1.40948095411295824e-05, + 4.96360530383941079e-07, + -1.64001690789629381e-08, + 5.14456440572813643e-10, + -1.54388393598465101e-11, + 4.45703848698073312e-13, + -1.24283537828237815e-14, + 3.35847205776512505e-16, + -8.81663477756751406e-18, + 2.25325732981626322e-19, + -5.61327873947521427e-21, + 1.17459755416957023e-01, + -9.47002794392412008e-03, + 6.37404921463694029e-04, + -3.55883355042540839e-05, + 1.75370377477720140e-06, + -7.84963424355704540e-08, + 3.24841231091222440e-09, + -1.25781456965862991e-10, + 4.59652273683613773e-12, + -1.59549474450078814e-13, + 5.28661931676966748e-15, + -1.67872829263679339e-16, + 5.12484625426102450e-18, + -1.50689768295211189e-19, + 4.68153498057589518e-02, + -6.77155574424879916e-03, + 6.67587302984177762e-04, + -5.17444553676249124e-05, + 3.40139365595965881e-06, + -1.97048618740084844e-07, + 1.03021774062292231e-08, + -4.93916532059408861e-10, + 2.19632988785385168e-11, + -9.13598296609915464e-13, + 3.57832999937120898e-14, + -1.32658566516655883e-15, + 4.67469057859741777e-17, + -1.56969934982087005e-18, + 1.48384134196624662e-02, + -3.40677629467531261e-03, + 4.71767567605493421e-04, + -4.88724060790426138e-05, + 4.14028237994310312e-06, + -3.00655876659178684e-07, + 1.92652348350263604e-08, + -1.11075720114726408e-09, + 5.84349080567276731e-11, + -2.83451187164094401e-12, + 1.27808359596456530e-13, + -5.39164119147723904e-15, + 2.13918254030534175e-16, + -8.00784533821158479e-18, + 4.07106503023487148e-03, + -1.33359952000641204e-03, + 2.47115495636678463e-04, + -3.28812400919274717e-05, + 3.46790196802136240e-06, + -3.05817483721869956e-07, + 2.33121037100908248e-08, + -1.57122289306350344e-09, + 9.51724492934692358e-11, + -5.24494100084922311e-12, + 2.65516157702747529e-13, + -1.24423002206134823e-14, + 5.43130691288935498e-16, + -2.21707675704580843e-17, + 1.06721275016353231e-03, + -4.48686766898158753e-04, + 1.04154173231544539e-04, + -1.68820246980020480e-05, + 2.11739534613568843e-06, + -2.17604298086443990e-07, + 1.90015840782395599e-08, + -1.44553820945140683e-09, + 9.75680683112378740e-11, + -5.92448573923136323e-12, + 3.27186449225616889e-13, + -1.65791602988068259e-14, + 7.76423921026060026e-16, + -3.37575119406165105e-17, + 2.54038659258327124e-04, + -1.22777145444888928e-04, + 3.26742532310614787e-05, + -5.98451289927296519e-06, + 8.36027255498801713e-07, + -9.44770096778277390e-08, + 8.97091341681324691e-09, + -7.34944039989008479e-10, + 5.29722441969676807e-11, + -3.40965431578681689e-12, + 1.98322343802902120e-13, + -1.05242082073647141e-14, + 5.13568404325621717e-16, + -2.31616548514262986e-17, +# root=8 base[3]=7.5 */ + 2.86369257547781253e-01, + -4.83766891695547579e-03, + 9.19053419329104071e-05, + -1.84943887584101490e-06, + 3.77161785537194158e-08, + -7.68885460195638099e-10, + 1.54056167745373917e-11, + -3.07836292952834482e-13, + 5.96232679980359866e-15, + -1.15761980791423195e-16, + 2.28694816715657187e-18, + -3.78104582632713233e-20, + 8.61683823601575920e-22, + -1.58626218107009825e-23, + 1.92543588121356246e-01, + -6.25266028736221665e-03, + 2.37635370499168547e-04, + -8.22871195957230243e-06, + 2.63672263129555259e-07, + -7.96551919721199991e-09, + 2.29453999217133342e-10, + -6.34586123033468132e-12, + 1.69401121953259956e-13, + -4.37974398247361588e-15, + 1.10018986972690053e-16, + -2.69283554351257225e-18, + 6.42259312316903039e-20, + -1.49816998769878402e-21, + 8.76181551625965366e-02, + -5.69874452901663383e-03, + 3.37938215572511640e-04, + -1.68069952879213285e-05, + 7.45859075295458237e-07, + -3.03156878827898222e-08, + 1.14684206523765596e-09, + -4.08152807974100755e-11, + 1.37751171375706354e-12, + -4.43430885507195717e-14, + 1.36773440551138760e-15, + -4.05742203318054081e-17, + 1.16067526754182490e-18, + -3.20805820156372872e-20, + 2.74762850561222904e-02, + -3.22029403675241823e-03, + 2.76554987568545802e-04, + -1.89997481491116241e-05, + 1.12283564435792837e-06, + -5.90849738847582304e-08, + 2.82905145975798738e-09, + -1.25063001921845436e-10, + 5.15798058144314862e-12, + -2.00019370075384775e-13, + 7.33703175702961497e-15, + -2.55801097949508016e-16, + 8.50919650446903138e-18, + -2.70693736472094256e-19, + 6.18868727199742372e-03, + -1.18653500528819616e-03, + 1.43891610405700644e-04, + -1.33180174192856119e-05, + 1.02281127453132958e-06, + -6.80723296104376180e-08, + 4.03292346025017982e-09, + -2.16560012967994909e-10, + 1.06770775504124919e-11, + -4.88018540783548208e-13, + 2.08342268513222278e-14, + -8.35716953953961028e-16, + 3.16505906066540708e-17, + -1.13502090061352545e-18, + 1.09145940810300595e-03, + -3.14187431210123007e-04, + 5.23836514626956681e-05, + -6.37310271841296576e-06, + 6.22088929258948361e-07, + -5.12590440387151795e-08, + 3.67942819240768783e-09, + -2.35037762335582041e-10, + 1.35675630763106202e-11, + -7.15951281428993550e-13, + 3.48485120846441132e-14, + -1.57589251785537769e-15, + 6.65985631098899855e-17, + -2.63970417028921448e-18, + 1.75245360395659991e-04, + -6.88411488832272396e-05, + 1.50285678560659287e-05, + -2.31020288316435224e-06, + 2.76777194846882764e-07, + -2.73321899906788132e-08, + 2.30469187395046663e-09, + -1.70004588717566845e-10, + 1.11651461667187707e-11, + -6.61652623520276690e-13, + 3.57531683968636561e-14, + -1.77660258374593761e-15, + 8.17485447283184862e-17, + -3.49835222111098190e-18, + 2.81997244185942087e-05, + -1.33676861470357776e-05, + 3.48917953306820199e-06, + -6.28027879241438670e-07, + 8.63919434277696398e-08, + -9.63054608987137151e-09, + 9.03427972986356420e-10, + -7.32161355038508898e-11, + 5.22611278167841334e-12, + -3.33451878646407404e-13, + 1.92417764805061023e-14, + -1.01373636696721719e-15, + 4.91437210898111042e-17, + -2.20302770182529535e-18, +# root=8 base[4]=10.0 */ + 2.68361600525555022e-01, + -4.18199176460956699e-03, + 7.28832676138728886e-05, + -1.35149916093805873e-06, + 2.54348020789997377e-08, + -4.84312163969019955e-10, + 8.94093174148098819e-12, + -1.68705621368665493e-13, + 3.13086809109846266e-15, + -4.81587164296552622e-17, + 1.26024436926477452e-18, + -1.48494245528626133e-20, + 1.03043788532442612e-22, + -1.43650283658696080e-23, + 1.70797147683661582e-01, + -4.68526114852332171e-03, + 1.59773250549886166e-04, + -5.03623013181852551e-06, + 1.47680606011081796e-07, + -4.09847799789364235e-09, + 1.08896809006576389e-10, + -2.78537673350744165e-12, + 6.89805106996065030e-14, + -1.66047832512036166e-15, + 3.87772481180596397e-17, + -8.89131375595769138e-19, + 1.98818116099189037e-20, + -4.30903458995947426e-22, + 6.91887687207665414e-02, + -3.63708574603272081e-03, + 1.91811835394724788e-04, + -8.54299026933702461e-06, + 3.42843004550327850e-07, + -1.26931763150504783e-08, + 4.40163472342794861e-10, + -1.44263398533312575e-11, + 4.50328088193981681e-13, + -1.34648103021130526e-14, + 3.86670155893492410e-16, + -1.07242139145548650e-17, + 2.87628911372069438e-19, + -7.46378624658265169e-21, + 1.79130894573935884e-02, + -1.68506551028367656e-03, + 1.26706028137879589e-04, + -7.72284055611063789e-06, + 4.10563307817893979e-07, + -1.96228810183200172e-08, + 8.60074720726595082e-10, + -3.50259793938112090e-11, + 1.33813124197451456e-12, + -4.83029874646042546e-14, + 1.65629676549792161e-15, + -5.41968642022701861e-17, + 1.69815116565086865e-18, + -5.10543908537115563e-20, + 3.02222137478680257e-03, + -4.73761144012885553e-04, + 5.00499471699553569e-05, + -4.11558407654548019e-06, + 2.85124740786990637e-07, + -1.73088848996548748e-08, + 9.43700065424058834e-10, + -4.69785514816204309e-11, + 2.16077789372132717e-12, + -9.26431401875209206e-14, + 3.72803058461577331e-15, + -1.41572516906544764e-16, + 5.09601636482651155e-18, + -1.74333370217964013e-19, + 3.53666796774195380e-04, + -8.69142135287904625e-05, + 1.28335071333852691e-05, + -1.40968603864007442e-06, + 1.26007247435607466e-07, + -9.61125444414374164e-09, + 6.44224643664648099e-10, + -3.87060924616741027e-11, + 2.11442058301714044e-12, + -1.06149838447997060e-13, + 4.93826959474676988e-15, + -2.14310768273193004e-16, + 8.72337665528092060e-18, + -3.34133322072658546e-19, + 3.37031422838081544e-05, + -1.20716754772289503e-05, + 2.43464742189543529e-06, + -3.49962082287909967e-07, + 3.95874405576810897e-08, + -3.71983777063496332e-09, + 3.00352342349628640e-10, + -2.13267878701713496e-11, + 1.35422914692675128e-12, + -7.78844832181064711e-14, + 4.09758728753959814e-15, + -1.98795919731600003e-16, + 8.95271355740992139e-18, + -3.75785029210038049e-19, + 3.33102342162253417e-06, + -1.53601934580019241e-06, + 3.90385034257309527e-07, + -6.86412149586385190e-08, + 9.25208474283844937e-09, + -1.01322337512945954e-09, + 9.35792753556459068e-11, + -7.48024052980960486e-12, + 5.27443986521793799e-13, + -3.32877677626810737e-14, + 1.90210008294329671e-15, + -9.93264857640250451e-17, + 4.77660353586600276e-18, + -2.12570944770724829e-19, +# root=8 base[5]=12.5 */ + 2.52705934822863465e-01, + -3.65754693213835805e-03, + 5.88212027460843168e-05, + -1.01179304422504327e-06, + 1.75646352387147476e-08, + -3.16379362651114060e-10, + 5.42110326682272618e-12, + -8.78243266358946436e-14, + 2.14154349526416176e-15, + -1.18775896237183196e-17, + 4.72520060451124194e-19, + -2.55948364704428352e-20, + -4.61949428738367180e-22, + -3.88583317140495026e-24, + 1.54279238386396178e-01, + -3.61406777313097102e-03, + 1.11207804646142950e-04, + -3.20974014555866121e-06, + 8.66174343476511075e-08, + -2.21756456679688063e-09, + 5.45846631180338370e-11, + -1.29754717869279764e-12, + 2.97668942204988911e-14, + -6.74704010375305473e-16, + 1.46476706850878727e-17, + -3.09585462539157587e-19, + 6.76077496746341881e-21, + -1.34370469368366653e-22, + 5.71703499930778167e-02, + -2.43554587697372097e-03, + 1.15375201784474179e-04, + -4.62732302019333253e-06, + 1.68741107122832886e-07, + -5.70834861501156127e-09, + 1.82028987622132549e-10, + -5.51284411172023335e-12, + 1.59115016434292133e-13, + -4.43927063621221094e-15, + 1.18778337581660966e-16, + -3.07029992941474395e-18, + 7.77686333501478121e-20, + -1.89097993641270310e-21, + 1.27390308498499718e-02, + -9.54342437632108888e-04, + 6.33890261857006474e-05, + -3.43520039043144988e-06, + 1.64630801849180632e-07, + -7.15439812700310290e-09, + 2.87253333729005694e-10, + -1.07808050032571528e-11, + 3.81284881654226068e-13, + -1.28093603642353558e-14, + 4.10204019397843741e-16, + -1.25788110724080130e-17, + 3.70894652259513788e-19, + -1.05197544832704759e-20, + 1.69790489415921377e-03, + -2.13431282275270117e-04, + 1.96441488049368279e-05, + -1.43040701308438844e-06, + 8.91559304498356851e-08, + -4.92200162282705471e-09, + 2.46188809023779823e-10, + -1.13248406366469062e-11, + 4.84263095178356506e-13, + -1.94086833700102756e-14, + 7.33553056305657095e-16, + -2.62762668982589066e-17, + 8.95703621179230149e-19, + -2.91236147080116504e-20, + 1.38499553106596158e-04, + -2.81833159984409533e-05, + 3.63885216681342302e-06, + -3.56953425267896364e-07, + 2.89507384229667971e-08, + -2.02722870615317721e-09, + 1.25920280414491697e-10, + -7.06550996114139162e-12, + 3.62842332144013342e-13, + -1.72219512967795324e-14, + 7.61273333896069365e-16, + -3.15306190648434627e-17, + 1.22973434885839382e-18, + -4.52962172946705896e-20, + 7.81891536751146831e-06, + -2.47327053445490555e-06, + 4.51402691070689928e-07, + -5.97029495914202436e-08, + 6.29296048409034011e-09, + -5.56410869711227932e-10, + 4.26083830226029937e-11, + -2.88798180466988350e-12, + 1.76003538783890465e-13, + -9.75977127436215566e-15, + 4.97039680117282855e-16, + -2.34221877719973273e-17, + 1.02759772055796802e-18, + -4.21319883292710259e-20, + 4.28598659966342268e-07, + -1.89741979269322314e-07, + 4.64509982478394411e-08, + -7.91001134960435174e-09, + 1.03745126022289457e-09, + -1.10979755320178023e-10, + 1.00437152858193560e-11, + -7.88729841098447730e-13, + 5.47541770965587828e-14, + -3.40825673592871774e-15, + 1.92373358695935092e-16, + -9.93572982612325537e-18, + 4.73103659922054208e-19, + -2.08673626482578919e-20, +# root=8 base[6]=15.0 */ + 2.38946154311171333e-01, + -3.23120436461254556e-03, + 4.81780210913074642e-05, + -7.75011487475361399e-07, + 1.23775496749209944e-08, + -2.08364572546893972e-10, + 3.86846035936375002e-12, + -2.50836798923973300e-14, + 1.72384694191118412e-15, + -2.17921621143859440e-17, + -1.09241432735071397e-18, + -4.13182347631949459e-20, + 8.81224100222465337e-23, + 2.88939626454871083e-23, + 1.41387685082078413e-01, + -2.85787552987125338e-03, + 7.97435235988446867e-05, + -2.11816159465795923e-06, + 5.28975409311714899e-08, + -1.25483914314779475e-09, + 2.86135661911581556e-11, + -6.42361343597715332e-13, + 1.34559578443656105e-14, + -2.86150625466644270e-16, + 6.22730215439111759e-18, + -1.07727822875522812e-19, + 2.32359904995015789e-21, + -5.42222200569849452e-23, + 4.89775184788492843e-02, + -1.69611695461865529e-03, + 7.29258076674694415e-05, + -2.64718026588941607e-06, + 8.82062429111630097e-08, + -2.73700039072626234e-09, + 8.02055292485987522e-11, + -2.27164333521974791e-12, + 6.01727843017945808e-14, + -1.56596333975180079e-15, + 4.00514225189313628e-17, + -9.35362961089561040e-19, + 2.25395437435973701e-20, + -5.34310041237351981e-22, + 9.72623646742102992e-03, + -5.76206201855571543e-04, + 3.42319072790336381e-05, + -1.65358617626560854e-06, + 7.16903157512584222e-08, + -2.83880213329581713e-09, + 1.04446893829326986e-10, + -3.62477607874391759e-12, + 1.18510419290234471e-13, + -3.70555620226142135e-15, + 1.11143416096892569e-16, + -3.18156703503700135e-18, + 8.83066220509592522e-20, + -2.36647851786703714e-21, + 1.07624663185392020e-03, + -1.06513916373467195e-04, + 8.59613951743401698e-06, + -5.53357059594308967e-07, + 3.10172811047024831e-08, + -1.55531366658762902e-09, + 7.12344019313607893e-11, + -3.02337709475422970e-12, + 1.19896008552150138e-13, + -4.48100857556785923e-15, + 1.58691492883245981e-16, + -5.34573271446561164e-18, + 1.72084377013379325e-19, + -5.30262375642839244e-21, + 6.49408361887095676e-05, + -1.06047016475340873e-05, + 1.18896636176193855e-06, + -1.03258901500581923e-07, + 7.54605763159465356e-09, + -4.81875285419205499e-10, + 2.75614370600633247e-11, + -1.43562544820396634e-12, + 6.89020280112492602e-14, + -3.07459925073356456e-15, + 1.28439563782706126e-16, + -5.05059454539286638e-18, + 1.87795639787662556e-19, + -6.62015170940910768e-21, + 2.24280602977687585e-06, + -6.02058460423836021e-07, + 9.73293055019955640e-08, + -1.16447718523697669e-08, + 1.12792347262186157e-09, + -9.27325421438176342e-11, + 6.66533799284328585e-12, + -4.27319804825711691e-13, + 2.47914798235754390e-14, + -1.31587608776808857e-15, + 6.44463342919400083e-17, + -2.93246444381039798e-18, + 1.24672035695947578e-19, + -4.96914221324115838e-21, + 6.21430839315082439e-08, + -2.58497316058891127e-08, + 5.99830565111207154e-09, + -9.77039142788106619e-10, + 1.23475884974614130e-10, + -1.28007304017416485e-11, + 1.12783627552579146e-12, + -8.65444926448371328e-14, + 5.88834786006694344e-15, + -3.60124127026842973e-16, + 2.00128525650727433e-17, + -1.01945127807420276e-18, + 4.79479150174333850e-20, + -2.09166172454274597e-21, +# root=8 base[7]=17.5 */ + 2.26737660063994456e-01, + -2.87989876760759433e-03, + 3.99445377583267761e-05, + -6.05404112811413142e-07, + 9.10957047573253477e-09, + -1.18825452781217058e-10, + 3.74126311915777554e-12, + 5.88800634460530042e-15, + -2.22781421310604420e-16, + -9.33201212532223205e-17, + -2.04649166611948051e-18, + 2.10668973783215526e-20, + 2.99104673641559095e-21, + 8.13299468298352308e-23, + 1.31089169153017410e-01, + -2.30890308943045280e-03, + 5.86815814234846646e-05, + -1.44060963740011903e-06, + 3.34278222690289562e-08, + -7.43288813120212846e-10, + 1.54041372742020303e-11, + -3.36204215410651302e-13, + 6.72728345827107495e-15, + -1.08072294978873102e-16, + 3.06363981888257067e-18, + -5.39540386329280062e-20, + 5.71246666684916880e-23, + -3.64499931251152619e-23, + 4.31878057235169296e-02, + -1.21935727922859588e-03, + 4.81088821783148352e-05, + -1.58749620271740645e-06, + 4.85016628202738840e-08, + -1.40048363563099164e-09, + 3.68986917778569865e-11, + -1.00380798584348095e-12, + 2.50079991690427120e-14, + -5.48702775614290341e-16, + 1.51218137345274175e-17, + -3.30508782523896484e-19, + 5.47288023709802127e-21, + -1.97089537864301625e-22, + 7.86622728530712162e-03, + -3.65798118365986903e-04, + 1.97600650088040351e-05, + -8.52672022876615944e-07, + 3.35454925606012900e-08, + -1.21967533872787128e-09, + 4.08251812374417745e-11, + -1.32269005924615675e-12, + 4.01780241699293114e-14, + -1.14895756698471160e-15, + 3.29441529969213722e-17, + -8.80724023014216969e-19, + 2.23416479083352664e-20, + -5.91013906459935832e-22, + 7.55085055297100840e-04, + -5.77465615407377972e-05, + 4.14459155710047660e-06, + -2.35577836616254064e-07, + 1.18876689020434991e-08, + -5.42444587738634529e-10, + 2.26856596501762265e-11, + -8.89350122278863575e-13, + 3.26856667732787456e-14, + -1.13496053589395168e-15, + 3.76885803518955522e-17, + -1.19118555585313898e-18, + 3.60686444594532185e-20, + -1.05418043689752659e-21, + 3.58585790817642379e-05, + -4.54914741255204084e-06, + 4.43821465000145670e-07, + -3.38975936597666841e-08, + 2.22230988636721101e-09, + -1.28866491014167032e-10, + 6.75250538984702324e-12, + -3.25070637084479685e-13, + 1.45127459461899049e-14, + -6.05883186150090583e-16, + 2.38125081151289591e-17, + -8.84857993315731660e-19, + 3.12241641847777137e-20, + -1.04890220572696147e-21, + 8.06641779192231768e-07, + -1.75231757233690682e-07, + 2.46448250391389809e-08, + -2.62392258162834235e-09, + 2.30491281638966863e-10, + -1.74179763400768340e-11, + 1.16299093485218013e-12, + -6.98717875636879277e-14, + 3.82650757697203036e-15, + -1.92914904867944776e-16, + 9.02264648005316790e-18, + -3.93894615627467804e-19, + 1.61329040840215764e-20, + -6.21767415034596181e-22, + 1.06502834393969090e-08, + -4.01677035976472577e-09, + 8.63129718719955156e-10, + -1.32156883531447313e-10, + 1.58772459351437386e-11, + -1.57806143148563688e-12, + 1.34180311059437593e-13, + -9.98850402217690088e-15, + 6.62060574150178536e-16, + -3.95814326319187824e-17, + 2.15633787635683116e-18, + -1.07937658342754927e-19, + 4.99853700307982602e-21, + -2.15071912434899208e-22, +# root=8 base[8]=20.0 */ + 2.15814466851310283e-01, + -2.58707291235968232e-03, + 3.34916071024456691e-05, + -4.73787473192186589e-07, + 7.62522978111141434e-09, + -3.14309775697100714e-11, + 3.21416362258889310e-12, + -6.58522350328602217e-14, + -4.34215694554361045e-15, + -1.00555309391823132e-16, + 3.30951589548252702e-18, + 2.35598715409391910e-19, + 4.08438555161578654e-21, + -1.48107599291086553e-22, + 1.22694469471218676e-01, + -1.90052087806832112e-03, + 4.41700559025143941e-05, + -1.00740537368883365e-06, + 2.16096940265792633e-08, + -4.65095371884936300e-10, + 8.56024199003445092e-12, + -1.64371279413885493e-13, + 4.43452584001774450e-15, + -3.78170467376853480e-17, + 2.37261975197703246e-19, + -8.00934990942431703e-20, + -5.10906835296636876e-22, + 3.98931579643150783e-23, + 3.89756300564775074e-02, + -8.99351253876245712e-04, + 3.29239964765326123e-05, + -9.95558314198871505e-07, + 2.74740640588459685e-08, + -7.76482268737169798e-10, + 1.77106560899454033e-11, + -4.27991058083928112e-13, + 1.31112271303748702e-14, + -1.87655934578975586e-16, + 3.51980352896400436e-18, + -2.40925435855363688e-19, + 1.35982662218717499e-22, + 3.03581156607478320e-23, + 6.66520039921382392e-03, + -2.41082879914937835e-04, + 1.20868016658125778e-05, + -4.68247413824173500e-07, + 1.65667665531242905e-08, + -5.69721145935614175e-10, + 1.70221844365960251e-11, + -5.05103912419386014e-13, + 1.54155818739939246e-14, + -3.76321551280467126e-16, + 9.75920338670999238e-18, + -3.03874856573980016e-19, + 5.53098241373617482e-21, + -1.29960499146593925e-22, + 5.76185634229570772e-04, + -3.33312546743372320e-05, + 2.17778817992177739e-06, + -1.09322691207648562e-07, + 4.94799610868123765e-09, + -2.08042543315639056e-10, + 7.88677076625866141e-12, + -2.84666643301913343e-13, + 9.84339184194945719e-15, + -3.13067858551798518e-16, + 9.70392262246333722e-18, + -2.94696088908310862e-19, + 8.14401256409826462e-21, + -2.25795112802666770e-22, + 2.28390674773754356e-05, + -2.17212481094539711e-06, + 1.87223365721603920e-07, + -1.25103760089758393e-08, + 7.33036407392969194e-10, + -3.86262898732830426e-11, + 1.84502437408563206e-12, + -8.18154566200555731e-14, + 3.39274469064877097e-15, + -1.31814032241870123e-16, + 4.85715574291891670e-18, + -1.70191136201281517e-19, + 5.66500349189126568e-21, + -1.80833126638072789e-22, + 3.63540500354768261e-07, + -6.04671875446253352e-08, + 7.34312821272651814e-09, + -6.85672266581141916e-10, + 5.40096120187443829e-11, + -3.71540841529502280e-12, + 2.28239462715649669e-13, + -1.27396017928576978e-14, + 6.53320999067302981e-16, + -3.10457410851814143e-17, + 1.37691552880926353e-18, + -5.72948378550260223e-20, + 2.24670812432218796e-21, + -8.32576598212885433e-23, + 2.29592875989342585e-09, + -7.40360482549271162e-10, + 1.42867729025730016e-10, + -2.00909963160863060e-11, + 2.25431059563481307e-12, + -2.11803377027699779e-13, + 1.71815171456118907e-14, + -1.22907324952027739e-15, + 7.87380808616707198e-17, + -4.57112541864138613e-18, + 2.42754387373481766e-19, + -1.18831246668556035e-20, + 5.39600567523491389e-22, + -2.28185324108213995e-23, +# root=8 base[9]=22.5 */ + 2.05968927180916028e-01, + -2.33983270576158288e-03, + 2.85285513707155492e-05, + -3.53560485444445662e-07, + 7.52838026831787588e-09, + 5.99041987618018010e-12, + -8.10397791173652580e-13, + -2.15335388220200277e-13, + -2.91736219422872846e-15, + 2.43624205043070361e-16, + 1.21199366551754801e-17, + -3.07368721475288859e-20, + -1.95002701176997197e-20, + -5.56099643092380147e-22, + 1.15729993325549549e-01, + -1.59027912955943154e-03, + 3.38812999633401061e-05, + -7.26196131316707603e-07, + 1.40666677312331052e-08, + -3.00207515829958114e-10, + 5.71289926718620435e-12, + -4.92476478425094792e-14, + 2.42291261490369358e-15, + -9.23076973972361480e-17, + -2.33288349638400152e-18, + 1.05381469960266125e-20, + 5.11067761532563646e-21, + 1.12902895831518359e-22, + 3.58385086851341350e-02, + -6.77320368068659671e-04, + 2.31678959762278522e-05, + -6.60411678467398254e-07, + 1.54447392656124889e-08, + -4.53594405856261605e-10, + 1.06621399566234480e-11, + -1.09266651576166008e-13, + 6.49158881807759533e-15, + -2.35614525182707010e-16, + -4.46356963892386517e-18, + -2.78471861058283877e-20, + 1.14015466867940733e-20, + 2.88960200257687538e-22, + 5.86404764695621413e-03, + -1.63100235148235553e-04, + 7.74309819235096708e-06, + -2.76081804201197748e-07, + 8.35500553153021860e-09, + -2.85556736754020439e-10, + 8.15451939812940569e-12, + -1.75351571544511511e-13, + 6.27526005085379296e-15, + -1.88360780610385267e-16, + 1.16517157134180714e-18, + -8.51332675809632154e-20, + 5.47387698440942035e-21, + 7.47305177869724456e-23, + 4.70950210551721276e-04, + -2.00712398055855400e-05, + 1.23081985224151381e-06, + -5.53381908527909481e-08, + 2.18215344645991826e-09, + -8.70714747878216407e-11, + 3.04662082134131540e-12, + -9.49436263459442097e-14, + 3.24239577601622478e-15, + -1.00383555170520018e-16, + 2.45170371648363621e-18, + -7.83408934611687751e-20, + 2.46795839064813767e-21, + -3.64986269329868671e-23, + 1.64152852141863796e-05, + -1.12166289913149528e-06, + 8.80729902014905703e-08, + -5.15962647290984033e-09, + 2.66483352596255066e-10, + -1.29022382506250771e-11, + 5.62025344928196318e-13, + -2.26195768490614240e-14, + 8.79180477340702983e-16, + -3.18604583681570054e-17, + 1.07671472710491339e-18, + -3.60264357483884070e-20, + 1.14178383938652525e-21, + -3.30984319200548552e-23, + 2.02208732192551568e-07, + -2.41238020209787905e-08, + 2.56000899552420328e-09, + -2.07410274699477549e-10, + 1.44853541886104854e-11, + -9.02811957506366167e-13, + 5.06198031462710503e-14, + -2.60250199228956230e-15, + 1.24269145319874323e-16, + -5.52681560008653155e-18, + 2.30672161490255148e-19, + -9.10315221996516657e-21, + 3.39647401185068886e-22, + -1.20149127795840769e-23, + 6.65858984383914682e-10, + -1.67470580474089589e-10, + 2.81127294395432779e-11, + -3.53005492558359400e-12, + 3.62102113814118675e-13, + -3.16181703512923923e-14, + 2.41233822742305884e-15, + -1.63875779108059240e-16, + 1.00466854279816963e-17, + -5.61600675547942052e-19, + 2.88645440977765994e-20, + -1.37332191448611819e-21, + 6.08244197224925266e-23, + -2.51643108496973165e-24, +# root=8 base[10]=25.0 */ + 1.97042064039465031e-01, + -2.12653573310388156e-03, + 2.50033101184003413e-05, + -2.35310661711805457e-07, + 6.95614362697704133e-09, + -8.53264210005261253e-11, + -6.27013755265889451e-12, + -9.66492629342506118e-14, + 1.13120215759144610e-14, + 3.78652399371741030e-16, + -1.26076246138809527e-17, + -9.20632561103280677e-19, + 3.67323145403169479e-21, + 1.69319318496316657e-21, + 1.09860645397366216e-01, + -1.35066976783573345e-03, + 2.63423420289413083e-05, + -5.42069131221654765e-07, + 9.35215050812152888e-09, + -1.74488408701043965e-10, + 4.82005000442260661e-12, + -3.72326393778716635e-14, + -1.74747638890489916e-15, + -9.85494822019739469e-17, + 3.60560919693351412e-18, + 2.03752916233291724e-19, + -2.01317312448780125e-21, + -4.04010890008908283e-22, + 3.34548531202902427e-02, + -5.20078958663590667e-04, + 1.64692477804855869e-05, + -4.72697041693655243e-07, + 8.76790889840086159e-09, + -2.19870754298071504e-10, + 9.03009866338151614e-12, + -6.30612053456143537e-14, + -3.81028865114289624e-15, + -2.53543577546529354e-16, + 7.71610076181515277e-18, + 4.85540844083467818e-19, + -1.50476694924953660e-21, + -9.27538150697178239e-22, + 5.31726870215450554e-03, + -1.12506677248059591e-04, + 5.07442544282690557e-06, + -1.78796320891908890e-07, + 4.29479470002667953e-09, + -1.32108877486320253e-10, + 5.08276365414283164e-12, + -7.63699457883150743e-14, + 1.92843476209547518e-16, + -1.33292585626380305e-16, + 3.48222191127021565e-18, + 1.55861017614214137e-19, + 6.70888075292327334e-22, + -3.38919224180795435e-22, + 4.06844030042700271e-04, + -1.23976680804294806e-05, + 7.29606159449263598e-07, + -3.11125106511076601e-08, + 1.00503465946631968e-09, + -3.69233993103621703e-11, + 1.40267081454084863e-12, + -3.49646109751546237e-14, + 8.39978169335516553e-16, + -4.18405333414915251e-17, + 1.07301841758004933e-18, + 2.67560697516190525e-21, + 7.08418268331659503e-22, + -5.44064458146462735e-23, + 1.30270677768555619e-05, + -6.07983936759197648e-07, + 4.51229963325764474e-08, + -2.39667484344205508e-09, + 1.04835016024531594e-10, + -4.65928238840741681e-12, + 1.95290246609931992e-13, + -6.86055256456316764e-15, + 2.37345208940692802e-16, + -8.91319392332863909e-18, + 2.74737557342532150e-19, + -7.08361180601732561e-21, + 2.63923842391847899e-22, + -8.70529022972222837e-24, + 1.35085185283469003e-07, + -1.06996161059290320e-08, + 1.02729166216522903e-09, + -7.26318035797743415e-11, + 4.39950431147475492e-12, + -2.48364373696572538e-13, + 1.27696269131464788e-14, + -5.95485597263954124e-16, + 2.62665145681620822e-17, + -1.10113724341392026e-18, + 4.27093140936843400e-20, + -1.57077979902395225e-21, + 5.66179247207336257e-23, + -1.90509574764238128e-24, + 2.71886519085364100e-10, + -4.68755165842139307e-11, + 6.74718277767621193e-12, + -7.35331842829961913e-13, + 6.72680661975484361e-14, + -5.36477244021367891e-15, + 3.78989089327035568e-16, + -2.40992065580588679e-17, + 1.39769493067565979e-18, + -7.44947089136604834e-20, + 3.67148401182624198e-21, + -1.68491703945033946e-22, + 7.23472380631468742e-24, + -2.91053071548996496e-25, +# root=8 base[11]=27.5 */ + 1.88920522184168077e-01, + -1.93609607245165643e-03, + 2.27640852162194951e-05, + -1.45911952969985604e-07, + 3.77212055212001363e-09, + -2.19975546177652391e-10, + -2.93989541544056993e-12, + 3.23132590824568721e-13, + 8.90942250326286584e-15, + -5.75319831418046088e-16, + -2.03915128098467916e-17, + 9.52572742197841952e-19, + 4.46368737832245079e-20, + -1.48669531254122567e-21, + 1.04841536713826122e-01, + -1.16363328089418776e-03, + 2.06392080816944295e-05, + -4.14564894306202827e-07, + 6.89299681784078354e-09, + -7.95602358711325905e-11, + 2.74010806642403276e-12, + -1.09198172155171646e-13, + -1.31608990556633022e-15, + 1.28930004985658588e-16, + 4.27178946536665623e-18, + -2.39175746036136972e-19, + -8.86528532911654846e-21, + 3.95249544898988470e-22, + 3.16051377275888903e-02, + -4.08891541386077501e-04, + 1.15292145812164490e-05, + -3.56742461297954040e-07, + 6.29843599045166516e-09, + -4.35138367642073053e-11, + 4.81439710146948000e-12, + -2.38173540997857223e-13, + -3.70975608305798900e-15, + 2.91342742290742828e-16, + 1.15991244421583485e-17, + -5.24377665432341472e-19, + -2.44208810970253653e-20, + 8.01540145701402258e-22, + 4.93627844846775306e-03, + -7.94867773261036627e-05, + 3.27339112263042127e-06, + -1.25348471073165865e-07, + 2.68855660330897580e-09, + -3.82554244199352409e-11, + 2.56978149663009894e-12, + -1.08844166824764288e-13, + -8.47277252743318955e-16, + 8.75093475112566484e-17, + 4.86725200744206817e-18, + -1.86959072700647844e-19, + -9.47061262036014358e-21, + 2.55294129261534595e-22, + 3.66887600905968796e-04, + -7.82657345348706078e-06, + 4.33483968619653182e-07, + -1.94036689537841386e-08, + 5.34811515496589365e-10, + -1.30552917722149847e-11, + 6.34974461184324929e-13, + -2.35127881846408612e-14, + 1.46839934795025979e-16, + 2.82244246197434072e-18, + 9.15809515133710556e-19, + -2.75327463828400201e-20, + -1.27046983189821120e-21, + 2.33992508197850867e-23, + 1.11676224287850573e-05, + -3.39225575603061826e-07, + 2.40285825775534538e-08, + -1.26316292756495071e-09, + 4.63738051121411178e-11, + -1.65174013181491474e-12, + 7.37144585668923481e-14, + -2.72487747791266603e-15, + 6.25127827203061179e-17, + -1.83600443664056931e-18, + 1.07772638375957089e-19, + -2.84693301231263497e-21, + -2.22214456065700214e-23, + -8.96106553872248723e-25, + 1.04503711832597790e-07, + -5.06281474167700388e-09, + 4.55873037699483533e-10, + -2.96616878561017052e-11, + 1.51605566245844167e-12, + -7.44732572159437538e-14, + 3.65671078617894244e-15, + -1.58264140970265339e-16, + 6.00622490507302365e-18, + -2.34581412254544505e-19, + 9.37757564115456207e-21, + -3.09146192764861604e-22, + 8.76997757033507529e-24, + -3.33008919559601301e-25, + 1.54528407755835199e-10, + -1.56965470085922337e-11, + 1.97957961199653146e-12, + -1.85730652954661359e-13, + 1.46716271687280291e-14, + -1.04840404872774534e-15, + 6.80074036837395482e-17, + -3.98733572021174193e-18, + 2.14888618805991188e-19, + -1.08261208998249558e-20, + 5.08842361489929859e-22, + -2.22199059954570902e-23, + 9.13695323612914297e-25, + -3.58113783413587508e-26, +# root=8 base[12]=30.0 */ + 1.81530270531868876e-01, + -1.76030375856275011e-03, + 2.12268542771020574e-05, + -1.21212750936489402e-07, + -5.27315066465277491e-10, + -1.72000786123409171e-10, + 6.45799779486829799e-12, + 2.23598922677588029e-13, + -1.35013704795333369e-14, + -3.20112291454020848e-16, + 2.84370196270545624e-17, + 3.66859392800316264e-19, + -5.66544801246173267e-20, + -2.28698706412806559e-22, + 1.00488234244591898e-01, + -1.01664684869154473e-03, + 1.62823093763027415e-05, + -3.14496826202838442e-07, + 5.70775079872202964e-09, + -5.03743367825583012e-11, + -1.14313494826615747e-13, + -6.84085326558907459e-14, + 3.40565528654010879e-15, + 5.75440340345589487e-17, + -6.35275749917765849e-18, + -5.52267275770476508e-20, + 1.24404851657148296e-20, + -1.73224746427085905e-23, + 3.01292950345566773e-02, + -3.32105380608512500e-04, + 7.83810954681259013e-06, + -2.59015661413122780e-07, + 6.02249519401768253e-09, + -9.89685905085455568e-12, + -1.62853195138021209e-12, + -1.56856791552580987e-13, + 7.98306208916482075e-15, + 1.65421778131027720e-16, + -1.53480809585637629e-17, + -2.07394578239763660e-19, + 3.10500911466777726e-20, + 1.33370243358456550e-22, + 4.66215592668357912e-03, + -5.86266735787693239e-05, + 2.01005375572407351e-06, + -8.61462000013201473e-08, + 2.29314100692941205e-09, + -1.24673694409751252e-11, + -2.36193172101408370e-13, + -6.91382983350383265e-14, + 3.15152275760034614e-15, + 6.05618407413191240e-17, + -5.48964121420531157e-18, + -9.55285267829023591e-20, + 1.16453895862846922e-20, + 8.79271812572627075e-23, + 3.41227056038975371e-04, + -5.16013590264090743e-06, + 2.45465426229033545e-07, + -1.23187010697729163e-08, + 3.76600877718144849e-10, + -4.91247754809610032e-12, + 9.04858488860774892e-14, + -1.32209934947428499e-14, + 5.16836462337070423e-16, + 6.54391034979068524e-18, + -6.58739744493492572e-19, + -1.79665408889023323e-20, + 1.63164373471997006e-21, + 1.93635565641995330e-23, + 1.01143215221658539e-05, + -1.97015428804120258e-07, + 1.24814321775805763e-08, + -7.11751109611873343e-10, + 2.58474055066289526e-11, + -6.09799162901735035e-13, + 1.99249414109472583e-14, + -1.20868025162636248e-15, + 4.21407048861935226e-17, + -1.39559057278387214e-19, + -1.48005370513469509e-20, + -1.62603617148968274e-21, + 9.39647711319713466e-23, + 1.33562440249234805e-24, + 8.97565162465691789e-08, + -2.51561911502266757e-09, + 2.08416233965169802e-10, + -1.37470991288680526e-11, + 6.32015804077726341e-13, + -2.39352801838603708e-14, + 1.03690715591659547e-15, + -4.98062651085882288e-17, + 1.84999805312082138e-18, + -4.73009090707511360e-20, + 1.50915872827421274e-21, + -8.73166322677988164e-23, + 3.18245568584665478e-24, + -1.69873279122662252e-26, + 1.13381608742553908e-10, + -5.94603367088829435e-12, + 6.76684823249215344e-13, + -5.75592340040982858e-14, + 3.86168402240659545e-15, + -2.34830179631150708e-16, + 1.38587103261035933e-17, + -7.64241688359546204e-19, + 3.77385263706152620e-20, + -1.71450152442767581e-21, + 7.61365806657525662e-23, + -3.28909221801402785e-24, + 1.28768676115818275e-25, + -4.49498155618129666e-27, +# root=8 base[13]=32.5 */ + 1.74819003101188197e-01, + -1.59665052908757737e-03, + 1.96389983863009332e-05, + -1.47557126970994190e-07, + -2.17914361696769234e-09, + 6.44571780660381264e-12, + 6.46637761716105410e-12, + -1.85354395831848887e-13, + -7.05328986861442883e-15, + 4.84093830797964798e-16, + 2.02588083769010400e-18, + -9.10909413496592971e-19, + 1.62818613968559581e-20, + 1.26721033492651800e-21, + 9.66603488148773671e-02, + -9.00011551110329613e-04, + 1.30213346876625342e-05, + -2.31803893745648197e-07, + 4.58320428526198921e-09, + -6.35676913543760376e-11, + -5.23353211817690624e-13, + 2.91108909448638093e-14, + 1.65485192945363248e-15, + -1.09358502008166145e-16, + -1.39506126787708725e-19, + 1.90915067504589358e-19, + -3.99798659658555857e-21, + -2.43309566198302400e-22, + 2.89088671071023005e-02, + -2.80229166288724059e-04, + 5.29190916115294766e-06, + -1.67308298741532559e-07, + 5.23499482116878459e-09, + -7.15352896154441995e-11, + -2.37653252938217066e-12, + 8.15116341193281307e-14, + 4.20077920025317519e-15, + -2.70307537375906409e-16, + -1.05416027164602305e-18, + 4.98076912705702854e-19, + -8.82700522903322502e-21, + -6.98347617298302723e-22, + 4.45411309909124736e-03, + -4.60808706858971051e-05, + 1.18593523336532717e-06, + -5.22013980483152489e-08, + 1.89208755016151970e-09, + -2.94991627226065420e-11, + -7.36010319309612719e-13, + 2.52055707413094773e-14, + 1.72198774630389361e-15, + -1.03003132588041179e-16, + -4.98141813872348609e-19, + 1.89708997641222816e-19, + -3.01988991609087534e-21, + -2.81328371088893893e-22, + 3.23712878885581209e-04, + -3.69245958864489759e-06, + 1.30673922916555192e-07, + -7.05246164321595180e-09, + 2.79953646105715283e-10, + -5.29133218771612020e-12, + -5.12893174477007069e-14, + 1.79060500970283080e-15, + 2.85202304837161171e-16, + -1.50231010076440060e-17, + -7.67193239442550086e-20, + 2.63985901884420389e-20, + -3.47335475370984558e-22, + -4.30041655087165166e-23, + 9.48072879592094174e-06, + -1.25101993888370331e-07, + 6.07837988986091659e-09, + -3.78660559649400765e-10, + 1.64382619725884642e-11, + -3.96039140546415171e-13, + 2.97444293324055632e-15, + -1.15519889027268680e-16, + 2.10221499401784391e-17, + -9.18913884175354765e-19, + -1.73045398465499984e-21, + 1.27615280933732828e-21, + -9.66926966639617361e-24, + -2.59155674792948597e-24, + 8.21873539203902919e-08, + -1.36576464971438744e-09, + 9.16633868476687129e-11, + -6.48338809039412120e-12, + 3.18157636780592710e-13, + -1.03911232138749212e-14, + 2.66966652605650749e-16, + -1.12541432816343301e-17, + 6.73097248716995640e-19, + -2.53547393721981296e-20, + 3.02652348963145939e-22, + 8.43483217520098034e-24, + 3.50324729514081689e-25, + -5.88719562063039164e-26, + 9.71755604974088441e-11, + -2.51273176501700251e-12, + 2.45014815163733956e-13, + -2.06624256097762041e-14, + 1.27983676460147329e-15, + -6.39599246166422176e-17, + 3.05755373326406096e-18, + -1.57031850447534693e-19, + 7.91872488733493545e-21, + -3.40948055450372641e-22, + 1.23151266232556823e-23, + -4.41373757975845983e-25, + 1.90570752240373116e-26, + -8.28218493816394489e-28, +# root=8 base[14]=35.0 */ + 1.68734643667689060e-01, + -1.44715935809965816e-03, + 1.76851932378563169e-05, + -1.74984792008157789e-07, + -9.85375265947148130e-10, + 8.89254581521143257e-11, + 4.88663237976773910e-13, + -1.75289015853393953e-13, + 5.24109918620040654e-15, + 1.08394500892548302e-16, + -1.19849510372022117e-17, + 2.13371853497847515e-19, + 1.23780442372130814e-20, + -7.40671879105768089e-22, + 9.32526558612509493e-02, + -8.05820227986748247e-04, + 1.06364293909773062e-05, + -1.68985375735293351e-07, + 3.26869882848165627e-09, + -6.37121706168283287e-11, + 5.07233799965026803e-13, + 2.99824239312838864e-14, + -1.04528852855718005e-15, + -2.33682091209054126e-17, + 2.56824789865498558e-18, + -4.88589917360307130e-20, + -2.42657318213004097e-21, + 1.54788517081498172e-22, + 2.78617526404437918e-02, + -2.44625066629485996e-04, + 3.73205212930245610e-06, + -9.71545789727503481e-08, + 3.46095131652489659e-09, + -9.44056907370025262e-11, + 4.63457164659635600e-13, + 8.42301587193550347e-14, + -2.68152703899380412e-15, + -6.24684399104339578e-17, + 6.61401091850455601e-18, + -1.17197727263581766e-19, + -6.80132401376557738e-21, + 4.06114144825692459e-22, + 4.28545868436056281e-03, + -3.86339848946572995e-05, + 7.19412620663278344e-07, + -2.72981073905768628e-08, + 1.20087352952536089e-09, + -3.56960376962793744e-11, + 2.32150359100620981e-13, + 2.95467739388044919e-14, + -9.46694252629012906e-16, + -2.55127409312617374e-17, + 2.53695025770608143e-18, + -4.31094876427823166e-20, + -2.69629677225333331e-21, + 1.55874957779654194e-22, + 3.10594354617866187e-04, + -2.91777811885769399e-06, + 6.92886072542188831e-08, + -3.45731551086283154e-09, + 1.69166822430583837e-10, + -5.36283989606744134e-12, + 5.18268151671098116e-14, + 3.43344808893799853e-15, + -1.11678943597689759e-16, + -4.12467725760026270e-18, + 3.65511640811464227e-19, + -5.87199957318608184e-21, + -3.98870358233785553e-22, + 2.21660521795448929e-23, + 9.05434547781001546e-06, + -9.07574606068864254e-08, + 2.86316487274279634e-09, + -1.75244968329128631e-10, + 9.23849100256055043e-12, + -3.16142071993160144e-13, + 4.62361557299265664e-15, + 1.02466308354626307e-16, + -3.32619917070729911e-18, + -2.85152454889209474e-19, + 2.05990967796827767e-20, + -3.14877453634220216e-22, + -2.18104633213238044e-23, + 1.16635147014005203e-24, + 7.78018923961321130e-08, + -8.71042748413513360e-10, + 3.84664234773960207e-11, + -2.78050414170285146e-12, + 1.58246683765326198e-13, + -6.07295950768859817e-15, + 1.37012100528371908e-16, + -1.29376661720272175e-18, + 5.59144202228686133e-20, + -8.00482446833524163e-21, + 4.25323010867432184e-22, + -7.30736173027961583e-24, + -3.03407400734208883e-25, + 1.69982092069844442e-26, + 8.98633874544433713e-11, + -1.27335826083348708e-12, + 8.75260751782384517e-14, + -7.52914021778405251e-15, + 4.88176779672478426e-16, + -2.33661093745770310e-17, + 8.78673707918675790e-19, + -3.16550968876923330e-20, + 1.44542568904937011e-21, + -7.50954024463165260e-23, + 3.24801636751231269e-24, + -9.82815251850209285e-26, + 1.91502648654973089e-27, + -4.49888467863237008e-29, +# root=8 base[15]=37.5 */ + 1.63215467153135951e-01, + -1.31421262462316215e-03, + 1.55478394165060059e-05, + -1.77195138844292098e-07, + 6.15883460676018685e-10, + 6.15793374885700871e-11, + -2.00840788067252747e-12, + -1.38096060139452526e-14, + 3.49643513524787130e-15, + -1.22306152933792035e-16, + -8.26840627620318866e-20, + 1.75643057410955261e-19, + -6.73707452645563508e-21, + 1.71426585546230138e-23, + 9.01878492256714265e-02, + -7.28042425084436976e-04, + 8.88309915491839274e-06, + -1.26005261309276336e-07, + 2.16353605238355582e-09, + -4.54393401360863590e-11, + 8.63390810251816480e-13, + -2.33160078995469505e-15, + -6.88206627745199772e-16, + 2.54649479983750964e-17, + 1.54810292408151022e-20, + -3.67379665165700719e-20, + 1.42190841733262905e-21, + -5.14848183583905153e-24, + 2.69367301809887022e-02, + -2.18627032542741199e-04, + 2.83984293088438920e-06, + -5.56636347353269937e-08, + 1.82181573489102366e-09, + -6.52453393937688860e-11, + 1.57179442621827956e-12, + 3.93347690593454087e-16, + -1.80712136976906868e-15, + 6.54076000560922875e-17, + 7.03265290130826466e-20, + -9.67208415517600803e-20, + 3.69927377742149592e-21, + -9.24314735694567868e-24, + 4.14075215105865271e-03, + -3.39135195124323191e-05, + 4.85149152343223277e-07, + -1.32779855129485565e-08, + 5.90561982166759399e-10, + -2.38865840844257143e-11, + 6.08825312437849637e-13, + -7.90675248890776201e-16, + -6.57052773729018066e-16, + 2.41882300422131023e-17, + 4.41179835639917036e-20, + -3.73889317300485309e-20, + 1.41700539717361484e-21, + -2.71850502738714730e-24, + 2.99824028628725605e-04, + -2.49099011553296858e-06, + 4.07900240968299124e-08, + -1.51659155534459541e-09, + 7.97813116323192155e-11, + -3.42198320457537362e-12, + 9.18054186673804724e-14, + -3.84957640159373745e-16, + -8.38652452171500503e-17, + 3.19145077573465426e-18, + 1.14035782633175435e-20, + -5.41190325809558821e-21, + 2.02020163707731046e-22, + -2.45834540599060762e-25, + 8.72677557284585381e-06, + -7.41887008477214531e-08, + 1.45997584370174247e-09, + -7.12960926026098341e-11, + 4.17317856597742062e-12, + -1.87464497406722251e-13, + 5.38095308677665226e-15, + -4.66000198529213134e-17, + -3.47300195732268022e-18, + 1.41529691229443330e-19, + 1.24978361451493862e-21, + -3.00908558092122608e-22, + 1.09418323546573854e-23, + -7.53652376744692073e-27, + 7.47718573736622454e-08, + -6.61857680113191428e-10, + 1.68323563573020595e-11, + -1.05264789029478233e-12, + 6.70196024928712283e-14, + -3.18455698090012577e-15, + 1.01555380510841312e-16, + -1.59434049412279706e-18, + -2.08572068019014536e-20, + 1.14647183822039541e-21, + 5.07838597373303271e-23, + -5.64173513166120285e-24, + 1.96966428417601077e-25, + -4.95101975831548866e-28, + 8.57466950970908023e-11, + -8.31039215564510512e-13, + 3.16793295681388969e-14, + -2.54309095099015997e-15, + 1.79023001082590503e-16, + -9.47160270256385044e-18, + 3.70295158031713635e-19, + -1.06231496031274990e-20, + 2.50381848217172527e-22, + -8.93836747885039564e-24, + 5.56774642403167749e-25, + -2.97628355131286539e-26, + 1.05059322296958029e-27, + -1.86931691681135306e-29, +# root=8 base[16]=40.0 */ + 1.56815600396265187e-01, + -1.86728295126894648e-03, + 3.31724009106351548e-05, + -6.27333813748390939e-07, + 9.49916410064959545e-09, + 9.17248145194094746e-11, + -1.89360276884251316e-11, + 9.53116791422042791e-13, + -1.18570348470806136e-14, + -2.03257953408122127e-15, + 1.81175809633345520e-16, + -6.67365700061666618e-18, + -7.14275288524506940e-20, + 2.43262361627511547e-20, + 8.66468872675466850e-02, + -1.03232983958373350e-03, + 1.84856261784107656e-05, + -3.73519371132508372e-07, + 8.52905384738345196e-09, + -2.43604158727046729e-10, + 8.73875116794587075e-12, + -2.95039796695902783e-13, + 4.03343268698636602e-15, + 4.13009897639676845e-16, + -3.80536955679641459e-17, + 1.39226126338426627e-18, + 1.53553648428053175e-20, + -5.05545616433144279e-21, + 2.58762109449279000e-02, + -3.08664590735661340e-04, + 5.62028805222299123e-06, + -1.28719040893101470e-07, + 4.64752797788812691e-09, + -2.61905109390245787e-10, + 1.50282001815383016e-11, + -6.26855327096886237e-13, + 8.89132994921244946e-15, + 1.05962187247080555e-15, + -9.81498597850569767e-17, + 3.63595262477064867e-18, + 3.97124232981130499e-20, + -1.33652470511102916e-20, + 3.97697045726497830e-03, + -4.75345984546239264e-05, + 8.89571425231950574e-07, + -2.42381815757970924e-08, + 1.26199641029755498e-09, + -8.99226805669672800e-11, + 5.60720607655113172e-12, + -2.42914815852388260e-13, + 3.81353051851091871e-15, + 3.83632051985230452e-16, + -3.68584392882341937e-17, + 1.38006036607345238e-18, + 1.54136512317662257e-20, + -5.15802588529907438e-21, + 2.87877633588594535e-04, + -3.45175879025766948e-06, + 6.73594708234332714e-08, + -2.27050722034398293e-09, + 1.55306168693415933e-10, + -1.23745390418511398e-11, + 8.02260744508338609e-13, + -3.58774942223630999e-14, + 6.48895035035290442e-16, + 4.88284789985342884e-17, + -5.02832293532334356e-18, + 1.91231095035248696e-19, + 2.28078614567430078e-21, + -7.40543921124659334e-22, + 8.37492580812791773e-06, + -1.00930051374767746e-07, + 2.09981379020763861e-09, + -9.06824220928979982e-11, + 7.61054999209771997e-12, + -6.48704608089034735e-13, + 4.34007082876005378e-14, + -2.02323675571509049e-15, + 4.41080878757456252e-17, + 2.03231224695030356e-18, + -2.43499141724716114e-19, + 9.47221278192869978e-21, + 1.36091855946883593e-22, + -4.00254181698562802e-23, + 7.16935043401692065e-08, + -8.71752036887060140e-10, + 2.01246618385937887e-11, + -1.16029957130761940e-12, + 1.14434023783910481e-13, + -1.02945939329403126e-14, + 7.16498364310278208e-16, + -3.56927477032076159e-17, + 9.98539542227154660e-19, + 1.39704740436096677e-20, + -3.02175203112783399e-21, + 1.20724226552737324e-22, + 3.09208549549877471e-24, + -6.79754342642626790e-25, + 8.20449356623010864e-11, + -1.01770259395676373e-12, + 2.87558140485071942e-14, + -2.38674231996818581e-15, + 2.73090212542196000e-16, + -2.63161290463419584e-17, + 1.97762641956279973e-18, + -1.12794970429545307e-19, + 4.56687859999890952e-21, + -1.04692853957422290e-22, + -2.65516032781068460e-27, + -4.51926863535539266e-26, + 2.32448953410297822e-26, + -2.51118725096330254e-27, +# root=8 base[17]=44.0 */ + 1.49833228116970474e-01, + -1.62941289179202174e-03, + 2.65586960256432104e-05, + -4.77545903193694570e-07, + 8.58010616540992614e-09, + -1.16544885906197753e-10, + -1.71019595139014831e-12, + 2.77421776067638097e-13, + -1.61405233076598725e-14, + 5.62759900251647828e-16, + -3.49886845748069216e-18, + -1.08054901354733954e-18, + 8.57927759741811339e-20, + -3.57514857613093466e-21, + 8.27878153777444614e-02, + -9.00362621071350419e-04, + 1.46914931093981683e-05, + -2.67086510933011752e-07, + 5.18978690734560245e-09, + -1.12348858249229924e-10, + 3.07835835343216752e-12, + -1.12123365151775538e-13, + 4.39895210295299651e-15, + -1.33355588492183386e-16, + 7.95450128523814806e-19, + 2.32786102850692365e-19, + -1.81389147889748364e-20, + 7.41537905365112610e-22, + 2.47230824705291195e-02, + -2.68913808720375896e-04, + 4.39809252756825744e-06, + -8.18107550638339002e-08, + 1.83565312574348144e-09, + -6.41453080557985784e-11, + 3.49346181296127252e-12, + -2.03968390324429271e-13, + 9.92308379900087494e-15, + -3.31391152394399368e-16, + 2.41598187741476628e-18, + 5.81935044723202642e-19, + -4.68586672673378658e-20, + 1.95908717052258434e-21, + 3.79957492876422482e-03, + -4.13375237637092776e-05, + 6.78677464986566219e-07, + -1.31003263502103988e-08, + 3.55855637112823126e-10, + -1.77837214016951145e-11, + 1.20718804827792337e-12, + -7.60586222595194497e-14, + 3.80920447646292957e-15, + -1.30350502502753959e-16, + 1.14792341038569811e-18, + 2.13757930086257450e-19, + -1.77403576513049258e-20, + 7.52463621937966319e-22, + 2.75017374859923985e-04, + -2.99312164745302503e-06, + 4.94365805079873369e-08, + -1.00840762783150717e-09, + 3.42212069002493121e-11, + -2.20279205358794975e-12, + 1.65456024404586253e-13, + -1.07732999004708618e-14, + 5.49814289754000108e-16, + -1.93572922767866724e-17, + 2.14366427649135106e-19, + 2.81309020222241952e-20, + -2.45795315853484981e-21, + 1.06573172628319230e-22, + 7.99989533100615322e-06, + -8.71151185489730653e-08, + 1.45255197317540017e-09, + -3.21409653327640003e-11, + 1.39357516412037416e-12, + -1.07585801468857691e-13, + 8.57200749680546190e-15, + -5.71613394452533898e-16, + 2.98151987085740590e-17, + -1.09400385992135805e-18, + 1.58749717471963797e-20, + 1.27334356727115307e-21, + -1.23040933735035402e-22, + 5.53512807290179535e-24, + 6.84695255804883294e-08, + -7.46322513774925349e-10, + 1.26471130040463062e-11, + -3.17183912542720369e-13, + 1.79797816519971143e-14, + -1.59361228211793007e-15, + 1.32773328960283992e-16, + -9.09656376901832264e-18, + 4.90769536640588856e-19, + -1.92581374706959751e-20, + 3.85995696400950370e-22, + 1.32367420757973338e-23, + -1.69016888134514284e-24, + 8.17678898746391713e-26, + 7.83208162925564248e-11, + -8.55463409150056675e-13, + 1.50011980312298874e-14, + -4.69834486096545418e-16, + 3.63794290875928489e-17, + -3.64104985978040740e-18, + 3.19500806815252808e-19, + -2.29825542193764888e-20, + 1.33008156421000776e-21, + -5.96015052134815748e-23, + 1.82546762353637296e-24, + -1.60197492946816594e-26, + -2.05139427761506227e-27, + 1.31461358417727147e-28, +# root=8 base[18]=48.0 */ + 1.43707276966266922e-01, + -1.43771375627183115e-03, + 2.15728625023292073e-05, + -3.59331549834955352e-07, + 6.23780092512864891e-09, + -1.06289817289162496e-10, + 1.39833245270487067e-12, + 1.50043420361469130e-14, + -2.76492129632430550e-15, + 1.72274420384647867e-16, + -7.56446680494499457e-18, + 2.24265022515795575e-19, + -1.67698227923498537e-21, + -3.00196681177827104e-22, + 7.94029254983440180e-02, + -7.94388217919904057e-04, + 1.19211847687047680e-05, + -1.98844984206142064e-07, + 3.49246856809470824e-09, + -6.41676534099816327e-11, + 1.29305562717105855e-12, + -3.26171419305912159e-14, + 1.12884133320947623e-15, + -4.60497079714399426e-17, + 1.74041548320970167e-18, + -4.80206682418070432e-20, + 2.88292850719013447e-22, + 6.64717859862560129e-23, + 2.37121835600242019e-02, + -2.37232062894468775e-04, + 3.56097193548434723e-06, + -5.95728710953089500e-08, + 1.07204013777089399e-09, + -2.26152217014227696e-11, + 7.17127016880599372e-13, + -3.58145501158313140e-14, + 2.03517392616512703e-15, + -1.04385367208933735e-16, + 4.34279993111181291e-18, + -1.26976058996605202e-19, + 1.00503099229098370e-21, + 1.62866666103548953e-22, + 3.64419854872967668e-03, + -3.64596964181710469e-05, + 5.47505054217675360e-07, + -9.20435586175370315e-09, + 1.72200215963227278e-10, + -4.36195909406626028e-12, + 1.95458459695720503e-13, + -1.22468279564178282e-14, + 7.54145470536917235e-16, + -3.97675797527196562e-17, + 1.67958809275234777e-18, + -5.00946008775583459e-20, + 4.61776211400766237e-22, + 5.95220795137603679e-23, + 2.63769248390782079e-04, + -2.63906088602765314e-06, + 3.96555579458731513e-08, + -6.71739706626844677e-10, + 1.33076393824206119e-11, + -4.16628097516277752e-13, + 2.39038765814820839e-14, + -1.66309797327485282e-15, + 1.05842446356121847e-16, + -5.66479513169193899e-18, + 2.42581905889413420e-19, + -7.42475234129549313e-21, + 8.23085785496400485e-23, + 7.78438582551898584e-24, + 7.67261871869425145e-06, + -7.67699172448321026e-08, + 1.15473840952620318e-09, + -1.97929341265598269e-11, + 4.25997537867002927e-13, + -1.68042509913745853e-14, + 1.15208916667052647e-15, + -8.51047823431616889e-17, + 5.53387306617094345e-18, + -3.00598852256606219e-19, + 1.31183648996016166e-20, + -4.17227976172756495e-22, + 5.78858744718477469e-24, + 3.49090972769813593e-25, + 6.56672117431187197e-08, + -6.57102662550336583e-10, + 9.90064638340963202e-12, + -1.73085853789079041e-13, + 4.21790223337619349e-15, + -2.13501328555300131e-16, + 1.67462611377456502e-17, + -1.29130268406648999e-18, + 8.57900168750792689e-20, + -4.76019174441840577e-21, + 2.14257213536109441e-22, + -7.25041076992628483e-24, + 1.32661763400330282e-25, + 3.58441974948552515e-27, + 7.51123640232996430e-11, + -7.51747254176062753e-13, + 1.13663683380092453e-14, + -2.06821916825238335e-16, + 6.22247320572061433e-18, + -4.18291170433082319e-19, + 3.68139026483541790e-20, + -2.96755728344044408e-21, + 2.04095331823808886e-22, + -1.18149735803076360e-23, + 5.66827480157406952e-25, + -2.16207930318256811e-26, + 5.73906519316926277e-28, + -3.66952635817417781e-30, +# root=8 base[19]=52.0 */ + 1.38276476009180138e-01, + -1.28083162211050554e-03, + 1.77955507972318647e-05, + -2.74690329807024149e-07, + 4.44808576203255340e-09, + -7.36116704292446730e-11, + 1.19501998318272434e-12, + -1.59691191248833910e-14, + -4.51548705648968624e-17, + 1.99792743987601311e-17, + -1.31245038841914656e-18, + 6.27521509589235462e-20, + -2.36188329910344260e-21, + 6.47853346643777169e-23, + 7.64022240894755428e-02, + -7.07701226791016338e-04, + 9.83272677620148334e-06, + -1.51798899348381156e-07, + 2.46151403032600726e-09, + -4.11565819129038085e-11, + 7.10592025702242475e-13, + -1.31963756107825493e-14, + 2.97298613676821439e-16, + -9.23330037131327514e-18, + 3.62960040215003091e-19, + -1.45818808537356831e-20, + 5.11401293674586565e-22, + -1.33938893651908901e-23, + 2.28160757476072451e-02, + -2.11341768898519163e-04, + 2.93642649381891381e-06, + -4.53467601863333835e-08, + 7.37486413975393253e-10, + -1.25965410409251685e-11, + 2.44058406710424371e-13, + -6.71408114130021023e-15, + 2.93514438317873386e-16, + -1.56649150091762066e-17, + 8.03114305887096350e-19, + -3.59198462652400204e-20, + 1.32368589826877945e-21, + -3.61048106284888803e-23, + 3.50647925851272670e-03, + -3.24800275102591810e-05, + 4.51301007345455636e-07, + -6.97288056672230041e-09, + 1.13951301362458821e-10, + -2.01387767424162620e-12, + 4.56478570777990851e-14, + -1.74248235079788906e-15, + 9.77405482795551807e-17, + -5.73869724139895897e-18, + 3.03613326892697803e-19, + -1.37627865701011619e-20, + 5.12442153608260143e-22, + -1.42069368294244475e-23, + 2.53800901468121602e-04, + -2.35092833868730445e-06, + 3.26673687226394708e-08, + -5.05124076274604948e-10, + 8.31641787243712890e-12, + -1.54545519092297446e-13, + 4.22396498651520932e-15, + -2.06788831171969175e-16, + 1.30797910294147805e-17, + -7.97832104251289102e-19, + 4.28263552203413305e-20, + -1.96020698634101851e-21, + 7.38360375079621877e-23, + -2.09245687885188591e-24, + 7.38264922473098953e-06, + -6.83848953231941986e-08, + 9.50327715204905894e-10, + -1.47123446566257956e-11, + 2.45023016481231367e-13, + -4.89610255029044789e-15, + 1.65094139333016656e-16, + -9.74305981139414707e-18, + 6.60220740555780008e-19, + -4.11972963946126911e-20, + 2.23853851711419386e-21, + -1.03686885053339389e-22, + 3.97189692892928911e-24, + -1.16305492123259882e-25, + 6.31853734765328707e-08, + -5.85284923256267377e-10, + 8.13474688409053203e-12, + -1.26189532137012340e-13, + 2.14166483699035335e-15, + -4.76939958572643470e-17, + 2.02910034448989416e-18, + -1.38384230357141887e-19, + 9.83160578098402492e-21, + -6.25717154951089428e-22, + 3.45335922698850360e-23, + -1.62964483897800485e-24, + 6.41809228270639040e-26, + -1.98103579140854397e-27, + 7.22733396433070426e-11, + -6.69475142994099611e-13, + 9.30758772475666152e-15, + -1.44963874370317184e-16, + 2.55350880332689155e-18, + -6.82403865923059779e-20, + 3.80353083500640105e-21, + -2.93398861229601841e-22, + 2.17721333908877133e-23, + -1.42412862509349896e-24, + 8.09006462506336149e-26, + -3.96443448556361176e-27, + 1.65168894355612312e-28, + -5.63750450995249953e-30, +# root=8 base[20]=56.0 */ + 1.33418574259079575e-01, + -1.15054498339150720e-03, + 1.48823377024574668e-05, + -2.13889675595551331e-07, + 3.22743701501630188e-09, + -5.00544711636423364e-11, + 7.86894255249930184e-13, + -1.22031347385269205e-14, + 1.66655906520134105e-16, + -6.78839312950031830e-19, + -1.06306326597606332e-19, + 7.63340729494069484e-21, + -3.80224748474987118e-22, + 1.55434923137978712e-23, + 7.37180757412644327e-02, + -6.35713322181370982e-04, + 8.22297983915520535e-06, + -1.18182555238698220e-07, + 1.78353205728961556e-09, + -2.76927103037384695e-11, + 4.38753726722177770e-13, + -7.11175409059522444e-15, + 1.21524038905343094e-16, + -2.41209210151433767e-18, + 6.43766614616977102e-20, + -2.29885844101147036e-21, + 9.11434115112941311e-23, + -3.42504657066491031e-24, + 2.20145053824313680e-02, + -1.89843741888939122e-04, + 2.45564146352627427e-06, + -3.52939822509242387e-08, + 5.32787292493008838e-10, + -8.29259467698265235e-12, + 1.33530225234308568e-13, + -2.35699563765992640e-15, + 5.49152567679607496e-17, + -2.01084223611617932e-18, + 9.73569725660680077e-20, + -4.83071238684633645e-21, + 2.19284786725326476e-22, + -8.70939982493722201e-24, + 3.38329015700303010e-03, + -2.91760603616749444e-05, + 3.77395370722229807e-07, + -5.42439457261339609e-09, + 8.19240300835446342e-11, + -1.28019622724532945e-12, + 2.11576582984469445e-14, + -4.21583156482113804e-16, + 1.31904995690670390e-17, + -6.39109950864086523e-19, + 3.50082642983310998e-20, + -1.80964152040925578e-21, + 8.33947580778849164e-23, + -3.33976608182503338e-24, + 2.44884396596669576e-04, + -2.11177962057117340e-06, + 2.73162087990250336e-08, + -3.92648798746342449e-10, + 5.93447345121931817e-12, + -9.33031838207703213e-14, + 1.60259480976663443e-15, + -3.71783039458999653e-17, + 1.49014533093690867e-18, + -8.36146994804468764e-20, + 4.81377323794036476e-21, + -2.53080254096688829e-22, + 1.17636843573456892e-23, + -4.74679230375939871e-25, + 7.12328237939300865e-06, + -6.14281956754816623e-08, + 7.94588930279344097e-10, + -1.14227615533795164e-11, + 1.72837701945791923e-13, + -2.74292270247316918e-15, + 4.98352330401362434e-17, + -1.38423121346452393e-18, + 6.78108978226076964e-20, + -4.15027756516229051e-21, + 2.45680267437474371e-22, + -1.30719847263916402e-23, + 6.13133313500971770e-25, + -2.49956934017987308e-26, + 6.09655420984529930e-08, + -5.25741461300285919e-10, + 6.80067033306330989e-12, + -9.77807449115311547e-14, + 1.48225469170587948e-15, + -2.38839443199292236e-17, + 4.72336214896770169e-19, + -1.61919918347047788e-20, + 9.34652924777668472e-22, + -6.06617893207394384e-23, + 3.66782438577641192e-24, + -1.97722654974507651e-25, + 9.39637261723888637e-27, + -3.89436861331244864e-28, + 6.97342156841443323e-11, + -6.01359354196414983e-13, + 7.77898047505110000e-15, + -1.11883471807931018e-16, + 1.70217224165534571e-18, + -2.82448927578217425e-20, + 6.45513669168252772e-22, + -2.86492456017841835e-23, + 1.90889979322749017e-24, + -1.30145576868698728e-25, + 8.06477872376617187e-27, + -4.44277316514216341e-28, + 2.16545134378910078e-29, + -9.27724285934957303e-31, +# root=8 base[21]=60.0 */ + 1.29039402885070653e-01, + -1.04094507390770736e-03, + 1.25954910855896540e-05, + -1.69339100196846907e-07, + 2.39047614303613456e-09, + -3.47068492032166914e-11, + 5.12968332351824801e-13, + -7.65576318709757385e-15, + 1.13425115002076226e-16, + -1.55934325532223916e-18, + 1.32948403926967704e-20, + 3.84426600051783693e-22, + -3.49743518319514687e-23, + 1.80621552340658949e-24, + 7.12984419429794347e-02, + -5.75155808342310993e-04, + 6.95941645132908446e-06, + -9.35654234106695152e-08, + 1.32083209047913742e-09, + -1.91789885211356953e-11, + 2.83700335305263638e-13, + -4.25631174414282020e-15, + 6.48849674057093287e-17, + -1.02484345103339956e-18, + 1.79733395296797405e-20, + -4.02272284095610493e-22, + 1.23787784574081361e-23, + -4.58838266156900832e-25, + 2.12919276113223803e-02, + -1.71759375898907087e-04, + 2.07829800725165957e-06, + -2.79415995166925240e-08, + 3.94451971397298466e-10, + -5.72890760918681520e-12, + 8.48908395759220518e-14, + -1.28760343004762416e-15, + 2.07724987678100908e-17, + -4.09094230782155301e-19, + 1.20836599102711898e-20, + -5.09141228103124979e-22, + 2.37935793114640434e-23, + -1.06232056142001018e-24, + 3.27224108561492135e-03, + -2.63967688122372677e-05, + 3.19402434629106302e-07, + -4.29420829802082281e-09, + 6.06238374668505189e-11, + -8.80814777112347048e-13, + 1.30891464465265523e-14, + -2.02070233481629254e-16, + 3.54633572033709435e-18, + -8.90511831301995719e-20, + 3.56724480328819732e-21, + -1.77553595083967886e-22, + 8.80218673032743394e-24, + -4.01000108053353398e-25, + 2.36846603324414166e-04, + -1.91061261595983073e-06, + 2.31185304722020274e-08, + -3.10818820069403125e-10, + 4.38827942340589536e-12, + -6.37948380163981702e-14, + 9.52144112540469723e-16, + -1.50918475775166673e-17, + 2.96193532010895719e-19, + -9.37715487197476329e-21, + 4.50378225949220985e-22, + -2.40557131289790594e-23, + 1.22035490058120855e-24, + -5.61217600586681776e-26, + 6.88947623057503650e-06, + -5.55765640612225044e-08, + 6.72480158038066582e-10, + -9.04127959136929341e-12, + 1.27660783591657543e-13, + -1.85750998699607061e-15, + 2.79081745799463304e-17, + -4.59883989582850010e-19, + 1.03946763935309394e-20, + -4.05400120457547953e-22, + 2.18426228018321981e-23, + -1.21254944187629280e-24, + 6.23843595471583114e-26, + -2.89225119208420205e-27, + 5.89644812877951890e-08, + -4.75659287989592664e-10, + 5.75551351877545983e-12, + -7.73819861023227218e-14, + 1.09278084584491403e-15, + -1.59230555663222178e-17, + 2.41813457075480541e-19, + -4.22935893195522190e-21, + 1.14121998663618408e-22, + -5.35977480891538315e-24, + 3.12593212728537967e-25, + -1.78212523675597018e-26, + 9.28666038111843204e-28, + -4.35020198132526413e-29, + 6.74453415142106264e-11, + -5.44073381184367637e-13, + 6.58333820724870533e-15, + -8.85140248398223455e-17, + 1.25034555985441995e-18, + -1.82688176092461693e-20, + 2.83149028866346746e-22, + -5.49514555973851975e-24, + 1.87611860776733664e-25, + -1.04781714797782682e-26, + 6.51105742649601400e-28, + -3.80883322743797868e-29, + 2.02091841731007660e-30, + -9.64359207898872031e-32, +# root=8 base[22]=64.0 */ + 1.25065134131820938e-01, + -9.47707955124251172e-04, + 1.07719851026156582e-05, + -1.36041795443306359e-07, + 1.80400269482216722e-09, + -2.46055748761476987e-11, + 3.41804537118473355e-13, + -4.80821534968077078e-15, + 6.81573403270358768e-17, + -9.63753320510076294e-19, + 1.30908165450551546e-20, + -1.42744224390616966e-22, + -4.14136903422733461e-25, + 1.25178111407704207e-25, + 6.91025299666292586e-02, + -5.23639284690292396e-04, + 5.95187004973525151e-06, + -7.51674954445785001e-08, + 9.96770752184346487e-10, + -1.35955107781030947e-11, + 1.88874179271897628e-13, + -2.65833034462351839e-15, + 3.78029802936318018e-17, + -5.43618152852076682e-19, + 7.99544653009979609e-21, + -1.25673950204306271e-22, + 2.35779184672261874e-24, + -5.97827875165150720e-26, + 2.06361601407759679e-02, + -1.56374942318599294e-04, + 1.77741313516097525e-06, + -2.24473503425300668e-08, + 2.97667271985665832e-10, + -4.06012626534088139e-12, + 5.64138128998710443e-14, + -7.94887705152314451e-16, + 1.13795875479775494e-17, + -1.69334972399520999e-19, + 2.86790535555708151e-21, + -6.70437249061466059e-23, + 2.33714073296290669e-24, + -9.93716170471679120e-26, + 3.17145973292031575e-03, + -2.40324183192074525e-05, + 2.73161005715166261e-07, + -3.44981257099977161e-09, + 4.57470194377697667e-11, + -6.24000133647459354e-13, + 8.67248009635711217e-15, + -1.22420934454800582e-16, + 1.77168787605699804e-18, + -2.77915914009096045e-20, + 5.62320114419181257e-22, + -1.77892095545114926e-23, + 7.74254349500322536e-25, + -3.60413582284600004e-26, + 2.29551993744037998e-04, + -1.73947961118094368e-06, + 1.97715436911180275e-08, + -2.49699414826428976e-10, + 3.31121059259562152e-12, + -4.51678172688679358e-14, + 6.27999728623267522e-16, + -8.88951332858316220e-18, + 1.30763614346674409e-19, + -2.20783258116830338e-21, + 5.42369397386000662e-23, + -2.12357216047345947e-24, + 1.02550324370822789e-25, + -4.94471656231061283e-27, + 6.67728809296064040e-06, + -5.05985869130922418e-08, + 5.75121543976730569e-10, + -7.26334722313809092e-12, + 9.63183577497153039e-14, + -1.31396053747532764e-15, + 1.82798901402524027e-17, + -2.59850389339866030e-19, + 3.91618390256806703e-21, + -7.29883027330639303e-23, + 2.18473877960595459e-24, + -9.94354020277974029e-26, + 5.08915758811221153e-27, + -2.50228974491200575e-28, + 5.71484414050101155e-08, + -4.33054608903225747e-10, + 4.92225300036014595e-12, + -6.21643585376231034e-14, + 8.24362961902538747e-16, + -1.12471166261508007e-17, + 1.56621398627307125e-19, + -2.24148525543248444e-21, + 3.50785134512587047e-23, + -7.47071670771545802e-25, + 2.72292684549849497e-26, + -1.38411612098557246e-27, + 7.36067078235220024e-29, + -3.67356374807854191e-30, + 6.53681006075189410e-11, + -4.95340846105813384e-13, + 5.63022102099353010e-15, + -7.11055699644690216e-17, + 9.42951712930693604e-19, + -1.28678109253553699e-20, + 1.79515686118052570e-22, + -2.60194893624430246e-24, + 4.35484644258859304e-26, + -1.12577359266959696e-27, + 5.02705721137083926e-29, + -2.79369404762743143e-30, + 1.53422817133596687e-31, + -7.78950448059505953e-33, +# root=8 base[23]=68.0 */ + 1.21436961714503466e-01, + -8.67606107028798083e-04, + 9.29775669268201671e-06, + -1.10710648836988908e-07, + 1.38416912536285282e-09, + -1.78001154242185798e-11, + 2.33143607192929773e-13, + -3.09325165136940339e-15, + 4.14267403725816038e-17, + -5.58325830083580888e-19, + 7.52870810922562122e-21, + -9.95576624066089142e-23, + 1.18700719771012386e-24, + -7.31496576668270231e-27, + 6.70978474070611786e-02, + -4.79380423862092405e-04, + 5.13731117048000891e-06, + -6.11712130231866839e-08, + 7.64798240383044597e-10, + -9.83514639242589133e-12, + 1.28820256605009871e-13, + -1.70921317439344292e-15, + 2.28979403833328015e-17, + -3.09159966580215454e-19, + 4.20744768440464085e-21, + -5.80616102284381139e-23, + 8.33051966760957102e-25, + -1.33769641877282900e-26, + 2.00374997103270752e-02, + -1.43157872802194788e-04, + 1.53416055974618799e-06, + -1.82676229064332243e-08, + 2.28392521438590574e-10, + -2.93708443223790626e-12, + 3.84702756083271905e-14, + -5.10481545151156874e-16, + 6.84325931118280831e-18, + -9.27434156346573042e-20, + 1.28637505156735343e-21, + -1.92585437811808834e-23, + 3.60293477859896801e-25, + -9.87593611303627217e-27, + 3.07945485235010512e-03, + -2.20011584496827144e-05, + 2.35776831025878501e-07, + -2.80745210914383410e-09, + 3.51004177365493945e-11, + -4.51385725725281457e-13, + 5.91242599323222310e-15, + -7.84675624074568326e-17, + 1.05301609293211407e-18, + -1.43585698605541050e-20, + 2.05229656279849717e-22, + -3.44411045126212245e-24, + 8.35578031769353967e-26, + -3.00691671805009592e-27, + 2.22892630058856901e-04, + -1.59245590745019424e-06, + 1.70656562771067707e-08, + -2.03204926908404728e-10, + 2.54058830271867652e-12, + -3.26716688585360513e-14, + 4.27959724505942338e-16, + -5.68110902644038345e-18, + 7.63623513806397873e-20, + -1.05089795289324670e-21, + 1.56872654422343116e-23, + -3.02945782590540185e-25, + 9.17850247067690595e-27, + -3.83501337161831883e-28, + 6.48357820992548779e-06, + -4.63219103277937176e-08, + 4.96411735666855556e-10, + -5.91089566058278124e-12, + 7.39015507630754952e-14, + -9.50370208580931588e-16, + 1.24493024451872449e-17, + -1.65323671172262058e-19, + 2.22762086527126938e-21, + -3.10823469108021342e-23, + 4.93239417983139235e-25, + -1.12001715675576815e-26, + 4.06848462356601416e-28, + -1.85971173799556337e-29, + 5.54905500945411713e-08, + -3.96452113707648552e-10, + 4.24860462280434654e-12, + -5.05891743920048245e-14, + 6.32496551327520131e-16, + -8.13393984250201903e-18, + 1.06557945155125892e-19, + -1.41589150411312943e-21, + 1.91524099658818641e-23, + -2.73074264841434886e-25, + 4.73113993050286927e-27, + -1.29005273688746144e-28, + 5.43529850835226806e-30, + -2.63791156244827388e-31, + 6.34717548204372095e-11, + -4.53473813466143285e-13, + 4.85968136396090124e-15, + -5.78654197635801521e-17, + 7.23469528711026851e-19, + -9.30399564383387677e-21, + 1.21903039669265289e-22, + -1.62154649930786972e-24, + 2.20929016099792015e-26, + -3.27529497307439361e-28, + 6.51846468203723075e-30, + -2.20245470604303732e-31, + 1.05462069010801247e-32, + -5.36382252946533595e-34, +# root=8 base[24]=72.0 */ + 1.18107385555648384e-01, + -7.98186887634141744e-04, + 8.09127141031292974e-06, + -9.11349137420800367e-08, + 1.07780809552896868e-09, + -1.31108910631009862e-11, + 1.62439481305532063e-13, + -2.03870190530812574e-15, + 2.58323918678740743e-17, + -3.29713412564669017e-19, + 4.23072776408206150e-21, + -5.43983477844659549e-23, + 6.93752349988108649e-25, + -8.43482740841098226e-27, + 6.52581489340143261e-02, + -4.41024060818620469e-04, + 4.47068904524042035e-06, + -5.03549862487068848e-08, + 5.95523820656141463e-10, + -7.24419153693361042e-12, + 8.97531089241358507e-14, + -1.12645341361135806e-15, + 1.42736703098081513e-17, + -1.82213477060803545e-19, + 2.34027600466848745e-21, + -3.02335037567269105e-23, + 3.93962930237359414e-25, + -5.24456579049930168e-27, + 1.94881086486835102e-02, + -1.31703472352748789e-04, + 1.33508650296306703e-06, + -1.50375617382665030e-08, + 1.77841897200807612e-10, + -2.16334064468978029e-12, + 2.68030913479066633e-14, + -3.36396891027399891e-16, + 4.26283558188285500e-18, + -5.44372503538766185e-20, + 7.00547843953128412e-22, + -9.13947950323068545e-24, + 1.24330419859689656e-25, + -1.93312888339189091e-27, + 2.99502191435440952e-03, + -2.02407936554745542e-05, + 2.05182216815813966e-07, + -2.31104145578609608e-09, + 2.73315587491189048e-11, + -3.32472166378970518e-13, + 4.11922885429282475e-15, + -5.16997526265277323e-17, + 6.55200889650234432e-19, + -8.37184426572408186e-21, + 1.08082208781594427e-22, + -1.43244212877574942e-24, + 2.07885937549972975e-26, + -3.89546507710381383e-28, + 2.16781327729049584e-04, + -1.46503973874137776e-06, + 1.48512013141085312e-08, + -1.67274447457619033e-10, + 1.97827324194032982e-12, + -2.40645235688941670e-14, + 2.98152789806139813e-16, + -3.74213682779401398e-18, + 4.74313269078191260e-20, + -6.06581238911239608e-22, + 7.86905129518963816e-24, + -1.06745327277117958e-25, + 1.69005940792177251e-27, + -3.84139543070657825e-29, + 6.30581052595084594e-06, + -4.26155845722108466e-08, + 4.31996900094889974e-10, + -4.86573721319613330e-12, + 5.75447006064965215e-14, + -6.99997474448916460e-16, + 8.67280439147748909e-18, + -1.08856080767158852e-19, + 1.38002788984885148e-21, + -1.76717229752918275e-23, + 2.30918652462331799e-25, + -3.24005792043247641e-27, + 5.73535795610512613e-29, + -1.57052100024363636e-30, + 5.39691021758619048e-08, + -3.64731041093772416e-10, + 3.69730183740332595e-12, + -4.16440469460961531e-14, + 4.92503851315835583e-16, + -5.99102316644300373e-18, + 7.42277639461663564e-20, + -9.31706112457034381e-22, + 1.18155888867711638e-23, + -1.51615312472627082e-25, + 2.00384151879557130e-27, + -2.95754188432108509e-29, + 6.03358948860617277e-31, + -1.96956719110930894e-32, + 6.17314770775207781e-11, + -4.17190299544310557e-13, + 4.22908468874011619e-15, + -4.76337096408605165e-17, + 5.63340716852721563e-19, + -6.85271898161951524e-21, + 8.49048413802684029e-23, + -1.06581122725053877e-24, + 1.35242969721321076e-26, + -1.74198983889227655e-28, + 2.35025858932371511e-30, + -3.77650083665176658e-32, + 9.32112747136374519e-34, + -3.61032973279668321e-35, +# root=8 base[25]=76.0 */ + 1.15037561321972043e-01, + -7.37556670763441532e-04, + 7.09310570867516728e-06, + -7.57937634353425996e-08, + 8.50392097047720682e-10, + -9.81384325417264472e-12, + 1.15352701599530194e-13, + -1.37347298605454045e-15, + 1.65107882587312034e-17, + -1.99947911380192283e-19, + 2.43551623899233641e-21, + -2.98002942149882749e-23, + 3.65596778834433963e-25, + -4.47376008930067680e-27, + 6.35619717974191395e-02, + -4.07523905821104886e-04, + 3.91917022431751547e-06, + -4.18785047127034096e-08, + 4.69869126919088678e-10, + -5.42246569567743196e-12, + 6.37360990331026264e-14, + -7.58888452961641278e-16, + 9.12276565955119912e-18, + -1.10479487647265365e-19, + 1.34583757263723367e-21, + -1.64749081798915533e-23, + 2.02579947824302736e-25, + -2.50452411819840001e-27, + 1.89815775124906605e-02, + -1.21699286346723583e-04, + 1.17038586585564062e-06, + -1.25062212649173320e-08, + 1.40317504401683578e-10, + -1.61931656042371895e-12, + 1.90335785855474985e-14, + -2.26627784987144625e-16, + 2.72435430905692335e-18, + -3.29937309236447318e-20, + 4.01994029767823102e-22, + -4.92572989467808149e-24, + 6.08574222699944814e-26, + -7.68380411545736794e-28, + 2.91717588626878768e-03, + -1.87033044684080224e-05, + 1.79870267540385789e-07, + -1.92201344066127681e-09, + 2.15646376229292264e-11, + -2.48863998068738852e-13, + 2.92516796772402322e-15, + -3.48292322318863866e-17, + 4.18694596373348442e-19, + -5.07090949867452396e-21, + 6.18015860783291082e-23, + -7.58463674516019360e-25, + 9.44327205919625885e-27, + -1.23220400885526516e-28, + 2.11146789548889973e-04, + -1.35375542868318475e-06, + 1.30191085512966483e-08, + -1.39116386297564604e-10, + 1.56086029245069014e-12, + -1.80129128516317822e-14, + 2.11725295346276707e-16, + -2.52096271211755426e-18, + 3.03057073388784181e-20, + -3.67065933219962105e-22, + 4.47556002018868392e-24, + -5.50572423295220910e-26, + 6.93422113038920888e-28, + -9.48240293413296474e-30, + 6.14191112309376678e-06, + -3.93785079240028409e-08, + 3.78704349685547586e-10, + -4.04666574525771956e-12, + 4.54028461820213295e-14, + -5.23965874608926610e-16, + 6.15874039461633638e-18, + -7.33308029200522524e-20, + 8.81558688616439042e-22, + -1.06786774686390807e-23, + 1.30288084415015039e-25, + -1.60848086628160141e-27, + 2.06047108925159774e-29, + -3.00583435726854702e-31, + 5.25663477507223270e-08, + -3.37026098221260353e-10, + 3.24119059058935337e-12, + -3.46339167996310670e-14, + 3.88586184260442326e-16, + -4.48443045936031932e-18, + 5.27104030959026739e-20, + -6.27613431790696678e-22, + 7.54514535673348389e-24, + -9.14127506141300385e-26, + 1.11645090367056591e-27, + -1.38602317702932677e-29, + 1.82228072767175176e-31, + -2.90922719062584138e-33, + 6.01269645110722316e-11, + -3.85500555282200643e-13, + 3.70737096935676119e-15, + -3.96153123803009178e-17, + 4.44476529482135143e-19, + -5.12942631474819628e-21, + 6.02917795811856591e-23, + -7.17887519077050546e-25, + 8.63079454868238151e-27, + -1.04597530219742038e-28, + 1.27985630986843140e-30, + -1.60494942729347812e-32, + 2.20785479236847369e-34, + -4.03965839775514999e-36, +# root=8 base[26]=80.0 */ + 1.12195372044619601e-01, + -6.84232619692573736e-04, + 6.25919498751219813e-06, + -6.36193652633611741e-08, + 6.78967432370156500e-10, + -7.45319942555579132e-12, + 8.33307548192596538e-14, + -9.43781948009344579e-16, + 1.07917996240013655e-17, + -1.24314243484344743e-19, + 1.44043362551253616e-21, + -1.67698101519044064e-23, + 1.95987552166615031e-25, + -2.29646686366203975e-27, + 6.19915703336365587e-02, + -3.78060643636634925e-04, + 3.45840759051991137e-06, + -3.51517561235865185e-08, + 3.75151457421787717e-10, + -4.11813364541917275e-12, + 4.60429362125686244e-14, + -5.21470048761684078e-16, + 5.96281916318922988e-18, + -6.86877222823230807e-20, + 7.95892601604094179e-22, + -9.26631246083650994e-24, + 1.08318070720052559e-25, + -1.27053527229408079e-27, + 1.85126068958218967e-02, + -1.12900641825310435e-04, + 1.03278784299622301e-06, + -1.04974053619277399e-08, + 1.12031868533687773e-10, + -1.22980251892992684e-12, + 1.37498498152593388e-14, + -1.55727147339471134e-16, + 1.78068347294172433e-18, + -2.05123379341937531e-20, + 2.37682264062128112e-22, + -2.76748983652207947e-24, + 3.23650281277334639e-26, + -3.80461732544164384e-28, + 2.84510233108537349e-03, + -1.73510884256242112e-05, + 1.58723572328898124e-07, + -1.61328939968872732e-09, + 1.72175713624444623e-11, + -1.89001691390488907e-13, + 2.11313999368134155e-15, + -2.39328637569125543e-17, + 2.73663753767411196e-19, + -3.15244318574335497e-21, + 3.65291058198560234e-23, + -4.25390754254126222e-25, + 4.97847559551768991e-27, + -5.87313032073862230e-29, + 2.05930066121281412e-04, + -1.25588129035833518e-06, + 1.14884991613749489e-08, + -1.16770770991918381e-10, + 1.24621725221865041e-12, + -1.36800460259925639e-14, + 1.52950232457371863e-16, + -1.73227396439189533e-18, + 1.98079488752565872e-20, + -2.28176979722228224e-22, + 2.64410605952117396e-24, + -3.07976645975187878e-26, + 3.60832317583053846e-28, + -4.27942816563045625e-30, + 5.99016526082141997e-06, + -3.65315110071859021e-08, + 3.34181452333081607e-10, + -3.39666872862809452e-12, + 3.62504001136554007e-14, + -3.97929928916072085e-16, + 4.44906952967470773e-18, + -5.03889937470735733e-20, + 5.76181200661105155e-22, + -6.63735230848563414e-24, + 7.69174093724577960e-26, + -8.96184952076954874e-28, + 1.05172094994972464e-29, + -1.25719953082061549e-31, + 5.12676109884873247e-08, + -3.12659703629151324e-10, + 2.86013556417903511e-12, + -2.90708325154720751e-14, + 3.10253779408632959e-16, + -3.40573522549103773e-18, + 3.80779429408813453e-20, + -4.31260873272027061e-22, + 4.93133133208953825e-24, + -5.68074561230615713e-26, + 6.58370654758116361e-28, + -7.67454254846624538e-30, + 9.02965964676945160e-32, + -1.09262515721386472e-33, + 5.86414304659365723e-11, + -3.57629542636318941e-13, + 3.27150880597313329e-15, + -3.32520897833008006e-17, + 3.54877574464909460e-19, + -3.89558206877012081e-21, + 4.35546944267215735e-23, + -4.93289307988079531e-25, + 5.64062347781108990e-27, + -6.49797140383212817e-29, + 7.53192358778284181e-31, + -8.78743523593186234e-33, + 1.03867976352335482e-34, + -1.28422244794322280e-36, +# root=8 base[27]=84.0 */ + 1.09554000239280094e-01, + -6.37038774996760595e-04, + 5.55635338757350173e-06, + -5.38480670008788811e-08, + 5.47947798082602140e-10, + -5.73511942539122207e-12, + 6.11384656673387735e-14, + -6.60222612661463883e-16, + 7.19817089434908179e-18, + -7.90603969885548367e-20, + 8.73459658669452639e-22, + -9.69613958103284468e-24, + 1.08061282091518930e-25, + -1.20812726747154971e-27, + 6.05321270155746646e-02, + -3.51984518664102725e-04, + 3.07006488366844392e-06, + -2.97527979272433906e-08, + 3.02758873605855889e-10, + -3.16883889910114894e-12, + 3.37809788929522531e-14, + -3.64794338930178015e-16, + 3.97722217789081883e-18, + -4.36834290153391534e-20, + 4.82614987391363933e-22, + -5.35745099691793333e-24, + 5.97086749878978638e-26, + -6.67607926192868104e-28, + 1.80767718252049826e-02, + -1.05113501599877405e-04, + 9.16816657976845322e-07, + -8.88510888034484841e-09, + 9.04131961995604225e-11, + -9.46313644590942706e-13, + 1.00880487392017790e-14, + -1.08938911764934934e-16, + 1.18772200692202072e-18, + -1.30452299582892895e-20, + 1.44123992874363332e-22, + -1.59991387448127903e-24, + 1.78316894274574064e-26, + -1.99417509040938169e-28, + 2.77812119858691399e-03, + -1.61543250020531610e-05, + 1.40900588742935576e-07, + -1.36550428201034722e-09, + 1.38951146489700495e-11, + -1.45433820930534731e-13, + 1.55037759707188755e-15, + -1.67422316457930164e-17, + 1.82534571667008001e-19, + -2.00485133497599324e-21, + 2.21496807412519227e-23, + -2.45885270941429941e-25, + 2.74066157715765340e-27, + -3.06596304817520090e-29, + 2.01081935038761081e-04, + -1.16925889781559961e-06, + 1.01984618406647015e-08, + -9.88359483632536696e-11, + 1.00573601419181037e-12, + -1.05265796715326313e-14, + 1.12217180298456345e-16, + -1.21181190997331966e-18, + 1.32119530426010327e-20, + -1.45112299774287750e-22, + 1.60321085643067791e-24, + -1.77976544213734306e-26, + 1.98392933210459419e-28, + -2.22049109095599566e-30, + 5.84914114065570111e-06, + -3.40118087782108904e-08, + 2.96656398856222188e-10, + -2.87497438114429185e-12, + 2.92551983654817121e-14, + -3.06200804260817195e-16, + 3.26421230420632415e-18, + -3.52496058720609664e-20, + 3.84313907158944477e-22, + -4.22107959123359906e-24, + 4.66349616293641838e-26, + -5.17719170095449123e-28, + 5.77188765190189558e-30, + -6.46479789807117151e-32, + 5.00606376550573974e-08, + -2.91094503328781903e-10, + 2.53897249768380610e-12, + -2.46058433710409691e-14, + 2.50384432465013702e-16, + -2.62065953696592069e-18, + 2.79371869585301373e-20, + -3.01688355219743752e-22, + 3.28920111313626609e-24, + -3.61266950805480786e-26, + 3.99134140871822053e-28, + -4.43116292893184356e-30, + 4.94122447486742131e-32, + -5.54063284788572370e-34, + 5.72608581817615809e-11, + -3.32962620002020478e-13, + 2.90415286195582673e-15, + -2.81449013378736554e-17, + 2.86397220451974513e-19, + -2.99758894700251544e-21, + 3.19553920765190351e-23, + -3.45080193243141011e-25, + 3.76228762663918488e-27, + -4.13228661190202565e-29, + 4.56547088041383970e-31, + -5.06889172289948515e-33, + 5.65451038556504672e-35, + -6.35310772902829105e-37, +# root=8 base[28]=88.0 */ + 1.07090853875733791e-01, + -5.95031842140634451e-04, + 4.95923652680086333e-06, + -4.59246452815343082e-08, + 4.46545432033089213e-10, + -4.46601034335402794e-12, + 4.54927929117374954e-14, + -4.69428305626320580e-16, + 4.89048411652968051e-18, + -5.13262498394074312e-20, + 5.41844122749988949e-22, + -5.74754164675027144e-24, + 6.12081812911600689e-26, + -6.53935443091984550e-28, + 5.91711590161361836e-02, + -3.28774330175978077e-04, + 2.74013851328957990e-06, + -2.53748512628964111e-08, + 2.46730788022478530e-10, + -2.46761510092234388e-12, + 2.51362388669347242e-14, + -2.59374315503563614e-16, + 2.70215058555091289e-18, + -2.83594125664895577e-20, + 2.99386407724243805e-22, + -3.17570345015803741e-24, + 3.38195565586967342e-26, + -3.61323951878731660e-28, + 1.76703445410468507e-02, + -9.81822189569946146e-05, + 8.18290404060104280e-07, + -7.57771813073533287e-09, + 7.36814709350632721e-11, + -7.36906454986589668e-13, + 7.50646106372735270e-15, + -7.74572206608651917e-17, + 8.06946030889626952e-19, + -8.46900086023684958e-21, + 8.94060807379335942e-23, + -9.48364156077773462e-25, + 1.00996050921507307e-26, + -1.07904715224899646e-28, + 2.71565958958272947e-03, + -1.50890936969403134e-05, + 1.25758622175552594e-07, + -1.16457847559701746e-09, + 1.13237063745181697e-11, + -1.13251163635443346e-13, + 1.15362736275974749e-15, + -1.19039809115086058e-17, + 1.24015167141436920e-19, + -1.30155491648431098e-21, + 1.37403383921646115e-23, + -1.45749087910445076e-25, + 1.55216254324223657e-27, + -1.65838309318028792e-29, + 1.96560929543902003e-04, + -1.09215687209947591e-06, + 9.10247800122296789e-09, + -8.42928283678384729e-11, + 8.19616073898206078e-13, + -8.19718129678451950e-15, + 8.35001808208395692e-17, + -8.61616663215332979e-19, + 8.97628579858392525e-21, + -9.42072607572000544e-23, + 9.94533425365791039e-25, + -1.05494134545233464e-26, + 1.12347339921377183e-28, + -1.20040519492278401e-30, + 5.71763256315960109e-06, + -3.17690382848936128e-08, + 2.64776040416578216e-10, + -2.45193905744700084e-12, + 2.38412769225518133e-14, + -2.38442455565937626e-16, + 2.42888225050272707e-18, + -2.50630046589418468e-20, + 2.61105319022022895e-22, + -2.74033361679918603e-24, + 2.89293421979355263e-26, + -3.06865626689720541e-28, + 3.26803984247631839e-30, + -3.49203162248223342e-32, + 4.89351043351645062e-08, + -2.71899459422417141e-10, + 2.26612029019174326e-12, + -2.09852403550274146e-14, + 2.04048679379332004e-16, + -2.04074086822077679e-18, + 2.07879056656720858e-20, + -2.14504995779939495e-22, + 2.23470395792052458e-24, + -2.34535042280296329e-26, + 2.47595662753088015e-28, + -2.62635770498866733e-30, + 2.79704895723288330e-32, + -2.98903187784253659e-34, + 5.59734394266646161e-11, + -3.11006753309139672e-13, + 2.59205632684091226e-15, + -2.40035470614513836e-17, + 2.33396996910633608e-19, + -2.33426058707213981e-21, + 2.37778297302688204e-23, + -2.45357245399310700e-25, + 2.55612141508818107e-27, + -2.68268240550964734e-29, + 2.83207565502876030e-31, + -3.00412298180590812e-33, + 3.19945706228238036e-35, + -3.41960772376362853e-37, +# root=8 base[29]=92.0 */ + 1.04786747002020314e-01, + -5.57447296429626482e-04, + 4.44824224982031613e-06, + -3.94393287119134892e-08, + 3.67163488232180033e-10, + -3.51579635613302881e-12, + 3.42891523158879642e-14, + -3.38761143533221859e-16, + 3.37898561297815556e-18, + -3.39534727765371360e-20, + 3.43185730966407411e-22, + -3.48535668666191541e-24, + 3.55373608034143225e-26, + -3.63519066321528955e-28, + 5.78980654765807456e-02, + -3.08007653561410348e-04, + 2.45779765480098332e-06, + -2.17915041877455392e-08, + 2.02869697652382582e-10, + -1.94259115254139769e-12, + 1.89458652236245733e-14, + -1.87176483958399286e-16, + 1.86699879392024651e-18, + -1.87603914315833191e-20, + 1.89621212045202120e-22, + -1.92577228647848220e-24, + 1.96355431398175496e-26, + -2.00856182344804421e-28, + 1.72901592979152960e-02, + -9.19806447973293913e-05, + 7.33974660876031825e-07, + -6.50761947995848553e-09, + 6.05831880608935124e-11, + -5.80118009154365847e-13, + 5.65782336693110654e-15, + -5.58967073916666636e-17, + 5.57543784797901992e-19, + -5.60243513990969979e-21, + 5.66267793744050222e-23, + -5.75095395806636781e-25, + 5.86378407484614660e-27, + -5.99819806001489979e-29, + 2.65723097779591716e-03, + -1.41360073381496207e-05, + 1.12800592070438619e-07, + -1.00012080721192689e-09, + 9.31070219049125468e-12, + -8.91551962096872836e-14, + 8.69520243190276497e-16, + -8.59046234800048703e-18, + 8.56858858898987755e-20, + -8.61007927358003178e-22, + 8.70266323302034756e-24, + -8.83833034211430156e-26, + 9.01173595624021014e-28, + -9.21832837618479330e-30, + 1.92331834598117462e-04, + -1.02317195906466634e-06, + 8.16456867993338960e-09, + -7.23892921910657838e-11, + 6.73913727732945101e-13, + -6.45310196751856261e-15, + 6.29363517852525119e-17, + -6.21782373181638897e-19, + 6.20199138614504092e-21, + -6.23202257986810019e-23, + 6.29903542746195851e-25, + -6.39723253316301239e-27, + 6.52274782732236902e-29, + -6.67230089345875047e-31, + 5.59461518106429201e-06, + -2.97623811834554360e-08, + 2.37493808443318815e-10, + -2.10568486431210710e-12, + 1.96030364904515919e-14, + -1.87710070503295510e-16, + 1.83071445179664366e-18, + -1.80866215500785986e-20, + 1.80405678775121974e-22, + -1.81279236939641777e-24, + 1.83228532913221275e-26, + -1.86084946122630149e-28, + 1.89736122199037201e-30, + -1.94087244374562767e-32, + 4.78822440190503632e-08, + -2.54725222788800314e-10, + 2.03262174803116522e-12, + -1.80217786634313053e-14, + 1.67775145630588831e-16, + -1.60654113103168078e-18, + 1.56684085095085719e-20, + -1.54796710505744477e-22, + 1.54402554194444097e-24, + -1.55150200833951785e-26, + 1.56818535120565165e-28, + -1.59263261894268018e-30, + 1.62388355954383087e-32, + -1.66113459053647755e-34, + 5.47691462320467478e-11, + -2.91362346559194947e-13, + 2.32497369396609259e-15, + -2.06138507331934755e-17, + 1.91906241518024664e-19, + -1.83760991022683495e-21, + 1.79219953965402547e-23, + -1.77061118336621416e-25, + 1.76610270636954170e-27, + -1.77465452227288037e-29, + 1.79373750628635837e-31, + -1.82170157951629317e-33, + 1.85745103824357144e-35, + -1.90008242065661490e-37, +# root=8 base[30]=96.0 */ + 1.02625266595858786e-01, + -5.23659646419169164e-04, + 4.00803409945837328e-06, + -3.40855460349621377e-08, + 3.04367323695887498e-10, + -2.79550364897974788e-12, + 2.61511579242898452e-14, + -2.47813860609787678e-16, + 2.37091606001336848e-18, + -2.28513505129096384e-20, + 2.21541316174166723e-22, + -2.15809511820167629e-24, + 2.11060223866593802e-26, + -2.07085693704549968e-28, + 5.67037776714647626e-02, + -2.89338884575123044e-04, + 2.21456841978628400e-06, + -1.88333661708116168e-08, + 1.68172786544622661e-10, + -1.54460614475921650e-12, + 1.44493602207134672e-14, + -1.36925169814801611e-16, + 1.31000777493116894e-18, + -1.26261099433023226e-20, + 1.22408739640681808e-22, + -1.19241732544829482e-24, + 1.16617598201725887e-26, + -1.14421546664537442e-28, + 1.69335078929324229e-02, + -8.64055709669360136e-05, + 6.61338862344640308e-07, + -5.62422765819381561e-09, + 5.02216135374503176e-11, + -4.61267333814948631e-13, + 4.31502741780135305e-15, + -4.08901053689006735e-17, + 3.91208979500686973e-19, + -3.77054829801101789e-21, + 3.65550487929226328e-23, + -3.56092822557055871e-25, + 3.48256347922021898e-27, + -3.41698286781903248e-29, + 2.60241915418772240e-03, + -1.32792044232449089e-05, + 1.01637589426626757e-07, + -8.64357100592538949e-10, + 7.71828789701770756e-12, + -7.08896793453024823e-14, + 6.63153203337085898e-16, + -6.28417892510377716e-18, + 6.01227901499497351e-20, + -5.79475155128321122e-22, + 5.61794755172722648e-24, + -5.47259783108968494e-26, + 5.35216341741109822e-28, + -5.25137687710722296e-30, + 1.88364524763058692e-04, + -9.61156094471169043e-07, + 7.35658443014535004e-09, + -6.25626406940226936e-11, + 5.58653908370879156e-13, + -5.13103384556490110e-15, + 4.79993923310512642e-17, + -4.54852314950666177e-19, + 4.35172050432660162e-21, + -4.19427293415908343e-23, + 4.06630123290633325e-25, + -3.96109632812591138e-27, + 3.87392537111806610e-29, + -3.80097632893778404e-31, + 5.47921269515974193e-06, + -2.79584421826832584e-08, + 2.13990882058976744e-10, + -1.81984381382111551e-12, + 1.62503188474406271e-14, + -1.49253293959029634e-16, + 1.39622298918068127e-18, + -1.32309020588596127e-20, + 1.26584356918655975e-22, + -1.22004467347023536e-24, + 1.18281982184134231e-26, + -1.15221746223700572e-28, + 1.12686092765575069e-30, + -1.10564160129329870e-32, + 4.68945567855853604e-08, + -2.39285975470627581e-10, + 1.83146888588153655e-12, + -1.55753707359306093e-14, + 1.39080474216370226e-16, + -1.27740379109217953e-18, + 1.19497566337081957e-20, + -1.13238401654493399e-22, + 1.08338873558511354e-24, + -1.04419115327872433e-26, + 1.01233177977035480e-28, + -9.86140361816612044e-31, + 9.64438713470366790e-33, + -9.46278323185292465e-35, + 5.36393999632701995e-11, + -2.73702472603719713e-13, + 2.09488901962032577e-15, + -1.78155760017248154e-17, + 1.59084416080169113e-19, + -1.46113275317390299e-21, + 1.36684898946823472e-23, + -1.29525478731753965e-25, + 1.23921251610235869e-27, + -1.19437714665740363e-29, + 1.15793544294151959e-31, + -1.12797693490084961e-33, + 1.10315408060800850e-35, + -1.08238255672103704e-37, +# root=9 base[0]=0.0 */ + 3.24999665801807502e-01, + -6.49261526314212287e-03, + 1.46413202875198163e-04, + -3.43891700772671211e-06, + 8.07662388964341717e-08, + -1.86952973850080952e-09, + 4.24773559893679216e-11, + -9.47577481562160159e-13, + 2.07754085223664288e-14, + -4.48363442247332806e-16, + 9.53534473962828613e-18, + -2.00078485265139067e-19, + 4.14503031697917400e-21, + -8.48312168265932226e-23, + 2.98132498941523272e-01, + -1.44922712432620331e-02, + 6.88051699948310645e-04, + -2.87749915481184762e-05, + 1.09612395949347564e-06, + -3.88731242789370286e-08, + 1.30051982684709857e-09, + -4.14081996542805129e-11, + 1.26270359925787391e-12, + -3.70528472202060622e-14, + 1.05012764458466473e-15, + -2.88288873414006936e-17, + 7.68424322372695113e-19, + -1.99127137357458642e-20, + 2.52849332610883715e-01, + -2.61326471765078693e-02, + 1.99639763316024430e-03, + -1.23947162402932368e-04, + 6.67892093400775336e-06, + -3.23004368446978952e-07, + 1.43109002673289313e-08, + -5.88953457281274694e-10, + 2.27369195269952131e-11, + -8.29487933709012223e-13, + 2.87591345720689028e-14, + -9.51863390364719417e-16, + 3.01841123827675753e-17, + -9.19007675685227222e-19, + 2.00891356877180044e-01, + -3.58207880585233382e-02, + 4.00703921857513412e-03, + -3.43307765417963276e-04, + 2.44922519304514440e-05, + -1.52015802963455428e-06, + 8.43174912547727612e-08, + -4.25525141688844461e-09, + 1.97915122088922292e-10, + -8.56507313723186642e-12, + 3.47445117293374733e-13, + -1.32887969861570166e-14, + 4.81491705805945413e-16, + -1.65747777957719487e-17, + 1.51527785104164037e-01, + -3.99662669333086459e-02, + 6.08195380019698438e-03, + -6.77362245632618450e-04, + 6.07790533848057130e-05, + -4.62475620881323520e-06, + 3.07990570622826288e-07, + -1.83374595710437601e-08, + 9.91089262076310139e-10, + -4.91831394425551609e-11, + 2.26095981486461330e-12, + -9.69624172637233426e-14, + 3.90156997660706114e-15, + -1.47821288836466914e-16, + 1.09111312408168917e-01, + -3.79322231512518038e-02, + 7.33014131715834828e-03, + -1.00516627853677290e-03, + 1.08348016052099035e-04, + -9.70666270147706830e-06, + 7.48356744399226858e-07, + -5.08429209685590423e-08, + 3.09647588364841192e-09, + -1.71247861724743861e-10, + 8.68706515566053273e-12, + -4.07484006668418930e-13, + 1.77909687553410741e-14, + -7.25975179117925905e-16, + 7.39786100606203839e-02, + -3.09973030334847049e-02, + 7.13706714909439002e-03, + -1.14449482059180221e-03, + 1.41826734832929945e-04, + -1.43927020073798888e-05, + 1.24093604506508119e-06, + -9.32356638916694630e-08, + 6.21808381465589104e-09, + -3.73304226880242791e-10, + 2.03976113951411406e-11, + -1.02341601016708250e-12, + 4.74943877271252570e-14, + -2.04800348272375913e-15, + 4.44822090195109501e-02, + -2.09392172088312227e-02, + 5.41915738276537318e-03, + -9.67049825793527733e-04, + 1.31943551650589609e-04, + -1.45982605599078561e-05, + 1.36025690130067802e-06, + -1.09591035944325639e-07, + 7.78315258681891494e-09, + -4.94515193715085102e-10, + 2.84386855654621606e-11, + -1.49430295930514968e-12, + 7.23008608949926626e-14, + -3.23705715592438791e-15, + 1.85071613536259144e-02, + -9.25080266969007838e-03, + 2.55051347732503011e-03, + -4.82721537769454159e-04, + 6.94739912157775924e-05, + -8.06548998795933205e-06, + 7.84776136063335224e-07, + -6.57357985364619336e-08, + 4.83489988582260850e-09, + -3.17027586962610686e-10, + 1.87564565609452246e-11, + -1.01107155448980504e-12, + 5.00599128747134518e-14, + -2.28815481195174940e-15, +# root=9 base[1]=2.5 */ + 3.01138130549991945e-01, + -5.46693094645276170e-03, + 1.11823527246560921e-04, + -2.39822900456089287e-06, + 5.17544431507921077e-08, + -1.10598773146658052e-09, + 2.32659444923313046e-11, + -4.81672789922436895e-13, + 9.81468032423444550e-15, + -1.97187695445198781e-16, + 3.90715653745028242e-18, + -7.65192994306970636e-20, + 1.47955004911678634e-21, + -2.83457263613176955e-23, + 2.49340186166825434e-01, + -1.01206514468222940e-02, + 4.26907972054941175e-04, + -1.60862467707071449e-05, + 5.56127168619780931e-07, + -1.80018538421847961e-08, + 5.52328309045461918e-10, + -1.61928676838330802e-11, + 4.56259877277271994e-13, + -1.24094807110724877e-14, + 3.26902011636492323e-16, + -8.36318682028666871e-18, + 2.08239303029279218e-19, + -5.05276241553508702e-21, + 1.72883258452123378e-01, + -1.46868435071293799e-02, + 9.85075819495373223e-04, + -5.45202431502846626e-05, + 2.64904201601432747e-06, + -1.16510047456810309e-07, + 4.72650473740205088e-09, + -1.79111704747414000e-10, + 6.39816189661944184e-12, + -2.16907706709575642e-13, + 7.01540695314976293e-15, + -2.17362820967251969e-16, + 6.47327683022957558e-18, + -1.85669484777546511e-19, + 1.02692834833810420e-01, + -1.53367911152320607e-02, + 1.50534936641774837e-03, + -1.15231849360109828e-04, + 7.43988741592846532e-06, + -4.21940277918487407e-07, + 2.15500285168935380e-08, + -1.00788797458360296e-09, + 4.36834719579394352e-11, + -1.77018878485966459e-12, + 6.75297921568804180e-14, + -2.43838894772957466e-15, + 8.37051019282170154e-17, + -2.73910460882135664e-18, + 5.40396955827223135e-02, + -1.23749977618060059e-02, + 1.67936070504982947e-03, + -1.69469642845936883e-04, + 1.39403547564765706e-05, + -9.81320000579926774e-07, + 6.09090047703615574e-08, + -3.40103859378706797e-09, + 1.73316252581341304e-10, + -8.14761053795222037e-12, + 3.56283412358723290e-13, + -1.45883848611658241e-14, + 5.62340582097963426e-16, + -2.04744408729290091e-17, + 2.62251626736981075e-02, + -8.26391394395600137e-03, + 1.46456478359570721e-03, + -1.86206052285967154e-04, + 1.87751513555702438e-05, + -1.58483952671057686e-06, + 1.15825274862728581e-07, + -7.49786437253007648e-09, + 4.37033465909042870e-10, + -2.32218074069103134e-11, + 1.13567351762840121e-12, + -5.15135871695835342e-14, + 2.18084310230823303e-15, + -8.65075894252606724e-17, + 1.21511596326006246e-02, + -4.80800618602459946e-03, + 1.04839945717190926e-03, + -1.60147104441636326e-04, + 1.90067714009585629e-05, + -1.85595724797842250e-06, + 1.54594492204943591e-07, + -1.12602948216088123e-08, + 7.30220332097860634e-10, + -4.27398387162611622e-11, + 2.28206558489663973e-12, + -1.12116787392975374e-13, + 5.10414369655180642e-15, + -2.16272659288483999e-16, + 5.35029362536966480e-03, + -2.45462450026227201e-03, + 6.18879028865572172e-04, + -1.07830344779844719e-04, + 1.43994129607343616e-05, + -1.56272091863309863e-06, + 1.43111084138659880e-07, + -1.13512364308841095e-08, + 7.94861294898695772e-10, + -4.98604048506487381e-11, + 2.83420242591158168e-12, + -1.47350566054518099e-13, + 7.06065505588975694e-15, + -3.13331827685210510e-16, + 1.83639382192321717e-03, + -9.11037470806357508e-04, + 2.49139283771634393e-04, + -4.67898985404050877e-05, + 6.68606430299224798e-06, + -7.71119396700291442e-07, + 7.45778264288893743e-08, + -6.21222279412310875e-09, + 4.54569414349833808e-10, + -2.96649982166838459e-11, + 1.74735891073511678e-12, + -9.38061838882486505e-14, + 4.62677850807211554e-15, + -2.10730207792412827e-16, +# root=9 base[2]=5.0 */ + 2.80895198417161096e-01, + -4.67488493963554106e-03, + 8.73703728093066449e-05, + -1.72079874985000616e-06, + 3.42851258005591966e-08, + -6.79580806180460987e-10, + 1.32911503552823933e-11, + -2.56539669160647712e-13, + 4.87533886877861244e-15, + -9.16429579799761129e-17, + 1.69493523416929926e-18, + -3.11941320121419009e-20, + 5.63502052488496185e-22, + -1.00650843264699109e-23, + 2.14648116302021741e-01, + -7.34960520096949402e-03, + 2.77353292548898828e-04, + -9.47726925480056339e-06, + 2.98977736207463503e-07, + -8.87455257844496832e-09, + 2.50721873727470946e-10, + -6.79232243297102951e-12, + 1.77396085398055778e-13, + -4.48443104568137544e-15, + 1.10070415735999083e-16, + -2.62971176920696384e-18, + 6.12789359418520933e-20, + -1.39435767102461702e-21, + 1.26579118131014190e-01, + -8.84676802509641765e-03, + 5.24382798903446430e-04, + -2.59792129182024001e-05, + 1.14173540485101031e-06, + -4.57779146981866735e-08, + 1.70352566096810480e-09, + -5.95234093411027261e-11, + 1.96925993049380000e-12, + -6.20733396695871109e-14, + 1.87323928408424468e-15, + -5.43283476213128557e-17, + 1.51897719702463804e-18, + -4.10188374784547262e-20, + 5.88680977140116565e-02, + -7.29850243403376044e-03, + 6.28625780669696699e-04, + -4.29611370510280284e-05, + 2.50795770663299498e-06, + -1.29812504944122722e-07, + 6.09617663163990378e-09, + -2.63787644395299519e-10, + 1.06340270484832298e-11, + -4.02680602326758341e-13, + 1.44145501336086993e-14, + -4.90234491887363285e-16, + 1.59051547591034680e-17, + -4.93503663678065574e-19, + 2.24135125073204947e-02, + -4.38307664781940540e-03, + 5.26275817306923188e-04, + -4.78165909543508476e-05, + 3.58602800807175852e-06, + -2.32352968444597144e-07, + 1.33770614989796258e-08, + -6.97312976322801656e-10, + 3.33571908852268245e-11, + -1.47913935931715393e-12, + 6.12717425917558063e-14, + -2.38573894755460119e-15, + 8.77552381224420220e-17, + -3.05882211303363761e-18, + 7.39442646182898039e-03, + -2.07191373415600366e-03, + 3.32470672154378671e-04, + -3.87930783218625041e-05, + 3.62720246027752040e-06, + -2.86285260453831957e-07, + 1.96972121238235270e-08, + -1.20732985505564887e-09, + 6.69634504037088408e-11, + -3.40037174330957154e-12, + 1.59529889568266812e-13, + -6.96525942372704672e-15, + 2.84697164706754210e-16, + -1.09338906056398359e-17, + 2.27530202725482718e-03, + -8.37091927850524479e-04, + 1.70735765167709776e-04, + -2.45906114132836157e-05, + 2.77090933623887473e-06, + -2.58391506088942519e-07, + 2.06557380421364504e-08, + -1.44997467461253180e-09, + 9.09505648669154571e-11, + -5.16533227874424139e-12, + 2.68356659881454123e-13, + -1.28599172753099370e-14, + 5.72294068189950995e-16, + -2.37516440529361252e-17, + 6.94210486025151558e-04, + -3.07856465395395251e-04, + 7.50521002575747293e-05, + -1.26858592740513635e-05, + 1.64887148551697683e-06, + -1.74691383909625107e-07, + 1.56577231717074532e-08, + -1.21823663394874890e-09, + 8.38404198621162829e-11, + -5.17755106802511220e-12, + 2.90166962599043295e-13, + -1.48930050323399384e-14, + 7.05323198976429119e-16, + -3.09682068278935810e-17, + 1.86904013012503210e-04, + -9.18271392406321674e-05, + 2.48533555349479660e-05, + -4.62260931137014239e-06, + 6.54717422705042109e-07, + -7.49023173415738873e-08, + 7.19090356985356342e-09, + -5.94972196775970135e-10, + 4.32683233960493445e-11, + -2.80770067642627731e-12, + 1.64519480630367953e-13, + -8.78954580681075150e-15, + 4.31584853214359962e-16, + -1.95753315671656483e-17, +# root=9 base[3]=7.5 */ + 2.63474735975202212e-01, + -4.05012606296207243e-03, + 6.96137919487175140e-05, + -1.26579801459430416e-06, + 2.33812407350836167e-08, + -4.31800556002211967e-10, + 7.87601363409409772e-12, + -1.42504389765758549e-13, + 2.52663696467511525e-15, + -4.48669763168942937e-17, + 7.72548953266661622e-19, + -1.32591079306943815e-20, + 2.40618828653822872e-22, + -3.38661264957185630e-24, + 1.89066431784662647e-01, + -5.51601103787844552e-03, + 1.87377227187481899e-04, + -5.84138572260563890e-06, + 1.69032136552096834e-07, + -4.62155377502206710e-09, + 1.20703732641382680e-10, + -3.03233946692541676e-12, + 7.36422279025444822e-14, + -1.73517036508953106e-15, + 3.97865599129725985e-17, + -8.89690521596950058e-19, + 1.94408022297938931e-20, + -4.15693999808330704e-22, + 9.79697151001032163e-02, + -5.64567749700244179e-03, + 2.97932232432214148e-04, + -1.32752154279006439e-05, + 5.29632401079199896e-07, + -1.94159825633113380e-08, + 6.64375803663886343e-10, + -2.14457410129992383e-11, + 6.58117507555384813e-13, + -1.93100809261187710e-14, + 5.44184455184096456e-16, + -1.47813270222556250e-17, + 3.88086022175616981e-19, + -9.86729936197009311e-21, + 3.72225852088808665e-02, + -3.80528808160590561e-03, + 2.88425092453392358e-04, + -1.76132257235953621e-05, + 9.30132596849754966e-07, + -4.39419286435582700e-08, + 1.89684084089629719e-09, + -7.58901124364944422e-11, + 2.84296256367264171e-12, + -1.00482645342850740e-13, + 3.37054260082429542e-15, + -1.07800222293279807e-16, + 3.29980262895077606e-18, + -9.68996523499042591e-20, + 1.06899435032410759e-02, + -1.75842976491268174e-03, + 1.85869874645158294e-04, + -1.51381370218259142e-05, + 1.03100647599108217e-06, + -6.12593801925670459e-08, + 3.25943853199752200e-09, + -1.58045264834061533e-10, + 7.07170348237324224e-12, + -2.94733447712088875e-13, + 1.15248376512288790e-14, + -4.25236533491355452e-16, + 1.48743108896504791e-17, + -4.94657038073803975e-19, + 2.45418969766769083e-03, + -5.99238103390298585e-04, + 8.60315233167514002e-05, + -9.12573687946848819e-06, + 7.84909202528654672e-07, + -5.75132941041311746e-08, + 3.70117599771158519e-09, + -2.13523239058518445e-10, + 1.12064931451113311e-11, + -5.41001461015968060e-13, + 2.42293726419550062e-14, + -1.01358000861674955e-15, + 3.98248837630657811e-17, + -1.47476578751055561e-18, + 4.94595812144223634e-04, + -1.66023810937800939e-04, + 3.12338398622691107e-05, + -4.19366824411715882e-06, + 4.44375123516352400e-07, + -3.92462288886866124e-08, + 2.98898033367835242e-09, + -2.00899884794404986e-10, + 1.21178820257757569e-11, + -6.64262661343798970e-13, + 3.34188302997239463e-14, + -1.55526581430210550e-15, + 6.73881349341499587e-17, + -2.72943273829079323e-18, + 9.90311138552302781e-05, + -4.19738747204107546e-05, + 9.79808427888452366e-06, + -1.59348476218152325e-06, + 2.00192301787085094e-07, + -2.05816916192557518e-08, + 1.79619524858392014e-09, + -1.36466738313672174e-10, + 9.19387559154597088e-12, + -5.56999047207124229e-13, + 3.06815331542378034e-14, + -1.55032699498855958e-15, + 7.23882778790143291e-17, + -3.13765128297039202e-18, + 1.96494570138554070e-05, + -9.53080820526899087e-06, + 2.54525870579759039e-06, + -4.67593376261603304e-07, + 6.54910243622819687e-08, + -7.41731581212420801e-09, + 7.05638137774964742e-10, + -5.79046554606957030e-11, + 4.17955213817202439e-12, + -2.69362908079239229e-13, + 1.56848959989966806e-14, + -8.33160536461749708e-16, + 4.06932013836744139e-17, + -1.83670046576638123e-18, +# root=9 base[4]=10.0 */ + 2.48300041377624625e-01, + -3.54821007414730331e-03, + 5.64137457958489228e-05, + -9.51725419647594717e-07, + 1.63538530776952269e-08, + -2.82825434788917184e-10, + 4.81182022574456405e-12, + -8.24908414021186569e-14, + 1.35416493825948431e-15, + -2.27409385844989924e-17, + 3.95214336703440022e-19, + -4.74746056626040956e-21, + 1.29507743984160264e-22, + -1.59156325135615313e-24, + 1.69613258592583332e-01, + -4.25753129138963481e-03, + 1.30898545618037194e-04, + -3.74364408752324399e-06, + 9.98585686446114113e-08, + -2.52560965666168027e-09, + 6.12146584635694265e-11, + -1.43090315292560988e-12, + 3.24181081647734814e-14, + -7.13916941210596626e-16, + 1.53307884057109091e-17, + -3.21866167384323855e-19, + 6.59923917783664075e-21, + -1.33008925254498638e-22, + 7.93155060500789072e-02, + -3.78011805525835460e-03, + 1.78995966331070246e-04, + -7.20962338501572601e-06, + 2.62157840547637677e-07, + -8.81547877572528340e-09, + 2.78151073118630272e-10, + -8.31333207005399476e-12, + 2.37108552067672699e-13, + -6.48617438394750517e-15, + 1.70899150519322079e-16, + -4.35291375759064842e-18, + 1.07369668786078941e-19, + -2.57178180402443160e-21, + 2.55633575954699391e-02, + -2.14400854271967799e-03, + 1.43762964734768956e-04, + -7.86105695123953437e-06, + 3.76136474236003019e-07, + -1.62359595701814270e-08, + 6.44643420942374398e-10, + -2.38525545566269219e-11, + 8.30297684427922275e-13, + -2.73811793205132470e-14, + 8.60114335363815250e-16, + -2.58485190419485761e-17, + 7.45721187591014891e-19, + -2.06994357724987400e-20, + 5.78026863419170249e-03, + -7.89126362012901989e-04, + 7.32996764684856967e-05, + -5.33798721779526745e-06, + 3.29410757671507739e-07, + -1.79064466361388444e-08, + 8.78375343931057723e-10, + -3.95172054132695138e-11, + 1.64954653050961276e-12, + -6.44427551162080754e-14, + 2.37203852837565538e-15, + -8.27019898161903352e-17, + 2.74299827868501788e-18, + -8.67788937310462566e-20, + 9.56303668878371455e-04, + -1.99359048884080486e-04, + 2.53530370962867487e-05, + -2.42523811956253997e-06, + 1.90569436655186295e-07, + -1.28833273124839690e-08, + 7.71031030764042549e-10, + -4.16409910642604383e-11, + 2.05751555803651056e-12, + -9.39733644265781654e-14, + 3.99913765134029614e-15, + -1.59581407545337576e-16, + 6.00196180139293049e-18, + -2.13444293831983141e-19, + 1.26749286368933479e-04, + -3.79682134520284927e-05, + 6.49032440237272132e-06, + -8.02749534877751195e-07, + 7.91930234496441749e-08, + -6.56674047494255040e-09, + 4.72817606409758757e-10, + -3.02196083919560953e-11, + 1.74191074372150854e-12, + -9.16412886724717833e-14, + 4.44144072068871079e-15, + -1.99781854428763287e-16, + 8.39133322226774792e-18, + -3.30359155224990999e-19, + 1.58887045167691566e-05, + -6.33849918053522694e-06, + 1.39911544370225838e-06, + -2.16688455304273449e-07, + 2.60865582842522087e-08, + -2.58347457323707358e-09, + 2.18140792952757099e-10, + -1.60946870229539072e-11, + 1.05633611145367842e-12, + -6.25156637782875940e-14, + 3.37184389539533377e-15, + -1.67172010402272465e-16, + 7.67259158513950090e-18, + -3.27431428232010984e-19, + 2.15481493055263971e-06, + -1.02713476947413125e-06, + 2.69492565284066316e-07, + -4.87203596704205567e-08, + 6.72672141488323674e-09, + -7.52185550636448472e-10, + 7.07465138034940741e-11, + -5.74630143184546430e-12, + 4.10954865826275714e-13, + -2.62645808467713883e-14, + 1.51779167929862836e-15, + -8.00654409722830416e-17, + 3.88577055502063641e-18, + -1.74366522773981068e-19, +# root=9 base[5]=12.5 */ + 2.34943249967214302e-01, + -3.13852738042490155e-03, + 4.63947182081252590e-05, + -7.29747127134967011e-07, + 1.16875586946297368e-08, + -1.90817664071976697e-10, + 3.00553764120341360e-12, + -4.95173654046800667e-14, + 7.83986280760785764e-16, + -9.61145695483903769e-18, + 2.88976482314480062e-19, + -1.01944266550064255e-21, + 9.72675207325342240e-24, + -3.37054945656008917e-24, + 1.54426857486192282e-01, + -3.36625663567187428e-03, + 9.41201747050660878e-05, + -2.48196123650279760e-06, + 6.13111272184845218e-08, + -1.44012949782147543e-09, + 3.25159815287750978e-11, + -7.09370899857241824e-13, + 1.50390355929914141e-14, + -3.10729100698788902e-16, + 6.24461111344873754e-18, + -1.23967455491014229e-19, + 2.39104055278832268e-21, + -4.48573608734685094e-23, + 6.65965944118130787e-02, + -2.63428697892878743e-03, + 1.12820002029933453e-04, + -4.12894693249315779e-06, + 1.37411534262488460e-07, + -4.25217828637520576e-09, + 1.24110631467455281e-10, + -3.44267586355519455e-12, + 9.14503790348422371e-14, + -2.33843573826412239e-15, + 5.76163356956924823e-17, + -1.37969367665727688e-18, + 3.20237843239466525e-20, + -7.21103695779788337e-22, + 1.88077158714303021e-02, + -1.28908608742584504e-03, + 7.70347424815240252e-05, + -3.78277640455864615e-06, + 1.64401528730244283e-07, + -6.49539195431390038e-09, + 2.37552241354475344e-10, + -8.13641896680807859e-12, + 2.63329802833578360e-13, + -8.10583066067570285e-15, + 2.38416909230218929e-16, + -6.73184332727436675e-18, + 1.82969947094310135e-19, + -4.79674971257436766e-21, + 3.48900307795144138e-03, + -3.90639650890835884e-04, + 3.19405223553887027e-05, + -2.07811926826405116e-06, + 1.16117052479255407e-07, + -5.76869206388769960e-09, + 2.60557405409503256e-10, + -1.08598829064414433e-11, + 4.22185085570311257e-13, + -1.54316822228603121e-14, + 5.33610171209707920e-16, + -1.75425388759884725e-17, + 5.50469400389945358e-19, + -1.65281959328816187e-20, + 4.33902838740643569e-04, + -7.56982855432446948e-05, + 8.46806827250995404e-06, + -7.25983521023790992e-07, + 5.18401312397137040e-08, + -3.21751699449608635e-09, + 1.78238313684976632e-10, + -8.97084300094116623e-12, + 4.15482724994221722e-13, + -1.78772970300323569e-14, + 7.19920885992345120e-16, + -2.72931335237917181e-17, + 9.78768390222007530e-19, + -3.33000435146799051e-20, + 3.86905416825173061e-05, + -1.00871659431338714e-05, + 1.54368916964182622e-06, + -1.73831744219903453e-07, + 1.58094636719262775e-08, + -1.22028202998618711e-09, + 8.24298409046842998e-11, + -4.97499300313456872e-12, + 2.72303079664675209e-13, + -1.36686189058972459e-14, + 6.34728071747664847e-16, + -2.74575363603621615e-17, + 1.11278890061766548e-18, + -4.23995406885141744e-20, + 2.94189718950645796e-06, + -1.08217839420252787e-06, + 2.22388194610349451e-07, + -3.23924441302806345e-08, + 3.69832841574086934e-09, + -3.49727167759482461e-10, + 2.83553892289129839e-11, + -2.01833320498862669e-12, + 1.28306863361140826e-13, + -7.37990590004293336e-15, + 3.87988037364045718e-16, + -1.87979966384349945e-17, + 8.44999939289772343e-19, + -3.53895340126627238e-20, + 2.49921266676991391e-07, + -1.16267439768540822e-07, + 2.97846066712252291e-08, + -5.27132137420136454e-09, + 7.14334463011840161e-10, + -7.85759667622831747e-11, + 7.28393426270232854e-12, + -5.84047652731708212e-13, + 4.12905216745785321e-14, + -2.61176426210097097e-15, + 1.49527977904549793e-16, + -7.82136556138980095e-18, + 3.76680332423523809e-19, + -1.67847782350115017e-20, +# root=9 base[6]=15.0 */ + 2.23080130233187512e-01, + -2.79948520595081803e-03, + 3.86453413926360711e-05, + -5.69781525378974118e-07, + 8.49380634361461745e-09, + -1.32730075767050929e-10, + 1.93357884563766884e-12, + -2.78424444282841499e-14, + 6.31425042719946049e-16, + 4.92817843536552933e-19, + 1.84468455714838300e-19, + -5.39531001655230827e-21, + -1.94521318527784951e-22, + -3.52009420772579161e-24, + 1.42300092513591908e-01, + -2.71769623962216838e-03, + 6.93930148985241507e-05, + -1.69489523204022785e-06, + 3.89462308063187509e-08, + -8.52557146311142793e-10, + 1.79999868542785947e-11, + -3.67833176434342717e-13, + 7.29040917594989209e-15, + -1.43048902415296802e-16, + 2.67246244467849632e-18, + -4.96201600542917099e-20, + 9.54017776760667423e-22, + -1.56766523718493389e-23, + 5.75961625332096980e-02, + -1.89809391534799922e-03, + 7.41048249511347818e-05, + -2.47655594955320559e-06, + 7.57751856202895971e-08, + -2.16396984394546751e-09, + 5.86262657623820794e-11, + -1.51467303783678649e-12, + 3.74307658499321175e-14, + -9.01713488283775884e-16, + 2.07378631708923854e-17, + -4.64950149290249578e-19, + 1.03363370968019530e-20, + -2.15980404683004637e-22, + 1.46486868302411356e-02, + -8.17849925930260466e-04, + 4.39636115588798438e-05, + -1.94507841262981967e-06, + 7.70302948731069143e-08, + -2.79154000786209288e-09, + 9.42315234832816955e-11, + -2.99282420396742132e-12, + 9.00924565965713869e-14, + -2.59335033906232853e-15, + 7.14254801720412049e-17, + -1.89422763668044781e-18, + 4.85831012634559511e-20, + -1.20137780090633473e-21, + 2.31484945196574728e-03, + -2.10263166053457689e-04, + 1.52153138460180887e-05, + -8.84766669997462598e-07, + 4.47951658161771001e-08, + -2.03395852790039779e-09, + 8.45741999796339405e-11, + -3.26408820777477867e-12, + 1.18069013974418550e-13, + -4.03410736455790191e-15, + 1.30874999863108629e-16, + -4.05094498595767667e-18, + 1.20083887527680422e-19, + -3.41586771005700961e-21, + 2.26373328027869742e-04, + -3.24167843960506720e-05, + 3.18055025899150868e-06, + -2.43336004659904010e-07, + 1.57348436358287605e-08, + -8.93456024518990554e-10, + 4.56550375162448727e-11, + -2.13404448292707600e-12, + 9.23225671773249914e-14, + -3.72940600828857250e-15, + 1.41623602346066726e-16, + -5.08340810869930752e-18, + 1.73224345787973307e-19, + -5.61915319750775070e-21, + 1.41149336334777635e-05, + -3.11707773038844728e-06, + 4.21504445461233620e-07, + -4.27569917738620234e-08, + 3.55307672439316923e-09, + -2.53271504923018622e-10, + 1.59355465601913255e-11, + -9.02215729427213641e-13, + 4.66036460521693389e-14, + -2.21923257548601829e-15, + 9.82105471303865050e-17, + -4.06517826786966855e-18, + 1.58214494125450101e-19, + -5.80835791545076334e-21, + 6.45663678773375783e-07, + -2.13216210958066647e-07, + 4.00505082916975877e-08, + -5.40781159554784165e-09, + 5.78634843512111221e-10, + -5.17238408284512366e-11, + 3.99204113980632482e-12, + -2.72060171737051277e-13, + 1.66399497068379648e-14, + -9.24673695403252699e-16, + 4.71353565575998037e-17, + -2.22116771396403702e-18, + 9.73752216191738837e-20, + -3.98704001640846874e-21, + 3.12691402634807208e-08, + -1.40459289561059910e-08, + 3.48126706693346724e-09, + -5.98698749390554340e-10, + 7.91486991665089221e-11, + -8.52149221254904755e-12, + 7.75282746784330801e-13, + -6.11498233495689147e-14, + 4.26063904942344436e-15, + -2.66030815036998175e-16, + 1.50551898253406043e-17, + -7.79326702976127207e-19, + 3.71809708901834149e-20, + -1.64272242854438421e-21, +# root=9 base[7]=17.5 */ + 2.12460226337716301e-01, + -2.51554818829006393e-03, + 3.25433099876455074e-05, + -4.52819434653592446e-07, + 6.25212537720213281e-09, + -9.33435642248235676e-11, + 1.44609676655217346e-12, + -6.57900113160319611e-15, + 6.96102193489516167e-16, + -8.21949760204849151e-20, + -2.97478671477556568e-19, + -1.66068824447185393e-20, + -1.96628668857328022e-22, + 5.37044917172162557e-24, + 1.32424203550134512e-01, + -2.23447275839940094e-03, + 5.22979083575105381e-05, + -1.18777463163465666e-06, + 2.54992749598339596e-08, + -5.21900434919190763e-10, + 1.03184511685252904e-11, + -1.99872401940932337e-13, + 3.64304624752204806e-15, + -6.87644997377094293e-17, + 1.26541512779403724e-18, + -1.85837373525272266e-20, + 4.09379151714901245e-22, + -7.36366415778711685e-24, + 5.10265556514115995e-02, + -1.40637458461660703e-03, + 5.04457128464618133e-05, + -1.54625893092984314e-06, + 4.37211054552790530e-08, + -1.15564097243820371e-09, + 2.90508449800775221e-11, + -7.08847671320838187e-13, + 1.60545709542237387e-14, + -3.67581388325362284e-16, + 8.15150659019872801e-18, + -1.59636351921941877e-19, + 3.58862520317854735e-21, + -7.30683974705006556e-23, + 1.19577219424362897e-02, + -5.42118339829908966e-04, + 2.65073832367654106e-05, + -1.05993165125260423e-06, + 3.84056107208243380e-08, + -1.27974080142888669e-09, + 3.99144450677826381e-11, + -1.18174263767092496e-12, + 3.29945186460884796e-14, + -8.90691397169817563e-16, + 2.31006416299177420e-17, + -5.70420391331530820e-19, + 1.39039488611397790e-20, + -3.25469459374688796e-22, + 1.66387051772929565e-03, + -1.21328398771618551e-04, + 7.84371847647393576e-06, + -4.08007335789247016e-07, + 1.87562354196379410e-08, + -7.79115746960337776e-10, + 2.98329504168280322e-11, + -1.06727919949084127e-12, + 3.58905286141823608e-14, + -1.14623092127295163e-15, + 3.48873423006198767e-17, + -1.01497852198198650e-18, + 2.84134073821707024e-20, + -7.64928786789733637e-22, + 1.33741107124967743e-04, + -1.54249097782472921e-05, + 1.33034863553350468e-06, + -9.05830878687601323e-08, + 5.29577241353151278e-09, + -2.74538962255853812e-10, + 1.29113647926694753e-11, + -5.59250962401747377e-13, + 2.25408849346433941e-14, + -8.52646562085500421e-16, + 3.04526072580725438e-17, + -1.03195982146612165e-18, + 3.33221383023302671e-20, + -1.02764413431508043e-21, + 6.12763602570162208e-06, + -1.11386100172440960e-06, + 1.31866664106152258e-07, + -1.19430281367577017e-08, + 9.00232045727114106e-10, + -5.88656354116710210e-11, + 3.42836421590865555e-12, + -1.81016724061478446e-13, + 8.77507707987719756e-15, + -3.94309303056396484e-16, + 1.65455923622064091e-17, + -6.52149970769123382e-19, + 2.42618246713395234e-20, + -8.54430999646816080e-22, + 1.72068244644766867e-07, + -4.93203089197218735e-08, + 8.30117579467481385e-09, + -1.02296389585654990e-09, + 1.01277588525071352e-10, + -8.46498769990141137e-12, + 6.16038970906972280e-13, + -3.98619727657603490e-14, + 2.32833663889501028e-15, + -1.24173342555884429e-16, + 6.10072601348163965e-18, + -2.78110831120525061e-19, + 1.18329678629576950e-20, + -4.71596680760866126e-22, + 4.34145408549649038e-09, + -1.85111702200636905e-09, + 4.37965497252074883e-10, + -7.24213854174231367e-11, + 9.26146106036009366e-12, + -9.69251445787994265e-13, + 8.60533153426754591e-14, + -6.64473432076565046e-15, + 4.54440937601610485e-16, + -2.79132091953604114e-17, + 1.55683509683296590e-18, + -7.95492615433381644e-20, + 3.75128651387561670e-21, + -1.64013787369749682e-22, +# root=9 base[8]=20.0 */ + 2.02886541291493999e-01, + -2.27536622447287824e-03, + 2.76541179874297220e-05, + -3.65853172608825818e-07, + 4.72997346315383005e-09, + -5.84531613554915423e-11, + 1.54807496992008850e-12, + 1.18172840396143246e-14, + 2.89021778526342586e-16, + -2.76975875900058696e-17, + -1.05110098148953585e-18, + -1.12144753702853018e-20, + 6.26981283238756429e-22, + 2.90618329082513205e-23, + 1.24241653649261277e-01, + -1.86688131806280323e-03, + 4.01869879382568009e-05, + -8.51526965329123867e-07, + 1.71439195853522944e-08, + -3.30213591018759786e-10, + 6.04380958759330504e-12, + -1.14441291004569427e-13, + 1.92457220859758244e-15, + -3.00252855917934636e-17, + 7.50941626029795689e-19, + -7.70180114667744869e-21, + 4.04510468169557370e-23, + -7.64805628946016789e-24, + 4.61054197030213372e-02, + -1.06667736941833450e-03, + 3.54315935854326446e-05, + -9.99582147464601874e-07, + 2.62282053771807282e-08, + -6.48808932952294094e-10, + 1.47880780529607785e-11, + -3.55092084981527656e-13, + 7.37303277994309879e-15, + -1.42796609539923321e-16, + 3.81617322699479544e-18, + -5.83357615266059867e-20, + 9.08529166381563673e-22, + -3.99884998283642780e-23, + 1.01453619560715712e-02, + -3.72145003977791019e-04, + 1.67728217503703169e-05, + -6.07580878318938610e-07, + 2.02207973444702681e-08, + -6.23832991224485477e-10, + 1.78225993726021182e-11, + -5.00029881665205058e-13, + 1.29375253895413344e-14, + -3.20055795278628567e-16, + 8.18449645751368424e-18, + -1.83593149867212448e-19, + 4.09996904086980670e-21, + -1.00539684680871713e-22, + 1.27895536798652842e-03, + -7.40352269633759821e-05, + 4.33698297483457353e-06, + -2.01897892304201299e-07, + 8.45136359143565398e-09, + -3.22240351262520210e-10, + 1.13361868844476222e-11, + -3.77760369985410662e-13, + 1.18056692804160919e-14, + -3.51153746182721073e-16, + 1.00937190650385237e-17, + -2.74884178743299301e-19, + 7.24418069739870893e-21, + -1.86076500657351188e-22, + 8.80375508155235745e-05, + -8.01909955922910696e-06, + 6.13416564074689009e-07, + -3.70934209449470525e-08, + 1.96101438631740303e-09, + -9.27967502181613030e-11, + 4.00895111932584356e-12, + -1.60836209840162404e-13, + 6.02923190711802212e-15, + -2.13103588698437385e-16, + 7.14964034405800740e-18, + -2.28176292839378477e-19, + 6.96594528215523250e-21, + -2.03877679577716616e-22, + 3.13047339190067858e-06, + -4.54468990942942602e-07, + 4.69751219532307197e-08, + -3.77172335094654785e-09, + 2.56560841135339419e-10, + -1.53127133413351094e-11, + 8.21341860468974406e-13, + -4.02537173779190371e-14, + 1.82267958366445094e-15, + -7.69295912621340483e-17, + 3.04716888463512729e-18, + -1.13864838314007024e-19, + 4.03203658303881757e-21, + -1.35653712440232176e-22, + 5.66282795820699064e-08, + -1.35257903897951745e-08, + 2.00207304652100618e-09, + -2.21697079400376996e-10, + 2.00536904125463191e-11, + -1.55015454289948002e-12, + 1.05347170114890881e-13, + -6.41636764591878728e-15, + 3.55120159550368277e-16, + -1.80476248537277850e-17, + 8.49106854186235878e-19, + -3.72255951701068705e-20, + 1.52894006738718358e-21, + -5.90216895822342316e-23, + 6.96034652508359610e-10, + -2.74016752347670719e-10, + 6.06934918957140949e-11, + -9.50798260124051235e-12, + 1.16257889145398537e-12, + -1.17163192728061826e-13, + 1.00732419367047324e-14, + -7.56621453307973517e-16, + 5.05204240128391136e-17, + -3.03877028907112416e-18, + 1.66387590952592607e-19, + -8.36417076809611703e-21, + 3.88735372822226971e-22, + -1.67772663374880264e-23, +# root=9 base[9]=22.5 */ + 1.94201453844604299e-01, + -2.07048282875439606e-03, + 2.36862382990928607e-05, + -2.97390861723601392e-07, + 3.95964583568667016e-09, + -1.75056361329423943e-11, + 1.79877143573337611e-12, + -3.18625204747779010e-15, + -1.45734281041309591e-15, + -6.44154375541021542e-17, + -2.41227058887116524e-19, + 6.33664355774995838e-20, + 2.44987147184050694e-21, + 2.00943697215883089e-23, + 1.17358384116154929e-01, + -1.58205122327607114e-03, + 3.14193692177678759e-05, + -6.23152461599646544e-07, + 1.17630388832673522e-08, + -2.17463318038297332e-10, + 3.57657056741527108e-12, + -6.50403346430115643e-14, + 1.29718157442561698e-15, + -7.64482893810243356e-18, + 3.11980658072692119e-19, + -1.52406318945389095e-20, + -3.16722336159872247e-22, + -2.41469073083296925e-24, + 4.23385583570311252e-02, + -8.24946414110852067e-04, + 2.55805708720728894e-05, + -6.67408859483345067e-07, + 1.61169125286456334e-08, + -3.90356241794172569e-10, + 7.55926854365547818e-12, + -1.76492855266485378e-13, + 4.42534572478480663e-15, + -3.57962379835502231e-17, + 1.50923620803064026e-18, + -6.10817172009471006e-20, + -8.76667970572466309e-22, + -1.97422511734700750e-23, + 8.88565053688428197e-03, + -2.62444116810007383e-04, + 1.10753619824604431e-05, + -3.64656248382195433e-07, + 1.10912188155601343e-08, + -3.26042961597234628e-10, + 8.25874737871332911e-12, + -2.20191647315746595e-13, + 5.77237157918367261e-15, + -1.11717232631281541e-16, + 2.97408623123428790e-18, + -7.92699096177549629e-20, + 7.86204808974460767e-22, + -3.50759678824013174e-23, + 1.03956390027519193e-03, + -4.71406385611104482e-05, + 2.55248826953142914e-06, + -1.06406625124738529e-07, + 4.05007879382756852e-09, + -1.43795101977280412e-10, + 4.59090861441261392e-12, + -1.43022029642189385e-13, + 4.24353249536027050e-15, + -1.13815823011399697e-16, + 3.13362654300001811e-18, + -8.28011182018946208e-20, + 1.89768532643794315e-21, + -4.95715336074861781e-23, + 6.35588823967523769e-05, + -4.47221642996276848e-06, + 3.08836192170376609e-07, + -1.65505703650883153e-08, + 7.90930739521464917e-10, + -3.43327884019965166e-11, + 1.35656209176982556e-12, + -5.04484558640918397e-14, + 1.76381863397512826e-15, + -5.78930219101137650e-17, + 1.82738532035280365e-18, + -5.50110153379999771e-20, + 1.57383463454720758e-21, + -4.39418376802155758e-23, + 1.85229082948645199e-06, + -2.07757058075992988e-07, + 1.88877356007612231e-08, + -1.33648452892413378e-09, + 8.17678585492945818e-11, + -4.44480542539982682e-12, + 2.18613349179773106e-13, + -9.91305085910761083e-15, + 4.17891113935099278e-16, + -1.64975538937258222e-17, + 6.14778637233592259e-19, + -2.16999221806904290e-20, + 7.28394212342363111e-22, + -2.33361697953027652e-23, + 2.31448769050653681e-08, + -4.39029965075492672e-09, + 5.64365442776447381e-10, + -5.53591063664394839e-11, + 4.52395150300472871e-12, + -3.20225680292191262e-13, + 2.01358993667955285e-14, + -1.14482933580541340e-15, + 5.95773935939709177e-17, + -2.86471000503415322e-18, + 1.28218087224500122e-19, + -5.37288240490456667e-21, + 2.11816191044885501e-22, + -7.87858441626305600e-24, + 1.35860041220455602e-10, + -4.72151012498522002e-11, + 9.53266303207329414e-12, + -1.38677116930362054e-12, + 1.59645491166083762e-13, + -1.53026827485077212e-14, + 1.26125816214952808e-15, + -9.13851758749620388e-17, + 5.91566886566790763e-18, + -3.46382034259807641e-19, + 1.85256141245848553e-20, + -9.12220921071362418e-22, + 4.16288813166069029e-23, + -1.76776636941368005e-24, +# root=9 base[10]=25.0 */ + 1.86277404504786859e-01, + -1.89420265884986268e-03, + 2.04933484189691743e-05, + -2.34643741510089759e-07, + 3.99798957790520641e-09, + 1.72888263752253820e-11, + 7.36560947816105542e-13, + -8.12794148738797897e-14, + -2.97197151566701560e-15, + 1.38578644717022933e-17, + 4.69290295328437591e-18, + 1.26161789130068228e-19, + -2.13971053621029117e-21, + -2.36014729937203026e-22, + 1.11489645571570692e-01, + -1.35771102549318758e-03, + 2.49408784282143997e-05, + -4.65611618121953572e-07, + 8.14799533469837354e-09, + -1.48994085603156418e-10, + 2.30350258507355121e-12, + -2.70917472457431620e-14, + 1.04763492968810760e-15, + -1.23818918326309112e-17, + -5.93448690669723885e-19, + -1.96274091351850162e-20, + 4.93830119205244602e-22, + 3.69380800928713575e-23, + 3.94028172235301941e-02, + -6.48490187578712267e-04, + 1.88892583501188129e-05, + -4.63542576787119562e-07, + 9.80242926309286889e-09, + -2.53152370681868512e-10, + 4.45501293190615607e-12, + -4.98943255441273423e-14, + 3.45785076123975470e-15, + -4.15307561550398265e-17, + -1.98554025136750034e-18, + -8.07657389498630485e-20, + 1.37911130317943341e-21, + 1.27440632304592040e-22, + 7.98904871853801761e-03, + -1.88762552710367959e-04, + 7.57902695889984751e-06, + -2.30355719135068127e-07, + 6.14764162396092403e-09, + -1.83999493155275368e-10, + 4.20136477787093803e-12, + -8.32170455327095080e-14, + 3.11956400961778094e-15, + -5.54438848840277750e-17, + -1.59904124092258826e-20, + -5.59529041258134361e-20, + 9.17570471970740333e-22, + 4.79014272807737183e-23, + 8.85063235181051560e-04, + -3.09120878029314072e-05, + 1.58575682673121475e-06, + -5.97527610887834118e-08, + 2.01751336847930487e-09, + -6.93966223905038399e-11, + 2.00915221164149946e-12, + -5.44262871244226896e-14, + 1.71438450479546714e-15, + -4.15710821572539751e-17, + 8.41217418838242431e-19, + -3.11875824909782490e-20, + 6.42806489582362323e-22, + -3.67100906981726552e-24, + 4.96005062687262410e-05, + -2.62350524248115126e-06, + 1.68147803087036875e-07, + -8.00599023236863372e-09, + 3.41742805115907789e-10, + -1.38661310786346298e-11, + 4.99386269150123703e-13, + -1.69203001453959743e-14, + 5.67050657161753201e-16, + -1.71638701993239756e-17, + 4.92429088490929426e-19, + -1.47750979789377511e-20, + 3.89180865037048591e-22, + -9.51273706880379467e-24, + 1.24625454864284900e-06, + -1.03847865623243049e-07, + 8.48451840247365703e-09, + -5.27147133036843196e-10, + 2.88333500364316196e-11, + -1.43385670624578981e-12, + 6.44087556059010300e-14, + -2.68901347523694231e-15, + 1.05762749960515948e-16, + -3.88692149459935116e-18, + 1.35538351847338193e-19, + -4.53114200175388325e-21, + 1.43237317832828882e-22, + -4.34118150533086682e-24, + 1.16653848206671928e-08, + -1.65999814866518018e-09, + 1.85510054312684385e-10, + -1.59234680409111869e-11, + 1.16433006058303254e-12, + -7.49369554514520890e-14, + 4.32416675502755019e-15, + -2.27786334876962172e-16, + 1.10724492082158767e-17, + -5.00254404203012466e-19, + 2.11654850483118924e-20, + -8.42879955736706605e-22, + 3.17061501553960360e-23, + -1.13029032027903899e-24, + 3.43583539453202123e-11, + -9.81876168656052257e-12, + 1.75080365109314509e-12, + -2.30672535906568035e-13, + 2.45280450346355999e-14, + -2.20213495765246516e-15, + 1.71800622012312445e-16, + -1.18815131991195605e-17, + 7.39053846680618965e-19, + -4.18085649137910624e-20, + 2.17008610327386836e-21, + -1.04093997931437827e-22, + 4.64203408447672399e-24, + -1.93156564078399714e-25, +# root=9 base[11]=27.5 */ + 1.79012226711313949e-01, + -1.74040336112014265e-03, + 1.80734146090638692e-05, + -1.67895979124694327e-07, + 4.28802469576010017e-09, + -1.12719558756590521e-12, + -2.49193879607042246e-12, + -1.25114682513732891e-13, + 1.60884775317558118e-15, + 2.33551362492788845e-16, + 3.21639021036309855e-18, + -2.82526590347490774e-19, + -1.19282953318892397e-20, + 1.29327709118006010e-22, + 1.06425322610707432e-01, + -1.17852508439495558e-03, + 2.00465845682715634e-05, + -3.56275876178276170e-07, + 5.67664320481548957e-09, + -9.96301094358708952e-11, + 1.90813512955309047e-12, + -6.25851359926117196e-15, + 8.25147562319325612e-17, + -3.93931887793853181e-17, + -2.66972806037425204e-19, + 4.48339864176874821e-20, + 1.58709638538148367e-21, + -3.41205478615351907e-23, + 3.70791578476831613e-02, + -5.17308478207038707e-04, + 1.41187100799065386e-05, + -3.41672996157587651e-07, + 5.75173642123112104e-09, + -1.52557509549878307e-10, + 4.24313869681790696e-12, + 1.68035021593683896e-14, + 4.93864643602835673e-17, + -1.46017152209810021e-16, + -1.49086018753953258e-18, + 1.51780330919193408e-19, + 6.68503740897434456e-21, + -7.31868565001683597e-23, + 7.33978878722233927e-03, + -1.37762531728148125e-04, + 5.29950953946428144e-06, + -1.56568549506530767e-07, + 3.33737318182189893e-09, + -1.01794743746337934e-10, + 2.94568226514846846e-12, + -1.90547148378718314e-14, + 7.15925110369159562e-16, + -8.14963418724967579e-17, + -4.31879669594463665e-19, + 5.88159522799234284e-20, + 3.28884140841040906e-21, + -2.57974042783657092e-23, + 7.82900216525436038e-04, + -2.06360386822982299e-05, + 1.02390768849305448e-06, + -3.63785697270946860e-08, + 1.01516960222339159e-09, + -3.44720839684764112e-11, + 1.06170202423371285e-12, + -1.91551285457447348e-14, + 5.76447563394204773e-16, + -2.60545058359069998e-17, + 1.82784904419629094e-19, + 2.90316001996306707e-21, + 7.75634153880044064e-22, + -5.33022788559576320e-24, + 4.12963433910092030e-05, + -1.58717383621065708e-06, + 9.74759915732069411e-08, + -4.23586947571605801e-09, + 1.54480816067695478e-10, + -5.97692407161837001e-12, + 2.07870014801856372e-13, + -5.85912640732646842e-15, + 1.87149676395527485e-16, + -6.25935604534870364e-18, + 1.34353350316428593e-19, + -3.28882921870267015e-21, + 1.50830111480597889e-22, + -2.31278187492649586e-24, + 9.35310785763210478e-07, + -5.51698569575275390e-08, + 4.19609359085060078e-09, + -2.31313028502661157e-10, + 1.10540403636061560e-11, + -5.08818200367395336e-13, + 2.11431174292200445e-14, + -7.92258349585906973e-16, + 2.92131684505136356e-17, + -1.02535150230611269e-18, + 3.22006592915668342e-20, + -1.01169756646080740e-21, + 3.22221912191968382e-23, + -8.59961286250131125e-25, + 7.11610085975677040e-09, + -7.09253886131314703e-10, + 7.04484655651419814e-11, + -5.26087439926829301e-12, + 3.39736851102192442e-13, + -1.98557153384797467e-14, + 1.04649504653900259e-15, + -5.05933470232131478e-17, + 2.28860321023504041e-18, + -9.67572670148535213e-20, + 3.83461142467697321e-21, + -1.44541010946963521e-22, + 5.17675654928711036e-24, + -1.75032125639222889e-25, + 1.18958976725691247e-11, + -2.51876660118179496e-12, + 3.86746382648891283e-13, + -4.48743649016926072e-14, + 4.31248539111403019e-15, + -3.56522768394808492e-16, + 2.59400637506249627e-17, + -1.69085129060887066e-18, + 9.99973470013006513e-20, + -5.41511872874151237e-21, + 2.70603988613680236e-22, + -1.25589583634104233e-23, + 5.44048105491606689e-25, + -2.20660168135594478e-26, +# root=9 base[12]=30.0 */ + 1.72328639266706829e-01, + -1.60273666533930492e-03, + 1.64562645590095124e-05, + -1.03701481436957730e-07, + 3.44752038848980558e-09, + -8.92550401291596807e-11, + -4.01403042825267637e-12, + 5.37391655083998938e-14, + 8.27300432469669101e-15, + 1.58550769977263905e-17, + -1.38402968846763982e-17, + -2.17861234102119021e-19, + 2.02538992748750352e-20, + 6.55270101673156509e-22, + 1.02006890792905952e-01, + -1.03384520710525832e-03, + 1.62583496064618180e-05, + -2.78973023996201243e-07, + 4.12387622141922040e-09, + -5.69092210341580259e-11, + 1.56904154143205416e-12, + -2.36242920576230942e-14, + -9.34714721209966389e-16, + -7.66624907482108146e-19, + 2.02618796233196124e-18, + 1.89110892301873629e-20, + -3.09861749263251821e-21, + -6.99037465350043530e-23, + 3.52118050998131774e-02, + -4.19389981308094617e-04, + 1.04883427445706911e-05, + -2.68421260698866115e-07, + 3.73716390486454077e-09, + -4.97559196438870510e-11, + 3.96145328577201498e-12, + -5.98650783001011959e-14, + -4.07393929911930486e-15, + -1.71058095697696544e-17, + 7.80766121047019055e-18, + 1.18178952463614660e-19, + -1.11926850711188925e-20, + -3.63157458059672973e-22, + 6.86273958014046049e-03, + -1.02104584632192033e-04, + 3.68587356982062065e-06, + -1.15785985210002589e-07, + 1.96720230659639015e-09, + -3.75725577811927716e-11, + 2.30879331966966449e-12, + -3.91400329349051463e-14, + -1.59273694993672377e-15, + -1.73876542141076592e-17, + 3.70257332913406499e-18, + 5.93279547586227678e-20, + -4.92604286945629050e-21, + -1.83260820994131083e-22, + 7.14304921496715329e-04, + -1.39590149862587275e-05, + 6.66123202584872604e-07, + -2.44222671132748751e-08, + 5.44422990512171778e-10, + -1.41421902736771937e-11, + 6.56913359310613093e-13, + -1.35035663149780382e-14, + -1.19838451628906137e-16, + -8.35137415041027424e-18, + 7.71367964286618818e-19, + 1.06104557384431998e-20, + -8.02136193651033843e-22, + -3.85924206372100500e-23, + 3.62346106139352681e-05, + -9.76228450783521718e-07, + 5.82807264844061083e-08, + -2.49536932295576501e-09, + 7.42751443545256709e-11, + -2.45603586399069391e-12, + 1.00081269761230888e-13, + -2.61361124181658224e-15, + 3.94720587337747977e-17, + -2.15434547173230836e-18, + 9.63041278168073984e-20, + 9.00206690578894451e-23, + -3.07633515697518874e-23, + -4.05178251402605634e-24, + 7.67601802089401088e-07, + -3.03227306044129389e-08, + 2.21817610139664099e-09, + -1.14294233998546904e-10, + 4.58305305640907302e-12, + -1.88900676723992999e-13, + 7.87649224113884921e-15, + -2.64671686003022256e-16, + 7.95417211270842962e-18, + -2.96923423229432898e-19, + 9.97212564549673383e-21, + -2.02656419515604251e-22, + 5.76925627912553802e-24, + -3.16260383010608705e-25, + 5.10593751487060253e-09, + -3.28998020893389308e-10, + 3.02179115192457848e-11, + -2.00295486721394201e-12, + 1.11202143706499732e-13, + -5.86669079895597546e-15, + 2.87466825081913191e-16, + -1.25892323278423421e-17, + 5.18545199419637690e-19, + -2.08837061127794315e-20, + 7.78720507086199620e-22, + -2.65848251820165608e-23, + 9.14186032773295530e-25, + -3.10059782004163259e-26, + 5.74336422235364353e-12, + -7.87652707024373156e-13, + 1.04322031950719106e-13, + -1.04243943483596353e-14, + 8.82479950571517699e-16, + -6.61255701045194582e-17, + 4.42596420786505194e-18, + -2.67859733154327328e-19, + 1.48787270015655749e-20, + -7.64220080090491288e-22, + 3.64133561035810647e-23, + -1.62009738447084433e-24, + 6.77655154180984535e-26, + -2.66435447337786527e-27, +# root=9 base[13]=32.5 */ + 1.66174219256657901e-01, + -1.47529153887018599e-03, + 1.54695749914566665e-05, + -6.70384913853412170e-08, + 9.63421551623560996e-10, + -1.41013640343716338e-10, + 5.09784903207334539e-13, + 2.21946672352363438e-13, + -3.87455594207620473e-16, + -3.97026684380612469e-16, + 5.13843273019233432e-19, + 6.96470433938207885e-19, + -3.97854553279108230e-22, + -1.21806078579246370e-21, + 9.81119262383637197e-02, + -9.16121978000696154e-04, + 1.32748824350034445e-05, + -2.20331024151377596e-07, + 3.29312044727961642e-09, + -3.00480337628777995e-11, + 5.91727022989758496e-13, + -3.95229123210631742e-14, + 2.72754742576023786e-16, + 5.14995778834281980e-17, + -3.01859562344067523e-19, + -9.21724487950180540e-20, + 6.83814374396303618e-22, + 1.57150263469083337e-22, + 3.36830315963660976e-02, + -3.47396882955941955e-04, + 7.60778261066024741e-06, + -2.12242255187346351e-07, + 3.48654953756989322e-09, + 1.21098114708871135e-11, + 8.02345798606038007e-13, + -1.40658293269352910e-13, + 5.02301595307120517e-16, + 2.15438672934774918e-16, + -2.23102526707842819e-19, + -3.86820604267819899e-19, + 2.54167261045352321e-22, + 6.74405269263883488e-22, + 6.50519748411322683e-03, + -7.76800589650328228e-05, + 2.46898499196209673e-06, + -8.77848895228208918e-08, + 1.65273858596830075e-09, + -5.92920980355538183e-13, + 6.14142277441935666e-13, + -7.14565829554728368e-14, + 3.05242546264054633e-16, + 9.80729624441848548e-17, + 1.27002641717563364e-19, + -1.83266888952250427e-19, + -2.88345494452154995e-22, + 3.19613138995932851e-22, + 6.67457645908812861e-04, + -9.67082150132042894e-06, + 4.18388149120979054e-07, + -1.72553754545301665e-08, + 3.85996855399419473e-10, + -3.40481368372780076e-12, + 2.23427741954640804e-13, + -1.61591175455525823e-14, + 1.11324601846899184e-16, + 1.66674597303921081e-17, + 1.09620135928259001e-19, + -3.54154815944852518e-20, + -1.52297792272302518e-22, + 6.05692973652872637e-23, + 3.30970671716190277e-05, + -6.12558311375614472e-07, + 3.42051816352309053e-08, + -1.59240108555535932e-09, + 4.37748390335558897e-11, + -8.35264847481127083e-13, + 3.80360207260831382e-14, + -1.88988705884926076e-15, + 2.42426862872334156e-17, + 8.49094977611681760e-19, + 2.71379487744346050e-20, + -3.15970372496955151e-21, + -1.94824914880752099e-23, + 4.78499332806141678e-24, + 6.74567549525583720e-07, + -1.70480268211770315e-08, + 1.18934806704584140e-09, + -6.30232224752635272e-11, + 2.21067066909204776e-12, + -6.75286785744947591e-14, + 2.88524053384951838e-15, + -1.18740806342557726e-16, + 2.69112602383990762e-18, + -3.95438523899537540e-20, + 3.10958523728952811e-21, + -1.54346677255757767e-22, + 1.82390748193919577e-25, + 1.11503710262500168e-25, + 4.15462775373805924e-09, + -1.60115023163851750e-10, + 1.39379746877269610e-11, + -8.80806413448691454e-13, + 4.16848316966710415e-14, + -1.84737115434937481e-15, + 8.68347922707171074e-17, + -3.71618854668053336e-18, + 1.30309578999970399e-19, + -4.47305640756247691e-21, + 1.80930579854543053e-22, + -6.43107251346530387e-24, + 1.51604805341686665e-25, + -3.98176926082403236e-27, + 3.71144131594408415e-12, + -2.86045659599928651e-13, + 3.38094210594809075e-14, + -2.94401125060215534e-15, + 2.12801315340048217e-16, + -1.41002236548240399e-17, + 8.66091547682708170e-19, + -4.82879874367875800e-20, + 2.46447066569709010e-21, + -1.18434377713509898e-22, + 5.38872597589535239e-24, + -2.28042776819528934e-25, + 8.99241010652986965e-27, + -3.40661113460855719e-28, +# root=9 base[14]=35.0 */ + 1.60515576200911003e-01, + -1.35469092277622672e-03, + 1.46720531351589784e-05, + -7.15901856409091642e-08, + -1.28946647541355102e-09, + -6.73167006567982098e-11, + 4.73954770758489263e-12, + 3.61668792920973325e-14, + -8.41694464730845373e-15, + 4.48497833153613192e-17, + 1.39561407888580284e-17, + -2.57537034637917476e-19, + -2.06322214191915796e-20, + 7.05016003604984165e-22, + 9.46442998341677638e-02, + -8.19645464943552548e-04, + 1.09287756674781774e-05, + -1.72015960702711593e-07, + 2.75603875054724898e-09, + -2.66809152263570506e-11, + -1.69344529848237241e-13, + -9.82567241359854416e-15, + 1.19062521071447986e-15, + -1.03674992991833332e-17, + -1.73449214717048497e-18, + 4.05975424279970274e-20, + 2.34742287619834288e-21, + -1.01566413167917563e-22, + 3.24004022434768862e-02, + -2.95754919775406677e-04, + 5.40357319055375432e-06, + -1.54694957432892042e-07, + 3.63941033633018572e-09, + -7.72567756477880268e-12, + -1.92907910012563975e-12, + -3.07166968405493333e-14, + 4.82552386765462784e-15, + -2.74121514063886137e-17, + -7.69118094451947684e-18, + 1.42342848927811291e-19, + 1.14242041197063600e-20, + -3.90900893861257975e-22, + 6.22794551350812093e-03, + -6.16911656618020281e-05, + 1.57470739743804222e-06, + -6.12563157900230843e-08, + 1.64470461880267676e-09, + -5.82367671629753268e-12, + -7.94970367489381800e-13, + -1.80150810273567218e-14, + 2.33506026836653853e-15, + -1.18454696412580075e-17, + -3.66146692911559610e-18, + 6.19405947757048526e-20, + 5.64539138882563611e-21, + -1.78387898506710356e-22, + 6.34300077526931240e-04, + -7.05097597191428069e-06, + 2.46688025811018618e-07, + -1.14726177406694003e-08, + 3.39185034206939144e-10, + -2.55616662258622242e-12, + -9.93066864556413119e-14, + -4.89205125594891689e-15, + 4.71515617181066611e-16, + -2.29448361661272772e-18, + -6.93208148192716475e-19, + 1.01191568483883829e-20, + 1.14093381538285194e-21, + -3.21886070711069690e-23, + 3.10885362096944214e-05, + -4.04474296603776243e-07, + 1.88636178151481321e-08, + -9.92078710382815665e-10, + 3.24909596351332886e-11, + -4.40510061511065939e-13, + 5.70099661105266700e-16, + -6.67729879447513305e-16, + 4.47427479617008119e-17, + -2.77177005908898156e-19, + -5.38012311643842979e-20, + 5.56090711191644421e-22, + 1.02988654482723218e-22, + -2.44018339796579924e-24, + 6.21353564415661408e-07, + -1.00401951550463421e-08, + 6.10220355872004204e-10, + -3.56609909457368998e-11, + 1.33007306440730619e-12, + -2.92176157338206861e-14, + 6.51324022471020274e-16, + -4.35373209452231481e-17, + 2.07050450468452761e-18, + -2.46099815346107354e-20, + -1.21593525926491385e-21, + -6.50116996256296609e-24, + 4.06790327618321811e-24, + -7.53571530284844727e-26, + 3.68328601904159924e-09, + -8.17705937052700155e-11, + 6.43795911474031535e-12, + -4.24606557985593629e-13, + 1.90970465318082416e-14, + -6.51272639355377626e-16, + 2.42471042413385823e-17, + -1.17081403440402893e-18, + 4.75350914691596216e-20, + -1.17067545748440620e-21, + 2.10543626299995564e-23, + -1.29843332423696012e-24, + 7.92102576807116329e-26, + -1.50518324135220044e-27, + 2.94499526255123245e-12, + -1.14866059453074906e-13, + 1.23057651510344985e-14, + -1.00416040206078143e-15, + 6.26588827666671893e-17, + -3.45497151744257026e-18, + 1.88762585824524385e-19, + -1.00285886679890455e-20, + 4.78931810617452572e-22, + -2.03914307095287569e-23, + 8.38483058808194715e-25, + -3.52645119981923744e-26, + 1.40619657519310631e-27, + -4.78126337957542738e-29, +# root=9 base[15]=37.5 */ + 1.55325544659183939e-01, + -1.24116407783215620e-03, + 1.36645023785060812e-05, + -9.69642723667278392e-08, + -1.55568750529347084e-09, + 3.27110092378320265e-11, + 2.80474524546081188e-12, + -1.33000002397223551e-13, + -1.01715059969367472e-15, + 2.37427421012093174e-16, + -4.23009547095905819e-18, + -2.76442344560822922e-19, + 1.35297065289764760e-20, + 1.09616489673166568e-22, + 9.15285079913748245e-02, + -7.39764550080862222e-04, + 9.11075251272671507e-06, + -1.32433451829273658e-07, + 2.17888995058986507e-09, + -3.04537486513877178e-11, + -3.62032063689458372e-14, + 1.35648783920768672e-14, + 1.53027195456696877e-16, + -3.07438929457738313e-17, + 6.13412091269253902e-19, + 3.15347385267043365e-20, + -1.73790390600144119e-21, + -5.04673537197752125e-24, + 3.12934440189987159e-02, + -2.58990131089886083e-04, + 3.88326507919926091e-06, + -1.00223724979333845e-07, + 3.03219617873842577e-09, + -4.94976961131634824e-11, + -1.09527619981189838e-12, + 6.70039044400591606e-14, + 6.58516664432757840e-16, + -1.32854967264435728e-16, + 2.36423795675386598e-18, + 1.52705325141535195e-19, + -7.48919063854067819e-21, + -6.04758488744301744e-23, + 6.00233174626302237e-03, + -5.16023153541527422e-05, + 9.90190520951609946e-07, + -3.69425332156617108e-08, + 1.33548543581435263e-09, + -2.37200758381855991e-11, + -4.71483126242436299e-13, + 3.01048736771527538e-14, + 3.62535199812960435e-16, + -6.39904073638715058e-17, + 1.09176334043650645e-18, + 7.50275158562230672e-20, + -3.55490284429875954e-21, + -3.49775668286869245e-23, + 6.09295184328010253e-04, + -5.54074086409532356e-06, + 1.39412995726637842e-07, + -6.60262838282969285e-09, + 2.61033762749439506e-10, + -5.11086627451102951e-12, + -6.71267779258870983e-14, + 5.05435700849440147e-15, + 8.84854092425841355e-17, + -1.25965442765428271e-17, + 2.03193044364922460e-19, + 1.49291706526773242e-20, + -6.76894029420422722e-22, + -8.38376431542478453e-24, + 2.97086334041307955e-05, + -2.93032883229219080e-07, + 9.77859664688479882e-09, + -5.45653316594699226e-10, + 2.30536962089274906e-11, + -5.11019943672348769e-13, + -1.94217444780368833e-15, + 2.99299845120987331e-16, + 1.06552746737072237e-17, + -1.10950009112613505e-18, + 1.67787160564075567e-20, + 1.28111034540000973e-21, + -5.48792259369484635e-23, + -9.10737033732505913e-25, + 5.88703309530288269e-07, + -6.54882936004351927e-09, + 2.92605720033146778e-10, + -1.84986215006398079e-11, + 8.37403371777891171e-13, + -2.18435042071801126e-14, + 1.69952199595114926e-16, + 1.21393397202941446e-18, + 6.11755980713360534e-19, + -4.26700733901218550e-20, + 6.42670454024732706e-22, + 4.11083421633893439e-23, + -1.65411518635234139e-24, + -4.23979911803965512e-26, + 3.43317337372933755e-09, + -4.62825299586232051e-11, + 2.82456400317515673e-12, + -2.00149378370853391e-13, + 9.97391944825648987e-15, + -3.25702085563402305e-16, + 7.20749506462827602e-18, + -2.19774510371471093e-19, + 1.45051961965675040e-20, + -6.91231922351884104e-22, + 1.36719527405074345e-23, + 2.14906758366551972e-25, + -8.87168187194321399e-27, + -7.91292855661746021e-28, + 2.62480268078931333e-12, + -5.16007868018616418e-14, + 4.58700369308605612e-15, + -3.79471980917186802e-16, + 2.28423824962164301e-17, + -1.06689567757425951e-18, + 4.53067441657554868e-20, + -2.11099557318307351e-21, + 1.04903216364051580e-22, + -4.60170739204987973e-24, + 1.61239406960590971e-25, + -4.91221705970063503e-27, + 1.80646131674476611e-28, + -8.48993896962109902e-30, +# root=9 base[16]=40.0 */ + 1.49261961322027931e-01, + -1.77308932898947590e-03, + 3.06330780923247850e-05, + -4.73041004921725102e-07, + -1.27388466863190579e-09, + 5.52451147415632627e-10, + -1.45426244559839492e-11, + -1.21175993116229850e-12, + 1.23854940591664073e-13, + -2.85739847901244882e-15, + -2.76124876918646045e-16, + 2.55964131794794101e-17, + -4.58613754626021557e-19, + -6.39371262685705312e-20, + 8.79322645089160720e-02, + -1.04808469733188615e-03, + 1.88529399437816336e-05, + -3.90327751460571594e-07, + 9.42877040624067491e-09, + -2.59452828915358399e-10, + 5.47848964543711646e-12, + 9.07601696487561642e-14, + -1.46764616246158176e-14, + 3.54569875759346398e-16, + 3.37131774178428897e-17, + -3.18127354003120309e-18, + 6.41851787815486706e-20, + 7.18717736722581923e-21, + 3.00471608420120988e-02, + -3.60687063965429414e-04, + 7.02497789186095227e-06, + -2.14277400345462495e-07, + 1.06306742488854558e-08, + -5.18465105561728614e-10, + 1.26697355092433418e-11, + 5.70553585722519502e-13, + -6.64236775613027532e-14, + 1.53674616759407903e-15, + 1.53844689226830421e-16, + -1.41940426656052850e-17, + 2.54564530336685221e-19, + 3.53729214492134560e-20, + 5.75798442769523758e-03, + -6.99235635129173195e-05, + 1.53085536644893330e-06, + -6.68233499201921070e-08, + 4.41540848800314862e-09, + -2.39666530896571409e-10, + 6.22488276562122994e-12, + 2.55770272912902637e-13, + -3.10359897282016627e-14, + 7.06558847793474595e-16, + 7.50585623085540028e-17, + -6.83497837569632979e-18, + 1.17780809262641705e-19, + 1.74987455087812448e-20, + 5.83661916498179833e-04, + -7.21315161322315883e-06, + 1.84091858879718697e-07, + -1.08395628494121743e-08, + 8.27667709856357017e-10, + -4.73036094454608935e-11, + 1.32110638611393847e-12, + 4.25017052263377852e-14, + -5.70335556530965833e-15, + 1.25386155151633122e-16, + 1.49688115701023645e-17, + -1.33307742297141447e-18, + 2.17696006462993573e-20, + 3.52321857141907760e-21, + 2.83964365072076790e-05, + -3.60279574228347520e-07, + 1.11306939146807607e-08, + -8.36761748867826370e-10, + 6.97410040657042171e-11, + -4.15400714541626220e-12, + 1.27664654649483967e-13, + 2.52578340323079322e-15, + -4.29275707041661736e-16, + 8.56160488946371432e-18, + 1.32810526087158066e-18, + -1.13602370004873538e-19, + 1.72958944395257737e-21, + 3.10373411268819083e-22, + 5.60696517572306337e-07, + -7.41057871359843306e-09, + 2.89724976727857404e-10, + -2.66612939190235115e-11, + 2.37124537449910152e-12, + -1.48066917906165443e-13, + 5.18345282639288986e-15, + 1.99351301335415005e-17, + -1.08882614939499349e-17, + 1.37559143480118639e-19, + 4.98007204954171794e-20, + -3.94896473779270417e-21, + 5.70963689898896426e-23, + 1.08376315355407052e-23, + 3.24833455310937967e-09, + -4.60481193229341078e-11, + 2.42907408229080566e-12, + -2.66707271859073463e-13, + 2.52830737969965251e-14, + -1.69376547958056851e-15, + 7.15070064735962994e-17, + -1.19629111526344214e-18, + -2.80838805474473297e-20, + -2.74918831026683497e-21, + 6.98505208875482023e-22, + -4.84096408363028772e-23, + 8.46273982620735080e-25, + 1.07891927092649164e-25, + 2.44187035599717634e-12, + -4.03440987616645868e-14, + 3.27064673166401117e-15, + -4.31126187262758428e-16, + 4.51505104031053449e-17, + -3.49256374300252623e-18, + 2.01482811042610398e-19, + -9.33435306796097543e-21, + 4.77142965240160540e-22, + -3.70895523415914202e-23, + 3.06909637916136123e-24, + -1.90328930155613564e-25, + 7.36416738959272164e-27, + -1.05614586516734859e-28, +# root=9 base[17]=44.0 */ + 1.42624207567129985e-01, + -1.55039070305578721e-03, + 2.51218844733476934e-05, + -4.29077221813604374e-07, + 5.31462558594997719e-09, + 1.16492370732831269e-10, + -1.38378906758419088e-11, + 5.68315355027088681e-13, + 3.49322855259552867e-17, + -1.63887448445946967e-15, + 1.11348681909599775e-16, + -2.79074529534756279e-18, + -1.28429031010161352e-19, + 1.61288369805919141e-20, + 8.40150684289875660e-02, + -9.13779147385719278e-04, + 1.49265622861282968e-05, + -2.73728802479201265e-07, + 5.55228544078207034e-09, + -1.34814416805381367e-10, + 4.01236648469505860e-12, + -1.10360484578199599e-13, + 5.23795226774507624e-16, + 1.99494392887684101e-16, + -1.37155457673389804e-17, + 3.39431858254325703e-19, + 1.56525540110134243e-20, + -1.94100592361463892e-21, + 2.87037210181144073e-02, + -3.12549336394710772e-04, + 5.19184894741682046e-06, + -1.08638089447264195e-07, + 3.64634811292640700e-09, + -1.93481616685954428e-10, + 1.02318907534751707e-11, + -3.66355861965749418e-13, + 1.01716211117909438e-15, + 8.87062591758333081e-16, + -6.12640347652780706e-17, + 1.53770916655467596e-18, + 7.12666574577835892e-20, + -8.93326244781237436e-21, + 5.49899355295452655e-03, + -5.99895205654460124e-05, + 1.02364310233064048e-06, + -2.55827136465781759e-08, + 1.25267594430259978e-09, + -8.40214023118501470e-11, + 4.80891984648678540e-12, + -1.78338082786354503e-13, + 7.34273294428106408e-16, + 4.16096762113196440e-16, + -2.92278647913858862e-17, + 7.37410819833030976e-19, + 3.45653598810423884e-20, + -4.33618798895180749e-21, + 5.57169055189303260e-04, + -6.09554067491822043e-06, + 1.08207711702835894e-07, + -3.33411743950025535e-09, + 2.13649722486979025e-10, + -1.59259456484849774e-11, + 9.43507012836565147e-13, + -3.60088143937004359e-14, + 2.28064215349427498e-16, + 7.72721723026497549e-17, + -5.58301015896733382e-18, + 1.41648207909572565e-19, + 6.80781344941333948e-21, + -8.52683154740748939e-22, + 2.70896666686612691e-05, + -2.97636448605492969e-07, + 5.59289117168865008e-09, + -2.17329265286782171e-10, + 1.69019472769725753e-11, + -1.33840212566961951e-12, + 8.13454806053822036e-14, + -3.21672301877664297e-15, + 3.08944940860952791e-17, + 5.97415125931338166e-18, + -4.53156429004981002e-19, + 1.15409998150711369e-20, + 5.87835279739475212e-22, + -7.30359806180184260e-23, + 5.34330952057908420e-07, + -5.91016634024246474e-09, + 1.20704956600317488e-10, + -6.03450423032657281e-12, + 5.42502209946198529e-13, + -4.48718278384400698e-14, + 2.80427217970831603e-15, + -1.16658988211212529e-16, + 1.68677034062368119e-18, + 1.65502083256349355e-19, + -1.38440494833639265e-20, + 3.49299054505553760e-22, + 2.07098760251325060e-23, + -2.50347754877394046e-24, + 3.08973697126027591e-09, + -3.45733640709946113e-11, + 8.04350061810168564e-13, + -5.31193692213222651e-14, + 5.36965884435622401e-15, + -4.63290148873657648e-16, + 3.01598380220406214e-17, + -1.36095587399066797e-18, + 3.01561827208952438e-20, + 9.57170414855449421e-22, + -1.09783520748586346e-22, + 2.47900868990917692e-24, + 2.50212005079057132e-25, + -2.76200433983798273e-26, + 2.31211682821088152e-12, + -2.65454209037574222e-14, + 7.86929063622506885e-16, + -7.26272513707869041e-17, + 8.24348735214734889e-18, + -7.58813570608574310e-19, + 5.37375921163995820e-20, + -2.84955572853232299e-21, + 1.04971175609515019e-22, + -2.12875113661935489e-24, + 1.47835334377416599e-26, + -4.65767423085463201e-27, + 7.97156919108079309e-28, + -6.55149723890859456e-29, +# root=9 base[18]=48.0 */ + 1.36794142454821188e-01, + -1.36848069837508220e-03, + 2.05153696006494794e-05, + -3.38485569766052762e-07, + 5.47210921780322075e-09, + -5.49757563043969851e-11, + -2.20305786495303166e-12, + 2.19234786526483648e-13, + -1.08541305941333063e-14, + 2.93823857426121949e-16, + 3.81684722372821324e-18, + -9.39668931605370105e-19, + 5.62287672615446021e-20, + -1.74184650786943103e-21, + 8.05798722151834512e-02, + -8.06171213705294187e-04, + 1.21001407287105716e-05, + -2.02192728332801001e-07, + 3.59544356201049668e-09, + -7.00428586936545008e-11, + 1.67104667753942684e-12, + -5.21374208822021933e-14, + 1.74644750257420584e-15, + -4.06376569271911322e-17, + -5.07133859820807226e-19, + 1.18533634483660803e-19, + -6.90146106799107828e-21, + 2.07129913128698112e-22, + 2.75294386623477667e-02, + -2.75460936171664165e-04, + 4.14493725964305520e-06, + -7.10917665245169706e-08, + 1.49594780205940191e-09, + -5.10639946892181255e-11, + 2.71495668523774431e-12, + -1.49169753321929665e-13, + 6.52987129642177457e-15, + -1.72391429290262401e-16, + -1.93693474110967747e-18, + 5.17267174896130664e-19, + -3.10844608501792751e-20, + 9.63490520241506610e-22, + 5.27382388070916485e-03, + -5.27824128029929981e-05, + 7.97495662952142140e-07, + -1.42504808400429809e-08, + 3.70675934959179973e-10, + -1.83369442087370516e-11, + 1.19884802712466183e-12, + -7.04072533609571996e-14, + 3.16006512495525717e-15, + -8.55785676578493181e-17, + -7.99206351383423995e-19, + 2.45016183347549093e-19, + -1.49402703995724199e-20, + 4.68110711907770173e-22, + 5.34323103163816425e-04, + -5.34958417324149213e-06, + 8.13283776822161016e-08, + -1.54102717176573676e-09, + 5.05566947480233399e-11, + -3.18690195092197438e-12, + 2.27593148469085276e-13, + -1.37345729091289703e-14, + 6.26279456118543619e-16, + -1.74774424493839086e-17, + -1.15193168572572230e-19, + 4.63537740470258475e-20, + -2.88890984662854983e-21, + 9.18686714837844252e-23, + 2.59765974434809891e-05, + -2.60211190445384536e-07, + 3.99244365465511714e-09, + -8.20432443943758639e-11, + 3.41636122405945414e-12, + -2.53646918987575696e-13, + 1.90233795009174653e-14, + -1.16958573391058577e-15, + 5.42722727400674719e-17, + -1.57851881461260040e-18, + -4.29568234957366869e-21, + 3.71063206372771738e-21, + -2.39596424484795656e-22, + 7.78786554883464801e-24, + 5.12305251206937075e-07, + -5.13598890013254600e-09, + 7.99216960902034936e-11, + -1.83820642909749294e-12, + 9.72677807063172712e-14, + -8.11571510364173156e-15, + 6.29898612619119765e-16, + -3.94665255012101536e-17, + 1.87646276549132774e-18, + -5.79562464409420494e-20, + 1.60810586230836005e-22, + 1.11113726737921762e-22, + -7.65127017798076847e-24, + 2.57268027213223204e-25, + 2.96166325162475859e-09, + -2.97321344981973325e-11, + 4.73742625596879232e-13, + -1.28323260038023631e-14, + 8.66249808682799661e-16, + -7.91653495743963397e-17, + 6.34397559177145156e-18, + -4.08123040085979233e-19, + 2.01900776384981205e-20, + -6.85139640519942007e-22, + 7.52959920502887880e-24, + 8.61003847575106940e-25, + -6.91677740922663405e-26, + 2.46319702889231185e-27, + 2.21508981624499065e-12, + -2.23020561161651855e-14, + 3.73311737189712783e-16, + -1.32602685234473198e-17, + 1.16757526243039136e-18, + -1.16391098529186975e-19, + 9.76842717128998209e-21, + -6.62366559180618389e-22, + 3.56020417533596213e-23, + -1.43985311308980216e-24, + 3.62813037493177968e-26, + 8.74842935436774170e-29, + -5.78938855960733629e-29, + 2.30884503840859918e-30, +# root=9 base[19]=52.0 */ + 1.31624718009246855e-01, + -1.21921093354043341e-03, + 1.69375510797639250e-05, + -2.61095319722273665e-07, + 4.17917089317638491e-09, + -6.39137564358034134e-11, + 5.85076263756821707e-13, + 2.50449127315640402e-14, + -2.41835113265728638e-15, + 1.29486837763248467e-16, + -4.91396424895949895e-18, + 1.07962147821348861e-19, + 1.57361683852534430e-21, + -3.00415698511083317e-22, + 7.75346785564733632e-02, + -7.18191749353859748e-04, + 9.97870026171831343e-06, + -1.54093449043427290e-07, + 2.50434007405861768e-09, + -4.24658827775115614e-11, + 7.82563708093635203e-13, + -1.77383620025451148e-14, + 5.46937932390022876e-16, + -1.98764178038881903e-17, + 6.48435588060941860e-19, + -1.28665130560768920e-20, + -2.40432087188825656e-22, + 3.84050820079322029e-23, + 2.64890051850672249e-02, + -2.45367140215646681e-04, + 3.41019610539074872e-06, + -5.28544196865139925e-08, + 8.86098027587883517e-10, + -1.79656199097367707e-11, + 5.82154744280114741e-13, + -2.94590418145988970e-14, + 1.61001558460105735e-15, + -7.64392669400219089e-17, + 2.80385975918160809e-18, + -6.12015299510733730e-20, + -8.48603431524646151e-22, + 1.66035865948575992e-22, + 5.07448629977569864e-03, + -4.70059801619044141e-05, + 6.53621396491229433e-07, + -1.01907265849077264e-08, + 1.79282888234132115e-10, + -4.52432389690043558e-12, + 2.10355229790109293e-13, + -1.30133778821704061e-14, + 7.58575193488309072e-16, + -3.68082901001480739e-17, + 1.36789901490672489e-18, + -3.06072154176612138e-20, + -3.61331873607212557e-22, + 7.86926990397906034e-23, + 5.14123734373813290e-04, + -4.76259992632064505e-06, + 6.62724696982177487e-08, + -1.04247189703692180e-09, + 1.96246183292221676e-11, + -6.24813051995327239e-13, + 3.65669828139345174e-14, + -2.46171957962379280e-15, + 1.47142409726483875e-16, + -7.22294314029115060e-18, + 2.71725731782258119e-19, + -6.27514331669696018e-21, + -5.67428850538898234e-23, + 1.49155466319443083e-23, + 2.49943501152542034e-05, + -2.31548034544640379e-07, + 3.22551041870313235e-09, + -5.14038120678818483e-11, + 1.06026638709150346e-12, + -4.25403004994251418e-14, + 2.89952676882404287e-15, + -2.04382637291807600e-16, + 1.24120324585773116e-17, + -6.16218157858638464e-19, + 2.35585796201853249e-20, + -5.68476422835968093e-22, + -2.98972382624138671e-24, + 1.19888967659966531e-24, + 4.92926369205058965e-07, + -4.56684225573407951e-09, + 6.37219012533846983e-11, + -1.03571196689701320e-12, + 2.41533627238506577e-14, + -1.21331723130372189e-15, + 9.20242623664654210e-17, + -6.69147732615751937e-18, + 4.12419528004399039e-19, + -2.07819683209694114e-20, + 8.13637384102226366e-22, + -2.09126017420023484e-23, + -3.87220488411624013e-28, + 3.62716806212630391e-26, + 2.84956277911975597e-09, + -2.64039914688516910e-11, + 3.69429722384481626e-13, + -6.20072249562624418e-15, + 1.71488497142764907e-16, + -1.07373988989266804e-17, + 8.83684745451686765e-19, + -6.60373496157671612e-20, + 4.14900229743074681e-21, + -2.14075363724332737e-22, + 8.71573254268124392e-24, + -2.46758048469396479e-25, + 1.86670566483914547e-27, + 2.92197037316177155e-28, + 2.13113701990015248e-12, + -1.97523680709401951e-14, + 2.77919819585684159e-16, + -4.97136216327637447e-18, + 1.79123591355365477e-19, + -1.41169876631204328e-20, + 1.25236232712013651e-21, + -9.70348694362122557e-23, + 6.31977197408565291e-24, + -3.42413581371730852e-25, + 1.50971581900652894e-26, + -5.08035125713645886e-28, + 1.01670913976572017e-29, + 1.25584379939389335e-31, +# root=9 base[20]=56.0 */ + 1.27000515676136766e-01, + -1.09519785718027924e-03, + 1.41662656845023895e-05, + -2.03567052495927536e-07, + 3.06701010945708250e-09, + -4.70188708196746238e-11, + 6.87037100980821142e-13, + -6.52591235987590423e-15, + -1.92826693702206096e-16, + 1.98297969100875343e-17, + -1.09954847683803292e-18, + 4.68215093380564966e-20, + -1.52522309016609821e-21, + 3.09264615657358336e-23, + 7.48107436984501578e-02, + -6.45136089107734793e-04, + 8.34488247300669048e-06, + -1.19938308388622452e-07, + 1.81058326998543237e-09, + -2.81771201699827739e-11, + 4.52473533296733176e-13, + -7.80082144050055212e-15, + 1.62850960010791394e-16, + -4.68979223271403284e-18, + 1.70310369532552218e-19, + -6.20440420579772446e-21, + 1.87719550524715223e-22, + -3.49692266342304281e-24, + 2.55583919971570546e-02, + -2.20405000294472144e-04, + 2.85103832966893105e-06, + -4.09939407925634385e-08, + 6.21382116564133078e-10, + -9.97015341669157118e-12, + 1.88806934013840926e-13, + -5.50336084641839892e-15, + 2.54228388082678979e-16, + -1.33842280254626692e-17, + 6.48300898925494808e-19, + -2.65759868473509167e-20, + 8.55159257631051793e-22, + -1.72896169011562556e-23, + 4.89620728540723655e-03, + -4.22229529588923563e-05, + 5.46198892564160853e-07, + -7.85881879581029007e-09, + 1.19912662212243018e-10, + -2.01703733709878482e-12, + 4.68503759979551832e-14, + -1.94202504475133470e-15, + 1.10979916787182361e-16, + -6.27068851629100258e-18, + 3.10628641532938325e-19, + -1.28645188941552355e-20, + 4.17933749017588291e-22, + -8.64043904260001191e-24, + 4.96061034465446237e-04, + -4.27784704329147210e-06, + 5.53424333416361239e-08, + -7.97073625593184076e-10, + 1.22820399058050372e-11, + -2.20681052773056992e-13, + 6.38003501546918325e-15, + -3.32981662714517890e-16, + 2.08391304094410916e-17, + -1.20925471358393799e-18, + 6.05263375927820155e-20, + -2.52616080518072769e-21, + 8.29670675350022584e-23, + -1.76542286010521093e-24, + 2.41162035436752287e-05, + -2.07970161141125248e-07, + 2.69078680469800598e-09, + -3.88113085092313701e-11, + 6.06666386645203968e-13, + -1.19072439825961419e-14, + 4.28628619360178662e-16, + -2.61179154367011042e-17, + 1.71673973041142328e-18, + -1.01188786733490165e-19, + 5.10971823503338722e-21, + -2.15280597231528200e-22, + 7.17838387089658560e-24, + -1.58987277502157188e-25, + 4.75607376806344839e-07, + -4.10150835749985525e-09, + 5.30750183832231673e-11, + -7.67247576984215449e-13, + 1.22518450451108979e-14, + -2.70440976537010114e-16, + 1.20556390833571849e-17, + -8.19357986135231333e-19, + 5.56130592289434854e-20, + -3.32124286137093228e-21, + 1.69512558951693114e-22, + -7.23923470511950159e-24, + 2.46898734139985360e-25, + -5.79104282818458893e-27, + 2.74943739822692716e-09, + -2.37106579392359648e-11, + 3.06903257613072023e-13, + -4.45275604854052225e-15, + 7.35769116817998103e-17, + -1.90718423286964483e-18, + 1.04832432003387952e-19, + -7.74075636124104012e-21, + 5.39411783954855223e-22, + -3.27152934168732739e-23, + 1.69703463907807421e-24, + -7.40962876810580817e-26, + 2.62195744400388071e-27, + -6.70978823772523340e-29, + 2.05624622284600602e-12, + -1.77330799926025182e-14, + 2.29647662048270558e-16, + -3.35612250987493076e-18, + 5.92021039819164032e-20, + -1.95707147477014170e-21, + 1.33703631033744885e-22, + -1.06247249412863320e-23, + 7.63777027346668827e-25, + -4.75727573527284283e-26, + 2.54867411453817403e-27, + -1.16429301637953517e-28, + 4.43275589775195459e-30, + -1.32231244358987539e-31, +# root=9 base[21]=60.0 */ + 1.22832003829656172e-01, + -9.90870708918508130e-04, + 1.19895773337559720e-05, + -1.61190565031141683e-07, + 2.27507225270176831e-09, + -3.29844784800997300e-11, + 4.82719807989091981e-13, + -6.79329765495340573e-15, + 7.05415407543452723e-17, + 9.60900683315317247e-19, + -1.25829909785397436e-19, + 7.15773706132965441e-21, + -3.18931310827884207e-22, + 1.17425991248622381e-23, + 7.23552453708664611e-02, + -5.83680916786278128e-04, + 7.06257210797156932e-06, + -9.49525830934767555e-08, + 1.34045970848118275e-09, + -1.94696374996556368e-11, + 2.88572662377898492e-13, + -4.37803214756970599e-15, + 7.02382583076365113e-17, + -1.32303907028227413e-18, + 3.39876421349023846e-20, + -1.16228847781244393e-21, + 4.31714301965976968e-23, + -1.47704834558598514e-24, + 2.47194934598987080e-02, + -1.99409150347338042e-04, + 2.41286799633946938e-06, + -3.24410160289996198e-08, + 4.58175894486034509e-10, + -6.68006885170973868e-12, + 1.01605282422913884e-13, + -1.76490991152318799e-15, + 4.45342481592660028e-17, + -1.80619102947548326e-18, + 8.92218774938927013e-20, + -4.26518044210016369e-21, + 1.81287027314037765e-22, + -6.57507428335886774e-24, + 4.73549980446251375e-03, + -3.82007075269655502e-05, + 4.62233724472307305e-07, + -6.21512631733770510e-09, + 8.78407606222385926e-11, + -1.28852093711536766e-12, + 2.04016552399686273e-14, + -4.21860017592526691e-16, + 1.49335707983955230e-17, + -7.69056592132746233e-19, + 4.13995608560753158e-20, + -2.03235973434186404e-21, + 8.72652977590229250e-23, + -3.18566828511633092e-24, + 4.79778875514683741e-04, + -3.87031939714334167e-06, + 4.68316670613688689e-08, + -6.29750939729031732e-10, + 8.90993605293321804e-12, + -1.31883529103364587e-13, + 2.20928361034875148e-15, + -5.54893254949841498e-17, + 2.49027719476205283e-18, + -1.42709919217307932e-19, + 7.93197715757727569e-21, + -3.93679421145530717e-22, + 1.70095592902599472e-23, + -6.24885985911793723e-25, + 2.33246383996013734e-05, + -1.88157160497550072e-07, + 2.27676045341326696e-09, + -3.06200801553912751e-11, + 4.33895572517748535e-13, + -6.50714065402270403e-15, + 1.17613375687392967e-16, + -3.61573385405981686e-18, + 1.91747313747194771e-19, + -1.16471922474341220e-20, + 6.58861463678850241e-22, + -3.29648828221304876e-23, + 1.43396484678039706e-24, + -5.31262503947876104e-26, + 4.59996490081984811e-07, + -3.71074034872108950e-09, + 4.49017006801078031e-11, + -6.04006006273983376e-13, + 8.57886566770457776e-15, + -1.31175863660757471e-16, + 2.62495156269116333e-18, + -9.89323575044146300e-20, + 5.92184874682943908e-21, + -3.73354627019391970e-22, + 2.14018646935108727e-23, + -1.08012828738291772e-24, + 4.74215644054268804e-26, + -1.77890719788508794e-27, + 2.65919203934838949e-09, + -2.14514225571612965e-11, + 2.59577679774830223e-13, + -3.49293013809850178e-15, + 4.97977263074694040e-17, + -7.85150934947236233e-19, + 1.80779183169581551e-20, + -8.36816035900953121e-22, + 5.49637770483094961e-23, + -3.56594849052643423e-24, + 2.07252789182478293e-25, + -1.05887578215204825e-26, + 4.71773476852138153e-28, + -1.80614049997844331e-29, + 1.98875300358141467e-12, + -1.60430856723288011e-14, + 1.94140619145452345e-16, + -2.61406990988333187e-18, + 3.75408191049068472e-20, + -6.26876912416339445e-22, + 1.78735028290410522e-23, + -1.02941368670677466e-24, + 7.32712473824237473e-26, + -4.89796790372924761e-27, + 2.90793646219162239e-28, + -1.52047911144458361e-29, + 6.97636211409329571e-31, + -2.78217497735987317e-32, +# root=9 base[22]=64.0 */ + 1.19048916058267881e-01, + -9.02118766319865350e-04, + 1.02538014678913331e-05, + -1.29497379543246946e-07, + 1.71719319802490542e-09, + -2.34181000690782732e-11, + 3.24937499602635134e-13, + -4.53711294639054833e-15, + 6.16669790926864413e-17, + -6.91529091296915720e-19, + -1.50331303167595093e-21, + 6.27126637207136706e-22, + -3.73003859820446172e-23, + 1.69332716088752711e-24, + 7.01267850279264221e-02, + -5.31400798017522737e-04, + 6.04009025689425271e-06, + -7.62816679086977573e-08, + 1.01154866008227067e-09, + -1.37974974894789217e-11, + 1.91725589289685691e-13, + -2.70256416986814182e-15, + 3.87502935605998189e-17, + -5.78659664373241393e-19, + 9.76537932539122512e-21, + -2.16650308681488166e-22, + 6.63535475993469518e-24, + -2.37855293075431892e-25, + 2.39581607760906909e-02, + -1.81548117949540018e-04, + 2.06354079077667137e-06, + -2.60610085587014002e-08, + 3.45601298863130903e-10, + -4.71582724569247083e-12, + 6.57282474488725785e-14, + -9.44667650484601252e-16, + 1.49702521188218872e-17, + -3.20137317905507930e-19, + 1.09569034024075039e-20, + -4.93838166625844789e-22, + 2.27881573713134149e-23, + -9.68908040642717856e-25, + 4.58965171009235312e-03, + -3.47790736800482214e-05, + 3.95311499507589413e-07, + -4.99252072663677481e-09, + 6.62113286702480497e-11, + -9.04039254756133147e-13, + 1.26617598307893059e-14, + -1.87587930995672684e-16, + 3.40510971152466785e-18, + -9.93812712799711976e-20, + 4.47165613735616298e-21, + -2.25587378895102057e-22, + 1.07838814749672578e-23, + -4.64071831281261742e-25, + 4.65002221623548998e-04, + -3.52365447378785600e-06, + 4.00511458473855469e-08, + -5.05823188999530695e-10, + 6.70892812041049045e-12, + -9.16880888213864249e-14, + 1.29343037436203470e-15, + -2.00063805476185004e-17, + 4.26416085120447700e-19, + -1.58503017866930124e-20, + 8.14541164151209974e-22, + -4.28762415203501377e-23, + 2.07734774244603910e-24, + -8.99388543058283333e-26, + 2.26062654662130006e-05, + -1.71303848782634926e-07, + 1.94710346844281882e-09, + -2.45910855862383568e-11, + 3.26206941633840897e-13, + -4.46419213422824010e-15, + 6.36344357871464401e-17, + -1.04400540415839819e-18, + 2.65573001218402458e-20, + -1.18580491147904627e-21, + 6.56697787944555870e-23, + -3.53519053971626407e-24, + 1.72749979544354880e-25, + -7.52130969757605223e-27, + 4.45829106536834396e-07, + -3.37836625518754144e-09, + 3.83998080205354342e-11, + -4.84981258084612925e-13, + 6.43474374655719193e-15, + -8.82387489583848272e-17, + 1.27722733912113881e-18, + -2.27067667800249259e-20, + 6.97417354741748836e-22, + -3.58286251176887992e-23, + 2.08111113434754017e-24, + -1.13767030829131222e-25, + 5.60381072992823495e-27, + -2.45711831900445474e-28, + 2.57729183554266140e-09, + -1.95299860359139795e-11, + 2.21985652903845696e-13, + -2.80370469446365596e-15, + 3.72120131809448441e-17, + -5.11934055316828155e-19, + 7.59082941614181358e-21, + -1.51116971583225351e-22, + 5.67211103195494718e-24, + -3.25643198047574822e-25, + 1.95894132538829853e-26, + -1.08596102432219359e-27, + 5.40359640681189073e-29, + -2.39493371030002680e-30, + 1.92750154903070275e-12, + -1.46060610907346452e-14, + 1.66018810903450250e-16, + -2.09694079218789500e-18, + 2.78490745558223270e-20, + -3.85487155443203999e-22, + 5.97651107529179039e-24, + -1.42039797686054534e-25, + 6.67250037298085060e-27, + -4.21805328406552665e-28, + 2.62162378622046522e-29, + -1.48067945002945551e-30, + 7.49975469014803853e-32, + -3.39359364775888784e-33, +# root=9 base[23]=68.0 */ + 1.15595275712414292e-01, + -8.25870194049577438e-04, + 8.85049105195677713e-06, + -1.05384938475551786e-07, + 1.31758233959298081e-09, + -1.69435997482818074e-11, + 2.21899884138968579e-13, + -2.94167225744608443e-15, + 3.91988568034320461e-17, + -5.14040257349608779e-19, + 6.02232330489527107e-21, + -2.77464766874555715e-23, + -2.39012809541003509e-24, + 1.58993959514023230e-25, + 6.80923885593234524e-02, + -4.86485920962913233e-04, + 5.21345769293115135e-06, + -6.20779093897024378e-08, + 7.76134493890529479e-10, + -9.98095613720938223e-12, + 1.30733187063715376e-13, + -1.73489057530320951e-15, + 2.32661967520491909e-17, + -3.15869268922308051e-19, + 4.40851082832478327e-21, + -6.69828704788377961e-23, + 1.26483126821924537e-24, + -3.31290909334491749e-26, + 2.32631282319248275e-02, + -1.66203368782992446e-04, + 1.78112912455087017e-06, + -2.12083429920803781e-08, + 2.65160032802736299e-10, + -3.41003082905886524e-12, + 4.46788283435336596e-14, + -5.94185537893254175e-16, + 8.07392927325452538e-18, + -1.17233371280569746e-19, + 2.12058552880236867e-21, + -5.90541776011418600e-23, + 2.34311034572404292e-24, + -1.02071371005989582e-25, + 4.45650470649260749e-03, + -3.18394881513883211e-05, + 3.41209935881027607e-07, + -4.06287227548942370e-09, + 5.07968500208161544e-11, + -6.53297921204945803e-13, + 8.56374216790465468e-15, + -1.14283612047368446e-16, + 1.58543291190425069e-18, + -2.53426760465468163e-20, + 5.96676859692881628e-22, + -2.25405478231010376e-23, + 1.04310074377977639e-24, + -4.78303104154605940e-26, + 4.51512384748280920e-04, + -3.22582925075988650e-06, + 3.45698090195161353e-08, + -4.11631619402616297e-10, + 5.14654434671194584e-12, + -6.61951401635645049e-14, + 8.68335894742475642e-16, + -1.16472420892288553e-17, + 1.66461993906269742e-19, + -3.00304575737394864e-21, + 8.92642980294692865e-23, + -3.98641222768334225e-24, + 1.96042588008949482e-25, + -9.15895112804452108e-27, + 2.19504517470205741e-05, + -1.56824954981661179e-07, + 1.68062490446690522e-09, + -2.00116499963333602e-11, + 2.50204304614525994e-13, + -3.21852711417998973e-15, + 4.22637128187938207e-17, + -5.71086565033302190e-19, + 8.50647857519543436e-21, + -1.76976640964437929e-22, + 6.39607369751368623e-24, + -3.15758932891804673e-25, + 1.60284267713029726e-26, + -7.56810556047227602e-28, + 4.32895486474469637e-07, + -3.09282087216586906e-09, + 3.31444195908476214e-11, + -3.94659939479538446e-13, + 4.93448825180318749e-15, + -6.34864897219678974e-17, + 8.34941101031920801e-19, + -1.14048959211957781e-20, + 1.79939633489311493e-22, + -4.40582227094321149e-24, + 1.87193218992856680e-25, + -9.86670052618061200e-27, + 5.11141692675425114e-28, + -2.43392103317979750e-29, + 2.50252391744933093e-09, + -1.78792768030977525e-11, + 1.91604472082908462e-13, + -2.28149271113276622e-15, + 2.85265633398311075e-17, + -3.67121425427984614e-19, + 4.83987572277465742e-21, + -6.72398826653621592e-23, + 1.15299955549599207e-24, + -3.40031916713682834e-26, + 1.65525753418893594e-27, + -9.14759654397181049e-29, + 4.81708632613312736e-30, + -2.31519503676025444e-31, + 1.87158421682445985e-12, + -1.33715295311924562e-14, + 1.43296920918297763e-16, + -1.70628589602325703e-18, + 2.13355093688967663e-20, + -2.74718860337877358e-22, + 3.63810558460458801e-24, + -5.21406196281201141e-26, + 1.02358893967186666e-27, + -3.77717824348667274e-29, + 2.07726333209415722e-30, + -1.19564252960283884e-31, + 6.41337799126842066e-33, + -3.12774304011301636e-34, +# root=9 base[24]=72.0 */ + 1.12425867744450597e-01, + -7.59790364010850530e-04, + 7.70204339803804046e-06, + -8.67508974523693976e-08, + 1.02596038285679819e-09, + -1.24801814490401618e-11, + 1.54623670377333108e-13, + -1.94045768807154787e-15, + 2.45745450453787853e-17, + -3.12680269327634465e-19, + 3.94671731784799562e-21, + -4.68249565285362289e-23, + 3.84884679407250449e-25, + 5.83068249231786200e-27, + 6.62254216132680817e-02, + -4.47561030253839764e-04, + 4.53695472180805959e-06, + -5.11013605776418387e-08, + 6.04350837066058202e-10, + -7.35156857815077854e-12, + 9.10836668046271403e-14, + -1.14317162781519480e-15, + 1.44871291369569585e-17, + -1.85059615416349574e-19, + 2.38489314383797831e-21, + -3.12896918198045011e-23, + 4.33388918201954302e-25, + -6.99992229459931858e-27, + 2.26252964213930832e-02, + -1.52905043557579067e-04, + 1.55000818437102798e-06, + -1.74583025971172296e-08, + 2.06470868682418263e-10, + -2.51160227484724060e-12, + 3.11187842689409988e-14, + -3.90645169565671358e-16, + 4.95741729309425788e-18, + -6.38449274425138052e-20, + 8.57537881875722272e-22, + -1.33316529232249697e-23, + 2.95458524844508258e-25, + -9.83958195990431701e-27, + 4.33431561661526930e-03, + -2.92919352671633960e-05, + 2.96934217476366509e-07, + -3.34447753634307485e-09, + 3.95535272016042932e-11, + -4.81148595282729143e-13, + 5.96168540874715644e-15, + -7.48637732807685815e-17, + 9.52162287371104178e-19, + -1.24222854622406632e-20, + 1.77481914502126714e-22, + -3.37068132064716123e-24, + 1.02230917758460255e-25, + -4.19415635382507793e-27, + 4.39132752947948249e-04, + -2.96772300670594542e-06, + 3.00839976008612398e-08, + -3.38846963642590564e-10, + 4.00738232027193050e-12, + -4.87480911246842090e-14, + 6.04051723716855525e-16, + -7.58905613385314093e-18, + 9.68393966567269631e-20, + -1.28733416062538484e-21, + 1.99679627429452488e-23, + -4.64599356326631877e-25, + 1.72490021185914596e-26, + -7.74480146263624913e-28, + 2.13486110892344883e-05, + -1.44277018442450441e-07, + 1.46254535153901549e-09, + -1.64731790336457836e-11, + 1.94820632963435833e-13, + -2.36993189724164873e-15, + 2.93691166484618174e-17, + -3.69240576990614389e-19, + 4.73400021632335248e-21, + -6.46152736730870067e-23, + 1.11134751287683007e-24, + -3.13237677426806385e-26, + 1.32917506471221630e-27, + -6.26191699145628286e-29, + 4.21026295464009743e-07, + -2.84535693439220617e-09, + 2.88435650994312330e-11, + -3.24875566436527936e-13, + 3.84215689564075371e-15, + -4.67392764289045662e-17, + 5.79286658600459972e-19, + -7.29055441190671742e-21, + 9.41219911681802697e-23, + -1.33365325230429913e-24, + 2.60405963280115031e-26, + -8.75004065550866826e-28, + 4.07224699639782454e-29, + -1.97693768481184891e-30, + 2.43390935492524236e-09, + -1.64487133857222802e-11, + 1.66741659861619770e-13, + -1.87807220232792120e-15, + 2.22111542080956630e-17, + -2.70201223692482669e-19, + 3.34955538531340879e-21, + -4.22237722283918588e-23, + 5.51039101839918704e-25, + -8.25324728794121456e-27, + 1.88513967613681652e-28, + -7.44225524527517146e-30, + 3.70779929407811836e-31, + -1.84032239865310089e-32, + 1.82026885009788441e-12, + -1.23016416157877902e-14, + 1.24702529342530163e-16, + -1.40457043313706004e-18, + 1.66113069941664458e-20, + -2.02086308158099529e-22, + 2.50610011877289435e-24, + -3.16855795754877978e-26, + 4.21743236470455425e-28, + -6.93469487025475297e-30, + 1.94760782761854705e-31, + -8.97772623086409734e-33, + 4.73329061031566198e-34, + -2.39972355040347794e-35, +# root=9 base[25]=76.0 */ + 1.09503716418612340e-01, + -7.02076744237018087e-04, + 6.75189413883928113e-06, + -7.21477287836852701e-08, + 8.09484253328606001e-10, + -9.34175070483639686e-12, + 1.09803602590864913e-13, + -1.30739269906501428e-15, + 1.57156554904091243e-17, + -1.90258808086589149e-19, + 2.31333159114610305e-21, + -2.80452518130481404e-23, + 3.29367908654742740e-25, + -3.27566698839157596e-27, + 6.45041033129976488e-02, + -4.13564327541377538e-04, + 3.97726115006775153e-06, + -4.24992384349918034e-08, + 4.76833645843398212e-10, + -5.50283894295349252e-12, + 6.46808234591992702e-14, + -7.70138127136347714e-16, + 9.25809719458078370e-18, + -1.12125908893921930e-19, + 1.36641399173813103e-21, + -1.67591253077917940e-23, + 2.07892698860361746e-25, + -2.66282857330041557e-27, + 2.20372241097211777e-02, + -1.41290387769648881e-04, + 1.35879410470473228e-06, + -1.45194676734451128e-08, + 1.62905761879344831e-10, + -1.87999390604903104e-12, + 2.20976482957381340e-14, + -2.63115636874692907e-16, + 3.16340792957342156e-18, + -3.83439474370569355e-20, + 4.69471481408688757e-22, + -5.89547755311734979e-24, + 8.09004733581009497e-26, + -1.43197435684115785e-27, + 4.22165892665439524e-03, + -2.70669220319937763e-05, + 2.60303440826900727e-07, + -2.78148645720868898e-09, + 3.12077682311853478e-11, + -3.60149524792462599e-13, + 4.23324950920017866e-15, + -5.04064969709815919e-17, + 6.06155363118263830e-19, + -7.35696249451148925e-21, + 9.07517793698221428e-23, + -1.18173804988455448e-24, + 1.85444089421547168e-26, + -4.35604947584905003e-28, + 4.27718899694624303e-04, + -2.74229498659504425e-06, + 2.63727371735898696e-08, + -2.81807306217213095e-10, + 3.16182644126925812e-12, + -3.64886977156372760e-14, + 4.28895460963599519e-16, + -5.10718789527748046e-18, + 6.14342071083092316e-20, + -7.47082712272719189e-22, + 9.31662943884211767e-24, + -1.27577313205423060e-25, + 2.33639095080042432e-27, + -6.84012450033716230e-29, + 2.07937221347967223e-05, + -1.33317746781482293e-07, + 1.28212096589007443e-09, + -1.37001728134898664e-11, + 1.53713441804470293e-13, + -1.77391364308653721e-15, + 2.08510786039457706e-17, + -2.48304397526575742e-19, + 2.98814338058988656e-21, + -3.64396302449746365e-23, + 4.61513006592920472e-25, + -6.75518847575217485e-27, + 1.45897037012356037e-28, + -5.04359991166214813e-30, + 4.10083061737223718e-07, + -2.62922383159577579e-09, + 2.52853283273660091e-11, + -2.70187742508464396e-13, + 3.03145745784047614e-15, + -3.49842466728882739e-17, + 4.11218738872166746e-19, + -4.89740491533040135e-21, + 5.89737807445469477e-23, + -7.22114228701700158e-25, + 9.35084223072560244e-27, + -1.49327060196897713e-28, + 3.82167771121652993e-30, + -1.49875964624932387e-31, + 2.37064765552636674e-09, + -1.51992703280141730e-11, + 1.46171861097669193e-13, + -1.56192733379865596e-15, + 1.75245434256668254e-17, + -2.02240629965645422e-19, + 2.37725323607530452e-21, + -2.83156315489615580e-23, + 3.41309298573434961e-25, + -4.20579946737921280e-27, + 5.63154441041537643e-29, + -1.01000842284906867e-30, + 3.07447035319015355e-32, + -1.33091591838912582e-33, + 1.77295677555343463e-12, + -1.13672098209678791e-14, + 1.09318814661560502e-16, + -1.16813212646803768e-18, + 1.31062348705022529e-20, + -1.51251886876544098e-22, + 1.77795105500739160e-24, + -2.11823793441820376e-26, + 2.55784902489439116e-28, + -3.18828659921768055e-30, + 4.52313161949987371e-32, + -9.59366123131275836e-34, + 3.51294686679974148e-35, + -1.65341795061569688e-36, +# root=9 base[26]=80.0 */ + 1.06798249742697013e-01, + -6.51317829499812044e-04, + 5.95809842493395628e-06, + -6.05589761493004481e-08, + 6.46305922061453859e-10, + -7.09466562458530302e-12, + 7.93221508226118719e-14, + -8.98381107474327719e-16, + 1.02726160258541075e-17, + -1.18330255572125641e-19, + 1.37085741427394798e-21, + -1.59443277786398496e-23, + 1.85434199597776484e-25, + -2.12447906595586144e-27, + 6.29104249641640467e-02, + -3.83664353482284111e-04, + 3.50966897673328378e-06, + -3.56727842847153304e-08, + 3.80712046611688820e-10, + -4.17917366193006321e-12, + 4.67253967972228520e-14, + -5.29199474212597005e-16, + 6.05120760644247105e-18, + -6.97063218828462919e-20, + 8.07725469764521347e-22, + -9.40602400393541318e-24, + 1.10064789485582437e-25, + -1.29705633113940464e-27, + 2.14927587946751250e-02, + -1.31075341045739827e-04, + 1.19904560824755759e-06, + -1.21872733914633419e-08, + 1.30066713127440517e-10, + -1.42777564764666744e-12, + 1.59632976853778053e-14, + -1.80796322923582631e-16, + 2.06736337586727884e-18, + -2.38165496928173591e-20, + 2.76101027442751447e-22, + -3.22333782635574654e-24, + 3.81945990348460895e-26, + -4.75554291317878134e-28, + 4.11735600510331964e-03, + -2.51100311379944640e-05, + 2.29700509026944640e-07, + -2.33470927433307516e-09, + 2.49168088825556908e-11, + -2.73518203301341035e-13, + 3.05808094555425053e-15, + -3.46351344039963220e-17, + 3.96051282848674199e-19, + -4.56314797118643347e-21, + 5.29383167416757703e-23, + -6.20521881262503479e-25, + 7.49897611810715948e-27, + -1.01083703429675639e-28, + 4.17151411506712269e-04, + -2.54403187851874196e-06, + 2.32721900768803756e-08, + -2.36541913833428053e-10, + 2.52445550199732509e-12, + -2.77115965220546852e-14, + 3.09830690390873697e-16, + -3.50908335229340797e-18, + 4.01272117818981946e-20, + -4.62410012197816592e-22, + 5.37029322981945134e-24, + -6.33206143892382081e-26, + 7.86980701716045311e-28, + -1.17359150045264258e-29, + 2.02799795501238349e-05, + -1.23679107988356367e-07, + 1.13138665201898216e-09, + -1.14995779563766136e-11, + 1.22727395185687173e-13, + -1.34721020176202912e-15, + 1.50625485210696551e-17, + -1.70596311997235676e-19, + 1.95087904786890233e-21, + -2.24867335034567034e-23, + 2.61556085775300063e-25, + -3.11001567091029483e-27, + 4.01687476546718898e-29, + -6.75610257319719588e-31, + 3.99951295490553855e-07, + -2.43913556928473054e-09, + 2.23126239384319108e-11, + -2.26788744593294118e-13, + 2.42036639234399031e-15, + -2.65689864637500563e-17, + 2.97056038475478278e-19, + -3.36443669892681747e-21, + 3.84764902297462109e-23, + -4.43658070021069281e-25, + 5.17200845419835448e-27, + -6.22477966345098401e-29, + 8.47449218226242261e-31, + -1.63741839778473260e-32, + 2.31207696548775053e-09, + -1.41003897950389541e-11, + 1.28986965238543534e-13, + -1.31104221574758011e-15, + 1.39918872350165831e-17, + -1.53592571538404098e-19, + 1.71725215363627933e-21, + -1.94496743293927279e-23, + 2.22448684560535116e-25, + -2.56640287784858297e-27, + 3.00217912794144408e-29, + -3.68059992361531639e-31, + 5.39784562185130699e-33, + -1.22317522923645162e-34, + 1.72915300677683092e-12, + -1.05453805278892907e-14, + 9.64665978310194725e-17, + -9.80500487181757405e-19, + 1.04642339172732731e-20, + -1.14868626399857863e-22, + 1.28429886224161673e-24, + -1.45462806026945970e-26, + 1.66391375952935763e-28, + -1.92158425748388851e-30, + 2.26184297432018625e-32, + -2.86411556358069798e-34, + 4.71901182193379983e-36, + -1.29596782338349637e-37, +# root=9 base[27]=84.0 */ + 1.04283940278864784e-01, + -6.06394229530507456e-04, + 5.28906679420547615e-06, + -5.12577230496382376e-08, + 5.21588945406483904e-10, + -5.45923334742271107e-12, + 5.81974192008690264e-14, + -6.28462791054248851e-16, + 6.85190282565996019e-18, + -7.52570235544059540e-20, + 8.31427301523975117e-22, + -9.22870455931891282e-24, + 1.02801121661567224e-25, + -1.14652763073018283e-27, + 6.14293494105647014e-02, + -3.57201721633923540e-04, + 3.11557015671118837e-06, + -3.01938013733566102e-08, + 3.07246441698496182e-10, + -3.21580822565184497e-12, + 3.42816890791076016e-14, + -3.70201415491262263e-16, + 4.03617386782885723e-18, + -4.43309411163057701e-20, + 4.89770321070960442e-22, + -5.43698821846552188e-24, + 6.06015359840675501e-26, + -6.77943389475494582e-28, + 2.09867631723544314e-02, + -1.22034630166524097e-04, + 1.06440542921517371e-06, + -1.03154300798891944e-08, + 1.04967875612044721e-10, + -1.09865082969631151e-12, + 1.17120188335968341e-14, + -1.26475867135147188e-16, + 1.37892231885780793e-18, + -1.51453551821268212e-20, + 1.67333207206664095e-22, + -1.85802145582667352e-24, + 2.07363383772623171e-26, + -2.33438238648051041e-28, + 4.02042270147203590e-03, + -2.33781071172300187e-05, + 2.03907563831699194e-07, + -1.97612127836250903e-09, + 2.01086383169227595e-11, + -2.10467936693892835e-13, + 2.24366505603066663e-15, + -2.42289164328232594e-17, + 2.64159769417581769e-19, + -2.90141903318242981e-21, + 3.20583055423989657e-23, + -3.56101138679640136e-25, + 3.98238421593476756e-27, + -4.52799522467259777e-29, + 4.07330578821444786e-04, + -2.36856137050576795e-06, + 2.06589685137460425e-08, + -2.00211441410875290e-10, + 2.03731395782633805e-12, + -2.13236351036843303e-14, + 2.27317741356739069e-16, + -2.45476201447349208e-18, + 2.67634984993906972e-20, + -2.93963016306550236e-22, + 3.24835168635899278e-24, + -3.61024623983979783e-26, + 4.04956269853773289e-28, + -4.67110027344521543e-30, + 1.98025359156817028e-05, + -1.15148540391065457e-07, + 1.00434386035596590e-09, + -9.73335778222710485e-12, + 9.90448174698446943e-14, + -1.03665689037618660e-15, + 1.10511415654761225e-17, + -1.19339259414596233e-19, + 1.30112186315008250e-21, + -1.42914535487604483e-23, + 1.57944424769881261e-25, + -1.75680285770228223e-27, + 1.97903069371391727e-29, + -2.32924911627547526e-31, + 3.90535398415958171e-07, + -2.27090011552661035e-09, + 1.98071515345848553e-11, + -1.91956261341956064e-13, + 1.95331079954331229e-15, + -2.04444125278678177e-17, + 2.17944923997061703e-19, + -2.35354847569482423e-21, + 2.56601646773067147e-23, + -2.81857973902254139e-25, + 3.11559940656048488e-27, + -3.46945095086605305e-29, + 3.93256521360182631e-31, + -4.76161658358500913e-33, + 2.25764464089963260e-09, + -1.31278380823663108e-11, + 1.14503089079656003e-13, + -1.10967924155743848e-15, + 1.12918871844803283e-17, + -1.18187029528908112e-19, + 1.25991709857777245e-21, + -1.36056298717460461e-23, + 1.48339723071525343e-25, + -1.62947378790316940e-27, + 1.80171627981527021e-29, + -2.00989538257936591e-31, + 2.29978461328101103e-33, + -2.90297929980644716e-35, + 1.68844423317959491e-12, + -9.81802986295267396e-15, + 8.56344160350422854e-17, + -8.29905416563933420e-19, + 8.44496138444215190e-21, + -8.83895573990525410e-23, + 9.42265223668905055e-25, + -1.01753734310910601e-26, + 1.10941385715561321e-28, + -1.21875671727391093e-30, + 1.34828651160429816e-32, + -1.50880353071129464e-34, + 1.75532015534322327e-36, + -2.37364933204082401e-38, +# root=9 base[28]=88.0 */ + 1.01939282779246923e-01, + -5.66408026674394805e-04, + 4.72067404805029116e-06, + -4.37154549848205881e-08, + 4.25064507586865129e-10, + -4.25117435150702375e-12, + 4.33043767239682007e-14, + -4.46846606748395687e-16, + 4.65522883921172656e-18, + -4.88572076151270243e-20, + 5.15778161484432574e-22, + -5.47100798422574170e-24, + 5.82606313735021500e-26, + -6.22296589413300512e-28, + 6.00482088015027934e-02, + -3.33647505900595191e-04, + 2.78075353477834485e-06, + -2.57509636836077388e-08, + 2.50387893752374268e-10, + -2.50419071193350453e-12, + 2.55088145161156856e-14, + -2.63218826923323232e-16, + 2.74220255474722249e-18, + -2.87797641229737915e-20, + 3.03824081157241788e-22, + -3.22278092822193535e-24, + 3.43212408867635905e-26, + -3.66702713853429458e-28, + 2.05149093899486129e-02, + -1.13987552474034096e-04, + 9.50018459173918153e-07, + -8.79757610121976480e-09, + 8.55426840401912918e-11, + -8.55533355254839634e-13, + 8.71484810643871697e-15, + -8.99262530521761434e-17, + 9.36847934787213363e-19, + -9.83234238961708927e-21, + 1.03799034482606380e-22, + -1.10105901936417001e-24, + 1.17271724581391838e-26, + -1.25375235551998772e-28, + 3.93002993137308351e-03, + -2.18365328606521402e-05, + 1.81994514766892824e-07, + -1.68534682479636571e-09, + 1.63873650280103019e-11, + -1.63894055284006970e-13, + 1.66949866989856477e-15, + -1.72271231201447139e-17, + 1.79471462250210233e-19, + -1.88357793830174844e-21, + 1.98848391018194279e-23, + -2.10937233748769500e-25, + 2.24707028892691896e-27, + -2.40470617868152847e-29, + 3.98172402654496140e-04, + -2.21237621763657851e-06, + 1.84388400292299614e-08, + -1.70751522572014876e-10, + 1.66029180957089188e-12, + -1.66049854378224048e-14, + 1.69145861275781284e-16, + -1.74537223111060202e-18, + 1.81832186557928364e-20, + -1.90835601991284385e-22, + 2.01465669954196812e-24, + -2.13723625160244359e-26, + 2.27737286010852628e-28, + -2.44064475770949064e-30, + 1.93573075878874430e-05, + -1.07555537901201884e-07, + 8.96411442958231149e-10, + -8.30115226844693314e-12, + 8.07157377798889437e-14, + -8.07257882568663650e-16, + 8.22309243132525975e-18, + -8.48519577168965777e-20, + 8.83984489364817954e-22, + -9.27756305120608671e-24, + 9.79445053488503549e-26, + -1.03910760276047424e-27, + 1.10767115610640413e-29, + -1.18952353269294386e-31, + 3.81754835001173038e-07, + -2.12115483718553773e-09, + 1.76785640743666734e-11, + -1.63711042983369511e-13, + 1.59183414422251636e-15, + -1.59203235488783055e-17, + 1.62171587616044782e-19, + -1.67340659273514387e-21, + 1.74334911910721533e-23, + -1.82967748613224661e-25, + 1.93164449195776622e-27, + -2.04950711699422233e-29, + 2.18596660756435534e-31, + -2.35447021627606322e-33, + 2.20688511431670443e-09, + -1.22621761564100608e-11, + 1.02197945700139190e-13, + -9.46396563146486484e-16, + 9.20222811955457154e-18, + -9.20337395782660393e-20, + 9.37497135420740117e-22, + -9.67379044274413648e-24, + 1.00781249132738895e-25, + -1.05772139318602606e-27, + 1.11669301076626350e-29, + -1.18500346324689382e-31, + 1.26498548571713530e-33, + -1.36866397860996638e-35, + 1.65048226680754399e-12, + -9.17061978774158663e-15, + 7.64316619782344555e-17, + -7.07789786931193884e-19, + 6.88214997168927762e-21, + -6.88300692346603638e-23, + 7.01134100185332228e-25, + -7.23482195490940527e-27, + 7.53722021491465863e-29, + -7.91052194701525316e-31, + 8.35189115847372318e-33, + -8.86506671698024293e-35, + 9.47766899980700332e-37, + -1.03360425425108656e-38, +# root=9 base[29]=92.0 */ + 9.97460142259339183e-02, + -5.30631473451560450e-04, + 4.23426098648164918e-06, + -3.75421124837852656e-08, + 3.49501206672081682e-10, + -3.34667010272977516e-12, + 3.26396836670825356e-14, + -3.22465147583221993e-16, + 3.21644059146199046e-18, + -3.23201514571501393e-20, + 3.26676858501792631e-22, + -3.31769238748317102e-24, + 3.38276975261323212e-26, + -3.46023283055505231e-28, + 5.87562451496462870e-02, + -3.12573020387732644e-04, + 2.49422774914863560e-06, + -2.21145033378123270e-08, + 2.05876683280888844e-10, + -1.97138472667019633e-12, + 1.92266855980724855e-14, + -1.89950860837239430e-16, + 1.89467191975562756e-18, + -1.90384627220821936e-20, + 1.92431829577911676e-22, + -1.95431686816767615e-24, + 1.99266053786380734e-26, + -2.03834454549007655e-28, + 2.00735220816184411e-02, + -1.06787651438429166e-04, + 8.52129602080639740e-07, + -7.55521340659183111e-09, + 7.03358449370694030e-11, + -6.73505169390873692e-13, + 6.56861746253460722e-15, + -6.48949365511807867e-17, + 6.47296958336258266e-19, + -6.50431309701308646e-21, + 6.57425535259963655e-23, + -6.67675307149458737e-25, + 6.80781638757632690e-27, + -6.96427187375362304e-29, + 3.84547360699001367e-03, + -2.04572517712257727e-05, + 1.63242000143893375e-07, + -1.44734808530840087e-09, + 1.34741992078504679e-11, + -1.29023015619489827e-13, + 1.25834644191040110e-15, + -1.24318873827796945e-17, + 1.24002323790702648e-19, + -1.24602775733353670e-21, + 1.25942701457226003e-23, + -1.27906562125597786e-25, + 1.30419343411799583e-27, + -1.33428178182795071e-29, + 3.89605548094312999e-04, + -2.07263385564369332e-06, + 1.65389222337831796e-08, + -1.46638594277396233e-10, + 1.36514336178673211e-12, + -1.30720134513849859e-14, + 1.27489824489250980e-16, + -1.25954116375041737e-18, + 1.25633403591403450e-20, + -1.26241762462474430e-22, + 1.27599380673089514e-24, + -1.29589542648812401e-26, + 1.32138348540151005e-28, + -1.35203981273554138e-30, + 1.89408265920258158e-05, + -1.00761908141528588e-07, + 8.04046193852598061e-10, + -7.12889279809309537e-12, + 6.63669801812267322e-14, + -6.35501063073949634e-16, + 6.19796784206358325e-18, + -6.12330879685091265e-20, + 6.10771728991471061e-22, + -6.13729350226326040e-24, + 6.20329930675414849e-26, + -6.30008421949679861e-28, + 6.42420087991881644e-30, + -6.57442975519644143e-32, + 3.73541211637778851e-07, + -1.98717437548196839e-09, + 1.58569842770690265e-11, + -1.40592346405659746e-13, + 1.30885534848259704e-15, + -1.25330241500962656e-17, + 1.22233124650021883e-19, + -1.20760737678423204e-21, + 1.20453252016165516e-23, + -1.21036555933322135e-25, + 1.22338420004818998e-27, + -1.24248078725264067e-29, + 1.26701665257412942e-31, + -1.29698239665759796e-33, + 2.15940300938089478e-09, + -1.14876490006715306e-11, + 9.16675817842888590e-14, + -8.12749775568844132e-16, + 7.56635704523394475e-18, + -7.24521129762194773e-20, + 7.06617018568835485e-22, + -6.98105303948406701e-24, + 6.96327778492363016e-26, + -6.99699946470116385e-28, + 7.07227032883546949e-30, + -7.18274566010655006e-32, + 7.32509405979711195e-34, + -7.50129032213031003e-36, + 1.61497141412253067e-12, + -8.59136746173042583e-15, + 6.85562275963529871e-17, + -6.07838207447260199e-19, + 5.65871691575700094e-21, + -5.41853886674522635e-23, + 5.28463784313648413e-25, + -5.22098056911673445e-27, + 5.20768705608345567e-29, + -5.23290868280567267e-31, + 5.28921688090018999e-33, + -5.37194223829695231e-35, + 5.47906176583334658e-37, + -5.61470089808976870e-39, +# root=9 base[30]=96.0 */ + 9.76885111398050204e-02, + -4.98469167482285826e-04, + 3.81522890766802043e-06, + -3.24458718012928505e-08, + 2.89725831442157475e-10, + -2.66102684468669765e-12, + 2.48931648797974772e-14, + -2.35892854514039547e-16, + 2.25686390497630573e-18, + -2.17520936247646789e-20, + 2.10884140938871464e-22, + -2.05428054308371553e-24, + 2.00907172266199321e-26, + -1.97123499998377508e-28, + 5.75442553106246119e-02, + -2.93627538217104700e-04, + 2.24739330930253565e-06, + -1.91125190559754305e-08, + 1.70665485839278169e-10, + -1.56750068511068509e-12, + 1.46635322682298757e-14, + -1.38954709083769253e-16, + 1.32942503933059980e-18, + -1.28132573195038184e-20, + 1.24223112921683909e-22, + -1.21009164801407640e-24, + 1.18346142257925697e-26, + -1.16117583613653883e-28, + 1.96594570790925745e-02, + -1.00315104499283959e-04, + 7.67800922360975203e-07, + -6.52961353007401608e-09, + 5.83062683777630793e-11, + -5.35521960863679275e-13, + 5.00965876957798196e-15, + -4.74725778357282394e-17, + 4.54185641393839865e-19, + -4.37752963351951033e-21, + 4.24396664191818474e-23, + -4.13416556750969064e-25, + 4.04318884622974017e-27, + -3.96706961901828993e-29, + 3.76615140173289318e-03, + -1.92173095068197189e-05, + 1.47087201257292597e-07, + -1.25087447990691979e-09, + 1.11696998293131466e-11, + -1.02589648099225028e-13, + 9.59697580731851147e-16, + -9.09429567902635343e-18, + 8.70080940559471966e-20, + -8.38600951987554477e-22, + 8.13014382880211999e-24, + -7.91979991427956319e-26, + 7.74552532031733431e-28, + -7.59975720934767243e-30, + 3.81568990204779110e-04, + -1.94700865705928438e-06, + 1.49021929468816196e-08, + -1.26732799948349833e-10, + 1.13166217449477409e-12, + -1.03939072690188596e-14, + 9.72321071890364614e-17, + -9.21391853088018332e-19, + 8.81525649538494053e-21, + -8.49631589123638307e-23, + 8.23708493472288403e-25, + -8.02397630382317184e-27, + 7.84742266969695462e-29, + -7.69981557981252045e-31, + 1.85501261768828800e-05, + -9.46545898201783509e-08, + 7.24475957358459986e-10, + -6.16116479625315043e-12, + 5.50162006488474643e-14, + -5.05303880191439422e-16, + 4.72697704245832203e-18, + -4.47938264721966999e-20, + 4.28557153738699799e-22, + -4.13051733706450780e-24, + 4.00449139169918759e-26, + -3.90088921569854474e-28, + 3.81506613184609400e-30, + -3.74336041065600251e-32, + 3.65836019588699132e-07, + -1.86672899393905194e-09, + 1.42877411183338780e-11, + -1.21507313944860057e-13, + 1.08500112971470695e-15, + -9.96534246987739612e-18, + 9.32230028747905880e-20, + -8.83400739391378631e-22, + 8.45178312895549025e-24, + -8.14599330582238852e-26, + 7.89745200277352316e-28, + -7.69313713368749299e-30, + 7.52390708201197779e-32, + -7.38264530574578558e-34, + 2.11486009315034266e-09, + -1.07913667397947493e-11, + 8.25959498094237827e-14, + -7.02421181973228533e-16, + 6.27227901953609369e-18, + -5.76086114424536766e-20, + 5.38912512681915802e-22, + -5.10684806922768718e-24, + 4.88588819236701417e-26, + -4.70911432898861172e-28, + 4.56543566729922278e-30, + -4.44732682029027777e-32, + 4.34951906824909971e-34, + -4.26798974654611360e-36, + 1.58165871792756701e-12, + -8.07063282229922528e-15, + 6.17717476937118549e-17, + -5.25325807472205443e-19, + 4.69090358490161676e-21, + -4.30842507317199456e-23, + 4.03041164123751243e-25, + -3.81930265652599676e-27, + 3.65405149047183258e-29, + -3.52184617066989301e-31, + 3.41439258706290832e-33, + -3.32606591330539985e-35, + 3.25294623263538687e-37, + -3.19214261786861597e-39, +# root=10 base[0]=0.0 */ + 2.94787305690703827e-01, + -5.25233239794754576e-03, + 1.05155942772750444e-04, + -2.19881062311142222e-06, + 4.61561607650595516e-08, + -9.57909712606783191e-10, + 1.95593419251106989e-11, + -3.92800785658025440e-13, + 7.76423087761664155e-15, + -1.51253761846845535e-16, + 2.90701617542313322e-18, + -5.51833133259039533e-20, + 1.03539341859294182e-21, + -1.92113454956562339e-23, + 2.74474082073013048e-01, + -1.14414702104499635e-02, + 4.76232161498638617e-04, + -1.76262812160611022e-05, + 5.97280122994071175e-07, + -1.89188285306281940e-08, + 5.67283667204721937e-10, + -1.62387664578221792e-11, + 4.46451820651013489e-13, + -1.18422826172611814e-14, + 3.04133706734887059e-16, + -7.58363150080410606e-18, + 1.84016904176771898e-19, + -4.35100573039903929e-21, + 2.39274390230779760e-01, + -2.09807929266950660e-02, + 1.39785428165851294e-03, + -7.64474491847967478e-05, + 3.65525071550768785e-06, + -1.57782957563922912e-07, + 6.27086289717726900e-09, + -2.32520050778684233e-10, + 8.12006127738113549e-12, + -2.68956115112003704e-13, + 8.49540458418724915e-15, + -2.56999851265812187e-16, + 7.47197832876289747e-18, + -2.09230397821794365e-19, + 1.97192271313549633e-01, + -2.99410804980929715e-02, + 2.91654114574838638e-03, + -2.20111311820960973e-04, + 1.39541488073498895e-05, + -7.75128003703128867e-07, + 3.87132712911681391e-08, + -1.76874371787762749e-09, + 7.48395901771478038e-11, + -2.95964665051903877e-12, + 1.10168997912643023e-13, + -3.88169242876474532e-15, + 1.30044768408114185e-16, + -4.15439010193536076e-18, + 1.55302521265543642e-01, + -3.53324800070512202e-02, + 4.70676357360555291e-03, + -4.64104863446781265e-04, + 3.72104521968219637e-05, + -2.54969608705282501e-06, + 1.53942527058948168e-07, + -8.35970404006921123e-09, + 4.14338047191223017e-10, + -1.89500422710869599e-11, + 8.06562563261187426e-13, + -3.21635047760206721e-14, + 1.20826251407857080e-15, + -4.29068112940170070e-17, + 1.17769618557127489e-01, + -3.60360523214897643e-02, + 6.17178683938950871e-03, + -7.57323316755047389e-04, + 7.36901603632672693e-05, + -6.00565113092041344e-06, + 4.24113496774217264e-07, + -2.65560475457585793e-08, + 1.49894604213055010e-09, + -7.72228635053307990e-11, + 3.66637081863253725e-12, + -1.61660561911461309e-13, + 6.66158921822035936e-15, + -2.57559357276681076e-16, + 8.58550863452313268e-02, + -3.24830596530552781e-02, + 6.75680330497724704e-03, + -9.85925607967322879e-04, + 1.12011785789687559e-04, + -1.04944210975450831e-05, + 8.40687313901195926e-07, + -5.90250693540212316e-08, + 3.69787888519324423e-09, + -2.09543203604240085e-10, + 1.08543225001997132e-11, + -5.18361300821793708e-13, + 2.29819762354117588e-14, + -9.50110432495054721e-16, + 5.89856147429765679e-02, + -2.58123531617336158e-02, + 6.19152433356844403e-03, + -1.02888234348888128e-03, + 1.31473984771675399e-04, + -1.36994512419361869e-05, + 1.20840335417646686e-06, + -9.25977269031315341e-08, + 6.28169709125628055e-09, + -3.82729369609557585e-10, + 2.11814939106316501e-11, + -1.07455903279457669e-12, + 5.03464563239918400e-14, + -2.18890156723436080e-15, + 3.58382276383145473e-02, + -1.71939779112217118e-02, + 4.53638112727000001e-03, + -8.23715552341416240e-04, + 1.14129100382109923e-04, + -1.27995209076764131e-05, + 1.20697429883438038e-06, + -9.82713769822508329e-08, + 7.04453886537431284e-09, + -4.51294925267316617e-10, + 2.61439810509878399e-11, + -1.38270720494108733e-12, + 6.72907825150527448e-14, + -3.02834374697527293e-15, + 1.50008143202449221e-02, + -7.55053565026467342e-03, + 2.09769217060997186e-03, + -3.99928007856536843e-04, + 5.79510908888721812e-05, + -6.77024835299514518e-06, + 6.62595818213401998e-07, + -5.58016194022342017e-08, + 4.12482415499416655e-09, + -2.71729070447298635e-10, + 1.61463401199957707e-11, + -8.73908700896743368e-13, + 4.34333800105311493e-14, + -1.99233579557847951e-15, +# root=10 base[1]=2.5 */ + 2.75309354196115963e-01, + -4.50538032191343581e-03, + 8.26424770723807719e-05, + -1.59136396879887243e-06, + 3.09276692589025234e-08, + -5.96723365087707698e-10, + 1.13569574898506182e-11, + -2.13025289544528227e-13, + 3.93794127908408123e-15, + -7.18417707502798647e-17, + 1.29410721085224009e-18, + -2.30520203007475805e-20, + 4.06057606176689003e-22, + -7.08411738401595668e-24, + 2.35185001357215678e-01, + -8.33982967799468990e-03, + 3.11603414345745138e-04, + -1.04869546615720093e-05, + 3.25154694325933782e-07, + -9.46955556909960650e-09, + 2.62121424469390014e-10, + -6.95022163133177878e-12, + 1.77518143420313191e-13, + -4.38590350699443038e-15, + 1.05163948844235989e-16, + -2.45356002731020282e-18, + 5.58169601906248130e-20, + -1.23974131859443034e-21, + 1.73049980429221928e-01, + -1.26690935951226710e-02, + 7.48753077776907641e-04, + -3.68120709384521671e-05, + 1.59808854511503899e-06, + -6.30990173660014511e-08, + 2.30736827787812855e-09, + -7.91025894680950385e-11, + 2.56474877891410239e-12, + -7.91623046029553085e-14, + 2.33777951985181483e-15, + -6.63187695129495837e-17, + 1.81309879775437960e-18, + -4.78672607203395015e-20, + 1.11499695098959073e-01, + -1.42962235902808297e-02, + 1.23020317905518065e-03, + -8.33695308584033319e-05, + 4.80107659744575299e-06, + -2.44348611717443343e-07, + 1.12582661010159708e-08, + -4.77228944967789866e-10, + 1.88263459945448749e-11, + -6.97120992725042573e-13, + 2.43905000463188948e-14, + -8.10540672005214242e-16, + 2.56926162624608978e-17, + -7.78900228731541188e-19, + 6.44529964714814635e-02, + -1.27137242427243780e-02, + 1.51054935268563886e-03, + -1.34904564701004688e-04, + 9.90566346357813811e-06, + -6.26930946031417729e-07, + 3.52051792831361721e-08, + -1.78844665367053262e-09, + 8.33383097154019059e-11, + -3.59918311699236600e-12, + 1.45219050728193809e-13, + -5.50881216808361397e-15, + 1.97488354363362582e-16, + -6.71252911336028353e-18, + 3.44407280523061979e-02, + -9.45411458115300897e-03, + 1.47395745607406471e-03, + -1.66573019149915587e-04, + 1.50641473473957747e-05, + -1.14948274225814858e-06, + 7.64690156405555997e-08, + -4.53401491613150596e-09, + 2.43429109941077414e-10, + -1.19759827942755285e-11, + 5.44878026992250235e-13, + -2.30953588800200718e-14, + 9.17451750623949167e-16, + -3.42857506556858505e-17, + 1.75354633026952207e-02, + -6.16711017174208318e-03, + 1.19874514097082201e-03, + -1.64645152587968919e-04, + 1.77203118700910616e-05, + -1.58138379232827406e-06, + 1.21229324728449781e-07, + -8.17806121081552564e-09, + 4.94003593065949301e-10, + -2.70741598354461599e-11, + 1.36011998141040847e-12, + -6.31483654217314506e-14, + 2.72788343426168875e-15, + -1.10105231545141287e-16, + 8.66836358706540855e-03, + -3.63810861343187228e-03, + 8.37325605274486006e-04, + -1.33998127157416595e-04, + 1.65507927319807218e-05, + -1.67254463618039748e-06, + 1.43501947502560188e-07, + -1.07235158370742170e-08, + 7.11033979703899762e-10, + -4.24280301551748461e-11, + 2.30377012456675412e-12, + -1.14848291995608168e-13, + 5.29533119324755318e-15, + -2.26857670278821534e-16, + 4.06196858043422326e-03, + -1.91268866740152907e-03, + 4.94855150400891060e-04, + -8.82325229774319546e-05, + 1.20233356149041674e-05, + -1.32819280130256661e-06, + 1.23538957830064715e-07, + -9.93360642492911443e-09, + 7.04016516696490154e-10, + -4.46339162495062660e-11, + 2.56111120458691851e-12, + -1.34269344435698061e-13, + 6.48178869887519025e-15, + -2.89546627199038528e-16, + 1.45356426356992377e-03, + -7.27523416727234636e-04, + 2.00865090013159655e-04, + -3.80663041784885201e-05, + 5.48506728634986053e-06, + -6.37466431432828993e-07, + 6.20862721677965634e-08, + -5.20519140876028929e-09, + 3.83154408267957794e-10, + -2.51423496944311350e-11, + 1.48852673390191525e-12, + -8.02901918866008990e-14, + 3.97764367308164471e-15, + -1.81910757159102480e-16, +# root=10 base[2]=5.0 */ + 2.58499959321647821e-01, + -3.91303357768707418e-03, + 6.61643151799319433e-05, + -1.17898678960039887e-06, + 2.13003409081114952e-08, + -3.83569329040845992e-10, + 6.82885937659330787e-12, + -1.20088996213262955e-13, + 2.08291077880535024e-15, + -3.57207140132986455e-17, + 6.04655223176875547e-19, + -1.01517817418278355e-20, + 1.68007176804139045e-22, + -2.77367155033608562e-24, + 2.06122657081819732e-01, + -6.27439445361266390e-03, + 2.11675543180808772e-04, + -6.51403935409163800e-06, + 1.85699068331474759e-07, + -4.99335263914102887e-09, + 1.28069270183126190e-10, + -3.15596097373831770e-12, + 7.51111267625065964e-14, + -1.73322953989023617e-15, + 3.88962659300479161e-17, + -8.50969232726407733e-19, + 1.81857905443028232e-20, + -3.80094118938427888e-22, + 1.32063907935007802e-01, + -8.09089226776521682e-03, + 4.26807102363876837e-04, + -1.89442394133648522e-05, + 7.49192665908943995e-07, + -2.71320233789297430e-08, + 9.14917353692662326e-10, + -2.90532294228761991e-11, + 8.75883471457841250e-13, + -2.52217668727527500e-14, + 6.96985430194436706e-16, + -1.85527594044713627e-17, + 4.77134910429689470e-19, + -1.18782661154506187e-20, + 6.91134626985920597e-02, + -7.44491552447895406e-03, + 5.66955092561256249e-04, + -3.45280782283388581e-05, + 1.80708455615473928e-06, + -8.42776602695195504e-08, + 3.58162989621094632e-09, + -1.40799740206228612e-10, + 5.17520275659489693e-12, + -1.79277630836824259e-13, + 5.88944562325584538e-15, + -1.84370930736013936e-16, + 5.52199610517347811e-18, + -1.58627614751740629e-19, + 3.03553155918875502e-02, + -5.13192949362410548e-03, + 5.41403433729584454e-04, + -4.36355268687917773e-05, + 2.92496815544961117e-06, + -1.70474601305555838e-07, + 8.87739666803961030e-09, + -4.20657926656978873e-10, + 1.83757912221288027e-11, + -7.47233650730767042e-13, + 2.84982722044473015e-14, + -1.02545626970380914e-15, + 3.49822445880057070e-17, + -1.13485744140381715e-18, + 1.16439344890289613e-02, + -2.82393785075662563e-03, + 3.97017427059832915e-04, + -4.10135370712869814e-05, + 3.42527522439314057e-06, + -2.43317741934305024e-07, + 1.51684490018481148e-08, + -8.47498379172305129e-10, + 4.30834008114261883e-11, + -2.01535847845291394e-12, + 8.75104017216410274e-14, + -3.55182252652168679e-15, + 1.35513484704065902e-16, + -4.87761012268155245e-18, + 4.11070612223873519e-03, + -1.32398655162833468e-03, + 2.37808508911330690e-04, + -3.04636481424251262e-05, + 3.08172603605828314e-06, + -2.60154661911814481e-07, + 1.89677188375464472e-08, + -1.22256865377523539e-09, + 7.08442482818686770e-11, + -3.73769164240631006e-12, + 1.81320627122140758e-13, + -8.15183835632514575e-15, + 3.41839118313352581e-16, + -1.34248170784829554e-17, + 1.41386639561831757e-03, + -5.62996106446662968e-04, + 1.23178982574654472e-04, + -1.88338146088985288e-05, + 2.23322892973368117e-06, + -2.17564475270743233e-07, + 1.80609858202869362e-08, + -1.30997949357192849e-09, + 8.45392745453890199e-11, + -4.92169350574092042e-12, + 2.61291604528628268e-13, + -1.27603737234650002e-14, + 5.77330139597460087e-16, + -2.43086114846368044e-17, + 4.87502675175349991e-04, + -2.24086125630249011e-04, + 5.65599968884055224e-05, + -9.85749438976275988e-06, + 1.31586308559174780e-06, + -1.42681984803435316e-07, + 1.30501215252190760e-08, + -1.03349723005690906e-09, + 7.22411637507001846e-11, + -4.52275811784102658e-12, + 2.56554172249665145e-13, + -1.33095315077423555e-14, + 6.36346000775296744e-16, + -2.81759151140725887e-17, + 1.43573748634347631e-04, + -7.13545625672867763e-05, + 1.95495529032011271e-05, + -3.67780238223855214e-06, + 5.26346623772467026e-07, + -6.07879184230203986e-08, + 5.88623649078786638e-09, + -4.90855549721821979e-10, + 3.59533489401536995e-11, + -2.34842139868694428e-12, + 1.38443280238425147e-13, + -7.43788303623921955e-15, + 3.67112024812553577e-16, + -1.67311221006453028e-17, +# root=10 base[3]=7.5 */ + 2.43824328271191992e-01, + -3.43504707453083907e-03, + 5.38341680234207180e-05, + -8.91669070626988615e-07, + 1.50299469808820223e-08, + -2.53535410544196914e-10, + 4.23502849492747233e-12, + -7.00931720545078062e-14, + 1.14301307943203854e-15, + -1.85269533756707917e-17, + 2.94228681082621590e-19, + -4.70424010362766793e-21, + 7.30485372625210921e-23, + -1.11564308187866452e-24, + 1.83979328562894923e-01, + -4.84979033921521460e-03, + 1.48507780636664448e-04, + -4.20059232647388399e-06, + 1.10603926150392485e-07, + -2.75697583190320317e-09, + 6.57534184606368640e-11, + -1.51078257873053309e-12, + 3.36037265060250653e-14, + -7.26188099935387874e-16, + 1.52905199869500804e-17, + -3.14400902104857313e-19, + 6.32498623015512543e-21, + -1.24626941101717555e-22, + 1.05331134994241293e-01, + -5.41664207908034920e-03, + 2.56717485941872572e-04, + -1.03339596840928691e-05, + 3.73639850066171896e-07, + -1.24485080344611167e-08, + 3.88091997873318094e-10, + -1.14399857756288063e-11, + 3.21269802021034718e-13, + -8.64401614278971616e-15, + 2.23807063086672718e-16, + -5.59559608720899536e-18, + 1.35477604318002085e-19, + -3.18215329149289236e-21, + 4.63374503104294830e-02, + -4.17836520057185412e-03, + 2.82612334648308858e-04, + -1.54954807620690607e-05, + 7.38062495703786418e-07, + -3.15730226745018795e-08, + 1.23840097241585415e-09, + -4.51629263658831732e-11, + 1.54671131108279094e-12, + -5.01157934783319745e-14, + 1.54516781602645774e-15, + -4.55397443702569732e-17, + 1.28772287195350729e-18, + -3.50188762151491281e-20, + 1.60305191290073396e-02, + -2.29946428667189172e-03, + 2.14928417350295815e-04, + -1.56004442469594126e-05, + 9.52847653437855228e-07, + -5.10434702826052770e-08, + 2.46010837322262916e-09, + -1.08514381195623185e-10, + 4.43439893868339371e-12, + -1.69413337773173383e-13, + 6.09363498947174271e-15, + -2.07510733569604703e-16, + 6.72048464526557452e-18, + -2.07591644794676097e-19, + 4.53491024146404978e-03, + -9.57174503834519659e-04, + 1.20377465288284236e-04, + -1.12955483541765017e-05, + 8.66449235162801702e-07, + -5.70176021605042139e-08, + 3.31574284675913205e-09, + -1.73824706255907183e-10, + 8.33270608997479566e-12, + -3.69172153440107560e-13, + 1.52411691943702603e-14, + -5.90199292303476836e-16, + 2.15516858359950503e-17, + -7.44615933971962977e-19, + 1.11565545738825868e-03, + -3.23683475991622159e-04, + 5.31090543694544978e-05, + -6.28692111089764616e-06, + 5.93087871781457700e-07, + -4.70347263626728820e-08, + 3.24125629863494860e-09, + -1.98485636981533955e-10, + 1.09762872307469442e-11, + -5.54808652762302875e-13, + 2.58745494886622095e-14, + -1.12176398604465081e-15, + 4.54869028779873163e-17, + -1.73182598818629326e-18, + 2.60220177094294171e-04, + -9.70006544991785136e-05, + 1.99559565612977358e-05, + -2.88873317073973528e-06, + 3.26275176699654566e-07, + -3.04353363268407872e-08, + 2.42994156780988108e-09, + -1.70152362399808348e-10, + 1.06362096752868816e-11, + -6.01525513617658632e-13, + 3.11016380857720919e-14, + -1.48259160092422431e-15, + 6.56082489997652719e-17, + -2.70693201971436433e-18, + 6.28076003780153797e-05, + -2.79784225575667693e-05, + 6.84335106930514939e-06, + -1.15906868229693687e-06, + 1.50805606591264077e-07, + -1.59807861600260939e-08, + 1.43180040250105553e-09, + -1.11302200358634917e-10, + 7.65035366926393433e-12, + -4.71718604935907312e-13, + 2.63900942021171548e-14, + -1.35187605263587450e-15, + 6.38925585394457858e-17, + -2.79930330932753022e-18, + 1.45229086813472919e-05, + -7.15300466229107623e-06, + 1.94091094176282740e-06, + -3.61827764217601381e-07, + 5.13507408273256314e-08, + -5.88521291059903688e-09, + 5.65893734409621643e-10, + -4.68874046837330766e-11, + 3.41407186242833667e-12, + -2.21789501765012759e-13, + 1.30091103228423231e-14, + -6.95658275728077163e-16, + 3.41868995122418707e-17, + -1.55179767685060578e-18, +# root=10 base[4]=10.0 */ + 2.30883024713537971e-01, + -3.04343823087631967e-03, + 4.44259094635350286e-05, + -6.86833202285986472e-07, + 1.08356862208774442e-08, + -1.71856962072811752e-10, + 2.69834256151931989e-12, + -4.22672834582184927e-14, + 6.46104486189142801e-16, + -1.00364618268523535e-17, + 1.48214631283302094e-19, + -2.21252237428400654e-21, + 3.74617740271187235e-23, + -3.35508171348597497e-25, + 1.66674617704616362e-01, + -3.83696928615626749e-03, + 1.07142151643855335e-04, + -2.79877235536798413e-06, + 6.83577221781490744e-08, + -1.58552462171531267e-09, + 3.52834551718652327e-11, + -7.58227324646046934e-13, + 1.58068099459195564e-14, + -3.20740074430376554e-16, + 6.35236340554848155e-18, + -1.23026511200437901e-19, + 2.33475130959810295e-21, + -4.34694679685759296e-23, + 8.71087667989129677e-02, + -3.77340301381966052e-03, + 1.61748448039920211e-04, + -5.93257762705921693e-06, + 1.96841514186451798e-07, + -6.05229740313827266e-09, + 1.74923486716990369e-10, + -4.79775184911846385e-12, + 1.25769951968917125e-13, + -3.16736447361163502e-15, + 7.69552027641580349e-17, + -1.80952182460013956e-18, + 4.12869767380783976e-20, + -9.15910738586427284e-22, + 3.31992998563186217e-02, + -2.49978495410819969e-03, + 1.50941433575063253e-04, + -7.47043459538044136e-06, + 3.24509835660005183e-07, + -1.27540117337108112e-08, + 4.62283766130553808e-10, + -1.56537611256115268e-11, + 4.99820018190384644e-13, + -1.51529101773280495e-14, + 4.38533508662257820e-16, + -1.21668184734283591e-17, + 3.24724151893758604e-19, + -8.35600715197211247e-21, + 9.37063625392685860e-03, + -1.13059325958031693e-03, + 9.36413010133708659e-05, + -6.11700431357613055e-06, + 3.40204866030554237e-07, + -1.67366408544340637e-08, + 7.45807866594123486e-10, + -3.05866912643458474e-11, + 1.16768976355650484e-12, + -4.18504464132830621e-14, + 1.41742732816123300e-15, + -4.56026052612492201e-17, + 1.39958152631565449e-18, + -4.10871916173310472e-20, + 2.01971285282911408e-03, + -3.65699367953183205e-04, + 4.08921297649158410e-05, + -3.46825723868409091e-06, + 2.43319170347086141e-07, + -1.47752819035833618e-08, + 7.98557317033121037e-10, + -3.91401422688558952e-11, + 1.76318170949294214e-12, + -7.37349049088283024e-14, + 2.88475568076307339e-15, + -1.06236279205557478e-16, + 3.70109835482864034e-18, + -1.22366216756620133e-19, + 3.52191495333991993e-04, + -9.04261652227151527e-05, + 1.34033010970817583e-05, + -1.45333957494769361e-06, + 1.26901584887660625e-07, + -9.39196565716719125e-09, + 6.08085813725180555e-10, + -3.51847129151786720e-11, + 1.84742174483703994e-12, + -8.90393215687078829e-14, + 3.97435119953147043e-15, + -1.65462774903352187e-16, + 6.46240572415889070e-18, + -2.37647023960105413e-19, + 5.49315767556941882e-05, + -1.88596991628832590e-05, + 3.60331311598822075e-06, + -4.88827119489081584e-07, + 5.21394355684733885e-08, + -4.62214285928118733e-09, + 3.52574258012085386e-10, + -2.36943991884299671e-11, + 1.42705329463032934e-12, + -7.80239037920293771e-14, + 3.91177107518476371e-15, + -1.81290858611548380e-16, + 7.81806749145631563e-18, + -3.15025280724843771e-19, + 8.83359436407634128e-06, + -3.77631583511423860e-06, + 8.87378377827939539e-07, + -1.44989757157717901e-07, + 1.82716055986208482e-08, + -1.88200101490557773e-09, + 1.64394893480239571e-10, + -1.24920540679700402e-11, + 8.41247143952552058e-13, + -5.09210502471627365e-14, + 2.80143677702521323e-15, + -1.41340035843576780e-16, + 6.58799267880696114e-18, + -2.85011555466910805e-19, + 1.51387804749168093e-06, + -7.36929099331186583e-07, + 1.97502364298358714e-07, + -3.63977466880070356e-08, + 5.11181330354223778e-09, + -5.80324974787606335e-10, + 5.53230611857499777e-11, + -4.54806665767938498e-12, + 3.28805778085435408e-13, + -2.12209863073645964e-14, + 1.23726061359517461e-15, + -6.57966164354492398e-17, + 3.21694592852282184e-18, + -1.45333120466531852e-19, +# root=10 base[5]=12.5 */ + 2.19371730068243787e-01, + -2.71829184517602363e-03, + 3.71211022614581845e-05, + -5.37804957106533815e-07, + 7.96108010566354850e-09, + -1.19259338893795538e-10, + 1.75719779266674515e-12, + -2.63894728591625314e-14, + 3.72514760949955022e-16, + -5.57085525649446692e-18, + 8.62548791059091170e-20, + -6.66845319777951655e-22, + 2.88956817662432124e-23, + -1.19423553266579663e-25, + 1.52851717580809177e-01, + -3.09772300920548114e-03, + 7.92043012430621886e-05, + -1.91903439255559262e-06, + 4.36513581640640547e-08, + -9.45474417387914882e-10, + 1.96954615282007368e-11, + -3.97014881891827161e-13, + 7.77929294587141333e-15, + -1.48570530501653136e-16, + 2.77459645516611430e-18, + -5.07527363136234846e-20, + 9.08708207685504701e-22, + -1.60619570987166491e-23, + 7.42173373630101302e-02, + -2.71855345819283596e-03, + 1.06090984964007405e-04, + -3.56204081698649162e-06, + 1.08865770831339852e-07, + -3.09881240642296265e-09, + 8.32691237345469481e-11, + -2.13011476503273780e-12, + 5.22438464050381724e-14, + -1.23381353140682494e-15, + 2.81733001426975123e-17, + -6.24311700795366360e-19, + 1.34304250441931282e-20, + -2.81836765966594607e-22, + 2.51506886513258553e-02, + -1.57866437881528602e-03, + 8.56432658642453527e-05, + -3.83805175866713190e-06, + 1.52446614171542824e-07, + -5.51616627097817346e-09, + 1.85082557954889950e-10, + -5.82697358617621195e-12, + 1.73650362638784417e-13, + -4.92968264007527664e-15, + 1.33987910287996467e-16, + -3.50089068867562405e-18, + 8.81983128622197280e-20, + -2.14759047590610191e-21, + 5.98523299383839791e-03, + -6.02853657134604201e-04, + 4.43558820184894865e-05, + -2.60891005747764450e-06, + 1.32174777590800785e-07, + -5.97201971391939513e-09, + 2.46007083089070720e-10, + -9.37651202085406046e-12, + 3.34204211332463583e-13, + -1.12276889789193830e-14, + 3.57714495515483503e-16, + -1.08608509206910521e-17, + 3.15481727325888703e-19, + -8.78992992702820443e-21, + 1.01814314929234845e-03, + -1.56022291781096508e-04, + 1.54555236566884226e-05, + -1.18085446201229487e-06, + 7.55483870913928931e-08, + -4.22149505816302694e-09, + 2.11468523617512637e-10, + -9.66413851017618430e-12, + 4.07993366883913140e-13, + -1.60610926085217981e-14, + 5.93838754485443415e-16, + -2.07408777896927721e-17, + 6.87501626202599361e-19, + -2.16921507262333657e-20, + 1.29314093563108679e-04, + -2.88468632032206990e-05, + 3.82438598272288115e-06, + -3.76866247518658606e-07, + 3.02558385052804096e-08, + -2.07732490325691068e-09, + 1.25678730577268001e-10, + -6.83637844070457797e-12, + 3.39203468545578085e-13, + -1.55186856513772704e-14, + 6.60154496490326936e-16, + -2.62861726419772875e-17, + 9.85045841139422054e-19, + -3.48594576957762271e-20, + 1.34943311793650274e-05, + -4.18624884374585834e-06, + 7.32816091707688114e-07, + -9.21647719907735334e-08, + 9.19912660361865297e-09, + -7.68886727201045729e-10, + 5.56428590142818392e-11, + -3.56634008388897694e-12, + 2.05773164866028442e-13, + -1.08204152759639455e-14, + 5.23534865812409252e-16, + -2.34866262654603620e-17, + 9.83081537554005706e-19, + -3.85442176628937760e-20, + 1.38375407078613110e-06, + -5.60274748891022907e-07, + 1.25098810955310439e-07, + -1.95383890543254185e-08, + 2.36643024196266416e-09, + -2.35349814981776924e-10, + 1.99280541487289324e-11, + -1.47281059226497371e-12, + 9.67435106093133348e-14, + -5.72613049641318567e-15, + 3.08710574839004175e-16, + -1.52921074614312937e-17, + 7.00992160153398827e-19, + -2.98703738012488651e-20, + 1.64028147794742687e-07, + -7.86035614093666056e-08, + 2.07291301339423704e-08, + -3.76414633234855649e-09, + 5.21675869829399177e-10, + -5.85229742692945094e-11, + 5.51968402552214894e-12, + -4.49410510013995500e-13, + 3.22077400191597707e-14, + -2.06222470909143946e-15, + 1.19366727832354843e-16, + -6.30583781169814920e-18, + 3.06432227494853700e-19, + -1.37664352667289906e-20, +# root=10 base[6]=15.0 */ + 2.09054462546346798e-01, + -2.44513979485160970e-03, + 3.13597848783324075e-05, + -4.27446924992390834e-07, + 5.94402806265092758e-09, + -8.47689309367125973e-11, + 1.15955941970990657e-12, + -1.70462024459198547e-14, + 2.30460718447942320e-16, + -2.33677723388598537e-18, + 8.31818822325691420e-20, + 3.63699673238449805e-22, + 7.47234358043487591e-24, + -8.71446464431412439e-25, + 1.41597304664497103e-01, + -2.54561624994125704e-03, + 5.98163661569719009e-05, + -1.34953572333409589e-06, + 2.86952362846798085e-08, + -5.82322203612922349e-10, + 1.13908325668893282e-11, + -2.15940068128674118e-13, + 3.98842955077290786e-15, + -7.18892176873744710e-17, + 1.26570557901143692e-18, + -2.20434372419323746e-20, + 3.71415695863483563e-22, + -6.17223038826942293e-24, + 6.48062390484696466e-02, + -2.01528527909354679e-03, + 7.20558842743932251e-05, + -2.22475401719758761e-06, + 6.28697559119776412e-08, + -1.66157167857786034e-09, + 4.16410672710964580e-11, + -9.95685797390185361e-13, + 2.28984101333421414e-14, + -5.08701042451997195e-16, + 1.09076864617490197e-17, + -2.28902396793679419e-19, + 4.64736615509246368e-21, + -9.18183380210282682e-23, + 1.99638031511666057e-02, + -1.04333166213254410e-03, + 5.12343145783769900e-05, + -2.08610879431220168e-06, + 7.59909610389170209e-08, + -2.53741422692954098e-09, + 7.89799341801327913e-11, + -2.31556273935431502e-12, + 6.44954568801815141e-14, + -1.71679806189194480e-15, + 4.38457132206362530e-17, + -1.08008887851164954e-18, + 2.56975840415408181e-20, + -5.91985401970847568e-22, + 4.12619612011383419e-03, + -3.44644994382690354e-04, + 2.26349992552386910e-05, + -1.20033506389370319e-06, + 5.54680538650151038e-08, + -2.30365648284659765e-09, + 8.77716356732460662e-11, + -3.10981143867766333e-12, + 1.03485005719354553e-13, + -3.25820968924510922e-15, + 9.76046335688114220e-17, + -2.79509831833163538e-18, + 7.67867648180240452e-20, + -2.02861746917751454e-21, + 5.73953242995295636e-04, + -7.35036895268350882e-05, + 6.44524351614249257e-06, + -4.42748074982650458e-07, + 2.57905678222239677e-08, + -1.32388981320462926e-09, + 6.13587712522489120e-11, + -2.60966694032004852e-12, + 1.03048208871950735e-13, + -3.81086785124352161e-15, + 1.32878682126764655e-16, + -4.39202670435567434e-18, + 1.38208112269457776e-19, + -4.15215898973658579e-21, + 5.49625126575140624e-05, + -1.04565409280585808e-05, + 1.23017207817418812e-06, + -1.09456939590145896e-07, + 8.03527844960573998e-09, + -5.09254133978549185e-10, + 2.86564709458928587e-11, + -1.45898590540436927e-12, + 6.81211047261932342e-14, + -2.94646916368773707e-15, + 1.18989779128468101e-16, + -4.51449923023069901e-18, + 1.61733724917350312e-19, + -5.48873804118030812e-21, + 3.89976885969476197e-06, + -1.06951195147267438e-06, + 1.69184423503777518e-07, + -1.95124634690068694e-08, + 1.80588465320756943e-09, + -1.41181733416781242e-10, + 9.62446388100916239e-12, + -5.84542742812653026e-13, + 3.21223060707247070e-14, + -1.61581219488005618e-15, + 7.50742912606088446e-17, + -3.24520807360313894e-18, + 1.31282017796299649e-19, + -4.98862464206755541e-21, + 2.47006389511055016e-07, + -9.30860764438401573e-08, + 1.94807894099758113e-08, + -2.87619695837702217e-09, + 3.31703988377551705e-10, + -3.16012367689807619e-11, + 2.57608088085569291e-12, + -1.84066886835870285e-13, + 1.17312419452650452e-14, + -6.75800027484249161e-16, + 3.55554988951403134e-17, + -1.72280864685771445e-18, + 7.74087399348016134e-20, + -3.23916455491281300e-21, + 1.86951803876023172e-08, + -8.76828659893515207e-09, + 2.26317646065594387e-09, + -4.03097648234789293e-10, + 5.49172857522034812e-11, + -6.06802399658749356e-12, + 5.64646817159658337e-13, + -4.54225565128244432e-14, + 3.22024800911483829e-15, + -2.04186344884731756e-16, + 1.17147978424065773e-17, + -6.13907049255474127e-19, + 2.96146567969412846e-20, + -1.32154510621793707e-21, +# root=10 base[7]=17.5 */ + 1.99745298050238246e-01, + -2.21328196510820006e-03, + 2.67495899375294412e-05, + -3.44541490225379895e-07, + 4.49234607184778311e-09, + -6.18876748351140570e-11, + 7.77622579355297922e-13, + -1.03456224278794620e-14, + 2.09577789034355365e-16, + 1.20982682085509010e-18, + 8.56342972046807733e-20, + -8.45914547083023364e-22, + -6.62906919275707282e-23, + -1.79440409947200583e-24, + 1.32279299064696987e-01, + -2.12485580696077309e-03, + 4.60354094143783376e-05, + -9.70553660129530721e-07, + 1.93583643325464162e-08, + -3.69159685091108814e-10, + 6.80230444794647642e-12, + -1.21571197865372271e-13, + 2.11854660117846580e-15, + -3.63647793044808301e-17, + 5.97539679214160750e-19, + -9.94168530567208480e-21, + 1.65523274375817529e-22, + -2.33350547046876889e-24, + 5.77501163985913377e-02, + -1.53074031181744757e-03, + 5.04508536612667633e-05, + -1.43856927364775268e-06, + 3.77396625902832292e-08, + -9.28270798277098990e-10, + 2.17702273789273202e-11, + -4.88108423685958294e-13, + 1.05041905793553167e-14, + -2.22012637393781039e-16, + 4.43566528710815010e-18, + -8.79710157871741855e-20, + 1.73890840063745888e-21, + -3.10173817084721109e-23, + 1.64765039277528953e-02, + -7.16203201198161322e-04, + 3.21035406060221883e-05, + -1.19172664729178099e-06, + 3.99467936875154646e-08, + -1.23367202785187304e-09, + 3.57119930084348888e-11, + -9.77094638233444127e-13, + 2.54496506617473028e-14, + -6.37351354997217338e-16, + 1.52868437507746206e-17, + -3.55217524732529479e-19, + 8.01568055046813027e-21, + -1.74041203218332912e-22, + 3.03601906321067849e-03, + -2.08975493866981270e-04, + 1.23389875757364573e-05, + -5.91013966284912856e-07, + 2.49629771957860401e-08, + -9.54220923915665194e-10, + 3.36673160069018853e-11, + -1.10978490936521121e-12, + 3.44894231359577313e-14, + -1.01829120275453742e-15, + 2.86776245589335520e-17, + -7.74459859992072216e-19, + 2.01225000324021481e-20, + -5.03682958382312924e-22, + 3.57195341964848187e-04, + -3.77719228362341481e-05, + 2.93889400056085586e-06, + -1.81375069068482515e-07, + 9.61665916298146885e-09, + -4.53177019006201887e-10, + 1.94168679728759956e-11, + -7.67776716246315945e-13, + 2.83216901474939527e-14, + -9.82641495500241012e-16, + 3.22635791666335612e-17, + -1.00758033513774555e-18, + 3.00500450387618105e-20, + -8.58055859426135609e-22, + 2.68043804661823828e-05, + -4.26929718241337080e-06, + 4.43522079754360887e-07, + -3.54580843738488961e-08, + 2.37053442989005257e-09, + -1.38150502466492825e-10, + 7.20411661060727774e-12, + -3.42078751068013993e-13, + 1.49773758846827970e-14, + -6.10371549373551171e-16, + 2.33214260055648708e-17, + -8.40300584306805736e-19, + 2.86863586166826089e-20, + -9.30613456691783133e-22, + 1.33316529472600369e-06, + -3.15523793451739986e-07, + 4.45236309448747057e-08, + -4.66085474937129678e-09, + 3.96559469973515890e-10, + -2.87795500304038329e-11, + 1.83557729125418081e-12, + -1.04985821094572120e-13, + 5.46316575483513276e-15, + -2.61477042831864219e-16, + 1.16081856156591557e-17, + -4.81242114852279585e-19, + 1.87335229381868778e-20, + -6.87100173839738206e-22, + 5.14805839357592835e-08, + -1.76521850647585516e-08, + 3.40644903092052792e-09, + -4.69308376460113683e-10, + 5.09861973119558055e-11, + -4.61074674323790074e-12, + 3.59002764776357793e-13, + -2.46287303010011305e-14, + 1.51373182489816724e-15, + -8.44108611100835674e-17, + 4.31298022062691836e-18, + -2.03531675673723225e-19, + 8.92877027029990178e-21, + -3.65611105605005504e-22, + 2.27947756974276441e-09, + -1.03716478555943619e-09, + 2.59990564593748164e-10, + -4.51313992151540103e-11, + 6.01230348556002411e-12, + -6.51428567460181132e-13, + 5.95816335137457652e-14, + -4.72049481712321068e-15, + 3.30153867340131761e-16, + -2.06817219301014063e-17, + 1.17370912592671448e-18, + -6.09050595967283009e-20, + 2.91193084996252449e-21, + -1.28895412271779964e-22, +# root=10 base[8]=20.0 */ + 1.91295587284857210e-01, + -2.01468923141083717e-03, + 2.30085613531262419e-05, + -2.81636092074817134e-07, + 3.42192222296223146e-09, + -4.58821810766460447e-11, + 5.92342413002201078e-13, + -2.42329176854312858e-15, + 2.94928519610771308e-16, + 2.63843616837275667e-18, + -5.19148150436362226e-20, + -5.95198120922371897e-21, + -1.31079222191024023e-22, + 4.36065169519397409e-26, + 1.24449440321880975e-01, + -1.79840236129939421e-03, + 3.60293946520781107e-05, + -7.12048733298979320e-07, + 1.33669978146407387e-08, + -2.40155179722629187e-10, + 4.17916707781233187e-12, + -7.08419162557104614e-14, + 1.15278651294355813e-15, + -1.92343802169365737e-17, + 3.00531905811187199e-19, + -4.18615234636103385e-21, + 8.50457461059766384e-23, + -1.07243926204691245e-24, + 5.23378764806917210e-02, + -1.18716674370879130e-03, + 3.62790923972119208e-05, + -9.58916935436453167e-07, + 2.34609608896233831e-08, + -5.38130704966565069e-10, + 1.18141663147021873e-11, + -2.51913690553116969e-13, + 4.96054375619737810e-15, + -1.02145909356960023e-16, + 1.95487225177944984e-18, + -3.26708820741006573e-20, + 7.28548356024893198e-22, + -1.17425977808330613e-23, + 1.40479756762849298e-02, + -5.07325145290143183e-04, + 2.09523874085481586e-05, + -7.11278674428960045e-07, + 2.20270649252945827e-08, + -6.30492151406780406e-10, + 1.69981863466856402e-11, + -4.36717323803103027e-13, + 1.05793861653380127e-14, + -2.51064514747061520e-16, + 5.68779907060256375e-18, + -1.22568803024473701e-19, + 2.68234380771636943e-21, + -5.47562943519205883e-23, + 2.36060201563962528e-03, + -1.33052160892937549e-04, + 7.13141295286050119e-06, + -3.09068257651823277e-07, + 1.19668191850860601e-08, + -4.21720215897761550e-10, + 1.37957240351962867e-11, + -4.24073849873969593e-13, + 1.22996356203968187e-14, + -3.41144855159334541e-16, + 9.04172313249170482e-18, + -2.29814173544748918e-19, + 5.66158985380012423e-21, + -1.34184669975800721e-22, + 2.42300518844380553e-04, + -2.09054040843771115e-05, + 1.45221192500375659e-06, + -8.05095286949828365e-08, + 3.88908496161705181e-09, + -1.68272910272063029e-10, + 6.66443974034331186e-12, + -2.44991304364403318e-13, + 8.43563444143455003e-15, + -2.74442377840022661e-16, + 8.47814831228910680e-18, + -2.49853250673030005e-19, + 7.05557596109735143e-21, + -1.91225962510764580e-22, + 1.48231702286889196e-05, + -1.94023206418198876e-06, + 1.77832352837523421e-07, + -1.27301989852675487e-08, + 7.73166846235939808e-10, + -4.13256529564486296e-11, + 1.99183791249377002e-12, + -8.79812107810025041e-14, + 3.60247317630330842e-15, + -1.37951488540712176e-16, + 4.97337126567541945e-18, + -1.69708798370721410e-19, + 5.50549043924723250e-21, + -1.70256899522037109e-22, + 5.38722568522776500e-07, + -1.07213100861131930e-07, + 1.33546134624037498e-08, + -1.25756713009508758e-09, + 9.76368243389432533e-11, + -6.53395054743582245e-12, + 3.87521899192174510e-13, + -2.07538812038208337e-14, + 1.01721032657999211e-15, + -4.60904057217296819e-17, + 1.94577635419497408e-18, + -7.70136498519055971e-20, + 2.87239474440178283e-21, + -1.01272766132123386e-22, + 1.28208751745620763e-08, + -3.88683065415872343e-09, + 6.79120179066875649e-10, + -8.60670032007367676e-11, + 8.70527340721799910e-12, + -7.39791407226220570e-13, + 5.45404464188116020e-14, + -3.56495269152709507e-15, + 2.09861490400950314e-16, + -1.12590947595975602e-17, + 5.55632772629974355e-19, + -2.54106113379130416e-20, + 1.08351623086970468e-21, + -4.32401439447762341e-23, + 3.04485127315990062e-10, + -1.32570318858864089e-10, + 3.19135827054890217e-11, + -5.35067900750162808e-12, + 6.91915143370547926e-13, + -7.30708551190985485e-14, + 6.53607352361022734e-15, + -5.07838619209761484e-16, + 3.49135021647909574e-17, + -2.15400911246069252e-18, + 1.20592817488481608e-19, + -6.18196131319090856e-21, + 2.92342623036841686e-22, + -1.28130895221164223e-23, +# root=10 base[9]=22.5 */ + 1.83584791346363185e-01, + -1.84327326619601866e-03, + 1.99296377049372082e-05, + -2.33457084278243664e-07, + 2.64672998451289345e-09, + -3.13549480087520106e-11, + 6.64552443397265557e-13, + 7.51660898712828663e-15, + 2.73881677386316682e-16, + -6.30945958851871845e-18, + -4.24457586424466788e-19, + -9.59366845609601636e-21, + 5.10558466538866637e-23, + 8.43808200558086140e-24, + 1.17782877992990365e-01, + -1.54104241967806602e-03, + 2.86255134636857282e-05, + -5.31758824512708898e-07, + 9.42532999347519040e-09, + -1.60054148771422354e-10, + 2.62271932793463120e-12, + -4.30079112895468784e-14, + 6.41860903184599798e-16, + -9.88860912798698279e-18, + 1.86950037507017998e-19, + -1.42457413720581464e-21, + 2.77403252183680700e-23, + -1.32418450028346495e-24, + 4.81048408557168752e-02, + -9.37309237212916187e-04, + 2.67132170775089121e-05, + -6.56351006232626926e-07, + 1.50424612517358705e-08, + -3.24214047872987937e-10, + 6.52408036710668193e-12, + -1.39197376862316978e-13, + 2.42368162916087216e-15, + -4.43351468874083336e-17, + 1.09986717963546002e-18, + -1.00260829616645911e-20, + 2.36455722036438781e-22, + -9.17551888148889484e-24, + 1.23072101790462178e-02, + -3.68688575380284587e-04, + 1.41774082110652192e-05, + -4.41121404492907351e-07, + 1.26735635705207733e-08, + -3.38023798640536582e-10, + 8.41245614271754640e-12, + -2.07517236591134448e-13, + 4.61885049454096619e-15, + -1.01793522456042432e-16, + 2.34397456204716130e-18, + -4.32047704839366958e-20, + 9.12748853790282935e-22, + -2.05745321009468032e-23, + 1.92288306514722140e-03, + -8.81225290902376942e-05, + 4.34196737426504732e-06, + -1.70445973642308152e-07, + 6.07102405701979014e-09, + -1.97902519106226453e-10, + 5.98851790310690493e-12, + -1.73025972665608812e-13, + 4.67032022452944101e-15, + -1.21336209618018224e-16, + 3.06752036281338546e-18, + -7.24681249856297305e-20, + 1.69538621053784490e-21, + -3.86934696568713687e-23, + 1.77011010547046963e-04, + -1.23033449317676990e-05, + 7.71272945469769382e-07, + -3.83984643018724043e-08, + 1.69343744514535072e-09, + -6.73693112570276786e-11, + 2.46477377351312989e-12, + -8.44025507656042953e-14, + 2.71049337017928341e-15, + -8.26313465501783652e-17, + 2.40512153292405581e-18, + -6.67411049790286062e-20, + 1.78400398363646822e-21, + -4.59125289533741109e-23, + 9.17126466682775121e-06, + -9.67637637319043753e-07, + 7.86025702333392014e-08, + -5.02517244667670499e-09, + 2.77046159288293797e-10, + -1.35640672333063789e-11, + 6.03164324968147285e-13, + -2.47492707524333131e-14, + 9.45829147498622830e-16, + -3.39652126264034470e-17, + 1.15318414775296140e-18, + -3.71814710612470069e-20, + 1.14374014403788697e-21, + -3.36419349858285518e-23, + 2.55562351288203223e-07, + -4.15978926845309187e-08, + 4.54665308005353418e-09, + -3.82300394316602729e-10, + 2.69301895335387008e-11, + -1.65291752986981217e-12, + 9.06938727627153915e-14, + -4.52620276838496306e-15, + 2.07974439338980581e-16, + -8.88106115420943737e-18, + 3.54988365606703320e-19, + -1.33578570890480470e-20, + 4.75416722354082486e-22, + -1.60499384067587046e-23, + 3.88601902869684209e-09, + -1.00571693746208036e-09, + 1.56195320596449438e-10, + -1.79437850609903100e-11, + 1.66952512598748065e-12, + -1.31957838740006987e-13, + 9.12804356622002315e-15, + -5.63878341016639272e-16, + 3.15625828326110831e-17, + -1.61846622670570034e-18, + 7.66823802828230010e-20, + -3.38010533691837620e-21, + 1.39396995711938317e-22, + -5.39710527643442640e-24, + 4.60649355187700493e-11, + -1.87789959730188943e-11, + 4.27123657152602957e-12, + -6.82998353442777382e-13, + 8.48756945992648818e-14, + -8.66547149515662646e-15, + 7.52939335368776287e-16, + -5.70491008724600570e-17, + 3.83690505944342699e-18, + -2.32193726097957173e-19, + 1.27792582409016230e-20, + -6.45222691527451875e-22, + 3.01004157944382205e-23, + -1.30330117739184508e-24, +# root=10 base[10]=25.0 */ + 1.76513790851380914e-01, + -1.69436380914027448e-03, + 1.73645815163243704e-05, + -1.95174232537352930e-07, + 2.19991170891774798e-09, + -1.22353140462901246e-11, + 9.35974157237184601e-13, + 8.66736594525931535e-15, + -3.39177012473539600e-16, + -2.89025860757492064e-17, + -5.70837620773224917e-19, + 9.42468243326823489e-21, + 8.58160644234290174e-22, + 2.08386370824353989e-23, + 1.12039627134845776e-01, + -1.33522198469371431e-03, + 2.30536554629734158e-05, + -4.03513588847910192e-07, + 6.76693596107032580e-09, + -1.09518667987302526e-10, + 1.66218264717144399e-12, + -2.68310297417102521e-14, + 4.06946944209656868e-16, + -3.54722982429857432e-18, + 1.25699637581384505e-19, + -2.05224544187232716e-21, + -5.79193383610803550e-23, + -1.68055926229973693e-24, + 4.47383215824596822e-02, + -7.51460328322850913e-04, + 2.00913810022039324e-05, + -4.60222014252224575e-07, + 9.84834019490309586e-09, + -2.06832333700531500e-10, + 3.52862637174556532e-12, + -7.94228064724091421e-14, + 1.53012182980237769e-15, + -7.68659802950098640e-18, + 7.19312877604139983e-19, + -1.20498079507754879e-20, + -3.61750487174736143e-22, + -1.32542935235038018e-23, + 1.10300375462489466e-02, + -2.73447174378795596e-04, + 9.90829432726632911e-06, + -2.83171091853402583e-07, + 7.53547172863964553e-09, + -1.91967889222742006e-10, + 4.23096716030927281e-12, + -1.03339702708380263e-13, + 2.27606662209413751e-15, + -3.65193554290253733e-17, + 1.08226660766984327e-18, + -2.06003739309600709e-20, + 9.23192832873604655e-23, + -1.26859143096105429e-23, + 1.62890043210413477e-03, + -6.01740564193267675e-05, + 2.77024642569117160e-06, + -9.85527858421505799e-08, + 3.23059967191323605e-09, + -9.87480874803299481e-11, + 2.71809206331771747e-12, + -7.48366587468962395e-14, + 1.91663289051786551e-15, + -4.42243566157051354e-17, + 1.12489285299023040e-18, + -2.52217128041978632e-20, + 4.88057261374037066e-22, + -1.30477962056865874e-23, + 1.37757155844859657e-04, + -7.60057054041799380e-06, + 4.37172318975408395e-07, + -1.95253192215190245e-08, + 7.87190605902880826e-10, + -2.89763591693062144e-11, + 9.73864985396181933e-13, + -3.12180736705005857e-14, + 9.38811683304360304e-16, + -2.65512595299738351e-17, + 7.35340629188778851e-19, + -1.92269700867730355e-20, + 4.79154560700392941e-22, + -1.19706459063335631e-23, + 6.26090416459774683e-06, + -5.21138191279868602e-07, + 3.79704822468090590e-08, + -2.16211126118896121e-09, + 1.08221702233195995e-10, + -4.85976683446730606e-12, + 1.98883412000446961e-13, + -7.58267997260573812e-15, + 2.70307336959123520e-16, + -9.07841487426246015e-18, + 2.90269179380913302e-19, + -8.82755156339540581e-21, + 2.56773936273940254e-22, + -7.18452257871812057e-24, + 1.40651028600799704e-07, + -1.81638434420675169e-08, + 1.74467820700701146e-09, + -1.30184952656722184e-10, + 8.28877950037912444e-12, + -4.64961293725300712e-13, + 2.35036807548471898e-14, + -1.08912381100774510e-15, + 4.67399489213559707e-17, + -1.87378485080320770e-18, + 7.06601963341259016e-20, + -2.51843868798596173e-21, + 8.52204015818387906e-23, + -2.74528358027440917e-24, + 1.44783463330995423e-09, + -3.06786607678970882e-10, + 4.17120852274775561e-11, + -4.28353776983237620e-12, + 3.62535126160549143e-13, + -2.63899255195320565e-14, + 1.69772202977314839e-15, + -9.83270444022615188e-17, + 5.19497797978816223e-18, + -2.52899622899026625e-19, + 1.14328187543579468e-20, + -4.82953733974068496e-22, + 1.91616451812551636e-23, + -7.16267374507052805e-25, + 8.25521458537435398e-12, + -3.04336702527412201e-12, + 6.39307254768753541e-13, + -9.58428212859492815e-14, + 1.12931879677787684e-14, + -1.10267065382201502e-15, + 9.22464788812467830e-17, + -6.76556693857995202e-18, + 4.42378536134551215e-19, + -2.61203680725178561e-20, + 1.40685043547230456e-21, + -6.96877394653013677e-23, + 3.19630773994145170e-24, + -1.36319128776852323e-25, +# root=10 base[11]=27.5 */ + 1.70000166250887180e-01, + -1.56422753909822077e-03, + 1.52297033252635731e-05, + -1.60665936025680104e-07, + 2.18861424583349339e-09, + 1.08305051766151296e-11, + 8.47765790846118368e-13, + -2.15599252867240414e-14, + -1.55514608962063161e-15, + -2.80699812718940606e-17, + 1.03972520774111684e-18, + 6.56810084170065873e-20, + 9.68320124881701663e-22, + -4.11349304625391148e-23, + 1.07039325994192511e-01, + -1.16847433797410668e-03, + 1.87952201016670037e-05, + -3.10828283325100778e-07, + 4.92184717502913480e-09, + -7.72587259807363606e-11, + 1.07963778353372043e-12, + -1.51173332740540083e-14, + 3.38804192751350251e-16, + -1.35723073547281867e-18, + -4.31989959396170003e-20, + -5.51919077341976277e-21, + -3.55656456659480995e-23, + 4.24689962592365801e-24, + 4.20223663171262474e-02, + -6.10429034702867539e-04, + 1.53907230720748173e-05, + -3.31798551441875573e-07, + 6.40656303168451352e-09, + -1.43388282209096459e-10, + 1.98036462768452834e-12, + -3.07673913286420980e-14, + 1.58107051359192113e-15, + 3.31194653488977989e-18, + -3.77944557306178594e-19, + -3.93098154263899971e-20, + -4.78480365123783216e-22, + 2.20979830038484113e-23, + 1.00758093317697816e-02, + -2.05983659181830156e-04, + 7.12245899963142920e-06, + -1.88649917766061576e-07, + 4.51549901354259816e-09, + -1.17876372117198578e-10, + 2.20879575821243492e-12, + -4.49670525976803360e-14, + 1.51881683111284852e-15, + -1.20445774384379922e-17, + 8.89831852652462420e-20, + -2.69648867285790685e-20, + -1.76143848551708785e-22, + 9.09134506715233855e-24, + 1.42610602704629479e-03, + -4.19940528934711766e-05, + 1.84237586425480513e-06, + -5.97224236182144573e-08, + 1.76880231923827742e-09, + -5.29364515923581699e-11, + 1.29297196992392622e-12, + -3.21368567198285966e-14, + 9.14783721114606981e-16, + -1.65049527470792833e-17, + 3.44687586842650013e-19, + -1.32908480319710242e-20, + 1.06048350112353443e-22, + -1.43847347047818044e-24, + 1.13118768523450523e-04, + -4.86334636878941369e-06, + 2.62741775805825392e-07, + -1.05422876166119060e-08, + 3.85010953184596234e-10, + -1.34129982927787174e-11, + 4.09199392263769663e-13, + -1.21182273068255671e-14, + 3.56860073008988716e-16, + -9.03229334126536414e-18, + 2.31787228162357033e-19, + -6.36148212206445720e-21, + 1.31348530090727506e-22, + -3.06865450129442107e-24, + 4.65313398705542657e-06, + -2.97719624644512036e-07, + 1.98850656334438189e-08, + -1.00659192611555886e-09, + 4.55719415863395907e-11, + -1.89425171928242837e-12, + 7.09822219211519720e-14, + -2.50810806647748559e-15, + 8.41443760726988509e-17, + -2.62055908592301380e-18, + 7.87130681654697706e-20, + -2.28587432766427512e-21, + 6.18070354514230095e-23, + -1.64676907771697135e-24, + 8.84676440528897968e-08, + -8.74977760182759850e-09, + 7.48153457357052119e-10, + -4.92791410981462642e-11, + 2.82622194514676208e-12, + -1.44919134480234658e-13, + 6.72215630215377588e-15, + -2.88425530061885104e-16, + 1.15428777728714212e-17, + -4.32686951989880923e-19, + 1.53513106233570958e-20, + -5.17167604891238251e-22, + 1.65652637962883578e-23, + -5.08005659924935743e-25, + 6.62596845996375624e-10, + -1.09392268314059450e-10, + 1.29376099648440237e-11, + -1.17293835228082847e-12, + 8.94456865317441450e-14, + -5.94767039219923435e-15, + 3.52980594208077092e-16, + -1.90277681473524964e-17, + 9.42459943860722607e-19, + -4.32732267872518931e-20, + 1.85529929025749389e-21, + -7.46805549327603667e-23, + 2.83520425480943406e-24, + -1.01810929677223850e-25, + 1.85244400440731405e-12, + -5.84603695370128918e-13, + 1.10177093791330460e-13, + -1.51480561138267376e-14, + 1.66388916537456384e-15, + -1.53258514076995537e-16, + 1.22057421102845102e-17, + -8.58414027070809182e-19, + 5.41371859242697454e-20, + -3.09787424876599393e-21, + 1.62343787933437166e-22, + -7.85031229121160501e-24, + 3.52482865752203860e-25, + -1.47523065819943672e-26, +# root=10 base[12]=30.0 */ + 1.63975590149887135e-01, + -1.44948438929399940e-03, + 1.35217255997002073e-05, + -1.23124129728884427e-07, + 2.52828831248747715e-09, + 1.78111089201840000e-11, + -5.12546602045371407e-13, + -7.34798755432855110e-14, + -1.08793033061919472e-15, + 7.16171511133359750e-17, + 3.49674001685554529e-18, + -5.76786193284200644e-22, + -4.67308338001154097e-21, + -1.33041207047198688e-22, + 1.02644275131386617e-01, + -1.03180250651499256e-03, + 1.54910058134292206e-05, + -2.43154941519039536e-07, + 3.60755827448390192e-09, + -5.52705055336967318e-11, + 7.95698785796164488e-13, + -5.85196244154539359e-15, + 2.03928462348815767e-16, + -7.28053575923656565e-18, + -2.01349557895340475e-19, + 1.72709359240259819e-21, + 3.66711472588799350e-22, + 6.42322105165857147e-24, + 3.98038776860016180e-02, + -5.01689204584171910e-04, + 1.19373462862846315e-05, + -2.49843627156234692e-07, + 3.97365677396446491e-09, + -1.00562048219026368e-10, + 1.80382400307680529e-12, + 1.52924927296325814e-14, + 9.99729253788886023e-16, + -4.58805407617320965e-17, + -1.82038619082302462e-18, + -8.26908426875906417e-22, + 2.59862396383137214e-21, + 7.23596430831287610e-23, + 9.35301580960421798e-03, + -1.56993169070042193e-04, + 5.22273602440413997e-06, + -1.32716516121567599e-07, + 2.61268135857625877e-09, + -7.49168174703051462e-11, + 1.55619423337112644e-12, + -4.96136773334067843e-15, + 8.64462554892778305e-16, + -3.11843248334328086e-17, + -8.92675968752282427e-19, + -4.30165740082319123e-21, + 1.44324094850310745e-21, + 4.12236644814039931e-23, + 1.28365426883487858e-03, + -2.97114168037889052e-05, + 1.26532871279501046e-06, + -3.84581244833459502e-08, + 9.62525985520936002e-10, + -2.98757670352873992e-11, + 7.26441241629895189e-13, + -1.07584062264879813e-14, + 4.42897828905758076e-16, + -1.26388035812172977e-17, + -8.82235336371579776e-20, + -4.11914106590779319e-21, + 3.77768814039442740e-22, + 9.16994754516404061e-24, + 9.71927692738988819e-05, + -3.18013018640189286e-06, + 1.65804611637159954e-07, + -6.09006080017085892e-09, + 1.93063286679999488e-10, + -6.62178625239000111e-12, + 1.90932372303941622e-13, + -4.56633097175577877e-15, + 1.44914383583008669e-16, + -3.90128944147823811e-18, + 5.47417045244885316e-20, + -2.10508753479320632e-21, + 7.54759771536261670e-23, + 2.77872422247469129e-25, + 3.71825465254881496e-06, + -1.76937473657768292e-07, + 1.11763594682704493e-08, + -5.07299560492840310e-10, + 2.03026585065751038e-11, + -7.98641002538269332e-13, + 2.76744652558033179e-14, + -8.71924705706107737e-16, + 2.84072684347176268e-17, + -8.42816357673380551e-19, + 2.17772869744495908e-20, + -6.41687687077981982e-22, + 1.76526028339342864e-23, + -3.41618571929279035e-25, + 6.25467473528199469e-08, + -4.53565902281112886e-09, + 3.54841776328441087e-10, + -2.06258505738401447e-11, + 1.05415257564383851e-12, + -4.98050584206375837e-14, + 2.11819160897760187e-15, + -8.33516866438185609e-17, + 3.12860994272396491e-18, + -1.09598168455236944e-19, + 3.61187889317101385e-21, + -1.15936143614273547e-22, + 3.51984876139757163e-24, + -1.00324452983249205e-25, + 3.68220663696370294e-10, + -4.46150343874798004e-11, + 4.63527305592279781e-12, + -3.67406849858998114e-13, + 2.50136225939956198e-14, + -1.51283869914511103e-15, + 8.22667996680449773e-17, + -4.09919548309361495e-18, + 1.89396870535086964e-19, + -8.15278471530500369e-21, + 3.29483255584286671e-22, + -1.25804981036254621e-23, + 4.54544659078826142e-25, + -1.55920259872403361e-26, + 5.51089103291968825e-13, + -1.37058490950139749e-13, + 2.24988435443235024e-14, + -2.76435888335738651e-15, + 2.77498868843797218e-16, + -2.37289787755929849e-17, + 1.77492631871239331e-18, + -1.18344472396974535e-19, + 7.12942666524213692e-21, + -3.92090592965879695e-22, + 1.98494764972570768e-23, + -9.31226197662826367e-25, + 4.07119146471819947e-26, + -1.66426807682027796e-27, +# root=10 base[13]=32.5 */ + 1.58385639433818032e-01, + -1.34651374443151071e-03, + 1.22945450171997836e-05, + -8.12209832731481815e-08, + 2.58789184384070316e-09, + -1.98514673673529666e-11, + -2.50031127892192643e-12, + -4.47707188286947063e-14, + 3.28163465987422164e-15, + 1.31060506590119584e-16, + -2.46434769655430683e-18, + -2.45503692166613664e-19, + -1.11824831397226922e-21, + 3.45534386375563444e-22, + 9.87477241673390127e-02, + -9.18642146332868895e-04, + 1.28862265810412066e-05, + -1.93285720229855113e-07, + 2.68245416271054338e-09, + -3.76905602938859315e-11, + 6.75204714073626181e-13, + -4.59576226598596090e-15, + -1.35035633124006966e-16, + -8.46729071434434903e-18, + 2.48645267275524223e-19, + 1.49093612994503638e-20, + -1.14821168990980276e-22, + -2.49087541302699160e-23, + 3.79704750005355265e-02, + -4.17238761467173718e-04, + 9.26244447654542867e-06, + -1.99816422506434927e-07, + 2.44052326589366829e-09, + -5.05005682774604352e-11, + 2.34355285900694964e-12, + 9.31929937603459493e-15, + -1.57300866320170296e-15, + -7.52545707914456258e-17, + 1.41885406447480543e-18, + 1.33934212362908832e-19, + 5.91673832055372256e-22, + -1.90368749509580900e-22, + 8.79939012220767522e-03, + -1.20971773249734551e-04, + 3.83805612783175960e-06, + -1.00877626373882307e-07, + 1.48748127624781882e-09, + -3.73759506961080858e-11, + 1.59155727715714181e-12, + -1.06926436696561788e-15, + -7.22136507640471647e-16, + -4.56904745487058313e-17, + 7.86672892429431681e-19, + 7.42517897454474600e-20, + 4.92011123475873704e-22, + -1.04391809019853329e-22, + 1.18244803155304794e-03, + -2.12126377531604620e-05, + 8.79361423374009444e-07, + -2.69698075031512628e-08, + 5.21351842094318835e-10, + -1.49012824240107254e-11, + 5.50128100767230832e-13, + -4.52734149406789817e-15, + -6.15667944012906809e-17, + -1.33550140243552649e-17, + 2.14504336797399827e-19, + 1.66601953473028923e-20, + 1.82558587026779681e-22, + -2.42537652729323349e-23, + 8.67249576660670038e-05, + -2.10213346621560569e-06, + 1.07594611716480087e-07, + -3.84714327719478419e-09, + 9.82964500731304742e-11, + -3.16762725714251105e-12, + 1.09168773413595876e-13, + -1.86911665945082393e-15, + 3.15595741707556328e-17, + -2.46784979685359156e-18, + 4.29848057788916488e-20, + 1.33617251815069015e-21, + 3.97686525615759067e-23, + -2.79515214325307965e-24, + 3.15722023426687208e-06, + -1.07368927315731769e-07, + 6.60870012125577417e-09, + -2.80913959209434719e-10, + 9.42429408062277592e-12, + -3.47847870798359113e-13, + 1.23686475373023126e-14, + -3.22627585460134549e-16, + 8.84452175153555086e-18, + -3.35263582679871840e-19, + 7.62291947476340468e-21, + -8.52587115382056595e-23, + 6.45781426623419917e-24, + -2.20249559185940495e-25, + 4.88376256270662596e-08, + -2.46124425047827850e-09, + 1.82842655492861247e-10, + -9.59461818085956845e-12, + 4.23342591464947661e-13, + -1.85116669373234181e-14, + 7.45762516071229775e-16, + -2.60945859482550299e-17, + 9.00171256051899362e-19, + -3.13373512889462906e-20, + 9.34395058608288066e-22, + -2.60559015528272924e-23, + 8.58925999840071266e-25, + -2.37573318616037147e-26, + 2.43265243793733827e-10, + -2.01207446187586929e-11, + 1.89364330320421727e-12, + -1.31423880508498546e-13, + 7.85424124468858471e-15, + -4.32271735907059735e-16, + 2.15619650250922170e-17, + -9.81651440654455872e-19, + 4.21237684801739926e-20, + -1.70383528603422292e-21, + 6.42269152563058274e-23, + -2.30606298011824400e-24, + 7.98641590231964469e-26, + -2.59402080400554983e-27, + 2.25587804397436775e-13, + -3.94681580730641250e-14, + 5.56110146765799830e-15, + -5.94934189054857487e-16, + 5.34029353847644762e-17, + -4.17179175373516337e-18, + 2.88828442081954354e-19, + -1.80188245366480914e-20, + 1.02569364405116278e-21, + -5.36985560055333879e-23, + 2.60328032606750115e-24, + -1.17619456760884667e-25, + 4.97533220760832539e-27, + -1.97478149401657274e-28, +# root=10 base[14]=35.0 */ + 1.53191050308241178e-01, + -1.25140452840001083e-03, + 1.15441176291896698e-05, + -4.64189498982156747e-08, + 1.56497384230155847e-09, + -7.98545997747006682e-11, + -1.82455529048178553e-12, + 9.75573362354362468e-14, + 4.00520923318916860e-15, + -1.27992831408533967e-16, + -7.50287792250816750e-18, + 1.44570451395248230e-19, + 1.32248089432018978e-20, + -1.19644141727903338e-22, + 9.52656069100314834e-02, + -8.24152252772980911e-04, + 1.08021430562909946e-05, + -1.55571721954578847e-07, + 2.07688990977353042e-09, + -2.37038795000142849e-11, + 4.60042577693293005e-13, + -1.08724984009888846e-14, + -1.49987850222678882e-16, + 8.70914974167258333e-18, + 3.87944893950598270e-19, + -1.36179690067178249e-20, + -6.66550870338668850e-22, + 1.87102785429865644e-23, + 3.64353939193705137e-02, + -3.52123546558429134e-04, + 7.07544446180896504e-06, + -1.65831784459457653e-07, + 1.97639261989438653e-09, + 1.34783639099646052e-12, + 1.63294023216330175e-12, + -6.29890985148244380e-14, + -2.05354663446822435e-15, + 6.85619028354275287e-17, + 4.12957200350808347e-18, + -8.05492705299714418e-20, + -7.22566177249538848e-21, + 6.76125727501607566e-23, + 8.36975814797070658e-03, + -9.47484821763165149e-05, + 2.75220068178296245e-06, + -8.10559470308321194e-08, + 1.10085459359959385e-09, + -3.29883148187505030e-12, + 1.06932885642590855e-12, + -3.85165231015824494e-14, + -1.11267375076195001e-15, + 3.59403311637318172e-17, + 2.40672577304104645e-18, + -4.20856976966758000e-20, + -4.16201048108587414e-21, + 2.90916385186550840e-23, + 1.10979346545550094e-03, + -1.53487261396152773e-05, + 5.98124291575033475e-07, + -2.03469468717016001e-08, + 3.42383346760073534e-10, + -3.79177774887020956e-12, + 3.43455371077490490e-13, + -1.11610403113145250e-14, + -2.26805962825074856e-16, + 7.12432662978232384e-18, + 6.12672622271081877e-19, + -9.21132358099853134e-21, + -1.01722011793305879e-21, + 3.90475385857542565e-24, + 7.97780160916580159e-05, + -1.40327596228120395e-06, + 6.91901568790900701e-08, + -2.65551538146347280e-09, + 5.71999196413260329e-11, + -1.12859917498063334e-12, + 6.07055549624425212e-14, + -1.82559816412924691e-15, + -1.16721466410739379e-17, + 3.52892586642917932e-19, + 8.02456752559900695e-20, + -1.00721592198380214e-21, + -1.15455228875195440e-22, + -1.38568962646995303e-25, + 2.81517178452990920e-06, + -6.58570773543283278e-08, + 3.95785156267814722e-09, + -1.72271307788500408e-10, + 4.82935538971826262e-12, + -1.36576819366937131e-13, + 5.87903583382401521e-15, + -1.77579447791712055e-16, + 1.85727445408978662e-18, + -5.97263465378071898e-20, + 6.15615067342148299e-21, + -7.99690137162435957e-23, + -5.11586694166495131e-24, + -7.34783571128409369e-26, + 4.13210978965126261e-08, + -1.36675026867312788e-09, + 9.87180076087181439e-11, + -5.01157022151358957e-12, + 1.86101805108060496e-13, + -6.95508744150643683e-15, + 2.90117216553351952e-16, + -9.79969095188879868e-18, + 2.51128542838878795e-19, + -8.44653215818530578e-21, + 3.43405461276177579e-22, + -7.16586486474003305e-24, + 5.84868187479681693e-26, + -7.43449242285242267e-27, + 1.85426447122504334e-10, + -9.65531632523667099e-12, + 8.56110437773373120e-13, + -5.39914465699573151e-14, + 2.75571695374638593e-15, + -1.35152168771778518e-16, + 6.37480772720037971e-18, + -2.65813159277323292e-19, + 1.01285174996517823e-20, + -3.89299386918984679e-22, + 1.43728382647246505e-23, + -4.59600883154638680e-25, + 1.42133171768532083e-26, + -4.97711813550116174e-28, + 1.25917722075169939e-13, + -1.35476792180501625e-14, + 1.66843156583184050e-15, + -1.53546283970110784e-16, + 1.19962060999336571e-17, + -8.43251973042411522e-19, + 5.35176407975728876e-20, + -3.07906581133108837e-21, + 1.63313329804100754e-22, + -8.07305336149031490e-24, + 3.71790197630905696e-25, + -1.59940597548906786e-26, + 6.49466799575236055e-28, + -2.49673563817987467e-29, +# root=10 base[15]=37.5 */ + 1.48367038285617370e-01, + -1.16098543347725844e-03, + 1.10799284673647286e-05, + -3.54172140613127322e-08, + -1.97991087169572562e-10, + -8.22243442881925318e-11, + 1.71388266096814823e-12, + 1.15522863170921891e-13, + -3.19011783455818450e-15, + -1.76050937476347411e-16, + 6.02893472265940060e-18, + 2.59633575856500805e-19, + -1.09389524957341562e-20, + -3.74285592574662660e-22, + 9.21307630138644140e-02, + -7.44670307501784138e-04, + 9.12066586399980987e-06, + -1.25642994786658437e-07, + 1.68726348413124564e-09, + -1.64982824668871766e-11, + 1.48171642415976436e-13, + -9.20032034144739441e-15, + 2.48850541767668613e-16, + 7.87634942624659592e-18, + -4.00562466178642193e-19, + -1.00721681709873040e-20, + 7.26468573522396574e-22, + 9.89929525306345507e-24, + 3.51282785677392295e-02, + -3.02929844082666406e-04, + 5.28110632753896782e-06, + -1.32559372282579471e-07, + 2.22700757314150983e-09, + 1.51003147992804553e-11, + -5.17659222497084545e-13, + -6.91659310177763092e-14, + 1.83645132329883906e-15, + 9.50150756980954698e-17, + -3.29982091859306296e-18, + -1.41590859796349431e-19, + 6.01553020119814123e-21, + 2.02982348944573200e-22, + 8.02906421972713301e-03, + -7.63201287805896818e-05, + 1.88641935811459527e-06, + -6.29940114078600242e-08, + 1.19040300208367031e-09, + 7.11337179079188423e-12, + -2.16371016567821736e-13, + -4.13528471664911202e-14, + 1.05456599373927921e-15, + 5.46223152046517038e-17, + -1.81392529096787837e-18, + -8.42879514791499836e-20, + 3.33937382577054885e-21, + 1.24030378877789763e-22, + 1.05654902635027022e-03, + -1.14506832141433940e-05, + 3.85461576935138943e-07, + -1.51441971821376499e-08, + 3.20941564373624432e-10, + 2.53162515066943834e-13, + -6.67533957124926399e-15, + -1.11055967214703770e-14, + 2.68492215860623775e-16, + 1.31499409022828718e-17, + -4.12540365387804742e-19, + -2.16846958375955135e-20, + 7.81581568323623421e-22, + 3.27141350180983247e-23, + 7.50903789057010056e-05, + -9.62950496131539270e-07, + 4.22781083427908368e-08, + -1.85953204777159706e-09, + 4.49573306726752317e-11, + -2.97199469230686834e-13, + 9.74853675867311173e-15, + -1.54914668746898174e-15, + 3.56460069193117299e-17, + 1.42270956235163791e-18, + -4.09349607476370640e-20, + -2.74212787344663043e-21, + 8.57669189248189766e-23, + 4.18506553573217022e-24, + 2.60361029448478810e-06, + -4.13154372539363814e-08, + 2.28455262474771275e-09, + -1.10768023701898071e-10, + 3.13772216200997154e-12, + -4.89679365558821880e-14, + 1.69378530440401452e-15, + -1.16053707042777630e-16, + 2.68392463071980176e-18, + 5.41923421436740613e-20, + -1.25169702825277362e-21, + -1.73033864582246224e-22, + 4.38152897465816430e-24, + 2.47771272630911816e-25, + 3.71128293582160150e-08, + -7.75462543926337135e-10, + 5.28582561209983970e-11, + -2.84818403753004951e-12, + 9.82004437623398589e-14, + -2.57797550142503399e-15, + 9.79367420168542275e-17, + -4.57845028595493110e-18, + 1.20402938952641411e-19, + -8.17286797024400427e-22, + 4.39498433017577315e-23, + -5.77017376305609836e-24, + 1.19486966464332357e-25, + 5.27766183236395859e-27, + 1.57242290672487351e-10, + -4.81025363067520954e-12, + 4.04864706915041090e-13, + -2.52166373345886871e-14, + 1.12591021625632819e-15, + -4.46301300195645011e-17, + 1.97078340223820126e-18, + -8.54601059370785208e-20, + 2.90613616716586765e-21, + -8.38789744108088345e-23, + 3.14960910300755699e-24, + -1.31945152524488299e-25, + 3.37874374263446191e-27, + -3.72208518368631111e-29, + 9.01030091513394907e-14, + -5.24766875370643591e-15, + 5.86622646386556232e-16, + -4.80757849295861439e-17, + 3.19200673116696222e-18, + -1.94918143260443569e-19, + 1.13287790521820461e-20, + -6.04686328259520089e-22, + 2.92717803830706101e-23, + -1.33032981396881559e-24, + 5.83595425773421075e-26, + -2.41705241221080813e-27, + 9.18658950003721006e-29, + -3.29326602670123730e-30, +# root=10 base[16]=40.0 */ + 1.42655831583371501e-01, + -1.67882943551804476e-03, + 2.66166501591564188e-05, + -2.24342054979146074e-07, + -8.30235441192322054e-09, + 1.91110213934553962e-11, + 4.27497715116402681e-11, + -1.61460655886745568e-12, + -1.11818866473782261e-13, + 9.87360359084833105e-15, + 1.24626317351400460e-16, + -4.26317160955515499e-17, + 8.58046354171934001e-19, + 1.39428326693720119e-19, + 8.85101300696953530e-02, + -1.05525074776106616e-03, + 1.89948769201463658e-05, + -3.88636090557247010e-07, + 8.44187798484518884e-09, + -1.55238588665137595e-10, + 5.05297035939193068e-13, + 4.39662407282368905e-14, + 6.16135907352738973e-15, + -5.55014417542717127e-16, + -4.64661551660734546e-19, + 2.03555019971754348e-18, + -6.90973339508527262e-20, + -5.10978041292057142e-21, + 3.36885364350255623e-02, + -4.12515355466414621e-04, + 9.21366527931493566e-06, + -3.48493102915831658e-07, + 1.43007210176823559e-08, + -2.15970494330384744e-10, + -1.90621231463379512e-11, + 7.93947290382308233e-13, + 6.29701200720563341e-14, + -5.44562130900872773e-15, + -6.63060910744562623e-17, + 2.32732899930100201e-17, + -4.73615294808066799e-19, + -7.58858363700182304e-20, + 7.67798326466864571e-03, + -9.80437388390476103e-05, + 2.83874791916690435e-06, + -1.54839814297076255e-07, + 7.53244579493860331e-09, + -1.23186598519669296e-10, + -1.04616253093808581e-11, + 4.28515472720444660e-13, + 3.72802048071262674e-14, + -3.12919429544409900e-15, + -4.20620414596352392e-17, + 1.35018926391377707e-17, + -2.52873672238095997e-19, + -4.52895996414090710e-20, + 1.00599830842081875e-03, + -1.36392964160567060e-05, + 5.18626289657592722e-07, + -3.54786235455200406e-08, + 1.87962958123493417e-09, + -3.56772565300531416e-11, + -2.24795646957365442e-12, + 9.09876887353817639e-14, + 9.65217471306950980e-15, + -7.71619892351242057e-16, + -1.14094362251053186e-17, + 3.34182835222442050e-18, + -5.55002637728822150e-20, + -1.16387923844902026e-20, + 7.10402359613884467e-05, + -1.04606741424711317e-06, + 5.21318426806724628e-08, + -4.14567362885638564e-09, + 2.34125315349479686e-10, + -5.36627209382650139e-12, + -1.95283452895649308e-13, + 7.51016513390333228e-15, + 1.24663548106949157e-15, + -9.21332272286919903e-17, + -1.46452362270167610e-18, + 3.93254654080813593e-19, + -5.31068992068844005e-21, + -1.45033532940080477e-21, + 2.43914972868748968e-06, + -4.02340629791267772e-08, + 2.61137838025678122e-09, + -2.31913823937270436e-10, + 1.39699284684262207e-11, + -3.99241308936012383e-13, + -3.79307585983688847e-15, + 6.58265859568508444e-17, + 8.10427166361586154e-17, + -5.31474390109832740e-18, + -7.97129720024856556e-20, + 2.09316851636330486e-20, + -1.76750374107457399e-22, + -8.55275268320672217e-23, + 3.42134391995556033e-08, + -6.62693343864463128e-10, + 5.58316236587902816e-11, + -5.44450823673710883e-12, + 3.55498148382797120e-13, + -1.31153973390319720e-14, + 2.16050666525398327e-16, + -1.53754637770055375e-17, + 2.55814816727841174e-18, + -1.44844755073283076e-19, + -9.17298541870448128e-22, + 4.09390525292433046e-22, + 1.39933602177984888e-24, + -2.17722664661633498e-24, + 1.40565687537187437e-10, + -3.48024039997095008e-12, + 3.83964083217258746e-13, + -4.13667954442097349e-14, + 3.04805950984497006e-15, + -1.52873936140801228e-16, + 6.49258136991463829e-18, + -4.32367131128125564e-19, + 3.58220375616131152e-20, + -1.90400433101866153e-21, + 3.73566576535591771e-23, + 4.59848273670685818e-25, + 1.52952102877685196e-25, + -2.21909341942016494e-26, + 7.38914452931594303e-14, + -2.89684933977679166e-15, + 4.41271293677735444e-16, + -5.59014990988075770e-17, + 5.21458103797723616e-18, + -3.99025417190067599e-19, + 2.96174348365434519e-20, + -2.33175418843200457e-21, + 1.77053251698170203e-22, + -1.15711845535545561e-23, + 6.56401355609805884e-25, + -3.76934732174467941e-26, + 2.45688093948521846e-27, + -1.53882430529074575e-28, +# root=10 base[17]=44.0 */ + 1.36346524867653252e-01, + -1.47862350242804847e-03, + 2.32699532959954878e-05, + -3.17052572157809500e-07, + -2.12090496034615829e-09, + 3.92782513705178668e-10, + -7.39580956712521989e-12, + -9.43968217755101296e-13, + 7.74388537773723712e-14, + -1.05869189273604504e-15, + -2.02226736637234592e-16, + 1.42553565107193433e-17, + -7.98169082909452940e-20, + -4.29108933414916218e-20, + 8.45664483320199001e-02, + -9.19878802442136560e-04, + 1.50429803223764064e-05, + -2.77138071057556308e-07, + 5.60451329470717228e-09, + -1.21650890609232659e-10, + 2.12476591519793974e-12, + 2.04618865195403654e-14, + -3.49780068186656524e-15, + 5.41230593723837946e-17, + 9.33202976723326874e-18, + -6.93261595213804038e-19, + 8.26113459540322601e-21, + 1.70127208238820048e-21, + 3.21643199393882723e-02, + -3.52087236834450765e-04, + 6.20724906670313428e-06, + -1.69625073721349046e-07, + 7.67289614208513664e-09, + -3.41199490422512249e-10, + 6.50825041377388046e-12, + 4.68428382632209341e-13, + -4.14273580893167335e-14, + 5.62840223270730762e-16, + 1.10729726918629088e-16, + -7.79618410010942740e-18, + 4.45285780193753114e-20, + 2.33763844256539517e-20, + 7.32202559265007075e-03, + -8.09674751460122020e-05, + 1.59248968926481106e-06, + -6.24315181174053026e-08, + 3.81527087371777375e-09, + -1.89372994695463937e-10, + 3.82418806736495511e-12, + 2.62276867044303876e-13, + -2.36140577621991058e-14, + 3.11273170867865176e-16, + 6.48403321540205818e-17, + -4.52418659999692876e-18, + 2.25319477349074615e-20, + 1.38450685442903495e-20, + 9.57676041319794453e-04, + -1.07495315678039512e-05, + 2.43471500268990914e-07, + -1.28639273180986045e-08, + 9.11133078880446615e-10, + -4.75096953627031996e-11, + 1.03261277842573555e-12, + 6.02634042764028821e-14, + -5.66567083677843117e-15, + 7.05242652160732730e-17, + 1.63141989610354862e-17, + -1.12309992411057098e-18, + 4.56966622216337194e-21, + 3.52142242229331669e-21, + 6.74527397316678921e-05, + -7.73582846966457840e-07, + 2.08005918702404299e-08, + -1.39807332181320556e-09, + 1.07959570385087916e-10, + -5.83763648661404649e-12, + 1.39560981828215857e-13, + 6.20116876601068856e-15, + -6.32035771321682295e-16, + 6.90578451144673355e-18, + 1.98445347662556844e-18, + -1.33680038375606581e-19, + 3.86008490423204633e-22, + 4.31645337395137749e-22, + 2.30691425360520062e-06, + -2.72972270332100367e-08, + 8.99601715579814592e-10, + -7.35036460251565943e-11, + 6.02659874727832241e-12, + -3.38300371983765865e-13, + 9.14256381108057073e-15, + 2.51890574744729474e-16, + -3.05921451514931783e-17, + 2.20524832178773315e-19, + 1.14238034393460948e-19, + -7.42128280333177705e-21, + 1.15307925798352980e-23, + 2.46529130654298352e-23, + 3.21544013855803991e-08, + -3.99042053573819290e-10, + 1.67543790729399122e-11, + -1.61136156063117645e-12, + 1.39022864235945532e-13, + -8.19013524917463403e-15, + 2.59694116206351225e-16, + 2.02322679195585901e-18, + -4.99472181204560084e-19, + -2.92003447740632869e-21, + 2.84693215450603436e-21, + -1.73952784425443069e-22, + 1.82389438382949545e-25, + 5.74087827887753465e-25, + 1.30561111217223743e-10, + -1.75586783348458928e-12, + 9.95260107483951352e-14, + -1.10740668559726981e-14, + 1.01158828250921355e-15, + -6.42531394277249219e-17, + 2.53562802124835792e-18, + -3.95620432460467854e-20, + -3.72400406234278123e-22, + -1.71324621757999502e-22, + 2.64968237434682756e-23, + -1.48262879544194792e-24, + 9.85019502659101242e-27, + 3.85267361909185660e-27, + 6.65407938629119368e-14, + -1.06357809853545780e-15, + 9.18309457899669574e-17, + -1.19772753955788786e-17, + 1.20802975063390266e-18, + -8.95903585652352451e-20, + 4.99155810320192573e-21, + -2.32192082716704057e-22, + 1.26809611800452719e-23, + -9.88907054477113521e-25, + 7.57228459331607063e-26, + -4.27181780317675188e-27, + 1.50477467383277134e-28, + -2.34908502314665976e-30, +# root=10 base[18]=48.0 */ + 1.30780114762700989e-01, + -1.30775171516377890e-03, + 1.94756042383442781e-05, + -3.02519365102785924e-07, + 2.99925939657012749e-09, + 1.13244818040016158e-10, + -1.00626700525752447e-11, + 3.39262888147296255e-13, + 4.70757089059399957e-15, + -1.24256862493631964e-15, + 6.77925340588813599e-17, + -9.57905233412094100e-19, + -1.21392497347106938e-19, + 1.01175172511079893e-20, + 8.11084895640341585e-02, + -8.11479895953131280e-04, + 1.21841085584405934e-05, + -2.04153886557638846e-07, + 3.67542645923863850e-09, + -7.32903303028403570e-11, + 1.65722794169448266e-12, + -3.41977608248685825e-14, + -3.49064203338832770e-17, + 5.85074721934290660e-17, + -3.18431667685280745e-18, + 4.39758862607118389e-20, + 5.45795728227888752e-21, + -4.48853825809241632e-22, + 3.08447431840907296e-02, + -3.08935086721293757e-04, + 4.71724738060117893e-06, + -9.07769016299648373e-08, + 2.84284373384788575e-09, + -1.42420792347760949e-10, + 6.96279966632248682e-12, + -2.11835336229388877e-13, + -2.10660693913731777e-15, + 6.70868901963634926e-16, + -3.68908447028978583e-17, + 5.20646233272690417e-19, + 6.63057590893041079e-20, + -5.52222868710767715e-21, + 7.02002573502226706e-03, + -7.04349998605868056e-05, + 1.10438264725988264e-06, + -2.54993680041304077e-08, + 1.18092009848545786e-09, + -7.49273827804133920e-11, + 3.95392155624898548e-12, + -1.24372963358341399e-13, + -1.08171907912368176e-15, + 3.84679229881001872e-16, + -2.13551349090111758e-17, + 3.01514240269139164e-19, + 3.88148930551926740e-20, + -3.23464226426938852e-21, + 9.17863401646139840e-04, + -9.23332266324586478e-06, + 1.50381136492673344e-07, + -4.27843898261146376e-09, + 2.59100529095802201e-10, + -1.81911664690602062e-11, + 9.90523814488246625e-13, + -3.20190803000613895e-14, + -2.06892862072945290e-16, + 9.33974716640839590e-17, + -5.26066471032728907e-18, + 7.40869083411816719e-20, + 9.73814694582584073e-21, + -8.11612461980961359e-22, + 6.46163945768627395e-05, + -6.52464359574724445e-07, + 1.12002133293395003e-08, + -3.98549784674832311e-10, + 2.91082788462769475e-11, + -2.16083295241234531e-12, + 1.20263760238759963e-13, + -4.01738271126723495e-15, + -1.30764792052903832e-17, + 1.06633790583222948e-17, + -6.14195495140030720e-19, + 8.56083787477819143e-21, + 1.17443772431121885e-21, + -9.77737811120099484e-23, + 2.20827253523087503e-06, + -2.24213339418812016e-08, + 4.13825842520527878e-10, + -1.85863738971091115e-11, + 1.55480063373473480e-12, + -1.19870142065619732e-13, + 6.81921721078934932e-15, + -2.38069339095055611e-16, + 2.87260767522039714e-19, + 5.43379351594582154e-19, + -3.24602177764059775e-20, + 4.37633484039374040e-22, + 6.60882218032051962e-23, + -5.47760739026619195e-24, + 3.07435561966123923e-08, + -3.14811516037595558e-10, + 6.43786368169117090e-12, + -3.68206653140581671e-13, + 3.41791806762707847e-14, + -2.72163119476666066e-15, + 1.59229076133440446e-16, + -5.92219159478280899e-18, + 4.45530826188871731e-20, + 1.03461705720272243e-20, + -6.62101026718776352e-22, + 7.92051762295936508e-24, + 1.55093027105735082e-24, + -1.26756451265962748e-25, + 1.24572662690591136e-10, + -1.29431022304956496e-12, + 3.09086404826569557e-14, + -2.28709881134157851e-15, + 2.31865951052625077e-16, + -1.91560673648445279e-17, + 1.17116458589097542e-18, + -4.81153643313152871e-20, + 8.20172771123119475e-22, + 4.41606210492924970e-23, + -3.44990748148400307e-24, + 1.56377244505985150e-26, + 1.22518878681304702e-26, + -9.57450815149513482e-28, + 6.31725522058737054e-14, + -6.77766394752889741e-16, + 2.13590110738852618e-17, + -2.13384328018511642e-18, + 2.37921594016035304e-19, + -2.09616902986288764e-20, + 1.40621586414482065e-21, + -6.98674356903013515e-23, + 2.37792163004704675e-24, + -4.60521274744973725e-26, + 1.01730141504928217e-27, + -1.95000305904274757e-28, + 2.30746040956758242e-29, + -1.56211238471099877e-30, +# root=10 base[19]=52.0 */ + 1.25839016825951028e-01, + -1.16554919275459082e-03, + 1.61742710057159199e-05, + -2.46366962185565959e-07, + 3.58957129759428709e-09, + -2.29288937774259243e-11, + -2.17730564329059068e-12, + 1.69207625558856036e-13, + -7.26300871499886472e-15, + 1.41456839654655468e-16, + 6.29316162677788237e-18, + -7.38094428921727631e-19, + 3.54064576789722258e-20, + -7.47104383563259805e-22, + 7.80432802899502509e-02, + -7.22905621761121028e-04, + 1.00448753596881239e-05, + -1.55222949347960195e-07, + 2.53464399390070215e-09, + -4.39260720257913279e-11, + 8.58826974191476852e-13, + -2.03174937525372800e-14, + 5.15020600183529797e-16, + -7.76937076947225151e-18, + -3.33869133837795261e-19, + 3.57265621091989462e-20, + -1.61574661592250345e-21, + 3.09876418122299901e-23, + 2.96784482751739805e-02, + -2.74948483406365891e-04, + 3.83085660236767069e-06, + -6.09542825606750976e-08, + 1.20859371682650823e-09, + -4.03062485523139039e-11, + 2.08519787743117795e-12, + -1.07725398623411562e-13, + 4.22547320809652185e-15, + -8.14119626007160458e-17, + -3.37718523451941430e-18, + 4.02273685936212686e-19, + -1.93152571014327757e-20, + 4.07080903880880533e-22, + 6.75435639744014979e-03, + -6.25888418905678844e-05, + 8.75858116566673675e-07, + -1.45780445426854288e-08, + 3.64928125920191460e-10, + -1.78630502641489357e-11, + 1.12425342134660167e-12, + -6.16475436983710638e-14, + 2.47250099434010174e-15, + -4.91114082061657296e-17, + -1.88847945946790760e-18, + 2.32374749795644160e-19, + -1.12587358322718320e-20, + 2.39740282738191283e-22, + 8.83082864797439374e-04, + -8.18589058785996089e-06, + 1.15287567938247024e-07, + -2.04267634109629726e-09, + 6.51733212773760617e-11, + -4.03049659881695754e-12, + 2.74371096547220694e-13, + -1.53962935946273880e-14, + 6.26165323756184009e-16, + -1.29023341917980475e-17, + -4.41681648550298557e-19, + 5.71254331699098203e-20, + -2.80216549250836936e-21, + 6.04472471962136558e-23, + 6.21633590958475070e-05, + -5.76523243319677475e-07, + 8.19426787934883695e-09, + -1.57728084593189971e-10, + 6.37611419086752374e-12, + -4.58304423300480798e-13, + 3.25328186188174804e-14, + -1.85362278810259608e-15, + 7.65303472172437364e-17, + -1.65562064347199471e-18, + -4.74226119272063986e-20, + 6.65705100060173500e-21, + -3.32561476310853396e-22, + 7.30146862643813492e-24, + 2.12421248192025576e-06, + -1.97150079731745500e-08, + 2.83941747484429599e-10, + -6.08928827467909957e-12, + 3.08231179718372572e-13, + -2.45539083837121177e-14, + 1.79238504706777288e-15, + -1.03621238750633080e-16, + 4.36361556702580310e-18, + -1.00821906360158938e-19, + -2.15586026573052997e-21, + 3.51780271938416088e-22, + -1.80798685396698771e-23, + 4.06651712453631679e-25, + 2.95683871766311532e-08, + -2.74731376091206340e-10, + 4.03624977154288483e-12, + -9.98034582989409956e-14, + 6.25264538941930173e-15, + -5.37297768443643976e-16, + 4.01589996178536496e-17, + -2.36396423267379113e-18, + 1.02461904801713521e-19, + -2.59410290133059149e-21, + -3.09053112408219947e-23, + 7.23624617967870707e-24, + -3.90550787852888689e-25, + 9.07805964340801539e-27, + 1.19776818523593396e-10, + -1.11496733697883413e-12, + 1.69275807631166446e-14, + -5.09202868713944074e-16, + 3.92326001373219284e-17, + -3.58971832892197772e-18, + 2.75528440298293954e-19, + -1.66770446153365819e-20, + 7.57880842546826530e-22, + -2.19655513496539192e-23, + 1.92352796334464060e-26, + 4.01708605374770169e-26, + -2.41288706592797520e-27, + 5.83083299348484624e-29, + 6.07020662838359685e-14, + -5.67290944507236282e-16, + 9.21298808094979831e-18, + -3.76235911292313458e-19, + 3.60358630100727837e-20, + -3.52609960326644599e-21, + 2.83083806788241604e-22, + -1.81548550210997790e-23, + 9.09851042811518306e-25, + -3.32763410616975866e-26, + 6.72453620462586147e-28, + 1.03604619270610343e-29, + -1.33450407530027427e-30, + 2.58816291328137851e-32, +# root=10 base[20]=56.0 */ + 1.21418201453976776e-01, + -1.04705125982259054e-03, + 1.35415483211766251e-05, + -1.94235288130336484e-07, + 2.87906852116566260e-09, + -3.92607381822954995e-11, + 1.71328163485704584e-13, + 2.71114514454312014e-14, + -2.01423905291000961e-15, + 9.56673160931247040e-17, + -3.11869020771453016e-18, + 4.17328791467541674e-20, + 2.76989302456131350e-21, + -2.53729725016665415e-22, + 7.53014722812638121e-02, + -6.49368226121062515e-04, + 8.39970625606511571e-06, + -1.20740580813070811e-07, + 1.82453537601115630e-09, + -2.85744467901141184e-11, + 4.72471414929932727e-13, + -8.91664742422518231e-15, + 2.13418035609588970e-16, + -6.10061311574703257e-18, + 1.55413671757743632e-19, + -1.41684232844661740e-21, + -1.56457891641899344e-22, + 1.23481937079908791e-23, + 2.86357160649576802e-02, + -2.46946407655051863e-04, + 3.19541113708490996e-06, + -4.61361015153729346e-08, + 7.24688116882075554e-10, + -1.42136499273375103e-11, + 4.70124536193697549e-13, + -2.38292887118909388e-14, + 1.24531398127974892e-15, + -5.45626629313632199e-17, + 1.73812106938116072e-18, + -2.32304687474418957e-20, + -1.50964898486282148e-21, + 1.38568567125172054e-22, + 6.51702029239728704e-03, + -5.62024303489774637e-05, + 7.27647181362522980e-07, + -1.05804077913412111e-08, + 1.76206785709880563e-10, + -4.46078158461444426e-12, + 2.13600903250217378e-13, + -1.29449563104839759e-14, + 7.13382653115496576e-16, + -3.18186990494129010e-17, + 1.02602375752878865e-18, + -1.42982850990898105e-20, + -8.51722730772322892e-22, + 8.01775092892298974e-23, + 8.52047823040144917e-04, + -7.34829623529331609e-06, + 9.52154453021033621e-08, + -1.39881754966859544e-09, + 2.52142511928147128e-11, + -8.20434187489182193e-13, + 4.86219601249127537e-14, + -3.15855584116638898e-15, + 1.77532988448283435e-16, + -7.99380071273171233e-18, + 2.60798542414277151e-19, + -3.82592945625340312e-21, + -2.02563019171115592e-22, + 1.97650378341083517e-23, + 5.99781784418022828e-05, + -5.17296748577225176e-07, + 6.71070523047205412e-09, + -1.00034803719372744e-10, + 1.99561381722067613e-12, + -8.19015353186785804e-14, + 5.53931616506127019e-15, + -3.73173198264240925e-16, + 2.12345266442250749e-17, + -9.64992944362891262e-19, + 3.19615195041397545e-20, + -5.01381562082483189e-22, + -2.24136319768363907e-23, + 2.31378853789871788e-24, + 2.04951623464574387e-06, + -1.76779572477015480e-08, + 2.29716747180253253e-10, + -3.49599060562708138e-12, + 7.91824763435300727e-14, + -4.00796974183824586e-15, + 2.96001989369510183e-16, + -2.04209563813341345e-17, + 1.17491389391565458e-18, + -5.40154669202107578e-20, + 1.82702598211447601e-21, + -3.12922066372810788e-23, + -1.08371780039677356e-24, + 1.23250330645790080e-25, + 2.85281009399502856e-08, + -2.46096195204587269e-10, + 3.20602062979684750e-12, + -5.03016341794383091e-14, + 1.33572400297941622e-15, + -8.17023874588750075e-17, + 6.43003611486333531e-18, + -4.52339032171883399e-19, + 2.63675960343329388e-20, + -1.23255395361610676e-21, + 4.30034413998936952e-23, + -8.27974933436567756e-25, + -1.85521393225532637e-26, + 2.57769760526516187e-27, + 1.15559143945190932e-10, + -9.97058255347887040e-13, + 1.30435676221216086e-14, + -2.14845446229386337e-16, + 7.00806137452090632e-18, + -5.10564281737005919e-19, + 4.23143165452690524e-20, + -3.04007416422973738e-21, + 1.80691806468602388e-22, + -8.67970461524041968e-24, + 3.18448739958835513e-25, + -7.21981618951787669e-27, + -5.28024176412690304e-29, + 1.50346778459096283e-29, + 5.85606978542559590e-14, + -5.05467153024369479e-16, + 6.66922733520850648e-18, + -1.20634456170450503e-19, + 5.28172980725305476e-21, + -4.58233749048653186e-22, + 4.00715551301400602e-23, + -2.97743230107996420e-24, + 1.83999474872406365e-25, + -9.35364392261474724e-27, + 3.79198817461705763e-28, + -1.11347916532498802e-29, + 1.43314987529708810e-31, + 7.34395545356813152e-33, +# root=10 base[21]=60.0 */ + 1.17432929085536819e-01, + -9.47316417990596367e-04, + 1.14623903451372470e-05, + -1.54068262902144376e-07, + 2.16954418644972777e-09, + -3.08899461497015484e-11, + 4.00512139407667515e-13, + -1.71975214530845211e-15, + -2.45103276752896885e-16, + 1.80217063990974866e-17, + -8.91022237282486804e-19, + 3.40909193494028511e-20, + -9.41295706521774926e-22, + 1.08222941798998013e-23, + 7.28298663374227356e-02, + -5.87509653590027642e-04, + 7.10890786421706783e-06, + -9.55770377073752117e-08, + 1.34948602557596073e-09, + -1.96238761528726391e-11, + 2.92894337038390462e-13, + -4.58901812334738069e-15, + 8.19567219008248193e-17, + -1.89658284855734747e-18, + 5.61117909459277711e-20, + -1.71155621953821952e-21, + 4.08045140128205808e-23, + -2.72081235878017533e-25, + 2.76958044211337295e-02, + -2.23419022997811104e-04, + 2.70348582495176165e-06, + -3.63670884054795809e-08, + 5.16320687980205998e-10, + -7.83124302540816818e-12, + 1.46585490147732394e-13, + -4.53433445820679733e-15, + 2.16658543783957573e-16, + -1.11020637126931061e-17, + 5.05693390325290065e-19, + -1.88951487959993543e-20, + 5.17463078434391924e-22, + -5.92703525435849285e-24, + 6.30310925064029009e-03, + -5.08466177045326120e-05, + 6.15306751606102355e-07, + -8.28418035307992795e-09, + 1.18648806963416091e-10, + -1.91673771159646236e-12, + 4.62215954987082347e-14, + -2.05279457770689528e-15, + 1.17345308562936260e-16, + -6.34463312502381252e-18, + 2.93884120645964163e-19, + -1.10732185768353931e-20, + 3.06280872569044932e-22, + -3.67245464364559965e-24, + 8.24080194335131792e-04, + -6.64780502767318942e-06, + 8.04535890366808594e-08, + -1.08455057398535971e-09, + 1.57316564247572346e-11, + -2.76457580306124047e-13, + 8.52214282676872826e-15, + -4.65701418060488232e-16, + 2.85358256741435233e-17, + -1.57295514205486036e-18, + 7.34326540322375382e-20, + -2.78530737141968375e-21, + 7.79199712249868788e-23, + -9.87384314794535573e-25, + 5.80094051643879338e-05, + -4.67960748284327126e-07, + 5.66408744361058154e-09, + -7.64912953362993158e-11, + 1.12945532027738561e-12, + -2.20695890329262361e-14, + 8.50855183586832271e-16, + -5.28357302902947094e-17, + 3.35602501220323969e-18, + -1.87095299208253689e-19, + 8.79439716378539415e-21, + -3.36273318713118736e-22, + 9.55229454225463315e-24, + -1.29978050185832778e-25, + 1.98223882617806610e-06, + -1.59907986981467360e-08, + 1.93582913967491111e-10, + -2.62097374764693978e-12, + 3.96804107264320086e-14, + -8.83108663592112064e-16, + 4.15406159743419175e-17, + -2.80725435155052585e-18, + 1.82444101642945076e-19, + -1.02672900276821924e-20, + 4.86526298057179450e-22, + -1.88102412829781585e-23, + 5.45911785193841126e-25, + -8.14391856818822312e-27, + 2.75915878291753658e-08, + -2.22584824485557490e-10, + 2.69529200118780052e-12, + -3.66317951108737844e-14, + 5.75010943211687508e-16, + -1.50033439997853076e-17, + 8.42134953071236063e-19, + -6.04613812255146117e-20, + 4.00067889404989821e-21, + -2.27500492937863156e-22, + 1.09021126456709151e-23, + -4.28447763842871966e-25, + 1.28318652950306582e-26, + -2.15906221475413100e-28, + 1.11765268527735260e-10, + -9.01640155192225396e-13, + 1.09226220374234908e-14, + -1.49370467205431291e-16, + 2.48018274973586068e-18, + -7.89947610295125496e-20, + 5.20492704302148868e-21, + -3.92177704995812292e-22, + 2.64273200331171245e-23, + -1.52507373964666173e-24, + 7.44127148533599992e-26, + -3.00380144623839191e-27, + 9.45914596689164115e-29, + -1.87535916882819816e-30, + 5.66377793660461278e-14, + -4.56927467311375345e-16, + 5.53990792874625355e-18, + -7.66932625776727136e-20, + 1.41216987184591211e-21, + -5.91107093723605593e-23, + 4.55498484612341697e-24, + -3.60035650329356757e-25, + 2.49221363170828646e-26, + -1.47915179128718064e-27, + 7.48694993881980572e-29, + -3.19128748598182569e-30, + 1.10660419416280003e-31, + -2.81865222509970870e-33, +# root=10 base[22]=64.0 */ + 1.13816127794921562e-01, + -8.62466140813775996e-04, + 9.80308152265597354e-06, + -1.23802247750356771e-07, + 1.64123067045796463e-09, + -2.23288122100296858e-11, + 3.04567127332373456e-13, + -3.81950951172681386e-15, + 2.14201752236128057e-17, + 1.67394337277941878e-18, + -1.26562315658526958e-19, + 6.34928254738481441e-21, + -2.58411856937494379e-22, + 8.56655870160903105e-24, + 7.05867881546663745e-02, + -5.34886572830075300e-04, + 6.07971145916685422e-06, + -7.67821837786993263e-08, + 1.01820552405869882e-09, + -1.38906262135186430e-11, + 1.93244210996467744e-13, + -2.74196730521367279e-15, + 4.05276423936902587e-17, + -6.73579633991199084e-19, + 1.44603126805060760e-20, + -4.14895520739302643e-22, + 1.33624926786642553e-23, + -3.94976520283903103e-25, + 2.68428041329064927e-02, + -2.03407149087064863e-04, + 2.31200601854495397e-06, + -2.92005098831290778e-08, + 3.87474250054424625e-10, + -5.31600913859113079e-12, + 7.69262930778290533e-14, + -1.33751585846070128e-15, + 3.69524095837176308e-17, + -1.61096273837775121e-18, + 7.91600452314527908e-20, + -3.61239392163075882e-21, + 1.43173826701163574e-22, + -4.70447568002174008e-24, + 6.10898021334781594e-03, + -4.62921271368889716e-05, + 5.26177452709992743e-07, + -6.64617756521846471e-09, + 8.82808776182395203e-11, + -1.22207694500230220e-12, + 1.87590134298982524e-14, + -4.11847506130468968e-16, + 1.62732288130550681e-17, + -8.62100794407640873e-19, + 4.50124898065560215e-20, + -2.09167977891083790e-21, + 8.35182213099941523e-23, + -2.75989041139767331e-24, + 7.98699363678766726e-04, + -6.05232004915540243e-06, + 6.87939752244217127e-08, + -8.69052237959808302e-10, + 1.15607470634297037e-11, + -1.62118610021790565e-13, + 2.69254282466902557e-15, + -7.44842235801817361e-17, + 3.64150273568578303e-18, + -2.08363588458119394e-19, + 1.11138421601761020e-20, + -5.20370603994728518e-22, + 2.08797542583849149e-23, + -6.93960675877191070e-25, + 5.62227705512623416e-05, + -4.26040584198833119e-07, + 4.84266393066401328e-09, + -6.11869489660809942e-11, + 8.15667259921161883e-13, + -1.16465620908519257e-14, + 2.13631533525147010e-16, + -7.32175265845795067e-18, + 4.09322372876114085e-19, + -2.43711661867785991e-20, + 1.31530285215264644e-21, + -6.19453797018573487e-23, + 2.49916283954259311e-24, + -8.36923902701321725e-26, + 1.92118755648546475e-06, + -1.45582358291225324e-08, + 1.65481319951342877e-10, + -2.09139373936521693e-12, + 2.79634604610439944e-14, + -4.09449322895532295e-16, + 8.48316381582767077e-18, + -3.52685515729470026e-19, + 2.15668565440539943e-20, + -1.31627047328625735e-21, + 7.16783877144323246e-23, + -3.39722533951841635e-24, + 1.38056406005118877e-25, + -4.67249774862578978e-27, + 2.67417863767029149e-08, + -2.02642145933734919e-10, + 2.30345685759173135e-12, + -2.91227556865893827e-14, + 3.91115704939343664e-16, + -5.93683117979930235e-18, + 1.42706165634204706e-19, + -7.05547847959202285e-21, + 4.60040406087939965e-22, + -2.86008077069378614e-23, + 1.57168127020877021e-24, + -7.51188251072137298e-26, + 3.08504792134787074e-27, + -1.06064894771453301e-28, + 1.08322950984135579e-10, + -8.20843638293116002e-13, + 9.33096908760838871e-15, + -1.18043886311574421e-16, + 1.59654256150870196e-18, + -2.56068969466940546e-20, + 7.40991689839484788e-22, + -4.29154519409229264e-23, + 2.94279569623261128e-24, + -1.86150629279207425e-25, + 1.03522150785276801e-26, + -5.01290026053107766e-28, + 2.09428909844059465e-29, + -7.38618563922112338e-31, + 5.48933368666937708e-14, + -4.15968751909620601e-16, + 4.72887206111936225e-18, + -5.98940538063637747e-20, + 8.21165974928968105e-22, + -1.45375295961564486e-23, + 5.41162316493083685e-25, + -3.65750492610874813e-26, + 2.62988074212999151e-27, + -1.70236475535386595e-28, + 9.67204488867988608e-30, + -4.80574906325728724e-31, + 2.07801371880941684e-32, + -7.70922943846529436e-34, +# root=10 base[23]=68.0 */ + 1.10514292089757521e-01, + -7.89569114483553553e-04, + 8.46146719804304370e-06, + -1.00752524438338620e-07, + 1.25963125319281450e-09, + -1.61940583492420178e-11, + 2.11633941616687400e-13, + -2.76607770695050572e-15, + 3.38836357174579311e-17, + -2.49161914302723131e-19, + -8.55862292467046258e-21, + 7.17610739967498533e-22, + -3.63043368494627718e-23, + 1.51025738896713614e-24, + 6.85390468708160228e-02, + -4.89677070443896045e-04, + 5.24765589897876993e-06, + -6.24851256979596452e-08, + 7.81227323220244269e-10, + -1.00466458082646792e-11, + 1.31613823142960257e-13, + -1.74832254831300805e-15, + 2.35750238711924221e-17, + -3.28239775335044711e-19, + 5.02916145108914017e-21, + -9.71028182413358081e-23, + 2.56676566141982443e-24, + -8.15687433534639870e-26, + 2.60640872842454706e-02, + -1.86214816348360740e-04, + 1.99558363610408207e-06, + -2.37620211112535107e-08, + 2.97106157433288469e-10, + -3.82320242543062091e-12, + 5.03355646641921364e-14, + -6.90754188836306479e-16, + 1.09857716088155378e-17, + -2.61990379919893499e-19, + 1.00819032290041425e-20, + -4.65823614125180159e-22, + 2.08425414935774335e-23, + -8.38711225273727189e-25, + 5.93175706579147574e-03, + -4.23794264175526779e-05, + 4.54162179762204240e-07, + -5.40788963998823178e-09, + 6.76238446645115552e-11, + -8.71060556430170726e-13, + 1.15590932616834111e-14, + -1.66613311482176437e-16, + 3.23510703441484535e-18, + -1.09580482043513118e-19, + 5.27427785297183919e-21, + -2.62731359930641346e-22, + 1.20179208864920844e-23, + -4.87410398884908122e-25, + 7.75528878867712485e-04, + -5.54076463472157529e-06, + 5.93780415736620837e-08, + -7.07046020571805459e-10, + 8.84266965731172582e-12, + -1.14067461346658358e-13, + 1.53101354164114125e-15, + -2.35814514601807561e-17, + 5.63666033245866628e-19, + -2.39101725569313502e-20, + 1.26252396315838533e-21, + -6.45641730102563637e-23, + 2.97821590126094184e-24, + -1.21306772300297621e-25, + 5.45917324601515993e-05, + -3.90030543093836127e-07, + 4.17979684010721581e-09, + -4.97718716103489222e-11, + 6.22600638803469591e-13, + -8.04779572966366158e-15, + 1.09743245702517310e-16, + -1.83975239304604405e-18, + 5.37825806565803173e-20, + -2.64656648460118609e-21, + 1.46664345207317676e-22, + -7.60413821881246451e-24, + 3.52760225797973282e-25, + -1.44298115762029541e-26, + 1.86545336104810309e-06, + -1.33277290536127320e-08, + 1.42827968085572354e-10, + -1.70079480651382681e-12, + 2.12816208187390156e-14, + -2.75886449209097454e-16, + 3.84589522185800822e-18, + -7.16399776425236819e-20, + 2.52864351307018031e-21, + -1.37820083693080211e-22, + 7.86725841996639085e-24, + -4.11830562478634805e-25, + 1.92108259001341444e-26, + -7.90049235257491578e-28, + 2.59659992876329853e-08, + -1.85514058881965060e-10, + 1.98808397728351894e-12, + -2.36748790662887144e-14, + 2.96364774616398710e-16, + -3.85827235066092928e-18, + 5.55005148543604522e-20, + -1.17816201295532426e-21, + 4.95224209433106027e-23, + -2.90678327683298053e-24, + 1.69479093166503259e-25, + -8.94977540666282958e-27, + 4.20338355076065954e-28, + -1.74181923017172572e-29, + 1.05180468472742965e-10, + -7.51461836565759741e-13, + 8.05315522240167535e-15, + -9.59051009138751901e-17, + 1.20136294014483829e-18, + -1.57451524238804856e-20, + 2.37561959520870118e-22, + -5.95305768751485920e-24, + 2.94816799021539552e-25, + -1.83349348399846829e-26, + 1.08875207477214757e-27, + -5.80978642451781906e-29, + 2.75639670770404021e-30, + -1.15609107308140892e-31, + 5.33008623305408163e-14, + -3.80808068585422190e-16, + 4.08100934462357804e-18, + -4.86055119039475438e-20, + 6.09638838242120419e-22, + -8.09158015351705180e-24, + 1.32855640743030692e-25, + -4.18667809908553620e-27, + 2.44108868883699542e-28, + -1.59944296562889592e-29, + 9.70507537196115931e-31, + -5.26900972271643737e-32, + 2.54825885226930417e-33, + -1.09447281287007879e-34, +# root=10 base[24]=72.0 */ + 1.07484195269965804e-01, + -7.26393822574555219e-04, + 7.36350046266612543e-06, + -8.29377519901983316e-08, + 9.80861848008499636e-10, + -1.19312777849279844e-11, + 1.47789497996540974e-13, + -1.85160013574398688e-15, + 2.32033151734096082e-17, + -2.78143603715579751e-19, + 2.46078237602789983e-21, + 2.89362978890364724e-23, + -3.33018284984744118e-24, + 1.71409186965004737e-25, + 6.66598333824028610e-02, + -4.50496848174742563e-04, + 4.56671529849696191e-06, + -5.14365653831112513e-08, + 6.08315251556634551e-10, + -7.39980782301665324e-12, + 9.16828992712673120e-14, + -1.15083494198947910e-15, + 1.45954193567342999e-17, + -1.87206591998964992e-19, + 2.45840055141060574e-21, + -3.46768098315660178e-23, + 5.91852006471393977e-25, + -1.38037415049127705e-26, + 2.53494583709438261e-02, + -1.71315326289335891e-04, + 1.73663443006834114e-06, + -1.95603491210153621e-08, + 2.31332017810938028e-10, + -2.81419108392816179e-12, + 3.48860358276571580e-14, + -4.39612185242490034e-16, + 5.71192495288178161e-18, + -8.27818090285447623e-20, + 1.67011405934975133e-21, + -5.47187360233036799e-23, + 2.32399265181995106e-24, + -1.00216941773924890e-25, + 5.76911929195984743e-03, + -3.89885472279657410e-05, + 3.95229411879359437e-07, + -4.45161628418865191e-09, + 5.26478545385565809e-11, + -6.40530758170370202e-13, + 7.94701001024052737e-15, + -1.00762757788076848e-16, + 1.35852557545726173e-18, + -2.30471295126032959e-20, + 6.47286150356941644e-22, + -2.75661625841163059e-23, + 1.29381479308669147e-24, + -5.74760667525922878e-26, + 7.54265315615651184e-04, + -5.09743470967555125e-06, + 5.16730260214846108e-08, + -5.82013092517484130e-10, + 6.88337194320452254e-12, + -8.37569319417197243e-14, + 1.04043644085915320e-15, + -1.33098338186000499e-17, + 1.88781203575406199e-19, + -3.81632671777716552e-21, + 1.35719683435370481e-22, + -6.49961565900580106e-24, + 3.16035528934414768e-25, + -1.41887910461499380e-26, + 5.30949284044131248e-05, + -3.58823249464180368e-07, + 3.63741477077025167e-09, + -4.09696483705699016e-11, + 4.84549872029995812e-13, + -5.89715716604084071e-15, + 7.33811613930867555e-17, + -9.50426540763561371e-19, + 1.44007767798591556e-20, + -3.48804347794060007e-22, + 1.46663242823933282e-23, + -7.48091051959073934e-25, + 3.70329118123572692e-26, + -1.67316572905374081e-27, + 1.81430608871326738e-06, + -1.22613444954350007e-08, + 1.24294063115353068e-10, + -1.39997592997886991e-12, + 1.65579943219614292e-14, + -2.01572488946865253e-16, + 2.51435033057451662e-18, + -3.31306464230340843e-20, + 5.46047305979879830e-22, + -1.58215023047212031e-23, + 7.50943049321528039e-25, + -3.98151920115567612e-26, + 1.99400169613338966e-27, + -9.05756653264152037e-29, + 2.52540597132244672e-08, + -1.70670610237287222e-10, + 1.73009953154021761e-12, + -1.94868835058734767e-14, + 2.30486428889417534e-16, + -2.80699882864778135e-18, + 3.51371575006963883e-20, + -4.74475771482331882e-22, + 8.70458238769905365e-24, + -3.00434217535530923e-25, + 1.56126527016019080e-26, + -8.50316621656506239e-28, + 4.29912611472042194e-29, + -1.96457762035915593e-30, + 1.02296614853623646e-10, + -6.91335412611877731e-13, + 7.00811529567532176e-15, + -7.89358460235140432e-17, + 9.33688125607364646e-19, + -1.13780962131504337e-20, + 1.43214123089889735e-22, + -2.00720659803029028e-24, + 4.23712238829154807e-26, + -1.73729437036577541e-27, + 9.69770383703012788e-29, + -5.39732644704295032e-30, + 2.75640081095183975e-31, + -1.27011081183721440e-32, + 5.18394513053425361e-14, + -3.50338561202657797e-16, + 3.55140772569935774e-18, + -4.00015411872661525e-20, + 4.73205264712369417e-22, + -5.77324182143475456e-24, + 7.34133199434503515e-26, + -1.09884491455137352e-27, + 2.83610285590792013e-29, + -1.39061089883960204e-30, + 8.26777746762233938e-32, + -4.70662703022431810e-33, + 2.43970471791592678e-34, + -1.14112938506237041e-35, +# root=10 base[25]=76.0 */ + 1.04690486935931429e-01, + -6.71217001789535528e-04, + 6.45511502101725957e-06, + -6.89764786724711914e-08, + 7.73903265057284172e-10, + -8.93111303886646686e-12, + 1.04974706337247748e-13, + -1.24968265432838566e-15, + 1.50041747224724047e-17, + -1.80351021689388289e-19, + 2.10925552760687933e-21, + -2.07375778321086757e-23, + -9.70310718080774956e-27, + 1.25260907599636975e-26, + 6.49272239357586295e-02, + -4.16277140941923550e-04, + 4.00335036208058905e-06, + -4.27780161581354854e-08, + 4.79961487739480599e-10, + -5.53893636683310945e-12, + 6.51052226549810003e-14, + -7.75201519542473274e-16, + 9.31980237841952761e-18, + -1.12933449701086302e-19, + 1.38009304149413458e-21, + -1.71449337430979837e-23, + 2.23757976318267679e-25, + -3.36652884201054643e-27, + 2.46905801706262772e-02, + -1.58302226693055986e-04, + 1.52239749693361607e-06, + -1.62676610049351431e-08, + 1.82520248980169574e-10, + -2.10636322475499032e-12, + 2.47596297020443934e-14, + -2.94927949745172059e-16, + 3.55552566158196470e-18, + -4.37985220699346381e-20, + 5.81484814232579577e-22, + -9.89457267227249574e-24, + 2.66218534005712433e-25, + -1.00640477175319551e-26, + 5.61916946334896795e-03, + -3.60269800110762275e-05, + 3.46472601512054886e-07, + -3.70225193748911193e-09, + 4.15386335539503181e-11, + -4.79377832495879388e-13, + 5.63537513318493732e-15, + -6.71690459904949253e-17, + 8.13296199663057617e-19, + -1.02762757104839491e-20, + 1.52866953498871907e-22, + -3.47586474211882453e-24, + 1.26357761326068018e-25, + -5.48399271462928172e-27, + 7.34660597954492280e-04, + -4.71023393269025146e-06, + 4.52984682283416034e-08, + -4.84039291817782497e-10, + 5.43084346037286415e-12, + -6.26755473506350704e-14, + 7.36872378804969156e-16, + -8.79096379243620621e-18, + 1.07113452613060109e-19, + -1.40217326739381395e-21, + 2.38942902990640309e-23, + -6.87804925377080869e-25, + 2.90810469912919686e-26, + -1.32804781454341332e-27, + 5.17148953312465267e-05, + -3.31567060385975841e-07, + 3.18869088655634011e-09, + -3.40729362185735266e-11, + 3.82293426994636478e-13, + -4.41199322245338300e-15, + 5.18797717728676908e-17, + -6.19727042433203047e-19, + 7.61743959185452211e-21, + -1.04521067067786349e-22, + 2.07056140550160440e-24, + -7.16699662860440584e-26, + 3.30175280209774439e-27, + -1.54686765736356162e-28, + 1.76714899696298843e-06, + -1.13299735895381267e-08, + 1.08960714321397036e-10, + -1.16430600261827829e-12, + 1.30633706515666452e-14, + -1.50765951191160464e-16, + 1.77322312572589533e-18, + -2.12201845698437613e-20, + 2.64023034670466515e-22, + -3.85246769753418715e-24, + 8.95654415320889253e-26, + -3.57830266909893160e-27, + 1.73963193944058246e-28, + -8.27950696379821243e-30, + 2.45976610931685924e-08, + -1.57706481512287088e-10, + 1.51666823308819871e-12, + -1.62064488948680337e-14, + 1.81834876761869776e-16, + -2.09864815960952843e-18, + 2.46910561649145330e-20, + -2.96249443581260948e-22, + 3.75046169641970683e-24, + -5.93279375914147613e-26, + 1.63026397086987569e-27, + -7.29346247962897536e-29, + 3.67970176245350494e-30, + -1.77193433024995970e-31, + 9.96377410818769600e-11, + -6.38821614715711030e-13, + 6.14356780351749938e-15, + -6.56474785385491152e-17, + 7.36561865410050937e-19, + -8.50146800377960503e-21, + 1.00071544868350790e-22, + -1.20554495438009957e-24, + 1.56696944121427898e-26, + -2.76649058311311307e-28, + 9.06160150035723504e-30, + -4.44625874122297474e-31, + 2.30826432868732845e-32, + -1.12370797924525520e-33, + 5.04920503355103919e-14, + -3.23726860895116929e-16, + 3.11329159788550049e-18, + -3.32672888785164120e-20, + 3.73260414688458488e-22, + -4.30860776226672847e-24, + 5.07632107929462439e-26, + -6.16071403624621255e-28, + 8.39002761160206319e-30, + -1.74689996425508120e-31, + 6.95036618110202880e-33, + -3.70125370031484737e-34, + 1.97372666375941941e-35, + -9.74391299656693755e-37, +# root=10 base[26]=80.0 */ + 1.02103938890331272e-01, + -6.22689192206672833e-04, + 5.69621055518368508e-06, + -5.78971098272239541e-08, + 6.17897574028150315e-10, + -6.78281874885975824e-12, + 7.58354008674688529e-14, + -8.58877726475573771e-16, + 9.81976001565390794e-18, + -1.13026755129586486e-19, + 1.30355852894549984e-21, + -1.48077758358443607e-23, + 1.52894008813248035e-25, + -7.91808539702258521e-28, + 6.33230917066156529e-02, + -3.86181035241125699e-04, + 3.53269097452147048e-06, + -3.59067832101622535e-08, + 3.83209362880430307e-10, + -4.20658739984696943e-12, + 4.70319036912882278e-14, + -5.32671543065524674e-16, + 6.09096513493731825e-18, + -7.01684774823441123e-20, + 8.13358792166313631e-22, + -9.48823612182159156e-24, + 1.11921822468271026e-25, + -1.36249414818063880e-27, + 2.40805593964781260e-02, + -1.46857253907057319e-04, + 1.34341474106690367e-06, + -1.36546622129193390e-08, + 1.45727188599021765e-10, + -1.59968533418606986e-12, + 1.78854138090750075e-14, + -2.02573014931412396e-16, + 2.31700032383965366e-18, + -2.67397140025666477e-20, + 3.13168347337207005e-22, + -3.84786520919894194e-24, + 5.60184928547932967e-26, + -1.20430141832619229e-27, + 5.48033878045284164e-03, + -3.34222926689250644e-05, + 3.05739072895740471e-07, + -3.10757627596340587e-09, + 3.31651101399981617e-11, + -3.64062286550607161e-13, + 4.07045496374553958e-15, + -4.61052488362315233e-17, + 5.27572000453524227e-19, + -6.10573741087607005e-21, + 7.26683557500457726e-23, + -9.62406939534561591e-25, + 1.76210420876282401e-26, + -5.22759788869777012e-28, + 7.16509617960043210e-04, + -4.36969229659636526e-06, + 3.99728913000249975e-08, + -4.06290265886706072e-10, + 4.33606810298788283e-12, + -4.75982225606707323e-14, + 5.32184336241103138e-16, + -6.02844613542758045e-18, + 6.90251002457083453e-20, + -8.02105236889466801e-22, + 9.76561008176753878e-24, + -1.42288812398632903e-25, + 3.23020187824765461e-27, + -1.15701071991422712e-28, + 5.04371950799545487e-05, + -3.07595344542417744e-07, + 2.81380803050660712e-09, + -2.85999531811636036e-11, + 3.05228471709545075e-13, + -3.35058183635365669e-15, + 3.74625465628101642e-17, + -4.24415043077283662e-19, + 4.86374341171542177e-21, + -5.68406352094657786e-23, + 7.13617917428100815e-25, + -1.16470018852979766e-26, + 3.19338988676619440e-28, + -1.28549554827886043e-29, + 1.72348871875515257e-06, + -1.05108364060550661e-08, + 9.61505966269441038e-11, + -9.77288626248533192e-13, + 1.04299595413697012e-14, + -1.14492904526554904e-16, + 1.28015809611375403e-18, + -1.45053156422373210e-20, + 1.66431674052493681e-22, + -1.96042685979720993e-24, + 2.56433624872519702e-26, + -4.76548837473194924e-28, + 1.53536717149489198e-29, + -6.67457668424636110e-31, + 2.39899360351543533e-08, + -1.46304579958539829e-10, + 1.33835901502607146e-12, + -1.36032755336135719e-14, + 1.45178852249659019e-16, + -1.59367733355477522e-18, + 1.78195545448339800e-20, + -2.01958010735715843e-22, + 2.32129491541497070e-24, + -2.76523818336856034e-26, + 3.82320919354668628e-28, + -8.22345539725589019e-30, + 3.03966817306088257e-31, + -1.39470745510722602e-32, + 9.71760293053225577e-11, + -5.92635934044140541e-13, + 5.42129061029545057e-15, + -5.51027866270187842e-17, + 5.88076133895275954e-19, + -6.45553514594105129e-21, + 7.21848662701605295e-23, + -8.18398750997841394e-25, + 9.43200287772368498e-27, + -1.14297574520194182e-28, + 1.70867173270665433e-30, + -4.33889685056409524e-32, + 1.80660619519364537e-33, + -8.63672368104779327e-35, + 4.92445624497196175e-14, + -3.00321977278552501e-16, + 2.74727302913743351e-18, + -2.79236837053880748e-20, + 2.98011435414283861e-22, + -3.27140694417340014e-24, + 3.65830320232884496e-26, + -4.15027238710254464e-28, + 4.80647459309618962e-30, + -6.00359464702626550e-32, + 1.01513620702336782e-33, + -3.14739708179494933e-35, + 1.46242319917377575e-36, + -7.24731972626156432e-38, +# root=10 base[27]=84.0 */ + 9.97001457526636853e-02, + -5.79740206460299082e-04, + 5.05658617105021627e-06, + -4.90046928133262129e-08, + 4.98662533194986473e-10, + -5.21927299485417762e-12, + 5.56393467217489245e-14, + -6.00837885847773238e-16, + 6.55065038865630960e-18, + -7.19429471513429499e-20, + 7.94444746426712585e-22, + -8.79509148290234635e-24, + 9.66591857623372436e-26, + -1.01030707809531378e-27, + 6.18323009011422370e-02, + -3.59544819315251005e-04, + 3.13600702688360062e-06, + -3.03918604020521427e-08, + 3.09261853131354656e-10, + -3.23690262013731050e-12, + 3.45065634000053104e-14, + -3.72629828630171273e-16, + 4.06265335185308712e-18, + -4.46220364737137148e-20, + 4.93004334664740639e-22, + -5.47400570333575587e-24, + 6.10769232094965591e-26, + -6.86468223289659241e-28, + 2.35136401957340355e-02, + -1.36728010965282877e-04, + 1.19256343055531134e-06, + -1.15574426318317456e-08, + 1.17606361893583991e-10, + -1.23093212996911254e-12, + 1.31221898989675313e-14, + -1.41704455809769419e-16, + 1.54499135335149166e-18, + -1.69722565869817287e-20, + 1.87718404264666754e-22, + -2.09693198629814483e-24, + 2.41148536196783472e-26, + -3.08140180442009492e-28, + 5.35131730590686014e-03, + -3.11170437750266270e-05, + 2.71407798675478784e-07, + -2.63028362536372213e-09, + 2.67652714166008355e-11, + -2.80139896157570914e-13, + 2.98639595425786738e-15, + -3.22497685371293593e-17, + 3.51629742150438589e-19, + -3.86381363739961958e-21, + 4.28075576131262578e-23, + -4.82739015595761720e-25, + 5.80903504813116279e-27, + -8.71488482625556051e-29, + 6.99641111990027906e-04, + -4.06829979687003770e-06, + 3.54843570686000271e-08, + -3.43888141144503510e-10, + 3.49934105528875788e-12, + -3.66260101338364843e-14, + 3.90447229701521036e-16, + -4.21642596705816062e-18, + 4.59755807669272907e-20, + -5.05390162745997152e-22, + 5.61298419952796410e-24, + -6.41571800194657059e-26, + 8.20274240142211570e-28, + -1.46224399986832223e-29, + 4.92497719037775119e-05, + -2.86379450261587773e-07, + 2.49784705595236305e-09, + -2.42072860327517285e-11, + 2.46328792013581975e-13, + -2.57821157948426389e-15, + 2.74847454762115897e-17, + -2.96809584501445224e-19, + 3.23663542445197747e-21, + -3.55982982942910473e-23, + 3.96713416033497062e-25, + -4.61903458188721687e-27, + 6.37441646438726608e-29, + -1.34865239528126682e-30, + 1.68291329727714269e-06, + -9.78586836613209251e-09, + 8.53538983556843766e-11, + -8.27186847818916305e-13, + 8.41729793783465975e-15, + -8.81000450202580674e-17, + 9.39182285196091222e-19, + -1.01424236491009285e-20, + 1.10612373134783396e-22, + -1.21749704279100693e-24, + 1.36324343964296088e-26, + -1.62756188479310264e-28, + 2.46601718717923301e-30, + -6.14330027203254156e-32, + 2.34251503447870321e-08, + -1.36213456808499403e-10, + 1.18807540756268403e-12, + -1.15139480560921492e-14, + 1.17163773462064538e-16, + -1.22630036200981302e-18, + 1.30728858031809678e-20, + -1.41179415350874615e-22, + 1.53992368000949409e-24, + -1.69681220068283590e-26, + 1.91281257352077017e-28, + -2.36407714617044298e-30, + 4.01131283001256993e-32, + -1.16479284232406091e-33, + 9.48882520174462929e-11, + -5.51759823420002497e-13, + 4.81253682620030125e-15, + -4.66395472385958086e-17, + 4.74595284244777830e-19, + -4.96737604162712259e-21, + 5.29545075908709332e-23, + -5.71893392486887464e-25, + 6.23940582281543948e-27, + -6.88646213064016615e-29, + 7.84312105158439709e-31, + -1.01920590980998415e-32, + 1.98804831133831139e-34, + -6.67137146189242696e-36, + 4.80852169575142202e-14, + -2.79607751787468420e-16, + 2.43878322660116544e-18, + -2.36348831852182838e-20, + 2.40504145871210410e-22, + -2.51725020907273619e-24, + 2.68351815282223413e-26, + -2.89826629631315080e-28, + 3.16333107879909759e-30, + -3.50169539382580793e-32, + 4.06104405052652187e-34, + -5.73036716144200213e-36, + 1.34354278078417627e-37, + -5.20358506962313682e-39, +# root=10 base[28]=88.0 */ + 9.74585475369953019e-02, + -5.41511594823777744e-04, + 4.51317709498519711e-06, + -4.17939447048369262e-08, + 4.06380821868854875e-10, + -4.06431422679672120e-12, + 4.14009349340240421e-14, + -4.27205444566957444e-16, + 4.45060432708568795e-18, + -4.67093498943748456e-20, + 4.93082253415357207e-22, + -5.22889267697441707e-24, + 5.56018996035785115e-26, + -5.89601663286118216e-28, + 6.04421005727041882e-02, + -3.35836097528541071e-04, + 2.79899414439770415e-06, + -2.59198795080480665e-08, + 2.52030336266450069e-10, + -2.52061718235306918e-12, + 2.56761419626213607e-14, + -2.64945437432087240e-16, + 2.76019049691603012e-18, + -2.89685647572268606e-20, + 3.05818282548425976e-22, + -3.24400201950944915e-24, + 3.45511816599471413e-26, + -3.69368567341461783e-28, + 2.29849736275086688e-02, + -1.27712037995333970e-04, + 1.06440388376579903e-06, + -9.85683391675280144e-09, + 9.58423115393267467e-11, + -9.58542456764912335e-13, + 9.76414542740102275e-15, + -1.00753701855813618e-16, + 1.04964987090909821e-18, + -1.10163757619381751e-20, + 1.16310345993728070e-22, + -1.23452121091104875e-24, + 1.31924072427658208e-26, + -1.43375242486246010e-28, + 5.23100150061048264e-03, + -2.90651567944405941e-05, + 2.42240796246688241e-07, + -2.24325308551393525e-09, + 2.18121318611577760e-11, + -2.18148479371762818e-13, + 2.22215879520008946e-15, + -2.29298922666107108e-17, + 2.38883842569204625e-19, + -2.50721234762022239e-21, + 2.64751819543256573e-23, + -2.81277027165288797e-25, + 3.02156822557750790e-27, + -3.36798817800230142e-29, + 6.83910801302858190e-04, + -3.80003230183732574e-06, + 3.16710092799780114e-08, + -2.93287053174029444e-10, + 2.85175842178584055e-12, + -2.85211353839800134e-14, + 2.90529162381705439e-16, + -2.99789814580080376e-18, + 3.12322686385144518e-20, + -3.27810123843458101e-22, + 3.46233075465981592e-24, + -3.68351125885770923e-26, + 3.98670017986578919e-28, + -4.60186553513360774e-30, + 4.81424696025802319e-05, + -2.67495321365770956e-07, + 2.22941441872393359e-09, + -2.06453283318071971e-11, + 2.00743566163742722e-13, + -2.00768565006718145e-15, + 2.04511939133880162e-17, + -2.11030928730212362e-19, + 2.19854522230560075e-21, + -2.30767365413495206e-23, + 2.43813391291132478e-25, + -2.59886354548954741e-27, + 2.84198534225848583e-29, + -3.43479530409895195e-31, + 1.64507568514704590e-06, + -9.14057905010032335e-09, + 7.61812902960540001e-11, + -7.05471238428638505e-13, + 6.85960571943443429e-15, + -6.86046000886416923e-17, + 6.98837546115905431e-19, + -7.21114272801038592e-21, + 7.51271707958318438e-23, + -7.88613102532715851e-25, + 8.33561054936997645e-27, + -8.90879023521276299e-29, + 9.88112657630549250e-31, + -1.26700105205384101e-32, + 2.28984733292392974e-08, + -1.27231414020823379e-10, + 1.06039816877973343e-12, + -9.81973928873423227e-15, + 9.54816244380195870e-17, + -9.54935167035760283e-19, + 9.72740366590977830e-21, + -1.00374961424753657e-22, + 1.04573949675269618e-24, + -1.09781768523136315e-26, + 1.16111336410300218e-28, + -1.24565993985653827e-30, + 1.40923503406005368e-32, + -1.95007347113342217e-34, + 9.27548415313858136e-11, + -5.15376264418773299e-13, + 4.29535465929835380e-15, + -3.97768160595981679e-17, + 3.86767398295014503e-19, + -3.86815576745461198e-21, + 3.94028007987109129e-23, + -4.06589758475217891e-25, + 4.23606252985339289e-27, + -4.44763580466567898e-29, + 4.70852219557788991e-31, + -5.08040063872580705e-33, + 5.91797632108232608e-35, + -9.05889980297425617e-37, + 4.70040978105109554e-14, + -2.61170155023778421e-16, + 2.17669791898661812e-18, + -2.01571510660397851e-20, + 1.95996805734435721e-22, + -1.96021226094636691e-24, + 1.99676240436872302e-26, + -2.06042721510431248e-28, + 2.14672709020096093e-30, + -2.25449489374433144e-32, + 2.39072237832380323e-34, + -2.60564863181559395e-36, + 3.18868333997612771e-38, + -5.64763587971900722e-40, +# root=10 base[29]=92.0 */ + 9.53616839753069073e-02, + -5.07307597915854225e-04, + 4.04814429123171612e-06, + -3.58919511143007259e-08, + 3.34138901470764515e-10, + -3.19956741295474495e-12, + 3.12050082498673906e-14, + -3.08291208516930952e-16, + 3.07506191926095993e-18, + -3.08995033611757066e-20, + 3.12316477428163219e-22, + -3.17177470338118161e-24, + 3.23353685586166867e-26, + -3.30509458556092285e-28, + 5.91416621659579880e-02, + -3.14623371981687463e-04, + 2.51058886641592219e-06, + -2.22595654647740613e-08, + 2.07227150398036274e-10, + -1.98431620685462440e-12, + 1.93528048189595090e-14, + -1.91196861167603827e-16, + 1.90710020607340285e-18, + -1.91633481771575446e-20, + 1.93694170645546564e-22, + -1.96714085472838078e-24, + 2.00575878110750887e-26, + -2.05186673097329974e-28, + 2.24904417995271735e-02, + -1.19645244607245697e-04, + 9.54728878336629614e-07, + -8.46488656615091596e-09, + 7.88045177402337894e-11, + -7.54597461975558389e-13, + 7.35950115652562422e-15, + -7.27085068825547481e-17, + 7.25233810072008294e-19, + -7.28746397260305961e-21, + 7.36588969896348745e-23, + -7.48113977785354425e-25, + 7.63045937609890545e-27, + -7.81936196084922712e-29, + 5.11845420009172849e-03, + -2.72292874564088786e-05, + 2.17280571045688644e-07, + -1.92646878989952284e-09, + 1.79346105520695998e-11, + -1.71733956308259363e-13, + 1.67490127728346639e-15, + -1.65472593032418156e-17, + 1.65051313892728054e-19, + -1.65851023052544646e-21, + 1.67638079932060083e-23, + -1.70275670930624846e-25, + 1.73762555749421588e-27, + -1.78549938046936640e-29, + 6.69196159283873466e-04, + -3.56000735252038252e-06, + 2.84076633191677788e-08, + -2.51870089051299336e-10, + 2.34480412068289897e-12, + -2.24528147597798001e-14, + 2.18979688403210230e-16, + -2.16341933732095130e-18, + 2.15791214825091861e-20, + -2.16837337111937995e-22, + 2.19177936273463979e-24, + -2.22654015492915289e-26, + 2.27379747717034162e-28, + -2.34559370400821636e-30, + 4.71066631717381997e-05, + -2.50599267371094950e-07, + 1.99969800918204830e-09, + -1.77298678173615204e-11, + 1.65057578987775855e-13, + -1.58051890744842417e-15, + 1.54146169693806850e-17, + -1.52289384769384064e-19, + 1.51901785221702506e-21, + -1.52638735307672093e-23, + 1.54290423906690802e-25, + -1.56764380511443391e-27, + 1.60254444467056382e-29, + -1.66211117693015724e-31, + 1.60968115744699894e-06, + -8.56322421494050543e-09, + 6.83316539367190642e-11, + -6.05847076147831963e-13, + 5.64018032502944109e-15, + -5.40078904832175973e-17, + 5.26732673862909133e-19, + -5.20387890812134366e-21, + 5.19063742980416311e-23, + -5.21584589146449397e-25, + 5.27247818399949619e-27, + -5.35829568006023205e-29, + 5.48530507983316531e-31, + -5.73172203734660507e-33, + 2.24058025932615110e-08, + -1.19194978728643984e-10, + 9.51135907812675831e-13, + -8.43303030982410338e-15, + 7.85079494619629091e-17, + -7.51757655803122945e-19, + 7.33180503801333634e-21, + -7.24349010889586018e-23, + 7.22506500109460213e-25, + -7.26020508983159224e-27, + 7.33941303997600330e-29, + -7.46139304788487414e-31, + 7.65352066405470176e-33, + -8.08156844531893375e-35, + 9.07591802754705539e-11, + -4.82823077519097791e-13, + 3.85276603970508791e-15, + -3.41596742618154824e-17, + 3.18012135878384435e-19, + -3.04514459569164895e-21, + 2.96989416744939298e-23, + -2.93412084550743534e-25, + 2.92666116489412704e-27, + -2.94092656635958367e-29, + 2.97324217486523289e-31, + -3.02419609464263993e-33, + 3.11142078028836742e-35, + -3.33711769573126275e-37, + 4.59927839500053457e-14, + -2.44673623351514041e-16, + 1.95241335957725116e-18, + -1.73106292208281036e-20, + 1.61154644810553812e-22, + -1.54314612928278676e-24, + 1.50501253539927576e-26, + -1.48688453133460777e-28, + 1.48310758408836933e-30, + -1.49036399296218743e-32, + 1.50694326857767805e-34, + -1.53412976859703843e-36, + 1.58669180574404311e-38, + -1.74786337210801619e-40, +# root=10 base[30]=96.0 */ + 9.33946183175933392e-02, + -4.76558984233788356e-04, + 3.64753074305698165e-06, + -3.10197153944395011e-08, + 2.76990949381530379e-10, + -2.54406156457809021e-12, + 2.37989872651748608e-14, + -2.25524197714598810e-16, + 2.15766357315607626e-18, + -2.07959807512389360e-20, + 2.01614675278786356e-22, + -1.96398026690125277e-24, + 1.92073498002930357e-26, + -1.88442853505101528e-28, + 5.79217221676576535e-02, + -2.95553615171109414e-04, + 2.26213529326601359e-06, + -1.92378893898011255e-08, + 1.71784981854930428e-10, + -1.57778285061678068e-12, + 1.47597190623997134e-14, + -1.39866195336288828e-16, + 1.33814552617911813e-18, + -1.28973071087253447e-20, + 1.25037969264136258e-22, + -1.21802958552071728e-24, + 1.19122587663441825e-26, + -1.16880082160933994e-28, + 2.20265219750606610e-02, + -1.12393381200432080e-04, + 8.60246741342690446e-07, + -7.31580100763749530e-09, + 6.53265396160369397e-11, + -6.00000609971978042e-13, + 5.61283857139161944e-15, + -5.31884362753022259e-17, + 5.08871129054210687e-19, + -4.90459942734659230e-21, + 4.75495810195056711e-23, + -4.63195753316023092e-25, + 4.53015559939426427e-27, + -4.44559498475865974e-29, + 5.01287368748052839e-03, + -2.55788827625412252e-05, + 1.95777992517394212e-07, + -1.66495583894513822e-09, + 1.48672446746870117e-11, + -1.36550258530994266e-13, + 1.27738963158150450e-15, + -1.21048122548822134e-17, + 1.15810691283819696e-19, + -1.11620623161497457e-21, + 1.08215142920666002e-23, + -1.05416595505223459e-25, + 1.03104328717855344e-27, + -1.01205656966686050e-29, + 6.55392367988178858e-04, + -3.34423039345713068e-06, + 2.55963764729201637e-08, + -2.17679402656260278e-10, + 1.94377103838597233e-12, + -1.78528330990888551e-14, + 1.67008280650063013e-16, + -1.58260552363738461e-18, + 1.51413041260373711e-20, + -1.45934896348796672e-22, + 1.41482714772650663e-24, + -1.37825237158424446e-26, + 1.34810737844015826e-28, + -1.32376872164626639e-30, + 4.61349741713782587e-05, + -2.35410099905322211e-07, + 1.80180335496422452e-09, + -1.53230860011622077e-11, + 1.36827694418225534e-13, + -1.25671282449952963e-15, + 1.17561984129990520e-17, + -1.11404204211325007e-19, + 1.06584045282389603e-21, + -1.02727846645722555e-23, + 9.95940274663921673e-26, + -9.70207828207189280e-28, + 9.49071842646662451e-30, + -9.32412993415188723e-32, + 1.57647758560673538e-06, + -8.04419537653977166e-09, + 6.15693983531987692e-11, + -5.23604966883128938e-13, + 4.67553731664982048e-15, + -4.29431171255462610e-17, + 4.01720898955441535e-19, + -3.80679159023239339e-21, + 3.64208215460599700e-23, + -3.51031330326068075e-25, + 3.40323706086387668e-27, + -3.31537083653539038e-29, + 3.24354318944165300e-31, + -3.18885729544283556e-33, + 2.19436286573846378e-08, + -1.11970406558176815e-10, + 8.57009339337489058e-13, + -7.28826915228535110e-15, + 6.50806935583987889e-17, + -5.97742603025372272e-19, + 5.59171555369529492e-21, + -5.29882710250338129e-23, + 5.06956167625909620e-25, + -4.88614975077478413e-27, + 4.73712450772354946e-29, + -4.61494568357181288e-31, + 4.51574453103540106e-33, + -4.44403574218455912e-35, + 8.88870524018862117e-11, + -4.53558504411156379e-13, + 3.47148756680049019e-15, + -2.95225904600027272e-17, + 2.63622352939803443e-19, + -2.42127584779572120e-21, + 2.26503611415265880e-23, + -2.14639581344841118e-25, + 2.05352744816404887e-27, + -1.97923426616211197e-29, + 1.91887978126383553e-31, + -1.86946488324738094e-33, + 1.82975400354847402e-35, + -1.80339175636626161e-37, + 4.50440714059386731e-14, + -2.29843617348181395e-16, + 1.75919810161769765e-18, + -1.49607579150728492e-20, + 1.33592281094031331e-22, + -1.22699672500546178e-24, + 1.14782126133045590e-26, + -1.08769956065478702e-28, + 1.04063808585292532e-30, + -1.00299083091563284e-32, + 9.72415503622946120e-35, + -9.47440473859238106e-37, + 9.27730348877915447e-39, + -9.16732804946075812e-41, + ])","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/kin_mat_symm.py",".py","30032","671","import numpy as np +from numba import njit, prange +from .integral_helpers import calcS + +def kin_mat_symm(basis, slice=None): + """""" + Compute the kinetic energy matrix for a given basis set. + + This function evaluates the one-electron kinetic energy integrals + ⟨χ_i | -½∇² | χ_j⟩ for a set of contracted Gaussian basis functions defined in `basis`. + It uses an optimized backend with improved memory layout, early termination, + and partial vectorization for enhanced performance. + + Block-wise computation is supported through the optional `slice` parameter. + + Parameters + ---------- + basis : object + Basis set object containing properties such as: + - bfs_coords: Cartesian coordinates of basis function centers. + - bfs_coeffs: Contraction coefficients. + - bfs_expnts: Gaussian exponents. + - bfs_prim_norms: Normalization constants for primitives. + - bfs_contr_prim_norms: Normalization constants for contracted functions. + - bfs_lmn: Angular momentum quantum numbers (ℓ, m, n). + - bfs_nprim: Number of primitives per basis function. + - bfs_nao: Number of atomic orbitals (contracted basis functions). + + slice : list of int, optional + A 4-element list `[start_row, end_row, start_col, end_col]` specifying the + matrix block to compute. Rows and columns refer to AOs. If `None` (default), + the entire kinetic energy matrix is calculated. + + Returns + ------- + T : ndarray of shape (end_row - start_row, end_col - start_col) + The computed (sub)matrix of kinetic energy integrals. + + Notes + ----- + Internally, this function: + - Pads coefficient/exponent arrays for uniform shape and Numba compatibility. + - Reduces redundant operations and loops. + - Utilizes an optimized `kin_mat_symm_internal_optimized` backend. + + Examples + -------- + >>> T = kin_mat_symm(basis) + >>> T_block = kin_mat_symm(basis, slice=[0, 10, 0, 10]) + """""" + + # Convert to numpy arrays (same as before) + bfs_coords = np.array(basis.bfs_coords) # Remove unnecessary list wrapping + bfs_contr_prim_norms = np.array(basis.bfs_contr_prim_norms) + bfs_lmn = np.array(basis.bfs_lmn) + bfs_nprim = np.array(basis.bfs_nprim) + + # Optimize the coefficient/exponent arrays + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros((basis.bfs_nao, maxnprim)) + bfs_expnts = np.zeros((basis.bfs_nao, maxnprim)) + bfs_prim_norms = np.zeros((basis.bfs_nao, maxnprim)) + + # Vectorized assignment (faster than nested loops) + for i in range(basis.bfs_nao): + n = basis.bfs_nprim[i] + bfs_coeffs[i, :n] = basis.bfs_coeffs[i] + bfs_expnts[i, :n] = basis.bfs_expnts[i] + bfs_prim_norms[i, :n] = basis.bfs_prim_norms[i] + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + a, b, c, d = map(int, slice) + + T = kin_mat_symm_internal_optimized( + bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, + bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d + ) + + return T + +@njit(parallel=True, cache=True, fastmath=True) # Added fastmath for better performance +def kin_mat_symm_internal_optimized(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, + bfs_coeffs, bfs_prim_norms, bfs_expnts, + start_row, end_row, start_col, end_col): + """""" + Optimized internal function with several improvements: + 1. Pre-compute commonly used values + 2. Better loop structure + 3. Early termination conditions + 4. Reduced memory allocations + """""" + + num_rows = end_row - start_row + num_cols = end_col - start_col + + # Determine triangle type (same logic as before) + upper_tri = end_row <= start_col + lower_tri = start_row >= end_col + both_tri_symm = start_row == start_col and end_row == end_col + both_tri_nonsymm = not (upper_tri or lower_tri or both_tri_symm) + + T = np.zeros((num_rows, num_cols)) + + # Pre-compute some constants + CUTOFF = 1.0e-9 # Threshold for early termination + + for i in prange(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + nprim_i = bfs_nprim[i] + + # Pre-compute for this row + lmni_0, lmni_1, lmni_2 = lmni[0], lmni[1], lmni[2] + + for j in range(start_col, end_col): + if not (lower_tri or upper_tri or (both_tri_symm and j <= i) or both_tri_nonsymm): + continue + + J = bfs_coords[j] + IJ = I - J + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + nprim_j = bfs_nprim[j] + + # Pre-compute commonly used values + lmnj_0, lmnj_1, lmnj_2 = lmnj[0], lmnj[1], lmnj[2] + fac1 = np.sum(IJ * IJ) # Slightly faster than IJ**2 + fac2 = Ni * Nj + fac3 = 2 * (lmnj_0 + lmnj_1 + lmnj_2) + 3 + fac4 = lmnj_0 * (lmnj_0 - 1) + fac5 = lmnj_1 * (lmnj_1 - 1) + fac6 = lmnj_2 * (lmnj_2 - 1) + + result_sum = 0.0 + + for ik in range(nprim_i): # Use actual number of primitives + alphaik = bfs_expnts[i, ik] + dik = bfs_coeffs[i, ik] + Nik = bfs_prim_norms[i, ik] + + for jk in range(nprim_j): # Use actual number of primitives + alphajk = bfs_expnts[j, jk] + gamma = alphaik + alphajk + + # Early termination check + temp_1 = np.exp(-alphaik * alphajk / gamma * fac1) + if temp_1 < CUTOFF: + continue + + djk = bfs_coeffs[j, jk] + Njk = bfs_prim_norms[j, jk] + + # Pre-compute P, PI, PJ once + gamma_inv = 1.0 / gamma + P = (alphaik * I + alphajk * J) * gamma_inv + PI = P - I + PJ = P - J + + # Pre-compute coefficient term + temp_coeff = (dik * djk * Nik * Njk * fac2 * temp_1) + + # Calculate overlaps more efficiently + # Group similar calculations together + PI_0, PI_1, PI_2 = PI[0], PI[1], PI[2] + PJ_0, PJ_1, PJ_2 = PJ[0], PJ[1], PJ[2] + + # Base overlap + Sx_base = calcS(lmni_0, lmnj_0, gamma, PI_0, PJ_0) + Sy_base = calcS(lmni_1, lmnj_1, gamma, PI_1, PJ_1) + Sz_base = calcS(lmni_2, lmnj_2, gamma, PI_2, PJ_2) + overlap1 = Sx_base * Sy_base * Sz_base + + # +2 overlaps + Sx_p2 = calcS(lmni_0, lmnj_0 + 2, gamma, PI_0, PJ_0) + Sy_p2 = calcS(lmni_1, lmnj_1 + 2, gamma, PI_1, PJ_1) + Sz_p2 = calcS(lmni_2, lmnj_2 + 2, gamma, PI_2, PJ_2) + + overlap2 = Sx_p2 * Sy_base * Sz_base + overlap3 = Sx_base * Sy_p2 * Sz_base + overlap4 = Sx_base * Sy_base * Sz_p2 + + # -2 overlaps (only if needed) + overlap5 = overlap6 = overlap7 = 0.0 + if fac4 != 0.0: + Sx_m2 = calcS(lmni_0, lmnj_0 - 2, gamma, PI_0, PJ_0) + overlap5 = Sx_m2 * Sy_base * Sz_base + if fac5 != 0.0: + Sy_m2 = calcS(lmni_1, lmnj_1 - 2, gamma, PI_1, PJ_1) + overlap6 = Sx_base * Sy_m2 * Sz_base + if fac6 != 0.0: + Sz_m2 = calcS(lmni_2, lmnj_2 - 2, gamma, PI_2, PJ_2) + overlap7 = Sx_base * Sy_base * Sz_m2 + + # Combine terms + part1 = overlap1 * alphajk * fac3 + part2 = 2 * alphajk * alphajk * (overlap2 + overlap3 + overlap4) + part3 = 0.5 * (fac4 * overlap5 + fac5 * overlap6 + fac6 * overlap7) + + result = temp_coeff * (part1 - part2 - part3) + result_sum += result + + T[i - start_row, j - start_col] = result_sum + + # Handle symmetry + if both_tri_symm: + for i in prange(start_row, end_row): + for j in range(start_col, min(i, end_col)): # Only fill upper triangle + T[j - start_col, i - start_row] = T[i - start_row, j - start_col] + + return T + +# Alternative: Consider using a block-based approach for very large matrices +@njit(parallel=True, cache=True, fastmath=True) +def kin_mat_symm_blocked(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, + bfs_coeffs, bfs_prim_norms, bfs_expnts, + start_row, end_row, start_col, end_col, block_size=64): + """""" + Block-based computation for better cache locality with large matrices. + This can be particularly beneficial for very large basis sets. + """""" + num_rows = end_row - start_row + num_cols = end_col - start_col + T = np.zeros((num_rows, num_cols)) + + # Process in blocks for better cache locality + for i_block in range(0, num_rows, block_size): + for j_block in range(0, num_cols, block_size): + i_end = min(i_block + block_size, num_rows) + j_end = min(j_block + block_size, num_cols) + + # Call the optimized function for this block + block_result = kin_mat_symm_internal_optimized( + bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, + bfs_coeffs, bfs_prim_norms, bfs_expnts, + start_row + i_block, start_row + i_end, + start_col + j_block, start_col + j_end + ) + + T[i_block:i_end, j_block:j_end] = block_result + + return T + + + + + + + + +######### SHELL BASED IMPLEMENTATION (very slow for ano-rcc for some reason https://claude.ai/chat/b28b3466-9530-4c68-9f3c-758a2c8b1a37) + + + + + + +# import numpy as np +# from numba import njit, prange +# from .integral_helpers import calcS + +# def kin_mat_symm(basis, slice=None): +# """""" +# Shell-based kinetic energy matrix calculation. +# This approach groups basis functions by shells (same center, same angular momentum) +# to avoid recomputing primitive integrals for functions that differ only in orientation. +# """""" + +# # First, we need to organize basis functions into shells +# shells_info = organize_basis_into_shells(basis) + +# if slice is None: +# slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + +# a, b, c, d = map(int, slice) + +# T = kin_mat_shell_internal(*shells_info, a, b, c, d) + +# return T + +# def organize_basis_into_shells(basis): +# """""" +# Organize basis functions into shells and return Numba-compatible arrays. +# """""" +# shells = [] +# shell_map = {} + +# for ibf in range(basis.bfs_nao): +# # Create a shell identifier +# center = tuple(basis.bfs_coords[ibf]) +# L = sum(basis.bfs_lmn[ibf]) # Total angular momentum + +# # Primitive data (exponents and coefficients should be identical for same shell) +# prim_key = (tuple(basis.bfs_expnts[ibf]), tuple(basis.bfs_coeffs[ibf])) + +# shell_key = (center, L, prim_key) + +# if shell_key not in shell_map: +# # Create new shell +# shell_idx = len(shells) +# shell_info = { +# 'center': np.array(center), +# 'L': L, +# 'exponents': np.array(basis.bfs_expnts[ibf]), +# 'coefficients': np.array(basis.bfs_coeffs[ibf]), +# 'prim_norms': np.array(basis.bfs_prim_norms[ibf]), +# 'contr_norm': basis.bfs_contr_prim_norms[ibf], +# 'nprim': basis.bfs_nprim[ibf], +# 'bf_indices': [], +# 'lmn_list': [] +# } +# shells.append(shell_info) +# shell_map[shell_key] = shell_idx + +# shell_idx = shell_map[shell_key] +# shells[shell_idx]['bf_indices'].append(ibf) +# shells[shell_idx]['lmn_list'].append(basis.bfs_lmn[ibf]) + +# # Convert to Numba-compatible arrays +# nshells = len(shells) +# nbf_total = basis.bfs_nao + +# # Find maximum dimensions +# max_nprim = max(shell['nprim'] for shell in shells) +# max_nbf_in_shell = max(len(shell['bf_indices']) for shell in shells) + +# # Create arrays that Numba can handle +# shell_centers = np.zeros((nshells, 3)) +# shell_L = np.zeros(nshells, dtype=np.int32) +# shell_nprim = np.zeros(nshells, dtype=np.int32) +# shell_nbf = np.zeros(nshells, dtype=np.int32) +# shell_exponents = np.zeros((nshells, max_nprim)) +# shell_coefficients = np.zeros((nshells, max_nprim)) +# shell_prim_norms = np.zeros((nshells, max_nprim)) +# shell_contr_norms = np.zeros(nshells) +# shell_lmn = np.zeros((nshells, max_nbf_in_shell, 3), dtype=np.int32) +# shell_bf_indices = np.zeros((nshells, max_nbf_in_shell), dtype=np.int32) + +# # Mapping arrays +# bf_to_shell = np.zeros(nbf_total, dtype=np.int32) +# bf_to_shell_func = np.zeros(nbf_total, dtype=np.int32) + +# for ishell, shell in enumerate(shells): +# shell_centers[ishell] = shell['center'] +# shell_L[ishell] = shell['L'] +# shell_nprim[ishell] = shell['nprim'] +# shell_nbf[ishell] = len(shell['bf_indices']) +# shell_contr_norms[ishell] = shell['contr_norm'] + +# nprim = shell['nprim'] +# shell_exponents[ishell, :nprim] = shell['exponents'] +# shell_coefficients[ishell, :nprim] = shell['coefficients'] +# shell_prim_norms[ishell, :nprim] = shell['prim_norms'] + +# nbf = len(shell['bf_indices']) +# for i in range(nbf): +# shell_lmn[ishell, i] = shell['lmn_list'][i] +# shell_bf_indices[ishell, i] = shell['bf_indices'][i] + +# # Fill mapping arrays +# bf_idx = shell['bf_indices'][i] +# bf_to_shell[bf_idx] = ishell +# bf_to_shell_func[bf_idx] = i + +# return (nshells, shell_centers, shell_L, shell_nprim, shell_nbf, +# shell_exponents, shell_coefficients, shell_prim_norms, shell_contr_norms, +# shell_lmn, shell_bf_indices, bf_to_shell, bf_to_shell_func, +# max_nprim, max_nbf_in_shell) + +# @njit(parallel=True, cache=True, fastmath=True) +# def kin_mat_shell_internal(nshells, shell_centers, shell_L, shell_nprim, shell_nbf, +# shell_exponents, shell_coefficients, shell_prim_norms, shell_contr_norms, +# shell_lmn, shell_bf_indices, bf_to_shell, bf_to_shell_func, +# max_nprim, max_nbf_in_shell, start_row, end_row, start_col, end_col): +# """""" +# Shell-based kinetic energy matrix calculation - Numba optimized version. +# """""" + +# num_rows = end_row - start_row +# num_cols = end_col - start_col +# T = np.zeros((num_rows, num_cols)) + +# CUTOFF = 1.0e-9 + +# # Determine which shells we need to process +# shell_row_needed = np.zeros(nshells, dtype=np.bool_) +# shell_col_needed = np.zeros(nshells, dtype=np.bool_) + +# for ishell in range(nshells): +# nbf_i = shell_nbf[ishell] +# for i_in_shell in range(nbf_i): +# bf_i = shell_bf_indices[ishell, i_in_shell] +# if start_row <= bf_i < end_row: +# shell_row_needed[ishell] = True +# if start_col <= bf_i < end_col: +# shell_col_needed[ishell] = True + +# # Loop over shell pairs +# for ishell in prange(nshells): +# if not shell_row_needed[ishell]: +# continue + +# I_center = shell_centers[ishell] +# nprim_i = shell_nprim[ishell] +# nbf_i = shell_nbf[ishell] +# Ni = shell_contr_norms[ishell] + +# for jshell in range(nshells): +# if not shell_col_needed[jshell]: +# continue + +# J_center = shell_centers[jshell] +# nprim_j = shell_nprim[jshell] +# nbf_j = shell_nbf[jshell] +# Nj = shell_contr_norms[jshell] + +# # Pre-compute shell-pair quantities +# IJ = I_center - J_center +# fac1 = np.sum(IJ * IJ) +# fac2 = Ni * Nj + +# # Process all basis function pairs in this shell pair +# for i_in_shell in range(nbf_i): +# bf_i = shell_bf_indices[ishell, i_in_shell] +# if not (start_row <= bf_i < end_row): +# continue + +# lmni = shell_lmn[ishell, i_in_shell] +# lmni_0, lmni_1, lmni_2 = lmni[0], lmni[1], lmni[2] + +# for j_in_shell in range(nbf_j): +# bf_j = shell_bf_indices[jshell, j_in_shell] +# if not (start_col <= bf_j < end_col): +# continue + +# # Symmetry check for triangular matrices +# if ishell == jshell and j_in_shell > i_in_shell: +# continue + +# lmnj = shell_lmn[jshell, j_in_shell] +# lmnj_0, lmnj_1, lmnj_2 = lmnj[0], lmnj[1], lmnj[2] + +# # Pre-compute factors that depend only on lmnj +# fac3 = 2 * (lmnj_0 + lmnj_1 + lmnj_2) + 3 +# fac4 = lmnj_0 * (lmnj_0 - 1) +# fac5 = lmnj_1 * (lmnj_1 - 1) +# fac6 = lmnj_2 * (lmnj_2 - 1) + +# result_sum = 0.0 + +# # Loop over primitive pairs +# for ik in range(nprim_i): +# alphaik = shell_exponents[ishell, ik] +# dik = shell_coefficients[ishell, ik] +# Nik = shell_prim_norms[ishell, ik] + +# for jk in range(nprim_j): +# alphajk = shell_exponents[jshell, jk] +# djk = shell_coefficients[jshell, jk] +# Njk = shell_prim_norms[jshell, jk] + +# gamma = alphaik + alphajk + +# # Early termination check +# temp_1 = np.exp(-alphaik * alphajk / gamma * fac1) +# if temp_1 < CUTOFF: +# continue + +# # Pre-compute P, PI, PJ +# gamma_inv = 1.0 / gamma +# P = (alphaik * I_center + alphajk * J_center) * gamma_inv +# PI = P - I_center +# PJ = P - J_center + +# PI_0, PI_1, PI_2 = PI[0], PI[1], PI[2] +# PJ_0, PJ_1, PJ_2 = PJ[0], PJ[1], PJ[2] + +# # Pre-compute coefficient term +# coeff_term = dik * djk * Nik * Njk * fac2 * temp_1 + +# # Calculate the required overlap integrals +# # Base overlap +# Sx_base = calcS(lmni_0, lmnj_0, gamma, PI_0, PJ_0) +# Sy_base = calcS(lmni_1, lmnj_1, gamma, PI_1, PJ_1) +# Sz_base = calcS(lmni_2, lmnj_2, gamma, PI_2, PJ_2) +# overlap1 = Sx_base * Sy_base * Sz_base + +# # +2 overlaps +# Sx_p2 = calcS(lmni_0, lmnj_0 + 2, gamma, PI_0, PJ_0) +# Sy_p2 = calcS(lmni_1, lmnj_1 + 2, gamma, PI_1, PJ_1) +# Sz_p2 = calcS(lmni_2, lmnj_2 + 2, gamma, PI_2, PJ_2) + +# overlap2 = Sx_p2 * Sy_base * Sz_base +# overlap3 = Sx_base * Sy_p2 * Sz_base +# overlap4 = Sx_base * Sy_base * Sz_p2 + +# # -2 overlaps (only compute if needed) +# overlap5 = overlap6 = overlap7 = 0.0 +# if fac4 != 0.0: +# Sx_m2 = calcS(lmni_0, lmnj_0 - 2, gamma, PI_0, PJ_0) +# overlap5 = Sx_m2 * Sy_base * Sz_base +# if fac5 != 0.0: +# Sy_m2 = calcS(lmni_1, lmnj_1 - 2, gamma, PI_1, PJ_1) +# overlap6 = Sx_base * Sy_m2 * Sz_base +# if fac6 != 0.0: +# Sz_m2 = calcS(lmni_2, lmnj_2 - 2, gamma, PI_2, PJ_2) +# overlap7 = Sx_base * Sy_base * Sz_m2 + +# # Combine terms +# part1 = overlap1 * alphajk * fac3 +# part2 = 2 * alphajk * alphajk * (overlap2 + overlap3 + overlap4) +# part3 = 0.5 * (fac4 * overlap5 + fac5 * overlap6 + fac6 * overlap7) + +# result = coeff_term * (part1 - part2 - part3) +# result_sum += result + +# T[bf_i - start_row, bf_j - start_col] = result_sum + +# # Apply symmetry if needed +# if ishell == jshell and i_in_shell != j_in_shell: +# T[bf_j - start_row, bf_i - start_col] = result_sum + +# return T + +# # Simplified version that focuses on the core optimization +# @njit(parallel=True, cache=True, fastmath=True) +# def kin_mat_shell_simple(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, +# bfs_coeffs, bfs_prim_norms, bfs_expnts, +# start_row, end_row, start_col, end_col): +# """""" +# Simplified shell-based approach that groups calculations by identical primitive sets. +# This is easier to implement and still provides significant speedup. +# """""" + +# num_rows = end_row - start_row +# num_cols = end_col - start_col +# T = np.zeros((num_rows, num_cols)) + +# CUTOFF = 1.0e-9 + +# # Create a simple grouping based on primitive data +# # We'll identify groups of basis functions with identical exponents/coefficients +# nbf = len(bfs_coords) +# processed = np.zeros(nbf, dtype=np.bool_) + +# for i in prange(start_row, end_row): +# if processed[i]: +# continue + +# I = bfs_coords[i] +# Ni = bfs_contr_prim_norms[i] +# lmni = bfs_lmn[i] +# nprim_i = bfs_nprim[i] + +# # Find all basis functions with same center and same primitive data +# same_shell_i = [i] +# for k in range(i + 1, nbf): +# if (np.allclose(bfs_coords[k], I, atol=1e-10) and +# bfs_nprim[k] == nprim_i and +# np.allclose(bfs_expnts[k, :nprim_i], bfs_expnts[i, :nprim_i], atol=1e-10) and +# np.allclose(bfs_coeffs[k, :nprim_i], bfs_coeffs[i, :nprim_i], atol=1e-10)): +# same_shell_i.append(k) +# processed[k] = True + +# processed[i] = True + +# for j in range(start_col, end_col): +# J = bfs_coords[j] +# Nj = bfs_contr_prim_norms[j] +# lmnj = bfs_lmn[j] +# nprim_j = bfs_nprim[j] + +# # Find all basis functions with same center and same primitive data as j +# same_shell_j = [j] +# for k in range(j + 1, nbf): +# if (np.allclose(bfs_coords[k], J, atol=1e-10) and +# bfs_nprim[k] == nprim_j and +# np.allclose(bfs_expnts[k, :nprim_j], bfs_expnts[j, :nprim_j], atol=1e-10) and +# np.allclose(bfs_coeffs[k, :nprim_j], bfs_coeffs[j, :nprim_j], atol=1e-10)): +# same_shell_j.append(k) + +# # Now we have shell-like groups, compute primitive integrals once +# IJ = I - J +# fac1 = np.sum(IJ * IJ) +# fac2 = Ni * Nj + +# # Process all combinations within these shell groups +# for ii in same_shell_i: +# if not (start_row <= ii < end_row): +# continue + +# lmni_ii = bfs_lmn[ii] +# lmni_0, lmni_1, lmni_2 = lmni_ii[0], lmni_ii[1], lmni_ii[2] + +# for jj in same_shell_j: +# if not (start_col <= jj < end_col): +# continue + +# if ii == i and jj == j: # Already processed or will be processed +# continue + +# lmnj_jj = bfs_lmn[jj] +# lmnj_0, lmnj_1, lmnj_2 = lmnj_jj[0], lmnj_jj[1], lmnj_jj[2] + +# # Compute kinetic integral (same primitive loop as before) +# fac3 = 2 * (lmnj_0 + lmnj_1 + lmnj_2) + 3 +# fac4 = lmnj_0 * (lmnj_0 - 1) +# fac5 = lmnj_1 * (lmnj_1 - 1) +# fac6 = lmnj_2 * (lmnj_2 - 1) + +# result_sum = 0.0 + +# for ik in range(nprim_i): +# alphaik = bfs_expnts[ii, ik] +# dik = bfs_coeffs[ii, ik] +# Nik = bfs_prim_norms[ii, ik] + +# for jk in range(nprim_j): +# alphajk = bfs_expnts[jj, jk] +# djk = bfs_coeffs[jj, jk] +# Njk = bfs_prim_norms[jj, jk] + +# gamma = alphaik + alphajk +# temp_1 = np.exp(-alphaik * alphajk / gamma * fac1) +# if temp_1 < CUTOFF: +# continue + +# gamma_inv = 1.0 / gamma +# P = (alphaik * I + alphajk * J) * gamma_inv +# PI = P - I +# PJ = P - J + +# coeff_term = dik * djk * Nik * Njk * fac2 * temp_1 + +# # Calculate overlaps (same as before) +# Sx_base = calcS(lmni_0, lmnj_0, gamma, PI[0], PJ[0]) +# Sy_base = calcS(lmni_1, lmnj_1, gamma, PI[1], PJ[1]) +# Sz_base = calcS(lmni_2, lmnj_2, gamma, PI[2], PJ[2]) +# overlap1 = Sx_base * Sy_base * Sz_base + +# Sx_p2 = calcS(lmni_0, lmnj_0 + 2, gamma, PI[0], PJ[0]) +# Sy_p2 = calcS(lmni_1, lmnj_1 + 2, gamma, PI[1], PJ[1]) +# Sz_p2 = calcS(lmni_2, lmnj_2 + 2, gamma, PI[2], PJ[2]) + +# overlap2 = Sx_p2 * Sy_base * Sz_base +# overlap3 = Sx_base * Sy_p2 * Sz_base +# overlap4 = Sx_base * Sy_base * Sz_p2 + +# overlap5 = overlap6 = overlap7 = 0.0 +# if fac4 != 0.0: +# Sx_m2 = calcS(lmni_0, lmnj_0 - 2, gamma, PI[0], PJ[0]) +# overlap5 = Sx_m2 * Sy_base * Sz_base +# if fac5 != 0.0: +# Sy_m2 = calcS(lmni_1, lmnj_1 - 2, gamma, PI[1], PJ[1]) +# overlap6 = Sx_base * Sy_m2 * Sz_base +# if fac6 != 0.0: +# Sz_m2 = calcS(lmni_2, lmnj_2 - 2, gamma, PI[2], PJ[2]) +# overlap7 = Sx_base * Sy_base * Sz_m2 + +# part1 = overlap1 * alphajk * fac3 +# part2 = 2 * alphajk * alphajk * (overlap2 + overlap3 + overlap4) +# part3 = 0.5 * (fac4 * overlap5 + fac5 * overlap6 + fac6 * overlap7) + +# result = coeff_term * (part1 - part2 - part3) +# result_sum += result + +# T[ii - start_row, jj - start_col] = result_sum + +# return T","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/conv_4c2e_symm.py",".py","17471","347","import numpy as np +from numba import njit, prange + +from .integral_helpers import innerLoop4c2e + +def conv_4c2e_symm(basis, slice=None): + """""" + Compute four-center two-electron (4c2e) electron repulsion integrals (ERIs) + using the conventional and slow (analytical) formula-based method with full symmetry exploitation. + + This function evaluates integrals of the form (A B | C D), where + A, B, C, D are basis functions from the same primary basis set. + + The ""conv"" variant uses explicit analytical integral formulas and + nested loops over primitive Gaussians, following the derivations in: + + J. Chem. Educ. 2018, 95, 9, 1572–1578 + https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + Compared to Rys quadrature, this conventional approach is much more + computationally expensive but exact for the given formula set, making + it useful for validation and special-purpose computations. + + Symmetries exploited + -------------------- + For 4c2e integrals, the full 8-fold permutational symmetry is used: + + (A B | C D) = (B A | C D) = (A B | D C) = (B A | D C) + = (C D | A B) = (D C | A B) = (C D | B A) = (D C | B A) + + This reduces the number of independent integrals from: + N_bf^4 → N_bf*(N_bf+1)/2 * N_bf*(N_bf+1)/2 + when computing the full tensor. + + Parameters + ---------- + basis : object + Basis set object containing: + - bfs_coords : Cartesian coordinates of basis function centers + - bfs_coeffs : Contraction coefficients + - bfs_expnts : Gaussian exponents + - bfs_prim_norms : Primitive normalization constants + - bfs_contr_prim_norms : Contraction normalization factors + - bfs_lmn : Angular momentum quantum numbers (ℓ, m, n) + - bfs_nprim : Number of primitives per basis function + - bfs_nao : Total number of atomic orbitals + + slice : list of int, optional + An 8-element list specifying a sub-block of integrals to compute: + [start_A, end_A, start_B, end_B, start_C, end_C, start_D, end_D] + If None (default), computes the full (Nbf, Nbf, Nbf, Nbf) tensor. + + **Note:** When slices are used, symmetry exploitation is restricted + to permutations that lie entirely within the specified slice. + + Returns + ------- + ints4c2e : ndarray + The computed 4-center 2-electron integrals for the requested range. + + Notes + ----- + - All basis set data are pre-packed into NumPy arrays for Numba acceleration. + - Uses explicit primitive Gaussian formula evaluation without numerical quadrature. + - Symmetry exploitation is maximal only for full-range computations. + - Conventional evaluation scales as O(N_bf^4) without symmetry, but + symmetry reduces the number of computations drastically. + + Examples + -------- + >>> eri_full = conv_4c2e_symm(basis) + >>> eri_block = conv_4c2e_symm(basis, slice=[0,5, 0,5, 0,5, 0,5]) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the 4c2e electron-electron ERIs for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + indx_startD = int(slice[6]) + indx_endD = int(slice[7]) + + ints4c2e = conv_4c2e_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,\ + indx_startA,indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD,indx_endD) + + return ints4c2e + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def conv_4c2e_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD): + # This function calculates the 4D electron-electron repulsion integrals (ERIs) array for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # returns (AB|CD) + + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + num_D = indx_endD - indx_startD + array_shape = (num_A, num_B, num_C, num_D) + + + # Check if the slice of the matrix requested has some symmetries that can be used + all_symm = False + left_side_symm = False + right_side_symm = False + both_left_right_symm = False + no_symm = False + if indx_startA==indx_startB==indx_startC==indx_startD and indx_endA==indx_endB==indx_endC==indx_endD: + all_symm = True + elif (indx_startA==indx_startB and indx_endA==indx_endB) and (indx_startC==indx_startD and indx_endC==indx_endD): + both_left_right_symm = True + elif indx_startA==indx_startB and indx_endA==indx_endB: + left_side_symm = True + elif indx_startC==indx_startD and indx_endC==indx_endD: + right_side_symm = True + else: + no_symm = True + + + # Initialize the 4c2e array with zeros + fourC2E = np.zeros(array_shape, dtype=np.float64) + + + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(indx_startB, indx_endB): #B + if (all_symm and j<=i) or (left_side_symm and j<=i) or right_side_symm or no_symm or (both_left_right_symm and j<=i): + if all_symm: + if itriangle2kl: + continue + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff3 = tempcoeff2*Nl + npriml = bfs_nprim[l] + + val = 0.0 + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in range(nprimk): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in range(npriml): + alphalk = bfs_expnts[l][lk] + gammaQ = alphakk + alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q - L + tempcoeff7 = tempcoeff6*dlk*Nlk + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff7 + + + fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] = val + + + + # Symmetries that can be used (for reference) + # fourC2E[j,i,k,l] = fourC2E[i,j,k,l] + # fourC2E[i,j,l,k] = fourC2E[i,j,k,l] + # fourC2E[j,i,l,k] = fourC2E[i,j,k,l] + # fourC2E[k,l,i,j] = fourC2E[i,j,k,l] + # fourC2E[k,l,j,i] = fourC2E[i,j,k,l] + # fourC2E[l,k,i,j] = fourC2E[i,j,k,l] + # fourC2E[l,k,j,i] = fourC2E[i,j,k,l] + + + if all_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + fourC2E[k-indx_startC, l-indx_startD, i-indx_startA, j-indx_startB] = val + fourC2E[k-indx_startC, l-indx_startD, j-indx_startB, i-indx_startA] = val + fourC2E[l-indx_startD, k-indx_startC, i-indx_startA, j-indx_startB] = val + fourC2E[l-indx_startD, k-indx_startC, j-indx_startB, i-indx_startA] = val + + if left_side_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + fourC2E[j-indx_startB, i-indx_startA, :, :] = fourC2E[i-indx_startA, j-indx_startB, :, :] + + if right_side_symm: + # Fill the remaining values of the array using symmetries + for k in range(indx_startC, indx_endC): + for l in range(indx_startD, indx_endD): + if l<=k: + fourC2E[:, :, l-indx_startD, k-indx_startC] = fourC2E[:, :, k-indx_startC, l-indx_startD] + + if both_left_right_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + + + return fourC2E","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/schwarz_helpers.py",".py","136530","2835","import numpy as np +from numba import njit, prange, guvectorize, float64, int16, int32, config, threading_layer, get_thread_id, get_num_threads, get_parallel_chunksize +from numba import cuda + +try: + import cupy as cp +except Exception as e: + pass + +from .integral_helpers import innerLoop4c2e +from .rys_helpers import coulomb_rys, coulomb_rys_fast, coulomb_rys_new, coulomb_rys_3c2e +from .integral_helpers import Fboys + +from joblib import Parallel, delayed + +def eri_4c2e_diag(basis): + # Used for Schwarz inequality test + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + # ints4c2e_diag = eri_4c2e_diag_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts) + ints4c2e_diag = rys_eri_4c2e_diag_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts) + + return ints4c2e_diag + +# Reference: https://github.com/numba/numba/issues/8007#issuecomment-1113187684 +parallel_options = { + 'comprehension': False, # parallel comprehension + 'prange': True, # parallel for-loop + 'numpy': True, # parallel numpy calls + 'reduction': False, # parallel reduce calls + 'setitem': True, # parallel setitem + 'stencil': True, # parallel stencils + 'fusion': True, # enable fusion or not +} +@njit(parallel=parallel_options, cache=True, fastmath=True, error_model=""numpy"") +def eri_4c2e_diag_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts): + # This function calculates the ""diagonal"" elements of the 4c2e ERI array + # Used to implement Schwarz screening + # http://vergil.chemistry.gatech.edu/notes/df.pdf + # returns a 2D array whose elements are given as A[i,j] = (ij|ij) + nao = bfs_coords.shape[0] + fourC2E_diag = np.zeros((nao, nao),dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for i in prange(0, nao): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + K = I + lc, mc, nc = lmni + + for j in prange(0, i + 1): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff3 = (Ni*Nj)**2 + nprimj = bfs_nprim[j] + + + ld, md, nd = lmnj + + + + val = 0.0 + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*(dik*Nik)**2 + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*(djk*Njk)**2 + + + gammaQ = gammaP + screenfactorKL = screenfactorAB + dlk = djk + Nlk = Njk + Q = P + PQ = P - Q + + QK = PI + QL = PJ + tempcoeff6 = tempcoeff5*dlk*Nlk + + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff6 + + fourC2E_diag[i,j] = val + fourC2E_diag[j,i] = val + + return fourC2E_diag + +@njit(parallel=parallel_options, cache=True, fastmath=True, error_model=""numpy"") +def rys_eri_4c2e_diag_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts): + # This function calculates the ""diagonal"" elements of the 4c2e ERI array + # Used to implement Schwarz screening + # http://vergil.chemistry.gatech.edu/notes/df.pdf + # returns a 2D array whose elements are given as A[i,j] = (ij|ij) + nao = bfs_coords.shape[0] + fourC2E_diag = np.zeros((nao, nao),dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for i in prange(0, nao): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + K = I + lc, mc, nc = lmni + + for j in prange(0, i + 1): #B + J = bfs_coords[j] + IJ = I - J + L = J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff3 = (Ni*Nj)**2 + nprimj = bfs_nprim[j] + + + ld, md, nd = lmnj + + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + roots = np.zeros((10)) + weights = np.zeros((10)) + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + G = np.zeros((n+1,m+1)) + val = 0.0 + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*(dik*Nik)**2 + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + + + tempcoeff5 = tempcoeff4*(djk*Njk)**2 + + + gammaQ = gammaP + screenfactorKL = screenfactorAB + dlk = djk + Nlk = Njk + Q = P + PQ = P - Q + PQsq = np.sum(PQ**2) + + QK = PI + QL = PJ + tempcoeff6 = tempcoeff5*dlk*Nlk + + + + + + # (ss|ss) case + if (la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)==0: + val += tempcoeff6*twopisq/(gammaP*gammaQ)*np.sqrt(pi/(gammaP+gammaQ))\ + *screenfactorAB*screenfactorKL*Fboys(0,PQsq/(1/gammaP+1/gammaQ)) + elif norder<=10: + rho = gammaP*gammaQ/(gammaP+gammaQ) + val += tempcoeff6*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphaik, alphajk,I,J,K,L) + else: + onefourthgammaPinv = 0.25/gammaP + fac1 = twopisq/gammaP*screenfactorAB + fac2 = fac1/gammaQ + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff6 + + fourC2E_diag[i,j] = val + fourC2E_diag[j,i] = val + + return fourC2E_diag + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_indices_3c2e_schwarz(eri_4c2e_diag, ints2c2e, nao, naux, threshold): + # This function will return a numpy array of the same size as ints3c2e array (nao*nao*naux) + # The array will have a value of 1 where there is a significant contribution and 0 otherwise. + # Later on this array can be used to find the indices of non-zero arrays + indices = np.zeros((nao, nao, naux), dtype=np.uint8) + # Loop over the lower-triangular ints3c2e array + for i in range(nao): + for j in range(i+1): + for k in prange(naux): + if np.sqrt(eri_4c2e_diag[i,j])*np.sqrt(ints2c2e[k,k])>threshold: + indices[i,j,k] = 1 + return indices + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_indices_3c2e_schwarz2(sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, chunk_size, nao, naux, istart, jstart, kstart, threshold, strict_schwarz): + # This is a variant of the previous function 'calc_indices_3c2e_schwarz'. Instead of returning arrays of 1s and 0s + # which are then needed to be processed to get the indices of the contributing triplets. + # Instead, here we directly calculate the indices, however, it is not straightforwardly parallelizable, + # so it can be a bit slow for larger systems (>2000 bfs) + indicesA = np.zeros((chunk_size), dtype=np.uint16) + indicesB = np.zeros((chunk_size), dtype=np.uint16) + indicesC = np.zeros((chunk_size), dtype=np.uint16) + # Loop over the lower-triangular ints3c2e array + count = 0 + for i in prange(istart, nao): + for j in prange(jstart, i+1): + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if j==i: + jstart = 0 + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + continue + for k in prange(kstart, naux): + if k==naux-1: + # jstart = 0 + kstart = 0 + if countthreshold: + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + count += 1 + else: + return indicesA, indicesB, indicesC, [i,j,k], count + + return indicesA, indicesB, indicesC, [i,j,k], count + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_indices_3c2e_schwarz_fine(sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, chunk_size, nao, naux, istart, jstart, kstart, threshold, strict_schwarz, auxbfs_lm): + # This is a variant of the previous function 'calc_indices_3c2e_schwarz'. Instead of returning arrays of 1s and 0s + # which are then needed to be processed to get the indices of the contributing triplets. + # Instead, here we directly calculate the indices, however, it is not straightforwardly parallelizable, + # so it can be a bit slow for larger systems (>2000 bfs) + indicesA = np.zeros((chunk_size), dtype=np.uint16) + indicesB = np.zeros((chunk_size), dtype=np.uint16) + indicesC = np.zeros((chunk_size), dtype=np.uint16) + # Loop over the lower-triangular ints3c2e array + count = 0 + for i in prange(istart, nao): + # coord_i = bfs_coords[i] + # cutoff_i = bfs_radius_cutoff[i] + for j in prange(jstart, i+1): + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if j==i: + jstart = 0 + # coord_j = bfs_coords[j] + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + continue + for k in prange(kstart, naux): + if k==naux-1: + # jstart = 0 + kstart = 0 + # coord_k = auxbfs_coords[k] + # print(coord_k - coord_i) # Gives segmentation fault + # print(coord_k) + # print(coord_i) + # print(np.linalg.norm(coord_k-coord_i)) + # if np.sqrt(np.sum((coord_k - coord_i)**2))>18:# and abs(np.linalg.norm(coord_k-coord_j))threshold: + if max_val<1e-8: + if auxbfs_lm[k]<1: # s aux functions + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + count += 1 + elif max_val<1e-7: + if auxbfs_lm[k]<2: # s, p aux functions + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + count += 1 + elif max_val<1e-6: + if auxbfs_lm[k]<3: # s, p, d aux functions + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + count += 1 + else: + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + count += 1 + else: + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + count += 1 + else: + return indicesA, indicesB, indicesC, [i,j,k], count + return indicesA, indicesB, indicesC, [i,j,k], count + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_offsets_3c2e_schwarz(sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, auxbfs_lm, ntri, naux, tril_indicesA, tril_indicesB): + # Calculate the offsets for 3c2e integral evluations + offsets = np.zeros((ntri+1), dtype=np.uint16) + offsets[0] = 0 + # Loop over the lower-triangular ints3c2e array + for ij in prange(ntri): + i = tril_indicesA[ij] + j = tril_indicesB[ij] + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + continue + count = 0 + for k in range(naux): + # if strict_schwarz: + # max_val = sqrt_ij*sqrt_diag_ints2c2e[k] + # if max_val>threshold: + # if max_val<1e-8: + # if auxbfs_lm[k]<1: # s aux functions + # count += 1 + # elif max_val<1e-7: + # if auxbfs_lm[k]<2: # s, p aux functions + # count += 1 + # elif max_val<1e-6: + # if auxbfs_lm[k]<3: # s, p, d aux functions + # count += 1 + # else: + # count += 1 + # else: + # if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + # count += 1 + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + count += 1 + # else: + # print(""yes"") + offsets[ij+1] = count + return offsets + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_indices_3c2e_schwarz3(sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, chunk_size, nao, naux, istart, jstart, kstart, threshold): + # This is a variant of the previous function 'calc_indices_3c2e_schwarz'. Instead of returning arrays of 1s and 0s + # which are then needed to be processed to get the indices of the contributing triplets. + # Instead, here we directly calculate the indices, however, it is not straightforwardly parallelizable, + # so it can be a bit slow for larger systems (>2000 bfs) + offset = np.zeros((nao), dtype=np.uint32) + indicesB = np.zeros((chunk_size), dtype=np.uint16) + indicesC = np.zeros((chunk_size), dtype=np.uint16) + # Loop over the lower-triangular ints3c2e array + count = 0 + indx_offset = 0 + for i in prange(istart, nao): + for j in prange(jstart, i+1): + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if j==i: + jstart = 0 + for k in prange(kstart, naux): + if k==naux-1: + # jstart = 0 + kstart = 0 + if countthreshold: + indicesB[count] = j + indicesC[count] = k + count += 1 + offset[i] = count + else: + return offset, indicesB, indicesC, [i,j,k], count + return offset, indicesB, indicesC, [i,j,k], count + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_count_3c2e_schwarz(sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, nao, naux, threshold): + # Calculates the total no. of significant 3c2e triplets after Schwarz screening + # Loop over the lower-triangular ints3c2e array + count = 0 + for i in prange(0, nao): + for j in prange(0, i+1): + sqrt_ij = sqrt_ints4c2e_diag[i,j] + for k in prange(0, naux): + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + count += 1 + return count + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_indices_4c2e_schwarz(sqrt_ints4c2e_diag, chunk_size, nao, istart, jstart, kstart, lstart, threshold): + # This is a variant of the previous function 'calc_indices_3c2e_schwarz'. Instead of returning arrays of 1s and 0s + # which are then needed to be processed to get the indices of the contributing triplets. + # Instead, here we directly calculate the indices, however, it is not straightforwardly parallelizable, + # so it can be a bit slow for larger systems (>2000 bfs) + indicesA = np.zeros((chunk_size), dtype=np.uint16) + indicesB = np.zeros((chunk_size), dtype=np.uint16) + indicesC = np.zeros((chunk_size), dtype=np.uint16) + indicesD = np.zeros((chunk_size), dtype=np.uint16) + # Loop over the lower-triangular ints3c2e array + count = 0 + for i in prange(istart, nao): + for j in range(jstart, i+1): + if itriangle2kl: + continue + if l==k: + lstart = 0 + sqrt_kl = sqrt_ints4c2e_diag[k,l] + if countthreshold: + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + indicesD[count] = l + count += 1 + else: + return indicesA, indicesB, indicesC, indicesD, [i,j,k,l], count + return indicesA, indicesB, indicesC, indicesD, [i,j,k], count + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_indices_3c2e_schwarz2_test(eri_4c2e_diag, ints2c2e, chunk_size, nao, naux, istart, jstart, kstart, threshold): + # This is a variant of the previous function 'calc_indices_3c2e_schwarz'. Instead of returning arrays of 1s and 0s + # which are then needed to be processed to get the indices of the contributing triplets. + # Instead, here we directly calculate the indices, however, it is not straightforwardly parallelizable, + # so it can be a bit slow for larger systems (>2000 bfs) + indicesA = np.zeros((chunk_size), dtype=np.uint16) + indicesB = np.zeros((chunk_size), dtype=np.uint16) + indicesC = np.zeros((chunk_size), dtype=np.uint16) + # Loop over k first + count = 0 + for k in prange(kstart, naux): + for i in range(istart, nao): + jstart = i if i == istart else 0 + for j in range(jstart, i+1): + if np.sqrt(eri_4c2e_diag[i, j]) * np.sqrt(ints2c2e[k, k]) > threshold: + if count < chunk_size: + indicesA[count] = i + indicesB[count] = j + indicesC[count] = k + count += 1 + else: + return indicesA, indicesB, indicesC, [i,j,k], count + kstart = 0 # reset kstart for the next j loop + return indicesA, indicesB, indicesC, [i,j,k], count + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def calc_indices_3c2e_schwarz_shells(eri_4c2e_diag, ints2c2e, chunk_size, nao, naux, istart, jstart, kstart, shell_indices, aux_shell_indices, threshold): + # This is a variant of the previous function 'calc_indices_3c2e_schwarz2'. + # Instead of calculating the indices which yield non zero contributions, + # it calculates the shell indices. + # This will probably take the same amount of time as + # 'calc_indices_3c2e_schwarz2' but will require much less memory, as instead of having three indices for + # px,py and pz we will just have an index corresponding to p. + indicesA_shells = np.zeros((chunk_size), dtype=np.uint16) + indicesB_shells = np.zeros((chunk_size), dtype=np.uint16) + indicesC_shells = np.zeros((chunk_size), dtype=np.uint16) + # Loop over the lower-triangular ints3c2e array + count = 0 + ishell_previous = 0 + jshell_previous = 0 + kshell_previous = 0 + for ibf in range(istart, nao): + ishell = shell_indices[ibf] + for jbf in range(jstart, ibf+1): + jshell = shell_indices[jbf] + if jbf==ibf: + jstart = 0 + for kbf in prange(kstart, naux): + kshell = aux_shell_indices[kbf] + if count>0 and (ishell==ishell_previous and jshell==jshell_previous and kshell==kshell_previous): + # print(ishell, ishell_previous) + continue + if kbf==naux-1: + # jstart = 0 + kstart = 0 + if countthreshold: + indicesA_shells[count] = ishell + indicesB_shells[count] = jshell + indicesC_shells[count] = kshell + count += 1 + else: + return indicesA_shells, indicesB_shells, indicesC_shells, [ibf,jbf,kbf], count + ishell_previous = ishell + jshell_previous = jshell + kshell_previous = kshell + return indicesA_shells, indicesB_shells, indicesC_shells, [ibf,jbf,kbf], count + +def rys_3c2e_tri_schwarz(basis, auxbasis, indicesA, indicesB, indicesC): + # Wrapper for hybrid Rys+conv. 3c2e integral calculator + # using a list of significant contributions obtained via Schwarz screening. + # It returns the 3c2e integrals in triangular form. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + ints3c2e = rys_3c2e_tri_schwarz_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, basis.bfs_nao, auxbasis.bfs_nao) + return ints3c2e + +def rys_3c2e_tri_schwarz_sparse(basis, auxbasis, indicesA, indicesB, indicesC): + # Wrapper for hybrid Rys+conv. 3c2e integral calculator + # using a list of significant contributions obtained via Schwarz screening. + # It returns the 3c2e integrals in triangular form. + + # print('preprocessing starts', flush=True) + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + shell_indices = np.array([basis.bfs_shell_index], dtype=np.uint16)[0] + aux_shell_indices = np.array([auxbasis.bfs_shell_index], dtype=np.uint16)[0] + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + diff = bfs_coords[0][:, np.newaxis, :] - bfs_coords[0][np.newaxis, :, :] + IJsq_arr = np.sum(diff**2, axis=2) + # IJsq_arr = 0 + # print(IJsq_arr.nbytes/1e9) + + # print('preprocessing done', flush=True) + # exit() + + + ints3c2e = rys_3c2e_tri_schwarz_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, basis.bfs_nao, auxbasis.bfs_nao, IJsq_arr, shell_indices, aux_shell_indices) + # rys_3c2e_tri_schwarz_sparse_internal.parallel_diagnostics(level=1) + return ints3c2e + +def rys_3c2e_tri_schwarz_sparse_algo10(basis, auxbasis, indicesA, indicesB, offsets, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, nsignificant): + # Wrapper for hybrid Rys+conv. 3c2e integral calculator + # using a list of significant contributions obtained via Schwarz screening. + # It returns the 3c2e integrals in triangular form. + + # print('preprocessing starts', flush=True) + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + shell_indices = np.array([basis.bfs_shell_index], dtype=np.uint16)[0] + aux_shell_indices = np.array([auxbasis.bfs_shell_index], dtype=np.uint16)[0] + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + diff = bfs_coords[0][:, np.newaxis, :] - bfs_coords[0][np.newaxis, :, :] + IJsq_arr = np.sum(diff**2, axis=2) + # IJsq_arr = 0 + # print(IJsq_arr.nbytes/1e9) + + # print('preprocessing done', flush=True) + # exit() + + + ints3c2e = rys_3c2e_tri_schwarz_sparse_algo10_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, offsets, basis.bfs_nao, auxbasis.bfs_nao, IJsq_arr, shell_indices, aux_shell_indices, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, nsignificant) + # rys_3c2e_tri_schwarz_sparse_internal.parallel_diagnostics(level=1) + return ints3c2e + +def rys_3c2e_tri_schwarz_sparse2(basis, auxbasis, indicesA, indicesB, indicesC, ncores): + # Wrapper for hybrid Rys+conv. 3c2e integral calculator + # using a list of significant contributions obtained via Schwarz screening. + # It returns the 3c2e integrals in triangular form. + + # print('preprocessing starts', flush=True) + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + diff = bfs_coords[0][:, np.newaxis, :] - bfs_coords[0][np.newaxis, :, :] + IJsq_arr = np.sum(diff**2, axis=2) + # IJsq_arr = 0 + + # print('preprocessing done', flush=True) + # exit() + ntriplets = indicesA.shape[0] # No. of significant triplets + ints3c2e = np.zeros((ntriplets), dtype=np.float64) + + # This works but not the best way to calculate + # chunk_size = min(ntriplets, 100000) + # nchunks = ntriplets // chunk_size #+ 1 + + if ntriplets>100000: # No parallelization upto 100000 values + nchunks = ncores*2 + chunk_size = ntriplets//nchunks + + + print(nchunks) + print(chunk_size) + + # ints3c2e = rys_3c2e_tri_schwarz_sparse_internal2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + # bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + # aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, basis.bfs_nao, auxbasis.bfs_nao, IJsq_arr, chunk_size, threeC2E) + # output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(rys_3c2e_tri_schwarz_sparse_internal2)(iblock, blocksize, weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], ngrids, basis, dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict) for ichunk in range(nchunks)) + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(rys_3c2e_tri_schwarz_sparse_internal2)(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA[ichunk*chunk_size : min(ichunk*chunk_size+chunk_size,ntriplets)], indicesB[ichunk*chunk_size : min(ichunk*chunk_size+chunk_size,ntriplets)], indicesC[ichunk*chunk_size : min(ichunk*chunk_size+chunk_size,ntriplets)], basis.bfs_nao, auxbasis.bfs_nao, IJsq_arr, chunk_size, ints3c2e[ichunk*chunk_size : min(ichunk*chunk_size+chunk_size,ntriplets)]) for ichunk in range(nchunks+1)) + # print(ints3c2e) + return ints3c2e + +def rys_3c2e_tri_schwarz_sparse_algo8(basis, auxbasis, ntriplets, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold): + # Wrapper for hybrid Rys+conv. 3c2e integral calculator + # using a list of significant contributions obtained via Schwarz screening. + # It returns the 3c2e integrals in triangular form. + + # print('preprocessing starts', flush=True) + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + shell_indices = np.array([basis.bfs_shell_index], dtype=np.uint16)[0] + aux_shell_indices = np.array([auxbasis.bfs_shell_index], dtype=np.uint16)[0] + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + ints3c2e = rys_3c2e_tri_schwarz_sparse_algo8_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, ntriplets, basis.bfs_nao, auxbasis.bfs_nao, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold) + # rys_3c2e_tri_schwarz_sparse_internal.parallel_diagnostics(level=1) + return ints3c2e + +def rys_3c2e_tri_schwarz_sparse_algo9(basis, auxbasis, offset, indicesB, indicesC): + # Wrapper for hybrid Rys+conv. 3c2e integral calculator + # using a list of significant contributions obtained via Schwarz screening. + # It returns the 3c2e integrals in triangular form. + + # print('preprocessing starts', flush=True) + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + shell_indices = np.array([basis.bfs_shell_index], dtype=np.uint16)[0] + aux_shell_indices = np.array([auxbasis.bfs_shell_index], dtype=np.uint16)[0] + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + diff = bfs_coords[0][:, np.newaxis, :] - bfs_coords[0][np.newaxis, :, :] + IJsq_arr = np.sum(diff**2, axis=2) + + + ints3c2e = rys_3c2e_tri_schwarz_sparse_algo9_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], \ + bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], \ + aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, offset, indicesB, indicesC, basis.bfs_nao, auxbasis.bfs_nao, IJsq_arr, shell_indices, aux_shell_indices) + return ints3c2e + + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def rys_3c2e_tri_schwarz_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, nao, naux): + # Calculates 3c2e integrals based on a provided list of significant triplets determined using Schwarz inequality + # It is assumed that the provided list was made with triangular int3c2e in mind + + threeC2E = np.zeros((int(nao*(nao+1)/2.0),naux), dtype=np.float64) + + ntriplets = indicesA.shape[0] # No. of significant triplets + + + pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + L = np.zeros((3)) + alphalk = 0.0 + ld, md, nd = int(0), int(0), int(0) + + # Create arrays to avoid contention of allocator + # (https://stackoverflow.com/questions/70339388/using-numba-with-np-concatenate-is-not-efficient-in-parallel/70342014#70342014) + + #Loop over BFs + for itemp in prange(ntriplets): + i = indicesA[itemp] + j = indicesB[itemp] + k = indicesC[itemp] + offset = int(i*(i+1)/2) + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + + K = aux_bfs_coords[k] + Nk = aux_bfs_contr_prim_norms[k] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + + + + KL = K - L + KLsq = np.sum(KL**2) + + # npriml = bfs_nprim[l] + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + val = 0.0 + if norder<=10: # Use rys quadrature + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + + + + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + alphaik = bfs_expnts[i,ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j,jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik*I + alphajk*J)/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(aux_bfs_nprim[k]): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + alphakk = aux_bfs_expnts[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + # if abs(screenfactorAB*screenfactorKL)<1.0e-10: + # #TODO: Check for optimal value for screening + # continue + + Q = K + PQ = P - Q + PQsq = np.sum(PQ**2) + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + + + val += tempcoeff5*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + else: # Analytical (Conventional) + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + alphaik = bfs_expnts[i,ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j,jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(aux_bfs_nprim[k]): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + alphakk = aux_bfs_expnts[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + + Q = K + PQ = P - Q + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ)) + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff5 + + threeC2E[j+offset,k] = val + + + + + return threeC2E + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True, boundscheck=False) +def rys_3c2e_tri_schwarz_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, nao, naux, IJsq_arr, shell_indices, aux_shell_indices): + # Calculates 3c2e integrals based on a provided list of significant triplets determined using Schwarz inequality + # It is assumed that the provided list was made with triangular int3c2e in mind + # TODO: Check out these screening methods as well + # https://kops.uni-konstanz.de/server/api/core/bitstreams/79ada61a-fd29-43fd-a298-79c1696a0601/content + # https://aip.scitation.org/doi/10.1063/1.4917519 + + ntriplets = indicesA.shape[0] # No. of significant triplets + threeC2E = np.zeros((ntriplets), dtype=np.float64) + + #Debug: + # print(config.THREADING_LAYER) + # print(threading_layer()) + # print(get_parallel_chunksize()) + # print(ntriplets) + # set_parallel_chunksize(ntriplets//128) + # print(get_parallel_chunksize()) + + pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + L = np.zeros((3)) + alphalk = 0.0 + ld, md, nd = int(0), int(0), int(0) + + # Initialize before hand to avoid contention of memory allocator + # roots = np.zeros((5)) # 5 is the maximum possible value currently in the code + # weights = np.zeros((5)) + # G = np.zeros((21,21)) # 11 should be enough + + + maxprims = bfs_coeffs.shape[1] + maxprims_aux = aux_bfs_coeffs.shape[1] + + # Create arrays to avoid contention of allocator + # (https://stackoverflow.com/questions/70339388/using-numba-with-np-concatenate-is-not-efficient-in-parallel/70342014#70342014) + + + #Loop over BFs + for itemp in prange(ntriplets): + # id_thrd = get_thread_id() + + + + i = indicesA[itemp] + j = indicesB[itemp] + k = indicesC[itemp] + + + + # ishell = shell_indices[i] + + Ni = bfs_contr_prim_norms[i] + nprimi = bfs_nprim[i] + alphaik = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + alphaik[:] = bfs_expnts[i,:] + lmni = bfs_lmn[i] + la, ma, na = lmni + I = bfs_coords[i] + + # jshell = shell_indices[j] + + Nj = bfs_contr_prim_norms[j] + nprimj = bfs_nprim[j] + alphajk = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + alphajk[:] = bfs_expnts[j,:] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + J = bfs_coords[j] + + + IJsq = IJsq_arr[i,j] + tempcoeff1 = Ni*Nj + gammaP = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + screenfactorAB = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + # Ap = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1]), dtype=np.float64) # Should be Hoisted out + + # kshell = aux_shell_indices[k] + Nk = aux_bfs_contr_prim_norms[k] + nprimk = aux_bfs_nprim[k] + alphakk = np.zeros(maxprims_aux, dtype=np.float64) # Should be Hoisted out + alphakk[:] = aux_bfs_expnts[k,:] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + K = aux_bfs_coords[k] + Q = K + + + tempcoeff2 = tempcoeff1*Nk + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + tempcoeff3 = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + tempcoeff3[:] = tempcoeff2*bfs_coeffs[i,:]*bfs_prim_norms[i,:] + # PQsq = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + # rho = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + + + + val = 0.0 + if norder<=10: # Use rys quadrature + + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + roots = np.zeros((10)) + weights = np.zeros((10)) + # G = np.zeros((n+1,m+1)) + G = np.zeros((n+1,m+1)) + + + #Loop over primitives + for ik in range(nprimi): + alphaik_ = alphaik[ik] + tempcoeff3_ = tempcoeff3[ik] + for jk in range(nprimj): + alphajk_ = alphajk[jk] + # gammaP[ik,jk] = alphaik_ + alphajk_ + gammaP_ = alphaik_ + alphajk_ + gamma_inv = 1/gammaP_ + # Ap[ik,jk] = alphaik[ik]*alphajk[jk] + # screenfactorAB[ik,jk] = np.exp(-Ap[ik,jk]/gammaP[ik,jk]*IJsq) + screenfactorAB = np.exp(-alphaik_*alphajk_/gammaP_*IJsq) + + if abs(screenfactorAB)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik_*I + alphajk_*J)/gammaP_ + PQ = P - Q + PQsq = np.sum(PQ**2) + tempcoeff4 = tempcoeff3_*djk*Njk + + # screenfactor_2 = tempcoeff4/Nk*screenfactorAB*gamma_inv*np.sqrt(gamma_inv)*15.5031383401 + # if abs(screenfactor_2)<1.0e-9: # The threshold used here should be the same as Schwarz screening threshold + # continue + + # gammaP_ = gammaP[ik,jk] + + for kk in range(nprimk): + + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk[kk] + rho = gammaP_*gammaQ/(gammaP_ + gammaQ) + + # ABsrt = np.sqrt(gammaP[ik,jk]*alphakk[kk]) + # X = PQsq*rho + # factor = 2*np.sqrt(rho/pi) + # print('s') + val += tempcoeff5*coulomb_rys_3c2e(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik_, alphajk_,alphakk[kk],alphalk,I,J,K,L,P) + # The following should have been faster but isnt somehow + # val += tempcoeff5*coulomb_rys_new(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik_, alphajk_,alphakk[kk],alphalk,I,J,K,L) + # The following should have been faster but isnt + # val += tempcoeff5*coulomb_rys_fast(roots,weights,G,norder,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik[ik], alphajk[jk], alphakk[kk], alphalk,I,J,K,L,X,gammaP[ik,jk],alphakk[kk],Ap[ik,jk],0.0,ABsrt,factor,P,Q) + + else: # Analytical (Conventional) + #Loop over primitives + for ik in range(nprimi): + for jk in range(nprimj): + + gammaP[ik,jk] = alphaik[ik] + alphajk[jk] + # Ap[ik,jk] = alphaik[ik]*alphajk[jk] + # screenfactorAB[ik,jk] = np.exp(-Ap[ik,jk]/gammaP[ik,jk]*IJsq) + screenfactorAB[ik,jk] = np.exp(-alphaik[ik]*alphajk[jk]/gammaP[ik,jk]*IJsq) + + if abs(screenfactorAB[ik,jk])<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik[ik]*I + alphajk[jk]*J)/gammaP[ik,jk] + PI = P - I + PJ = P - J + PQ = P - Q + fac1 = twopisq/gammaP[ik,jk]*screenfactorAB[ik,jk] + onefourthgammaPinv = 0.25/gammaP[ik,jk] + tempcoeff4 = tempcoeff3[ik]*djk*Njk + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk[kk] #+ alphalk + + + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP[ik,jk] + gammaQ)) + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP[ik,jk],gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff5 + + threeC2E[itemp] = val + + + + return threeC2E + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True, boundscheck=False) +def rys_3c2e_tri_schwarz_sparse_algo10_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, offsets, nao, naux, IJsq_arr, shell_indices, aux_shell_indices, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, nsignificant): + # Calculates 3c2e integrals based on a provided list of significant triplets determined using Schwarz inequality + # It is assumed that the provided list was made with triangular int3c2e in mind + # TODO: Check out these screening methods as well + # https://kops.uni-konstanz.de/server/api/core/bitstreams/79ada61a-fd29-43fd-a298-79c1696a0601/content + # https://aip.scitation.org/doi/10.1063/1.4917519 + + threeC2E = np.zeros((nsignificant), dtype=np.float64) + + #Debug: + # print(config.THREADING_LAYER) + # print(threading_layer()) + # print(get_parallel_chunksize()) + # print(ntriplets) + # set_parallel_chunksize(ntriplets//128) + # print(get_parallel_chunksize()) + + pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + L = np.zeros((3)) + alphalk = 0.0 + ld, md, nd = int(0), int(0), int(0) + + # Initialize before hand to avoid contention of memory allocator + # roots = np.zeros((5)) # 5 is the maximum possible value currently in the code + # weights = np.zeros((5)) + # G = np.zeros((21,21)) # 11 should be enough + + + maxprims = bfs_coeffs.shape[1] + maxprims_aux = aux_bfs_coeffs.shape[1] + + # Create arrays to avoid contention of allocator + # (https://stackoverflow.com/questions/70339388/using-numba-with-np-concatenate-is-not-efficient-in-parallel/70342014#70342014) + + + #Loop over BFs + for itemp in prange(indicesA.shape[0]): + # id_thrd = get_thread_id() + + i = indicesA[itemp] + j = indicesB[itemp] + + sqrt_ij = sqrt_ints4c2e_diag[i,j] + + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + continue + + # ishell = shell_indices[i] + + Ni = bfs_contr_prim_norms[i] + nprimi = bfs_nprim[i] + alphaik = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + alphaik[:] = bfs_expnts[i,:] + lmni = bfs_lmn[i] + la, ma, na = lmni + I = bfs_coords[i] + + # jshell = shell_indices[j] + + Nj = bfs_contr_prim_norms[j] + nprimj = bfs_nprim[j] + alphajk = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + alphajk[:] = bfs_expnts[j,:] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + J = bfs_coords[j] + + + IJsq = IJsq_arr[i,j] + tempcoeff1 = Ni*Nj + + ## This screening is not useful for def2-SVP kind of basis sets + ## But useful for diffuse basis sets like def2-TZVP + alphaik_min = np.min(alphaik[:nprimi]) + alphajk_min = np.min(alphajk[:nprimj]) + gammaP_min = alphaik_min + alphajk_min + rho_min = alphaik_min * alphajk_min / gammaP_min + arg = rho_min * IJsq + if arg > 18.42: # exp(-18.42) ≈ 1e-8 + continue + # screening_AB_min = np.exp(-rho_min * IJsq) + # if abs(screening_AB_min)<1.0e-8: + # continue + # P_min = (alphaik_min*I + alphajk_min*J)/gammaP_min + index_k = 0 + for k in range(naux): + if sqrt_ij*sqrt_diag_ints2c2e[k]threshold: + # if max_val<1e-8: + # if (lc+mc+nc)>=1: # s aux function + # continue + # elif max_val<1e-7: + # if (lc+mc+nc)>=2: # s, p aux functions + # continue + # elif max_val<1e-6: + # if (lc+mc+nc)>=3: # s, p, d aux functions + # continue + # else: + # continue + + # else: + # if sqrt_ij*sqrt_diag_ints2c2e[k] 1300.0: # Try even lower threshold + # index_k += 1 + # continue + # if abs(screening_ABP_min)<1.0e-8: + # index_k += 1 + # continue + # geometric prescreen ONLY + # if rho_abP_min * PQsq_min > np.log(1.0 / 1e-6): + # continue + + tempcoeff2 = tempcoeff1*Nk + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + tempcoeff3 = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + tempcoeff3[:] = tempcoeff2*bfs_coeffs[i,:]*bfs_prim_norms[i,:] + # PQsq = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + # rho = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + + val = 0.0 + if norder<=10: # Use rys quadrature + + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + roots = np.zeros((10)) + weights = np.zeros((10)) + # G = np.zeros((n+1,m+1)) + G = np.zeros((n+1,m+1)) + + + #Loop over primitives + for ik in range(nprimi): + alphaik_ = alphaik[ik] + tempcoeff3_ = tempcoeff3[ik] + for jk in range(nprimj): + alphajk_ = alphajk[jk] + # gammaP[ik,jk] = alphaik_ + alphajk_ + gammaP_ = alphaik_ + alphajk_ + # gamma_inv = 1/gammaP_ + arg = alphaik_*alphajk_/gammaP_*IJsq + if arg > 18.42: # exp(-18.42) ≈ 1e-8 + continue + # screenfactorAB = np.exp(-alphaik_*alphajk_/gammaP_*IJsq) + + # if abs(screenfactorAB)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + # continue + P = (alphaik_*I + alphajk_*J)/gammaP_ + PQ = P - Q + PQsq = np.sum(PQ**2) + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + + tempcoeff4 = tempcoeff3_*djk*Njk + + # screenfactor_2 = tempcoeff4/Nk*screenfactorAB*gamma_inv*np.sqrt(gamma_inv)*15.5031383401 + # if abs(screenfactor_2)<1.0e-9: # The threshold used here should be the same as Schwarz screening threshold + # continue + + # gammaP_ = gammaP[ik,jk] + + for kk in range(nprimk): + + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk[kk] + rho = gammaP_*gammaQ/(gammaP_ + gammaQ) + + # NEW SCREENING + # More aggressive early exit + # if rho*PQsq > 15.0: # Try even lower threshold + # continue + + # screenfactorAB_P = np.exp(-rho*PQsq) + # if abs(screenfactorAB_P) < 1.0e-8: + # continue + + # # Additional check: if the combined screening is too small + # combined_screening = screenfactorAB * screenfactorAB_P + # if abs(combined_screening) < 1.0e-10: + # continue + + # ABsrt = np.sqrt(gammaP[ik,jk]*alphakk[kk]) + # X = PQsq*rho + # factor = 2*np.sqrt(rho/pi) + # print('s') + val += tempcoeff5*coulomb_rys_3c2e(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik_, alphajk_,alphakk[kk],alphalk,I,J,K,L,P) + + # The following should have been faster but isnt somehow + # val += tempcoeff5*coulomb_rys_new(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik_, alphajk_,alphakk[kk],alphalk,I,J,K,L) + # The following should have been faster but isnt + # val += tempcoeff5*coulomb_rys_fast(roots,weights,G,norder,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik[ik], alphajk[jk], alphakk[kk], alphalk,I,J,K,L,X,gammaP[ik,jk],alphakk[kk],Ap[ik,jk],0.0,ABsrt,factor,P,Q) + + + threeC2E[offsets[itemp] + index_k] = val + index_k += 1 + + + return threeC2E + + + + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True, boundscheck=False) +def rys_3c2e_tri_schwarz_sparse_internal_old(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, nao, naux, IJsq_arr, shell_indices, aux_shell_indices): + # Calculates 3c2e integrals based on a provided list of significant triplets determined using Schwarz inequality + # It is assumed that the provided list was made with triangular int3c2e in mind + # TODO: Check out these screening methods as well + # https://kops.uni-konstanz.de/server/api/core/bitstreams/79ada61a-fd29-43fd-a298-79c1696a0601/content + # https://aip.scitation.org/doi/10.1063/1.4917519 + + ntriplets = indicesA.shape[0] # No. of significant triplets + threeC2E = np.zeros((ntriplets), dtype=np.float64) + + #Debug: + # print(config.THREADING_LAYER) + # print(threading_layer()) + # print(get_parallel_chunksize()) + # print(ntriplets) + # set_parallel_chunksize(ntriplets//128) + # print(get_parallel_chunksize()) + + pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + L = np.zeros((3)) + alphalk = 0.0 + ld, md, nd = int(0), int(0), int(0) + + # Initialize before hand to avoid contention of memory allocator + # roots = np.zeros((5)) # 5 is the maximum possible value currently in the code + # weights = np.zeros((5)) + # G = np.zeros((21,21)) # 11 should be enough + + + maxprims = bfs_coeffs.shape[1] + maxprims_aux = aux_bfs_coeffs.shape[1] + + # Create arrays to avoid contention of allocator + # (https://stackoverflow.com/questions/70339388/using-numba-with-np-concatenate-is-not-efficient-in-parallel/70342014#70342014) + + # ncores = get_num_threads() + # ishell_previous = np.zeros((ncores), dtype=np.uint16) + # jshell_previous = np.zeros((ncores), dtype=np.uint16) + # kshell_previous = np.zeros((ncores), dtype=np.uint16) + # # The values don't have any significance. I just hope that the first triplet doesn't coincidentally have these values + # ishell_previous[:] = 999 + # jshell_previous[:] = 918 + # kshell_previous[:] = 202 + + ishell_previous = -1 + jshell_previous = -1 + kshell_previous = -1 + + #Loop over BFs + for itemp in prange(ntriplets): + # id_thrd = get_thread_id() + + + + i = indicesA[itemp] + j = indicesB[itemp] + k = indicesC[itemp] + + + # i_previous = indicesA[itemp-1] + # j_previous = indicesB[itemp-1] + # k_previous = indicesC[itemp-1] + + # ishell_previous = shell_indices[i_previous] + # jshell_previous = shell_indices[j_previous] + # kshell_previous = shell_indices[k_previous] + # if itemp!=0: + # i_previous = indicesA[itemp-1] + # j_previous = indicesB[itemp-1] + # k_previous = indicesC[itemp-1] + + # ishell_previous = shell_indices[i_previous] + # jshell_previous = shell_indices[j_previous] + # kshell_previous = shell_indices[k_previous] + # else: + # ishell_previous = -1 + # jshell_previous = -1 + # kshell_previous = -1 + + + + ishell = shell_indices[i] + if ishell!=ishell_previous: + Ni = bfs_contr_prim_norms[i] + nprimi = bfs_nprim[i] + alphaik = np.zeros(bfs_coeffs.shape[1], dtype=np.float64) # Should be Hoisted out + alphaik[:] = bfs_expnts[i,:] + lmni = bfs_lmn[i] + la, ma, na = lmni + I = bfs_coords[i] + + jshell = shell_indices[j] + if jshell!=jshell_previous: + Nj = bfs_contr_prim_norms[j] + nprimj = bfs_nprim[j] + alphajk = np.zeros(bfs_coeffs.shape[1], dtype=np.float64) # Should be Hoisted out + alphajk[:] = bfs_expnts[j,:] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + J = bfs_coords[j] + + if ishell!=ishell_previous or jshell!=jshell_previous: + IJsq = IJsq_arr[i,j] + tempcoeff1 = Ni*Nj + gammaP = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1]), dtype=np.float64) # Should be Hoisted out + screenfactorAB = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1]), dtype=np.float64) # Should be Hoisted out + # Ap = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1]), dtype=np.float64) # Should be Hoisted out + + kshell = aux_shell_indices[k] + if kshell!=kshell_previous: + Nk = aux_bfs_contr_prim_norms[k] + nprimk = aux_bfs_nprim[k] + alphakk = np.zeros(aux_bfs_coeffs.shape[1], dtype=np.float64) # Should be Hoisted out + alphakk[:] = aux_bfs_expnts[k,:] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + K = aux_bfs_coords[k] + Q = K + + if ishell!=ishell_previous or jshell!=jshell_previous or kshell!=kshell_previous: + tempcoeff2 = tempcoeff1*Nk + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + tempcoeff3 = np.zeros(bfs_coeffs.shape[1], dtype=np.float64) # Should be Hoisted out + tempcoeff3[:] = tempcoeff2*bfs_coeffs[i,:]*bfs_prim_norms[i,:] + # PQsq = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + # rho = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + + + + val = 0.0 + if norder<=10: # Use rys quadrature + if ishell!=ishell_previous or jshell!=jshell_previous or kshell!=kshell_previous: + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + # roots = np.zeros((5)) + # weights = np.zeros((5)) + G = np.zeros((n+1,m+1)) + + + #Loop over primitives + for ik in range(nprimi): + for jk in range(nprimj): + if ishell!=ishell_previous or jshell!=jshell_previous: + gammaP[ik,jk] = alphaik[ik] + alphajk[jk] + # Ap[ik,jk] = alphaik[ik]*alphajk[jk] + # screenfactorAB[ik,jk] = np.exp(-Ap[ik,jk]/gammaP[ik,jk]*IJsq) + screenfactorAB[ik,jk] = np.exp(-alphaik[ik]*alphajk[jk]/gammaP[ik,jk]*IJsq) + + if abs(screenfactorAB[ik,jk])<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik[ik]*I + alphajk[jk]*J)/gammaP[ik,jk] + PQ = P - Q + PQsq = np.sum(PQ**2) + tempcoeff4 = tempcoeff3[ik]*djk*Njk + + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk[kk] + rho = gammaP[ik,jk]*gammaQ/(gammaP[ik,jk]+gammaQ) + + # ABsrt = np.sqrt(gammaP[ik,jk]*alphakk[kk]) + # X = PQsq*rho + # factor = 2*np.sqrt(rho/pi) + + + val += tempcoeff5*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik[ik], alphajk[jk],alphakk[kk],alphalk,I,J,K,L) + # The following should have been faster but isnt + # val += tempcoeff5*coulomb_rys_fast(roots,weights,G,norder,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik[ik], alphajk[jk], alphakk[kk], alphalk,I,J,K,L,X,gammaP[ik,jk],alphakk[kk],Ap[ik,jk],0.0,ABsrt,factor,P,Q) + + else: # Analytical (Conventional) + #Loop over primitives + for ik in range(nprimi): + for jk in range(nprimj): + if ishell!=ishell_previous or jshell!=jshell_previous: + gammaP[ik,jk] = alphaik[ik] + alphajk[jk] + # Ap[ik,jk] = alphaik[ik]*alphajk[jk] + # screenfactorAB[ik,jk] = np.exp(-Ap[ik,jk]/gammaP[ik,jk]*IJsq) + screenfactorAB[ik,jk] = np.exp(-alphaik[ik]*alphajk[jk]/gammaP[ik,jk]*IJsq) + + if abs(screenfactorAB[ik,jk])<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik[ik]*I + alphajk[jk]*J)/gammaP[ik,jk] + PI = P - I + PJ = P - J + PQ = P - Q + fac1 = twopisq/gammaP[ik,jk]*screenfactorAB[ik,jk] + onefourthgammaPinv = 0.25/gammaP[ik,jk] + tempcoeff4 = tempcoeff3[ik]*djk*Njk + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk[kk] #+ alphalk + + + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP[ik,jk] + gammaQ)) + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP[ik,jk],gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff5 + + threeC2E[itemp] = val + # ishell_previous = ishell + # jshell_previous = jshell + # kshell_previous = kshell + + + + return threeC2E + +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"",nogil=True) +def rys_3c2e_tri_schwarz_sparse_internal2(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indicesA, indicesB, indicesC, nao, naux, IJsq_arr, ntriplets, threeC2E): + # Calculates 3c2e integrals based on a provided list of significant triplets determined using Schwarz inequality + # It is assumed that the provided list was made with triangular int3c2e in mind + # TODO: Check out these screening methods as well + # https://kops.uni-konstanz.de/server/api/core/bitstreams/79ada61a-fd29-43fd-a298-79c1696a0601/content + # https://aip.scitation.org/doi/10.1063/1.4917519 + + ntriplets = indicesA.shape[0] # No. of significant triplets + + + #Debug: + # print(config.THREADING_LAYER) + # print(threading_layer()) + # print(get_parallel_chunksize()) + # print(ntriplets) + # set_parallel_chunksize(ntriplets//128) + # print(get_parallel_chunksize()) + + pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + L = np.zeros((3)) + alphalk = 0.0 + ld, md, nd = int(0), int(0), int(0) + + # Initialize before hand to avoid contention of memory allocator + # roots = np.zeros((5)) # 5 is the maximum possible value currently in the code + # weights = np.zeros((5)) + # G = np.zeros((21,21)) # 11 should be enough + + + + # Create arrays to avoid contention of allocator + # (https://stackoverflow.com/questions/70339388/using-numba-with-np-concatenate-is-not-efficient-in-parallel/70342014#70342014) + + + + #Loop over BFs + for itemp in range(0,ntriplets): + i = indicesA[itemp] + j = indicesB[itemp] + k = indicesC[itemp] + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + J = bfs_coords[j] + # IJ = I - J + # IJsq = np.sum(IJ**2) + # IJsq = np.dot(IJ,IJ) + IJsq = IJsq_arr[i,j] + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + nprimj = bfs_nprim[j] + tempcoeff1 = Ni*Nj + + K = aux_bfs_coords[k] + Nk = aux_bfs_contr_prim_norms[k] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + nprimk = aux_bfs_nprim[k] + tempcoeff2 = tempcoeff1*Nk + + + + # KL = K - L + # KLsq = np.sum(K**2) + # KLsq = np.dot(K,K) + + # npriml = bfs_nprim[l] + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + val = 0.0 + if norder<=10: # Use rys quadrature + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + # G[:,:] = 0.0 + # roots[:] = 0.0 + # weights[:] = 0.0 + + + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + alphaik = bfs_expnts[i,ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j,jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik*I + alphajk*J)/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + alphakk = aux_bfs_expnts[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + # screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + # if abs(screenfactorKL)<1.0e-8: + # #Although this value of screening threshold seems very large + # # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # # actually worsened the agreement. + # # I suspect that this is caused due to an error cancellation + # # that happens with the nucmat calculation, as the same screening is + # # used there as well + # continue + # # if abs(screenfactorAB*screenfactorKL)<1.0e-10: + # # #TODO: Check for optimal value for screening + # # continue + + Q = K + PQ = P - Q + PQsq = np.sum(PQ**2) + # PQsq = np.dot(PQ,PQ) + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + + + val += tempcoeff5*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + else: # Analytical (Conventional) + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + alphaik = bfs_expnts[i,ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j,jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(aux_bfs_nprim[k]): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + alphakk = aux_bfs_expnts[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + # screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + # if abs(screenfactorKL)<1.0e-8: + # #Although this value of screening threshold seems very large + # # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # # actually worsened the agreement. + # # I suspect that this is caused due to an error cancellation + # # that happens with the nucmat calculation, as the same screening is + # # used there as well + # continue + + Q = K + PQ = P - Q + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ)) + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff5 + + threeC2E[itemp] = val + + + + #Debug: + # print(config.THREADING_LAYER) + # print(threading_layer()) + + return None + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"",nogil=True) +def rys_3c2e_tri_schwarz_sparse_algo9_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, offset, indicesB, indicesC, nao, naux, IJsq_arr, shell_indices, aux_shell_indices): + # Calculates 3c2e integrals based on a provided list of significant triplets determined using Schwarz inequality + # It is assumed that the provided list was made with triangular int3c2e in mind + # TODO: Check out these screening methods as well + # https://kops.uni-konstanz.de/server/api/core/bitstreams/79ada61a-fd29-43fd-a298-79c1696a0601/content + # https://aip.scitation.org/doi/10.1063/1.4917519 + + ntriplets = indicesB.shape[0] # No. of significant triplets + threeC2E = np.zeros((ntriplets), dtype=np.float64) + + #Debug: + # print(config.THREADING_LAYER) + # print(threading_layer()) + # print(get_parallel_chunksize()) + # print(ntriplets) + # set_parallel_chunksize(ntriplets//128) + # print(get_parallel_chunksize()) + + pi = 3.141592653589793 + twopisq = 19.739208802178716 #2*PI^2 + L = np.zeros((3)) + alphalk = 0.0 + ld, md, nd = int(0), int(0), int(0) + + + maxprims = bfs_coeffs.shape[1] + maxprims_aux = aux_bfs_coeffs.shape[1] + + # Create arrays to avoid contention of allocator + # (https://stackoverflow.com/questions/70339388/using-numba-with-np-concatenate-is-not-efficient-in-parallel/70342014#70342014) + + ibatch_threads = np.zeros(get_num_threads(), dtype=np.uint8) + i_threads = np.zeros(get_num_threads(), dtype=np.uint8) + + #Loop over BFs + for itemp in prange(ntriplets): + id_thrd = get_thread_id() + + if ibatch_threads[id_thrd]=offset[ibatch_threads[id_thrd]]: + ibatch_threads[id_thrd] +=1 + i_threads[id_thrd] += 1 + + # print(itemp) + # print(ibatch_threads) + # print(i_threads) + + + i = i_threads[id_thrd] + j = indicesB[itemp] + k = indicesC[itemp] + + + Ni = bfs_contr_prim_norms[i] + nprimi = bfs_nprim[i] + alphaik = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + alphaik[:] = bfs_expnts[i,:] + lmni = bfs_lmn[i] + la, ma, na = lmni + I = bfs_coords[i] + + Nj = bfs_contr_prim_norms[j] + nprimj = bfs_nprim[j] + alphajk = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + alphajk[:] = bfs_expnts[j,:] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + J = bfs_coords[j] + + + IJsq = IJsq_arr[i,j] + tempcoeff1 = Ni*Nj + gammaP = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + screenfactorAB = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + # Ap = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1]), dtype=np.float64) # Should be Hoisted out + + # kshell = aux_shell_indices[k] + Nk = aux_bfs_contr_prim_norms[k] + nprimk = aux_bfs_nprim[k] + alphakk = np.zeros(maxprims_aux, dtype=np.float64) # Should be Hoisted out + alphakk[:] = aux_bfs_expnts[k,:] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + K = aux_bfs_coords[k] + Q = K + + + tempcoeff2 = tempcoeff1*Nk + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + tempcoeff3 = np.zeros(maxprims, dtype=np.float64) # Should be Hoisted out + tempcoeff3[:] = tempcoeff2*bfs_coeffs[i,:]*bfs_prim_norms[i,:] + # PQsq = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + # rho = np.zeros((bfs_coeffs.shape[1], bfs_coeffs.shape[1], aux_bfs_coeffs.shape[1]), dtype=np.float64) + + + + val = 0.0 + if norder<=10: # Use rys quadrature + + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + roots = np.zeros((10)) + weights = np.zeros((10)) + # G = np.zeros((n+1,m+1)) + G = np.zeros((n+1,m+1)) + + + #Loop over primitives + for ik in range(nprimi): + alphaik_ = alphaik[ik] + tempcoeff3_ = tempcoeff3[ik] + for jk in range(nprimj): + alphajk_ = alphajk[jk] + # gammaP[ik,jk] = alphaik_ + alphajk_ + gammaP_ = alphaik_ + alphajk_ + # Ap[ik,jk] = alphaik[ik]*alphajk[jk] + # screenfactorAB[ik,jk] = np.exp(-Ap[ik,jk]/gammaP[ik,jk]*IJsq) + screenfactorAB = np.exp(-alphaik_*alphajk_/gammaP_*IJsq) + + if abs(screenfactorAB)<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik_*I + alphajk_*J)/gammaP_ + PQ = P - Q + PQsq = np.sum(PQ**2) + tempcoeff4 = tempcoeff3_*djk*Njk + + # gammaP_ = gammaP[ik,jk] + + for kk in range(nprimk): + + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk[kk] + rho = gammaP_*gammaQ/(gammaP_ + gammaQ) + + # ABsrt = np.sqrt(gammaP[ik,jk]*alphakk[kk]) + # X = PQsq*rho + # factor = 2*np.sqrt(rho/pi) + # print('s') + val += tempcoeff5*coulomb_rys_3c2e(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik_, alphajk_,alphakk[kk],alphalk,I,J,K,L) + # The following should have been faster but isnt somehow + # val += tempcoeff5*coulomb_rys_new(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik_, alphajk_,alphakk[kk],alphalk,I,J,K,L) + # The following should have been faster but isnt + # val += tempcoeff5*coulomb_rys_fast(roots,weights,G,norder,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik[ik], alphajk[jk], alphakk[kk], alphalk,I,J,K,L,X,gammaP[ik,jk],alphakk[kk],Ap[ik,jk],0.0,ABsrt,factor,P,Q) + + else: # Analytical (Conventional) + #Loop over primitives + for ik in range(nprimi): + for jk in range(nprimj): + + gammaP[ik,jk] = alphaik[ik] + alphajk[jk] + # Ap[ik,jk] = alphaik[ik]*alphajk[jk] + # screenfactorAB[ik,jk] = np.exp(-Ap[ik,jk]/gammaP[ik,jk]*IJsq) + screenfactorAB[ik,jk] = np.exp(-alphaik[ik]*alphajk[jk]/gammaP[ik,jk]*IJsq) + + if abs(screenfactorAB[ik,jk])<1.0e-8: + #Although this value of screening threshold seems very large + # it actually gives the best consistency with PySCF. Reducing it to 1e-15, + # actually worsened the agreement. + # I suspect that this is caused due to an error cancellation + # that happens with the nucmat calculation, as the same screening is + # used there as well + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik[ik]*I + alphajk[jk]*J)/gammaP[ik,jk] + PI = P - I + PJ = P - J + PQ = P - Q + fac1 = twopisq/gammaP[ik,jk]*screenfactorAB[ik,jk] + onefourthgammaPinv = 0.25/gammaP[ik,jk] + tempcoeff4 = tempcoeff3[ik]*djk*Njk + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk[kk] #+ alphalk + + + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP[ik,jk] + gammaQ)) + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP[ik,jk],gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff5 + + threeC2E[itemp] = val + + + + return threeC2E + +# Reference: https://github.com/numba/numba/issues/8007#issuecomment-1113187684 +parallel_options_algo8 = { + 'comprehension': False, # parallel comprehension + 'prange': False, # parallel for-loop + 'numpy': False, # parallel numpy calls + 'reduction': False, # parallel reduce calls + 'setitem': False, # parallel setitem + 'stencil': False, # parallel stencils + 'fusion': False, # enable fusion or not +} +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True, boundscheck=False, debug=False) +def rys_3c2e_tri_schwarz_sparse_algo8_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, ntriplets, nao, naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold): + # Calculates 3c2e integrals based on a provided list of significant triplets determined using Schwarz inequality + # It is assumed that the provided list was made with triangular int3c2e in mind + # TODO: Check out these screening methods as well + # https://kops.uni-konstanz.de/server/api/core/bitstreams/79ada61a-fd29-43fd-a298-79c1696a0601/content + # https://aip.scitation.org/doi/10.1063/1.4917519 + + #Debug: + # print(config.THREADING_LAYER) + # print(threading_layer()) + # print(get_parallel_chunksize()) + # print(ntriplets) + # set_parallel_chunksize(ntriplets//128) + # print(get_parallel_chunksize()) + + threeC2E = np.zeros((ntriplets), dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = np.zeros((3)) + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + + index = 0 + #Loop pver BFs + for i in prange(0, nao): #A + + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(0, i+1): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + sqrt_ij = sqrt_ints4c2e_diag[i,j] + + + for k in prange(0, naux): #C + if sqrt_ij*sqrt_diag_ints2c2e[k]<=threshold: + continue + K = aux_bfs_coords[k] + Nk = aux_bfs_contr_prim_norms[k] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + nprimk = aux_bfs_nprim[k] + + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + + + if norder<=10: # Use rys quadrature + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder), dtype=np.float64) + weights = np.zeros((norder), dtype=np.float64) + G = np.zeros((n+1,m+1), dtype=np.float64) + + val = 0.0 + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + alphaik = bfs_expnts[i,ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j,jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j,jk] + Njk = bfs_prim_norms[j,jk] + P = (alphaik*I + alphajk*J)/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k,kk] + Nkk = aux_bfs_prim_norms[k,kk] + alphakk = aux_bfs_expnts[k,kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk + + Q = K + PQ = P - Q + PQsq = np.sum(PQ**2) + rho = gammaP*gammaQ/(gammaP+gammaQ) + + val += tempcoeff5*coulomb_rys_3c2e(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + + else: # Analytical (Conventional) + val = 0.0 + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(aux_bfs_nprim[k]): + dkk = aux_bfs_coeffs[k][kk] + Nkk = aux_bfs_prim_norms[k][kk] + alphakk = aux_bfs_expnts[k][kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk + + Q = K#(alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))#*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + + val += omega*sum1*tempcoeff5 + + threeC2E[index] = val + index += 1 + + return threeC2E + + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +def df_coeff_calculator_test(ints3c2e_1d, dmat_1d, indicesA, indicesB, indicesC, naux): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + nelements = ints3c2e_1d.shape[0] + df_coeff = np.zeros((naux), dtype=np.float64) + for itemp in prange(nelements): + # This is extremely slow even though the following is hoisted out automatically + df_coeff_temp = np.zeros((naux), dtype=np.float64) # Temp arrary to avoid race condition + i = indicesA[itemp] + offset = int(i*(i+1)/2) + j = indicesB[itemp] + k = indicesC[itemp] + df_coeff_temp[k] = ints3c2e_1d[itemp]*dmat_1d[j+offset] # This avoids the race condition + df_coeff += df_coeff_temp + return df_coeff + +def df_coeff_calculator(ints3c2e_1d, dmat_1d, indicesA, indicesB, indicesC, naux, ncores): + ntriplets = len(indicesA) + batch_size = min(ntriplets, int(1e6)) + nbatches = ntriplets//batch_size + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size='auto')(delayed(df_coeff_calculator_internal)(ints3c2e_1d[ibatch*batch_size : min(ibatch*batch_size+batch_size,ntriplets)], dmat_1d, indicesA[ibatch*batch_size : min(ibatch*batch_size+batch_size,ntriplets)], indicesB[ibatch*batch_size : min(ibatch*batch_size+batch_size,ntriplets)], indicesC[ibatch*batch_size : min(ibatch*batch_size+batch_size,ntriplets)], naux) for ibatch in range(nbatches+1)) + df_coeff = np.zeros((naux), dtype=np.float64) + for ibatch in range(0,len(output)): + df_coeff += output[ibatch] + # Free memory + output = 0 + del output + return df_coeff + + +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +def df_coeff_calculator_internal(ints3c2e_1d, dmat_1d, indicesA, indicesB, indicesC, naux): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + nelements = ints3c2e_1d.shape[0] + df_coeff = np.zeros((naux), dtype=np.float64) + for itemp in range(nelements): + i = indicesA[itemp] + offset = int(i*(i+1)/2) + j = indicesB[itemp] + k = indicesC[itemp] + df_coeff[k] += ints3c2e_1d[itemp]*dmat_1d[j+offset] # This leads to race condition + return df_coeff + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +def df_coeff_calculator_old(ints3c2e_1d, dmat_1d, indicesA, indicesB, indicesC, naux): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + nelements = ints3c2e_1d.shape[0] + df_coeff = np.zeros((naux), dtype=np.float64) + for itemp in range(nelements): + i = indicesA[itemp] + offset = int(i*(i+1)/2) + j = indicesB[itemp] + k = indicesC[itemp] + df_coeff[k] += ints3c2e_1d[itemp]*dmat_1d[j+offset] # This leads to race condition + return df_coeff + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +def df_coeff_calculator_algo8(ints3c2e_1d, dmat_1d, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, nao, naux): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + # nelements = ints3c2e_1d.shape[0] + df_coeff = np.zeros((naux), dtype=np.float64) + itemp = 0 + for i in range(0, nao): + offset = int(i*(i+1)/2) + for j in range(0, i+1): + sqrt_ij = sqrt_ints4c2e_diag[i,j] + for k in range(0, naux): + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + df_coeff[k] += ints3c2e_1d[itemp]*dmat_1d[j+offset] # This leads to race condition + itemp += 1 + return df_coeff + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +def df_coeff_calculator_algo10_serial(ints3c2e_1d, dmat_1d, indicesA, indicesB, offsets_3c2e, naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + # nelements = ints3c2e_1d.shape[0] + df_coeff = np.zeros((naux), dtype=np.float64) + for ij in range(indicesA.shape[0]): + i = indicesA[ij] + j = indicesB[ij] + offset = int(i*(i+1)/2) + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + continue + index_k = 0 + for k in range(0, naux): + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + df_coeff[k] += ints3c2e_1d[offsets_3c2e[ij]+index_k]*dmat_1d[j+offset] # This leads to race condition + index_k += 1 + return df_coeff + + +def df_coeff_calculator_algo10_parallel(ints3c2e_1d, dmat_1d, indicesA, indicesB, offsets_3c2e, naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, ncores, strict_schwarz, auxbfs_lm): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + # nelements = ints3c2e_1d.shape[0] + batch_size = min(indicesA.shape[0], int(500)) + nbatches = indicesA.shape[0]//batch_size + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size='auto')(delayed(df_coeff_calculator_algo10_parallel_internal)(ints3c2e_1d[offsets_3c2e[ibatch*batch_size] : offsets_3c2e[min(ibatch*batch_size+batch_size, indicesA.shape[0])]], dmat_1d, indicesA[ibatch*batch_size : min(ibatch*batch_size+batch_size,indicesA.shape[0])], indicesB[ibatch*batch_size : min(ibatch*batch_size+batch_size,indicesA.shape[0])], offsets_3c2e[ibatch*batch_size : min(ibatch*batch_size+batch_size,indicesA.shape[0])], naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, auxbfs_lm) for ibatch in range(nbatches+1)) + df_coeff = np.zeros((naux), dtype=np.float64) + for ibatch in range(0,len(output)): + df_coeff += output[ibatch] + # Free memory + output = 0 + del output + return df_coeff + +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +def df_coeff_calculator_algo10_parallel_internal(ints3c2e_1d, dmat_1d, indicesA, indicesB, offsets_3c2e, naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, auxbfs_lm): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + df_coeff = np.zeros((naux), dtype=np.float64) + for ij in range(indicesA.shape[0]): + i = indicesA[ij] + j = indicesB[ij] + offset = int(i*(i+1)/2) + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + continue + index_k = 0 + for k in range(0, naux): + # if strict_schwarz: + # max_val = sqrt_ij*sqrt_diag_ints2c2e[k] + # if max_val>threshold: + # if max_val<1e-8: + # if (auxbfs_lm[k])>=1: # s aux functions + # continue + # elif max_val<1e-7: + # if (auxbfs_lm[k])>=2: # s, p aux functions + # continue + # elif max_val<1e-6: + # if (auxbfs_lm[k])>=3: # s, p, d aux functions + # continue + # df_coeff[k] += ints3c2e_1d[offsets_3c2e[ij]-offsets_3c2e[0]+index_k]*dmat_1d[j+offset] # This leads to race condition + # index_k += 1 + # else: + # continue + # else: + # if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + # df_coeff[k] += ints3c2e_1d[offsets_3c2e[ij]-offsets_3c2e[0]+index_k]*dmat_1d[j+offset] # This leads to race condition + # index_k += 1 + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + df_coeff[k] += ints3c2e_1d[offsets_3c2e[ij]-offsets_3c2e[0]+index_k]*dmat_1d[j+offset] # This leads to race condition + index_k += 1 + return df_coeff + + + +# def df_coeff_calculator(ints3c2e_1d, dmat_1d, indicesA, indicesB, indicesC, naux): +# # This function calculates the coefficients of the auxiliary basis for +# # density fitting. +# i = indicesA +# j = indicesB +# k = indicesC +# offset = (i*(i+1))//2 +# df_coeff = np.zeros((naux)) +# df_coeff[k] += ints3c2e_1d * dmat_1d[j+offset] +# return df_coeff + +# @guvectorize([(float64[:], float64[:], int16[:], int16[:], int16[:], int16[:], float64[:])], '(n),(m),(n)->(m)', target='parallel') +# def df_coeff_calculator(ints3c2e_1d, dmat_1d, indicesA, indicesB, indicesC, naux, df_coeff_out): +# # This function calculates the coefficients of the auxiliary basis for +# # density fitting. +# # This can also be simply calculated using: +# # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays +# # or +# # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays +# # However, we need to create a custom function to +# # do this with a sparse 1d array holding the values of significant +# # elements of ints3c2e array. +# for i in range(ints3c2e_1d.shape[0]): +# offset = int(indicesA[i]*(indicesA[i]+1)/2) +# df_coeff_out[indicesC[i]] += ints3c2e_1d[i]*dmat_1d[indicesB[i]+offset] + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def J_tri_calculator(ints3c2e_1d, df_coeff, indicesA, indicesB, indicesC, size_J_tri): + # This can also be simply calculated using: + # J = contract('ijk,k', ints3c2e, df_coeff) # For general 3d and 2d arrays + # or + # J_tri = contract('pP,P', ints3c2e, df_coeff) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + nelements = ints3c2e_1d.shape[0] + J_tri = np.zeros((size_J_tri), dtype=np.float64) + for itemp in prange(nelements): + i = indicesA[itemp] + offset = int(i*(i+1)/2) + j = indicesB[itemp] + k = indicesC[itemp] + J_tri[j+offset] += ints3c2e_1d[itemp]*df_coeff[k] + return J_tri + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def J_tri_calculator_algo10(ints3c2e_1d, df_coeff, indicesA, indicesB, offsets_3c2e, size_J_tri, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, naux, strict_schwarz, auxbfs_lm): + # This can also be simply calculated using: + # J = contract('ijk,k', ints3c2e, df_coeff) # For general 3d and 2d arrays + # or + # J_tri = contract('pP,P', ints3c2e, df_coeff) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + # print(indicesA) + npairs = indicesA.shape[0] + J_tri = np.zeros((size_J_tri), dtype=np.float64) + for itemp in prange(npairs): + i = indicesA[itemp] + offset = int(i*(i+1)/2) + j = indicesB[itemp] + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + continue + index_k = 0 + for k in range(naux): + # if strict_schwarz: + # max_val = sqrt_ij*sqrt_diag_ints2c2e[k] + # if max_val>threshold: + # if max_val<1e-8: + # if (auxbfs_lm[k])>=1: # s aux functions + # continue + # elif max_val<1e-7: + # if (auxbfs_lm[k])>=2: # s, p aux functions + # continue + # elif max_val<1e-6: + # if (auxbfs_lm[k])>=3: # s, p, d aux functions + # continue + # J_tri[j+offset] += ints3c2e_1d[offsets_3c2e[itemp]+index_k]*df_coeff[k] + # index_k += 1 + # else: + # continue + # else: + # if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + # J_tri[j+offset] += ints3c2e_1d[offsets_3c2e[itemp]+index_k]*df_coeff[k] + # index_k += 1 + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + J_tri[j+offset] += ints3c2e_1d[offsets_3c2e[itemp]+index_k]*df_coeff[k] + index_k += 1 + return J_tri + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def J_tri_calculator_algo8(ints3c2e_1d, df_coeff, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, nao, naux, size_J_tri): + # This can also be simply calculated using: + # J = contract('ijk,k', ints3c2e, df_coeff) # For general 3d and 2d arrays + # or + # J_tri = contract('pP,P', ints3c2e, df_coeff) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + J_tri = np.zeros((size_J_tri), dtype=np.float64) + itemp = 0 + for i in range(0, nao): + offset = int(i*(i+1)/2) + for j in range(0, i+1): + sqrt_ij = sqrt_ints4c2e_diag[i,j] + for k in range(0, naux): + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + J_tri[j+offset] += ints3c2e_1d[itemp]*df_coeff[k] # This should lead to a race condition but doesn't somehow + itemp += 1 + return J_tri + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def J_tri_calculator_from_4c2e(ints4c2e_1d, dmat_1d, indicesA, indicesB, indicesC, indicesD, size_J_tri): + # This can also be simply calculated using: + # J = contract('ijkl,lk', ints4c2e, ddmat) # For general 3d and 2d arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints4c2e array. + nelements = ints4c2e_1d.shape[0] + J_tri = np.zeros((size_J_tri), dtype=np.float64) + for itemp in prange(nelements): + i = indicesA[itemp] + offset = int(i*(i+1)/2) + j = indicesB[itemp] + k = indicesC[itemp] + l = indicesD[itemp] + J_tri[j+offset] += ints4c2e_1d[itemp]*dmat_1d[j+offset] # This should lead to a race condition but doesn't somehow + return J_tri + +import numpy as np +from numba import cuda, njit + +@cuda.jit +def J_tri_calculator_kernel(ints3c2e_1d, df_coeff, indicesA, indicesB, indicesC, J_tri): + # This can also be simply calculated using: + # J = contract('ijk,k', ints3c2e, df_coeff) # For general 3d and 2d arrays + # or + # J_tri = contract('pP,P', ints3c2e, df_coeff) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + tid = cuda.threadIdx.x + cuda.blockDim.x * cuda.blockIdx.x + stride = cuda.gridDim.x * cuda.blockDim.x + + nelements = ints3c2e_1d.shape[0] + offset = 0 + for itemp in range(tid, nelements, stride): + i = indicesA[itemp] + offset = int(i*(i+1)/2) + j = indicesB[itemp] + k = indicesC[itemp] + cuda.atomic.add(J_tri, j+offset, ints3c2e_1d[itemp]*df_coeff[k]) + + +def J_tri_calculator_cupy(ints3c2e_1d, df_coeff, indicesA, indicesB, indicesC, size_J_tri): + nelements = ints3c2e_1d.shape[0] + J_tri = np.zeros((size_J_tri), dtype=cp.float64) + blockdim = 512 + # griddim = (cuda.device_array(1, dtype=cp.int32), 1) + + # Set the grid dimensions such that there are enough blocks to cover all threads + griddim = (nelements + blockdim - 1) // blockdim + + # Launch the kernel + J_tri_calculator_kernel[griddim, blockdim](ints3c2e_1d, df_coeff, indicesA, indicesB, indicesC, J_tri) + + return J_tri +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/conv_2c2e_symm.py",".py","8231","201","import numpy as np +from numba import njit, prange + +from .integral_helpers import innerLoop4c2e +from .rys_helpers import coulomb_rys + +def conv_2c2e_symm(basis, slice=None): + """""" + Compute two-center two-electron integrals (2c2e) using the conventional (slow) method, + exploiting permutation symmetry. + + This function computes 2c2e electron repulsion integrals (ERIs) over a given + basis set using the conventional algorithm which is very slow compared to Rys quadrature. + It supports symmetric integral evaluation and allows slicing the full ERI matrix into + blocks for efficient parallelization or chunked computation. + + Parameters + ---------- + basis : Basis + A basis object containing basis function information such as: + coordinates, exponents, coefficients, angular momentum, normalization factors, + and number of primitives. + + slice : list of int, optional + A list of four integers [start_row, end_row, start_col, end_col] specifying + a block (subset) of the full integral matrix to compute. + If not provided, the full matrix is computed. + + Returns + ------- + ints2c2e : np.ndarray + A 2D numpy array containing the computed 2c2e integrals for the specified slice. + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 3c2e integrals efficiently. + # This function calculates the 3c2e electron-electron ERIs for a given basis object and auxbasis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is a 4 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + # slice = [start_row, end_row, start_col, end_col] + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + start_row = int(slice[0]) #row start index + end_row = int(slice[1]) #row end index + start_col = int(slice[2]) #column start index + end_col = int(slice[3]) #column end index + + ints2c2e = conv_2c2e_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col) + return ints2c2e + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def conv_2c2e_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col): + # Two centered two electron integrals by hacking the 4c2e routines based on rys quadrature. + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the electron-electron Coulomb potential matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # returns (A|C) + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + tri_symm = False + no_symm = False + if start_row==start_col and end_row==end_col: + tri_symm = True + else: + no_symm = True + + + # Initialize the matrix with zeros + twoC2E = np.zeros(matrix_shape) + + + + # pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + # twopisq = 19.739208802178716 #2*PI^2 + J = L = np.zeros((3)) + Nj = Nl = 1 + lnmj = lmnl = np.zeros((3),dtype=np.int32) + lb, mb, nb = int(0), int(0), int(0) + ld, md, nd = int(0), int(0), int(0) + alphajk = alphalk = 0.0 + djk, dlk = 1.0, 1.0 + Njk, Nlk = 1.0, 1.0 + #Loop pver BFs + for i in prange(start_row, end_row): #A + I = bfs_coords[i] + # J = I + # IJ = I #I - J + P = I + # IJsq = np.sum(IJ**2) + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for k in range(start_col, end_col): #C + if (tri_symm and k<=i) or no_symm: + + val = 0.0 + + + K = bfs_coords[k] + # L = K + # KL = K + Q = K + # KLsq = np.sum(KL**2) + Nk = bfs_contr_prim_norms[k] + lmnk = bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff1 = Ni*Nk + nprimk = bfs_nprim[k] + + + norder = int((la+ma+na+lc+mc+nc)/2+1 ) + n = int(max(la,ma,na)) + m = int(max(lc,mc,nc)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + PQ = P - Q + PQsq = np.sum(PQ**2) + + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + alphajk = 0.0 + tempcoeff2 = tempcoeff1*dik*Nik + gammaP = alphaik + + for kk in range(nprimk): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + alphalk = 0.0 + tempcoeff3 = tempcoeff2*dkk*Nkk + gammaQ = alphakk + + + + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + + val += tempcoeff3*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + + twoC2E[i-start_row, k-start_col] = val + + if tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Si,j=Sj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + twoC2E[i-start_row, j-start_col] = twoC2E[j-start_col, i-start_row] + + + + return twoC2E","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_2c2e_symm.py",".py","8994","215","import numpy as np +from numba import njit, prange + +from .integral_helpers import innerLoop4c2e +from .rys_helpers import coulomb_rys + +def rys_2c2e_symm(basis, slice=None): + """""" + Compute symmetric two-center two-electron integrals using Rys quadrature. + + This function evaluates the electron repulsion integrals (ERIs) + involving only two centers (2c2e), using the Rys quadrature method. + The integrals are computed efficiently using Numba, and the data is prepared + accordingly for compatibility with JIT compilation. It assumes symmetry, + and computes only a specified block if requested. + + Parameters + ---------- + basis : object + A basis set object containing the basis function data. It must have attributes: + - bfs_coords : list of (x, y, z) coordinates of basis function centers + - bfs_contr_prim_norms : contraction-normalization factors + - bfs_lmn : angular momentum tuples (l, m, n) + - bfs_nprim : number of primitives for each basis function + - bfs_coeffs : contraction coefficients + - bfs_expnts : primitive exponents + - bfs_prim_norms : primitive normalization constants + - bfs_nao : total number of atomic orbitals (basis functions) + + slice : list of int, optional + A four-element list `[start_row, end_row, start_col, end_col]` specifying the + row and column ranges of the matrix to be computed. If None, the full matrix + is computed. + + Returns + ------- + ints2c2e : ndarray + A 2D numpy array of shape `(end_row - start_row, end_col - start_col)` + containing the computed symmetric two-center two-electron integrals. + + Notes + ----- + This function prepares the basis set data in a Numba-friendly format by + converting ragged lists into padded 2D arrays, where the second dimension + corresponds to the maximum number of primitives. The core integral computation + is offloaded to a Numba-accelerated function `rys_2c2e_symm_internal`. + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 3c2e integrals efficiently. + # This function calculates the 3c2e electron-electron ERIs for a given basis object and auxbasis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is a 4 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + # slice = [start_row, end_row, start_col, end_col] + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + start_row = int(slice[0]) #row start index + end_row = int(slice[1]) #row end index + start_col = int(slice[2]) #column start index + end_col = int(slice[3]) #column end index + + ints2c2e = rys_2c2e_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col) + return ints2c2e + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def rys_2c2e_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col): + # Two centered two electron integrals by hacking the 4c2e routines based on rys quadrature. + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the electron-electron Coulomb potential matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # returns (A|C) + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + tri_symm = False + no_symm = False + if start_row==start_col and end_row==end_col: + tri_symm = True + else: + no_symm = True + + + # Initialize the matrix with zeros + twoC2E = np.zeros(matrix_shape) + + + + # pi = 3.141592653589793 + # pisq = 9.869604401089358 #PI^2 + # twopisq = 19.739208802178716 #2*PI^2 + J = L = np.zeros((3)) + Nj = Nl = 1 + lnmj = lmnl = np.zeros((3),dtype=np.int32) + lb, mb, nb = int(0), int(0), int(0) + ld, md, nd = int(0), int(0), int(0) + alphajk = alphalk = 0.0 + djk, dlk = 1.0, 1.0 + Njk, Nlk = 1.0, 1.0 + #Loop pver BFs + for i in prange(start_row, end_row): #A + I = bfs_coords[i] + # J = I + # IJ = I #I - J + P = I + # IJsq = np.sum(IJ**2) + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for k in range(start_col, end_col): #C + if (tri_symm and k<=i) or no_symm: + + val = 0.0 + + + K = bfs_coords[k] + # L = K + # KL = K + Q = K + # KLsq = np.sum(KL**2) + Nk = bfs_contr_prim_norms[k] + lmnk = bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff1 = Ni*Nk + nprimk = bfs_nprim[k] + + + norder = int((la+ma+na+lc+mc+nc)/2+1 ) + n = int(max(la,ma,na)) + m = int(max(lc,mc,nc)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + PQ = P - Q + PQsq = np.sum(PQ**2) + + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + alphajk = 0.0 + tempcoeff2 = tempcoeff1*dik*Nik + gammaP = alphaik + + for kk in range(nprimk): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + alphalk = 0.0 + tempcoeff3 = tempcoeff2*dkk*Nkk + gammaQ = alphakk + + + + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + + val += tempcoeff3*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + + twoC2E[i-start_row, k-start_col] = val + + if tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Si,j=Sj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + twoC2E[i-start_row, j-start_col] = twoC2E[j-start_col, i-start_row] + + + + return twoC2E","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/dipole_moment_mat_symm_cupy.py",".py","17056","380","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba + + +def dipole_moment_mat_symm_cupy(basis, slice=None, origin=None, stream=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + if origin is None: + origin = cp.zeros((3)) + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # Infer the matrix shape from the start and end indices + num_rows = b - a + num_cols = d - c + start_row = a + end_row = b + start_col = c + end_col = d + matrix_shape = (3, num_rows, num_cols) + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # Initialize the matrix with zeros + M = cp.zeros(matrix_shape) + + thread_x = 32 + thread_y = 16 + + if stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + else: + nb_stream = stream + + blocks_per_grid = ((num_rows + (thread_x - 1))//thread_x, (num_cols + (thread_y - 1))//thread_y) + dipole_moment_mat_symm_internal_cuda[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, origin, M) + if both_tri_symm: + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](a,b,c,d,M) + cuda.synchronize() + return M + + + +# @cuda.jit(device=True ) +# def hermite_gauss_coeff(i,j,t,Qx,a,b,p,q): +# ''' Recursive definition of Hermite Gaussian coefficients. +# Returns a float. +# Source: https://github.com/jjgoings/McMurchie-Davidson/blob/master/mmd/integrals/reference.py +# a: orbital exponent on Gaussian 'a' (e.g. alpha in the text) +# b: orbital exponent on Gaussian 'b' (e.g. beta in the text) +# i,j: orbital angular momentum number on Gaussian 'a' and 'b' +# t: number nodes in Hermite (depends on type of integral, +# e.g. always zero for overlap integrals) +# Qx: distance between origins of Gaussian 'a' and 'b' +# ''' +# if p is None: +# p = a + b +# if q is None: +# q = a*b/p +# if (t < 0) or (t > (i + j)): +# # out of bounds for t +# return 0.0 +# elif i == j == t == 0: +# # base case +# return math.exp(-q*Qx*Qx) # K_AB +# elif j == 0: +# # decrement index i +# return (1/(2*p))*hermite_gauss_coeff(i-1,j,t-1,Qx,a,b,p,q) - (q*Qx/a)*hermite_gauss_coeff(i-1,j,t,Qx,a,b,p,q) + (t+1)*hermite_gauss_coeff(i-1,j,t+1,Qx,a,b,p,q) +# else: +# # decrement index j +# return (1/(2*p))*hermite_gauss_coeff(i,j-1,t-1,Qx,a,b,p,q) + (q*Qx/b)*hermite_gauss_coeff(i,j-1,t,Qx,a,b,p,q) + (t+1)*hermite_gauss_coeff(i,j-1,t+1,Qx,a,b,p,q) + +#@cuda.jit(['float64(int16, int16, int16, float64, float64, float64)'], device=True) +@cuda.jit(device=True) +def hermite_gauss_coeff2(i, j, t, Qx, a, b): + + p = a + b + q = a*b/p + + if (t < 0) or (t > (i + j)): + # out of bounds for t + return 0.0 + elif i == j == t == 0: + # base case + return math.exp(-q*Qx*Qx) # K_AB + else: + coeff = 0.0 + coeffs = cuda.local.array((25, 25, 50), numba.float64) + coeffs[:,:,:] = 0.0 + coeffs[0, 0, 0] = math.exp(-q*Qx*Qx) + # for jj in range(j, -1, -1): + # for ii in range(i, -1, -1): + tt = t + for ii in range(i, -1, -1): + for jj in range(j, -1, -1): + # for ii in range(0, i+1, 1): + # for jj in range(0, j+1, 1): + # for tt in range(max(0, t-i-j), min(i+j, t)+1): + # if (tt < 0) or (tt > (ii-1 + jj)): + # coeffs[ii-1, jj, tt] = 0.0 + # if (tt < 0) or (tt > (ii + jj-1)): + # coeffs[ii, jj-1, tt] = 0.0 + # if ((tt-1) < 0) or ((tt-1) > (ii-1 + jj)): + # coeffs[ii-1, jj, tt-1] = 0.0 + # if ((tt-1) < 0) or ((tt-1) > (ii + jj-1)): + # coeffs[ii, jj-1, tt-1] = 0.0 + # if ((tt+1) < 0) or ((tt+1) > (ii-1 + jj)): + # coeffs[ii-1, jj, tt+1] = 0.0 + # if ((tt+1) < 0) or ((tt+1) > (ii + jj-1)): + # coeffs[ii, jj-1, tt+1] = 0.0 + # if ii == 0 and jj == 0 and tt == 0: + if ii == jj == tt == 0: + coeff = coeffs[ii, jj, tt] + elif jj != 0: + coeff += (1/(2*p)) * coeffs[ii, jj-1, tt-1] + coeff += (q*Qx/b) * coeffs[ii, jj-1, tt] + coeff += (tt+1) * coeffs[ii, jj-1, tt+1] + elif jj == 0: + coeff += (1/(2*p)) * coeffs[ii-1, jj, tt-1] + coeff -= (q*Qx/a) * coeffs[ii-1, jj, tt] + coeff += (tt+1) * coeffs[ii-1, jj, tt+1] + # elif ii==0: + # coeff += (1/(2*p)) * coeffs[ii, jj-1, tt-1] + # coeff += (q*Qx/b) * coeffs[ii, jj-1, tt] + # coeff += (tt+1) * coeffs[ii, jj-1, tt+1] + # elif jj == 0: + # coeff += (1/(2*p)) * coeffs[ii-1, jj, tt-1] + # coeff -= (q*Qx/a) * coeffs[ii-1, jj, tt] + # coeff += (tt+1) * coeffs[ii-1, jj, tt+1] + + coeffs[ii, jj, tt] = coeff + coeff = 0.0 + + return coeffs[i, j, t] +# @cuda.jit(device=True) +# def hermite_gauss_coeff2(i, j, t, Qx, a, b): + +# p = a + b +# q = a * b / p +# if (t < 0) or (t > (i + j)): +# return 0.0 +# elif i == j == t == 0: +# return math.exp(-q * Qx * Qx) # K_AB +# else: +# result = 0.0 +# if j == 0: +# for k in range(t + 1): +# term = (1 / (2 * p)) if k == 0 else (k + 1) +# coeff = hermite_gauss_coeff2(i - 1, j, k, Qx, a, b) +# result += term * coeff +# result -= (q * Qx / a) if k > 0 else 0.0 +# result *= coeff +# else: +# for k in range(t + 1): +# term = (1 / (2 * p)) if k == 0 else (k + 1) +# coeff = hermite_gauss_coeff2(i, j - 1, k, Qx, a, b) +# result += term * coeff +# result += (q * Qx / b) if k > 0 else 0.0 +# result *= coeff +# return result +# def hermite_gauss_coeff2(i,j,t,Qx,a,b): +# ''' Recursive definition of Hermite Gaussian coefficients. +# Returns a float. +# Source: https://github.com/jjgoings/McMurchie-Davidson/blob/master/mmd/integrals/reference.py +# a: orbital exponent on Gaussian 'a' (e.g. alpha in the text) +# b: orbital exponent on Gaussian 'b' (e.g. beta in the text) +# i,j: orbital angular momentum number on Gaussian 'a' and 'b' +# t: number nodes in Hermite (depends on type of integral, +# e.g. always zero for overlap integrals) +# Qx: distance between origins of Gaussian 'a' and 'b' +# ''' +# p = a + b +# q = a*b/p +# if (t < 0) or (t > (i + j)): +# # out of bounds for t +# return 0.0 +# elif i == j == t == 0: +# # base case +# return math.exp(-q*Qx*Qx) # K_AB + +# elif j == 0: +# # decrement index i +# temp1 = (1/(2*p))*hermite_gauss_coeff2(i-1,j,t-1,Qx,a,b) +# temp2 = (q*Qx/a)*hermite_gauss_coeff2(i-1,j,t,Qx,a,b) +# temp3 = (t+1)*hermite_gauss_coeff2(i-1,j,t+1,Qx,a,b) +# return temp1 - temp2 + temp3 +# else: +# # decrement index j +# return (1/(2*p))*hermite_gauss_coeff2(i,j-1,t-1,Qx,a,b) + (q*Qx/b)*hermite_gauss_coeff2(i,j-1,t,Qx,a,b) + (t+1)*hermite_gauss_coeff2(i,j-1,t+1,Qx,a,b) +# return 0.0 + +@cuda.jit(fastmath=True, cache=True, max_registers=8)#(device=True) +def dipole_moment_mat_symm_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, origin, out): + # This function calculates the dipole moment matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the dipole moment matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://github.com/jjgoings/McMurchie-Davidson/blob/master/mmd/integrals/reference.py + PI = 3.141592653589793 + + i, j = cuda.grid(2) + if i>=start_row and i=start_col and j=start_row and i=start_col and ji: + out[0, i-start_row, j-start_col] = out[0, j-start_col, i-start_row] + out[1, i-start_row, j-start_col] = out[1, j-start_col, i-start_row] + out[2, i-start_row, j-start_col] = out[2, j-start_col, i-start_row] +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/eval_xc_1_cupy.py",".py","25797","515","import numpy as np +import pylibxc +from timeit import default_timer as timer +from pyfock import Integrals +from opt_einsum import contract, contract_expression +from pyfock import XC +try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = np + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math + +def eval_xc_1_cupy(basis, dmat, weights, coords, funcid=[1,7], spin=0, blocksize=50000, debug=False, list_nonzero_indices=None, \ + count_nonzero_indices=None, list_ao_values=None, list_ao_grad_values=None, use_libxc=True, nstreams=1, ngpus=1,\ + freemem=True, threads_per_block=None, type=cp.float64): + print('Calculating XC term using GPU and algo 1', flush=True) + # Evaluate the XC term using GPU + # Here instead of parallelizing over batches, the operations within + # a batch are parallelized. Therefore, this requires a larger batchsize~20480. + # While the CPU version of this algorithm is quite slow, + # the GPU version performs great! + + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + + startTotal = timer() + + # For debugging and benchmarking purposes + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + durationPrelims = 0.0 + durationTotal = 0.0 + n_gpu= 1 + # nstreams = 1 + # Create streams for asynchronous execution + # streams = [cp.cuda.Stream(non_blocking=False) for i in range(nstreams)] + # nb_streams = [cuda.external_stream(streams[i].ptr) for i in range(nstreams)] + # nb_streams = [cuda.stream() for i in range(nstreams)] + # cp_streams = [cp.cuda.ExternalStream(nb_streams[i].ptr) for i in range(nstreams)] + # TODO: Try using this for multiGPU support: https://github.com/cupy/cupy/issues/5692 + # streams = [] + # for i in range(n_gpu): + # cp.cuda.Device(i).use() + # streams.append(cp.cuda.Stream(non_blocking = True)) + + if not use_libxc: + print('Not using LibXC for XC evaluations', flush=True) + + if debug: + startPrelims = timer() + #OUTPUT + #Functional energy + efunc = 0.0 + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + v = cp.zeros((basis.bfs_nao, basis.bfs_nao), dtype=type) + #print(v.dtype) + #TODO mGGA, Hybrid + + #Calculate number of blocks/batches + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + nelec = 0.0 + + # Convert the arrays needed for CUDA computations to cupy arrays + + # If a list of significant basis functions for each block of grid points is provided + if list_nonzero_indices is not None: + dmat_orig = dmat + dmat_orig_cp = cp.asarray(dmat_orig, dtype=type) + else: + dmat = cp.asarray(dmat, dtype=type) + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to eval_bfs faster by skipping the mediator eval_bfs function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.asarray([basis.bfs_coords], dtype=type) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms], dtype=type) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim], dtype=type) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim], dtype=type) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim], dtype=type) + bfs_radius_cutoff = cp.zeros([basis.bfs_nao], dtype=type) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = Integrals.bf_val_helpers.eval_bfs(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + for iblock in range(len(list_nonzero_indices)): + list_nonzero_indices[iblock] = cp.asarray(list_nonzero_indices[iblock]) + + + weights_cp = cp.asarray(weights, dtype=type) + coords_cp = cp.asarray(coords, dtype=type) + + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + + my_expr = contract_expression('ij,mi,mj->m', (150, 150), (blocksize, 150), (blocksize, 150)) + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + my_expr_grad1 = contract_expression('ij,kmi,mj->km', (150, 150), (3, blocksize, 150), (blocksize, 150)) + my_expr_grad2 = contract_expression('ij,mi,kmj->km', (150, 150), (blocksize, 150), (3, blocksize, 150)) + + if threads_per_block is None: + # Determine the optimal number of blocks per grid + max_threads_per_block = cuda.get_current_device().MAX_THREADS_PER_BLOCK + thread_x = max_threads_per_block/16 + thread_y = max_threads_per_block/64 + threads_per_block = (thread_x, thread_y) + else: + thread_x = threads_per_block[0] + thread_y = threads_per_block[1] + + + if debug: + cp.cuda.Stream.null.synchronize() + durationPrelims += timer() - startPrelims + + # A large scratch for evaluating batch local ao values + ao_value_block_ = cp.zeros((blocksize, max(count_nonzero_indices)), dtype=type) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + ao_value_grad_block_ = cp.zeros((3, blocksize, max(count_nonzero_indices)), dtype=type) + + # Just a precautionary synchronize here so that all the cupy arrays created above should finish getting initialized. + # cp.cuda.Stream.null.synchronize() + # cuda.synchronize() + # with cupyx.profiler.profile(): + # with streams[0]: + # Loop over blocks/batches of grid points + for iblock in range(nblocks+1): + # stream_id = iblock % nstreams + # with streams[stream_id]: + # with nb_streams[stream_id]: + # cp.cuda.Device(stream_id).use() + # cp.cuda.Stream(cp_streams[stream_id]).use() + offset = iblock*blocksize + + # Get weights and coordinates of grid points for this block/batch + weights_block = weights_cp[offset : min(offset+blocksize,ngrids)] + coords_block = coords_cp[offset : min(offset+blocksize,ngrids)] + #coords_block_cp = cp.asarray(coords[offset : min(offset+blocksize,ngrids)]) + + # Get the list of basis functions with significant contributions to this block + if list_nonzero_indices is not None: + non_zero_indices = list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]] + # Get the subset of density matrix corresponding to the siginificant basis functions + dmat = dmat_orig_cp[cp.ix_(non_zero_indices, non_zero_indices)] + + if debug: + startAO = timer() + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + if list_ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block = list_ao_values[iblock] + else: + # ao_value_block = Integrals.eval_bfs(basis, coords_block) + if list_nonzero_indices is not None: + # ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_vectorized_internal_cupy(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices, scratches) + # Get a subset of the scratch for evaluating batch local ao values + ao_value_block = cp.asarray(ao_value_block_[0:coords_block.shape[0], 0:non_zero_indices.shape[0]]) + # cp.cuda.Stream.null.synchronize() # Precautionary synchronize here + # blocks_per_grid = ((non_zero_indices.shape[0]//thread_x) + 1, (coords_block.shape[0]//thread_y) + 1) # ""lazy"" round-up + blocks_per_grid = ((non_zero_indices.shape[0] + (thread_x - 1))//thread_x, (coords_block.shape[0] + (thread_y - 1))//thread_y) + # nb_stream = stream_cupy_to_numba(streams[stream_id]) + # get the pointer to actual CUDA stream + # raw_str = streams[stream_id].ptr + # nb_stream = numba.cuda.external_stream(raw_str) + Integrals.bf_val_helpers.eval_bfs_sparse_internal_cuda[blocks_per_grid, threads_per_block](bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices, ao_value_block) + + # cuda.synchronize() # This is needed when using this in a cupy stream + # cp.cuda.Stream.null.synchronize() + else: + ao_value_block = Integrals.bf_val_helpers.eval_bfs_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + if list_ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block, ao_values_grad_block = list_ao_values[iblock], list_ao_grad_values[iblock] + else: + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, deriv=1, parallel=True, non_zero_indices=non_zero_indices) + if list_nonzero_indices is not None: + # Calculating ao values and gradients together, didn't really do much improvement in computational speed + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + # Get a subset of the scratch for evaluating batch local ao values + ao_value_block = cp.asarray(ao_value_block_[0:coords_block.shape[0], 0:non_zero_indices.shape[0]]) + ao_values_grad_block = cp.asarray(ao_value_grad_block_[0:3, 0:coords_block.shape[0], 0:non_zero_indices.shape[0]]) + blocks_per_grid = ((non_zero_indices.shape[0] + (thread_x - 1))//thread_x, (coords_block.shape[0] + (thread_y - 1))//thread_y) + # nb_stream = stream_cupy_to_numba(streams[stream_id]) + Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal_cuda[blocks_per_grid, threads_per_block](bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], + bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, + coords_block, non_zero_indices, ao_value_block, + ao_values_grad_block) + + # streams[stream_id].synchronize() + # nb_streams[stream_id].synchronize() + # cp.cuda.Stream.null.synchronize() + # streams[stream_id].synchronize() + + else: + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block) + + + # Convert to cupy array + ao_value_block = cp.asarray(ao_value_block, dtype=type) + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + ao_values_grad_block = cp.asarray(ao_values_grad_block, dtype=type) + + if debug: + cp.cuda.Stream.null.synchronize() + durationAO = durationAO + timer() - startAO + + if debug: + startRho = timer() + # print('calculating rho...') + # rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block, backend='cupy') # Original (pretty fast) + rho_block = my_expr(dmat, ao_value_block, ao_value_block, backend='cupy') + # X = ao_value_block @ dmat.T + # rho_block = cp.sum(ao_value_block*X,axis=1) + # rho_block = contract('mi,im->m', ao_value_block, X) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values too + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = ( contract('ij,kmi,mj->km',dmat,ao_values_grad_block,ao_value_block, backend='cupy', optimize='optimal')+\ + # contract('ij,mi,kmj->km',dmat,ao_value_block,ao_values_grad_block, backend='cupy', optimize='optimal') )[:] + rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = my_expr_grad1(dmat,ao_values_grad_block,ao_value_block, backend='cupy') \ + + my_expr_grad2(dmat, ao_value_block, ao_values_grad_block, backend='cupy') + sigma_block = calc_sigma(rho_grad_block_x, rho_grad_block_y, rho_grad_block_z) + if use_libxc: + sigma_block = cp.asnumpy(sigma_block) + + if debug: + cp.cuda.Stream.null.synchronize() + durationRho = durationRho + timer() - startRho + #print('Duration for Rho at grid points: ',durationRho) + # print('done calculating rho') + + #LibXC stuff + if use_libxc: + # Exchange + if debug: + startLibxc = timer() + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = cp.asnumpy(rho_block) + if xc_family_dict[x_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # startLibxc = timer() + # Input dictionary for libxc + #inp = {} + # Input dictionary needs density values at grid points + #inp['rho'] = rho_block + if xc_family_dict[c_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + if debug: + cp.cuda.Stream.null.synchronize() + durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + else: + # Exchange + if debug: + startLibxc = timer() + # Calculate the necessary quantities using own implementation + # retx = lda_x(rho_block) + # retx = gga_x_b88(rho_block, sigma_block) + if xc_family_dict[x_family_code]=='LDA': + retx = XC.func_compute(funcid[0], rho_block, use_gpu=True) + else: + retx = XC.func_compute(funcid[0], rho_block, sigma_block, use_gpu=True) + + # Correlation + # Calculate the necessary quantities using own implementation + # retc = lda_c_vwn(rho_block) + # retc = gga_c_lyp(rho_block, sigma_block) + if xc_family_dict[c_family_code]=='LDA': + retc = XC.func_compute(funcid[1], rho_block, use_gpu=True) + else: + retc = XC.func_compute(funcid[1], rho_block, sigma_block, use_gpu=True) + if debug: + cp.cuda.Stream.null.synchronize() + durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + + if debug: + startE = timer() + #ENERGY----------- + if use_libxc: + e = retx['zk'] + retc['zk'] # Functional values at grid points + else: + e = retx[0] + retc[0] + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + den = rho_block*weights_block + # den = cp.multiply(rho_block, weights_block) + # den = elementwise_multiply(rho_block, weights_block) + if use_libxc: + efunc = efunc + cp.dot(den, cp.asarray(e)) #Multiply with functional values at grid points and sum + else: + efunc = efunc + cp.dot(den, e) #Multiply with functional values at grid points and sum + # efunc = efunc + cp.sum(elementwise_multiply(den, e)) #Multiply with functional values at grid points and sum + nelec += cp.sum(den) + if debug: + cp.cuda.Stream.null.synchronize() + durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + if debug: + startF = timer() + if use_libxc: + vrho = retx['vrho'] + retc['vrho'] + else: + vrho = retx[1] + retc[1] + + vsigma = 0 + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + if use_libxc: + vsigma += retx['vsigma'] + else: + vsigma += retx[2] + + if xc_family_dict[c_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + if use_libxc: + vsigma += retc['vsigma'] + else: + vsigma += retc[2] + + # F = np.multiply(weights_block,vrho[:,0]) #This is fast enough. + if use_libxc: + v_rho_temp = cp.asarray(vrho[:,0]) + else: + v_rho_temp = vrho + # F = weights_block*v_rho_temp + # F = calc_F(weights_block, v_rho_temp) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + if use_libxc: + Ftemp = 2*weights_block*cp.asarray(vsigma[:,0]) + else: + Ftemp = 2*weights_block*vsigma + # Ftemp = 2*cp.multiply(weights_block, vsigma) + # Ftemp = 2*elementwise_multiply(weights_block, vsigma) + Fx = Ftemp*rho_grad_block_x + Fy = Ftemp*rho_grad_block_y + Fz = Ftemp*rho_grad_block_z + if debug: + cp.cuda.Stream.null.synchronize() + durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + if debug: + startZ = timer() + # z = 0.5*F*ao_value_block.T + # z = calc_z(F, ao_value_block.T) + z = calc_z(weights_block, v_rho_temp, ao_value_block.T) + # z = 0.5*np.einsum('m,mi->mi',F,ao_value_block) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + z += calc_z_gga(Fx, Fy, Fz, ao_values_grad_block[0].T, ao_values_grad_block[1].T, ao_values_grad_block[2].T) + # z += Fx*ao_values_grad_block[0].T + Fy*ao_values_grad_block[1].T + Fz*ao_values_grad_block[2].T + + + if debug: + cp.cuda.Stream.null.synchronize() + durationZ = durationZ + timer() - startZ + # print('Duration for calculation of z : ',durationZ) + # Free memory + F = 0 + ao_value_block_T = 0 + vrho = 0 + + if debug: + startV = timer() + + #v_temp = z @ ao_value_block + #v_temp = cp.dot(z, ao_value_block) + v_temp = cp.matmul(z, ao_value_block) + if list_nonzero_indices is not None: + v[cp.ix_(non_zero_indices, non_zero_indices)] += v_temp + v_temp.T + else: + v += v_temp + v_temp.T + + + if debug: + cp.cuda.Stream.null.synchronize() + durationV = durationV + timer() - startV + + # for stream in streams: + # stream.synchronize() + + + print('Number of electrons: ', nelec) + #print(v_temp.dtype) + if debug: + print('Duration for Prelims: ', durationPrelims) + print('Duration for AO values: ', durationAO) + print('Duration for V: ',durationV) + print('Duration for Rho at grid points: ',durationRho) + print('Duration for F: ',durationF) + print('Duration for Z: ',durationZ) + print('Duration for E: ',durationE) + print('Duration for LibXC: ',durationLibxc) + + + + + if debug: + startV_tonumpy = timer() + if debug: + cp.cuda.Stream.null.synchronize() + durationV_tonumpy = timer() - startV_tonumpy + print('Duration for V to numpy', durationV_tonumpy) + print('Total time: ', durationPrelims+durationAO+durationRho+durationLibxc+durationE+durationF+durationV+durationZ+durationV_tonumpy) + + + if use_libxc: + efunc = efunc[0] + if debug: + cp.cuda.Stream.null.synchronize() + durationTotal += timer() - startTotal + print('Total time2: ', durationTotal) + + if freemem or nstreams!=1: + cp._default_memory_pool.free_all_blocks() + + + # Final synchronize before return + cp.cuda.Stream.null.synchronize() + return efunc, v + +@fuse(kernel_name='calc_F') +def calc_F(weights_block, v_rho_temp): + return weights_block*v_rho_temp + +# @fuse(kernel_name='calc_z') +# def calc_z(F, ao_value_block): +# # ao_value_block should be supplied after transposing it +# return 0.5*F*ao_value_block + +@fuse(kernel_name='calc_z') +def calc_z(weights_block, v_rho_temp, ao_value_block): + # ao_value_block should be supplied after transposing it + F = weights_block*v_rho_temp + return 0.5*F*ao_value_block + +@fuse(kernel_name='calc_sigma') +def calc_sigma(rho_grad_block_x, rho_grad_block_y, rho_grad_block_z): + return rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2 + +@fuse(kernel_name='calc_z_gga') +def calc_z_gga(Fx, Fy, Fz, ao_values_grad_block_x, ao_values_grad_block_y, ao_values_grad_block_z): + return Fx*ao_values_grad_block_x + Fy*ao_values_grad_block_y + Fz*ao_values_grad_block_z + +@fuse(kernel_name='elementwise_multiply') +def elementwise_multiply(a, b): + return a*b","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_3c2e_symm.py",".py","18159","363","import numpy as np +from numba import njit, prange + +from .integral_helpers import innerLoop4c2e +from .rys_helpers import coulomb_rys +from .schwarz_helpers import eri_4c2e_diag +from .rys_2c2e_symm import rys_2c2e_symm + + +def rys_3c2e_symm(basis, auxbasis, slice=None, schwarz=False, schwarz_threshold=1e-9): + """""" + Compute three-center two-electron (3c2e) electron repulsion integrals using + the Rys quadrature method with symmetry considerations. + + This function evaluates integrals of the form (A B | C), where A and B are + basis functions from a primary basis set and C is from an auxiliary basis set. + Symmetry in the first two indices is exploited ((A B | C) = (B A | C)), + so only the upper-triangular part of the (A,B) block is computed and the (B A | C) + integrals are formed by symmetry. + The implementation uses Numba-accelerated backends with symmetry-aware + optimizations and optional Schwarz screening to skip negligible contributions. + Symmetry is utilized to only compute N_{bf}*(N_{bf}+1)/2*N_{auxbf} + + Parameters + ---------- + basis : object + Primary basis set object containing information about atomic orbitals, such as: + - bfs_coords : Cartesian coordinates of basis function centers. + - bfs_coeffs : Contraction coefficients. + - bfs_expnts : Gaussian exponents. + - bfs_prim_norms : Primitive normalization constants. + - bfs_contr_prim_norms : Contraction normalization factors. + - bfs_lmn : Angular momentum quantum numbers (ℓ, m, n). + - bfs_nprim : Number of primitives per basis function. + - bfs_nao : Total number of atomic orbitals. + + auxbasis : object + Auxiliary basis set object with the same attributes as `basis`, + but typically used for resolution-of-the-identity (RI) expansions. + + slice : list of int, optional + A 6-element list specifying a subset of integrals to compute: + [start_A, end_A, start_B, end_B, start_C, end_C] + If None (default), computes all N_{bf}*N_{bf}*N_{auxbf} integrals. + + schwarz : bool, optional + If True, applies Schwarz screening to skip calculations where the + product of integral bounds is below `schwarz_threshold`. + + schwarz_threshold : float, optional + The threshold for Schwarz screening (default is 1e-9). + + Returns + ------- + ints3c2e : ndarray of shape + (Nbf, Nbf, Nauxbf) or + (end_A - start_A, end_B - start_B, end_C - start_C) + if slice is given. + The computed 3-center 2-electron integrals. + + Notes + ----- + - Uses preallocated NumPy arrays to store primitive data for efficient Numba processing. + - Handles irregular contraction patterns by padding primitive arrays to the + size of the largest contraction. + - If Schwarz screening is enabled, precomputes diagonal two-electron integrals + and uses their square roots for screening. + - Symmetry relations are exploited to avoid redundant calculations. + + Examples + -------- + >>> ints = rys_3c2e_symm(basis, auxbasis) + >>> ints_block = rys_3c2e_symm(basis, auxbasis, slice=[0, 5, 0, 5, 0, 10]) + >>> ints_screened = rys_3c2e_symm(basis, auxbasis, schwarz=True, schwarz_threshold=1e-10) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 3c2e integrals efficiently. + # This function calculates the 3c2e electron-electron ERIs for a given basis object and auxbasis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is a 6 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + # slice = [indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC] + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, auxbasis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + + if schwarz: + ints4c2e_diag = eri_4c2e_diag(basis) + ints2c2e = rys_2c2e_symm(auxbasis) + sqrt_ints4c2e_diag = np.sqrt(np.abs(ints4c2e_diag)) + sqrt_diag_ints2c2e = np.sqrt(np.abs(np.diag(ints2c2e))) + print('Prelims calc done for Schwarz screening!') + else: + #Create dummy array + sqrt_ints4c2e_diag = np.zeros((1,1), dtype=np.float64) + sqrt_diag_ints2c2e = np.zeros((1), dtype=np.float64) + + ints3c2e = rys_3c2e_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, schwarz, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, schwarz_threshold) + return ints3c2e + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def rys_3c2e_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, schwarz, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, schwarz_threshold): + # This function calculates the three-centered two electron integrals for density fitting + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # returns (AB|P) + + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + matrix_shape = (num_A, num_B, num_C) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + tri_symm = False + no_symm = False + if indx_startA==indx_startB and indx_endA==indx_endB: + tri_symm = True + else: + no_symm = True + + + # Initialize the matrix with zeros + threeC2E = np.zeros(matrix_shape, dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = np.zeros((3)) + + + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(indx_startB, indx_endB): #B + if (tri_symm and j<=i) or no_symm: + if schwarz: + sqrt_ints4c2e_diag_ij = sqrt_ints4c2e_diag[i,j] + J = bfs_coords[j] + IJ = np.zeros((3)) + # IJ = I - J + # IJsq = np.sum(IJ**2) + IJ[0] = I[0] - J[0] + IJ[1] = I[1] - J[1] + IJ[2] = I[2] - J[2] + IJsq = IJ[0]**2 + IJ[1]**2 + IJ[2]**2 + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + for k in prange(indx_startC, indx_endC): #C + if schwarz: + if sqrt_ints4c2e_diag_ij*sqrt_diag_ints2c2e[k]= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + + # Initialize the matrix with zeros + T = np.zeros(matrix_shape) + + + for i in prange(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + for j in range(start_col, end_col): #Because we are only evaluating the lower triangular matrix. + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result_sum = 0.0 + J = bfs_coords[j] + IJ = I - J + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + #Some factors to save FLOPS + fac1 = np.sum(IJ**2) + fac2 = Ni*Nj + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + for ik in range(bfs_nprim[i]): + for jk in range(bfs_nprim[j]): + alphaik = bfs_expnts[i,ik] + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + temp_1 = np.exp(-alphaik*alphajk/gamma*fac1) + if (abs(temp_1)<1.0e-9): + continue + + dik = bfs_coeffs[i,ik] + djk = bfs_coeffs[j,jk] + Nik = bfs_prim_norms[i,ik] + Njk = bfs_prim_norms[j,jk] + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + + temp = dik*djk #coeff of primitives as read from basis set + temp = temp*Nik*Njk #normalization factors of primitives + temp = temp*fac2 #normalization factor of the contraction of primitives + + + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + result = temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + result_sum += result + T[i - start_row, j - start_col] = result_sum + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Ti,j=Tj,i + for i in prange(start_row, end_row): + for j in range(start_col, end_col): + if j>i: + T[i-start_row, j-start_col] = T[j-start_col, i-start_row] + + return T","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_3c2e_tri.py",".py","14738","298","import numpy as np +from numba import njit, prange + +from .integral_helpers import innerLoop4c2e +from .rys_helpers import coulomb_rys + + +def rys_3c2e_tri(basis, auxbasis): + """""" + Compute three-center two-electron (3c2e) electron repulsion integrals using + the Rys quadrature method with symmetry considerations, stored in packed + triangular form for memory efficiency. + + This function evaluates integrals of the form (A B | C), where A and B are + basis functions from a primary basis set and C is from an auxiliary basis set. + Symmetry in the first two indices is exploited ((A B | C) = (B A | C)), + so only the upper-triangular part of the (A,B) block is computed and stored. + The resulting array has shape (N_{bf}*(N_{bf}+1)/2, N_{auxbf}), where the first + index corresponds to a flattened 1D triangular index over basis function pairs. + + Unlike `rys_3c2e_symm`, this routine does not support computing arbitrary slices + — the full triangular set is always evaluated. + + Parameters + ---------- + basis : object + Primary basis set object containing information about atomic orbitals, such as: + - bfs_coords : Cartesian coordinates of basis function centers. + - bfs_coeffs : Contraction coefficients. + - bfs_expnts : Gaussian exponents. + - bfs_prim_norms : Primitive normalization constants. + - bfs_contr_prim_norms : Contraction normalization factors. + - bfs_lmn : Angular momentum quantum numbers (ℓ, m, n). + - bfs_nprim : Number of primitives per basis function. + - bfs_nao : Total number of atomic orbitals. + + auxbasis : object + Auxiliary basis set object with the same attributes as `basis`, + typically used for resolution-of-the-identity (RI) expansions. + + Returns + ------- + ints3c2e : ndarray of shape (Nbf*(Nbf+1)//2, Nauxbf) + The computed 3-center 2-electron integrals in packed triangular form. + The mapping from a pair (i, j) with i ≤ j to the first dimension index + follows standard upper-triangular packing order. + + Notes + ----- + - This is a memory-efficient variant of `rys_3c2e_symm` that avoids storing + the full (Nbf, Nbf, Nauxbf) array. + - Uses preallocated NumPy arrays for primitive data to ensure efficient Numba processing. + - Handles irregular contraction patterns by padding primitive arrays to the size + of the largest contraction in the set. + - No Schwarz screening or partial computation is available in this function. + + Examples + -------- + >>> ints_tri = rys_3c2e_tri(basis, auxbasis) + >>> # Retrieve value for pair (i, j) and auxiliary k: + >>> def packed_index(i, j, Nbf): + ... if i > j: + ... i, j = j, i + ... return i * Nbf - i*(i-1)//2 + (j - i) + >>> val = ints_tri[packed_index(i, j, basis.bfs_nao), k] + """""" + # This is a memory efficient version of the rys_3c2e_symm(). + # Instead of returning an array of shape (Nbf, Nbf, Nauxbf) it returns + # an array of shape (Nbf*(Nbf+1)/2, Nauxbf), where the first index corresponds to the + # 1D triangular matrix. + + # You cannot provide a slice here to calculate only a subset. + + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 3c2e integrals efficiently. + # This function calculates the 3c2e electron-electron ERIs for a given basis object and auxbasis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + ints3c2e = rys_3c2e_tri_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, basis.bfs_nao, auxbasis.bfs_nao) + return ints3c2e + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def rys_3c2e_tri_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, nbf, naux): + # This function is a memory efficient version of rys_3c2e_symm_internal. + # This does not support slicing and only returns a 2D array instead of a 3D array. + # This function calculates the three-centered two electron integrals for density fitting + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # returns (AB|P) + + # Infer the matrix shape from the start and end indices + matrix_shape = (int(nbf*(nbf+1)/2.0), naux) + + # Initialize the matrix with zeros + threeC2E = np.zeros(matrix_shape, dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = np.zeros((3)) + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + #Loop pver BFs + for i in prange(0, nbf): #A + offset = int(i*(i+1)/2) + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(0, i+1): #B + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + for k in prange(0, naux): #C + K = aux_bfs_coords[k] + Nk = aux_bfs_contr_prim_norms[k] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + nprimk = aux_bfs_nprim[k] + + + + KL = K #- L + KLsq = np.sum(KL**2) + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + val = 0.0 + + if norder<=10: # Use rys quadrature + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k][kk] + Nkk = aux_bfs_prim_norms[k][kk] + alphakk = aux_bfs_expnts[k][kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + + Q = K + PQ = P - Q + PQsq = np.sum(PQ**2) + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + + + val += tempcoeff5*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + + else: # Analytical (Conventional) + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(aux_bfs_nprim[k]): + dkk = aux_bfs_coeffs[k][kk] + Nkk = aux_bfs_prim_norms[k][kk] + alphakk = aux_bfs_expnts[k][kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + + Q = K#(alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))#*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + + val += omega*sum1*tempcoeff5 + + threeC2E[j+offset, k] = val + + + + + return threeC2E","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_2c2e_symm_cupy.py",".py","8283","210","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba +from .rys_helpers_cuda import coulomb_rys, Roots, DATA_X, DATA_W + + +def rys_2c2e_symm_cupy(basis, slice=None, cp_stream=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + DATA_X_cuda = cp.asarray(DATA_X) + DATA_W_cuda = cp.asarray(DATA_W) + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # Infer the matrix shape from the start and end indices + num_rows = b - a + num_cols = d - c + start_row = a + end_row = b + start_col = c + end_col = d + matrix_shape = (num_rows, num_cols) + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + tri_symm = False + no_symm = False + if start_row==start_col and end_row==end_col: + tri_symm = True + else: + no_symm = True + + # Initialize the matrix with zeros + V = cp.zeros(matrix_shape) + + + + + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((num_rows + (thread_x - 1))//thread_x, (num_cols + (thread_y - 1))//thread_y) + rys_2c2e_symm_internal_cuda[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, tri_symm, no_symm, DATA_X_cuda, DATA_W_cuda, V) + if tri_symm: + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((num_rows + (thread_x - 1))//thread_x, (num_cols + (thread_y - 1))//thread_y) + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](a,b,c,d,V) + if cp_stream is None: + cuda.synchronize() + else: + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + # cp._default_memory_pool.free_all_blocks() + return V + + + + + +@cuda.jit(fastmath=True, cache=True, max_registers=50)#(device=True) +def rys_2c2e_symm_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, tri_symm, no_symm, DATA_X, DATA_W, out): + # Two centered two electron integrals by hacking the 4c2e routines based on rys quadrature. + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the electron-electron Coulomb potential matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # returns (A|C) + + i, k = cuda.grid(2) + J = L = cuda.local.array((3), numba.float64) + lb, mb, nb = int(0), int(0), int(0) + ld, md, nd = int(0), int(0), int(0) + alphajk = alphalk = 0.0 + + if i>=start_row and i=start_col and k=start_row and i=start_col and ji: + out[i-start_row, j-start_col] = out[j-start_col, i-start_row]","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/kin_mat_grad_symm.py",".py","71362","1179","import numpy as np +from numba import njit , prange + +from .integral_helpers import calcS + +def kin_mat_grad_symm(basis, slice=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + bfs_atoms = np.array([basis.bfs_atoms]) + natoms = max(basis.bfs_atoms) + 1 + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + + dT = kin_mat_symm_grad_internal_new(natoms, bfs_atoms[0], bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d) + + return dT + +@njit(parallel=True, cache=True) +def kin_mat_symm_grad_internal(natoms, bfs_atoms, bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col): + # This function calculates the kinetic energy matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the kinetic matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (natoms, 3, num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + + # Initialize the matrix with zeros + dT = np.zeros(matrix_shape) + + for iatom in prange(natoms): + for dir in range(3): + for i in range(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + if iatom==bfs_atoms[i]: + is_ibf_on_atom = True + else: + is_ibf_on_atom = False + for j in range(start_col, end_col): #Because we are only evaluating the lower triangular matrix. + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result_sum = 0.0 + if iatom==bfs_atoms[j]: + is_jbf_on_atom = True + else: + is_jbf_on_atom = False + if is_ibf_on_atom or is_jbf_on_atom: + J = bfs_coords[j] + IJ = I - J + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + #Some factors to save FLOPS + fac1 = np.sum(IJ**2) + fac2 = Ni*Nj + for ik in range(bfs_nprim[i]): + for jk in range(bfs_nprim[j]): + alphaik = bfs_expnts[i,ik] + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + temp_1 = np.exp(-alphaik*alphajk/gamma*fac1) + if (abs(temp_1)<1.0e-9): + continue + + dik = bfs_coeffs[i,ik] + djk = bfs_coeffs[j,jk] + Nik = bfs_prim_norms[i,ik] + Njk = bfs_prim_norms[j,jk] + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + + temp = dik*djk #coeff of primitives as read from basis set + temp = temp*Nik*Njk #normalization factors of primitives + temp = temp*fac2 #normalization factor of the contraction of primitives + + result = 0.0 + if is_ibf_on_atom and not is_jbf_on_atom: + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + if dir==0: #x + lfactor = lmni[0] + Sx_1 = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0]-1,lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0]-1,lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + Sx_1 = calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + # Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0]+1,lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + # Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + # Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0]+1,lmnj[0]-2,gamma,PI[0],PJ[0]) + # Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + # Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + # Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphaik*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + if dir==1: #y + lfactor = lmni[1] + Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1]-1,lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1]-1,lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + # Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + # Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + # Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + # Sx_3 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1]+1,lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + # Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + # Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + # Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + # Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1]+1,lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + # Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphaik*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + if dir==2: #z + lfactor = lmni[2] + Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2]-1,lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2]-1,lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + # Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2]+1,lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + # Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + # Sx_3 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + # Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2]+1,lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + # Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2]+1,lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + # Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + # Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2]+1,lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphaik*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + + if not is_ibf_on_atom and is_jbf_on_atom: + # fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + # fac4 = (lmnj[0]*(lmnj[0]-1)) + # fac5 = (lmnj[1]*(lmnj[1]-1)) + # fac6 = (lmnj[2]*(lmnj[2]-1)) + if dir==0: #x + fac3 = (2*(lmnj[0]-1+lmnj[1]+lmnj[2])+3) + fac4 = ((lmnj[0]-1)*(lmnj[0]-1-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + lfactor = lmnj[0] + Sx_1 = calcS(lmni[0],lmnj[0]-1,gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]-1+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]-1-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0]-1,gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + fac3 = (2*(lmnj[0]+1+lmnj[1]+lmnj[2])+3) + fac4 = ((lmnj[0]+1)*(lmnj[0]+1-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + Sx_1 = calcS(lmni[0],lmnj[0]+1,gamma,PI[0],PJ[0]) + # Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]+1+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + # Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + # Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]+1-2,gamma,PI[0],PJ[0]) + # Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0]+1,gamma,PI[0],PJ[0]) + # Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + # Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphajk*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + if dir==1: #y + fac3 = (2*(lmnj[0]+lmnj[1]-1+lmnj[2])+3) + fac4 = ((lmnj[0])*(lmnj[0]-1)) + fac5 = ((lmnj[1]-1)*(lmnj[1]-1-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + lfactor = lmnj[1] + Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]-1+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]-1-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + fac3 = (2*(lmnj[0]+lmnj[1]+1+lmnj[2])+3) + fac4 = ((lmnj[0])*(lmnj[0]-1)) + fac5 = ((lmnj[1]+1)*(lmnj[1]+1-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + # Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1]+1,gamma,PI[1],PJ[1]) + # Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + # Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + # Sx_3 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]+1+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1]+1,gamma,PI[1],PJ[1]) + # Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + # Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + # Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + # Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]+1-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1]+1,gamma,PI[1],PJ[1]) + # Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphajk*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + if dir==2: #z + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2]-1)+3) + fac4 = ((lmnj[0])*(lmnj[0]-1)) + fac5 = ((lmnj[1])*(lmnj[1]-1)) + fac6 = ((lmnj[2]-1)*(lmnj[2]-1-1)) + lfactor = lmnj[2] + Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2]-1,gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]-1+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2]-1,gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]-1-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2]+1)+3) + fac4 = ((lmnj[0])*(lmnj[0]-1)) + fac5 = ((lmnj[1])*(lmnj[1]-1)) + fac6 = ((lmnj[2]+1)*(lmnj[2]+1-1)) + + # Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2]+1,gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + # Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + # Sx_3 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + # Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]+1+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + # Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2]+1,gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + # Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + # Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]+1-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphajk*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + + if is_ibf_on_atom and is_jbf_on_atom: + continue + # Apply chain rule and compute the derivative of bra + if dir==0: #x + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + Sx = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0]-1,lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0]-1,lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + if dir==1: #y + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1]-1,lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1]-1,lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + Sy = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + if dir==2: #z + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2]-1,lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2]-1,lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + resultA = temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + # Now compute the derivative of the ket + if dir==0: #x + fac3 = (2*(lmnj[0]-1+lmnj[1]+lmnj[2])+3) + fac4 = ((lmnj[0]-1)*(lmnj[0]-1-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + Sx = calcS(lmni[0],lmnj[0]-1,gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-1+2,gamma,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-1,gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-1-2,gamma,PI[0],PJ[0]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-1,gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + if dir==1: #y + fac3 = (2*(lmnj[0]+lmnj[1]-1+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = ((lmnj[1]-1)*(lmnj[1]-1-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-1+2,gamma,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-1-2,gamma,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1]-1,gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + if dir==2: #z + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2]-1)+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = ((lmnj[2]-1)*(lmnj[2]-1-1)) + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-1,gamma,PI[2],PJ[2]) + overlap1 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-1+2,gamma,PI[2],PJ[2]) + overlap4 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz = calcS(lmni[2],lmnj[2]-1,gamma,PI[2],PJ[2]) + overlap5 = Sx*Sy*Sz + + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx*Sy*Sz + + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2]-1-2,gamma,PI[2],PJ[2]) + overlap7 = Sx*Sy*Sz + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + resultB = temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + result = resultA + resultB + + result_sum += result + dT[iatom, dir, i - start_row, j - start_col] = result_sum + if both_tri_symm: + dT[iatom, dir, j - start_col, i - start_row] = result_sum + + + # if both_tri_symm: + # #We save time by evaluating only the lower diagonal elements and then use symmetry Ti,j=Tj,i + # for i in prange(start_row, end_row): + # for j in range(start_col, end_col): + # if j>i: + # T[i-start_row, j-start_col] = T[j-start_col, i-start_row] + + return dT + +@njit(parallel=True, cache=True) +def kin_mat_symm_grad_internal_new(natoms, bfs_atoms, bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col): + # This function calculates the kinetic energy matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the kinetic matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (natoms, 3, num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + + # Initialize the matrix with zeros + dT = np.zeros(matrix_shape) + + + for i in prange(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + for j in range(start_col, end_col): #Because we are only evaluating the lower triangular matrix. + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + # result_sum = 0.0 + result_sum = np.zeros(3)#0.0 + + if bfs_atoms[i]==bfs_atoms[j]: + continue + + J = bfs_coords[j] + IJ = I - J + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + #Some factors to save FLOPS + fac1 = np.sum(IJ**2) + fac2 = Ni*Nj + for ik in range(bfs_nprim[i]): + for jk in range(bfs_nprim[j]): + alphaik = bfs_expnts[i,ik] + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + temp_1 = np.exp(-alphaik*alphajk/gamma*fac1) + if (abs(temp_1)<1.0e-9): + continue + + dik = bfs_coeffs[i,ik] + djk = bfs_coeffs[j,jk] + Nik = bfs_prim_norms[i,ik] + Njk = bfs_prim_norms[j,jk] + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + + temp = dik*djk #coeff of primitives as read from basis set + temp = temp*Nik*Njk #normalization factors of primitives + temp = temp*fac2 #normalization factor of the contraction of primitives + + + for dir in range(3): + result = 0.0 + fac3 = (2*(lmnj[0]+lmnj[1]+lmnj[2])+3) + fac4 = (lmnj[0]*(lmnj[0]-1)) + fac5 = (lmnj[1]*(lmnj[1]-1)) + fac6 = (lmnj[2]*(lmnj[2]-1)) + if dir==0: #x + lfactor = lmni[0] + Sx_1 = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0]-1,lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0]-1,lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0]-1,lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + Sx_1 = calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + # Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0]+1,lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + # Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + # Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0]+1,lmnj[0]-2,gamma,PI[0],PJ[0]) + # Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0]+1,lmnj[0],gamma,PI[0],PJ[0]) + # Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + # Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + # Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphaik*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + if dir==1: #y + lfactor = lmni[1] + Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1]-1,lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1]-1,lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1]-1,lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + # Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + # Sz_1 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + # Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + # Sx_3 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1]+1,lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + # Sz_2 = calcS(lmni[2],lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + # Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + # Sz_3 = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + # Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1]+1,lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1]+1,lmnj[1],gamma,PI[1],PJ[1]) + # Sz_4 = calcS(lmni[2],lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphaik*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + if dir==2: #z + lfactor = lmni[2] + Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + Sx_3 = Sx_1#calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2]-1,lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2]-1,lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2]-1,lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempA = -lfactor*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + + # Sx_1 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_1 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_1 = calcS(lmni[2]+1,lmnj[2],gamma,PI[2],PJ[2]) + overlap1 = Sx_1*Sy_1*Sz_1 + + # Sx_2 = calcS(lmni[0],lmnj[0]+2,gamma,PI[0],PJ[0]) + overlap2 = Sx_2*Sy_1*Sz_1 + + # Sx_3 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_2 = calcS(lmni[1],lmnj[1]+2,gamma,PI[1],PJ[1]) + overlap3 = Sx_3*Sy_2*Sz_1 + + # Sy_3 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_2 = calcS(lmni[2]+1,lmnj[2]+2,gamma,PI[2],PJ[2]) + overlap4 = Sx_3*Sy_3*Sz_2 + + # Sx_4 = calcS(lmni[0],lmnj[0]-2,gamma,PI[0],PJ[0]) + Sz_3 = calcS(lmni[2]+1,lmnj[2],gamma,PI[2],PJ[2]) + overlap5 = Sx_4*Sy_3*Sz_3 + + # Sx_5 = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + # Sy_4 = calcS(lmni[1],lmnj[1]-2,gamma,PI[1],PJ[1]) + overlap6 = Sx_5*Sy_4*Sz_3 + + # Sy_5 = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz_4 = calcS(lmni[2]+1,lmnj[2]-2,gamma,PI[2],PJ[2]) + overlap7 = Sx_5*Sy_5*Sz_4 + + part1 = overlap1*alphajk*fac3 + part2 = 2*alphajk*alphajk*(overlap2+overlap3+overlap4) + part3 = fac4*overlap5 + part4 = fac5*overlap6 + part5 = fac6*overlap7 + + tempB = 2*alphaik*temp*(part1 - part2 - 0.5*(part3+part4+part5))*temp_1 + result = tempA + tempB + + + + + result_sum[dir] += result + dT[bfs_atoms[i], dir, i - start_row, j - start_col] = result_sum[dir] + dT[bfs_atoms[j], dir, i - start_row, j - start_col] = -result_sum[dir] + if both_tri_symm: + dT[bfs_atoms[i], dir, j - start_col, i - start_row] = result_sum[dir] + dT[bfs_atoms[j], dir, j - start_col, i - start_row] = -result_sum[dir] + + + + return dT","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/eval_xc_3_cupy.py",".py","28580","556","import numpy as np +import numexpr +import pylibxc +from timeit import default_timer as timer +# from time import process_time +from pyfock import Integrals +from pyfock import XC +from opt_einsum import contract, contract_expression +from joblib import Parallel, delayed +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = np + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +import numba +from numba import cuda +def eval_xc_3_cupy(basis, dmat, weights, coords, funcid=[1,7], spin=0, blocksize=10240, debug=False, list_nonzero_indices=None, \ + count_nonzero_indices=None, list_ao_values=None, list_ao_grad_values=None, use_libxc=True, nstreams=1, ngpus=1,\ + freemem=True, threads_per_block=None, type=cp.float64, streams=None, nb_streams=None, bfs_data_as_np_arrays=None): + print('Calculating XC term using GPU and algo 3', flush=True) + if not use_libxc: + print('Not using LibXC for XC evaluations', flush=True) + # This performs parallelization at the blocks/batches level. + # Therefore, joblib is perfect for such embarrasingly parallel task + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + + #OUTPUT + #Functional energy + efunc = 0.0 + # Start from the main GPU + cp.cuda.Device(0).use() + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + v = cp.zeros((basis.bfs_nao, basis.bfs_nao), dtype=type) + nelec = 0 + + # TODO it only works for LDA functionals for now. + # Need to make it work for GGA, Hybrid, range-separated Hybrid and MetaGGA functionals as well. + + + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + + # print('Number of blocks: ', nblocks) + + # Some stuff to note timings + timings = None + if debug: + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to evalbfnumba1 faster by skipping the mediator evalbfnumbawrap function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + if bfs_data_as_np_arrays is None: + bfs_coords = cp.asarray([basis.bfs_coords], dtype=type) + bfs_contr_prim_norms = cp.asarray([basis.bfs_contr_prim_norms], dtype=type) + bfs_lmn = cp.asarray([basis.bfs_lmn]) + bfs_nprim = cp.asarray([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim], dtype=type) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim], dtype=type) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim], dtype=type) + bfs_radius_cutoff = cp.zeros([basis.bfs_nao], dtype=type) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = Integrals.bf_val_helpers.eval_bfs(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + bfs_data_as_np_arrays = [bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff] + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + my_expr = contract_expression('ij,mi,mj->m', (150, 150), (blocksize, 150), (blocksize, 150)) + my_expr_grad1 = None + my_expr_grad2 = None + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + my_expr_grad1 = contract_expression('ij,kmi,mj->km', (150, 150), (3, blocksize, 150), (blocksize, 150)) + my_expr_grad2 = contract_expression('ij,mi,kmj->km', (150, 150), (blocksize, 150), (3, blocksize, 150)) + contr_expr = [my_expr, my_expr_grad1, my_expr_grad2] + + if threads_per_block is None: + # Determine the optimal number of blocks per grid + max_threads_per_block = cuda.get_current_device().MAX_THREADS_PER_BLOCK + thread_x = max_threads_per_block/16 + thread_y = max_threads_per_block/64 + threads_per_block = (thread_x, thread_y) + else: + thread_x = threads_per_block[0] + thread_y = threads_per_block[1] + + for iblock in range(len(list_nonzero_indices)): + list_nonzero_indices[iblock] = cp.asarray(list_nonzero_indices[iblock]) + + + weights_cp = cp.asarray(weights, dtype=type) + coords_cp = cp.asarray(coords, dtype=type) + + dmat_cp = cp.asarray(dmat, dtype=type) + # Create dmat lists + dmats_list = [] + for iblock in range(nblocks + 1): + dmats_list.append(cp.copy(dmat_cp[cp.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])])) + + # Create streams for asynchronous execution + # on different GPUs + if streams is None and nb_streams is None: + streams = [] + nb_streams = [] + for i in range(ngpus): + cp.cuda.Device(i).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + streams.append(cp_stream) + nb_streams.append(nb_stream) + + if list_nonzero_indices is not None: + if list_ao_values is not None: + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + output = Parallel(n_jobs=ngpus, backend='threading', require='sharedmem')(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmats_list[iblock], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug, stream=streams[iblock%ngpus], nb_stream=nb_streams[iblock%ngpus], thread_x=thread_x, + thread_y=thread_y, threads_per_block=threads_per_block, type=type, use_libxc=use_libxc, expressions=contr_expr, device=iblock%ngpus) for iblock in range(nblocks+1)) + else: #GGA + output = Parallel(n_jobs=ngpus, backend='threading', require='sharedmem')(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmats_list[iblock], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], list_ao_grad_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug, stream=streams[iblock%ngpus], nb_stream=nb_streams[iblock%ngpus], thread_x=thread_x, + thread_y=thread_y, threads_per_block=threads_per_block, type=type, use_libxc=use_libxc, expressions=contr_expr, device=iblock%ngpus) for iblock in range(nblocks+1)) + else: + output = Parallel(n_jobs=ngpus, backend='threading', require='sharedmem')(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmats_list[iblock], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug, stream=streams[iblock%ngpus], nb_stream=nb_streams[iblock%ngpus], thread_x=thread_x, + thread_y=thread_y, threads_per_block=threads_per_block, type=type, use_libxc=use_libxc, expressions=contr_expr, device=iblock%ngpus) for iblock in range(nblocks+1)) + else: + output = Parallel(n_jobs=ngpus, backend='threading', require='sharedmem')(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat_cp, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug, stream=streams[iblock%ngpus], nb_stream=nb_streams[iblock%ngpus], thread_x=thread_x, + thread_y=thread_y, threads_per_block=threads_per_block, type=type, use_libxc=use_libxc, expressions=contr_expr, device=iblock%ngpus) for iblock in range(nblocks+1)) + + for istream in range(ngpus): + streams[istream].synchronize() + # Switch back to main GPU + cp.cuda.Device(0).use() + for iblock in range(0,len(output)): + efunc += cp.asarray(output[iblock][0]) + if list_nonzero_indices is not None: + non_zero_indices = cp.asarray(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]]) + # v[cp.ix_(non_zero_indices, non_zero_indices)] += cp.asarray(output[iblock][1]) + v[cp.ix_(non_zero_indices, non_zero_indices)] = cp.asarray(output[iblock][1]) + cp.asarray(v)[cp.ix_(non_zero_indices, non_zero_indices)] + else: + # v += cp.asarray(output[iblock][1]) + v = cp.asarray(output[iblock][1]) + cp.asarray(v) + nelec += cp.asarray(output[iblock][2]) + if debug: + timings['durationLibxc'] += output[iblock][3]['durationLibxc'] + timings['durationE'] += output[iblock][3]['durationE'] + timings['durationF'] += output[iblock][3]['durationF'] + timings['durationZ'] += output[iblock][3]['durationZ'] + timings['durationV'] += output[iblock][3]['durationV'] + timings['durationRho'] += output[iblock][3]['durationRho'] + timings['durationAO'] += output[iblock][3]['durationAO'] + # v = numexpr.evaluate('(v + output[iblock][1])') + + + + + print('Number of electrons: ', nelec) + if debug: + print('Timings:', timings) + + ####### Free memory + ## The following is very important to prevent memory leaks and also to make sure that the number of + # threads used by the program is same as that specified by the user + # gc.collect() # Avoiding using it for now, as it is usually quite slow, although in this case it might not make much difference + # Anyway, the following also works + output = 0 + non_zero_indices = 0 + coords = 0 + + + cp.cuda.Stream.null.synchronize() + + if use_libxc: + efunc = efunc[0] + + if freemem: + for istream in range(ngpus): + cp.cuda.Device(istream).use() + cp._default_memory_pool.free_all_blocks() + # cuda.current_context().memory_manager.deallocations.clear() + # Switch back to main GPU + cp.cuda.Device(0).use() + + return efunc, v + + +def block_dens_func(weights_block, coords_block, dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, ao_grad_values=None, funcx=None, + funcc=None, x_family_code=None, c_family_code=None, xc_family_dict=None, debug=False, stream=None, nb_stream=None, thread_x=None, + thread_y=None, threads_per_block=None, type=None, use_libxc=True, expressions=None, device=None): + ### Use threadpoolctl https://github.com/numpy/numpy/issues/11826 + # to set the number of threads to 1 + # https://github.com/joblib/threadpoolctl + # https://stackoverflow.com/questions/29559338/set-max-number-of-threads-at-runtime-on-numpy-openblas + + # exit() + cp.cuda.Device(device).use() + stream.use() + + weights_block = cp.asarray(weights_block) + coords_block = cp.asarray(coords_block) + + dmat = cp.asarray(dmat) + + + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + + if funcx is None: + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + + bfs_coords = cp.asarray(bfs_data_as_np_arrays[0]) + bfs_contr_prim_norms = cp.asarray(bfs_data_as_np_arrays[1]) + bfs_nprim = cp.asarray(bfs_data_as_np_arrays[2]) + bfs_lmn = cp.asarray(bfs_data_as_np_arrays[3]) + bfs_coeffs = cp.asarray(bfs_data_as_np_arrays[4]) + bfs_prim_norms = cp.asarray(bfs_data_as_np_arrays[5]) + bfs_expnts = cp.asarray(bfs_data_as_np_arrays[6]) + bfs_radius_cutoff = cp.asarray(bfs_data_as_np_arrays[7]) + + # bfs_coords = bfs_data_as_np_arrays[0] + # bfs_contr_prim_norms = bfs_data_as_np_arrays[1] + # bfs_nprim = bfs_data_as_np_arrays[2] + # bfs_lmn = bfs_data_as_np_arrays[3] + # bfs_coeffs = bfs_data_as_np_arrays[4] + # bfs_prim_norms = bfs_data_as_np_arrays[5] + # bfs_expnts = bfs_data_as_np_arrays[6] + # bfs_radius_cutoff = bfs_data_as_np_arrays[7] + + non_zero_indices = cp.asarray(non_zero_indices) + + + if debug: + startAO = timer() + # AO and Grad values + # LDA + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block = ao_values + else: + # ao_value_block = Integrals.evalBFsNumbawrap(basis, coords_block, parallel=False) + if non_zero_indices is not None: + ao_value_block = cp.zeros((coords_block.shape[0], non_zero_indices.shape[0]), dtype=type) + blocks_per_grid = ((non_zero_indices.shape[0] + (thread_x - 1))//thread_x, (coords_block.shape[0] + (thread_y - 1))//thread_y) + Integrals.bf_val_helpers.eval_bfs_sparse_internal_cuda[blocks_per_grid, threads_per_block, nb_stream](bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices, ao_value_block) + + else: + ao_value_block = Integrals.bf_val_helpers.eval_bfs_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + # GGA/MGGA (# If either x or c functional is of GGA/MGGA type we need ao_grad_values) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block, ao_values_grad_block = ao_values, ao_grad_values + else: + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, deriv=1, parallel=True, non_zero_indices=non_zero_indices) + if non_zero_indices is not None: + ao_value_block = cp.zeros((coords_block.shape[0], non_zero_indices.shape[0]), dtype=type) + ao_values_grad_block = cp.zeros((3, coords_block.shape[0], non_zero_indices.shape[0]), dtype=type) + blocks_per_grid = ((non_zero_indices.shape[0] + (thread_x - 1))//thread_x, (coords_block.shape[0] + (thread_y - 1))//thread_y) + Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal_cuda[blocks_per_grid, threads_per_block, nb_stream](bfs_coords, bfs_contr_prim_norms, bfs_nprim, + bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, + coords_block, non_zero_indices, ao_value_block, + ao_values_grad_block) + else: + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + if debug: + stream.synchronize() + durationAO = durationAO + timer() - startAO + # print('Duration for AO values: ', durationAO) + # + # Convert to cupy array + ao_value_block = cp.asarray(ao_value_block, dtype=type) + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + ao_values_grad_block = cp.asarray(ao_values_grad_block, dtype=type) + + if debug: + startRho = timer() + # rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block, backend='cupy') # Original (pretty fast) + # rho_block = expressions[0](dmat, ao_value_block, ao_value_block, backend='cupy') # Original (pretty fast) + + # New approach based on this: https://pubs.acs.org/doi/10.1021/acs.jctc.0c01252 + # Fjm = contract('ij,mi->jm', dmat, ao_value_block) # This intermediate helps in accelerating grad rho + # rho_block = contract('jm,mj->m', Fjm, ao_value_block, backend='cupy') + + Fmj = ao_value_block @ dmat # This intermediate helps in accelerating grad rho + # rho_block = contract('mj,mj->m', Fmj, ao_value_block, backend='cupy') + rho_block = cp.sum(Fmj * ao_value_block, axis=1) + + + # If either x or c functional is of GGA/MGGA type we need rho_grad_values too + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = ( contract('ij,kmi,mj->km',dmat,ao_values_grad_block,ao_value_block, backend='cupy')+\ + # contract('ij,mi,kmj->km',dmat,ao_value_block,ao_values_grad_block, backend='cupy') )[:] + # rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = expressions[1](dmat,ao_values_grad_block,ao_value_block, backend='cupy') \ + # + expressions[2](dmat, ao_value_block, ao_values_grad_block, backend='cupy') + + # New approach based on this: https://pubs.acs.org/doi/10.1021/acs.jctc.0c01252 + # rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = 2*contract('jm,kmj->km', Fjm, ao_values_grad_block, backend='cupy')[:] + rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = 2*contract('mj,kmj->km', Fmj, ao_values_grad_block, backend='cupy')[:] + sigma_block = calc_sigma(rho_grad_block_x, rho_grad_block_y, rho_grad_block_z) + if use_libxc: + sigma_block = cp.asnumpy(sigma_block) + if debug: + stream.synchronize() + durationRho = timer() - startRho + # print('Duration for Rho at grid points: ',durationRho) + + + + #LibXC stuff + if use_libxc: + # Exchange + if debug: + startLibxc = timer() + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = cp.asnumpy(rho_block) + if xc_family_dict[x_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # startLibxc = timer() + # Input dictionary for libxc + #inp = {} + # Input dictionary needs density values at grid points + #inp['rho'] = rho_block + if xc_family_dict[c_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + if debug: + cp.cuda.Stream.null.synchronize() + durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + else: + # Exchange + if debug: + startLibxc = timer() + # Calculate the necessary quantities using own implementation + # retx = lda_x(rho_block) + # retx = gga_x_b88(rho_block, sigma_block) + if xc_family_dict[x_family_code]=='LDA': + retx = XC.func_compute(funcid[0], rho_block, use_gpu=True) + else: + retx = XC.func_compute(funcid[0], rho_block, sigma_block, use_gpu=True) + # print(retx[0]) + # print(retx[1]) + # print(retx[2]) + + # Correlation + # Calculate the necessary quantities using own implementation + # retc = lda_c_vwn(rho_block) + # retc = gga_c_lyp(rho_block, sigma_block) + if xc_family_dict[c_family_code]=='LDA': + retc = XC.func_compute(funcid[1], rho_block, use_gpu=True) + else: + retc = XC.func_compute(funcid[1], rho_block, sigma_block, use_gpu=True) + if debug: + stream.synchronize() + cp.cuda.Stream.null.synchronize() + durationLibxc = durationLibxc + timer() - startLibxc + + if debug: + startE = timer() + #ENERGY----------- + if use_libxc: + e = retx['zk'] + retc['zk'] # Functional values at grid points + else: + e = retx[0] + retc[0] + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + den = rho_block*weights_block #elementwise multiply + if use_libxc: + efunc = cp.dot(den, cp.asarray(e)) #Multiply with functional values at grid points and sum + else: + efunc = cp.dot(den, e) #Multiply with functional values at grid points and sum + nelec = cp.sum(den) + if debug: + stream.synchronize() + durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + if use_libxc: + vrho = retx['vrho'] + retc['vrho'] + else: + vrho = retx[1] + retc[1] + vsigma = 0 + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + if use_libxc: + vsigma += retx['vsigma'] + else: + vsigma += retx[2] + + if xc_family_dict[c_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + if use_libxc: + vsigma += retc['vsigma'] + else: + vsigma += retc[2] + + # F = np.multiply(weights_block,vrho[:,0]) #This is fast enough. + if use_libxc: + v_rho_temp = cp.asarray(vrho[:,0]) + else: + v_rho_temp = vrho + + if debug: + startF = timer() + # F = weights_block*v_rho_temp + # F = calc_F(weights_block, v_rho_temp) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + if use_libxc: + Ftemp = 2*weights_block*cp.asarray(vsigma[:,0]) + else: + Ftemp = 2*weights_block*vsigma + # Ftemp = 2*cp.multiply(weights_block, vsigma) + # Ftemp = 2*elementwise_multiply(weights_block, vsigma) + # Fx = Ftemp*rho_grad_block_x + # Fy = Ftemp*rho_grad_block_y + # Fz = Ftemp*rho_grad_block_z + if debug: + stream.synchronize() + durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + + if debug: + startZ = timer() + z = calc_z(weights_block, v_rho_temp, ao_value_block.T) + # z = 0.5*np.einsum('m,mi->mi',F,ao_value_block) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # z += calc_z_gga(Fx, Fy, Fz, ao_values_grad_block[0].T, ao_values_grad_block[1].T, ao_values_grad_block[2].T) + z += Ftemp*(rho_grad_block_x*ao_values_grad_block[0].T + rho_grad_block_y*ao_values_grad_block[1].T + rho_grad_block_z*ao_values_grad_block[2].T) + if debug: + stream.synchronize() + durationZ = durationZ + timer() - startZ + # Free memory + F = 0 + v_rho_temp = 0 + Fx = 0 + Fy = 0 + Fz = 0 + Ftemp = 0 + vsigma_temp = 0 + if debug: + startV = timer() + # with threadpool_limits(limits=1, user_api='blas'): + # v_temp = z @ ao_value_block # The fastest uptil now + v_temp = cp.matmul(z, ao_value_block) + v = v_temp + v_temp.T + if debug: + durationV = durationV + timer() - startV + + + profiling_timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + # cp.cuda.Device(0).use() + # v = cp.array(v) + # stream.synchronize() + return efunc, v, nelec, profiling_timings + +@fuse(kernel_name='calc_F') +def calc_F(weights_block, v_rho_temp): + return weights_block*v_rho_temp + +# @fuse(kernel_name='calc_z') +# def calc_z(F, ao_value_block): +# # ao_value_block should be supplied after transposing it +# return 0.5*F*ao_value_block + +@fuse(kernel_name='calc_z') +def calc_z(weights_block, v_rho_temp, ao_value_block): + # ao_value_block should be supplied after transposing it + F = weights_block*v_rho_temp + return 0.5*F*ao_value_block + +@fuse(kernel_name='calc_sigma') +def calc_sigma(rho_grad_block_x, rho_grad_block_y, rho_grad_block_z): + return rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2 + +@fuse(kernel_name='calc_z_gga') +def calc_z_gga(Fx, Fy, Fz, ao_values_grad_block_x, ao_values_grad_block_y, ao_values_grad_block_z): + return Fx*ao_values_grad_block_x + Fy*ao_values_grad_block_y + Fz*ao_values_grad_block_z + +@fuse(kernel_name='elementwise_multiply') +def elementwise_multiply(a, b): + return a*b","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/mmd_nuc_mat_symm.py",".py","8502","188","import numpy as np +from numba import njit , prange + +from .integral_helpers import c2k, vlriPartial, Fboys, hermite_gauss_coeff, aux_hermite_int + +def mmd_nuc_mat_symm(basis, mol, slice=None): + #Here the lists are converted to numpy arrays for better use with Numba. + #Once these conversions are done we pass these to a Numba decorated + #function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the nuclear matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + coordsBohrs = np.array([mol.coordsBohrs]) + Z = np.array([mol.Zcharges]) + natoms = mol.natoms + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # print([a,b,c,d]) + + V = mmd_nuc_mat_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, Z[0], coordsBohrs[0], natoms) + + return V + +@njit(parallel=True, cache=False, fastmath=True, error_model=""numpy"") +def mmd_nuc_mat_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, Z, coordsMol, natoms): + # This function calculates the nuclear potential matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # (A|-Z_C/r_{iC}|B) = + #Using numba-scipy allows us to use scipy.special.gamma and gamminc, + #however, this prevents the caching functionality. Nevertheless, + #apart form the compilation overhead, it allows to perform calculaitons significantly faster and with good + #accuracy. + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # print(both_tri_symm) + + # Initialize the matrix with zeros + V = np.zeros(matrix_shape) + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + + + #Loop over BFs + for i in prange(start_row, end_row): + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + for j in prange(start_col, end_col): + + + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result = 0.0 + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + + lb, mb, nb = lmnj + #Loop over primitives + for ik in range(bfs_nprim[i]): #Parallelising over primitives doesn't seem to make a difference + alphaik = bfs_expnts[i,ik] + dik = bfs_coeffs[i,ik] + Nik = bfs_prim_norms[i,ik] + for jk in range(bfs_nprim[j]): + + alphajk = bfs_expnts[j,jk] + gamma = alphaik + alphajk + gamma_inv = 1/gamma + temp_gamma = alphaik*alphajk*gamma_inv + screenfactor = np.exp(-temp_gamma*IJsq) + if abs(screenfactor)<1.0e-8: + # Going lower than E-8 doesn't change the max erroor. There could still be some effects from error compounding but the max error doesnt budge. + #TODO: This is quite low. But since this is the slowest part. + #But I had to do this because this is a very slow part of the program. + #Will have to check how the accuracy is affected and if the screening factor + #can be reduced further. + continue + + + djk = bfs_coeffs[j,jk] + + Njk = bfs_prim_norms[j,jk] + + # epsilon = 0.25*gamma_inv + P = (alphaik*I + alphajk*J)*gamma_inv + # PI = P - I + # PJ = P - J + tempfac = (PIx2*gamma_inv) + + Vc = 0.0 + #Loop over nuclei + for iatom in range(natoms): #Parallelising over atoms seems to be faster for Cholestrol.xyz with def2-QZVPPD (628 sec) + Rc = coordsMol[iatom] + Zc = Z[iatom] + PC = P - Rc + # RPC = np.linalg.norm(PC) + RPC = np.sqrt(np.sum(PC**2)) + + fac1 = -Zc*tempfac + #print(fac1) + sum_Vl = 0.0 + + + for t in range(la+lb+1): + for u in range(ma+mb+1): + for v in range(na+nb+1): + sum_Vl += hermite_gauss_coeff(la,lb,t,IJ[0],alphaik,alphajk,gamma,temp_gamma) * \ + hermite_gauss_coeff(ma,mb,u,IJ[1],alphaik,alphajk,gamma,temp_gamma) * \ + hermite_gauss_coeff(na,nb,v,IJ[2],alphaik,alphajk,gamma,temp_gamma) * \ + aux_hermite_int(t,u,v,0,gamma,PC[0],PC[1],PC[2],RPC) + + Vc += sum_Vl*fac1 + result += Vc*dik*djk*Nik*Njk*Ni*Nj + V[i - start_row, j - start_col] = result + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Vi,j=Vj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + V[i-start_row, j-start_col] = V[j-start_col, i-start_row] + + return V + ","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/eval_xc_2_cupy.py",".py","20127","387","import numpy as np +import numexpr +import pylibxc +from timeit import default_timer as timer +# from time import process_time +from pyfock import Integrals +from opt_einsum import contract +from joblib import Parallel, delayed +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +try: + import cupy as cp +except Exception as e: + # Handle the case when Cupy is not installed + cp = np +import numba + +def eval_xc_2_cupy(basis, dmat, weights, coords, funcid=[1,7], spin=0, ncores=2, blocksize=5000, list_nonzero_indices=None, count_nonzero_indices=None, list_ao_values=None, list_ao_grad_values=None, debug=False): + print('Calculating XC term using GPU and algo 2', flush=True) + print('Algo 2 uses a hybrid CPU+GPU approach for XC evaluation.', flush=True) + print('CPU threads specified by ncores are used to evaluate functional values (via LibXC) and AO/AO grad values.', flush=True) + # This performs parallelization at the blocks/batches level. + # Therefore, joblib is perfect for such embarrasingly parallel task + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + + #OUTPUT + #Functional energy + efunc = 0.0 + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + v = cp.zeros((basis.bfs_nao, basis.bfs_nao)) + nelec = 0 + + # TODO it only works for LDA functionals for now. + # Need to make it work for GGA, Hybrid, range-separated Hybrid and MetaGGA functionals as well. + + + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + + # print('Number of blocks: ', nblocks) + + # Some stuff to note timings + timings = None + if debug: + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to evalbfnumba1 faster by skipping the mediator evalbfnumbawrap function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = Integrals.bf_val_helpers.eval_bfs(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + bfs_data_as_np_arrays = [bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff] + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + weights_cp = cp.asarray(weights) + dmat_cp = cp.asarray(dmat) + # Create streams for asynchronous execution + streams = [cp.cuda.Stream(non_blocking=True) for i in range(ncores)] + + #### Set number of cores for numba related evaluations within 'block_dens_func()' for example bf_value evaluations + #### Apparently, it was still using as many cores as possible and creating a serial version of thise functions as I have + #### currently done doesn't work + # numba.set_num_threads(1) + if list_nonzero_indices is not None: + if list_ao_values is not None: + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=nblocks//ncores)(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat_cp[cp.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug, stream=streams[iblock%len(streams)]) for iblock in range(nblocks+1)) + else: #GGA + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat_cp[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], list_ao_grad_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in range(nblocks+1)) + else: + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat_cp[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in range(nblocks+1)) + else: + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem')(delayed(block_dens_func)(weights_cp[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat_cp, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in range(nblocks+1)) + + # print(len(output)) + for iblock in range(0,len(output)): + efunc += output[iblock][0] + if list_nonzero_indices is not None: + non_zero_indices = list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]] + v[cp.ix_(non_zero_indices, non_zero_indices)] += output[iblock][1] + else: + v += output[iblock][1] + nelec += output[iblock][2] + if debug: + timings['durationLibxc'] += output[iblock][3]['durationLibxc'] + timings['durationE'] += output[iblock][3]['durationE'] + timings['durationF'] += output[iblock][3]['durationF'] + timings['durationZ'] += output[iblock][3]['durationZ'] + timings['durationV'] += output[iblock][3]['durationV'] + timings['durationRho'] += output[iblock][3]['durationRho'] + timings['durationAO'] += output[iblock][3]['durationAO'] + # v = numexpr.evaluate('(v + output[iblock][1])') + + + + + numba.set_num_threads(ncores) + print('Number of electrons: ', nelec) + if debug: + print('Timings:', timings) + + ####### Free memory + ## The following is very important to prevent memory leaks and also to make sure that the number of + # threads used by the program is same as that specified by the user + # gc.collect() # Avoiding using it for now, as it is usually quite slow, although in this case it might not make much difference + # Anyway, the following also works + output = 0 + non_zero_indices = 0 + coords = 0 + cp.cuda.Stream.null.synchronize() + return efunc, v + + +def block_dens_func(weights_block, coords_block, dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, ao_grad_values=None, funcx=None, funcc=None, x_family_code=None, c_family_code=None, xc_family_dict=None, debug=False, stream=None): + ### Use threadpoolctl https://github.com/numpy/numpy/issues/11826 + # to set the number of threads to 1 + # https://github.com/joblib/threadpoolctl + # https://stackoverflow.com/questions/29559338/set-max-number-of-threads-at-runtime-on-numpy-openblas + + + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + numba.set_num_threads(1) + + if funcx is None: + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + + bfs_coords = bfs_data_as_np_arrays[0] + bfs_contr_prim_norms = bfs_data_as_np_arrays[1] + bfs_nprim = bfs_data_as_np_arrays[2] + bfs_lmn = bfs_data_as_np_arrays[3] + bfs_coeffs = bfs_data_as_np_arrays[4] + bfs_prim_norms = bfs_data_as_np_arrays[5] + bfs_expnts = bfs_data_as_np_arrays[6] + bfs_radius_cutoff = bfs_data_as_np_arrays[7] + + # with stream: + if debug: + startAO = timer() + # AO and Grad values + # LDA + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block = ao_values + else: + # ao_value_block = Integrals.evalBFsNumbawrap(basis, coords_block, parallel=False) + if non_zero_indices is not None: + # ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_vectorized_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + ao_value_block = Integrals.bf_val_helpers.eval_bfs_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + # GGA/MGGA (# If either x or c functional is of GGA/MGGA type we need ao_grad_values) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block, ao_values_grad_block = ao_values, ao_grad_values + else: + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, deriv=1, parallel=True, non_zero_indices=non_zero_indices) + if non_zero_indices is not None: + # Calculating ao values and gradients together, didn't really do much improvement in computational speed + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + if debug: + durationAO = durationAO + timer() - startAO + # print('Duration for AO values: ', durationAO) + # + # Convert to cupy array + ao_value_block = cp.asarray(ao_value_block) + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + ao_values_grad_block = cp.asarray(ao_values_grad_block) + + if debug: + startRho = timer() + rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block, backend='cupy') # Original (pretty fast) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values too + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # rho_grad_block_x = contract('ij,mi,mj->m',dmat,ao_values_grad_block[0],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[0]) + # rho_grad_block_y = contract('ij,mi,mj->m',dmat,ao_values_grad_block[1],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[1]) + # rho_grad_block_z = contract('ij,mi,mj->m',dmat,ao_values_grad_block[2],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[2]) + rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = ( contract('ij,kmi,mj->km',dmat,ao_values_grad_block,ao_value_block)+\ + contract('ij,mi,kmj->km',dmat,ao_value_block,ao_values_grad_block) )[:] + sigma_block = rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2 + sigma_block = cp.asnumpy(sigma_block) + if debug: + durationRho = timer() - startRho + # print('Duration for Rho at grid points: ',durationRho) + + + + #LibXC stuff + # Exchange + if debug: + startLibxc = timer() + + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = cp.asnumpy(rho_block) + if xc_family_dict[x_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # startLibxc = timer() + + # Input dictionary for libxc + # inp = {} + # Input dictionary needs density values at grid points + # inp['rho'] = rho_block + if xc_family_dict[c_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + if debug: + durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + if debug: + startE = timer() + #ENERGY----------- + e = retx['zk'] + retc['zk'] # Functional values at grid points + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + den = rho_block*weights_block #elementwise multiply + efunc = cp.dot(den, cp.asarray(e)) #Multiply with functional values at grid points and sum + nelec = cp.sum(den) + if debug: + durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + vrho = retx['vrho'] + retc['vrho'] + vsigma = 0 + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma = retx['vsigma'] + if xc_family_dict[c_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma += retc['vsigma'] + retx = 0 + retc = 0 + func = 0 + + if debug: + startF = timer() + v_rho_temp = cp.asarray(vrho[:,0]) + F = weights_block*v_rho_temp + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + vsigma_temp = cp.asarray(vsigma[:,0]) + Ftemp = 2*weights_block*vsigma_temp + # Ftemp = 2*weights_block*vsigma[:,0] + Fx = Ftemp*rho_grad_block_x + Fy = Ftemp*rho_grad_block_y + Fz = Ftemp*rho_grad_block_z + if debug: + durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + + if debug: + startZ = timer() + z = 0.5*F*ao_value_block.T + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + z += Fx*ao_values_grad_block[0].T + Fy*ao_values_grad_block[1].T + Fz*ao_values_grad_block[2].T + if debug: + durationZ = durationZ + timer() - startZ + # Free memory + F = 0 + v_rho_temp = 0 + Fx = 0 + Fy = 0 + Fz = 0 + Ftemp = 0 + vsigma_temp = 0 + if debug: + startV = timer() + # with threadpool_limits(limits=1, user_api='blas'): + # v_temp = z @ ao_value_block # The fastest uptil now + v_temp = cp.matmul(z, ao_value_block) + v = v_temp + v_temp.T + if debug: + durationV = durationV + timer() - startV + z = 0 + ao_value_block = 0 + rho_block = 0 + temp = 0 + vrho = 0 + weights_block=0 + coords_block=0 + func = 0 + dmat = 0 + v_temp_T = 0 + v_temp = 0 + del ao_value_block + # del ao_values_grad_block + # del rho_grad_block_x + # del rho_grad_block_y + del rho_block + del z + del temp + del F + del weights_block + del coords_block + del dmat + del vrho + + + profiling_timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + # print(durationRho) + return efunc[0], v, nelec, profiling_timings +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_3c2e_symm_cupy.py",".py","18523","393","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba +from .rys_helpers_cuda import coulomb_rys, Roots, DATA_X, DATA_W +from .schwarz_helpers import eri_4c2e_diag +from .rys_2c2e_symm_cupy import rys_2c2e_symm_cupy + + +def rys_3c2e_symm_cupy(basis, auxbasis, slice=None, schwarz=False, schwarz_threshold=1e-9, cp_stream=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + + aux_bfs_coords = cp.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = cp.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = cp.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = cp.array([auxbasis.bfs_nprim]) + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = cp.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = cp.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = cp.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + DATA_X_cuda = cp.asarray(DATA_X) + DATA_W_cuda = cp.asarray(DATA_W) + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, auxbasis.bfs_nao] + + if schwarz: + ints4c2e_diag = cp.asarray(eri_4c2e_diag(basis)) + ints2c2e = rys_2c2e_symm_cupy(auxbasis) + sqrt_ints4c2e_diag = cp.sqrt(cp.abs(ints4c2e_diag)) + sqrt_diag_ints2c2e = cp.sqrt(cp.abs(cp.diag(ints2c2e))) + print('Prelims calc done for Schwarz screening!') + else: + #Create dummy array + sqrt_ints4c2e_diag = cp.zeros((1,1), dtype=cp.float64) + sqrt_diag_ints2c2e = cp.zeros((1), dtype=cp.float64) + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + matrix_shape = (num_A, num_B, num_C) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + tri_symm = False + no_symm = False + if indx_startA==indx_startB and indx_endA==indx_endB: + tri_symm = True + else: + no_symm = True + + + # Initialize the matrix with zeros + threeC2E = cp.zeros(matrix_shape, dtype=cp.float64) + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((num_A + (thread_x - 1))//thread_x, (num_B + (thread_y - 1))//thread_y) + rys_3c2e_symm_internal_cuda_new[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, tri_symm, no_symm, DATA_X_cuda, DATA_W_cuda, schwarz, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, schwarz_threshold, threeC2E) + if tri_symm: + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC,threeC2E) + if cp_stream is None: + cuda.synchronize() + else: + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + # cp._default_memory_pool.free_all_blocks() + return threeC2E + + + + + +@cuda.jit(fastmath=True, cache=True, max_registers=50)#(device=True) +def rys_3c2e_symm_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, tri_symm, no_symm, DATA_X, DATA_W, schwarz, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, schwarz_threshold, out): + + + i, j = cuda.grid(2) + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = cuda.local.array((3), numba.float64) + L[0] = 0.0 + L[1] = 0.0 + L[2] = 0.0 + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + if i>=indx_startA and i=indx_startB and j=indx_startA and i=indx_startB and j=indx_startA and i=indx_startB and ji: + for k in range(indx_startC, indx_endC): + out[i-indx_startA, j-indx_startB, k] = out[j-indx_startB, i-indx_startA, k]","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/eval_xc_2.py",".py","27978","529","import numpy as np +import numexpr +import pylibxc +from timeit import default_timer as timer +# from time import process_time +from pyfock import Integrals +from opt_einsum import contract +from joblib import Parallel, delayed +from threadpoolctl import ThreadpoolController, threadpool_info, threadpool_limits +import gc +import numba +from numba import njit +import scipy +import random + + +def eval_xc_2(basis, dmat, weights, coords, funcid=[1,7], spin=0, ncores=2, blocksize=5000, list_nonzero_indices=None, count_nonzero_indices=None, list_ao_values=None, list_ao_grad_values=None, debug=False): + """""" + Evaluate exchange-correlation (XC) energy and potential matrix for DFT + using algorithm 2, which is the preferred algorithm for running DFT on CPU. + + In algorithm 2, the XC term is evaluated by parallelizing over batches. + In contrast, the algorithm 1 evaluates the XC term by looping over batches and + parallelizing the operations within the batch, which is suboptimal. + + This function evaluates the XC energy and potential matrix elements for a given + density matrix using grid-based numerical integration. It supports LDA and GGA + functionals (via LibXC), parallel execution with `joblib`, and sparse AO matrix blocks. + + Parameters + ---------- + basis : Basis + A basis object containing basis function data: exponents, coefficients, + angular momentum, normalization, etc. + + dmat : np.ndarray + The one-electron density matrix in the AO basis. + + weights : np.ndarray + Integration weights associated with each grid point. + + coords : np.ndarray + Grid point coordinates as an (N, 3) array. + + funcid : list of int, optional + LibXC functional IDs. Default is [1, 7] for Slater (X) and VWN (C) (LDA). + + spin : int, optional + Spin multiplicity: 0 for unpolarized, 1 for spin-polarized (not allowed currently). + + ncores : int, optional + Number of threads/cores for parallel execution. Default is 2. + + blocksize : int, optional + Number of grid points to process per block. Default is 5000. + + list_nonzero_indices : list of np.ndarray, optional + Precomputed list of nonzero AO indices per block for sparse evaluation. + + count_nonzero_indices : list of int, optional + Number of nonzero indices in each block (matches `list_nonzero_indices`). + + list_ao_values : list of np.ndarray, optional + Precomputed AO values at grid points for each block. + + list_ao_grad_values : list of tuple of np.ndarray, optional + Precomputed AO gradient values (x, y, z) at grid points for each block. + + debug : bool, optional + If True, print detailed timing and diagnostic info. + + Returns + ------- + efunc : float + Total exchange-correlation energy. + + v : np.ndarray + Exchange-correlation potential matrix in the AO basis. + + Notes + ----- + - Only supports LDA and GGA functionals currently. meta-GGA and hybrid support is in development. + - Uses LibXC for energy and derivative functional evaluation. + - Blocks are randomly shuffled before processing to balance parallel load. + - Grid-based DFT evaluation using precomputed AO and gradient matrices is supported. + + References + ---------- + - LibXC Functional Codes: https://libxc.gitlab.io/functionals/ + - XC term evaluation inspired from: https://pubs.acs.org/doi/full/10.1021/ct200412r + """""" + # This performs parallelization at the blocks/batches level. + # Therefore, joblib is perfect for such embarrasingly parallel task + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + + #OUTPUT + #Functional energy + efunc = 0.0 + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + v = np.zeros((basis.bfs_nao, basis.bfs_nao)) + nelec = 0 + + # TODO it only works for LDA functionals for now. + # Need to make it work for GGA, Hybrid, range-separated Hybrid and MetaGGA functionals as well. + + + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + + # print('Number of blocks: ', nblocks) + + # Some stuff to note timings + timings = None + if debug: + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to evalbfnumba1 faster by skipping the mediator evalbfnumbawrap function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = Integrals.bf_val_helpers.eval_bfs(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + bfs_data_as_np_arrays = [bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff] + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + #### Set number of cores for numba related evaluations within 'block_dens_func()' for example bf_value evaluations + #### Apparently, it was still using as many cores as possible and creating a serial version of thise functions as I have + #### currently done doesn't work + numba.set_num_threads(1) + # Shuffle the blocks (for load balancing) + block_indices = list(range(nblocks+1)) + random.shuffle(block_indices) + + # rho_blocks = [np.zeros((blocksize,1)) for _ in range(nblocks+1)] + + if 2*ncores>nblocks: + batch_size='auto' + else: + batch_size = nblocks//(ncores*2) + + # NumExpr expressions compile + expr_den = numexpr.NumExpr('rho_block*weights_block') + expr_F = numexpr.NumExpr('weights_block*v_rho_temp') + expr_z = numexpr.NumExpr('0.5*F*ao_value_block_T') + expr_v = numexpr.NumExpr('v_temp + v_temp_T') + expr_sigma_block = numexpr.NumExpr('rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2') + expr_Ftemp = numexpr.NumExpr('2*weights_block*vsigma_temp') + expr_Fx = numexpr.NumExpr('Ftemp*rho_grad_block_x') + expr_Fy = numexpr.NumExpr('Ftemp*rho_grad_block_y') + expr_Fz = numexpr.NumExpr('Ftemp*rho_grad_block_z') + expr_z_grad = numexpr.NumExpr('Fx*ao_value_gradx_block_T + Fy*ao_value_grady_block_T + Fz*ao_value_gradz_block_T') + numexpr_expr = {'expr_den':expr_den, 'expr_F':expr_F, 'expr_z':expr_z, 'expr_v':expr_v, 'expr_sigma_block':expr_sigma_block, \ + 'expr_Fx':expr_Fx, 'expr_Fy':expr_Fy, 'expr_Fz':expr_Fz, 'expr_z_grad':expr_z_grad, 'expr_Ftemp':expr_Ftemp} + + + if list_nonzero_indices is not None: + if list_ao_values is not None: + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=batch_size, pre_dispatch=3*ncores)(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, numexpr_expr=numexpr_expr, debug=debug) for iblock in block_indices) + else: #GGA + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=batch_size)(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_ao_values[iblock], list_ao_grad_values[iblock], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, numexpr_expr=numexpr_expr, debug=debug) for iblock in block_indices) + else: + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=batch_size)(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, numexpr_expr=numexpr_expr, debug=debug) for iblock in block_indices) + # output = Parallel(n_jobs=ncores, backend='loky')(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat[np.ix_(list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]])], funcid, bfs_data_as_np_arrays, list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]], funcx=None, funcc=None, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, debug=debug) for iblock in block_indices) + else: + output = Parallel(n_jobs=ncores, backend='threading', require='sharedmem', batch_size=batch_size)(delayed(block_dens_func)(weights[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], coords[iblock*blocksize : min(iblock*blocksize+blocksize,ngrids)], dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, funcx=funcx, funcc=funcc, x_family_code=x_family_code, c_family_code=c_family_code, xc_family_dict=xc_family_dict, numexpr_expr=numexpr_expr, debug=debug) for iblock in block_indices) + + indx_block_output = 0 + for iblock in block_indices: + efunc += output[indx_block_output][0] + if list_nonzero_indices is not None: + non_zero_indices = list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]] + v[np.ix_(non_zero_indices, non_zero_indices)] += output[indx_block_output][1] + # slice = np.ix_(non_zero_indices, non_zero_indices) + # v[slice] = numexpr.evaluate(""(v_ + output_)"", {'v_':v[slice], 'output_':output[indx_block_output][1]}) + else: + v += output[indx_block_output][1] + nelec += output[indx_block_output][2] + if debug: + timings['durationLibxc'] += output[indx_block_output][3]['durationLibxc'] + timings['durationE'] += output[indx_block_output][3]['durationE'] + timings['durationF'] += output[indx_block_output][3]['durationF'] + timings['durationZ'] += output[indx_block_output][3]['durationZ'] + timings['durationV'] += output[indx_block_output][3]['durationV'] + timings['durationRho'] += output[indx_block_output][3]['durationRho'] + timings['durationAO'] += output[indx_block_output][3]['durationAO'] + indx_block_output += 1 + # v = numexpr.evaluate('(v + output[iblock][1])') + + # print('here1') + # for i in range(1000): + # a = dmat[np.ix_(list_nonzero_indices[60][0:count_nonzero_indices[60]], list_nonzero_indices[60][0:count_nonzero_indices[60]])] + # print('here2') + + + numba.set_num_threads(ncores) + print('Number of electrons: ', nelec) + if debug: + print('Timings:', timings) + + ####### Free memory + ## The following is very important to prevent memory leaks and also to make sure that the number of + # threads used by the program is same as that specified by the user + # gc.collect() # Avoiding using it for now, as it is usually quite slow, although in this case it might not make much difference + # Anyway, the following also works + output = 0 + non_zero_indices = 0 + coords = 0 + + return efunc[0], v + +@threadpool_limits.wrap(limits=1, user_api='blas') +def block_dens_func(weights_block, coords_block, dmat, funcid, bfs_data_as_np_arrays, non_zero_indices=None, ao_values=None, ao_grad_values=None, funcx=None, funcc=None, x_family_code=None, c_family_code=None, xc_family_dict=None, numexpr_expr=None, debug=False): + ### Use threadpoolctl https://github.com/numpy/numpy/issues/11826 + # to set the number of threads to 1 + # https://github.com/joblib/threadpoolctl + # https://stackoverflow.com/questions/29559338/set-max-number-of-threads-at-runtime-on-numpy-openblas + + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + numba.set_num_threads(1) + + if funcx is None: + # xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + # x_family_code = funcx.get_family() + # c_family_code = funcc.get_family() + + + bfs_coords = bfs_data_as_np_arrays[0] + bfs_contr_prim_norms = bfs_data_as_np_arrays[1] + bfs_nprim = bfs_data_as_np_arrays[2] + bfs_lmn = bfs_data_as_np_arrays[3] + bfs_coeffs = bfs_data_as_np_arrays[4] + bfs_prim_norms = bfs_data_as_np_arrays[5] + bfs_expnts = bfs_data_as_np_arrays[6] + bfs_radius_cutoff = bfs_data_as_np_arrays[7] + + if debug: + startAO = timer() + # AO and Grad values + # LDA + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block = ao_values + else: + # ao_value_block = Integrals.evalBFsNumbawrap(basis, coords_block, parallel=False) + if non_zero_indices is not None: + # ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_vectorized_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + + ao_value_block = Integrals.bf_val_helpers.eval_bfs_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + + # GGA/MGGA (# If either x or c functional is of GGA/MGGA type we need ao_grad_values) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + if ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block, ao_values_grad_block = ao_values, ao_grad_values + else: + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, deriv=1, parallel=True, non_zero_indices=non_zero_indices) + if non_zero_indices is not None: + # Calculating ao values and gradients together, didn't really do much improvement in computational speed + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal_serial(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coords_block) + if debug: + durationAO = durationAO + timer() - startAO + # print('Duration for AO values: ', durationAO) + + if debug: + startRho = timer() + if non_zero_indices is not None: + # rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block) # Original (pretty fast) + + # New approach based on this: https://pubs.acs.org/doi/10.1021/acs.jctc.0c01252 + # Fjm = contract('ij,mi->jm', dmat, ao_value_block) # This intermediate helps in accelerating grad rho + # rho_block = contract('jm,mj->m', Fjm, ao_value_block) + + Fmj = ao_value_block @ dmat # This intermediate helps in accelerating grad rho + rho_block = contract('mj,mj->m', Fmj, ao_value_block) + # rho_block = np.sum(Fmj * ao_value_block, axis=1) + # rho_block = numexpr.evaluate('sum(Fmj * ao_value_block, axis=1)') + + else: + rho_block = Integrals.bf_val_helpers.eval_rho(ao_value_block, dmat) # This is by-far the fastest now (when not using non_zero_indices) <----- + # If either x or c functional is of GGA/MGGA type we need rho_grad_values too + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # rho_grad_block_x = contract('ij,mi,mj->m',dmat,ao_values_grad_block[0],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[0]) + # rho_grad_block_y = contract('ij,mi,mj->m',dmat,ao_values_grad_block[1],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[1]) + # rho_grad_block_z = contract('ij,mi,mj->m',dmat,ao_values_grad_block[2],ao_value_block)+\ + # contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[2]) + # Condense all of the above einsum calls into just two calls + # rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = ( contract('ij,kmi,mj->km',dmat,ao_values_grad_block,ao_value_block)+\ + # contract('ij,mi,kmj->km',dmat,ao_value_block,ao_values_grad_block) )[:] + + # New approach based on this: https://pubs.acs.org/doi/10.1021/acs.jctc.0c01252 + # rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = 2*contract('jm,kmj->km', Fjm, ao_values_grad_block)[:] + rho_grad_block_x, rho_grad_block_y, rho_grad_block_z = 2*contract('mj,kmj->km', Fmj, ao_values_grad_block)[:] + # sigma_block = numexpr.evaluate('(rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2)') + sigma_block = numexpr_expr['expr_sigma_block'](rho_grad_block_x, rho_grad_block_y, rho_grad_block_z) + if debug: + durationRho = timer() - startRho + # print('Duration for Rho at grid points: ',durationRho) + + + + #LibXC stuff + # Exchange + if debug: + startLibxc = timer() + + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[x_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # startLibxc = timer() + + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[c_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + if debug: + durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + if debug: + startE = timer() + #ENERGY----------- + e = retx['zk'] + retc['zk'] # Functional values at grid points + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + # den = numexpr.evaluate('(rho_block*weights_block)') #elementwise multiply + den = numexpr_expr['expr_den'](rho_block, weights_block) + # den = rho_block*weights_block #elementwise multiply + efunc = np.dot(den, e) #Multiply with functional values at grid points and sum + nelec = np.sum(den) + # nelec = numexpr.evaluate('sum(den)') + if debug: + durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + vrho = retx['vrho'] + retc['vrho'] + # vrho = numexpr.evaluate('x_vrho + c_vrho', {'x_vrho':retx['vrho'], 'c_vrho': retc['vrho']}) + vsigma = 0 + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma = retx['vsigma'] + if xc_family_dict[c_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma += retc['vsigma'] + retx = 0 + retc = 0 + func = 0 + + if debug: + startF = timer() + # v_rho_temp = vrho[:,0] + # F = weights_block*v_rho_temp + # F = numexpr.evaluate('(weights_block*v_rho_temp)') + F = numexpr_expr['expr_F'](weights_block, vrho[:,0]) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # vsigma_temp = vsigma[:,0] + # Ftemp = numexpr.evaluate('(2*weights_block*vsigma_temp)') + Ftemp = numexpr_expr['expr_Ftemp'](weights_block, vsigma[:,0]) + # Ftemp = 2*weights_block*vsigma[:,0] + # Fx = numexpr.evaluate('(Ftemp*rho_grad_block_x)') + # Fy = numexpr.evaluate('(Ftemp*rho_grad_block_y)') + # Fz = numexpr.evaluate('(Ftemp*rho_grad_block_z)') + Fx = numexpr_expr['expr_Fx'](Ftemp, rho_grad_block_x) + Fy = numexpr_expr['expr_Fy'](Ftemp, rho_grad_block_y) + Fz = numexpr_expr['expr_Fz'](Ftemp, rho_grad_block_z) + # Fx = Ftemp*rho_grad_block_x + # Fy = Ftemp*rho_grad_block_y + # Fz = Ftemp*rho_grad_block_z + if debug: + durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + + if debug: + startZ = timer() + # ao_value_block_T = ao_value_block.T + # z = 0.5*F*ao_value_block_T + # z = numexpr.evaluate('(0.5*F*ao_value_block_T)') + z = numexpr_expr['expr_z'](F, ao_value_block.T) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + ao_value_gradx_block_T = ao_values_grad_block[0].T + ao_value_grady_block_T = ao_values_grad_block[1].T + ao_value_gradz_block_T = ao_values_grad_block[2].T + z = numexpr.evaluate('(z + Fx*ao_value_gradx_block_T + Fy*ao_value_grady_block_T + Fz*ao_value_gradz_block_T)') + # z += numexpr_expr['expr_z_grad'](Fx, ao_value_gradx_block_T, Fy, ao_value_grady_block_T, Fz, ao_value_gradz_block_T) + # z = z + Fx*ao_values_grad_block[0].T + Fy*ao_values_grad_block[1].T + Fz*ao_values_grad_block[2].T + if debug: + durationZ = durationZ + timer() - startZ + # Free memory + F = 0 + v_rho_temp = 0 + Fx = 0 + Fy = 0 + Fz = 0 + Ftemp = 0 + vsigma_temp = 0 + if debug: + startV = timer() + v_temp = z @ ao_value_block # The fastest uptil now + # v_temp = np.dot(z, ao_value_block) + # v_temp_T = v_temp.T + # v = v_temp + v_temp_T + # v = numexpr.evaluate('(v_temp + v_temp_T)') + v = numexpr_expr['expr_v'](v_temp, v_temp.T) + + + if debug: + durationV = durationV + timer() - startV + z = 0 + ao_value_block = 0 + rho_block = 0 + temp = 0 + vrho = 0 + weights_block=0 + coords_block=0 + func = 0 + dmat = 0 + v_temp_T = 0 + v_temp = 0 + + + + profiling_timings = {'durationLibxc':durationLibxc, 'durationE':durationE, 'durationF':durationF, 'durationZ':durationZ, 'durationV':durationV, 'durationRho':durationRho, 'durationAO':durationAO} + + # print(durationRho) + # print('done') + return efunc, v, nelec, profiling_timings + +# Extremely slow +# @njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True) +# def symmetric_matrix_product(A, B): +# n = A.shape[0] +# C = np.zeros((n, n)) +# for i in range(n): +# for j in range(i, n): +# C[i, j] = np.dot(A[i,:], B[:, j]) + +# # Copy the upper triangular elements to the lower triangular part +# C += np.tril(C, k=-1).T + +# return C +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/hgp_helper.py",".py","10714","244","import numpy as np +from numba import njit +from .integral_helpers import comb + +''' +Most of the functions here are adapted from the following repository (BSD license) using Python language +https://github.com/rpmuller/pyquante2/ + +More specifically from this file: +https://github.com/rpmuller/pyquante2/blob/master/pyquante2/ints/hgp.py +''' +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def gaussian_product_center(alphaa,xyza,alphab,xyzb): + return (alphaa*xyza + alphab*xyzb)/(alphaa+alphab) + +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def hgp_hrr(xyza,norma,lmna,alphaa, + xyzb,normb,lmnb,alphab, + xyzc,normc,lmnc,alphac, + xyzd,normd,lmnd,alphad): + + la,ma,na = lmna + lb,mb,nb = lmnb + lc,mc,nc = lmnc + ld,md,nd = lmnd + xa,ya,za = xyza + xb,yb,zb = xyzb + xc,yc,zc = xyzc + xd,yd,zd = xyzd + if lb > 0: + return (hgp_hrr(xyza,norma,(la+1,ma,na),alphaa, + xyzb,normb,(lb-1,mb,nb),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md,nd),alphad) + + (xa-xb)*hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb-1,mb,nb),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md,nd),alphad) + ) + elif mb > 0: + return (hgp_hrr(xyza,norma,(la,ma+1,na),alphaa, + xyzb,normb,(lb,mb-1,nb),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md,nd),alphad) + + (ya-yb)*hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb-1,nb),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md,nd),alphad) + ) + elif nb > 0: + return (hgp_hrr(xyza,norma,(la,ma,na+1),alphaa, + xyzb,normb,(lb,mb,nb-1),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md,nd),alphad) + + (za-zb)*hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb,nb-1),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md,nd),alphad) + ) + elif ld > 0: + return (hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb,nb),alphab, + xyzc,normc,(lc+1,mc,nc),alphac, + xyzd,normd,(ld-1,md,nd),alphad) + + (xc-xd)*hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb,nb),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld-1,md,nd),alphad) + ) + elif md > 0: + return (hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb,nb),alphab, + xyzc,normc,(lc,mc+1,nc),alphac, + xyzd,normd,(ld,md-1,nd),alphad) + + (yc-yd)*hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb,nb),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md-1,nd),alphad) + ) + elif nd > 0: + return (hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb,nb),alphab, + xyzc,normc,(lc,mc,nc+1),alphac, + xyzd,normd,(ld,md,nd-1),alphad) + + (zc-zd)*hgp_hrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,(lb,mb,nb),alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,(ld,md,nd-1),alphad) + ) + return hgp_vrr(xyza,norma,(la,ma,na),alphaa, + xyzb,normb,alphab, + xyzc,normc,(lc,mc,nc),alphac, + xyzd,normd,alphad,0) +@njit(cache=True,fastmath=True, error_model='numpy', nogil=True) +def hgp_vrr(xyza,norma,lmna,alphaa, + xyzb,normb,alphab, + xyzc,normc,lmnc,alphac, + xyzd,normd,alphad,M): + + la,ma,na = lmna + lc,mc,nc = lmnc + xa,ya,za = xyza + xb,yb,zb = xyzb + xc,yc,zc = xyzc + xd,yd,zd = xyzd + + px,py,pz = xyzp = gaussian_product_center(alphaa,xyza,alphab,xyzb) + qx,qy,qz = xyzq = gaussian_product_center(alphac,xyzc,alphad,xyzd) + zeta,eta = float(alphaa+alphab),float(alphac+alphad) + wx,wy,wz = xyzw = gaussian_product_center(zeta,xyzp,eta,xyzq) + + rab2 = np.power(xa-xb,2) + np.power(ya-yb,2) + np.power(za-zb,2) + Kab = np.sqrt(2)*np.power(np.pi,1.25)/(alphaa+alphab)\ + *np.exp(-alphaa*alphab/(alphaa+alphab)*rab2) + rcd2 = np.power(xc-xd,2) + np.power(yc-yd,2) + np.power(zc-zd,2) + Kcd = np.sqrt(2)*np.power(np.pi,1.25)/(alphac+alphad)\ + *np.exp(-alphac*alphad/(alphac+alphad)*rcd2) + rpq2 = np.power(px-qx,2) + np.power(py-qy,2) + np.power(pz-qz,2) + T = zeta*eta/(zeta+eta)*rpq2 + + mtot = la+ma+na+lc+mc+nc+M + + Fgterms = [0]*(mtot+1) + # Fgterms[mtot] = Fgamma(mtot,T) + for im in range(mtot-1,-1,-1): + Fgterms[im]=(2.*T*Fgterms[im+1]+np.exp(-T))/(2.*im+1) + + # Todo: setup this as a regular array + + # Store the vrr values as a 7 dimensional array + # vrr_terms[la,ma,na,lc,mc,nc,m] + vrr_terms = {} + for im in range(mtot+1): + vrr_terms[0,0,0,0,0,0,im] = ( + norma*normb*normc*normd*Kab*Kcd/np.sqrt(zeta+eta)*Fgterms[im] + ) + + # Todo: use itertools.product() for the nested for loops + for i in range(la): + for im in range(mtot-i): + vrr_terms[i+1,0,0, 0,0,0, im] = ( + (px-xa)*vrr_terms[i,0,0, 0,0,0, im] + + (wx-px)*vrr_terms[i,0,0, 0,0,0, im+1] + ) + if i: + vrr_terms[i+1,0,0, 0,0,0, im] += ( + i/2./zeta*( vrr_terms[i-1,0,0, 0,0,0, im] + - eta/(zeta+eta)*vrr_terms[i-1,0,0, 0,0,0, im+1] + )) + + for j in range(ma): + for i in range(la+1): + for im in range(mtot-i-j): + vrr_terms[i,j+1,0, 0,0,0, im] = ( + (py-ya)*vrr_terms[i,j,0, 0,0,0, im] + + (wy-py)*vrr_terms[i,j,0, 0,0,0, im+1] + ) + if j: + vrr_terms[i,j+1,0, 0,0,0, im] += ( + j/2./zeta*(vrr_terms[i,j-1,0, 0,0,0, im] + - eta/(zeta+eta) + *vrr_terms[i,j-1,0, 0,0,0, im+1] + )) + + + for k in range(na): + for j in range(ma+1): + for i in range(la+1): + for im in range(mtot-i-j-k): + vrr_terms[i,j,k+1, 0,0,0, im] = ( + (pz-za)*vrr_terms[i,j,k, 0,0,0, im] + + (wz-pz)*vrr_terms[i,j,k, 0,0,0, im+1] + ) + if k: + vrr_terms[i,j,k+1, 0,0,0, im] += ( + k/2./zeta*(vrr_terms[i,j,k-1, 0,0,0, im] + - eta/(zeta+eta) + *vrr_terms[i,j,k-1, 0,0,0, im+1] + )) + + for q in range(lc): + for k in range(na+1): + for j in range(ma+1): + for i in range(la+1): + for im in range(mtot-i-j-k-q): + vrr_terms[i,j,k, q+1,0,0, im] = ( + (qx-xc)*vrr_terms[i,j,k, q,0,0, im] + + (wx-qx)*vrr_terms[i,j,k, q,0,0, im+1] + ) + if q: + vrr_terms[i,j,k, q+1,0,0, im] += ( + q/2./eta*(vrr_terms[i,j,k, q-1,0,0, im] + - zeta/(zeta+eta) + *vrr_terms[i,j,k, q-1,0,0, im+1] + )) + if i: + vrr_terms[i,j,k, q+1,0,0, im] += ( + i/2./(zeta+eta)*vrr_terms[i-1,j,k, q,0,0, im+1] + ) + + for r in range(mc): + for q in range(lc+1): + for k in range(na+1): + for j in range(ma+1): + for i in range(la+1): + for im in range(mtot-i-j-k-q-r): + vrr_terms[i,j,k, q,r+1,0, im] = ( + (qy-yc)*vrr_terms[i,j,k, q,r,0, im] + + (wy-qy)*vrr_terms[i,j,k, q,r,0, im+1] + ) + if r: + vrr_terms[i,j,k, q,r+1,0, im] += ( + r/2./eta*(vrr_terms[i,j,k, q,r-1,0, im] + - zeta/(zeta+eta) + *vrr_terms[i,j,k, q,r-1,0, im+1] + )) + if j: + vrr_terms[i,j,k, q,r+1,0, im] += ( + j/2./(zeta+eta)*vrr_terms[i,j-1,k,q,r,0,im+1] + ) + + for s in range(nc): + for r in range(mc+1): + for q in range(lc+1): + for k in range(na+1): + for j in range(ma+1): + for i in range(la+1): + for im in range(mtot-i-j-k-q-r-s): + vrr_terms[i,j,k,q,r,s+1,im] = ( + (qz-zc)*vrr_terms[i,j,k,q,r,s,im] + + (wz-qz)*vrr_terms[i,j,k,q,r,s,im+1] + ) + if s: + vrr_terms[i,j,k,q,r,s+1,im] += ( + s/2./eta*(vrr_terms[i,j,k,q,r,s-1,im] + - zeta/(zeta+eta) + *vrr_terms[i,j,k,q,r,s-1,im+1] + )) + if k: + vrr_terms[i,j,k,q,r,s+1,im] += ( + k/2./(zeta+eta)*vrr_terms[i,j,k-1,q,r,s,im+1] + ) + return vrr_terms[la,ma,na,lc,mc,nc,M] +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/bf_val_helpers.py",".py","35149","801","import numpy as np +from numba import njit, prange, jit +import numba +try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math + +def eval_bfs_and_grad(basis, coord, deriv=1, parallel=True, non_zero_indices=None): + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomodate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + + if parallel: + # Uses the same number of threads as the defined by numba.set_num_threads before calling this function + if non_zero_indices is not None: + bf_values, bf_grad_values = eval_bfs_and_grad_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, non_zero_indices) + else: + bf_values, bf_grad_values = eval_bfs_and_grad_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + else: + numba.set_num_threads(1) # Set number of threads to 1 + if non_zero_indices is not None: + bf_values, bf_grad_values = eval_bfs_and_grad_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, non_zero_indices) + else: + bf_values, bf_grad_values = eval_bfs_and_grad_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + + + # return bf_grad_values + return bf_values, bf_grad_values + + +def eval_bfs(basis, coord, parallel=True, non_zero_indices=None): + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + + if parallel: + # Uses the same number of threads as the defined by numba.set_num_threads before calling this function + if non_zero_indices is not None: + bf_values = eval_bfs_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, non_zero_indices) + else: + bf_values = eval_bfs_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + else: + numba.set_num_threads(1) # Set number of threads to 1 + if non_zero_indices is not None: + bf_values = eval_bfs_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, non_zero_indices) + else: + bf_values = eval_bfs_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + + + return bf_values + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", inline='always', nogil=True) +def eval_rho(bf_values, densmat): + # Evaluates the value of density on a grid using the values of the basis functions + # at those grid points and the density matrix. + # rho at the grid point m is given as: + # \rho^m = \sum_{\mu}\sum_{\nu} D_{\mu \nu} \mu^m \nu^m + rho = np.zeros((bf_values.shape[0])) + ncoords = bf_values.shape[0] + nbfs = bf_values.shape[1] + + # The following is the fastest because here we utilize symmetry information and also skip calculation for small values + #Loop over BFs + for m in prange(ncoords): + rho_temp = 0.0 + for i in prange(nbfs): + mu = bf_values[m,i] + if abs(mu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + for j in prange(i+1): + dens = densmat[i,j] + if abs(dens)<1.0e-8: #A value of 9 is good for an accuracy of 7-8 decimal places. + continue + if i==j: # Diagonal terms + nu = mu + rho_temp += dens*mu*nu + else: # Non-diagonal terms + nu = bf_values[m,j] + if abs(nu)<1.0e-8: #A value of 8 is good for an accuracy of 7-8 decimal places. + continue + rho_temp += 2*dens*mu*nu + rho[m] = rho_temp + return rho + +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True, inline='always') +def eval_gto(alpha, coeff, lmn, x, y, z, exponent_dist_sq): + # This function evaluates the value of a given Gaussian primitive + # with given values of alpha (exponent), coefficient, and angular momentum. + # x,y,z contain the information of both grid point and bf center + # x = coord_grid[0] - coord_bf_center[0] + # y = coord_grid[1] - coord_bf_center[1] + # z = coord_grid[2] - coord_bf_center[2] + + xl = x**lmn[0] + ym = y**lmn[1] + zn = z**lmn[2] + exp = math.exp(-alpha*exponent_dist_sq) + value = coeff*xl*ym*zn*exp + + return value + + +@njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"") +def eval_bfs_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bfs_coords.shape[0] + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value = 0.0 + coord_bf = bfs_coords[i] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)>bfs_radius_cutoff[i]): + continue + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + exponent_dist_sq = x**2 + y**2 + z**2 + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + value += eval_gto(alphaik, Ni*Nik*dik, lmni, x, y, z, exponent_dist_sq) + result[k,i] = value + + return result + +@njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"") +def eval_bfs_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, bf_indices): + # This function evaluates the values of the specific (significant) basis functions (bf_indices) on a set of grid points (coord). + # 'coord' should be a nx3 array + + # This is essentially a ""sparse"" version of eval_bfs function. Therefore, instead of calculating the values of all basis functions + # it only calculates the values of basis functions that are provided as list of indices (bf_indices) + # The bf_indices list is generated by considering the extents of the basis functions + + nao = bf_indices.shape[0] + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in prange(nao): + # Actual index in original basis set + ibf = bf_indices[i] + value = 0.0 + coord_bf = bfs_coords[ibf] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + Ni = bfs_contr_prim_norms[ibf] + lmni = bfs_lmn[ibf] + exponent_dist_sq = x**2 + y**2 + z**2 + for ik in range(bfs_nprim[ibf]): + dik = bfs_coeffs[ibf][ik] + Nik = bfs_prim_norms[ibf][ik] + alphaik = bfs_expnts[ibf][ik] + value += eval_gto(alphaik, Ni*Nik*dik, lmni, x, y, z, exponent_dist_sq) + result[k,i] = value + + return result + + +@njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"") +def eval_bfs_and_grad_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bfs_coords.shape[0] + ncoord = coord.shape[0] + # result = np.zeros((4, ncoord, nao)) + result1 = np.zeros((ncoord,nao)) + result2 = np.zeros((3,ncoord,nao)) + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value_ao = 0.0 + valuex = 0.0 + valuey = 0.0 + valuez = 0.0 + # values[0] = 0.0 + # values[1] = 0.0 + # values[2] = 0.0 + # values[3] = 0.0 + coord_bf = bfs_coords[i] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)>bfs_radius_cutoff[i]): + continue + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + exponent_dist_sq = x**2 + y**2 + z**2 + #cutoff_radius = 0 #Cutoff radius for this basis function + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i, ik] + Nik = bfs_prim_norms[i, ik] + alphaik = bfs_expnts[i, ik] + a,b,c,d = eval_gto_and_grad(alphaik, Ni*Nik*dik, lmni, x, y, z, exponent_dist_sq) + value_ao = value_ao + a + valuex += b + valuey += c + valuez += d + result1[k,i] = value_ao + result2[0,k,i] = valuex + result2[1,k,i] = valuey + result2[2,k,i] = valuez + + return result1, result2 + +@njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"") +def eval_bfs_and_grad_sparse_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, bf_indices): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bf_indices.shape[0] + ncoord = coord.shape[0] + # result = np.zeros((4, ncoord, nao)) + result1 = np.zeros((ncoord,nao)) + result2 = np.zeros((3,ncoord,nao)) + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value_ao = 0.0 + valuex = 0.0 + valuey = 0.0 + valuez = 0.0 + ibf = bf_indices[i] + coord_bf = bfs_coords[ibf] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + Ni = bfs_contr_prim_norms[ibf] + lmni = bfs_lmn[ibf] + exponent_dist_sq = x**2 + y**2 + z**2 + for ik in range(bfs_nprim[ibf]): # Loop over primitives + dik = bfs_coeffs[ibf, ik] + Nik = bfs_prim_norms[ibf, ik] + alphaik = bfs_expnts[ibf, ik] + a,b,c,d = eval_gto_and_grad(alphaik, Ni*Nik*dik, lmni, x, y, z, exponent_dist_sq) + value_ao += a + valuex += b + valuey += c + valuez += d + result1[k,i] = value_ao + result2[0,k,i] = valuex + result2[1,k,i] = valuey + result2[2,k,i] = valuez + + return result1, result2 + +@njit(parallel=False, cache=True, nogil=True, fastmath=True, error_model=""numpy"") +def eval_bfs_and_grad_sparse_internal_serial(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, bf_indices): + #This function evaluates the value of all the given Basis functions on the grid (coord). + # 'coord' should be a nx3 array + + nao = bf_indices.shape[0] + ncoord = coord.shape[0] + # result = np.zeros((4, ncoord, nao)) + result1 = np.zeros((ncoord,nao)) + result2 = np.zeros((3,ncoord,nao)) + + #Loop over grid points + for k in prange(ncoord): + coord_grid = coord[k] + #Loop over BFs + for i in range(nao): + value_ao = 0.0 + valuex = 0.0 + valuey = 0.0 + valuez = 0.0 + ibf = bf_indices[i] + coord_bf = bfs_coords[ibf] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + Ni = bfs_contr_prim_norms[ibf] + lmni = bfs_lmn[ibf] + exponent_dist_sq = x**2 + y**2 + z**2 + for ik in range(bfs_nprim[ibf]): # Loop over primitives + dik = bfs_coeffs[ibf, ik] + Nik = bfs_prim_norms[ibf, ik] + alphaik = bfs_expnts[ibf, ik] + a,b,c,d = eval_gto_and_grad(alphaik, Ni*Nik*dik, lmni, x, y, z, exponent_dist_sq) + value_ao += a + valuex += b + valuey += c + valuez += d + result1[k,i] = value_ao + result2[0,k,i] = valuex + result2[1,k,i] = valuey + result2[2,k,i] = valuez + + return result1, result2 + + +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True, inline='always') +def eval_gto_and_grad(alpha, coeff, lmn, x, y, z, exponent_dist_sq): + # https://www.wolframalpha.com/input?i=dy%2FdA+for+y%3D%28x-A%29%5E%28l%29*%28y-B%29%5E%28m%29*%28z-C%29%5E%28n%29*exp%28-alpha*%28%28x-A%29%5E%282%29%2B%28y-B%29%5E%282%29%2B%28z-C%29%5E%282%29%29+ + # https://www.wolframalpha.com/input?i=derivative+of+%28x-A%29%5E%28l%29*%28y-B%29%5E%28m%29*%28z-C%29%5E%28n%29*exp%28-alpha*%28%28x-A%29%5E%282%29%2B%28y-B%29%5E%282%29%2B%28z-C%29%5E%282%29%29 + # A very low-level way to calculate the ao values as well as their gradients simultaneously, without + # running similar calls again and again. + # value = np.zeros((4)) + # Prelims + # x = coord[0]-coordCenter[0] + # y = coord[1]-coordCenter[1] + # z = coord[2]-coordCenter[2] + xl = x**lmn[0] + ym = y**lmn[1] + zn = z**lmn[2] + exp = math.exp(-alpha*(exponent_dist_sq)) + factor2 = coeff*exp + + # AO Value + value0 = factor2*xl*ym*zn + # Grad x + if np.abs(x-0)<1e-14: + value1 = 0.0 + else: + xl = x**(lmn[0]-1) + factor = (lmn[0]-2*alpha*x**2) + value1 = factor2*xl*ym*zn*factor + # Grad y + if np.abs(y-0)<1e-14: + value2 = 0.0 + else: + xl = x**lmn[0] + ym = y**(lmn[1]-1) + factor = (lmn[1]-2*alpha*y**2) + value2 = factor2*xl*ym*zn*factor + # Grad z + if np.abs(z-0)<1e-14: + value3 = 0.0 + else: + zn = z**(lmn[2]-1) + xl = x**lmn[0] + ym = y**lmn[1] + factor = (lmn[2]-2*alpha*z**2) + value3 = factor2*xl*ym*zn*factor + + return value0, value1, value2, value3 + +@njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"") +def eval_bfs_sparse_vectorized_internal(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, bfs_expnts, coord, bf_indices): + # This function evaluates the values of the specific (significant) basis functions (bf_indices) on a set of grid points (coord). + # 'coord' should be a nx3 array + + # This is essentially a ""sparse"" version of eval_bfs function. Therefore, instead of calculating the values of all basis functions + # it only calculates the values of basis functions that are provided as list of indices (bf_indices) + # The bf_indices list is generated by considering the extents of the basis functions + + nao = bf_indices.shape[0] + ncoord = coord.shape[0] + result = np.zeros((ncoord, nao)) + + for i in prange(nao): + # Actual index in original basis set + ibf = bf_indices[i] + coord_bf = bfs_coords[ibf] + # x, y, z = coord - coord_bf + x = coord[:,0] - coord_bf[0] + y = coord[:,1] - coord_bf[1] + z = coord[:,2] - coord_bf[2] + Ni = bfs_contr_prim_norms[ibf] + lmni = bfs_lmn[ibf] + exp_sq_term = x**2 + y**2 + z**2 + xl = x**lmni[0] + ym = y**lmni[1] + zn = z**lmni[2] + value = np.zeros(coord.shape[0], dtype=np.float64) + for ik in range(bfs_nprim[ibf]): + dik = bfs_coeffs[ibf][ik] + Nik = bfs_prim_norms[ibf][ik] + alphaik = bfs_expnts[ibf][ik] + value += eval_gto_vectorize(alphaik, Ni*Nik*dik, exp_sq_term, xl, ym, zn) + result[:,i] = value + + return result + +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"", nogil=True, inline='always') +def eval_gto_vectorize(alpha, coeff, exp_sq_term, xl, ym, zn): + # This function evaluates the value of a given Gaussian primitive + # with given values of alpha (exponent), coefficient, and angular momentum. + exp = np.exp(-alpha*(exp_sq_term)) + value = coeff*xl*ym*zn*exp + + return value +# import cupyx +# @jit(nopython=False, parallel=True, forceobj=True, cache=True) +def eval_bfs_sparse_vectorized_internal_cupy(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, bfs_prim_norms, \ + bfs_expnts, coord, bf_indices, scratches): + # This function evaluates the values of the specific (significant) basis functions (bf_indices) on a set of grid points (coord). + # 'coord' should be a nx3 array + + # This is essentially a ""sparse"" version of eval_bfs function. Therefore, instead of calculating the values of all basis functions + # it only calculates the values of basis functions that are provided as list of indices (bf_indices) + # The bf_indices list is generated by considering the extents of the basis functions + # with cupyx.profiler.profile(): + nao = bf_indices.shape[0] + ncoord = coord.shape[0] + result = cp.zeros((ncoord, nao)) + + value = scratches[0][0:ncoord] + x = scratches[1][0:ncoord] + y = scratches[2][0:ncoord] + z = scratches[3][0:ncoord] + exp_sq_term = scratches[4][0:ncoord] + xlymzn_ = scratches[5][0:ncoord] + + for i in range(nao): + # Actual index in original basis set + ibf = bf_indices[i] + coord_bf = bfs_coords[ibf] + Ni = bfs_contr_prim_norms[ibf] + lmni = bfs_lmn[ibf] + # x, y, z = coord - coord_bf + cp.subtract(coord[:,0], coord_bf[0], out=x) + cp.subtract(coord[:,1], coord_bf[1], out=y) + cp.subtract(coord[:,2], coord_bf[2], out=z) + exp_sq_term[:] = calc_norm(x, y, z) + # xl = x**lmni[0] + # ym = y**lmni[1] + # zn = z**lmni[2] + xlymzn_[:] = xlymzn(x, y, z, lmni[0], lmni[1], lmni[2]) + value[:] = 0.0 + for ik in range(bfs_nprim[ibf]): + dik = bfs_coeffs[ibf][ik] + Nik = bfs_prim_norms[ibf][ik] + alphaik = bfs_expnts[ibf][ik] + cp.add(value, eval_gto_vectorize_cupy(alphaik, Ni*Nik*dik, exp_sq_term, xlymzn_), out=value) + # result[:,i] += eval_gto_vectorize_cupy(alphaik, Ni*Nik*dik, exp_sq_term, xl, ym, zn) + result[:,i] = value + + return result + +# # IMPORTANT: +# # export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" +@cuda.jit(fastmath=True, cache=True)#(device=True) +def eval_bfs_sparse_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_nprim, bfs_lmn, bfs_coeffs, + bfs_prim_norms, bfs_expnts, coord, bf_indices, out): + nao = bf_indices.shape[0] + ncoord = coord.shape[0] + indx, igrd = cuda.grid(2) + if indx(n)') +# def g(x, y, res): +# for i in range(x.shape[0]): +# res[i] = x[i] + y +# from numba import guvectorize, vectorize +# from numba.types import float64, int64 +# import cmath + +# # IMPORTANT: +# # export NUMBA_CUDA_DRIVER=""/usr/lib/wsl/lib/libcuda.so.1"" +# @guvectorize(['void(int64, float64, int64, float64[:,:], float64[:,:], float64[:,:], float64[:], float64[:], float64[:])'],'(),(),(m,o),(m,o),(m,o),(n),(n) -> (n)', nopython=True, target='cuda') +# def g(ibf, Ni, nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, exp_sq_term, xlymzn_, res): +# for ik in range(nprim): +# dik = bfs_coeffs[ibf, ik] +# Nik = bfs_prim_norms[ibf, ik] +# alphaik = bfs_expnts[ibf, ik] + +# # res[:] += Ni*Nik*dik*xlymzn_*cp.exp(-alphaik*(exp_sq_term)) +# res[:] = cmath.exp((exp_sq_term)) + +@fuse(kernel_name='calc_norm') +def calc_norm(x,y,z): + return x**2 + y**2 + z**2 + +@fuse(kernel_name='xlymzn') +def xlymzn(x, y, z, l, m, n): + return (x**l) * (y**m) * (z**n) + +# @fuse +# def temp(coord, coord_bf, lmni): +# x = coord[:,0] - coord_bf[0] +# y = coord[:,1] - coord_bf[1] +# z = coord[:,2] - coord_bf[2] +# exp_sq_term = x**2 + y**2 + z**2 +# xl = x**lmni[0] +# ym = y**lmni[1] +# zn = z**lmni[2] +# return xl,ym,zn, exp_sq_term + +@fuse(kernel_name='eval_gto_vectorize_cupy') +def eval_gto_vectorize_cupy(alpha, coeff, exp_sq_term, xlymzn): + # This function evaluates the value of a given Gaussian primitive + # with given values of alpha (exponent), coefficient, and angular momentum. + value = coeff*xlymzn*cp.exp(-alpha*(exp_sq_term)) + # value = (coeff*(xl*ym*zn)[:,cp.newaxis])*cp.exp(-alpha*exp_sq_term[:,cp.newaxis]) + # value = exp + + return value + +# Define parallelserial versions of the above functions for use in XC term evaluation, where the parallelization will be done over batches of grid points instead +# Seems like these don't work and the number of threads has to be manually set using numba.set_num_threads +# eval_bfs_sparse_internal = njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_sparse_internal_) +# eval_bfs_internal = njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_internal_) +# eval_bfs_sparse_internal_serial = njit(parallel=False, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_sparse_internal_) +# eval_bfs_internal_serial = njit(parallel=False, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_internal_) +# eval_bfs_and_grad_sparse_internal = njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_and_grad_sparse_internal_) +# eval_bfs_and_grad_internal = njit(parallel=True, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_and_grad_internal_) +# eval_bfs_and_grad_sparse_internal_serial = njit(parallel=False, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_and_grad_sparse_internal_) +# eval_bfs_and_grad_internal_serial = njit(parallel=False, cache=True, nogil=True, fastmath=True, error_model=""numpy"")(eval_bfs_and_grad_internal_) + + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"", nogil=True, inline='always') +def nonzero_ao_indices_batch(coords, bfs_coords, bfs_radius_cutoff): + nbfs = bfs_coords.shape[0] + ncoords = coords.shape[0] + count = 0 + indices = np.zeros((nbfs), dtype='uint16') + # Loop over the basis functions + for ibf in range(nbfs): + coord_bf = bfs_coords[ibf] + cutoff = bfs_radius_cutoff[ibf] + # Loop over the grid points and check if the value of the basis function is greater than the threshold + for igrd in range(ncoords): + coord_grid = coords[igrd] + x = coord_grid[0]-coord_bf[0] + y = coord_grid[1]-coord_bf[1] + z = coord_grid[2]-coord_bf[2] + if (np.sqrt(x**2+y**2+z**2)= indx_endB: + lower_tri = True + elif indx_startA==indx_startB and indx_endA==indx_endB: + both_tri_symm = True + else: + both_tri_nonsymm = True + + + # Initialize the matrix with zeros + Vnuc = np.zeros(matrix_shape, dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = np.zeros((3)) + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + zeta = 1e12 + zeta_2pi_32 = np.sqrt((2*zeta/(pi))**(3/2)) + # zeta_2pi_32 = (pi/zeta)**(3/2) + # zeta_2pi_32 = np.sqrt((2*zeta/(pi))**(3/2)) + zeta_2pi_32 = (zeta/(pi))**(3/2) + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(indx_startB, indx_endB): #B + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + val = 0.0 + for k in prange(natoms): #C # These would be our nuclei + K = coordsBohrs[k] + Nk = -Z[k]*zeta_2pi_32 + lmnk = [0, 0, 0] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + nprimk = 1 + + + + KL = K #- L + KLsq = np.sum(KL**2) + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + # val = 0.0 + + if norder<=7: # Use rys quadrature + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(nprimk): + dkk = 1.0 + Nkk = 1.0 + alphakk = zeta + tempcoeff5 = tempcoeff4#*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + # screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + # if abs(screenfactorKL)<1.0e-8: + # #TODO: Check for optimal value for screening + # continue + # if abs(screenfactorAB*screenfactorKL)<1.0e-10: + # #TODO: Check for optimal value for screening + # continue + + Q = K + PQ = P - Q + PQsq = np.sum(PQ**2) + rho = gammaP*gammaQ/(gammaP+gammaQ) + + + + val += tempcoeff5*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + + else: # Analytical (Conventional) + #Loop over primitives + for ik in range(bfs_nprim[i]): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(bfs_nprim[j]): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(1): + dkk = 1.0 + Nkk = 1.0 + alphakk = zeta + tempcoeff5 = tempcoeff4#*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + + Q = K#(alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))#*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + + val += omega*sum1*tempcoeff5 + + Vnuc[i-indx_startA, j-indx_startB] = val + + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Vi,j=Vj,i + for i in prange(indx_startA, indx_endA): + for j in prange(indx_startB, indx_endB): + if j>i: + Vnuc[i-indx_startA, j-indx_startB] = Vnuc[j-indx_startB, i-indx_startA] + + + return Vnuc","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_3c2e_symm_cupy_fp32.py",".py","13184","277","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba +from .rys_helpers_cuda import coulomb_rys_fp32, Roots, DATA_X, DATA_W +from .schwarz_helpers import eri_4c2e_diag +from .rys_2c2e_symm_cupy import rys_2c2e_symm_cupy + + +def rys_3c2e_symm_cupy_fp32(basis, auxbasis, slice=None, schwarz=True, schwarz_threshold=1e-9, cp_stream=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords], dtype=cp.float32) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms], dtype=cp.float32) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + + aux_bfs_coords = cp.array([auxbasis.bfs_coords], dtype=cp.float32) + aux_bfs_contr_prim_norms = cp.array([auxbasis.bfs_contr_prim_norms], dtype=cp.float32) + aux_bfs_lmn = cp.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = cp.array([auxbasis.bfs_nprim], dtype=cp.float32) + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim], dtype=cp.float32) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim], dtype=cp.float32) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim], dtype=cp.float32) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = cp.zeros([auxbasis.bfs_nao, maxnprimaux], dtype=cp.float32) + aux_bfs_expnts = cp.zeros([auxbasis.bfs_nao, maxnprimaux], dtype=cp.float32) + aux_bfs_prim_norms = cp.zeros([auxbasis.bfs_nao, maxnprimaux], dtype=cp.float32) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + DATA_X_cuda = cp.asarray(DATA_X, dtype=cp.float32) + DATA_W_cuda = cp.asarray(DATA_W, dtype=cp.float32) + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, auxbasis.bfs_nao] + + if schwarz: + ints4c2e_diag = cp.asarray(eri_4c2e_diag(basis)) + ints2c2e = rys_2c2e_symm_cupy(auxbasis) + sqrt_ints4c2e_diag = cp.sqrt(cp.abs(ints4c2e_diag)) + sqrt_diag_ints2c2e = cp.sqrt(cp.abs(cp.diag(ints2c2e))) + print('Prelims calc done for Schwarz screening!') + else: + #Create dummy array + sqrt_ints4c2e_diag = cp.zeros((1,1), dtype=cp.float64) + sqrt_diag_ints2c2e = cp.zeros((1), dtype=cp.float64) + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + matrix_shape = (num_A, num_B, num_C) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + tri_symm = False + no_symm = False + if indx_startA==indx_startB and indx_endA==indx_endB: + tri_symm = True + else: + no_symm = True + + + # Initialize the matrix with zeros + threeC2E = cp.zeros(matrix_shape, dtype=cp.float32) + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((num_A + (thread_x - 1))//thread_x, (num_B + (thread_y - 1))//thread_y) + rys_3c2e_symm_internal_cuda[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, tri_symm, no_symm, DATA_X_cuda, DATA_W_cuda, schwarz, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, schwarz_threshold, threeC2E) + if tri_symm: + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC,threeC2E) + if cp_stream is None: + cuda.synchronize() + else: + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + # cp._default_memory_pool.free_all_blocks() + return threeC2E + + + + + +@cuda.jit(fastmath=True, cache=True, max_registers=50)#(device=True) +def rys_3c2e_symm_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, tri_symm, no_symm, DATA_X, DATA_W, schwarz, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, schwarz_threshold, out): + # Two centered two electron integrals by hacking the 4c2e routines based on rys quadrature. + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the electron-electron Coulomb potential matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # returns (A|C) + + i, j = cuda.grid(2) + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = cuda.local.array((3), numba.float32) + L[0] = 0.0 + L[1] = 0.0 + L[2] = 0.0 + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + if i>=indx_startA and i=indx_startB and j=indx_startA and i=indx_startB and ji: + for k in range(indx_startC, indx_endC): + out[i-indx_startA, j-indx_startB, k] = out[j-indx_startB, i-indx_startA, k]","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/nuc_mat_symm_cupy.py",".py","77323","482","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba + + +def nuc_mat_symm_cupy(basis, mol, slice=None, cp_stream=None, sqrt_ints4c2e_diag=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + coordsBohrs = cp.array([mol.coordsBohrs]) + Z = cp.array([mol.Zcharges]) + natoms = mol.natoms + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # Infer the matrix shape from the start and end indices + num_rows = b - a + num_cols = d - c + start_row = a + end_row = b + start_col = c + end_col = d + matrix_shape = (num_rows, num_cols) + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # Initialize the matrix with zeros + V = cp.zeros(matrix_shape) + + if sqrt_ints4c2e_diag is None: + #Create dummy array + sqrt_ints4c2e_diag = cp.zeros((1,1), dtype=cp.float64) + isSchwarz = False + else: + isSchwarz = True + sqrt_ints4c2e_diag = cp.asarray(sqrt_ints4c2e_diag) + + + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((num_rows + (thread_x - 1))//thread_x, (num_cols + (thread_y - 1))//thread_y) + nuc_mat_symm_internal_cuda[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, Z[0], coordsBohrs[0], natoms, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, sqrt_ints4c2e_diag, isSchwarz, V) + if both_tri_symm: + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((num_rows + (thread_x - 1))//thread_x, (num_cols + (thread_y - 1))//thread_y) + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](a,b,c,d,V) + if cp_stream is None: + cuda.synchronize() + else: + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + # cp._default_memory_pool.free_all_blocks() + return V + +LOOKUP_TABLE = np.array([ + 1, 1, 2, 6, 24, 120, 720, 5040, 40320, + 362880, 3628800, 39916800, 479001600, + 6227020800, 87178291200, 1307674368000, + 20922789888000, 355687428096000, 6402373705728000, + 121645100408832000, 2432902008176640000], dtype='int64') + +@cuda.jit(fastmath=True, cache=True, device=True) +def fastFactorial(n): + # This is the way to access global constant arrays (which need to be on host, i.e. created using numpy for some reason) + # See https://stackoverflow.com/questions/63311574/in-numba-how-to-copy-an-array-into-constant-memory-when-targeting-cuda + LOOKUP_TABLE_ = cuda.const.array_like(LOOKUP_TABLE) + # 2-3x faster than the fastFactorial_old for values less than 21 + if n<= 1: + return 1 + elif n<=20: + return LOOKUP_TABLE_[n] + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + +LOOKUP_TABLE_COMB = np.array([[ 1, 0, 0, 0, 0, 0], + [ 1, 1, 0, 0, 0, 0], + [ 1, 2, 1, 0, 0, 0], + [ 1, 3, 3, 1, 0, 0], + [ 1, 4, 6, 4, 1, 0], + [ 1, 5, 10, 10, 5, 1]]) + +@cuda.jit(fastmath=True, cache=True, device=True) +def comb(x, y): + table = cuda.const.array_like(LOOKUP_TABLE_COMB) + if y == 0: + return 1 + if x == y: + return 1 + if x<=5 and y<=5: + return table[x,y] + binom = fastFactorial(x) // fastFactorial(y) // fastFactorial(x - y) + return binom + + + +@cuda.jit(fastmath=True, cache=True, device=True) +def c2k(k,la,lb,PA,PB): + temp = 0.0 + for i in range(la+1): + if i>k: + continue + factor1 = comb(la,i) + factor2 = PA**(la-i) + for j in range(lb+1): + # if j>k: + # continue + if (i+j)==k : + temp += factor1*comb(lb,j)*factor2*PB**(lb-j) + return temp + + +@cuda.jit(fastmath=True, cache=True, device=True) +def vlriPartial(Ci, l,r,i): + return (-1)**l*((-1)**i*fastFactorial(l)*Ci**(l-2*r-2*i)/(fastFactorial(r)*fastFactorial(i)*fastFactorial(l-2*r-2*i))) + +# Alternative boys implementation from this repo: https://github.com/peter-reinholdt/pyboys +# The repo has the BSD-3 license. +# This implementation is faster and it should help provide upto +# 10-40 percent speed up. +# Another advantage of this implementation is that it can be cached by Numba, since it is not dependent on the functions +# from numba scipy package. +# from .taylor import taylor_cuda + +TABLE = np.array([ +[0.12533141373155002, 0.12660384649325115, 0.12791583849331106, 0.12926948294637178, 0.13066703148589484, 0.13211090992020036, 0.13360373594713928, 0.1351483391218054, 0.13674778342396565, 0.13840539283493047, 0.14012478040994822, 0.1419098814251087, 0.14376499129129275, 0.14569480906717377, 0.14770448757545968, 0.14979969134027404, 0.15198666383034362, 0.154272305827641, 0.15666426716443735, 0.15917105461020217, 0.16180215937964007, 0.1645682086235545, 0.16748114642265755, 0.17055445132438055, 0.17380339947509396, 0.1772453850902791, 0.18090031363879588, 0.1847910880801995, 0.1889442153539537, 0.19339056992497952, 0.19816636482997366, 0.20331440033476209, 0.2088856891404153, 0.2149416001041246, 0.22155672794739223, 0.22882279832973734, 0.23685407997867067, 0.24579504080564116, 0.25583143052938306, 0.2672067433518623, 0.2802473905066427, 0.2954024494198404, 0.3133086873213072, 0.3349010581765593, 0.3616081473536585, 0.39571230961051357, 0.4410406953812108, 0.5043435602314388, 0.5981440066613041, 0.746824132812427, 1.0, 1.4626517459071815, 2.3644538928052095, 4.222211992888512, 8.226313882753615, 17.17215777384149, 37.730055834060025, 86.02957126345422, 201.5099994178647, 481.51504096423804, 1168.230463579439, 2868.333594971662, 7110.562488524504, 17766.996932005903, 44689.492944383725, 113044.74701168819, 287350.1586474826, 733529.0042727154, 1879517.1716437954, 4831866.198079479, 12458600.438172013, 32209138.472892135, 83470524.1914028, 216788113.3661266, 564160762.6302302, 1470830749.5674262, 3841059879.5020657, 10046426066.56019, 26314441399.133087, 69016683572.67746, 181238877517.30847, 476485835178.4421, 1254057621480.5176, 3303881273447.4497, 8712525896263.168, 22995988235504.977, 60747184630833.58, 160600137463205.72, 424905752315937.2, 1124990859734760.1, 2980568725898933.0, 7901841702995028.0, 2.0961526460537584e+16, 5.563783417120913e+16, 1.4776054219568886e+17, 3.926238817408209e+17, 1.0437937317811304e+18, 2.776277165905116e+18, 7.387749545786012e+18, 1.966773351624895e+19], +[0.003759942411946501, 0.003875627953875035, 0.003997369952915971, 0.004125621796160802, 0.004260881461496571, 0.004403696997340012, 0.004554672816379748, 0.004714476946109491, 0.004883849407998774, 0.005063611932985261, 0.005254679265373058, 0.005458072362504182, 0.005674933866761555, 0.005906546313534069, 0.006154353648977476, 0.006419986771726004, 0.006705293992515084, 0.007012377537619834, 0.007343637523332406, 0.007701825223072633, 0.008090107968977325, 0.008512148721894836, 0.008972204272605328, 0.009475247295694501, 0.010027119200191436, 0.010634723104583469, 0.011306269600065283, 0.012051592694190046, 0.01288256011875047, 0.013813612083337392, 0.014862477207661502, 0.016051136426207816, 0.017407139492536295, 0.01896543165041889, 0.020770932694895394, 0.022882249242741685, 0.02537713376249481, 0.02836070543956548, 0.031978160789628715, 0.03643500567969164, 0.04203029858653204, 0.04921317326929229, 0.05868247963001337, 0.07156910918807245, 0.08978234879424804, 0.11669230878342843, 0.15852189618467874, 0.22727824593178744, 0.3471065425685186, 0.5684170374614771, 1.0, 1.8834451238277954, 3.7684516545940805, 7.931662465149578, 17.389438556396485, 39.37230039862053, 91.42468441466877, 216.55791153535807, 521.1464976794745, 1270.2614811018577, 3128.735299684092, 7773.519289121748, 19455.528616309926, 48997.66097041322, 124062.29905932782, 315597.2625460423, 806133.7839244115, 2066596.2131737573, 5315037.663807226, 13709244.849876931, 35452994.62287137, 91900471.14359447, 238734703.76864922, 621392304.3184419, 1620310085.4508276, 4232044115.269107, 11070493243.230963, 29000100807.513245, 76068354797.80405, 199775048977.8292, 525261785200.35767, 1382533733713.0154, 3642604807556.2583, 9606349932384.938, 25356583086670.223, 66986462746196.82, 177103515103515.06, 468589550081327.25, 1240698394926229.8, 3287246521702268.5, 8715176179167039.0, 2.311981653025829e+16, 6.136833625214155e+16, 1.629837779322606e+17, 4.330854399601234e+17, 1.1513882391914758e+18, 3.062523928507936e+18, 8.149628025098988e+18, 2.1696432551999287e+19, 5.778608690751584e+19], +[0.00018799712059732504, 0.00019773612009566505, 0.00020819635171437348, 0.0002194479678808937, 0.00023156964464655276, 0.00024464983318555624, 0.0002587882282033948, 0.0002740974968668309, 0.0002907053219046889, 0.000308756825182028, 0.00032841745408581583, 0.000349876433493857, 0.00037335091228694233, 0.00039909096713067454, 0.0004273856700678642, 0.00045857048369466955, 0.0004930363229789243, 0.0005312407225466042, 0.0005737216815093548, 0.000621114937341791, 0.0006741756640736457, 0.0007338059242793508, 0.0008010896671351686, 0.0008773377123902752, 0.0009641460764502256, 0.0010634723090695525, 0.0011777364127410351, 0.0013099557164751357, 0.0014639272545231433, 0.0016444775387001607, 0.001857809393313485, 0.0021119908978172864, 0.0024176561475772987, 0.002789027978094368, 0.0032454406499563553, 0.0038136572234035307, 0.004531482541745662, 0.005453547136568942, 0.006660836786932372, 0.008276887267932135, 0.010496224664192389, 0.013636045407001559, 0.018233442813159643, 0.02523472400804212, 0.03637649859065903, 0.054977180892171476, 0.08762891080996535, 0.1479093146366029, 0.26471407416488235, 0.5013439907250868, 1.0, 2.0870917615781246, 4.525755555420712, 10.128228715031742, 23.255444672967347, 54.52042935197804, 130.00171211586098, 314.31258817610734, 768.6910904257044, 1898.006235131535, 4724.432623780656, 11841.050551380926, 29854.01308389458, 75656.8713535591, 192596.78305454444, 492236.6849876781, 1262496.3650911658, 3248287.7265296383, 8381240.482433789, 21680665.27806715, 56214025.09836486, 146061340.8737643, 380247516.17760706, 991675124.1228762, 2590501254.6242337, 6777285522.211677, 17755684248.616135, 46578531462.43383, 122338277633.3635, 321686142083.2942, 846767733027.0087, 2231154510607.614, 5884402763681.597, 15533123473752.357, 41037144076528.28, 108501927826231.0, 287092224445255.56, 760172488021708.4, 2014160089617600.5, 5340138070659710.0, 1.416688066611581e+16, 3.760510225608516e+16, 9.987539317073568e+16, 2.6539858664517942e+17, 7.055974246817719e+17, 1.8768268232385344e+18, 4.99449294986503e+18, 1.3296896840101476e+19, 3.54154770134252e+19, 9.43653308973257e+19], +[1.3159798441812753e-05, 1.412400857826179e-05, 1.5180983979173066e-05, 1.634186994857719e-05, 1.761942948397684e-05, 1.9028320358876594e-05, 2.058542724345185e-05, 2.2310261372881565e-05, 2.4225443492057358e-05, 2.6357289954563234e-05, 2.8736527232508517e-05, 3.139916710842203e-05, 3.438758402642601e-05, 3.7751848242082766e-05, 4.155138458990869e-05, 4.58570483694039e-05, 5.0753739130006955e-05, 5.634371299687299e-05, 6.275080891370054e-05, 7.012588001857361e-05, 7.865382746434144e-05, 8.856278393404982e-05, 0.00010013620830546606, 0.00011372896247361527, 0.00012978889421899915, 0.00014888612132542522, 0.00017175322135266308, 0.0001993410716737908, 0.00023289747338714405, 0.00027407946340735295, 0.00032511628312797595, 0.0003890499227669985, 0.0004700968450884133, 0.0005742031191476548, 0.0007099155251084828, 0.0008897819749193734, 0.0011326627532566396, 0.001467654140389759, 0.001940952000918888, 0.0026282408622724193, 0.003657788657050466, 0.005254913845578009, 0.007830366331049995, 0.012161421021243802, 0.019773685408162392, 0.03376746372516021, 0.060649112931077276, 0.11447595398019546, 0.22641288412447186, 0.4671259234377558, 1.0, 2.2091652340832226, 5.010775951142392, 11.616859576181914, 27.42486719015478, 65.724910825419, 159.4991308031766, 391.1602851261756, 967.8667672695104, 2413.085769283719, 6055.711609859121, 15283.256279396284, 38762.72701440689, 98742.14017644346, 252501.87527755808, 647915.4937463676, 1667665.5964974046, 4304313.387921166, 11137530.571785474, 28884511.836732652, 75066454.80449945, 195459065.60157508, 509833120.67449754, 1331997788.1496127, 3485215544.3028054, 9131865934.124388, 23958028389.645355, 62931258592.13988, 165489848332.26395, 435647191128.0213, 1147965798991.3696, 3027804291652.882, 7992967217703.026, 21117775669471.91, 55837826311124.8, 147751152448719.97, 391235767481799.7, 1036659313425220.5, 2748584232532540.5, 7291959441965875.0, 1.9356608789954116e+16, 5.14105943770462e+16, 1.3661662902914712e+17, 3.632219322219671e+17, 9.661593048607131e+17, 2.5711345515525105e+18, 6.845292486881698e+18, 1.823234832396103e+19, 4.858132082681631e+19, 1.2949866011412672e+20], +[1.1843818597631477e-06, 1.2971028286158786e-06, 1.4232172480474748e-06, 1.5646471227361136e-06, 1.7236398408238202e-06, 1.9028320358876565e-06, 2.1053277862621133e-06, 2.3347947948364205e-06, 2.5955832312917982e-06, 2.892873287695793e-06, 3.23285931365673e-06, 3.6229808202012095e-06, 4.072213897862521e-06, 4.591441002405094e-06, 5.193923073709592e-06, 5.895906218842293e-06, 6.717406649332903e-06, 7.683233589847378e-06, 8.82433250170824e-06, 1.0179563223505476e-05, 1.1798074105614782e-05, 1.3742500915812918e-05, 1.6093319080825614e-05, 1.8954826765681075e-05, 2.2463461576715216e-05, 2.6799499338746643e-05, 3.220372192524706e-05, 3.90014939455424e-05, 4.763806249915938e-05, 5.873115110385218e-05, 7.315069994422955e-05, 9.214207578250127e-05, 0.00011752040377716714, 0.00015198398464512359, 0.000199632090918871, 0.00026684282177966145, 0.0003638028936013509, 0.0005072517038017308, 0.0007255529207120849, 0.001068356929697253, 0.0016255749272795917, 0.0025657520207456644, 0.004215883333020459, 0.007231846535800255, 0.012971199923622025, 0.024326565053467267, 0.047625158297635986, 0.09703332841849727, 0.20492460199768314, 0.4466091701984106, 1.0, 2.2910246746912017, 5.351130332523581, 12.703016020508631, 30.56994319836314, 74.41942344944185, 182.9472470171689, 453.51827569432476, 1132.3638111218725, 2844.9990791458326, 7186.839383226418, 18241.72586010063, 46497.02415172388, 118963.12563431897, 305390.05999946315, 786330.563617723, 2030187.6348779441, 5254581.008555505, 13630609.64138626, 35431055.31942346, 92272216.63619044, 240719286.1889228, 628993580.2071328, 1645983715.7150784, 4313232484.788875, 11317146012.587067, 29729696718.321938, 78186163668.27646, 205837588279.15894, 542434206105.93427, 1430776317379.9639, 3777248521973.4014, 9980155260699.984, 26389882379515.113, 69832577146278.984, 184919438554034.25, 489999472454174.44, 1299220912626980.0, 3446922733174091.5, 9150166267157062.0, 2.430322403029491e+16, 6.458409868752535e+16, 1.7171339062407363e+17, 4.5676230027984205e+17, 1.2155564464259927e+18, 3.2363136505932585e+18, 8.620033863829187e+18, 2.296904747505757e+19, 6.122740034840127e+19, 1.6327174705539547e+20], +[1.3028200457394623e-07, 1.4559317464055773e-07, 1.63076976338773e-07, 1.8309700372443837e-07, 2.0608737227241203e-07, 2.3256835994182118e-07, 2.631659732827544e-07, 2.9863654352556164e-07, 3.398978040976602e-07, 3.8806836786142114e-07, 4.4451815562721624e-07, 5.109331925908497e-07, 5.893993799492424e-07, 6.825115003448296e-07, 7.935160251146395e-07, 9.264995485761371e-07, 1.086639310644249e-06, 1.2805389308647485e-06, 1.5166821465544505e-06, 1.8060515335465768e-06, 2.162980235540401e-06, 2.606336332343274e-06, 3.1611875407721726e-06, 3.861168032364349e-06, 4.751885021997847e-06, 5.895886799176611e-06, 7.38001095651912e-06, 9.326419665091454e-06, 1.1909445888087524e-05, 1.538176955537865e-05, 2.0115875667416954e-05, 2.6671084285439504e-05, 3.590435866032352e-05, 4.915789523374392e-05, 6.858484728705217e-05, 9.773020380169187e-05, 0.00014259589334659716, 0.0002136501968593172, 0.0003297289913310968, 0.0005258276144535036, 0.0008690962486344087, 0.0014925424657360462, 0.002667789234768589, 0.004965686448050223, 0.009618077101376028, 0.01934747985981998, 0.04030058918723998, 0.0866181434261611, 0.19137062659294377, 0.43301350964832575, 1.0, 2.349914345723139, 5.604295857619441, 13.534621654911568, 33.03878439782401, 81.39310921844823, 202.10808426926903, 505.30455071967657, 1270.9084959449008, 3213.2740740402814, 8161.7945263691645, 20816.207927548596, 53284.80999750335, 136844.34346617758, 352477.0166363732, 910318.4965799422, 2356723.491935288, 6114826.152800521, 15897859.845982965, 41409571.10740531, 108045569.16273996, 282358593.600886, 738979816.4811146, 1936674283.388523, 5081974710.325012, 13351305731.455738, 35115366150.301636, 92453386042.01378, 243653825645.2764, 642722431058.9515, 1696878015093.158, 4483671170580.875, 11856419595965.436, 31375616234400.16, 83087070870484.34, 220171916447905.16, 583799344739878.1, 1548907244080161.5, 4111830253464951.5, 1.0921481740066712e+16, 2.9023780885924696e+16, 7.716894321058323e+16, 2.0527591737929408e+17, 5.4630056799354125e+17, 1.4545054584916644e+18, 3.8741947941756687e+18, 1.0323399606132048e+19, 2.7518985665781285e+19, 7.338445936953105e+19, 1.9576350081466067e+20], +[1.6936660594612985e-08, 1.9313380309461672e-08, 2.2083340545875315e-08, 2.532192604699626e-08, 2.912104173414369e-08, 3.359320754714781e-08, 3.887679150766813e-08, 4.5142733323599435e-08, 5.2603231586453666e-08, 6.152303392900192e-08, 7.223420028873228e-08, 8.515553209655024e-08, 1.008183149859482e-07, 1.1990066896450662e-07, 1.4327372671492964e-07, 1.7206420176133043e-07, 2.077398678837416e-07, 2.5222736425266987e-07, 3.080760584464641e-07, 3.78688217557798e-07, 4.686456974255705e-07, 5.841787760982279e-07, 7.338469471663947e-07, 9.295399997567023e-07, 1.1879699782272048e-06, 1.532926956920514e-06, 1.9987427430678712e-06, 2.635698295692104e-06, 3.518617505377661e-06, 4.7607892116991945e-06, 6.536989716983217e-06, 9.122401562026988e-06, 1.2959963134653458e-05, 1.877983665103614e-05, 2.7816876795635244e-05, 4.221719730851568e-05, 6.581916929133631e-05, 0.00010569493372616806, 0.000175275088612958, 0.00030084713080101604, 0.0005354026072667505, 0.0009888180334134316, 0.0018950153680786876, 0.0037642470194602993, 0.007734268668435476, 0.016392392718954867, 0.035725544235071925, 0.07980066262631053, 0.18211486590807596, 0.4233714450997424, 1.0, 2.394388637783391, 5.800470784261431, 14.19364974793155, 35.03396915739537, 87.12606484936688, 218.09743499208827, 549.0908500152976, 1389.4152115161723, 3531.5293386642406, 9012.036324484408, 23079.688147247267, 59296.23993664614, 152784.52427137145, 394701.94563818735, 1022102.8462199396, 2652563.4803576125, 6897695.4650021205, 17969650.577431057, 46893302.319083296, 122563878.53029135, 320808162.6540541, 840843849.6694591, 2206645198.199672, 5797769092.78625, 15249934337.541836, 40153560819.634285, 105828390912.5408, 279175751828.58185, 737102659639.7617, 1947745922726.7825, 5150763232752.664, 13631016056676.537, 36098235244995.555, 95659863699126.72, 253656285232169.03, 673008592095543.4, 1786662928018808.8, 4745701572992559.0, 1.2611986447321172e+16, 3.3533741467052984e+16, 8.920450187991624e+16, 2.3740461087899632e+17, 6.320930895705288e+17, 1.6836617105259018e+18, 4.486455460255806e+18, 1.1959688367376105e+19, 3.1893190833956712e+19, 8.50808199366981e+19, 2.2704673399842557e+20], +[2.540499089191919e-09, 2.9561296392032367e-09, 3.4505219602927953e-09, 4.04073287983921e-09, 4.747995934913015e-09, 5.5988679245198645e-09, 6.626725825157442e-09, 7.873732556404871e-09, 9.393434211764056e-09, 1.1254213523312019e-08, 1.3543912553340736e-08, 1.637606386250039e-08, 1.9898351635767806e-08, 2.430418963767084e-08, 2.9848693017286946e-08, 3.6870900242318306e-08, 4.582497047863967e-08, 5.732439990767812e-08, 7.220532323022623e-08, 9.16181088225065e-08, 1.171614009623352e-07, 1.5108065217198187e-07, 1.9656596135528144e-07, 2.5820503339663495e-07, 3.426821737898587e-07, 4.598739206929947e-07, 6.245953099132588e-07, 8.594333729008001e-07, 1.1994335995119458e-06, 1.7000110555915725e-06, 2.450598211260292e-06, 3.5987363548379412e-06, 5.39363881454531e-06, 8.266957620815422e-06, 1.2986410134804367e-05, 2.095564749400693e-05, 3.4814807449410396e-05, 5.967381018414636e-05, 0.00010570679766226861, 0.00019373552046188892, 0.00036750200812819925, 0.00072117352443896, 0.0014620806939151648, 0.0030561054148990534, 0.006569395614711397, 0.014481668579804098, 0.03264357252438327, 0.07503398564611644, 0.1754234350179873, 0.41619002946225064, 1.0, 2.429198930067405, 5.957194930009574, 14.729717938140295, 36.682839142029124, 91.93064137981459, 231.66419812580858, 586.6524732998154, 1492.0713520552088, 3809.628824092619, 9760.822102741731, 25087.127432693556, 64661.594676473615, 167093.57754089366, 432804.8242106729, 1123457.2631260855, 2921975.1750704343, 7613495.862605814, 19870966.06662477, 51943025.780567355, 135975493.8298121, 356431275.6532716, 935478066.975727, 2458095080.8856187, 6466047824.080382, 17026489499.95321, 44877706329.57822, 118394402691.46051, 312611065838.275, 826094389009.7277, 2184682164699.42, 5781795104635.829, 15312174404532.225, 40578487395663.75, 107603355623895.92, 285505107231698.94, 757963115629094.1, 2013340427996716.8, 5350703325813394.0, 1.4227194995513956e+16, 3.784716100686882e+16, 1.0072664481404976e+17, 2.6819113047169728e+17, 7.143743683707241e+17, 1.903625864289785e+18, 5.074635932871548e+18, 1.3532854212823106e+19, 3.610182411463564e+19, 9.634262051141642e+19, 2.5718875079030725e+20], +[4.318848451625934e-10, 5.127979986372053e-10, 6.110299304682634e-10, 7.307708399702204e-10, 8.77347074927633e-10, 1.0575639412927898e-09, 1.2801629434812923e-09, 1.5564355052940358e-09, 1.901052161788271e-09, 2.333190608167504e-09, 2.878081416682131e-09, 3.569142121361369e-09, 4.450947069400001e-09, 5.583394897159272e-09, 7.047608018759573e-09, 8.954361334295896e-09, 1.145624219118281e-08, 1.476537453377975e-08, 1.917953561910987e-08, 2.5121084915508097e-08, 3.319570375939656e-08, 4.428218556365674e-08, 5.967159979570719e-08, 8.128617806949838e-08, 1.1202904038296385e-07, 1.563524111347041e-07, 2.2119746865943484e-07, 3.175787569516568e-07, 4.633097521805727e-07, 6.877927998173639e-07, 1.0406282494960876e-06, 1.6074544866528122e-06, 2.5398041719891712e-06, 4.112779121813785e-06, 6.839246072545214e-06, 1.1701522264986226e-05, 2.0632704943400574e-05, 3.753958358506962e-05, 7.052349792716612e-05, 0.0001367988606553607, 0.00027378676661085724, 0.0005645546247771537, 0.0011970316951384439, 0.0026036999027755094, 0.005795078203897137, 0.013164326687221672, 0.030446858975754318, 0.07153293228838208, 0.17037464507084202, 0.41064000047187094, 1.0, 2.4572046363289433, 6.085409967914577, 15.174820457634222, 38.07003564361962, 96.02028012869543, 243.3331767698126, 619.2622605133525, 1581.942049673177, 4054.9298199559444, 10425.797138255239, 26880.874672844202, 69482.68102595897, 180016.801767556, 467378.24354356306, 1215817.395296081, 3168446.902263639, 8270728.4454847425, 21622584.78338882, 56609675.73959312, 148405623.17149073, 389536566.66926265, 1023645255.5829477, 2692913961.112518, 7091505483.291095, 18692659344.727104, 49316968320.9121, 130224356379.18051, 344142535244.7215, 910156524797.9886, 2408841184767.095, 6379676250490.276, 16907239972320.688, 44834948039913.48, 118964596725889.73, 315837740948420.56, 838966157434218.2, 2229711257590543.2, 5928801096475081.0, 1.5772121695950724e+16, 4.197684748890713e+16, 1.1176812717283034e+17, 2.977193427122579e+17, 7.933593802046115e+17, 2.114949571036158e+18, 5.640153301315892e+18, 1.5046541085700256e+19, 4.01542648571735e+19, 1.0719402606116558e+20, 2.8625186703042318e+20], +[8.20581205808561e-11, 9.942002014384631e-11, 1.2093300707156175e-10, 1.4770899956766577e-10, 1.8119124373287985e-10, 2.2326349871132363e-10, 2.7639881732575156e-10, 3.438636580996271e-10, 4.299998936077745e-10, 5.406173356766806e-10, 6.83544335453022e-10, 8.694064113647404e-10, 1.1127367595021684e-09, 1.4335743435776638e-09, 1.8597853881852571e-09, 2.4304693338842883e-09, 3.2010083686501937e-09, 4.250636782166341e-09, 5.6939208772490946e-09, 7.69838644070973e-09, 1.0511943224669509e-08, 1.450614987490945e-08, 2.024548676353988e-08, 2.8600030968017688e-08, 4.0931821049707306e-08, 5.940863881251888e-08, 8.754238810345518e-08, 1.311314483685099e-07, 1.9994512050123706e-07, 3.1080134123135434e-07, 4.933193705399834e-07, 8.009258451076375e-07, 1.3324141570179088e-06, 2.2751827984674333e-06, 3.993984595584161e-06, 7.217225964840119e-06, 1.3436512437915826e-05, 2.578099343783395e-05, 5.096693441262168e-05, 0.00010372027442896298, 0.00021696749500595377, 0.00046565286628438943, 0.0010231132673426692, 0.0022960386290856337, 0.0052508495431154, 0.01221012140745879, 0.02881164770667283, 0.0688619024149741, 0.16643696871258926, 0.4062253133540716, 1.0, 2.4802333252359703, 6.1923191223263485, 15.550602140919242, 39.25427167512098, 99.54647005037423, 253.48472647796063, 647.8605043133583, 1661.3314256251547, 4273.051558042742, 11020.635223723904, 28494.18517294176, 73840.42072782725, 191751.35440715097, 498903.38470725215, 1300359.985544819, 3394862.773332514, 8876478.28981531, 23241952.853469227, 60936312.61179707, 159960796.81319228, 420388194.9634545, 1106001914.1005507, 2912736961.251985, 7678223255.926983, 20258651197.21033, 53496926558.66551, 141382477782.0323, 373931715212.29144, 989696166803.0175, 2621250575639.833, 6947004756135.255, 18422791937450.63, 48884303078394.69, 129785967209260.84, 344761978799074.2, 916292255610257.8, 2436475556608504.0, 6481782665159669.0, 1.7251337126061762e+16, 4.593449959517681e+16, 1.2235892635106424e+17, 3.260661473494836e+17, 8.69245600842674e+17, 2.3181404582174986e+18, 6.18431374852461e+18, 1.6504113144414788e+19, 4.405918565398757e+19, 1.1765741393565994e+20, 3.142938714676414e+20], +[1.7232205321939277e-11, 2.130429003071186e-11, 2.6454095296592376e-11, 3.2998819051485394e-11, 4.135887084966667e-11, 5.20948163592963e-11, 6.595880866144029e-11, 8.39667071587255e-11, 1.0749997325820556e-10, 1.384507806876801e-10, 1.794303869412253e-10, 2.3407095379675435e-10, 3.074667275043112e-10, 4.068251273404181e-10, 5.424373372346174e-10, 7.291406110117836e-10, 9.885461727878972e-10, 1.3524738574073351e-09, 1.8683136324180383e-09, 2.6075063279792187e-09, 3.6791473769539376e-09, 5.252134580607568e-09, 7.591798246323446e-09, 1.1121503337467114e-08, 1.6528095214889696e-08, 2.4945795364834644e-08, 3.828327858163042e-08, 5.981750915252285e-08, 9.529521926206713e-08, 1.5502154259428157e-07, 2.57910563881711e-07, 4.3952063215979226e-07, 7.683574367426978e-07, 1.3796897602020947e-06, 2.5472011824425914e-06, 4.8379265510368054e-06, 9.453737789109194e-06, 1.8997459409535033e-05, 3.921988180188179e-05, 8.306318392786654e-05, 0.00018014594350564237, 0.00039928357256399487, 0.0009025414642652067, 0.002076234995296676, 0.004851170391285823, 0.011491566257583977, 0.027552023147088954, 0.06676191916488557, 0.16328384874887694, 0.40263165791760724, 1.0, 2.4995092838422868, 6.2828691271725825, 15.872271737939489, 40.27768068981105, 102.62004700962498, 262.40211727585535, 673.1589811726504, 1732.0098618592529, 4468.371097788083, 11556.122099636952, 29953.59488124442, 77800.07435477959, 202457.79960142923, 527775.6745931435, 1378060.1708491042, 3603631.3340838295, 9436704.815851757, 24743842.832252417, 64959625.14155774, 170732309.26321393, 449213769.7598801, 1183116581.196633, 3118986873.5855494, 8229768257.338464, 21733424218.873726, 57440121928.339195, 151925574429.90912, 402122005904.6939, 1065075874778.6469, 2822828402059.62, 7486108759537.993, 19864742705466.117, 52741588043302.26, 140105754142383.45, 372375442054306.94, 990190626688940.1, 2634270312703733.0, 7011278038566261.0, 1.866901704175092e+16, 4.973082640098383e+16, 1.325265354970586e+17, 3.5330219854275437e+17, 9.422147815711642e+17, 2.513666508852023e+18, 6.70832337209078e+18, 1.790868154667178e+19, 4.782461874750428e+19, 1.2775353877871008e+20, 3.4136843593445533e+20], +[3.963407224001672e-12, 4.999986435656267e-12, 6.337960331133812e-12, 8.074179128670875e-12, 1.0339717709784014e-11, 1.3313119728949286e-11, 1.7239234061630297e-11, 2.245621232309169e-11, 2.9434516329938414e-11, 3.8833755120370146e-11, 5.158623502420042e-11, 6.902091886815635e-11, 9.304913171840282e-11, 1.264456211652522e-10, 1.7327851974296794e-10, 2.3957456502146394e-10, 3.3436062579746633e-10, 4.713150237270814e-10, 6.714206604657383e-10, 9.6728796409334e-10, 1.4103039569442954e-09, 2.082642153844571e-09, 3.1177760097355944e-09, 4.736136066647467e-09, 7.308243863361875e-09, 1.1468677413646053e-08, 1.832598180067324e-08, 2.985744517810291e-08, 4.96675969639533e-08, 8.44775140639114e-08, 1.4711341089908167e-07, 2.626344795161017e-07, 4.811647641931572e-07, 9.053140826272821e-07, 1.7499161930511453e-06, 3.474551910076818e-06, 7.082528878933193e-06, 1.480592269456698e-05, 3.169751655486384e-05, 6.937791418933092e-05, 0.00015495791580463113, 0.0003525053708321251, 0.0008151758272713737, 0.0019128656917192627, 0.0045471349113539745, 0.010933324294546574, 0.026554604742769976, 0.06507026138858288, 0.1607042516955195, 0.39965049258089663, 1.0, 2.5158842630927247, 6.360575087608891, 16.150849876784687, 41.171349362082914, 105.32415781378872, 270.30112941568626, 695.7075769202562, 1795.3629299498084, 4644.355282505996, 12040.895249445228, 31280.57169004219, 81414.93718654833, 212268.40866816536, 554323.5007195559, 1449733.8545776382, 3796781.9152422813, 9956461.840224748, 26140858.472688783, 68711093.26045997, 180798909.5342814, 476210599.72944516, 1255484411.216001, 3312908286.3316765, 8749273730.575315, 23124878554.515587, 61166504086.75942, 161904098554.69366, 428841184694.57086, 1136619719213.8635, 3014397702128.1895, 7999081303730.918, 21238421905873.99, 56420391061819.96, 149958643130244.75, 398766774799426.4, 1060888071802831.5, 2823676451111813.5, 7518776783244637.0, 2.002898484348186e+16, 5.337565162536039e+16, 1.4229621993608434e+17, 3.7949253676771635e+17, 1.0124345092225371e+18, 2.7019599196212224e+18, 7.213297741822991e+18, 1.926312816483818e+19, 5.145801496855911e+19, 1.3750167922827313e+20, 3.67525481029539e+20], +[9.908518059521994e-13, 1.275506743656117e-12, 1.6505105025282936e-12, 2.147388065105552e-12, 2.809705896536249e-12, 3.698088805645583e-12, 4.897509654494027e-12, 6.527968637086799e-12, 8.760272546126841e-12, 1.1839559011429253e-11, 1.6120697117451928e-11, 2.2122085679465437e-11, 3.06082566865378e-11, 4.271808643066754e-11, 6.016607214954338e-11, 8.55621194677814e-11, 1.2292607054743925e-10, 1.785266533488395e-10, 2.6226874855476144e-10, 3.9002158843639327e-10, 5.875876586310862e-10, 8.975809427930314e-10, 1.3915556114843305e-09, 2.191785434180985e-09, 3.5111224876604866e-09, 5.727394734890544e-09, 9.525120028765859e-09, 1.6171101294448854e-08, 2.8061733042424096e-08, 4.983289167923822e-08, 9.065766079790194e-08, 1.6909979149905554e-07, 3.2356582253364205e-07, 6.352314010584047e-07, 1.279203920571786e-06, 2.640541324645827e-06, 5.581250142705022e-06, 1.206307046883262e-05, 2.6618025209932952e-05, 5.9859333408051436e-05, 0.00013694748255268285, 0.0003181882871464522, 0.0007495518740138468, 0.0017874709395799045, 0.004309130697265867, 0.010488443238652766, 0.025746768293861858, 0.06367997091966221, 0.1585560528681675, 0.3971381426181787, 1.0, 2.529969567079006, 6.428006320760999, 16.394529360012417, 41.95875209706665, 107.7225032219697, 277.34930016051845, 715.9385384075042, 1852.4922767061248, 4803.789784818594, 12481.96318170186, 32492.693210404123, 84729.01482547459, 221293.25321226456, 578822.12807609, 1516069.5982453937, 3976037.9728637435, 10440066.848051874, 27443826.850445643, 72217899.80442585, 190228928.67219305, 501550675.44867235, 1323538883.4747674, 3495595195.607188, 9239504374.618832, 24440010391.435143, 64693800645.23045, 171363028725.51154, 454203517677.1894, 1204618352556.1113, 3196698699748.447, 8487809823192.14, 22548647764377.62, 59933026031854.586, 159376139484268.44, 424016670540715.8, 1128591484483459.8, 3005224973544188.5, 8005643083509579.0, 2.13347485834974e+16, 5.6878004753643624e+16, 1.5169124194938128e+17, 4.046971442716621e+17, 1.0800595811066307e+18, 2.8834205098687744e+18, 7.700270365461695e+18, 2.0570126641626714e+19, 5.4966296183629685e+19, 1.469197687451797e+20, 3.9281150292488795e+20], +[2.6752998755501757e-13, 3.514151231077486e-13, 4.642060784352552e-13, 6.168029537579997e-13, 8.245875969799137e-13, 1.1094266331061193e-12, 1.5026449837549206e-12, 2.0494784591917414e-12, 2.815801705020412e-12, 3.8983908672045215e-12, 5.440733843320465e-12, 7.657641045429668e-12, 1.0873974775929825e-11, 1.5586297698718442e-11, 2.256219007397263e-11, 3.3002288597354934e-11, 4.880820043019424e-11, 7.303172500746589e-11, 1.1063928560169896e-10, 1.6983311966069888e-10, 2.6437233708062905e-10, 4.1772099238213675e-10, 6.705952255319319e-10, 1.094952952682223e-09, 1.8204300339052967e-09, 3.085293667153813e-09, 5.336644884369226e-09, 9.431500596729555e-09, 1.704852791578874e-08, 3.154798005200166e-08, 5.980264234343779e-08, 1.1616891754371036e-07, 2.3125188209169704e-07, 4.7157248954426267e-07, 9.843767543130695e-07, 2.101175103729601e-06, 4.5800885156156874e-06, 1.0179769564230473e-05, 2.3033039463680338e-05, 5.296618548548891e-05, 0.0001235891962667673, 0.00029216772458965897, 0.0006987756028128776, 0.0016886358784775346, 0.004118351671348893, 0.010126339846831707, 0.025080061742305915, 0.06251806148309223, 0.15674019501299502, 0.3949924695309415, 1.0, 2.5422155286305297, 6.487086002645145, 16.60953403428862, 42.65796803426186, 109.86477087763863, 283.6788599974875, 734.1967671832691, 1904.2858861913307, 4948.941214135185, 12885.078527691556, 33604.5049831559, 87778.9986677205, 229624.75951960424, 601504.2219426623, 1577652.9968040453, 4142873.7120747343, 10891232.924974483, 28662106.715163648, 75503653.45490943, 199081980.04787812, 525384680.8079201, 1387661295.2666876, 3668013538.420137, 9702909987.31386, 25685040030.813393, 68037823791.48893, 180342605938.14352, 478311531403.31635, 1269333284549.554, 3370399146799.207, 8954001221540.205, 23799788051471.61, 63290681081206.97, 168386930620088.75, 448198758683761.44, 1193490023486900.8, 3179402294324019.0, 8473128870885695.0, 2.258953332940258e+16, 6.024620095313952e+16, 1.6073305844729498e+17, 4.2897143482998394e+17, 1.1452332203757364e+18, 3.0584187422868685e+18, 8.17020020760702e+18, 2.183216113302978e+19, 5.835590208250192e+19, 1.560245125681641e+20, 4.1726986610607876e+20], +[7.758369633502135e-14, 1.0399018933592186e-13, 1.4022891909679836e-13, 1.9029027177272404e-13, 2.5992434790249555e-13, 3.574819058883008e-13, 4.951897985495949e-13, 6.911031300311685e-13, 9.721218187140164e-13, 1.3786986564066784e-12, 1.9722644781752508e-12, 2.8470673771661457e-12, 4.1492678704402005e-12, 6.108110252419235e-12, 9.087455354569426e-12, 1.3672115492638409e-11, 2.081453101663409e-11, 3.2087650265428826e-11, 5.0127687838255406e-11, 7.942197019030342e-11, 1.2773473441128797e-10, 2.0873331290869953e-10, 3.4691446035921244e-10, 5.870209128167562e-10, 1.0123905269507649e-09, 1.7814153195075325e-09, 3.201414846434721e-09, 5.881251569825295e-09, 1.1052678456558036e-08, 2.1259571339692944e-08, 4.186257932272444e-08, 8.437940821260577e-08, 1.74017643557293e-07, 3.669123605392918e-07, 7.901064315068908e-07, 1.7354303571201826e-06, 3.882436932101839e-06, 8.83322171385512e-06, 2.040733275834215e-05, 4.7803184371002457e-05, 0.00011337443643120956, 0.0002718877608103557, 0.0006585047670250381, 0.001608990248197681, 0.003962365445482793, 0.009826339258464097, 0.024521032844197536, 0.061533133390270056, 0.15518561037877185, 0.3931389112127382, 1.0, 2.5529613475134725, 6.539283198069911, 16.800680629678713, 43.283159745948616, 111.79032585232012, 289.3956726135151, 750.7610961507496, 1951.4681827913457, 5081.674371653654, 13255.011537316983, 34628.157510418896, 90595.74957446745, 237341.16700731427, 622567.9215871901, 1634985.5631457965, 4298558.357642531, 11313172.794983048, 29803833.617856637, 78588967.83526467, 207410331.13738632, 547845251.3472272, 1448188522.1609595, 3831019724.500744, 10141669836.11164, 26865518397.81204, 71212726605.4451, 188878951948.99994, 501257508102.7965, 1331000506297.2441, 3536103126783.8735, 9399203304314.668, 24995812371954.117, 66503546400554.0, 177017199195788.5, 471380373075148.7, 1255757002572507.5, 3346654895619989.0, 8922385311850181.0, 2.3796309560809536e+16, 6.3487911382906664e+16, 1.694414953341468e+17, 4.523666868336309e+17, 1.2080881533459848e+18, 3.2272984067056906e+18, 8.623978384960713e+18, 2.3051543033878766e+19, 6.163283201658127e+19, 1.6483149250631637e+20, 4.409410661763429e+20], +[2.4050945804065375e-14, 3.2894855644496244e-14, 4.528225466479857e-14, 6.275530111553744e-14, 8.758320063617636e-14, 1.231326466128507e-13, 1.7444183344189143e-13, 2.4911849388441866e-13, 3.587590304358987e-13, 5.212147548690142e-13, 7.642508390556357e-13, 1.131522188425656e-12, 1.6924517217431669e-12, 2.5587671970301663e-12, 3.912554520428867e-12, 6.054514777283346e-12, 9.488196034621751e-12, 1.506928382966357e-11, 2.4274464591467118e-11, 3.9693772709609355e-11, 6.594793172715978e-11, 1.1142840235625546e-10, 1.9165917197864414e-10, 3.3591449822234685e-10, 6.004947033769951e-10, 1.0958669728983925e-09, 2.0431993443906214e-09, 3.894295999538186e-09, 7.590583660577395e-09, 1.5131923195332244e-08, 3.0846104917721556e-08, 6.426513065860852e-08, 1.3673382161638865e-07, 2.96791249526313e-07, 6.563971550130181e-07, 1.477178971172302e-06, 3.377791235819514e-06, 7.836910058196002e-06, 1.8423197189809677e-05, 4.3824817772884585e-05, 0.0001053604853365233, 0.0002557120365796645, 0.0006258941445498945, 0.0015435969115670078, 0.0038326676111091226, 0.009574016004073755, 0.024045901577420505, 0.060688002615764916, 0.15384003535173343, 0.3915217856400861, 1.0, 2.562467454656377, 6.58573998167073, 16.971757516462926, 43.84558736288302, 113.53078307579507, 294.58556227131834, 765.85956647207, 1994.6364957351163, 5203.53867964298, 13595.754099109088, 35573.88683400666, 93205.42904919293, 244509.19134806894, 642183.1157108996, 1688499.5363038578, 4444191.157775799, 11708681.726951757, 30876116.697324723, 81491929.65698949, 215260019.8111131, 569049642.3146574, 1505419410.070218, 3985375986.3954983, 10557729606.368475, 27986416182.535778, 74231218606.25392, 197004591634.01404, 523124754318.7328, 1389833577866.392, 3694358584949.304, 9824823180466.379, 26140337220820.688, 69580924771912.484, 185290894754142.03, 493623220805524.9, 1315551540011435.0, 3507393402603531.0, 9354472892146984.0, 2.4957818163573212e+16, 6.661022523846891e+16, 1.7783490175698966e+17, 4.7493042732491635e+17, 1.2687475669928397e+18, 3.3903790106507064e+18, 9.062434142758398e+18, 2.4230425938440405e+19, 6.480268249654457e+19, 1.733552610396547e+20, 4.6386296628450466e+20], +[7.93681205169283e-15, 1.1076838969049525e-14, 1.5565774551124353e-14, 2.203111498905121e-14, 3.141570949438529e-14, 4.514862659547713e-14, 6.541565836146339e-14, 9.559189904945805e-14, 1.4094082179715697e-13, 2.0975652848250267e-13, 3.1525171866431943e-13, 4.787160400852428e-13, 7.348667224171464e-13, 1.1410338053551215e-12, 1.7931478437335112e-12, 2.8539740109291704e-12, 4.6037339730040714e-12, 7.532312471759232e-12, 1.2509990844613982e-11, 2.1109007773730864e-11, 3.621989552360926e-11, 6.325419277793253e-11, 1.1253455633825632e-10, 2.0413248130354918e-10, 3.778408706445144e-10, 7.141061591620628e-10, 1.3787454992766335e-09, 2.7201162544847503e-09, 5.483727638467878e-09, 1.1293595619853687e-08, 2.3747584818608475e-08, 5.0943606034088195e-08, 1.1137852171570303e-07, 2.478803466814478e-07, 5.608576671779389e-07, 1.288404315737524e-06, 3.0009522518437937e-06, 7.077967749618973e-06, 1.6883604150162018e-05, 4.068467547395838e-05, 9.893491669716343e-05, 0.00024255409290380568, 0.0005990150030852269, 0.00148904237274373, 0.003723267444717602, 0.009359027716461348, 0.023637333590831096, 0.05995513836345536, 0.1526642049497461, 0.3900986837326221, 1.0, 2.57093716774403, 6.627357967394343, 17.125786736986075, 44.354321014827505, 115.11184088837905, 299.3188858588962, 779.6806096114874, 2034.2880758198871, 5315.8329545427405, 13910.674297901087, 36450.38232178673, 95630.37325849012, 251186.10083877313, 660496.3771063553, 1738569.619785078, 4580729.342817451, 12080204.231722848, 31885198.070005305, 84228480.34485596, 222671769.8689087, 589101929.5610093, 1559620077.04603, 4131763177.7209206, 10952832359.889061, 29052198882.20106, 77104748022.025, 204748896591.4239, 543988682662.5089, 1446026271313.1458, 3845663798116.337, 10232143128996.363, 27236664964709.066, 72531327507001.78, 193229970242931.25, 514983966282298.44, 1373020003255890.0, 3661996162386076.5, 9770370296630308.0, 2.6076592494793304e+16, 6.961970465940232e+16, 1.8593028693306285e+17, 4.967067734339797e+17, 1.3273259621023805e+18, 3.547957913890726e+18, 9.486340202066457e+18, 2.5370819052502987e+19, 6.787068087277928e+19, 1.816094259959748e+20, 4.860710102545881e+20], +[2.7778841505862453e-15, 3.956013730271771e-15, 5.675021452173015e-15, 8.20307328751995e-15, 1.1951624605781279e-14, 1.7557788099557737e-14, 2.6017560446078795e-14, 3.890359376479535e-14, 5.872510285205439e-14, 8.952955848793862e-14, 1.3792076826065307e-13, 2.148032976299672e-13, 3.384110077384593e-13, 5.396377921724357e-13, 8.715563361217644e-13, 1.4266717496265779e-12, 2.368686797941743e-12, 3.991937507522644e-12, 6.8344755276136104e-12, 1.1896942017622835e-11, 2.1073686254787167e-11, 3.80171365079624e-11, 6.990194770472644e-11, 1.31089876611951e-10, 2.508771607033805e-10, 4.901527507079692e-10, 9.778082371705102e-10, 1.9915741529537086e-09, 4.140166568666692e-09, 8.779449647552079e-09, 1.8975627296648677e-08, 4.176127199682322e-08, 9.347774913846289e-08, 2.1255393918458426e-07, 4.903527261266811e-07, 1.146252327774981e-06, 2.7117794159252823e-06, 6.485282384320275e-06, 1.56616130370493e-05, 3.8154732451361154e-05, 9.368622713568752e-05, 0.00023166945047774527, 0.0005765208207121891, 0.0014429010179730349, 0.0036298361984827927, 0.00917378251081558, 0.023282414321674, 0.05931374164094993, 0.1516280649899175, 0.3888367448206454, 1.0, 2.5785315625127665, 6.66485865094269, 17.265209419509283, 44.81675195513571, 116.55461374969144, 303.6538972653636, 792.3813720424279, 2070.840430797777, 5419.654669785695, 14202.635119584853, 37265.071762244916, 97889.77648408264, 257421.3534982753, 677634.8838230269, 1785522.3781348714, 4709010.663098899, 12429888.184259875, 32836582.98212173, 86812729.51688409, 229681747.3482714, 608094837.4351711, 1611028339.045333, 4270791508.6625953, 11328544623.92509, 30066890318.629368, 79843656716.12465, 212138463710.42807, 563917738518.1039, 1499754843173.8167, 3990472956988.073, 10622334334980.438, 28287817697328.234, 75362558026696.97, 200854588675857.75, 535514743015566.1, 1428297278264940.0, 3810812396818631.5, 1.017098225153843e+16, 2.7154977916948916e+16, 7.252243345270773e+16, 1.9374344184017955e+17, 5.1773673670271725e+17, 1.3839299152842304e+18, 3.700312238822732e+18, 9.896417554885026e+18, 2.6474599243187528e+19, 7.084171565019108e+19, 1.8960672690086035e+20, 5.07598415085897e+20], +[1.0278170643531663e-15, 1.4935968226671281e-15, 2.1872473020763595e-15, 3.2288677478758074e-15, 4.806627399794186e-15, 7.218190006130684e-15, 1.0939168835068026e-14, 1.6737501666425454e-14, 2.5866756336828982e-14, 4.0396778505033216e-14, 6.378639045670897e-14, 1.0188839394890237e-13, 1.6473744483144654e-13, 2.697762308480891e-13, 4.477639194726859e-13, 7.537646543452977e-13, 1.2879117192923153e-12, 2.2352925604692273e-12, 3.943859693693548e-12, 7.0792441632566296e-12, 1.2937734515477572e-11, 2.4090042894815762e-11, 4.57283711549857e-11, 8.853301608204149e-11, 1.7487343561512954e-10, 3.524359570638238e-10, 7.246271873734502e-10, 1.519377134686033e-09, 3.2469347976602865e-09, 7.066289604194117e-09, 1.564588814864436e-08, 3.520693672877843e-08, 8.042131854357666e-08, 1.8625643511409133e-07, 4.3685154381483165e-07, 1.0364316756368917e-06, 2.484616992228694e-06, 6.012433083136583e-06, 1.467265938740335e-05, 3.608009870278515e-05, 8.932965014042493e-05, 0.00022253371758163508, 0.0005574470708723787, 0.0014034074956775138, 0.0035491757339340064, 0.009012591393401412, 0.02297133637734668, 0.0587478185173636, 0.15070823121806937, 0.38771011751025636, 1.0, 2.585379920006156, 6.698826393888632, 17.392019606016696, 45.23896611078947, 117.8766178056751, 307.639263367729, 804.094006877367, 2104.646848814137, 5515.937918789917, 14474.086749160448, 38024.344920875345, 100000.23135800364, 263257.9009574566, 693709.5647373124, 1829643.8263492617, 4829771.710129126, 12759629.090137372, 33735146.88174236, 89257214.3029794, 236322189.45690498, 626111266.447086, 1659857426.4134448, 4403009601.971595, 11686278494.145418, 31034126673.879814, 82457312507.1235, 219197439721.86502, 582974197385.9774, 1551179996498.247, 4129201001797.44, 10996468826127.072, 29296566749344.39, 78081784925622.83, 208183304301604.3, 555263603486014.1, 1481507888159159.0, 3954164987991990.0, 1.0557146469819566e+16, 2.8195149137957164e+16, 7.532406044024442e+16, 2.0128904771372426e+17, 5.3805849497926195e+17, 1.4386587611508058e+18, 3.8477005840324244e+18, 1.029333977329114e+19, 2.754352188722791e+19, 7.3720363828150845e+19, 1.9735910395238964e+20, 5.2847634514429084e+20], +[4.008485798764908e-16, 5.94390363640448e-16, 8.885686374956124e-16, 1.3396350115026486e-15, 2.037587585846699e-15, 3.1278699317427804e-15, 4.848006249159988e-15, 7.590166464878443e-15, 1.2009298499994042e-14, 1.9212358649889163e-14, 3.109379427494617e-14, 5.0938422862364675e-14, 8.452021166628311e-14, 1.421343934392086e-13, 2.424131488944e-13, 4.1960330805860056e-13, 7.376722738760318e-13, 1.3181017166460732e-12, 2.3955722749630266e-12, 4.431418649914601e-12, 8.34870288576296e-12, 1.6027437532293873e-11, 3.1365005618345997e-11, 6.258307413619619e-11, 1.2732325994029966e-10, 2.640674502951106e-10, 5.580866215686607e-10, 1.201164678182425e-09, 2.6307166260582357e-09, 5.857459735588431e-09, 1.3245116163050657e-08, 3.038319661469488e-08, 7.062395036543603e-08, 1.6615956644480433e-07, 3.9526057483522904e-07, 9.496881616755856e-07, 2.302515808995711e-06, 5.628155514233293e-06, 1.3858726430372104e-05, 3.4352614481320006e-05, 8.566295473698316e-05, 0.00021476847923907033, 0.0005410870797390504, 0.0013692496910569214, 0.003478876561119855, 0.008871113137832187, 0.022696525256985935, 0.05824487597174774, 0.14988624281920254, 0.38669818860687416, 1.0, 2.591587214831344, 6.729739624159675, 17.50786256161132, 45.6260216214795, 119.09251105791587, 311.31597290626996, 814.9304936066126, 2136.0083994297547, 5605.4830190351795, 14727.139139010224, 38733.73068084439, 101976.16009912545, 268733.2365771958, 708817.6449168253, 1871185.6099597036, 4943662.925149097, 13071106.555119975, 34585224.1102205, 91573115.25652912, 242621930.80406317, 643225577.4621196, 1706299122.022903, 4528912172.322065, 12027310454.00467, 31957202677.534725, 84954222691.28644, 225947800635.5076, 601214853737.7573, 1600448581468.724, 4262227826822.5645, 11355529882672.48, 30265458498439.31, 80695606053809.64, 215233221923649.6, 574274915775275.0, 1532766981934519.8, 4092352946048841.0, 1.0929639818479912e+16, 2.9199125643018292e+16, 7.80298381184281e+16, 2.0858077301020605e+17, 5.5770763589414675e+17, 1.4916052043728266e+18, 3.990364564576687e+18, 1.067773688981738e+19, 2.857923065688116e+19, 7.651091560471681e+19, 2.04877760448308e+20, 5.4873407006817904e+20], +[1.6434783867061746e-16, 2.4867330013701173e-16, 3.794922469332575e-16, 5.843071982734661e-16, 9.080506441782934e-16, 1.4249054840981775e-15, 2.2586939312652344e-15, 3.618466895613512e-15, 5.861400779267525e-15, 9.605397883849914e-15, 1.5933392284354073e-14, 2.6769254617511e-14, 4.5579495182537733e-14, 7.870285920920266e-14, 1.3790873695925556e-13, 2.4539835216694315e-13, 4.437396026944718e-13, 8.159266068263601e-13, 1.5265505075933006e-12, 2.9076895005165475e-12, 5.641003214984282e-12, 1.1149929477065577e-11, 2.2457431962745194e-11, 4.6089728853813725e-11, 9.636117321926327e-11, 2.051471952727202e-10, 4.4445304835751367e-10, 9.791387207930793e-10, 2.1914218747187516e-09, 4.977794081063973e-09, 1.1463561604127401e-08, 2.673674755956479e-08, 6.308757765137943e-08, 1.5044611057456055e-07, 3.6224191889858646e-07, 8.798406496041383e-07, 2.153945381627781e-06, 5.310802707590069e-06, 1.317896154828332e-05, 3.28948846060931e-05, 8.253920119772155e-05, 0.00020809476006933454, 0.0005269126578311301, 0.0013394340532570442, 0.0034170916468827806, 0.00874598116886155, 0.022452042637290233, 0.05779501862653927, 0.14914733572154595, 0.3857843224263527, 1.0, 2.5972395793678786, 6.757993866402488, 17.614108137438386, 45.982158109781786, 120.21465698310898, 314.7188036704227, 824.9863755496918, 2165.1833182556825, 5688.979847230466, 14963.619644382812, 39398.03874584048, 103830.16183812573, 273880.24510387355, 723044.7217559288, 1910370.075433623, 5051260.981553431, 13365814.53343142, 35390681.83643085, 93770437.20981537, 248606846.2208703, 659504677.0920215, 1750526424.7376418, 4648946570.239138, 12352797473.11231, 32839111261.07794, 87342131850.7624, 232409593307.73947, 618691618441.1149, 1647695074873.9316, 4389901949046.297, 11700421146541.496, 31196837016467.137, 83210104894187.33, 222020137422882.6, 592589714258062.6, 1582181210727884.8, 4225653601309521.5, 1.1289183808999836e+16, 3.016878546179479e+16, 8.064465721827835e+16, 2.1563136025992445e+17, 5.767173753652444e+17, 1.5428558699781084e+18, 4.1285301993305395e+18, 1.1050198898604182e+19, 2.9583266364292137e+19, 7.921739674027539e+19, 2.121732193877048e+20, 5.683991081582015e+20], +[7.066948769212205e-17, 1.0911152409676687e-16, 1.6998026391744286e-16, 2.672876908921384e-16, 4.2441005307739394e-16, 6.807744992581333e-16, 1.103641967699334e-15, 1.8091276912548764e-15, 3.0001846495567514e-15, 5.036157378919572e-15, 8.561914862428096e-15, 1.475104326812222e-14, 2.5770637707217657e-14, 4.568315858806277e-14, 8.22236352927492e-14, 1.5035738773014176e-13, 2.79516247842735e-13, 5.285532119590006e-13, 1.0171423860609511e-12, 1.992748118799507e-12, 3.975656006128714e-12, 8.077744917760329e-12, 1.671317239175358e-11, 3.5204418548200176e-11, 7.545845423503072e-11, 1.6448295621067032e-10, 3.643369421944391e-10, 8.193555815754478e-10, 1.8690097230356804e-09, 4.3200032296602295e-09, 1.0107588580315507e-08, 2.3914734164399563e-08, 5.716324194407424e-08, 1.379120451655436e-07, 3.3554343749097113e-07, 8.226449383799812e-07, 2.0308541603050416e-06, 5.045013535622601e-06, 1.2603925640961237e-05, 3.165031382188364e-05, 7.984943358575888e-05, 0.00020230295040300913, 0.0005145219554331616, 0.0013131956979434785, 0.003362383101608846, 0.008634546930037157, 0.022233170148488784, 0.05739031018717317, 0.14847956421303252, 0.3849549469805725, 1.0, 2.602408355460085, 6.783918999677743, 17.711906297869863, 46.310956588073196, 121.2535591137108, 317.8774635299528, 834.3436902704979, 2192.3944223624976, 5767.026414157304, 15185.119223411395, 40021.47398556207, 105573.2946657401, 278727.8968045008, 736466.4708421594, 1947394.459088499, 5153079.067970031, 13645086.572534904, 36154982.05385237, 95858161.61565767, 254300225.37808898, 675008939.7100312, 1792695820.9077237, 4763518384.096085, 12663790838.321665, 33682577745.62482, 89628106458.79391, 238601145067.49155, 635452038777.9553, 1693042871683.013, 4512543719942.686, 12031974617812.176, 32092864002299.734, 85630900308247.52, 228558662051420.72, 610246010519726.1, 1629849506453532.8, 4354324556408147.0, 1.1636449496959192e+16, 3.1105877479160964e+16, 8.317307767007363e+16, 2.224527040318977e+17, 5.951187541032861e+17, 1.5924917991256192e+18, 4.2624091630254213e+18, 1.1411278920354214e+19, 3.0557074969505337e+19, 8.184358883814307e+19, 2.192553748786303e+20, 5.874973568008839e+20], +[3.1801182667711764e-17, 5.0101989707847184e-17, 7.967758066563755e-17, 1.2795501872609507e-16, 2.075867229424091e-16, 3.403729370361639e-16, 5.6432257996547185e-16, 9.465259071720961e-16, 1.6069337664269582e-15, 2.762887223815374e-15, 4.813687410847202e-15, 8.50355483304762e-15, 1.5240343250899645e-14, 2.7728408986908643e-14, 5.1244801881078024e-14, 9.625299174908168e-14, 1.838397834338777e-13, 3.572006766912935e-13, 7.062737487973995e-13, 1.4213637201155862e-12, 2.9115598323302343e-12, 6.069862515276183e-12, 1.2874606377637146e-11, 2.7770741443050912e-11, 6.087925835218332e-11, 1.3553551111113567e-10, 3.061739969546701e-10, 7.011555507962892e-10, 1.6262007072430787e-09, 3.816157700216827e-09, 9.052239327611568e-09, 2.1685189413389562e-08, 5.241657774920201e-08, 1.2773735467635696e-07, 3.1360536952272007e-07, 7.751139268172333e-07, 1.9274873162166544e-06, 4.819645607264216e-06, 1.2111962414311925e-05, 3.057670847380496e-05, 7.751138360236657e-05, 0.00019723286579082395, 0.0005036043586799524, 0.0012899369969645218, 0.003313615968534329, 0.008534699689282606, 0.02203611333611965, 0.05702431364481925, 0.14787316098472306, 0.38419888070542796, 1.0, 2.6071531424766095, 6.8077923665952005, 17.802229689883543, 46.61546312852461, 122.21819994989609, 320.8174873604337, 843.0732905077308, 2217.835025660336, 5840.143783545199, 15393.029785639474, 40607.72944698221, 107215.30641236965, 283301.8186230341, 749150.0571256352, 1982434.3700754174, 5249575.48013134, 13910117.004318168, 36881233.854347676, 97844375.54312715, 259723091.28566393, 689792994.3998395, 1832949230.3425922, 4872996256.453844, 12961248085.801695, 34490089432.584946, 91818608339.4619, 244539246278.58923, 651539752644.7927, 1736605416305.971, 4630448146186.333, 12350957695719.133, 32955536376830.363, 87963190552955.83, 234862332667963.78, 627279069724524.4, 1675863775413539.0, 4478605428888525.5, 1.1972061864565202e+16, 3.201203246817276e+16, 8.561935640640733e+16, 2.290559210660619e+17, 6.129408146877937e+17, 1.6405888966240435e+18, 4.392199918295738e+18, 1.176149606856544e+19, 3.1502014843949584e+19, 8.439304776743474e+19, 2.261335389052185e+20, 6.060532112881603e+20], +[1.4946465202581674e-17, 2.4028253823532652e-17, 3.9008117797636207e-17, 6.39755723642332e-17, 1.0604435912258068e-16, 1.7773536285518716e-16, 3.0135800143436187e-16, 5.171718200140912e-16, 8.987960031836293e-16, 1.5827102933710221e-15, 2.8255454457477474e-15, 5.1169783412449535e-15, 9.40553605763185e-15, 1.7557090405413602e-14, 3.3300054598729477e-14, 6.42036651919164e-14, 1.258811194869085e-13, 2.510524872071354e-13, 5.093695376979742e-13, 1.0513892032976074e-12, 2.207420488736102e-12, 4.712557063367398e-12, 1.0225157486541553e-11, 2.253494432307511e-11, 5.0407653042954616e-11, 1.1434871321140136e-10, 2.6283051293871495e-10, 6.115484230549065e-10, 1.4391121182713806e-09, 3.4219375690239265e-09, 8.214525703578288e-09, 1.9891380785922575e-08, 4.854916961697225e-08, 1.1934955711646322e-07, 2.9532184861758327e-07, 7.350981832274717e-07, 1.8396447880112522e-06, 4.626456208204177e-06, 1.1686843869426444e-05, 2.9642061869422137e-05, 7.546191652372204e-05, 0.00019276021667193256, 0.0004939163341587318, 0.0012691847483050185, 0.0032698831848162174, 0.008444737643926552, 0.021857787378389625, 0.056691754669483195, 0.14732006354029667, 0.3835068290486628, 1.0, 2.6115241205872364, 6.829848854941532, 17.885906660882313, 46.89828556464031, 123.11630801759844, 323.56094901818074, 851.2366994481574, 2241.673699057839, 5908.788153856594, 15588.574621543019, 41160.06257300607, 108764.82480465878, 287624.7672744869, 761155.3096728448, 2015646.7037548192, 5341160.840553032, 14161978.829855444, 37572237.73056093, 99736381.44060068, 264894472.34584844, 703906399.6171104, 1871415680.5018857, 4977716041.747126, 13246043334.790907, 35263921310.51287, 93919558676.93678, 250239309873.90448, 666994886560.6084, 1778487196541.1956, 4743887374348.201, 12658079396255.318, 33786701857421.336, 90211792332562.6, 240943709755824.72, 643721656881122.9, 1720309517638581.0, 4598719410323811.0, 1.2296603749339236e+16, 3.288877299902034e+16, 8.798747237798494e+16, 2.3545141348545942e+17, 6.302107614421101e+17, 1.6872183356447588e+18, 4.518088741079407e+18, 1.2101338049769153e+19, 3.2419363369755656e+19, 8.6869120425786e+19, 2.3281648394076665e+20, 6.240896732318996e+20], +[7.32367344052247e-18, 1.2013864767483158e-17, 1.9909666031709582e-17, 3.334694914854916e-17, 5.647453909517319e-17, 9.675144606444112e-17, 1.6775828767597246e-16, 2.9454715161170085e-16, 5.239622797250333e-16, 9.448319896085692e-16, 1.7280444685391294e-15, 3.207257381237499e-15, 6.043856470471805e-15, 1.156913833146827e-14, 2.250468074263265e-14, 4.450120746113119e-14, 8.947343149577879e-14, 1.829285826066601e-13, 3.8029005055148624e-13, 8.037299544908464e-13, 1.7263061448889553e-12, 3.766402317807855e-12, 8.34200279136659e-12, 1.8742877033708616e-11, 4.268518532172449e-11, 9.845155395950859e-11, 2.2976831681875574e-10, 5.421206893512281e-10, 1.2920022759145437e-09, 3.1076284472715248e-09, 7.53788079939617e-09, 1.8424753501865266e-08, 4.5351119548353376e-08, 1.1233996519123429e-07, 2.7989209440680883e-07, 7.01019909118555e-07, 1.7642031205884476e-06, 4.459238971535885e-06, 1.1316206012033895e-05, 2.882171331271125e-05, 7.365186756503112e-05, 0.00018878723425985543, 0.00048526447540967344, 0.0012505597396267577, 0.0032304516166119235, 0.008363274159721311, 0.0216956594991396, 0.056388271463223893, 0.14681355872012858, 0.38287100299190163, 1.0, 2.615563842859314, 6.850288738866701, 17.963647142160408, 47.161669869586575, 123.954570316393, 326.1270316044305, 858.887606431054, 2264.0581319506614, 5973.360717345593, 15772.833374496058, 41681.35808942707, 110229.51517095466, 291717.023537971, 772535.7053608809, 2047172.0922382425, 5428204.197430849, 14401638.890066849, 38230523.3036586, 101540790.96333534, 269831635.75332874, 717394224.0104551, 1908212752.6330814, 5077984409.143198, 13518976269.949493, 36006158466.33554, 95936393977.75378, 255715511216.0521, 681854405514.5084, 1818784619474.8186, 4853112885860.613, 12953995857751.826, 34588072780276.695, 92381175533550.31, 246814464791321.72, 659604256802615.5, 1763266381171584.5, 4714874664344070.0, 1.2610619373433572e+16, 3.3737522356714064e+16, 9.028114910615896e+16, 2.4164892588030707e+17, 6.469541050457281e+17, 1.7324469243795907e+18, 4.640250651030854e+18, 1.2431263526423124e+19, 3.331032294540405e+19, 8.927496001561507e+19, 2.3931248183521696e+20, 6.416284496316001e+20], +[3.7349750884242135e-18, 6.251840453313855e-18, 1.0576252960926759e-17, 1.809039183720153e-17, 3.130070035183258e-17, 5.480959849789353e-17, 9.717845788672291e-17, 1.7454787865005848e-16, 3.177708774098667e-16, 5.866673716875725e-16, 1.0989200228559466e-15, 2.0895021411575466e-15, 4.0346805561857576e-15, 7.914516224537192e-15, 1.577651599222254e-14, 3.196293550058487e-14, 6.581964229817759e-14, 1.3775385635665745e-13, 2.929518771112812e-13, 6.328155540921528e-13, 1.3878204279204705e-12, 3.088169369078936e-12, 6.967476818112519e-12, 1.5926495538437894e-11, 3.68534790572446e-11, 8.625488229643546e-11, 2.0401803208696257e-10, 4.87273837929232e-10, 1.1742233817729593e-09, 2.8528093482975486e-09, 6.982827150620954e-09, 1.7208416060019154e-08, 4.2671614721824394e-08, 1.0641088200507393e-07, 2.6672509075203236e-07, 6.716999006484396e-07, 1.6987998027046023e-06, 4.3132456843190915e-06, 1.0990486524749582e-05, 2.8096392665715684e-05, 7.204244139649298e-05, 0.00018523605215733165, 0.0004774933889290776, 0.0012337547484060222, 0.003194722619768651, 0.008289168519242803, 0.021547631391334556, 0.05611022631055956, 0.14634801241482753, 0.38228482642171246, 1.0, 2.6193086327931363, 6.869283840815347, 18.036063138731713, 47.40756104268009, 124.73880280953637, 328.53248802529475, 866.0730822762595, 2285.1182881027758, 6034.215762317741, 15946.762671792178, 42174.18022337763, 111616.21202710466, 295596.7227699394, 783339.197107096, 2077136.9763975758, 5511038.202404006, 14629970.795262672, 38858381.59770188, 103263605.52611706, 274550288.5619885, 730297548.4312081, 1943447835.6460004, 5174081975.921542, 13780779976.137352, 36718715688.47134, 97874115153.94873, 260980911086.5384, 696152421386.1661, 1857586785536.731, 4958357441314.271, 13239315228746.38, 35361238398790.69, 94475494195009.9, 252485458302099.88, 674955271015022.5, 1804808659210057.5, 4827265582856562.0, 1.2914617520627492e+16, 3.45596125824521e+16, 9.25038750534239e+16, 2.4765759695289197e+17, 6.631947935739693e+17, 1.7763374387946227e+18, 4.758850257156263e+18, 1.2751704267601783e+19, 3.4176026459691766e+19, 9.161353998694654e+19, 2.4562933935522765e+20, 6.586900435310049e+20], +], dtype='float64') + +# TAYLOR_THRESHOLD = -25.0 + +@cuda.jit(fastmath=True, cache=True, device=True) +def taylor_cuda(a,z): + table = cuda.const.array_like(TABLE) + z0 = int(round(z)) + zi = z0 + 50 + ai = a + + return (a + 0.5)*(z - z0)**15*table[ai + 15, zi]/(1307674368000.0*a + 20268952704000.0) + (a + 0.5)*(z - z0)**14*table[ai + 14, zi]/(87178291200.0*a + 1264085222400.0) + (a + 0.5)*(z - z0)**13*table[ai + 13, zi]/(6227020800.0*a + 84064780800.0) + (a + 0.5)*(z - z0)**12*table[ai + 12, zi]/(479001600.0*a + 5987520000.0) + (a + 0.5)*(z - z0)**11*table[ai + 11, zi]/(39916800.0*a + 459043200.0) + (a + 0.5)*(z - z0)**10*table[ai + 10, zi]/(3628800.0*a + 38102400.0) + (a + 0.5)*(z - z0)**9*table[ai + 9, zi]/(362880.0*a + 3447360.0) + (a + 0.5)*(z - z0)**8*table[ai + 8, zi]/(40320.0*a + 342720.0) + (a + 0.5)*(z - z0)**7*table[ai + 7, zi]/(5040.0*a + 37800.0) + (a + 0.5)*(z - z0)**6*table[ai + 6, zi]/(720.0*a + 4680.0) + (a + 0.5)*(z - z0)**5*table[ai + 5, zi]/(120.0*a + 660.0) + (a + 0.5)*(z - z0)**4*table[ai + 4, zi]/(24.0*a + 108.0) + (a + 0.5)*(z - z0)**3*table[ai + 3, zi]/(6.0*a + 21.0) + (a + 0.5)*(z - z0)**2*table[ai + 2, zi]/(2.0*a + 5.0) + (a + 0.5)*(z - z0)*table[ai + 1, zi]/(a + 1.5) + table[ai, zi] + + + +@cuda.jit(fastmath=True, cache=True, device=True) +def hyp0minus(x): + z = math.sqrt(-x) + return 0.5 * math.erf(z) * math.sqrt(math.pi) / z + + +@cuda.jit(fastmath=True, cache=True, device=True) +def hyp1f1_(m, z): + TAYLOR_THRESHOLD = -25.0 + if z < TAYLOR_THRESHOLD: + if m==0: + return hyp0minus(z) + else: + result = hyp0minus(z) + for k in range(1, m+1): + result = ((2*k+1) * result - math.exp(z) )/ (-2*z) + return result + + else: + return taylor_cuda(m, z) + +@cuda.jit(fastmath=True, cache=True, device=True) +def hyp1f1_new(m, z, hyp0minus_): + TAYLOR_THRESHOLD = -25.0 + if z < TAYLOR_THRESHOLD: + if m==0: + # return hyp0minus(z) + return hyp0minus_ + else: + # result = hyp0minus(z) + # temp1 = (-2*z) + # result = hyp0minus_ / temp1 + # temp2 = math.exp(z) / temp1 + result = hyp0minus_ + for k in range(1, m+1): + # result = (2*k+1) * result/ temp1 - temp2 + result = ((2*k+1) * result - math.exp(z) )/ (-2*z) + return result + + else: + return taylor_cuda(m, z) + + + +@cuda.jit(fastmath=True, cache=True, device=True) +def Fboys(m, T, hyp0minus_): + # return hyp1f1_(m, -T) / (2*m+1) + return hyp1f1_new(m, -T, hyp0minus_) / (2*m+1) + +@cuda.jit(fastmath=True, cache=True, max_registers=50)#(device=True) +def nuc_mat_symm_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, Z, coordsMol, natoms, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, sqrt_ints4c2e_diag, isSchwarz, out): + # This function calculates the nuclear potential matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the nuclear matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + PI = 3.141592653589793 + PIx2 = 6.283185307179586 #2*PI + TAYLOR_THRESHOLD = -25.0 + i, j = cuda.grid(2) + if i>=start_row and i=start_col and j=start_row and i=start_col and ji: + out[i-start_row, j-start_col] = out[j-start_col, i-start_row]","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/eval_xc_1.py",".py","16937","351","import numpy as np +import numexpr +import pylibxc +from timeit import default_timer as timer +from pyfock import Integrals +from opt_einsum import contract + +def eval_xc_1(basis, dmat, weights, coords, funcid=[1,7], spin=0, blocksize=50000, debug=False, list_nonzero_indices=None, count_nonzero_indices=None, list_ao_values=None, list_ao_grad_values=None): + """""" + Evaluate exchange-correlation (XC) energy and potential matrix for DFT + using algorithm 1, which is a baseline method for grid-based DFT. + + In algorithm 1, the XC term is evaluated by looping over blocks of grid + points, and within each block, the operations are parallelized. This + approach is functional but generally slower than algorithm 2 for CPU-based + execution. + + This function evaluates the XC energy and potential matrix elements for a given + density matrix using numerical integration over a 3D real-space grid. It supports + LDA and GGA functionals via LibXC and optional use of precomputed AO values and + gradients for performance gains. Sparse AO matrix techniques are also supported. + + Parameters + ---------- + basis : Basis + A basis object containing basis function data: exponents, coefficients, + angular momentum, normalization, and other AO metadata. + + dmat : np.ndarray + The one-electron density matrix in the AO basis. + + weights : np.ndarray + Integration weights associated with each grid point. + + coords : np.ndarray + Grid point coordinates as an (N, 3) array. + + funcid : list of int, optional + LibXC functional IDs. Default is [1, 7] for Slater (X) and VWN (C) (LDA). + + spin : int, optional + Spin multiplicity: 0 for unpolarized. Spin-polarized (1) not currently supported. + + blocksize : int, optional + Number of grid points to process per block. Default is 50000. + + debug : bool, optional + If True, enables verbose timing and diagnostic output. + + list_nonzero_indices : list of np.ndarray, optional + List of AO indices with non-negligible contributions in each grid block + for sparse matrix optimizations. + + count_nonzero_indices : list of int, optional + Number of significant AO indices per block; matches entries in `list_nonzero_indices`. + + list_ao_values : list of np.ndarray, optional + Precomputed AO values at grid points for each block. + + list_ao_grad_values : list of tuple of np.ndarray, optional + Precomputed AO gradient values (x, y, z) at grid points for each block. + + Returns + ------- + efunc : float + Total exchange-correlation energy. + + v : np.ndarray + Exchange-correlation potential matrix in the AO basis. + + Notes + ----- + - This algorithm prioritizes code clarity and correctness, not maximum speed. + - Only LDA and GGA functionals are currently supported. meta-GGA and hybrid functionals + are planned for future implementation. + - Uses LibXC for exchange-correlation energy and potential evaluation. + - AO values and gradients can be reused via precomputation to improve speed. + - The number of electrons (via integrated density) is printed for validation. + + References + ---------- + - LibXC Functional Codes: https://libxc.gitlab.io/functionals/ + - Functional energy and potential formulation: https://pubs.acs.org/doi/full/10.1021/ct200412r + - LibXC Python interface: https://www.tddft.org/programs/libxc/manual/ + """""" + # Evaluate the XC term + # This is a slightly slower algorithm. + # Here the parallelization is done when evaluating bfs or the density + + # In order to evaluate a density functional we will use the + # libxc library with Python bindings. + # However, some sort of simple functionals like LDA, GGA, etc would + # need to be implemented in CrysX also, so that the it doesn't depend + # on external libraries so heavily that it becomes unusable without those. + + #Useful links: + # LibXC manual: https://www.tddft.org/programs/libxc/manual/ + # LibXC gitlab: https://gitlab.com/libxc/libxc/-/tree/master + # LibXC python interface code: https://gitlab.com/libxc/libxc/-/blob/master/pylibxc/functional.py + # LibXC python version installation and example: https://www.tddft.org/programs/libxc/installation/ + # Formulae for XC energy and potential calculation: https://pubs.acs.org/doi/full/10.1021/ct200412r + # LibXC code list: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/libxc.py + # PySCF nr_rks code: https://github.com/pyscf/pyscf/blob/master/pyscf/dft/numint.py + # https://www.osti.gov/pages/servlets/purl/1650078 + + + + #OUTPUT + #Functional energy + efunc = 0.0 + #Functional potential V_{\mu \nu} = \mu|\partial{f}/\partial{\rho}|\nu + v = np.zeros((basis.bfs_nao, basis.bfs_nao)) + #TODO mGGA, Hybrid + + #Calculate number of blocks/batches + ngrids = coords.shape[0] + nblocks = ngrids//blocksize + nelec = 0.0 + + # If a list of significant basis functions for each block of grid points is provided + if list_nonzero_indices is not None: + dmat_orig = dmat + + ### Calculate stuff necessary for bf/ao evaluation on grid points + ### Doesn't make any difference for 510 bfs but might be significant for >1000 bfs + # This will help to make the call to eval_bfs faster by skipping the mediator eval_bfs function + # that prepares the following stuff at every iteration + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + bfs_radius_cutoff = np.zeros([basis.bfs_nao]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + bfs_radius_cutoff[i] = basis.bfs_radius_cutoff[i] + # Now bf/ao values can be evaluated by calling the following + # bf_values = Integrals.bf_val_helpers.eval_bfs(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, bfs_radius_cutoff, coord) + + # For debugging and benchmarking purposes + durationLibxc = 0.0 + durationE = 0.0 + durationF = 0.0 + durationZ = 0.0 + durationV = 0.0 + durationRho = 0.0 + durationAO = 0.0 + + xc_family_dict = {1:'LDA',2:'GGA',4:'MGGA'} + + # Create a LibXC object + funcx = pylibxc.LibXCFunctional(funcid[0], ""unpolarized"") + funcc = pylibxc.LibXCFunctional(funcid[1], ""unpolarized"") + x_family_code = funcx.get_family() + c_family_code = funcc.get_family() + + # Loop over blocks/batches of grid points + for iblock in range(nblocks+1): + offset = iblock*blocksize + + # Get weights and coordinates of grid points for this block/batch + weights_block = weights[offset : min(offset+blocksize,ngrids)] + coords_block = coords[offset : min(offset+blocksize,ngrids)] + + # Get the list of basis functions with significant contributions to this block + if list_nonzero_indices is not None: + non_zero_indices = list_nonzero_indices[iblock][0:count_nonzero_indices[iblock]] + # Get the subset of density matrix corresponding to the siginificant basis functions + dmat = dmat_orig[np.ix_(non_zero_indices, non_zero_indices)] + + if debug: + startAO = timer() + if xc_family_dict[x_family_code]=='LDA' and xc_family_dict[c_family_code]=='LDA': + if list_ao_values is not None: # If ao_values are calculated once and saved, then they can be provided to avoid recalculation + ao_value_block = list_ao_values[iblock] + else: + # ao_value_block = Integrals.eval_bfs(basis, coords_block) + if list_nonzero_indices is not None: + # ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + ao_value_block = Integrals.bf_val_helpers.eval_bfs_sparse_vectorized_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + ao_value_block = Integrals.bf_val_helpers.eval_bfs_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block) + # If either x or c functional is of GGA/MGGA type we need ao_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + # ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad(basis, coords_block, deriv=1, parallel=True, non_zero_indices=non_zero_indices) + if list_nonzero_indices is not None: + # Calculating ao values and gradients together, didn't really do much improvement in computational speed + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_sparse_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block, non_zero_indices) + else: + ao_value_block, ao_values_grad_block = Integrals.bf_val_helpers.eval_bfs_and_grad_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_nprim[0], bfs_lmn[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, coords_block) + if debug: + durationAO = durationAO + timer() - startAO + + + if debug: + startRho = timer() + + if list_nonzero_indices is not None: + rho_block = contract('ij,mi,mj->m', dmat, ao_value_block, ao_value_block) # Original (pretty fast) + else: + rho_block = Integrals.bf_val_helpers.bf_val_helpers.eval_rho(ao_value_block, dmat) # This is by-far the fastest now <----- + + # If either x or c functional is of GGA/MGGA type we need rho_grad_values too + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + rho_grad_block_x = contract('ij,mi,mj->m',dmat,ao_values_grad_block[0],ao_value_block)+\ + contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[0]) + rho_grad_block_y = contract('ij,mi,mj->m',dmat,ao_values_grad_block[1],ao_value_block)+\ + contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[1]) + rho_grad_block_z = contract('ij,mi,mj->m',dmat,ao_values_grad_block[2],ao_value_block)+\ + contract('ij,mi,mj->m',dmat,ao_value_block,ao_values_grad_block[2]) + sigma_block = np.zeros((3,weights_block.shape[0])) + sigma_block[1] = rho_grad_block_x**2 + rho_grad_block_y**2 + rho_grad_block_z**2 + + if debug: + durationRho = durationRho + timer() - startRho + + #LibXC stuff + # Exchange + if debug: + startLibxc = timer() + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[x_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block[1] + # Calculate the necessary quantities using LibXC + retx = funcx.compute(inp) + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + # Correlation + # Input dictionary for libxc + inp = {} + # Input dictionary needs density values at grid points + inp['rho'] = rho_block + if xc_family_dict[c_family_code]!='LDA': + # Input dictionary needs sigma (\nabla \rho \cdot \nabla \rho) values at grid points + inp['sigma'] = sigma_block[1] + # Calculate the necessary quantities using LibXC + retc = funcc.compute(inp) + + if debug: + durationLibxc = durationLibxc + timer() - startLibxc + # print('Duration for LibXC computations at grid points: ',durationLibxc) + + if debug: + startE = timer() + #ENERGY----------- + e = retx['zk'] + retc['zk'] # Functional values at grid points + # Testing CrysX's own implmentation + #e = densfuncs.lda_x(rho) + + # Calculate the total energy + # Multiply the density at grid points by weights + den = rho_block*weights_block #elementwise multiply + efunc = efunc + np.dot(den, e) #Multiply with functional values at grid points and sum + nelec = nelec + np.sum(den) + + if debug: + durationE = durationE + timer() - startE + # print('Duration for calculation of total density functional energy: ',durationE) + + #POTENTIAL---------- + # The derivative of functional wrt density is vrho + vrho = retx['vrho'] + retc['vrho'] + vsigma = 0 + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma = retx['vsigma'] + if xc_family_dict[c_family_code]!='LDA': + # The derivative of functional wrt grad \rho square. + vsigma += retc['vsigma'] + + if debug: + startF = timer() + # F = np.multiply(weights_block,vrho[:,0]) #This is fast enough. + v_rho_temp = vrho[:,0] + F = numexpr.evaluate('(weights_block*v_rho_temp)') + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + Ftemp = 2*weights_block*vsigma[:,0] + Fx = Ftemp*rho_grad_block_x + Fy = Ftemp*rho_grad_block_y + Fz = Ftemp*rho_grad_block_z + # Ftemp = 2*np.multiply(weights_block,vsigma.T) + # Fx = Ftemp*rho_grad_block_x + # Fy = Ftemp*rho_grad_block_y + # Fz = Ftemp*rho_grad_block_z + if debug: + durationF = durationF + timer() - startF + # print('Duration for calculation of F: ',durationF) + + if debug: + startZ = timer() + ao_value_block_T = ao_value_block.T + z = numexpr.evaluate('(0.5*F*ao_value_block_T)') + # z = 0.5*np.einsum('m,mi->mi',F,ao_value_block) + # If either x or c functional is of GGA/MGGA type we need rho_grad_values + if xc_family_dict[x_family_code]!='LDA' or xc_family_dict[c_family_code]!='LDA': + z = z + Fx*ao_values_grad_block[0].T + Fy*ao_values_grad_block[1].T + Fz*ao_values_grad_block[2].T + + if debug: + durationZ = durationZ + timer() - startZ + # print('Duration for calculation of z : ',durationZ) + # Free memory + F = 0 + ao_value_block_T = 0 + vrho = 0 + + if debug: + startV = timer() + # Numexpr + v_temp = z @ ao_value_block + v_temp_T = v_temp.T + if list_nonzero_indices is not None: + v[np.ix_(non_zero_indices, non_zero_indices)] += numexpr.evaluate('(v_temp + v_temp_T)') + else: + v = numexpr.evaluate('(v + v_temp + v_temp_T)') + + + if debug: + durationV = durationV + timer() - startV + + print('Number of electrons: ', nelec) + + if debug: + print('Duration for AO values: ', durationAO) + print('Duration for V: ',durationV) + print('Duration for Rho at grid points: ',durationRho) + print('Duration for F: ',durationF) + print('Duration for Z: ',durationZ) + print('Duration for E: ',durationE) + print('Duration for LibXC: ',durationLibxc) + + + + return efunc[0], v","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/taylor.py",".py","58312","50","import numpy as np +from numba import jit +from numba import cuda + +table = np.array([ +[0.12533141373155002, 0.12660384649325115, 0.12791583849331106, 0.12926948294637178, 0.13066703148589484, 0.13211090992020036, 0.13360373594713928, 0.1351483391218054, 0.13674778342396565, 0.13840539283493047, 0.14012478040994822, 0.1419098814251087, 0.14376499129129275, 0.14569480906717377, 0.14770448757545968, 0.14979969134027404, 0.15198666383034362, 0.154272305827641, 0.15666426716443735, 0.15917105461020217, 0.16180215937964007, 0.1645682086235545, 0.16748114642265755, 0.17055445132438055, 0.17380339947509396, 0.1772453850902791, 0.18090031363879588, 0.1847910880801995, 0.1889442153539537, 0.19339056992497952, 0.19816636482997366, 0.20331440033476209, 0.2088856891404153, 0.2149416001041246, 0.22155672794739223, 0.22882279832973734, 0.23685407997867067, 0.24579504080564116, 0.25583143052938306, 0.2672067433518623, 0.2802473905066427, 0.2954024494198404, 0.3133086873213072, 0.3349010581765593, 0.3616081473536585, 0.39571230961051357, 0.4410406953812108, 0.5043435602314388, 0.5981440066613041, 0.746824132812427, 1.0, 1.4626517459071815, 2.3644538928052095, 4.222211992888512, 8.226313882753615, 17.17215777384149, 37.730055834060025, 86.02957126345422, 201.5099994178647, 481.51504096423804, 1168.230463579439, 2868.333594971662, 7110.562488524504, 17766.996932005903, 44689.492944383725, 113044.74701168819, 287350.1586474826, 733529.0042727154, 1879517.1716437954, 4831866.198079479, 12458600.438172013, 32209138.472892135, 83470524.1914028, 216788113.3661266, 564160762.6302302, 1470830749.5674262, 3841059879.5020657, 10046426066.56019, 26314441399.133087, 69016683572.67746, 181238877517.30847, 476485835178.4421, 1254057621480.5176, 3303881273447.4497, 8712525896263.168, 22995988235504.977, 60747184630833.58, 160600137463205.72, 424905752315937.2, 1124990859734760.1, 2980568725898933.0, 7901841702995028.0, 2.0961526460537584e+16, 5.563783417120913e+16, 1.4776054219568886e+17, 3.926238817408209e+17, 1.0437937317811304e+18, 2.776277165905116e+18, 7.387749545786012e+18, 1.966773351624895e+19], +[0.003759942411946501, 0.003875627953875035, 0.003997369952915971, 0.004125621796160802, 0.004260881461496571, 0.004403696997340012, 0.004554672816379748, 0.004714476946109491, 0.004883849407998774, 0.005063611932985261, 0.005254679265373058, 0.005458072362504182, 0.005674933866761555, 0.005906546313534069, 0.006154353648977476, 0.006419986771726004, 0.006705293992515084, 0.007012377537619834, 0.007343637523332406, 0.007701825223072633, 0.008090107968977325, 0.008512148721894836, 0.008972204272605328, 0.009475247295694501, 0.010027119200191436, 0.010634723104583469, 0.011306269600065283, 0.012051592694190046, 0.01288256011875047, 0.013813612083337392, 0.014862477207661502, 0.016051136426207816, 0.017407139492536295, 0.01896543165041889, 0.020770932694895394, 0.022882249242741685, 0.02537713376249481, 0.02836070543956548, 0.031978160789628715, 0.03643500567969164, 0.04203029858653204, 0.04921317326929229, 0.05868247963001337, 0.07156910918807245, 0.08978234879424804, 0.11669230878342843, 0.15852189618467874, 0.22727824593178744, 0.3471065425685186, 0.5684170374614771, 1.0, 1.8834451238277954, 3.7684516545940805, 7.931662465149578, 17.389438556396485, 39.37230039862053, 91.42468441466877, 216.55791153535807, 521.1464976794745, 1270.2614811018577, 3128.735299684092, 7773.519289121748, 19455.528616309926, 48997.66097041322, 124062.29905932782, 315597.2625460423, 806133.7839244115, 2066596.2131737573, 5315037.663807226, 13709244.849876931, 35452994.62287137, 91900471.14359447, 238734703.76864922, 621392304.3184419, 1620310085.4508276, 4232044115.269107, 11070493243.230963, 29000100807.513245, 76068354797.80405, 199775048977.8292, 525261785200.35767, 1382533733713.0154, 3642604807556.2583, 9606349932384.938, 25356583086670.223, 66986462746196.82, 177103515103515.06, 468589550081327.25, 1240698394926229.8, 3287246521702268.5, 8715176179167039.0, 2.311981653025829e+16, 6.136833625214155e+16, 1.629837779322606e+17, 4.330854399601234e+17, 1.1513882391914758e+18, 3.062523928507936e+18, 8.149628025098988e+18, 2.1696432551999287e+19, 5.778608690751584e+19], +[0.00018799712059732504, 0.00019773612009566505, 0.00020819635171437348, 0.0002194479678808937, 0.00023156964464655276, 0.00024464983318555624, 0.0002587882282033948, 0.0002740974968668309, 0.0002907053219046889, 0.000308756825182028, 0.00032841745408581583, 0.000349876433493857, 0.00037335091228694233, 0.00039909096713067454, 0.0004273856700678642, 0.00045857048369466955, 0.0004930363229789243, 0.0005312407225466042, 0.0005737216815093548, 0.000621114937341791, 0.0006741756640736457, 0.0007338059242793508, 0.0008010896671351686, 0.0008773377123902752, 0.0009641460764502256, 0.0010634723090695525, 0.0011777364127410351, 0.0013099557164751357, 0.0014639272545231433, 0.0016444775387001607, 0.001857809393313485, 0.0021119908978172864, 0.0024176561475772987, 0.002789027978094368, 0.0032454406499563553, 0.0038136572234035307, 0.004531482541745662, 0.005453547136568942, 0.006660836786932372, 0.008276887267932135, 0.010496224664192389, 0.013636045407001559, 0.018233442813159643, 0.02523472400804212, 0.03637649859065903, 0.054977180892171476, 0.08762891080996535, 0.1479093146366029, 0.26471407416488235, 0.5013439907250868, 1.0, 2.0870917615781246, 4.525755555420712, 10.128228715031742, 23.255444672967347, 54.52042935197804, 130.00171211586098, 314.31258817610734, 768.6910904257044, 1898.006235131535, 4724.432623780656, 11841.050551380926, 29854.01308389458, 75656.8713535591, 192596.78305454444, 492236.6849876781, 1262496.3650911658, 3248287.7265296383, 8381240.482433789, 21680665.27806715, 56214025.09836486, 146061340.8737643, 380247516.17760706, 991675124.1228762, 2590501254.6242337, 6777285522.211677, 17755684248.616135, 46578531462.43383, 122338277633.3635, 321686142083.2942, 846767733027.0087, 2231154510607.614, 5884402763681.597, 15533123473752.357, 41037144076528.28, 108501927826231.0, 287092224445255.56, 760172488021708.4, 2014160089617600.5, 5340138070659710.0, 1.416688066611581e+16, 3.760510225608516e+16, 9.987539317073568e+16, 2.6539858664517942e+17, 7.055974246817719e+17, 1.8768268232385344e+18, 4.99449294986503e+18, 1.3296896840101476e+19, 3.54154770134252e+19, 9.43653308973257e+19], +[1.3159798441812753e-05, 1.412400857826179e-05, 1.5180983979173066e-05, 1.634186994857719e-05, 1.761942948397684e-05, 1.9028320358876594e-05, 2.058542724345185e-05, 2.2310261372881565e-05, 2.4225443492057358e-05, 2.6357289954563234e-05, 2.8736527232508517e-05, 3.139916710842203e-05, 3.438758402642601e-05, 3.7751848242082766e-05, 4.155138458990869e-05, 4.58570483694039e-05, 5.0753739130006955e-05, 5.634371299687299e-05, 6.275080891370054e-05, 7.012588001857361e-05, 7.865382746434144e-05, 8.856278393404982e-05, 0.00010013620830546606, 0.00011372896247361527, 0.00012978889421899915, 0.00014888612132542522, 0.00017175322135266308, 0.0001993410716737908, 0.00023289747338714405, 0.00027407946340735295, 0.00032511628312797595, 0.0003890499227669985, 0.0004700968450884133, 0.0005742031191476548, 0.0007099155251084828, 0.0008897819749193734, 0.0011326627532566396, 0.001467654140389759, 0.001940952000918888, 0.0026282408622724193, 0.003657788657050466, 0.005254913845578009, 0.007830366331049995, 0.012161421021243802, 0.019773685408162392, 0.03376746372516021, 0.060649112931077276, 0.11447595398019546, 0.22641288412447186, 0.4671259234377558, 1.0, 2.2091652340832226, 5.010775951142392, 11.616859576181914, 27.42486719015478, 65.724910825419, 159.4991308031766, 391.1602851261756, 967.8667672695104, 2413.085769283719, 6055.711609859121, 15283.256279396284, 38762.72701440689, 98742.14017644346, 252501.87527755808, 647915.4937463676, 1667665.5964974046, 4304313.387921166, 11137530.571785474, 28884511.836732652, 75066454.80449945, 195459065.60157508, 509833120.67449754, 1331997788.1496127, 3485215544.3028054, 9131865934.124388, 23958028389.645355, 62931258592.13988, 165489848332.26395, 435647191128.0213, 1147965798991.3696, 3027804291652.882, 7992967217703.026, 21117775669471.91, 55837826311124.8, 147751152448719.97, 391235767481799.7, 1036659313425220.5, 2748584232532540.5, 7291959441965875.0, 1.9356608789954116e+16, 5.14105943770462e+16, 1.3661662902914712e+17, 3.632219322219671e+17, 9.661593048607131e+17, 2.5711345515525105e+18, 6.845292486881698e+18, 1.823234832396103e+19, 4.858132082681631e+19, 1.2949866011412672e+20], +[1.1843818597631477e-06, 1.2971028286158786e-06, 1.4232172480474748e-06, 1.5646471227361136e-06, 1.7236398408238202e-06, 1.9028320358876565e-06, 2.1053277862621133e-06, 2.3347947948364205e-06, 2.5955832312917982e-06, 2.892873287695793e-06, 3.23285931365673e-06, 3.6229808202012095e-06, 4.072213897862521e-06, 4.591441002405094e-06, 5.193923073709592e-06, 5.895906218842293e-06, 6.717406649332903e-06, 7.683233589847378e-06, 8.82433250170824e-06, 1.0179563223505476e-05, 1.1798074105614782e-05, 1.3742500915812918e-05, 1.6093319080825614e-05, 1.8954826765681075e-05, 2.2463461576715216e-05, 2.6799499338746643e-05, 3.220372192524706e-05, 3.90014939455424e-05, 4.763806249915938e-05, 5.873115110385218e-05, 7.315069994422955e-05, 9.214207578250127e-05, 0.00011752040377716714, 0.00015198398464512359, 0.000199632090918871, 0.00026684282177966145, 0.0003638028936013509, 0.0005072517038017308, 0.0007255529207120849, 0.001068356929697253, 0.0016255749272795917, 0.0025657520207456644, 0.004215883333020459, 0.007231846535800255, 0.012971199923622025, 0.024326565053467267, 0.047625158297635986, 0.09703332841849727, 0.20492460199768314, 0.4466091701984106, 1.0, 2.2910246746912017, 5.351130332523581, 12.703016020508631, 30.56994319836314, 74.41942344944185, 182.9472470171689, 453.51827569432476, 1132.3638111218725, 2844.9990791458326, 7186.839383226418, 18241.72586010063, 46497.02415172388, 118963.12563431897, 305390.05999946315, 786330.563617723, 2030187.6348779441, 5254581.008555505, 13630609.64138626, 35431055.31942346, 92272216.63619044, 240719286.1889228, 628993580.2071328, 1645983715.7150784, 4313232484.788875, 11317146012.587067, 29729696718.321938, 78186163668.27646, 205837588279.15894, 542434206105.93427, 1430776317379.9639, 3777248521973.4014, 9980155260699.984, 26389882379515.113, 69832577146278.984, 184919438554034.25, 489999472454174.44, 1299220912626980.0, 3446922733174091.5, 9150166267157062.0, 2.430322403029491e+16, 6.458409868752535e+16, 1.7171339062407363e+17, 4.5676230027984205e+17, 1.2155564464259927e+18, 3.2363136505932585e+18, 8.620033863829187e+18, 2.296904747505757e+19, 6.122740034840127e+19, 1.6327174705539547e+20], +[1.3028200457394623e-07, 1.4559317464055773e-07, 1.63076976338773e-07, 1.8309700372443837e-07, 2.0608737227241203e-07, 2.3256835994182118e-07, 2.631659732827544e-07, 2.9863654352556164e-07, 3.398978040976602e-07, 3.8806836786142114e-07, 4.4451815562721624e-07, 5.109331925908497e-07, 5.893993799492424e-07, 6.825115003448296e-07, 7.935160251146395e-07, 9.264995485761371e-07, 1.086639310644249e-06, 1.2805389308647485e-06, 1.5166821465544505e-06, 1.8060515335465768e-06, 2.162980235540401e-06, 2.606336332343274e-06, 3.1611875407721726e-06, 3.861168032364349e-06, 4.751885021997847e-06, 5.895886799176611e-06, 7.38001095651912e-06, 9.326419665091454e-06, 1.1909445888087524e-05, 1.538176955537865e-05, 2.0115875667416954e-05, 2.6671084285439504e-05, 3.590435866032352e-05, 4.915789523374392e-05, 6.858484728705217e-05, 9.773020380169187e-05, 0.00014259589334659716, 0.0002136501968593172, 0.0003297289913310968, 0.0005258276144535036, 0.0008690962486344087, 0.0014925424657360462, 0.002667789234768589, 0.004965686448050223, 0.009618077101376028, 0.01934747985981998, 0.04030058918723998, 0.0866181434261611, 0.19137062659294377, 0.43301350964832575, 1.0, 2.349914345723139, 5.604295857619441, 13.534621654911568, 33.03878439782401, 81.39310921844823, 202.10808426926903, 505.30455071967657, 1270.9084959449008, 3213.2740740402814, 8161.7945263691645, 20816.207927548596, 53284.80999750335, 136844.34346617758, 352477.0166363732, 910318.4965799422, 2356723.491935288, 6114826.152800521, 15897859.845982965, 41409571.10740531, 108045569.16273996, 282358593.600886, 738979816.4811146, 1936674283.388523, 5081974710.325012, 13351305731.455738, 35115366150.301636, 92453386042.01378, 243653825645.2764, 642722431058.9515, 1696878015093.158, 4483671170580.875, 11856419595965.436, 31375616234400.16, 83087070870484.34, 220171916447905.16, 583799344739878.1, 1548907244080161.5, 4111830253464951.5, 1.0921481740066712e+16, 2.9023780885924696e+16, 7.716894321058323e+16, 2.0527591737929408e+17, 5.4630056799354125e+17, 1.4545054584916644e+18, 3.8741947941756687e+18, 1.0323399606132048e+19, 2.7518985665781285e+19, 7.338445936953105e+19, 1.9576350081466067e+20], +[1.6936660594612985e-08, 1.9313380309461672e-08, 2.2083340545875315e-08, 2.532192604699626e-08, 2.912104173414369e-08, 3.359320754714781e-08, 3.887679150766813e-08, 4.5142733323599435e-08, 5.2603231586453666e-08, 6.152303392900192e-08, 7.223420028873228e-08, 8.515553209655024e-08, 1.008183149859482e-07, 1.1990066896450662e-07, 1.4327372671492964e-07, 1.7206420176133043e-07, 2.077398678837416e-07, 2.5222736425266987e-07, 3.080760584464641e-07, 3.78688217557798e-07, 4.686456974255705e-07, 5.841787760982279e-07, 7.338469471663947e-07, 9.295399997567023e-07, 1.1879699782272048e-06, 1.532926956920514e-06, 1.9987427430678712e-06, 2.635698295692104e-06, 3.518617505377661e-06, 4.7607892116991945e-06, 6.536989716983217e-06, 9.122401562026988e-06, 1.2959963134653458e-05, 1.877983665103614e-05, 2.7816876795635244e-05, 4.221719730851568e-05, 6.581916929133631e-05, 0.00010569493372616806, 0.000175275088612958, 0.00030084713080101604, 0.0005354026072667505, 0.0009888180334134316, 0.0018950153680786876, 0.0037642470194602993, 0.007734268668435476, 0.016392392718954867, 0.035725544235071925, 0.07980066262631053, 0.18211486590807596, 0.4233714450997424, 1.0, 2.394388637783391, 5.800470784261431, 14.19364974793155, 35.03396915739537, 87.12606484936688, 218.09743499208827, 549.0908500152976, 1389.4152115161723, 3531.5293386642406, 9012.036324484408, 23079.688147247267, 59296.23993664614, 152784.52427137145, 394701.94563818735, 1022102.8462199396, 2652563.4803576125, 6897695.4650021205, 17969650.577431057, 46893302.319083296, 122563878.53029135, 320808162.6540541, 840843849.6694591, 2206645198.199672, 5797769092.78625, 15249934337.541836, 40153560819.634285, 105828390912.5408, 279175751828.58185, 737102659639.7617, 1947745922726.7825, 5150763232752.664, 13631016056676.537, 36098235244995.555, 95659863699126.72, 253656285232169.03, 673008592095543.4, 1786662928018808.8, 4745701572992559.0, 1.2611986447321172e+16, 3.3533741467052984e+16, 8.920450187991624e+16, 2.3740461087899632e+17, 6.320930895705288e+17, 1.6836617105259018e+18, 4.486455460255806e+18, 1.1959688367376105e+19, 3.1893190833956712e+19, 8.50808199366981e+19, 2.2704673399842557e+20], +[2.540499089191919e-09, 2.9561296392032367e-09, 3.4505219602927953e-09, 4.04073287983921e-09, 4.747995934913015e-09, 5.5988679245198645e-09, 6.626725825157442e-09, 7.873732556404871e-09, 9.393434211764056e-09, 1.1254213523312019e-08, 1.3543912553340736e-08, 1.637606386250039e-08, 1.9898351635767806e-08, 2.430418963767084e-08, 2.9848693017286946e-08, 3.6870900242318306e-08, 4.582497047863967e-08, 5.732439990767812e-08, 7.220532323022623e-08, 9.16181088225065e-08, 1.171614009623352e-07, 1.5108065217198187e-07, 1.9656596135528144e-07, 2.5820503339663495e-07, 3.426821737898587e-07, 4.598739206929947e-07, 6.245953099132588e-07, 8.594333729008001e-07, 1.1994335995119458e-06, 1.7000110555915725e-06, 2.450598211260292e-06, 3.5987363548379412e-06, 5.39363881454531e-06, 8.266957620815422e-06, 1.2986410134804367e-05, 2.095564749400693e-05, 3.4814807449410396e-05, 5.967381018414636e-05, 0.00010570679766226861, 0.00019373552046188892, 0.00036750200812819925, 0.00072117352443896, 0.0014620806939151648, 0.0030561054148990534, 0.006569395614711397, 0.014481668579804098, 0.03264357252438327, 0.07503398564611644, 0.1754234350179873, 0.41619002946225064, 1.0, 2.429198930067405, 5.957194930009574, 14.729717938140295, 36.682839142029124, 91.93064137981459, 231.66419812580858, 586.6524732998154, 1492.0713520552088, 3809.628824092619, 9760.822102741731, 25087.127432693556, 64661.594676473615, 167093.57754089366, 432804.8242106729, 1123457.2631260855, 2921975.1750704343, 7613495.862605814, 19870966.06662477, 51943025.780567355, 135975493.8298121, 356431275.6532716, 935478066.975727, 2458095080.8856187, 6466047824.080382, 17026489499.95321, 44877706329.57822, 118394402691.46051, 312611065838.275, 826094389009.7277, 2184682164699.42, 5781795104635.829, 15312174404532.225, 40578487395663.75, 107603355623895.92, 285505107231698.94, 757963115629094.1, 2013340427996716.8, 5350703325813394.0, 1.4227194995513956e+16, 3.784716100686882e+16, 1.0072664481404976e+17, 2.6819113047169728e+17, 7.143743683707241e+17, 1.903625864289785e+18, 5.074635932871548e+18, 1.3532854212823106e+19, 3.610182411463564e+19, 9.634262051141642e+19, 2.5718875079030725e+20], +[4.318848451625934e-10, 5.127979986372053e-10, 6.110299304682634e-10, 7.307708399702204e-10, 8.77347074927633e-10, 1.0575639412927898e-09, 1.2801629434812923e-09, 1.5564355052940358e-09, 1.901052161788271e-09, 2.333190608167504e-09, 2.878081416682131e-09, 3.569142121361369e-09, 4.450947069400001e-09, 5.583394897159272e-09, 7.047608018759573e-09, 8.954361334295896e-09, 1.145624219118281e-08, 1.476537453377975e-08, 1.917953561910987e-08, 2.5121084915508097e-08, 3.319570375939656e-08, 4.428218556365674e-08, 5.967159979570719e-08, 8.128617806949838e-08, 1.1202904038296385e-07, 1.563524111347041e-07, 2.2119746865943484e-07, 3.175787569516568e-07, 4.633097521805727e-07, 6.877927998173639e-07, 1.0406282494960876e-06, 1.6074544866528122e-06, 2.5398041719891712e-06, 4.112779121813785e-06, 6.839246072545214e-06, 1.1701522264986226e-05, 2.0632704943400574e-05, 3.753958358506962e-05, 7.052349792716612e-05, 0.0001367988606553607, 0.00027378676661085724, 0.0005645546247771537, 0.0011970316951384439, 0.0026036999027755094, 0.005795078203897137, 0.013164326687221672, 0.030446858975754318, 0.07153293228838208, 0.17037464507084202, 0.41064000047187094, 1.0, 2.4572046363289433, 6.085409967914577, 15.174820457634222, 38.07003564361962, 96.02028012869543, 243.3331767698126, 619.2622605133525, 1581.942049673177, 4054.9298199559444, 10425.797138255239, 26880.874672844202, 69482.68102595897, 180016.801767556, 467378.24354356306, 1215817.395296081, 3168446.902263639, 8270728.4454847425, 21622584.78338882, 56609675.73959312, 148405623.17149073, 389536566.66926265, 1023645255.5829477, 2692913961.112518, 7091505483.291095, 18692659344.727104, 49316968320.9121, 130224356379.18051, 344142535244.7215, 910156524797.9886, 2408841184767.095, 6379676250490.276, 16907239972320.688, 44834948039913.48, 118964596725889.73, 315837740948420.56, 838966157434218.2, 2229711257590543.2, 5928801096475081.0, 1.5772121695950724e+16, 4.197684748890713e+16, 1.1176812717283034e+17, 2.977193427122579e+17, 7.933593802046115e+17, 2.114949571036158e+18, 5.640153301315892e+18, 1.5046541085700256e+19, 4.01542648571735e+19, 1.0719402606116558e+20, 2.8625186703042318e+20], +[8.20581205808561e-11, 9.942002014384631e-11, 1.2093300707156175e-10, 1.4770899956766577e-10, 1.8119124373287985e-10, 2.2326349871132363e-10, 2.7639881732575156e-10, 3.438636580996271e-10, 4.299998936077745e-10, 5.406173356766806e-10, 6.83544335453022e-10, 8.694064113647404e-10, 1.1127367595021684e-09, 1.4335743435776638e-09, 1.8597853881852571e-09, 2.4304693338842883e-09, 3.2010083686501937e-09, 4.250636782166341e-09, 5.6939208772490946e-09, 7.69838644070973e-09, 1.0511943224669509e-08, 1.450614987490945e-08, 2.024548676353988e-08, 2.8600030968017688e-08, 4.0931821049707306e-08, 5.940863881251888e-08, 8.754238810345518e-08, 1.311314483685099e-07, 1.9994512050123706e-07, 3.1080134123135434e-07, 4.933193705399834e-07, 8.009258451076375e-07, 1.3324141570179088e-06, 2.2751827984674333e-06, 3.993984595584161e-06, 7.217225964840119e-06, 1.3436512437915826e-05, 2.578099343783395e-05, 5.096693441262168e-05, 0.00010372027442896298, 0.00021696749500595377, 0.00046565286628438943, 0.0010231132673426692, 0.0022960386290856337, 0.0052508495431154, 0.01221012140745879, 0.02881164770667283, 0.0688619024149741, 0.16643696871258926, 0.4062253133540716, 1.0, 2.4802333252359703, 6.1923191223263485, 15.550602140919242, 39.25427167512098, 99.54647005037423, 253.48472647796063, 647.8605043133583, 1661.3314256251547, 4273.051558042742, 11020.635223723904, 28494.18517294176, 73840.42072782725, 191751.35440715097, 498903.38470725215, 1300359.985544819, 3394862.773332514, 8876478.28981531, 23241952.853469227, 60936312.61179707, 159960796.81319228, 420388194.9634545, 1106001914.1005507, 2912736961.251985, 7678223255.926983, 20258651197.21033, 53496926558.66551, 141382477782.0323, 373931715212.29144, 989696166803.0175, 2621250575639.833, 6947004756135.255, 18422791937450.63, 48884303078394.69, 129785967209260.84, 344761978799074.2, 916292255610257.8, 2436475556608504.0, 6481782665159669.0, 1.7251337126061762e+16, 4.593449959517681e+16, 1.2235892635106424e+17, 3.260661473494836e+17, 8.69245600842674e+17, 2.3181404582174986e+18, 6.18431374852461e+18, 1.6504113144414788e+19, 4.405918565398757e+19, 1.1765741393565994e+20, 3.142938714676414e+20], +[1.7232205321939277e-11, 2.130429003071186e-11, 2.6454095296592376e-11, 3.2998819051485394e-11, 4.135887084966667e-11, 5.20948163592963e-11, 6.595880866144029e-11, 8.39667071587255e-11, 1.0749997325820556e-10, 1.384507806876801e-10, 1.794303869412253e-10, 2.3407095379675435e-10, 3.074667275043112e-10, 4.068251273404181e-10, 5.424373372346174e-10, 7.291406110117836e-10, 9.885461727878972e-10, 1.3524738574073351e-09, 1.8683136324180383e-09, 2.6075063279792187e-09, 3.6791473769539376e-09, 5.252134580607568e-09, 7.591798246323446e-09, 1.1121503337467114e-08, 1.6528095214889696e-08, 2.4945795364834644e-08, 3.828327858163042e-08, 5.981750915252285e-08, 9.529521926206713e-08, 1.5502154259428157e-07, 2.57910563881711e-07, 4.3952063215979226e-07, 7.683574367426978e-07, 1.3796897602020947e-06, 2.5472011824425914e-06, 4.8379265510368054e-06, 9.453737789109194e-06, 1.8997459409535033e-05, 3.921988180188179e-05, 8.306318392786654e-05, 0.00018014594350564237, 0.00039928357256399487, 0.0009025414642652067, 0.002076234995296676, 0.004851170391285823, 0.011491566257583977, 0.027552023147088954, 0.06676191916488557, 0.16328384874887694, 0.40263165791760724, 1.0, 2.4995092838422868, 6.2828691271725825, 15.872271737939489, 40.27768068981105, 102.62004700962498, 262.40211727585535, 673.1589811726504, 1732.0098618592529, 4468.371097788083, 11556.122099636952, 29953.59488124442, 77800.07435477959, 202457.79960142923, 527775.6745931435, 1378060.1708491042, 3603631.3340838295, 9436704.815851757, 24743842.832252417, 64959625.14155774, 170732309.26321393, 449213769.7598801, 1183116581.196633, 3118986873.5855494, 8229768257.338464, 21733424218.873726, 57440121928.339195, 151925574429.90912, 402122005904.6939, 1065075874778.6469, 2822828402059.62, 7486108759537.993, 19864742705466.117, 52741588043302.26, 140105754142383.45, 372375442054306.94, 990190626688940.1, 2634270312703733.0, 7011278038566261.0, 1.866901704175092e+16, 4.973082640098383e+16, 1.325265354970586e+17, 3.5330219854275437e+17, 9.422147815711642e+17, 2.513666508852023e+18, 6.70832337209078e+18, 1.790868154667178e+19, 4.782461874750428e+19, 1.2775353877871008e+20, 3.4136843593445533e+20], +[3.963407224001672e-12, 4.999986435656267e-12, 6.337960331133812e-12, 8.074179128670875e-12, 1.0339717709784014e-11, 1.3313119728949286e-11, 1.7239234061630297e-11, 2.245621232309169e-11, 2.9434516329938414e-11, 3.8833755120370146e-11, 5.158623502420042e-11, 6.902091886815635e-11, 9.304913171840282e-11, 1.264456211652522e-10, 1.7327851974296794e-10, 2.3957456502146394e-10, 3.3436062579746633e-10, 4.713150237270814e-10, 6.714206604657383e-10, 9.6728796409334e-10, 1.4103039569442954e-09, 2.082642153844571e-09, 3.1177760097355944e-09, 4.736136066647467e-09, 7.308243863361875e-09, 1.1468677413646053e-08, 1.832598180067324e-08, 2.985744517810291e-08, 4.96675969639533e-08, 8.44775140639114e-08, 1.4711341089908167e-07, 2.626344795161017e-07, 4.811647641931572e-07, 9.053140826272821e-07, 1.7499161930511453e-06, 3.474551910076818e-06, 7.082528878933193e-06, 1.480592269456698e-05, 3.169751655486384e-05, 6.937791418933092e-05, 0.00015495791580463113, 0.0003525053708321251, 0.0008151758272713737, 0.0019128656917192627, 0.0045471349113539745, 0.010933324294546574, 0.026554604742769976, 0.06507026138858288, 0.1607042516955195, 0.39965049258089663, 1.0, 2.5158842630927247, 6.360575087608891, 16.150849876784687, 41.171349362082914, 105.32415781378872, 270.30112941568626, 695.7075769202562, 1795.3629299498084, 4644.355282505996, 12040.895249445228, 31280.57169004219, 81414.93718654833, 212268.40866816536, 554323.5007195559, 1449733.8545776382, 3796781.9152422813, 9956461.840224748, 26140858.472688783, 68711093.26045997, 180798909.5342814, 476210599.72944516, 1255484411.216001, 3312908286.3316765, 8749273730.575315, 23124878554.515587, 61166504086.75942, 161904098554.69366, 428841184694.57086, 1136619719213.8635, 3014397702128.1895, 7999081303730.918, 21238421905873.99, 56420391061819.96, 149958643130244.75, 398766774799426.4, 1060888071802831.5, 2823676451111813.5, 7518776783244637.0, 2.002898484348186e+16, 5.337565162536039e+16, 1.4229621993608434e+17, 3.7949253676771635e+17, 1.0124345092225371e+18, 2.7019599196212224e+18, 7.213297741822991e+18, 1.926312816483818e+19, 5.145801496855911e+19, 1.3750167922827313e+20, 3.67525481029539e+20], +[9.908518059521994e-13, 1.275506743656117e-12, 1.6505105025282936e-12, 2.147388065105552e-12, 2.809705896536249e-12, 3.698088805645583e-12, 4.897509654494027e-12, 6.527968637086799e-12, 8.760272546126841e-12, 1.1839559011429253e-11, 1.6120697117451928e-11, 2.2122085679465437e-11, 3.06082566865378e-11, 4.271808643066754e-11, 6.016607214954338e-11, 8.55621194677814e-11, 1.2292607054743925e-10, 1.785266533488395e-10, 2.6226874855476144e-10, 3.9002158843639327e-10, 5.875876586310862e-10, 8.975809427930314e-10, 1.3915556114843305e-09, 2.191785434180985e-09, 3.5111224876604866e-09, 5.727394734890544e-09, 9.525120028765859e-09, 1.6171101294448854e-08, 2.8061733042424096e-08, 4.983289167923822e-08, 9.065766079790194e-08, 1.6909979149905554e-07, 3.2356582253364205e-07, 6.352314010584047e-07, 1.279203920571786e-06, 2.640541324645827e-06, 5.581250142705022e-06, 1.206307046883262e-05, 2.6618025209932952e-05, 5.9859333408051436e-05, 0.00013694748255268285, 0.0003181882871464522, 0.0007495518740138468, 0.0017874709395799045, 0.004309130697265867, 0.010488443238652766, 0.025746768293861858, 0.06367997091966221, 0.1585560528681675, 0.3971381426181787, 1.0, 2.529969567079006, 6.428006320760999, 16.394529360012417, 41.95875209706665, 107.7225032219697, 277.34930016051845, 715.9385384075042, 1852.4922767061248, 4803.789784818594, 12481.96318170186, 32492.693210404123, 84729.01482547459, 221293.25321226456, 578822.12807609, 1516069.5982453937, 3976037.9728637435, 10440066.848051874, 27443826.850445643, 72217899.80442585, 190228928.67219305, 501550675.44867235, 1323538883.4747674, 3495595195.607188, 9239504374.618832, 24440010391.435143, 64693800645.23045, 171363028725.51154, 454203517677.1894, 1204618352556.1113, 3196698699748.447, 8487809823192.14, 22548647764377.62, 59933026031854.586, 159376139484268.44, 424016670540715.8, 1128591484483459.8, 3005224973544188.5, 8005643083509579.0, 2.13347485834974e+16, 5.6878004753643624e+16, 1.5169124194938128e+17, 4.046971442716621e+17, 1.0800595811066307e+18, 2.8834205098687744e+18, 7.700270365461695e+18, 2.0570126641626714e+19, 5.4966296183629685e+19, 1.469197687451797e+20, 3.9281150292488795e+20], +[2.6752998755501757e-13, 3.514151231077486e-13, 4.642060784352552e-13, 6.168029537579997e-13, 8.245875969799137e-13, 1.1094266331061193e-12, 1.5026449837549206e-12, 2.0494784591917414e-12, 2.815801705020412e-12, 3.8983908672045215e-12, 5.440733843320465e-12, 7.657641045429668e-12, 1.0873974775929825e-11, 1.5586297698718442e-11, 2.256219007397263e-11, 3.3002288597354934e-11, 4.880820043019424e-11, 7.303172500746589e-11, 1.1063928560169896e-10, 1.6983311966069888e-10, 2.6437233708062905e-10, 4.1772099238213675e-10, 6.705952255319319e-10, 1.094952952682223e-09, 1.8204300339052967e-09, 3.085293667153813e-09, 5.336644884369226e-09, 9.431500596729555e-09, 1.704852791578874e-08, 3.154798005200166e-08, 5.980264234343779e-08, 1.1616891754371036e-07, 2.3125188209169704e-07, 4.7157248954426267e-07, 9.843767543130695e-07, 2.101175103729601e-06, 4.5800885156156874e-06, 1.0179769564230473e-05, 2.3033039463680338e-05, 5.296618548548891e-05, 0.0001235891962667673, 0.00029216772458965897, 0.0006987756028128776, 0.0016886358784775346, 0.004118351671348893, 0.010126339846831707, 0.025080061742305915, 0.06251806148309223, 0.15674019501299502, 0.3949924695309415, 1.0, 2.5422155286305297, 6.487086002645145, 16.60953403428862, 42.65796803426186, 109.86477087763863, 283.6788599974875, 734.1967671832691, 1904.2858861913307, 4948.941214135185, 12885.078527691556, 33604.5049831559, 87778.9986677205, 229624.75951960424, 601504.2219426623, 1577652.9968040453, 4142873.7120747343, 10891232.924974483, 28662106.715163648, 75503653.45490943, 199081980.04787812, 525384680.8079201, 1387661295.2666876, 3668013538.420137, 9702909987.31386, 25685040030.813393, 68037823791.48893, 180342605938.14352, 478311531403.31635, 1269333284549.554, 3370399146799.207, 8954001221540.205, 23799788051471.61, 63290681081206.97, 168386930620088.75, 448198758683761.44, 1193490023486900.8, 3179402294324019.0, 8473128870885695.0, 2.258953332940258e+16, 6.024620095313952e+16, 1.6073305844729498e+17, 4.2897143482998394e+17, 1.1452332203757364e+18, 3.0584187422868685e+18, 8.17020020760702e+18, 2.183216113302978e+19, 5.835590208250192e+19, 1.560245125681641e+20, 4.1726986610607876e+20], +[7.758369633502135e-14, 1.0399018933592186e-13, 1.4022891909679836e-13, 1.9029027177272404e-13, 2.5992434790249555e-13, 3.574819058883008e-13, 4.951897985495949e-13, 6.911031300311685e-13, 9.721218187140164e-13, 1.3786986564066784e-12, 1.9722644781752508e-12, 2.8470673771661457e-12, 4.1492678704402005e-12, 6.108110252419235e-12, 9.087455354569426e-12, 1.3672115492638409e-11, 2.081453101663409e-11, 3.2087650265428826e-11, 5.0127687838255406e-11, 7.942197019030342e-11, 1.2773473441128797e-10, 2.0873331290869953e-10, 3.4691446035921244e-10, 5.870209128167562e-10, 1.0123905269507649e-09, 1.7814153195075325e-09, 3.201414846434721e-09, 5.881251569825295e-09, 1.1052678456558036e-08, 2.1259571339692944e-08, 4.186257932272444e-08, 8.437940821260577e-08, 1.74017643557293e-07, 3.669123605392918e-07, 7.901064315068908e-07, 1.7354303571201826e-06, 3.882436932101839e-06, 8.83322171385512e-06, 2.040733275834215e-05, 4.7803184371002457e-05, 0.00011337443643120956, 0.0002718877608103557, 0.0006585047670250381, 0.001608990248197681, 0.003962365445482793, 0.009826339258464097, 0.024521032844197536, 0.061533133390270056, 0.15518561037877185, 0.3931389112127382, 1.0, 2.5529613475134725, 6.539283198069911, 16.800680629678713, 43.283159745948616, 111.79032585232012, 289.3956726135151, 750.7610961507496, 1951.4681827913457, 5081.674371653654, 13255.011537316983, 34628.157510418896, 90595.74957446745, 237341.16700731427, 622567.9215871901, 1634985.5631457965, 4298558.357642531, 11313172.794983048, 29803833.617856637, 78588967.83526467, 207410331.13738632, 547845251.3472272, 1448188522.1609595, 3831019724.500744, 10141669836.11164, 26865518397.81204, 71212726605.4451, 188878951948.99994, 501257508102.7965, 1331000506297.2441, 3536103126783.8735, 9399203304314.668, 24995812371954.117, 66503546400554.0, 177017199195788.5, 471380373075148.7, 1255757002572507.5, 3346654895619989.0, 8922385311850181.0, 2.3796309560809536e+16, 6.3487911382906664e+16, 1.694414953341468e+17, 4.523666868336309e+17, 1.2080881533459848e+18, 3.2272984067056906e+18, 8.623978384960713e+18, 2.3051543033878766e+19, 6.163283201658127e+19, 1.6483149250631637e+20, 4.409410661763429e+20], +[2.4050945804065375e-14, 3.2894855644496244e-14, 4.528225466479857e-14, 6.275530111553744e-14, 8.758320063617636e-14, 1.231326466128507e-13, 1.7444183344189143e-13, 2.4911849388441866e-13, 3.587590304358987e-13, 5.212147548690142e-13, 7.642508390556357e-13, 1.131522188425656e-12, 1.6924517217431669e-12, 2.5587671970301663e-12, 3.912554520428867e-12, 6.054514777283346e-12, 9.488196034621751e-12, 1.506928382966357e-11, 2.4274464591467118e-11, 3.9693772709609355e-11, 6.594793172715978e-11, 1.1142840235625546e-10, 1.9165917197864414e-10, 3.3591449822234685e-10, 6.004947033769951e-10, 1.0958669728983925e-09, 2.0431993443906214e-09, 3.894295999538186e-09, 7.590583660577395e-09, 1.5131923195332244e-08, 3.0846104917721556e-08, 6.426513065860852e-08, 1.3673382161638865e-07, 2.96791249526313e-07, 6.563971550130181e-07, 1.477178971172302e-06, 3.377791235819514e-06, 7.836910058196002e-06, 1.8423197189809677e-05, 4.3824817772884585e-05, 0.0001053604853365233, 0.0002557120365796645, 0.0006258941445498945, 0.0015435969115670078, 0.0038326676111091226, 0.009574016004073755, 0.024045901577420505, 0.060688002615764916, 0.15384003535173343, 0.3915217856400861, 1.0, 2.562467454656377, 6.58573998167073, 16.971757516462926, 43.84558736288302, 113.53078307579507, 294.58556227131834, 765.85956647207, 1994.6364957351163, 5203.53867964298, 13595.754099109088, 35573.88683400666, 93205.42904919293, 244509.19134806894, 642183.1157108996, 1688499.5363038578, 4444191.157775799, 11708681.726951757, 30876116.697324723, 81491929.65698949, 215260019.8111131, 569049642.3146574, 1505419410.070218, 3985375986.3954983, 10557729606.368475, 27986416182.535778, 74231218606.25392, 197004591634.01404, 523124754318.7328, 1389833577866.392, 3694358584949.304, 9824823180466.379, 26140337220820.688, 69580924771912.484, 185290894754142.03, 493623220805524.9, 1315551540011435.0, 3507393402603531.0, 9354472892146984.0, 2.4957818163573212e+16, 6.661022523846891e+16, 1.7783490175698966e+17, 4.7493042732491635e+17, 1.2687475669928397e+18, 3.3903790106507064e+18, 9.062434142758398e+18, 2.4230425938440405e+19, 6.480268249654457e+19, 1.733552610396547e+20, 4.6386296628450466e+20], +[7.93681205169283e-15, 1.1076838969049525e-14, 1.5565774551124353e-14, 2.203111498905121e-14, 3.141570949438529e-14, 4.514862659547713e-14, 6.541565836146339e-14, 9.559189904945805e-14, 1.4094082179715697e-13, 2.0975652848250267e-13, 3.1525171866431943e-13, 4.787160400852428e-13, 7.348667224171464e-13, 1.1410338053551215e-12, 1.7931478437335112e-12, 2.8539740109291704e-12, 4.6037339730040714e-12, 7.532312471759232e-12, 1.2509990844613982e-11, 2.1109007773730864e-11, 3.621989552360926e-11, 6.325419277793253e-11, 1.1253455633825632e-10, 2.0413248130354918e-10, 3.778408706445144e-10, 7.141061591620628e-10, 1.3787454992766335e-09, 2.7201162544847503e-09, 5.483727638467878e-09, 1.1293595619853687e-08, 2.3747584818608475e-08, 5.0943606034088195e-08, 1.1137852171570303e-07, 2.478803466814478e-07, 5.608576671779389e-07, 1.288404315737524e-06, 3.0009522518437937e-06, 7.077967749618973e-06, 1.6883604150162018e-05, 4.068467547395838e-05, 9.893491669716343e-05, 0.00024255409290380568, 0.0005990150030852269, 0.00148904237274373, 0.003723267444717602, 0.009359027716461348, 0.023637333590831096, 0.05995513836345536, 0.1526642049497461, 0.3900986837326221, 1.0, 2.57093716774403, 6.627357967394343, 17.125786736986075, 44.354321014827505, 115.11184088837905, 299.3188858588962, 779.6806096114874, 2034.2880758198871, 5315.8329545427405, 13910.674297901087, 36450.38232178673, 95630.37325849012, 251186.10083877313, 660496.3771063553, 1738569.619785078, 4580729.342817451, 12080204.231722848, 31885198.070005305, 84228480.34485596, 222671769.8689087, 589101929.5610093, 1559620077.04603, 4131763177.7209206, 10952832359.889061, 29052198882.20106, 77104748022.025, 204748896591.4239, 543988682662.5089, 1446026271313.1458, 3845663798116.337, 10232143128996.363, 27236664964709.066, 72531327507001.78, 193229970242931.25, 514983966282298.44, 1373020003255890.0, 3661996162386076.5, 9770370296630308.0, 2.6076592494793304e+16, 6.961970465940232e+16, 1.8593028693306285e+17, 4.967067734339797e+17, 1.3273259621023805e+18, 3.547957913890726e+18, 9.486340202066457e+18, 2.5370819052502987e+19, 6.787068087277928e+19, 1.816094259959748e+20, 4.860710102545881e+20], +[2.7778841505862453e-15, 3.956013730271771e-15, 5.675021452173015e-15, 8.20307328751995e-15, 1.1951624605781279e-14, 1.7557788099557737e-14, 2.6017560446078795e-14, 3.890359376479535e-14, 5.872510285205439e-14, 8.952955848793862e-14, 1.3792076826065307e-13, 2.148032976299672e-13, 3.384110077384593e-13, 5.396377921724357e-13, 8.715563361217644e-13, 1.4266717496265779e-12, 2.368686797941743e-12, 3.991937507522644e-12, 6.8344755276136104e-12, 1.1896942017622835e-11, 2.1073686254787167e-11, 3.80171365079624e-11, 6.990194770472644e-11, 1.31089876611951e-10, 2.508771607033805e-10, 4.901527507079692e-10, 9.778082371705102e-10, 1.9915741529537086e-09, 4.140166568666692e-09, 8.779449647552079e-09, 1.8975627296648677e-08, 4.176127199682322e-08, 9.347774913846289e-08, 2.1255393918458426e-07, 4.903527261266811e-07, 1.146252327774981e-06, 2.7117794159252823e-06, 6.485282384320275e-06, 1.56616130370493e-05, 3.8154732451361154e-05, 9.368622713568752e-05, 0.00023166945047774527, 0.0005765208207121891, 0.0014429010179730349, 0.0036298361984827927, 0.00917378251081558, 0.023282414321674, 0.05931374164094993, 0.1516280649899175, 0.3888367448206454, 1.0, 2.5785315625127665, 6.66485865094269, 17.265209419509283, 44.81675195513571, 116.55461374969144, 303.6538972653636, 792.3813720424279, 2070.840430797777, 5419.654669785695, 14202.635119584853, 37265.071762244916, 97889.77648408264, 257421.3534982753, 677634.8838230269, 1785522.3781348714, 4709010.663098899, 12429888.184259875, 32836582.98212173, 86812729.51688409, 229681747.3482714, 608094837.4351711, 1611028339.045333, 4270791508.6625953, 11328544623.92509, 30066890318.629368, 79843656716.12465, 212138463710.42807, 563917738518.1039, 1499754843173.8167, 3990472956988.073, 10622334334980.438, 28287817697328.234, 75362558026696.97, 200854588675857.75, 535514743015566.1, 1428297278264940.0, 3810812396818631.5, 1.017098225153843e+16, 2.7154977916948916e+16, 7.252243345270773e+16, 1.9374344184017955e+17, 5.1773673670271725e+17, 1.3839299152842304e+18, 3.700312238822732e+18, 9.896417554885026e+18, 2.6474599243187528e+19, 7.084171565019108e+19, 1.8960672690086035e+20, 5.07598415085897e+20], +[1.0278170643531663e-15, 1.4935968226671281e-15, 2.1872473020763595e-15, 3.2288677478758074e-15, 4.806627399794186e-15, 7.218190006130684e-15, 1.0939168835068026e-14, 1.6737501666425454e-14, 2.5866756336828982e-14, 4.0396778505033216e-14, 6.378639045670897e-14, 1.0188839394890237e-13, 1.6473744483144654e-13, 2.697762308480891e-13, 4.477639194726859e-13, 7.537646543452977e-13, 1.2879117192923153e-12, 2.2352925604692273e-12, 3.943859693693548e-12, 7.0792441632566296e-12, 1.2937734515477572e-11, 2.4090042894815762e-11, 4.57283711549857e-11, 8.853301608204149e-11, 1.7487343561512954e-10, 3.524359570638238e-10, 7.246271873734502e-10, 1.519377134686033e-09, 3.2469347976602865e-09, 7.066289604194117e-09, 1.564588814864436e-08, 3.520693672877843e-08, 8.042131854357666e-08, 1.8625643511409133e-07, 4.3685154381483165e-07, 1.0364316756368917e-06, 2.484616992228694e-06, 6.012433083136583e-06, 1.467265938740335e-05, 3.608009870278515e-05, 8.932965014042493e-05, 0.00022253371758163508, 0.0005574470708723787, 0.0014034074956775138, 0.0035491757339340064, 0.009012591393401412, 0.02297133637734668, 0.0587478185173636, 0.15070823121806937, 0.38771011751025636, 1.0, 2.585379920006156, 6.698826393888632, 17.392019606016696, 45.23896611078947, 117.8766178056751, 307.639263367729, 804.094006877367, 2104.646848814137, 5515.937918789917, 14474.086749160448, 38024.344920875345, 100000.23135800364, 263257.9009574566, 693709.5647373124, 1829643.8263492617, 4829771.710129126, 12759629.090137372, 33735146.88174236, 89257214.3029794, 236322189.45690498, 626111266.447086, 1659857426.4134448, 4403009601.971595, 11686278494.145418, 31034126673.879814, 82457312507.1235, 219197439721.86502, 582974197385.9774, 1551179996498.247, 4129201001797.44, 10996468826127.072, 29296566749344.39, 78081784925622.83, 208183304301604.3, 555263603486014.1, 1481507888159159.0, 3954164987991990.0, 1.0557146469819566e+16, 2.8195149137957164e+16, 7.532406044024442e+16, 2.0128904771372426e+17, 5.3805849497926195e+17, 1.4386587611508058e+18, 3.8477005840324244e+18, 1.029333977329114e+19, 2.754352188722791e+19, 7.3720363828150845e+19, 1.9735910395238964e+20, 5.2847634514429084e+20], +[4.008485798764908e-16, 5.94390363640448e-16, 8.885686374956124e-16, 1.3396350115026486e-15, 2.037587585846699e-15, 3.1278699317427804e-15, 4.848006249159988e-15, 7.590166464878443e-15, 1.2009298499994042e-14, 1.9212358649889163e-14, 3.109379427494617e-14, 5.0938422862364675e-14, 8.452021166628311e-14, 1.421343934392086e-13, 2.424131488944e-13, 4.1960330805860056e-13, 7.376722738760318e-13, 1.3181017166460732e-12, 2.3955722749630266e-12, 4.431418649914601e-12, 8.34870288576296e-12, 1.6027437532293873e-11, 3.1365005618345997e-11, 6.258307413619619e-11, 1.2732325994029966e-10, 2.640674502951106e-10, 5.580866215686607e-10, 1.201164678182425e-09, 2.6307166260582357e-09, 5.857459735588431e-09, 1.3245116163050657e-08, 3.038319661469488e-08, 7.062395036543603e-08, 1.6615956644480433e-07, 3.9526057483522904e-07, 9.496881616755856e-07, 2.302515808995711e-06, 5.628155514233293e-06, 1.3858726430372104e-05, 3.4352614481320006e-05, 8.566295473698316e-05, 0.00021476847923907033, 0.0005410870797390504, 0.0013692496910569214, 0.003478876561119855, 0.008871113137832187, 0.022696525256985935, 0.05824487597174774, 0.14988624281920254, 0.38669818860687416, 1.0, 2.591587214831344, 6.729739624159675, 17.50786256161132, 45.6260216214795, 119.09251105791587, 311.31597290626996, 814.9304936066126, 2136.0083994297547, 5605.4830190351795, 14727.139139010224, 38733.73068084439, 101976.16009912545, 268733.2365771958, 708817.6449168253, 1871185.6099597036, 4943662.925149097, 13071106.555119975, 34585224.1102205, 91573115.25652912, 242621930.80406317, 643225577.4621196, 1706299122.022903, 4528912172.322065, 12027310454.00467, 31957202677.534725, 84954222691.28644, 225947800635.5076, 601214853737.7573, 1600448581468.724, 4262227826822.5645, 11355529882672.48, 30265458498439.31, 80695606053809.64, 215233221923649.6, 574274915775275.0, 1532766981934519.8, 4092352946048841.0, 1.0929639818479912e+16, 2.9199125643018292e+16, 7.80298381184281e+16, 2.0858077301020605e+17, 5.5770763589414675e+17, 1.4916052043728266e+18, 3.990364564576687e+18, 1.067773688981738e+19, 2.857923065688116e+19, 7.651091560471681e+19, 2.04877760448308e+20, 5.4873407006817904e+20], +[1.6434783867061746e-16, 2.4867330013701173e-16, 3.794922469332575e-16, 5.843071982734661e-16, 9.080506441782934e-16, 1.4249054840981775e-15, 2.2586939312652344e-15, 3.618466895613512e-15, 5.861400779267525e-15, 9.605397883849914e-15, 1.5933392284354073e-14, 2.6769254617511e-14, 4.5579495182537733e-14, 7.870285920920266e-14, 1.3790873695925556e-13, 2.4539835216694315e-13, 4.437396026944718e-13, 8.159266068263601e-13, 1.5265505075933006e-12, 2.9076895005165475e-12, 5.641003214984282e-12, 1.1149929477065577e-11, 2.2457431962745194e-11, 4.6089728853813725e-11, 9.636117321926327e-11, 2.051471952727202e-10, 4.4445304835751367e-10, 9.791387207930793e-10, 2.1914218747187516e-09, 4.977794081063973e-09, 1.1463561604127401e-08, 2.673674755956479e-08, 6.308757765137943e-08, 1.5044611057456055e-07, 3.6224191889858646e-07, 8.798406496041383e-07, 2.153945381627781e-06, 5.310802707590069e-06, 1.317896154828332e-05, 3.28948846060931e-05, 8.253920119772155e-05, 0.00020809476006933454, 0.0005269126578311301, 0.0013394340532570442, 0.0034170916468827806, 0.00874598116886155, 0.022452042637290233, 0.05779501862653927, 0.14914733572154595, 0.3857843224263527, 1.0, 2.5972395793678786, 6.757993866402488, 17.614108137438386, 45.982158109781786, 120.21465698310898, 314.7188036704227, 824.9863755496918, 2165.1833182556825, 5688.979847230466, 14963.619644382812, 39398.03874584048, 103830.16183812573, 273880.24510387355, 723044.7217559288, 1910370.075433623, 5051260.981553431, 13365814.53343142, 35390681.83643085, 93770437.20981537, 248606846.2208703, 659504677.0920215, 1750526424.7376418, 4648946570.239138, 12352797473.11231, 32839111261.07794, 87342131850.7624, 232409593307.73947, 618691618441.1149, 1647695074873.9316, 4389901949046.297, 11700421146541.496, 31196837016467.137, 83210104894187.33, 222020137422882.6, 592589714258062.6, 1582181210727884.8, 4225653601309521.5, 1.1289183808999836e+16, 3.016878546179479e+16, 8.064465721827835e+16, 2.1563136025992445e+17, 5.767173753652444e+17, 1.5428558699781084e+18, 4.1285301993305395e+18, 1.1050198898604182e+19, 2.9583266364292137e+19, 7.921739674027539e+19, 2.121732193877048e+20, 5.683991081582015e+20], +[7.066948769212205e-17, 1.0911152409676687e-16, 1.6998026391744286e-16, 2.672876908921384e-16, 4.2441005307739394e-16, 6.807744992581333e-16, 1.103641967699334e-15, 1.8091276912548764e-15, 3.0001846495567514e-15, 5.036157378919572e-15, 8.561914862428096e-15, 1.475104326812222e-14, 2.5770637707217657e-14, 4.568315858806277e-14, 8.22236352927492e-14, 1.5035738773014176e-13, 2.79516247842735e-13, 5.285532119590006e-13, 1.0171423860609511e-12, 1.992748118799507e-12, 3.975656006128714e-12, 8.077744917760329e-12, 1.671317239175358e-11, 3.5204418548200176e-11, 7.545845423503072e-11, 1.6448295621067032e-10, 3.643369421944391e-10, 8.193555815754478e-10, 1.8690097230356804e-09, 4.3200032296602295e-09, 1.0107588580315507e-08, 2.3914734164399563e-08, 5.716324194407424e-08, 1.379120451655436e-07, 3.3554343749097113e-07, 8.226449383799812e-07, 2.0308541603050416e-06, 5.045013535622601e-06, 1.2603925640961237e-05, 3.165031382188364e-05, 7.984943358575888e-05, 0.00020230295040300913, 0.0005145219554331616, 0.0013131956979434785, 0.003362383101608846, 0.008634546930037157, 0.022233170148488784, 0.05739031018717317, 0.14847956421303252, 0.3849549469805725, 1.0, 2.602408355460085, 6.783918999677743, 17.711906297869863, 46.310956588073196, 121.2535591137108, 317.8774635299528, 834.3436902704979, 2192.3944223624976, 5767.026414157304, 15185.119223411395, 40021.47398556207, 105573.2946657401, 278727.8968045008, 736466.4708421594, 1947394.459088499, 5153079.067970031, 13645086.572534904, 36154982.05385237, 95858161.61565767, 254300225.37808898, 675008939.7100312, 1792695820.9077237, 4763518384.096085, 12663790838.321665, 33682577745.62482, 89628106458.79391, 238601145067.49155, 635452038777.9553, 1693042871683.013, 4512543719942.686, 12031974617812.176, 32092864002299.734, 85630900308247.52, 228558662051420.72, 610246010519726.1, 1629849506453532.8, 4354324556408147.0, 1.1636449496959192e+16, 3.1105877479160964e+16, 8.317307767007363e+16, 2.224527040318977e+17, 5.951187541032861e+17, 1.5924917991256192e+18, 4.2624091630254213e+18, 1.1411278920354214e+19, 3.0557074969505337e+19, 8.184358883814307e+19, 2.192553748786303e+20, 5.874973568008839e+20], +[3.1801182667711764e-17, 5.0101989707847184e-17, 7.967758066563755e-17, 1.2795501872609507e-16, 2.075867229424091e-16, 3.403729370361639e-16, 5.6432257996547185e-16, 9.465259071720961e-16, 1.6069337664269582e-15, 2.762887223815374e-15, 4.813687410847202e-15, 8.50355483304762e-15, 1.5240343250899645e-14, 2.7728408986908643e-14, 5.1244801881078024e-14, 9.625299174908168e-14, 1.838397834338777e-13, 3.572006766912935e-13, 7.062737487973995e-13, 1.4213637201155862e-12, 2.9115598323302343e-12, 6.069862515276183e-12, 1.2874606377637146e-11, 2.7770741443050912e-11, 6.087925835218332e-11, 1.3553551111113567e-10, 3.061739969546701e-10, 7.011555507962892e-10, 1.6262007072430787e-09, 3.816157700216827e-09, 9.052239327611568e-09, 2.1685189413389562e-08, 5.241657774920201e-08, 1.2773735467635696e-07, 3.1360536952272007e-07, 7.751139268172333e-07, 1.9274873162166544e-06, 4.819645607264216e-06, 1.2111962414311925e-05, 3.057670847380496e-05, 7.751138360236657e-05, 0.00019723286579082395, 0.0005036043586799524, 0.0012899369969645218, 0.003313615968534329, 0.008534699689282606, 0.02203611333611965, 0.05702431364481925, 0.14787316098472306, 0.38419888070542796, 1.0, 2.6071531424766095, 6.8077923665952005, 17.802229689883543, 46.61546312852461, 122.21819994989609, 320.8174873604337, 843.0732905077308, 2217.835025660336, 5840.143783545199, 15393.029785639474, 40607.72944698221, 107215.30641236965, 283301.8186230341, 749150.0571256352, 1982434.3700754174, 5249575.48013134, 13910117.004318168, 36881233.854347676, 97844375.54312715, 259723091.28566393, 689792994.3998395, 1832949230.3425922, 4872996256.453844, 12961248085.801695, 34490089432.584946, 91818608339.4619, 244539246278.58923, 651539752644.7927, 1736605416305.971, 4630448146186.333, 12350957695719.133, 32955536376830.363, 87963190552955.83, 234862332667963.78, 627279069724524.4, 1675863775413539.0, 4478605428888525.5, 1.1972061864565202e+16, 3.201203246817276e+16, 8.561935640640733e+16, 2.290559210660619e+17, 6.129408146877937e+17, 1.6405888966240435e+18, 4.392199918295738e+18, 1.176149606856544e+19, 3.1502014843949584e+19, 8.439304776743474e+19, 2.261335389052185e+20, 6.060532112881603e+20], +[1.4946465202581674e-17, 2.4028253823532652e-17, 3.9008117797636207e-17, 6.39755723642332e-17, 1.0604435912258068e-16, 1.7773536285518716e-16, 3.0135800143436187e-16, 5.171718200140912e-16, 8.987960031836293e-16, 1.5827102933710221e-15, 2.8255454457477474e-15, 5.1169783412449535e-15, 9.40553605763185e-15, 1.7557090405413602e-14, 3.3300054598729477e-14, 6.42036651919164e-14, 1.258811194869085e-13, 2.510524872071354e-13, 5.093695376979742e-13, 1.0513892032976074e-12, 2.207420488736102e-12, 4.712557063367398e-12, 1.0225157486541553e-11, 2.253494432307511e-11, 5.0407653042954616e-11, 1.1434871321140136e-10, 2.6283051293871495e-10, 6.115484230549065e-10, 1.4391121182713806e-09, 3.4219375690239265e-09, 8.214525703578288e-09, 1.9891380785922575e-08, 4.854916961697225e-08, 1.1934955711646322e-07, 2.9532184861758327e-07, 7.350981832274717e-07, 1.8396447880112522e-06, 4.626456208204177e-06, 1.1686843869426444e-05, 2.9642061869422137e-05, 7.546191652372204e-05, 0.00019276021667193256, 0.0004939163341587318, 0.0012691847483050185, 0.0032698831848162174, 0.008444737643926552, 0.021857787378389625, 0.056691754669483195, 0.14732006354029667, 0.3835068290486628, 1.0, 2.6115241205872364, 6.829848854941532, 17.885906660882313, 46.89828556464031, 123.11630801759844, 323.56094901818074, 851.2366994481574, 2241.673699057839, 5908.788153856594, 15588.574621543019, 41160.06257300607, 108764.82480465878, 287624.7672744869, 761155.3096728448, 2015646.7037548192, 5341160.840553032, 14161978.829855444, 37572237.73056093, 99736381.44060068, 264894472.34584844, 703906399.6171104, 1871415680.5018857, 4977716041.747126, 13246043334.790907, 35263921310.51287, 93919558676.93678, 250239309873.90448, 666994886560.6084, 1778487196541.1956, 4743887374348.201, 12658079396255.318, 33786701857421.336, 90211792332562.6, 240943709755824.72, 643721656881122.9, 1720309517638581.0, 4598719410323811.0, 1.2296603749339236e+16, 3.288877299902034e+16, 8.798747237798494e+16, 2.3545141348545942e+17, 6.302107614421101e+17, 1.6872183356447588e+18, 4.518088741079407e+18, 1.2101338049769153e+19, 3.2419363369755656e+19, 8.6869120425786e+19, 2.3281648394076665e+20, 6.240896732318996e+20], +[7.32367344052247e-18, 1.2013864767483158e-17, 1.9909666031709582e-17, 3.334694914854916e-17, 5.647453909517319e-17, 9.675144606444112e-17, 1.6775828767597246e-16, 2.9454715161170085e-16, 5.239622797250333e-16, 9.448319896085692e-16, 1.7280444685391294e-15, 3.207257381237499e-15, 6.043856470471805e-15, 1.156913833146827e-14, 2.250468074263265e-14, 4.450120746113119e-14, 8.947343149577879e-14, 1.829285826066601e-13, 3.8029005055148624e-13, 8.037299544908464e-13, 1.7263061448889553e-12, 3.766402317807855e-12, 8.34200279136659e-12, 1.8742877033708616e-11, 4.268518532172449e-11, 9.845155395950859e-11, 2.2976831681875574e-10, 5.421206893512281e-10, 1.2920022759145437e-09, 3.1076284472715248e-09, 7.53788079939617e-09, 1.8424753501865266e-08, 4.5351119548353376e-08, 1.1233996519123429e-07, 2.7989209440680883e-07, 7.01019909118555e-07, 1.7642031205884476e-06, 4.459238971535885e-06, 1.1316206012033895e-05, 2.882171331271125e-05, 7.365186756503112e-05, 0.00018878723425985543, 0.00048526447540967344, 0.0012505597396267577, 0.0032304516166119235, 0.008363274159721311, 0.0216956594991396, 0.056388271463223893, 0.14681355872012858, 0.38287100299190163, 1.0, 2.615563842859314, 6.850288738866701, 17.963647142160408, 47.161669869586575, 123.954570316393, 326.1270316044305, 858.887606431054, 2264.0581319506614, 5973.360717345593, 15772.833374496058, 41681.35808942707, 110229.51517095466, 291717.023537971, 772535.7053608809, 2047172.0922382425, 5428204.197430849, 14401638.890066849, 38230523.3036586, 101540790.96333534, 269831635.75332874, 717394224.0104551, 1908212752.6330814, 5077984409.143198, 13518976269.949493, 36006158466.33554, 95936393977.75378, 255715511216.0521, 681854405514.5084, 1818784619474.8186, 4853112885860.613, 12953995857751.826, 34588072780276.695, 92381175533550.31, 246814464791321.72, 659604256802615.5, 1763266381171584.5, 4714874664344070.0, 1.2610619373433572e+16, 3.3737522356714064e+16, 9.028114910615896e+16, 2.4164892588030707e+17, 6.469541050457281e+17, 1.7324469243795907e+18, 4.640250651030854e+18, 1.2431263526423124e+19, 3.331032294540405e+19, 8.927496001561507e+19, 2.3931248183521696e+20, 6.416284496316001e+20], +[3.7349750884242135e-18, 6.251840453313855e-18, 1.0576252960926759e-17, 1.809039183720153e-17, 3.130070035183258e-17, 5.480959849789353e-17, 9.717845788672291e-17, 1.7454787865005848e-16, 3.177708774098667e-16, 5.866673716875725e-16, 1.0989200228559466e-15, 2.0895021411575466e-15, 4.0346805561857576e-15, 7.914516224537192e-15, 1.577651599222254e-14, 3.196293550058487e-14, 6.581964229817759e-14, 1.3775385635665745e-13, 2.929518771112812e-13, 6.328155540921528e-13, 1.3878204279204705e-12, 3.088169369078936e-12, 6.967476818112519e-12, 1.5926495538437894e-11, 3.68534790572446e-11, 8.625488229643546e-11, 2.0401803208696257e-10, 4.87273837929232e-10, 1.1742233817729593e-09, 2.8528093482975486e-09, 6.982827150620954e-09, 1.7208416060019154e-08, 4.2671614721824394e-08, 1.0641088200507393e-07, 2.6672509075203236e-07, 6.716999006484396e-07, 1.6987998027046023e-06, 4.3132456843190915e-06, 1.0990486524749582e-05, 2.8096392665715684e-05, 7.204244139649298e-05, 0.00018523605215733165, 0.0004774933889290776, 0.0012337547484060222, 0.003194722619768651, 0.008289168519242803, 0.021547631391334556, 0.05611022631055956, 0.14634801241482753, 0.38228482642171246, 1.0, 2.6193086327931363, 6.869283840815347, 18.036063138731713, 47.40756104268009, 124.73880280953637, 328.53248802529475, 866.0730822762595, 2285.1182881027758, 6034.215762317741, 15946.762671792178, 42174.18022337763, 111616.21202710466, 295596.7227699394, 783339.197107096, 2077136.9763975758, 5511038.202404006, 14629970.795262672, 38858381.59770188, 103263605.52611706, 274550288.5619885, 730297548.4312081, 1943447835.6460004, 5174081975.921542, 13780779976.137352, 36718715688.47134, 97874115153.94873, 260980911086.5384, 696152421386.1661, 1857586785536.731, 4958357441314.271, 13239315228746.38, 35361238398790.69, 94475494195009.9, 252485458302099.88, 674955271015022.5, 1804808659210057.5, 4827265582856562.0, 1.2914617520627492e+16, 3.45596125824521e+16, 9.25038750534239e+16, 2.4765759695289197e+17, 6.631947935739693e+17, 1.7763374387946227e+18, 4.758850257156263e+18, 1.2751704267601783e+19, 3.4176026459691766e+19, 9.161353998694654e+19, 2.4562933935522765e+20, 6.586900435310049e+20], +], dtype='float64') + + +@jit(nopython=True, cache=True) +def taylor(a,z): + z0 = int(np.round(z)) + zi = z0 + 50 + ai = a + return (a + 0.5)*(z - z0)**15*table[ai + 15, zi]/(1307674368000.0*a + 20268952704000.0) + (a + 0.5)*(z - z0)**14*table[ai + 14, zi]/(87178291200.0*a + 1264085222400.0) + (a + 0.5)*(z - z0)**13*table[ai + 13, zi]/(6227020800.0*a + 84064780800.0) + (a + 0.5)*(z - z0)**12*table[ai + 12, zi]/(479001600.0*a + 5987520000.0) + (a + 0.5)*(z - z0)**11*table[ai + 11, zi]/(39916800.0*a + 459043200.0) + (a + 0.5)*(z - z0)**10*table[ai + 10, zi]/(3628800.0*a + 38102400.0) + (a + 0.5)*(z - z0)**9*table[ai + 9, zi]/(362880.0*a + 3447360.0) + (a + 0.5)*(z - z0)**8*table[ai + 8, zi]/(40320.0*a + 342720.0) + (a + 0.5)*(z - z0)**7*table[ai + 7, zi]/(5040.0*a + 37800.0) + (a + 0.5)*(z - z0)**6*table[ai + 6, zi]/(720.0*a + 4680.0) + (a + 0.5)*(z - z0)**5*table[ai + 5, zi]/(120.0*a + 660.0) + (a + 0.5)*(z - z0)**4*table[ai + 4, zi]/(24.0*a + 108.0) + (a + 0.5)*(z - z0)**3*table[ai + 3, zi]/(6.0*a + 21.0) + (a + 0.5)*(z - z0)**2*table[ai + 2, zi]/(2.0*a + 5.0) + (a + 0.5)*(z - z0)*table[ai + 1, zi]/(a + 1.5) + table[ai, zi] + +@cuda.jit(fastmath=True, cache=True, device=True) +def taylor_cuda(a,z): + table = cuda.const.array_like(table) + z0 = int(round(z)) + zi = z0 + 50 + ai = a + + return (a + 0.5)*(z - z0)**15*table[ai + 15, zi]/(1307674368000.0*a + 20268952704000.0) + (a + 0.5)*(z - z0)**14*table[ai + 14, zi]/(87178291200.0*a + 1264085222400.0) + (a + 0.5)*(z - z0)**13*table[ai + 13, zi]/(6227020800.0*a + 84064780800.0) + (a + 0.5)*(z - z0)**12*table[ai + 12, zi]/(479001600.0*a + 5987520000.0) + (a + 0.5)*(z - z0)**11*table[ai + 11, zi]/(39916800.0*a + 459043200.0) + (a + 0.5)*(z - z0)**10*table[ai + 10, zi]/(3628800.0*a + 38102400.0) + (a + 0.5)*(z - z0)**9*table[ai + 9, zi]/(362880.0*a + 3447360.0) + (a + 0.5)*(z - z0)**8*table[ai + 8, zi]/(40320.0*a + 342720.0) + (a + 0.5)*(z - z0)**7*table[ai + 7, zi]/(5040.0*a + 37800.0) + (a + 0.5)*(z - z0)**6*table[ai + 6, zi]/(720.0*a + 4680.0) + (a + 0.5)*(z - z0)**5*table[ai + 5, zi]/(120.0*a + 660.0) + (a + 0.5)*(z - z0)**4*table[ai + 4, zi]/(24.0*a + 108.0) + (a + 0.5)*(z - z0)**3*table[ai + 3, zi]/(6.0*a + 21.0) + (a + 0.5)*(z - z0)**2*table[ai + 2, zi]/(2.0*a + 5.0) + (a + 0.5)*(z - z0)*table[ai + 1, zi]/(a + 1.5) + table[ai, zi] +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_helpers_cuda.py",".py","1086822","37369","import numpy as np +from numba import njit +from numba import cuda +import math +try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator + +@cuda.jit(fastmath=True, cache=True, device=True) +def coulomb_rys(roots,weights,G,rpq2, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L): + # X = rpq2*rho + + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + # G = np.zeros((n+1,m+1)) + + # roots, weights = Roots(norder,X,roots,weights) + A = alphaik+alphajk + B = alphakk+alphalk + Ap = alphaik*alphajk + Bp = alphakk*alphalk + ABsrt = math.sqrt(A*B) + + ijkl = 0.0 + for i in range(norder): + G = Recur(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + + Ix = Int1d(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0], + alphaik,alphajk,alphakk,alphalk) + + G = Recur(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + Iy = Int1d(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1], + alphaik,alphajk,alphakk,alphalk) + + G = Recur(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + + Iz = Int1d(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2], + alphaik,alphajk,alphakk,alphalk) + ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + + + + val = 2*math.sqrt(rho/math.pi)*ijkl # ABD eq 5 & 9 + + + return val + +@njit(cache=True, fastmath=True, error_model='numpy', nogil=True)#, locals=dict(ijkl=np.float32, Ix=np.float32, Iy=np.float32, Iz=np.float32, val=np.float32) +def coulomb_rys_3c2e(roots,weights,G,rpq2, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L,IJ,P,prod_alphaikjk,gammaP,ABsrt): + + # A = alphaik+alphajk + A = gammaP + B = alphakk#+alphalk + # Ap = alphaik*alphajk + Ap = prod_alphaikjk + # ABsrt = math.sqrt(A*B) + # KL = K + + ijkl = 0.0 + tot_ang = la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd + pi = 3.141592653589793 + + + for i in range(norder): + if tot_ang==0: + Gx = Ap/A*(IJ[0]**2) + G00 = math.pi / ABsrt + Ix = math.exp(-Gx)*G00 + Gy = Ap/A*(IJ[1]**2) + Iy = math.exp(-Gy)*G00 + Gz = Ap/A*(IJ[2]**2) + Iz = math.exp(-Gz)*G00 + ijkl += (Ix*Iy*Iz)*weights[0] + elif ((tot_ang==1) and (la+ma+na==1)): #(ps|s) # Doesn't seem give any speeed advantage whatsoever + ooopt = 1/(1+roots[0]) + G[0,0] = pi*math.exp(-Ap*(IJ[0])**2/A)/ABsrt + if la==1: + C = (P[0]-I[0])*ooopt + (B*(K[0]-I[0])+A*(P[0]-I[0]))*roots[0]*ooopt/(A+B) + G[1,0] = C*G[0,0] + Ix = G[1,0] + else: + Ix = G[0,0] + G[0,0] = pi*math.exp(-Ap*(IJ[1])**2/A)/ABsrt + if ma==1: + C = (P[1]-I[1])*ooopt + (B*(K[1]-I[1])+A*(P[1]-I[1]))*roots[0]*ooopt/(A+B) + G[1,0] = C*G[0,0] + Iy = G[1,0] + else: + Iy = G[0,0] + G[0,0] = pi*math.exp(-Ap*(IJ[2])**2/A)/ABsrt + if na==1: + C = (P[2]-I[2])*ooopt + (B*(K[2]-I[2])+A*(P[2]-I[2]))*roots[0]*ooopt/(A+B) + G[1,0] = C*G[0,0] + Iz = G[1,0] + else: + Iz = G[0,0] + ijkl += (Ix*Iy*Iz)*weights[0] + else: + G = Recur_3c2e(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + Ix = Shift_3c2e(G,la,lb,lc,ld,IJ[0]) + G = Recur_3c2e(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + Iy = Shift_3c2e(G,ma,mb,mc,md,IJ[1]) + G = Recur_3c2e(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + Iz = Shift_3c2e(G,na,nb,nc,nd,IJ[2]) + ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + # G = Recur_3c2e(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + # Ix = Shift_3c2e(G,la,lb,lc,ld,IJ[0]) + # G = Recur_3c2e(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + # Iy = Shift_3c2e(G,ma,mb,mc,md,IJ[1]) + # G = Recur_3c2e(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk,A,B,Ap,ABsrt) + # Iz = Shift_3c2e(G,na,nb,nc,nd,IJ[2]) + # ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + + + val = 2*math.sqrt(rho/pi)*ijkl # ABD eq 5 & 9 + + return val + +@cuda.jit(fastmath=True, cache=True, device=True) +def coulomb_rys_fp32(roots,weights,G,rpq2, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L): + # X = rpq2*rho + + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + # G = np.zeros((n+1,m+1)) + + # roots, weights = Roots(norder,X,roots,weights) + A = alphaik+alphajk + B = alphakk+alphalk + Ap = alphaik*alphajk + Bp = alphakk*alphalk + ABsrt = math.sqrt(A*B) + + ijkl = 0.0 + for i in range(norder): + G = Recur_fp32(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + + Ix = Int1d_fp32(G,roots[i],la,lb,lc,ld,I[0],J[0],K[0],L[0], + alphaik,alphajk,alphakk,alphalk) + + G = Recur_fp32(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + Iy = Int1d_fp32(G,roots[i],ma,mb,mc,md,I[1],J[1],K[1],L[1], + alphaik,alphajk,alphakk,alphalk) + + G = Recur_fp32(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2],alphaik,alphajk,alphakk,alphalk,A,B,Ap,Bp,ABsrt) + + Iz = Int1d_fp32(G,roots[i],na,nb,nc,nd,I[2],J[2],K[2],L[2], + alphaik,alphajk,alphakk,alphalk) + ijkl += Ix*Iy*Iz*weights[i] # ABD eq 5 & 9 + + + + val = 2*math.sqrt(rho/math.pi)*ijkl # ABD eq 5 & 9 + + + return val + +@cuda.jit(fastmath=True, cache=True, device=True) +def Int1d(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal): + #G = RecurNumba2(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal) + return Shift(G,ix,jx,kx,lx,xi-xj,xk-xl) + +@cuda.jit(fastmath=True, cache=True, device=True) +def Int1d_fp32(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal): + #G = RecurNumba2(G,t,ix,jx,kx,lx,xi,xj,xk,xl,alphai,alphaj,alphak,alphal) + return Shift_fp32(G,ix,jx,kx,lx,xi-xj,xk-xl) + +""Form G(n,m)=I(n,0,m,0) intermediate values for a Rys polynomial"" +@cuda.jit(fastmath=True, cache=True, device=True) +def Recur(G,t,i,j,k,l,xi,xj,xk,xl,alphai,alphaj,alphak,alphal,A,B,Ap,Bp,ABsrt): + # print('RecurNumba1', G[0,0]) + # G1 = np.zeros((n1+1,m1+1)) + + n = i+j + m = k+l + # A = alphai+alphaj + # B = alphak+alphal + Px = (alphai*xi+alphaj*xj)/A + Qx = (alphak*xk+alphal*xl)/B + + C,Cp,B0,B1,B1p = RecurFactors(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = math.pi*math.exp(-Ap*(xi-xj)**2/A - Bp*(xk-xl)**2/B)/ABsrt + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +@cuda.jit(fastmath=True, cache=True, device=True) +def Recur_3c2e(G,t,i,j,k,l,xi,xj,xk,xl,alphai,alphaj,alphak,alphal,A,B,Ap,ABsrt): + + n = i+j + m = k+l + Px = (alphai*xi+alphaj*xj)/A + Qx = (alphak*xk+alphal*xl)/B + pi = 3.141592653589793 + + C,Cp,B0,B1,B1p = RecurFactors(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = pi*math.exp(-Ap*(xi-xj)**2/A)/ABsrt + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +""Form G(n,m)=I(n,0,m,0) intermediate values for a Rys polynomial"" +@cuda.jit(fastmath=True, cache=True, device=True) +def Recur_fp32(G,t,i,j,k,l,xi,xj,xk,xl,alphai,alphaj,alphak,alphal,A,B,Ap,Bp,ABsrt): + # print('RecurNumba1', G[0,0]) + # G1 = np.zeros((n1+1,m1+1)) + + n = i+j + m = k+l + # A = alphai+alphaj + # B = alphak+alphal + Px = (alphai*xi+alphaj*xj)/A + Qx = (alphak*xk+alphal*xl)/B + + C,Cp,B0,B1,B1p = RecurFactors(t,A,B,Px,Qx,xi,xk) + + + # ABD eq 11. + G[0,0] = math.pi*math.exp(-Ap*(xi-xj)**2/A - Bp*(xk-xl)**2/B)/ABsrt + + + + if n > 0: G[1,0] = C*G[0,0] # ABD eq 15 + if m > 0: G[0,1] = Cp*G[0,0] # ABD eq 16 + + for a in range(2,n+1): + G[a,0] = B1*(a-1)*G[a-2,0] + C*G[a-1,0] + + for b in range(2,m+1): + G[0,b] = B1p*(b-1)*G[0,b-2] + Cp*G[0,b-1] + + + + if m==0 or n==0: + return G + + for a in range(1,n+1): + G[a,1] = a*B0*G[a-1,0] + Cp*G[a,0] + for b in range(2,m+1): + G[a,b] = B1p*(b-1)*G[a,b-2] + a*B0*G[a-1,b-1] + Cp*G[a,b-1] + + + + return G + +@cuda.jit(fastmath=True, cache=True, device=True) +def RecurFactors(t,A,B,Px,Qx,xi,xk): + ooopt = 1/(1+t) + fact = t*ooopt/(A+B) + B0 = 0.5*fact + # B1 = 0.5*ooopt/A + 0.5*fact + # B1p = 0.5*ooopt/B + 0.5*fact + B1 = 0.5*ooopt/A + B0 + B1p = 0.5*ooopt/B + B0 + C = (Px-xi)*ooopt + (B*(Qx-xi)+A*(Px-xi))*fact + Cp = (Qx-xk)*ooopt + (B*(Qx-xk)+A*(Px-xk))*fact + return C,Cp,B0,B1,B1p + +@cuda.jit(fastmath=True, cache=True, device=True) +def RecurFactors_fp32(t,A,B,Px,Qx,xi,xk): + ooopt = 1/(1+t) + fact = t*ooopt/(A+B) + B0 = 0.5*fact + # B1 = 0.5*ooopt/A + 0.5*fact + # B1p = 0.5*ooopt/B + 0.5*fact + B1 = 0.5*ooopt/A + B0 + B1p = 0.5*ooopt/B + B0 + C = (Px-xi)*ooopt + (B*(Qx-xi)+A*(Px-xi))*fact + Cp = (Qx-xk)*ooopt + (B*(Qx-xk)+A*(Px-xk))*fact + return C,Cp,B0,B1,B1p + +LOOKUP_TABLE = np.array([ + 1, 1, 2, 6, 24, 120, 720, 5040, 40320, + 362880, 3628800, 39916800, 479001600, + 6227020800, 87178291200, 1307674368000, + 20922789888000, 355687428096000, 6402373705728000, + 121645100408832000, 2432902008176640000], dtype='int64') + +@cuda.jit(fastmath=True, cache=True, device=True) +def fastFactorial(n): + # This is the way to access global constant arrays (which need to be on host, i.e. created using numpy for some reason) + # See https://stackoverflow.com/questions/63311574/in-numba-how-to-copy-an-array-into-constant-memory-when-targeting-cuda + LOOKUP_TABLE_ = cuda.const.array_like(LOOKUP_TABLE) + # 2-3x faster than the fastFactorial_old for values less than 21 + if n<= 1: + return 1 + elif n<=20: + return LOOKUP_TABLE_[n] + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + +LOOKUP_TABLE_COMB = np.array([[ 1, 0, 0, 0, 0, 0], + [ 1, 1, 0, 0, 0, 0], + [ 1, 2, 1, 0, 0, 0], + [ 1, 3, 3, 1, 0, 0], + [ 1, 4, 6, 4, 1, 0], + [ 1, 5, 10, 10, 5, 1]]) + +@cuda.jit(fastmath=True, cache=True, device=True) +def comb(x, y): + table = cuda.const.array_like(LOOKUP_TABLE_COMB) + if y == 0: + return 1 + if x == y: + return 1 + if x<=5 and y<=5: + return table[x,y] + binom = fastFactorial(x) // fastFactorial(y) // fastFactorial(x - y) + return binom + +@cuda.jit(fastmath=True, cache=True, device=True) +def Shift(G,i,j,k,l,xij,xkl): + table = cuda.const.array_like(LOOKUP_TABLE_COMB) + ijkl = 0.0 + for m in range(l+1): + ijm0 = 0.0 + if m<=5 and l<=5: + comb_2_ = table[l,m] + else: + comb_2_ = comb(l,m) + for n in range(j+1): + if n<=5 and j<=5: + comb_1_ = table[j,n] + else: + comb_1_ = comb(j,n) + ijm0 += comb_1_*xij**(j-n)*G[n+i,m+k] + + ijkl += comb_2_*xkl**(l-m)*ijm0 # I(i,j,k,l)<-I(i,j,m,0) + return ijkl + +@cuda.jit(fastmath=True, cache=True, device=True) +def Shift_3c2e(G,i,j,k,l,xij): + + ijm0 = 0.0 + for n in range(j+1): + if n<=5 and j<=5: + comb_1_ = LOOKUP_TABLE_COMB[j,n] + else: + comb_1_ = comb(j,n) + ijm0 += comb_1_*xij**(j-n)*G[n+i,k] + + ijkl = ijm0 # I(i,j,k,l)<-I(i,j,m,0) + return ijkl + +@cuda.jit(fastmath=True, cache=True, device=True) +def Shift_fp32(G,i,j,k,l,xij,xkl): + table = cuda.const.array_like(LOOKUP_TABLE_COMB) + ijkl = 0.0 + for m in range(l+1): + ijm0 = 0.0 + if m<=5 and l<=5: + comb_2_ = table[l,m] + else: + comb_2_ = comb(l,m) + for n in range(j+1): + if n<=5 and j<=5: + comb_1_ = table[j,n] + else: + comb_1_ = comb(j,n) + ijm0 += comb_1_*xij**(j-n)*G[n+i,m+k] + + ijkl += comb_2_*xkl**(l-m)*ijm0 # I(i,j,k,l)<-I(i,j,m,0) + return ijkl + +@cuda.jit(fastmath=True, cache=True, device=True) +def Roots(n,X,DATA_X_,DATA_W_,roots,weights): + POLY_SMALLX_R0_ = cuda.const.array_like(POLY_SMALLX_R0) + POLY_SMALLX_R1_ = cuda.const.array_like(POLY_SMALLX_R1) + POLY_SMALLX_W0_ = cuda.const.array_like(POLY_SMALLX_W0) + POLY_SMALLX_W1_ = cuda.const.array_like(POLY_SMALLX_W1) + POLY_LARGEX_RT_ = cuda.const.array_like(POLY_LARGEX_RT) + POLY_LARGEX_WW_ = cuda.const.array_like(POLY_LARGEX_WW) + PIE4 = 7.85398163397448E-01 + if X < 3.0E-7: + off = n * (n - 1) // 2 + for i in range(n): + roots[i] = POLY_SMALLX_R0_[off+i] + POLY_SMALLX_R1_[off+i] * X + weights[i] = POLY_SMALLX_W0_[off+i] + POLY_SMALLX_W1_[off+i] * X + return roots, weights + elif X > 35+n*5: + off = n * (n - 1) // 2 + t = math.sqrt(PIE4 / X) + for i in range(n): + rt = POLY_LARGEX_RT_[off+i] + roots[i] = rt / (X - rt) + weights[i] = POLY_LARGEX_WW_[off+i] * t + return roots, weights + + + if n == 1: + return Root1(X,n,roots,weights) + elif n == 2: + return Root2(X,n,roots,weights) + elif n == 3: + return Root3(X,n,roots,weights) + elif n == 4: + return Root4(X,n,roots,weights) + elif n == 5: + return Root5(X,n,roots,weights) + elif n>5 and n<11: + return Rootn(X,n,DATA_X_,DATA_W_,roots,weights) + +@cuda.jit(fastmath=True, cache=True, device=True) +def clenshaw_d1(roots_or_weights, x, u, n): + # Reference: https://github.com/sunqm/libcint/blob/master/src/polyfits.c (BSD-2 Clause license) + i = 0 + u2 = u * 2.0 + for i in range(n): + d0 = 0 + g0 = float(x[13 + 14 * i]) + d0 = u2 * g0 - d0 + x[12 + 14 * i] + g0 = u2 * d0 - g0 + x[11 + 14 * i] + d0 = u2 * g0 - d0 + x[10 + 14 * i] + g0 = u2 * d0 - g0 + x[9 + 14 * i] + d0 = u2 * g0 - d0 + x[8 + 14 * i] + g0 = u2 * d0 - g0 + x[7 + 14 * i] + d0 = u2 * g0 - d0 + x[6 + 14 * i] + g0 = u2 * d0 - g0 + x[5 + 14 * i] + d0 = u2 * g0 - d0 + x[4 + 14 * i] + g0 = u2 * d0 - g0 + x[3 + 14 * i] + d0 = u2 * g0 - d0 + x[2 + 14 * i] + g0 = u2 * d0 - g0 + x[1 + 14 * i] + roots_or_weights[i] = u * g0 - d0 + x[14 * i] * 0.5 + + return roots_or_weights + +@cuda.jit(fastmath=True, cache=True, device=True) +def Rootn(X,n,DATA_X_,DATA_W_,roots,weights): + datax = DATA_X_[((n - 1) * n // 2 - 15) * 14 * 31:] + dataw = DATA_W_[((n - 1) * n // 2 - 15) * 14 * 31:] + + if X <= 40.0: + it = int(X * 0.4) + tt = (X - it * 2.5) * 0.8 - 1.0 + else: + X -= 40.0 + it = int(X * 0.25) + tt = (X - it * 4) * 0.5 - 1.0 + it += 16 + + offset = n * 14 * it + roots = clenshaw_d1(roots, datax[offset:], tt, n) + weights = clenshaw_d1(weights, dataw[offset:], tt, n) + return roots, weights + +@cuda.jit(fastmath=True, cache=True, device=True) +def Root1(X,n,roots,weights): + if X < 3.0E-7: + roots0 = 0.5E+00-X/5.0E+00 + weights0 = 1.0E+00-X/3.0E+00 + elif X < 1.0: + F1 = ((((((((-8.36313918003957E-08*X+1.21222603512827E-06 )*X- + 1.15662609053481E-05 )*X+9.25197374512647E-05 )*X- + 6.40994113129432E-04 )*X+3.78787044215009E-03 )*X- + 1.85185172458485E-02 )*X+7.14285713298222E-02 )*X- + 1.99999999997023E-01 )*X+3.33333333333318E-01 + weights0 = (X+X)*F1+math.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 3.0: + Y = X-2.0E+00 + F1 = ((((((((((-1.61702782425558E-10*Y+1.96215250865776E-09 )*Y- + 2.14234468198419E-08 )*Y+2.17216556336318E-07 )*Y- + 1.98850171329371E-06 )*Y+1.62429321438911E-05 )*Y- + 1.16740298039895E-04 )*Y+7.24888732052332E-04 )*Y- + 3.79490003707156E-03 )*Y+1.61723488664661E-02 )*Y- + 5.29428148329736E-02 )*Y+1.15702180856167E-01 + weights0 = (X+X)*F1+math.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 5.0: + Y = X-4.0E+00 + F1 = ((((((((((-2.62453564772299E-11*Y+3.24031041623823E-10 )*Y- + 3.614965656163E-09)*Y+3.760256799971E-08)*Y- + 3.553558319675E-07)*Y+3.022556449731E-06)*Y- + 2.290098979647E-05)*Y+1.526537461148E-04)*Y- + 8.81947375894379E-04 )*Y+4.33207949514611E-03 )*Y- + 1.75257821619926E-02 )*Y+5.28406320615584E-02 + weights0 = (X+X)*F1+math.exp(-X) + roots0 = F1/(weights0-F1) + elif X < 10.0: + E = math.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X -3.1501078774085E-06)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + elif X < 15.0: + E = math.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + elif X < 33.0: + E = math.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = F1/(weights0-F1) + else: # X > 33 + weights0 = math.sqrt(PIE4/X) + roots0 = 0.5E+00/(X-0.5E+00) + + roots[0]=roots0 + weights[0]=weights0 + + return roots, weights + +R12,PIE4 = 2.75255128608411E-01, 7.85398163397448E-01 +R22,W22 = 2.72474487139158E+00, 9.17517095361369E-02 + +@cuda.jit(fastmath=True, cache=True, device=True) +def Root2(X,n, roots, weights): + + if X < 3.E-7: + roots0 = 1.30693606237085E-01-2.90430236082028E-02 *X + roots1 = 2.86930639376291E+00-6.37623643058102E-01 *X + weights0 = 6.52145154862545E-01-1.22713621927067E-01 *X + weights1 = 3.47854845137453E-01-2.10619711404725E-01 *X + elif X < 1.0: + F1 = ((((((((-8.36313918003957E-08*X+1.21222603512827E-06 )*X- + 1.15662609053481E-05 )*X+9.25197374512647E-05 )*X- + 6.40994113129432E-04 )*X+3.78787044215009E-03 )*X- + 1.85185172458485E-02 )*X+7.14285713298222E-02 )*X- + 1.99999999997023E-01 )*X+3.33333333333318E-01 + weights0 = (X+X)*F1+math.exp(-X) + roots0 = (((((((-2.35234358048491E-09*X+2.49173650389842E-08)*X- + 4.558315364581E-08)*X-2.447252174587E-06)*X+ + 4.743292959463E-05)*X-5.33184749432408E-04 )*X+ + 4.44654947116579E-03 )*X-2.90430236084697E-02 )*X+1.30693606237085E-01 + roots1 = (((((((-2.47404902329170E-08*X+2.36809910635906E-07)*X+ + 1.835367736310E-06)*X-2.066168802076E-05)*X- + 1.345693393936E-04)*X-5.88154362858038E-05 )*X+ + 5.32735082098139E-02 )*X-6.37623643056745E-01 )*X+2.86930639376289E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 3.0: + Y = X-2.0E+00 + F1 = ((((((((((-1.61702782425558E-10*Y+1.96215250865776E-09 )*Y- + 2.14234468198419E-08 )*Y+2.17216556336318E-07 )*Y- + 1.98850171329371E-06 )*Y+1.62429321438911E-05 )*Y- + 1.16740298039895E-04 )*Y+7.24888732052332E-04 )*Y- + 3.79490003707156E-03 )*Y+1.61723488664661E-02 )*Y- + 5.29428148329736E-02 )*Y+1.15702180856167E-01 + weights0 = (X+X)*F1+math.exp(-X) + roots0 = (((((((((-6.36859636616415E-12*Y+8.47417064776270E-11)*Y- + 5.152207846962E-10)*Y-3.846389873308E-10)*Y+ + 8.472253388380E-08)*Y-1.85306035634293E-06 )*Y+ + 2.47191693238413E-05 )*Y-2.49018321709815E-04 )*Y+ + 2.19173220020161E-03 )*Y-1.63329339286794E-02 )*Y+8.68085688285261E-02 + roots1 = ((((((((( 1.45331350488343E-10*Y+2.07111465297976E-09)*Y- + 1.878920917404E-08)*Y-1.725838516261E-07)*Y+ + 2.247389642339E-06)*Y+9.76783813082564E-06 )*Y- + 1.93160765581969E-04 )*Y-1.58064140671893E-03 )*Y+ + 4.85928174507904E-02 )*Y-4.30761584997596E-01 )*Y+1.80400974537950E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 5.0: + Y = X-4.0E+00 + F1 = ((((((((((-2.62453564772299E-11*Y+3.24031041623823E-10 )*Y- + 3.614965656163E-09)*Y+3.760256799971E-08)*Y- + 3.553558319675E-07)*Y+3.022556449731E-06)*Y- + 2.290098979647E-05)*Y+1.526537461148E-04)*Y- + 8.81947375894379E-04 )*Y+4.33207949514611E-03 )*Y- + 1.75257821619926E-02 )*Y+5.28406320615584E-02 + weights0 = (X+X)*F1+math.exp(-X) + roots0 = ((((((((-4.11560117487296E-12*Y+7.10910223886747E-11)*Y- + 1.73508862390291E-09 )*Y+5.93066856324744E-08 )*Y- + 9.76085576741771E-07 )*Y+1.08484384385679E-05 )*Y- + 1.12608004981982E-04 )*Y+1.16210907653515E-03 )*Y- + 9.89572595720351E-03 )*Y+6.12589701086408E-02 + roots1 = (((((((((-1.80555625241001E-10*Y+5.44072475994123E-10)*Y+ + 1.603498045240E-08)*Y-1.497986283037E-07)*Y- + 7.017002532106E-07)*Y+1.85882653064034E-05 )*Y- + 2.04685420150802E-05 )*Y-2.49327728643089E-03 )*Y+ + 3.56550690684281E-02 )*Y-2.60417417692375E-01 )*Y+1.12155283108289E+00 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 10.0: + E = math.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X - + 3.1501078774085E-06)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + Y = X-7.5E+00 + roots0 = (((((((((((((-1.43632730148572E-16*Y+2.38198922570405E-16)* + Y+1.358319618800E-14)*Y-7.064522786879E-14)*Y- + 7.719300212748E-13)*Y+7.802544789997E-12)*Y+ + 6.628721099436E-11)*Y-1.775564159743E-09)*Y+ + 1.713828823990E-08)*Y-1.497500187053E-07)*Y+ + 2.283485114279E-06)*Y-3.76953869614706E-05 )*Y+ + 4.74791204651451E-04 )*Y-4.60448960876139E-03 )*Y+3.72458587837249E-02 + roots1 = (((((((((((( 2.48791622798900E-14*Y-1.36113510175724E-13)*Y- + 2.224334349799E-12)*Y+4.190559455515E-11)*Y- + 2.222722579924E-10)*Y-2.624183464275E-09)*Y+ + 6.128153450169E-08)*Y-4.383376014528E-07)*Y- + 2.49952200232910E-06 )*Y+1.03236647888320E-04 )*Y- + 1.44614664924989E-03 )*Y+1.35094294917224E-02 )*Y- + 9.53478510453887E-02 )*Y+5.44765245686790E-01 + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 15.0: + E = math.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = ((((-1.01041157064226E-05*X+1.19483054115173E-03)*X - + 6.73760231824074E-02)*X+1.25705571069895E+00)*X + + (((-8.57609422987199E+03/X+5.91005939591842E+03)/X - + 1.70807677109425E+03)/X+2.64536689959503E+02)/X - + 2.38570496490846E+01)*E + R12/(X-R12) + roots1 = ((( 3.39024225137123E-04*X-9.34976436343509E-02)*X - + 4.22216483306320E+00)*X + + (((-2.08457050986847E+03/X - + 1.04999071905664E+03)/X+3.39891508992661E+02)/X - + 1.56184800325063E+02)/X+8.00839033297501E+00)*E + R22/(X-R22) + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + elif X < 33.0: + E = math.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + roots0 = ((((-1.14906395546354E-06*X+1.76003409708332E-04)*X - + 1.71984023644904E-02)*X-1.37292644149838E-01)*X + + (-4.75742064274859E+01/X+9.21005186542857E+00)/X - + 2.31080873898939E-02)*E + R12/(X-R12) + roots1 = ((( 3.64921633404158E-04*X-9.71850973831558E-02)*X - + 4.02886174850252E+00)*X + + (-1.35831002139173E+02/X - + 8.66891724287962E+01)/X+2.98011277766958E+00)*E + R22/(X-R22) + weights1 = ((F1-weights0)*roots0+F1)*(1.0E+00+roots1)/(roots1-roots0) + weights0 = weights0-weights1 + else: # X > 33 + weights0 = math.sqrt(PIE4/X) + if X < 40.0: + E = math.exp(-X) + roots0 = (-8.78947307498880E-01*X+1.09243702330261E+01)*E + R12/(X-R12) + roots1 = (-9.28903924275977E+00*X+8.10642367843811E+01)*E + R22/(X-R22) + weights1 = ( 4.46857389308400E+00*X-7.79250653461045E+01)*E + W22*weights0 + weights0 = weights0-weights1 + else: + roots0 = R12/(X-R12) + roots1 = R22/(X-R22) + weights1 = W22*weights0 + weights0 = weights0-weights1 + + roots[0] = roots0 + roots[1] = roots1 + weights[0]= weights0 + weights[1] = weights1 + + return roots, weights + +R13 = 1.90163509193487E-01 +R23,W23 = 1.78449274854325E+00, 1.77231492083829E-01 +R33,W33 = 5.52534374226326E+00, 5.11156880411248E-03 + +@cuda.jit(fastmath=True, cache=True, device=True) +def Root3(X,n,roots, weights): + + if X < 3.0E-7: + roots0 = 6.03769246832797E-02-9.28875764357368E-03 *X + roots1 = 7.76823355931043E-01-1.19511285527878E-01 *X + roots2 = 6.66279971938567E+00-1.02504611068957E+00 *X + weights0 = 4.67913934572691E-01-5.64876917232519E-02 *X + weights1 = 3.60761573048137E-01-1.49077186455208E-01 *X + weights2 = 1.71324492379169E-01-1.27768455150979E-01 *X + elif X < 1.0: + roots0 = ((((((-5.10186691538870E-10*X+2.40134415703450E-08)*X- + 5.01081057744427E-07 )*X+7.58291285499256E-06 )*X- + 9.55085533670919E-05 )*X+1.02893039315878E-03 )*X- + 9.28875764374337E-03 )*X+6.03769246832810E-02 + roots1 = ((((((-1.29646524960555E-08*X+7.74602292865683E-08)*X+ + 1.56022811158727E-06 )*X-1.58051990661661E-05 )*X- + 3.30447806384059E-04 )*X+9.74266885190267E-03 )*X- + 1.19511285526388E-01 )*X+7.76823355931033E-01 + roots2 = ((((((-9.28536484109606E-09*X-3.02786290067014E-07)*X- + 2.50734477064200E-06 )*X-7.32728109752881E-06 )*X+ + 2.44217481700129E-04 )*X+4.94758452357327E-02 )*X- + 1.02504611065774E+00 )*X+6.66279971938553E+00 + F2 = ((((((((-7.60911486098850E-08*X+1.09552870123182E-06 )*X- + 1.03463270693454E-05 )*X+8.16324851790106E-05 )*X- + 5.55526624875562E-04 )*X+3.20512054753924E-03 )*X- + 1.51515139838540E-02 )*X+5.55555554649585E-02 )*X- + 1.42857142854412E-01 )*X+1.99999999999986E-01 + E = math.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 3.0: + Y = X-2.0E+00 + roots0 = (((((((( 1.44687969563318E-12*Y+4.85300143926755E-12)*Y- + 6.55098264095516E-10 )*Y+1.56592951656828E-08 )*Y- + 2.60122498274734E-07 )*Y+3.86118485517386E-06 )*Y- + 5.13430986707889E-05 )*Y+6.03194524398109E-04 )*Y- + 6.11219349825090E-03 )*Y+4.52578254679079E-02 + roots1 = ((((((( 6.95964248788138E-10*Y-5.35281831445517E-09)*Y- + 6.745205954533E-08)*Y+1.502366784525E-06)*Y+ + 9.923326947376E-07)*Y-3.89147469249594E-04 )*Y+ + 7.51549330892401E-03 )*Y-8.48778120363400E-02 )*Y+5.73928229597613E-01 + roots2 = ((((((((-2.81496588401439E-10*Y+3.61058041895031E-09)*Y+ + 4.53631789436255E-08 )*Y-1.40971837780847E-07 )*Y- + 6.05865557561067E-06 )*Y-5.15964042227127E-05 )*Y+ + 3.34761560498171E-05 )*Y+5.04871005319119E-02 )*Y- + 8.24708946991557E-01 )*Y+4.81234667357205E+00 + F2 = ((((((((((-1.48044231072140E-10*Y+1.78157031325097E-09 )*Y- + 1.92514145088973E-08 )*Y+1.92804632038796E-07 )*Y- + 1.73806555021045E-06 )*Y+1.39195169625425E-05 )*Y- + 9.74574633246452E-05 )*Y+5.83701488646511E-04 )*Y- + 2.89955494844975E-03 )*Y+1.13847001113810E-02 )*Y- + 3.23446977320647E-02 )*Y+5.29428148329709E-02 + E = math.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 5.0: + Y = X-4.0E+00 + roots0 = ((((((( 1.44265709189601E-11*Y-4.66622033006074E-10)*Y+ + 7.649155832025E-09)*Y-1.229940017368E-07)*Y+ + 2.026002142457E-06)*Y-2.87048671521677E-05 )*Y+ + 3.70326938096287E-04 )*Y-4.21006346373634E-03 )*Y+3.50898470729044E-02 + roots1 = ((((((((-2.65526039155651E-11*Y+1.97549041402552E-10)*Y+ + 2.15971131403034E-09 )*Y-7.95045680685193E-08 )*Y+ + 5.15021914287057E-07 )*Y+1.11788717230514E-05 )*Y- + 3.33739312603632E-04 )*Y+5.30601428208358E-03 )*Y- + 5.93483267268959E-02 )*Y+4.31180523260239E-01 + roots2 = ((((((((-3.92833750584041E-10*Y-4.16423229782280E-09)*Y+ + 4.42413039572867E-08 )*Y+6.40574545989551E-07 )*Y- + 3.05512456576552E-06 )*Y-1.05296443527943E-04 )*Y- + 6.14120969315617E-04 )*Y+4.89665802767005E-02 )*Y- + 6.24498381002855E-01 )*Y+3.36412312243724E+00 + F2 = ((((((((((-2.36788772599074E-11*Y+2.89147476459092E-10 )*Y- + 3.18111322308846E-09 )*Y+3.25336816562485E-08 )*Y- + 3.00873821471489E-07 )*Y+2.48749160874431E-06 )*Y- + 1.81353179793672E-05 )*Y+1.14504948737066E-04 )*Y- + 6.10614987696677E-04 )*Y+2.64584212770942E-03 )*Y- + 8.66415899015349E-03 )*Y+1.75257821619922E-02 + E = math.exp(-X) + F1 = ((X+X)*F2+E)/3.0E+00 + weights0 = (X+X)*F1+E + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 10.0: + E = math.exp(-X) + weights0 = (((((( 4.6897511375022E-01/X-6.9955602298985E-01)/X + + 5.3689283271887E-01)/X-3.2883030418398E-01)/X + + 2.4645596956002E-01)/X-4.9984072848436E-01)/X - + 3.1501078774085E-06)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + Y = X-7.5E+00 + roots0 = ((((((((((( 5.74429401360115E-16*Y+7.11884203790984E-16)*Y- + 6.736701449826E-14)*Y-6.264613873998E-13)*Y+ + 1.315418927040E-11)*Y-4.23879635610964E-11 )*Y+ + 1.39032379769474E-09 )*Y-4.65449552856856E-08 )*Y+ + 7.34609900170759E-07 )*Y-1.08656008854077E-05 )*Y+ + 1.77930381549953E-04 )*Y-2.39864911618015E-03 )*Y+2.39112249488821E-02 + roots1 = ((((((((((( 1.13464096209120E-14*Y+6.99375313934242E-15)*Y- + 8.595618132088E-13)*Y-5.293620408757E-12)*Y- + 2.492175211635E-11)*Y+2.73681574882729E-09 )*Y- + 1.06656985608482E-08 )*Y-4.40252529648056E-07 )*Y+ + 9.68100917793911E-06 )*Y-1.68211091755327E-04 )*Y+ + 2.69443611274173E-03 )*Y-3.23845035189063E-02 )*Y+2.75969447451882E-01 + roots2 = (((((((((((( 6.66339416996191E-15*Y+1.84955640200794E-13)*Y- + 1.985141104444E-12)*Y-2.309293727603E-11)*Y+ + 3.917984522103E-10)*Y+1.663165279876E-09)*Y- + 6.205591993923E-08)*Y+8.769581622041E-09)*Y+ + 8.97224398620038E-06 )*Y-3.14232666170796E-05 )*Y- + 1.83917335649633E-03 )*Y+3.51246831672571E-02 )*Y- + 3.22335051270860E-01 )*Y+1.73582831755430E+00 + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 15.0: + E = math.exp(-X) + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + Y = X-12.5E+00 + roots0 = ((((((((((( 4.42133001283090E-16*Y-2.77189767070441E-15)*Y- + 4.084026087887E-14)*Y+5.379885121517E-13)*Y+ + 1.882093066702E-12)*Y-8.67286219861085E-11 )*Y+ + 7.11372337079797E-10 )*Y-3.55578027040563E-09 )*Y+ + 1.29454702851936E-07 )*Y-4.14222202791434E-06 )*Y+ + 8.04427643593792E-05 )*Y-1.18587782909876E-03 )*Y+1.53435577063174E-02 + roots1 = ((((((((((( 6.85146742119357E-15*Y-1.08257654410279E-14)*Y- + 8.579165965128E-13)*Y+6.642452485783E-12)*Y+ + 4.798806828724E-11)*Y-1.13413908163831E-09 )*Y+ + 7.08558457182751E-09 )*Y-5.59678576054633E-08 )*Y+ + 2.51020389884249E-06 )*Y-6.63678914608681E-05 )*Y+ + 1.11888323089714E-03 )*Y-1.45361636398178E-02 )*Y+1.65077877454402E-01 + roots2 = (((((((((((( 3.20622388697743E-15*Y-2.73458804864628E-14)*Y- + 3.157134329361E-13)*Y+8.654129268056E-12)*Y- + 5.625235879301E-11)*Y-7.718080513708E-10)*Y+ + 2.064664199164E-08)*Y-1.567725007761E-07)*Y- + 1.57938204115055E-06 )*Y+6.27436306915967E-05 )*Y- + 1.01308723606946E-03 )*Y+1.13901881430697E-02 )*Y- + 1.01449652899450E-01 )*Y+7.77203937334739E-01 + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + elif X < 33.0: + E = math.exp(-X) + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + math.sqrt(PIE4/X) + F1 = (weights0-E)/(X+X) + F2 = (F1+F1+F1-E)/(X+X) + if X < 20: + roots0 = ((((((-2.43270989903742E-06*X+3.57901398988359E-04)*X - + 2.34112415981143E-02)*X+7.81425144913975E-01)*X - + 1.73209218219175E+01)*X+2.43517435690398E+02)*X + + (-1.97611541576986E+04/X+9.82441363463929E+03)/X - + 2.07970687843258E+03)*E + R13/(X-R13) + roots1 = (((((-2.62627010965435E-04*X+3.49187925428138E-02)*X - + 3.09337618731880E+00)*X+1.07037141010778E+02)*X - + 2.36659637247087E+03)*X + + ((-2.91669113681020E+06/X + + 1.41129505262758E+06)/X-2.91532335433779E+05)/X + + 3.35202872835409E+04)*E + R23/(X-R23) + roots2 = ((((( 9.31856404738601E-05*X-2.87029400759565E-02)*X - + 7.83503697918455E-01)*X-1.84338896480695E+01)*X + + 4.04996712650414E+02)*X + + (-1.89829509315154E+05/X + + 5.11498390849158E+04)/X-6.88145821789955E+03)*E + R33/(X-R33) + else: + roots0 = ((((-4.97561537069643E-04*X-5.00929599665316E-02)*X + + 1.31099142238996E+00)*X-1.88336409225481E+01)*X - + 6.60344754467191E+02 /X+1.64931462413877E+02)*E + R13/(X-R13) + roots1 = ((((-4.48218898474906E-03*X-5.17373211334924E-01)*X + + 1.13691058739678E+01)*X-1.65426392885291E+02)*X - + 6.30909125686731E+03 /X+1.52231757709236E+03)*E + R23/(X-R23) + roots2 = ((((-1.38368602394293E-02*X-1.77293428863008E+00)*X + + 1.73639054044562E+01)*X-3.57615122086961E+02)*X - + 1.45734701095912E+04 /X+2.69831813951849E+03)*E + R33/(X-R33) + + T1 = roots0/(roots0+1.0E+00) + T2 = roots1/(roots1+1.0E+00) + T3 = roots2/(roots2+1.0E+00) + A2 = F2-T1*F1 + A1 = F1-T1*weights0 + weights2 = (A2-T2*A1)/((T3-T2)*(T3-T1)) + weights1 = (T3*A1-A2)/((T3-T2)*(T2-T1)) + weights0 = weights0-weights1-weights2 + else :# X > 33 + weights0 = math.sqrt(PIE4/X) + if X < 47: + E = math.exp(-X) + roots0 = ((-7.39058467995275E+00*X+3.21318352526305E+02)*X - + 3.99433696473658E+03)*E + R13/(X-R13) + roots1 = ((-7.38726243906513E+01*X+3.13569966333873E+03)*X - + 3.86862867311321E+04)*E + R23/(X-R23) + roots2 = ((-2.63750565461336E+02*X+1.04412168692352E+04)*X - + 1.28094577915394E+05)*E + R33/(X-R33) + weights2 = ((( 1.52258947224714E-01*X-8.30661900042651E+00)*X + + 1.92977367967984E+02)*X-1.67787926005344E+03)*E + W33*weights0 + weights1 = (( 6.15072615497811E+01*X-2.91980647450269E+03)*X + + 3.80794303087338E+04)*E + W23*weights0 + weights0 = weights0-weights1-weights2 + else: + roots0 = R13/(X-R13) + roots1 = R23/(X-R23) + roots2 = R33/(X-R33) + weights1 = W23*weights0 + weights2 = W33*weights0 + weights0 = weights0-weights1-weights2 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + + return roots, weights + +R14,PIE4 = 1.45303521503316E-01, 7.85398163397448E-01 +R24,W24 = 1.33909728812636E+00, 2.34479815323517E-01 +R34,W34 = 3.92696350135829E+00, 1.92704402415764E-02 +R44,W44 = 8.58863568901199E+00, 2.25229076750736E-04 + +@cuda.jit(fastmath=True, cache=True, device=True) +def Root4(X,n,roots, weights): + + if X <= 3.0E-7: + roots0 = 3.48198973061471E-02 -4.09645850660395E-03 *X + roots1 = 3.81567185080042E-01 -4.48902570656719E-02 *X + roots2 = 1.73730726945891E+00 -2.04389090547327E-01 *X + roots3 = 1.18463056481549E+01 -1.39368301742312E+00 *X + weights0 = 3.62683783378362E-01 -3.13844305713928E-02 *X + weights1 = 3.13706645877886E-01 -8.98046242557724E-02 *X + weights2 = 2.22381034453372E-01 -1.29314370958973E-01 *X + weights3 = 1.01228536290376E-01 -8.28299075414321E-02 *X + elif X <= 1.0: + roots0 = ((((((-1.95309614628539E-10*X+5.19765728707592E-09)*X- + 1.01756452250573E-07 )*X+1.72365935872131E-06 )*X- + 2.61203523522184E-05 )*X+3.52921308769880E-04 )*X- + 4.09645850658433E-03 )*X+3.48198973061469E-02 + roots1 = (((((-1.89554881382342E-08*X+3.07583114342365E-07)*X+ + 1.270981734393E-06)*X-1.417298563884E-04)*X+ + 3.226979163176E-03)*X-4.48902570678178E-02 )*X+3.81567185080039E-01 + roots2 = (((((( 1.77280535300416E-09*X+3.36524958870615E-08)*X- + 2.58341529013893E-07 )*X-1.13644895662320E-05 )*X- + 7.91549618884063E-05 )*X+1.03825827346828E-02 )*X- + 2.04389090525137E-01 )*X+1.73730726945889E+00 + roots3 = (((((-5.61188882415248E-08*X-2.49480733072460E-07)*X+ + 3.428685057114E-06)*X+1.679007454539E-04)*X+ + 4.722855585715E-02)*X-1.39368301737828E+00 )*X+1.18463056481543E+01 + weights0 = ((((((-1.14649303201279E-08*X+1.88015570196787E-07)*X- + 2.33305875372323E-06 )*X+2.68880044371597E-05 )*X- + 2.94268428977387E-04 )*X+3.06548909776613E-03 )*X- + 3.13844305680096E-02 )*X+3.62683783378335E-01 + weights1 = ((((((((-4.11720483772634E-09*X+6.54963481852134E-08)*X- + 7.20045285129626E-07 )*X+6.93779646721723E-06 )*X- + 6.05367572016373E-05 )*X+4.74241566251899E-04 )*X- + 3.26956188125316E-03 )*X+1.91883866626681E-02 )*X- + 8.98046242565811E-02 )*X+3.13706645877886E-01 + weights2 = ((((((((-3.41688436990215E-08*X+5.07238960340773E-07)*X- + 5.01675628408220E-06 )*X+4.20363420922845E-05 )*X- + 3.08040221166823E-04 )*X+1.94431864731239E-03 )*X- + 1.02477820460278E-02 )*X+4.28670143840073E-02 )*X- + 1.29314370962569E-01 )*X+2.22381034453369E-01 + weights3 = ((((((((( 4.99660550769508E-09*X-7.94585963310120E-08)*X+ + 8.359072409485E-07)*X-7.422369210610E-06)*X+ + 5.763374308160E-05)*X-3.86645606718233E-04 )*X+ + 2.18417516259781E-03 )*X-9.99791027771119E-03 )*X+ + 3.48791097377370E-02 )*X-8.28299075413889E-02 )*X+1.01228536290376E-01 + elif X <= 5.0: + Y = X-3.0E+00 + roots0 = (((((((((-1.48570633747284E-15*Y-1.33273068108777E-13)*Y+ + 4.068543696670E-12)*Y-9.163164161821E-11)*Y+ + 2.046819017845E-09)*Y-4.03076426299031E-08 )*Y+ + 7.29407420660149E-07 )*Y-1.23118059980833E-05 )*Y+ + 1.88796581246938E-04 )*Y-2.53262912046853E-03 )*Y+2.51198234505021E-02 + roots1 = ((((((((( 1.35830583483312E-13*Y-2.29772605964836E-12)*Y- + 3.821500128045E-12)*Y+6.844424214735E-10)*Y- + 1.048063352259E-08)*Y+1.50083186233363E-08 )*Y+ + 3.48848942324454E-06 )*Y-1.08694174399193E-04 )*Y+ + 2.08048885251999E-03 )*Y-2.91205805373793E-02 )*Y+2.72276489515713E-01 + roots2 = ((((((((( 5.02799392850289E-13*Y+1.07461812944084E-11)*Y- + 1.482277886411E-10)*Y-2.153585661215E-09)*Y+ + 3.654087802817E-08)*Y+5.15929575830120E-07 )*Y- + 9.52388379435709E-06 )*Y-2.16552440036426E-04 )*Y+ + 9.03551469568320E-03 )*Y-1.45505469175613E-01 )*Y+1.21449092319186E+00 + roots3 = (((((((((-1.08510370291979E-12*Y+6.41492397277798E-11)*Y+ + 7.542387436125E-10)*Y-2.213111836647E-09)*Y- + 1.448228963549E-07)*Y-1.95670833237101E-06 )*Y- + 1.07481314670844E-05 )*Y+1.49335941252765E-04 )*Y+ + 4.87791531990593E-02 )*Y-1.10559909038653E+00 )*Y+8.09502028611780E+00 + weights0 = ((((((((((-4.65801912689961E-14*Y+7.58669507106800E-13)*Y- + 1.186387548048E-11)*Y+1.862334710665E-10)*Y- + 2.799399389539E-09)*Y+4.148972684255E-08)*Y- + 5.933568079600E-07)*Y+8.168349266115E-06)*Y- + 1.08989176177409E-04 )*Y+1.41357961729531E-03 )*Y- + 1.87588361833659E-02 )*Y+2.89898651436026E-01 + weights1 = ((((((((((((-1.46345073267549E-14*Y+2.25644205432182E-13)*Y- + 3.116258693847E-12)*Y+4.321908756610E-11)*Y- + 5.673270062669E-10)*Y+7.006295962960E-09)*Y- + 8.120186517000E-08)*Y+8.775294645770E-07)*Y- + 8.77829235749024E-06 )*Y+8.04372147732379E-05 )*Y- + 6.64149238804153E-04 )*Y+4.81181506827225E-03 )*Y- + 2.88982669486183E-02 )*Y+1.56247249979288E-01 + weights2 = ((((((((((((( 9.06812118895365E-15*Y-1.40541322766087E-13)* + Y+1.919270015269E-12)*Y-2.605135739010E-11)*Y+ + 3.299685839012E-10)*Y-3.86354139348735E-09 )*Y+ + 4.16265847927498E-08 )*Y-4.09462835471470E-07 )*Y+ + 3.64018881086111E-06 )*Y-2.88665153269386E-05 )*Y+ + 2.00515819789028E-04 )*Y-1.18791896897934E-03 )*Y+ + 5.75223633388589E-03 )*Y-2.09400418772687E-02 )*Y+4.85368861938873E-02 + weights3 = ((((((((((((((-9.74835552342257E-16*Y+1.57857099317175E-14)* + Y-2.249993780112E-13)*Y+3.173422008953E-12)*Y- + 4.161159459680E-11)*Y+5.021343560166E-10)*Y- + 5.545047534808E-09)*Y+5.554146993491E-08)*Y- + 4.99048696190133E-07 )*Y+3.96650392371311E-06 )*Y- + 2.73816413291214E-05 )*Y+1.60106988333186E-04 )*Y- + 7.64560567879592E-04 )*Y+2.81330044426892E-03 )*Y- + 7.16227030134947E-03 )*Y+9.66077262223353E-03 + elif X <= 10.0: + Y = X-7.5E+00 + roots0 = ((((((((( 4.64217329776215E-15*Y-6.27892383644164E-15)*Y+ + 3.462236347446E-13)*Y-2.927229355350E-11)*Y+ + 5.090355371676E-10)*Y-9.97272656345253E-09 )*Y+ + 2.37835295639281E-07 )*Y-4.60301761310921E-06 )*Y+ + 8.42824204233222E-05 )*Y-1.37983082233081E-03 )*Y+1.66630865869375E-02 + roots1 = ((((((((( 2.93981127919047E-14*Y+8.47635639065744E-13)*Y- + 1.446314544774E-11)*Y-6.149155555753E-12)*Y+ + 8.484275604612E-10)*Y-6.10898827887652E-08 )*Y+ + 2.39156093611106E-06 )*Y-5.35837089462592E-05 )*Y+ + 1.00967602595557E-03 )*Y-1.57769317127372E-02 )*Y+1.74853819464285E-01 + roots2 = (((((((((( 2.93523563363000E-14*Y-6.40041776667020E-14)*Y- + 2.695740446312E-12)*Y+1.027082960169E-10)*Y- + 5.822038656780E-10)*Y-3.159991002539E-08)*Y+ + 4.327249251331E-07)*Y+4.856768455119E-06)*Y- + 2.54617989427762E-04 )*Y+5.54843378106589E-03 )*Y- + 7.95013029486684E-02 )*Y+7.20206142703162E-01 + roots3 = (((((((((((-1.62212382394553E-14*Y+7.68943641360593E-13)*Y+ + 5.764015756615E-12)*Y-1.380635298784E-10)*Y- + 1.476849808675E-09)*Y+1.84347052385605E-08 )*Y+ + 3.34382940759405E-07 )*Y-1.39428366421645E-06 )*Y- + 7.50249313713996E-05 )*Y-6.26495899187507E-04 )*Y+ + 4.69716410901162E-02 )*Y-6.66871297428209E-01 )*Y+4.11207530217806E+00 + weights0 = ((((((((((-1.65995045235997E-15*Y+6.91838935879598E-14)*Y- + 9.131223418888E-13)*Y+1.403341829454E-11)*Y- + 3.672235069444E-10)*Y+6.366962546990E-09)*Y- + 1.039220021671E-07)*Y+1.959098751715E-06)*Y- + 3.33474893152939E-05 )*Y+5.72164211151013E-04 )*Y- + 1.05583210553392E-02 )*Y+2.26696066029591E-01 + weights1 = ((((((((((((-3.57248951192047E-16*Y+6.25708409149331E-15)*Y- + 9.657033089714E-14)*Y+1.507864898748E-12)*Y- + 2.332522256110E-11)*Y+3.428545616603E-10)*Y- + 4.698730937661E-09)*Y+6.219977635130E-08)*Y- + 7.83008889613661E-07 )*Y+9.08621687041567E-06 )*Y- + 9.86368311253873E-05 )*Y+9.69632496710088E-04 )*Y- + 8.14594214284187E-03 )*Y+8.50218447733457E-02 + weights2 = ((((((((((((( 1.64742458534277E-16*Y-2.68512265928410E-15)* + Y+3.788890667676E-14)*Y-5.508918529823E-13)*Y+ + 7.555896810069E-12)*Y-9.69039768312637E-11 )*Y+ + 1.16034263529672E-09 )*Y-1.28771698573873E-08 )*Y+ + 1.31949431805798E-07 )*Y-1.23673915616005E-06 )*Y+ + 1.04189803544936E-05 )*Y-7.79566003744742E-05 )*Y+ + 5.03162624754434E-04 )*Y-2.55138844587555E-03 )*Y+1.13250730954014E-02 + weights3 = ((((((((((((((-1.55714130075679E-17*Y+2.57193722698891E-16)* + Y-3.626606654097E-15)*Y+5.234734676175E-14)*Y- + 7.067105402134E-13)*Y+8.793512664890E-12)*Y- + 1.006088923498E-10)*Y+1.050565098393E-09)*Y- + 9.91517881772662E-09 )*Y+8.35835975882941E-08 )*Y- + 6.19785782240693E-07 )*Y+3.95841149373135E-06 )*Y- + 2.11366761402403E-05 )*Y+9.00474771229507E-05 )*Y- + 2.78777909813289E-04 )*Y+5.26543779837487E-04 + elif X <= 15.0: + Y = X-12.5E+00 + roots0 = ((((((((((( 4.94869622744119E-17*Y+8.03568805739160E-16)*Y- + 5.599125915431E-15)*Y-1.378685560217E-13)*Y+ + 7.006511663249E-13)*Y+1.30391406991118E-11 )*Y+ + 8.06987313467541E-11 )*Y-5.20644072732933E-09 )*Y+ + 7.72794187755457E-08 )*Y-1.61512612564194E-06 )*Y+ + 4.15083811185831E-05 )*Y-7.87855975560199E-04 )*Y+1.14189319050009E-02 + roots1 = ((((((((((( 4.89224285522336E-16*Y+1.06390248099712E-14)*Y- + 5.446260182933E-14)*Y-1.613630106295E-12)*Y+ + 3.910179118937E-12)*Y+1.90712434258806E-10 )*Y+ + 8.78470199094761E-10 )*Y-5.97332993206797E-08 )*Y+ + 9.25750831481589E-07 )*Y-2.02362185197088E-05 )*Y+ + 4.92341968336776E-04 )*Y-8.68438439874703E-03 )*Y+1.15825965127958E-01 + roots2 = (((((((((( 6.12419396208408E-14*Y+1.12328861406073E-13)*Y- + 9.051094103059E-12)*Y-4.781797525341E-11)*Y+ + 1.660828868694E-09)*Y+4.499058798868E-10)*Y- + 2.519549641933E-07)*Y+4.977444040180E-06)*Y- + 1.25858350034589E-04 )*Y+2.70279176970044E-03 )*Y- + 3.99327850801083E-02 )*Y+4.33467200855434E-01 + roots3 = ((((((((((( 4.63414725924048E-14*Y-4.72757262693062E-14)*Y- + 1.001926833832E-11)*Y+6.074107718414E-11)*Y+ + 1.576976911942E-09)*Y-2.01186401974027E-08 )*Y- + 1.84530195217118E-07 )*Y+5.02333087806827E-06 )*Y+ + 9.66961790843006E-06 )*Y-1.58522208889528E-03 )*Y+ + 2.80539673938339E-02 )*Y-2.78953904330072E-01 )*Y+1.82835655238235E+00 + weights3 = ((((((((((((( 2.90401781000996E-18*Y-4.63389683098251E-17)* + Y+6.274018198326E-16)*Y-8.936002188168E-15)*Y+ + 1.194719074934E-13)*Y-1.45501321259466E-12 )*Y+ + 1.64090830181013E-11 )*Y-1.71987745310181E-10 )*Y+ + 1.63738403295718E-09 )*Y-1.39237504892842E-08 )*Y+ + 1.06527318142151E-07 )*Y-7.27634957230524E-07 )*Y+ + 4.12159381310339E-06 )*Y-1.74648169719173E-05 )*Y+8.50290130067818E-05 + weights2 = ((((((((((((-4.19569145459480E-17*Y+5.94344180261644E-16)*Y- + 1.148797566469E-14)*Y+1.881303962576E-13)*Y- + 2.413554618391E-12)*Y+3.372127423047E-11)*Y- + 4.933988617784E-10)*Y+6.116545396281E-09)*Y- + 6.69965691739299E-08 )*Y+7.52380085447161E-07 )*Y- + 8.08708393262321E-06 )*Y+6.88603417296672E-05 )*Y- + 4.67067112993427E-04 )*Y+5.42313365864597E-03 + weights1 = ((((((((((-6.22272689880615E-15*Y+1.04126809657554E-13)*Y- + 6.842418230913E-13)*Y+1.576841731919E-11)*Y- + 4.203948834175E-10)*Y+6.287255934781E-09)*Y- + 8.307159819228E-08)*Y+1.356478091922E-06)*Y- + 2.08065576105639E-05 )*Y+2.52396730332340E-04 )*Y- + 2.94484050194539E-03 )*Y+6.01396183129168E-02 + weights0 = (((-1.8784686463512E-01/X+2.2991849164985E-01)/X - + 4.9893752514047E-01)/X-2.1916512131607E-05)*math.exp(-X) +math.sqrt(PIE4/X)-weights3-weights2-weights1 + elif X <= 20.0: + weights0 = math.sqrt(PIE4/X) + Y = X-17.5E+00 + roots0 = ((((((((((( 4.36701759531398E-17*Y-1.12860600219889E-16)*Y- + 6.149849164164E-15)*Y+5.820231579541E-14)*Y+ + 4.396602872143E-13)*Y-1.24330365320172E-11 )*Y+ + 6.71083474044549E-11 )*Y+2.43865205376067E-10 )*Y+ + 1.67559587099969E-08 )*Y-9.32738632357572E-07 )*Y+ + 2.39030487004977E-05 )*Y-4.68648206591515E-04 )*Y+8.34977776583956E-03 + roots1 = ((((((((((( 4.98913142288158E-16*Y-2.60732537093612E-16)*Y- + 7.775156445127E-14)*Y+5.766105220086E-13)*Y+ + 6.432696729600E-12)*Y-1.39571683725792E-10 )*Y+ + 5.95451479522191E-10 )*Y+2.42471442836205E-09 )*Y+ + 2.47485710143120E-07 )*Y-1.14710398652091E-05 )*Y+ + 2.71252453754519E-04 )*Y-4.96812745851408E-03 )*Y+8.26020602026780E-02 + roots2 = ((((((((((( 1.91498302509009E-15*Y+1.48840394311115E-14)*Y- + 4.316925145767E-13)*Y+1.186495793471E-12)*Y+ + 4.615806713055E-11)*Y-5.54336148667141E-10 )*Y+ + 3.48789978951367E-10 )*Y-2.79188977451042E-09 )*Y+ + 2.09563208958551E-06 )*Y-6.76512715080324E-05 )*Y+ + 1.32129867629062E-03 )*Y-2.05062147771513E-02 )*Y+2.88068671894324E-01 + roots3 = (((((((((((-5.43697691672942E-15*Y-1.12483395714468E-13)*Y+ + 2.826607936174E-12)*Y-1.266734493280E-11)*Y- + 4.258722866437E-10)*Y+9.45486578503261E-09 )*Y- + 5.86635622821309E-08 )*Y-1.28835028104639E-06 )*Y+ + 4.41413815691885E-05 )*Y-7.61738385590776E-04 )*Y+ + 9.66090902985550E-03 )*Y-1.01410568057649E-01 )*Y+9.54714798156712E-01 + weights3 = ((((((((((((-7.56882223582704E-19*Y+7.53541779268175E-18)*Y- + 1.157318032236E-16)*Y+2.411195002314E-15)*Y- + 3.601794386996E-14)*Y+4.082150659615E-13)*Y- + 4.289542980767E-12)*Y+5.086829642731E-11)*Y- + 6.35435561050807E-10 )*Y+6.82309323251123E-09 )*Y- + 5.63374555753167E-08 )*Y+3.57005361100431E-07 )*Y- + 2.40050045173721E-06 )*Y+4.94171300536397E-05 + weights2 = (((((((((((-5.54451040921657E-17*Y+2.68748367250999E-16)*Y+ + 1.349020069254E-14)*Y-2.507452792892E-13)*Y+ + 1.944339743818E-12)*Y-1.29816917658823E-11 )*Y+ + 3.49977768819641E-10 )*Y-8.67270669346398E-09 )*Y+ + 1.31381116840118E-07 )*Y-1.36790720600822E-06 )*Y+ + 1.19210697673160E-05 )*Y-1.42181943986587E-04 )*Y+4.12615396191829E-03 + weights1 = (((((((((((-1.86506057729700E-16*Y+1.16661114435809E-15)*Y+ + 2.563712856363E-14)*Y-4.498350984631E-13)*Y+ + 1.765194089338E-12)*Y+9.04483676345625E-12 )*Y+ + 4.98930345609785E-10 )*Y-2.11964170928181E-08 )*Y+ + 3.98295476005614E-07 )*Y-5.49390160829409E-06 )*Y+ + 7.74065155353262E-05 )*Y-1.48201933009105E-03 )*Y+4.97836392625268E-02 + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*math.exp(-X)+weights0-weights1-weights2-weights3 + elif X <= 35.0: + weights0 = math.sqrt(PIE4/X) + E = math.exp(-X) + roots0 = ((((((-4.45711399441838E-05*X+1.27267770241379E-03)*X - + 2.36954961381262E-01)*X+1.54330657903756E+01)*X - + 5.22799159267808E+02)*X+1.05951216669313E+04)*X + + (-2.51177235556236E+06/X+8.72975373557709E+05)/X - + 1.29194382386499E+05)*E + R14/(X-R14) + roots1 = (((((-7.85617372254488E-02*X+6.35653573484868E+00)*X - + 3.38296938763990E+02)*X+1.25120495802096E+04)*X - + 3.16847570511637E+05)*X + + ((-1.02427466127427E+09/X + + 3.70104713293016E+08)/X-5.87119005093822E+07)/X + + 5.38614211391604E+06)*E + R24/(X-R24) + roots2 = (((((-2.37900485051067E-01*X+1.84122184400896E+01)*X - + 1.00200731304146E+03)*X+3.75151841595736E+04)*X - + 9.50626663390130E+05)*X + + ((-2.88139014651985E+09/X + + 1.06625915044526E+09)/X-1.72465289687396E+08)/X + + 1.60419390230055E+07)*E + R34/(X-R34) + roots3 = ((((((-6.00691586407385E-04*X-3.64479545338439E-01)*X + + 1.57496131755179E+01)*X-6.54944248734901E+02)*X + + 1.70830039597097E+04)*X-2.90517939780207E+05)*X + + (3.49059698304732E+07/X-1.64944522586065E+07)/X + + 2.96817940164703E+06)*E + R44/(X-R44) + if X <= 25.0: + weights3 = ((((((( 2.33766206773151E-07*X- + 3.81542906607063E-05)*X +3.51416601267000E-03)*X- + 1.66538571864728E-01)*X +4.80006136831847E+00)*X- + 8.73165934223603E+01)*X +9.77683627474638E+02)*X + + 1.66000945117640E+04/X -6.14479071209961E+03)*E + W44*weights0 + else: + weights3 = (((((( 5.74245945342286E-06*X- + 7.58735928102351E-05)*X +2.35072857922892E-04)*X- + 3.78812134013125E-03)*X +3.09871652785805E-01)*X- + 7.11108633061306E+00)*X +5.55297573149528E+01)*E + W44*weights0 + + weights2 = (((((( 2.36392855180768E-04*X-9.16785337967013E-03)*X + + 4.62186525041313E-01)*X-1.96943786006540E+01)*X + + 4.99169195295559E+02)*X-6.21419845845090E+03)*X + + ((+5.21445053212414E+07/X-1.34113464389309E+07)/X + + 1.13673298305631E+06)/X-2.81501182042707E+03)*E + W34*weights0 + weights1 = (((((( 7.29841848989391E-04*X-3.53899555749875E-02)*X + + 2.07797425718513E+00)*X-1.00464709786287E+02)*X + + 3.15206108877819E+03)*X-6.27054715090012E+04)*X + + (+1.54721246264919E+07/X-5.26074391316381E+06)/X + + 7.67135400969617E+05)*E + W24*weights0 + weights0 = (( 1.9623264149430E-01/X-4.9695241464490E-01)/X - + 6.0156581186481E-05)*E + weights0-weights1-weights2-weights3 + elif X <= 53.0: + weights0 = math.sqrt(PIE4/X) + E = math.exp(-X)*(X*X)**2 + roots3 = ((-2.19135070169653E-03*X-1.19108256987623E-01)*X - + 7.50238795695573E-01)*E + R44/(X-R44) + roots2 = ((-9.65842534508637E-04*X-4.49822013469279E-02)*X + + 6.08784033347757E-01)*E + R34/(X-R34) + roots1 = ((-3.62569791162153E-04*X-9.09231717268466E-03)*X + + 1.84336760556262E-01)*E + R24/(X-R24) + roots0 = ((-4.07557525914600E-05*X-6.88846864931685E-04)*X + + 1.74725309199384E-02)*E + R14/(X-R14) + weights3 = (( 5.76631982000990E-06*X-7.89187283804890E-05)*X + + 3.28297971853126E-04)*E + W44*weights0 + weights2 = (( 2.08294969857230E-04*X-3.77489954837361E-03)*X + + 2.09857151617436E-02)*E + W34*weights0 + weights1 = (( 6.16374517326469E-04*X-1.26711744680092E-02)*X + + 8.14504890732155E-02)*E + W24*weights0 + weights0 = weights0-weights1-weights2-weights3 + else: + weights0 = math.sqrt(PIE4/X) + roots0 = R14/(X-R14) + roots1 = R24/(X-R24) + roots2 = R34/(X-R34) + roots3 = R44/(X-R44) + weights3 = W44*weights0 + weights2 = W34*weights0 + weights1 = W24*weights0 + weights0 = weights0-weights1-weights2-weights3 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + roots[3] = roots3 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + weights[3] = weights3 + + return roots, weights + +R15,PIE4 = 1.17581320211778E-01, 7.85398163397448E-01 +R25,W25 = 1.07456201243690E+00, 2.70967405960535E-01 +R35,W35 = 3.08593744371754E+00, 3.82231610015404E-02 +R45,W45 = 6.41472973366203E+00, 1.51614186862443E-03 +R55,W55 = 1.18071894899717E+01, 8.62130526143657E-06 + +@cuda.jit(fastmath=True, cache=True, device=True) +def Root5(X,n, roots, weights): + if X < 3.0E-7: + roots0 = 2.26659266316985E-02 -2.15865967920897E-03 *X + roots1 = 2.31271692140903E-01 -2.20258754389745E-02 *X + roots2 = 8.57346024118836E-01 -8.16520023025515E-02 *X + roots3 = 2.97353038120346E+00 -2.83193369647137E-01 *X + roots4 = 1.84151859759051E+01 -1.75382723579439E+00 *X + weights0 = 2.95524224714752E-01 -1.96867576909777E-02 *X + weights1 = 2.69266719309995E-01 -5.61737590184721E-02 *X + weights2 = 2.19086362515981E-01 -9.71152726793658E-02 *X + weights3 = 1.49451349150580E-01 -1.02979262193565E-01 *X + weights4 = 6.66713443086877E-02 -5.73782817488315E-02 *X + elif X < 1.0: + roots0 = ((((((-4.46679165328413E-11*X+1.21879111988031E-09)*X- + 2.62975022612104E-08 )*X+5.15106194905897E-07 )*X- + 9.27933625824749E-06 )*X+1.51794097682482E-04 )*X- + 2.15865967920301E-03 )*X+2.26659266316985E-02 + roots1 = (((((( 1.93117331714174E-10*X-4.57267589660699E-09)*X+ + 2.48339908218932E-08 )*X+1.50716729438474E-06 )*X- + 6.07268757707381E-05 )*X+1.37506939145643E-03 )*X- + 2.20258754419939E-02 )*X+2.31271692140905E-01 + roots2 = ((((( 4.84989776180094E-09*X+1.31538893944284E-07)*X- + 2.766753852879E-06)*X-7.651163510626E-05)*X+ + 4.033058545972E-03)*X-8.16520022916145E-02 )*X+8.57346024118779E-01 + roots3 = ((((-2.48581772214623E-07*X-4.34482635782585E-06)*X- + 7.46018257987630E-07 )*X+1.01210776517279E-02 )*X- + 2.83193369640005E-01 )*X+2.97353038120345E+00 + roots4 = (((((-8.92432153868554E-09*X+1.77288899268988E-08)*X+ + 3.040754680666E-06)*X+1.058229325071E-04)*X+ + 4.596379534985E-02)*X-1.75382723579114E+00 )*X+1.84151859759049E+01 + weights0 = ((((((-2.03822632771791E-09*X+3.89110229133810E-08)*X- + 5.84914787904823E-07 )*X+8.30316168666696E-06 )*X- + 1.13218402310546E-04 )*X+1.49128888586790E-03 )*X- + 1.96867576904816E-02 )*X+2.95524224714749E-01 + weights1 = ((((((( 8.62848118397570E-09*X-1.38975551148989E-07)*X+ + 1.602894068228E-06)*X-1.646364300836E-05)*X+ + 1.538445806778E-04)*X-1.28848868034502E-03 )*X+ + 9.38866933338584E-03 )*X-5.61737590178812E-02 )*X+2.69266719309991E-01 + weights2 = ((((((((-9.41953204205665E-09*X+1.47452251067755E-07)*X- + 1.57456991199322E-06 )*X+1.45098401798393E-05 )*X- + 1.18858834181513E-04 )*X+8.53697675984210E-04 )*X- + 5.22877807397165E-03 )*X+2.60854524809786E-02 )*X- + 9.71152726809059E-02 )*X+2.19086362515979E-01 + weights3 = ((((((((-3.84961617022042E-08*X+5.66595396544470E-07)*X- + 5.52351805403748E-06 )*X+4.53160377546073E-05 )*X- + 3.22542784865557E-04 )*X+1.95682017370967E-03 )*X- + 9.77232537679229E-03 )*X+3.79455945268632E-02 )*X- + 1.02979262192227E-01 )*X+1.49451349150573E-01 + weights4 = ((((((((( 4.09594812521430E-09*X-6.47097874264417E-08)*X+ + 6.743541482689E-07)*X-5.917993920224E-06)*X+ + 4.531969237381E-05)*X-2.99102856679638E-04 )*X+ + 1.65695765202643E-03 )*X-7.40671222520653E-03 )*X+ + 2.50889946832192E-02 )*X-5.73782817487958E-02 )*X+6.66713443086877E-02 + elif X < 5.0: + Y = X-3.0E+00 + roots0 = ((((((((-2.58163897135138E-14*Y+8.14127461488273E-13)*Y- + 2.11414838976129E-11 )*Y+5.09822003260014E-10 )*Y- + 1.16002134438663E-08 )*Y+2.46810694414540E-07 )*Y- + 4.92556826124502E-06 )*Y+9.02580687971053E-05 )*Y- + 1.45190025120726E-03 )*Y+1.73416786387475E-02 + roots1 = ((((((((( 1.04525287289788E-14*Y+5.44611782010773E-14)*Y- + 4.831059411392E-12)*Y+1.136643908832E-10)*Y- + 1.104373076913E-09)*Y-2.35346740649916E-08 )*Y+ + 1.43772622028764E-06 )*Y-4.23405023015273E-05 )*Y+ + 9.12034574793379E-04 )*Y-1.52479441718739E-02 )*Y+1.76055265928744E-01 + roots2 = (((((((((-6.89693150857911E-14*Y+5.92064260918861E-13)*Y+ + 1.847170956043E-11)*Y-3.390752744265E-10)*Y- + 2.995532064116E-09)*Y+1.57456141058535E-07 )*Y- + 3.95859409711346E-07 )*Y-9.58924580919747E-05 )*Y+ + 3.23551502557785E-03 )*Y-5.97587007636479E-02 )*Y+6.46432853383057E-01 + roots3 = ((((((((-3.61293809667763E-12*Y-2.70803518291085E-11)*Y+ + 8.83758848468769E-10 )*Y+1.59166632851267E-08 )*Y- + 1.32581997983422E-07 )*Y-7.60223407443995E-06 )*Y- + 7.41019244900952E-05 )*Y+9.81432631743423E-03 )*Y- + 2.23055570487771E-01 )*Y+2.21460798080643E+00 + roots4 = ((((((((( 7.12332088345321E-13*Y+3.16578501501894E-12)*Y- + 8.776668218053E-11)*Y-2.342817613343E-09)*Y- + 3.496962018025E-08)*Y-3.03172870136802E-07 )*Y+ + 1.50511293969805E-06 )*Y+1.37704919387696E-04 )*Y+ + 4.70723869619745E-02 )*Y-1.47486623003693E+00 )*Y+1.35704792175847E+01 + weights0 = ((((((((( 1.04348658616398E-13*Y-1.94147461891055E-12)*Y+ + 3.485512360993E-11)*Y-6.277497362235E-10)*Y+ + 1.100758247388E-08)*Y-1.88329804969573E-07 )*Y+ + 3.12338120839468E-06 )*Y-5.04404167403568E-05 )*Y+ + 8.00338056610995E-04 )*Y-1.30892406559521E-02 )*Y+2.47383140241103E-01 + weights1 = ((((((((((( 3.23496149760478E-14*Y-5.24314473469311E-13)*Y+ + 7.743219385056E-12)*Y-1.146022750992E-10)*Y+ + 1.615238462197E-09)*Y-2.15479017572233E-08 )*Y+ + 2.70933462557631E-07 )*Y-3.18750295288531E-06 )*Y+ + 3.47425221210099E-05 )*Y-3.45558237388223E-04 )*Y+ + 3.05779768191621E-03 )*Y-2.29118251223003E-02 )*Y+1.59834227924213E-01 + weights2 = ((((((((((((-3.42790561802876E-14*Y+5.26475736681542E-13)*Y- + 7.184330797139E-12)*Y+9.763932908544E-11)*Y- + 1.244014559219E-09)*Y+1.472744068942E-08)*Y- + 1.611749975234E-07)*Y+1.616487851917E-06)*Y- + 1.46852359124154E-05 )*Y+1.18900349101069E-04 )*Y- + 8.37562373221756E-04 )*Y+4.93752683045845E-03 )*Y- + 2.25514728915673E-02 )*Y+6.95211812453929E-02 + weights3 = ((((((((((((( 1.04072340345039E-14*Y-1.60808044529211E-13)* + Y+2.183534866798E-12)*Y-2.939403008391E-11)*Y+ + 3.679254029085E-10)*Y-4.23775673047899E-09 )*Y+ + 4.46559231067006E-08 )*Y-4.26488836563267E-07 )*Y+ + 3.64721335274973E-06 )*Y-2.74868382777722E-05 )*Y+ + 1.78586118867488E-04 )*Y-9.68428981886534E-04 )*Y+ + 4.16002324339929E-03 )*Y-1.28290192663141E-02 )*Y+2.22353727685016E-02 + weights4 = ((((((((((((((-8.16770412525963E-16*Y+1.31376515047977E-14)* + Y-1.856950818865E-13)*Y+2.596836515749E-12)*Y- + 3.372639523006E-11)*Y+4.025371849467E-10)*Y- + 4.389453269417E-09)*Y+4.332753856271E-08)*Y- + 3.82673275931962E-07 )*Y+2.98006900751543E-06 )*Y- + 2.00718990300052E-05 )*Y+1.13876001386361E-04 )*Y- + 5.23627942443563E-04 )*Y+1.83524565118203E-03 )*Y- + 4.37785737450783E-03 )*Y+5.36963805223095E-03 + elif X < 10.0: + Y = X-7.5E+00 + roots0 = ((((((((-1.13825201010775E-14*Y+1.89737681670375E-13)*Y- + 4.81561201185876E-12 )*Y+1.56666512163407E-10 )*Y- + 3.73782213255083E-09 )*Y+9.15858355075147E-08 )*Y- + 2.13775073585629E-06 )*Y+4.56547356365536E-05 )*Y- + 8.68003909323740E-04 )*Y+1.22703754069176E-02 + roots1 = (((((((((-3.67160504428358E-15*Y+1.27876280158297E-14)*Y- + 1.296476623788E-12)*Y+1.477175434354E-11)*Y+ + 5.464102147892E-10)*Y-2.42538340602723E-08 )*Y+ + 8.20460740637617E-07 )*Y-2.20379304598661E-05 )*Y+ + 4.90295372978785E-04 )*Y-9.14294111576119E-03 )*Y+1.22590403403690E-01 + roots2 = ((((((((( 1.39017367502123E-14*Y-6.96391385426890E-13)*Y+ + 1.176946020731E-12)*Y+1.725627235645E-10)*Y- + 3.686383856300E-09)*Y+2.87495324207095E-08 )*Y+ + 1.71307311000282E-06 )*Y-7.94273603184629E-05 )*Y+ + 2.00938064965897E-03 )*Y-3.63329491677178E-02 )*Y+4.34393683888443E-01 + roots3 = ((((((((((-1.27815158195209E-14*Y+1.99910415869821E-14)*Y+ + 3.753542914426E-12)*Y-2.708018219579E-11)*Y- + 1.190574776587E-09)*Y+1.106696436509E-08)*Y+ + 3.954955671326E-07)*Y-4.398596059588E-06)*Y- + 2.01087998907735E-04 )*Y+7.89092425542937E-03 )*Y- + 1.42056749162695E-01 )*Y+1.39964149420683E+00 + roots4 = ((((((((((-1.19442341030461E-13*Y-2.34074833275956E-12)*Y+ + 6.861649627426E-12)*Y+6.082671496226E-10)*Y+ + 5.381160105420E-09)*Y-6.253297138700E-08)*Y- + 2.135966835050E-06)*Y-2.373394341886E-05)*Y+ + 2.88711171412814E-06 )*Y+4.85221195290753E-02 )*Y- + 1.04346091985269E+00 )*Y+7.89901551676692E+00 + weights0 = ((((((((( 7.95526040108997E-15*Y-2.48593096128045E-13)*Y+ + 4.761246208720E-12)*Y-9.535763686605E-11)*Y+ + 2.225273630974E-09)*Y-4.49796778054865E-08 )*Y+ + 9.17812870287386E-07 )*Y-1.86764236490502E-05 )*Y+ + 3.76807779068053E-04 )*Y-8.10456360143408E-03 )*Y+2.01097936411496E-01 + weights1 = ((((((((((( 1.25678686624734E-15*Y-2.34266248891173E-14)*Y+ + 3.973252415832E-13)*Y-6.830539401049E-12)*Y+ + 1.140771033372E-10)*Y-1.82546185762009E-09 )*Y+ + 2.77209637550134E-08 )*Y-4.01726946190383E-07 )*Y+ + 5.48227244014763E-06 )*Y-6.95676245982121E-05 )*Y+ + 8.05193921815776E-04 )*Y-8.15528438784469E-03 )*Y+9.71769901268114E-02 + weights2 = ((((((((((((-8.20929494859896E-16*Y+1.37356038393016E-14)*Y- + 2.022863065220E-13)*Y+3.058055403795E-12)*Y- + 4.387890955243E-11)*Y+5.923946274445E-10)*Y- + 7.503659964159E-09)*Y+8.851599803902E-08)*Y- + 9.65561998415038E-07 )*Y+9.60884622778092E-06 )*Y- + 8.56551787594404E-05 )*Y+6.66057194311179E-04 )*Y- + 4.17753183902198E-03 )*Y+2.25443826852447E-02 + weights3 = ((((((((((((((-1.08764612488790E-17*Y+1.85299909689937E-16)* + Y-2.730195628655E-15)*Y+4.127368817265E-14)*Y- + 5.881379088074E-13)*Y+7.805245193391E-12)*Y- + 9.632707991704E-11)*Y+1.099047050624E-09)*Y- + 1.15042731790748E-08 )*Y+1.09415155268932E-07 )*Y- + 9.33687124875935E-07 )*Y+7.02338477986218E-06 )*Y- + 4.53759748787756E-05 )*Y+2.41722511389146E-04 )*Y- + 9.75935943447037E-04 )*Y+2.57520532789644E-03 + weights4 = ((((((((((((((( 7.28996979748849E-19*Y-1.26518146195173E-17) + *Y+1.886145834486E-16)*Y-2.876728287383E-15)*Y+ + 4.114588668138E-14)*Y-5.44436631413933E-13 )*Y+ + 6.64976446790959E-12 )*Y-7.44560069974940E-11 )*Y+ + 7.57553198166848E-10 )*Y-6.92956101109829E-09 )*Y+ + 5.62222859033624E-08 )*Y-3.97500114084351E-07 )*Y+ + 2.39039126138140E-06 )*Y-1.18023950002105E-05 )*Y+ + 4.52254031046244E-05 )*Y-1.21113782150370E-04 )*Y+1.75013126731224E-04 + elif X < 15.0: + Y = X-12.5E+00 + roots0 = ((((((((((-4.16387977337393E-17*Y+7.20872997373860E-16)*Y+ + 1.395993802064E-14)*Y+3.660484641252E-14)*Y- + 4.154857548139E-12)*Y+2.301379846544E-11)*Y- + 1.033307012866E-09)*Y+3.997777641049E-08)*Y- + 9.35118186333939E-07 )*Y+2.38589932752937E-05 )*Y- + 5.35185183652937E-04 )*Y+8.85218988709735E-03 + roots1 = ((((((((((-4.56279214732217E-16*Y+6.24941647247927E-15)*Y+ + 1.737896339191E-13)*Y+8.964205979517E-14)*Y- + 3.538906780633E-11)*Y+9.561341254948E-11)*Y- + 9.772831891310E-09)*Y+4.240340194620E-07)*Y- + 1.02384302866534E-05 )*Y+2.57987709704822E-04 )*Y- + 5.54735977651677E-03 )*Y+8.68245143991948E-02 + roots2 = ((((((((((-2.52879337929239E-15*Y+2.13925810087833E-14)*Y+ + 7.884307667104E-13)*Y-9.023398159510E-13)*Y- + 5.814101544957E-11)*Y-1.333480437968E-09)*Y- + 2.217064940373E-08)*Y+1.643290788086E-06)*Y- + 4.39602147345028E-05 )*Y+1.08648982748911E-03 )*Y- + 2.13014521653498E-02 )*Y+2.94150684465425E-01 + roots3 = ((((((((((-6.42391438038888E-15*Y+5.37848223438815E-15)*Y+ + 8.960828117859E-13)*Y+5.214153461337E-11)*Y- + 1.106601744067E-10)*Y-2.007890743962E-08)*Y+ + 1.543764346501E-07)*Y+4.520749076914E-06)*Y- + 1.88893338587047E-04 )*Y+4.73264487389288E-03 )*Y- + 7.91197893350253E-02 )*Y+8.60057928514554E-01 + roots4 = (((((((((((-2.24366166957225E-14*Y+4.87224967526081E-14)*Y+ + 5.587369053655E-12)*Y-3.045253104617E-12)*Y- + 1.223983883080E-09)*Y-2.05603889396319E-09 )*Y+ + 2.58604071603561E-07 )*Y+1.34240904266268E-06 )*Y- + 5.72877569731162E-05 )*Y-9.56275105032191E-04 )*Y+ + 4.23367010370921E-02 )*Y-5.76800927133412E-01 )*Y+3.87328263873381E+00 + weights0 = ((((((((( 8.98007931950169E-15*Y+7.25673623859497E-14)*Y+ + 5.851494250405E-14)*Y-4.234204823846E-11)*Y+ + 3.911507312679E-10)*Y-9.65094802088511E-09 )*Y+ + 3.42197444235714E-07 )*Y-7.51821178144509E-06 )*Y+ + 1.94218051498662E-04 )*Y-5.38533819142287E-03 )*Y+1.68122596736809E-01 + weights1 = ((((((((((-1.05490525395105E-15*Y+1.96855386549388E-14)*Y- + 5.500330153548E-13)*Y+1.003849567976E-11)*Y- + 1.720997242621E-10)*Y+3.533277061402E-09)*Y- + 6.389171736029E-08)*Y+1.046236652393E-06)*Y- + 1.73148206795827E-05 )*Y+2.57820531617185E-04 )*Y- + 3.46188265338350E-03 )*Y+7.03302497508176E-02 + weights2 = ((((((((((( 3.60020423754545E-16*Y-6.24245825017148E-15)*Y+ + 9.945311467434E-14)*Y-1.749051512721E-12)*Y+ + 2.768503957853E-11)*Y-4.08688551136506E-10 )*Y+ + 6.04189063303610E-09 )*Y-8.23540111024147E-08 )*Y+ + 1.01503783870262E-06 )*Y-1.20490761741576E-05 )*Y+ + 1.26928442448148E-04 )*Y-1.05539461930597E-03 )*Y+1.15543698537013E-02 + weights3 = ((((((((((((( 2.51163533058925E-18*Y-4.31723745510697E-17)* + Y+6.557620865832E-16)*Y-1.016528519495E-14)*Y+ + 1.491302084832E-13)*Y-2.06638666222265E-12 )*Y+ + 2.67958697789258E-11 )*Y-3.23322654638336E-10 )*Y+ + 3.63722952167779E-09 )*Y-3.75484943783021E-08 )*Y+ + 3.49164261987184E-07 )*Y-2.92658670674908E-06 )*Y+ + 2.12937256719543E-05 )*Y-1.19434130620929E-04 )*Y+6.45524336158384E-04 + weights4 = ((((((((((((((-1.29043630202811E-19*Y+2.16234952241296E-18)* + Y-3.107631557965E-17)*Y+4.570804313173E-16)*Y- + 6.301348858104E-15)*Y+8.031304476153E-14)*Y- + 9.446196472547E-13)*Y+1.018245804339E-11)*Y- + 9.96995451348129E-11 )*Y+8.77489010276305E-10 )*Y- + 6.84655877575364E-09 )*Y+4.64460857084983E-08 )*Y- + 2.66924538268397E-07 )*Y+1.24621276265907E-06 )*Y- + 4.30868944351523E-06 )*Y+9.94307982432868E-06 + elif X < 20.0: + Y = X-17.5E+00 + roots0 = (((((((((( 1.91875764545740E-16*Y+7.8357401095707E-16)*Y- + 3.260875931644E-14)*Y-1.186752035569E-13)*Y+ + 4.275180095653E-12)*Y+3.357056136731E-11)*Y- + 1.123776903884E-09)*Y+1.231203269887E-08)*Y- + 3.99851421361031E-07 )*Y+1.45418822817771E-05 )*Y- + 3.49912254976317E-04 )*Y+6.67768703938812E-03 + roots1 = (((((((((( 2.02778478673555E-15*Y+1.01640716785099E-14)*Y- + 3.385363492036E-13)*Y-1.615655871159E-12)*Y+ + 4.527419140333E-11)*Y+3.853670706486E-10)*Y- + 1.184607130107E-08)*Y+1.347873288827E-07)*Y- + 4.47788241748377E-06 )*Y+1.54942754358273E-04 )*Y- + 3.55524254280266E-03 )*Y+6.44912219301603E-02 + roots2 = (((((((((( 7.79850771456444E-15*Y+6.00464406395001E-14)*Y- + 1.249779730869E-12)*Y-1.020720636353E-11)*Y+ + 1.814709816693E-10)*Y+1.766397336977E-09)*Y- + 4.603559449010E-08)*Y+5.863956443581E-07)*Y- + 2.03797212506691E-05 )*Y+6.31405161185185E-04 )*Y- + 1.30102750145071E-02 )*Y+2.10244289044705E-01 + roots3 = (((((((((((-2.92397030777912E-15*Y+1.94152129078465E-14)*Y+ + 4.859447665850E-13)*Y-3.217227223463E-12)*Y- + 7.484522135512E-11)*Y+7.19101516047753E-10 )*Y+ + 6.88409355245582E-09 )*Y-1.44374545515769E-07 )*Y+ + 2.74941013315834E-06 )*Y-1.02790452049013E-04 )*Y+ + 2.59924221372643E-03 )*Y-4.35712368303551E-02 )*Y+5.62170709585029E-01 + roots4 = ((((((((((( 1.17976126840060E-14*Y+1.24156229350669E-13)*Y- + 3.892741622280E-12)*Y-7.755793199043E-12)*Y+ + 9.492190032313E-10)*Y-4.98680128123353E-09 )*Y- + 1.81502268782664E-07 )*Y+2.69463269394888E-06 )*Y+ + 2.50032154421640E-05 )*Y-1.33684303917681E-03 )*Y+ + 2.29121951862538E-02 )*Y-2.45653725061323E-01 )*Y+1.89999883453047E+00 + weights0 = (((((((((( 1.74841995087592E-15*Y-6.95671892641256E-16)*Y- + 3.000659497257E-13)*Y+2.021279817961E-13)*Y+ + 3.853596935400E-11)*Y+1.461418533652E-10)*Y- + 1.014517563435E-08)*Y+1.132736008979E-07)*Y- + 2.86605475073259E-06 )*Y+1.21958354908768E-04 )*Y- + 3.86293751153466E-03 )*Y+1.45298342081522E-01 + weights1 = ((((((((((-1.11199320525573E-15*Y+1.85007587796671E-15)*Y+ + 1.220613939709E-13)*Y+1.275068098526E-12)*Y- + 5.341838883262E-11)*Y+6.161037256669E-10)*Y- + 1.009147879750E-08)*Y+2.907862965346E-07)*Y- + 6.12300038720919E-06 )*Y+1.00104454489518E-04 )*Y- + 1.80677298502757E-03 )*Y+5.78009914536630E-02 + weights2 = ((((((((((-9.49816486853687E-16*Y+6.67922080354234E-15)*Y+ + 2.606163540537E-15)*Y+1.983799950150E-12)*Y- + 5.400548574357E-11)*Y+6.638043374114E-10)*Y- + 8.799518866802E-09)*Y+1.791418482685E-07)*Y- + 2.96075397351101E-06 )*Y+3.38028206156144E-05 )*Y- + 3.58426847857878E-04 )*Y+8.39213709428516E-03 + weights3 = ((((((((((( 1.33829971060180E-17*Y-3.44841877844140E-16)*Y+ + 4.745009557656E-15)*Y-6.033814209875E-14)*Y+ + 1.049256040808E-12)*Y-1.70859789556117E-11 )*Y+ + 2.15219425727959E-10 )*Y-2.52746574206884E-09 )*Y+ + 3.27761714422960E-08 )*Y-3.90387662925193E-07 )*Y+ + 3.46340204593870E-06 )*Y-2.43236345136782E-05 )*Y+3.54846978585226E-04 + weights4 = ((((((((((((( 2.69412277020887E-20*Y-4.24837886165685E-19)* + Y+6.030500065438E-18)*Y-9.069722758289E-17)*Y+ + 1.246599177672E-15)*Y-1.56872999797549E-14 )*Y+ + 1.87305099552692E-13 )*Y-2.09498886675861E-12 )*Y+ + 2.11630022068394E-11 )*Y-1.92566242323525E-10 )*Y+ + 1.62012436344069E-09 )*Y-1.23621614171556E-08 )*Y+ + 7.72165684563049E-08 )*Y-3.59858901591047E-07 )*Y+2.43682618601000E-06 + elif X < 25.0: + Y = X-22.5E+00 + roots0 = (((((((((-1.13927848238726E-15*Y+7.39404133595713E-15)*Y+ + 1.445982921243E-13)*Y-2.676703245252E-12)*Y+ + 5.823521627177E-12)*Y+2.17264723874381E-10 )*Y+ + 3.56242145897468E-09 )*Y-3.03763737404491E-07 )*Y+ + 9.46859114120901E-06 )*Y-2.30896753853196E-04 )*Y+5.24663913001114E-03 + roots1 = (((((((((( 2.89872355524581E-16*Y-1.22296292045864E-14)*Y+ + 6.184065097200E-14)*Y+1.649846591230E-12)*Y- + 2.729713905266E-11)*Y+3.709913790650E-11)*Y+ + 2.216486288382E-09)*Y+4.616160236414E-08)*Y- + 3.32380270861364E-06 )*Y+9.84635072633776E-05 )*Y- + 2.30092118015697E-03 )*Y+5.00845183695073E-02 + roots2 = (((((((((( 1.97068646590923E-15*Y-4.89419270626800E-14)*Y+ + 1.136466605916E-13)*Y+7.546203883874E-12)*Y- + 9.635646767455E-11)*Y-8.295965491209E-11)*Y+ + 7.534109114453E-09)*Y+2.699970652707E-07)*Y- + 1.42982334217081E-05 )*Y+3.78290946669264E-04 )*Y- + 8.03133015084373E-03 )*Y+1.58689469640791E-01 + roots3 = (((((((((( 1.33642069941389E-14*Y-1.55850612605745E-13)*Y- + 7.522712577474E-13)*Y+3.209520801187E-11)*Y- + 2.075594313618E-10)*Y-2.070575894402E-09)*Y+ + 7.323046997451E-09)*Y+1.851491550417E-06)*Y- + 6.37524802411383E-05 )*Y+1.36795464918785E-03 )*Y- + 2.42051126993146E-02 )*Y+3.97847167557815E-01 + roots4 = ((((((((((-6.07053986130526E-14*Y+1.04447493138843E-12)*Y- + 4.286617818951E-13)*Y-2.632066100073E-10)*Y+ + 4.804518986559E-09)*Y-1.835675889421E-08)*Y- + 1.068175391334E-06)*Y+3.292234974141E-05)*Y- + 5.94805357558251E-04 )*Y+8.29382168612791E-03 )*Y- + 9.93122509049447E-02 )*Y+1.09857804755042E+00 + weights0 = (((((((((-9.10338640266542E-15*Y+1.00438927627833E-13)*Y+ + 7.817349237071E-13)*Y-2.547619474232E-11)*Y+ + 1.479321506529E-10)*Y+1.52314028857627E-09 )*Y+ + 9.20072040917242E-09 )*Y-2.19427111221848E-06 )*Y+ + 8.65797782880311E-05 )*Y-2.82718629312875E-03 )*Y+1.28718310443295E-01 + weights1 = ((((((((( 5.52380927618760E-15*Y-6.43424400204124E-14)*Y- + 2.358734508092E-13)*Y+8.261326648131E-12)*Y+ + 9.229645304956E-11)*Y-5.68108973828949E-09 )*Y+ + 1.22477891136278E-07 )*Y-2.11919643127927E-06 )*Y+ + 4.23605032368922E-05 )*Y-1.14423444576221E-03 )*Y+5.06607252890186E-02 + weights2 = ((((((((( 3.99457454087556E-15*Y-5.11826702824182E-14)*Y- + 4.157593182747E-14)*Y+4.214670817758E-12)*Y+ + 6.705582751532E-11)*Y-3.36086411698418E-09 )*Y+ + 6.07453633298986E-08 )*Y-7.40736211041247E-07 )*Y+ + 8.84176371665149E-06 )*Y-1.72559275066834E-04 )*Y+7.16639814253567E-03 + weights3 = (((((((((((-2.14649508112234E-18*Y-2.45525846412281E-18)*Y+ + 6.126212599772E-16)*Y-8.526651626939E-15)*Y+ + 4.826636065733E-14)*Y-3.39554163649740E-13 )*Y+ + 1.67070784862985E-11 )*Y-4.42671979311163E-10 )*Y+ + 6.77368055908400E-09 )*Y-7.03520999708859E-08 )*Y+ + 6.04993294708874E-07 )*Y-7.80555094280483E-06 )*Y+2.85954806605017E-04 + weights4 = ((((((((((((-5.63938733073804E-21*Y+6.92182516324628E-20)*Y- + 1.586937691507E-18)*Y+3.357639744582E-17)*Y- + 4.810285046442E-16)*Y+5.386312669975E-15)*Y- + 6.117895297439E-14)*Y+8.441808227634E-13)*Y- + 1.18527596836592E-11 )*Y+1.36296870441445E-10 )*Y- + 1.17842611094141E-09 )*Y+7.80430641995926E-09 )*Y- + 5.97767417400540E-08 )*Y+1.65186146094969E-06 + elif X < 40.0: + weights0 = math.sqrt(PIE4/X) + E = math.exp(-X) + roots0 = ((((((((-1.73363958895356E-06*X+1.19921331441483E-04)*X - + 1.59437614121125E-02)*X+1.13467897349442E+00)*X - + 4.47216460864586E+01)*X+1.06251216612604E+03)*X - + 1.52073917378512E+04)*X+1.20662887111273E+05)*X - + 4.07186366852475E+05)*E + R15/(X-R15) + roots1 = ((((((((-1.60102542621710E-05*X+1.10331262112395E-03)*X - + 1.50043662589017E-01)*X+1.05563640866077E+01)*X - + 4.10468817024806E+02)*X+9.62604416506819E+03)*X - + 1.35888069838270E+05)*X+1.06107577038340E+06)*X - + 3.51190792816119E+06)*E + R25/(X-R25) + roots2 = ((((((((-4.48880032128422E-05*X+2.69025112122177E-03)*X - + 4.01048115525954E-01)*X+2.78360021977405E+01)*X - + 1.04891729356965E+03)*X+2.36985942687423E+04)*X - + 3.19504627257548E+05)*X+2.34879693563358E+06)*X - + 7.16341568174085E+06)*E + R35/(X-R35) + roots3 = ((((((((-6.38526371092582E-05*X-2.29263585792626E-03)*X - + 7.65735935499627E-02)*X+9.12692349152792E+00)*X - + 2.32077034386717E+02)*X+2.81839578728845E+02)*X + + 9.59529683876419E+04)*X-1.77638956809518E+06)*X + + 1.02489759645410E+07)*E + R45/(X-R45) + roots4 = ((((((((-3.59049364231569E-05*X-2.25963977930044E-02)*X + + 1.12594870794668E+00)*X-4.56752462103909E+01)*X + + 1.05804526830637E+03)*X-1.16003199605875E+04)*X - + 4.07297627297272E+04)*X+2.22215528319857E+06)*X - + 1.61196455032613E+07)*E + R55/(X-R55) + weights4 = (((((((((-4.61100906133970E-10*X+1.43069932644286E-07)*X - + 1.63960915431080E-05)*X+1.15791154612838E-03)*X - + 5.30573476742071E-02)*X+1.61156533367153E+00)*X - + 3.23248143316007E+01)*X+4.12007318109157E+02)*X - + 3.02260070158372E+03)*X+9.71575094154768E+03)*E + W55*weights0 + weights3 = (((((((((-2.40799435809950E-08*X+8.12621667601546E-06)*X - + 9.04491430884113E-04)*X+6.37686375770059E-02)*X - + 2.96135703135647E+00)*X+9.15142356996330E+01)*X - + 1.86971865249111E+03)*X+2.42945528916947E+04)*X - + 1.81852473229081E+05)*X+5.96854758661427E+05)*E + W45*weights0 + weights2 = (((((((( 1.83574464457207E-05*X-1.54837969489927E-03)*X + + 1.18520453711586E-01)*X-6.69649981309161E+00)*X + + 2.44789386487321E+02)*X-5.68832664556359E+03)*X + + 8.14507604229357E+04)*X-6.55181056671474E+05)*X + + 2.26410896607237E+06)*E + W35*weights0 + weights1 = (((((((( 2.77778345870650E-05*X-2.22835017655890E-03)*X + + 1.61077633475573E-01)*X-8.96743743396132E+00)*X + + 3.28062687293374E+02)*X-7.65722701219557E+03)*X + + 1.10255055017664E+05)*X-8.92528122219324E+05)*X + + 3.10638627744347E+06)*E + W25*weights0 + weights0 = weights0-0.01962E+00*E-weights1-weights2-weights3-weights4 + elif X < 59.0: + weights0 = math.sqrt(PIE4/X) + XXX = X**3 + E = XXX*math.exp(-X) + roots0 = (((-2.43758528330205E-02*X+2.07301567989771E+00)*X - + 6.45964225381113E+01)*X+7.14160088655470E+02)*E + R15/(X-R15) + roots1 = (((-2.28861955413636E-01*X+1.93190784733691E+01)*X - + 5.99774730340912E+02)*X+6.61844165304871E+03)*E + R25/(X-R25) + roots2 = (((-6.95053039285586E-01*X+5.76874090316016E+01)*X - + 1.77704143225520E+03)*X+1.95366082947811E+04)*E + R35/(X-R35) + roots3 = (((-1.58072809087018E+00*X+1.27050801091948E+02)*X - + 3.86687350914280E+03)*X+4.23024828121420E+04)*E + R45/(X-R45) + roots4 = (((-3.33963830405396E+00*X+2.51830424600204E+02)*X - + 7.57728527654961E+03)*X+8.21966816595690E+04)*E + R55/(X-R55) + E = XXX*E + weights4 = (( 1.35482430510942E-08*X-3.27722199212781E-07)*X + + 2.41522703684296E-06)*E + W55*weights0 + weights3 = (( 1.23464092261605E-06*X-3.55224564275590E-05)*X + + 3.03274662192286E-04)*E + W45*weights0 + weights2 = (( 1.34547929260279E-05*X-4.19389884772726E-04)*X + + 3.87706687610809E-03)*E + W35*weights0 + weights1 = (( 2.09539509123135E-05*X-6.87646614786982E-04)*X + + 6.68743788585688E-03)*E + W25*weights0 + weights0 = weights0-weights1-weights2-weights3-weights4 + else: + weights0 = math.sqrt(PIE4/X) + roots0 = R15/(X-R15) + roots1 = R25/(X-R25) + roots2 = R35/(X-R35) + roots3 = R45/(X-R45) + roots4 = R55/(X-R55) + weights1 = W25*weights0 + weights2 = W35*weights0 + weights3 = W45*weights0 + weights4 = W55*weights0 + weights0 = weights0-weights1-weights2-weights3-weights4 + + roots[0] = roots0 + roots[1] = roots1 + roots[2] = roots2 + roots[3] = roots3 + roots[4] = roots4 + weights[0] = weights0 + weights[1] = weights1 + weights[2] = weights2 + weights[3] = weights3 + weights[4] = weights4 + + return roots, weights#[roots1,roots2,roots3,roots4,roots[5]],[weights1,weights2,weights3,weights4,weights[5]] + +# Reference: https://github.com/sunqm/libcint/blob/master/src/roots_for_x0.dat BSD-2 Clause license +POLY_SMALLX_R0 = np.array([ + # nroots = 1 + 5.0000000000000000e-01, + # nroots = 2 + 1.3069360623708470e-01, + 2.8693063937629151e+00, + # nroots = 3 + 6.0376924683279896e-02, + 7.7682335593104601e-01, + 6.6627997193856743e+00, + # nroots = 4 + 3.4819897306147152e-02, + 3.8156718508004406e-01, + 1.7373072694588976e+00, + 1.1846305648154912e+01, + # nroots = 5 + 2.2665926631698637e-02, + 2.3127169214090557e-01, + 8.5734602411883609e-01, + 2.9735303812034606e+00, + 1.8415185975905100e+01, + # nroots = 6 + 1.5933294950708051e-02, + 1.5647046776795465e-01, + 5.2658326320347937e-01, + 1.4554949383527416e+00, + 4.4772915489042244e+00, + 2.6368226486820891e+01, + # nroots = 7 + 1.1813808454790223e-02, + 1.1337832545962978e-01, + 3.6143546199827142e-01, + 8.9527303800610059e-01, + 2.1671830744997034e+00, + 6.2459217468839974e+00, + 3.5704994544697506e+01, + # nroots = 8 + 9.1096129361797583e-03, + 8.6130778786234360e-02, + 2.6546936423055723e-01, + 6.1752374342048377e-01, + 1.3290252120652055e+00, + 2.9891077977621077e+00, + 8.2783291650163164e+00, + 4.6425304325782918e+01, + # nroots = 9 + 7.2388268576176690e-03, + 6.7744856280706228e-02, + 2.0415049332589749e-01, + 4.5633199434791133e-01, + 9.1729173690437338e-01, + 1.8243932992566771e+00, + 3.9197868892557834e+00, + 1.0573996723107014e+01, + 5.8529065180664020e+01, + # nroots = 10 + 5.8908068184661301e-03, + 5.4725924879562259e-02, + 1.6232609261161096e-01, + 3.5315267858751925e-01, + 6.7944242243948438e-01, + 1.2573939988964797e+00, + 2.3797176188890110e+00, + 4.9584689501831161e+00, + 1.3132652926121416e+01, + 7.2016228580573340e+01, + # nroots = 11 + 4.8873361261651269e-03, + 4.5157008761019399e-02, + 1.3240037096506918e-01, + 2.8253618374640332e-01, + 5.2746670115882444e-01, + 9.3166748944873068e-01, + 1.6361250128213276e+00, + 2.9941113975093119e+00, + 6.1047380665207358e+00, + 1.5954143802284950e+01, + 8.6886766630657462e+01, + # nroots = 12 + 4.1201918467690364e-03, + 3.7911181291998906e-02, + 1.1018828563899001e-01, + 2.3179530831466225e-01, + 4.2345630230694603e-01, + 7.2421338523125789e-01, + 1.2113317522159244e+00, + 2.0525334008082456e+00, + 3.6670630733185123e+00, + 7.3583481234816475e+00, + 1.9038376627614220e+01, + 1.0314066236793083e+02, +]) + +POLY_SMALLX_R1 = np.array([ + # nroots = 1 + -2.0000000000000001e-01, + # nroots = 2 + -2.9043023608241049e-02, + -6.3762364305842567e-01, + # nroots = 3 + -9.2887576435815231e-03, + -1.1951128552785324e-01, + -1.0250461106747191e+00, + # nroots = 4 + -4.0964585066055473e-03, + -4.4890257068240479e-02, + -2.0438909052457618e-01, + -1.3936830174299895e+00, + # nroots = 5 + -2.1586596792093939e-03, + -2.2025875441991007e-02, + -8.1652002297032011e-02, + -2.8319336963842484e-01, + -1.7538272358004856e+00, + # nroots = 6 + -1.2746635960566440e-03, + -1.2517637421436372e-02, + -4.2126661056278353e-02, + -1.1643959506821934e-01, + -3.5818332391233798e-01, + -2.1094581189456711e+00, + # nroots = 7 + -8.1474541067518772e-04, + -7.8191948592848132e-03, + -2.4926583586087684e-02, + -6.1742968138351763e-02, + -1.4946090168963472e-01, + -4.3075322392303428e-01, + -2.4624134168756902e+00, + # nroots = 8 + -5.5209775370786412e-04, + -5.2200471991657189e-03, + -1.6089052377609530e-02, + -3.7425681419423255e-02, + -8.0546982549406398e-02, + -1.8115804834921864e-01, + -5.0171691909189797e-01, + -2.8136548076232071e+00, + # nroots = 9 + -3.9128793824960370e-04, + -3.6618841232814174e-03, + -1.1035161801399865e-02, + -2.4666594289076287e-02, + -4.9583337129966133e-02, + -9.8615854013874446e-02, + -2.1188037239220453e-01, + -5.7156739043821692e-01, + -3.1637332530088660e+00, + # nroots = 10 + -2.8735643016907951e-04, + -2.6695573111981587e-03, + -7.9183459810541930e-03, + -1.7226959931098500e-02, + -3.3143532801926071e-02, + -6.1336292629096574e-02, + -1.1608378628726883e-01, + -2.4187653415527396e-01, + -6.4061721590836185e-01, + -3.5129867600279674e+00, + # nroots = 11 + -2.1721493894067231e-04, + -2.0069781671564176e-03, + -5.8844609317808515e-03, + -1.2557163722062370e-02, + -2.3442964495947752e-02, + -4.1407443975499142e-02, + -7.2716667236503454e-02, + -1.3307161766708053e-01, + -2.7132169184536603e-01, + -7.0907305787933106e-01, + -3.8616340724736649e+00, + # nroots = 12 + -1.6817109578649129e-04, + -1.5473951547754655e-03, + -4.4974810464893881e-03, + -9.4610329924351942e-03, + -1.7283930706405961e-02, + -2.9559730009439098e-02, + -4.9442112335343846e-02, + -8.3776873502377364e-02, + -1.4967604380891888e-01, + -3.0034073973394482e-01, + -7.7707659704547827e-01, + -4.2098229537930951e+00, +]) + +POLY_SMALLX_W0 = np.array([ + # nroots = 1 + 1.0000000000000000e+00, + # nroots = 2 + 6.5214515486254609e-01, + 3.4785484513745385e-01, + # nroots = 3 + 4.6791393457269104e-01, + 3.6076157304813861e-01, + 1.7132449237917036e-01, + # nroots = 4 + 3.6268378337836199e-01, + 3.1370664587788727e-01, + 2.2238103445337448e-01, + 1.0122853629037626e-01, + # nroots = 5 + 2.9552422471475287e-01, + 2.6926671930999635e-01, + 2.1908636251598204e-01, + 1.4945134915058059e-01, + 6.6671344308688138e-02, + # nroots = 6 + 2.4914704581340277e-01, + 2.3349253653835481e-01, + 2.0316742672306592e-01, + 1.6007832854334622e-01, + 1.0693932599531843e-01, + 4.7175336386511828e-02, + # nroots = 7 + 2.1526385346315779e-01, + 2.0519846372129560e-01, + 1.8553839747793782e-01, + 1.5720316715819355e-01, + 1.2151857068790319e-01, + 8.0158087159760208e-02, + 3.5119460331751860e-02, + # nroots = 8 + 1.8945061045506850e-01, + 1.8260341504492358e-01, + 1.6915651939500254e-01, + 1.4959598881657674e-01, + 1.2462897125553388e-01, + 9.5158511682492786e-02, + 6.2253523938647894e-02, + 2.7152459411754096e-02, + # nroots = 9 + 1.6914238296314360e-01, + 1.6427648374583273e-01, + 1.5468467512626524e-01, + 1.4064291467065065e-01, + 1.2255520671147846e-01, + 1.0094204410628717e-01, + 7.6425730254889052e-02, + 4.9714548894969797e-02, + 2.1616013526483312e-02, + # nroots = 10 + 1.5275338713072584e-01, + 1.4917298647260374e-01, + 1.4209610931838204e-01, + 1.3168863844917664e-01, + 1.1819453196151841e-01, + 1.0193011981724044e-01, + 8.3276741576704755e-02, + 6.2672048334109068e-02, + 4.0601429800386939e-02, + 1.7614007139152118e-02, + # nroots = 11 + 1.3925187285563198e-01, + 1.3654149834601517e-01, + 1.3117350478706238e-01, + 1.2325237681051242e-01, + 1.1293229608053922e-01, + 1.0041414444288096e-01, + 8.5941606217067729e-02, + 6.9796468424520489e-02, + 5.2293335152683286e-02, + 3.3774901584814152e-02, + 1.4627995298272200e-02, + # nroots = 12 + 1.2793819534675216e-01, + 1.2583745634682830e-01, + 1.2167047292780339e-01, + 1.1550566805372560e-01, + 1.0744427011596563e-01, + 9.7618652104113884e-02, + 8.6190161531953274e-02, + 7.3346481411080300e-02, + 5.9298584915436783e-02, + 4.4277438817419808e-02, + 2.8531388628933663e-02, + 1.2341229799987200e-02, +]) + +POLY_SMALLX_W1 = np.array([ + # nroots = 1 + -3.3333333333333331e-01, + # nroots = 2 + -1.2271362192859778e-01, + -2.1061971140473557e-01, + # nroots = 3 + -5.6487691723447885e-02, + -1.4907718645889767e-01, + -1.2776845515098778e-01, + # nroots = 4 + -3.1384430571429409e-02, + -8.9804624256712817e-02, + -1.2931437096375242e-01, + -8.2829907541438680e-02, + # nroots = 5 + -1.9686757690986864e-02, + -5.6173759018728280e-02, + -9.7115272681211257e-02, + -1.0297926219357020e-01, + -5.7378281748836732e-02, + # nroots = 6 + -1.3404459326117429e-02, + -3.7140259226780728e-02, + -6.9798025993402457e-02, + -8.9903208869919593e-02, + -8.1202949733650345e-02, + -4.1884430183462780e-02, + # nroots = 7 + -9.6762784934135981e-03, + -2.5810077192692869e-02, + -5.0559277860857933e-02, + -7.1997207281479375e-02, + -7.8739057440032886e-02, + -6.4711830138776669e-02, + -3.1839604926079998e-02, + # nroots = 8 + -7.2956931243810877e-03, + -1.8697575943681034e-02, + -3.7385544074891822e-02, + -5.6452682904581976e-02, + -6.8429140245654982e-02, + -6.7705342645285799e-02, + -5.2380981359025407e-02, + -2.4986373035831237e-02, + # nroots = 9 + -5.6884471222090364e-03, + -1.4017609368068548e-02, + -2.8279396473125228e-02, + -4.4297481709585342e-02, + -5.7192383961753759e-02, + -6.2644131890598725e-02, + -5.8019794346925377e-02, + -4.3080183147849817e-02, + -2.0113905313217502e-02, + # nroots = 10 + -4.5548069078836916e-03, + -1.0812068870036251e-02, + -2.1858322694621932e-02, + -3.5065901484532154e-02, + -4.7201253922888042e-02, + -5.5107972224754838e-02, + -5.6377251364257981e-02, + -4.9866349375738916e-02, + -3.5958202071776788e-02, + -1.6531204416842745e-02, + # nroots = 11 + -3.7265960577018311e-03, + -8.5403678824716809e-03, + -1.7229332137015666e-02, + -2.8080687367955298e-02, + -3.8907666134333468e-02, + -4.7433694841593890e-02, + -5.1693920888210537e-02, + -5.0384549968286702e-02, + -4.3099530033836778e-02, + -3.0414471142145506e-02, + -1.3822516879781982e-02, + # nroots = 12 + -3.1038096899801901e-03, + -6.8830915722212487e-03, + -1.3819746842434521e-02, + -2.2762002213180321e-02, + -3.2198834723663874e-02, + -4.0484183390368120e-02, + -4.6081931636853396e-02, + -4.7795785285076720e-02, + -4.4950377862156901e-02, + -3.7497135400073503e-02, + -2.6030178540522940e-02, + -1.1726256176801588e-02, +]) + +POLY_LARGEX_RT = np.array([ + # nroots = 1 + 5.0000000000000000e-01, + # nroots = 2 + 2.7525512860841095e-01, + 2.7247448713915889e+00, + # nroots = 3 + 1.9016350919348812e-01, + 1.7844927485432516e+00, + 5.5253437422632601e+00, + # nroots = 4 + 1.4530352150331710e-01, + 1.3390972881263614e+00, + 3.9269635013582871e+00, + 8.5886356890120350e+00, + # nroots = 5 + 1.1758132021177814e-01, + 1.0745620124369040e+00, + 3.0859374437175502e+00, + 6.4147297336620301e+00, + 1.1807189489971737e+01, + # nroots = 6 + 9.8747014068481187e-02, + 8.9830283456961768e-01, + 2.5525898026681713e+00, + 5.1961525300544658e+00, + 9.1242480375311796e+00, + 1.5129959781108086e+01, + # nroots = 7 + 8.5115442997594035e-02, + 7.7213792004277704e-01, + 2.1805918884504591e+00, + 4.3897928867310139e+00, + 7.5540913261017844e+00, + 1.1989993039823879e+01, + 1.8528277495852493e+01, + # nroots = 8 + 7.4791882596818265e-02, + 6.7724908764928915e-01, + 1.9051136350314284e+00, + 3.8094763614849070e+00, + 6.4831454286271706e+00, + 1.0093323675221344e+01, + 1.4972627088426393e+01, + 2.1984272840962650e+01, + # nroots = 9 + 6.6702230958194400e-02, + 6.0323635708174872e-01, + 1.6923950797931788e+00, + 3.3691762702432690e+00, + 5.6944233429577551e+00, + 8.7697567302686021e+00, + 1.2771825354869193e+01, + 1.8046505467728981e+01, + 2.5485979166099078e+01, + # nroots = 10 + 6.0192063149587915e-02, + 5.4386750029464603e-01, + 1.5229441054044437e+00, + 3.0225133764515739e+00, + 5.0849077500985240e+00, + 7.7774392315254453e+00, + 1.1208130204348663e+01, + 1.5561163332189350e+01, + 2.1193892096301543e+01, + 2.9024950340236227e+01, + # nroots = 11 + 5.4839869578818493e-02, + 4.9517412335035643e-01, + 1.3846557400845998e+00, + 2.7419199401067025e+00, + 4.5977377004857116e+00, + 6.9993974695288363e+00, + 1.0018908275957234e+01, + 1.3769305866101691e+01, + 1.8441119680978193e+01, + 2.4401961242387042e+01, + 3.2594980091440817e+01, + # nroots = 12 + 5.0361889117293952e-02, + 4.5450668156378027e-01, + 1.2695899401039614e+00, + 2.5098480972321280e+00, + 4.1984156448784136e+00, + 6.3699753880306353e+00, + 9.0754342309612035e+00, + 1.2390447963809471e+01, + 1.6432195087675314e+01, + 2.1396755936166109e+01, + 2.7661108779846089e+01, + 3.6191360360615604e+01, +]) + +POLY_LARGEX_WW = np.array([ + # nroots = 1 + 1.0000000000000000e+00, + # nroots = 2 + 9.0824829046386302e-01, + 9.1751709536136983e-02, + # nroots = 3 + 8.1765693911205850e-01, + 1.7723149208382905e-01, + 5.1115688041124931e-03, + # nroots = 4 + 7.4602451535815473e-01, + 2.3447981532351803e-01, + 1.9270440241576533e-02, + 2.2522907675073554e-04, + # nroots = 5 + 6.8928466986403814e-01, + 2.7096740596053548e-01, + 3.8223161001540572e-02, + 1.5161418686244353e-03, + 8.6213052614365738e-06, + # nroots = 6 + 6.4332872302566002e-01, + 2.9393409609065996e-01, + 5.8233375824728303e-02, + 4.4067613750663976e-03, + 9.6743698451812559e-05, + 2.9998543352743358e-07, + # nroots = 7 + 6.0526925362603901e-01, + 3.0816667968502726e-01, + 7.7300217648506794e-02, + 8.8578382138948062e-03, + 4.0067910752148827e-04, + 5.3219826881352609e-06, + 9.7363225154967611e-09, + # nroots = 8 + 5.7313704247602426e-01, + 3.1667674550189923e-01, + 9.4569504708028052e-02, + 1.4533875202369467e-02, + 1.0519698531478185e-03, + 3.0600064324974545e-05, + 2.6189464325736453e-07, + 2.9956294463236794e-10, + # nroots = 9 + 5.4556646930857577e-01, + 3.2137060778702525e-01, + 1.0979326496044525e-01, + 2.1033035503882684e-02, + 2.1309695925833040e-03, + 1.0359792288232413e-04, + 2.0431047952739623e-06, + 1.1810976957673191e-08, + 8.8331775387174107e-12, + # nroots = 10 + 5.2158612689910977e-01, + 3.2347866796799990e-01, + 1.2301274412795381e-01, + 2.7995674894202006e-02, + 3.6602062621609857e-03, + 2.5765255992385888e-04, + 8.8042421804617054e-06, + 1.2254980519965896e-07, + 4.9641247246303573e-10, + 2.5156013448758539e-13, + # nroots = 11 + 5.0048719317386992e-01, + 3.2381258682735053e-01, + 1.3439262285778006e-01, + 3.5138145761611533e-02, + 5.6175220951544319e-03, + 5.2456660651192756e-04, + 2.6691954253619027e-05, + 6.6397074996280721e-07, + 6.7330283189164226e-09, + 1.9682757964692173e-11, + 6.9589212957542919e-15, + # nroots = 12 + 4.8174023109328062e-01, + 3.2291902573400016e-01, + 1.4413872803435665e-01, + 4.2252688817935091e-02, + 7.9532178583626174e-03, + 9.2943743755879136e-04, + 6.4190011305491828e-05, + 2.4353194908851625e-06, + 4.5349233469612837e-08, + 3.4373298559297163e-10, + 7.4299483055247976e-13, + 1.8780387378083912e-16, +]) + + +# Reference: https://raw.githubusercontent.com/sunqm/libcint/master/src/roots_xw.dat BSD-2 Clause license +DATA_X = np.array([ +# root=6 base[0]=0.0 */ + 2.89997626587128951e-02, + -1.38283203321371549e-03, + 4.90123491128919878e-05, + -1.52441499949787395e-06, + 4.36236281357860862e-08, + -1.17013639910324496e-09, + 2.95444793613339946e-11, + -7.00778192694614005e-13, + 1.53944148960478589e-14, + -3.05557470241521788e-16, + 5.03095618996754473e-18, + -5.27078930588344057e-20, + -5.52938274512611150e-22, + 7.34288597624025887e-23, + 2.84588229037201268e-01, + -1.37069245554686907e-02, + 4.57279273263211264e-04, + -1.19151902658947535e-05, + 2.31868175862158198e-07, + -2.40666613692062216e-09, + -4.14925950176661374e-11, + 2.91484083549932738e-12, + -7.76218456955175350e-14, + 7.55646276626551849e-16, + 3.05882706546193773e-17, + -1.81852027463530420e-18, + 4.69474231464040978e-20, + -1.77565247599077308e-22, + 9.56498423271649245e-01, + -4.69317552473567864e-02, + 1.37881347405555891e-03, + -2.34734388666831310e-05, + 1.96836923367212562e-08, + 1.01066035998163247e-08, + -1.74276354683884852e-10, + -4.34157183372568341e-12, + 2.21430382070096177e-13, + -5.13699515116067899e-16, + -1.95133599512945587e-16, + 4.37988639239853565e-18, + 1.05583599354709779e-19, + -6.16486231104738034e-21, + 2.63932146647556465e+00, + -1.32628167171575967e-01, + 3.18562831658534716e-03, + -2.11021235921111502e-05, + -6.89030214037582645e-07, + 3.96151583874924818e-09, + 4.95311642348988196e-10, + -5.83996206782267492e-14, + -4.37207974823855265e-13, + -2.56909195578923181e-15, + 4.15501392240978402e-16, + 4.89913088031447016e-18, + -4.07052571328727954e-19, + -6.29359661911105259e-21, + 8.10505826451101719e+00, + -4.17096656574409086e-01, + 7.67099846573592384e-03, + 4.58357577803379625e-06, + -6.81264308077427133e-07, + -2.68348765670797920e-08, + -3.77539657664350443e-10, + 9.28163114693297964e-12, + 6.12605559757070921e-13, + 1.07246744359508874e-14, + -2.57148758702041669e-16, + -1.93692365274355731e-17, + -3.31814614631768301e-19, + 1.41507918904700670e-20, + 4.76754169657270310e+01, + -2.49502133467614717e+00, + 3.55346670237348811e-02, + 3.86658222415551739e-05, + 6.73474403190260745e-07, + 5.15700133064762639e-09, + -2.53897719650546641e-10, + -1.68663983042339312e-11, + -6.55508927852116921e-13, + -2.00781038005366292e-14, + -5.19280341672476101e-16, + -1.03191364082005669e-17, + 1.81224635524630800e-19, + 4.71578193877246221e-20, +# root=6 base[1]=2.5 */ + 2.41514623624493191e-02, + -1.05359730703498519e-03, + 3.42436672357273534e-05, + -9.80920126639870240e-07, + 2.59714569092563626e-08, + -6.49754367218156943e-10, + 1.54158423290734186e-11, + -3.49918743590966772e-13, + 7.45574923202658746e-15, + -1.49782439204642031e-16, + 2.89689762125635828e-18, + -3.71143990289835741e-20, + 4.57633918305747464e-22, + -1.35562534874629082e-23, + 2.36255361428731103e-01, + -1.05614424586147251e-02, + 3.34857155278298014e-04, + -8.62139411311366450e-06, + 1.79063856108231992e-07, + -2.67338383561487307e-09, + 1.03986276172853932e-11, + 9.82730515122843196e-13, + -4.21707729344180405e-14, + 9.64768105296178460e-16, + -8.20535395361347847e-18, + -1.98282693596286827e-19, + 1.67537176138453487e-20, + -6.57155659654187536e-22, + 7.89074205723015565e-01, + -3.70088818400262920e-02, + 1.10487641059977496e-03, + -2.17962923432699425e-05, + 1.74045344477037519e-07, + 5.20529517033775149e-09, + -2.07724672886557101e-10, + 1.36513598082853843e-12, + 1.14869016789684925e-13, + -3.97862482747552507e-15, + 1.38009378005221868e-17, + 3.49426683163498923e-18, + -9.60416681248246944e-20, + -1.09640086492744088e-21, + 2.15792358555883412e+00, + -1.08333359518376013e-01, + 2.87089270113663302e-03, + -3.08758072809867335e-05, + -4.99158953672690265e-07, + 1.42813872263907458e-08, + 3.07428650646162037e-10, + -1.22626914580151985e-11, + -2.33610402330881400e-13, + 1.23923905003546688e-14, + 2.00507423836836081e-16, + -1.24164799043896645e-17, + -1.45057747697048514e-19, + 1.23316659393370929e-20, + 6.55943729617973492e+00, + -3.55737335305186531e-01, + 7.64163953185030640e-03, + -1.09708080122447594e-05, + -1.27495930604138799e-06, + -3.03205609175854409e-08, + 1.90297268007911366e-10, + 3.12852041504055657e-11, + 5.94500836833543670e-13, + -1.71591186797429265e-14, + -1.02500483277119244e-15, + -3.46747257397773112e-18, + 1.09672729711908181e-18, + 2.39554857123757847e-20, + 3.82670899229868624e+01, + -2.20870017112943362e+00, + 3.60650784642163463e-02, + 4.97221585991238269e-05, + 6.61774612764825730e-07, + -9.79772091720738812e-09, + -1.15946862372126015e-09, + -5.36794537415831388e-11, + -1.75148925114970675e-12, + -3.52598782635939549e-14, + 4.49617104344485998e-16, + 8.32215467423724689e-17, + 3.46135427795897414e-18, + 1.27342480471074780e-20, +# root=6 base[2]=5.0 */ + 2.04192392757231930e-02, + -8.20539690459389545e-04, + 2.45941052304795852e-05, + -6.52137987921387424e-07, + 1.60034198097767513e-08, + -3.74643297955200146e-10, + 8.29001244631777191e-12, + -1.78170579080302016e-13, + 3.79336978783639394e-15, + -6.29929650896577250e-17, + 1.46409150557070988e-18, + -3.35390228941886712e-20, + -1.83255512904345556e-22, + -7.17629381228593771e-25, + 1.98775639117839825e-01, + -8.25164555153998398e-03, + 2.46889853270684388e-04, + -6.16355512689772513e-06, + 1.29659751221831663e-07, + -2.21650914821821612e-09, + 2.37435033286846460e-11, + 1.18237077928694413e-13, + -1.40870881125713933e-14, + 5.94126571171459705e-16, + -9.11485088955823756e-18, + -7.34956791163173138e-21, + -3.67406191548698573e-21, + -8.41876257324238110e-23, + 6.57135338893597765e-01, + -2.91625108145569072e-02, + 8.62637290400617698e-04, + -1.84307323814717101e-05, + 2.33011848988457062e-07, + 9.71308057478946093e-10, + -1.37485241735337167e-10, + 3.07216713760747672e-12, + 5.82675196501357936e-15, + -1.74671356553385934e-15, + 6.55693793489175708e-17, + -8.14347248770510608e-19, + -5.88479511209354187e-20, + 1.77786485761348914e-21, + 1.76801733562839569e+00, + -8.69603375450031246e-02, + 2.46284469294889320e-03, + -3.63027747690264607e-05, + -1.70063285283965209e-07, + 1.71348437809904572e-08, + -6.88804596404140730e-11, + -1.21529813375949502e-11, + 2.22655098288444220e-13, + 9.58107712954967599e-15, + -2.94204056492142519e-16, + -6.46840412200197178e-18, + 2.93159991234746720e-19, + 1.70115147393956648e-21, + 5.25737404064612601e+00, + -2.95520479851193396e-01, + 7.36927143612369114e-03, + -3.56468092411331601e-05, + -1.75705567305208015e-06, + -1.39340332857735191e-08, + 1.18667615362417945e-09, + 3.32511899590856276e-11, + -6.39419306916243213e-13, + -4.37865645942659614e-14, + 1.01768180757297811e-16, + 4.91722261033668732e-17, + 3.95556618424909141e-19, + -5.22232156369183972e-20, + 3.00133277956503832e+01, + -1.91764063623421865e+00, + 3.67122129965768360e-02, + 5.65939473751099931e-05, + 2.92686678413286555e-08, + -6.28145064805655770e-08, + -3.55821711379942490e-09, + -1.16711518206810159e-10, + -1.42136989770328676e-12, + 9.58642701065193288e-14, + 6.57832920708477388e-15, + 1.34120741604202898e-16, + -4.21317731525692138e-18, + -3.02136651920364685e-19, +# root=6 base[3]=7.5 */ + 1.74864975377361682e-02, + -6.51243268136434523e-04, + 1.80884379509565028e-05, + -4.46688875978495300e-07, + 1.01592986650159208e-08, + -2.23596740798895444e-10, + 4.72297567607017589e-12, + -8.47726900947672329e-14, + 2.20735901251201299e-15, + -3.54300600303128233e-17, + -7.04577117135808501e-20, + -3.04936147370343985e-20, + 5.01984035314373504e-22, + 2.07524489210565133e-23, + 1.69296468548565837e-01, + -6.54027518935577142e-03, + 1.84013295382399734e-04, + -4.41224199722940581e-06, + 9.11073897215511221e-08, + -1.64070396074627944e-09, + 2.34375571500578466e-11, + -6.44661044484281927e-14, + 1.97466779075151648e-16, + 1.75070910677638752e-16, + -1.25534943050881573e-17, + -9.27402788082959290e-20, + 2.82961610612405053e-21, + 2.27533727688418290e-22, + 5.52976888854541548e-01, + -2.30822521588383775e-02, + 6.63977490354283818e-04, + -1.46973732945024261e-05, + 2.26329737959212788e-07, + -1.31747879782406988e-09, + -5.52895539043768273e-11, + 2.65268293359250142e-12, + -2.35667441616953221e-14, + -3.35391902506178127e-16, + 6.75780289264580321e-19, + -1.43603063161120152e-18, + 2.70980942070406031e-20, + 1.14889039163389268e-21, + 1.45679017162001734e+00, + -6.90214130499971906e-02, + 2.02162925910190708e-03, + -3.64700381276890432e-05, + 1.33725979079564444e-07, + 1.24317408903274712e-08, + -2.75760721580830027e-10, + -2.09071212237680681e-12, + 3.24306924599962653e-13, + -3.87317297807447103e-15, + -2.90997196497484063e-16, + 5.27989765896968614e-18, + 1.39656469027658465e-19, + -4.89494714318018655e-21, + 4.18980298086533498e+00, + -2.38765059585933220e-01, + 6.76937466419151763e-03, + -6.41843074086327500e-05, + -1.69320914741760650e-06, + 2.20828289205843465e-08, + 1.62420381975362063e-09, + -7.50560379199772270e-12, + -1.64690057227830347e-12, + -1.25183159660007890e-15, + 1.66708247150039985e-15, + 2.05011306976197255e-18, + -1.93826114645707115e-18, + -5.19482155771542270e-21, + 2.29343022455061494e+01, + -1.62134977544637571e+00, + 3.73345324413760990e-02, + 4.12287422526812195e-05, + -2.35147674587784725e-06, + -1.87376473250100393e-07, + -6.54291638523347288e-09, + -5.05919207328160033e-11, + 7.21990827483894363e-12, + 3.60076353185699206e-13, + 2.47412336395804041e-15, + -4.22165088255440825e-16, + -1.58036470727275657e-17, + 8.07092554431149250e-20, +# root=6 base[4]=10.0 */ + 1.51404903495444519e-02, + -5.25516833102428584e-04, + 1.35739465102777837e-05, + -3.14435983776376941e-07, + 6.66461219128240978e-09, + -1.32000026604654202e-10, + 3.13016271568758978e-12, + -3.71344801777256192e-14, + 6.50004090328724911e-16, + -5.42577844222905820e-17, + -5.15601001142205849e-19, + 1.82045338122402278e-20, + 1.51159008872799617e-21, + 1.97167574708225365e-23, + 1.45776194043866436e-01, + -5.25747338239249910e-03, + 1.38827282402733228e-04, + -3.18703526125818077e-06, + 6.37874564860362009e-08, + -1.09691946284387781e-09, + 2.19502670062308008e-11, + -5.81344328719571759e-14, + -2.85872064780974655e-15, + -3.28411641946624967e-16, + -9.70939776824393306e-18, + 3.05110311794337911e-19, + 1.33937622350971666e-20, + 1.96553275223947117e-22, + 4.70238344856594770e-01, + -1.84166968463217139e-02, + 5.08298549521011720e-04, + -1.13354331520321753e-05, + 1.92231538189671100e-07, + -1.85184418181754896e-09, + 6.07767502306266179e-12, + 1.61699309986173617e-12, + -4.56595365978760072e-14, + -1.02851047436468055e-15, + -1.90166070824060424e-17, + 7.69237216861560111e-19, + 5.75300298658756720e-20, + 3.35108617089568118e-22, + 1.21035215804075924e+00, + -5.45460283429880857e-02, + 1.60385803418643959e-03, + -3.27020791682584150e-05, + 3.16699142116019196e-07, + 6.08746946155022988e-09, + -2.22925508667059608e-10, + 4.34804196915565923e-12, + 4.32860262071526524e-14, + -9.68746601278576086e-15, + 1.42580949928735821e-17, + 7.43755137589725384e-18, + -5.13014612989985354e-23, + 6.08110071533064294e-22, + 3.33758518802031690e+00, + -1.88104914050611388e-01, + 5.85760471436954071e-03, + -8.57992101296635299e-05, + -9.08115866025065605e-07, + 5.29804014231015473e-08, + 7.54574242412148703e-10, + -4.94144795916179606e-11, + -6.96623865934016405e-13, + 4.36186309237878276e-14, + 1.83077006703673493e-16, + -4.83994046105695672e-17, + 5.68239380140610863e-19, + 7.36690233560399473e-20, + 1.70480407250511981e+01, + -1.32167433521356648e+00, + 3.74523766088867768e-02, + -3.47675567727798252e-05, + -7.59936054669503994e-06, + -3.23758349968106647e-07, + -2.90805194483703423e-09, + 3.59305880003704035e-10, + 1.58647098884533524e-11, + -7.19264555250576429e-14, + -2.52514323088178815e-14, + -5.30983271836163199e-16, + 2.20398613342550996e-17, + 1.21568770855795985e-18, +# root=6 base[5]=12.5 */ + 1.32340350817569518e-02, + -4.30381201746977819e-04, + 1.03657027397899196e-05, + -2.25175729152636185e-07, + 4.69579923202153630e-09, + -6.88855583723629157e-11, + 2.07554289716386982e-12, + -4.85835584533472958e-14, + -1.26296363136139254e-15, + -3.44606209074029495e-17, + 2.13862266038900650e-18, + 1.01096984592569864e-19, + 1.04685405450951843e-21, + -9.42608935783267168e-23, + 1.26747847874053049e-01, + -4.28396803436526755e-03, + 1.06072900312420681e-04, + -2.31421889294773768e-06, + 4.68785010770084658e-08, + -6.12707552385942808e-10, + 1.69438240919633837e-11, + -3.74774443866244491e-13, + -1.64757039059745359e-14, + -2.28964612906944089e-16, + 2.03860856405017724e-17, + 1.04732710410477392e-18, + 8.44943422412644789e-21, + -9.59470349409460597e-22, + 4.03913088949260035e-01, + -1.48448228442252909e-02, + 3.89564920321773555e-04, + -8.53614549527388712e-06, + 1.59311045984140762e-07, + -1.36466464755667862e-09, + 2.49174693735071006e-11, + -4.66283501677840360e-13, + -8.04527575433045504e-14, + -2.56947070186414980e-16, + 7.82832949979012581e-17, + 3.46900694844547797e-18, + 2.36574964453681729e-20, + -3.67666079589352734e-21, + 1.01547609586476173e+00, + -4.31911543060549061e-02, + 1.24502348509430332e-03, + -2.69113451524855113e-05, + 3.94315000643418847e-07, + 2.05239720177004368e-09, + -1.29683633690020323e-10, + 9.13167476432656820e-13, + -2.14532319437424597e-13, + -2.32749186220320720e-15, + 3.64195577478999822e-16, + 8.51318259890870260e-18, + -3.55422143220222019e-20, + -9.78509099119074810e-21, + 2.67212898451711611e+00, + -1.45524978475152889e-01, + 4.77763517456631162e-03, + -9.13656188975043074e-05, + 2.13553648470698804e-07, + 5.33823569932830279e-08, + -7.14632399504081320e-10, + -4.83744731947635660e-11, + 6.48404757145560603e-13, + 2.70033966071412856e-14, + -4.04929909966209460e-16, + 2.85832712420673411e-17, + 1.25513240776005502e-18, + -8.15670850882710247e-20, + 1.23543663826803751e+01, + -1.02628710057195227e+00, + 3.60912774083152685e-02, + -2.07603097991127498e-04, + -1.36989160786235030e-05, + -2.25482747335871821e-07, + 1.23442398234790369e-08, + 6.11876248302170748e-10, + -6.24874982333032130e-12, + -1.05080073603758703e-12, + -8.61302574375632236e-15, + 1.42009178014452271e-15, + 3.44732196429296689e-17, + -1.51991449959098192e-18, +# root=6 base[6]=15.0 */ + 1.16629322231756091e-02, + -3.57076537867782114e-04, + 8.07621473806772426e-06, + -1.58909954468269410e-07, + 3.68041594642224196e-09, + -4.03029082800683991e-11, + 1.30710383317795802e-13, + -8.38744318327764170e-14, + 3.02631590001734085e-17, + 1.23911278206785147e-16, + 4.34414968294729668e-18, + -1.04053916886561208e-19, + -1.10398402846066240e-20, + -1.94498136138933492e-22, + 1.11150188886904547e-01, + -3.53452634064009216e-03, + 8.24573968056017774e-05, + -1.64476561614880305e-06, + 3.75283251305749178e-08, + -3.91335994133558925e-10, + -5.37945977965227768e-13, + -7.90600170663002064e-13, + -2.09962842382105086e-18, + 1.31455595391935182e-15, + 4.15704000589112807e-17, + -1.11879248909761466e-18, + -1.12328818406620646e-19, + -1.85243792649084822e-21, + 3.50176744137509321e-01, + -1.20966119145284202e-02, + 3.01605178159966038e-04, + -6.18253514239158618e-06, + 1.35502719751725891e-07, + -1.19398705860130817e-09, + -1.96108039211150286e-11, + -2.30812567099564744e-12, + -1.48077774554144492e-15, + 5.10924302312763195e-15, + 1.32266900454141350e-16, + -4.69112903194405966e-18, + -4.02897045749050521e-19, + -5.71356917819130710e-21, + 8.60740723210926317e-01, + -3.44134499219930640e-02, + 9.60738615984781997e-04, + -2.04481657270052474e-05, + 4.02390911581958024e-07, + -1.48986416243364351e-09, + -1.89174198814864059e-10, + -3.89777000619524539e-12, + 2.69878349036345430e-14, + 1.59504960733174487e-14, + 3.48707634793882855e-16, + -1.95935249590744030e-17, + -1.21303058032972500e-18, + -1.06686630004831467e-20, + 2.15970626329511362e+00, + -1.11558350292117373e-01, + 3.73282980239354962e-03, + -8.07468523266913375e-05, + 1.01572041773103975e-06, + 2.31773698188610068e-08, + -1.63881032304561721e-09, + -1.25076585365613051e-11, + 1.63998988978734776e-12, + 3.21663963811609182e-14, + -2.51498446165189241e-17, + -6.38571003518047686e-17, + -4.57265003577499852e-18, + 6.13674938323525980e-21, + 8.80535155096320565e+00, + -7.51460374570884992e-01, + 3.22022310235155623e-02, + -4.41792176972699070e-04, + -1.41212229402781963e-05, + 2.19795348043152579e-07, + 2.13037485226859950e-08, + -1.23574899094602459e-10, + -3.35648172268223075e-11, + -4.62830908072780669e-14, + 5.08108952802054792e-14, + 3.45433743185525788e-16, + -7.32336664032961245e-17, + -7.80187049933304663e-19, +# root=6 base[7]=17.5 */ + 1.03530976813424932e-02, + -2.99157322252571452e-04, + 6.49452389957140653e-06, + -1.07036227499192868e-07, + 2.73668685922359924e-09, + -6.03181124597569240e-11, + -1.39370160348194159e-12, + 3.54124216091703812e-15, + 5.10677383929477102e-15, + 6.02258701284853734e-17, + -9.57131424743009805e-18, + -3.23857878422853815e-19, + 1.39410546167747821e-20, + 9.90807502717869867e-22, + 9.82199775989298224e-02, + -2.94424275808886481e-03, + 6.60432012089199862e-05, + -1.11451260595104221e-06, + 2.79937645548465862e-08, + -6.18882814294297855e-10, + -1.43074662675540664e-11, + 9.56125293328779599e-14, + 5.12744996420740823e-14, + 5.38840641129526522e-16, + -9.96025765556931272e-17, + -3.14942456349189978e-18, + 1.49088964307548766e-19, + 1.00128267292668143e-20, + 3.06195413912209613e-01, + -9.94575758530081427e-03, + 2.39497126173264383e-04, + -4.25075848779282951e-06, + 1.02457264068788955e-07, + -2.25540213328551141e-09, + -5.39771513810486727e-11, + 8.71838862146515289e-13, + 1.79120461958796448e-13, + 1.31101272008739029e-15, + -3.77752475918555824e-16, + -1.01548103301424109e-17, + 6.02925597305829202e-19, + 3.55245132258959485e-20, + 7.37054007708035530e-01, + -2.76036217071095220e-02, + 7.52126498957464309e-04, + -1.45230372882431699e-05, + 3.21270133590123325e-07, + -6.67516284421593710e-09, + -1.95207343409523022e-10, + 6.22494226958958330e-12, + 5.10180052823069467e-13, + -4.97382483932762954e-16, + -1.24449561703798212e-15, + -2.33860030887262940e-17, + 2.27989910038448903e-18, + 1.03100770759331346e-19, + 1.76748021839543457e+00, + -8.52740537295845202e-02, + 2.86970991222195446e-03, + -6.29242018664995999e-05, + 1.09212893153429093e-06, + -1.35604694402418018e-08, + -1.12907820288563408e-09, + 4.98153281974488006e-11, + 1.69329750185823725e-12, + -6.11887427124797715e-14, + -4.25898549396583750e-15, + 6.01516480122293649e-18, + 1.06886971873778773e-17, + 2.62755755941117112e-19, + 6.27639754649965731e+00, + -5.18389307904366770e-01, + 2.57719005983382855e-02, + -6.08028300117106012e-04, + -5.47638995882439682e-06, + 5.80265509373371073e-07, + 5.22106189710201734e-09, + -8.63462382756627666e-10, + -4.09901726589876000e-12, + 1.32815963537107304e-12, + 2.94111234640252098e-16, + -1.92662464167818176e-15, + 8.79099155751121325e-18, + 2.48856504994513830e-18, +# root=6 base[8]=20.0 */ + 9.25316296853543815e-03, + -2.51696466034173583e-04, + 5.42800285063852342e-06, + -7.43553522401918353e-08, + 1.29684069459521972e-09, + -7.51315684668603148e-11, + 7.14902765277269602e-13, + 1.17450999564524260e-13, + -2.88761196492360024e-16, + -2.93845916030238910e-16, + 6.69919821632301521e-20, + 6.74615321753873820e-19, + 2.24904685879492624e-21, + -1.54412273777000973e-21, + 8.74243730022755128e-02, + -2.46282342302807508e-03, + 5.48979635598017716e-05, + -7.80117367515182648e-07, + 1.33209370427934664e-08, + -7.57781235978353726e-10, + 8.08188412351098831e-12, + 1.18992728804966435e-12, + -5.74134022407130510e-15, + -2.97293233276297659e-15, + 6.74898874928680712e-18, + 6.90042612650129363e-18, + 8.48852375850748085e-21, + -1.59541553501225606e-20, + 2.69955632558871672e-01, + -8.20974705124186827e-03, + 1.96657058904001913e-04, + -3.02329595540112152e-06, + 4.94908426168449334e-08, + -2.68005384711702085e-09, + 3.52954555394094247e-11, + 4.26905241450431482e-12, + -4.44634747250894464e-14, + -1.05704858332847524e-14, + 7.61346378519257344e-17, + 2.51536897982065801e-17, + -9.52526617720573195e-20, + -5.95173741048393947e-20, + 6.37678207402474606e-01, + -2.22077125182747609e-02, + 6.03696133998843625e-04, + -1.06165349889392352e-05, + 1.63213176647323407e-07, + -7.79022555291159027e-09, + 1.36464444292828832e-10, + 1.30383265276801963e-11, + -2.85325264461460508e-13, + -3.08792937137772043e-14, + 5.66578986288318932e-16, + 7.67903390728323517e-17, + -1.13214333980644303e-18, + -1.90207518666122005e-19, + 1.46790053582446456e+00, + -6.50671753782474244e-02, + 2.20722783142043594e-03, + -4.85440645767096427e-05, + 6.82202377090629615e-07, + -2.08200809223619889e-08, + 5.08111625099120243e-10, + 4.56788619541982274e-11, + -2.14246632957205924e-12, + -8.54946496767695762e-14, + 4.89400358303860503e-15, + 2.12528755718517637e-16, + -1.13040753702188120e-17, + -5.84922266832989485e-19, + 4.56804736516683274e+00, + -3.42002812508379495e-01, + 1.83329331015666813e-02, + -6.03950246564678630e-04, + 5.52263791882460857e-06, + 4.41159128410412584e-07, + -1.44416288090930876e-08, + -3.69732619550004298e-10, + 2.74099774350919408e-11, + 1.27960747111147790e-13, + -4.25795940308950090e-14, + 3.57881708812490107e-16, + 5.53890085550774732e-17, + -9.43134792864193640e-19, +# root=6 base[9]=22.5 */ + 8.32793540035883101e-03, + -2.11591832455892238e-04, + 4.61642571310267052e-06, + -6.37096763732497884e-08, + 1.89657406231754691e-10, + -2.79984895313227617e-11, + 2.58621700105616964e-12, + -1.12671991798157993e-14, + -5.23850449638882769e-15, + 9.48331188812216969e-17, + 1.07303577844633205e-17, + -3.74984693665220581e-19, + -1.89147970269759415e-20, + 1.12310695393239839e-21, + 7.83959027418445614e-02, + -2.05849473043326001e-03, + 4.63768993695861810e-05, + -6.67874292473346908e-07, + 2.32689986356217276e-09, + -2.68587917356092367e-10, + 2.61073785115090030e-11, + -1.61563163016633669e-13, + -5.24718165450109271e-14, + 1.07997160764379138e-15, + 1.05731997422937797e-16, + -4.05460312475851631e-18, + -1.81921497587919762e-19, + 1.19186400768284227e-20, + 2.40047612847322733e-01, + -6.77174585876899084e-03, + 1.63604280124563737e-04, + -2.58039327316394275e-06, + 1.19488089407727551e-08, + -8.43708353261900064e-10, + 9.23253187024431118e-11, + -9.56987490261722318e-13, + -1.82280750051115900e-13, + 4.84520791216895105e-15, + 3.50963553954677395e-16, + -1.65858390348453985e-17, + -5.61779554728460072e-19, + 4.69355111819216509e-20, + 5.57748774605357767e-01, + -1.78535252622209484e-02, + 4.87671982244622458e-04, + -8.97858993443026310e-06, + 6.10381865237783409e-08, + -1.90803531111322417e-09, + 2.66373220844104991e-10, + -4.96434910581778726e-12, + -5.08149996792671607e-13, + 2.03212334438785712e-14, + 8.54237435299007295e-16, + -6.15271027323558020e-17, + -1.03783109937720345e-18, + 1.63090885342325797e-19, + 1.23948566071886757e+00, + -4.95797372104498646e-02, + 1.67939971971960817e-03, + -4.00229591190236203e-05, + 4.44997741791662177e-07, + -2.27936180100231546e-09, + 6.82387476790713243e-10, + -2.78136362168720135e-11, + -1.23152433337199985e-12, + 1.03969796625245609e-13, + 6.88631706418699382e-16, + -2.62707333657845732e-16, + 3.25948459015345682e-18, + 5.85030033051847086e-19, + 3.45030063815799304e+00, + -2.22288957407351440e-01, + 1.18404486112358119e-02, + -4.65621012054044496e-04, + 1.05333757545277978e-05, + 6.34335662558586744e-08, + -1.37999844496465345e-08, + 3.19743323215075966e-10, + 1.03722712754914363e-11, + -7.47121777041513625e-13, + 3.74429144943455839e-15, + 1.02937526899774614e-15, + -2.81472897902979375e-17, + -1.01087086983508125e-18, +# root=6 base[10]=25.0 */ + 7.55063121290101575e-03, + -1.77689259486627849e-04, + 3.86158102650686452e-06, + -6.21686233987638826e-08, + 1.48013458148481719e-10, + 1.64936970845545195e-11, + 8.00384162808121697e-13, + -8.08821363894145456e-14, + 1.05794594144400388e-15, + 1.34415818379221581e-16, + -6.19253959593365352e-18, + -9.79632274417487421e-20, + 1.58628312967826260e-20, + -2.67104909707931674e-22, + 7.08538064834258047e-02, + -1.71911089825948463e-03, + 3.85078117945539378e-05, + -6.43858634238180335e-07, + 2.10012483507667935e-09, + 1.68937997479458143e-10, + 7.35990701261668435e-12, + -8.13735979599573968e-13, + 1.23144455548366714e-14, + 1.30636956027913927e-15, + -6.49203728174482136e-17, + -8.02899792306529079e-19, + 1.60389181085615798e-19, + -3.13106905203015018e-21, + 2.15385969158631063e-01, + -5.58410483193755910e-03, + 1.33572180890790724e-04, + -2.42207635169975757e-06, + 1.25667612586338847e-08, + 6.10417313962711355e-10, + 2.02929191417684982e-11, + -2.85089721951006802e-12, + 5.66943134540623755e-14, + 4.19482830100554983e-15, + -2.48609746808947401e-16, + -1.27500421281220984e-18, + 5.65394579025154008e-19, + -1.46506280257847665e-20, + 4.93477104263251365e-01, + -1.43674974712052969e-02, + 3.85467280183015583e-04, + -8.03031318079210536e-06, + 6.93529860792816763e-08, + 1.76004655822672093e-09, + 2.64521280850987811e-11, + -8.02675816414927957e-12, + 2.38300810741374354e-13, + 9.48902381248215066e-15, + -8.21124686816620806e-16, + 5.96108474964949687e-18, + 1.57205574500463628e-18, + -6.31595228913794401e-20, + 1.06516714027031334e+00, + -3.79437766238721261e-02, + 1.24239878617855371e-03, + -3.26804245394411372e-05, + 4.90928927968484702e-07, + 3.48572384659511472e-09, + -1.51594235977672359e-10, + -1.89336256323716828e-11, + 1.12855746980053002e-12, + 4.82257428013774912e-15, + -2.78156950527739707e-15, + 8.92160048178570363e-17, + 2.97344959214602691e-18, + -3.01151797643126965e-19, + 2.71924992979148961e+00, + -1.47053775678687354e-01, + 7.25706994281298100e-03, + -3.01508141465877885e-04, + 9.31297245843517701e-06, + -1.44956261339579226e-07, + -3.65976794549741463e-09, + 3.11162634287661257e-10, + -7.13264377999780259e-12, + -1.53071040143278938e-13, + 1.54679809342682913e-14, + -3.28583501431273252e-16, + -1.13349685370315338e-17, + 8.74507675066384298e-19, +# root=6 base[11]=27.5 */ + 6.89702893174552138e-03, + -1.49711990967304082e-04, + 3.14218580029599472e-06, + -5.67786503361862214e-08, + 5.18997237888008210e-10, + 1.51112531928054994e-11, + -5.99196785825572450e-13, + -1.54032951550877972e-14, + 1.89379389617162770e-15, + -5.11745188502353733e-17, + -1.37500710529491074e-18, + 1.48933737080694159e-19, + -3.47464022683338966e-21, + -1.31283215524255798e-22, + 6.45457367801243881e-02, + -1.44109705910645705e-03, + 3.11073284134582244e-05, + -5.80193790671105997e-07, + 5.74955290856233838e-09, + 1.42560968977824949e-10, + -6.28203668327678482e-12, + -1.34279080953610452e-13, + 1.88018111042257022e-14, + -5.46060789466922508e-16, + -1.20698667404264746e-17, + 1.48963283730244766e-18, + -3.81602438627665428e-20, + -1.17218214475131306e-21, + 1.95008750876986242e-01, + -4.62738469217815248e-03, + 1.06139573888989927e-04, + -2.11919215415437778e-06, + 2.45931473338150603e-08, + 4.19662863609979042e-10, + -2.39715270282512019e-11, + -3.05025037818318453e-13, + 6.37843104737143318e-14, + -2.16090464165439280e-15, + -2.79118920979313754e-17, + 5.12718754538413844e-18, + -1.59099398116254238e-19, + -2.85907669906087881e-21, + 4.41594349608623760e-01, + -1.16477594718923279e-02, + 2.96868044586203698e-04, + -6.66343663053523558e-06, + 9.77582717983045427e-08, + 6.78667031414940206e-10, + -7.79947997068005186e-11, + 7.78401548318009868e-14, + 1.67087543536987051e-13, + -7.46458229635675229e-15, + 5.06973885873449487e-18, + 1.36823979074608010e-17, + -5.87186070592641598e-19, + -4.41143954830213482e-22, + 9.30979836972983810e-01, + -2.94363081641525123e-02, + 8.98699743211719255e-04, + -2.45761874573712638e-05, + 5.00965436220301656e-07, + -2.83244518474134479e-09, + -2.54535338422344893e-10, + 6.81508362653137884e-12, + 3.06177239708067349e-13, + -2.70686440963352233e-14, + 5.99251443989166515e-16, + 2.51268047409536064e-17, + -2.25844261876195147e-18, + 5.43441455256850512e-20, + 2.22749551265566348e+00, + -1.01175110517799316e-01, + 4.42879505633113867e-03, + -1.77997200080848235e-04, + 6.09932310052593941e-06, + -1.55647122592889774e-07, + 1.69396246885042662e-09, + 8.18858843474491415e-11, + -5.47559009462454473e-12, + 1.42229307255562404e-13, + 5.37860056516527619e-16, + -2.01135409808202585e-16, + 7.84290415406069030e-18, + -6.60120493286975638e-20, +# root=6 base[12]=30.0 */ + 6.34436355937524187e-03, + -1.27141128719288613e-04, + 2.51795300268849660e-06, + -4.68850998936813424e-08, + 6.70110131296693534e-10, + 5.77203185596820107e-13, + -4.76851417145857730e-13, + 1.45850561685667718e-14, + 1.33818604385342536e-16, + -3.01595830681710282e-17, + 1.21505319781992037e-18, + -9.58824964013198704e-21, + -1.43657049054848978e-21, + 8.06565034452199725e-23, + 5.92373947289669134e-02, + -1.21836261290574174e-03, + 2.47634327657585825e-05, + -4.73882624457666190e-07, + 7.05902409885943783e-09, + -4.31152739946563852e-12, + -4.66933387430719915e-12, + 1.52604423427175242e-13, + 9.19035382459299001e-16, + -2.93136989809208484e-16, + 1.24478471557455753e-17, + -1.24451535050109515e-19, + -1.34997197951543066e-20, + 8.13404955547089884e-22, + 1.78046414331536396e-01, + -3.87286598595602003e-03, + 8.32459584528353475e-05, + -1.68949552403692105e-06, + 2.74281025059801754e-08, + -9.87100845905747984e-11, + -1.52887666674790826e-11, + 5.80670531130850340e-13, + -1.81291536065668552e-16, + -9.43629533176038805e-16, + 4.52902277568358059e-17, + -6.57349325549518286e-19, + -3.94917184511039698e-20, + 2.84863399495761558e-21, + 3.99284890835471751e-01, + -9.56566171203352723e-03, + 2.26431682188549683e-04, + -5.08380480729462908e-06, + 9.49319998899462327e-08, + -7.89221197885442900e-10, + -3.65224427903429071e-11, + 1.88989080812744473e-12, + -1.95963924522271414e-14, + -2.17994766790440508e-15, + 1.36025641868453992e-16, + -3.06719584489747772e-18, + -6.58336079816172305e-20, + 7.84395907384241483e-21, + 8.25930436769562015e-01, + -2.32961977763739871e-02, + 6.49137386930379165e-04, + -1.72707273051652806e-05, + 4.01275299157118415e-07, + -6.25445925291732302e-09, + -3.49748516847313210e-11, + 6.35237400399969272e-12, + -1.79819185497877077e-13, + -1.97062178939251255e-15, + 3.78364241818580988e-16, + -1.51768460254958395e-17, + 1.48991521362527775e-19, + 1.61316987610800641e-20, + 1.88217954548377731e+00, + -7.28492011243257048e-02, + 2.78419445853281917e-03, + -1.02619908382795485e-04, + 3.49588425804222938e-06, + -1.02715989230402297e-07, + 2.26196995305808195e-09, + -1.87506262940912448e-11, + -1.24331531027480228e-12, + 7.62409734830563313e-14, + -2.22336691113004348e-15, + 2.10276636054468919e-17, + 1.43971187732340405e-18, + -8.88094904722276461e-20, +# root=6 base[13]=32.5 */ + 5.87277725624636791e-03, + -1.09068192639052923e-04, + 2.01840756204174319e-06, + -3.65550659907104970e-08, + 5.99643157869911099e-10, + -6.18588992625101775e-12, + -1.13401208854226082e-13, + 9.33916600394150070e-15, + -2.75884781247862665e-16, + 1.05973025539468009e-18, + 3.16648946745109310e-19, + -1.70183428368755599e-20, + 4.16365673393959664e-22, + 1.81792989548369129e-24, + 5.47268050021009686e-02, + -1.04112045762287707e-03, + 1.97358420047165538e-05, + -3.66298515156277689e-07, + 6.18530672012450587e-09, + -6.84926545003592855e-11, + -9.82095294330511492e-13, + 9.21459077794621409e-14, + -2.85737789841637897e-15, + 1.69264177897733944e-17, + 2.97972220804278719e-18, + -1.69477031737804893e-19, + 4.38987139243154991e-21, + 5.75273483230926216e-24, + 1.63768687643160632e-01, + -3.28078688652820149e-03, + 6.54898022506932275e-05, + -1.28115279890233276e-06, + 2.30048886741594988e-08, + -2.91838313123545524e-10, + -2.14213569833832334e-12, + 3.07993778174652741e-13, + -1.06547059680451544e-14, + 1.08824327407105930e-16, + 8.80105490622099109e-18, + -5.78826613674539260e-19, + 1.69104881610021172e-20, + -7.82248692311225352e-23, + 3.64293364369245753e-01, + -7.97383651755838828e-03, + 1.73909044346293732e-04, + -3.72269127519311691e-06, + 7.41090465647477299e-08, + -1.14347809245152225e-09, + 1.69622687338861031e-12, + 7.81357921295082501e-13, + -3.36319674514654907e-14, + 5.81422160809425025e-16, + 1.57053627811778465e-17, + -1.53969740512768815e-18, + 5.55174266892095683e-20, + -7.50071827959183719e-22, + 7.41960760119567464e-01, + -1.88324974947208859e-02, + 4.76272279558918898e-04, + -1.18479150727080883e-05, + 2.78846768552932693e-07, + -5.59968003216751241e-09, + 6.58696566520140119e-11, + 1.27451131668937651e-12, + -1.08468998670865535e-13, + 3.29983904670141931e-15, + -2.14972150738350329e-17, + -3.14027030406118561e-18, + 1.82013773666542426e-19, + -5.04038345327371925e-21, + 1.62869009625230698e+00, + -5.46886045330512507e-02, + 1.82949958144379052e-03, + -6.04031897553235258e-05, + 1.92739073577246220e-06, + -5.72430836075044194e-08, + 1.48431827232604206e-09, + -2.92886361465248326e-11, + 2.16897178112892388e-13, + 1.43217650513758130e-14, + -8.55758504426048371e-16, + 2.68164461934484748e-17, + -4.60951967581951408e-19, + -3.24028890011764973e-21, +# root=6 base[14]=35.0 */ + 5.46623793344348016e-03, + -9.45224636338026693e-05, + 1.63295279317248178e-06, + -2.80263674971187962e-08, + 4.65104204487476197e-10, + -6.67442001254055988e-12, + 4.08600636204409607e-14, + 2.43950544590453957e-15, + -1.39602997012230976e-16, + 4.14465975151402822e-18, + -5.17715894211928343e-20, + -2.03976842940403266e-21, + 1.57629320251878230e-22, + -5.45245626858110773e-24, + 5.08524898360323899e-02, + -8.99242432797009352e-04, + 1.58866725655517642e-05, + -2.78868880009321725e-07, + 4.73975312080598342e-09, + -7.03439280226354925e-11, + 5.06429621365259215e-13, + 2.23770481881166969e-14, + -1.37763373364096718e-15, + 4.24399023257602040e-17, + -5.88192993145813243e-19, + -1.78879666651961984e-20, + 1.52916159018338125e-21, + -5.50449216050923969e-23, + 1.51604250138530683e-01, + -2.81255626231139734e-03, + 5.21292530121229800e-05, + -9.60261017803832659e-07, + 1.71743811782884722e-08, + -2.73229299589304289e-10, + 2.55803619679419257e-12, + 6.08319277275601822e-14, + -4.61210495296736660e-15, + 1.54588223016465645e-16, + -2.59052723371398548e-18, + -4.19932746526110806e-20, + 4.90670451222143553e-21, + -1.93835197242471270e-22, + 3.34923858461043056e-01, + -6.74279042312054839e-03, + 1.35619331084331653e-04, + -2.71217113086636493e-06, + 5.28797381946534224e-08, + -9.40681925606470106e-10, + 1.19524221925363305e-11, + 6.89091819419024159e-14, + -1.18126795910980275e-14, + 4.69938379071723801e-16, + -1.02289737667697054e-17, + -5.96990355465249206e-21, + 1.13609659414836621e-20, + -5.47920688870482377e-22, + 6.73447288154485291e-01, + -1.55230901473215090e-02, + 3.57468077157017971e-04, + -8.19003444452612726e-06, + 1.83954910972728428e-07, + -3.88333353086448220e-09, + 6.86758787151069333e-11, + -6.13181232826094836e-13, + -2.12402219941375177e-14, + 1.42710445835711418e-15, + -4.53257725254530700e-17, + 7.08652691684786556e-19, + 1.27585131805756051e-20, + -1.35170911780303653e-21, + 1.43525667074776786e+00, + -4.25034568200743298e-02, + 1.25746165790727258e-03, + -3.70488108291142947e-05, + 1.07771661049014300e-06, + -3.03860030328740659e-08, + 8.03264912075260943e-10, + -1.87851457604066476e-11, + 3.42213791585057838e-13, + -2.62268854199246375e-15, + -1.30982042538412879e-16, + 7.95151133827843401e-18, + -2.59271812426394982e-19, + 5.52900087135693260e-21, +# root=6 base[15]=37.5 */ + 5.11231108350021848e-03, + -8.26873134774100079e-05, + 1.33709898500918237e-06, + -2.15835796589037282e-08, + 3.44870860643841897e-10, + -5.25774308126023286e-12, + 6.56897225510829514e-14, + -1.17603604860496082e-16, + -3.51965003775118197e-17, + 1.69754914537787504e-18, + -5.05673626714816057e-20, + 8.94967320928955227e-22, + 3.81669230363082715e-24, + -1.01246133429366581e-24, + 4.74901982552031615e-02, + -7.84347426899812609e-04, + 1.29513766939406244e-05, + -2.13487756939068292e-07, + 3.48475544849244438e-09, + -5.44226024203759797e-11, + 7.09012971418734792e-13, + -2.40143798544577839e-15, + -3.27985139041383099e-16, + 1.67069078667269952e-17, + -5.12469874637108134e-19, + 9.54917266012976111e-21, + 1.40950394959036519e-23, + -9.49705698305679006e-24, + 1.41121190307416183e-01, + -2.43733510929381629e-03, + 4.20863242064981922e-05, + -7.25514325190893336e-07, + 1.23946020515317127e-08, + -2.03678234528479996e-10, + 2.88327538322289702e-12, + -1.83934506326134739e-14, + -9.38887478936037480e-16, + 5.56260241714677773e-17, + -1.82659952403417996e-18, + 3.77482971979012903e-20, + -1.39940946114958564e-22, + -2.79051396402122806e-23, + 3.09935030283342683e-01, + -5.77496452706856202e-03, + 1.07579694224708977e-04, + -2.00095768084934132e-06, + 3.69266037487930994e-08, + -6.60461732449621316e-10, + 1.05997325610686815e-11, + -1.11604880404755851e-13, + -1.43877562705320188e-15, + 1.41329690189164287e-16, + -5.35462149802534123e-18, + 1.30369850410763938e-19, + -1.41378018386885972e-21, + -5.01520285289008538e-23, + 6.16515523635434604e-01, + -1.30117851151572983e-02, + 2.74556248357113268e-04, + -5.78525744294969239e-06, + 1.21143834041476844e-07, + -2.48139067205702544e-09, + 4.75929623768622378e-11, + -7.56477373512180285e-13, + 5.37117388252731249e-15, + 2.54530420880248656e-16, + -1.52624341207227910e-17, + 4.93662712665418068e-19, + -1.00764824772350593e-20, + 4.73699173979984583e-23, + 1.28290706204251381e+00, + -3.39691511237686858e-02, + 8.99236962714401451e-04, + -2.37775811657587325e-05, + 6.26113158914174609e-07, + -1.62919405194161529e-08, + 4.12241525347152489e-10, + -9.85285251835300259e-12, + 2.11220807948833536e-13, + -3.62933986109011263e-15, + 3.08330792654397930e-17, + 9.64267249529807649e-19, + -6.26396364140814677e-20, + 2.09344238093813383e-21, +# root=6 base[16]=40.0 */ + 4.71869812273837362e-03, + -1.12678642235890846e-04, + 2.69058452131645255e-06, + -6.42280356774541776e-08, + 1.53026650530053309e-09, + -3.60972132300982304e-11, + 8.15430454612056423e-13, + -1.54284528186019314e-14, + 7.41642663984828653e-17, + 1.61604311180477538e-17, + -1.28644227530090868e-18, + 6.61388056333285349e-20, + -2.48602632396396901e-21, + 5.65334269100866563e-23, + 4.37630644613905967e-02, + -1.06537892501055564e-03, + 2.59349900200459436e-05, + -6.31165483433301113e-07, + 1.53318440412269939e-08, + -3.68927133637584462e-10, + 8.52820835988665809e-12, + -1.68146838317850458e-13, + 1.21156843756759726e-15, + 1.46902910039188958e-16, + -1.24925045904162715e-17, + 6.58750028466825535e-19, + -2.53885140051347898e-20, + 6.12664727061761877e-22, + 1.29583998532233152e-01, + -3.28708559693888366e-03, + 8.33789118626537720e-05, + -2.11437086615899573e-06, + 5.35253566710320861e-08, + -1.34364327789285030e-09, + 3.25951435864671673e-11, + -6.96393117072251341e-13, + 8.06968877019786979e-15, + 3.88415268148018589e-16, + -4.02589067851166272e-17, + 2.26008871715580907e-18, + -9.20519481223020049e-20, + 2.48960694342192401e-21, + 2.82787885271811035e-01, + -7.68930760651611103e-03, + 2.09073591881832793e-04, + -5.68326812079549761e-06, + 1.54255558249458416e-07, + -4.15794267997172217e-09, + 1.09179909049511138e-10, + -2.62508970778963890e-12, + 4.57580273769349952e-14, + 3.67562672365626827e-16, + -9.47182465353218772e-17, + 6.17398567783564849e-18, + -2.78921708947591333e-19, + 8.90909162219871435e-21, + 5.56104534187498056e-01, + -1.69309615674113380e-02, + 5.15456726223449506e-04, + -1.56891940189963934e-05, + 4.76953493086477946e-07, + -1.44264522684180323e-08, + 4.28973776947433417e-10, + -1.21345852711991220e-11, + 2.98725371636486918e-13, + -4.50349821449387733e-15, + -1.15130922082306523e-16, + 1.49953265149408676e-17, + -8.65314421401318006e-19, + 3.53879125943805673e-20, + 1.12929058785095804e+00, + -4.20860621210287847e-02, + 1.56839713332060479e-03, + -5.84370285409482605e-05, + 2.17545757328761968e-06, + -8.07522798031840504e-08, + 2.97336500612494580e-09, + -1.07411200274412931e-10, + 3.72948412968415411e-12, + -1.20010707906956251e-13, + 3.33147263737703630e-15, + -6.48253715095004717e-17, + -2.22464809367165795e-19, + 1.05348865816273912e-19, +# root=6 base[17]=44.0 */ + 4.30667471392791757e-03, + -9.38693325870488491e-05, + 2.04599388699920880e-06, + -4.45937654064569819e-08, + 9.71765406505131172e-10, + -2.11518724573744535e-11, + 4.57768958101208482e-13, + -9.66861524076944209e-15, + 1.85737036724487758e-16, + -2.30402330698745435e-18, + -5.51379644793241964e-20, + 6.69578540728433481e-21, + -3.90008507048801714e-22, + 1.73931840512035578e-23, + 3.98737699899556694e-02, + -8.84520693257441221e-04, + 1.96212936379042451e-05, + -4.35247876574971001e-07, + 9.65307882911748792e-09, + -2.13855072403918572e-10, + 4.71243177232604392e-12, + -1.01544826176753403e-13, + 2.01005337696547355e-15, + -2.76266130912187926e-17, + -4.14854959110035992e-19, + 6.30084218389708122e-20, + -3.80142706960865322e-21, + 1.72692308809335205e-22, + 1.17627198267911043e-01, + -2.70878185513924192e-03, + 6.23791208434899391e-05, + -1.43646222575313639e-06, + 3.30730893087371562e-08, + -7.60725170756829014e-10, + 1.74165376798193791e-11, + -3.91373408699009390e-13, + 8.22229909488190168e-15, + -1.33753009239441333e-16, + -3.11175526495662179e-19, + 1.86287740393131798e-19, + -1.23906044974958881e-20, + 5.88936978400866262e-22, + 2.54995833818608020e-01, + -6.25306532805599766e-03, + 1.53338701918289430e-04, + -3.76011314321417369e-06, + 9.21900199713943078e-08, + -2.25844285222024291e-09, + 5.51243812466861078e-11, + -1.32704617216512209e-12, + 3.05111329709016273e-14, + -6.03934106850460790e-16, + 5.90166049579012821e-18, + 3.33206464608125884e-19, + -3.02568569662534866e-20, + 1.59773875302261313e-21, + 4.95593820655389150e-01, + -1.34494533674758537e-02, + 3.64991132358202471e-04, + -9.90492420315315928e-06, + 2.68760382948607750e-07, + -7.28803465316676993e-09, + 1.97137967620008730e-10, + -5.28723866188529215e-12, + 1.38257990846653213e-13, + -3.37410967676731188e-15, + 6.77177840121297383e-17, + -5.22247290744103141e-19, + -4.89521285554753256e-20, + 3.91574693705076011e-21, + 9.82299562809673454e-01, + -3.18539353094352828e-02, + 1.03295440619016916e-03, + -3.34959015666207131e-05, + 1.08608235991999544e-06, + -3.52022276928338908e-08, + 1.13951127016941155e-09, + -3.67499968671601192e-11, + 1.17435656934216286e-12, + -3.67788008534623249e-14, + 1.10662658024136365e-15, + -3.08613545020936950e-17, + 7.40787108415637719e-19, + -1.21520836288191302e-20, +# root=6 base[18]=48.0 */ + 3.96087931143658794e-03, + -7.94062462067325511e-05, + 1.59190686265680763e-06, + -3.19138990236330742e-08, + 6.39786862677465865e-10, + -1.28246040788713135e-11, + 2.56912534147690739e-13, + -5.13137884211806588e-15, + 1.01219025776765251e-16, + -1.90442364773923903e-18, + 2.98889303779526432e-20, + -1.11930110718203951e-22, + -2.31314844821252043e-23, + 1.62782897240111540e-24, + 3.66198723151058975e-02, + -7.46106051282632941e-04, + 1.52014225638916644e-05, + -3.09718491219810478e-07, + 6.31020520536655672e-09, + -1.28550907105192841e-10, + 2.61731222509574934e-12, + -5.31422392941438931e-14, + 1.06681597293758724e-15, + -2.05316736727978209e-17, + 3.38167793039295881e-19, + -2.16800128134641219e-21, + -2.02420977387987340e-22, + 1.54763792215595918e-23, + 1.07692306897683582e-01, + -2.27072846408723486e-03, + 4.78790649395029059e-05, + -1.00954428497864382e-06, + 2.12862395827531053e-08, + -4.48778466800742376e-10, + 9.45681065128378869e-12, + -1.98811983010351562e-13, + 4.14090500225683854e-15, + -8.34329475644272007e-17, + 1.49983984491261925e-18, + -1.62666448915036342e-20, + -4.63989612365833119e-22, + 4.72203057785397030e-23, + 2.32182618614011654e-01, + -5.18478677284431918e-03, + 1.15779595587988085e-04, + -2.58542802719895404e-06, + 5.77334306811546897e-08, + -1.28910380985997801e-09, + 2.87720872627025402e-11, + -6.41037364922686357e-13, + 1.41869741766326915e-14, + -3.07039609219846469e-16, + 6.19853118696116243e-18, + -9.91113082491653728e-20, + 1.25265364635164725e-22, + 9.53998218005816461e-23, + 4.46973527235372259e-01, + -1.09414833364163949e-02, + 2.67836978111055666e-04, + -6.55638159891650572e-06, + 1.60491957005928233e-07, + -3.92840124144799821e-09, + 9.61287987434368467e-11, + -2.34959325830905242e-12, + 5.72024426840192469e-14, + -1.37603863371397195e-15, + 3.20300290309313527e-17, + -6.83651750904110894e-19, + 1.12975664674952612e-20, + -1.45144152925775286e-23, + 8.69222271703726790e-01, + -2.49480155577802044e-02, + 7.16046288728214861e-04, + -2.05515995987160964e-05, + 5.89856971738880961e-07, + -1.69289841083886756e-08, + 4.85787706724658908e-10, + -1.39324232948656516e-11, + 3.98941310983769723e-13, + -1.13757644884919631e-14, + 3.21274693655722578e-16, + -8.89325265022669834e-18, + 2.36786974899813314e-19, + -5.85772851265680265e-21, +# root=6 base[19]=52.0 */ + 3.66652183259818729e-03, + -6.80463716327695938e-05, + 1.26286133371547013e-06, + -2.34372315453645992e-08, + 4.34967168329421595e-10, + -8.07240480188857588e-12, + 1.49804720088242447e-13, + -2.77918526351395938e-15, + 5.14863427635843731e-17, + -9.48194335298743520e-19, + 1.70795809929367262e-20, + -2.84297061627258055e-22, + 3.42335913263486199e-24, + 3.08498176955238662e-26, + 3.38573229408866694e-02, + -6.37820263604413785e-04, + 1.20155597000418076e-05, + -2.26354769577016790e-07, + 4.26417314045726968e-09, + -8.03297573435933303e-11, + 1.51319719211339797e-12, + -2.84966038453682783e-14, + 5.35950130205666134e-16, + -1.00261440626294108e-17, + 1.83902964011425387e-19, + -3.15001097425288232e-21, + 4.14813053072322073e-23, + 1.30284582688843016e-25, + 9.93060979155745149e-02, + -1.93097465266549762e-03, + 3.75471713681313263e-05, + -7.30092403395746687e-07, + 1.41963924758533451e-08, + -2.76041843754360926e-10, + 5.36725061376309725e-12, + -1.04333674503998931e-13, + 2.02593495375063766e-15, + -3.91698844485144897e-17, + 7.45772794672778627e-19, + -1.34944613157510252e-20, + 2.04980305461300902e-22, + -1.04092780979029278e-24, + 2.13119312892753460e-01, + -4.36868969798165797e-03, + 8.95528858900138114e-05, + -1.83572629294350866e-06, + 3.76301435973431947e-08, + -7.71366961848227336e-10, + 1.58113840225047886e-11, + -3.24039362644084610e-13, + 6.63556236904741620e-15, + -1.35470441402245106e-16, + 2.73771088259536500e-18, + -5.36135407017126937e-20, + 9.55094536254429879e-22, + -1.21330018491809356e-23, + 4.07049363295099831e-01, + -9.07509451970500008e-03, + 2.02327646807888719e-04, + -4.51085910660252161e-06, + 1.00568728039716433e-07, + -2.24214894502806780e-09, + 4.99866619787695749e-11, + -1.11426794577306616e-12, + 2.48262047163834152e-14, + -5.52183317861314787e-16, + 1.22163302848375055e-17, + -2.66265367463621516e-19, + 5.58200818413985493e-21, + -1.05820157916547055e-22, + 7.79522097758550303e-01, + -2.00678650197910965e-02, + 5.16623202864534108e-04, + -1.32998458559496570e-05, + 3.42388406283177380e-07, + -8.81434483197565699e-09, + 2.26910284230509365e-10, + -5.84105080796251418e-12, + 1.50325691079309477e-13, + -3.86623389716750558e-15, + 9.92585709221610145e-17, + -2.53730439884506417e-18, + 6.42482194747256860e-20, + -1.59514320609231792e-21, +# root=6 base[20]=56.0 */ + 3.41291320135571558e-03, + -5.89612769428894993e-05, + 1.01861136573206677e-06, + -1.75974667024353854e-08, + 3.04012721055596030e-10, + -5.25210141390905109e-12, + 9.07345333049162031e-14, + -1.56747605091956126e-15, + 2.70750990656099473e-17, + -4.67373574314643259e-19, + 8.04672278627483283e-21, + -1.37186189514512102e-22, + 2.26044324884483066e-24, + -3.30920257855699675e-26, + 3.14825790002325884e-02, + -5.51511459978723593e-04, + 9.66137146348336854e-06, + -1.69247793993960736e-07, + 2.96488070635626512e-09, + -5.19387129821047397e-11, + 9.09857542300416381e-13, + -1.59384154142314680e-14, + 2.79165862012727634e-16, + -4.88685170568014405e-18, + 8.53440453649444843e-20, + -1.47755715456891760e-21, + 2.48337988539944660e-23, + -3.77829735920974132e-25, + 9.21324170934208486e-02, + -1.66215885888453983e-03, + 2.99869704721907923e-05, + -5.40994254399594465e-07, + 9.76006445851223038e-09, + -1.76080998301235600e-10, + 3.17666004697186701e-12, + -5.73086138591226899e-14, + 1.03376791685178926e-15, + -1.86389327980580712e-17, + 3.35431986497720669e-19, + -5.99614396222889921e-21, + 1.04843905046543044e-22, + -1.70917158657127202e-24, + 1.96950941173365313e-01, + -3.73119833980974482e-03, + 7.06868469970921265e-05, + -1.33914894195024179e-06, + 2.53699218636151586e-08, + -4.80628123375820058e-10, + 9.10537716283649419e-12, + -1.72496196306241862e-13, + 3.26758150653226712e-15, + -6.18765164764487034e-17, + 1.17021804050324198e-18, + -2.20345417071621144e-20, + 4.09274689484000438e-22, + -7.30317954724982443e-24, + 3.73678003597171016e-01, + -7.64867129991911050e-03, + 1.56557710286102326e-04, + -3.20451952432348958e-06, + 6.55920736896582319e-08, + -1.34257835953719045e-09, + 2.74806478251877894e-11, + -5.62482925165961405e-13, + 1.15124971052513300e-14, + -2.35582005485569139e-16, + 4.81733317222196488e-18, + -9.82873955634837612e-20, + 1.99248507640970452e-21, + -3.96969523497684793e-23, + 7.06621760226012863e-01, + -1.64918591262700580e-02, + 3.84903823551318582e-04, + -8.98327784218538578e-06, + 2.09660888551646279e-07, + -4.89327815309620539e-09, + 1.14204128871243821e-10, + -2.66539186702106517e-12, + 6.22056582760846497e-14, + -1.45165136345366931e-15, + 3.38673973443796861e-17, + -7.89562159025981646e-19, + 1.83736436631934520e-20, + -4.25546662105727991e-22, +# root=6 base[21]=60.0 */ + 3.19213556940260799e-03, + -5.15816550120537105e-05, + 8.33506934739305602e-07, + -1.34686219328293889e-08, + 2.17639192308144898e-10, + -3.51682722394624105e-12, + 5.68283222141398726e-14, + -9.18285644257524879e-16, + 1.48383584572078602e-17, + -2.39755596638290395e-19, + 3.87289957721128921e-21, + -6.24923712228789419e-23, + 1.00421674270901111e-24, + -1.59053835036648183e-26, + 2.94192955719600503e-02, + -4.81609859500932913e-04, + 7.88421518102461452e-06, + -1.29068887968054516e-07, + 2.11292784319881657e-09, + -3.45897759124504997e-11, + 5.66253254976153466e-13, + -9.26985380728331515e-15, + 1.51750635497813543e-16, + -2.48407733430927512e-18, + 4.06532597183693255e-20, + -6.64660868656442200e-22, + 1.08274796494867237e-23, + -1.74172515455217390e-25, + 8.59258835149566413e-02, + -1.44581927278982620e-03, + 2.43278658771246047e-05, + -4.09349265903413131e-07, + 6.88785533986575661e-09, + -1.15897483101666891e-10, + 1.95013144244304748e-12, + -3.28135390861266674e-14, + 5.52126246548162252e-16, + -9.28976205827096232e-18, + 1.56273906506628689e-19, + -2.62683915000935882e-21, + 4.40324048563499195e-23, + -7.31147365445211389e-25, + 1.83064229080111190e-01, + -3.22374288059520129e-03, + 5.67697917402269395e-05, + -9.99710390253996311e-07, + 1.76048005538074656e-08, + -3.10018778094016196e-10, + 5.45939856336594372e-12, + -9.61393203757309060e-14, + 1.69298973150305058e-15, + -2.98121676394005678e-17, + 5.24896299946452707e-19, + -9.23694149516959429e-21, + 1.62257796685564747e-22, + -2.83337619978872855e-24, + 3.45367459219563577e-01, + -6.53401726999842686e-03, + 1.23617267765137664e-04, + -2.33871877803150484e-06, + 4.42462902294534212e-08, + -8.37096863349468650e-10, + 1.58370576357196668e-11, + -2.99621440639215413e-13, + 5.66851524030425037e-15, + -1.07240073021592087e-16, + 2.02866725215838703e-18, + -3.83657496579113037e-20, + 7.24915632357421188e-22, + -1.36564345083385196e-23, + 6.46201841952020573e-01, + -1.37933797992154938e-02, + 2.94423992519934278e-04, + -6.28457191862823155e-06, + 1.34146146758206550e-07, + -2.86339127407644868e-09, + 6.11199723341693365e-11, + -1.30462405373104689e-12, + 2.78475272554991379e-14, + -5.94407193714175895e-16, + 1.26872649168938877e-17, + -2.70775502206129357e-19, + 5.77734639553947035e-21, + -1.23120760437838533e-22, +# root=6 base[22]=64.0 */ + 2.99819852860862095e-03, + -4.55057994611025149e-05, + 6.90674004684099962e-07, + -1.04828524361270450e-08, + 1.59105735021045550e-10, + -2.41486131927861913e-12, + 3.66520734568769464e-14, + -5.56294600956255486e-16, + 8.44327204388582530e-18, + -1.28148846639187397e-19, + 1.94495016553653743e-21, + -2.95159155759691058e-23, + 4.47728138431807171e-25, + -6.77891447792130552e-27, + 2.76099419403682024e-02, + -4.24204908866232511e-04, + 6.51757273139837013e-06, + -1.00137347353964302e-07, + 1.53853109836163438e-09, + -2.36383127614408179e-11, + 3.63183962485160821e-13, + -5.58003338783842040e-15, + 8.57327190951360195e-17, + -1.31720855074308262e-18, + 2.02373322265472514e-20, + -3.10892789428717985e-22, + 4.77418910149584896e-24, + -7.31915695100903637e-26, + 8.05031734912228930e-02, + -1.26913267412582360e-03, + 2.00078788783131508e-05, + -3.15424246309628234e-07, + 4.97266380640538851e-09, + -7.83940536423127966e-11, + 1.23588237436052914e-12, + -1.94836853960931523e-14, + 3.07160093055407163e-16, + -4.84235822271375090e-18, + 7.63381249901725595e-20, + -1.20335306258841760e-21, + 1.89632818180187138e-23, + -2.98436182299534046e-25, + 1.71007788409349437e-01, + -2.81321125294174473e-03, + 4.62795152623455761e-05, + -7.61334055750780988e-07, + 1.25245379312838678e-08, + -2.06038399238838224e-10, + 3.38949202281098958e-12, + -5.57597768421452374e-14, + 9.17291170917380298e-16, + -1.50901040051307736e-17, + 2.48240038628879782e-19, + -4.08346353668879405e-21, + 6.71581551846133683e-23, + -1.10344363917178252e-24, + 3.21046990190717696e-01, + -5.64645366104316558e-03, + 9.93077023626270190e-05, + -1.74658650197523222e-06, + 3.07183061921434245e-08, + -5.40262009904599930e-10, + 9.50192483216005592e-12, + -1.67116266031101872e-13, + 2.93917675424188136e-15, + -5.16930245832936739e-17, + 9.09148765814225933e-19, + -1.59891457557038269e-20, + 2.81170727098753858e-22, + -4.94120440207090120e-24, + 5.95307837978866994e-01, + -1.17070491952177037e-02, + 2.30225426435557980e-04, + -4.52750698258114039e-06, + 8.90358627721593306e-08, + -1.75093818347822015e-09, + 3.44331419594934715e-11, + -6.77146247897472737e-13, + 1.33164425575958977e-14, + -2.61874743833160225e-16, + 5.14988638951077063e-18, + -1.01273744141255411e-19, + 1.99150107382755108e-21, + -3.91427296578927064e-23, +# root=6 base[23]=68.0 */ + 2.82648603681692149e-03, + -4.04436918901064115e-05, + 5.78701678478428468e-07, + -8.28054059909978163e-09, + 1.18484799962813132e-10, + -1.69537817642228249e-12, + 2.42588683028851870e-14, + -3.47115879418733473e-16, + 4.96681978909060279e-18, + -7.10693230958388777e-20, + 1.01691619638051660e-21, + -1.45507121337046379e-23, + 2.08192840942862917e-25, + -2.97773908764521093e-27, + 2.60103400341561812e-02, + -3.76485535447570313e-04, + 5.44942350677102043e-06, + -7.88774435140626722e-08, + 1.14170812518486908e-09, + -1.65256045949676359e-11, + 2.39199144634082693e-13, + -3.46227758474040754e-15, + 5.01145833049135744e-17, + -7.25381089098734877e-19, + 1.04994756791778004e-20, + -1.51972661185796066e-22, + 2.19961990866497559e-24, + -3.18255111699013734e-26, + 7.57245611706654220e-02, + -1.12296697723726288e-03, + 1.66531811141595428e-05, + -2.46960459962138379e-07, + 3.66233144082546743e-09, + -5.43110082609716104e-11, + 8.05411979608184446e-13, + -1.19439589382142519e-14, + 1.77124443630313871e-16, + -2.62668856218419829e-18, + 3.89527450600344993e-20, + -5.77649901023530992e-22, + 8.56601730991787180e-24, + -1.26983930230111882e-25, + 1.60441983998952209e-01, + -2.47639936730493235e-03, + 3.82228745465281193e-05, + -5.89964671243088212e-07, + 9.10602139272131766e-09, + -1.40550154338410905e-10, + 2.16937178354473684e-12, + -3.34839469334794579e-14, + 5.16819971261296478e-16, + -7.97704135869518920e-18, + 1.23124353122175785e-19, + -1.90039584393039445e-21, + 2.93316015405982394e-23, + -4.52576658217301283e-25, + 2.99928163971232675e-01, + -4.92822070454014115e-03, + 8.09772546568405713e-05, + -1.33056455156598558e-06, + 2.18629543984054512e-08, + -3.59237569067390641e-10, + 5.90275351637293200e-12, + -9.69901311384160402e-14, + 1.59367747316302039e-15, + -2.61862472865406186e-17, + 4.30274715729984981e-19, + -7.06996438965433069e-21, + 1.16167336154835434e-22, + -1.90817092919962203e-24, + 5.51850170607431245e-01, + -1.00607469079738599e-02, + 1.83416865188042514e-04, + -3.34386171753568080e-06, + 6.09617396659127191e-08, + -1.11138976932105474e-09, + 2.02616793030292418e-11, + -3.69389442394511879e-13, + 6.73431635617131172e-15, + -1.22772902171142689e-16, + 2.23826451508413395e-18, + -4.08056056160756864e-20, + 7.43920505639528651e-22, + -1.35576229347805451e-23, +# root=6 base[24]=72.0 */ + 2.67338351598657388e-03, + -3.61817031902729558e-05, + 4.89684939673122628e-07, + -6.62741991115353486e-09, + 8.96958250503967784e-11, + -1.21394768088989690e-12, + 1.64296272544677847e-14, + -2.22359378290302047e-16, + 3.00942268400682679e-18, + -4.07296726730918554e-20, + 5.51237296138662876e-22, + -7.46046626925898404e-24, + 1.00969892493811063e-25, + -1.36625543248304080e-27, + 2.45860016491784190e-02, + -3.36388963888736695e-04, + 4.60251880890600001e-06, + -6.29722781076116505e-08, + 8.61595134035577864e-10, + -1.17884598953425822e-11, + 1.61291285439541333e-13, + -2.20680894524220421e-15, + 3.01938551258315909e-17, + -4.13116355575182708e-19, + 5.65231244659154372e-21, + -7.73356361598266014e-23, + 1.05811252219736529e-24, + -1.44742838909927764e-26, + 7.14816806191353182e-02, + -1.00067572684138799e-03, + 1.40085110145197319e-05, + -1.96105866845933352e-07, + 2.74529612544243412e-09, + -3.84315417868336514e-11, + 5.38005131889589301e-13, + -7.53156153440017637e-15, + 1.05434717309519250e-16, + -1.47598600515985962e-18, + 2.06624016114602950e-20, + -2.89253842660656152e-22, + 4.04926708824839807e-24, + -5.66740412280702012e-26, + 1.51106351628859825e-01, + -2.19665455154821132e-03, + 3.19330800249159209e-05, + -4.64215731672033276e-07, + 6.74837019678573578e-09, + -9.81020185348705366e-11, + 1.42612301334842145e-12, + -2.07317533210116103e-14, + 3.01380449513159616e-16, + -4.38121044215182575e-18, + 6.36902744059710394e-20, + -9.25874168681037423e-22, + 1.34595357203933067e-23, + -1.95620100177707418e-25, + 2.81417527648414323e-01, + -4.33882327369134509e-03, + 6.68948645723479047e-05, + -1.03136786724791193e-06, + 1.59013652900171875e-08, + -2.45163172244593435e-10, + 3.77986291912002992e-12, + -5.82769571511703532e-14, + 8.98499178993645860e-16, + -1.38528297785284471e-17, + 2.13579364855574188e-19, + -3.29291097190383423e-21, + 5.07691928698648919e-23, + -7.82556588691979138e-25, + 5.14309098280708143e-01, + -8.73886925557584675e-03, + 1.48486262680049507e-04, + -2.52300035163247900e-06, + 4.28694928368685283e-08, + -7.28415838268168586e-10, + 1.23768581878818145e-11, + -2.10301054057866542e-13, + 3.57332471840839206e-15, + -6.07160508130622455e-17, + 1.03165512137124852e-18, + -1.75293382271299636e-20, + 2.97849112094695240e-22, + -5.05942554335917576e-24, +# root=6 base[25]=76.0 */ + 2.53602015219610202e-03, + -3.25596583433593990e-05, + 4.18029545434904391e-07, + -5.36703115904018265e-09, + 6.89066688626992441e-11, + -8.84684450872771135e-13, + 1.13583574787736407e-14, + -1.45828588357457319e-16, + 1.87227574216561468e-18, + -2.40379234934740690e-20, + 3.08620011508291419e-22, + -3.96233505882074342e-24, + 5.08719274074995952e-26, + -6.53029960853896269e-28, + 2.33096090328424564e-02, + -3.02373777782162447e-04, + 3.92241248497282316e-06, + -5.08817921154347669e-08, + 6.60041945816978071e-10, + -8.56210742831922365e-12, + 1.11068219343477623e-13, + -1.44078422878136052e-15, + 1.86899475458437441e-17, + -2.42447225518561400e-19, + 3.14504128856270302e-21, + -4.07976798188757611e-23, + 5.29230018914159571e-25, + -6.86404237964385482e-27, + 6.76891923573638005e-02, + -8.97328187891168957e-04, + 1.18955160896738453e-05, + -1.57694035414444331e-07, + 2.09048591232441357e-09, + -2.77127244422433251e-11, + 3.67376355651213944e-13, + -4.87015944499170783e-15, + 6.45617298204303147e-17, + -8.55868683580096025e-19, + 1.13459041579346948e-20, + -1.50408046279912386e-22, + 1.99389800018895084e-24, + -2.64276254059208725e-26, + 1.42797791197760038e-01, + -1.96177464896051370e-03, + 2.69511155671469234e-05, + -3.70257934925699231e-07, + 5.08665172073816338e-09, + -6.98810836647579416e-11, + 9.60035426495147740e-13, + -1.31890916937069438e-14, + 1.81193458993706779e-16, + -2.48925933016664536e-18, + 3.41977686006619659e-20, + -4.69813382887228288e-22, + 6.45435617151261857e-24, + -8.86539888794775669e-26, + 2.65059820486880815e-01, + -3.84918800427805526e-03, + 5.58977526848940503e-05, + -8.11744906133160194e-07, + 1.17881267310983317e-08, + -1.71186700130171048e-10, + 2.48596634307472605e-12, + -3.61011027966607099e-14, + 5.24258756216637485e-16, + -7.61326447179583502e-18, + 1.10559518648178757e-19, + -1.60554083118494978e-21, + 2.33155958609085049e-23, + -3.38516614659358684e-25, + 4.81552776568487995e-01, + -7.66143408187071242e-03, + 1.21892293112968838e-04, + -1.93928851460013370e-06, + 3.08537959768664589e-08, + -4.90879370972947570e-10, + 7.80981883160158434e-12, + -1.24253072727504519e-13, + 1.97684817206430670e-15, + -3.14513646095467489e-17, + 5.00386599359454598e-19, + -7.96107736896233667e-21, + 1.26659560769538139e-22, + -2.01462477898321596e-24, +# root=6 base[26]=80.0 */ + 2.41208689779711348e-03, + -2.94555517848835842e-05, + 3.59700776843628015e-07, + -4.39253862249183596e-09, + 5.36401275509901733e-11, + -6.55034259449317232e-13, + 7.99904662128908737e-15, + -9.76815272277105209e-17, + 1.19285225017307604e-18, + -1.45666896394968676e-20, + 1.77883259990951491e-22, + -2.17224742700720177e-24, + 2.65267158933567826e-26, + -3.23886535489999427e-28, + 2.21592429106915768e-02, + -2.73269409441482538e-04, + 3.36997840754145273e-06, + -4.15588209836840156e-08, + 5.12506429622472019e-10, + -6.32026689369971456e-12, + 7.79419950633931977e-14, + -9.61186401876636198e-16, + 1.18534212319372112e-17, + -1.46177260329255064e-19, + 1.80266869872095097e-21, + -2.22306425843788425e-23, + 2.74149904027003009e-25, + -3.38032232877507857e-27, + 6.42789739857338449e-02, + -8.09203985938046358e-04, + 1.01870184020571244e-05, + -1.28243737953850941e-07, + 1.61445240160308769e-09, + -2.03242403771784674e-11, + 2.55860591801356420e-13, + -3.22101299836932522e-15, + 4.05491313161410287e-17, + -5.10470479699316488e-19, + 6.42628096052602629e-21, + -8.09000491321117623e-23, + 1.01844562101346538e-24, + -1.28191156915049895e-26, + 1.35355593618907172e-01, + -1.76265320077397111e-03, + 2.29539557481925212e-05, + -2.98915342086933873e-07, + 3.89259187893940287e-09, + -5.06908458769510277e-11, + 6.60115916498463734e-13, + -8.59628628553565212e-15, + 1.11944184431071530e-16, + -1.45778072194145734e-18, + 1.89837877101760467e-20, + -2.47214268773107964e-22, + 3.21932025969455400e-24, + -4.19161304082662737e-26, + 2.50499948084807189e-01, + -3.43800408868284767e-03, + 4.71851279977045812e-05, + -6.47595595214299611e-07, + 8.88797112008182666e-09, + -1.21983582370208937e-10, + 1.67417222297763428e-12, + -2.29772939745418161e-14, + 3.15353481048020055e-16, + -4.32809094560912977e-18, + 5.94011874151332911e-20, + -8.15255757525143714e-22, + 1.11890342932262142e-23, + -1.53535759770316444e-25, + 4.52720871896524990e-01, + -6.77167471813511918e-03, + 1.01288854423993088e-04, + -1.51505092278712608e-06, + 2.26617164513452781e-08, + -3.38967743458037890e-10, + 5.07018660090096961e-12, + -7.58384615175837327e-14, + 1.13437092124277617e-15, + -1.69676093262940548e-17, + 2.53796849715768010e-19, + -3.79622371388028037e-21, + 5.67828708181497427e-23, + -8.49152623761988815e-25, +# root=6 base[27]=84.0 */ + 2.29970543536013768e-03, + -2.67751295152945770e-05, + 3.11738864263948615e-07, + -3.62952938984158700e-09, + 4.22580727071934213e-11, + -4.92004476923214697e-13, + 5.72833519857327759e-15, + -6.66941576475388268e-17, + 7.76510191900161845e-19, + -9.04079306779783405e-21, + 1.05260613634013525e-22, + -1.22553372226373055e-24, + 1.42687071960530350e-26, + -1.66105925115941561e-28, + 2.11171113736012203e-02, + -2.48173992820575288e-04, + 2.91660775107251831e-06, + -3.42767615451405942e-08, + 4.02829753706300366e-10, + -4.73416399788455988e-12, + 5.56371731548082676e-14, + -6.53863076573005189e-16, + 7.68437536744925915e-18, + -9.03088534944256417e-20, + 1.06133402251728518e-21, + -1.24730839068098000e-23, + 1.46587045857368820e-25, + -1.72249261539414884e-27, + 6.11959855891208090e-02, + -7.33453274514382918e-04, + 8.79066985713367174e-06, + -1.05358963170874956e-07, + 1.26276055190875676e-09, + -1.51345852641961311e-11, + 1.81392799112220378e-13, + -2.17405016360799642e-15, + 2.60566799620194304e-17, + -3.12297564244872983e-19, + 3.74298524498474505e-21, + -4.48608639521822088e-23, + 5.37671655027406136e-25, + -6.44323953226836111e-27, + 1.28650926294821832e-01, + -1.59238254252906533e-03, + 1.97097855008090275e-05, + -2.43958743651455861e-07, + 3.01961016275665794e-09, + -3.73753586305160180e-11, + 4.62615158072064049e-13, + -5.72603962395951961e-15, + 7.08743092461224815e-17, + -8.77249904119368152e-19, + 1.08581995711845873e-20, + -1.34397846453215051e-22, + 1.66351526130109968e-24, + -2.05870797897642331e-26, + 2.37456861673428749e-01, + -3.08936236520946554e-03, + 4.01932366001643733e-05, + -5.22922233594070026e-07, + 6.80332527353352836e-09, + -8.85126540888869226e-11, + 1.15156774354694737e-12, + -1.49821320084476314e-14, + 1.94920603478455252e-16, + -2.53595694116922237e-18, + 3.29933187801802958e-20, + -4.29249829277531313e-22, + 5.58462796117335333e-24, + -7.26448562318989318e-26, + 4.27147723700533610e-01, + -6.02839792438802750e-03, + 8.50796563304276722e-05, + -1.20074155888415457e-06, + 1.69462401873374154e-08, + -2.39164751450595666e-10, + 3.37536690759086019e-12, + -4.76370438860959021e-14, + 6.72308525956709741e-16, + -9.48838796870731846e-18, + 1.33910998846911427e-19, + -1.88990539495082351e-21, + 2.66725085347666678e-23, + -3.76358026998835674e-25, +# root=6 base[28]=88.0 */ + 2.19733219353527437e-03, + -2.44446440920925256e-05, + 2.71939138991858358e-07, + -3.02523919092588694e-09, + 3.36548545245924309e-11, + -3.74399894219546913e-13, + 4.16508354505524194e-15, + -4.63352720049571666e-17, + 5.15465634374170202e-19, + -5.73439646997837808e-21, + 6.37933951014527997e-23, + -7.09681878437851537e-25, + 7.89499226430037607e-27, + -8.78184897168098090e-29, + 2.01686218501676770e-02, + -2.26383599243520992e-04, + 2.54105284868658729e-06, + -2.85221615054917240e-08, + 3.20148279232303564e-10, + -3.59351869863265417e-12, + 4.03356115746991636e-14, + -4.52748878619739851e-16, + 5.08190006520203076e-18, + -5.70420148834570890e-20, + 6.40270650782810140e-22, + -7.18674659523859410e-24, + 8.06679577431948639e-26, + -9.05347039143089621e-28, + 5.83952723161424714e-02, + -6.67863239131940580e-04, + 7.63831194705305690e-06, + -8.73589171883845330e-08, + 9.99118714347791582e-10, + -1.14268610176032745e-11, + 1.30688326462643982e-13, + -1.49467457837243387e-15, + 1.70945038145495885e-17, + -1.95508818370221540e-19, + 2.23602266992635136e-21, + -2.55732576261928878e-23, + 2.92479813909648409e-25, + -3.34463665824969991e-27, + 1.22579301086195164e-01, + -1.44564608864638090e-03, + 1.70493108958829164e-05, + -2.01072035754371179e-07, + 2.37135470221087835e-09, + -2.79667090582753830e-11, + 3.29827003451240211e-13, + -3.88983387280007405e-15, + 4.58749811254293752e-17, + -5.41029247540411548e-19, + 6.38065977386566017e-21, + -7.52506806878935529e-23, + 8.87473244924984420e-25, + -1.04650115672175399e-26, + 2.25705208489315329e-01, + -2.79119167841044256e-03, + 3.45173735146502345e-05, + -4.26860356300716939e-07, + 5.27878413761231223e-09, + -6.52802762313127064e-11, + 8.07290912782815200e-13, + -9.98339246532022177e-15, + 1.23459986404461076e-16, + -1.52677241688498368e-18, + 1.88808866811530887e-20, + -2.33491172568599780e-22, + 2.88747701907417266e-24, + -3.57026296337307420e-26, + 4.04310211688691912e-01, + -5.40112391244794952e-03, + 7.21528635049139313e-05, + -9.63880073175216414e-07, + 1.28763399030031154e-08, + -1.72013234749724662e-10, + 2.29790089046678731e-12, + -3.06973385512506339e-14, + 4.10081478291550753e-16, + -5.47822146069803542e-18, + 7.31827989341805064e-20, + -9.77638837389606370e-22, + 1.30601409054296172e-23, + -1.74437476812187782e-25, +# root=6 base[29]=92.0 */ + 2.10368694031128544e-03, + -2.24057242039258725e-05, + 2.38636494567060248e-07, + -2.54164409152534353e-09, + 2.70702714591307007e-11, + -2.88317156329800464e-13, + 3.07077757825972020e-15, + -3.27059098916618330e-17, + 3.48340612297850694e-19, + -3.71006899297351765e-21, + 3.95148066193700461e-23, + -4.20860082419026361e-25, + 4.48245156304523826e-27, + -4.77358013913167073e-29, + 1.93016927559013091e-02, + -2.07342300434873060e-04, + 2.22730876992543155e-06, + -2.39261566317239570e-08, + 2.57019133986058788e-10, + -2.76094636726382906e-12, + 2.96585889333858383e-14, + -3.18597966244195967e-16, + 3.42243740330736997e-18, + -3.67644461690614232e-20, + 3.94930379387375199e-22, + -4.24241409337466133e-24, + 4.55727845700811086e-26, + -4.89494670414596286e-28, + 5.58397551488449551e-02, + -6.10694539327023421e-04, + 6.67889426394735443e-06, + -7.30440927769647986e-08, + 7.98850719708279029e-10, + -8.73667463195170909e-12, + 9.55491204319903682e-14, + -1.04497818677350743e-15, + 1.14284611506151121e-17, + -1.24987991064570160e-19, + 1.36693800718002382e-21, + -1.49495923532687333e-23, + 1.63497032899723183e-25, + -1.78788040627729759e-27, + 1.17055082095441382e-01, + -1.31829793829905105e-03, + 1.48469372112055424e-05, + -1.67209200704579829e-07, + 1.88314373547446621e-09, + -2.12083444781372976e-11, + 2.38852652099872405e-13, + -2.69000673173493025e-15, + 3.02953982430706330e-17, + -3.41192883972560053e-19, + 3.84258305962800728e-21, + -4.32759452606073671e-23, + 4.87382414124094226e-25, + -5.48830290582006064e-27, + 2.15062182672692115e-01, + -2.53419898610922475e-03, + 2.98618958544239153e-05, + -3.51879559935245804e-07, + 4.14639530269070172e-09, + -4.88593142759964802e-11, + 5.75736855087467757e-13, + -6.78423205928727583e-15, + 7.99424324282121210e-17, + -9.42006766084977331e-19, + 1.11001969842074423e-20, + -1.30799881193992046e-22, + 1.54128873703044619e-24, + -1.81593529527573156e-26, + 3.83791529643689622e-01, + -4.86690822583860355e-03, + 6.17178698569147073e-05, + -7.82652000597099239e-07, + 9.92490757472268714e-09, + -1.25858990064086533e-10, + 1.59603354093646918e-12, + -2.02395002732591796e-14, + 2.56659625756301097e-16, + -3.25473270604406090e-18, + 4.12736711377076469e-20, + -5.23396568330458219e-22, + 6.63725695114380180e-24, + -8.41543497720650801e-26, +# root=6 base[30]=96.0 */ + 2.01769891064437160e-03, + -2.06116817353510052e-05, + 2.10557393731121670e-07, + -2.15093637792809664e-09, + 2.19727610601147471e-11, + -2.24461417622197341e-13, + 2.29297209682137992e-15, + -2.34237183944502174e-17, + 2.39283584908467502e-19, + -2.44438705428654646e-21, + 2.49704887756895179e-23, + -2.55084524606150102e-25, + 2.60580057401348826e-27, + -2.66166212845542869e-29, + 1.85062355681597686e-02, + -1.90606336165521781e-04, + 1.96316399694768243e-06, + -2.02197521679698549e-08, + 2.08254826580856991e-10, + -2.14493592374121288e-12, + 2.20919255149617608e-14, + -2.27537413848406471e-16, + 2.34353835141067871e-18, + -2.41374458452435465e-20, + 2.48605401136858099e-22, + -2.56052963808189746e-24, + 2.63723632863528580e-26, + -2.71595286757854165e-28, + 5.34985781619586320e-02, + -5.60564731070795422e-04, + 5.87366671258406536e-06, + -6.15450076293882931e-08, + 6.44876216075777383e-10, + -6.75709289962998278e-12, + 7.08016566839313643e-14, + -7.41868531874674527e-16, + 7.77339040303548069e-18, + -8.14505478555759940e-20, + 8.53448933091386731e-22, + -8.94254367306853794e-24, + 9.37010795611615399e-26, + -9.81703739968859371e-28, + 1.12007416467027596e-01, + -1.20706659988194459e-03, + 1.30081544821584952e-05, + -1.40184545780862229e-07, + 1.51072213223945141e-09, + -1.62805489586976130e-11, + 1.75450050502429628e-13, + -1.89076672410729419e-15, + 2.03761628723037748e-17, + -2.19587116752690586e-19, + 2.36641717804977249e-21, + -2.55020893000161462e-23, + 2.74827513901047870e-25, + -2.96138060428836397e-27, + 2.05377934294006220e-01, + -2.31113590797886416e-03, + 2.60074150785008303e-05, + -2.92663722946931937e-07, + 3.29337054338642294e-09, + -3.70605875809627314e-11, + 4.17046042573124707e-13, + -4.69305569551324451e-15, + 5.28113673619801400e-17, + -5.94290948924484198e-19, + 6.68760817255084158e-21, + -7.52562413249213882e-23, + 8.46865070654879514e-25, + -9.52864028663387749e-27, + 3.65255475991030143e-01, + -4.40821166550307755e-03, + 5.32020225984363701e-05, + -6.42086955740931873e-07, + 7.74924784052804831e-09, + -9.35244697887272140e-11, + 1.12873231431794336e-12, + -1.36224951637106645e-14, + 1.64407780419980152e-16, + -1.98421199184053559e-18, + 2.39471466527098329e-20, + -2.89014397233168283e-22, + 3.48806984179710056e-24, + -4.20908428737687786e-26, +# root=7 base[0]=0.0 */ + 2.17698169003663414e-02, + -9.00388533166411641e-04, + 2.77398856516153829e-05, + -7.52272087205286957e-07, + 1.88576835403994408e-08, + -4.45791918517815323e-10, + 1.00082617532786946e-11, + -2.13699719770689331e-13, + 4.31560210068295295e-15, + -8.15323208338981003e-17, + 1.40026388488924167e-18, + -2.06383759085473784e-20, + 2.02608816977337402e-22, + 1.00529391546118747e-24, + 2.08842926600831147e-01, + -8.69506768692059062e-03, + 2.55611283091824331e-04, + -6.06631136244537434e-06, + 1.15335481484192294e-07, + -1.53928800663169386e-09, + 3.65000180390809743e-12, + 5.59253510357823320e-13, + -2.04830279982893889e-14, + 4.10224267993781872e-16, + -3.10708791213844645e-18, + -1.26654974224177664e-19, + 6.39738967002332305e-21, + -1.59224904584232158e-22, + 6.65256543908556375e-01, + -2.80456922403081628e-02, + 7.48305949210435078e-04, + -1.31044007771253321e-05, + 9.01665470518738467e-08, + 2.62197604980704323e-09, + -9.04044106085457185e-11, + 5.11506359327406244e-13, + 4.11744236229754997e-14, + -1.25105401168636408e-15, + 1.83756063831323602e-18, + 8.10148924828152029e-19, + -2.09001957897295600e-20, + -8.62157086877372356e-23, + 1.64614257600417990e+00, + -7.05681784917052135e-02, + 1.61803133559422453e-03, + -1.57408378836372132e-05, + -1.94934741711401537e-07, + 5.80530431914956032e-09, + 7.52227413849002822e-11, + -3.68328076877764055e-12, + -2.97355145940334169e-14, + 2.67943702876386142e-15, + 6.28854044929080186e-18, + -2.06090769719397034e-18, + 6.97156671780374489e-21, + 1.59304181614939820e-21, + 3.98028028414261348e+00, + -1.73793949344110854e-01, + 3.24109616479511696e-03, + -8.34900399447002187e-06, + -4.66939082431400156e-07, + -4.69075757152077132e-09, + 1.69048801099545370e-10, + 5.19508837018899932e-12, + -3.67265241383516494e-14, + -4.17420866606925114e-15, + -3.34999199645459326e-17, + 2.69932933325790867e-18, + 6.52435919024000552e-20, + -1.25458285652966612e-21, + 1.14595357291161299e+01, + -5.08709034515915870e-01, + 7.45395770813983734e-03, + 8.90267743242692387e-06, + -2.19134166099043353e-07, + -1.21922370783600060e-08, + -2.80826775454521795e-10, + -1.95919052353406769e-12, + 1.10738219316225031e-13, + 4.83559991121635167e-15, + 8.03216698772997974e-17, + -8.59458266946322000e-19, + -8.98590380265432724e-20, + -2.40260549881449932e-21, + 6.54640522312565167e+01, + -2.93791074611183056e+00, + 3.50832316284655985e-02, + 2.59895480659062246e-05, + 4.46394164679727350e-07, + 5.51570608170696131e-09, + -4.61663238123931234e-12, + -3.31834951976833589e-12, + -1.44074409408090791e-13, + -4.46205737344564687e-15, + -1.14636852620945935e-16, + -2.57402909014293422e-18, + -5.40003887012227889e-20, + -9.58696242307729610e-22, +# root=7 base[1]=2.5 */ + 1.85613719641818456e-02, + -7.10051101941351365e-04, + 2.02660587926568209e-05, + -5.10610015309486508e-07, + 1.19295734034011777e-08, + -2.64157910779112828e-10, + 5.58444125350836287e-12, + -1.13356042529881797e-13, + 2.19607692188970145e-15, + -4.08077797671393017e-17, + 7.05003260719006116e-19, + -1.12190488235194719e-20, + 1.75838768902199611e-22, + -9.84195890755480402e-25, + 1.77732666227274266e-01, + -6.91227631404152127e-03, + 1.92898941360518015e-04, + -4.45831381966810020e-06, + 8.63654827866055846e-08, + -1.32524322499833805e-09, + 1.21406094034331961e-11, + 1.09537508097659516e-13, + -8.66105592761528641e-15, + 2.39922218107558538e-16, + -4.28521018469560301e-18, + 3.22883049710717994e-20, + 1.22456593771810400e-21, + -4.72645788255374932e-23, + 5.64089689587080056e-01, + -2.26604778352196383e-02, + 6.01076386873453279e-04, + -1.13530754740649026e-05, + 1.22668442266920211e-07, + 7.33317421992365102e-10, + -6.39877710525381983e-11, + 1.17501435379752939e-12, + 3.43567903569692156e-15, + -7.46048602690039273e-16, + 1.73127300810798845e-17, + -1.12417467994274680e-20, + -9.87187928708999185e-21, + 3.22789444029020914e-22, + 1.38849942437181073e+00, + -5.84232269418422379e-02, + 1.41447878363871928e-03, + -1.78687285879830895e-05, + -6.93134385467841799e-08, + 6.35228461054672334e-09, + -2.73351922407891319e-11, + -3.20374280025885082e-12, + 5.21624949002901344e-14, + 1.46000424708512729e-15, + -5.43841818711619090e-17, + -3.72063004911378167e-19, + 4.69974534405291523e-20, + -2.14211671620381270e-22, + 3.33614088076478055e+00, + -1.48398407899153734e-01, + 3.09382554275928166e-03, + -1.63048606146967778e-05, + -5.09688290668194167e-07, + 8.37646048424383867e-10, + 2.75182872927372739e-10, + 1.63071373227865580e-12, + -1.76651602502180029e-13, + -2.58124898356054664e-15, + 1.15646266145869914e-16, + 2.97122614377433351e-18, + -6.85000112102975366e-20, + -2.81440079259634209e-21, + 9.54452787107864076e+00, + -4.48730615771356700e-01, + 7.53049113683568281e-03, + 3.07037974485038134e-06, + -5.31998657881817571e-07, + -1.90104050818339966e-08, + -2.56358391681959998e-10, + 4.82283707715123949e-12, + 3.18988832293271015e-13, + 5.63323755648819522e-15, + -8.78861929482228206e-17, + -7.15060904915639258e-18, + -1.25013473290427252e-19, + 3.05960982558804006e-21, + 5.42758983325995814e+01, + -2.65586783340484045e+00, + 3.54414671621173585e-02, + 3.39651231451167549e-05, + 5.44616479824522095e-07, + 3.58253216051207747e-09, + -1.94050886707085981e-10, + -1.16522508160182978e-11, + -4.21430409625406097e-13, + -1.20085401898752385e-14, + -2.68069295126168554e-16, + -2.64876406382835436e-18, + 1.90270228180271059e-19, + 1.48176019456880977e-20, +# root=7 base[2]=5.0 */ + 1.60107234103867464e-02, + -5.69546109448793004e-04, + 1.51305830096720310e-05, + -3.55671922320905571e-07, + 7.76550893501215036e-09, + -1.61462060957039753e-10, + 3.20736920557898975e-12, + -6.19694505872458652e-14, + 1.13671667642504909e-15, + -2.02119690276274417e-17, + 3.74495989918828992e-19, + -4.46314721694220178e-21, + 9.12995547140105531e-23, + -2.57268070275141369e-24, + 1.52861754270501082e-01, + -5.56150073955290550e-03, + 1.46868577013442375e-04, + -3.27210307157153273e-06, + 6.28907622505254929e-08, + -1.02150081949442573e-09, + 1.24100094623689638e-11, + -5.89812449477877088e-14, + -2.66060925696420981e-15, + 1.07497588712656569e-16, + -2.20500576040066506e-18, + 5.11848172465100936e-20, + -2.37726042136383923e-22, + -2.22479661726021389e-23, + 4.82250125739498325e-01, + -1.83628205282427535e-02, + 4.76859858536704344e-04, + -9.34535193924667099e-06, + 1.24618521147222501e-07, + -4.15343771302801480e-10, + -3.26697631460033696e-11, + 9.81818618521301889e-13, + -1.19486798914276047e-14, + -1.50329310866972256e-16, + 1.13722566766100604e-17, + -1.74389394190148061e-19, + 5.92778391265651877e-22, + 5.09753590238662828e-23, + 1.17606580943662653e+00, + -4.79746609466500523e-02, + 1.19740288416535700e-03, + -1.80236563709298675e-05, + 4.50314181374479592e-08, + 4.84185268275736783e-09, + -8.87670518125405542e-11, + -1.10911604135948757e-12, + 6.70134699580512074e-14, + -4.74847510286684053e-16, + -3.16558543768984124e-17, + 1.06622266146609961e-18, + 6.32665142925861855e-21, + -9.78983098077367365e-22, + 2.79061821875525773e+00, + -1.24565439854732340e-01, + 2.85096542358609243e-03, + -2.39637240168603547e-05, + -4.26725843626482474e-07, + 7.30223226731302858e-09, + 2.35216366478176800e-10, + -4.43615658038281078e-12, + -1.66702271272329464e-13, + 3.29571575039936814e-15, + 1.38586010885595643e-16, + -2.27510792336302267e-18, + -1.10053753562471382e-19, + 1.60117947352766507e-21, + 7.87008188154590638e+00, + -3.88514760288560135e-01, + 7.50281401452264178e-03, + -8.74885881542564040e-06, + -9.56179995603962243e-07, + -2.22426459380816623e-08, + 4.33022841043077485e-11, + 1.69114489279629690e-11, + 3.73368252522394587e-13, + -4.95952948499225225e-15, + -4.28369541847200917e-16, + -4.98611498417558312e-18, + 2.81835347713118547e-19, + 1.00644454806301405e-20, + 4.42222852367918833e+01, + -2.37055451520597460e+00, + 3.59024948635120883e-02, + 4.28549474784141668e-05, + 5.33422987536159578e-07, + -6.98791148502596397e-09, + -7.88806206942697918e-10, + -3.40536215076901832e-11, + -1.02502583500799153e-12, + -1.88383481758780496e-14, + 1.78098278482865137e-16, + 3.19496516810617402e-17, + 1.25639687934371996e-18, + 1.30733158103893357e-20, +# root=7 base[3]=7.5 */ + 1.39502866037601765e-02, + -4.63682384290067524e-04, + 1.15135409647584789e-05, + -2.53598961726268532e-07, + 5.18422867275523860e-09, + -1.01773925424994579e-10, + 1.89076260814820503e-12, + -3.46736773241561858e-14, + 6.39284739284566210e-16, + -8.39885008581891966e-18, + 2.21586905472449241e-19, + -3.70476299836373121e-21, + -5.65708920386061898e-23, + -2.12472244576047176e-24, + 1.32739200047685774e-01, + -4.52795767475644602e-03, + 1.13017221226402044e-04, + -2.41380230009192039e-06, + 4.52689485785308118e-08, + -7.50028986154174902e-10, + 1.00507808298947437e-11, + -9.51931421418946689e-14, + 1.02827925867840060e-16, + 5.67631876765726246e-17, + -6.19888366000122498e-19, + 1.19771110091293853e-20, + -1.31548588198680054e-21, + -1.17196369283504911e-23, + 4.15765079791039605e-01, + -1.49634873044736695e-02, + 3.76290474127392285e-04, + -7.45197848771875359e-06, + 1.10463418098235025e-07, + -9.14955274725761043e-10, + -1.08033758592172602e-11, + 5.86270756239102377e-13, + -1.09310791351128098e-14, + 1.60337170090077463e-16, + 4.26051373169883184e-18, + -1.64976890110336634e-19, + -1.09522315361297646e-21, + -5.15711478014225527e-23, + 1.00198181781228435e+00, + -3.92417528826014064e-02, + 9.88243758795472396e-04, + -1.66506786313761358e-05, + 1.19209740006789634e-07, + 2.55883856060916891e-09, + -9.35843587984604204e-11, + 6.07712169470399474e-13, + 3.80407500445545029e-14, + -8.73025705371825439e-16, + 6.82457548214766354e-18, + 4.27995112539896720e-19, + -2.50726866467804918e-20, + -1.03059480875183512e-22, + 2.33600364308489716e+00, + -1.03011200319885726e-01, + 2.52811031227175584e-03, + -2.93676044532003307e-05, + -2.36821315556658437e-07, + 1.09956203305884287e-08, + 6.02622832249925451e-11, + -7.07505906524916648e-12, + 1.64448431463489760e-14, + 5.70527759483479826e-15, + -3.38317646195877003e-17, + -4.38988423508281942e-18, + 3.13220656754257222e-20, + 2.69817954684973479e-21, + 6.43499274521059927e+00, + -3.29204829414288525e-01, + 7.29202851425671261e-03, + -2.73681318135393752e-05, + -1.34645708074526352e-06, + -1.44594818470065189e-08, + 6.32649748445127204e-10, + 2.25708171130845296e-11, + -1.18733360029073415e-13, + -2.10249819943812127e-14, + -2.18275235566763220e-16, + 1.56689471488330820e-17, + 4.01400854828271836e-19, + -9.75999502735820350e-21, + 3.53179441688537281e+01, + -2.08115163707885742e+00, + 3.64589572930363037e-02, + 4.88453025917504071e-05, + 1.05759937887463099e-07, + -4.15570279963215495e-08, + -2.27239726012107518e-09, + -7.24992843024662508e-11, + -1.07375567346296189e-12, + 3.37252660760460830e-14, + 2.78259438088259032e-15, + 7.29967429007119279e-17, + -5.10358747162832777e-19, + -9.54219832806883809e-20, +# root=7 base[4]=10.0 */ + 1.22623053582094042e-02, + -3.82476855047546359e-04, + 8.90804662513026194e-06, + -1.84761127614686417e-07, + 3.53484894756910408e-09, + -6.59614969864742293e-11, + 1.17090906327331186e-12, + -1.77213391003831351e-14, + 4.48080160527520602e-16, + -3.81219259390158814e-18, + -1.78988424908370504e-20, + -6.98973850278002556e-21, + -3.09529182650658042e-23, + 3.41575059915323497e-24, + 1.16268178032520902e-01, + -3.72842854812791740e-03, + 8.79424375087631515e-05, + -1.79727452881106799e-06, + 3.24739896076109022e-08, + -5.38701959927615239e-10, + 7.70483545824204167e-12, + -6.41128597595122003e-14, + 1.65229102741867109e-15, + 2.34750502279819900e-17, + -1.48034917470336388e-18, + -4.56350414639431812e-20, + -6.19632696206334479e-22, + 4.04596404318855092e-23, + 3.61405927540579652e-01, + -1.22822696013563382e-02, + 2.96835421496134883e-04, + -5.84009715411993547e-06, + 9.07226060611413640e-08, + -1.01063942262328775e-09, + 1.72939222736432275e-12, + 3.46348343359341778e-13, + -4.02182541221147467e-15, + 1.65571744399420474e-16, + -4.45869994261370410e-18, + -2.20823517854452618e-19, + 2.83556289688372492e-22, + 1.15588004665543323e-22, + 8.59611206118725102e-01, + -3.20994761975851306e-02, + 8.01194283365831315e-04, + -1.44480312082236659e-05, + 1.49900891803928303e-07, + 6.27927135310185987e-10, + -6.37650643871243496e-11, + 1.39085470507272627e-12, + 1.29360856196403843e-14, + -5.58917400601072757e-16, + 1.83144162588023822e-18, + -5.09087871008415432e-19, + -7.49911003681074856e-21, + 6.32995419120007680e-22, + 1.96210801458556050e+00, + -8.42434764264537311e-02, + 2.16029939609246099e-03, + -3.13828795437691481e-05, + -1.74415511777471251e-08, + 1.02959992074046096e-08, + -1.03438492608461679e-10, + -3.85756005494291348e-12, + 1.58021814725864221e-13, + 1.33100146545906722e-15, + -1.56989585311022329e-16, + -6.85618981069359445e-19, + 9.69194253730746655e-20, + -2.01818559606489317e-22, + 5.23222786697350806e+00, + -2.72564123266044400e-01, + 6.82802844636225519e-03, + -5.02020868616189698e-05, + -1.43790416921924327e-06, + 7.15718847313420159e-09, + 1.09469004937490342e-09, + 6.56171826021947178e-12, + -8.33990407001660089e-13, + -1.29898626431917229e-14, + 6.13042697987956131e-16, + 1.43550696589409588e-17, + -5.27273850127038880e-19, + -1.69449676102534133e-20, + 2.75803218336275755e+01, + -1.78719269006068449e+00, + 3.70162223179515346e-02, + 4.01881026822172572e-05, + -1.44724713642770101e-06, + -1.22311618427723641e-07, + -4.41708312240899030e-09, + -6.09509672501991708e-11, + 2.69680576940738672e-12, + 1.80483705463095847e-13, + 3.26284341225426210e-15, + -1.04779576049152107e-16, + -6.92537414459520307e-18, + -8.81775517974572481e-20, +# root=7 base[5]=12.5 */ + 1.08621216419029585e-02, + -3.19210604102654783e-04, + 6.99127526301842978e-06, + -1.37371866637485425e-07, + 2.46421458627260596e-09, + -4.23404738343310988e-11, + 8.50355639911656314e-13, + -6.31281580450788713e-15, + 2.25698438830127496e-16, + -1.02944273985564020e-17, + -2.72615439795534025e-19, + -2.20062643996935708e-21, + 2.68346797270184235e-22, + 7.93281384229227032e-24, + 1.02636419503862361e-01, + -3.10308142532201561e-03, + 6.91682513585495335e-05, + -1.35433358364212832e-06, + 2.34360785060769940e-08, + -3.69082728078816203e-10, + 6.67166060566551694e-12, + -1.32406605827338353e-14, + 9.33362378320838181e-16, + -7.55247361836232370e-17, + -3.20414772970700884e-18, + -7.72995404758314045e-21, + 2.51254238870323191e-21, + 7.82392222881889414e-23, + 3.16615218037902768e-01, + -1.01647403593033304e-02, + 2.34812410807516925e-04, + -4.54489221075526604e-06, + 7.16526551269686033e-08, + -8.63478474650632545e-10, + 1.01715197046718277e-11, + 2.60867354291895789e-13, + -3.38686249039075507e-15, + -1.76598951441653034e-16, + -1.11481234225427478e-17, + -1.04436457252445866e-20, + 9.39348030502722161e-21, + 2.26918311220119702e-22, + 7.42992582540277113e-01, + -2.63421718362332989e-02, + 6.42391160983274206e-04, + -1.20184578371915011e-05, + 1.50471328397277984e-07, + -4.07547207143191841e-10, + -2.22135729117050688e-11, + 1.45179071153447204e-12, + -1.13408570357000557e-14, + -9.18792707416822301e-16, + -1.65307105538916672e-17, + -5.95787581114577827e-20, + 2.57491433760764877e-20, + 6.08808916054387903e-22, + 1.65732646026776687e+00, + -6.84575699023930867e-02, + 1.78831366712477527e-03, + -3.01757721871092427e-05, + 1.57887006448037136e-07, + 7.08968919125910585e-09, + -1.42047828335702130e-10, + 7.73080766940704992e-13, + 9.73933677265287596e-14, + -4.28668473283782180e-15, + -9.60947633798041479e-17, + 3.11627633725569111e-18, + 5.84091907226566433e-20, + -5.33575547773530724e-22, + 4.24687844073910981e+00, + -2.20720476507878349e-01, + 6.09694401459150853e-03, + -7.06314094369501187e-05, + -1.03388518194386373e-06, + 3.23767971436735540e-08, + 8.72779579718316825e-10, + -2.21782245800577456e-11, + -7.91321839048825677e-13, + 1.48405103388985381e-14, + 5.38175413547738862e-16, + -1.68482271252238110e-17, + -4.02063254035822640e-19, + 2.37415628996003823e-20, + 2.10260146024932233e+01, + -1.48975274968060223e+00, + 3.72591782236300836e-02, + -8.61919012429715838e-06, + -5.01371156886105430e-06, + -2.32481994400066507e-07, + -3.84160338006168473e-09, + 1.39340467059083080e-10, + 9.50387766257090484e-12, + 1.18456752653776022e-13, + -8.48726981166590659e-15, + -3.73731720276015969e-16, + 4.19690724298277363e-19, + 4.35493985783550761e-19, +# root=7 base[6]=15.0 */ + 9.68756953765914641e-03, + -2.69261394799658266e-04, + 5.55488471740261202e-06, + -1.03660588493778047e-07, + 1.80966327233602632e-09, + -2.36541665364237851e-11, + 7.04286891260075128e-13, + -7.02224424376649007e-15, + -3.18238977531651078e-16, + -1.77321132110150779e-17, + 7.48519066283443770e-20, + 2.15767008630408969e-20, + 6.87554562964241894e-22, + 1.89504818587622055e-24, + 9.12361868539723342e-02, + -2.60887381378749729e-03, + 5.49504127122730219e-05, + -1.02981572327395591e-06, + 1.76292392296845496e-08, + -2.13401472339214340e-10, + 6.14326826297801764e-12, + -4.95187537245152982e-14, + -3.73664196534297577e-15, + -1.59309834467290488e-16, + 6.70350391798331976e-19, + 2.18122350462427305e-19, + 6.51974399407552536e-21, + 1.47227952838310450e-23, + 2.79393749684135329e-01, + -8.48612160802400886e-03, + 1.86631459669594390e-04, + -3.52118399393832374e-06, + 5.73168956967709561e-08, + -5.52758009769870690e-10, + 1.44308406563514251e-11, + -2.64130984736233047e-14, + -1.63405011709069023e-14, + -4.53455302428130171e-16, + 2.84072344493593679e-18, + 7.44479120937667408e-19, + 2.07387009267975555e-20, + 7.45290541159045174e-24, + 6.47045556535807198e-01, + -2.17397438603839331e-02, + 5.12287150029876919e-04, + -9.69244152988345868e-06, + 1.39924482616920437e-07, + -5.28662731172353233e-10, + 7.57079215850090883e-12, + 4.53334150702419189e-13, + -5.28040058647812176e-14, + -1.15561381014751656e-15, + 1.91097628373945554e-17, + 1.90050203664121760e-18, + 5.10517045916604929e-20, + -1.37546983030717439e-22, + 1.40988922808272465e+00, + -5.55469241789027096e-02, + 1.44547169961251184e-03, + -2.66887924617418093e-05, + 2.68485027258189728e-07, + 4.13087916913614626e-09, + -1.03469606517137639e-10, + 9.94723976713559871e-13, + -8.57721467670646677e-14, + -4.58032508119791301e-15, + 1.02594147741435773e-16, + 6.05506347833769114e-18, + 6.83122850510064582e-20, + -6.33798869500364915e-22, + 3.45585534028905883e+00, + -1.75561073618091784e-01, + 5.17448475911819108e-03, + -8.11103262608181406e-05, + -2.39460886944420494e-07, + 4.36131639464836387e-08, + -1.97555123401558599e-12, + -3.63816122922324491e-11, + -6.25563923793633293e-14, + 2.09870801014098643e-14, + -1.17934697155219903e-16, + -2.02879764483607362e-18, + 8.70386969939195068e-19, + 5.29581224007696431e-21, + 1.56600743624310095e+01, + -1.19383350817670664e+00, + 3.65099318563150491e-02, + -1.29078838066146048e-04, + -1.00859174031896253e-05, + -2.42634231892625281e-07, + 4.32315269075422504e-09, + 4.18139773959186807e-10, + 4.43437846749193388e-12, + -4.49817960056486136e-13, + -1.50993764962917908e-14, + 2.77468900021812548e-16, + 2.41383101698305164e-17, + 1.04091496633245908e-19, +# root=7 base[7]=17.5 */ + 8.69217839980277775e-03, + -2.29336224943236470e-04, + 4.47180072424110093e-06, + -7.76667253957053362e-08, + 1.48148560070629009e-09, + -1.07744601589885547e-11, + 2.86690933469298619e-13, + -2.44507261660564807e-14, + -5.96114221301503315e-16, + 1.20716682688259613e-17, + 1.49103229701910328e-18, + 2.80106467258582579e-20, + -1.23736914298633946e-21, + -8.70602364389087609e-23, + 8.16080354557188470e-02, + -2.21418238438990259e-03, + 4.41681256264619729e-05, + -7.74657533145485612e-07, + 1.46334231480553789e-08, + -1.00665902957431961e-10, + 2.39147488366297460e-12, + -2.31889102262159665e-13, + -5.94769304367730791e-15, + 1.32237730780279967e-16, + 1.45338014438280596e-17, + 2.65501590110066693e-19, + -1.25312183464938156e-20, + -8.52495327883245218e-22, + 2.48188805219888203e-01, + -7.14722067445379416e-03, + 1.49572184647876061e-04, + -2.67522248746559979e-06, + 4.93047092002117024e-08, + -2.86791294117569232e-10, + 4.52295097923278981e-12, + -7.08929961952746079e-13, + -2.04815523860415698e-14, + 5.36215055304211061e-16, + 4.80197404729037956e-17, + 8.06032138869836502e-19, + -4.44600757812638251e-20, + -2.83622045137447323e-21, + 5.67599310120667888e-01, + -1.80693577981209906e-02, + 4.09096285976979742e-04, + -7.52788651819748062e-06, + 1.31080843740285402e-07, + -4.13978407879361149e-10, + -7.45982731618375616e-12, + -1.55427776844186719e-12, + -5.52848733938836068e-14, + 1.77941571583736758e-15, + 1.28340165560611867e-16, + 1.66229802631200947e-18, + -1.29657934023230010e-19, + -7.51245416593787997e-21, + 1.20891102640222337e+00, + -4.51857636289756115e-02, + 1.15327902656643601e-03, + -2.18646909937542260e-05, + 3.26423719057488945e-07, + 1.56138224396801589e-09, + -1.29956333944668105e-10, + -3.03627949039068501e-12, + -1.07699635585013915e-13, + 5.18555123187273902e-15, + 3.62247107099071254e-16, + 1.96340627766981733e-18, + -4.16595209941452730e-19, + -1.93414007132816786e-20, + 2.83023176290635270e+00, + -1.38059055142441489e-01, + 4.20601174613494458e-03, + -7.83079190648550036e-05, + 5.51513681660458911e-07, + 3.17894669959854883e-08, + -9.39231191649845852e-10, + -2.67126798587206630e-11, + 6.83007739599062329e-13, + 2.40534892069591783e-14, + 3.47759796957510997e-16, + 4.39200182640400413e-18, + -1.42876080340155895e-18, + -7.97274486072890664e-20, + 1.14548007437488497e+01, + -9.11005223053970137e-01, + 3.38619437585126054e-02, + -3.19593829207334050e-04, + -1.29455309293154137e-05, + -5.22590225370072976e-10, + 1.49867170890919970e-08, + 2.27501625590959844e-10, + -1.68469231813859576e-11, + -5.14867332342145870e-13, + 1.64679560923842139e-14, + 8.50086821766100666e-16, + -1.28414717337028780e-17, + -1.20707470289929118e-18, +# root=7 base[8]=20.0 */ + 7.84102843814813398e-03, + -1.96902088243653046e-04, + 3.67541305157863617e-06, + -5.55751057315433898e-08, + 1.27151985054281941e-09, + -1.34213879838687232e-11, + -5.11718313765794748e-13, + -2.43796300772933801e-14, + 9.28789627043967911e-16, + 6.28611287806418659e-17, + -7.62502036198337192e-20, + -1.17457079949050235e-19, + -2.92240264535717951e-21, + 1.33772303774079190e-22, + 7.34045501208394208e-02, + -1.89418560854649211e-03, + 3.62139502103967829e-05, + -5.56006998529612886e-07, + 1.25912516044179708e-08, + -1.34009054970177103e-10, + -5.19884058923964123e-12, + -2.28230206308848969e-13, + 9.30286690282520456e-15, + 6.14641161802579071e-16, + -1.46646589848686701e-18, + -1.16225888828897268e-18, + -2.79052522735989566e-20, + 1.35574163822944751e-21, + 2.21808121232526884e-01, + -6.06607830378989507e-03, + 1.22011716771691094e-04, + -1.93405156893708854e-06, + 4.27903903040382015e-08, + -4.58708681978320075e-10, + -1.88353291503157792e-11, + -6.74793413990283757e-13, + 3.23668701068256005e-14, + 2.03088262942390385e-15, + -1.02165119423532481e-17, + -3.94979524584921881e-18, + -8.70647363230892188e-20, + 4.84979687576590760e-21, + 5.01344623338169870e-01, + -1.51230488553965384e-02, + 3.30993961726206180e-04, + -5.52383487803048307e-06, + 1.16836112171491995e-07, + -1.21986260124447417e-09, + -5.90083434810216997e-11, + -1.33053003883880617e-12, + 9.22199899270815593e-14, + 5.25248050577613541e-15, + -5.25184302603678252e-17, + -1.08553391732116486e-17, + -1.98976731076932172e-19, + 1.45446735044709790e-20, + 1.04508561216225759e+00, + -3.69191383414119376e-02, + 9.22631908807632593e-04, + -1.65942965931996706e-05, + 3.18647953007255576e-07, + -2.69910463214431567e-09, + -2.16574260603328464e-10, + -1.01984690244646660e-12, + 2.83166016327287565e-13, + 1.24728511918685312e-14, + -2.55721516791186896e-16, + -3.05906969734367684e-17, + -3.43588113340033790e-19, + 4.76590672987778004e-20, + 2.33960451220022936e+00, + -1.07980410597510637e-01, + 3.33571194264257759e-03, + -6.58209431574862232e-05, + 9.17756727094232805e-07, + 3.61783236889170549e-09, + -1.23780223731524579e-09, + 1.03678263727257527e-11, + 1.58047800327489428e-12, + 1.17820899459537610e-14, + -1.73272989496477526e-15, + -8.81009233988216180e-17, + 3.35672641171093650e-19, + 2.17319336772807283e-19, + 8.32347674917456359e+00, + -6.58839477428159070e-01, + 2.88499202010778603e-02, + -5.06355821682617020e-04, + -9.20922796307826390e-06, + 3.63590362026551920e-07, + 1.22645876689804063e-08, + -4.26707975578811510e-10, + -1.75506339010793424e-11, + 5.31935278833142591e-13, + 2.42743309252664449e-14, + -6.49938606329240014e-16, + -3.07704173448582178e-17, + 8.01384799917007705e-19, +# root=7 base[9]=22.5 */ + 7.10845788020472626e-03, + -1.69846091724747724e-04, + 3.11912329041732711e-06, + -3.81927598086252665e-08, + 8.50256215750296358e-10, + -2.87407200404136451e-11, + -5.06594427504207005e-13, + 2.98998593055043945e-14, + 1.79853717262005748e-15, + -4.46930262054017881e-17, + -4.16012655315595543e-18, + 3.73843894609709595e-20, + 8.85699232520988556e-21, + 4.25903549772689894e-23, + 6.63694761158902108e-02, + -1.62799275093576386e-03, + 3.06362637235387374e-05, + -3.84098746086716119e-07, + 8.39616421976401392e-09, + -2.84489481184934859e-10, + -4.80767660302167586e-12, + 3.03745214008228548e-13, + 1.72881974667407636e-14, + -4.60748773739704543e-16, + -4.06102905450949774e-17, + 4.18718100784662752e-19, + 8.74371714198489178e-20, + 3.24058406443265618e-22, + 1.99364293288804006e-01, + -5.17205748656222788e-03, + 1.02517880139458257e-04, + -1.35091253149460825e-06, + 2.84174347145381627e-08, + -9.64756494601019032e-10, + -1.49094231417075805e-11, + 1.09120172893677187e-12, + 5.48529389071818391e-14, + -1.70077083040643975e-15, + -1.33624350240676725e-16, + 1.78911571782124586e-18, + 2.95156292335790214e-19, + 3.47237118304700767e-22, + 4.45770270864705442e-01, + -1.27108476353965175e-02, + 2.74853914101624830e-04, + -3.93134604790212886e-06, + 7.75932571988931873e-08, + -2.61355610757780678e-09, + -3.50136765211276371e-11, + 3.28941262152127509e-12, + 1.30724871172885176e-13, + -5.30683915113283919e-15, + -3.43090470837035885e-16, + 6.71698866443719595e-18, + 7.96276405381338056e-19, + -2.99456993938608404e-21, + 9.11024691050667745e-01, + -3.02538329993409551e-02, + 7.51421370107797112e-04, + -1.21973814570911038e-05, + 2.16961940454271553e-07, + -6.93538450654558760e-09, + -7.95775602712885111e-11, + 1.07864643318410253e-11, + 2.63111318108702866e-13, + -1.80140874037115114e-14, + -8.20081752452343321e-16, + 2.79135336625725414e-17, + 2.12094561642672929e-18, + -3.04500783162963538e-20, + 1.95639942204392714e+00, + -8.42085710757460998e-02, + 2.63164074619184939e-03, + -5.19715351033105599e-05, + 7.45492668221621066e-07, + -1.71335510190924061e-08, + -3.05844251759792178e-10, + 4.88471973962789303e-11, + 1.85575252292524845e-13, + -8.78441682484121114e-14, + -1.27240811707426010e-15, + 1.60480396451391973e-16, + 5.34001196343970864e-18, + -2.87204426292917551e-19, + 6.10852870108835244e+00, + -4.54217395225770815e-01, + 2.21680934327700870e-02, + -5.84461201803526567e-04, + -1.95770326361850546e-07, + 4.73739453402195311e-07, + -3.75075658931761186e-09, + -5.68908189375210067e-10, + 9.61456068165169350e-12, + 6.88822991184062817e-13, + -1.73081040150124946e-14, + -7.75852610328512741e-16, + 2.46312983172006405e-17, + 7.59148622065467687e-19, +# root=7 base[10]=25.0 */ + 6.47634250778982967e-03, + -1.46541274309619431e-04, + 2.72232393470467251e-06, + -2.94749265808076006e-08, + 2.45430970370007016e-10, + -2.67748666549693633e-11, + 7.17973616830978428e-13, + 3.94986246314289099e-14, + -1.44136117588901173e-15, + -8.14007667110486950e-17, + 3.33843298225733992e-18, + 1.58337053436392445e-19, + -7.42020810389630477e-21, + -3.07141463041278269e-22, + 6.03211183312351018e-02, + -1.39951083302015207e-03, + 2.66350267858767342e-05, + -2.97821952387082135e-07, + 2.46526163188016773e-09, + -2.59676959291147966e-10, + 7.25305066837718334e-12, + 3.79352738024549395e-13, + -1.46791205736193184e-14, + -7.79129259835386952e-16, + 3.39163369728055310e-17, + 1.51450391025373717e-18, + -7.54931491298862487e-20, + -2.93479352631263907e-21, + 1.80222575970342719e-01, + -4.41055885158518103e-03, + 8.83700582625787174e-05, + -1.05710765547963424e-06, + 8.69425462542360463e-09, + -8.43043519320619897e-10, + 2.56419022557597742e-11, + 1.20358951596464907e-12, + -5.28689299060412986e-14, + -2.44536135858412810e-15, + 1.21551729419485155e-16, + 4.73843246279376798e-18, + -2.71495437910359552e-19, + -9.13847635989742516e-21, + 3.99050164006162389e-01, + -1.06837050012302502e-02, + 2.33353445276901831e-04, + -3.11686379495974119e-06, + 2.58065675874558807e-08, + -2.12199831071232744e-09, + 7.42078669782299226e-11, + 2.89263330628690289e-12, + -1.58653119843210857e-13, + -5.67696135175700821e-15, + 3.61761909035293555e-16, + 1.08489868180405147e-17, + -8.13183462754893206e-19, + -2.04933008641925292e-20, + 8.01174332968061287e-01, + -2.47795910442900856e-02, + 6.21269424942191384e-04, + -9.82885867996249006e-06, + 8.54397307900346471e-08, + -5.00932616559425388e-09, + 2.18331128737078454e-10, + 6.18561415994379574e-12, + -5.04124875904305979e-13, + -1.04367976284390367e-14, + 1.13102887225278614e-15, + 1.83049159575344313e-17, + -2.56180146953184043e-18, + -3.01628749067904914e-20, + 1.65797294142712537e+00, + -6.54737134063955450e-02, + 2.06816637492212956e-03, + -4.27445775174077120e-05, + 4.31230817157506441e-07, + -1.02785642897960131e-08, + 6.89597051083995240e-10, + 9.82472029486416072e-12, + -2.02695910602910538e-12, + 6.15716457365773977e-15, + 4.33807089158675401e-15, + -4.25016318815720395e-17, + -9.49725177255702265e-18, + 1.48227338146215671e-19, + 4.60273496332054677e+00, + -3.04315228881306021e-01, + 1.54198233468626090e-02, + -5.21240363049381319e-04, + 7.34402735636713800e-06, + 2.44263384016363179e-07, + -1.28642598273003305e-08, + -4.01332133609143024e-11, + 1.75417530882837902e-11, + -2.60546711038266396e-13, + -1.93728682866944108e-14, + 6.28548586749044636e-16, + 1.80024226506859371e-17, + -9.80538284576540295e-19, +# root=7 base[11]=27.5 */ + 5.93154447017608683e-03, + -1.26143938797206587e-04, + 2.37829525081565767e-06, + -2.86373633916047160e-08, + -6.25465187113479907e-11, + -3.06846406355145153e-12, + 9.64025783962545222e-13, + -2.15334497668370840e-14, + -1.41857599001191022e-15, + 6.88601483385687287e-17, + 1.57446496530331503e-18, + -1.68160806497080262e-19, + 2.40605645708019972e-24, + 3.36111010277968394e-22, + 5.51271209110663143e-02, + -1.20037555463982869e-03, + 2.31641409113901787e-05, + -2.88035023947255661e-07, + -4.70933001871301719e-10, + -2.59102700944824873e-11, + 9.33994438179533840e-12, + -2.21196574246494047e-13, + -1.35152182429497433e-14, + 6.91639025640651505e-16, + 1.43063729442691792e-17, + -1.66665639965454689e-18, + 2.74735512759684267e-21, + 3.29315886794512730e-21, + 1.63915893937444435e-01, + -3.75299845416765662e-03, + 7.60928320726008323e-05, + -1.01209451060334560e-06, + -4.75102412863640785e-10, + -5.68516213758804490e-11, + 3.02089005770721078e-11, + -8.07868857152665908e-13, + -4.19896868258520060e-14, + 2.41819074262346208e-15, + 3.90210560571571382e-17, + -5.66103403360706665e-18, + 2.97001415977005445e-20, + 1.08891663724936236e-20, + 3.59818677448193291e-01, + -8.96197458395422281e-03, + 1.97388727995754203e-04, + -2.93083973960645760e-06, + 4.36939856902521507e-09, + -2.21719867755687643e-11, + 7.51326658580527737e-11, + -2.45190071002472310e-12, + -9.58058247223115691e-14, + 6.89111887284240473e-15, + 5.97215878912924352e-17, + -1.53194918269111355e-17, + 1.80477545815829151e-19, + 2.78853685787260624e-20, + 7.11274577501233130e-01, + -2.02635924378861826e-02, + 5.09219953967622119e-04, + -8.95385606931189165e-06, + 4.19350220762689824e-08, + 4.50944309262009635e-10, + 1.70283702599406489e-10, + -7.70221751758099897e-12, + -1.72650019378527829e-13, + 1.99429578925322914e-14, + -6.74196602252993215e-17, + -4.01190064908846610e-17, + 9.79089543037824873e-19, + 6.37192497078614880e-20, + 1.42607249209390075e+00, + -5.08726386494135277e-02, + 1.59272332159282495e-03, + -3.66157205385668282e-05, + 3.80146823979579775e-07, + 3.43545345248351965e-09, + 2.76807990312559747e-10, + -2.75817186825469255e-11, + 4.02927217440361565e-14, + 6.41377188498697155e-14, + -1.76394107208833849e-15, + -9.43235285363489336e-17, + 6.04873051387428199e-18, + 6.01698814675044404e-20, + 3.59575187998393186e+00, + -2.03714085906676529e-01, + 9.97821819947754783e-03, + -3.80821312360772981e-04, + 9.32724784335205511e-06, + -2.70402314571140654e-08, + -8.25135113487765527e-09, + 2.83026875061798292e-10, + 1.78687400803221387e-12, + -4.17195598012840209e-13, + 9.04373307551412054e-15, + 3.33255660695501148e-16, + -2.07367755681417874e-17, + -2.02019637911938561e-21, +# root=7 base[12]=30.0 */ + 5.46282355911997461e-03, + -1.08506964698986067e-04, + 2.02997455698390931e-06, + -2.91383178356922723e-08, + 4.23328807494507986e-11, + 1.01004162441067297e-11, + 1.09831272700845443e-13, + -2.76147779326092503e-14, + 7.46927645173049775e-16, + 2.60270658686800912e-17, + -2.17690961181580705e-18, + 2.07559704632411788e-20, + 3.30955894131949926e-21, + -1.41126608363521177e-22, + 5.06742054518306423e-02, + -1.02898941367788612e-03, + 1.96776633195954228e-05, + -2.90214071080435784e-07, + 5.99692472038446584e-10, + 9.87946238846671079e-11, + 8.87355128920154003e-13, + -2.67014574066213362e-13, + 7.59496787320274769e-15, + 2.39827479575012236e-16, + -2.14266905009323899e-17, + 2.36687349080298977e-19, + 3.16131674182764734e-20, + -1.42458893009977497e-21, + 1.50044436789751323e-01, + -3.19284166327352603e-03, + 6.39668740101920506e-05, + -9.98773656723427140e-07, + 3.36666983449379163e-09, + 3.25431649652384834e-10, + 1.58418129945036652e-12, + -8.59119781169687602e-13, + 2.71801767766991855e-14, + 6.83293997103476084e-16, + -7.16644919542126244e-17, + 1.02961501621631828e-18, + 9.85117592862351928e-20, + -5.02029570059818159e-21, + 3.26908530512495299e-01, + -7.52188490654700712e-03, + 1.62868358000869495e-04, + -2.79320775060394609e-06, + 1.55484639268851784e-08, + 8.28882293370124482e-10, + -2.09938370070047941e-12, + -2.11014250101458707e-12, + 7.99378899765753996e-14, + 1.24304729876538915e-15, + -1.88572549220359335e-16, + 3.84132126631457081e-18, + 2.23373739065616480e-19, + -1.43657159644965479e-20, + 6.37705591875584288e-01, + -1.66064657355839140e-02, + 4.06606075106750791e-04, + -8.06548786470920727e-06, + 7.36554783780184763e-08, + 1.90445687654556267e-09, + -3.32047420779284235e-11, + -4.62095824854875517e-12, + 2.39506953087041189e-13, + 5.16298314080627911e-16, + -4.69669285380255735e-16, + 1.49659027027765703e-17, + 3.72447873645627435e-19, + -4.06336963159656284e-20, + 1.24543704494055718e+00, + -3.97786552382204325e-02, + 1.19260233910637955e-03, + -2.98611306398064179e-05, + 4.60389661352145527e-07, + 2.49450908109343758e-09, + -2.50265458674357657e-10, + -6.26042679084420476e-12, + 7.90340934959318362e-13, + -1.55866702611232682e-14, + -1.00377725842197883e-15, + 6.74956116396046218e-17, + -5.60136913391254970e-19, + -1.08402087288895062e-19, + 2.91506027317021266e+00, + -1.39728441522230212e-01, + 6.25838846611611373e-03, + -2.44010526720396889e-04, + 7.43301058088584365e-06, + -1.34490472432284879e-07, + -1.20022771374119712e-09, + 1.82391551763315212e-10, + -5.55016006676046674e-12, + -8.55116523874355337e-15, + 7.10031400727597540e-15, + -2.43748708251509330e-16, + -6.43311773470786710e-19, + 3.49897294984932516e-19, +# root=7 base[13]=32.5 */ + 5.05909711970631368e-03, + -9.36390955945031410e-05, + 1.69092097983150531e-06, + -2.69102124288849474e-08, + 2.23766174878200358e-10, + 6.50408873930105137e-12, + -2.88159391335033488e-13, + -1.98914347068758771e-15, + 5.76910448179099449e-16, + -2.05893609214396980e-17, + -9.03382973166732472e-20, + 3.63294081715906735e-20, + -1.29617761984118316e-21, + -6.07236165330717311e-24, + 4.68514591063784180e-02, + -8.85187999863365016e-04, + 1.63159791485697791e-05, + -2.65652129053567257e-07, + 2.33986000982899826e-09, + 6.07455558103649062e-11, + -2.86374798861445810e-12, + -1.45554025922648979e-14, + 5.53730475706946397e-15, + -2.05536351062325503e-16, + -5.35020299701916111e-19, + 3.48524225146450085e-19, + -1.30102788262510628e-20, + -3.41731429124614300e-23, + 1.38222554802422931e-01, + -2.72765693634936844e-03, + 5.25084654553636908e-05, + -8.97061253409312690e-07, + 8.84950767382785825e-09, + 1.79225130302286567e-10, + -9.77307054914942810e-12, + -1.26469750588557008e-14, + 1.75104483227075575e-14, + -7.08263617300751519e-16, + 7.70419262791505438e-19, + 1.09927715072890700e-18, + -4.52942173596740188e-20, + 7.22109395179690396e-23, + 2.99222114231236291e-01, + -6.34761883848734831e-03, + 1.31338616262025319e-04, + -2.42933868973836776e-06, + 2.83488770214787191e-08, + 3.58076143146374129e-10, + -2.66018316751575122e-11, + 1.31169693908758659e-13, + 4.15122493679887535e-14, + -1.96055191875771637e-15, + 1.38417814891572074e-17, + 2.57866047230144042e-18, + -1.26993076054980415e-19, + 1.06066795135005198e-21, + 5.77204001177176740e-01, + -1.37182703152878161e-02, + 3.17923560694202559e-04, + -6.65477983576448283e-06, + 9.74812389984999225e-08, + 3.42425957354053555e-10, + -7.04397513568048447e-11, + 1.06901374578235111e-12, + 8.35330518868695124e-14, + -5.34241919820950257e-15, + 8.81875226614479515e-17, + 4.95547297765486508e-18, + -3.48604548530331575e-19, + 6.62249655070753407e-21, + 1.10331358771208254e+00, + -3.15443890030042556e-02, + 8.78998347978632972e-04, + -2.24386315270146370e-05, + 4.47993353983441003e-07, + -3.42620856691360957e-09, + -1.82130941383909582e-10, + 7.11847426214522645e-12, + 6.36047698718595940e-14, + -1.47103334579616161e-14, + 5.23281047385759534e-16, + 1.50926048063581803e-18, + -9.19053874030558866e-19, + 3.79336767974011975e-20, + 2.44031667733377633e+00, + -9.95594647433050012e-02, + 3.95389613201278453e-03, + -1.46779041331935364e-04, + 4.76939855626339154e-06, + -1.20905887626595109e-07, + 1.64928606968927402e-09, + 3.51006987187852844e-11, + -3.08046271968515367e-12, + 9.37690176886374851e-14, + -6.36130705798720006e-16, + -7.64500504142976736e-17, + 3.87897003389172932e-18, + -7.20330218406518302e-20, +# root=7 base[14]=35.0 */ + 4.70964621386584566e-03, + -8.13350800769468025e-05, + 1.39257539302928257e-06, + -2.26549981994811223e-08, + 2.88154511475064826e-10, + 3.54027868529491934e-13, + -1.88860263457033646e-13, + 6.00481492712179498e-15, + 1.68920555404198544e-18, + -8.50748767203120198e-18, + 3.83845295695046705e-19, + -5.56930302957823172e-21, + -2.72724598702222692e-22, + 1.94835899426460747e-23, + 4.35525634462913327e-02, + -7.66706476025795307e-04, + 1.33810791061889704e-05, + -2.22092168378478728e-07, + 2.91021318682009601e-09, + 7.11513911714144492e-13, + -1.80990970364322950e-12, + 5.98471419977706054e-14, + -7.53402729057647028e-17, + -8.06243588045900579e-17, + 3.76868562409850851e-18, + -5.89293667087338743e-20, + -2.48495118070253695e-21, + 1.88798614041535889e-22, + 1.28087542533732945e-01, + -2.34804843530350910e-03, + 4.26720764533914090e-05, + -7.38803955209289213e-07, + 1.02934287752493756e-08, + -1.79259336458409777e-11, + -5.69916355137136585e-12, + 2.05541370362902289e-13, + -9.11091646875658875e-16, + -2.47394340791756538e-16, + 1.25352393416100508e-17, + -2.26439695843509839e-19, + -6.87392677100857010e-21, + 6.09167115358340152e-22, + 2.75759764110978634e-01, + -5.40547389575251301e-03, + 1.05040235075590284e-04, + -1.94997011673496158e-06, + 2.99488533088981939e-08, + -1.43871000794311866e-10, + -1.33623696784888975e-11, + 5.66133224935267034e-13, + -5.40029467076082319e-15, + -5.50480671748528834e-16, + 3.26678011980278877e-17, + -7.28192054717587715e-19, + -1.15104258997901259e-20, + 1.49403903306066300e-21, + 5.26949380551561486e-01, + -1.14678070710683717e-02, + 2.47389371541366235e-04, + -5.11851852785311906e-06, + 9.07647535965975547e-08, + -8.34293051181153180e-10, + -2.58714255130422108e-11, + 1.53607074734050181e-12, + -2.69838239873713104e-14, + -9.34514266777771310e-16, + 8.02749061324638050e-17, + -2.39683846503853431e-18, + 4.75570003832931464e-22, + 3.19855550410300719e-21, + 9.89658298560506799e-01, + -2.54740174845464358e-02, + 6.49895740724706775e-04, + -1.59894203829309826e-05, + 3.51519574999562726e-07, + -5.52773765621731019e-09, + -7.07191072939986326e-12, + 4.33079499667214700e-12, + -1.46129731678287253e-13, + 5.08025393123570323e-16, + 1.74650626229782776e-16, + -8.72189413989041419e-18, + 1.69309726304448347e-19, + 3.76584967145580907e-21, + 2.09579391148219685e+00, + -7.38452415186828387e-02, + 2.57809110294332251e-03, + -8.74918969201838415e-05, + 2.78137559596700441e-06, + -7.78354389250629285e-08, + 1.70001475650041649e-09, + -1.82605317952929935e-11, + -5.79973436368852491e-13, + 4.15762584380472375e-14, + -1.29948204532943126e-15, + 1.80727963771253067e-17, + 4.44476802975207032e-19, + -3.67868687269763039e-20, +# root=7 base[15]=37.5 */ + 4.40497500046442732e-03, + -7.12043261750036508e-05, + 1.14796460107006919e-06, + -1.81795755846025243e-08, + 2.62698227589897313e-10, + -2.34629387978231029e-12, + -4.82784163679571815e-14, + 3.52871599854554107e-15, + -1.02111497271466735e-16, + 6.95517716913083980e-19, + 8.71499695927636835e-20, + -4.90504170684764348e-21, + 1.26927535067176155e-22, + -2.41724800845126769e-25, + 4.06840587537429590e-02, + -6.69538223823805531e-04, + 1.09896665172496473e-05, + -1.77235480258082051e-07, + 2.61632690943647813e-09, + -2.46791272771380326e-11, + -4.31599087193933810e-13, + 3.40397832544063866e-14, + -1.01474795666542278e-15, + 8.08746031146406899e-18, + 8.09048102226556520e-19, + -4.74519308899516176e-20, + 1.26998835174270854e-21, + -4.37280986725461539e-24, + 1.19325820084347820e-01, + -2.03940093135804475e-03, + 3.47637282094574824e-05, + -5.82587112014917928e-07, + 8.99221137726111592e-09, + -9.42436969496543474e-11, + -1.12687233954403353e-12, + 1.08906061279553722e-13, + -3.46505983686988549e-15, + 3.59313306326241310e-17, + 2.35882224915195954e-18, + -1.52788549825914530e-19, + 4.39187792368986052e-21, + -2.87621164068934642e-23, + 2.55681414247559136e-01, + -4.65091163041541581e-03, + 8.43778093710871553e-05, + -1.50635280093638431e-06, + 2.49974954398388393e-08, + -3.04772135197116697e-10, + -1.48477989454605330e-12, + 2.64404172285056815e-13, + -9.46339316456007471e-15, + 1.34924105825198877e-16, + 4.65165182712043620e-18, + -3.75515527364398176e-19, + 1.21862589184719736e-20, + -1.38516761751694915e-22, + 4.84680359513096071e-01, + -9.71111563665036544e-03, + 1.94055877915606204e-04, + -3.82085724183615654e-06, + 7.07823319609837613e-08, + -1.05043463423503095e-09, + 3.29122033955388904e-12, + 5.64522915234298695e-13, + -2.54120865227225725e-14, + 5.18316730476115132e-16, + 4.89235561330324790e-18, + -8.25511682485758607e-19, + 3.30984374715991496e-20, + -6.12401200578745956e-22, + 8.97069400758054525e-01, + -2.09550245635949789e-02, + 4.88181346414272776e-04, + -1.12264833276777333e-05, + 2.46554533577904984e-07, + -4.72138334609444142e-09, + 5.74897944145813501e-11, + 6.97543577607987096e-13, + -7.14711692604428648e-14, + 2.32472285437234589e-15, + -2.79348396907256546e-17, + -1.27477688438614002e-18, + 9.04794388649590398e-20, + -2.83002370068998996e-21, + 1.83594205328642590e+00, + -5.67684615670327047e-02, + 1.75047622268461483e-03, + -5.34237870514641289e-05, + 1.58511488593189524e-06, + -4.42012791514337740e-08, + 1.09229213400506143e-09, + -2.11856349540847783e-11, + 1.93139902628324786e-13, + 7.06116829968500057e-15, + -4.61539554280856041e-16, + 1.46974576478119822e-17, + -2.72235007459456432e-19, + 2.43514269676783310e-24, +# root=7 base[16]=40.0 */ + 4.06596993513669899e-03, + -9.70563152826895911e-05, + 2.31560345473913910e-06, + -5.50282015577823290e-08, + 1.27801643707287702e-09, + -2.65892145019500211e-11, + 2.94738824135652646e-13, + 1.62529409070928417e-14, + -1.61086279487368582e-15, + 8.21293301863306100e-17, + -2.38122329517466738e-18, + -1.90148501308580055e-20, + 7.17039513766326524e-21, + -4.83000689992580969e-22, + 3.75011653090001826e-02, + -9.10101503938209053e-04, + 2.20757485567755872e-05, + -5.33392871324919641e-07, + 1.26041443324234679e-08, + -2.68250817165620045e-10, + 3.23528388192746975e-12, + 1.46667534052874378e-13, + -1.54548255142376885e-14, + 8.05502809222954220e-16, + -2.41791167557267467e-17, + -1.20793661567086235e-19, + 6.72933464950193260e-20, + -4.67132613053613498e-21, + 1.09662236863346724e-01, + -2.75559796683078799e-03, + 6.92077426801449523e-05, + -1.73161672087469339e-06, + 4.24318383871477446e-08, + -9.46282864517967536e-10, + 1.32789577160041912e-11, + 3.94171785806062391e-13, + -4.88493182433525431e-14, + 2.67588795473121079e-15, + -8.62096098628604842e-17, + 6.68335858568412002e-20, + 2.01854286294476805e-19, + -1.50342838772923617e-20, + 2.33766414048815430e-01, + -6.21959098705807383e-03, + 1.65394403160025732e-04, + -4.38247768036424990e-06, + 1.13965806859749970e-07, + -2.73727790230019576e-09, + 4.67495952199955782e-11, + 5.89446431164709659e-13, + -1.15935915581233365e-13, + 6.98502383402212186e-15, + -2.51626951541992590e-16, + 2.27913572106999920e-18, + 4.28751713912185178e-19, + -3.69513143773253428e-20, + 4.39345863034238893e-01, + -1.27647194788207997e-02, + 3.70675560537263196e-04, + -1.07283612572135879e-05, + 3.05596576131165120e-07, + -8.18609379489284605e-09, + 1.75531737453444387e-10, + -6.17486623177082447e-13, + -2.36026672225130450e-13, + 1.74491315444937991e-14, + -7.45460338007849942e-16, + 1.48307254274929914e-17, + 6.42734070121741691e-19, + -8.16283079370905526e-20, + 8.00843538474321326e-01, + -2.67138556965877023e-02, + 8.90637698019740537e-04, + -2.96064132906327155e-05, + 9.72038224628564228e-07, + -3.06170824316928183e-08, + 8.53762505203853749e-10, + -1.59282514568464355e-11, + -2.24087787775893833e-13, + 4.26160338847644549e-14, + -2.51483519917167764e-15, + 8.84739454234643827e-17, + -8.43925037838967791e-19, + -1.35411947379145969e-19, + 1.58452651944964451e+00, + -6.76251328721455963e-02, + 2.88461077798375046e-03, + -1.22751394228530074e-04, + 5.18180647386678762e-06, + -2.14159923346522124e-07, + 8.44786729328877564e-09, + -3.03989852366947395e-10, + 9.12379328545256251e-12, + -1.71449733492663560e-13, + -2.73813092013679402e-15, + 4.71846430138906392e-16, + -2.75832054956292662e-17, + 1.06861143886924292e-18, +# root=7 base[17]=44.0 */ + 3.71105335481095944e-03, + -8.08626946555638916e-05, + 1.76188484848111335e-06, + -3.83712264686343842e-08, + 8.33010845937807894e-10, + -1.77741223077508329e-11, + 3.50079196072613702e-13, + -4.60191783118164820e-15, + -1.03826585204441305e-16, + 1.36030567721693384e-17, + -7.99556728720695956e-19, + 3.34963961084338274e-20, + -9.30533142564482150e-22, + 3.64495041506158584e-24, + 3.41777751176296218e-02, + -7.56046531322649633e-04, + 1.67236683086791073e-05, + -3.69756799096993457e-07, + 8.14997400569542820e-09, + -1.76687621030309658e-10, + 3.55267141823400839e-12, + -4.95914570268146155e-14, + -8.63908218431470387e-16, + 1.28466726561047700e-16, + -7.72155794235103833e-18, + 3.28592709475654231e-19, + -9.37910790492690859e-21, + 5.50310841848563081e-23, + 9.96301163990636757e-02, + -2.27482901193894237e-03, + 5.19379883635065579e-05, + -1.18530124297250813e-06, + 2.69715078515175565e-08, + -6.04523457466826173e-10, + 1.26802016916558917e-11, + -1.97618757946222031e-13, + -1.73861484096385469e-15, + 3.91041422498323010e-16, + -2.48000735028591163e-17, + 1.09257642340665298e-18, + -3.29587159934668670e-20, + 3.19150518262568834e-22, + 2.11240075913317754e-01, + -5.07955493761827904e-03, + 1.22138671286089854e-04, + -2.93559961102727729e-06, + 7.03704153820860514e-08, + -1.66500015165223866e-09, + 3.73246287818373659e-11, + -6.73751149893230581e-13, + 8.31498727821217391e-16, + 8.55577060639443873e-16, + -6.09545014631521888e-17, + 2.86118156105774125e-18, + -9.41759564798927944e-20, + 1.43794220143400951e-21, + 3.93505170184707431e-01, + -1.02421809631741186e-02, + 2.66570769625940605e-04, + -6.93523816602547013e-06, + 1.80018542535551217e-07, + -4.62424069993471928e-09, + 1.14171988618000777e-10, + -2.45465274474389630e-12, + 2.77989035502705500e-14, + 1.37804053388368166e-15, + -1.36071227273127189e-16, + 7.22917085649310071e-18, + -2.71437431374163018e-19, + 6.16976677433017887e-21, + 7.06308314406955406e-01, + -2.07855385084598256e-02, + 6.11654455079807383e-04, + -1.79927491449241545e-05, + 5.28319699982894996e-07, + -1.53985762467079990e-08, + 4.37832415218254429e-10, + -1.15757299601954089e-11, + 2.46681112617787865e-13, + -1.57729009664512408e-15, + -2.39971787223708229e-16, + 1.86778878440951062e-17, + -8.88466970500264166e-19, + 2.96162717409840576e-20, + 1.35248649313449243e+00, + -4.92970324433114823e-02, + 1.79674376628615080e-03, + -6.54672551211916710e-05, + 2.38245267254120610e-06, + -8.63449452329576010e-08, + 3.09446788497869840e-09, + -1.08070028774404071e-10, + 3.57958766768592480e-12, + -1.06986502807704728e-13, + 2.57982844487205212e-15, + -3.06116750500111376e-17, + -1.44034540020510254e-18, + 1.34210313474022433e-19, +# root=7 base[18]=48.0 */ + 3.41316423296822305e-03, + -6.84071366940053419e-05, + 1.37102020261235452e-06, + -2.74768706538771290e-08, + 5.50476869714356916e-10, + -1.10041526537966480e-11, + 2.17487240784065396e-13, + -4.08464133445884911e-15, + 6.09731569525515536e-17, + 1.40789477570740120e-19, + -7.90202352556410995e-20, + 5.20378242271789843e-21, + -2.46526200545920207e-22, + 9.21401366400508957e-24, + 3.13958766243043544e-02, + -6.38029618330562993e-04, + 1.29660376924315980e-05, + -2.63484416981582919e-07, + 5.35247818870507037e-09, + -1.08501981805655163e-10, + 2.17588819913102344e-12, + -4.16064826918141839e-14, + 6.46231573147136585e-16, + -1.06085280406424359e-19, + -7.28032535108197599e-19, + 4.96033923464276887e-20, + -2.38277059385202201e-21, + 9.01358438909373471e-23, + 9.12809947406236499e-02, + -1.90970414732277586e-03, + 3.99530583659473852e-05, + -8.35825622359906829e-07, + 1.74800041209217912e-08, + -3.64857372146761980e-10, + 7.54249266661644294e-12, + -1.49626867033071830e-13, + 2.50473234472191820e-15, + -1.13330898983419592e-17, + -2.07742721731290205e-18, + 1.54604944306316929e-19, + -7.67281946906453035e-21, + 2.98025450841386624e-22, + 1.92677015697917176e-01, + -4.22645893471693644e-03, + 9.27089373866229208e-05, + -2.03352279036822467e-06, + 4.45911438810134487e-08, + -9.76136050197224967e-10, + 2.11970836837435084e-11, + -4.45517364592557323e-13, + 8.27428230403756643e-15, + -8.24215217844974158e-17, + -3.82758026032940668e-18, + 3.57951701351825335e-19, + -1.89984258162339125e-20, + 7.74006369743658604e-22, + 3.56335447807879235e-01, + -8.39971026226794121e-03, + 1.98001182687313794e-04, + -4.66718342201482665e-06, + 1.09984184097011021e-07, + -2.58823658694788475e-09, + 6.05367668748524393e-11, + -1.38370500395168242e-12, + 2.92489072976030173e-14, + -4.64050882166926809e-16, + -2.07710404370629908e-18, + 6.94620698689096150e-19, + -4.34301234955945738e-20, + 1.93716007734358153e-21, + 6.31761277500301199e-01, + -1.66324339760435917e-02, + 4.37881706221737493e-04, + -1.15277079099042716e-05, + 3.03415812572608409e-07, + -7.97797732489042521e-09, + 2.08927604844884897e-10, + -5.39774606971196506e-12, + 1.33979686977828124e-13, + -2.97215015902060272e-15, + 4.53585209116129010e-17, + 4.93733148031927660e-19, + -8.72673557748756046e-20, + 5.01471536117588865e-21, + 1.17984033827553714e+00, + -3.75268120352522036e-02, + 1.19359851194043311e-03, + -3.79631580924579096e-05, + 1.20726389819170979e-06, + -3.83691165376877616e-08, + 1.21701309283138654e-09, + -3.83867286406380728e-11, + 1.19453809582051869e-12, + -3.61122942192960937e-14, + 1.03111133850202873e-15, + -2.63418953662415167e-17, + 5.26034262239194345e-19, + -3.59225893238209518e-21, +# root=7 base[19]=52.0 */ + 3.15957520256693455e-03, + -5.86231961203797808e-05, + 1.08770258654094281e-06, + -2.01813078293088448e-08, + 3.74433492541160368e-10, + -6.94546475263840574e-12, + 1.28660303771949804e-13, + -2.36739919276831400e-15, + 4.22995375033887877e-17, + -6.68730422760796431e-19, + 5.14578722137549844e-21, + 3.03668658674366441e-22, + -2.48876965136700296e-23, + 1.26830699266370850e-24, + 2.90330488734724633e-02, + -5.45640983768977644e-04, + 1.02546583209992853e-05, + -1.92723156678806362e-07, + 3.62187264351287662e-09, + -6.80514312508216271e-11, + 1.27698569707237207e-12, + -2.38118689078337039e-14, + 4.32087485227281620e-16, + -7.01717207946905999e-18, + 6.27563698256350079e-20, + 2.62694473169281947e-21, + -2.33405483524481126e-22, + 1.21194908281499114e-23, + 8.42239581104040902e-02, + -1.62594187097571266e-03, + 3.13887669739580565e-05, + -6.05957309478054530e-07, + 1.16976073129938929e-08, + -2.25768794858983873e-10, + 4.35240981504566482e-12, + -8.34423757750400911e-14, + 1.56295139792292098e-15, + -2.67369670073732158e-17, + 3.00197771765979061e-19, + 6.14461390262669424e-21, + -6.98798675737574145e-22, + 3.80282218561064777e-23, + 1.77115345025377485e-01, + -3.57159089534931761e-03, + 7.20223184749655521e-05, + -1.45234929493146110e-06, + 2.92862192361256992e-08, + -5.90442693598742281e-10, + 1.18923642305245673e-11, + -2.38454142462624116e-13, + 4.69591463255350111e-15, + -8.65794962342457680e-17, + 1.23290947377111117e-18, + 3.69428113481486530e-21, + -1.47390065416140384e-21, + 8.95654011198158094e-23, + 3.25587541550283743e-01, + -7.01328951114703423e-03, + 1.51069095198088710e-04, + -3.25407952711984612e-06, + 7.00923023946049497e-08, + -1.50955192956584633e-09, + 3.24859944342007359e-11, + -6.96817966716766015e-13, + 1.47642490175824129e-14, + -3.00193703395247897e-16, + 5.32847652120313101e-18, + -5.07360079111215093e-20, + -2.08887510426232542e-21, + 1.83505941885438777e-22, + 5.71464022936943317e-01, + -1.36107614315124775e-02, + 3.24172239319108055e-04, + -7.72090147631967607e-06, + 1.83887249273924566e-07, + -4.37911951008156969e-09, + 1.04231008222511144e-10, + -2.47584569004683148e-12, + 5.84060873967347892e-14, + -1.34970236869239579e-15, + 2.94649802403559328e-17, + -5.48004657042674806e-19, + 5.23286069539801077e-21, + 2.26153660229238525e-22, + 1.04634326146852485e+00, + -2.95214349496651304e-02, + 8.32914869746933574e-04, + -2.34997222812946357e-05, + 6.63007719969876961e-07, + -1.87044264933206442e-08, + 5.27535005924578235e-10, + -1.48648410041468605e-11, + 4.17756075163420511e-13, + -1.16625785784413628e-14, + 3.20757949800104011e-16, + -8.55625048998158511e-18, + 2.15118577797681366e-19, + -4.81478263305802003e-21, +# root=7 base[20]=56.0 */ + 2.94108299266060717e-03, + -5.07980010445846091e-05, + 8.77376418516834585e-07, + -1.51539268262390601e-08, + 2.61735926687008867e-10, + -4.52056641507400385e-12, + 7.80665477155293916e-14, + -1.34714353493444230e-15, + 2.31626913855950477e-17, + -3.92095276938641788e-19, + 6.23756077586027786e-21, + -7.57928807351962778e-23, + -3.96949530376115236e-25, + 8.82227494311132492e-26, + 2.70011793158061210e-02, + -4.71962919983381446e-04, + 8.24960240198335474e-06, + -1.44197606177108771e-07, + 2.52047290515680170e-09, + -4.40552499451583056e-11, + 7.69942855206513355e-13, + -1.34466525826790509e-14, + 2.34046133128321531e-16, + -4.01557853432793493e-18, + 6.51248679845218046e-20, + -8.35377240540460494e-22, + -1.60339430268899741e-24, + 8.02240198565373262e-25, + 7.81804396715803096e-02, + -1.40104579959515556e-03, + 2.51076778878338033e-05, + -4.49946275538355787e-07, + 8.06331771792444751e-09, + -1.44497095252755998e-10, + 2.58913483698145132e-12, + -4.63638656802994790e-14, + 8.27815960869757651e-16, + -1.46024236136565018e-17, + 2.46023176198049298e-19, + -3.46951455006704471e-21, + 1.17720122596848763e-23, + 2.20601283778280712e-24, + 1.63881137166143859e-01, + -3.05796613042931152e-03, + 5.70606040695047299e-05, + -1.06473114947134458e-06, + 1.98674728166167056e-08, + -3.70713482383186390e-10, + 6.91658168450817109e-12, + -1.28979853309015867e-13, + 2.39964130779449266e-15, + -4.42357178612506727e-17, + 7.88863579479680428e-19, + -1.25171027775635325e-20, + 1.14743404759976593e-22, + 3.59254516656149903e-24, + 2.99728379991608451e-01, + -5.94391619440827034e-03, + 1.17873853231503748e-04, + -2.33755689391174042e-06, + 4.63560127459875734e-08, + -9.19272254806987626e-10, + 1.82283974508616979e-11, + -3.61315445244631623e-13, + 7.15017258399024021e-15, + -1.40636724102439955e-16, + 2.71014537384355950e-18, + -4.89606356996286795e-20, + 7.10663819001027407e-22, + -1.40424921586480405e-24, + 5.21683767433983259e-01, + -1.13438460360578402e-02, + 2.46668285523363271e-04, + -5.36372151317697864e-06, + 1.16632190776811331e-07, + -2.53609890355228870e-09, + 5.51429779137896111e-11, + -1.19869089809230313e-12, + 2.60319679678807075e-14, + -5.63482997769488779e-16, + 1.20757298538521146e-17, + -2.51704797223537391e-19, + 4.87292376900323769e-21, + -7.61632978164455267e-23, + 9.40020179049828597e-01, + -2.38303331542001756e-02, + 6.04119762804238795e-04, + -1.53149610882915379e-05, + 3.88247110946742805e-07, + -9.84232461914759068e-09, + 2.49501920477981859e-10, + -6.32409607953228963e-12, + 1.60231898184482823e-13, + -4.05494848586945767e-15, + 1.02299812905878984e-16, + -2.56212087281803736e-18, + 6.31770073495071131e-20, + -1.50966817462717710e-21, +# root=7 base[21]=60.0 */ + 2.75086952227305420e-03, + -4.44414539766835534e-05, + 7.17970377547215108e-07, + -1.15991131922618013e-08, + 1.87388516389949647e-10, + -3.02733512486701124e-12, + 4.89072419554564463e-14, + -7.90051560831916543e-16, + 1.27577088900822613e-17, + -2.05637691286867439e-19, + 3.28913195292821238e-21, + -5.10499209759212331e-23, + 7.05791343175631543e-25, + -5.28057417640617971e-27, + 2.52352493402512451e-02, + -4.12263037402396074e-04, + 6.73505577607913129e-06, + -1.10029208298931995e-07, + 1.79752403794018691e-09, + -2.93657290584981880e-11, + 4.79735899422253510e-13, + -7.83672921169597205e-15, + 1.27971369051021272e-16, + -2.08622430790252971e-18, + 3.37704760202175981e-20, + -5.31982885123138103e-22, + 7.56614927479690238e-24, + -6.56455788621462661e-26, + 7.29466153408543372e-02, + -1.21978826807785318e-03, + 2.03968807932338323e-05, + -3.41069635431539857e-07, + 5.70324839321666200e-09, + -9.53676146396055002e-11, + 1.59468645086782365e-12, + -2.66639169769568319e-14, + 4.45694734636176351e-16, + -7.43922752527880362e-18, + 1.23439894427370789e-19, + -2.00350909870842203e-21, + 3.00370496703746489e-23, + -3.23231908335398863e-25, + 1.52488276007662793e-01, + -2.64769484920369339e-03, + 4.59726359997149830e-05, + -7.98235201090119900e-07, + 1.38599696886011798e-08, + -2.40654036387424898e-10, + 4.17849942044600650e-12, + -7.25481068698584334e-14, + 1.25928268907988638e-15, + -2.18342052672788132e-17, + 3.76910785067952234e-19, + -6.40434935605786089e-21, + 1.03163870087742731e-22, + -1.37405875456100388e-24, + 2.77677176768845180e-01, + -5.10177750260658661e-03, + 9.37352286620332875e-05, + -1.72220230459808710e-06, + 3.16421096343576696e-08, + -5.81361464749835724e-10, + 1.06812996183229338e-11, + -1.96239132968356912e-13, + 3.60469770233676772e-15, + -6.61640947742965674e-17, + 1.21099003128586375e-18, + -2.19525228364597756e-20, + 3.86186305864795923e-22, + -6.19799215832029957e-24, + 4.79887664163026917e-01, + -9.59967264877144635e-03, + 1.92031847759110882e-04, + -3.84140495604362808e-06, + 7.68434534849690952e-08, + -1.53717495895369050e-09, + 3.07494673454808166e-11, + -6.15093361868014806e-13, + 1.23025902320902646e-14, + -2.45960894222721785e-16, + 4.91013760600413474e-18, + -9.75732279901695635e-20, + 1.91400533951873984e-21, + -3.62749487732822817e-23, + 8.53332530928727406e-01, + -1.96399983462398273e-02, + 4.52027223442892526e-04, + -1.04036978451471963e-05, + 2.39447789467588620e-07, + -5.51104167852128899e-09, + 1.26839731179876684e-10, + -2.91925062207477721e-12, + 6.71840248758740857e-14, + -1.54592298429532035e-15, + 3.55541102339571309e-17, + -8.16574876599538446e-19, + 1.86914108352470766e-20, + -4.24435787105228880e-22, +# root=7 base[22]=64.0 */ + 2.58377607030830592e-03, + -3.92077001697445360e-05, + 5.94960132258134698e-07, + -9.02826631333275390e-09, + 1.37000090153362315e-10, + -2.07891771356780342e-12, + 3.15466599128583197e-14, + -4.78703907800040538e-16, + 7.26382950959593984e-18, + -1.10201047183573428e-19, + 1.67046301045218455e-21, + -2.52306248610264603e-23, + 3.75827421241370322e-25, + -5.32055024964468530e-27, + 2.36862319685854292e-02, + -3.63215977652534081e-04, + 5.56972702917871539e-06, + -8.54088505497042318e-08, + 1.30970003339989457e-09, + -2.00835627037514370e-11, + 3.07970647721624021e-13, + -4.72253869188101581e-15, + 7.24148587729426415e-17, + -1.11021391808046348e-18, + 1.70076995763364664e-20, + -2.59693700629326982e-22, + 3.91596021654253416e-24, + -5.64402716140076523e-26, + 6.83699056098677066e-02, + -1.07156588181488870e-03, + 1.67947202612601789e-05, + -2.63224719264131359e-07, + 4.12553773215636910e-09, + -6.46598086422043693e-11, + 1.01341644326412803e-12, + -1.58832490377866737e-14, + 2.48930657189181717e-16, + -3.90080585904781973e-18, + 6.10862232700221799e-20, + -9.54018527708547069e-22, + 1.47496464601612540e-23, + -2.20103366535001176e-25, + 1.42577273642809227e-01, + -2.31479265864021960e-03, + 3.75814806616584835e-05, + -6.10148681043754202e-07, + 9.90598036443886013e-09, + -1.60827092955036243e-10, + 2.61108302896566455e-12, + -4.23916532653508044e-14, + 6.88224232601763941e-16, + -1.11719736474656026e-17, + 1.81263975674020682e-19, + -2.93514330012409228e-21, + 4.71887247522833444e-23, + -7.40624413676349663e-25, + 2.58650032274913066e-01, + -4.42675631899185334e-03, + 7.57632672004594033e-05, + -1.29667689810768908e-06, + 2.21924294716760362e-08, + -3.79820054368365944e-10, + 6.50055904588162745e-12, + -1.11255664151005694e-13, + 1.90408418208490061e-15, + -3.25848274796364592e-17, + 5.57441873587399418e-19, + -9.52441649498195854e-21, + 1.62037805637459098e-22, + -2.71927205402795732e-24, + 4.44296259939380267e-01, + -8.22900603027355675e-03, + 1.52413032357654078e-04, + -2.82290866358454579e-06, + 5.22843299016896366e-08, + -9.68380957502814374e-10, + 1.79358006233238218e-11, + -3.32195957717075979e-13, + 6.15266447420868185e-15, + -1.13949324856529380e-16, + 2.10999497130846836e-18, + -3.90459899160854664e-20, + 7.21114620328405691e-22, + -1.32370780343966213e-23, + 7.81296400059412255e-01, + -1.64654527045908911e-02, + 3.47001640774730253e-04, + -7.31289572069207297e-06, + 1.54115823195719186e-07, + -3.24791804991187082e-09, + 6.84483199808228835e-11, + -1.44251391919199911e-12, + 3.04000996462514035e-14, + -6.40650930301450669e-16, + 1.35001525784174834e-17, + -2.84423741855007893e-19, + 5.98882521189530471e-21, + -1.25860321953824185e-22, +# root=7 base[23]=68.0 */ + 2.43582723657615949e-03, + -3.48470254183649229e-05, + 4.98522704020576080e-07, + -7.13188237528897381e-09, + 1.02028946272354252e-10, + -1.45962948672474337e-12, + 2.08815066384675385e-14, + -2.98731383576410391e-16, + 4.27364731418164291e-18, + -6.11377777882378378e-20, + 8.74551439494453277e-22, + -1.25054031035173750e-23, + 1.78534565913345205e-25, + -2.53288079482527806e-27, + 2.23164583306618425e-02, + -3.22429671310266489e-04, + 4.65848529370495362e-06, + -6.73061047467539614e-08, + 9.72443068480470281e-10, + -1.40499219069866173e-11, + 2.02994191974862528e-13, + -2.93287220592550529e-15, + 4.23742030402881039e-17, + -6.12214392323243458e-19, + 8.84449169186694272e-21, + -1.27729848138484561e-22, + 1.84199013500259204e-24, + -2.64128394277701155e-26, + 6.43338171282687027e-02, + -9.48811147472426340e-04, + 1.39933029587009082e-05, + -2.06376714909827090e-07, + 3.04369515605307637e-09, + -4.48891734359167903e-11, + 6.62036665287668403e-13, + -9.76387742668525862e-15, + 1.43999703528721264e-16, + -2.12371044981670826e-18, + 3.13185172145298781e-20, + -4.61723465171219873e-22, + 6.79909970173705701e-24, + -9.96601368356837652e-26, + 1.33876542619210115e-01, + -2.04095769637738407e-03, + 3.11145495461366111e-05, + -4.74343586412972167e-07, + 7.23140270813237294e-09, + -1.10243263210321581e-10, + 1.68066653744918632e-12, + -2.56218752582700270e-14, + 3.90606485539444083e-16, + -5.95475009245864331e-18, + 9.07749738238836914e-20, + -1.38348699328562317e-21, + 2.10675264460371113e-23, + -3.19754034671928876e-25, + 2.42064496073083640e-01, + -3.87738138472678087e-03, + 6.21077714678414800e-05, + -9.94840304267115093e-07, + 1.59353202847314118e-08, + -2.55251451230876256e-10, + 4.08860944327560158e-12, + -6.54911971703374852e-14, + 1.04903412348778821e-15, + -1.68032436190897915e-17, + 2.69142320803130350e-19, + -4.31032551542067024e-21, + 6.89936112648413925e-23, + -1.10207108875603668e-24, + 4.13622613847448695e-01, + -7.13231426453428234e-03, + 1.22986280403671478e-04, + -2.12071770899897769e-06, + 3.65686610294584585e-08, + -6.30572828640990455e-10, + 1.08733016252941070e-11, + -1.87494073297097269e-13, + 3.23305618323335825e-15, + -5.57489937102680245e-17, + 9.61285843617130254e-19, + -1.65743339998356972e-20, + 2.85698053798147040e-22, + -4.91915724726968553e-24, + 7.20484162983407894e-01, + -1.40029570050722203e-02, + 2.72154219286961240e-04, + -5.28944843909029432e-06, + 1.02802980066476976e-07, + -1.99802546606155225e-09, + 3.88325872658836278e-11, + -7.54729964990852097e-13, + 1.46685322102922538e-14, + -2.85089266516328265e-16, + 5.54079130927075890e-18, + -1.07684055174128014e-19, + 2.09264466255913606e-21, + -4.06419602537189293e-23, +# root=7 base[24]=72.0 */ + 2.30390993600210984e-03, + -3.11754770693535300e-05, + 4.21852588642500696e-07, + -5.70832023349896363e-09, + 7.72424319878720891e-11, + -1.04520998352724088e-12, + 1.41433131735636524e-14, + -1.91380971371453753e-16, + 2.58968097024697448e-18, + -3.50423515515455556e-20, + 4.74173455269497881e-22, + -6.41602747618641738e-24, + 8.68013233947379236e-26, + -1.17332797926615802e-27, + 2.10965074179338338e-02, + -2.88147741849765636e-04, + 3.93568089201945889e-06, + -5.37557017949773950e-08, + 7.34225043813592745e-10, + -1.00284508762938363e-11, + 1.36974116438444460e-13, + -1.87086802383566056e-15, + 2.55533424874794396e-17, + -3.49021176538023229e-19, + 4.76708690570218529e-21, + -6.51089249742880026e-23, + 8.89129723509300916e-25, + -1.21324529702705408e-26, + 6.07478661208792209e-02, + -8.46005970140652100e-04, + 1.17819134599616962e-05, + -1.64080975403330475e-07, + 2.28507589874771438e-09, + -3.18231400590492603e-11, + 4.43185384190770675e-13, + -6.17202701006140964e-15, + 8.59548000131062903e-17, + -1.19704922996141720e-18, + 1.66706106214840661e-20, + -2.32155692704453986e-22, + 3.23262374595158519e-24, + -4.49816717124463842e-26, + 1.26177067017850364e-01, + -1.81299729767877031e-03, + 2.60503693664484240e-05, + -3.74309297093709491e-07, + 5.37832872601140158e-09, + -7.72794587277833857e-11, + 1.11040344113842154e-12, + -1.59550260402031301e-14, + 2.29252550192396186e-16, + -3.29405221488469330e-18, + 4.73309167604703331e-20, + -6.80065095506175644e-22, + 9.77052031326142988e-24, + -1.40295645626642449e-25, + 2.27478734816236594e-01, + -3.42429332499988781e-03, + 5.15467293464144915e-05, + -7.75945590556886629e-07, + 1.16804997547493607e-08, + -1.75829434620912165e-10, + 2.64680370341522650e-12, + -3.98429861474830203e-14, + 5.99766191689556626e-16, + -9.02842145326123624e-18, + 1.35906543823991751e-19, + -2.04579924304910024e-21, + 3.07936562659124849e-23, + -4.63307487902786763e-25, + 3.86912847591144804e-01, + -6.24114623034916372e-03, + 1.00673592285975693e-04, + -1.62392801092505738e-06, + 2.61949745183971891e-08, + -4.22541322800685962e-10, + 6.81585580613987169e-12, + -1.09944015676668589e-13, + 1.77346558865906525e-15, + -2.86070961392728364e-17, + 4.61449337004109838e-19, + -7.44339479129191172e-21, + 1.20062005386543484e-22, + -1.93590165094259567e-24, + 6.68460651785850679e-01, + -1.20543945506529169e-02, + 2.17377683480080166e-04, + -3.91998595006370769e-06, + 7.06893624147993612e-08, + -1.27474588467295237e-09, + 2.29875756852347639e-11, + -4.14536448855904542e-13, + 7.47536249311821924e-15, + -1.34803670028517836e-16, + 2.43092105497821640e-18, + -4.38367929980290231e-20, + 7.90500978307765298e-22, + -1.42498891329286190e-23, +# root=7 base[25]=76.0 */ + 2.18555154396460729e-03, + -2.80551230963406174e-05, + 3.60133319264131083e-07, + -4.62289925440048547e-09, + 5.93424611751303345e-11, + -7.61757396054329789e-13, + 9.77840013438059793e-15, + -1.25521733717285297e-16, + 1.61127640665308988e-18, + -2.06833618056076896e-20, + 2.65504559123665901e-22, + -3.40817277576083049e-24, + 4.37486946985456579e-26, + -5.61447851767793055e-28, + 2.00030651183176235e-02, + -2.59057024141318430e-04, + 3.35501291227110168e-06, + -4.34503240312229837e-08, + 5.62719342006145582e-10, + -7.28770302459210733e-12, + 9.43820682886367750e-14, + -1.22232955566493832e-15, + 1.58302265607613311e-17, + -2.05015129758490109e-19, + 2.65512200792943057e-21, + -3.43860199817901513e-23, + 4.45321561486784924e-25, + -5.76590648618755151e-27, + 5.75407007962111458e-02, + -7.59049895789338570e-04, + 1.00130296698739648e-05, + -1.32087183893892119e-07, + 1.74243208341677841e-09, + -2.29853455555895755e-11, + 3.03211881395379217e-13, + -3.99982870214029598e-15, + 5.27638606913307909e-17, + -6.96036005931140987e-19, + 9.18177537859546719e-21, + -1.21121335594041871e-22, + 1.59775411004612904e-24, + -2.10718697586687048e-26, + 1.19315357638179714e-01, + -1.62120703907087994e-03, + 2.20282813173408447e-05, + -2.99311047942374537e-07, + 4.06691298924491712e-09, + -5.52595080452959761e-11, + 7.50843019509539600e-13, + -1.02021400327076670e-14, + 1.38622398526356340e-16, + -1.88354288212678830e-18, + 2.55927803708570977e-20, + -3.47743226090481949e-22, + 4.72494074149403861e-24, + -6.41857908062223454e-26, + 2.14551496395376212e-01, + -3.04623435665353753e-03, + 4.32508927299950720e-05, + -6.14082668280442438e-07, + 8.71883791708215130e-09, + -1.23791369712678293e-10, + 1.75760845184242297e-12, + -2.49547886410171316e-14, + 3.54311832648617251e-16, + -5.03057233157206108e-18, + 7.14248005141628727e-20, + -1.01409855897892817e-21, + 1.43982262361675470e-23, + -2.04381197457695101e-25, + 3.63444900629985024e-01, + -5.50717028903659287e-03, + 8.34484801956938683e-05, + -1.26446949730851388e-06, + 1.91601225794919197e-08, + -2.90327523153532185e-10, + 4.39924485566727137e-12, + -6.66604222540769418e-14, + 1.01008514394960261e-15, + -1.53055131511755480e-17, + 2.31919755171537018e-19, + -3.51420672361709803e-21, + 5.32495119640842049e-23, + -8.06676887694627597e-25, + 6.23448011283788683e-01, + -1.04860655635606124e-02, + 1.76370072585313459e-04, + -2.96645126956309272e-06, + 4.98941402341801931e-08, + -8.39193030146334173e-10, + 1.41147825875428539e-11, + -2.37403172149328100e-13, + 3.99299568708786552e-15, + -6.71600728558678525e-17, + 1.12959678714153066e-18, + -1.89992134912085054e-20, + 3.19556254775385504e-22, + -5.37322076896849269e-24, +# root=7 base[26]=80.0 */ + 2.07876320288208176e-03, + -2.53808951211212824e-05, + 3.09890917953630795e-07, + -3.78364831389370414e-09, + 4.61968832702987360e-11, + -5.64046086432202390e-13, + 6.88678467234824585e-15, + -8.40849786206025107e-17, + 1.02664508336580894e-18, + -1.25349395163766506e-20, + 1.53046759303503399e-22, + -1.86864129158824450e-24, + 2.28153557782380806e-26, + -2.78523243625709764e-28, + 1.90174174248436759e-02, + -2.34159808311762500e-04, + 2.88318937338843499e-06, + -3.55004602316390940e-08, + 4.37114082165530441e-10, + -5.38214771246677175e-12, + 6.62699171232564750e-14, + -8.15975731201423994e-16, + 1.00470382688554496e-17, + -1.23708308443192517e-19, + 1.52320959145044196e-21, + -1.87551429006261862e-23, + 2.30930145215940541e-25, + -2.84297395465421022e-27, + 5.46552971139245489e-02, + -6.84844446710651533e-04, + 8.58127100128649667e-06, + -1.07525456840905873e-07, + 1.34732067861641571e-09, + -1.68822627158110291e-11, + 2.11538944607938864e-13, + -2.65063551227079571e-15, + 3.32131212396214687e-17, + -4.16168655461770452e-19, + 5.21469642667814185e-21, + -6.53414279964462622e-23, + 8.18743417702424947e-25, + -1.02573943335986463e-26, + 1.13161692763482188e-01, + -1.45831959996813617e-03, + 1.87934273844436459e-05, + -2.42191706716464534e-07, + 3.12113493735493535e-09, + -4.02222001291480204e-11, + 5.18345222390989022e-13, + -6.67993716636174506e-15, + 8.60846374066170755e-17, + -1.10937641836418164e-18, + 1.42965811946641152e-20, + -1.84240627029137749e-22, + 2.37431485902917791e-24, + -3.05926980706953342e-26, + 2.03015020347933672e-01, + -2.72750602414446788e-03, + 3.66440330326035386e-05, + -4.92312444045186843e-07, + 6.61421580823495755e-09, + -8.88619641592034590e-11, + 1.19386014958013921e-12, + -1.60395065555302045e-14, + 2.15490709292833897e-16, + -2.89511684754950764e-18, + 3.88958830024860769e-20, + -5.22565981290402924e-22, + 7.02066784684740449e-24, + -9.43053869110098355e-26, + 3.42662114546253727e-01, + -4.89547236206679896e-03, + 6.99395953926645962e-05, + -9.99198165552398163e-07, + 1.42751322543100779e-08, + -2.03942929344012397e-10, + 2.91364855247650462e-12, + -4.16260956644693144e-14, + 5.94694867454927660e-16, + -8.49616037848900562e-18, + 1.21381139066658410e-19, + -1.73412217763662356e-21, + 2.47746799470891575e-23, + -3.53872943542790444e-25, + 5.84117835602405489e-01, + -9.20508968707555407e-03, + 1.45062641444115761e-04, + -2.28603638401152903e-06, + 3.60255562493499083e-08, + -5.67725304877708207e-10, + 8.94676044878714602e-12, + -1.40991641270927060e-13, + 2.22188165409734061e-15, + -3.50145443761132454e-17, + 5.51792805675449491e-19, + -8.69568057961622174e-21, + 1.37034858453853562e-22, + -2.15898967050998499e-24, +# # root=7 base[27]=84.0 */ + 1.98192699802038482e-03, + -2.30716200698178113e-05, + 2.68576821032105986e-07, + -3.12650384227142354e-09, + 3.63956436678853403e-11, + -4.23681832751966491e-13, + 4.93208190084472322e-15, + -5.74143850315973472e-17, + 6.68361084564491406e-19, + -7.78039404170300613e-21, + 9.05715977494056331e-23, + -1.05434431156077731e-24, + 1.22736248759205519e-26, + -1.42857881470165381e-28, + 1.81243689157445723e-02, + -2.12687075894135247e-04, + 2.49585475018120372e-06, + -2.92885259144881060e-08, + 3.43696984041783352e-10, + -4.03323872236870208e-12, + 4.73295238157471555e-14, + -5.55405712087045387e-16, + 6.51761268942156709e-18, + -7.64833242279331687e-20, + 8.97521707848446244e-22, + -1.05322985536588874e-23, + 1.23595118971202023e-25, + -1.45017199771085018e-27, + 5.20455333820300028e-02, + -6.21013015365134849e-04, + 7.40999544422105631e-06, + -8.84168787526823553e-08, + 1.05499989942143550e-09, + -1.25883745669479992e-11, + 1.50205866677913031e-13, + -1.79227288355382795e-15, + 2.13855967149836963e-17, + -2.55175286598898455e-19, + 3.04477951366676055e-21, + -3.63306427592569510e-23, + 4.33501173121802235e-25, + -5.17184511948478267e-27, + 1.07611825714678436e-01, + -1.31880547494211075e-03, + 1.61622374603021934e-05, + -1.98071606985603092e-07, + 2.42740905089545373e-09, + -2.97484065992215763e-11, + 3.64572956859401962e-13, + -4.46791798509809150e-15, + 5.47552711887060769e-17, + -6.71037322580692130e-19, + 8.22370299364497735e-21, + -1.00783202404649533e-22, + 1.23511916219141868e-24, + -1.51343664817546251e-26, + 1.92656258693260835e-01, + -2.45631135143953121e-03, + 3.13172564241316690e-05, + -3.99285924954111208e-07, + 5.09077959152292482e-09, + -6.49059614421516767e-11, + 8.27532159856927363e-13, + -1.05507947248504710e-14, + 1.34519568813217334e-16, + -1.71508543785496999e-18, + 2.18668412463779814e-20, + -2.78795873617602943e-22, + 3.55456618481555045e-24, + -4.53123117009336315e-26, + 3.24128421381815413e-01, + -4.38032140564919951e-03, + 5.91963380902858365e-05, + -7.99988429794245455e-07, + 1.08111668466479393e-08, + -1.46103773795975552e-10, + 1.97446890055515930e-12, + -2.66832768104527065e-14, + 3.60601912306563056e-16, + -4.87322977859560627e-18, + 6.58575776978727129e-20, + -8.90009443495728482e-22, + 1.20277240011847509e-23, + -1.62514816235311618e-25, + 5.49457524441697709e-01, + -8.14531262054656556e-03, + 1.20748401350676316e-04, + -1.79000820569679389e-06, + 2.65355842447673291e-08, + -3.93370951580096174e-10, + 5.83144143801969769e-12, + -8.64469252455088918e-14, + 1.28151349263308809e-15, + -1.89975158402642416e-17, + 2.81624508870553378e-19, + -4.17488078574663770e-21, + 6.18896014004102980e-23, + -9.17267212416686302e-25, +# # root=7 base[28]=88.0 */ + 1.89371330897837001e-03, + -2.10637828305495173e-05, + 2.34292564259324456e-07, + -2.60603739170708156e-09, + 2.89869672494532050e-11, + -3.22422185113188219e-13, + 3.58630361564028059e-15, + -3.98904734766811071e-17, + 4.43701940697488611e-19, + -4.93529895778263496e-21, + 5.48953555645516688e-23, + -6.10601320312861167e-25, + 6.79172146250836131e-27, + -7.55350044798235885e-29, + 1.73114527322514589e-02, + -1.94038355738880086e-04, + 2.17491183901072046e-06, + -2.43778684346023872e-08, + 2.73243475324083730e-10, + -3.06269586315456593e-12, + 3.43287463280082972e-14, + -3.84779578876837927e-16, + 4.31286720772275834e-18, + -4.83415039992644108e-20, + 5.41843951146334912e-22, + -6.07334987226652086e-24, + 6.80741712070363261e-26, + -7.62925024388788693e-28, + 4.96737029637716807e-02, + -5.65708043217576597e-04, + 6.44255553878200731e-06, + -7.33709240445197916e-08, + 8.35583405178440222e-10, + -9.51602608392862383e-12, + 1.08373086239870648e-13, + -1.23420487896592536e-15, + 1.40557193313530451e-17, + -1.60073298433286801e-19, + 1.82299178464431026e-21, + -2.07611080480030842e-23, + 2.36437488009109253e-25, + -2.69231467379242308e-27, + 1.02581022330785226e-01, + -1.19839708368268418e-03, + 1.40002072269088960e-05, + -1.63556641671777656e-07, + 1.91074136270885543e-09, + -2.23221296172925129e-11, + 2.60777036796225588e-13, + -3.04651321742725646e-15, + 3.55907210924975436e-17, + -4.15786618164165659e-19, + 4.85740402332915692e-21, + -5.67463520971451624e-23, + 6.62936084746681483e-25, + -7.74365688755745643e-27, + 1.83303576710730415e-01, + -2.22364644410347374e-03, + 2.69749428631011078e-05, + -3.27231671382426561e-07, + 3.96963090150642654e-09, + -4.81553922565728670e-11, + 5.84170634731895705e-13, + -7.08654450709886951e-15, + 8.59665140033432898e-17, + -1.04285544561321403e-18, + 1.26508268129327740e-20, + -1.53466541939839100e-22, + 1.86169483443125068e-24, + -2.25808028133839602e-26, + 3.07497356383458431e-01, + -3.94241603079547968e-03, + 5.05456188068525726e-05, + -6.48044133498549705e-07, + 8.30855787059730580e-09, + -1.06523815772215181e-10, + 1.36573921773224831e-12, + -1.75101088646710555e-14, + 2.24496674380793105e-16, + -2.87826633159062872e-18, + 3.69021817273540555e-20, + -4.73121962664255305e-22, + 6.06588485343297976e-24, + -7.77577779963085872e-26, + 5.18681666730352986e-01, + -7.25858041776160541e-03, + 1.01578661943535828e-04, + -1.42152100939608483e-06, + 1.98931738368213170e-08, + -2.78390795975724706e-10, + 3.89588086444734780e-12, + -5.45200772775879500e-14, + 7.62969641468742566e-16, + -1.06772165937467533e-17, + 1.49420039790411172e-19, + -2.09102700989935117e-21, + 2.92624322149581405e-23, + -4.09426708803240471e-25, +# # root=7 base[29]=92.0 */ + 1.81301932080959040e-03, + -1.93071091297664079e-05, + 2.05604241868892029e-07, + -2.18950978058688307e-09, + 2.33164113527511134e-11, + -2.48299890318360703e-13, + 2.64418201409177964e-15, + -2.81582827712162209e-17, + 2.99861690457802150e-19, + -3.19327119962132738e-21, + 3.40056141839339624e-23, + -3.62130781782042584e-25, + 3.85638385098316020e-27, + -4.10625414663133308e-29, + 1.65683443140305538e-02, + -1.77739258064935334e-04, + 1.90672304116237488e-06, + -2.04546412271579690e-08, + 2.19430058115147347e-10, + -2.35396699798811358e-12, + 2.52525140594430530e-14, + -2.70899917826962423e-16, + 2.90611720107938871e-18, + -3.11757834928389156e-20, + 3.34442628818998183e-22, + -3.58778062437755318e-24, + 3.84884237976811279e-26, + -4.12842500629723764e-28, + 4.75086783727970419e-02, + -5.17475725640469575e-04, + 5.63646760547351118e-06, + -6.13937340311595776e-08, + 6.68715025458239664e-10, + -7.28380171576880927e-12, + 7.93368855414625813e-14, + -8.64156062045504537e-16, + 9.41259156410475750e-18, + -1.02524166460007597e-19, + 1.11671739251222402e-21, + -1.21635491195844505e-23, + 1.32488242820217633e-25, + -1.44292198443361311e-27, + 9.79996986160151656e-02, + -1.09375827851515605e-03, + 1.22072535805220998e-05, + -1.36243119623715589e-07, + 1.52058671693524174e-09, + -1.69710145371437842e-11, + 1.89410660511649912e-13, + -2.11398076626107970e-15, + 2.35937864745818197e-17, + -2.63326312657187120e-19, + 2.93894102211840380e-21, + -3.28010301895011088e-23, + 3.66086817144735682e-25, + -4.08532496895818181e-27, + 1.74817154099182859e-01, + -2.02254284259202523e-03, + 2.33997605738357581e-05, + -2.70722964864921049e-07, + 3.13212280416248761e-09, + -3.62370191433502649e-11, + 4.19243317870690486e-13, + -4.85042544156056590e-15, + 5.61168800104590457e-17, + -6.49242888082254072e-19, + 7.51139991469739018e-21, + -8.69029599131071212e-23, + 1.00542167784600982e-24, + -1.16306450153025355e-26, + 2.92490161451561537e-01, + -3.56704838892083712e-03, + 4.35017511213275392e-05, + -5.30523319083552638e-07, + 6.46996925035140733e-09, + -7.89041698917292926e-11, + 9.62271656231554080e-13, + -1.17353334007214716e-14, + 1.43117641607997308e-16, + -1.74538367509589580e-18, + 2.12857348615833274e-20, + -2.59589060590751251e-22, + 3.16580467247881377e-24, + -3.86026631134143548e-26, + 4.91171687794970113e-01, + -6.50916572538684859e-03, + 8.62615649341683945e-05, + -1.14316609820984687e-06, + 1.51496060741959405e-08, + -2.00767469016723861e-10, + 2.66063529427582572e-12, + -3.52595976022216241e-14, + 4.67271566961956544e-16, + -6.19243361067952009e-18, + 8.20641287291096655e-20, + -1.08754031894068733e-21, + 1.44124348496950776e-23, + -1.90964699995600827e-25, +# # root=7 base[30]=96.0 */ + 1.73892263201114172e-03, + -1.77613858708223535e-05, + 1.81415102802702882e-07, + -1.85297700102224347e-09, + 1.89263391706229643e-11, + -1.93313955976703012e-13, + 1.97451209335654185e-15, + -2.01677007079668780e-17, + 2.05993244211890551e-19, + -2.10401856291802817e-21, + 2.14904820303142641e-23, + -2.19504155539759081e-25, + 2.24201922069255637e-27, + -2.28976343126154565e-29, + 1.58864200962347338e-02, + -1.63410987708754421e-04, + 1.68087906162569904e-06, + -1.72898680769697604e-08, + 1.77847142571870699e-10, + -1.82937232257487208e-12, + 1.88173003299761707e-14, + -1.93558625184693080e-16, + 1.99098386731417713e-18, + -2.04796699507586718e-20, + 2.10658101342443434e-22, + -2.16687259939835944e-24, + 2.22888974098662227e-26, + -2.29243932036275081e-28, + 4.55245360176430580e-02, + -4.75159431279253367e-04, + 4.95944615550005197e-06, + -5.17639018614975215e-08, + 5.40282412977740400e-10, + -5.63916310934380004e-12, + 5.88584040678262840e-14, + -6.14330825733932535e-16, + 6.41203867865715095e-18, + -6.69252433613027314e-20, + 6.98527944610904075e-22, + -7.29084071859477241e-24, + 7.60976825084794823e-26, + -7.94178173284109852e-28, + 9.38101788840922240e-02, + -1.00225060532892099e-03, + 1.07078601472801019e-05, + -1.14400797888349121e-07, + 1.22223697148447203e-09, + -1.30581538069471202e-11, + 1.39510900769748048e-13, + -1.49050866771317514e-15, + 1.59243190049693700e-17, + -1.70132479780263283e-19, + 1.81766395581126300e-21, + -1.94195856106419563e-23, + 2.07475259200674776e-25, + -2.21637432048275594e-27, + 1.67081938280067954e-01, + -1.84753926667754055e-03, + 2.04295052897563020e-05, + -2.25903012678444617e-07, + 2.49796411677114357e-09, + -2.76216977130718755e-11, + 3.05432003378221460e-13, + -3.37737056051718686e-15, + 3.73458962285727368e-17, + -4.12959117196101831e-19, + 4.56637140079855421e-21, + -5.04934917324003363e-23, + 5.58341064581653804e-25, + -6.17320421377878742e-27, + 2.78880012121049736e-01, + -3.24285196886516056e-03, + 3.77082918635562509e-05, + -4.38476775665077029e-07, + 5.09866327261184485e-09, + -5.92878998620848476e-11, + 6.89407180297273299e-13, + -8.01651367903123138e-15, + 9.32170325501740986e-17, + -1.08393941623138591e-18, + 1.26041842989096898e-20, + -1.46563045370811975e-22, + 1.70425355312211352e-24, + -1.98145961532724116e-26, + 4.66433770918913415e-01, + -5.87010866300481920e-03, + 7.38758165979250421e-05, + -9.29733432773725750e-07, + 1.17007742969773770e-08, + -1.47255239322050405e-10, + 1.85321970644249770e-12, + -2.33229275654882396e-14, + 2.93521026316524490e-16, + -3.69398707121960122e-18, + 4.64891413524204800e-20, + -5.85069796403519684e-22, + 7.36315294540627251e-24, + -9.26512313219113682e-26, + # root=8 base[0]=0.0 */ + 1.69469060087002708e-02, + -6.18885259074673506e-04, + 1.68602937790110815e-05, + -4.05157000964468486e-07, + 9.02760894094026473e-09, + -1.90453384231226411e-10, + 3.83717762170135867e-12, + -7.40783524224750053e-14, + 1.36796634977941170e-15, + -2.40420428586073272e-17, + 3.96970745684224095e-19, + -6.01706494976866720e-21, + 7.87086436826702170e-23, + -7.40346455314138668e-25, + 1.60192095195924533e-01, + -5.87710095415233669e-03, + 1.54230039698632909e-04, + -3.33900671280122066e-06, + 6.03267741033873284e-08, + -8.54114631625125155e-10, + 6.90292519597009037e-12, + 7.82889358888536786e-14, + -4.92589970068712535e-15, + 1.24318644910383911e-16, + -1.96230296343409034e-18, + 1.05009166709308028e-20, + 5.24892955802051147e-22, + -2.25588937744249405e-23, + 4.93504435521138429e-01, + -1.82654435040827991e-02, + 4.43992683530885796e-04, + -7.63690563454457992e-06, + 7.38832837773356169e-08, + 4.72113251994191049e-10, + -3.38808159383817163e-11, + 5.52320020193080116e-13, + 2.08097288295083780e-15, + -3.05810372205007304e-16, + 6.32401000238686906e-18, + 1.18434679520214939e-21, + -3.37588565994597583e-21, + 8.40523535986032336e-23, + 1.14721822957409780e+00, + -4.29762355138877811e-02, + 9.27878321110813323e-04, + -1.05509301972275912e-05, + -3.31151073157197852e-08, + 3.00272607040442028e-09, + -1.50931585790008188e-11, + -1.14638094736564841e-12, + 1.95977396189977267e-14, + 3.69454126035950003e-16, + -1.49483186455217939e-17, + -3.21279821324000123e-20, + 9.11378197562479405e-21, + -9.32017491930300858e-23, + 2.46714737607997447e+00, + -9.37218382840171865e-02, + 1.72075512691133325e-03, + -9.14440645470657453e-06, + -2.12618527501257486e-07, + 1.26205561399157552e-09, + 8.82296954997439850e-11, + -2.33803414149580020e-13, + -4.52666298419755981e-14, + -3.20520593158308009e-17, + 2.56028584914634347e-17, + 1.04245045374440180e-19, + -1.53370154152332589e-20, + -1.17924184179984957e-22, + 5.54460848164031628e+00, + -2.13591187612560879e-01, + 3.21063253099260074e-03, + -1.99866523786910072e-06, + -2.66810459894957399e-07, + -4.93262853177705323e-09, + 1.34290797815381505e-11, + 2.47905142117266725e-12, + 3.87049603744478219e-14, + -6.05338031550940132e-16, + -3.30425814724233386e-17, + -2.72795933794040826e-19, + 1.46080894336858130e-20, + 4.46329989987246888e-22, + 1.53458294992861415e+01, + -5.98155424345071407e-01, + 7.26799212507586723e-03, + 8.96144898338330676e-06, + -4.46427453855464876e-08, + -5.13618107848645034e-09, + -1.43546710226532289e-10, + -2.19570586362822405e-12, + -1.25309905434898718e-15, + 1.03419947764958816e-15, + 3.30372735427239506e-17, + 4.95093603988749397e-19, + -2.38027332743475711e-21, + -3.61205922733084948e-22, + 8.60248844763544156e+01, + -3.37809761694062161e+00, + 3.47822667651058945e-02, + 1.80854123590890343e-05, + 2.93211999358311257e-07, + 3.92991265101516376e-09, + 2.97697358900457574e-11, + -5.17287769942311216e-13, + -3.31218900321837286e-14, + -1.07081751093141475e-15, + -2.73849533957354289e-17, + -6.01991235534424437e-19, + -1.17165373045105914e-20, + -2.13441762915228322e-22, +# root=8 base[1]=2.5 */ + 1.47134597474066296e-02, + -5.01255088179424196e-04, + 1.27538361793607495e-05, + -2.86809611380115436e-07, + 5.99398614533166922e-09, + -1.19006723738549851e-10, + 2.26487009374850970e-12, + -4.15439151156120725e-14, + 7.33589880535415453e-16, + -1.24816676494003485e-17, + 2.02055385483200535e-19, + -3.12345536588796439e-21, + 4.37847810812921672e-23, + -5.29609173530811204e-25, + 1.38919138167741596e-01, + -4.78836128182326837e-03, + 1.19420142034222916e-04, + -2.50096254077421344e-06, + 4.50023536321834421e-08, + -6.76329229692652526e-10, + 7.45981393964573453e-12, + -2.16754845251811510e-14, + -1.70922670952115726e-15, + 5.92426522228844352e-17, + -1.24774668235287013e-18, + 1.72507827962653967e-20, + -8.53479200073912549e-23, + -3.98378252663305051e-24, + 4.26995127347349956e-01, + -1.50595204254477342e-02, + 3.59625535954319852e-04, + -6.41813550875911692e-06, + 7.64487723733202476e-08, + -1.56390322095604638e-10, + -1.88013788112548813e-11, + 4.89436212269756738e-13, + -4.68931241187479502e-15, + -8.51642549906337169e-17, + 4.19191836696881907e-18, + -7.17808450127281553e-20, + -9.22723917166342535e-23, + 3.71715128402102508e-23, + 9.89350550742663204e-01, + -3.60642732101914276e-02, + 7.99979665924974051e-04, + -1.06295386078696280e-05, + 2.11205907291314594e-08, + 2.33439618351141155e-09, + -3.72173587154445402e-11, + -4.17836013601755336e-13, + 2.27955270055129754e-14, + -1.52074687767824064e-16, + -9.22488218187154471e-18, + 2.27158490419905295e-19, + 1.24758082599156476e-21, + -1.47793937540880429e-22, + 2.11901892780238121e+00, + -8.04499180563345989e-02, + 1.59180344957356493e-03, + -1.22344372901288529e-05, + -1.67557283621803542e-07, + 3.14330378085952790e-09, + 6.26262516813735977e-11, + -1.50740821049011541e-12, + -2.88852640398524936e-14, + 8.66138107440845938e-16, + 1.43868926094900355e-17, + -5.50361649403754658e-19, + -7.58779725511020515e-21, + 3.66601790251026075e-22, + 4.74134990989767946e+00, + -1.88081893347993967e-01, + 3.15790573115895317e-03, + -7.01357331619457220e-06, + -3.56013988416370570e-07, + -3.66697459179886242e-09, + 9.50260972144215220e-11, + 3.10589117352767715e-12, + -7.33135409084723460e-15, + -1.88681961928885356e-15, + -2.26843399460409011e-17, + 8.47864060893177629e-19, + 2.67311459325461974e-20, + -1.66554838902008230e-22, + 1.30701476535782675e+01, + -5.39602606024014109e-01, + 7.36719143465135607e-03, + 7.21774446989586503e-06, + -1.86638500585457838e-07, + -9.27910076842669199e-09, + -1.97950074755616128e-10, + -1.34793205651189543e-12, + 6.40642093269747925e-14, + 2.66620436006036622e-15, + 4.26454092491110879e-17, + -3.43036948836485923e-19, + -3.78138724543471109e-20, + -9.27877960544595745e-22, + 7.30705055124571601e+01, + -3.09888543873179989e+00, + 3.50301397452366867e-02, + 2.34367888429836380e-05, + 3.76979381663580284e-07, + 4.30613807715830239e-09, + -7.21228790404691022e-12, + -2.46900988513669625e-12, + -9.96275570247585118e-14, + -2.90991622270488774e-15, + -7.11623511415200168e-17, + -1.50368601486464320e-18, + -2.47207152980206125e-20, + 2.74518824233913655e-23, +# root=8 base[2]=5.0 */ + 1.28927884317232011e-02, + -4.11524384734966134e-04, + 9.81758954063653128e-06, + -2.07346110074245652e-07, + 4.07532986929267193e-09, + -7.63213828254329197e-11, + 1.37246851001693856e-12, + -2.39339795653993570e-14, + 4.01609546493201887e-16, + -6.61305049763834013e-18, + 1.02926179055945707e-19, + -1.52289802361967720e-21, + 2.59636213568511347e-23, + -1.87410760314144506e-25, + 1.21502345615955590e-01, + -3.94177192617381662e-03, + 9.33131677414359410e-05, + -1.87970537127847000e-06, + 3.31922442685800743e-08, + -5.09095847222156949e-10, + 6.34726647667695588e-12, + -5.04870468625946641e-14, + -3.06278060020733358e-16, + 2.28956907938241184e-17, + -6.13298760496046522e-19, + 1.14809563678751042e-20, + -1.06209840248654181e-22, + 1.72112972079679869e-24, + 3.72052144816391928e-01, + -1.24701677756049647e-02, + 2.89776295661660463e-04, + -5.24016635766983288e-06, + 6.98227471321376672e-08, + -4.61956239246015076e-10, + -7.46331553573214782e-12, + 3.16659771210781042e-13, + -5.46987729809807070e-15, + 2.32705624934625901e-17, + 1.41988767974833265e-18, + -4.70113194796953619e-20, + 8.41856360543516148e-22, + 4.06141942656684826e-24, + 8.57097661623966833e-01, + -3.01656899751484749e-02, + 6.75828791426164575e-04, + -9.96921791618913268e-06, + 5.83255369152602203e-08, + 1.37609954751627140e-09, + -3.99209791948489518e-11, + 1.72440365415633872e-13, + 1.30771400400435815e-14, + -3.25950425009449098e-16, + -2.53721459507562094e-21, + 1.59889577159235877e-19, + -2.80121169583070997e-21, + -8.94244325279051501e-24, + 1.82170082472148609e+00, + -6.83430881429287623e-02, + 1.43120094761450627e-03, + -1.43465921557044938e-05, + -9.34868054197187511e-08, + 4.06692868317182163e-09, + 1.26643028119720262e-11, + -1.87262826019504151e-12, + 6.36987425673013006e-15, + 9.21834385181321880e-16, + -1.07652932061278380e-17, + -4.41913671522277658e-19, + 1.07709994975899206e-20, + 2.19808949712911904e-22, + 4.03887292601833181e+00, + -1.63256761639268722e-01, + 3.03762449131782198e-03, + -1.31443562461121164e-05, + -3.99922252356046978e-07, + -4.36112499979511436e-10, + 1.67770002524272546e-10, + 1.70239713402640290e-12, + -7.96490933238879476e-14, + -1.74324745003363894e-15, + 3.46931558912705152e-17, + 1.47321198274367377e-18, + -8.52319284836443326e-21, + -1.03041656182543325e-21, + 1.10300684114368011e+01, + -4.80385212257118610e-01, + 7.42890438817176302e-03, + 2.48132196704288912e-06, + -4.21173535004375525e-07, + -1.41521128795622559e-08, + -1.90572010550946805e-10, + 2.49886642333611104e-12, + 1.81062908162380739e-13, + 3.37918132757936372e-15, + -2.70556803954215121e-17, + -3.03411180133856114e-18, + -6.08623396681470642e-20, + 6.55652749234836496e-22, + 6.12373803226194511e+01, + -2.81741048028227725e+00, + 3.53502998451751468e-02, + 3.01165896476121304e-05, + 4.53416002089007912e-07, + 2.82321377999742219e-09, + -1.41482601265356498e-10, + -8.02952614264326063e-12, + -2.74027767598987486e-13, + -7.30749243290950785e-15, + -1.47475569694056633e-16, + -1.10053376620340746e-18, + 9.06538116946398622e-20, + 5.66668864347746237e-21, +# root=8 base[3]=7.5 */ + 1.13894393831374310e-02, + -3.41933207018475273e-04, + 7.67552777679401419e-06, + -1.52766840241277477e-07, + 2.83067833231774704e-09, + -5.01661627690205686e-11, + 8.51456504212972413e-13, + -1.42074254920181947e-14, + 2.24601852120651289e-16, + -3.50147060020890369e-18, + 6.01140054354160506e-20, + -5.04905231520141035e-22, + 1.51046970740235111e-23, + -3.39813010625502998e-25, + 1.07097201347192611e-01, + -3.27718664110333109e-03, + 7.36326233769838242e-05, + -1.42230024932675786e-06, + 2.44161328229809578e-08, + -3.74217271219026217e-10, + 4.89191131736851513e-12, + -5.09230711333784514e-14, + 1.86848393280124998e-16, + 7.28301143775564388e-18, + -1.90216587835418580e-19, + 8.22915128887760638e-21, + -5.23125462318579390e-23, + -8.59879390251685847e-25, + 3.26435464907930017e-01, + -1.03852454453307302e-02, + 2.33268275314709930e-04, + -4.20397575704279120e-06, + 5.94128180708876238e-08, + -5.53378072014690500e-10, + -8.63138991666790682e-13, + 1.62665045260432121e-13, + -3.99874820967162015e-15, + 5.06607581431434179e-17, + 2.31837448158278516e-19, + -8.96551983910638684e-21, + 5.93827464488970925e-22, + -1.34695823500793119e-23, + 7.46515243990272692e-01, + -2.52199529672631761e-02, + 5.62543262505738918e-04, + -8.86553442762875396e-06, + 7.68569315250805671e-08, + 5.12677047008743702e-10, + -3.09301212504185088e-11, + 4.14563776377573446e-13, + 2.68358214588422642e-15, + -2.23570059046986253e-16, + 4.25566983299400833e-18, + 4.20690608065411189e-20, + -1.87711944503845644e-21, + 1.91793602699743025e-23, + 1.57010962820995048e+00, + -5.76013419400556517e-02, + 1.25275784835485919e-03, + -1.51922139351548252e-05, + -1.31200740550663231e-08, + 3.79163906548159512e-09, + -3.26895938453296176e-11, + -1.24872933304335936e-12, + 2.86908969835424160e-14, + 2.76945862423769116e-16, + -1.70516016273520077e-17, + 1.46732321225779311e-19, + 9.72944072679373078e-21, + -2.32410247032023940e-22, + 3.43329631703425298e+00, + -1.39694658015188267e-01, + 2.84195092888863722e-03, + -1.93837182925111373e-05, + -3.66208917669265862e-07, + 3.82884435477484542e-09, + 1.72895224530820231e-10, + -1.47072848709277942e-12, + -1.04266769959862739e-13, + 6.37756589522387277e-16, + 7.29266807755888406e-17, + -5.95930008905993495e-20, + -4.76990341145127921e-20, + -1.73306653132256960e-22, + 9.22738669416144930e+00, + -4.20972388067233749e-01, + 7.40819846461086753e-03, + -6.73342078525155703e-06, + -7.40475427368557540e-07, + -1.71338545129550924e-08, + -2.44161989858030034e-11, + 9.72708066415538648e-12, + 2.45013935221110278e-13, + -9.67266919021761793e-16, + -1.95000671740892478e-16, + -3.53049587683923007e-18, + 7.19479367004430707e-20, + 4.12761071786187879e-21, + 5.05358097564580717e+01, + -2.53303652739690754e+00, + 3.57562331652377177e-02, + 3.75406806743061884e-05, + 4.51411238877639723e-07, + -4.54514735923077165e-09, + -5.36689334717376135e-10, + -2.21116417761255831e-11, + -6.33627942888155069e-13, + -1.15398702217260863e-14, + 3.96986125458002596e-17, + 1.33072493198696328e-17, + 5.38553129031924451e-19, + 8.21235047806853914e-21, +# root=8 base[4]=10.0 */ + 1.01338995002293823e-02, + -2.87161504516387567e-04, + 6.08422036922669884e-06, + -1.14514252613417333e-07, + 2.00324283440627924e-09, + -3.37935060015951677e-11, + 5.38426947730391807e-13, + -8.60671246761821528e-15, + 1.37849236528948070e-16, + -1.40800315660807331e-18, + 4.55272912775425757e-20, + -3.86382417829530531e-22, + -1.31011831067106723e-23, + -6.50105134752208593e-25, + 9.50671571432648160e-02, + -2.75028459179439601e-03, + 5.86813598040463485e-05, + -1.08560774749644397e-06, + 1.79947349202644558e-08, + -2.73039598733228878e-10, + 3.58255121250536881e-12, + -4.15663778180451825e-14, + 3.90109052736876160e-16, + 5.80459628646035737e-18, + 7.50590556997222766e-20, + 2.38747576446542670e-21, + -2.28116897817710103e-22, + -4.85716782292212162e-24, + 2.88328977921601004e-01, + -8.70557153153216079e-03, + 1.88158974520214400e-04, + -3.34172615373400235e-06, + 4.84396440344329494e-08, + -5.32159795084446215e-10, + 2.18446790070454652e-12, + 6.52854811840777559e-14, + -2.04884146926737355e-15, + 5.73451912996088868e-17, + 1.46806857985228858e-19, + -3.24580240010294786e-21, + -4.33040473315477687e-22, + -2.16810085038178010e-23, + 6.53992578475173003e-01, + -2.11237101963681340e-02, + 4.63753853154647803e-04, + -7.59009002745609326e-06, + 8.06505519727541809e-08, + -8.68489768616203479e-11, + -1.90822190923584523e-11, + 4.06643871958411992e-13, + -2.08060327945529049e-15, + -4.09949945368597337e-17, + 4.26618687727045005e-18, + -4.29578915529086047e-20, + -2.01306439492237357e-21, + -1.76048771920193462e-23, + 1.35859592662085116e+00, + -4.83066388989283751e-02, + 1.07152833668759553e-03, + -1.48480463917638037e-05, + 5.25945878003146063e-08, + 2.69620385521073146e-09, + -5.41351818639089344e-11, + -2.83897798653388761e-13, + 2.88242962838951365e-14, + -1.89184437150898840e-16, + -5.42940721116194374e-18, + 2.59886622719834330e-19, + -5.06059856981680698e-21, + -2.39390704611864572e-22, + 2.91838451541181909e+00, + -1.17981888802921139e-01, + 2.57739399533670182e-03, + -2.44253116717799109e-05, + -2.53260573296097036e-07, + 7.14760961342857432e-09, + 9.22420580273980783e-11, + -3.92190780087461883e-12, + -3.54358942010494746e-14, + 2.85537103035927359e-15, + 2.39103682729507625e-17, + -1.93468559385889001e-18, + -1.93327730453648831e-20, + 1.07093057921375470e-21, + 7.66119827184982771e+00, + -3.62257142891752482e-01, + 7.24518962744291183e-03, + -2.12467316472955911e-05, + -1.06272486068660997e-06, + -1.36575152083399178e-08, + 3.40414443033165525e-10, + 1.52931543696275579e-11, + 4.71734185902653041e-14, + -1.01130822023901297e-14, + -2.02874485804035125e-16, + 4.44065858894495918e-18, + 2.20675887363339134e-19, + -4.40043118318836395e-22, + 4.09787734830083821e+01, + -2.24507460948701887e+00, + 3.62441056612001142e-02, + 4.30799460714720029e-05, + 1.68241087468856297e-07, + -2.74818724636231956e-08, + -1.49088831182842725e-09, + -4.70863013612895046e-11, + -8.03427705267475463e-13, + 1.01138792462062586e-14, + 1.24161274675904541e-15, + 3.90217397351837867e-17, + 2.04004096076897660e-19, + -2.96318456433068354e-20, +# root=8 base[5]=12.5 */ + 9.07460473935171874e-03, + -2.43486720306224802e-04, + 4.88212788641949726e-06, + -8.72406721789476031e-08, + 1.43949487025508900e-09, + -2.33000171195890779e-11, + 3.53814292049025288e-13, + -4.70396209983665258e-15, + 1.13354865240894474e-16, + -2.17795573665254726e-19, + 4.79501372505709046e-21, + -1.61118482718992460e-21, + -3.01844944551926034e-23, + 2.39051003618122081e-25, + 8.49288131220339720e-02, + -2.32843483841371464e-03, + 4.72154736530524158e-05, + -8.37074320860027933e-07, + 1.33076725157646552e-08, + -1.99399213375695362e-10, + 2.62910184350365025e-12, + -2.51812032376246965e-14, + 6.43148446699544902e-16, + 6.90803022525326624e-18, + -1.32537479108995706e-19, + -1.27408243220363627e-20, + -3.30887453999236741e-22, + 3.30538760311647414e-24, + 2.56280825106192822e-01, + -7.34831475351886958e-03, + 1.52367899481753417e-04, + -2.64847592745802434e-06, + 3.84386934493001655e-08, + -4.63273073334744953e-10, + 3.40895296432343971e-12, + 3.30942060013846285e-14, + 5.36323362279802964e-18, + 5.08726498783065437e-17, + -7.64685549898482238e-19, + -4.23202462107319001e-20, + -9.15840524363512586e-22, + 1.01933298538124525e-23, + 5.76371567366278148e-01, + -1.77563417752324981e-02, + 3.80287537429903572e-04, + -6.33473119961015328e-06, + 7.52153363481259787e-08, + -4.16024215701622388e-10, + -8.64563734414380117e-12, + 3.43873747098096649e-13, + -1.21860078118594605e-15, + 6.10059738547900413e-17, + 5.15809448580173258e-20, + -1.47773291624546862e-19, + -1.81104470252924425e-21, + 4.37566303994327347e-23, + 1.18141038700401202e+00, + -4.04291792245670689e-02, + 8.99948618883235590e-04, + -1.36466517317030031e-05, + 9.33903413929380654e-08, + 1.39845959218035481e-09, + -5.03916445071311912e-11, + 5.04229404507529927e-13, + 1.99587469231905189e-14, + -2.81066109053333693e-16, + -2.16577472752016172e-18, + -1.35923498784776142e-19, + -8.03156339797795216e-21, + 1.43478601210856532e-22, + 2.48575676450038863e+00, + -9.85925832306492472e-02, + 2.26497944796142650e-03, + -2.72519743452207001e-05, + -9.73141500823457591e-08, + 8.01279880282459091e-09, + -1.76861610280540627e-11, + -3.40106760905647740e-12, + 6.30742296975206120e-14, + 2.04004212071882813e-15, + -6.15688542274967091e-17, + -1.52470414881335567e-18, + 3.29714557717281459e-20, + 6.99681996628043761e-22, + 6.32604703663746726e+00, + -3.05621686702128803e-01, + 6.88102607464083794e-03, + -3.98477327334985235e-05, + -1.22020066675793743e-06, + -5.58171083794520144e-10, + 7.26927550725605352e-10, + 9.96457712758730008e-12, + -3.90620846470450913e-13, + -1.16912235483672497e-14, + 1.67752032286757776e-16, + 1.00684946140089733e-17, + -6.53736213336059499e-20, + -9.04386507775286568e-21, + 3.25816454970490952e+01, + -1.95306497910665899e+00, + 3.67514474179991349e-02, + 3.89383864789857490e-05, + -8.58073637007898335e-07, + -8.12280015080618445e-08, + -3.02709869165182072e-09, + -5.41481364523072300e-11, + 8.40030966369734332e-13, + 8.92364146502795474e-14, + 2.35575856407721152e-15, + -1.20593639741477892e-17, + -2.70329951751730770e-18, + -6.83880608996333436e-20, +# root=8 base[6]=15.0 */ + 8.17265122605665903e-03, + -2.08258318128461329e-04, + 3.95944298795413002e-06, + -6.75129003257491366e-08, + 1.04982151568753622e-09, + -1.59888917209849109e-11, + 2.71057962861035603e-13, + -1.32552976903294755e-15, + 8.87165897174737563e-17, + -1.76231284031974745e-18, + -8.56760931944713326e-20, + -2.03627693696417063e-21, + 2.87513768471234245e-23, + 2.12872792295254055e-24, + 7.63116410673876505e-02, + -1.98755275449962214e-03, + 3.83270711522704574e-05, + -6.52822633004567904e-07, + 9.90632173184336106e-09, + -1.42274567495088867e-10, + 2.23469900547603985e-12, + -2.97827111857438159e-15, + 6.26907009618253061e-16, + -1.30736839065815263e-17, + -9.08179601171645579e-19, + -1.77471723942557399e-20, + 2.72774214909450646e-22, + 2.07747463967720824e-23, + 2.29138038739686273e-01, + -6.24671673964174220e-03, + 1.23985845406381822e-04, + -2.10280104370028500e-06, + 3.00726234279237279e-08, + -3.68940656210419017e-10, + 4.54688351707503511e-12, + 5.23844368376169864e-14, + 7.45693572803995282e-16, + -2.60388598808142988e-17, + -3.16395920761437003e-18, + -5.14936533806218474e-20, + 1.00710977077307855e-21, + 6.52079582557190845e-23, + 5.10977337534740728e-01, + -1.49983395902293891e-02, + 3.11189146167972330e-04, + -5.20590572286304081e-06, + 6.55846143680877533e-08, + -5.10677756641979951e-10, + 6.90611740818479906e-13, + 3.26622590533600285e-13, + -6.99877518913091567e-16, + -8.03069336515985776e-17, + -7.05016811475894072e-18, + -1.34017935873800102e-19, + 3.34962379830882520e-21, + 1.56078532374440268e-22, + 1.03309386391709968e+00, + -3.38574999800932558e-02, + 7.45880362818620722e-04, + -1.19883933556086897e-05, + 1.10739024354112650e-07, + 4.20310337200403168e-10, + -2.90669719720356339e-11, + 9.47286087959216768e-13, + 6.08218457958141120e-15, + -5.61526485057626996e-16, + -1.24799003448938944e-17, + -2.11302401818520386e-19, + 7.05153043334197895e-21, + 3.98727183875371549e-22, + 2.12553327966213601e+00, + -8.17954238829470964e-02, + 1.93375026559284300e-03, + -2.75776102338292616e-05, + 5.23795379802395632e-08, + 6.72184482155373511e-09, + -7.76111931256484001e-11, + -7.82053846557002353e-13, + 8.09921305571506206e-14, + -1.20444872925263309e-15, + -8.52987024988704622e-17, + 5.52696612244590982e-19, + 4.71513354838760707e-20, + -3.85536111909249554e-24, + 5.21016679481412481e+00, + -2.52812401467288117e-01, + 6.28860453933355497e-03, + -5.84472549213731660e-05, + -1.04301985041914029e-06, + 1.85005743619725432e-08, + 7.81359827803127248e-10, + -7.22884309674686172e-12, + -6.04008073070537171e-13, + 1.41374245870096256e-15, + 3.96205030628240237e-16, + -1.96783848322836352e-18, + -3.31913090220497888e-19, + 2.68619046976547576e-21, + 2.53598407891238651e+01, + -1.65756905234200058e+00, + 3.70687539845171790e-02, + 7.84842513237080160e-06, + -3.30150659572533502e-06, + -1.65490689148655228e-07, + -3.57352224187054398e-09, + 3.85477835598685559e-11, + 5.19546226057548459e-12, + 1.24759618061108065e-13, + -1.90016401697852484e-15, + -1.86247466386331146e-16, + -3.04582190634385880e-18, + 1.06026048423271320e-19, +# root=8 base[7]=17.5 */ + 7.39821199092032672e-03, + -1.79559891315337272e-04, + 3.24064057973829834e-06, + -5.29283794823177267e-08, + 7.93402375944014397e-10, + -9.69397329044687377e-12, + 2.58618942243628383e-13, + -2.95243265483554770e-16, + -5.08522076398722922e-17, + -6.09128242756529963e-18, + -9.48595063030161743e-20, + 2.98407883149616531e-21, + 1.98547764832867885e-22, + 3.99155455604076140e-24, + 6.89285914190828630e-02, + -1.70977447988251941e-03, + 3.13597476913258545e-05, + -5.14167224941294684e-07, + 7.59925812374589400e-09, + -8.80921313606978305e-11, + 2.30447842075084124e-12, + 1.42637636827378003e-15, + -6.17341536839921435e-16, + -5.64959993199462716e-17, + -9.19062767368285906e-19, + 3.02824496853884999e-20, + 1.89318078905452924e-21, + 3.75966916099559582e-23, + 2.05985992658625688e-01, + -5.34810433549127041e-03, + 1.01416346446736892e-04, + -1.67421361214387620e-06, + 2.39106634069579588e-08, + -2.41343274198492050e-10, + 6.01357155027321101e-12, + 3.38092258917266293e-14, + -2.78230105934485661e-15, + -1.69173332753712470e-16, + -2.87150224385418089e-18, + 1.04828940643815318e-19, + 5.98354183907318551e-21, + 1.13360135048616805e-22, + 4.55591543532020582e-01, + -1.27416261899075765e-02, + 2.54688540102154066e-04, + -4.23435098484150323e-06, + 5.62453665795045021e-08, + -3.91720295005837040e-10, + 8.65259740395022264e-12, + 1.96170037531704163e-13, + -9.41417356442452581e-15, + -3.99107264090048690e-16, + -5.94345097399203946e-18, + 2.75275346196993123e-19, + 1.46488202111904606e-20, + 2.48115038548950978e-22, + 9.08729943195353496e-01, + -2.84353408906675674e-02, + 6.12830212853379859e-04, + -1.01780843994876647e-05, + 1.14338452372001557e-07, + 4.05672517568252096e-11, + -3.60624688475582239e-12, + 7.13141754458151333e-13, + -2.38646115654539902e-14, + -1.06611850932568143e-15, + -6.14896386694700117e-18, + 7.01336472003896137e-19, + 3.21832717473236178e-20, + 4.99993944381935164e-22, + 1.82722842359443582e+00, + -6.76253581502594403e-02, + 1.61194674777004744e-03, + -2.57681535851394569e-05, + 1.67679817278353292e-07, + 4.82758191505071025e-09, + -7.39652598819072317e-11, + 5.45107491130691346e-13, + -1.17989989306290484e-14, + -3.45296481224851817e-15, + -9.59461161052957974e-18, + 2.98913218800820065e-18, + 6.00620628105417036e-20, + 5.18845379442534161e-22, + 4.29473716397221583e+00, + -2.05558490276645273e-01, + 5.50233915011527890e-03, + -7.12630890112422638e-05, + -5.12594022931571591e-07, + 3.27878045545374548e-08, + 3.35631354708747427e-10, + -2.30906675672921012e-11, + -3.23028209519784036e-13, + 1.20871868771807236e-14, + 9.78640833532780726e-17, + -6.88581814399971624e-18, + 2.32724433355725959e-19, + 1.37592595456588008e-20, + 1.93216276069171791e+01, + -1.36181877229191994e+00, + 3.67235876221690752e-02, + -7.53644668767002290e-05, + -7.27012133358969106e-06, + -2.16319347357458473e-07, + 3.03336915420966966e-10, + 2.44552534348645539e-10, + 6.17005432399210427e-12, + -1.26813864445117811e-13, + -9.95880948680104508e-15, + -7.90228523648503942e-17, + 9.20140493409453717e-18, + 2.76385137617430231e-19, +# root=8 base[8]=20.0 */ + 6.72808807365402831e-03, + -1.55972104266852439e-04, + 2.67633934884483459e-06, + -4.14566357105275772e-08, + 6.59046926033105226e-10, + -3.98915286866205760e-12, + 1.91809978171194816e-13, + -5.71294922330807560e-15, + -2.76846599198114925e-16, + -3.90624635611727721e-18, + 2.91339321954336424e-19, + 1.42989877383731190e-20, + 1.30719116157075839e-22, + -1.30012142461432110e-23, + 6.25549387093277953e-02, + -1.48162408846060274e-03, + 2.58707473115598478e-05, + -4.03721207354391070e-07, + 6.37359384325919197e-09, + -3.65728808481939449e-11, + 1.73553634017145532e-12, + -5.35178562342024180e-14, + -2.70720541449027329e-15, + -3.47732546590287297e-17, + 2.82862092284912524e-18, + 1.36950508334588650e-19, + 1.17871455243882408e-21, + -1.26334307336329068e-22, + 1.86097759606324381e-01, + -4.61094741656195833e-03, + 8.34875968602731555e-05, + -1.32235275998142180e-06, + 2.05259940174256310e-08, + -1.01810663764845739e-10, + 4.72043181367770339e-12, + -1.60043803504832731e-13, + -8.93798883823278446e-15, + -9.24408445267647465e-17, + 9.24081964886062729e-18, + 4.32035600826190796e-19, + 3.24071264092136256e-21, + -4.12526827618963485e-22, + 4.08399157911111976e-01, + -1.08925839256309824e-02, + 2.09057133303518276e-04, + -3.38474211028006302e-06, + 5.06968742359651283e-08, + -1.66264296998353751e-10, + 7.64550019072380860e-12, + -3.43283024690974387e-13, + -2.30077733847021897e-14, + -1.57692625589903455e-16, + 2.38866136846195359e-17, + 1.03055068732848730e-18, + 5.87727111858600722e-21, + -1.05417651043258412e-21, + 8.04064309141435452e-01, + -2.39900902572172149e-02, + 5.01695050013017626e-04, + -8.34209975886197916e-06, + 1.15305451639016525e-07, + 7.22191902810859449e-11, + 5.80777000693536226e-14, + -6.21732151817187010e-13, + -5.46412246416767728e-14, + -1.88472139736724495e-16, + 6.20700289328413406e-17, + 2.23249535650936732e-18, + 5.53638530862278995e-21, + -2.59129331135194136e-21, + 1.58063305527407993e+00, + -5.59143177285823037e-02, + 1.32170911800005516e-03, + -2.24063322948795452e-05, + 2.47021905339898466e-07, + 3.08274389191795123e-09, + -8.14540621448477711e-11, + -1.58541003963234119e-12, + -1.03333877824095475e-13, + -3.45357002378868635e-16, + 1.82529067365230855e-16, + 5.10516910163384316e-18, + -3.47527798270118976e-20, + -6.89283228277889417e-21, + 3.55499567634602176e+00, + -1.65048308232650986e-01, + 4.62039109907007566e-03, + -7.40163898250741618e-05, + 1.67078502822940872e-07, + 3.23357210601044649e-08, + -3.86923640958850370e-10, + -2.60244683940832308e-11, + 1.53212880006931774e-13, + 1.49068986477841003e-14, + 1.75383869705864825e-16, + 9.39659737748147067e-18, + 5.27180352727976552e-20, + -3.04335069054968688e-20, + 1.44529959441628719e+01, + -1.07393835694900464e+00, + 3.49869475613430875e-02, + -2.23253653151962012e-04, + -1.08817223511569982e-05, + -1.11525094826800597e-07, + 8.68672883616955080e-09, + 2.94691731800842655e-10, + -4.94058960738585835e-12, + -4.30204355052607005e-13, + -8.66256512363768096e-16, + 4.85684397363977042e-16, + 7.73997200434546054e-18, + -4.47288603627368660e-19, +# root=8 base[9]=22.5 */ + 6.14411708915457537e-03, + -1.36376831573064325e-04, + 2.24011205277010758e-06, + -3.13730573399058852e-08, + 6.07008033507786947e-10, + -2.32530694129536008e-12, + -9.02070304623462328e-14, + -1.33741666489746954e-14, + -6.59851094559874127e-17, + 1.83400720047207453e-17, + 6.49743219897808831e-19, + -9.99648221893417347e-21, + -1.28856828303674179e-21, + -2.43092962608335457e-23, + 5.70140802294509877e-02, + -1.29234726397210102e-03, + 2.16193221200672845e-05, + -3.06022655626251671e-07, + 5.88557324870718554e-09, + -2.27758836252057213e-11, + -9.40867035896092465e-13, + -1.26934908226037978e-13, + -5.76798172620583659e-16, + 1.78491173451081698e-16, + 6.15699615567411773e-18, + -1.00679064431031358e-19, + -1.24249501077001854e-20, + -2.28664061463919005e-22, + 1.68896988928458225e-01, + -4.00106123017126246e-03, + 6.95370188446197752e-05, + -1.00618325221097136e-06, + 1.90918648995803628e-08, + -7.42290661104135696e-11, + -3.54640806011822564e-12, + -3.92492814563085569e-13, + -1.44739571991679666e-15, + 5.83851685117531404e-16, + 1.90117280660970503e-17, + -3.53111879204940917e-19, + -3.98622252783221607e-20, + -6.93771020122972105e-22, + 3.67935684934377394e-01, + -9.36901517093502618e-03, + 1.73217171993960691e-04, + -2.59497481839235928e-06, + 4.80066620555460111e-08, + -1.77830126675395791e-10, + -1.13211235937025498e-11, + -9.03464141671686939e-13, + -1.88878179717543853e-15, + 1.48983446893201721e-15, + 4.39812298817235351e-17, + -1.00628547786629686e-18, + -9.86488941184727825e-20, + -1.54561632817035065e-21, + 7.15541439347523012e-01, + -2.03455207822934858e-02, + 4.12682589614555033e-04, + -6.49493124149969903e-06, + 1.14382941053231412e-07, + -3.17535864272221533e-10, + -3.84096100939467803e-11, + -1.82959287363261968e-12, + 2.66418906821196529e-15, + 3.62891002510121009e-15, + 9.19104274742848064e-17, + -2.90447148731798886e-18, + -2.31107333630802521e-19, + -2.92797662360233744e-21, + 1.37652029149224742e+00, + -4.63450640968440380e-02, + 1.07818118453697283e-03, + -1.80883497322997782e-05, + 2.83766661292667370e-07, + 2.69763053551757572e-10, + -1.61850476370473160e-10, + -3.34070662191251310e-12, + 5.25814091763868123e-14, + 9.16243272843616329e-15, + 1.84716865567851311e-16, + -9.76563450687814523e-18, + -5.80047057867250665e-19, + -3.78521344358492907e-21, + 2.96322686137749747e+00, + -1.31547814127970897e-01, + 3.76730330315965369e-03, + -6.69047854126555758e-05, + 6.67107667023005948e-07, + 1.54204199873664440e-08, + -9.52950981907564441e-10, + -1.06146307961233959e-11, + 8.70113766176612912e-13, + 2.36757997577278395e-14, + -8.50817894206331183e-17, + -3.71259572677081161e-17, + -1.69278123030534666e-18, + 1.13600900102822143e-20, + 1.06957717315901455e+01, + -8.07802701735060080e-01, + 3.12328480559662218e-02, + -4.01570617576635955e-04, + -1.05094419076371774e-05, + 1.64656312114822392e-07, + 1.26057515192642712e-08, + -7.36184431793365692e-11, + -1.56488385178640968e-11, + -3.07575616896599269e-14, + 1.83472073063357615e-14, + 1.51465676844000984e-16, + -1.99985883532765658e-17, + -2.53340848879198283e-19, +# root=8 base[10]=25.0 */ + 5.63229391732949971e-03, + -1.19801652242411747e-04, + 1.91965420524851843e-06, + -2.22729603412298673e-08, + 5.10397263907741225e-10, + -8.47596860297382283e-12, + -3.69918924065079353e-13, + -1.92309076345571339e-15, + 7.82091170575896209e-16, + 1.70040410085857555e-17, + -1.05780251701846435e-18, + -5.06422918966033703e-20, + 8.53529964413832394e-22, + 1.06237959817805947e-22, + 5.21695398437314745e-02, + -1.13252933349946780e-03, + 1.84898607568294758e-05, + -2.17880807652255423e-07, + 4.93567211702714898e-09, + -8.28765917354350048e-11, + -3.55358334340766234e-12, + -1.48162704719253140e-14, + 7.54666547306855143e-15, + 1.58892754981012070e-16, + -1.03559261790239414e-17, + -4.82876314580927011e-19, + 8.60945446925693476e-21, + 1.02564473632771812e-21, + 1.53935989141915114e-01, + -3.48802969990660199e-03, + 5.92218591013960076e-05, + -7.20755359637322310e-07, + 1.59361103934165059e-08, + -2.73194398980400138e-10, + -1.13287327384294605e-11, + -2.13698068263317272e-14, + 2.42346190205818065e-14, + 4.74522908002199834e-16, + -3.43022891624757554e-17, + -1.51085593295624287e-18, + 3.02925801994541297e-20, + 3.29877455291049072e-21, + 3.33051788536689708e-01, + -8.09518569159035049e-03, + 1.46498703014816343e-04, + -1.87808145329214592e-06, + 3.98915628792693835e-08, + -7.01979326012953882e-10, + -2.79065427207839645e-11, + 6.16116247747911860e-14, + 5.99764720214053349e-14, + 1.02246328304219106e-15, + -8.94504753948427728e-17, + -3.57056601934758844e-18, + 8.67190011523476283e-20, + 8.19476031708900064e-21, + 6.40311442005721543e-01, + -1.73255924967014203e-02, + 3.45308926680132594e-04, + -4.78121898072084525e-06, + 9.52881825115253519e-08, + -1.70824132423737370e-09, + -6.61596202993918523e-11, + 6.11831537166835548e-13, + 1.40026996004673384e-13, + 1.78245157325309091e-15, + -2.26869688910780683e-16, + -7.66964262071273106e-18, + 2.51417251687784202e-19, + 1.92696217828260681e-20, + 1.20712384013764318e+00, + -3.85117615404147948e-02, + 8.87787421221742723e-04, + -1.37401767023946722e-05, + 2.45110121217896914e-07, + -4.22073290232891735e-09, + -1.79226213466152661e-10, + 3.75329613865125201e-12, + 3.46265224008878357e-13, + 1.39027791486674676e-15, + -6.35059322052084810e-16, + -1.56216048807113713e-17, + 8.57532458829628024e-19, + 4.76752961918286526e-20, + 2.49250429552222430e+00, + -1.04424238049595081e-01, + 3.03452066834670109e-03, + -5.50418126693355908e-05, + 7.41930431195746140e-07, + -7.20761001921825743e-09, + -7.61028120045082282e-10, + 2.59408121909856055e-11, + 1.12139949842984516e-12, + -2.51916769447445145e-14, + -2.20617995580856221e-15, + -9.82172152976802544e-18, + 4.06232208307863470e-18, + 1.20321694293909993e-19, + 7.93018696291460046e+00, + -5.79724307250222282e-01, + 2.55627211141840789e-02, + -5.28620652660267130e-04, + -4.63614886510253003e-06, + 3.89912633190461497e-07, + 4.36668096520423929e-09, + -4.54845190713231947e-10, + -4.56855513466652522e-12, + 5.53228233400551902e-13, + 4.84465525863081533e-15, + -6.34492823501640324e-16, + -4.68201619959329767e-18, + 6.36737747753889992e-19, +# root=8 base[11]=27.5 */ + 5.18228424164161958e-03, + -1.05390579923246257e-04, + 1.69430127533052442e-06, + -1.59088859321240012e-08, + 2.63409776214234607e-10, + -1.49818698128888696e-11, + -5.79999745308735613e-14, + 2.18446872872348706e-14, + 3.36279614173698951e-16, + -4.09211749928424545e-17, + -8.69941810717713992e-19, + 7.17339234632452116e-20, + 2.08526252095795902e-21, + -1.21118612952632082e-22, + 4.79203943027818394e-02, + -9.93880877746856906e-04, + 1.62802814968650837e-05, + -1.56421287562127860e-07, + 2.54209480633763052e-09, + -1.44211992168706173e-10, + -4.71011751897414828e-13, + 2.11164871770814311e-13, + 3.05192436135814169e-15, + -3.97031088955697765e-16, + -8.06755753323600423e-18, + 7.00453822371023599e-19, + 1.96063466458780860e-20, + -1.19139434037602794e-21, + 1.40882100578413300e-01, + -3.04502194216049434e-03, + 5.18779543110112413e-05, + -5.22799386693333623e-07, + 8.18218743220165181e-09, + -4.60719286787035264e-10, + -9.16972320148898332e-13, + 6.81047314432687584e-13, + 8.46395367334378489e-15, + -1.28995536682173977e-15, + -2.36272552230145334e-17, + 2.30712094090916556e-18, + 5.93145609640992399e-20, + -3.98609428633063008e-21, + 3.02885927769173890e-01, + -7.00377750836492403e-03, + 1.27221499216653673e-04, + -1.38388816909152484e-06, + 2.04510790564409793e-08, + -1.13025890257776491e-09, + 1.22037710933953023e-13, + 1.70050972519114419e-12, + 1.52356344082556599e-14, + -3.25533593727475152e-15, + -4.85945120870396475e-17, + 5.95795064777669524e-18, + 1.30543916019991024e-19, + -1.05682848669739456e-20, + 5.76203183381116535e-01, + -1.47697918374672180e-02, + 2.95713148357533038e-04, + -3.60121242154490475e-06, + 4.92369627728251060e-08, + -2.59801622847653064e-09, + 8.63351979963705475e-12, + 4.04419558213811465e-12, + 1.30716902983926738e-14, + -7.83228808739596351e-15, + -7.34933785653616523e-17, + 1.48655211192013376e-17, + 2.35942243245169356e-19, + -2.74969924908517430e-20, + 1.06632121149556847e+00, + -3.20099893969680790e-02, + 7.43042519603553508e-04, + -1.06704630774670086e-05, + 1.32166011832843591e-07, + -6.15360769865359802e-09, + 5.05723908131744636e-11, + 1.03862916073019085e-11, + -7.04743165452885211e-14, + -2.01387251100629928e-14, + 1.18902689164258065e-17, + 4.03973874629982786e-17, + 2.24886986527614043e-19, + -8.00337916487633760e-20, + 2.11944061542892204e+00, + -8.26042101820123609e-02, + 2.43808806308664630e-03, + -4.50130218840358813e-05, + 4.89286504459760993e-07, + -1.40982866077227008e-08, + 2.23894450876500570e-10, + 3.32687312454405300e-11, + -9.00506398329928209e-13, + -6.04097289014579031e-14, + 1.58959275552640980e-15, + 1.26598773593929959e-16, + -2.48703059033618014e-18, + -2.83376216841075176e-19, + 5.97913912748560161e+00, + -4.01249575945479497e-01, + 1.90379636431894511e-02, + -5.39108197274472097e-04, + 3.17171985159820788e-06, + 3.43749101430019422e-07, + -7.47019454479552024e-09, + -2.98794521658691084e-10, + 1.23530255611934127e-11, + 2.36130245560541814e-13, + -1.70528830125287794e-14, + -1.54972925293270207e-16, + 2.01787228419922992e-17, + 1.19040889463951229e-19, +# root=8 base[12]=30.0 */ + 4.78669346347363519e-03, + -9.25503554065415041e-05, + 1.51912957296719527e-06, + -1.39556729228942014e-08, + -4.24450795276713714e-13, + -9.24956880403222947e-12, + 4.74726385130246768e-13, + 9.16589006185654817e-15, + -9.31535789278013708e-16, + -9.96612128480589485e-18, + 1.86235238990093746e-18, + 2.62584241789096317e-21, + -3.52900198475970131e-21, + 2.49095543824154298e-23, + 4.41941618207211881e-02, + -8.70668422550563339e-04, + 1.45556797799791860e-05, + -1.37405052993769979e-07, + 2.19102487740235561e-11, + -8.73162823377597785e-11, + 4.60132491002475172e-12, + 8.40910975881458338e-14, + -9.02018621109284080e-15, + -8.71792163448180232e-17, + 1.79917854695657526e-17, + 7.69407340214508472e-21, + -3.40413542988021951e-20, + 2.75536018335059427e-22, + 1.29494575803559775e-01, + -2.65354274923214339e-03, + 4.60996960055640756e-05, + -4.60332290929879429e-07, + 2.61882196549372242e-10, + -2.67378573364212311e-10, + 1.49097727684661866e-11, + 2.40319952280767171e-13, + -2.91766967817149773e-14, + -2.17676051527351775e-16, + 5.78935144602787711e-17, + -9.85045672150496361e-20, + -1.09145722602909360e-19, + 1.13236465101758973e-21, + 2.76806872732002940e-01, + -6.04850694242590418e-03, + 1.11876218968853179e-04, + -1.22158485449278322e-06, + 1.55169566171971824e-09, + -6.09124508453097180e-10, + 3.73974304558926953e-11, + 4.71482009270090007e-13, + -7.30352802121454616e-14, + -2.72940910328981708e-16, + 1.43494347345595512e-16, + -7.76359177584477040e-19, + -2.68543637578195398e-19, + 3.88545016102075663e-21, + 5.21595750707462447e-01, + -1.25672451290358683e-02, + 2.55647173648739174e-04, + -3.18177304530065998e-06, + 7.68990486568317896e-09, + -1.23337475334551288e-09, + 8.87306719314424569e-11, + 6.41704834193834466e-13, + -1.73182694112938989e-13, + 4.01615823533092704e-16, + 3.33587994534471121e-16, + -3.92986010954514077e-18, + -6.14022694017559906e-19, + 1.34362732982502808e-20, + 9.49398482429485768e-01, + -2.65503629581682193e-02, + 6.24078856857020799e-04, + -9.38803665211687881e-06, + 4.09037113404497300e-08, + -2.29062862417284167e-09, + 2.19995199932027685e-10, + -2.96553149207260559e-13, + -4.32698212904630807e-13, + 5.60599736425895241e-15, + 7.92943704305279434e-16, + -1.92384363025917269e-17, + -1.38855271242320380e-18, + 5.28572402099198589e-20, + 1.82477576699533550e+00, + -6.51453142003409064e-02, + 1.93722437844841494e-03, + -3.89097687159420191e-05, + 3.13437147844402811e-07, + -2.16811001649906431e-09, + 5.57947800814076048e-10, + -1.09240116895823632e-11, + -1.18599173335100045e-12, + 4.53780438283396420e-14, + 1.73689343954602345e-15, + -1.15449212851077222e-16, + -2.10967378446714115e-18, + 2.66126315861069320e-19, + 4.63959001800231530e+00, + -2.73511793706025241e-01, + 1.30627580966951908e-02, + -4.45088990171712043e-04, + 7.82308178480702811e-06, + 1.11868076843326759e-07, + -9.95754877729846550e-09, + 1.04166758849208293e-10, + 9.41711738544622229e-12, + -3.19010552960360601e-13, + -5.68492082465043043e-15, + 4.98398305416935750e-16, + -2.23607602867904192e-19, + -6.41849257260871405e-19, +# root=8 base[13]=32.5 */ + 4.43972408616026288e-03, + -8.10771569470386273e-05, + 1.34761422453431892e-06, + -1.47961787067742019e-08, + -6.77615043699016857e-11, + 1.99493998008510449e-12, + 3.51343300270332340e-13, + -1.42520297113548195e-14, + -2.77334886225310695e-16, + 3.13622869078220624e-17, + -1.97720880618117874e-19, + -5.16356314086928430e-20, + 1.49141628959868313e-21, + 5.88723148208690804e-23, + 4.09338207829541972e-02, + -7.60904601684374922e-04, + 1.28715164032133301e-05, + -1.44802648154481760e-07, + -5.93485672194405558e-10, + 2.03726881573412367e-11, + 3.31682354426083070e-12, + -1.38823330649426877e-13, + -2.51488701090434489e-15, + 3.02126878143059354e-16, + -2.20643970308623773e-18, + -4.91614880621946285e-19, + 1.48350605702194419e-20, + 5.47051109783034362e-22, + 1.19582743361824312e-01, + -2.30704622090855110e-03, + 4.04891331561686726e-05, + -4.79038171023944314e-07, + -1.48508622681644471e-09, + 7.27695966285523143e-11, + 1.01482876826396653e-11, + -4.54345686157733517e-13, + -6.97019974363437487e-15, + 9.66062376318569101e-16, + -9.13640817209725347e-18, + -1.53101732293664702e-18, + 5.06581541651609668e-20, + 1.60716869451840881e-21, + 2.54309803287762815e-01, + -5.21231656316774837e-03, + 9.71233971804981244e-05, + -1.24547873991996358e-06, + -1.86094236235679882e-09, + 2.08125191896096628e-10, + 2.30127131244507115e-11, + -1.15711043773764111e-12, + -1.26249648706208334e-14, + 2.36739048158474219e-15, + -3.11987775498175385e-17, + -3.57163842535733636e-18, + 1.37721619422196333e-19, + 3.30997632204081253e-21, + 4.75176724451781718e-01, + -1.06738365750205805e-02, + 2.17756446652174170e-04, + -3.14457072469382759e-06, + 2.87927678960405054e-09, + 5.75079693596255506e-10, + 4.57575822142820155e-11, + -2.80339632082621773e-12, + -1.20372001089258594e-14, + 5.39519806629349694e-15, + -1.05104586605844292e-16, + -7.39606408459937338e-18, + 3.65503991573505892e-19, + 4.94398609869386165e-21, + 8.52482128735346789e-01, + -2.19989646364140007e-02, + 5.14699881120934217e-04, + -8.84007027215062874e-06, + 4.05424236569816958e-08, + 1.67443939385101837e-09, + 7.84911110333459835e-11, + -7.14864066375249291e-12, + 4.28751117073666884e-14, + 1.23684775083425052e-14, + -3.89948287260790472e-16, + -1.33161180562384471e-17, + 1.05372035900176227e-18, + -1.24346786662771298e-21, + 1.59235401354604722e+00, + -5.14292553891278065e-02, + 1.50090092622212471e-03, + -3.36732312120706153e-05, + 3.64380069829735605e-07, + 5.00106016909647416e-09, + 3.68133156303305704e-12, + -1.92078927143450462e-11, + 5.24449882986379721e-13, + 2.52047956403699983e-14, + -1.76471351722674863e-15, + 1.08432047335519572e-18, + 3.34528487019689220e-18, + -9.44518293218270384e-20, + 3.72385057266956165e+00, + -1.88153528725513525e-01, + 8.50835028651418003e-03, + -3.13544397635970122e-04, + 8.03536781570829065e-06, + -6.92447953747570549e-08, + -4.63193851969617290e-09, + 2.16483567216650942e-10, + -1.61487320557892266e-12, + -2.02175837622912252e-13, + 7.82214068445192194e-15, + 3.11084785588101716e-17, + -1.08342962443053519e-17, + 2.40919356254913868e-19, +# root=8 base[14]=35.0 */ + 4.13583364493279922e-03, + -7.10195860320946834e-05, + 1.16596829604819884e-06, + -1.52446125525914079e-08, + 2.29050058368479535e-11, + 5.54119616582757197e-12, + -3.16470346799751542e-14, + -9.56047709245604588e-15, + 3.86110076414298489e-16, + 2.47714946843054597e-18, + -7.01117452893604473e-19, + 1.88202944947146589e-20, + 5.13312820475478226e-22, + -4.66817386646643256e-23, + 3.80849816521132770e-02, + -6.64992174509360622e-04, + 1.11006175367014849e-05, + -1.48082690329686244e-07, + 2.85976815122188749e-10, + 5.28955207760137708e-11, + -3.57671161318655823e-13, + -9.02057039382734313e-14, + 3.75192422806048337e-15, + 1.96340844356914782e-17, + -6.67805887601100284e-18, + 1.86272533861077956e-19, + 4.65692477361789151e-21, + -4.49328600364254835e-22, + 1.10965634710638625e-01, + -2.00635636366535775e-03, + 3.46769007443202074e-05, + -4.82335132707032258e-07, + 1.36440352227149745e-09, + 1.65693424851711078e-10, + -1.49947354472390894e-12, + -2.75566684645077914e-13, + 1.22151355331319095e-14, + 3.39332240643444578e-17, + -2.08240741002903309e-17, + 6.29293838772345433e-19, + 1.28974802787111003e-20, + -1.43244379141651119e-21, + 2.34919736074605257e-01, + -4.49516213576562924e-03, + 8.22034377162627976e-05, + -1.22290335067993542e-06, + 5.24932083131645091e-09, + 3.90808371083814375e-10, + -5.11846456244901953e-12, + -6.22386843841111372e-13, + 3.08221550738380860e-14, + -3.63984927542424841e-17, + -4.87614064942591456e-17, + 1.67995714605514693e-18, + 2.31346761454971474e-20, + -3.47866332013389317e-21, + 4.35729083048453314e-01, + -9.08080826832290654e-03, + 1.80800307743902332e-04, + -2.97236606420749030e-06, + 1.94015595989528812e-08, + 8.28226944873363488e-10, + -1.68866316222524768e-11, + -1.22405447564598623e-12, + 7.34843508132887900e-14, + -5.28451567387414513e-16, + -1.02229090862905907e-16, + 4.32983912231087355e-18, + 1.99651489453913749e-20, + -7.72016891096009370e-21, + 7.72069003224358452e-01, + -1.82917631319090869e-02, + 4.13777676644071874e-04, + -7.88230465061748240e-06, + 7.87643339187154199e-08, + 1.60190049813246107e-09, + -5.96520251268618162e-11, + -2.01950843901201351e-12, + 1.81772604624088034e-13, + -3.05640132983583162e-15, + -1.94955983653311981e-16, + 1.19031001617467807e-17, + -9.62884829556267850e-20, + -1.62026531893861567e-20, + 1.40824131011579090e+00, + -4.09323647516511430e-02, + 1.13471570870184797e-03, + -2.71806679087992320e-05, + 4.33433938188583867e-07, + 9.25939754519434280e-10, + -2.49005255050494060e-10, + 5.64589872103611787e-13, + 4.54225809554290467e-13, + -1.73153860290501940e-14, + -1.46710692323131784e-16, + 3.50236775190868013e-17, + -1.07099422290715330e-18, + -1.82361534481348820e-20, + 3.08644976285937522e+00, + -1.33086161444571249e-01, + 5.45717830904788887e-03, + -2.00207216979769942e-04, + 5.97873907507167382e-06, + -1.18150855823969868e-07, + 2.20385065124389607e-11, + 1.04378683192200289e-10, + -3.94129406074990633e-12, + 3.73526385196007399e-14, + 2.91223850623713115e-15, + -1.47260496521378959e-16, + 1.89986092217181969e-18, + 1.08790971342666505e-19, +# root=8 base[15]=37.5 */ + 3.86927133442076460e-03, + -6.24095474553664181e-05, + 9.88566240410915042e-07, + -1.40992052757524067e-08, + 1.11451538588684392e-10, + 2.89809120779535141e-12, + -1.41323855125206454e-13, + 5.69502112625613871e-16, + 1.85076192301297807e-16, + -8.33111485289496011e-18, + 7.12776452741477664e-20, + 8.87891527272382829e-21, + -4.46782993885380297e-22, + 5.08521887937623276e-24, + 3.55915765126729108e-02, + -5.83143335899812248e-04, + 9.38270854511221487e-06, + -1.36131205953170271e-07, + 1.12100991684175007e-09, + 2.68064087426509255e-11, + -1.36401153623540588e-12, + 6.77709997085515009e-15, + 1.73840824843937843e-15, + -8.03983137294318253e-17, + 7.58914916004591014e-19, + 8.28968665418174056e-20, + -4.30983173557777247e-21, + 5.32054763354706966e-23, + 1.03459210030439716e-01, + -1.75149286464788227e-03, + 2.91175695584978712e-05, + -4.37808558628846985e-07, + 3.91009252149551457e-09, + 7.80758962460224354e-11, + -4.37691987820052438e-12, + 3.03904476772073112e-14, + 5.25606195613073123e-15, + -2.57945780220269835e-16, + 2.91558731568354125e-18, + 2.46973356113642795e-19, + -1.38074025921464485e-20, + 1.98637449489532245e-22, + 2.18164119559987379e-01, + -3.89427716613750243e-03, + 6.82572372172663181e-05, + -1.08709803544486605e-06, + 1.09590640234084880e-08, + 1.59252868362143854e-10, + -1.07756533195814657e-11, + 1.10017823103669565e-13, + 1.16354414323455266e-14, + -6.35084612450612688e-16, + 9.14062610936728160e-18, + 5.29589714892112355e-19, + -3.38497604953719213e-20, + 6.02737476451262063e-22, + 4.02081635725879405e-01, + -7.77072618331152865e-03, + 1.47448518427161960e-04, + -2.55874826308741847e-06, + 3.03618863185481150e-08, + 2.40461637868788467e-10, + -2.46773053376226406e-11, + 3.80107026402223894e-13, + 2.19439825485453500e-14, + -1.45547357101222126e-15, + 2.80837071415287946e-17, + 9.22520447558995976e-19, + -7.66355416782439185e-20, + 1.78980535922724443e-21, + 7.04956091676763652e-01, + -1.53365919808003855e-02, + 3.27529058468531734e-04, + -6.45260463112311224e-06, + 9.47490562609442902e-08, + 1.61106268830915104e-11, + -5.68628370824083217e-11, + 1.39499795826336917e-12, + 3.18849028844923544e-14, + -3.36180329040595346e-15, + 9.32651276726908223e-17, + 9.37132388848208399e-19, + -1.70373252524737589e-19, + 5.69630736076841500e-21, + 1.26076735405321294e+00, + -3.30419980626526638e-02, + 8.49786508679907493e-04, + -2.03946495402961440e-05, + 3.99559094603245597e-07, + -3.77705176394355574e-09, + -1.18593835775991650e-10, + 6.08634845750458614e-12, + -4.15942305264251819e-14, + -7.12782317348845588e-15, + 3.56180233029343524e-16, + -4.85531773758302128e-18, + -2.99424460574775659e-19, + 1.97128595004704785e-20, + 2.62826837960116810e+00, + -9.75879017336914872e-02, + 3.55290842348128045e-03, + -1.22663949012264323e-04, + 3.79138408464217305e-06, + -9.50324464718591620e-08, + 1.47809024675664166e-09, + 1.16720054378342051e-11, + -1.73732449486411927e-12, + 6.05203899055286146e-14, + -8.21963828617577026e-16, + -2.54987995779446448e-17, + 1.84756304091979293e-18, + -4.86870576167215465e-20, +# root=8 base[16]=40.0 */ + 3.57185353814229705e-03, + -8.52035692163540144e-05, + 2.02293304321169539e-06, + -4.65239713858726760e-08, + 9.03043979856653387e-10, + -3.72106003286506663e-12, + -1.00207879143598083e-12, + 6.44434493925155450e-14, + -1.51081733899476130e-15, + -8.51613837606253989e-17, + 1.05889247277833417e-17, + -4.91851502398995583e-19, + 3.08458912922848276e-21, + 1.21295097380669618e-21, + 3.28161665742953551e-02, + -7.94222170816802353e-04, + 1.91317132901965852e-05, + -4.46596985086079628e-07, + 8.84202116330309249e-09, + -4.39988363457384417e-11, + -9.38893840119503088e-12, + 6.19976282934510024e-13, + -1.51725851055479025e-14, + -7.73382464180356368e-16, + 1.00514537763709398e-16, + -4.77903442380761511e-18, + 3.73401968606233085e-20, + 1.12735814766384836e-20, + 9.51462287726216188e-02, + -2.37331211341553112e-03, + 5.89212334952443463e-05, + -1.41873853309695815e-06, + 2.92573675170743097e-08, + -1.96514247709068014e-10, + -2.82112340648343456e-11, + 1.97627895755121987e-12, + -5.26810689625279073e-14, + -2.15516329607940104e-15, + 3.11211893884666728e-16, + -1.55475756623679067e-17, + 1.70657099915189955e-19, + 3.32421799891595793e-20, + 1.99766907789692388e-01, + -5.23161900186517714e-03, + 1.36362716462360881e-04, + -3.45168845789945611e-06, + 7.59104379100115738e-08, + -7.15178345156418794e-10, + -6.15909716199534407e-11, + 4.81536316280453898e-12, + -1.46019500193095007e-13, + -3.98687648066813960e-15, + 7.20547608321896902e-16, + -3.91208221679198573e-17, + 6.24864869856442057e-19, + 6.98666089949042682e-20, + 3.65642329927193144e-01, + -1.02971717329097111e-02, + 2.88612901284784971e-04, + -7.87006257249994384e-06, + 1.89969253327731834e-07, + -2.52154290846419805e-09, + -1.12040635033755761e-10, + 1.08674217179832263e-11, + -3.94221362847176992e-13, + -4.39825283727090603e-15, + 1.48748865847575160e-15, + -9.25351228132520299e-17, + 2.15855433596227088e-18, + 1.16551295197059233e-19, + 6.33898195150544685e-01, + -1.98740147581916993e-02, + 6.20112781080520929e-04, + -1.88703848940448286e-05, + 5.19955086765608961e-07, + -9.72998871763471789e-09, + -1.37643213802120002e-10, + 2.45645715823552580e-11, + -1.15429956535950945e-12, + 8.49197168677226862e-15, + 2.80112137891375766e-15, + -2.24456052565695817e-16, + 7.76151490035751099e-18, + 9.77447623762669793e-20, + 1.11094153155539233e+00, + -4.11289212065393817e-02, + 1.51527509268766089e-03, + -5.46242037011074997e-05, + 1.83043001720530387e-06, + -4.93397514817492150e-08, + 4.97077128781885288e-10, + 5.07852014470459124e-11, + -3.98311796499914137e-12, + 1.24569055528889881e-13, + 2.59753664552521710e-15, + -5.39751812081475579e-16, + 3.10676657465897937e-17, + -6.93815170890414347e-19, + 2.20750915142955861e+00, + -1.10445378277958764e-01, + 5.49805236272471638e-03, + -2.69055646029942952e-04, + 1.26085599344110630e-05, + -5.39935363457160163e-07, + 1.94180924464493564e-08, + -4.69495886514177224e-10, + -2.18988905797550899e-12, + 1.03664984879209532e-12, + -6.57906892516650427e-14, + 2.32768010080404960e-15, + -2.08253309143557611e-17, + -3.42752568446126479e-18, +# root=8 base[17]=44.0 */ + 3.26020215477281503e-03, + -7.10191855621242522e-05, + 1.54605305072904978e-06, + -3.34772229938327771e-08, + 7.01653463253946404e-10, + -1.24122255382686073e-11, + 3.72902287200207198e-14, + 1.38850648032065523e-14, + -9.88359199389086292e-16, + 4.06924179662303635e-17, + -6.95354376200595457e-19, + -4.45096068231797714e-20, + 4.80327841974095612e-21, + -2.37640070306620046e-22, + 2.99146812481699276e-02, + -6.60321729996455492e-04, + 1.45661286296324894e-05, + -3.19622030716035812e-07, + 6.79402764438915784e-09, + -1.22747264402377292e-10, + 4.95713781576379173e-13, + 1.29071558794734861e-13, + -9.41758667253045897e-15, + 3.94064966849904048e-16, + -7.10497770407879511e-18, + -4.02784273572397089e-19, + 4.53336766369948608e-20, + -2.28415060299543115e-21, + 8.64985317076327614e-02, + -1.96254316588699400e-03, + 4.44986264370031683e-05, + -1.00377047752807039e-06, + 2.19694320236635050e-08, + -4.14262462054252514e-10, + 2.52024785876195654e-12, + 3.80729261161146597e-13, + -2.94110935520502540e-14, + 1.27393759391360264e-15, + -2.54494200505069510e-17, + -1.11320081628388040e-18, + 1.38611312752780200e-19, + -7.26471499966356628e-21, + 1.80787195782381643e-01, + -4.28717205217601146e-03, + 1.01599211015108830e-04, + -2.39583899726754288e-06, + 5.49499015933101676e-08, + -1.10682254881060371e-09, + 1.00897408387019519e-11, + 8.00521066499776734e-13, + -6.92155919653283065e-14, + 3.17921790855629974e-15, + -7.34050266364550583e-17, + -2.02362717546338763e-18, + 3.13886066734200304e-19, + -1.76171932599414575e-20, + 3.28540528755432826e-01, + -8.31873018884644704e-03, + 2.10494213445106053e-04, + -5.30143976709106421e-06, + 1.30280609784883690e-07, + -2.87874618570297663e-09, + 3.78944128585330117e-11, + 1.33111163098952990e-12, + -1.47513972463113491e-13, + 7.46606835250755034e-15, + -2.07077844556097317e-16, + -2.10563753505497487e-18, + 6.23140451043604847e-19, + -3.93723299814432220e-20, + 5.63069570823990562e-01, + -1.56925354870680323e-02, + 4.37056315355854505e-04, + -1.21204198081379655e-05, + 3.29280151637214005e-07, + -8.25888841271967923e-09, + 1.52195319500363537e-10, + 1.00066936620042988e-12, + -2.99882705676182101e-13, + 1.81832345223652789e-14, + -6.35207294892377004e-16, + 4.81875435152056343e-18, + 1.08109237710944395e-18, + -8.71884201838431556e-20, + 9.67130015626574857e-01, + -3.12000547933581653e-02, + 1.00585627027237313e-03, + -3.23054342608360275e-05, + 1.02134559434705976e-06, + -3.06411893367281414e-08, + 7.85848551651696963e-10, + -1.10902790156138969e-11, + -4.36842007299375574e-13, + 4.71822065712365042e-14, + -2.32902777821251486e-15, + 6.30513029436500692e-17, + 5.59097970356077137e-19, + -1.73892754621626157e-19, + 1.83718866543172843e+00, + -7.66239747139521726e-02, + 3.19358772708650419e-03, + -1.32700086914088746e-04, + 5.45906899515049852e-06, + -2.18831972939449047e-07, + 8.29189433517830247e-09, + -2.81121903720267804e-10, + 7.57378003967573632e-12, + -9.68138528886585943e-14, + -5.19318098591161430e-15, + 4.98271974081693477e-16, + -2.44020608178503371e-17, + 7.85807676258513500e-19, +# root=8 base[18]=48.0 */ + 2.99856350304111754e-03, + -6.00849203148867472e-05, + 1.20389022646349467e-06, + -2.41051399008791802e-08, + 4.80278599256325947e-10, + -9.30561748783194363e-12, + 1.56725666067385927e-13, + -8.66504684860455361e-16, + -1.25331825835847777e-16, + 9.75284945549286748e-18, + -4.77012810093690693e-19, + 1.63682331494778381e-20, + -2.76379267461597343e-22, + -1.08008783918776845e-23, + 2.74845344027609163e-02, + -5.57464832408681400e-04, + 1.13061751235693086e-05, + -2.29149346775338908e-07, + 4.62200891367131144e-09, + -9.07465760127555105e-11, + 1.55970814282807971e-12, + -1.01217964781446011e-14, + -1.14765981413136714e-15, + 9.21529851801964235e-17, + -4.56195047824191235e-18, + 1.58644767279859684e-19, + -2.80380660592110588e-21, + -9.55336062185106809e-23, + 7.92916981117167824e-02, + -1.64935590566272637e-03, + 3.43060047921154009e-05, + -7.13078503645616400e-07, + 1.47540328738529315e-08, + -2.97710427807345874e-10, + 5.33005007047269423e-12, + -4.45656120002926177e-14, + -3.26212676685421185e-15, + 2.82529411536940251e-16, + -1.43664026995341604e-17, + 5.13827451646574438e-19, + -9.91104988051474618e-21, + -2.48594935157311520e-22, + 1.65101030680878003e-01, + -3.57600554235206966e-03, + 7.74489654006261071e-05, + -1.67631243543423530e-06, + 3.61281967852943177e-08, + -7.61452616256954354e-10, + 1.45057408447840095e-11, + -1.60566673283592066e-13, + -6.30252689857801437e-15, + 6.43224284529993069e-16, + -3.43477677871181858e-17, + 1.28663750450219938e-18, + -2.80842379149727040e-20, + -3.82456401396068550e-22, + 2.98275310427758344e-01, + -6.85783062987224863e-03, + 1.57661314106253561e-04, + -3.62243111038724379e-06, + 8.29129378839856388e-08, + -1.86239072448651320e-09, + 3.86466232326757597e-11, + -5.62955849887357412e-13, + -8.03481555765923422e-15, + 1.29019477456075327e-15, + -7.54844986295444891e-17, + 3.04063014222360030e-18, + -7.75729620196162110e-20, + -7.85053563942960879e-23, + 5.06482684219258683e-01, + -1.26995749175896639e-02, + 3.18406956963401616e-04, + -7.97870393861260476e-06, + 1.99285365240414739e-07, + -4.90486248650871639e-09, + 1.14136001759941871e-10, + -2.16132077756296740e-12, + 8.20144940252720120e-15, + 2.28282912456834933e-15, + -1.64914339440676796e-16, + 7.51054249308407057e-18, + -2.32325411259140483e-19, + 2.80351862397185235e-21, + 8.56306748264232143e-01, + -2.44665625635644389e-02, + 6.99012697897725336e-04, + -1.99609122320992419e-05, + 5.68551294868178041e-07, + -1.60297335107393666e-08, + 4.36911210702266783e-10, + -1.07719163075955471e-11, + 1.91772398190453171e-13, + 1.08020323781413199e-15, + -3.34894902451689576e-16, + 2.04884201444704198e-17, + -8.31245257982904811e-19, + 2.19169591154909334e-20, + 1.57343718183565828e+00, + -5.62338403317474561e-02, + 2.00962048520265035e-03, + -7.17880155368827861e-05, + 2.56007001097309825e-06, + -9.07932278027151650e-08, + 3.17304797412886228e-09, + -1.07263824641869340e-10, + 3.38909784683278616e-12, + -9.36589893496866289e-14, + 1.89846248549865873e-15, + -3.27015706790969994e-18, + -2.24231007995541972e-18, + 1.44585248098780905e-19, +# root=8 base[19]=52.0 */ + 2.77582144961239412e-03, + -5.14930891101108001e-05, + 9.55220351891090945e-07, + -1.77185070208804901e-08, + 3.28468473410767703e-10, + -6.06574313339846467e-12, + 1.09711918553160250e-13, + -1.79583375157164043e-15, + 1.60816425637498597e-17, + 7.56266770268090696e-19, + -6.87359708591230848e-20, + 3.64016466107331420e-21, + -1.48649546355177591e-22, + 4.62325102868799937e-24, + 2.54197673443282042e-02, + -4.76882811103670427e-04, + 8.94641349127619577e-06, + -1.67824562807977299e-07, + 3.14637520991265263e-09, + -5.87682019829197320e-11, + 1.07606591591598021e-12, + -1.79329306007438848e-14, + 1.73929466768951600e-16, + 6.69800253800842047e-18, + -6.43479432739884558e-19, + 3.45262640493855648e-20, + -1.42189033819753187e-21, + 4.47138699578511727e-23, + 7.31940992000924412e-02, + -1.40553255038199988e-03, + 2.69900036128269777e-05, + -5.18244729849750986e-07, + 9.94548904069564278e-09, + -1.90194998682337042e-10, + 3.57175978511306573e-12, + -6.17071728899462745e-14, + 6.87598131753398681e-16, + 1.73889132290240545e-17, + -1.93143995778289773e-18, + 1.06807080458968398e-19, + -4.48076445518310864e-21, + 1.44192801186407054e-22, + 1.51921283903368065e-01, + -3.02809299673309322e-03, + 6.03555189066417569e-05, + -1.20291711213114567e-06, + 2.39623878610618021e-08, + -4.75838497782053244e-10, + 9.30157863891864712e-12, + -1.69714326763799773e-13, + 2.24373339428776121e-15, + 2.57416257207479310e-17, + -4.22006284122163760e-18, + 2.47604906197988575e-19, + -1.07340806007084689e-20, + 3.58661593612607405e-22, + 2.73119749623144337e-01, + -5.75039523635841477e-03, + 1.21070816342262172e-04, + -2.54890477771264114e-06, + 5.36371191677486489e-08, + -1.12566627334802204e-09, + 2.33248373672989856e-11, + -4.58683810633250156e-13, + 7.28680421692923826e-15, + -5.46046101088010222e-18, + -7.75900710446005640e-18, + 5.16304121034387570e-19, + -2.37253647644757020e-20, + 8.40057986976909313e-22, + 4.60240309386788948e-01, + -1.04876775439869830e-02, + 2.38985291295787882e-04, + -5.44549438522217935e-06, + 1.24030662546921550e-07, + -2.81895329778545789e-09, + 6.34678942484761775e-11, + -1.37928784751531225e-12, + 2.64754822229131880e-14, + -2.89721818978260029e-16, + -1.03878077158182564e-17, + 1.01751797046622026e-18, + -5.27790475016887136e-20, + 2.05429617995029500e-21, + 7.68297973739587081e-01, + -1.96990613665586137e-02, + 5.05078093767525054e-04, + -1.29493638753392608e-05, + 3.31893205182880047e-07, + -8.49335171342091937e-09, + 2.16042857455575693e-10, + -5.38654858701468196e-12, + 1.26593764381473214e-13, + -2.49982507097268870e-15, + 2.24509783991654547e-17, + 1.41821862606513599e-18, + -1.16815936686279284e-19, + 5.59843361446717242e-21, + 1.37602957877206444e+00, + -4.30217834897520107e-02, + 1.34507396749617520e-03, + -4.20517977675101683e-05, + 1.31439466512012885e-06, + -4.10470162037529371e-08, + 1.27816113325453501e-09, + -3.94882875195888980e-11, + 1.19749949136747912e-12, + -3.49199675142859813e-14, + 9.42412527088881986e-16, + -2.17183118522939057e-17, + 3.28489549734383843e-19, + 3.38931560211472704e-21, +# root=8 base[20]=56.0 */ + 2.58390106163016537e-03, + -4.46208416011107989e-05, + 7.70547499408149080e-07, + -1.33063315887040646e-08, + 2.29769140401417406e-10, + -3.96584215819879857e-12, + 6.82689477167906385e-14, + -1.15913682769138822e-15, + 1.84674818734523519e-17, + -2.13868254874953834e-19, + -2.51044322779151237e-21, + 3.62955110996566486e-22, + -2.05588292427766162e-23, + 8.99946569302238767e-25, + 2.36437249975224584e-02, + -4.12592275127385429e-04, + 7.19989340437237822e-06, + -1.25640118011623420e-07, + 2.19232805400825856e-09, + -3.82383141921392619e-11, + 6.65244985683295343e-13, + -1.14231113432172715e-14, + 1.84783713997917401e-16, + -2.23678224092488070e-18, + -1.93779772270479709e-20, + 3.35207220925532028e-21, + -1.93534045495442375e-22, + 8.54073006713298560e-24, + 6.79678951679815319e-02, + -1.21204465309885127e-03, + 2.16139030952898358e-05, + -3.85429657421531880e-07, + 6.87278896420047539e-09, + -1.22503357233071588e-10, + 2.17841898600148855e-12, + -3.82843744044540066e-14, + 6.38530509251676538e-16, + -8.38139407469207048e-18, + -2.87320414896368870e-20, + 9.73736092428614615e-21, + -5.88730826754484718e-22, + 2.64640217068131985e-23, + 1.40691516701160618e-01, + -2.59712298519110957e-03, + 4.79420831438518119e-05, + -8.84990724072948189e-07, + 1.63357101304736482e-08, + -3.01426029823107331e-10, + 5.55045892788444134e-12, + -1.01193183473659575e-13, + 1.76819066590086448e-15, + -2.58255100635068527e-17, + 7.08523659143776891e-20, + 1.98190381057106929e-20, + -1.32317208659140863e-21, + 6.16040310429459466e-23, + 2.51880150513000167e-01, + -4.89112005075126310e-03, + 9.49778820777582699e-05, + -1.84431114422625335e-06, + 3.58117419281933382e-08, + -6.95154404975354775e-10, + 1.34710132099443409e-11, + -2.59018277446559938e-13, + 4.82637579609186643e-15, + -7.97543819857112309e-17, + 7.11139404127689130e-19, + 3.01568131406308627e-20, + -2.59945865884661242e-21, + 1.29854119510602094e-22, + 4.21742090498415767e-01, + -8.80724838715795863e-03, + 1.83921848151794216e-04, + -3.84082137822114842e-06, + 8.02041930933543533e-08, + -1.67440306005991198e-09, + 3.49111953081944460e-11, + -7.23899638370877971e-13, + 1.47060478617255161e-14, + -2.78612340433234942e-16, + 4.09108257961209659e-18, + 6.42219417929311205e-21, + -4.41241529110076199e-21, + 2.64638612472388636e-22, + 6.96711283366049927e-01, + -1.62010353229807627e-02, + 3.76731965814771849e-04, + -8.76032261578379451e-06, + 2.03701004057841994e-07, + -4.73571083139451500e-09, + 1.10003396265930441e-10, + -2.54679510774402856e-12, + 5.83183907883276453e-14, + -1.29253890009227710e-15, + 2.61338075372406386e-17, + -3.94543515910542239e-19, + -1.03013569206217771e-21, + 4.50845220062689513e-22, + 1.22270184995625764e+00, + -3.39753203374487597e-02, + 9.44074629346681364e-04, + -2.62329618551681001e-05, + 7.28916668482286506e-07, + -2.02515998123828571e-08, + 5.62407216527914081e-10, + -1.55963398860345127e-11, + 4.30779677835526442e-13, + -1.17819132805889454e-14, + 3.15356964127771993e-16, + -8.08055310415669630e-18, + 1.90064202750540913e-19, + -3.73075743435619506e-21, +# root=8 base[21]=60.0 */ + 2.41681612501159875e-03, + -3.90381682522216860e-05, + 6.30572806736091195e-07, + -1.01854643923177957e-08, + 1.64522101196328975e-10, + -2.65735480191550647e-12, + 4.29092444012005018e-14, + -6.91726039788416189e-16, + 1.10590545775231821e-17, + -1.70349853719635966e-19, + 2.22195834570832156e-21, + -5.86043553243500430e-24, + -1.41969686351378509e-24, + 9.06596576761320978e-26, + 2.20997772622799904e-02, + -3.60480521042588298e-04, + 5.87997788272413657e-06, + -9.59112111420306455e-08, + 1.56444721401816061e-09, + -2.55173071970170599e-11, + 4.16092023763331163e-13, + -6.77421586342489624e-15, + 1.09428120412424990e-16, + -1.70729812576414228e-18, + 2.28801396240054749e-20, + -9.12188228579124474e-23, + -1.27495076297043733e-23, + 8.45640757549724785e-25, + 6.34386612335690325e-02, + -1.05593405590506196e-03, + 1.75759807945116269e-05, + -2.92551371184589555e-07, + 4.86948065067789501e-09, + -8.10487907531537833e-11, + 1.34865237703233033e-12, + -2.24095107128691224e-14, + 3.69779781692766234e-16, + -5.92041622861604378e-18, + 8.35064426375468895e-20, + -5.34563501966098090e-22, + -3.44011015753310425e-23, + 2.51787671978271049e-24, + 1.31008561566182125e-01, + -2.25203805830834344e-03, + 3.87125480811988589e-05, + -6.65468636792003511e-07, + 1.14393536839533969e-08, + -1.96634739219496924e-10, + 3.37925906253321016e-12, + -5.80030744149820030e-14, + 9.89863384980490146e-16, + -1.64900441460859411e-17, + 2.49651942993717886e-19, + -2.36137973939060813e-21, + -5.75214208078070055e-23, + 5.41909090143171128e-24, + 2.33707637618923492e-01, + -4.21103672180300065e-03, + 7.58761238255318491e-05, + -1.36716538921855179e-06, + 2.46340150231043710e-08, + -4.43849904277119173e-10, + 7.99568533288708592e-12, + -1.43896875832147444e-13, + 2.57833958326511154e-15, + -4.53993415007544304e-17, + 7.49636479875879277e-19, + -9.58182350125890077e-21, + -2.81890305954372889e-23, + 9.64787883437853871e-24, + 3.89191722037353416e-01, + -7.50069752032585073e-03, + 1.44557188985361992e-04, + -2.78597720825555323e-06, + 5.36925295515501840e-08, + -1.03475915080755223e-09, + 1.99389295885416101e-11, + -3.83934858810519448e-13, + 7.37089768777869740e-15, + -1.39956047828267907e-16, + 2.56061169043744419e-18, + -4.14362574254433754e-20, + 3.89644118297719984e-22, + 1.13280171377049253e-23, + 6.37338843347625250e-01, + -1.35586414178660592e-02, + 2.88444290703385414e-04, + -6.13631375095648837e-06, + 1.30542484556322598e-07, + -2.77707736833824725e-09, + 5.90719089124214314e-11, + -1.25597993035190827e-12, + 2.66594630842711128e-14, + -5.62676180649513263e-16, + 1.16755436980277703e-17, + -2.31081578466600443e-19, + 4.00704875531896981e-21, + -4.25147952607249174e-23, + 1.10015659829037671e+00, + -2.75102963338480083e-02, + 6.87916955275371289e-04, + -1.72019079422024229e-05, + 4.30146378369867115e-07, + -1.07559985141388378e-08, + 2.68944006239537188e-10, + -6.72332567065700867e-12, + 1.67963282354766830e-13, + -4.18797779730734663e-15, + 1.03908936418255492e-16, + -2.54917678933252545e-18, + 6.10781118737767575e-20, + -1.39627292185938874e-21, +# root=8 base[22]=64.0 */ + 2.27003679403200466e-03, + -3.44414437357765617e-05, + 5.22552342383409149e-07, + -7.92826641053022970e-09, + 1.20289164082538163e-10, + -1.82504371828475371e-12, + 2.76890862350352348e-14, + -4.20020553330706050e-16, + 6.36537132925650908e-18, + -9.60233498422266652e-20, + 1.41949284283897157e-21, + -1.92778927334637085e-23, + 1.69818437690541749e-25, + 3.41714150329826273e-27, + 2.07451992650437567e-02, + -3.17654461255923056e-04, + 4.86398589121818478e-06, + -7.44782802068609671e-08, + 1.14042521529738368e-09, + -1.74623430580711411e-11, + 2.67378945328616355e-13, + -4.09337620002857507e-15, + 6.26107156856542973e-17, + -9.53535472168170452e-19, + 1.42509747934418758e-20, + -1.97069007583733008e-22, + 1.86833177093370939e-24, + 2.75984003662915646e-26, + 5.94756274654247227e-02, + -9.28156914568799242e-04, + 1.44845089138777807e-05, + -2.26040433926073972e-07, + 3.52751064816450209e-09, + -5.50489635106931311e-11, + 8.59052537650905442e-13, + -1.34037475340915428e-14, + 2.08970898253460435e-16, + -3.24559426639577404e-18, + 4.95975117290598366e-20, + -7.10289454762514919e-22, + 7.61545693026315621e-24, + 5.11754241727969270e-26, + 1.22573266147433357e-01, + -1.97144142211383823e-03, + 3.17082296530980337e-05, + -5.09988166521516115e-07, + 8.20253431768000573e-09, + -1.31927320259429568e-10, + 2.12183847290255280e-12, + -3.41220047357722351e-14, + 5.48359802461863541e-16, + -8.78519887307831291e-18, + 1.38957286213931849e-19, + -2.09277128121411790e-21, + 2.58948157035419379e-23, + -3.46187452943674000e-26, + 2.17982251906109870e-01, + -3.66356431151581598e-03, + 6.15724597661962240e-05, + -1.03483039069552241e-06, + 1.73920874387191094e-08, + -2.92302901080305384e-10, + 4.91254857501491761e-12, + -8.25535640672092842e-14, + 1.38656169491510859e-15, + -2.32350793786574746e-17, + 3.85841180822574653e-19, + -6.20040732823259554e-21, + 8.86115258479307081e-23, + -7.18099160204970187e-25, + 3.61308849746550531e-01, + -6.46478284417998771e-03, + 1.15672276391820699e-04, + -2.06968671173249041e-06, + 3.70322261753242954e-08, + -6.62604062479047639e-10, + 1.18555670963373090e-11, + -2.12108208630914909e-13, + 3.79346082720964807e-15, + -6.77422807896228226e-17, + 1.20298716662468882e-18, + -2.09662969786152004e-20, + 3.44299008829054233e-22, + -4.62227252245573885e-24, + 5.87298155078030848e-01, + -1.15138963612725336e-02, + 2.25728291464590301e-04, + -4.42537075583188198e-06, + 8.67587383718216082e-08, + -1.70088940363115675e-09, + 3.33453035471940334e-11, + -6.53690156656299973e-13, + 1.28119881117363504e-14, + -2.50903995399972314e-16, + 4.90005467470574106e-18, + -9.48951693779995623e-20, + 1.79506014149224776e-21, + -3.18822213462902044e-23, + 9.99960889580852497e-01, + -2.27300019151022957e-02, + 5.16673193219303341e-04, + -1.17444417090722182e-05, + 2.66961570070023983e-07, + -6.06826653821892139e-09, + 1.37936161162848667e-10, + -3.13531445831608214e-12, + 7.12597649673883028e-14, + -1.61910919388821330e-15, + 3.67553823810344116e-17, + -8.32426226096003572e-19, + 1.87473229253682313e-20, + -4.16906088741461623e-22, +# root=8 base[23]=68.0 */ + 2.14007211511192544e-03, + -3.06114209174877902e-05, + 4.37863324256046432e-07, + -6.26316206786694401e-09, + 8.95877683906618179e-11, + -1.28145593177811882e-12, + 1.83297992022526056e-14, + -2.62183406462699265e-16, + 3.74983918181929774e-18, + -5.36048574257156302e-20, + 7.64467004028370685e-22, + -1.07898215112943609e-23, + 1.46039596012050654e-25, + -1.65854310359613314e-27, + 1.95471504094672059e-02, + -2.82031791672656437e-04, + 4.06923412558524635e-06, + -5.87120559594287906e-08, + 8.47114056717933006e-10, + -1.22223968078312580e-11, + 1.76347771257464211e-13, + -2.54435264157225928e-15, + 3.67068021148233532e-17, + -5.29312580597217850e-19, + 7.61567846937255417e-21, + -1.08526837806933048e-22, + 1.48833750606992993e-24, + -1.74497439325222762e-26, + 5.59788255786598521e-02, + -8.22248280445168748e-04, + 1.20776423517584725e-05, + -1.77403161494280139e-07, + 2.60579672945212183e-09, + -3.82753887999925132e-11, + 5.62209076012123693e-13, + -8.25791384114805867e-15, + 1.21285401923116062e-16, + -1.78060034189597981e-18, + 2.60904178601383617e-20, + -3.79171632018694838e-22, + 5.33683650162712073e-24, + -6.62908588667394730e-26, + 1.15158979259905536e-01, + -1.74020796065466510e-03, + 2.62968963897486391e-05, + -3.97381677372554548e-07, + 6.00497456127384309e-09, + -9.07432668353952009e-11, + 1.37125082105801072e-12, + -2.07211752716661062e-14, + 3.13099797354873443e-16, + -4.72936194627600750e-18, + 7.13256896091239412e-20, + -1.06884846333383791e-21, + 1.56359324281012975e-23, + -2.09371689364012792e-25, + 2.04240647761614907e-01, + -3.21633209256455554e-03, + 5.06500162516063682e-05, + -7.97624146896418379e-07, + 1.25607909574460180e-08, + -1.97804240806778432e-10, + 3.11496787107574409e-12, + -4.90532114910686138e-14, + 7.72428778205281816e-16, + -1.21600992219162587e-17, + 1.91216249226301583e-19, + -2.99351188418558775e-21, + 4.61199549798236666e-23, + -6.72744397521201450e-25, + 3.37156186503503652e-01, + -5.62959266145115610e-03, + 9.39989085134447765e-05, + -1.56952648572810106e-06, + 2.62068292212763356e-08, + -4.37582794217601854e-10, + 7.30643437155375483e-12, + -1.21996578560993657e-13, + 2.03691795137986874e-15, + -3.40035203398695957e-17, + 5.67233984037221836e-19, + -9.43718128092930259e-21, + 1.55600275175673093e-22, + -2.49358406793313753e-24, + 5.44548122718652938e-01, + -9.89922014501001639e-03, + 1.79955738306078255e-04, + -3.27137564593378753e-06, + 5.94696148287788762e-08, + -1.08108484535182362e-09, + 1.96527833819944031e-11, + -3.57261573866269135e-13, + 6.49439350468494036e-15, + -1.18045207687094994e-16, + 2.14484671360583997e-18, + -3.89216115757823181e-20, + 7.03510994398533416e-22, + -1.25706849505857592e-23, + 9.16506739167220918e-01, + -1.90959226794404531e-02, + 3.97874066113556896e-04, + -8.28992528480038838e-06, + 1.72725156579336618e-07, + -3.59882340374692018e-09, + 7.49834227175032297e-11, + -1.56231614811946965e-12, + 3.25512786467952614e-14, + -6.78188130204948748e-16, + 1.41278316308932761e-17, + -2.94191632175299286e-19, + 6.11958335713723054e-21, + -1.26906826765086446e-22, +# root=8 base[24]=72.0 */ + 2.02418825957775958e-03, + -2.73865822271705235e-05, + 3.70531190728796199e-07, + -5.01316163323553321e-09, + 6.78263804768600500e-11, + -9.17667960027563512e-13, + 1.24157348246188108e-14, + -1.67980461470857398e-16, + 2.27269759981285233e-18, + -3.07471007234836824e-20, + 4.15872033393980364e-22, + -5.61835721775932179e-24, + 7.55236730469557511e-26, + -9.95066529424091699e-28, + 1.84799714166971538e-02, + -2.52082877637978449e-04, + 3.43862962582328616e-06, + -4.69058978261361417e-08, + 6.39837227860754290e-10, + -8.72793593634578875e-12, + 1.19056614613687731e-13, + -1.62403360242462338e-15, + 2.21530330716498694e-17, + -3.02170540308455164e-19, + 4.12069706810027084e-21, + -5.61330203542108746e-23, + 7.61128105557160309e-25, + -1.01328305449681143e-26, + 5.28705215755885041e-02, + -7.33487492919459054e-04, + 1.01758765798540948e-05, + -1.41172774118269692e-07, + 1.95852926925866886e-09, + -2.71712223622254657e-11, + 3.76953886922659282e-13, + -5.22958006843052894e-15, + 7.25508359686442536e-17, + -1.00647006344898279e-18, + 1.39595470173679256e-20, + -1.93435326437994685e-22, + 2.66991626058352388e-24, + -3.62926542622535675e-26, + 1.08590834343520432e-01, + -1.54740097259104849e-03, + 2.20502014229407051e-05, + -3.14211630566264067e-07, + 4.47746243887590257e-09, + -6.38030793392176725e-11, + 9.09182929448105423e-13, + -1.29556886906907936e-14, + 1.84615083407302753e-16, + -2.63062872452553696e-18, + 3.74783550265491092e-20, + -5.33556495754152328e-22, + 7.57302378721474245e-24, + -1.06259700993010972e-25, + 1.92129557799838258e-01, + -2.84627778980033877e-03, + 4.21658038951860828e-05, + -6.24659695658021928e-07, + 9.25393799743417816e-09, + -1.37091232108830553e-10, + 2.03091957997572337e-12, + -3.00867613027127921e-14, + 4.45713838882710068e-16, + -6.60276470309171892e-18, + 9.78008745185682891e-20, + -1.44787521446137407e-21, + 2.13905307453030566e-23, + -3.13614046620648954e-25, + 3.16031772417886325e-01, + -4.94641890672203530e-03, + 7.74196208609731728e-05, + -1.21174486162012719e-06, + 1.89658072665363180e-08, + -2.96846186523917508e-10, + 4.64613235018427373e-12, + -7.27195905481249576e-14, + 1.13817697363595836e-15, + -1.78139657447784437e-17, + 2.78789871352436447e-19, + -4.36166196291204000e-21, + 6.81554457671998686e-23, + -1.06037080407283522e-24, + 5.07602770242956414e-01, + -8.60191661314835959e-03, + 1.45769435780753191e-04, + -2.47023185197290385e-06, + 4.18609385672775725e-08, + -7.09382060888881317e-10, + 1.20212994007275342e-11, + -2.03714739221703775e-13, + 3.45217306765134660e-15, + -5.85003227501448152e-17, + 9.91300574870011229e-19, + -1.67950657651933025e-20, + 2.84389823610547697e-22, + -4.80570450035884208e-24, + 8.45918832975616097e-01, + -1.62687664130772743e-02, + 3.12881981443155466e-04, + -6.01736676388803274e-06, + 1.15726391704649027e-07, + -2.22565753080636782e-09, + 4.28039894317810022e-11, + -8.23208911735360039e-13, + 1.58319872399050141e-14, + -3.04480108083238196e-16, + 5.85565403741221732e-18, + -1.12607750313933974e-19, + 2.16515468826454390e-21, + -4.15957332646649792e-23, +# root=8 base[25]=76.0 */ + 1.92021375924548900e-03, + -2.46458127346772285e-05, + 3.16327326803058771e-07, + -4.06003968134304456e-09, + 5.21103326075829905e-11, + -6.68832566849715573e-13, + 8.58442031508175588e-15, + -1.10180439013214330e-16, + 1.41415741534325011e-18, + -1.81505296053647390e-20, + 2.32954498738752868e-22, + -2.98952927636779561e-24, + 3.83442770454998909e-26, + -4.90603354237448317e-28, + 1.75233225220964781e-02, + -2.26663617136582446e-04, + 2.93188664813067907e-06, + -3.79238601502309325e-08, + 4.90543919725511107e-10, + -6.34516992669522232e-12, + 8.20745694250323758e-14, + -1.06163183481284484e-15, + 1.37321644888860080e-17, + -1.77624324352864284e-19, + 2.29750628663203813e-21, + -2.97142101419279804e-23, + 3.84109268281717940e-25, + -4.95400356182234422e-27, + 5.00893578651388643e-02, + -6.58362389565423658e-04, + 8.65335581185035409e-06, + -1.13737613194233676e-07, + 1.49493964367876631e-09, + -1.96491246234271250e-11, + 2.58263332883099348e-13, + -3.39455040921733543e-15, + 4.46171206813361801e-17, + -5.86434300543490850e-19, + 7.70777616576956622e-21, + -1.01297371562460801e-22, + 1.33070488673985239e-24, + -1.74469226187091904e-26, + 1.02731754086218180e-01, + -1.38495349493845846e-03, + 1.86709182589430376e-05, + -2.51707504911946026e-07, + 3.39333433659006766e-09, + -4.57464226714175010e-11, + 6.16719415719121468e-13, + -8.31415419859385509e-15, + 1.12085214551315354e-16, + -1.51104485905134345e-18, + 2.03704089134698060e-20, + -2.74593087804226704e-22, + 3.70027997481818921e-24, + -4.97866705190523483e-26, + 1.81374924217156175e-01, + -2.53661043889498840e-03, + 3.54756455253160639e-05, + -4.96142965483822046e-07, + 6.93878401745744162e-09, + -9.70420361681609533e-11, + 1.35717680366322412e-12, + -1.89807308818998383e-14, + 2.65453999261473128e-16, + -3.71248461355757111e-18, + 5.19200455836649965e-20, + -7.26075680930451512e-22, + 1.01514343553833940e-23, + -1.41772398318648296e-25, + 2.97399451827833783e-01, + -4.38048199831548787e-03, + 6.45213782998769531e-05, + -9.50353924361230836e-07, + 1.39980360817453173e-08, + -2.06181096308981884e-10, + 3.03690060307988873e-12, + -4.47313795240110927e-14, + 6.58861129653024476e-16, + -9.70453683375034209e-18, + 1.42939549238077237e-19, + -2.10530503465852347e-21, + 3.10039085646361413e-23, + -4.56242857425267293e-25, + 4.75354447685307602e-01, + -7.54393129210709484e-03, + 1.19723081622851807e-04, + -1.90001946176193112e-06, + 3.01535335201926121e-08, + -4.78540142104180374e-10, + 7.59448860005808145e-12, + -1.20525427788603789e-13, + 1.91275238062531124e-15, + -3.03555718324943788e-17, + 4.81743896108839460e-19, + -7.64515370912813005e-21, + 1.21318361234001808e-22, + -1.92422062855399649e-24, + 7.85432951734772122e-01, + -1.40261220835330522e-02, + 2.50475995777346976e-04, + -4.47295582390664770e-06, + 7.98772502712763318e-08, + -1.42643374079417147e-09, + 2.54730001864721303e-11, + -4.54892301544000981e-13, + 8.12338499117171144e-15, + -1.45065889296927776e-16, + 2.59055504981028987e-18, + -4.62612703905406646e-20, + 8.26100268013759116e-22, + -1.47462047269846856e-23, +# root=8 base[26]=80.0 */ + 1.82640193822583476e-03, + -2.22968507717616353e-05, + 2.72201613419842458e-07, + -3.32305755224319465e-09, + 4.05681338796266325e-11, + -4.95258797207421355e-13, + 6.04615624627354760e-15, + -7.38119249059342376e-17, + 9.01101426851920966e-19, + -1.10007094305712938e-20, + 1.34297185683068385e-22, + -1.63948975279255696e-24, + 2.00137362746601688e-26, + -2.44219422903813966e-28, + 1.66608724984440050e-02, + -2.04904437408900714e-04, + 2.52002579539448578e-06, + -3.09926426667798660e-08, + 3.81164312373917858e-10, + -4.68776524095972411e-12, + 5.76526768835288052e-14, + -7.09043854145938929e-16, + 8.72020508436037064e-18, + -1.07245771369004719e-19, + 1.31896387994610798e-21, + -1.62211441142800020e-23, + 1.99484560802053240e-25, + -2.45231660456993237e-27, + 4.75862551948879123e-02, + -5.94216153043046176e-04, + 7.42005932366796875e-06, + -9.26553074748651396e-08, + 1.15699964498097733e-09, + -1.44476146579393736e-11, + 1.80409363208312397e-13, + -2.25279666849525931e-15, + 2.81309824795882819e-17, + -3.51275365155080898e-19, + 4.38641602040312538e-21, + -5.47732257978443279e-23, + 6.83925686337358385e-25, + -8.53692077820390764e-27, + 9.74727625280955162e-02, + -1.24680979730309332e-03, + 1.59484006642663660e-05, + -2.04001832755941703e-07, + 2.60946214254843368e-09, + -3.33785857756373175e-11, + 4.26957712712942081e-13, + -5.46137241563248125e-15, + 6.98584116976037751e-17, + -8.93584295709093956e-19, + 1.14301464339248743e-20, + -1.46205977088930727e-22, + 1.87009774537107201e-24, + -2.39127901577672052e-26, + 1.71760869412890566e-01, + -2.27486962573843904e-03, + 3.01292828325593095e-05, + -3.99044267738824143e-07, + 5.28510182268495519e-09, + -6.99980015577824081e-11, + 9.27081517861170998e-13, + -1.22786382236886471e-14, + 1.62623188622395571e-16, + -2.15384609132999992e-18, + 2.85263652616608358e-20, + -3.77812263746357125e-22, + 5.00374975800250588e-24, + -6.62515672226410590e-26, + 2.80842631071695770e-01, + -3.90641011448395435e-03, + 5.43366223436590723e-05, + -7.55800963337060169e-07, + 1.05128929907753350e-08, + -1.46230190740845124e-10, + 2.03400421698650408e-12, + -2.82921954860291291e-14, + 3.93533259407472337e-16, + -5.47389146047881140e-18, + 7.61396073942000278e-20, + -1.05906759469729197e-21, + 1.47309402317914956e-23, + -2.04846219271678917e-25, + 4.46960584961997975e-01, + -6.66981408506559133e-03, + 9.95309685598362879e-05, + -1.48526084477197550e-06, + 2.21639536812026971e-08, + -3.30743818161621431e-10, + 4.93555774361839198e-12, + -7.36513544666807237e-14, + 1.09906969455155524e-15, + -1.64009760652435764e-17, + 2.44745091400864308e-19, + -3.65222502004966846e-21, + 5.45001746169243719e-23, + -8.13073226992775054e-25, + 7.33024196940218697e-01, + -1.22172613056625301e-02, + 2.03624211088640884e-04, + -3.39379000776910833e-06, + 5.65640527480728633e-08, + -9.42748978541322082e-10, + 1.57127290778060383e-11, + -2.61882919405978267e-13, + 4.36478365102496779e-15, + -7.27475303912876306e-17, + 1.21247758023373006e-18, + -2.02082585818197615e-20, + 3.36808430279584037e-22, + -5.61193665788261396e-24, +# root=8 base[27]=84.0 */ + 1.74133185478072866e-03, + -2.02684149306282439e-05, + 2.35916343385243667e-07, + -2.74597304558626550e-09, + 3.19620415393234404e-11, + -3.72025537905448938e-13, + 4.33023030392289494e-15, + -5.04021701954472047e-17, + 5.86661349368969247e-19, + -6.82850619971741951e-21, + 7.94811019604463315e-23, + -9.25127727408065218e-25, + 1.07680630955175653e-26, + -1.25315613348404109e-28, + 1.58793572704828412e-02, + -1.86134869527163803e-04, + 2.18183828625708571e-06, + -2.55751021797797438e-08, + 2.99786586213083264e-10, + -3.51404254971310131e-12, + 4.11909525264132984e-14, + -4.82832676459195174e-16, + 5.65967472275384097e-18, + -6.63416518640305830e-20, + 7.77644372957251655e-22, + -9.11539418714059777e-24, + 1.06848413479564793e-25, + -1.25225351282684277e-27, + 4.53214868671503665e-02, + -5.39008960784535265e-04, + 6.41043972492890732e-06, + -7.62394328419577284e-08, + 9.06716445278872086e-10, + -1.07835890364096870e-11, + 1.28249347530621804e-13, + -1.52527095398433868e-15, + 1.81400648192517039e-17, + -2.15739993514861702e-19, + 2.56579785544761682e-21, + -3.05150384593586591e-23, + 3.62914102997748915e-25, + -4.31543759856618657e-27, + 9.27261330152824303e-02, + -1.12835226542552466e-03, + 1.37305287462066040e-05, + -1.67082058881058432e-07, + 2.03316382900693197e-09, + -2.47408679498794790e-11, + 3.01063071338280131e-13, + -3.66353246305588557e-15, + 4.45802602716304579e-17, + -5.42481770079125599e-19, + 6.60127241499938880e-21, + -8.03285491025246645e-23, + 9.77486889681330969e-25, + -1.18927364600673351e-26, + 1.63115030507890085e-01, + -2.05165102329824206e-03, + 2.58055429244891877e-05, + -3.24580563685289666e-07, + 4.08255476858266746e-09, + -5.13501278363483051e-11, + 6.45878813195726337e-13, + -8.12382478513845087e-15, + 1.02180978338546520e-16, + -1.28522616898766722e-18, + 1.61654958576374625e-20, + -2.03328530899554987e-22, + 2.55744738232103126e-24, + -3.21619437877025878e-26, + 2.66032699795050898e-01, + -3.50534235362643222e-03, + 4.61876492085123579e-05, + -6.08585046536630366e-07, + 8.01893504464524185e-09, + -1.05660366806634730e-10, + 1.39221892324946074e-12, + -1.83443763112958744e-14, + 2.41712087207132683e-16, + -3.18488519801181934e-18, + 4.19651880672785994e-20, + -5.52948197097788655e-22, + 7.28583172505707165e-24, + -9.59833603964307726e-26, + 4.21768841189311572e-01, + -5.93929439135586386e-03, + 8.36363771390069783e-05, + -1.17775666939810381e-06, + 1.65850174261618880e-08, + -2.33548075058789165e-10, + 3.28879385297992983e-12, + -4.63123706038240343e-14, + 6.52164825413223535e-16, + -9.18370084603864363e-18, + 1.29323685266493722e-19, + -1.82111910023700502e-21, + 2.56447406886529992e-23, + -3.61052999584158033e-25, + 6.87175196233182572e-01, + -1.07370952980312857e-02, + 1.67766846171038395e-04, + -2.62135278610568308e-06, + 4.09585718874251380e-08, + -6.39976663937447965e-10, + 9.99961940825241203e-12, + -1.56243803776416923e-13, + 2.44130553468844830e-15, + -3.81453379464042045e-17, + 5.96019943581710764e-19, + -9.31279601908427499e-21, + 1.45512149134378103e-22, + -2.27306590616802871e-24, +# root=8 base[28]=88.0 */ + 1.66383573396666914e-03, + -1.85047282442303858e-05, + 2.05804551736882792e-07, + -2.28890221767106036e-09, + 2.54565475731435353e-11, + -2.83120794475433624e-13, + 3.14879242889989638e-15, + -3.50200124949237950e-17, + 3.89483048700336984e-19, + -4.33172446875026561e-21, + 4.81762601957806857e-23, + -5.35803217501714137e-25, + 5.95905500258666018e-27, + -6.62666428256979467e-29, + 1.51678919865331774e-02, + -1.69831239982553287e-04, + 1.90155956408573900e-06, + -2.12913052753863590e-08, + 2.38393626416663802e-10, + -2.66923612155325373e-12, + 2.98867951282320685e-14, + -3.34635259806148690e-16, + 3.74683055196938347e-18, + -4.19523608337459234e-20, + 4.69730493373720909e-22, + -5.25945905280955438e-24, + 5.88888746600839092e-26, + -6.59280543154229105e-28, + 4.32625517176491864e-02, + -4.91153681012058518e-04, + 5.57599884412927597e-06, + -6.33035327062277673e-08, + 7.18676126934199889e-10, + -8.15902925705517470e-12, + 9.26283146503591756e-14, + -1.05159626280225625e-15, + 1.19386248572526062e-17, + -1.35537533135963426e-19, + 1.53873858678632548e-21, + -1.74690822950356328e-23, + 1.98323969797115240e-25, + -2.25124999143338146e-27, + 8.84204483462148472e-02, + -1.02601017135946410e-03, + 1.19055816999613881e-05, + -1.38149581330803018e-07, + 1.60305538216060852e-09, + -1.86014791613468096e-11, + 2.15847207052252166e-13, + -2.50464043140861876e-15, + 2.90632608847367573e-17, + -3.37243271253715167e-19, + 3.91329189409994715e-21, + -4.54089202787495569e-23, + 5.26914319074047938e-25, + -6.11335843594274058e-27, + 1.55298118228728355e-01, + -1.85974903111433025e-03, + 2.22711420986869134e-05, + -2.66704680084014983e-07, + 3.19388139429589006e-09, + -3.82478416112334666e-11, + 4.58031218857571562e-13, + -5.48508330424758819e-15, + 6.56857821312020872e-17, + -7.86610108062029681e-19, + 9.41992983503995156e-21, + -1.12806935005444468e-22, + 1.35090201495450784e-24, + -1.61751856551544598e-26, + 2.52706961703493216e-01, + -3.16302170829191450e-03, + 3.95901492372206432e-05, + -4.95532456358579175e-07, + 6.20236144686994455e-09, + -7.76322257482501138e-11, + 9.71688368413502624e-13, + -1.21621952249768505e-14, + 1.52228839498396431e-16, + -1.90538131747282956e-18, + 2.38488184194848799e-20, + -2.98505145818594930e-22, + 3.73625680975657770e-24, + -4.67577250462555204e-26, + 3.99266269387000106e-01, + -5.32255372923881240e-03, + 7.09540984870293216e-05, + -9.45877552057524136e-07, + 1.26093398769611404e-08, + -1.68093060023309918e-10, + 2.24082125659876271e-12, + -2.98720238853876091e-14, + 3.98219094150499461e-16, + -5.30859400396496846e-18, + 7.07680034648672102e-20, + -9.43396735559418780e-22, + 1.25762671948360375e-23, + -1.67622329324482179e-25, + 6.46726405765125412e-01, + -9.51053957017418405e-03, + 1.39858775070177366e-04, + -2.05671579617561180e-06, + 3.02453661853946024e-08, + -4.44778115376732294e-10, + 6.54075638249268884e-12, + -9.61861489490503872e-14, + 1.41448094200574520e-15, + -2.08008778473781931e-17, + 3.05890666967359375e-19, + -4.49832455846556606e-21, + 6.61508330179906927e-23, + -9.72581311507390597e-25, +# root=8 base[29]=92.0 */ + 1.59294497689035854e-03, + -1.69616401811934288e-05, + 1.80607140742487484e-07, + -1.92310053383537820e-09, + 2.04771286895628936e-11, + -2.18039978665416254e-13, + 2.32168450065179895e-15, + -2.47212412767312383e-17, + 2.63231188425798677e-19, + -2.80287942578457953e-21, + 2.98449933600760307e-23, + -3.17788777085984264e-25, + 3.38380718686709680e-27, + -3.60266075524525875e-29, + 1.45174603352078851e-02, + -1.55579721979315588e-04, + 1.66730608055865077e-06, + -1.78680713071170052e-08, + 1.91487319550375128e-10, + -2.05211815636656046e-12, + 2.19919989353709321e-14, + -2.35682343958789234e-16, + 2.52574435896517921e-18, + -2.70677236961886783e-20, + 2.90077522323733897e-22, + -3.10868285706469068e-24, + 3.33149175936883663e-26, + -3.56985965187805783e-28, + 4.13826024590201527e-02, + -4.49400443636610710e-04, + 4.88033005997575186e-06, + -5.29986603964327021e-08, + 5.75546729278051914e-10, + -6.25023415884219369e-12, + 6.78753349695109275e-14, + -7.37102159716893985e-16, + 8.00466906128110478e-18, + -8.69278782206744364e-20, + 9.44006048242821705e-22, + -1.02515721574424588e-23, + 1.11328447812556840e-25, + -1.20884488660014880e-27, + 8.44969780634705625e-02, + -9.36987223359381683e-04, + 1.03902539103735586e-05, + -1.15217554338652868e-07, + 1.27764777860978594e-09, + -1.41678397493886164e-11, + 1.57107214151580780e-13, + -1.74216233208837521e-15, + 1.93188429170137446e-17, + -2.14226702503570389e-19, + 2.37556049513453022e-21, + -2.63425968100742822e-23, + 2.92113118569559421e-25, + -3.23884455383087285e-27, + 1.48196345215333702e-01, + -1.69356748249086908e-03, + 1.93538566257010095e-05, + -2.21173215806716697e-07, + 2.52753713827373302e-09, + -2.88843473295418899e-11, + 3.30086354823402560e-13, + -3.77218153477479857e-15, + 4.31079725752860260e-17, + -4.92631990885696351e-19, + 5.62973074031474185e-21, + -6.43357896477355772e-23, + 7.35220545768631129e-25, + -8.40090163531457211e-27, + 2.40652892637004318e-01, + -2.86850933607241858e-03, + 3.41917594298194775e-05, + -4.07555380142968680e-07, + 4.85793625871789793e-09, + -5.79051236803383398e-11, + 6.90211474557302658e-13, + -8.22711099349632571e-15, + 9.80646624896773691e-17, + -1.16890097100369593e-18, + 1.39329442939380696e-20, + -1.66076460899295779e-22, + 1.97958087672642344e-24, + -2.35926491370262406e-26, + 3.79043960789123335e-01, + -4.79713115457315077e-03, + 6.07118690567373288e-05, + -7.68361532256333271e-07, + 9.72428379201388326e-09, + -1.23069273119306439e-10, + 1.55754874189834352e-12, + -1.97121346531089587e-14, + 2.49474216843656603e-16, + -3.15731329779596581e-18, + 3.99585471597320835e-20, + -5.05710184292345610e-22, + 6.40020223315897845e-24, + -8.09871544763605842e-26, + 6.10776465041671823e-01, + -8.48278983852494839e-03, + 1.17813516995407847e-04, + -1.63625706295239495e-06, + 2.27252122196297286e-08, + -3.15619887681567496e-10, + 4.38349761214000466e-12, + -6.08803566111710724e-14, + 8.45538916419355250e-16, + -1.17432961790340041e-17, + 1.63097170881398448e-19, + -2.26518063867182301e-21, + 3.14600375822851406e-23, + -4.36849539653955963e-25, +# root=8 base[30]=96.0 */ + 1.52784942447275053e-03, + -1.56038349561190994e-05, + 1.59361034823066664e-07, + -1.62754473443847573e-09, + 1.66220172047665066e-11, + -1.69759669340749544e-13, + 1.73374536794586938e-15, + -1.77066379343615875e-17, + 1.80836836097718614e-19, + -1.84687581069355477e-21, + 1.88620323912196728e-23, + -1.92636810648048318e-25, + 1.96738822100695302e-27, + -2.00907226577365857e-29, + 1.39205300117127024e-02, + -1.43049799619782597e-04, + 1.47000474508098658e-06, + -1.51060257078597110e-08, + 1.55232160610438557e-10, + -1.59519281601958525e-12, + 1.63924802068970788e-14, + -1.68451991906537788e-16, + 1.73104211315909277e-18, + -1.77884913297998563e-20, + 1.82797646212038765e-22, + -1.87846056379524943e-24, + 1.93033888452125455e-26, + -1.98344050575467750e-28, + 3.96592672359805179e-02, + -4.12754148306232027e-04, + 4.29574217623062749e-06, + -4.47079718529094763e-08, + 4.65298582922504448e-10, + -4.84259880949176232e-12, + 5.03993867387226876e-14, + -5.24532029921718369e-16, + 5.45907139386435555e-18, + -5.68153302051624947e-20, + 5.91306014031697417e-22, + -6.15402217835479394e-24, + 6.40480353251191816e-26, + -6.66508251597466788e-28, + 8.09069805048406310e-02, + -8.59068396128616720e-04, + 9.12156781308677945e-06, + -9.68525902520617011e-08, + 1.02837850145405846e-09, + -1.09192984875320101e-11, + 1.15940851827642785e-13, + -1.23105720920328622e-15, + 1.30713361894535823e-17, + -1.38791136999789591e-19, + 1.47368099404559855e-21, + -1.56475097672371168e-23, + 1.66144884485397685e-25, + -1.76392355359386557e-27, + 1.41715843835058447e-01, + -1.54870672904234923e-03, + 1.69246604167465743e-05, + -1.84956986917279383e-07, + 2.02125692138966181e-09, + -2.20888089190856728e-11, + 2.41392113145331137e-13, + -2.63799431206171569e-15, + 2.88286717398997093e-17, + -3.15047045584769584e-19, + 3.44291411776005745e-21, + -3.76250397732367938e-23, + 4.11175982934849714e-25, + -4.49289895795262742e-27, + 2.29696705561114406e-01, + -2.61329909309197198e-03, + 2.97319551591839109e-05, + -3.38265589240998460e-07, + 3.84850603507033620e-09, + -4.37851178868230911e-11, + 4.98150848898941965e-13, + -5.66754825007355722e-15, + 6.44806753574740856e-17, + -7.33607780841180535e-19, + 8.34638243347677157e-21, + -9.49582345471984563e-23, + 1.08035621706904720e-24, + -1.22898084437554695e-26, + 3.60771933652955956e-01, + -4.34584729034012164e-03, + 5.23499388650457354e-05, + -6.30605706110658814e-07, + 7.59625637012623453e-09, + -9.15042637285581875e-11, + 1.10225746374675944e-12, + -1.32777585095875797e-14, + 1.59943458617753642e-16, + -1.92667383851715275e-18, + 2.32086520578557666e-20, + -2.79570687856103012e-22, + 3.36769958213611978e-24, + -4.05613167926716761e-26, + 5.78614103921186951e-01, + -7.61308605926387487e-03, + 1.00168798086630400e-04, + -1.31796593812448232e-06, + 1.73410707449447765e-08, + -2.28164268804325585e-10, + 3.00205992609703919e-12, + -3.94994529472388744e-14, + 5.19712071557267870e-16, + -6.83808552191625846e-18, + 8.99717673763044719e-20, + -1.18379901781075666e-21, + 1.55757757489384419e-23, + -2.04902015915163345e-25, +# root=9 base[0]=0.0 */ + 1.35683006972334326e-02, + -4.43607400043899913e-04, + 1.08307401446566973e-05, + -2.33596297774629671e-07, + 4.68177075118849630e-09, + -8.90897088672236107e-11, + 1.62512578136060688e-12, + -2.85445339925645837e-14, + 4.82919035999979748e-16, + -7.85257635861952352e-18, + 1.21916250333440309e-19, + -1.78684940808575021e-21, + 2.41109764249986331e-23, + -2.84186778764373738e-25, + 1.26959051789267890e-01, + -4.16471808683120150e-03, + 9.86227733315914775e-05, + -1.95582222893770712e-06, + 3.32300971964937518e-08, + -4.68796403126265395e-10, + 4.77879088620894210e-12, + -9.28655496553580231e-15, + -1.09548768179586079e-15, + 3.44628456148186799e-17, + -6.65550324572800706e-19, + 8.44060761715827021e-21, + -2.70144596932032470e-23, + -2.17021342534255759e-24, + 3.82475025320030360e-01, + -1.26272764368530275e-02, + 2.81003753650410301e-04, + -4.64960289997075985e-06, + 5.08117320639066962e-08, + -7.24415327865169724e-11, + -1.14242806831328651e-11, + 2.68213744634426282e-13, + -2.23616892554526461e-15, + -4.42298424767661022e-17, + 1.89658143008142580e-18, + -2.85262577010708171e-20, + -7.17586866285387042e-23, + 1.36970789168609407e-23, + 8.54564317729498812e-01, + -2.84670349296474966e-02, + 5.75812949400783558e-04, + -6.97622889730326947e-06, + 1.26779729126555084e-08, + 1.28391642290517352e-09, + -1.90296475066133231e-11, + -1.79886575231349398e-13, + 9.54482510802416555e-15, + -6.52267201412179850e-17, + -3.05562107718715173e-18, + 7.44548358319878461e-20, + 2.45079971705169757e-22, + -3.84613616287432794e-23, + 1.71690005489939201e+00, + -5.78078594319405212e-02, + 1.02654767018898682e-03, + -7.38602240134023570e-06, + -8.20653920292212270e-08, + 1.62699750354024151e-09, + 2.19076876077530942e-11, + -6.35496402298929813e-13, + -6.77451643111233030e-15, + 2.90641021370221109e-16, + 2.03642275621707276e-18, + -1.42344572934671191e-19, + -4.65098899530524006e-22, + 7.18781221689112524e-23, + 3.41283238063643335e+00, + -1.16220126895126702e-01, + 1.75240037654669279e-03, + -4.74641118249211270e-06, + -1.65505320355898543e-07, + -7.16713523991772078e-10, + 4.48858682718828214e-11, + 6.62717413336642953e-13, + -1.21144750077762048e-14, + -3.92583636762534218e-16, + 1.96689238746750901e-18, + 2.02302050662366260e-19, + 8.68115821796522659e-22, + -9.31820022411102726e-23, + 7.32877043805366402e+00, + -2.52250033264349083e-01, + 3.15267331365191731e-03, + 8.98594980113704288e-07, + -1.41164087044512909e-07, + -3.43642167953206522e-09, + -2.57241309607894672e-11, + 7.03842823092457765e-13, + 2.41310744852497647e-14, + 1.98928834880051355e-16, + -6.42188319001159534e-18, + -2.23760234919659103e-19, + -1.70334223814256608e-21, + 7.09208427126124898e-23, + 1.97616655371919165e+01, + -6.86052525102584743e-01, + 7.11925995278420848e-03, + 7.84922270903972781e-06, + 1.66790282511384717e-08, + -2.06539232655644243e-09, + -6.72794375874714943e-11, + -1.26653189546463165e-12, + -1.28483503000877045e-14, + 1.00045145901093778e-16, + 8.02065826765291361e-18, + 1.99172627740952798e-19, + 2.64023898787686345e-21, + -5.66531849953565045e-24, + 1.09356031967805251e+02, + -3.81648916112280956e+00, + 3.45728498445044483e-02, + 1.30080033282947810e-05, + 1.96381383782992627e-07, + 2.61016479351778289e-09, + 2.62443172718592758e-11, + 4.40379375622037807e-14, + -7.34142870376132676e-15, + -2.72415705105442877e-16, + -7.03071911724925824e-18, + -1.52546795224574005e-19, + -2.92029390849295569e-21, + -5.00711114154680868e-23, +# root=9 base[1]=2.5 */ + 1.19510447226312978e-02, + -3.67023540047811442e-04, + 8.42442632875218725e-06, + -1.71066525012038962e-07, + 3.23329541094770912e-09, + -5.81624373495036100e-11, + 1.00563951339610486e-12, + -1.68084123524682386e-14, + 2.71803656773374680e-16, + -4.25535606224040552e-18, + 6.41523270492337022e-20, + -9.29562520327600475e-22, + 1.26643960684875676e-23, + -1.62546167511558546e-25, + 1.11741372388522123e-01, + -3.46124954784381676e-03, + 7.80533914410993216e-05, + -1.49306321473529396e-06, + 2.49637964002770913e-08, + -3.60206935895791920e-10, + 4.18191052126930861e-12, + -2.89383264130566886e-14, + -2.50112219868663909e-16, + 1.46164025271407516e-17, + -3.46972658435832963e-19, + 5.75726323369122142e-21, + -6.54494785717104299e-23, + 1.32214972262971920e-25, + 3.36127869116798039e-01, + -1.05888014184089673e-02, + 2.29996972468710022e-04, + -3.86070935980000389e-06, + 4.71830607916780527e-08, + -2.65598855241895797e-10, + -5.06522735465263841e-12, + 1.83390970265145469e-13, + -2.75976582164760921e-15, + 7.44822657294611922e-18, + 7.44050541748471080e-19, + -2.12551594620011896e-20, + 2.65136371549665942e-22, + 1.03180089540127479e-24, + 7.49386222526950085e-01, + -2.41901576777666903e-02, + 4.94079032263172627e-04, + -6.59389574157480269e-06, + 3.35478102538541954e-08, + 7.98422671216504255e-10, + -2.02745664525019331e-11, + 7.07461510932843358e-14, + 5.77245165260739972e-15, + -1.24417718732052403e-16, + -8.01386098757611895e-20, + 5.16453789001113134e-20, + -9.05720154290512159e-22, + -5.84144679498887172e-24, + 1.50150398514556915e+00, + -4.99697016797023899e-02, + 9.31186165471306442e-04, + -8.41654517366483370e-06, + -4.57934099495526468e-08, + 1.92468561144052965e-09, + 2.69322083032876675e-12, + -6.81269778681632429e-13, + 3.67899980428641384e-15, + 2.52764826726229666e-16, + -3.51390096892971305e-18, + -8.73012370898809194e-20, + 2.31736659798854912e-21, + 2.28460050942574326e-23, + 2.97556507424969618e+00, + -1.02474450631743041e-01, + 1.67928649225979922e-03, + -7.44527681633035838e-06, + -1.67842374058394804e-07, + 5.27332056460542190e-10, + 5.60994406001099236e-11, + 8.14887609551163427e-14, + -2.27133421493965605e-14, + -1.42653058246540640e-16, + 9.88288349437619170e-18, + 1.13990335260696600e-19, + -4.44078696041886691e-21, + -7.97894573794092396e-23, + 6.37022005152403992e+00, + -2.27029312250787263e-01, + 3.14755023394289526e-03, + -1.93506825316283260e-06, + -2.13998998630135287e-07, + -3.72570082555989449e-09, + 5.40160706731629180e-12, + 1.52103438520981087e-12, + 2.42048414954320059e-14, + -2.60758481668076113e-16, + -1.61523312999876015e-17, + -1.62701850934108909e-19, + 5.23177802914421418e-21, + 1.79297802278814241e-22, + 1.71319616078805979e+01, + -6.28720918513702487e-01, + 7.21336965126116638e-03, + 7.68506673737020449e-06, + -4.38648205255667499e-08, + -4.14610772034891930e-09, + -1.07405828772225036e-10, + -1.53891108317722740e-12, + -1.05097744651529928e-15, + 6.28537429561859083e-16, + 1.89693385281740133e-17, + 2.70223926899673718e-19, + -1.07745733993476690e-21, + -1.68761266597541180e-22, + 9.46443104500628181e+01, + -3.53922437300646164e+00, + 3.47496317606406507e-02, + 1.66017580480392832e-05, + 2.54799280329066014e-07, + 3.21689953050908634e-09, + 2.22371054818891343e-11, + -4.18112385155432575e-13, + -2.42843055968473454e-14, + -7.40446690620158796e-16, + -1.80034393175912484e-17, + -3.79745406555666239e-19, + -7.18737411346919155e-21, + -1.23261413139090115e-22, +# root=9 base[2]=5.0 */ + 1.06058751979215011e-02, + -3.07040481816570055e-04, + 6.64748671402196798e-06, + -1.27472421536485109e-07, + 2.27781610096820653e-09, + -3.88175169472969525e-11, + 6.36857347560821744e-13, + -1.01369423391223731e-14, + 1.56372879392830908e-16, + -2.35497005714759095e-18, + 3.40675271471668524e-20, + -4.86733326339277888e-22, + 6.50862073046984111e-24, + -7.81910489336870220e-26, + 9.90406628042979076e-02, + -2.90221279821656526e-03, + 6.23123050811907609e-05, + -1.14610875798937517e-06, + 1.86947610155094805e-08, + -2.70067062748696373e-10, + 3.32219899482783426e-12, + -3.07595499817607394e-14, + 7.92291623749498043e-17, + 4.92859073199011564e-18, + -1.57446902243415494e-19, + 3.02141877155812495e-21, + -4.54518439092151567e-23, + 5.17311254309683670e-25, + 2.97176742790256854e-01, + -8.92174456337485947e-03, + 1.88005691750694717e-04, + -3.15331005978539024e-06, + 4.10214508460679766e-08, + -3.35112262297831673e-10, + -1.09487915595090453e-12, + 1.03508644803775220e-13, + -2.14715731487860422e-15, + 2.22295350078300763e-17, + 8.28183698575715560e-20, + -9.32194800866760336e-21, + 2.05836232926936449e-22, + -2.10565703531261504e-24, + 6.60043991962039445e-01, + -2.05438608882748570e-02, + 4.18616821973708030e-04, + -5.95482459160059727e-06, + 4.49013652310660485e-08, + 3.52411833878039754e-10, + -1.63634761363125461e-11, + 1.86844191845858262e-13, + 1.66462001060846993e-15, + -9.51501816883319744e-17, + 1.23594832378995513e-18, + 1.00694743488216314e-20, + -6.87740772573101709e-22, + 1.03833724848678859e-23, + 1.31587076307937645e+00, + -4.29337448785612197e-02, + 8.27056193107107186e-04, + -8.84392749109078925e-06, + -8.09803403167470115e-09, + 1.78100930604783946e-09, + -1.35930416754415535e-11, + -4.50539220516113275e-13, + 9.63523803769123557e-15, + 6.96776765471368273e-17, + -4.81223822136642212e-18, + 2.41004669229716133e-20, + 1.83900750798296369e-21, + -3.21429406804136174e-23, + 2.59190721596412210e+00, + -8.94419105622929617e-02, + 1.57441379251181506e-03, + -9.97396243460120665e-06, + -1.44081158296829960e-07, + 1.81711646664154975e-09, + 4.80137872892175743e-11, + -6.45613437670363035e-13, + -2.01737638776580755e-14, + 2.80493503988011127e-16, + 9.37940562472808036e-18, + -1.39606375213480553e-19, + -4.74748000137456749e-21, + 7.49376074747603669e-23, + 5.51222705145427483e+00, + -2.02005540926569194e-01, + 3.10139238590208689e-03, + -5.93222269562591795e-06, + -2.83368453920635957e-07, + -3.01084749901503658e-09, + 5.64805147453334637e-11, + 2.01245736856397563e-12, + 2.37468067148932328e-15, + -9.44065629987809311e-16, + -1.46954219592254296e-17, + 2.86359808310692482e-19, + 1.21099713873374185e-20, + 1.97177220769001481e-23, + 1.47330495264586450e+01, + -5.70664293269662837e-01, + 7.29814981759320438e-03, + 6.16539985398450605e-06, + -1.55964727672587699e-07, + -7.21804193186125992e-09, + -1.46396938516079596e-10, + -1.04330937679071776e-12, + 3.76659392544906090e-14, + 1.56808189381131745e-15, + 2.53264319789797975e-17, + -1.09076086048701194e-19, + -1.70343125776608351e-20, + -4.21949500959816539e-22, + 8.10447732935200236e+01, + -3.26035607849479758e+00, + 3.49755151918264701e-02, + 2.12163159178740564e-05, + 3.22946484249609354e-07, + 3.49175707611926082e-09, + -5.57106433668435142e-12, + -1.80045332637189376e-12, + -6.90342723706409426e-14, + -1.92070941670958633e-15, + -4.46846384565424639e-17, + -8.77719581003771707e-19, + -1.20303340548188739e-20, + 9.04765993695837991e-23, +# root=9 base[3]=7.5 */ + 9.47518830288169439e-03, + -2.59413746548616062e-04, + 5.31331731509419074e-06, + -9.64949538383912720e-08, + 1.63394199690794041e-09, + -2.64433849366212829e-11, + 4.11990189760411228e-13, + -6.26336718947366526e-15, + 9.17091030743309873e-17, + -1.34037372739754686e-18, + 1.84248368828047630e-20, + -2.42073724579396595e-22, + 4.24456406564499787e-24, + -1.47824835525975611e-26, + 8.83483755149239713e-02, + -2.45402638598674538e-03, + 5.01887018502326842e-05, + -8.86157121299416486e-07, + 1.40230217622824016e-08, + -2.00256727231142199e-10, + 2.51576856020376224e-12, + -2.63751665586797589e-14, + 1.70224928702937133e-16, + 7.48151986608378863e-19, + -6.24233282659059696e-20, + 1.53555587373059489e-21, + -1.57335754621557915e-23, + 5.91047311606040264e-25, + 2.64273278356597474e-01, + -7.55841436594483634e-03, + 1.53880608514435981e-04, + -2.55115725697888059e-06, + 3.42542319698902201e-08, + -3.33629153633345142e-10, + 9.62443110670005133e-13, + 4.75995673989513666e-14, + -1.36237790397817037e-15, + 1.98799273038219622e-17, + -1.45421224379124658e-19, + -1.73436319627081380e-21, + 1.21138877603712524e-22, + -9.56061605790747819e-25, + 5.84131635756582002e-01, + -1.74681385463809104e-02, + 3.51637969811397714e-04, + -5.19950485639964770e-06, + 4.84650910796228475e-08, + 2.56752903481790256e-11, + -1.08304998025594105e-11, + 1.95214771384661339e-13, + -8.37672055936523722e-16, + -4.45305779961738807e-17, + 1.15531755516991576e-18, + -9.14995271497656268e-21, + -1.20325126192824024e-22, + 9.68297102841528685e-24, + 1.15669683573968785e+00, + -3.67414332283524520e-02, + 7.21259530148650376e-04, + -8.70990495740478128e-06, + 2.34232997681471973e-08, + 1.33930203686096260e-09, + -2.17607727044782600e-11, + -1.35856449506894215e-13, + 9.12441695232394619e-15, + -8.19599486000684322e-17, + -2.43728013399237183e-18, + 7.01092972737499075e-20, + 1.53029515207236456e-22, + -2.46801154942419889e-23, + 2.25852095700822497e+00, + -7.73614070633018847e-02, + 1.44227691295386196e-03, + -1.19332289053863695e-05, + -9.80089049319140099e-08, + 2.69113042780861538e-09, + 2.28467251847257485e-11, + -1.07251721896339479e-12, + -5.28250084223186184e-15, + 4.84185524711447896e-16, + 1.29543460525943883e-19, + -2.30190955892434120e-19, + 1.42888170508179736e-21, + 1.25953141834752339e-22, + 4.75326218750001139e+00, + -1.77560228492679911e-01, + 3.00130552958207579e-03, + -1.08553258012533602e-05, + -3.25566971659056054e-07, + -1.00520575579459311e-09, + 1.08167097289959877e-10, + 1.46581330301213324e-12, + -3.76622518026021546e-14, + -1.11994693042312364e-15, + 9.21934358491884678e-18, + 7.25093095437361004e-19, + 2.65805309747402622e-21, + -3.73097143973476879e-22, + 1.25675553577486063e+01, + -5.12037826477083624e-01, + 7.35176006310081075e-03, + 2.31742674242575418e-06, + -3.36878001763054274e-07, + -1.08873141775526701e-08, + -1.48993711892891864e-10, + 1.23376820134394461e-12, + 1.08437270250685016e-13, + 2.16859928416898661e-15, + -4.75700566686811995e-18, + -1.38870306441172729e-18, + -3.22502526140090518e-20, + 6.20312977477298602e-23, + 6.85647004828412463e+01, + -2.97944057867623524e+00, + 3.52633351679806500e-02, + 2.69122894770078101e-05, + 3.85748485280041090e-07, + 2.42521493645018028e-09, + -1.00244790178445457e-10, + -5.54447662877176779e-12, + -1.80785791343254647e-13, + -4.58319745954601732e-15, + -8.77191841349755578e-17, + -6.84231988192270040e-19, + 4.01244000953651247e-20, + 2.40995062278664617e-21, +# root=9 base[4]=10.0 */ + 8.51579128091276699e-03, + -2.21131510794776059e-04, + 4.29637420056573380e-06, + -7.40997740255178296e-08, + 1.19128833308263200e-09, + -1.83684433180625161e-11, + 2.71358180988829714e-13, + -3.97582277213599343e-15, + 5.46851939219585906e-17, + -7.58518616832784291e-19, + 1.20460849218847221e-20, + -5.39848203942662208e-23, + 3.34826021865327758e-24, + -4.41771836753607076e-26, + 7.92729501678586940e-02, + -2.09152232868324572e-03, + 4.07788246389576798e-05, + -6.90789130472526304e-07, + 1.05650868104522991e-08, + -1.48114058213209883e-10, + 1.85485630098993074e-12, + -2.08558540063883920e-14, + 1.67224379746202921e-16, + -5.19847628864525551e-19, + -1.96104465487944032e-21, + 1.37487899978471914e-21, + 3.59069647754454753e-24, + -5.09960078573192420e-26, + 2.36320320328654410e-01, + -6.44100493961646207e-03, + 1.26340040272024308e-04, + -2.05484260968334900e-06, + 2.78977842883441402e-08, + -2.98844172364283030e-10, + 1.78408334900598893e-12, + 1.42785056193559844e-14, + -7.55337916535167147e-16, + 1.40967667490406535e-17, + -1.08749087544145065e-19, + 3.04468070452526866e-21, + 7.25871437782514165e-23, + -1.62304035260257458e-24, + 5.19508684104192486e-01, + -1.48914722972494397e-02, + 2.93872669292147184e-04, + -4.43229037605194062e-06, + 4.68011795350739065e-08, + -1.72876350291296540e-10, + -5.92194779603298453e-12, + 1.50855454617339672e-13, + -1.70980823153960720e-15, + -6.53417259330215976e-18, + 7.70382251578981617e-19, + -5.98791344621895260e-21, + 1.69259426821661806e-22, + 1.09814549110118104e-25, + 1.02062074368739264e+00, + -3.13812140543114904e-02, + 6.19779137055594511e-04, + -8.14995997168829861e-06, + 4.48356124875635074e-08, + 8.01139999426685653e-10, + -2.20198438950821615e-11, + 9.61038060784513823e-14, + 5.15410350401584478e-15, + -1.19274153819251836e-16, + 4.63220936036328057e-19, + 5.59203441139867975e-20, + -6.01122480068071617e-22, + -8.77850078914519324e-24, + 1.97121277275037077e+00, + -6.64184124730397563e-02, + 1.29151368015400039e-03, + -1.30513494602043494e-05, + -4.11672761140222178e-08, + 2.87567064303096328e-09, + -7.02787434634945295e-12, + -9.79420111801359483e-13, + 1.01335517007669460e-14, + 3.26551048865994610e-16, + -6.66688434463393658e-18, + -5.17310045872422250e-20, + 4.72617976951121127e-21, + -1.79333927373991894e-23, + 4.09009135027480930e+00, + -1.54159947850424028e-01, + 2.83961191568638015e-03, + -1.60731158311272047e-05, + -3.17234189200817421e-07, + 1.91396458854179375e-09, + 1.27142873277908398e-10, + -2.51701445505371068e-13, + -6.38653764302482177e-14, + -1.51355577632355197e-16, + 3.63663349657204872e-17, + 3.37138166168680988e-19, + -1.82830976354111971e-20, + -3.08466656954858269e-22, + 1.06370556766993882e+01, + -4.53221861234788304e-01, + 7.33946493391769619e-03, + -4.98919511608803561e-06, + -5.85267721299165093e-07, + -1.35891220075917687e-08, + -5.52118122546788180e-11, + 5.77143617478865708e-12, + 1.64627515302754820e-13, + 3.67110301799274637e-16, + -9.18788394551510048e-17, + -2.21954709139680721e-18, + 1.22473042903546599e-20, + 1.69486141008843286e-21, + 5.72133483974310408e+01, + -2.69593466415142480e+00, + 3.56243144166279238e-02, + 3.32748400405407025e-05, + 3.93503477699779852e-07, + -2.67450846710823335e-09, + -3.66193922629884368e-10, + -1.46491728998131799e-11, + -4.06872455481383630e-13, + -7.54092889220591566e-15, + -1.43422634166815031e-17, + 5.71966010754942620e-18, + 2.49409752300097645e-19, + 4.75609260865404615e-21, +# root=9 base[5]=12.5 */ + 7.69479896928558678e-03, + -1.90019071492975559e-04, + 3.51046814115794501e-06, + -5.76588438787596581e-08, + 8.80955024899942881e-10, + -1.30159575595403619e-11, + 1.81077059569059092e-13, + -2.57209652387063040e-15, + 3.58206133398918699e-17, + -2.89828805017034004e-19, + 1.17992085458220987e-20, + -3.47855784732195330e-24, + -2.47118815702404456e-24, + -1.80406145326165437e-25, + 7.15106008910675744e-02, + -1.79578626751508816e-03, + 3.34131662782746576e-05, + -5.43215130289124511e-07, + 8.00372936066506032e-09, + -1.10015262532785627e-10, + 1.34358003102935869e-12, + -1.56998748452605655e-14, + 1.61735073319921580e-16, + 5.98454737086669838e-19, + 5.46242433183574383e-20, + 8.64873900773789938e-22, + -3.80898115127914960e-23, + -1.52945692054740186e-24, + 2.12431706690279248e-01, + -5.52176749835943132e-03, + 1.04170680802106029e-04, + -1.65387412362077965e-06, + 2.23692528842700319e-08, + -2.53513598673519517e-10, + 1.91754806983084348e-12, + -2.30485886386637686e-15, + -2.87550267137511275e-16, + 1.30188646248755293e-17, + 5.55656907882126326e-20, + 2.98120616738660169e-21, + -1.08696238383698617e-22, + -5.31391517973194171e-24, + 4.64325473716788728e-01, + -1.27408172281689679e-02, + 2.45042639575537987e-04, + -3.71752980922583636e-06, + 4.22323905443112425e-08, + -2.70513342385283625e-10, + -2.45928796473139054e-12, + 9.79382733657219351e-14, + -1.43515974624357086e-15, + 2.09037732495617562e-17, + 6.23949874123714128e-19, + -3.43922996616190198e-21, + -1.74082448186142569e-22, + -1.23149590302617343e-23, + 9.04411551028789562e-01, + -2.68009468354419057e-02, + 5.26722777109409567e-04, + -7.33192011411491353e-06, + 5.58719165100378504e-08, + 3.19860948279103016e-10, + -1.76148411696869623e-11, + 2.00142395249260556e-13, + 1.69636254648152728e-15, + -6.18467723182742903e-17, + 2.10112917748760583e-18, + 1.33374024981708838e-20, + -1.25969629454831553e-21, + -1.76084706648254734e-23, + 1.72520126603304313e+00, + -5.67196970127342229e-02, + 1.13279006164923157e-03, + -1.32676271158659676e-05, + 1.26667398712447088e-08, + 2.42354103659931551e-09, + -2.85189101728252297e-11, + -5.19299857392713803e-13, + 1.70860467376908919e-14, + 7.17538159436305690e-17, + -5.00482607478549308e-18, + 9.03356722017973335e-20, + 2.33232034787081127e-22, + -1.25770321142067226e-22, + 3.51754713276191255e+00, + -1.32296892085975365e-01, + 2.61806382785033940e-03, + -2.06833475361893901e-05, + -2.50188383291702903e-07, + 4.65529312309758522e-09, + 9.27502103953598737e-11, + -2.09003703233671413e-12, + -4.22082555151854266e-14, + 1.30411772644046316e-15, + 2.86896161576490141e-17, + -6.97703526610490339e-19, + -1.96473606769312339e-20, + 2.74725216895588474e-22, + 8.94096831124289437e+00, + -3.94925623207942389e-01, + 7.21438253675389229e-03, + -1.65342079548861378e-05, + -8.54189502281948834e-07, + -1.23971953243007577e-08, + 1.76075652442197933e-10, + 1.03750016092662814e-11, + 9.22659010551180717e-14, + -4.74102263918585393e-15, + -1.42001535757082171e-16, + 7.15638187440136907e-19, + 1.05504034487169140e-19, + 1.10576672773091677e-21, + 4.70022685120383841e+01, + -2.40924390202655658e+00, + 3.60576252232622865e-02, + 3.84964017187803097e-05, + 2.10271827014463908e-07, + -1.80947836708569114e-08, + -9.96226036540164185e-10, + -3.13891597536970730e-11, + -5.90558490851502688e-13, + 1.12767914259654235e-15, + 5.60717918045507915e-16, + 2.07089400118045159e-17, + 2.64679444752270580e-19, + -8.22628358592646060e-21, +# root=9 base[6]=15.0 */ + 6.98682209928915519e-03, + -1.64481693708760587e-04, + 2.89524653323228096e-06, + -4.54322401445979108e-08, + 6.58901026308395711e-10, + -9.41125623304430911e-12, + 1.24168674640857739e-13, + -1.50552147363346354e-15, + 3.32668601560539319e-17, + 1.08667708315681256e-19, + 5.52310374701774032e-21, + -3.58019510705288930e-22, + -1.16928797900462296e-23, + -1.04851666155834917e-25, + 6.48236485794125572e-02, + -1.55253478748192618e-03, + 2.75956257600007716e-05, + -4.31144402533770267e-07, + 6.09344161888180668e-09, + -8.24236122024865785e-11, + 9.82905916250329423e-13, + -9.72812263625126229e-15, + 2.24639399600266723e-16, + 2.70072844541179810e-18, + 2.21632405634856349e-20, + -2.99904743577562483e-21, + -1.17388430345169844e-22, + -8.45071383307918596e-25, + 1.91893775172136516e-01, + -4.76207283336852784e-03, + 8.63123278334760604e-05, + -1.33406268747885391e-06, + 1.77504987394170176e-08, + -2.08854212624446305e-10, + 1.79856062846203977e-12, + -3.45581654475443869e-15, + 2.31235764101821077e-16, + 1.53073552012552121e-17, + -2.85716035707952952e-20, + -8.91101519892770896e-21, + -3.62615874306208127e-22, + -2.38185225382362679e-24, + 4.17016008890185697e-01, + -1.09478580618834649e-02, + 2.04300010021937414e-04, + -3.08745108859005046e-06, + 3.64307409123362364e-08, + -3.00962430144333796e-10, + -2.15350797183374681e-13, + 6.83299452617489594e-14, + -3.09785296953836303e-16, + 3.79964684056918733e-17, + 5.50644229987614039e-20, + -2.72551914597992797e-20, + -7.54637676025254539e-22, + -4.74240158702436690e-24, + 8.05100022004386240e-01, + -2.29235528331287186e-02, + 4.44245568794195351e-04, + -6.40776630656706425e-06, + 5.85206092509558539e-08, + -3.09838794504884319e-11, + -1.14691137820583208e-11, + 2.34972550464778332e-13, + 9.38335924526481432e-16, + 1.29622705062869554e-17, + 1.05307142650363334e-18, + -6.63097844344422897e-20, + -1.87829788952576204e-21, + 3.75300129227604027e-24, + 1.51544817128415055e+00, + -4.82873550586092395e-02, + 9.76262826414879873e-04, + -1.27181950787202954e-05, + 5.34402462799413977e-08, + 1.62757366917323774e-09, + -3.52498772397913631e-11, + 3.71975133722461771e-14, + 1.68897347319730862e-14, + -6.75312441873054818e-17, + -2.88263382795143832e-18, + -3.18437026584384903e-20, + -4.36401888523760614e-21, + -1.71562913127631993e-23, + 3.02859076672156879e+00, + -1.12405479363668737e-01, + 2.34925021050116098e-03, + -2.38425918631875933e-05, + -1.40144125570468687e-07, + 6.07596262352199305e-09, + 2.35384498098199849e-11, + -2.54208444354237761e-12, + 1.59544810150687882e-14, + 1.62815657195007840e-15, + -1.57050877531009251e-17, + -1.12945925950104565e-18, + 3.76606445758520022e-21, + 5.16539434152764364e-22, + 7.47508898294085533e+00, + -3.38253389859445919e-01, + 6.92681062682932135e-03, + -3.18527971296829121e-05, + -1.03542253531314213e-06, + -4.54540123332725661e-09, + 4.75251350280649461e-10, + 9.65526461090999088e-12, + -1.58897184337878578e-13, + -8.24618283912427338e-15, + 2.23060029651942318e-18, + 5.38895997402379402e-18, + 4.77609061467199829e-20, + -3.50374674806576998e-21, + 3.79451724986688390e+01, + -2.11891545538057757e+00, + 3.65227133564943671e-02, + 3.73316325571072111e-05, + -4.72071396534662919e-07, + -5.44471695558643347e-08, + -2.09169561386416990e-09, + -4.33971290004213939e-11, + 8.94972045824526810e-14, + 4.29075551094178430e-14, + 1.46536467061874972e-15, + 1.08223670375228848e-17, + -9.36098546756546144e-19, + -3.68919846818053630e-20, +# root=9 base[7]=17.5 */ + 6.37200182561539243e-03, + -1.43334563223338689e-04, + 2.40759337515946395e-06, + -3.62458231658295087e-08, + 4.97701434350884521e-10, + -6.81258328842119478e-12, + 9.75808544379178521e-14, + -3.76822623251592847e-16, + 3.58012118929368061e-17, + -1.55300052482423014e-19, + -2.26135238344068026e-20, + -8.69895005415541299e-22, + -4.86791154771828970e-24, + 4.47664156223526904e-25, + 5.90244571759787062e-02, + -1.35092464973880734e-03, + 2.29564001817521685e-05, + -3.45632255405771325e-07, + 4.66337891364188266e-09, + -6.12025394120966036e-11, + 8.24997977373026243e-13, + -1.17271028279329220e-15, + 2.90613842869447821e-16, + -7.26870960736524847e-19, + -2.31393915687889323e-19, + -7.98404726887710529e-21, + -4.54345999884886638e-23, + 4.35372527096648519e-24, + 1.74131509060803019e-01, + -4.13108338536600540e-03, + 7.18773368444189381e-05, + -1.08113766002212020e-06, + 1.40036065890931666e-08, + -1.65537226855976365e-10, + 1.88068522053657119e-12, + 1.14616596985762199e-14, + 6.20090895402304488e-16, + 1.21235344612409753e-18, + -7.89622460966568948e-19, + -2.38234512091921048e-20, + -1.18265868512465429e-22, + 1.38724750663696753e-23, + 3.76272118402697808e-01, + -9.45220255684642470e-03, + 1.70550166736987822e-04, + -2.55234789649926134e-06, + 3.05141880314210030e-08, + -2.83083071777084993e-10, + 1.75101605430655661e-12, + 7.77400786220651687e-14, + 7.11884410636581008e-16, + 5.77846018046467170e-18, + -1.88842247082944761e-18, + -5.62454181821578009e-20, + -1.24709653585658362e-22, + 3.31999198129302911e-23, + 7.20049050821540582e-01, + -1.96613763435655661e-02, + 3.72907731114296504e-04, + -5.48904465326616864e-06, + 5.57011483596613641e-08, + -2.23346409564846483e-10, + -4.38187577577155745e-12, + 2.73396034222942059e-13, + 1.23764867380484274e-15, + -2.67954614390139784e-17, + -3.48847678987510737e-18, + -1.24681800062558577e-19, + 9.56055953796757540e-23, + 7.86269156292247749e-23, + 1.33697578727784028e+00, + -4.10710086948850792e-02, + 8.29703584527882688e-04, + -1.16472898592307225e-05, + 7.79189029936645277e-08, + 8.51971100964145535e-10, + -2.71995744548369987e-11, + 5.10185479400650723e-13, + 1.15081095474027489e-14, + -2.68028761842076954e-16, + -8.26351897494038268e-18, + -1.77450114624939440e-19, + 5.79940774760304782e-23, + 1.84972166720921839e-22, + 2.61470328886657777e+00, + -9.47847201149102647e-02, + 2.05373260067193792e-03, + -2.51045797538423038e-05, + -1.82363339159244486e-08, + 5.89196739276828030e-09, + -3.30763339781074895e-11, + -1.30525327916198650e-12, + 5.24333760639882456e-14, + 1.48312395781937813e-16, + -5.28156357622215264e-17, + -3.89631252739609576e-19, + 2.47079182752598607e-20, + 2.61517671204259247e-22, + 6.23008243412036489e+00, + -2.84651954286752273e-01, + 6.44440278570034171e-03, + -4.84489265251650969e-05, + -9.94465290866023265e-07, + 9.26834472361989725e-09, + 6.32664535279256075e-10, + 3.12254582962805571e-13, + -3.96297104416033583e-13, + -3.48638917283818505e-15, + 2.15039245581364704e-16, + 2.58428520364834866e-18, + -1.55728888642653930e-19, + -2.37055370226651055e-21, + 3.00563962004507275e+01, + -1.82517266568476821e+00, + 3.68795368446417984e-02, + 1.79543650188838437e-05, + -2.15222366381949536e-06, + -1.17069660852138875e-07, + -2.95357902101366748e-09, + -4.65222197811801175e-12, + 2.63229651356103969e-12, + 9.09161794047301668e-14, + 2.83929323803615015e-16, + -7.70284138388062688e-17, + -2.38804843968273929e-18, + 4.16340206732120973e-21, +# root=9 base[8]=20.0 */ + 5.83460887948858940e-03, + -1.25687778175292086e-04, + 2.01633422008207295e-06, + -2.92467686668866444e-08, + 3.84632907235787419e-10, + -4.48107436272783949e-12, + 1.00548146670038148e-13, + 4.30189655835673250e-16, + 4.89557115538037315e-18, + -1.77731831108679246e-18, + -5.35717787097598562e-20, + -1.50952599183296502e-22, + 4.40960285435625460e-23, + 1.50532130360557851e-24, + 5.39634698403940877e-02, + -1.18268137797521091e-03, + 1.92196014166065491e-05, + -2.79728132694729625e-07, + 3.63970839421229247e-09, + -4.08509408820085536e-11, + 9.01695768702063779e-13, + 5.23858591337438382e-15, + 1.52013261481391561e-17, + -1.65283730371422014e-17, + -5.11264361119624412e-19, + -1.06474514428048262e-21, + 4.19858600285975259e-22, + 1.41751505153456370e-23, + 1.58680113014409929e-01, + -3.60438530104612975e-03, + 6.01471118960638922e-05, + -8.80966069201740975e-07, + 1.11810231629158538e-08, + -1.14535793593273795e-10, + 2.43070400442283217e-12, + 2.38896280133920502e-14, + -1.47913795183320480e-16, + -4.94901513246564601e-17, + -1.58961472496841688e-18, + -1.20322946392492346e-21, + 1.31698256353146567e-21, + 4.30841028973265881e-23, + 3.41009305932311935e-01, + -8.20242566185225806e-03, + 1.42674042421351232e-04, + -2.10634805052168725e-06, + 2.54609258017958041e-08, + -2.12810287397849063e-10, + 4.14675791982563712e-12, + 8.46371761266022640e-14, + -9.94139285534477076e-16, + -1.12773961900835079e-16, + -3.62448375857365549e-18, + 3.34216681364459580e-21, + 3.16486320961651852e-21, + 9.67202334540298830e-23, + 6.46973812701078677e-01, + -1.69268013610054495e-02, + 3.12227845385255713e-04, + -4.63661533176237923e-06, + 5.08176471892811874e-08, + -2.34283431070332907e-10, + 3.43189699609504212e-12, + 2.60694915102635426e-13, + -3.41775969862223017e-15, + -2.56295847119040532e-16, + -6.95142372893480863e-18, + 2.22730539713643109e-20, + 7.04479915924910633e-21, + 1.94467395996472574e-22, + 1.18511318622386641e+00, + -3.49701647484404812e-02, + 6.97878504215987947e-04, + -1.02942740769938562e-05, + 8.97552961691718956e-08, + 4.00666103644038641e-10, + -9.74550014308530374e-12, + 6.46661776701847782e-13, + -5.66782130122043609e-15, + -7.12375651398011058e-16, + -1.17187581780265701e-17, + 1.37836225451290709e-19, + 1.48526103333271358e-20, + 3.87698593130290335e-22, + 2.26652057471886659e+00, + -7.95562119211287444e-02, + 1.75445004030424308e-03, + -2.45058765628457901e-05, + 8.96506189917981742e-08, + 4.83910722564279895e-09, + -4.83212966524854756e-11, + 3.94763275631514215e-14, + 1.91160566605409107e-14, + -1.91426300452010704e-15, + -3.95150619868848888e-17, + 1.09911673874465288e-18, + 3.86111307744414807e-20, + 4.04108043537612264e-22, + 5.19054628354604652e+00, + -2.35673420464452582e-01, + 5.77628052777552463e-03, + -6.20761262314154639e-05, + -6.64222439853273364e-07, + 2.30705102221051128e-08, + 4.57434675681195986e-10, + -1.26348420779968724e-11, + -3.60809346934286172e-13, + 5.08259496504081440e-15, + 1.62466044892723498e-16, + -3.99971013217303696e-18, + -3.34265405106874730e-20, + 7.00515155542932524e-21, + 2.33460507913677802e+01, + -1.53006232645346762e+00, + 3.67990082742324920e-02, + -3.88989057567584541e-05, + -5.15134761334312622e-06, + -1.77096851392486325e-07, + -1.44449078012727952e-09, + 1.25681986552667358e-10, + 5.02449588123830849e-12, + 6.95025402732046092e-15, + -4.86964954155436427e-15, + -1.23426523351750500e-16, + 1.86271261287540078e-18, + 1.58655038892564201e-19, +# root=9 base[9]=22.5 */ + 5.36203617465705155e-03, + -1.10862269993060702e-04, + 1.69977497800962302e-06, + -2.36749846482907416e-08, + 3.19906846493627099e-10, + -1.97903553870774293e-12, + 1.02380040674212210e-13, + -8.13822358557981935e-16, + -9.13559664368490576e-17, + -3.12544039826536323e-18, + 1.64905039915706151e-20, + 3.96836464706378201e-21, + 1.17136259775492218e-22, + 2.37691548666694273e-26, + 4.95203242920166792e-02, + -1.04141574761934422e-03, + 1.61892435167383059e-05, + -2.26810668841325208e-07, + 3.04843098663465668e-09, + -1.80800692369408119e-11, + 9.39305039503551730e-13, + -7.36292644052495041e-15, + -8.84253115980976691e-16, + -2.91256011030713668e-17, + 1.67815732871214094e-19, + 3.78268258064713029e-20, + 1.09922163578423410e-21, + -1.82155215061920048e-25, + 1.45162063332824803e-01, + -3.16260603647955732e-03, + 5.05841147633910126e-05, + -7.17033226333381592e-07, + 9.51657510951423505e-09, + -5.07687795804371230e-11, + 2.68439030235131441e-12, + -2.02608605890133164e-14, + -2.85406780607855770e-15, + -8.68960858121517837e-17, + 5.99553654911851564e-19, + 1.18232247239409044e-19, + 3.32864571243236315e-21, + -3.27737502648840802e-24, + 3.10331704626372107e-01, + -7.15549745574794224e-03, + 1.19721097838377321e-04, + -1.72693185467985646e-06, + 2.23539555125247158e-08, + -9.31287085928244312e-11, + 5.27956960819382220e-12, + -3.63682009902110655e-14, + -7.08001158783667849e-15, + -1.90922552833458026e-16, + 1.74953768317726122e-18, + 2.78796831958844398e-19, + 7.47962056973300889e-21, + -1.83267107544186029e-23, + 5.83928964558829922e-01, + -1.46380297852432666e-02, + 2.61332796698889828e-04, + -3.85441044666588636e-06, + 4.74403867804795409e-08, + -8.69472244582960913e-11, + 7.47755899417777387e-12, + -4.05387394977802146e-14, + -1.62277317010571829e-14, + -3.77392463052879975e-16, + 5.16287591487496097e-18, + 5.99375196656072160e-19, + 1.50208305332017174e-20, + -7.41935409925868517e-23, + 1.05565141758554537e+00, + -2.98562940562363717e-02, + 5.83202212919638088e-04, + -8.80133450798438764e-06, + 9.66798104960283323e-08, + 3.37196268487123535e-10, + 1.46493544140066571e-12, + -8.05428435285933640e-15, + -3.58356079233005977e-14, + -7.76884005645384445e-16, + 1.70950477948481135e-17, + 1.29715350828720750e-18, + 2.85433993004877036e-20, + -2.64809087296857428e-22, + 1.97454809345297777e+00, + -6.66655588242457131e-02, + 1.47197775017963452e-03, + -2.23595007590670933e-05, + 1.74981926193285025e-07, + 3.69019468374509105e-09, + -5.04641564376347481e-11, + -6.25893748948553493e-13, + -6.10269282913315362e-14, + -1.90182794464593788e-15, + 5.72291777279751886e-17, + 3.39728960009845910e-18, + 4.60474006718481432e-20, + -1.09603861968791715e-21, + 4.33535052674714638e+00, + -1.92585240059107987e-01, + 4.98438072415614483e-03, + -6.85571262190793652e-05, + -1.27572578843872646e-07, + 2.87046329449285648e-08, + -2.34236921433584751e-11, + -2.03147656011716854e-11, + -9.73940010284973237e-14, + 8.96365284200860464e-15, + 8.45589943720609469e-17, + 2.90815098194326595e-18, + 2.42107863019837285e-19, + -2.63115772356875168e-21, + 1.78092896479916796e+01, + -1.23921276664794644e+00, + 3.57187391082183503e-02, + -1.50028236210811593e-04, + -8.66564600256917257e-06, + -1.52695603020157686e-07, + 4.04675158407156363e-09, + 2.45075290164581597e-10, + 9.22901023266627498e-13, + -2.40031367050024107e-13, + -5.41827860192846161e-15, + 1.52396263304782316e-16, + 8.10117247071617667e-18, + -2.06571409036136214e-20, +# root=9 base[10]=25.0 */ + 4.94410408572321276e-03, + -9.83156624180706691e-05, + 1.44547436531471641e-06, + -1.87545162202437726e-08, + 3.00952025797040017e-10, + -2.14945213552150536e-13, + 2.50850880504520073e-14, + -4.97974836460563030e-15, + -1.37015750278704614e-16, + 2.31823988859183507e-18, + 2.67907159465306201e-19, + 5.07482816533934859e-21, + -1.88959830849808255e-22, + -1.28301073406862778e-23, + 4.55975952275764068e-02, + -9.21979683596107634e-04, + 1.37518448829630343e-05, + -1.79842557046316991e-07, + 2.87540308064784608e-09, + -2.03403713326215788e-12, + 2.11654826156844545e-13, + -4.70545182251311138e-14, + -1.29055409722477934e-15, + 2.28826780197590189e-17, + 2.54056407816113624e-18, + 4.72559822615322433e-20, + -1.82118838094294714e-21, + -1.21616357784717843e-22, + 1.33270069567893445e-01, + -2.78981846022165322e-03, + 4.28700915920155419e-05, + -5.69802212604064839e-07, + 9.03545505542501919e-09, + -5.89632481935312878e-12, + 4.72695186985220164e-13, + -1.44354687206479161e-13, + -3.93801003544229800e-15, + 7.67273025319854836e-17, + 7.86458040368911224e-18, + 1.40483272128713132e-19, + -5.83007072427045742e-21, + -3.76164114598255116e-22, + 2.83502454562496620e-01, + -6.27464179612727529e-03, + 1.01102518756407956e-04, + -1.37816258406547290e-06, + 2.15207211663458706e-08, + -9.40733691071149497e-12, + 3.19202683452152928e-13, + -3.29929240373706887e-13, + -8.95181748468670472e-15, + 2.01357446500046571e-16, + 1.83271605396648884e-17, + 3.04028761202014948e-19, + -1.43296604792948181e-20, + -8.75351991758878113e-22, + 5.29283349633328237e-01, + -1.27195508256814117e-02, + 2.19604451732975089e-04, + -3.10110195081978170e-06, + 4.70575020875410242e-08, + 1.05711153749951295e-11, + -2.33285361970557654e-12, + -6.75163230542715209e-13, + -1.82359151344322513e-14, + 5.00725001473228769e-16, + 3.90774890530373430e-17, + 5.64977170064589477e-19, + -3.29963500090741086e-20, + -1.86006980367663426e-21, + 9.44926378934573097e-01, + -2.55863293415041076e-02, + 4.87089793809411336e-04, + -7.20126398124987777e-06, + 1.03004909874543349e-07, + 2.22085118753411965e-10, + -1.73346459679763585e-11, + -1.33990966799410869e-12, + -3.51419653310847408e-14, + 1.28425459487280808e-15, + 8.43494887033583138e-17, + 9.07273462773048383e-19, + -7.93739786409195695e-20, + -3.96642384700907008e-21, + 1.72981217195505588e+00, + -5.59102640901362330e-02, + 1.22265719592425321e-03, + -1.90456868278780269e-05, + 2.33928364456190213e-07, + 2.00836043145983557e-09, + -1.00653224119613518e-10, + -2.91740805841068469e-12, + -4.95262836444092449e-14, + 3.54423363268015191e-15, + 1.99646433910009342e-16, + 9.02782495512124661e-19, + -2.26602386405269220e-19, + -9.12240319279749817e-21, + 3.63955641794084128e+00, + -1.55993175194193257e-01, + 4.16775960507814475e-03, + -6.62317053887917804e-05, + 3.94383759080339214e-07, + 2.12952682965193539e-08, + -5.80481509379066483e-10, + -1.72190486980600255e-11, + 3.36547285122402074e-13, + 1.65352928696102633e-14, + 2.59148087117279872e-16, + -3.17884647246850752e-18, + -7.56297734985007203e-19, + -2.88702499445327816e-20, + 1.34089597951299915e+01, + -9.63207642263513519e-01, + 3.30090855838362091e-02, + -3.05553316701879260e-04, + -1.02131961211420048e-05, + 2.10713311328494053e-08, + 9.83184001626148600e-09, + 1.13766611774323953e-10, + -9.10562596755960000e-12, + -2.30658238151778782e-13, + 7.20235436837964576e-15, + 3.17222360626393991e-16, + -4.45829923431860960e-18, + -3.62657968981848321e-19, +# root=9 base[11]=27.5 */ + 4.57265876191188803e-03, + -8.75706052565579433e-05, + 1.24912840276918378e-06, + -1.39955137551802349e-08, + 2.89437767565402707e-10, + -1.62409436776711202e-12, + -1.47129383213730330e-13, + -5.78446056148101932e-15, + 1.50883330160456197e-16, + 1.24379844757304017e-17, + 6.52101733891991914e-20, + -1.76128423337700982e-20, + -5.32748333967251797e-22, + 1.34717605045827869e-23, + 4.21171372625666202e-02, + -8.19819064659039359e-04, + 1.18679345693978275e-05, + -1.34400311136679436e-07, + 2.76067014230693347e-09, + -1.59105298552544972e-11, + -1.40849043310051777e-12, + -5.39839179022978498e-14, + 1.45958768419646090e-15, + 1.17770259023864617e-16, + 5.61768961058575407e-19, + -1.68133559128666691e-19, + -5.00590639371592351e-21, + 1.30698623960711881e-22, + 1.22756865723455191e-01, + -2.47176322749090597e-03, + 3.68937194663404070e-05, + -4.27136877256216136e-07, + 8.64930606432702895e-09, + -5.24061695443923330e-11, + -4.45220413157992603e-12, + -1.61229214800560117e-13, + 4.70522398968136847e-15, + 3.63300673346982534e-16, + 1.36371042488129325e-18, + -5.27766283677793622e-19, + -1.51851858879933917e-20, + 4.24280433651172313e-22, + 2.59925014539149513e-01, + -5.52614890823513796e-03, + 8.66160059122918002e-05, + -1.03850475244939287e-06, + 2.05416278602499267e-08, + -1.32890727091436861e-10, + -1.07679432452457379e-11, + -3.51616777891499321e-13, + 1.16749794247463666e-14, + 8.40778996540946703e-16, + 1.69879758792368457e-18, + -1.25786183697934471e-18, + -3.41126836362922774e-20, + 1.06729830300720353e-21, + 4.81701156794141327e-01, + -1.10988078087522965e-02, + 1.86886142354795472e-04, + -2.35682236085536504e-06, + 4.49487594197559520e-08, + -3.10289891086971622e-10, + -2.44629760863442346e-11, + -6.61987285994780529e-13, + 2.71774643523676978e-14, + 1.76601698098448717e-15, + -1.41562230442889194e-18, + -2.77137360444267665e-18, + -6.80455153302286046e-20, + 2.54746872118520635e-21, + 8.49866930935755938e-01, + -2.20071336126918642e-02, + 4.10597759983484143e-04, + -5.55451805573307217e-06, + 9.98581749514399116e-08, + -7.04966417489821141e-10, + -5.90073223262804784e-11, + -1.09174248382959684e-12, + 6.61016510750801741e-14, + 3.66564920287856534e-15, + -2.05399199336346133e-17, + -6.25076076414535319e-18, + -1.28157919827534922e-19, + 6.46357302735127538e-21, + 1.52437876191180433e+00, + -4.69775150987739171e-02, + 1.01738715593387001e-03, + -1.51417057359727364e-05, + 2.43090884542235413e-07, + -1.39621267585281339e-09, + -1.75126344224306208e-10, + -1.09625668378967502e-12, + 1.91334429647497645e-13, + 7.73401948927619279e-15, + -1.20742567771216934e-16, + -1.58115345751630171e-17, + -2.14798590861866060e-19, + 1.97165778994494869e-20, + 3.07742132953912506e+00, + -1.25696195526825899e-01, + 3.42206422949373895e-03, + -5.74057023932176685e-05, + 6.50741374901843943e-07, + 3.39544272022824946e-09, + -8.13562160788429100e-10, + 3.99739217863993663e-12, + 9.60042010674757687e-13, + 1.01946749558843324e-14, + -9.14996234895210050e-16, + -4.45700331354566436e-17, + 9.10299343923711023e-20, + 8.63700521897573840e-20, + 1.00572812071877760e+01, + -7.16461479679314062e-01, + 2.84187829013642784e-02, + -4.52355700848190180e-04, + -7.36771374373841048e-06, + 2.57220261800383048e-07, + 8.21498105033390223e-09, + -2.33782468149440410e-10, + -9.86073865878627074e-12, + 2.18066383300758660e-13, + 1.13700738971707463e-14, + -1.89681436353819835e-16, + -1.18042636844405374e-17, + 1.62796122621508684e-19, +# root=9 base[12]=30.0 */ + 4.24140479068244123e-03, + -7.81745662324156922e-05, + 1.10715933048655947e-06, + -9.85633801168678084e-09, + 2.13027596012590305e-10, + -6.16495773089777385e-12, + -1.80872709227838631e-13, + 4.91859407228394419e-15, + 4.23134912664414822e-16, + -3.21935427119819897e-18, + -7.60978110240762718e-19, + -4.85220453920524721e-21, + 1.21325741903260960e-21, + 2.51827372837206399e-23, + 3.90185442612911645e-02, + -7.30614013195311470e-04, + 1.05026355754368801e-05, + -9.49824592650315209e-08, + 2.02512868944568494e-09, + -5.89163864567872640e-11, + -1.69558282349185380e-12, + 4.78584829235135858e-14, + 3.99214214548578432e-15, + -3.27948202358927869e-17, + -7.22700157598812388e-18, + -4.23416124972599815e-20, + 1.15943032726606163e-20, + 2.34504743834043453e-22, + 1.13430811517175795e-01, + -2.19488666272332896e-03, + 3.25418853103903377e-05, + -3.04019070487920313e-07, + 6.30344410557750306e-09, + -1.85246629476149969e-10, + -5.12168234121944325e-12, + 1.56168580255349007e-13, + 1.22174372300323177e-14, + -1.16472636509460041e-16, + -2.24336986230679336e-17, + -1.06513243218631766e-19, + 3.64720541949002645e-20, + 6.96545882047676634e-22, + 2.39134840198377441e-01, + -4.87778732684010941e-03, + 7.59861816711530431e-05, + -7.47391517484198729e-07, + 1.48308849678254786e-08, + -4.41848349132786142e-10, + -1.14541581604045357e-11, + 3.95219773242347199e-13, + 2.78743489935306417e-14, + -3.29861306689841439e-16, + -5.24462403401796681e-17, + -1.49787606289059335e-19, + 8.71937340238108468e-20, + 1.50068413005523364e-21, + 4.40133336042899281e-01, + -9.70532061834209619e-03, + 1.62599805244052190e-04, + -1.72302550486997720e-06, + 3.21051544454964010e-08, + -9.69764926084252101e-10, + -2.28846738546478869e-11, + 9.47470182748378614e-13, + 5.71272360763559273e-14, + -8.99693948247660585e-16, + -1.11880844925156379e-16, + 2.53744860784314726e-20, + 1.92755205377424429e-19, + 2.74146130879247469e-21, + 7.68022083980954839e-01, + -1.89634076265924253e-02, + 3.52800438127579691e-04, + -4.15122803443697244e-06, + 7.08069269090680947e-08, + -2.14702722230899010e-09, + -4.46085109584866112e-11, + 2.40042030526159466e-12, + 1.13603477981112002e-13, + -2.61282875036720659e-15, + -2.38246253233087661e-16, + 1.30900309523551147e-18, + 4.35205590758373878e-19, + 4.07051206394719476e-21, + 1.35168481463973533e+00, + -3.95026964918201995e-02, + 8.57369637430033965e-04, + -1.16993056489313806e-05, + 1.75084934143873504e-07, + -5.08608498971441835e-09, + -9.28411535191721043e-11, + 7.20243972203551514e-12, + 2.23529810095987084e-13, + -9.02799056493525354e-15, + -5.34395988843424105e-16, + 8.66967100705540215e-18, + 1.08950912793777852e-18, + 3.78367647597004589e-22, + 2.62527528739879745e+00, + -1.00899437013491036e-01, + 2.79472897811806637e-03, + -4.74097624181756775e-05, + 5.50648351411926758e-07, + -1.13118154792242238e-08, + -2.85416794520001540e-10, + 3.05015698786998888e-11, + 3.39113651459895115e-13, + -4.65941815753037610e-14, + -1.07451173304322112e-15, + 6.51654992848556354e-17, + 3.02372600933459028e-18, + -7.74553711764628924e-20, + 7.60951461926858386e+00, + -5.12380985319584870e-01, + 2.24803108918127381e-02, + -5.21119236808053970e-04, + -9.25773207233314164e-07, + 3.50000420525766399e-07, + -1.07876072704770270e-09, + -3.60479712668420219e-10, + 2.97581672021631785e-12, + 3.86018870062538791e-13, + -4.52316961388088698e-15, + -3.94995298157246137e-16, + 4.88116352226550736e-18, + 3.56811515836738459e-19, +# root=9 base[13]=32.5 */ + 3.94573991485490296e-03, + -6.97430221025290351e-05, + 1.00468818466591338e-06, + -7.59917666268686277e-09, + 6.41880572684400222e-11, + -7.63047058182830631e-12, + 9.00533104051293273e-14, + 1.13989527812994447e-14, + -1.28817065991588816e-16, + -2.05284564899163488e-17, + 2.24704884925654634e-19, + 3.60416681018524671e-20, + -3.75557392849385653e-22, + -6.31778056632309084e-23, + 3.62575570851531789e-02, + -6.50701960104270232e-04, + 9.51301248338007627e-06, + -7.35357288247596172e-08, + 6.11385060969087078e-10, + -7.20779136396842700e-11, + 8.87643080699566539e-13, + 1.07616117658767466e-13, + -1.28924888732442954e-15, + -1.94049928152733175e-16, + 2.25555198617594689e-18, + 3.41410464007237672e-19, + -3.79220007088147280e-21, + -5.99960963830028547e-22, + 1.05150836642029497e-01, + -1.94774466914525587e-03, + 2.93606387285712479e-05, + -2.37308774206567961e-07, + 1.91384454641310362e-09, + -2.21209394945467108e-10, + 2.96548478346342035e-12, + 3.29861968101803668e-13, + -4.43591499503615568e-15, + -5.96232170256535822e-16, + 7.80621352614624126e-18, + 1.05364713576010207e-18, + -1.32768565685147630e-20, + -1.86129108181353011e-21, + 2.20787385885462539e-01, + -4.30248217751413170e-03, + 6.81153105984221930e-05, + -5.90429172566081477e-07, + 4.56601555021532933e-09, + -5.07513092422103690e-10, + 7.72811567493506705e-12, + 7.55018512618004602e-13, + -1.20623039421820899e-14, + -1.36904257083133612e-15, + 2.14146796185619735e-17, + 2.43668324243002950e-18, + -3.70430115917706113e-20, + -4.34102030460822055e-21, + 4.03792911255485554e-01, + -8.48010505377928131e-03, + 1.44301065750119866e-04, + -1.38227621523046930e-06, + 1.02036542344543180e-08, + -1.05176849215018308e-09, + 1.90318117142609912e-11, + 1.55823223313926880e-12, + -3.14269146629036850e-14, + -2.83237112598756679e-15, + 5.64676799695190626e-17, + 5.09445453690408642e-18, + -9.98978120847057345e-20, + -9.18984311316242348e-21, + 6.97520345758927629e-01, + -1.63245071916951062e-02, + 3.08254323668490874e-04, + -3.39146027742949849e-06, + 2.41477395942694204e-08, + -2.14352207871498424e-09, + 4.86486215779482636e-11, + 3.15381053956741776e-12, + -8.67107753485358092e-14, + -5.70811461316442671e-15, + 1.58275591240622722e-16, + 1.04139074807047226e-17, + -2.88266852464593266e-19, + -1.91141808728823290e-20, + 1.20655931032808472e+00, + -3.31658180170411598e-02, + 7.30248654376240984e-04, + -9.75471814252068208e-06, + 6.98876530888824184e-08, + -4.49977294559516002e-09, + 1.39065096161792758e-10, + 6.57277861504903036e-12, + -2.79594221548725198e-13, + -1.14063846746281615e-14, + 5.20783614463305380e-16, + 2.10538645678466675e-17, + -9.83569597814949664e-19, + -3.94188291526249591e-20, + 2.26297757289375090e+00, + -8.06856524594609381e-02, + 2.27080251471915807e-03, + -4.04904460020887022e-05, + 3.24320173771290018e-07, + -8.36061496745851213e-09, + 4.50292250184761281e-10, + 1.34243980864758859e-11, + -1.21158552193055098e-12, + -1.50650898891515561e-14, + 2.32512343597806523e-15, + 2.19154921446364277e-17, + -4.49795660282605601e-18, + -3.64231637831162536e-20, + 5.88038574835765626e+00, + -3.57296904694256512e-01, + 1.63558614376617430e-02, + -4.84430185433104197e-04, + 5.10092607258658670e-06, + 2.24612050660836996e-07, + -8.16492874536863919e-09, + -1.05284846664197084e-10, + 1.04772445054904530e-11, + -1.85383412993401190e-14, + -1.16926988463674520e-14, + 1.32365253022012272e-16, + 1.21753447168553708e-17, + -1.96254234057698967e-19, +# root=9 base[14]=35.0 */ + 3.68227620255497622e-03, + -6.20631756355866462e-05, + 9.15263893823981519e-07, + -7.58307748002555097e-09, + -4.58208199624708784e-11, + -2.66083307610196153e-12, + 2.67448189875538774e-13, + -4.20892226174008206e-16, + -4.39575854396119081e-16, + 6.36418300187966855e-18, + 6.75179837569692393e-19, + -1.98108915410905958e-20, + -8.97926254344580803e-22, + 4.55645011863927568e-23, + 3.38014740284535223e-02, + -5.78058825452426681e-04, + 8.64789365084420923e-06, + -7.32594285535365590e-08, + -4.20265331382373608e-10, + -2.44979622903495965e-11, + 2.53526976655298732e-12, + -5.52417206780104196e-15, + -4.15351899080142339e-15, + 6.30478249226515656e-17, + 6.34943760701641249e-18, + -1.92304301909844134e-19, + -8.37731058216967959e-21, + 4.39080657612846732e-22, + 9.78119326868664846e-02, + -1.72402728543060184e-03, + 2.65705940164484172e-05, + -2.35579514919428568e-07, + -1.20355537117811011e-09, + -7.10583744402738117e-11, + 7.83695168467907077e-12, + -2.71119445993438327e-14, + -1.27506418376142059e-14, + 2.12814441166003338e-16, + 1.92857833209616641e-17, + -6.24207936909964682e-19, + -2.49868998439827997e-20, + 1.40438350949569366e-21, + 2.04623285965122997e-01, + -3.78533353629130790e-03, + 6.11828447077374305e-05, + -5.82584716898518972e-07, + -2.40029504279121500e-09, + -1.47380750341316685e-10, + 1.81802423383607398e-11, + -1.01536637098476834e-13, + -2.92324076842841719e-14, + 5.63677108088591060e-16, + 4.33630638949238005e-17, + -1.56447208427636806e-18, + -5.42578904929816502e-20, + 3.44102772817200537e-21, + 3.72078344457767385e-01, + -7.39064602168067099e-03, + 1.28112947701225868e-04, + -1.35067605970670449e-06, + -3.63214011185928458e-09, + -2.55221970502659678e-10, + 3.82535524654818138e-11, + -3.40930394525348455e-13, + -6.03354330856898014e-14, + 1.42171205143180582e-15, + 8.63561361048493026e-17, + -3.68381017599713528e-18, + -1.00796656819791846e-19, + 7.84773545258443633e-21, + 6.36902278060719862e-01, + -1.40174211088463178e-02, + 2.68730029576920459e-04, + -3.26210514053948130e-06, + -2.10720664666295072e-09, + -3.59889265348038743e-10, + 7.94728499295006131e-11, + -1.13319037585219188e-12, + -1.21264572431436804e-13, + 3.76699220196410006e-15, + 1.61075294473081350e-16, + -8.99560633324195294e-18, + -1.58298512500521659e-19, + 1.83101228112858953e-20, + 1.08485823849523855e+00, + -2.77784823983588253e-02, + 6.17638701236103253e-04, + -9.13396579835946124e-06, + 2.19555380518189113e-08, + -1.73627048841895950e-10, + 1.70437146823079996e-10, + -4.10199555715306530e-12, + -2.43172678773264883e-13, + 1.14502001628179056e-14, + 2.59161602141102911e-16, + -2.46861324547471886e-17, + -9.44164960296400631e-20, + 4.65660263354391680e-20, + 1.97360350796908257e+00, + -6.43831406719223009e-02, + 1.81259396798781765e-03, + -3.60030643633878637e-05, + 2.73144581701840823e-07, + 2.69549099318820454e-09, + 3.22956114372389326e-10, + -1.77324503417028427e-11, + -3.67566428591576340e-13, + 4.38021892859194139e-14, + -1.65097264824830882e-16, + -7.87665077920715186e-17, + 1.72195879192806215e-18, + 1.18002148820972770e-19, + 4.67839405327251878e+00, + -2.48045296675276555e-01, + 1.11449705912113426e-02, + -3.77881464899236508e-04, + 7.57760904675738476e-06, + 2.77615999583292039e-08, + -7.05561579803692958e-09, + 1.48528119727046686e-10, + 3.95131223896190293e-12, + -2.55809606379201303e-13, + 9.43381302751202618e-16, + 2.83183546488851109e-16, + -6.34714303164194634e-18, + -2.48162003664679548e-19, +# root=9 base[15]=37.5 */ + 3.44807118889878554e-03, + -5.51194162068812887e-05, + 8.19170787904191517e-07, + -8.42165206394892534e-09, + -4.26049700903834470e-11, + 2.37409133393459670e-12, + 1.18292049963251492e-13, + -7.71165652854196515e-15, + 1.46558860809838749e-17, + 1.18875109034506083e-17, + -3.18317420679935303e-19, + -1.11319778750530889e-20, + 7.81971428380707716e-22, + -1.55582680332417282e-24, + 3.16218524227278100e-02, + -5.12523422012633903e-04, + 7.72226732092861555e-06, + -8.08799197123472087e-08, + -3.78193378857647006e-10, + 2.28329317827089876e-11, + 1.09477297004897374e-12, + -7.32766412850780081e-14, + 1.88176746721602276e-16, + 1.11880508178684561e-16, + -3.08426704768100660e-18, + -1.02603756109737159e-19, + 7.46202532675574131e-21, + -2.09502477441991191e-23, + 9.13225230191890558e-02, + -1.52314353976125590e-03, + 2.36118814796171748e-05, + -2.56943263173497654e-07, + -9.99195981216466392e-10, + 7.26539335439352992e-11, + 3.21091776268412739e-12, + -2.27611440807036230e-13, + 9.03867720504506968e-16, + 3.40456715250899296e-16, + -9.97018713495700451e-18, + -2.97732750133008631e-19, + 2.33787260811486707e-20, + -1.05863288658076468e-22, + 1.90415564106277968e-01, + -3.32456913108084701e-03, + 5.39344074937553550e-05, + -6.23403903120147501e-07, + -1.65025678633244786e-09, + 1.76045191941894277e-10, + 6.78604327609014115e-12, + -5.31988682152084972e-13, + 3.33739145924280172e-15, + 7.68308548836267580e-16, + -2.48022721891296246e-17, + -6.13619280486555812e-19, + 5.53583213886043792e-20, + -4.07374834306915469e-22, + 3.44461382644318692e-01, + -6.43165610643451138e-03, + 1.11532634647373854e-04, + -1.40614213699902129e-06, + -1.19661340285624878e-09, + 3.92687631997397580e-10, + 1.21184616494396609e-11, + -1.13108991104103912e-12, + 1.11055157823214416e-14, + 1.54189083043583790e-15, + -5.76513634238055212e-17, + -1.02573141217383848e-18, + 1.19722089170583194e-19, + -1.40656672572934841e-21, + 5.84883575985864823e-01, + -1.20246879368787560e-02, + 2.29436259730582951e-04, + -3.26656326333346504e-06, + 5.56199661366292617e-09, + 8.78220426836007941e-10, + 1.80792307712350486e-11, + -2.38229293826482745e-12, + 3.66615959215129673e-14, + 2.93391173297508760e-15, + -1.37659543177382322e-16, + -1.18792154832369866e-18, + 2.56803421867391078e-19, + -4.82233765359577281e-21, + 9.82941956764506131e-01, + -2.32688913490613769e-02, + 5.10610692396577348e-04, + -8.63789910226015796e-06, + 4.72551334729195062e-08, + 2.06201754834334741e-09, + 1.14551905592478818e-11, + -5.20228364767575941e-12, + 1.31684792981341069e-13, + 5.12235700028396431e-15, + -3.62694595420134789e-16, + 1.47497506931104989e-18, + 5.62979847268033711e-19, + -1.80135404524073706e-20, + 1.74244888490382088e+00, + -5.15302823111880026e-02, + 1.40944115963620377e-03, + -3.09559497625661986e-05, + 3.63056123248156766e-07, + 4.43838642780134818e-09, + -1.39907152875639330e-10, + -1.03288682822854094e-11, + 5.63442223038566796e-13, + 2.26061940955083261e-15, + -1.06649208293852967e-15, + 2.86212821177936378e-17, + 9.54866022847318540e-19, + -7.78661240374467642e-20, + 3.83871292460671887e+00, + -1.74972605673823417e-01, + 7.33062055125974742e-03, + -2.59829746525267868e-04, + 6.81664205666692513e-06, + -8.51422778998305834e-08, + -2.34945558946192922e-09, + 1.52809594378573449e-10, + -2.57075679080503569e-12, + -7.90705782939078712e-14, + 5.20781659902257305e-15, + -6.60371909940595738e-17, + -4.15003530532540180e-18, + 1.98399619890208452e-19, +# root=9 base[16]=40.0 */ + 3.18439947508916297e-03, + -7.57379847844804130e-05, + 1.75418265984859484e-06, + -3.47911637290128020e-08, + 2.18741980345891743e-10, + 2.65974472730973307e-11, + -1.08979980634451200e-12, + -4.39359515024419979e-14, + 6.55866773398841857e-15, + -2.24115735557231089e-16, + -1.03665023329690269e-17, + 1.37151890643639154e-18, + -4.04567411324836667e-20, + -2.52007137710199556e-21, + 2.91728041496551044e-02, + -7.02819705365942881e-04, + 1.64882261240339146e-05, + -3.31841143449837072e-07, + 2.23380318408762010e-09, + 2.48808091316625463e-10, + -1.05055265519902761e-11, + -3.99341232569780296e-13, + 6.18849980763717005e-14, + -2.17213736027596949e-15, + -9.45025792226352867e-17, + 1.29713807691136066e-17, + -3.96206688054992024e-19, + -2.30629940384955057e-20, + 8.40611260289242379e-02, + -2.07975843767852506e-03, + 5.01040016880299649e-05, + -1.03935365200169085e-06, + 7.95628367356383008e-09, + 7.46993389635747323e-10, + -3.35973973153655639e-11, + -1.12256446629692659e-12, + 1.89368975377557860e-13, + -7.02286574733452858e-15, + -2.67402296033970241e-16, + 3.98797546996355171e-17, + -1.30708091001092700e-18, + -6.58170586587629445e-20, + 1.74626499264972368e-01, + -4.50750310665237828e-03, + 1.13283517408267685e-04, + -2.46539522066982790e-06, + 2.25305475839646404e-08, + 1.64511839652772648e-09, + -8.21254020934927222e-11, + -2.17563577671529450e-12, + 4.31567073966968268e-13, + -1.74566799153929043e-14, + -5.24626410552161083e-16, + 9.15297024807733368e-17, + -3.34373562623815254e-18, + -1.31134949646564710e-19, + 3.14095420207903597e-01, + -8.62541986783591820e-03, + 2.30593267257558009e-04, + -5.38001204348897847e-06, + 6.10053693154368674e-08, + 3.15935294520772743e-09, + -1.85895497618652339e-10, + -3.17919659638571396e-12, + 8.81090764839543412e-13, + -4.04466405294989766e-14, + -7.86771466362202443e-16, + 1.88586379922113825e-16, + -8.02909470741287156e-18, + -2.02801428291780138e-19, + 5.28623794247202516e-01, + -1.58563603532864833e-02, + 4.62935137289353699e-04, + -1.19159779126490435e-05, + 1.73529775212007579e-07, + 5.49056387537860357e-09, + -4.26663022031750245e-10, + -2.00772557162035554e-12, + 1.73374346485467869e-12, + -9.57975309049554529e-14, + -5.72565193474068220e-16, + 3.74707886328194767e-16, + -1.98000767207415944e-17, + -1.68948655650892552e-19, + 8.75664647000055862e-01, + -2.98516970102678837e-02, + 9.90187819226932830e-04, + -2.93377965141652565e-05, + 5.71248308678809597e-07, + 7.15567368145555934e-09, + -1.05885431922250557e-09, + 1.33518367047821750e-11, + 3.31035918568329325e-12, + -2.48137870302105235e-13, + 2.91069396257996845e-15, + 7.17258663473144816e-16, + -5.33497626633018865e-17, + 6.51417115461395029e-19, + 1.51122627701993939e+00, + -6.28243071283083043e-02, + 2.53969396051278041e-03, + -9.32617121926310823e-05, + 2.59531037491962716e-06, + -1.90438960660824780e-08, + -2.84507519743051354e-09, + 1.29402649706677727e-10, + 3.91988711843541118e-12, + -7.09848641853783739e-13, + 2.89975716142482460e-14, + 7.84634811082423770e-16, + -1.54248478309061138e-16, + 6.94482622019880110e-18, + 3.10572024711380790e+00, + -1.87040819340329206e-01, + 1.09371508733751305e-02, + -5.94343543803867820e-04, + 2.79310702737899211e-05, + -9.93484617747443782e-07, + 1.59013447799280310e-08, + 9.40876232317387762e-10, + -9.16256217321027250e-11, + 3.41070624544085104e-12, + 1.28633678493348398e-14, + -9.15502182080355490e-15, + 5.13272202681563983e-16, + -6.78732392610946430e-18, +# root=9 base[17]=44.0 */ + 2.90699510023554025e-03, + -6.32845161687842141e-05, + 1.37029318541658900e-06, + -2.85537096371028444e-08, + 4.77261001717565343e-10, + 1.26016721668745309e-12, + -6.78970567460622233e-13, + 3.48785046445049289e-14, + -4.31594163604298247e-16, + -6.99573337433165793e-17, + 5.97258141132258090e-18, + -2.01844503387753092e-19, + -3.35835909358835212e-21, + 7.77316551608895753e-22, + 2.66013536338615131e-02, + -5.85951529692855036e-04, + 1.28375128826289646e-05, + -2.70775759931320099e-07, + 4.60605707710758135e-09, + 8.42474008546479314e-12, + -6.35430628614577295e-12, + 3.32274768699352488e-13, + -4.40121473331466210e-15, + -6.46457270460625403e-16, + 5.63815578424690049e-17, + -1.94766936431313084e-18, + -2.87905862437968318e-20, + 7.26583876398385653e-21, + 7.64689408947958199e-02, + -1.72581466078006326e-03, + 3.87401283712215626e-05, + -8.37907384462537961e-07, + 1.47727181248536180e-08, + 2.94213444738384083e-12, + -1.90997480326792602e-11, + 1.03751637358652881e-12, + -1.56147554124273816e-14, + -1.88928185361120354e-15, + 1.72692834770621297e-16, + -6.24024398391324665e-18, + -6.91913725970795562e-20, + 2.17778210335499160e-20, + 1.58232704088341808e-01, + -3.71165649034552658e-03, + 8.65947395437379532e-05, + -1.94910050144002188e-06, + 3.63272969526207922e-08, + -8.26032455902727475e-11, + -4.21778636946647314e-11, + 2.44446886172936830e-12, + -4.38414090924073853e-14, + -3.96478737779358756e-15, + 3.94140317830065884e-16, + -1.52899795467638173e-17, + -8.51115607470956952e-20, + 4.78287143439435753e-20, + 2.82902149563358574e-01, + -7.01907076096561222e-03, + 1.73207475586780851e-04, + -4.13080777825843267e-06, + 8.32576586214179069e-08, + -4.71051687965846678e-10, + -8.15380327735486111e-11, + 5.25575010443357070e-12, + -1.16717627556549584e-13, + -6.97775205854423437e-15, + 8.06399127747144410e-16, + -3.46872307472277870e-17, + 6.40611045656287718e-20, + 9.14871327878519631e-20, + 4.71773058470760343e-01, + -1.26726859817670717e-02, + 3.38559374152463998e-04, + -8.76168346753223375e-06, + 1.96416040874825808e-07, + -1.98823196274060479e-09, + -1.44489338641966165e-10, + 1.12437581557855317e-11, + -3.21148915243723688e-13, + -1.00232245193278554e-14, + 1.59248251608011815e-15, + -7.96497774248530492e-17, + 9.12933735943856894e-19, + 1.58553240718193731e-19, + 7.70095024088090607e-01, + -2.31799393415235803e-02, + 6.93889487052432399e-04, + -2.01816778230372025e-05, + 5.23137895795496867e-07, + -8.41966719698438743e-09, + -2.07794579908276703e-10, + 2.52182288539811377e-11, + -9.83868935690757000e-13, + -4.55283232350062139e-15, + 3.07307939903393603e-15, + -1.96494544807827823e-16, + 4.79661206536793959e-18, + 2.15339821354926985e-19, + 1.29441208149254439e+00, + -4.63240952755342508e-02, + 1.64859891196390959e-03, + -5.72291136095671313e-05, + 1.82766111010362162e-06, + -4.52812479778458267e-08, + 2.54216146284055645e-10, + 5.61988836720479861e-11, + -3.64689230185211004e-12, + 8.55419113615496169e-14, + 4.13640657980580248e-15, + -5.13989195054428684e-16, + 2.38654472664745879e-17, + -2.47417966900199774e-19, + 2.49631664451920532e+00, + -1.21825123218646567e-01, + 5.91103636094453787e-03, + -2.81292311626659417e-04, + 1.27511059196289166e-05, + -5.22687012354619969e-07, + 1.75851866022540588e-08, + -3.63716280123185220e-10, + -5.75275750816304802e-12, + 1.03223948858685005e-12, + -5.61836726874223938e-14, + 1.63361948024956128e-15, + 5.20358025251568186e-18, + -3.57776712104200867e-18, +# root=9 base[18]=48.0 */ + 2.67379199193740723e-03, + -5.35652994750907419e-05, + 1.07223028977220495e-06, + -2.13143412900226197e-08, + 4.05301847987285219e-10, + -5.97905343253335397e-12, + -4.34141572619637784e-14, + 1.03764651102167392e-14, + -6.01059978752759586e-16, + 1.99294969674123702e-17, + -6.44317689742508574e-20, + -4.04060231664623277e-20, + 2.92891796496522239e-21, + -1.10194056432001178e-22, + 2.44441036426493973e-02, + -4.95022881071945672e-04, + 1.00167042303278090e-05, + -2.01295188392540000e-07, + 3.87310924701110471e-09, + -5.83461011632152869e-11, + -3.52696315490107860e-13, + 9.67503873495550501e-14, + -5.68322436596986039e-15, + 1.91197813917249413e-16, + -8.14738772213997456e-19, + -3.73437601480338887e-19, + 2.75618866318877355e-20, + -1.05295357336049959e-21, + 7.01273710726034172e-02, + -1.45220908668324314e-03, + 3.00482200466313892e-05, + -6.17557654237562400e-07, + 1.21742516576052842e-08, + -1.91258071487887202e-10, + -7.03712645337296031e-13, + 2.88462697081858521e-13, + -1.74704850899338080e-14, + 6.05701193983634808e-16, + -3.83871398028252600e-18, + -1.09201136256127503e-18, + 8.38557090152757932e-20, + -3.30722541687643080e-21, + 1.44636919566097255e-01, + -3.10295659010991452e-03, + 6.65149970772300732e-05, + -1.41652823364697027e-06, + 2.90144871500026105e-08, + -4.85627213052984558e-10, + -1.33647868480378220e-13, + 6.27956656702837836e-13, + -4.01380486747413563e-14, + 1.46019509496362527e-15, + -1.38929220948201774e-17, + -2.29603670843018817e-18, + 1.89259183010151711e-19, + -7.85773989235419860e-21, + 2.57313661631859592e-01, + -5.81023800652182183e-03, + 1.31090532530837834e-04, + -2.93926592960433083e-06, + 6.36141192836639866e-08, + -1.16025577151952340e-09, + 4.70704421004021216e-12, + 1.18386139618031052e-12, + -8.31044234575962613e-14, + 3.24710414862168121e-15, + -4.51725176156548593e-17, + -4.06621802947970011e-18, + 3.80494097758390867e-19, + -1.70669785487394415e-20, + 4.25903815039554379e-01, + -1.03351512254244177e-02, + 2.50591853976221864e-04, + -6.04055475187854945e-06, + 1.41181182749402895e-07, + -2.87888623388648219e-09, + 2.67027734346467383e-11, + 1.99437193295879542e-12, + -1.67950717705203958e-13, + 7.30156780871003220e-15, + -1.44693822272815028e-16, + -5.99020982930872214e-18, + 7.30670754009099954e-19, + -3.68922961491610378e-20, + 6.87126641987356512e-01, + -1.84688658220146171e-02, + 4.96005067655744931e-04, + -1.32498869530390884e-05, + 3.45023108875379169e-07, + -8.12947840368531280e-09, + 1.26313075537281259e-10, + 2.42348483548829479e-12, + -3.42428196658157213e-13, + 1.77806848108287007e-14, + -4.98624841797416241e-16, + -3.85274902606239456e-18, + 1.34145168079007215e-18, + -8.33527155242085934e-20, + 1.13175992021705585e+00, + -3.54500161222570873e-02, + 1.10947362438192825e-03, + -3.45610953918454067e-05, + 1.05601860462633435e-06, + -3.02672620115816732e-08, + 7.13282393677842326e-10, + -6.75064669005010314e-12, + -5.95859476942771445e-13, + 4.87074416828156479e-14, + -2.05429163430906612e-15, + 3.95303877245912538e-17, + 1.55704134819024600e-18, + -1.86902549946014465e-19, + 2.08622970903298288e+00, + -8.52336405868218683e-02, + 3.47928215588519125e-03, + -1.41496241837645194e-04, + 5.68535802187683400e-06, + -2.21522683214087901e-07, + 8.07949259978357707e-09, + -2.58406788924154327e-10, + 6.20460807980549795e-12, + -3.84051039090003208e-14, + -6.72602646040983139e-15, + 4.90291646700626266e-16, + -2.07599459161999492e-17, + 5.47956652075369771e-19, +# root=9 base[19]=52.0 */ + 2.47521022070896135e-03, + -4.59094000798481336e-05, + 8.51430717692651718e-07, + -1.57752172086582157e-08, + 2.90177545426822609e-10, + -5.11397994450500764e-12, + 7.10319548956972114e-14, + 4.01538720967775541e-16, + -1.08126025120416666e-16, + 6.67325661804697800e-18, + -2.80689704293412896e-19, + 7.62975283782729681e-21, + -1.78215534386863731e-23, + -1.23836248190164741e-23, + 2.26103516344180536e-02, + -4.23586268828853756e-04, + 7.93477433251200547e-06, + -1.48494202136412192e-07, + 2.75934300019922462e-09, + -4.91864977365755013e-11, + 6.98466518169719130e-13, + 3.02982982413134996e-15, + -1.00230564052640265e-15, + 6.27375299494271981e-17, + -2.66121364063040161e-18, + 7.33731926877414107e-20, + -2.45690560531935553e-22, + -1.13935660883347859e-22, + 6.47566680897051355e-02, + -1.23844152215822774e-03, + 2.36823406227113904e-05, + -4.52442941872016470e-07, + 8.58503388469919155e-09, + -1.56646610288912414e-10, + 2.32385570629962670e-12, + 4.25357393384488625e-15, + -2.94955960420953398e-15, + 1.90532767986720110e-16, + -8.22880860679057688e-18, + 2.33559560891122954e-19, + -1.25434097934311928e-21, + -3.29857846694123919e-22, + 1.33191869836036120e-01, + -2.63165626105168029e-03, + 5.19922548536902885e-05, + -1.02624327477350083e-06, + 2.01269367425233074e-08, + -3.80931161708187413e-10, + 6.02842618798411938e-12, + -1.00311777005054455e-14, + -6.26684683356752113e-15, + 4.28993521975449655e-16, + -1.90983335766099103e-17, + 5.67167456540612469e-19, + -4.76671337407392026e-21, + -6.81050000030413176e-22, + 2.35968973968620210e-01, + -4.88698086547299099e-03, + 1.01200886865426346e-04, + -2.09385672638029484e-06, + 4.30686410831137263e-08, + -8.58791143119100808e-10, + 1.48010962563859097e-11, + -8.76855981025114905e-14, + -1.12771584782983709e-14, + 8.60329556858414002e-16, + -4.02188271556880240e-17, + 1.27399793763282279e-18, + -1.59033338981963382e-20, + -1.16580067882512401e-21, + 3.88162400113770567e-01, + -8.58605206284376865e-03, + 1.89902800803540056e-04, + -4.19672364588942366e-06, + 9.22649245559567866e-08, + -1.97698314662203519e-09, + 3.79330195586076205e-11, + -4.09510513396640794e-13, + -1.70018695599588258e-14, + 1.64963364779827411e-15, + -8.37618047837254255e-17, + 2.90496871989030109e-18, + -5.15111863749249821e-20, + -1.58322472312414567e-21, + 6.20297871840229553e-01, + -1.50542139346783455e-02, + 3.65320002691014816e-04, + -8.85847210866954822e-06, + 2.13869351964660383e-07, + -5.06255803860064067e-09, + 1.11108305188150271e-10, + -1.81126140905745191e-12, + -1.09076904116219630e-14, + 3.03101327178170637e-15, + -1.82034815661175083e-16, + 7.23042653214219751e-18, + -1.77693357413525639e-19, + -4.28796577693325391e-22, + 1.00543674869213562e+00, + -2.79863053753466144e-02, + 7.78921313778539411e-04, + -2.16645458106308411e-05, + 6.00527496978648223e-07, + -1.64243034679157530e-08, + 4.29801635256182332e-10, + -9.84617675505535642e-12, + 1.38084904065285653e-13, + 3.37093973076469766e-15, + -4.01692097864081043e-16, + 2.08759127881146631e-17, + -7.28303250890326464e-19, + 1.39953280870909951e-20, + 1.79202236631744483e+00, + -6.29237190678021974e-02, + 2.20923432681564358e-03, + -7.75230040957263042e-05, + 2.71425910331636467e-06, + -9.43606767615720308e-08, + 3.22035593687713298e-09, + -1.05469820412609604e-10, + 3.17781144956089250e-12, + -8.07459020157148059e-14, + 1.30249322603412723e-15, + 1.78001090785496983e-17, + -2.72466269939453587e-18, + 1.43255425312381314e-19, +# root=9 base[20]=56.0 */ + 2.30409853156384467e-03, + -3.97834096440115171e-05, + 6.86908379739479083e-07, + -1.18589952676115535e-08, + 2.04544633399554581e-10, + -3.50566356384309521e-12, + 5.79827105354717275e-14, + -7.94411819772366980e-16, + -3.91710020190147111e-19, + 8.19010725741104850e-19, + -5.32869947954889529e-20, + 2.45517741016844915e-21, + -8.73367285658059031e-23, + 2.15945545483333659e-24, + 2.10326458072598275e-02, + -3.66554148262894475e-04, + 6.38819590173128796e-06, + -1.11319435026531225e-07, + 1.93803691968455218e-09, + -3.35326539923199770e-11, + 5.60629124854249812e-13, + -7.83940242572567384e-15, + 4.69296343786098246e-18, + 7.52419569808539099e-18, + -4.98372190653999638e-19, + 2.31275338140745551e-20, + -8.28235432097375524e-22, + 2.07422886121510469e-23, + 6.01504409010222285e-02, + -1.06858369867292497e-03, + 1.89834056285358778e-05, + -3.37204395944509853e-07, + 5.98446011054715858e-09, + -1.05588223866957747e-10, + 1.80462834959286277e-12, + -2.62675899060721240e-14, + 7.00543847900744976e-17, + 2.16852744453627578e-17, + -1.49664698092083237e-18, + 7.05516227255201132e-20, + -2.56250598007808764e-21, + 6.58657282033099813e-23, + 1.23426154112290576e-01, + -2.26003294414677718e-03, + 4.13826397807892033e-05, + -7.57663587807370959e-07, + 1.38601806413311193e-08, + -2.52192059390733719e-10, + 4.46085146352643255e-12, + -6.88653732031113819e-14, + 3.80133896118505480e-16, + 4.42049381776417980e-17, + -3.30496912528582379e-18, + 1.60169357843240370e-19, + -5.95464171037506113e-21, + 1.59337582198912288e-22, + 2.17896099449284897e-01, + -4.16735032103352290e-03, + 7.97014833127931901e-05, + -1.52415588706079740e-06, + 2.91243031741229026e-08, + -5.53891501125735945e-10, + 1.02856268914009340e-11, + -1.71473866888480127e-13, + 1.53490992835419214e-15, + 7.26933491620233252e-17, + -6.41446204858381933e-18, + 3.26144907549074536e-19, + -1.25725147501457984e-20, + 3.56004753789790803e-22, + 3.56569531600147482e-01, + -7.24588195805616654e-03, + 1.47242813260186527e-04, + -2.99182308551202981e-06, + 6.07487430914051164e-08, + -1.22859429126744406e-09, + 2.43827518600578453e-11, + -4.47286135736063140e-13, + 5.73062456440283071e-15, + 8.20578543078606158e-17, + -1.15766564070621581e-17, + 6.44853847633244344e-19, + -2.63424910880409170e-20, + 8.06179690460384405e-22, + 5.65325954499796945e-01, + -1.25055271120530446e-02, + 2.76631027073968665e-04, + -6.11873715189257044e-06, + 1.35259115199582986e-07, + -2.98065379646135196e-09, + 6.47942113635742467e-11, + -1.33812342627257548e-12, + 2.28834687432620279e-14, + -1.02897730177096372e-16, + -1.82813207751845972e-17, + 1.28052579638342539e-18, + -5.81955992137852426e-20, + 1.99151557614327918e-21, + 9.04509516724629981e-01, + -2.26532396739191032e-02, + 5.67339836780667473e-04, + -1.42076517574652512e-05, + 3.55629740224815010e-07, + -8.88209493403485605e-09, + 2.19955399467545174e-10, + -5.29691426220359220e-12, + 1.17397132927876721e-13, + -1.99959020671631302e-15, + 4.64387044613911495e-19, + 2.20875998988197954e-18, + -1.37355941122574799e-19, + 5.75091708721417419e-21, + 1.57066582952266165e+00, + -4.83530692499979653e-02, + 1.48853832050809139e-03, + -4.58213364063670445e-05, + 1.41005607677443309e-06, + -4.33376017761003792e-08, + 1.32671748968323277e-09, + -4.01894511372433373e-11, + 1.18810653289741126e-12, + -3.33853032341990105e-14, + 8.47648696652267605e-16, + -1.72477275307993106e-17, + 1.55008425611448704e-19, + 8.78757715316809981e-21, +# root=9 base[21]=60.0 */ + 2.15512623711473913e-03, + -3.48066124039279347e-05, + 5.62147711222581885e-07, + -9.07892794843626051e-09, + 1.46613688943991758e-10, + -2.36579235409087776e-12, + 3.79889046188248584e-14, + -5.94245991416514707e-16, + 8.15314676964510796e-18, + -3.84839347652487599e-20, + -4.58798666696283089e-21, + 3.26082794344383007e-22, + -1.57085185130085057e-23, + 6.13981701547277130e-25, + 1.96608626203081324e-02, + -3.20311349264915048e-04, + 5.21845246395956988e-06, + -8.50171626526842864e-08, + 1.38493069124504151e-09, + -2.25434300123097818e-11, + 3.65224690269666518e-13, + -5.77040254397649516e-15, + 8.05455748059335912e-17, + -4.42625734932354965e-19, + -4.14517124171063016e-20, + 3.03230299666315954e-21, + -1.47249571152162255e-22, + 5.78404961757708812e-24, + 5.61563172897071028e-02, + -9.31420897411276336e-04, + 1.54487370897024336e-05, + -2.56233278052342022e-07, + 4.24948305430542115e-09, + -7.04244978361791927e-11, + 1.16197442814342575e-12, + -1.87366515832099864e-14, + 2.70551995137829200e-16, + -1.88513224713061989e-18, + -1.14683198768479414e-19, + 8.99110904966763493e-21, + -4.44527372314472025e-22, + 1.76497557863910909e-23, + 1.14995422864931002e-01, + -1.96191835887914168e-03, + 3.34719453464218898e-05, + -5.71053289989023821e-07, + 9.74165042571853405e-09, + -1.66073344531118835e-10, + 2.82000396930707239e-12, + -4.69362864243538081e-14, + 7.12370103724134196e-16, + -6.41624362203867575e-18, + -2.13486737809838842e-19, + 1.93998705628222415e-20, + -9.91603360857085719e-22, + 4.01078488787096869e-23, + 2.02396260232085845e-01, + -3.59573853415966205e-03, + 6.38812448116030850e-05, + -1.13489180253643872e-06, + 2.01603802578961432e-08, + -3.57920151205445692e-10, + 6.33291483203721552e-12, + -1.10226612853450632e-13, + 1.78589321560932891e-15, + -2.04897953261452393e-17, + -2.72015181822246365e-19, + 3.60778207341778066e-20, + -1.96280714653168286e-21, + 8.18941804089771708e-23, + 3.29735611936824380e-01, + -6.19670377144061063e-03, + 1.16454228207356027e-04, + -2.18849633101196373e-06, + 4.11247514011965758e-08, + -7.72399758886271519e-10, + 1.44675853401582599e-11, + -2.67618608568555327e-13, + 4.70508447053128708e-15, + -6.71405712809245930e-17, + 4.76066360826390357e-20, + 5.93511907931611479e-20, + -3.69819990759081266e-21, + 1.63169437523644316e-22, + 5.19311505996607359e-01, + -1.05534269125402147e-02, + 2.14466128363807772e-04, + -4.35833118857555582e-06, + 8.85631800628612811e-08, + -1.79891782132303820e-09, + 3.64662051049498823e-11, + -7.32893072817415168e-13, + 1.42678959294787875e-14, + -2.48453717374806143e-16, + 2.65267113634935666e-18, + 6.68105722927925253e-20, + -6.63721412247175345e-21, + 3.31883308428240398e-22, + 8.22015051638497418e-01, + -1.87116165134403496e-02, + 4.25934175494274648e-04, + -9.69550298443663912e-06, + 2.20686183055004199e-07, + -5.02172877703719469e-09, + 1.14119553988279979e-10, + -2.58045250582874576e-12, + 5.73980797157304060e-14, + -1.21617187483087262e-15, + 2.23597922206638682e-17, + -2.34091939822338142e-19, + -7.08618417395991691e-21, + 6.45900723440797694e-22, + 1.39805452280048614e+00, + -3.83169135118071949e-02, + 1.05016264441329952e-03, + -2.87819227939625552e-05, + 7.88799674991160319e-07, + -2.16141661514027925e-08, + 5.91869398123721064e-10, + -1.61736102939254384e-11, + 4.39446706348015175e-13, + -1.17774685223095413e-14, + 3.06459280910509751e-16, + -7.51433608225594667e-18, + 1.63422657982572690e-19, + -2.67106673145617793e-21, +# root=9 base[22]=64.0 */ + 2.02425608460181285e-03, + -3.07086405100881964e-05, + 4.65860298669981978e-07, + -7.06724960740805818e-09, + 1.07211424598327091e-10, + -1.62628533194548468e-12, + 2.46550839660971793e-14, + -3.72522945116713548e-16, + 5.53139230972056386e-18, + -7.55794545916436303e-20, + 6.37674306425941766e-22, + 1.77686807854314743e-23, + -1.57838632571428106e-24, + 7.88766684509607566e-26, + 1.84571413840883096e-02, + -2.82299276382560842e-04, + 4.31772585472392364e-06, + -6.60389235675981529e-08, + 1.01004535954736310e-09, + -1.54471238520781923e-11, + 2.36110930809811094e-13, + -3.59731262041217311e-15, + 5.39052015987948601e-17, + -7.46915167303145773e-19, + 6.68441028418385235e-21, + 1.53568971532420000e-22, + -1.45617901930208053e-23, + 7.35956725542854075e-25, + 5.26598418370688923e-02, + -8.19072357140730734e-04, + 1.27398689714304647e-05, + -1.98156024921884136e-07, + 3.08209272424047790e-09, + -4.79348748071220178e-11, + 7.45133670430694259e-13, + -1.15483596399518754e-14, + 1.76309212798012760e-16, + -2.51150564457728996e-18, + 2.49369830655322620e-20, + 3.75985275680069986e-22, + -4.23959141220007739e-23, + 2.19939957544952560e-24, + 1.07643336089546154e-01, + -1.71913420627170825e-03, + 2.74556915921376034e-05, + -4.38484888712161733e-07, + 7.00282326051093588e-09, + -1.11830835739061450e-10, + 1.78504156940631241e-12, + -2.84180469939624106e-14, + 4.46628771731154415e-16, + -6.62860365670725363e-18, + 7.49161331998859337e-20, + 4.81767403637325396e-22, + -8.82729228772056735e-23, + 4.81966624339452026e-24, + 1.88956240307067563e-01, + -3.13417491413549255e-03, + 5.19858554135952275e-05, + -8.62277013413591504e-07, + 1.43022700379160680e-08, + -2.37211711468765334e-10, + 3.93271995853251039e-12, + -6.50578418210296620e-14, + 1.06518018866387458e-15, + -1.66931478814255722e-17, + 2.16848895599477629e-19, + -3.26832566181388990e-22, + -1.52407195492301331e-22, + 9.24984483287683827e-24, + 3.06660123138216112e-01, + -5.35999481807883718e-03, + 9.36852903623216246e-05, + -1.63748794385029274e-06, + 2.86207950709625338e-08, + -5.00221147554458107e-10, + 8.73976897534521083e-12, + -1.52440206350362643e-13, + 2.63872287455421775e-15, + -4.43113418975339391e-17, + 6.62412324907849305e-19, + -5.43370617700826394e-21, + -2.03867562579979617e-22, + 1.64113558081358650e-23, + 4.80228777475306123e-01, + -9.02526522466386150e-03, + 1.69617922038814873e-04, + -3.18774220187282094e-06, + 5.99089802519141937e-08, + -1.12585329484239324e-09, + 2.11526042510338742e-11, + -3.96939911026500244e-13, + 7.41163094691277542e-15, + -1.35866379281150390e-16, + 2.33952770258354515e-18, + -3.21294950070726139e-20, + 2.13636620176626811e-23, + 2.49978952582845969e-23, + 7.53322439435489155e-01, + -1.57162752411885570e-02, + 3.27882562869391764e-04, + -6.84048245419416798e-06, + 1.42709510123958145e-07, + -2.97718010380550343e-09, + 6.20990488795520963e-11, + -1.29434027544972400e-12, + 2.69042245046071567e-14, + -5.54186768063548257e-16, + 1.11121131565887612e-17, + -2.06549171964002245e-19, + 3.04209879709974162e-21, + -6.91932570628354517e-24, + 1.25966713396282426e+00, + -3.11110938728918450e-02, + 7.68377673109680724e-04, + -1.89772793452984642e-05, + 4.68696316031397802e-07, + -1.15755187910203930e-08, + 2.85858581561100504e-10, + -7.05699608822033626e-12, + 1.74033310816471026e-13, + -4.27922695200816187e-15, + 1.04452381361464398e-16, + -2.50817481911774136e-18, + 5.82272551693558870e-20, + -1.26391328197393116e-21, +# root=9 base[23]=68.0 */ + 1.90837632974750907e-03, + -2.72941039217144886e-05, + 3.90367504655608973e-07, + -5.58313909841772916e-09, + 7.98514677720173216e-11, + -1.14204762505686484e-12, + 1.63328157965418856e-14, + -2.33494431503618450e-16, + 3.33097774325525266e-18, + -4.70156307623469495e-20, + 6.31869390508149101e-22, + -6.68980894981157685e-24, + -2.60416976296114480e-26, + 6.02913280143454920e-27, + 1.73923681636182180e-02, + -2.50674241661070216e-04, + 3.61293957093663964e-06, + -5.20728871557975555e-08, + 7.50520031864390591e-10, + -1.08170750966922980e-11, + 1.55895528591025591e-13, + -2.24595995788659423e-15, + 3.22916713668055784e-17, + -4.59612972263798247e-19, + 6.24746016555749892e-21, + -6.82184618852584049e-23, + -1.49340401715909237e-25, + 5.48289487001121052e-26, + 4.95734252541635625e-02, + -7.25893616320460403e-04, + 1.06291130241145877e-05, + -1.55639936679484711e-07, + 2.27900221109715232e-09, + -3.33707149546647018e-11, + 4.88611795222099470e-13, + -7.15185011225844529e-15, + 1.04488991459358428e-16, + -1.51281700159442322e-18, + 2.10338865674169709e-20, + -2.43167358429931131e-22, + 1.91574407827944457e-25, + 1.54163501351939281e-25, + 1.01175247995488729e-01, + -1.51878727459093719e-03, + 2.27992006102264149e-05, + -3.42249059370442460e-07, + 5.13765103287564147e-09, + -7.71230522635311533e-11, + 1.15766668991179468e-12, + -1.73722164704742470e-14, + 2.60275169178471520e-16, + -3.86980530208385578e-18, + 5.56612975064041110e-20, + -6.94344531459517282e-22, + 3.06655646502788753e-24, + 2.97673375339886703e-25, + 1.77190836512413241e-01, + -2.75611721022307439e-03, + 4.28700614223560060e-05, + -6.66822894515649148e-07, + 1.03720980773666378e-08, + -1.61331905189803889e-10, + 2.50932109235346798e-12, + -3.90197741353545625e-14, + 6.05966572590934846e-16, + -9.35418544398298330e-18, + 1.40839843697109490e-19, + -1.91904662286361103e-21, + 1.56470401476634963e-23, + 4.22960521119179465e-25, + 2.86604732615035052e-01, + -4.68201992115530041e-03, + 7.64862123886450682e-05, + -1.24949070014276634e-06, + 2.04118628836678866e-08, + -3.33449536274630800e-10, + 5.44707017540592660e-12, + -8.89633309473204432e-14, + 1.45155776941804456e-15, + -2.35824844478453778e-17, + 3.76693573219260333e-19, + -5.65279111826096209e-21, + 6.60161408856148269e-23, + 1.64413396485313055e-25, + 4.46620288741940930e-01, + -7.80658730937662960e-03, + 1.36453284141988993e-04, + -2.38510081435819629e-06, + 4.16897471780065284e-08, + -7.28702102557315329e-10, + 1.27367761834474887e-11, + -2.22591112272980801e-13, + 3.88748702096812179e-15, + -6.77092645464539668e-17, + 1.16759463381301977e-18, + -1.94703413110920765e-20, + 2.90620327114324962e-22, + -2.71126335828500819e-24, + 6.95233012720056665e-01, + -1.33867949238656147e-02, + 2.57764338430477226e-04, + -4.96328294192726331e-06, + 9.55685607678659317e-08, + -1.84017753957061194e-09, + 3.54320791064224198e-11, + -6.82173914705064338e-13, + 1.31289260751945363e-14, + -2.52317338987640711e-16, + 4.82629562848033674e-18, + -9.10168019480845041e-20, + 1.64986292864112932e-21, + -2.67964161699811846e-23, + 1.14623400225408023e+00, + -2.57629626223236964e-02, + 5.79053002229458860e-04, + -1.30148993338686566e-05, + 2.92525121220396407e-07, + -6.57483209520050988e-09, + 1.47775304092834773e-10, + -3.32124330440910852e-12, + 7.46331452913214492e-14, + -1.67626803827036870e-15, + 3.75946386555192212e-17, + -8.40024713848727055e-19, + 1.86080924502490702e-20, + -4.04501093878682365e-22, +# root=9 base[24]=72.0 */ + 1.80505001168341909e-03, + -2.44190427231610798e-05, + 3.30345222294017652e-07, + -4.46896983843888006e-09, + 6.04570278091095208e-11, + -8.17873073220007878e-13, + 1.10642731370103872e-14, + -1.49673317204567690e-16, + 2.02427172907692628e-18, + -2.73437604322156038e-20, + 3.67129135458005467e-22, + -4.79714627254616313e-24, + 5.55870711473416278e-26, + -2.89527324728520272e-28, + 1.64437887566589724e-02, + -2.24081301688156714e-04, + 3.05358032119806717e-06, + -4.16114716716912665e-08, + 5.67044025795878939e-10, + -7.72716590082269992e-12, + 1.05298361725268027e-13, + -1.43485510966876727e-15, + 1.95479606610906719e-17, + -2.66002545052465342e-19, + 3.59904246753056118e-21, + -4.74722840714729298e-23, + 5.60479267358811442e-25, + -3.34145954067003103e-27, + 4.68289010567562794e-02, + -6.47758436947016018e-04, + 8.96008625141398585e-06, + -1.23939945369237778e-07, + 1.71439300889020618e-09, + -2.37142414869368089e-11, + 3.28024382755896093e-13, + -4.53721250894520044e-15, + 6.27461184356962994e-17, + -8.66811890397547076e-19, + 1.19138929308030789e-20, + -1.60148074628676063e-22, + 1.95931450862157013e-24, + -1.43638650378438853e-26, + 9.54407049108996763e-02, + -1.35153236037285256e-03, + 1.91390007268626560e-05, + -2.71026693864706111e-07, + 3.83799896577611340e-09, + -5.43497335526556324e-11, + 7.69640998147620412e-13, + -1.08984960718208462e-14, + 1.54301663835040792e-16, + -2.18264347802531285e-18, + 3.07436706136719043e-20, + -4.25299553482839492e-22, + 5.46796332019783538e-24, + -4.97632973636584814e-26, + 1.66805294397241594e-01, + -2.44256866951515252e-03, + 3.57671003507967217e-05, + -5.23745955747620402e-07, + 7.66933327550200334e-09, + -1.12303770950299720e-10, + 1.64448340466872534e-12, + -2.40798687063836312e-14, + 3.52547447664727662e-16, + -5.15785356310269065e-18, + 7.52148554286041998e-20, + -1.08223110830922341e-21, + 1.47882368859170470e-23, + -1.63543463227508593e-25, + 2.69012694381138173e-01, + -4.12501829792277699e-03, + 6.32526877325403062e-05, + -9.69911452709938607e-07, + 1.48725408858749856e-08, + -2.28054203122370418e-10, + 3.49695202976142924e-12, + -5.36207448863436798e-14, + 8.22108694241307009e-16, + -1.25978799773629048e-17, + 1.92608529808746566e-19, + -2.91863478247654514e-21, + 4.28221309307523874e-23, + -5.59456958935501668e-25, + 4.17410597147401696e-01, + -6.81911557008448542e-03, + 1.11401908489749453e-04, + -1.81994058350191856e-06, + 2.97318389112775036e-08, + -4.85720224691174314e-10, + 7.93504828825957841e-12, + -1.29630369757245735e-13, + 2.11753976467567614e-15, + -3.45786352922146191e-17, + 5.63868836515085357e-19, + -9.14797875040964983e-21, + 1.45887078417185856e-22, + -2.20271439806263451e-24, + 6.45466206099257200e-01, + -1.15394491489911009e-02, + 2.06298773458785594e-04, + -3.68814691563750615e-06, + 6.59355700208364985e-08, + -1.17877578407322796e-09, + 2.10737546161425078e-11, + -3.76745972888266496e-13, + 6.73497693136392256e-15, + -1.20376801867999382e-16, + 2.15004357844052092e-18, + -3.83122030486345630e-20, + 6.77855870049188622e-22, + -1.17532535578244091e-23, + 1.05155842768042262e+00, + -2.16845681915268894e-02, + 4.47165354916724610e-04, + -9.22115913404897979e-06, + 1.90152865608430127e-07, + -3.92121050985171045e-09, + 8.08606114708429432e-11, + -1.66744632386503330e-12, + 3.43841479836743520e-14, + -7.08979540556794908e-16, + 1.46153103172496892e-17, + -3.01083048882899112e-19, + 6.19128469197714902e-21, + -1.26710097361880544e-22, +# root=9 base[25]=76.0 */ + 1.71234140916572564e-03, + -2.19755031929803920e-05, + 2.82024798321499582e-07, + -3.61939320106522710e-09, + 4.64498411930478222e-11, + -5.96118613441713720e-13, + 7.65034400280526556e-15, + -9.81811073099733650e-17, + 1.25998646041184871e-18, + -1.61677518110199078e-20, + 2.07320805563164821e-22, + -2.64992752857892198e-24, + 3.33916508496653563e-26, + -3.96342454916682355e-28, + 1.55933616696377602e-02, + -2.01506690006192460e-04, + 2.60398924727765786e-06, + -3.36502971583627743e-08, + 4.34849143796653440e-10, + -5.61937890804847221e-12, + 7.26169244835759592e-14, + -9.38395918610094107e-16, + 1.21262276351611479e-17, + -1.56680022062485173e-19, + 2.02314161619438623e-21, + -2.60447094492714921e-23, + 3.30852362689732877e-25, + -3.97693560234914415e-27, + 4.43724233142571908e-02, + -5.81594015098613930e-04, + 7.62301387052744427e-06, + -9.99156438102591788e-08, + 1.30960483759443900e-09, + -1.71651274787590865e-11, + 2.24985039802376679e-13, + -2.94889329806476710e-15, + 3.86506242173063061e-17, + -5.06532173597632945e-19, + 6.63454484768788250e-21, + -8.66663405915792106e-23, + 1.11909246339924545e-24, + -1.37861474090017859e-26, + 9.03215739575994742e-02, + -1.21046226867205643e-03, + 1.62222472401193433e-05, + -2.17405624497176041e-07, + 2.91360405864597755e-09, + -3.90472340213742401e-11, + 5.23298964600968789e-13, + -7.01307377129744613e-15, + 9.39853030850844220e-17, + -1.25942166005932388e-18, + 1.68684491896193824e-20, + -2.25434820558191519e-22, + 2.98490436717061621e-24, + -3.80981919915861492e-26, + 1.57570224864210934e-01, + -2.17964343561984162e-03, + 3.01506551156098493e-05, + -4.17069135627616739e-07, + 5.76924987729274951e-09, + -7.98050974848398835e-11, + 1.10393064654461121e-12, + -1.52704569180929988e-14, + 2.11230419932901618e-16, + -2.92165139097413912e-18, + 4.03960045469425964e-20, + -5.57599883202895622e-22, + 7.64448858104001320e-24, + -1.02125952951288167e-25, + 2.53456239425624508e-01, + -3.66182656516963112e-03, + 5.29044927975302271e-05, + -7.64341321925656876e-07, + 1.10428741257864866e-08, + -1.59542683150034023e-10, + 2.30500332208195386e-12, + -3.33016290255715993e-14, + 4.81121641466885785e-16, + -6.95056543622543039e-18, + 1.00385257336508566e-19, + -1.44818422651605187e-21, + 2.07990439283684699e-23, + -2.93931595046436407e-25, + 3.91788771384730672e-01, + -6.00784707324905718e-03, + 9.21267506657660299e-05, + -1.41270875952812097e-06, + 2.16630459610402679e-08, + -3.32189876676808094e-10, + 5.09393245207475849e-12, + -7.81122980848448657e-14, + 1.19779490644493383e-15, + -1.83666261883747998e-17, + 2.81581181046671649e-19, + -4.31403014164729224e-21, + 6.59294304021634188e-23, + -9.98938820372661127e-25, + 6.02352052821170547e-01, + -1.00497849295287673e-02, + 1.67673002283690183e-04, + -2.79749625350303991e-06, + 4.66740928115463575e-08, + -7.78721649587052396e-10, + 1.29923751365771864e-11, + -2.16767658162079462e-13, + 3.61658326636314720e-15, + -6.03383392087493279e-17, + 1.00658491742709727e-18, + -1.67867314819563607e-20, + 2.79642507281879976e-22, + -4.64136969608603704e-24, + 9.71339929655497092e-01, + -1.85034852659288415e-02, + 3.52481100105414655e-04, + -6.71456885676795030e-06, + 1.27908800895407237e-07, + -2.43659145919739746e-09, + 4.64157071359409199e-11, + -8.84192914511287596e-13, + 1.68433387706462892e-14, + -3.20852641430916270e-16, + 6.11180437735696701e-18, + -1.16409509501744426e-19, + 2.21653053071684328e-21, + -4.21540827677687353e-23, +# root=9 base[26]=80.0 */ + 1.62869343775748137e-03, + -1.98812469396760251e-05, + 2.42687770892166167e-07, + -2.96245775319802566e-09, + 3.61623327997883616e-11, + -4.41428846868330714e-13, + 5.38846380708117137e-15, + -6.57762527605977745e-17, + 8.02920482615783819e-19, + -9.80101526001836393e-21, + 1.19630309303865669e-22, + -1.45969733278459511e-24, + 1.77818770759042376e-26, + -2.15057360951991116e-28, + 1.48265977602705795e-02, + -1.82179678934414580e-04, + 2.23850649712467901e-06, + -2.75053253299205951e-08, + 3.37967712983079441e-10, + -4.15272945648592834e-12, + 5.10260619951253196e-14, + -6.26975207545092629e-16, + 7.70385255590886687e-18, + -9.46587774103110724e-20, + 1.16301916729495176e-21, + -1.42847494101508152e-23, + 1.75184461141801978e-25, + -2.13398106987088622e-27, + 4.21608926186394992e-02, + -5.25073957304624385e-04, + 6.53929847105346331e-06, + -8.14407644827403013e-08, + 1.01426753151099057e-09, + -1.26317407420786140e-11, + 1.57316354065443035e-13, + -1.95922561364017704e-15, + 2.44002547482439968e-17, + -3.03878529740001071e-19, + 3.78426393616877454e-21, + -4.71127290381815075e-23, + 5.85752451073214756e-25, + -7.24016054005344630e-27, + 8.57238037926094792e-02, + -1.09038248719689175e-03, + 1.38693561856063175e-05, + -1.76414279630291444e-07, + 2.24393963456562320e-09, + -2.85422760658952218e-11, + 3.63049652197496429e-13, + -4.61788767074693631e-15, + 5.87381298866958568e-17, + -7.47124852238330840e-19, + 9.50267080026469564e-21, + -1.20835547456742159e-22, + 1.53486792014334952e-24, + -1.94046887453479314e-26, + 1.49304430774666402e-01, + -1.95700089843103917e-03, + 2.56512984684087090e-05, + -3.36223204411044659e-07, + 4.40703004959950215e-09, + -5.77649417394553478e-11, + 7.57151275774162181e-13, + -9.92432334209487348e-15, + 1.30082435233616489e-16, + -1.70503544573567137e-18, + 2.23476518436164635e-20, + -2.92853819327552100e-22, + 3.83457495974948986e-24, + -5.00360485766046492e-26, + 2.39601258669381645e-01, + -3.27249977773310828e-03, + 4.46961541634972894e-05, + -6.10464883931305003e-07, + 8.33779508367363927e-09, + -1.13878502348158252e-10, + 1.55536481000720126e-12, + -2.12433366717904271e-14, + 2.90143474167657706e-16, + -3.96278597002435422e-18, + 5.41223473843943758e-20, + -7.39089831922027725e-22, + 1.00874567040910067e-23, + -1.37362651203200148e-25, + 3.69131748346076538e-01, + -5.33321591314719380e-03, + 7.70543094807357682e-05, + -1.11328074958252821e-06, + 1.60846815127564096e-08, + -2.32391496057381334e-10, + 3.35759254073258456e-12, + -4.85104950109263284e-14, + 7.00879151700454680e-16, + -1.01262590425656354e-17, + 1.46301004147918714e-19, + -2.11354606981867557e-21, + 3.05238601974286998e-23, + -4.40224997823112635e-25, + 5.64639560921985528e-01, + -8.83106833509116583e-03, + 1.38119560399988509e-04, + -2.16021575657455226e-06, + 3.37861784439991988e-08, + -5.28422148961655153e-10, + 8.26462113909754085e-12, + -1.29260209715829024e-13, + 2.02165286975179389e-15, + -3.16189480171645581e-17, + 4.94520309954621411e-19, + -7.73399542445780660e-21, + 1.20937320688995544e-22, + -1.88971052335095883e-24, + 9.02500062198087205e-01, + -1.59744927307445446e-02, + 2.82752798246782252e-04, + -5.00480023141121885e-06, + 8.85863040394289081e-08, + -1.56800129737763993e-09, + 2.77540425602410390e-11, + -4.91253961405839289e-13, + 8.69532452470215948e-15, + -1.53909396683096253e-16, + 2.72422452160813981e-18, + -4.82186325089171944e-20, + 8.53429555942675090e-22, + -1.50982503955990552e-23, +# root=9 base[27]=84.0 */ + 1.55283936320787142e-03, + -1.80727348212310060e-05, + 2.10339685905295379e-07, + -2.44804031621858843e-09, + 2.84915391213890067e-11, + -3.31599032903548753e-13, + 3.85931830338861362e-15, + -4.49167097704399348e-17, + 5.22763450548198060e-19, + -6.08418062658096969e-21, + 7.08103102649537874e-23, + -8.24094212964976282e-25, + 9.58926159633995222e-27, + -1.11480070703186781e-28, + 1.41317267119812576e-02, + -1.65505862940218125e-04, + 1.93834704179223415e-06, + -2.27012456699415038e-08, + 2.65869085281923771e-10, + -3.11376615735177749e-12, + 3.64673450288806456e-14, + -4.27092840299839902e-16, + 5.00196192300221533e-18, + -5.85811767532142358e-20, + 6.86077909098738501e-22, + -8.03480798141924664e-24, + 9.40827035665523401e-26, + -1.10070037886340281e-27, + 4.01594018047340059e-02, + -4.76410799498795266e-04, + 5.65165913034882871e-06, + -6.70456063532405889e-08, + 7.95361720786986606e-10, + -9.43537244570666223e-12, + 1.11931779858709500e-13, + -1.32784616888599072e-15, + 1.57522309085709937e-17, + -1.86868468205387580e-19, + 2.21680678775122146e-21, + -2.62970965810248959e-23, + 3.11909053367157107e-25, + -3.69668437735542857e-27, + 8.15715841572434014e-02, + -9.87325683828930815e-04, + 1.19503870866245156e-05, + -1.44645028341823671e-07, + 1.75075368455342210e-09, + -2.11907626459659330e-11, + 2.56488633883783680e-13, + -3.10448564379255774e-15, + 3.75760514858826497e-17, + -4.54812429657654263e-19, + 5.50492846822140792e-21, + -6.66286631736999187e-23, + 8.06345939694449897e-25, + -9.75207035916009168e-27, + 1.41862879078042958e-01, + -1.76681233749156940e-03, + 2.20045289944735930e-05, + -2.74052476312050462e-07, + 3.41315007427553988e-09, + -4.25086231099418131e-11, + 5.29417985398361992e-13, + -6.59356571530576757e-15, + 8.21186779170393247e-17, + -1.02273544815534059e-18, + 1.27374709661455745e-20, + -1.58633671932272641e-22, + 1.97546976562811048e-24, + -2.45875507571361421e-26, + 2.27182991654165944e-01, + -2.94212582969553349e-03, + 3.81019033807698820e-05, + -4.93437441248613896e-07, + 6.39024528486459914e-09, + -8.27566604842551098e-11, + 1.07173739676851892e-12, + -1.38794996036096225e-14, + 1.79745986638744683e-16, + -2.32779325040883051e-18, + 3.01459191170521364e-20, + -3.90397629860696380e-22, + 5.05545714137023726e-24, + -6.54385801263898133e-26, + 3.48952888354146395e-01, + -4.76617079093858559e-03, + 6.50987132261268052e-05, + -8.89150357715127381e-07, + 1.21444544667264998e-08, + -1.65874953542860517e-10, + 2.26560198825598441e-12, + -3.09447099806068292e-14, + 4.22658097850533347e-16, + -5.77287081216294224e-18, + 7.88485610973592900e-20, + -1.07694189031765801e-21, + 1.47087462293170574e-23, + -2.00824908247496687e-25, + 5.31373020421332165e-01, + -7.82135116968699085e-03, + 1.15123522965197462e-04, + -1.69451866466185353e-06, + 2.49418488151292532e-08, + -3.67122437324928073e-10, + 5.40372467528208979e-12, + -7.95381519741296404e-14, + 1.17073274283648003e-15, + -1.72321693348905082e-17, + 2.53642336677486213e-19, + -3.73337618827469005e-21, + 5.49508542241355896e-23, + -8.08585444562897125e-25, + 8.42776916468023329e-01, + -1.39307746392932311e-02, + 2.30270286547568038e-04, + -3.80627827523001852e-06, + 6.29162994739959365e-08, + -1.03998195954792202e-09, + 1.71904972912654836e-11, + -2.84152233147193343e-13, + 4.69692580027792630e-15, + -7.76383485978122436e-17, + 1.28333109597507128e-18, + -2.12129221602825034e-20, + 3.50638725449567325e-22, + -5.79419038929450272e-24, +# root=9 base[28]=88.0 */ + 1.48373812281260564e-03, + -1.65002468981838007e-05, + 1.83494744466715777e-07, + -2.04059499561852048e-09, + 2.26929002693897470e-11, + -2.52361553241641438e-13, + 2.80644398871110302e-15, + -3.12096979595890985e-17, + 3.47074533387152919e-19, + -3.85972090083526024e-21, + 4.29228802682930052e-23, + -4.77332070339840958e-25, + 5.30818149980015803e-27, + -5.90179354775741009e-29, + 1.34990877380038836e-02, + -1.51020872925913520e-04, + 1.68954410119845609e-06, + -1.89017532119201923e-08, + 2.11463124419570130e-10, + -2.36574102346521298e-12, + 2.64666977037256523e-14, + -2.96095844667415925e-16, + 3.31256847529718935e-18, + -3.70593150293741409e-20, + 4.14600405483324221e-22, + -4.63832227693751800e-24, + 5.18902648729042179e-26, + -5.80397298036174431e-28, + 3.83393773198197133e-02, + -4.34212829509585921e-04, + 4.91767979792549597e-06, + -5.56952097022035222e-08, + 6.30776404978381820e-10, + -7.14386165706464544e-12, + 8.09078446295753128e-14, + -9.16322240042060347e-16, + 1.03778124923758239e-17, + -1.17533964527242457e-19, + 1.33113094591909377e-21, + -1.50756884740441667e-23, + 1.70737139945982617e-25, + -1.93328500348499046e-27, + 7.78031269857035884e-02, + -8.98219517914112761e-04, + 1.03697413409888987e-05, + -1.19716320269597969e-07, + 1.38209786219378927e-09, + -1.59560074713466007e-11, + 1.84208500255614331e-13, + -2.12664550307552094e-15, + 2.45516415172388466e-17, + -2.83443135477813724e-19, + 3.27228563035077821e-21, + -3.77777080265145201e-23, + 4.36129460357466073e-25, + -5.03402292122384631e-27, + 1.35128104960272860e-01, + -1.60306266681235722e-03, + 1.90175827188803925e-05, + -2.25610925858943912e-07, + 2.67648578787904086e-09, + -3.17519027298308438e-11, + 3.76681741200834747e-13, + -4.46868130234499044e-15, + 5.30132211715889548e-17, + -6.28910702288308605e-19, + 7.46094189483314206e-21, + -8.85110826045200814e-23, + 1.05002136234725153e-24, + -1.24543469855160493e-26, + 2.15988916244268858e-01, + -2.65937477519688275e-03, + 3.27436903611998012e-05, + -4.03158392141518356e-07, + 4.96390869083707434e-09, + -6.11183841663374027e-11, + 7.52523286683403894e-13, + -9.26548213527450589e-15, + 1.14081730477347456e-16, + -1.40463718971035269e-18, + 1.72946642851065708e-20, + -2.12941162741840219e-22, + 2.62183079459595822e-24, + -3.22754854602014768e-26, + 3.30866562750748328e-01, + -4.28499130526709474e-03, + 5.54941252859285510e-05, + -7.18694093373022785e-07, + 9.30767350936092325e-09, + -1.20541948173977038e-10, + 1.56111634707357679e-12, + -2.02177273950854440e-14, + 2.61836025397508299e-16, + -3.39098956143181309e-18, + 4.39160676933637268e-20, + -5.68748318586876751e-22, + 7.36572171636430041e-24, + -9.53742687093967270e-26, + 5.01809704073518992e-01, + -6.97543141826239849e-03, + 9.69623406560378269e-05, + -1.34782996803360339e-06, + 1.87355793026175300e-08, + -2.60434876896967459e-10, + 3.62018830619812529e-12, + -5.03226124079118996e-14, + 6.99512041678956063e-16, + -9.72360268692274155e-18, + 1.35163422582730678e-19, + -1.87884514816045356e-21, + 2.61169244810884344e-23, + -3.62966188200167117e-25, + 7.90471109517325243e-01, + -1.22556478996707716e-02, + 1.90014414989080955e-04, + -2.94602767631823564e-06, + 4.56758981687176924e-08, + -7.08169746768509303e-10, + 1.09796284327122007e-11, + -1.70230712403157295e-13, + 2.63929654680338449e-15, + -4.09202670582952233e-17, + 6.34437309151673873e-19, + -9.83646169212434100e-21, + 1.52506660974333833e-22, + -2.36392353045861483e-24, +# root=9 base[29]=92.0 */ + 1.42052620250746422e-03, + -1.51244262355024929e-05, + 1.61030657899430122e-07, + -1.71450290938337342e-09, + 1.82544135671344470e-11, + -1.94355817570265763e-13, + 2.06931784931038397e-15, + -2.20321491516193965e-17, + 2.34577590926634895e-19, + -2.49756142843885062e-21, + 2.65916827585937337e-23, + -2.83123142197642080e-25, + 3.01442416188669844e-27, + -3.20908465697808014e-29, + 1.29206771459403000e-02, + -1.38357671172189200e-04, + 1.48156671325901440e-06, + -1.58649672782171792e-08, + 1.69885827270803264e-10, + -1.81917767628155904e-12, + 1.94801854340985639e-14, + -2.08598439542348348e-16, + 2.23372149622904400e-18, + -2.39192187206683001e-20, + 2.56132649875915695e-22, + -2.74272841643295852e-24, + 2.93697428161836840e-26, + -3.14459638271612543e-28, + 3.66772047581655491e-02, + -3.97383403958794976e-04, + 4.30549630984956871e-06, + -4.66483962074328721e-08, + 5.05417427428149505e-10, + -5.47600339381565204e-12, + 5.93303901717248369e-14, + -6.42821953268347075e-16, + 6.96472856806897745e-18, + -7.54601543683123639e-20, + 8.17581715582726562e-22, + -8.85818142988008672e-24, + 9.59748632743162772e-26, + -1.03972146827622113e-27, + 7.43675669354791347e-02, + -8.20654826878323496e-04, + 9.05602230422562311e-06, + -9.99342686944208435e-08, + 1.10278638059762711e-09, + -1.21693771027608130e-11, + 1.34290504193677809e-13, + -1.48191147035013195e-15, + 1.63530669431274478e-17, + -1.80458011706905799e-19, + 1.99137527414365016e-21, + -2.19750557022062141e-23, + 2.42497052888549327e-25, + -2.67564233940594590e-27, + 1.29003957103961731e-01, + -1.46106859508607291e-03, + 1.65477206084962268e-05, + -1.87415606808466626e-07, + 2.12262525494600806e-09, + -2.40403563484290603e-11, + 2.72275443821219597e-13, + -3.08372788780590458e-15, + 3.49255795846766732e-17, + -3.95558930606237914e-19, + 4.48000766834608751e-21, + -5.07395097108354063e-23, + 5.74663307331670786e-25, + -6.50763901103625964e-27, + 2.05846467341721240e-01, + -2.41551360625864636e-03, + 2.83449410493626872e-05, + -3.32614844731209828e-07, + 3.90308220231951867e-09, + -4.58008742525250513e-11, + 5.37452191255367818e-13, + -6.30675423968533384e-15, + 7.40068599099735338e-17, + -8.68436455964699811e-19, + 1.01907021485212190e-20, + -1.19583188932143283e-22, + 1.40325284867690030e-24, + -1.64642104510057848e-26, + 3.14563230935692273e-01, + -3.87317482131818713e-03, + 4.76898814647538935e-05, + -5.87199106429240620e-07, + 7.23010374530123366e-09, + -8.90232965197810612e-11, + 1.09613189553063590e-12, + -1.34965248348656674e-14, + 1.66180897860146687e-16, + -2.04616307558463204e-18, + 2.51941308599233789e-20, + -3.10211927581460439e-22, + 3.81959627785325606e-24, + -4.70229624764731104e-26, + 4.75363649263310928e-01, + -6.25969985166139123e-03, + 8.24291935103038025e-05, + -1.08544692297918213e-06, + 1.42934192660476412e-08, + -1.88219092053091466e-10, + 2.47851308030562759e-12, + -3.26376406457780297e-14, + 4.29780094850784531e-16, + -5.65944492534932726e-18, + 7.45248955088086018e-20, + -9.81361235933477115e-22, + 1.29227916060334777e-23, + -1.70140691951641871e-25, + 7.44281078956902986e-01, + -1.08655088666756300e-02, + 1.58621905446346628e-04, + -2.31566778842709027e-06, + 3.38056543405506559e-08, + -4.93517365100461205e-10, + 7.20469384209177799e-12, + -1.05178899524598765e-13, + 1.53547133946917889e-15, + -2.24158290656607329e-17, + 3.27241139814468866e-19, + -4.77728313497809429e-21, + 6.97419395618281006e-23, + -1.01792184391042687e-24, +# root=9 base[30]=96.0 */ + 1.36248132696024189e-03, + -1.39137907838848197e-05, + 1.42088974099655551e-07, + -1.45102631441577611e-09, + 1.48180207399507927e-11, + -1.51323057664886256e-13, + 1.54532566682846914e-15, + -1.57810148261626850e-17, + 1.61157246191188430e-19, + -1.64575334844933737e-21, + 1.68065919576596368e-23, + -1.71630535700606151e-25, + 1.75270737050186519e-27, + -1.78969383633143724e-29, + 1.23898075782107615e-02, + -1.27223056366790641e-04, + 1.30637267521187765e-06, + -1.34143103874190410e-08, + 1.37743024317952299e-10, + -1.41439553732482144e-12, + 1.45235284756482581e-14, + -1.49132879605338775e-16, + 1.53135071934479258e-18, + -1.57244668725092751e-20, + 1.61464552020064288e-22, + -1.65797679393880022e-24, + 1.70247074715991105e-26, + -1.74797355201656050e-28, + 3.51531975097533547e-02, + -3.65048932483194697e-04, + 3.79085638141868886e-06, + -3.93662077212192721e-08, + 4.08799003292818731e-10, + -4.24517967990902058e-12, + 4.40841351606670610e-14, + -4.57792394996778245e-16, + 4.75395232652915835e-18, + -4.93674926971865164e-20, + 5.12657503259770901e-22, + -5.32369982258262706e-24, + 5.52840384681466533e-26, + -5.74035741418622676e-28, + 7.12226494155467071e-02, + -7.52720961162159103e-04, + 7.95517788263023878e-06, + -8.40747878823263204e-08, + 8.88549578871397345e-10, + -9.39069100260538549e-12, + 9.92460967888774420e-14, + -1.04888849234449998e-15, + 1.10852426940360539e-17, + -1.17155070775644461e-19, + 1.23816058550800636e-21, + -1.30855763024281413e-23, + 1.38295706661389243e-25, + -1.46142278684996216e-27, + 1.23410972316810322e-01, + -1.33713979697143610e-03, + 1.44877137184767993e-05, + -1.56972254706606828e-07, + 1.70077137265978687e-09, + -1.84276085443604268e-11, + 1.99660437683071902e-13, + -2.16329157848772427e-15, + 2.34389471832472325e-17, + -2.53957557276078702e-19, + 2.75159290650092504e-21, + -2.98131055217889792e-23, + 3.23020603134164821e-25, + -3.49946881908114131e-27, + 1.96614065637990665e-01, + -2.20372329582007188e-03, + 2.47001472086018730e-05, + -2.76848401649975355e-07, + 3.10301946174046284e-09, + -3.47797918375330014e-11, + 3.89824793294515843e-13, + -4.36930071854989941e-15, + 4.89727413369060358e-17, + -5.48904629861607604e-19, + 6.15232646014456031e-21, + -6.89575539240426589e-23, + 7.72901765439570187e-25, + -8.66187901677881565e-27, + 2.99791551547991808e-01, + -3.51800136429572183e-03, + 4.12831300124390243e-05, + -4.84450302072333448e-07, + 5.68493946818614960e-09, + -6.67117692334817462e-11, + 7.82850930808661958e-13, + -9.18661859681627062e-15, + 1.07803360666454784e-16, + -1.26505356101964026e-18, + 1.48451820159382251e-20, + -1.74205610631525892e-22, + 2.04427223678055196e-24, + -2.39858700468759867e-26, + 4.51566359164462916e-01, + -5.64874647772835303e-03, + 7.06614567761175606e-05, + -8.83920263267167259e-07, + 1.10571599774655263e-08, + -1.38316533569849793e-10, + 1.73023303432041115e-12, + -2.16438792657973785e-14, + 2.70748217364444644e-16, + -3.38685114162365376e-18, + 4.23668926128341869e-20, + -5.29977111462847503e-22, + 6.62960417296323701e-24, + -8.29182475362369409e-26, + 7.03193066861987348e-01, + -9.69918424333885733e-03, + 1.33781431330147487e-04, + -1.84525532454283194e-06, + 2.54517176180515504e-08, + -3.51057071123488291e-10, + 4.84215128563191301e-12, + -6.67880837662402208e-14, + 9.21212054314589189e-16, + -1.27063332428003773e-17, + 1.75259218207183379e-19, + -2.41736092904415547e-21, + 3.33428031899742817e-23, + -4.59811797274245835e-25, +# root=10 base[0]=0.0 */ + 1.11092106245711687e-02, + -3.28784578168335353e-04, + 7.27205149964053536e-06, + -1.42241377695380698e-07, + 2.58952613651888362e-09, + -4.48499117042991643e-11, + 7.46627729699738549e-13, + -1.20086716047464199e-14, + 1.86896667007273853e-16, + -2.81320881367856533e-18, + 4.08108760646741868e-20, + -5.67071187664506963e-22, + 7.45230627011769988e-24, + -9.05352302688774553e-26, + 1.03193943450807096e-01, + -3.06170926002693848e-03, + 6.60192584269721835e-05, + -1.20517847306524850e-06, + 1.91915366976300583e-08, + -2.62802847299129249e-10, + 2.87439267375410743e-12, + -1.79876046066493463e-14, + -1.84654832712329723e-16, + 9.26907805624264039e-18, + -2.04472934782099081e-19, + 3.17554579260378969e-21, + -3.26585393502284069e-23, + 2.71291226147468927e-26, + 3.06025594885118379e-01, + -9.12346074769865983e-03, + 1.86855133045841907e-04, + -2.94555145864624771e-06, + 3.35719300401456314e-08, + -1.68467558236144723e-10, + -3.43547097157829374e-12, + 1.11962998745431752e-13, + -1.53711144813764710e-15, + 2.77550372405307222e-18, + 3.96393383194310636e-19, + -1.01577842107314945e-20, + 1.13559345901373374e-22, + 6.30043875971544573e-25, + 6.65582533837136170e-01, + -1.99785082021920121e-02, + 3.78216569693064979e-04, + -4.66574832795953813e-06, + 2.16547477862931971e-08, + 4.94431372670272835e-10, + -1.15436035003457621e-11, + 3.75186074559544520e-14, + 2.82049160117575883e-15, + -5.66092592319170816e-17, + -2.09757611812295934e-20, + 2.00189911462090957e-20, + -3.29621759601117723e-22, + -1.76702007102434343e-24, + 1.28006799170929941e+00, + -3.87438500153016313e-02, + 6.59085851813389582e-04, + -5.51705418916477652e-06, + -2.52773166196419466e-08, + 1.05952198759700501e-09, + 6.52783367696531491e-14, + -3.01820457820921331e-13, + 2.08544671686849653e-15, + 8.68925163210019764e-17, + -1.40185137075284885e-18, + -2.14636557254579730e-20, + 7.07698783056198340e-22, + 2.78741798788326078e-24, + 2.36797055987392469e+00, + -7.23290887468877874e-02, + 1.07495759624538301e-03, + -4.75876709843327000e-06, + -8.56959225984169818e-08, + 4.77914621434524392e-10, + 2.30515974502004687e-11, + -7.91501541034049664e-14, + -7.69945137582820126e-15, + 9.61004262715409861e-18, + 2.85301529479327944e-18, + 2.65890959951759754e-21, + -1.12313006242905239e-21, + -3.55229754448681763e-24, + 4.47975279540587490e+00, + -1.38089747557984782e-01, + 1.74950027489788784e-03, + -2.08575498481280919e-06, + -1.13589474906965966e-07, + -1.17378057529775321e-09, + 1.44170083724649286e-11, + 5.18257755061028311e-13, + 1.56391278229827239e-15, + -1.60687206643317063e-16, + -2.53644898506482716e-18, + 2.96308022933280704e-20, + 1.36076699374317996e-21, + 5.12884178032672602e-24, + 9.33075370812941074e+00, + -2.90003827428548799e-01, + 3.09042361557931768e-03, + 2.08658689458520210e-06, + -7.04274010022328166e-08, + -2.11496298581660290e-09, + -2.63355356468744167e-11, + 5.89008139509781627e-14, + 9.35441556263800714e-15, + 1.76099144090975165e-16, + 4.88219937550116667e-19, + -5.28696065167791284e-20, + -1.32295084128526340e-21, + -8.73958405609443743e-24, + 2.47056720958188301e+01, + -7.72821194993166372e-01, + 7.00221581987648181e-03, + 6.56813734243490736e-06, + 3.48038532783495001e-08, + -7.62639656773078888e-10, + -3.08230946742048730e-11, + -6.40966203649616457e-13, + -8.78401980936922399e-15, + -5.07027857482098866e-17, + 1.32221487782851031e-18, + 5.34136846526499881e-20, + 1.07365456134033480e-21, + 1.24955302902170239e-23, + 1.35456370707429727e+02, + -4.25363095888058051e+00, + 3.44217676882572765e-02, + 9.63298848116673162e-06, + 1.34984011406878470e-07, + 1.72429347991599510e-09, + 1.85241394546492280e-11, + 1.21720708729978191e-13, + -1.18064251089373792e-15, + -7.07933508984875256e-17, + -1.92014638084799786e-18, + -4.13009803771739587e-20, + -7.76318221803231924e-22, + -1.31249900541645033e-23, +# root=10 base[1]=2.5 */ + 9.90052662023037031e-03, + -2.76793769672964418e-04, + 5.78701678106575138e-06, + -1.07114603323122336e-07, + 1.84761595781929762e-09, + -3.03733573106295910e-11, + 4.80881347188373353e-13, + -7.37645834753582046e-15, + 1.09838674078581946e-16, + -1.58942213611272457e-18, + 2.22931076610529241e-20, + -3.02493815628715178e-22, + 3.93169000455703881e-24, + -4.86931683169462893e-26, + 9.19186934698673075e-02, + -2.58655965660251411e-03, + 5.32377066113668497e-05, + -9.36593943493966646e-07, + 1.45822104641992943e-08, + -2.00270814144299113e-10, + 2.32837423326712549e-12, + -1.98897777998860853e-14, + 3.14079712032320208e-17, + 3.44179369685663601e-18, + -9.71672644066472162e-20, + 1.77182497043443473e-21, + -2.42722694957777783e-23, + 2.18132325506671609e-25, + 2.72310095438068500e-01, + -7.76115487173625190e-03, + 1.54608396910635361e-04, + -2.43886725507777538e-06, + 2.96039981418515167e-08, + -2.18675596144061987e-10, + -9.56876621370945727e-13, + 6.66579751715055759e-14, + -1.24462009392947047e-15, + 1.13220037799207527e-17, + 7.01517676601778373e-20, + -4.83274288149099162e-21, + 9.54917368994275259e-23, + -8.93690179800430326e-25, + 5.91374555292537685e-01, + -1.71701852993349224e-02, + 3.24585375548706130e-04, + -4.25469940474045678e-06, + 2.89028223208150923e-08, + 2.38338624163729398e-10, + -9.52844065147531026e-12, + 9.64449799882547099e-14, + 9.36697637805011538e-16, + -4.45365488578894345e-17, + 5.12549609557989627e-19, + 4.83548574977443767e-21, + -2.60010827778249866e-22, + 3.24314790525914213e-24, + 1.13521107004599564e+00, + -3.37412598035733771e-02, + 5.91146687603499605e-04, + -5.75458734503063726e-06, + -4.70602468520274438e-09, + 9.69686834474660129e-10, + -7.06604845736429981e-12, + -1.97104489429690699e-13, + 4.06771080165585438e-15, + 2.18459284196629425e-17, + -1.61981248338684732e-18, + 9.71181078759981545e-21, + 4.87025884442646653e-22, + -9.12916735884818416e-24, + 2.09546014970205441e+00, + -6.39802421027893392e-02, + 1.01003513585510587e-03, + -6.02461888950838929e-06, + -7.09244553042586847e-08, + 9.77812507611663603e-10, + 1.75917341437003267e-11, + -2.98690184487994283e-13, + -5.41434759029007811e-15, + 1.10524974808610855e-16, + 1.83852365533571824e-18, + -4.50083113650836266e-20, + -6.60735523497588406e-22, + 1.92669173470434543e-23, + 3.95518150549495306e+00, + -1.24226395289927946e-01, + 1.71286639153524645e-03, + -4.06723082409961849e-06, + -1.32425335213007393e-07, + -6.53943298116637788e-10, + 2.86400717994677062e-11, + 4.59870317609644507e-13, + -5.55815216090794992e-15, + -2.17091690977384842e-16, + 1.48842450155243502e-19, + 8.75422119939465466e-20, + 7.40366884613775781e-22, + -3.01349846123565380e-23, + 8.22031219994869922e+00, + -2.65202870926934176e-01, + 3.10719767249498626e-03, + 5.88257466152555631e-07, + -1.18713863672970197e-07, + -2.68754106884855633e-09, + -1.95476533805490763e-11, + 4.57735219461947641e-13, + 1.53082993361601280e-14, + 1.29715540383330519e-16, + -3.27638420341550418e-18, + -1.15736468415179246e-19, + -9.73813038910051837e-22, + 2.85526531424425604e-23, + 2.17269334150371058e+01, + -7.16480184216010785e-01, + 7.08372301252767345e-03, + 6.95609288744779193e-06, + 1.05302415125854553e-08, + -1.75071130420215552e-09, + -5.28755373655229618e-11, + -9.35456472724381423e-13, + -8.93667929929095370e-15, + 6.65066597209685627e-17, + 5.01102249307081947e-18, + 1.17742283570049574e-19, + 1.48051199338269195e-21, + -2.91162823577748168e-24, + 1.18993382755578409e+02, + -3.97775493509561651e+00, + 3.45515411982911802e-02, + 1.20938209233619261e-05, + 1.74157427027790969e-07, + 2.20251519325971183e-09, + 2.08902768384091041e-11, + 2.40147823382920503e-14, + -5.67043938392050776e-15, + -1.97839646881247227e-16, + -4.86078678868116537e-18, + -1.00868992424258418e-19, + -1.85902491608549580e-21, + -3.11744580216452960e-23, +# root=10 base[2]=5.0 */ + 8.87845645535887025e-03, + -2.35179000119781673e-04, + 4.66082146054699084e-06, + -8.18491155229702259e-08, + 1.34067933377398081e-09, + -2.09608240014607059e-11, + 3.16037391754265107e-13, + -4.62807113326766705e-15, + 6.59088387224591595e-17, + -9.16320486536565334e-19, + 1.23678326742190032e-20, + -1.63465674141380777e-22, + 2.05760249985457104e-24, + -2.57516537149831885e-26, + 8.23582989528224702e-02, + -2.20193376481099719e-03, + 4.32756180760798543e-05, + -7.32471783295941880e-07, + 1.10914802150729239e-08, + -1.50868137150472214e-10, + 1.79959950572016723e-12, + -1.75187812020007272e-14, + 1.01311124648553316e-16, + 8.10982492910000266e-19, + -4.09548183033988485e-20, + 8.65862442150674328e-22, + -1.39558351298190240e-23, + 1.65871003794299743e-25, + 2.43564779358017652e-01, + -6.63363869195670534e-03, + 1.28037155692782161e-04, + -2.00088059240783163e-06, + 2.51303962341863238e-08, + -2.23357033576094879e-10, + 4.15050379425285059e-13, + 3.35509632418262601e-14, + -8.26750111313968784e-16, + 1.10515172431100131e-17, + -5.87915943058399582e-20, + -1.41161031861382584e-21, + 4.79351737763037851e-23, + -8.11639818113479573e-25, + 5.27575303356584757e-01, + -1.47695800045844917e-02, + 2.76423325921645933e-04, + -3.76558358719038745e-06, + 3.16132622437913858e-08, + 4.41152794184837909e-11, + -6.61972219295357799e-12, + 1.04945016981799317e-13, + -2.75141711025324040e-16, + -2.28247176382945442e-17, + 5.12965528192545393e-19, + -3.43555118958307701e-21, + -8.91033692987054404e-23, + 2.80237397075938258e-24, + 1.00926707986814002e+00, + -2.92881806953114408e-02, + 5.22245529212135443e-04, + -5.68555465388497830e-06, + 1.26223862488470231e-08, + 7.48890260598590290e-10, + -1.07270094708952160e-11, + -6.56842094884900588e-14, + 3.84046788649757142e-15, + -2.92996493412632399e-17, + -8.54691319418177124e-19, + 2.11461164646755951e-20, + 3.42764816067019241e-24, + -7.68236752153654433e-24, + 1.85521676600441743e+00, + -5.62068142335152773e-02, + 9.31642119022237482e-04, + -6.98316506825079060e-06, + -4.79076853106419385e-08, + 1.28415591959343087e-09, + 7.47762377466018099e-12, + -3.98369063372074964e-13, + -6.45606153132452916e-16, + 1.39006202163429224e-16, + -4.52214678809519079e-19, + -5.02669937861858580e-20, + 4.26287646157362519e-22, + 1.76558958206856139e-23, + 3.48532084525807218e+00, + -1.10755442332737916e-01, + 1.65104705613226257e-03, + -6.24939463095611135e-06, + -1.37721338184805782e-07, + 1.60850713159739727e-10, + 3.79052841887739181e-11, + 1.66012478770200482e-13, + -1.22905140435593699e-14, + -1.30264725247601900e-16, + 4.10843536874735509e-18, + 7.55299733784785093e-20, + -1.33748613204779377e-21, + -4.05624863042310814e-23, + 7.20920943737708697e+00, + -2.40353568191257722e-01, + 3.10101828762791897e-03, + -1.76126318074478805e-06, + -1.75817708733610861e-07, + -2.94437828796815547e-09, + 5.88179958069595600e-13, + 9.86520518059281588e-13, + 1.63189012838779542e-14, + -1.09485773394702930e-16, + -8.60679031131782233e-18, + -1.02936270891763268e-19, + 1.97526724561721286e-21, + 8.08529620771689513e-23, + 1.89748808237841438e+01, + -6.59476798902900563e-01, + 7.16680257524971581e-03, + 6.76607035967370973e-06, + -3.94474392851083851e-08, + -3.36248416167566245e-09, + -8.23716634331626332e-11, + -1.13312788017208090e-12, + -1.51088446880205121e-15, + 3.89035540723965925e-16, + 1.14563706761242087e-17, + 1.61394153987188197e-19, + -3.33097939232308969e-22, + -8.11746803214283711e-23, + 1.03636178317199196e+02, + -3.70071120718113677e+00, + 3.47149275854372885e-02, + 1.52597434630971170e-05, + 2.23136294131528813e-07, + 2.68327612793265168e-09, + 1.76249314026930251e-11, + -3.19444978327563876e-13, + -1.76510758488639989e-14, + -5.14285507068282894e-16, + -1.19861185280969828e-17, + -2.43121730612391255e-19, + -4.39656444918345538e-21, + -6.78032746630874561e-23, +# root=10 base[3]=7.5 */ + 8.00656900613226120e-03, + -2.01485906772881201e-04, + 3.79472723574527133e-06, + -6.33799961362114488e-08, + 9.87929119078021727e-10, + -1.47200178460272204e-11, + 2.11626455835865950e-13, + -2.96381526171700247e-15, + 4.03259660126218737e-17, + -5.40577524133729664e-19, + 6.94616302145050021e-21, + -9.05607849567177215e-23, + 1.10129565152480080e-24, + -1.15289162646207336e-26, + 7.41912809445758048e-02, + -1.88808545688512030e-03, + 3.54583280378176110e-05, + -5.76960264170161618e-07, + 8.46826072351362851e-09, + -1.13180401260739681e-10, + 1.35697460199731711e-12, + -1.40619761166166194e-14, + 1.08614890727519425e-16, + -2.34328763467987129e-19, + -1.48683375437613875e-20, + 3.75223806167890288e-22, + -6.94481218984032318e-24, + 1.14209410935666618e-25, + 2.18935960742375896e-01, + -5.69888285033357585e-03, + 1.06294197321019844e-04, + -1.63372000294357697e-06, + 2.08250040855469271e-08, + -2.04763182301163602e-10, + 1.04013904294754928e-12, + 1.29201013818970535e-14, + -4.81041903314115474e-16, + 7.99951720694445648e-18, + -8.33079841977993135e-20, + 4.82518522030067505e-23, + 1.67298945206274093e-23, + -3.69687036875667804e-25, + 4.72645735380940180e-01, + -1.27303267714145817e-02, + 2.34275018630607029e-04, + -3.26037228628140319e-06, + 3.11369748725955028e-08, + -8.11175257273218563e-11, + -3.90181790603483917e-12, + 8.66018270054247857e-14, + -7.71966861954533323e-16, + -6.13323780304228880e-18, + 3.11252895929711421e-19, + -4.92398309805520272e-21, + 1.30977439908231294e-23, + 1.21614478293868762e-24, + 9.00044414058724374e-01, + -2.53786445012327486e-02, + 4.55678440754825158e-04, + -5.37815196540309086e-06, + 2.49436563901003830e-08, + 4.82093101597829833e-10, + -1.10409173237569271e-11, + 3.55077292085499366e-14, + 2.38599635237360199e-15, + -4.60113354823845988e-17, + -3.15966133651983493e-20, + 1.44629029398167272e-20, + -2.23352767400087084e-22, + -1.01964156472324366e-24, + 1.64474929620126109e+00, + -4.90999036268553318e-02, + 8.44113790570429285e-04, + -7.53824954218165344e-06, + -2.13266574274924127e-08, + 1.33183271140139597e-09, + -3.26131370174105937e-12, + -3.46303206933396570e-13, + 3.57486800073553708e-15, + 8.53185491269011266e-17, + -1.97187328572876210e-18, + -1.53234243749742308e-20, + 8.63314703340660596e-22, + -1.07345576886851277e-24, + 3.06818872223036143e+00, + -9.78839269599135198e-02, + 1.56310164249614104e-03, + -8.37703381668070560e-06, + -1.25274035668936788e-07, + 1.07885205769471911e-09, + 3.65995144610238788e-11, + -2.65503823098934597e-13, + -1.34412501727554371e-14, + 7.53319938891441373e-17, + 5.43167581103561504e-18, + -2.39874925461998958e-20, + -2.37967535370829821e-21, + 8.04510403423054621e-24, + 6.29720425466027312e+00, + -2.15682204710726633e-01, + 3.06109188957312582e-03, + -5.03429818713645501e-06, + -2.32046413754075265e-07, + -2.54597881058344544e-09, + 3.44149682730187927e-11, + 1.37265746073281150e-12, + 5.45621082817296996e-15, + -5.01096950732430977e-16, + -9.54223157199936640e-18, + 9.21105748768519457e-20, + 5.82825120289104287e-21, + 4.20370383427206819e-23, + 1.64521338604338787e+01, + -6.01834198732541070e-01, + 7.24161200573719167e-03, + 5.47881495132825543e-06, + -1.28996995870793977e-07, + -5.70916742022598174e-09, + -1.11964247741808771e-10, + -8.56103911180394582e-13, + 2.22700258623052956e-14, + 9.64567454401110485e-16, + 1.60975013643450175e-17, + -1.20679611427465803e-20, + -8.05862047541979649e-21, + -2.10966541835999028e-22, + 8.93900232950847453e+01, + -3.42219441847713846e+00, + 3.49212993751359668e-02, + 1.92777856647601367e-05, + 2.79890903220861823e-07, + 2.91410483634511627e-09, + -2.81196705937749103e-12, + -1.29820862213447995e-12, + -4.80331698499859333e-14, + -1.28244443148729309e-15, + -2.85445932953549280e-17, + -5.30623237970787173e-19, + -6.69254257769761996e-21, + 4.95658957213651975e-23, +# root=10 base[4]=10.0 */ + 7.25687610045588211e-03, + -1.73922323682118075e-04, + 3.12011592923051797e-06, + -4.96781771479532467e-08, + 7.38280892121317391e-10, + -1.05072475924279680e-11, + 1.44121490672230905e-13, + -1.93806735008816116e-15, + 2.50352399008325263e-17, + -3.28488798580992240e-19, + 3.97580152174229920e-21, + -4.64236492341485301e-23, + 8.51347589617420320e-25, + 1.37624936502749554e-27, + 6.71654620890425602e-02, + -1.62997073264831388e-03, + 2.92784416346170194e-05, + -4.57934400303250975e-07, + 6.50041810716883811e-09, + -8.49562781575342794e-11, + 1.00997408314320672e-12, + -1.08087735634342114e-14, + 9.27146580854579589e-17, + -5.75825622520762669e-19, + -3.58710763068808469e-21, + 1.86426962009839958e-22, + -7.71950994414978680e-25, + 1.28523566255179556e-25, + 1.97724571940841060e-01, + -4.92158536406416859e-03, + 8.85582752534429241e-05, + -1.33183081633185510e-06, + 1.70007333269241604e-08, + -1.76954706538293221e-10, + 1.22518688652279533e-12, + 1.50739527894616946e-15, + -2.50767229352141904e-16, + 4.89587296340293952e-18, + -6.80553346052534679e-20, + 5.91462756060196144e-22, + 9.87104767289170672e-24, + 8.10590811441032750e-26, + 4.25236797438371006e-01, + -1.10043077073275833e-02, + 1.98071809574038797e-04, + -2.77947508509396683e-06, + 2.87595887294129746e-08, + -1.48582650057277356e-10, + -1.84123445354828329e-12, + 6.03644044422260930e-14, + -8.17760168797771808e-16, + 2.35843006295323079e-18, + 1.26532822529884399e-19, + -3.13531660445159465e-21, + 5.62509395562299757e-23, + 5.91134883273541767e-25, + 8.05422380923658476e-01, + -2.19839421112277937e-02, + 3.93808007559732348e-04, + -4.91584213175108450e-06, + 3.20543817882966414e-08, + 2.36157502679455623e-10, + -9.22225399948534229e-12, + 8.61677549110983365e-14, + 8.31401122275028560e-16, + -3.76827414979898233e-17, + 3.75361870601081944e-19, + 4.65879328760694677e-21, + -1.48708069310011237e-22, + 3.16219674897695407e-24, + 1.46127702142442706e+00, + -4.27126486889425269e-02, + 7.52464290770353322e-04, + -7.67366898882513763e-06, + 3.81866730842830288e-09, + 1.15240431650971645e-09, + -1.10072003607580384e-11, + -1.98600235581567390e-13, + 5.17034130330914694e-15, + 4.43148386885267722e-18, + -1.81615972159246670e-18, + 1.95304945372410253e-20, + 5.16920656858031076e-22, + -9.47780357659485692e-24, + 2.70098041413463541e+00, + -8.58133519999280392e-02, + 1.45140865523303076e-03, + -1.01644321539227675e-05, + -9.57506387327587053e-08, + 1.82334605146867562e-09, + 2.38290725617524168e-11, + -6.14244885163612012e-13, + -7.35346388252553924e-15, + 2.41678688404719234e-16, + 2.29057290000421473e-18, + -1.03732208362554638e-19, + -5.33208804704318480e-22, + 5.40226803220401841e-23, + 5.48297653856860556e+00, + -1.91501745352292058e-01, + 2.97690492447578005e-03, + -9.09633478781912462e-06, + -2.71570664251845993e-07, + -1.25808917007421937e-09, + 7.21275217781583588e-11, + 1.19797409867726564e-12, + -1.77031433867384768e-14, + -7.17062292222140945e-16, + 7.48292913400270628e-19, + 3.60009391297953073e-19, + 3.80420829573169464e-21, + -1.30989666748919271e-22, + 1.41610170361144174e+01, + -5.43683066267061865e-01, + 7.29071528743174390e-03, + 2.34914689175994275e-06, + -2.71425402596550732e-07, + -8.56707883768992397e-09, + -1.19898520597236493e-10, + 5.26901005905351726e-13, + 6.71240614207695493e-14, + 1.44389881864512042e-15, + 3.12337194096236752e-18, + -6.58557165448740688e-19, + -1.77652801878570347e-20, + -7.28703588585475266e-23, + 7.62615647184199048e+01, + -3.14181823003478433e+00, + 3.51813711033914095e-02, + 2.42025130332617096e-05, + 3.33442513836385859e-07, + 2.18497114542810256e-09, + -6.94806982800087454e-11, + -3.84464448235756296e-12, + -1.21039010111096174e-13, + -2.95387988826289970e-15, + -5.50827918406904510e-17, + -4.96355313315342796e-19, + 1.70247893592911851e-20, + 1.08793074819743744e-21, +# root=10 base[5]=12.5 */ + 6.60759699618620761e-03, + -1.51159971808939006e-04, + 2.58847997759865067e-06, + -3.93758596304918523e-08, + 5.58754768809232779e-10, + -7.61890990494916483e-12, + 9.94929120663723776e-14, + -1.29871332667097439e-15, + 1.56928485280463675e-17, + -1.97804742492225766e-19, + 2.88071079620960727e-21, + -2.32809954094366063e-24, + 9.50408708510798395e-25, + -3.33335100948488469e-27, + 6.10815673020341926e-02, + -1.41607700134527498e-03, + 2.43551967692417117e-05, + -3.66300828642004311e-07, + 5.02082107257536609e-09, + -6.40331369133059584e-11, + 7.45644669967814244e-13, + -8.18491567428413444e-15, + 7.14524022982222796e-17, + -5.42937452554376765e-19, + 6.05471853681776414e-21, + 2.95565422768455635e-22, + 4.47391969056394264e-24, + 2.46759460025686758e-26, + 1.79360130502038750e-01, + -4.27268142142609494e-03, + 7.40967650785259675e-05, + -1.08653424365168101e-06, + 1.37550436978410045e-08, + -1.47805011517254856e-10, + 1.17814047075538846e-12, + -4.16239439752082255e-15, + -1.15812573364185814e-16, + 2.85613229449783966e-18, + -2.93245405327463560e-20, + 1.21964095248448025e-21, + 1.53151259540074064e-23, + -4.92890621805690238e-26, + 3.84188204955304424e-01, + -9.54556422984732464e-03, + 1.67374632074108602e-04, + -2.34497308943414514e-06, + 2.54681049176548191e-08, + -1.75339226410682189e-10, + -4.98971082404596270e-13, + 3.63131127183726368e-14, + -6.67057331576085539e-16, + 5.54803203889385001e-18, + 5.65913028297747191e-20, + 7.50175288756317282e-23, + 6.97222809609790526e-23, + -3.56241607695612390e-25, + 7.23426625485749208e-01, + -1.90604346129385482e-02, + 3.38014370524928698e-04, + -4.37635320763545123e-06, + 3.47702409329033376e-08, + 4.56402112188963491e-11, + -6.61855654135416935e-12, + 9.42653591635918363e-14, + -2.20138589930693758e-16, + -2.00575747794740435e-17, + 4.83564867608661128e-19, + 1.53063941110326437e-21, + 5.12457543863568255e-24, + 1.60117966284091198e-24, + 1.30188630496741364e+00, + -3.70585814231946462e-02, + 6.61456586026264344e-04, + -7.44409597919808833e-06, + 2.38701782943845986e-08, + 8.39892568821969546e-10, + -1.43160958106900173e-11, + -4.25709216242800343e-14, + 4.28302995975323771e-15, + -4.54588115671722581e-17, + -5.81576032134816177e-19, + 3.28716578087329751e-20, + 4.89404194541164243e-23, + -8.68262728049554461e-24, + 2.38014415054364026e+00, + -7.47130769119538490e-02, + 1.32153057497314745e-03, + -1.13798525038016390e-05, + -5.50595727958136001e-08, + 2.17071537967062270e-09, + 4.71774002381442891e-12, + -7.01635352086995839e-13, + 1.90076774126254617e-15, + 2.44335692057515374e-16, + -1.87827548348086387e-18, + -6.67392015248854260e-20, + 1.78600362583419815e-21, + 2.13343306993663088e-23, + 4.76380274216574318e+00, + -1.68198247572527743e-01, + 2.84118018979906449e-03, + -1.35387494376205517e-05, + -2.77133538500107168e-07, + 7.88640198878327104e-10, + 9.40905138557013223e-11, + 2.57245791755072790e-13, + -3.88877158090468461e-14, + -3.46717268304019499e-16, + 1.75109341708219867e-17, + 3.21200713239088599e-19, + -6.12247460355819282e-21, + -2.08101973346305181e-22, + 1.21029921294221960e+01, + -4.85332405598899341e-01, + 7.28671304110595133e-03, + -3.51074632277026149e-06, + -4.68891576642749946e-07, + -1.09776736364009639e-08, + -6.74895459764860088e-11, + 3.45903888889354077e-12, + 1.12116402990441736e-13, + 7.46519566523530645e-16, + -4.31876372739741797e-17, + -1.34017640393536367e-18, + -3.97973726881172710e-21, + 6.82013347669302416e-22, + 6.42591645407740941e+01, + -2.85911233024577838e+00, + 3.55048383142534188e-02, + 2.97506970520760715e-05, + 3.49010358626613853e-07, + -1.32615234335200560e-09, + -2.50507671529632220e-10, + -9.86257332144805772e-12, + -2.68199832210181917e-13, + -5.08266752112091836e-15, + -3.04730825257744201e-17, + 2.44166212292773412e-18, + 1.19997737426006589e-19, + 2.67715997744530135e-21, +# root=10 base[6]=15.0 */ + 6.04158050836114437e-03, + -1.32200987297143442e-04, + 2.16497040480680463e-06, + -3.15364893974850723e-08, + 4.27577655349471177e-10, + -5.61647792784283956e-12, + 6.92499168875619930e-14, + -8.87696056097519624e-16, + 1.07315211459865845e-17, + -7.30606759952058426e-20, + 3.56138044319806397e-21, + 2.39089958763515476e-23, + -2.55074262956816502e-25, + -4.85021237190081656e-26, + 5.57809107623081571e-02, + -1.23754358561181514e-03, + 2.04022712038356735e-05, + -2.95314154162417346e-07, + 3.90181664526323236e-09, + -4.86451156983508888e-11, + 5.46037875532666398e-13, + -6.13539961679351820e-15, + 5.99296358029482094e-17, + 1.39479758389740448e-20, + 2.25619862114071130e-20, + 3.82587077719255063e-22, + -4.84851265134627622e-24, + -4.30045968143614447e-25, + 1.63377374492172045e-01, + -3.72853447830478633e-03, + 6.22861396347360312e-05, + -8.88612052110426037e-07, + 1.10704752734318307e-08, + -1.21257249717549362e-10, + 1.02421880778193543e-12, + -6.33315317253255451e-15, + -1.94905635612970178e-17, + 2.92699282919514988e-18, + 3.49228893567241230e-20, + 1.44696261955765897e-21, + -1.73615073644948827e-23, + -1.35428453948290264e-24, + 3.48515149134867031e-01, + -8.31246775116030977e-03, + 1.41562907122112585e-04, + -1.96588351558767836e-06, + 2.19123030297788216e-08, + -1.77324058167042034e-10, + 2.52400540568027556e-13, + 1.86598731133309639e-14, + -4.17864070757506846e-16, + 8.70443759480902359e-18, + 1.15311744590810281e-19, + 1.88092633380390703e-21, + -2.12754288705683568e-23, + -3.39397769202151706e-24, + 6.52273892054041404e-01, + -1.65569094248712544e-02, + 2.88840642522461837e-04, + -3.82048163892796079e-06, + 3.43019373227713028e-08, + -8.28582943298068843e-11, + -4.15887401408270420e-12, + 7.95423185854489370e-14, + -5.76388911604263315e-16, + 7.68209359006732837e-19, + 5.56375171649765905e-19, + 1.03491083017403426e-21, + -9.08801652163438181e-23, + -5.75516844252331538e-24, + 1.16368022867922583e+00, + -3.21165982537465547e-02, + 5.74912348307647387e-04, + -6.94660552964348898e-06, + 3.72088809719862755e-08, + 4.95887039674807258e-10, + -1.38510224170376700e-11, + 6.66135223278207573e-14, + 2.57012812374423772e-15, + -4.08292914085838085e-17, + 7.41401393854769186e-19, + 2.27973287097292100e-20, + -5.17794768963096915e-22, + -1.40822730644121890e-23, + 2.10155468145552726e+00, + -6.46987342964323725e-02, + 1.18112148766078896e-03, + -1.19137971231144376e-05, + -1.20365667530088700e-08, + 2.06256102942388669e-09, + -1.28830100309408242e-11, + -5.18728642423349494e-13, + 8.87842785502227485e-15, + 1.36878494188816049e-16, + -2.87979416914693526e-18, + 1.46927043528035919e-20, + 9.83772137970422737e-22, + -4.87373001770624213e-23, + 4.13533585742790510e+00, + -1.46192048952883430e-01, + 2.65302870140072004e-03, + -1.77241860760063811e-05, + -2.38951781572963692e-07, + 2.98649654661825251e-09, + 8.30874315223580598e-11, + -1.03066818855675681e-12, + -3.63993114606893847e-14, + 5.16030695668242691e-16, + 2.19814278046788728e-17, + -1.70442285986760410e-19, + -1.25120967543448140e-20, + 1.41092008190894100e-24, + 1.02777805604814318e+01, + -4.27351819642393216e-01, + 7.19214810337420220e-03, + -1.28170433754692433e-05, + -6.94649398931664909e-07, + -1.10196927320543043e-08, + 8.05959841660534254e-11, + 7.03072421319530080e-12, + 9.42872398079275281e-14, + -2.06129002977937770e-15, + -9.04512412128967964e-17, + -3.98791253353296845e-19, + 4.60988456148676739e-20, + 9.75773312541164572e-22, + 5.33931817131658306e+01, + -2.57355534214666903e+00, + 3.58931149321136747e-02, + 3.46824842536251119e-05, + 2.34259953175911719e-07, + -1.17920860877395388e-08, + -6.74196650337583446e-10, + -2.12765040415270884e-11, + -4.28285972335568887e-13, + -1.99218724125873588e-15, + 2.47779996252672765e-16, + 1.09034980013895600e-17, + 1.98435988633983493e-19, + -1.44405771288798366e-21, +# root=10 base[7]=17.5 */ + 5.54517293801465132e-03, + -1.16286663986794195e-04, + 1.82414416526991684e-06, + -2.55113553353613409e-08, + 3.30048736311598841e-10, + -4.21534700711533421e-12, + 4.90118133472917215e-14, + -5.57460682355643548e-16, + 1.08081973073945499e-17, + 7.59648820408891782e-20, + 3.23136612384719631e-21, + -6.76559488418677870e-23, + -3.79425178110266767e-24, + -7.31184235242340350e-26, + 5.11361351890290972e-02, + -1.08750878972088140e-03, + 1.72031263780650168e-05, + -2.40010710448982438e-07, + 3.04719521084648323e-09, + -3.73776186119956501e-11, + 4.02566821793169354e-13, + -4.01043542957664417e-15, + 7.94085743070140102e-17, + 1.08685609834700563e-18, + 2.42464403292104122e-20, + -5.66989179123109402e-22, + -3.69320980585048429e-23, + -6.63358361651994243e-25, + 1.49396298924955623e-01, + -3.27006350408661894e-03, + 5.26096923143466968e-05, + -7.29610222744891459e-07, + 8.87687192604671762e-09, + -9.87647691588675556e-11, + 8.56520503489556790e-13, + -4.90333113316367276e-15, + 1.21960961639578799e-16, + 5.04943102473828641e-18, + 4.93240317244871574e-20, + -1.58495056081544133e-21, + -1.14743045969485646e-22, + -1.95305757084424788e-24, + 3.17388940117766138e-01, + -7.26863336528431065e-03, + 1.19960347002469927e-04, + -1.64317488091219173e-06, + 1.84622649833857021e-08, + -1.66183091102779229e-10, + 6.41854439072855736e-13, + 1.13069554504805964e-14, + -9.58517045103282306e-18, + 1.39355123875249752e-17, + 1.00812337039084137e-19, + -4.40452310864094605e-21, + -2.50218638198747824e-22, + -4.35407994472549029e-24, + 5.90390313952094403e-01, + -1.44203948420248210e-02, + 2.46217577833982612e-04, + -3.28960955636934169e-06, + 3.18169408490299601e-08, + -1.57850094168640018e-10, + -2.15520966024746710e-12, + 6.57966282129736088e-14, + -1.58228847802538580e-16, + 2.13467662521471386e-17, + 3.72823132727320680e-19, + -1.27528197992008145e-20, + -5.02622286906036510e-22, + -7.66329404264658915e-24, + 1.04389962995104524e+00, + -2.78399755405123045e-02, + 4.95396015218572115e-04, + -6.28919694013613617e-06, + 4.39965970145654470e-08, + 1.94023596429038784e-10, + -1.10058562188971284e-11, + 1.32475582422566112e-13, + 1.78896027793858352e-15, + -1.19143534338194815e-18, + 9.23033289411662390e-19, + -2.06668157351515067e-20, + -1.26515729579600222e-21, + -1.02816874497211767e-23, + 1.86075158644202010e+00, + -5.58218946470220995e-02, + 1.03829529358629596e-03, + -1.17974817498290757e-05, + 2.51287313601895573e-08, + 1.61497944436878370e-09, + -2.28379295425355552e-11, + -1.76322316303330258e-13, + 1.19405687954237494e-14, + 3.82953263638062000e-17, + -2.21880247330533603e-18, + -8.35223771123642189e-21, + -1.89594818545188756e-21, + -4.27264015609714827e-23, + 3.59158412711218267e+00, + -1.25878389161910548e-01, + 2.41968922854746745e-03, + -2.09731338378613671e-05, + -1.62205445077452099e-07, + 4.52534837177056590e-09, + 4.17888252488234623e-11, + -1.75341860973910863e-12, + -5.34146925024544356e-15, + 1.07986330285611820e-15, + 2.64210771453898559e-18, + -6.49866411528411592e-19, + -5.26436348769765306e-21, + 2.50907063203686137e-22, + 8.68218601793040712e+00, + -3.70634511253967736e-01, + 6.96491991587131973e-03, + -2.55175456099845807e-05, + -8.78374768195464269e-07, + -6.47569182266271697e-09, + 3.03582803095253256e-10, + 8.17315508542974330e-12, + -4.22763902784097106e-14, + -5.24295374205045760e-15, + -4.72904644188687366e-17, + 2.44977731557096103e-18, + 5.54639212982717354e-20, + -9.63940309731458034e-22, + 4.36759438205490014e+01, + -2.28470669960946671e+00, + 3.63205424833520432e-02, + 3.54343681707239424e-05, + -2.19596962418216746e-07, + -3.66422566367924086e-08, + -1.45279422400579633e-09, + -3.31348078934693310e-11, + -1.85315952874588890e-13, + 1.95734651804752222e-14, + 8.50248780062007705e-16, + 1.29490864032918079e-17, + -2.52850734945062090e-19, + -1.72485158382109325e-20, +# root=10 base[8]=20.0 */ + 5.10739251134947284e-03, + -1.02834297920784056e-04, + 1.54710475414278060e-06, + -2.08456840196785097e-08, + 2.56455608340844279e-10, + -3.18407981251847039e-12, + 3.87823190741970812e-14, + -1.52419125777369400e-16, + 1.45779584916873628e-17, + 8.08852132834620958e-20, + -4.77667548718054391e-21, + -3.08427102703191343e-22, + -5.13601431550897092e-24, + 5.58957343512305385e-26, + 4.70442085485251113e-02, + -9.60629025928674742e-04, + 1.45924690408453888e-05, + -1.96743557344205244e-07, + 2.38881923334618599e-09, + -2.87353855173023738e-11, + 3.32610753186340727e-13, + -7.40603835825640109e-16, + 1.24455757380197572e-16, + 9.35600608438005827e-19, + -4.88454224761900027e-20, + -2.85706495406097046e-21, + -4.80651367330988607e-23, + 5.55981177785238450e-25, + 1.37105569308567737e-01, + -2.88193580485391785e-03, + 4.46448789861190741e-05, + -6.02302232744732315e-07, + 7.09904563276216408e-09, + -7.92385690066268512e-11, + 8.02584843984748515e-13, + 2.04241340817304367e-15, + 3.05451775634923169e-16, + 3.71808498332659574e-18, + -1.67619193572851329e-19, + -8.53422062534053744e-21, + -1.42293602177298687e-22, + 1.84471292751633260e-24, + 2.90115654919746224e-01, + -6.38304785490794932e-03, + 1.01907962153895292e-04, + -1.37341783199617432e-06, + 1.53201389323454359e-08, + -1.46536445695471179e-10, + 1.03176440407587063e-12, + 1.91867819656245974e-14, + 4.80941883185510402e-16, + 9.93622470580762786e-18, + -4.12533037912843308e-19, + -1.93861434736678505e-20, + -2.97042566585982076e-22, + 4.61170012784015443e-24, + 5.36410087657960166e-01, + -1.26001563592562753e-02, + 2.09685112909738453e-04, + -2.80797898875829318e-06, + 2.82922340490585614e-08, + -1.87262372879219250e-10, + -2.56395332040404022e-13, + 7.43377783560793024e-14, + 6.70752730544052127e-16, + 1.69228595814044319e-17, + -8.06304418486216128e-19, + -4.11426405830835427e-20, + -5.19810543593470079e-22, + 1.09575245986348765e-23, + 9.40005259329059206e-01, + -2.41665133846387069e-02, + 4.24234621243167536e-04, + -5.56718019019554196e-06, + 4.55701081676747496e-08, + -1.89857436108726452e-11, + -6.46651827915127660e-12, + 1.93263677602950967e-13, + 2.02071540619535606e-15, + -1.23907773404002202e-18, + -1.38273210021793705e-18, + -8.18516403885631887e-20, + -9.44560162542250124e-22, + 2.89880314602960967e-23, + 1.65319275970012947e+00, + -4.80727202629859796e-02, + 9.00104596121671327e-04, + -1.11676978379814752e-05, + 5.17734851777385967e-08, + 1.05141231612868822e-09, + -2.23535454705350677e-11, + 2.08147975292973417e-13, + 1.13496695797892998e-14, + -8.94192974814947750e-17, + -4.98062132105324516e-18, + -1.15685108292956597e-19, + -1.65222091924463555e-21, + 6.28771924969976227e-23, + 3.12513876695791382e+00, + -1.07564555769871978e-01, + 2.15555769617225635e-03, + -2.28064568044581090e-05, + -6.55952727228697162e-08, + 4.95502861205552088e-09, + -4.04740409950339098e-12, + -1.34030738568344461e-12, + 2.82332983608166755e-14, + 5.89355541591363277e-16, + -2.65091128072123557e-17, + -5.59232893275124216e-19, + 9.10479108659036252e-21, + 2.62064646623483072e-22, + 7.30880077308378606e+00, + -3.16385816054263691e-01, + 6.57159470156904943e-03, + -4.01390378221145433e-05, + -9.18050717277761690e-07, + 3.22209580337136626e-09, + 4.83922685215847495e-10, + 3.68283857610140479e-12, + -2.33861212900569197e-13, + -4.46663420801441955e-15, + 9.03318892607813330e-17, + 2.96848593521212683e-18, + -4.64444989829413392e-20, + -2.30853175680979716e-21, + 3.51207635280787400e+01, + -1.99257082323268353e+00, + 3.66934853700960836e-02, + 2.38469356065417022e-05, + -1.37603624562980194e-06, + -8.24054032378543642e-08, + -2.30608475644003764e-09, + -2.04735378548104721e-11, + 1.20942052912635455e-12, + 5.76944138688067694e-14, + 7.77859404046802201e-16, + -2.52622556527795183e-17, + -1.34483051639059395e-18, + -1.65073852423359917e-20, +# root=10 base[9]=22.5 */ + 4.71931723156527802e-03, + -9.13928113203522587e-05, + 1.31963696479504659e-06, + -1.72017617330533821e-08, + 2.02012805240005491e-10, + -2.25115860324514372e-12, + 4.10482672020496015e-14, + 2.93637257278662024e-16, + 1.02609588581316596e-17, + -4.33030667234695065e-19, + -2.13802071781448991e-20, + -3.56091553680427271e-22, + 6.47120246418397345e-24, + 4.42390791465097156e-25, + 4.34210827070314262e-02, + -8.52724066716536609e-04, + 1.24433133219662989e-05, + -1.62685127333951727e-07, + 1.89464565621258644e-09, + -2.05406420952172869e-11, + 3.68410294428762944e-13, + 3.12439468242029805e-15, + 8.78589164221526442e-17, + -4.00775903769501303e-18, + -2.02351530600571295e-19, + -3.26455669941663291e-21, + 6.20162601166392169e-23, + 4.15507181557353327e-24, + 1.26248945205914037e-01, + -2.55186980193250609e-03, + 3.80499564437377009e-05, + -5.00308815289754514e-07, + 5.71752716451573692e-09, + -5.81284570961015834e-11, + 1.00275939311876538e-12, + 1.18324350009713768e-14, + 2.14175366601121207e-16, + -1.18617874085757992e-17, + -6.21131983240196502e-19, + -9.43925185975179630e-21, + 1.96864818717152567e-22, + 1.25814349079589175e-23, + 2.66115212693657177e-01, + -5.62975408588757466e-03, + 8.68059063454710119e-05, + -1.15017931246636082e-06, + 1.26903801398375628e-08, + -1.13416812819663159e-10, + 1.80485237008327286e-12, + 3.52504424901290155e-14, + 3.08249959485608591e-16, + -2.62897759983406121e-17, + -1.40906341986587258e-18, + -1.98465735477520765e-20, + 4.80222997907483769e-22, + 2.81534628193484208e-23, + 4.89161508346196927e-01, + -1.10500460637269066e-02, + 1.78582791979975543e-04, + -2.38484394631865293e-06, + 2.46678613271964181e-08, + -1.65766684922417547e-10, + 2.15060262460261691e-12, + 9.54660753238933526e-14, + 2.19327226892744083e-16, + -5.55208047088367188e-17, + -2.79722761942222360e-18, + -3.67529336229293659e-20, + 1.09096550530376533e-21, + 5.61225409796905942e-23, + 8.49721257652078621e-01, + -2.10275399861005602e-02, + 3.61768676347550065e-04, + -4.84756292096528397e-06, + 4.41123549392942891e-08, + -1.02546690257063707e-10, + -2.76175206110021441e-13, + 2.38986356047696473e-13, + 4.55549601558121723e-17, + -1.34106933196878870e-16, + -5.14316640378364447e-18, + -6.24677818944744799e-20, + 2.44290379092233085e-21, + 1.09423203761831898e-22, + 1.47447657199645388e+00, + -4.13924291775756778e-02, + 7.71669064895331405e-04, + -1.01975788603786004e-05, + 6.81025878551370228e-08, + 6.21292610771823594e-10, + -1.22607185717121868e-11, + 4.70657748758544930e-13, + 3.22273586396004737e-15, + -3.96993603474796565e-16, + -1.00240485659138725e-17, + -5.81711791573283364e-20, + 5.35786472784740358e-21, + 2.15711768906411703e-22, + 2.72762080677372465e+00, + -9.14252039470261624e-02, + 1.87880623551084131e-03, + -2.30792064953554392e-05, + 3.00749224316225504e-08, + 4.52090497485945323e-09, + -2.74296981349224857e-11, + -3.40556825925740364e-13, + 2.59440171522000845e-14, + -7.88725698266248488e-16, + -3.70095471341726309e-17, + 1.79958018475845513e-19, + 2.16860864683572591e-20, + 2.71253842677067077e-22, + 6.14501167924532243e+00, + -2.65980338138309791e-01, + 6.00601965030983335e-03, + -5.36630462578616406e-05, + -7.34007116000591719e-07, + 1.51097590414090224e-08, + 4.64290964710346438e-10, + -5.47508044950382854e-12, + -3.06755068210604407e-13, + 7.62722331250775915e-16, + 1.41257265732207086e-16, + -9.56978628300732144e-19, + -8.00699326693727052e-20, + 1.86693918061069787e-21, + 2.77386695250340196e+01, + -1.69839792035230563e+00, + 3.67831343182801127e-02, + -1.44517592668997503e-05, + -3.59274918299730700e-06, + -1.38199498571658631e-07, + -2.00099387699635050e-09, + 5.40801079971373863e-11, + 3.39411044674405052e-12, + 4.63747458045247291e-14, + -1.81506257598731768e-15, + -8.67359513946362242e-17, + -5.39064889862693730e-19, + 6.04066780893798310e-20, +# root=10 base[10]=25.0 */ + 4.37362636266982758e-03, + -8.16095109258143628e-05, + 1.13130539239211691e-06, + -1.42729997548463492e-08, + 1.67614325675065910e-10, + -1.15114150968075819e-12, + 5.02129438746839877e-14, + 1.86322981228577835e-16, + -2.29309439026642913e-17, + -1.40714595210335939e-18, + -1.95399295199008016e-20, + 7.30456819828858045e-22, + 4.23126326822528120e-23, + 7.90436655638019951e-25, + 4.01976058944635076e-02, + -7.60499040098670787e-04, + 1.06610672290257878e-05, + -1.35143733928380900e-07, + 1.58019200107590154e-09, + -1.05259271792813206e-11, + 4.61215215737924181e-13, + 1.87413668655482505e-15, + -2.21871427753619430e-16, + -1.31335619953363769e-17, + -1.80592055205510050e-19, + 6.96726942650579341e-21, + 3.96485916377984716e-22, + 7.33209296054099252e-24, + 1.16614332296124182e-01, + -2.27000907326341348e-03, + 3.25613307943323782e-05, + -4.16701623669058597e-07, + 4.82410838873256560e-09, + -2.98935354515134789e-11, + 1.32822478683345167e-12, + 6.52538340673255284e-15, + -7.14093939478817264e-16, + -3.93267744493536017e-17, + -5.28086342609188763e-19, + 2.17860390962664431e-20, + 1.19681220164126441e-21, + 2.16466598822517159e-23, + 2.44902344372501607e-01, + -4.98721906544459352e-03, + 7.41557322396389697e-05, + -9.62586038199782111e-07, + 1.09356846547826448e-08, + -5.84362482664803440e-11, + 2.70328953373643446e-12, + 1.80423855653192931e-14, + -1.75529899299918855e-15, + -8.68841190729744991e-17, + -1.10953732896483242e-18, + 5.12951363053577165e-20, + 2.67494154419943316e-21, + 4.65381739608637539e-23, + 4.47646569282837747e-01, + -9.72937586123114387e-03, + 1.52234907237333198e-04, + -2.01298504307830448e-06, + 2.20784551120217256e-08, + -8.39557218744130571e-11, + 4.45578478297932321e-12, + 4.71647917978900430e-14, + -3.95190517256544354e-15, + -1.71642725328986692e-16, + -1.95534958877506672e-18, + 1.09594075897908038e-19, + 5.33940170207284030e-21, + 8.71489263621065385e-23, + 7.71047725943918016e-01, + -1.83542221816519018e-02, + 3.07769929419352353e-04, + -4.15632652313522636e-06, + 4.25136295661359011e-08, + -3.46727566915337417e-11, + 5.41002842376894686e-12, + 1.21132802857027245e-13, + -8.65959486672930210e-15, + -3.36077397437329000e-16, + -2.83146353173514931e-18, + 2.31752158822791405e-19, + 1.03153268840964534e-20, + 1.52498385988173559e-22, + 1.32050583730195314e+00, + -3.56891736232747003e-02, + 6.56206553794754627e-04, + -9.02002485504567465e-06, + 7.86473455579224410e-08, + 4.80843319999627737e-10, + -3.37678148849284305e-13, + 2.69095865025385307e-13, + -1.78778962061493873e-14, + -7.26839355749023243e-16, + -2.17839693473443793e-18, + 5.34271801451519912e-19, + 1.99470612710235786e-20, + 2.57206756386173161e-22, + 2.39024717382407781e+00, + -7.74877469066835439e-02, + 1.60760516326770644e-03, + -2.19124163655622736e-05, + 1.13476127285240701e-07, + 3.80628263539567571e-09, + -3.14582567168782834e-11, + -2.14215607120819068e-13, + -2.39732294472553969e-14, + -1.74512362129181316e-15, + -1.32390509048877993e-19, + 1.65037452655179661e-18, + 4.02121413371433393e-20, + 2.65899225912351836e-22, + 5.17286121636535157e+00, + -2.20681094369497149e-01, + 5.30334299875674913e-03, + -6.24555574766934811e-05, + -3.38292042780244865e-07, + 2.33652395761870994e-08, + 1.84740441318865605e-10, + -1.38910688432860995e-11, + -1.94224006184269984e-13, + 4.98492176836519644e-15, + 7.22774689525235579e-17, + -5.27040675061220871e-19, + 1.17019624868563090e-19, + 3.66131523434544317e-21, + 2.15308359785975121e+01, + -1.40602727136830730e+00, + 3.61671140861211937e-02, + -9.59079509001751985e-05, + -6.64677225567829497e-06, + -1.54923006762536394e-07, + 1.14179862418906966e-09, + 1.68035480860803718e-10, + 2.87168905043973708e-12, + -9.55957954244817088e-14, + -4.69799084165272620e-15, + -5.02405959616767238e-18, + 4.19955082901029851e-18, + 8.32972252040506729e-20, +# root=10 base[11]=27.5 */ + 4.06426705111192967e-03, + -7.31999044614115160e-05, + 9.75572589041820149e-07, + -1.17102287421738718e-08, + 1.56425521290055343e-10, + -1.62538296927415411e-14, + 3.70273367620013094e-14, + -1.40539567128588085e-15, + -7.36583077171295212e-17, + -8.49425949532515738e-19, + 6.50902050753355920e-20, + 3.02307409025087428e-21, + 2.49149635558684512e-23, + -2.53399420044417729e-24, + 3.73165065221408715e-02, + -6.81279671816260087e-04, + 9.18604302395682505e-06, + -1.10945899371377570e-07, + 1.47850163397086981e-09, + -9.43373252504982877e-14, + 3.38592332741019617e-13, + -1.32057795136565492e-14, + -6.92365772256858790e-16, + -7.71826522686894543e-18, + 6.15831271563856995e-19, + 2.83008436902281723e-20, + 2.26132783749765433e-22, + -2.39392635396803795e-23, + 1.08025414778256473e-01, + -2.02824207433659675e-03, + 2.80099257988062617e-05, + -3.42568864852347958e-07, + 4.54059362204335855e-09, + 2.07414651256040722e-13, + 9.65529615914315009e-13, + -4.00389293491777333e-14, + -2.10345421521413385e-15, + -2.17557873643723542e-17, + 1.89639024893726985e-18, + 8.52260342659822696e-20, + 6.35777227737997545e-22, + -7.34955971427309804e-23, + 2.26070914664581263e-01, + -4.43726849770081661e-03, + 6.36274860411377495e-05, + -7.93421073751084014e-07, + 1.04109721254031674e-08, + 3.11672878590371054e-12, + 1.92871940357670912e-12, + -8.97910651698471227e-14, + -4.74877477921368473e-15, + -4.29452065567952481e-17, + 4.37610842349982223e-18, + 1.89533046730616431e-19, + 1.24805508035715536e-21, + -1.68770847505078283e-22, + 4.11020196089917633e-01, + -8.60220348763577822e-03, + 1.30162471127679178e-04, + -1.66723638802795629e-06, + 2.14766679631755944e-08, + 1.86157793837966814e-11, + 3.04841585114890629e-12, + -1.78824341274933534e-13, + -9.60961605487308339e-15, + -6.86222456712222287e-17, + 9.16444109260289672e-18, + 3.74589514957496422e-19, + 1.96001250607706097e-21, + -3.50678603417946359e-22, + 7.02255592423650432e-01, + -1.60800066512344249e-02, + 2.61976763792252400e-04, + -3.47415737021374608e-06, + 4.31832897806824277e-08, + 9.32623435177184238e-11, + 3.10956908600423927e-12, + -3.41957049458845713e-13, + -1.88854881661121324e-14, + -8.55646997980791280e-17, + 1.91110546044775254e-17, + 7.11970761171842241e-19, + 2.20879236960692308e-21, + -7.20885861193549885e-22, + 1.18759409501242796e+00, + -3.08503553558660409e-02, + 5.55835864191440380e-04, + -7.68407832693983492e-06, + 8.83592179008632380e-08, + 4.75199137645604578e-10, + -4.51127582279688901e-12, + -6.74499138527718002e-13, + -3.72107814082804880e-14, + -4.57190403914163758e-17, + 4.28401534661399281e-17, + 1.36716494133100785e-18, + -9.65307314419104201e-22, + -1.56929264273841603e-21, + 2.10440336926784832e+00, + -6.56423360001039263e-02, + 1.35791825258576616e-03, + -1.95331252896966956e-05, + 1.80884662197856983e-07, + 2.83868660471001728e-09, + -5.66570762712718075e-11, + -1.81150687780639424e-12, + -6.42919206837617790e-14, + 2.43823945425191409e-16, + 1.09585448628519540e-16, + 2.85081779870751756e-18, + -2.68629266962712371e-20, + -3.96095188328883262e-21, + 4.37016174359023069e+00, + -1.81307852162804900e-01, + 4.53721496076997001e-03, + -6.40314443618280249e-05, + 1.38994624234505407e-07, + 2.26160426885850772e-08, + -2.59965041655592187e-10, + -1.66070509022465144e-11, + 4.92642037885252074e-14, + 9.32448955033413571e-15, + 1.84509925057434451e-16, + 4.15389605308025045e-18, + -8.59027900646568014e-20, + -1.46699139225662033e-20, + 1.64752714505327127e+01, + -1.12331915086605716e+00, + 3.42854091051132612e-02, + -2.23821626813220764e-04, + -9.05447099669795739e-06, + -6.50907066149693877e-08, + 6.37428650150080263e-09, + 1.72150202635671029e-10, + -3.39386189090765345e-12, + -2.20214439831663556e-13, + 1.35684427122451969e-16, + 2.13061832162246315e-16, + 2.60201122979015860e-18, + -1.68354516217589856e-19, +# root=10 base[12]=30.0 */ + 3.78624694246075836e-03, + -6.59146644571064486e-05, + 8.50163941547022863e-07, + -9.18004253674132013e-09, + 1.60389487044971014e-10, + 1.30013884193591768e-13, + -3.48382942448124909e-14, + -3.49471380380490575e-15, + -2.71052654744225449e-17, + 4.05268466172815042e-18, + 1.48794434578033809e-19, + -1.40602555442277905e-21, + -2.36655379870254876e-22, + -4.88378419995801379e-24, + 3.47305028193282336e-02, + -6.12712665253082288e-04, + 7.99754150720638634e-06, + -8.70353415135153035e-08, + 1.51471240325612325e-09, + 1.06474447134557939e-12, + -3.35229730282179673e-13, + -3.26778960904924175e-14, + -2.44674437956659972e-16, + 3.82943471663230803e-17, + 1.38840064246085850e-18, + -1.37089026240048553e-20, + -2.22687179139923658e-21, + -4.54160220280181796e-23, + 1.00336321384175364e-01, + -1.81936489736140151e-03, + 2.43378336759082120e-05, + -2.69147825890392189e-07, + 4.64577275737553796e-09, + 2.30162393848438117e-12, + -1.06935979778148169e-12, + -9.81369885544267907e-14, + -6.79265499229548360e-16, + 1.17597133189055088e-16, + 4.15218112958659399e-18, + -4.47950499761880310e-20, + -6.77987280055009240e-21, + -1.34819294357499695e-22, + 2.09283598401708848e-01, + -3.96348547588594707e-03, + 5.51130011590826081e-05, + -6.24998781176036075e-07, + 1.06434392757060371e-08, + 2.24313791652293362e-12, + -2.61209335844792930e-12, + -2.17087426669623969e-13, + -1.29997314139618295e-15, + 2.70021536739244993e-16, + 9.12905530255037067e-18, + -1.12778478503887856e-19, + -1.53580514210050968e-20, + -2.92579710707255993e-22, + 3.78575575253675523e-01, + -7.63504628842037823e-03, + 1.12236399186385554e-04, + -1.31898176008595023e-06, + 2.19975006823136121e-08, + -2.02963812320044026e-12, + -5.95090610677608577e-12, + -4.24802595316709615e-13, + -1.92557550203802850e-15, + 5.60291402519041054e-16, + 1.77319042004240182e-17, + -2.64482393041858655e-19, + -3.12586529650534987e-20, + -5.55671118552334146e-22, + 6.41879934974139643e-01, + -1.41390592242340365e-02, + 2.24495353710518595e-04, + -2.76870489962466641e-06, + 4.46781978851954258e-08, + -1.14158656388451146e-11, + -1.40034417254578224e-11, + -7.92143517703796872e-13, + -1.71748754170491328e-15, + 1.14601397148500318e-15, + 3.28418534687623235e-17, + -6.32595515491236661e-19, + -6.23121852128082758e-20, + -9.86561527630578678e-22, + 1.07253684138944561e+00, + -2.67478277736051158e-02, + 4.72380845671790516e-04, + -6.20890530054352339e-06, + 9.46007199896006237e-08, + 1.87298834686395863e-11, + -3.73443549200723394e-11, + -1.45937813725704914e-12, + 3.51720185994066790e-15, + 2.45655566254366012e-15, + 6.04086128536273449e-17, + -1.66293191855175513e-18, + -1.29622516242886911e-19, + -1.64303821227639637e-21, + 1.86215062058074721e+00, + -5.56636457750590077e-02, + 1.14246360790957622e-03, + -1.62796465469760945e-05, + 2.18912247847120659e-07, + 6.81260449487041026e-10, + -1.27678608941807570e-10, + -2.69696543767200566e-12, + 4.33237013931522153e-14, + 5.80186474137879387e-15, + 1.09103859316005723e-16, + -5.25759453833901674e-18, + -3.02694712523402876e-19, + -2.00742001992567360e-21, + 3.71275438318122797e+00, + -1.48014417718662028e-01, + 3.79559511765508806e-03, + -5.86783291815942920e-05, + 4.93701085892071964e-07, + 1.13418058027599849e-08, + -6.41112427961046878e-10, + -8.08039840776166194e-12, + 5.27170151890698550e-13, + 1.59078234695623660e-14, + -4.45950740145214236e-17, + -2.11268423496732107e-17, + -8.08602340048252231e-19, + 6.29509177563190244e-21, + 1.25100201030940337e+01, + -8.62280141917411425e-01, + 3.07180350536967635e-02, + -3.69467222385631454e-04, + -8.52886727079214082e-06, + 1.26648293893045909e-07, + 8.60044684824193208e-09, + -4.31881557835865621e-11, + -8.89845246822450921e-12, + -2.75115634087721588e-14, + 8.54968293846867661e-15, + 8.50147159017677577e-17, + -7.43973640569324617e-18, + -1.11248835951190750e-19, +# root=10 base[13]=32.5 */ + 3.53555450114240947e-03, + -5.95106317866476742e-05, + 7.55248813445570696e-07, + -6.67139146099688783e-09, + 1.46896266500598444e-10, + -1.80950067365378244e-12, + -1.16490498285088010e-13, + -1.22013057338945158e-15, + 1.77565710432312049e-16, + 5.13580356787925902e-18, + -1.72187003301661139e-19, + -1.10381376259866108e-20, + 4.35617154549712479e-23, + 1.73901815518114357e-23, + 3.24015764601495934e-02, + -5.52500791638851517e-04, + 7.09697049320725413e-06, + -6.33741410142774062e-08, + 1.38346300801936014e-09, + -1.72554083299600837e-11, + -1.09312363329352887e-12, + -1.09772298447304387e-14, + 1.67437782920665896e-15, + 4.77239321718910769e-17, + -1.64000546928606730e-18, + -1.03436990897102248e-19, + 4.46826116072316069e-22, + 1.63964844555694326e-22, + 9.34295834451722568e-02, + -1.63632784776196255e-03, + 2.15485261709810948e-05, + -1.96760270367748880e-07, + 4.22002158846317403e-09, + -5.39460028716370445e-11, + -3.30957507589565899e-12, + -3.01956963373198690e-14, + 5.11921889565664682e-15, + 1.41439311040067954e-16, + -5.11892862646663635e-18, + -3.12141103896076595e-19, + 1.59783644764306221e-21, + 5.01284919066519612e-22, + 1.94268015933095589e-01, + -3.54971525053266856e-03, + 4.86196767677622295e-05, + -4.59766114050854990e-07, + 9.59051612079973369e-09, + -1.27086796118520670e-10, + -7.43438986327279602e-12, + -5.64398683213432429e-14, + 1.16687457830191451e-14, + 3.06074567162153187e-16, + -1.20573733440422315e-17, + -6.96555510124522404e-19, + 4.50730143573609549e-21, + 1.14315159786237719e-21, + 3.49739285366081787e-01, + -6.79455603114283505e-03, + 9.84831536373041987e-05, + -9.78997052699981428e-07, + 1.96228316933939213e-08, + -2.72101705680704521e-10, + -1.49706002279965500e-11, + -7.77997775788146381e-14, + 2.39426468382865941e-14, + 5.78561553067150261e-16, + -2.59472368090253034e-17, + -1.38414765829045354e-18, + 1.19592319322104746e-20, + 2.34968151161292701e-21, + 5.88722142322050779e-01, + -1.24640137198563997e-02, + 1.95473655321123664e-04, + -2.08103398503966782e-06, + 3.94478293664045744e-08, + -5.75055694291703057e-10, + -2.95306032066468418e-11, + -4.30404226821627206e-14, + 4.81867425834562683e-14, + 1.01896430396173333e-15, + -5.58508730444325273e-17, + -2.65355806303088725e-18, + 3.23990819915535756e-20, + 4.74950537167469667e-21, + 9.72667634394936420e-01, + -2.32414289990472700e-02, + 4.06775396029263481e-04, + -4.75349023447834347e-06, + 8.31585345582217254e-08, + -1.26239862735908383e-09, + -6.13901801348924215e-11, + 2.80595428601140208e-13, + 1.01287105688342419e-13, + 1.67104887340042025e-15, + -1.29075967581950155e-16, + -5.14827447340347284e-18, + 9.62942287823558481e-20, + 1.00655610382199822e-20, + 1.65662213593334240e+00, + -4.72459688417755375e-02, + 9.67976140836085581e-04, + -1.28547509384497430e-05, + 1.97466544078683846e-07, + -2.92524721331906654e-09, + -1.50210920369442390e-10, + 2.17976220930190534e-12, + 2.39602411934717763e-13, + 1.92601795018941542e-15, + -3.48398879163558462e-16, + -1.02523595051423454e-17, + 3.47364608504480959e-19, + 2.38973746886344590e-20, + 3.17717187521470823e+00, + -1.20320342459300761e-01, + 3.14351411386177941e-03, + -4.98368373806273922e-05, + 5.60219628143727724e-07, + -4.39243338895883428e-09, + -5.60806423086438264e-10, + 1.52664362710296861e-11, + 7.71681895368987523e-13, + -1.09551875270522667e-14, + -1.25329694843660354e-15, + -1.18544965140409158e-17, + 1.79527078058586834e-18, + 6.32067770647550328e-20, + 9.52137383963931683e+00, + -6.36329131825044025e-01, + 2.55830787430087921e-02, + -4.75428370552819944e-04, + -4.19110343963056253e-06, + 2.87873402256854802e-07, + 3.73580719273826834e-09, + -2.77177672116536067e-10, + -3.85323693595995095e-12, + 2.77581394357125590e-13, + 4.10465065613197125e-15, + -2.58538585790261394e-16, + -4.06377355324768483e-18, + 2.02965249642939512e-19, +# root=10 base[14]=35.0 */ + 3.30914046019416654e-03, + -5.37526546903055859e-05, + 6.87607409304069872e-07, + -4.76098802682418420e-09, + 8.37830409339887493e-11, + -4.27069220878575904e-12, + -5.75176713308890701e-14, + 5.31452786107380574e-15, + 1.51410109725508412e-16, + -7.60111420922400930e-18, + -3.03740877917044499e-19, + 9.80541491618791718e-21, + 5.65883196633556305e-22, + -1.10157635661790027e-23, + 3.03007933464069824e-02, + -4.98426197551832370e-04, + 6.45329636838217879e-06, + -4.54063127817081682e-08, + 7.86848084714815087e-10, + -4.01840051743403297e-11, + -5.26498753796206999e-13, + 5.01926871327285240e-14, + 1.40136737697615594e-15, + -7.20744859648294442e-17, + -2.82860297462674138e-18, + 9.35376981623336755e-20, + 5.29582467317439259e-21, + -1.06106444445448901e-22, + 8.72155718024910237e-02, + -1.47234624325956248e-03, + 1.95430516346456888e-05, + -1.42099794184090490e-07, + 2.38689000650012072e-09, + -1.22301555459626015e-10, + -1.50998121383822827e-12, + 1.53966557344127766e-13, + 4.11674931595264323e-15, + -2.22896596060542781e-16, + -8.42105241327052116e-18, + 2.92882520304082705e-19, + 1.59328686483944859e-20, + -3.38824948970141016e-22, + 1.80815477066786384e-01, + -3.18047340672287116e-03, + 4.39084505662385620e-05, + -3.36037211585758519e-07, + 5.38144050107318344e-09, + -2.76713062196559197e-10, + -3.08455388632746870e-12, + 3.52868928075584316e-13, + 8.76858531988189571e-15, + -5.17362599734454939e-16, + -1.83563700893364125e-17, + 6.93232238036974493e-19, + 3.53517328275467564e-20, + -8.26567313629915175e-22, + 3.24069221762215254e-01, + -6.04888244398878346e-03, + 8.83782403450058466e-05, + -7.27117190532043298e-07, + 1.09061754272861620e-08, + -5.61376801315611731e-10, + -5.28243121389605149e-12, + 7.30168546957683202e-13, + 1.61181183563129205e-14, + -1.08973117262266653e-15, + -3.50791836790104691e-17, + 1.50183677349469108e-18, + 6.94999195498600930e-20, + -1.86751200307279805e-21, + 5.41849201520878010e-01, + -1.09904969333837754e-02, + 1.73790960204513639e-04, + -1.57741615549148025e-06, + 2.17346166557760402e-08, + -1.11015690617024321e-09, + -7.74222513255078396e-12, + 1.48898847107596122e-12, + 2.69122762273605608e-14, + -2.27501558416569759e-15, + -6.28159970678186176e-17, + 3.26068087966310531e-18, + 1.30418266017760778e-19, + -4.28888844181204849e-21, + 8.85877856788862661e-01, + -2.01951719597406841e-02, + 3.56648110194411475e-04, + -3.69543832672030382e-06, + 4.57842081210704442e-08, + -2.26366800515038061e-09, + -8.07022645520571660e-12, + 3.19792175650036489e-12, + 3.88716761554929447e-14, + -5.03109964884707911e-15, + -1.06162921084441417e-16, + 7.61502949697089138e-18, + 2.40820196522691616e-19, + -1.07980576098634164e-20, + 1.48221748018668942e+00, + -4.00710298905878268e-02, + 8.30204633433593740e-04, + -1.03231087792751155e-05, + 1.12205867224767776e-07, + -4.97765289774885212e-09, + 6.43557542872989240e-12, + 7.83448530041542540e-12, + 2.10001105828983013e-14, + -1.27188105121297836e-14, + -1.38705663586285755e-16, + 2.07773586447284996e-17, + 4.09409647064085614e-19, + -3.27187577515598381e-20, + 2.74260055996732488e+00, + -9.74225468563516411e-02, + 2.59448622735912156e-03, + -4.21199125738055591e-05, + 3.84030553439401649e-07, + -1.06345184871912928e-08, + 8.70314800119308624e-11, + 2.47705671335526136e-11, + -3.72371745013385054e-13, + -4.09556262128978584e-14, + 4.39188194104129741e-16, + 7.27497326955908731e-17, + -1.99078678011904534e-19, + -1.34062738959063031e-19, + 7.34824471904277665e+00, + -4.55169512846179347e-01, + 1.96738271938470821e-02, + -4.94319474986885769e-04, + 1.80372239596691205e-06, + 2.80243692616238729e-07, + -4.16186790458246352e-09, + -2.32926749106640067e-10, + 6.13273427246487308e-12, + 1.98230670494253187e-13, + -7.42536974893574799e-15, + -1.70694784745006920e-16, + 7.48750985438785805e-18, + 1.67182270600917807e-19, +# root=10 base[15]=37.5 */ + 3.10479306376943353e-03, + -4.84642345996358964e-05, + 6.35610740440508268e-07, + -4.12217590836990009e-09, + -1.84223710800951513e-12, + -3.62674614425114631e-12, + 1.07938848339276729e-13, + 4.62274488790623513e-15, + -1.89668820817344773e-16, + -6.77034563684446104e-18, + 3.43042018249350816e-19, + 9.40620995838520276e-21, + -6.00089055435749061e-22, + -1.25492826438680000e-23, + 2.84071096081753190e-02, + -4.48828229231598946e-04, + 5.95665906720912982e-06, + -3.94000751123859291e-08, + -1.53466063626759206e-11, + -3.38018430439523774e-11, + 1.02419103286964094e-12, + 4.29156695964474110e-14, + -1.79963666446268436e-15, + -6.27151798563309550e-17, + 3.25253398712243293e-18, + 8.68700325350014168e-20, + -5.68940155512095381e-21, + -1.15358683569334954e-22, + 8.16287411508907490e-02, + -1.32236409518184323e-03, + 1.79843065776737321e-05, + -1.23824721059890317e-07, + -3.27454309850246276e-11, + -1.00843627998853616e-10, + 3.17089483864397665e-12, + 1.26931043578737330e-13, + -5.57229744658818281e-15, + -1.84552098724716888e-16, + 1.00563483785205463e-17, + 2.53865104829127323e-19, + -1.75893697210517060e-20, + -3.33450404983724394e-22, + 1.68772080910172179e-01, + -2.84430045644826560e-03, + 4.02069607161046865e-05, + -2.94556248471577977e-07, + -1.43998134086911291e-11, + -2.20849789809168308e-10, + 7.36634943561338610e-12, + 2.73751625518915883e-13, + -1.29538167413486083e-14, + -3.94138818508096688e-16, + 2.33260711543189992e-17, + 5.34954034602312274e-19, + -4.07967849992866001e-20, + -6.87464893492162733e-22, + 3.01235534546177242e-01, + -5.37465276293377318e-03, + 8.03273758676240448e-05, + -6.41855485713811643e-07, + 1.91727685124854068e-10, + -4.26466786693814975e-10, + 1.55058652422102069e-11, + 5.14865235409098734e-13, + -2.73237722087650302e-14, + -7.27215395770754134e-16, + 4.90489736151291259e-17, + 9.61275926394392621e-19, + -8.57837688508756981e-20, + -1.17981986867155052e-21, + 5.00554114174378006e-01, + -9.67165266758574990e-03, + 1.56223693033434119e-04, + -1.40253155787448924e-06, + 1.19570258244980212e-09, + -7.83007563593418326e-10, + 3.22161294920400003e-11, + 9.01212148451114888e-13, + -5.70648862703502078e-14, + -1.22057747047897945e-15, + 1.01973539716044710e-16, + 1.51876680245878029e-18, + -1.78310947679736386e-19, + -1.65255806704509123e-21, + 8.10535831274204255e-01, + -1.75102704734892561e-02, + 3.15254312877938131e-04, + -3.30491402168499707e-06, + 5.79577462236499048e-09, + -1.42042556237254972e-09, + 7.01723730790239194e-11, + 1.47986776106130063e-12, + -1.25844961208951388e-13, + -1.77817902746014025e-15, + 2.23119237827147179e-16, + 1.80163415298574253e-18, + -3.89473654128825280e-19, + -9.78882657739978208e-22, + 1.33446569495392175e+00, + -3.39015366796561260e-02, + 7.14036221578937848e-04, + -9.24532064652397453e-06, + 3.05741300325446087e-08, + -2.52960975623990875e-09, + 1.69597794488873818e-10, + 1.96372623821254178e-12, + -3.14211167693652340e-13, + -1.01963071364357185e-15, + 5.46334347755658333e-16, + -1.59996550664194579e-18, + -9.42982901226562669e-19, + 8.56666236666160701e-21, + 2.39134937120459146e+00, + -7.85983651289165475e-02, + 2.11981553821051971e-03, + -3.73669972293078328e-05, + 2.36561435919341754e-07, + -2.67256597277718244e-09, + 4.47640403427786042e-10, + -2.18942673767448626e-12, + -9.48429642926187710e-13, + 1.66388496381631668e-14, + 1.51535187904630475e-15, + -4.30429195348500071e-17, + -2.36309422179046103e-18, + 9.69883746889476528e-20, + 5.80597821477792930e+00, + -3.20634069239171648e-01, + 1.40775732577147830e-02, + -4.27804194704297660e-04, + 6.01580116724442889e-06, + 1.28582292688986717e-07, + -7.32243688396007833e-09, + 1.26378875326336369e-11, + 7.20951947592579187e-12, + -1.27815460016887444e-13, + -5.93200346112254860e-15, + 2.13403506544466207e-16, + 4.36922474544037981e-18, + -2.75943471838810657e-19, +# root=10 base[16]=40.0 */ + 2.87107289947026141e-03, + -6.75563794914990721e-05, + 1.45172991562952738e-06, + -1.94879044831376485e-08, + -2.62538054521298922e-10, + 5.94470490885418924e-12, + 1.83770899263701019e-12, + -9.56742467202974731e-14, + -3.87562745681201339e-15, + 4.96615398569052379e-16, + -7.01824191929088761e-19, + -1.92029628692339041e-18, + 6.37744632246823627e-20, + 5.45833827875279188e-21, + 2.62444926881373192e-02, + -6.24638431256625631e-04, + 1.35761378109896217e-05, + -1.85313705051365034e-07, + -2.40060273312795673e-09, + 5.84423738526863136e-11, + 1.71020429429715685e-11, + -9.06888918221377636e-13, + -3.55285787433824413e-14, + 4.67504030824571798e-15, + -1.05373339979584901e-17, + -1.79719395130844913e-17, + 6.13815043196816051e-19, + 5.05878640321138034e-20, + 7.52686453979082848e-02, + -1.83416762175596924e-03, + 4.08071682438978554e-05, + -5.76342413708688647e-07, + -6.85962062798733479e-09, + 1.93456163069618194e-10, + 5.08469334560738092e-11, + -2.80171265712398084e-12, + -1.02169023546537881e-13, + 1.42398069825280952e-14, + -5.70961408099343488e-17, + -5.40646032328433816e-17, + 1.95532581306731629e-18, + 1.48956424184569151e-19, + 1.55132286105356398e-01, + -3.92360065025789025e-03, + 9.05737365708047577e-05, + -1.34897204889754508e-06, + -1.38604529147307055e-08, + 4.92503800003142332e-10, + 1.10639280825765801e-10, + -6.48593210547342262e-12, + -2.09332358714191694e-13, + 3.22378891024367865e-14, + -2.20912126247586245e-16, + -1.19874467388153129e-16, + 4.74140552912051265e-18, + 3.17967725911897308e-19, + 2.75575590155090644e-01, + -7.35316293888969939e-03, + 1.78992579721783162e-04, + -2.87311527238580105e-06, + -2.29687963061912169e-08, + 1.15511522992864294e-09, + 2.11117203290018348e-10, + -1.35798733710568820e-11, + -3.58491210643954798e-13, + 6.53623528393894196e-14, + -7.26811855650000809e-16, + -2.35143462129266908e-16, + 1.05718241358868392e-17, + 5.83892761629045617e-19, + 4.54682014063040651e-01, + -1.30706311721415034e-02, + 3.42534539923430045e-04, + -6.08545426175042757e-06, + -2.98802416813915592e-08, + 2.69683405953439696e-09, + 3.78723023440219375e-10, + -2.79853529572013595e-11, + -5.16168337957236059e-13, + 1.28718049929993319e-13, + -2.25079672931016797e-15, + -4.38789128828367795e-16, + 2.36288099406182087e-17, + 9.61507871644263184e-19, + 7.28312514302699054e-01, + -2.32251727219246785e-02, + 6.74448016433184042e-04, + -1.37368653353752160e-05, + -9.85502632143021780e-09, + 6.60263742948582473e-09, + 6.52519142641282544e-10, + -6.01648823535682743e-11, + -4.54812572420917220e-13, + 2.58923419056863031e-13, + -7.12018980275797238e-15, + -8.00242510690907262e-16, + 5.63058274450352129e-17, + 1.29162892840184566e-18, + 1.17785010990563288e+00, + -4.36072206282129213e-02, + 1.46758448528734749e-03, + -3.60961008226357301e-05, + 1.90381539973205637e-07, + 1.77721985864635622e-08, + 9.94763758532785891e-10, + -1.42112912498994961e-10, + 1.21792658767040455e-12, + 5.47408657668567009e-13, + -2.51195788003091432e-14, + -1.33406395313432059e-15, + 1.51641483798504260e-16, + -3.33962279640908906e-20, + 2.03926731701619124e+00, + -9.53528070078379919e-02, + 4.03919298929794786e-03, + -1.31423530255751341e-04, + 1.97278651846124840e-06, + 5.16034144175636404e-08, + -2.44958312162085118e-10, + -3.60381538049238646e-10, + 1.48878106633279356e-11, + 1.04340279027401962e-12, + -1.08411292648561838e-13, + 8.17704319000531140e-18, + 4.57982890095162136e-16, + -1.86929287265570333e-17, + 4.48532060088529771e+00, + -3.30302164235732665e-01, + 2.18266959986687069e-02, + -1.17731499768897185e-03, + 4.40086716161775988e-05, + -5.21411592759915727e-07, + -5.76374549558566973e-08, + 3.80443416085263605e-09, + -3.13302835941204379e-11, + -8.38176807352239031e-12, + 4.36763245857012494e-13, + 5.40932126777201923e-15, + -1.46285272516179715e-15, + 3.96632932407180358e-17, +# root=10 base[17]=44.0 */ + 2.62251873177424093e-03, + -5.69296498534624138e-05, + 1.20167340738416233e-06, + -2.13182286243010703e-08, + 6.79387370843178169e-11, + 1.74123846864913244e-11, + -5.40781550307844302e-13, + -3.41010379704789100e-14, + 3.73673418969512135e-15, + -8.99784532784997643e-17, + -7.61680494870061266e-18, + 7.03780800848724717e-19, + -1.19598442365075289e-20, + -1.68921594652848990e-21, + 2.39483949488343700e-02, + -5.25389682945882593e-04, + 1.12074310056765982e-05, + -2.01276206921042307e-07, + 7.13436191016927113e-10, + 1.62268258478595860e-10, + -5.17046254690730055e-12, + -3.12929523722334967e-13, + 3.50313569269190914e-14, + -8.67413124603903234e-16, + -7.01312559258232078e-17, + 6.61618294970259163e-18, + -1.17706910294460208e-19, + -1.56057076428190548e-20, + 6.85392121406322441e-02, + -1.53665640065718664e-03, + 3.34977633623175048e-05, + -6.16908294438662682e-07, + 2.64116708035154939e-09, + 4.83739135836816439e-10, + -1.62473912489764999e-11, + -9.02140897916788991e-13, + 1.05776808645680277e-13, + -2.77034823239985496e-15, + -2.03653478575674244e-16, + 2.00908976625437252e-17, + -3.90838100888160541e-19, + -4.56398007890772809e-20, + 1.40780996053370494e-01, + -3.26616560186386963e-03, + 7.36723516031599396e-05, + -1.41133067669506935e-06, + 7.68501902414671905e-09, + 1.05641974988142891e-09, + -3.85598165868177828e-11, + -1.85825420083358690e-12, + 2.36078204156359688e-13, + -6.73365957169046495e-15, + -4.24793527795010561e-16, + 4.52347989246803631e-17, + -1.00160154357861559e-18, + -9.63234228149083728e-20, + 2.48803412611472374e-01, + -6.06248863692082467e-03, + 1.43606466544031009e-04, + -2.90994727653010990e-06, + 2.07332705726246277e-08, + 2.02342282932367482e-09, + -8.33615685513406265e-11, + -3.22090799608058997e-12, + 4.68361095276591770e-13, + -1.50187226985288990e-14, + -7.52190096112466325e-16, + 9.08442311350785736e-17, + -2.37776862291968239e-18, + -1.73749655937135703e-19, + 4.07413929840259426e-01, + -1.06245773905055546e-02, + 2.69309498584563412e-04, + -5.89423173670957238e-06, + 5.58789204753090059e-08, + 3.63511737494703454e-09, + -1.78498823577178872e-10, + -4.79508878751523542e-12, + 8.92464078995385196e-13, + -3.34265543699895141e-14, + -1.16687172362657606e-15, + 1.75895740699737729e-16, + -5.66340020903829476e-18, + -2.78081494011021082e-19, + 6.45172144414200677e-01, + -1.84787367828781954e-02, + 5.14323952528562985e-04, + -1.25063024818440006e-05, + 1.60272565517880926e-07, + 6.20310209696024986e-09, + -4.00958281202126146e-10, + -5.00968469634206880e-12, + 1.70354165907094981e-12, + -7.87090928464601199e-14, + -1.38404734364891986e-15, + 3.42464534435029573e-16, + -1.43006611639844009e-17, + -3.54926259451285476e-19, + 1.02427148244241684e+00, + -3.35177522179505791e-02, + 1.06548774296855598e-03, + -3.00263755324794858e-05, + 5.33929850517012767e-07, + 8.77085795667302959e-09, + -9.96857200140973234e-10, + 6.07730466765657066e-12, + 3.27125432114388017e-12, + -2.07423880767953008e-13, + 6.08000227859135019e-16, + 6.71750667211351158e-16, + -4.03125347550761133e-17, + 3.50375228881458911e-20, + 1.71333811698074068e+00, + -6.87469997599531313e-02, + 2.67791826086264057e-03, + -9.41994188662599927e-05, + 2.45975443609195902e-06, + -1.19576713387675248e-08, + -2.78219229699900962e-09, + 1.05447402262107203e-10, + 4.55303635350630277e-12, + -6.23560284316076996e-13, + 2.04370292208892364e-14, + 9.44357677429196233e-16, + -1.26666843579189621e-16, + 4.42110450337516953e-18, + 3.43930147212329240e+00, + -2.01347509983907241e-01, + 1.14247610084146582e-02, + -5.99997383683395827e-04, + 2.70316585703366712e-05, + -9.03747472274646586e-07, + 1.17942133247371238e-08, + 9.59769505014823338e-10, + -7.99997545530397826e-11, + 2.55330107087276078e-12, + 3.42455162156356951e-14, + -7.92301300602880122e-15, + 3.68051900147207498e-16, + -1.26824246375427556e-18, +# root=10 base[18]=48.0 */ + 2.41246094649276866e-03, + -4.82999656651587843e-05, + 9.61176711415363903e-07, + -1.82809145022578665e-08, + 2.62531707387263119e-10, + 2.60242222559615832e-12, + -4.55267719399646806e-13, + 1.92125170669414543e-14, + -2.30427941339755465e-17, + -5.08043253364219899e-17, + 3.35445082072938385e-18, + -7.71456795323640679e-20, + -4.09230764545284406e-21, + 4.59715360911893818e-22, + 2.20113931976842793e-02, + -4.45001731938068521e-04, + 8.94219912266292325e-06, + -1.71806535014937511e-07, + 2.50733177682755383e-09, + 2.28182195556067916e-11, + -4.24475150529874868e-12, + 1.81612915989992423e-13, + -3.65881693790604428e-16, + -4.70458221369835645e-16, + 3.14888079704762249e-17, + -7.42851831064319092e-19, + -3.72042116326310143e-20, + 4.29109802771882640e-21, + 6.28834513861418060e-02, + -1.29698954780376407e-03, + 2.65890048209200023e-05, + -5.21594798015894244e-07, + 7.86417351815121216e-09, + 5.88539770541175394e-11, + -1.26684084540008937e-11, + 5.57846834583970825e-13, + -2.05134634663929670e-15, + -1.38375151652833337e-15, + 9.53360074524742648e-17, + -2.36664973520653590e-18, + -1.04992718343806183e-19, + 1.28359547491023099e-20, + 1.28792440185973550e-01, + -2.74119844009340814e-03, + 5.79897580359733843e-05, + -1.17535053883983395e-06, + 1.86288209608950631e-08, + 9.44669344011694643e-11, + -2.77272715369507970e-11, + 1.27940806724586676e-12, + -8.01078096455261904e-15, + -2.95496435328840436e-15, + 2.13673281607822085e-16, + -5.72808500338099927e-18, + -2.07617072412146120e-19, + 2.81901136409009896e-20, + 2.26641064860485048e-01, + -5.04535904609067828e-03, + 1.11634687581477752e-04, + -2.37056802199869944e-06, + 4.02574563225011847e-08, + 7.47489534688696591e-11, + -5.33358058743413929e-11, + 2.64150540976262620e-12, + -2.61757862854146055e-14, + -5.46343305441520396e-15, + 4.26472775490450355e-16, + -1.26895146046773940e-17, + -3.31638969519446304e-19, + 5.44707516129912043e-20, + 3.68803390752975413e-01, + -8.73385578593485409e-03, + 2.05570312561438671e-04, + -4.65399215477957011e-06, + 8.65719121508037617e-08, + -1.91108152568240529e-10, + -9.66836815375650681e-11, + 5.33207723434406934e-12, + -7.94478140987619214e-14, + -9.26768810466450226e-15, + 8.19573437625958403e-16, + -2.79400974159410205e-17, + -4.00964453670588625e-19, + 9.92791904701483116e-20, + 5.78605709620035102e-01, + -1.49147242912952040e-02, + 3.82098847104170379e-04, + -9.44217093199243939e-06, + 1.97767626160881462e-07, + -1.43872221161985445e-09, + -1.68768637945413012e-10, + 1.11095724126011221e-11, + -2.42663312039887996e-13, + -1.42085565380835615e-14, + 1.58456562168556603e-15, + -6.46425670670134849e-17, + -5.96816020742620029e-20, + 1.74408801726094867e-19, + 9.05179290905237410e-01, + -2.62841298934447104e-02, + 7.58501998149367163e-04, + -2.11885782800193164e-05, + 5.19304420911451382e-07, + -7.14414380971522107e-09, + -2.61610744158657744e-10, + 2.49668498208968048e-11, + -8.10120920652699798e-13, + -1.44825220437156411e-14, + 3.12123134382341691e-15, + -1.65181770128068665e-16, + 2.46470529318684142e-18, + 2.74408749416063986e-19, + 1.47493519143391194e+00, + -5.12124675747787569e-02, + 1.76701730432247722e-03, + -5.92889720151591702e-05, + 1.81174641630742614e-06, + -4.13878096676378956e-08, + 5.62914118770749456e-11, + 5.88890528575248917e-11, + -3.26866575901160045e-12, + 5.33815632575202014e-14, + 5.02885883195970369e-15, + -4.67840256315224379e-16, + 1.76449615782910036e-17, + 4.76005128624546445e-20, + 2.77983730283439678e+00, + -1.32642451536986089e-01, + 6.28798515698004382e-03, + -2.91696405469043954e-04, + 1.28247695468443367e-05, + -5.04796876616767693e-07, + 1.59381478642308733e-08, + -2.78095749680500497e-10, + -8.12852531997078512e-12, + 9.92215854816555793e-13, + -4.73797525263515952e-14, + 1.10976705682429865e-15, + 2.04651170472191091e-17, + -3.38948839535752791e-18, +# root=10 base[19]=52.0 */ + 2.23335277001387783e-03, + -4.14156780959913678e-05, + 7.67267749705957335e-07, + -1.40903398466188272e-08, + 2.44047550504594902e-10, + -2.90646148722501916e-12, + -6.25320140930088621e-14, + 7.44384930378776670e-15, + -3.67118528863460933e-16, + 9.49716331527963316e-18, + 1.46737786564040110e-19, + -3.05934352066343886e-20, + 1.71684495428483707e-21, + -4.76639329698890327e-23, + 2.03623771963720515e-02, + -3.81022123420028929e-04, + 7.12272933165974485e-06, + -1.31997714667855313e-07, + 2.30943128165484871e-09, + -2.81270145116350186e-11, + -5.60119336983435362e-13, + 6.92507705290229422e-14, + -3.44795366684000315e-15, + 9.05663284927125531e-17, + 1.27885786399294997e-18, + -2.83464445236478404e-19, + 1.60866021381513069e-20, + -4.53915960026639398e-22, + 5.80843085385281607e-02, + -1.10716842851920965e-03, + 2.10835000778859829e-05, + -3.98069524032043929e-07, + 7.11003697379299403e-09, + -9.05229745611177995e-11, + -1.52507069074703557e-12, + 2.05718307665565873e-13, + -1.04513704225676870e-14, + 2.83146660607348434e-16, + 3.25185361575047504e-18, + -8.34860001934685088e-19, + 4.85162078738597575e-20, + -1.41487339399200354e-21, + 1.18673270604060521e-01, + -2.32866601347183006e-03, + 4.56493948587173540e-05, + -8.87456838255068300e-07, + 1.63707065843856133e-08, + -2.22577913235877013e-10, + -2.79284165827729769e-12, + 4.46807089147919704e-13, + -2.34768659432276030e-14, + 6.67111894611848842e-16, + 5.05793293099296090e-18, + -1.78740473747871728e-18, + 1.08057446343615761e-19, + -3.31581350751255758e-21, + 2.08080797894675401e-01, + -4.25534425564757981e-03, + 8.69380723033894855e-05, + -1.76198946422816350e-06, + 3.40206247390082381e-08, + -5.04384330086188006e-10, + -3.67314486399458392e-12, + 8.49265471908373877e-13, + -4.70521768077019187e-14, + 1.42922565037659702e-15, + 3.49525180162837654e-18, + -3.32128188642972437e-18, + 2.13651052120388369e-19, + -7.04022789305754983e-21, + 3.36835490668555781e-01, + -7.29002412494734846e-03, + 1.57620019179934142e-04, + -3.38209705742925639e-06, + 6.94803645752057090e-08, + -1.14757160105917799e-09, + -1.47009775812732223e-12, + 1.51052853752074635e-12, + -9.11382302096524391e-14, + 3.02955943533434802e-15, + -1.19303744687474189e-17, + -5.69500797506520002e-18, + 4.04911370607982043e-19, + -1.46966750840470513e-20, + 5.24414598766030138e-01, + -1.22605313455429136e-02, + 2.86360540067586290e-04, + -6.64096447916581859e-06, + 1.48325145472156649e-07, + -2.79542554322885291e-09, + 1.49430258502360300e-11, + 2.54875924602445740e-12, + -1.79113585770506508e-13, + 6.73907036795297064e-15, + -7.90338521815400040e-17, + -8.99139909613831855e-18, + 7.66553263864780290e-19, + -3.18046027369816617e-20, + 8.10751956626023174e-01, + -2.11040266705523685e-02, + 5.48793629019412622e-04, + -1.41790752184426171e-05, + 3.55236763948093832e-07, + -7.88095671239729233e-09, + 1.00338029493220895e-10, + 3.62095010248727949e-12, + -3.67608652247859694e-13, + 1.66742626987812533e-14, + -3.59209558548434555e-16, + -1.06846069366418127e-17, + 1.45934957661397555e-18, + -7.43980030900266936e-20, + 1.29446749289186203e+00, + -3.94898142652836959e-02, + 1.20348433964393505e-03, + -3.64714955421747351e-05, + 1.08010985889987130e-06, + -2.96458298235416313e-08, + 6.40766743712640953e-10, + -2.96447172513341233e-12, + -7.09946853400520029e-13, + 4.81732918706343707e-14, + -1.74725444214416529e-15, + 1.94425324512066125e-17, + 2.20682371259271087e-18, + -1.83675554896343595e-19, + 2.33177226408996141e+00, + -9.34980867565428919e-02, + 3.74515604543444606e-03, + -1.49346953112826743e-04, + 5.87161430548225857e-06, + -2.22767184793185373e-07, + 7.83411377157319784e-09, + -2.36590031000327802e-10, + 5.01299592433034460e-12, + 6.71625843400076358e-15, + -7.60820645568799446e-15, + 4.63386872251786093e-16, + -1.72047993607666532e-17, + 3.58771170671548931e-19, +# root=10 base[20]=56.0 */ + 2.07898302835105757e-03, + -3.58921700129453871e-05, + 6.19574894629641677e-07, + -1.06810973636926865e-08, + 1.82274846310010388e-10, + -2.92072414044881251e-12, + 3.12707162685609167e-14, + 7.68815704146833147e-16, + -8.49823041770956486e-17, + 4.50148178816761543e-18, + -1.63941455786744489e-19, + 3.23963471510891989e-21, + 7.19906085235971223e-23, + -1.03029888715118469e-23, + 1.89430480877352848e-02, + -3.29793015081905009e-04, + 5.74087839953185924e-06, + -9.98039286663382691e-08, + 1.71781148229132159e-09, + -2.78055354638379094e-11, + 3.05956346592578206e-13, + 6.85820075443192702e-15, + -7.88117517680790973e-16, + 4.20888774455866139e-17, + -1.54358773114004004e-18, + 3.10772870163819685e-20, + 6.36963119117102283e-22, + -9.52895154736587556e-23, + 5.39652591702026244e-02, + -9.55816970810699257e-04, + 1.69270185233291302e-05, + -2.99383290887471142e-07, + 5.24412113548218806e-09, + -8.66513001788509049e-11, + 1.00547931417830814e-12, + 1.84810611737957119e-14, + -2.32548554224750166e-15, + 1.26398432844621705e-16, + -4.70350559461910320e-18, + 9.82896993705761417e-20, + 1.68516844233496060e-21, + -2.79574859929788093e-22, + 1.10027380149481629e-01, + -2.00196204540783367e-03, + 3.64213553195174298e-05, + -6.61776660802183924e-07, + 1.19144500723088249e-08, + -2.03252678214719108e-10, + 2.54532346176644860e-12, + 3.30386348645902492e-14, + -4.99323982170337936e-15, + 2.79723712108686839e-16, + -1.06562314584187592e-17, + 2.35468817826831247e-19, + 2.90708704646774930e-21, + -5.94801047645441154e-22, + 1.92328569292674639e-01, + -3.63592960107162909e-03, + 6.87277663031024696e-05, + -1.29754654141868629e-06, + 2.42884396015109182e-08, + -4.33281429742216439e-10, + 5.97591961069736304e-12, + 4.03505713817863481e-14, + -9.31490575094356807e-15, + 5.48374040135646345e-16, + -2.16365739307187421e-17, + 5.15255268393945080e-19, + 3.25266933081995253e-21, + -1.09457291948415880e-21, + 3.09964703451556411e-01, + -6.17421121539773760e-03, + 1.22969011463501543e-04, + -2.44629293956139829e-06, + 4.82898257481482412e-08, + -9.14660630258744099e-10, + 1.41519474670322505e-11, + 1.89805091729612006e-15, + -1.60424719644261409e-14, + 1.02840860021652253e-15, + -4.27472212595830508e-17, + 1.12004125520002308e-18, + -8.54028882363775881e-22, + -1.84883371008956750e-21, + 4.79501144185786654e-01, + -1.02521091316582318e-02, + 2.19170224220735543e-04, + -4.68036615044361692e-06, + 9.92730024293457136e-08, + -2.03595796713855140e-09, + 3.60054303149688306e-11, + -2.38610053031276216e-13, + -2.53368672754160886e-14, + 1.92352553532336270e-15, + -8.67578699424399309e-17, + 2.56591583510279553e-18, + -2.25634234460592194e-20, + -2.84496808039065630e-21, + 7.34160744826173217e-01, + -1.73086823387531528e-02, + 4.08019869130756864e-04, + -9.60878181729511625e-06, + 2.25008493716479588e-07, + -5.13670049435027908e-09, + 1.06284402709164973e-10, + -1.44099037356000449e-12, + -2.85169829906455123e-14, + 3.61437736893929354e-15, + -1.89418435933978145e-16, + 6.58589062458720994e-18, + -1.18520517025584846e-19, + -3.16772515519261633e-21, + 1.15335401578786434e+00, + -3.13586841646120509e-02, + 8.52505102900018297e-04, + -2.31556647378330437e-05, + 6.26222238706096429e-07, + -1.66498260804455721e-08, + 4.18717698176887021e-10, + -8.87049298477354950e-12, + 8.77000965400943032e-14, + 5.27578717051141320e-15, + -4.44417681637658333e-16, + 2.02612102766082056e-17, + -6.04372711564306475e-19, + 6.75728160056862210e-21, + 2.00823182618343976e+00, + -6.93905418356035031e-02, + 2.39734007138987706e-03, + -8.27658877229793793e-05, + 2.84935997791134706e-06, + -9.72337983291518723e-08, + 3.24416714522121123e-09, + -1.03009120181268344e-10, + 2.95824524078533715e-12, + -6.86242528620106706e-14, + 7.93158156832462343e-16, + 3.35351082514648352e-17, + -2.97301614894329465e-18, + 1.35049617960587262e-19, +# root=10 base[21]=60.0 */ + 1.94458028132737763e-03, + -3.14028400027755505e-05, + 5.07114607713063174e-07, + -8.18791740269648512e-09, + 1.32014783601961452e-10, + -2.10749148089617328e-12, + 3.17467151761225958e-14, + -3.35290420086349301e-16, + -6.09199723090767080e-18, + 7.22945861316071555e-19, + -3.96546524347460571e-20, + 1.63010150399926572e-21, + -5.00969346237244395e-23, + 8.77241976146080429e-25, + 1.77087523728756621e-02, + -2.88228837187278506e-04, + 4.69116855776504127e-06, + -7.63405516479250492e-08, + 1.24056779593516055e-09, + -1.99653215102669791e-11, + 3.03740205064873077e-13, + -3.29681550194886412e-15, + -5.32688898678207998e-17, + 6.67780476092893330e-18, + -3.69433838691791354e-19, + 1.52611841309007025e-20, + -4.71977415961470880e-22, + 8.42358842678614271e-24, + 5.03919217898430721e-02, + -8.33467599387836518e-04, + 1.37851235099345247e-05, + -2.27962957214062766e-07, + 3.76467254966719378e-09, + -6.15986900831140279e-11, + 9.56106887412392236e-13, + -1.09378422176447791e-14, + -1.36275508567721350e-16, + 1.95328694498541527e-17, + -1.10106689349422325e-18, + 4.59606445303203056e-20, + -1.44001549099195073e-21, + 2.66895474264864116e-23, + 1.02556174349344012e-01, + -1.73940255336073259e-03, + 2.95007140749620519e-05, + -5.00262806628863063e-07, + 8.47228910778452978e-09, + -1.42254283219480637e-10, + 2.27720420803155664e-12, + -2.80619069347757716e-14, + -2.13140573242570245e-16, + 4.13005313422673567e-17, + -2.40657661435846901e-18, + 1.02212505177061648e-19, + -3.26923408931503603e-21, + 6.40826512479680173e-23, + 1.78794404016867664e-01, + -3.14239110715223459e-03, + 5.52281730820763003e-05, + -9.70502266209173757e-07, + 1.70335872116295138e-08, + -2.96648177586724720e-10, + 4.95651167942875732e-12, + -6.69919425071799351e-14, + -1.41390978061126660e-16, + 7.50245091292655617e-17, + -4.62888797605177274e-18, + 2.02026327841749286e-19, + -6.65871797380140836e-21, + 1.40537431746865030e-22, + 2.87066302344712032e-01, + -5.29601967270020447e-03, + 9.77037148547710499e-05, + -1.80223258834441771e-06, + 3.32070639153911641e-08, + -6.07734987822650242e-10, + 1.07478509997739925e-11, + -1.61786772636568277e-13, + 5.77175838917988130e-16, + 1.22868401699914447e-16, + -8.42923511577638772e-18, + 3.84264374540414431e-19, + -1.32197241806792240e-20, + 3.06003884741420719e-22, + 4.41678129348220871e-01, + -8.69920800896058222e-03, + 1.71335608330594013e-04, + -3.37409601265160800e-06, + 6.63808612454826710e-08, + -1.29865224512702127e-09, + 2.47407854814254084e-11, + -4.20949050159532510e-13, + 3.87413992730730957e-15, + 1.71540391808553582e-16, + -1.50051051148496609e-17, + 7.38289179986011895e-19, + -2.70559849562095417e-20, + 7.01526121549884685e-22, + 6.70801222282089937e-01, + -1.44515215367374411e-02, + 3.11334588016371459e-04, + -6.70637207445491936e-06, + 1.44340873763400115e-07, + -3.09316691450439348e-09, + 6.50515284567773940e-11, + -1.27428571288321077e-12, + 1.88684555064797947e-14, + 8.37868278203316074e-17, + -2.53656310008212338e-17, + 1.47760320956430242e-18, + -6.01331323470318137e-20, + 1.80095984472491721e-21, + 1.04001062406171618e+00, + -2.55019343245167368e-02, + 6.25320253628618389e-04, + -1.53314867536251613e-05, + 3.75650784883923076e-07, + -9.17642623234809473e-09, + 2.21602414197084854e-10, + -5.15533045842456783e-12, + 1.07176836038926770e-13, + -1.49724652284725663e-15, + -1.97849352540358019e-17, + 2.85133859989434282e-18, + -1.49712100035899533e-19, + 5.57650884335283556e-21, + 1.76366569580487731e+00, + -5.35340497895231901e-02, + 1.62494202203590792e-03, + -4.93180929110109817e-05, + 1.49618145412412275e-06, + -4.53145313167086152e-08, + 1.36533154460800411e-09, + -4.05834436600134667e-11, + 1.16971426621673889e-12, + -3.16345707031644121e-14, + 7.51523501403406716e-16, + -1.30769626925690894e-17, + 7.69057143763344558e-21, + 1.27565303861719018e-20, +# root=10 base[22]=64.0 */ + 1.82650726208840220e-03, + -2.77059862358922049e-05, + 4.20266995262135570e-07, + -6.37484664408287922e-09, + 9.66812487493251252e-11, + -1.46436159410288234e-12, + 2.19933945764811193e-14, + -3.15137267371779759e-16, + 3.45551329281103250e-18, + 2.91322211955973025e-20, + -4.76523045369999597e-21, + 2.68841483833832991e-22, + -1.16162711411207380e-23, + 4.09299065790348233e-25, + 1.66255332501303379e-02, + -2.54054337243334201e-04, + 3.88219283121132351e-06, + -5.93226343531611928e-08, + 9.06343478653842536e-10, + -1.38296340458999414e-11, + 2.09300127357107043e-13, + -3.02713810625546667e-15, + 3.39771202837788073e-17, + 2.37323192303875685e-19, + -4.37710762287599423e-20, + 2.49617740188587642e-21, + -1.08339818499875571e-22, + 3.83197173568273984e-24, + 4.72626199298855840e-02, + -7.33190903590109412e-04, + 1.13740675602383501e-05, + -1.76444235921519139e-07, + 2.73671911280797709e-09, + -4.23957257654416913e-11, + 6.51713557382898156e-13, + -9.60561220329006658e-15, + 1.12770040422359554e-16, + 4.86794197742119642e-19, + -1.26441076095827820e-19, + 7.38641071792959566e-21, + -3.23699052729113761e-22, + 1.15414663846216723e-23, + 9.60355465403392450e-02, + -1.52530326435922200e-03, + 2.42258958724692053e-05, + -3.84765907106403431e-07, + 6.11008754312181824e-09, + -9.69175049892938795e-11, + 1.52648349752749351e-12, + -2.31598522198866950e-14, + 2.89742376023796469e-16, + 2.28892831185240958e-19, + -2.61250710426400595e-19, + 1.59504007894432597e-20, + -7.10719666747830177e-22, + 2.56755166563358947e-23, + 1.67040727685116325e-01, + -2.74292873238882748e-03, + 4.50408038352147021e-05, + -7.39590024591871473e-07, + 1.21426682332881252e-08, + -1.99152853236274827e-10, + 3.24611587728325795e-12, + -5.12584824667136790e-14, + 6.94013175261069701e-16, + -2.22742505840212527e-18, + -4.54562061481412346e-19, + 3.00917596239245173e-20, + -1.37814213381867034e-21, + 5.07950406595993614e-23, + 2.67320152734320249e-01, + -4.59270486553603474e-03, + 7.89050560279953308e-05, + -1.35560982475485908e-06, + 2.32866953348427259e-08, + -3.99655026362205023e-10, + 6.82336718109760613e-12, + -1.13575396575350504e-13, + 1.68625571080640763e-15, + -1.24310512439929255e-17, + -6.78050443698874293e-19, + 5.30633517894388351e-20, + -2.54797583193619416e-21, + 9.68485255787861533e-23, + 4.09389364678758694e-01, + -7.47420721864853425e-03, + 1.36456167141835741e-04, + -2.49123752042854967e-06, + 4.54764513886920883e-08, + -8.29517466211024598e-10, + 1.50685581507901052e-11, + -2.68608501546582122e-13, + 4.42966264791056127e-15, + -5.10497371236535024e-17, + -6.90360382872488046e-19, + 8.88416439316489595e-20, + -4.68286655784334177e-21, + 1.87278809940287733e-22, + 6.17516660147477081e-01, + -1.22476957452009663e-02, + 2.42917919698281499e-04, + -4.81791461403639524e-06, + 9.55466451882523822e-08, + -1.89369208309007759e-09, + 3.74194210747938264e-11, + -7.30116393665775970e-13, + 1.35928429169803979e-14, + -2.13131559395311408e-16, + 1.11348178185658413e-18, + 1.26781186662892247e-19, + -8.63378882217831420e-21, + 3.82136556885045011e-22, + 9.46970777052493884e-01, + -2.11453950214945639e-02, + 4.72165747791232992e-04, + -1.05430949096030214e-05, + 2.35400393656115215e-07, + -5.25362191318818190e-09, + 1.17024715585984092e-10, + -2.58809051327235569e-12, + 5.59192713401233133e-14, + -1.12749792828415008e-15, + 1.83475470693887589e-17, + -7.39985266338333161e-20, + -1.26724372154065224e-20, + 8.04586629557033636e-22, + 1.57227666892583184e+00, + -4.25537819701678893e-02, + 1.15171971926386531e-03, + -3.11710338429129998e-05, + 8.43590032636527587e-07, + -2.28245637963300155e-08, + 6.16977016973246189e-10, + -1.66293243591811048e-11, + 4.44739086401710800e-13, + -1.16790782124628813e-14, + 2.95037049996448989e-16, + -6.89242719184708979e-18, + 1.36475413158374819e-19, + -1.67763120477049867e-21, +# root=10 base[23]=68.0 */ + 1.72195750939826172e-03, + -2.46255990827058122e-05, + 3.52169008506359589e-07, + -5.03633738493802332e-09, + 7.20230182346053509e-11, + -1.02982821820137614e-12, + 1.47096765617763817e-14, + -2.08767029913888763e-16, + 2.86304587937222945e-18, + -3.27678168945104443e-20, + -9.23081023055471617e-24, + 2.46852177281291811e-23, + -1.46201625399765940e-24, + 6.45907989442490373e-26, + 1.56672448575367884e-02, + -2.25617137486024279e-04, + 3.24901334181539685e-06, + -4.67875452522752562e-08, + 6.73754906541088257e-10, + -9.70089594036266699e-12, + 1.39533563774087858e-13, + -1.99461112098853903e-15, + 2.75899680956250677e-17, + -3.21619728016630118e-19, + 2.05198751173679336e-22, + 2.24653650779420066e-22, + -1.35248305875210304e-23, + 6.00534212193437542e-25, + 4.44994040105954961e-02, + -6.49982643278436932e-04, + 9.49400117023605525e-06, + -1.38674358727030444e-07, + 2.02551823657079690e-09, + -2.95812732382650854e-11, + 4.31596782725289051e-13, + -6.26082317919014835e-15, + 8.81169406535395688e-17, + -1.06433637471387378e-18, + 2.50327114741752053e-21, + 6.35164356525348885e-22, + -3.97018862473975565e-23, + 1.78252729758730592e-24, + 9.02948727044914218e-02, + -1.34843831866050725e-03, + 2.01371978316401387e-05, + -3.00722806104106778e-07, + 4.49083487854461140e-09, + -6.70551601873040734e-11, + 1.00035093252462818e-12, + -1.48463653143268996e-14, + 2.14577046812788055e-16, + -2.72663116500259399e-18, + 1.26824888778721510e-20, + 1.25805214881450165e-21, + -8.45423821990813842e-23, + 3.87156519254110776e-24, + 1.56737752357206717e-01, + -2.41507727364599504e-03, + 3.72124619486720321e-05, + -5.73383473675051763e-07, + 8.83477955095900283e-09, + -1.36111703182123603e-10, + 2.09533808586301355e-12, + -3.21127325727616129e-14, + 4.81439686209300641e-16, + -6.52069118673160004e-18, + 4.76480444305280025e-20, + 2.00288311646029299e-21, + -1.55745203397788893e-22, + 7.38238102316486292e-24, + 2.50116995782469098e-01, + -4.02075432043129486e-03, + 6.46356062720361622e-05, + -1.03904781941495388e-06, + 1.67029625354934436e-08, + -2.68476658491701188e-10, + 4.31250779388056802e-12, + -6.90202428113422415e-14, + 1.08586557179316055e-15, + -1.58604707207728249e-17, + 1.60659874422580306e-19, + 2.32854460248117772e-21, + -2.62910162376107938e-22, + 1.32931317491508410e-23, + 3.81502447664804289e-01, + -6.49091249669783450e-03, + 1.10436881870327086e-04, + -1.87897917471498345e-06, + 3.19686760006356743e-08, + -5.43862565416542382e-10, + 9.24742566135257470e-12, + -1.56802606327288995e-13, + 2.62629103882601457e-15, + -4.18675566330394297e-17, + 5.44825817461921127e-19, + -4.82356552084008967e-22, + -3.98805873560867329e-22, + 2.33350172898296911e-23, + 5.72079658509061839e-01, + -1.05122162150695104e-02, + 1.93166592817013564e-04, + -3.54951684461423078e-06, + 6.52231873257162276e-08, + -1.19840661746898039e-09, + 2.20106611489067020e-11, + -4.03490667238493041e-13, + 7.33866810662797948e-15, + -1.29684132550454867e-16, + 2.07285863700239651e-18, + -2.16443892973894695e-20, + -3.73994890731196221e-22, + 3.87712157644314608e-23, + 8.69223554751549554e-01, + -1.78172118306126441e-02, + 3.65214452671645275e-04, + -7.48610138404631082e-06, + 1.53447507913739383e-07, + -3.14515164647526197e-09, + 6.44479625693200143e-11, + -1.31912339613974264e-12, + 2.68869006086414559e-14, + -5.40589906369633706e-16, + 1.04393831205785163e-17, + -1.79376424266666425e-19, + 2.01849747136487619e-21, + 2.90038587049190052e-23, + 1.41840400431075175e+00, + -3.46369272447460547e-02, + 8.45821501418925008e-04, + -2.06546428619765586e-05, + 5.04375587591989686e-07, + -1.23162019512604991e-08, + 3.00705060944169134e-10, + -7.33821187657872748e-12, + 1.78799821609183565e-13, + -4.33811476548724441e-15, + 1.04174151196448514e-16, + -2.44568313345078913e-18, + 5.48235291756790405e-20, + -1.11953616170767814e-21, +# root=10 base[24]=72.0 */ + 1.62873279442067565e-03, + -2.20318508251076534e-05, + 2.98024604674882120e-07, + -4.03137507942405874e-09, + 5.45322808515072471e-11, + -7.37646060883541803e-13, + 9.97685818498087693e-15, + -1.34837686353541825e-16, + 1.81431264210038652e-18, + -2.38607700959662882e-20, + 2.80203018855013481e-22, + -1.42637400418525344e-24, + -9.79522127959815317e-26, + 6.51466836788792040e-27, + 1.48134453311962160e-02, + -2.01701222272680281e-04, + 2.74638221256289568e-06, + -3.73949858909817714e-08, + 5.09172743442632874e-10, + -6.93283629082377008e-12, + 9.43863892069958922e-14, + -1.28407332683044777e-15, + 1.73950545239461430e-17, + -2.30555412168113770e-19, + 2.74574984356543052e-21, + -1.55182135096428837e-23, + -8.73993715596815214e-25, + 5.99727082053746106e-26, + 4.20415609941857046e-02, + -5.80177643385025566e-04, + 8.00650802264995803e-06, + -1.10490578059482066e-07, + 1.52477843731645390e-09, + -2.10417807215461934e-11, + 2.90344279137870390e-13, + -4.00355819521024982e-15, + 5.49887292800561913e-17, + -7.40383925671602022e-19, + 9.06229593670352397e-21, + -6.07997522429792603e-23, + -2.35421668164805168e-24, + 1.74141344531894668e-25, + 8.52020596470349223e-02, + -1.20064802137630450e-03, + 1.69192583664834592e-05, + -2.38422306658894953e-07, + 3.35978793120304871e-09, + -4.73447074669563979e-11, + 6.67097859389390874e-13, + -9.39373921784453423e-15, + 1.31819038578866552e-16, + -1.81817810166080803e-18, + 2.31538205069992547e-20, + -1.88757274435063655e-22, + -4.18770205213760579e-24, + 3.63490181075837733e-25, + 1.47632405948757428e-01, + -2.14268746260470747e-03, + 3.10982504061700621e-05, + -4.51349572450327671e-07, + 6.55072795831714260e-09, + -9.50738603218327440e-11, + 1.37973508779154353e-12, + -2.00122998757879157e-14, + 2.89419299447013638e-16, + -4.12716164269483683e-18, + 5.52928256677532100e-20, + -5.45055197297472394e-22, + -4.94639375401327874e-24, + 6.45452296364339899e-25, + 2.34995098838345073e-01, + -3.54937510608452356e-03, + 5.36098991517219378e-05, + -8.09725907111738801e-07, + 1.22301158081478348e-08, + -1.84722025054775340e-10, + 2.78981303012135420e-12, + -4.21152308884758703e-14, + 6.34301395723049314e-16, + -9.45161175854423247e-18, + 1.34637037438409139e-19, + -1.57815920586524871e-21, + 9.97703469600718487e-25, + 1.00894990201304055e-24, + 3.57174261852327313e-01, + -5.68966806390634565e-03, + 9.06345330371878207e-05, + -1.44377802799698686e-06, + 2.29988803960258782e-08, + -3.66360943837046600e-10, + 5.83560436975552224e-12, + -9.29209853506320015e-14, + 1.47707333697333610e-15, + -2.33054992926909463e-17, + 3.57085819312196650e-19, + -4.88985512613621721e-21, + 3.76141979864093877e-23, + 1.21946315264811534e-24, + 5.32874553697668452e-01, + -9.12117198523030269e-03, + 1.56126385064464502e-04, + -2.67240282482363589e-06, + 4.57432628027376758e-08, + -7.82977485665827126e-10, + 1.34014518731677423e-11, + -2.29323877257114764e-13, + 3.91975398254639874e-15, + -6.66935008016239262e-17, + 1.11606272340879221e-18, + -1.76537076169224082e-20, + 2.28390160315458946e-22, + -5.43037714486901373e-25, + 8.03282435304985998e-01, + -1.52173819451964509e-02, + 2.88278071756931933e-04, + -5.46113909185984912e-06, + 1.03455726952726230e-07, + -1.95985315890302866e-09, + 3.71260957947336257e-11, + -7.03186334362750174e-13, + 1.33103552894829929e-14, + -2.51366040375388734e-16, + 4.71131066209512879e-18, + -8.63440110312438486e-20, + 1.48568825491664615e-21, + -2.11824333104784643e-23, + 1.29199152088373470e+00, + -2.87410662329259207e-02, + 6.39360915763165444e-04, + -1.42229361499070041e-05, + 3.16396880256377033e-07, + -7.03839554577898775e-09, + 1.56569790378781024e-10, + -3.48266942023280446e-12, + 7.74476248470387526e-14, + -1.72092112493352206e-15, + 3.81551383533984855e-17, + -8.41271847919674852e-19, + 1.83166794158399377e-20, + -3.88253016130725316e-22, +# root=10 base[25]=76.0 */ + 1.54508696167645829e-03, + -1.98273698358659642e-05, + 2.54435254561035062e-07, + -3.26504719175171760e-09, + 4.18988004010741435e-11, + -5.37666765366647646e-13, + 6.89954162773553749e-15, + -8.85306283079406563e-17, + 1.13540462967703478e-18, + -1.45207967035221013e-20, + 1.83102323802198987e-22, + -2.15962888594950603e-24, + 1.76682485272797763e-26, + 2.52092077381312274e-28, + 1.40479231058965350e-02, + -1.81396423592065811e-04, + 2.34231510434776224e-06, + -3.02455797757113237e-08, + 3.90551634560471538e-10, + -5.04306414774047709e-12, + 6.51187533275874613e-14, + -8.40784952605913671e-16, + 1.08506390746463615e-17, + -1.39655830116519737e-19, + 1.77345686953646432e-21, + -2.11450252601830326e-23, + 1.80223998253431430e-25, + 2.09929406709254317e-27, + 3.98411034961939706e-02, + -5.21044086644644930e-04, + 6.81424248498694614e-06, + -8.91170275973246518e-08, + 1.16547712386139468e-09, + -1.52421531102518917e-11, + 1.99335501724778750e-13, + -2.60670701697263766e-15, + 3.40726773212900299e-17, + -4.44273850531093049e-19, + 5.72282483922072447e-21, + -6.97037563515132657e-23, + 6.39522655063582791e-25, + 4.62557747794661268e-27, + 8.06532574962930265e-02, + -1.07589108681397337e-03, + 1.43520753661282611e-05, + -1.91452525370716686e-07, + 2.55392092423732840e-09, + -3.40685246286492904e-11, + 4.54459606186777167e-13, + -6.06190756221792540e-15, + 8.08259737167318834e-17, + -1.07537082552882245e-18, + 1.41593459562468187e-20, + -1.77942541708774028e-22, + 1.79376145701170445e-24, + 3.80785553532511401e-27, + 1.39527264144465257e-01, + -1.91391813904710360e-03, + 2.62535258869474305e-05, + -3.60123874594263223e-07, + 4.93987712659193971e-09, + -6.77610221412641884e-11, + 9.29480396241535879e-13, + -1.27490001095119454e-14, + 1.74809701488972399e-16, + -2.39266788015206451e-18, + 3.24762572902780777e-20, + -4.25166291464155932e-22, + 4.75262641136878376e-24, + -1.34357856507753648e-26, + 2.21598171343168032e-01, + -3.15629514297796230e-03, + 4.49561427526310538e-05, + -6.40325021513973089e-07, + 9.12035752532187600e-09, + -1.29904102911841218e-10, + 1.85025179810734770e-12, + -2.63522973192373505e-14, + 3.75222180012626964e-16, + -5.33532150115458954e-18, + 7.53920965376255792e-20, + -1.03829947401700283e-21, + 1.28948436277712449e-23, + -9.25226613905271593e-26, + 3.35764169727861328e-01, + -5.02814891217310492e-03, + 7.52977349872320674e-05, + -1.12760161856837219e-06, + 1.68861029157444544e-08, + -2.52873220433383962e-10, + 3.78681200814210239e-12, + -5.67059610616344602e-14, + 8.48976783019693804e-16, + -1.26980636143766148e-17, + 1.89124293981501366e-19, + -2.77086867437269382e-21, + 3.82120131647182661e-23, + -4.13439896247262442e-25, + 4.98700912560721799e-01, + -7.98908055480563283e-03, + 1.27983339255446243e-04, + -2.05026534650236969e-06, + 3.28448038799773150e-08, + -5.26166265314372848e-10, + 8.42902613423747756e-12, + -1.35026901217992588e-13, + 2.16273745448888931e-15, + -3.46192701880739966e-17, + 5.52772491365463064e-19, + -8.74652570062982848e-21, + 1.34256898818141643e-22, + -1.86489777284450301e-24, + 7.46646469031995719e-01, + -1.31478465894951345e-02, + 2.31523052775243267e-04, + -4.07693558462551202e-06, + 7.17915668798698330e-08, + -1.26419132454272645e-09, + 2.22613163492294601e-11, + -3.91995960077436673e-13, + 6.90204820234040647e-15, + -1.21487654994568871e-16, + 2.13581351468631841e-18, + -3.73997806631745267e-20, + 6.47140791002346382e-22, + -1.08289069194937627e-23, + 1.18628497082543305e+00, + -2.42323381996876891e-02, + 4.94995914783304038e-04, + -1.01113211718111110e-05, + 2.06544757225480825e-07, + -4.21910476578593953e-09, + 8.61838094517386110e-11, + -1.76046538504865089e-12, + 3.59595856014434997e-14, + -7.34428202653183981e-16, + 1.49939611839596956e-17, + -3.05776425678179381e-19, + 6.21803639535831137e-21, + -1.25551612365070540e-22, +# root=10 base[26]=80.0 */ + 1.46961538333809918e-03, + -1.79379762958229307e-05, + 2.18949119087719254e-07, + -2.67247073644660038e-09, + 3.26199064347761436e-11, + -3.98155228434247171e-13, + 4.85983755321433854e-15, + -5.93182057460238705e-17, + 7.23990394891648149e-19, + -8.83376643983096858e-21, + 1.07606669707081251e-22, + -1.30011517698355195e-24, + 1.51308213974414358e-26, + -1.47558060804031401e-28, + 1.33576563043421945e-02, + -1.64010611378172206e-04, + 2.01378745125164756e-06, + -2.47260824309950554e-08, + 3.03596661628809436e-10, + -3.72768006249078324e-12, + 4.57698928964597127e-14, + -5.61976523034055626e-16, + 6.89978767010469318e-18, + -8.46889623814165795e-20, + 1.03784053599649283e-21, + -1.26201651447507818e-23, + 1.48144288547181872e-25, + -1.47628257779179718e-27, + 3.78596011203023997e-02, + -4.70512348427963589e-04, + 5.84744327635527440e-06, + -7.26709787002705816e-08, + 9.03141912433102425e-10, + -1.12240849978001168e-11, + 1.39490791926314134e-13, + -1.73355376555856544e-15, + 2.15431787488343489e-17, + -2.67649118349468051e-19, + 3.32044709333088292e-21, + -4.09071831922794776e-23, + 4.88483098125979315e-25, + -5.06837638358927427e-27, + 7.65656929196128488e-02, + -9.69617739223147413e-04, + 1.22791099294879746e-05, + -1.55501012901600240e-07, + 1.96924410382560547e-09, + -2.49382428013025835e-11, + 3.15814315874053623e-13, + -3.99940335145822482e-15, + 5.06455516853308143e-17, + -6.41187442131926491e-19, + 8.10753567275565586e-21, + -1.01912704163417645e-22, + 1.24838777133217027e-24, + -1.36797636583985834e-26, + 1.32266048943551096e-01, + -1.71992791322038148e-03, + 2.23651651365666866e-05, + -2.90826497709407526e-07, + 3.78177628647828719e-09, + -4.91765051827866272e-11, + 6.39468549755290926e-13, + -8.31531027712290257e-15, + 1.08124202016631251e-16, + -1.40566520412593105e-18, + 1.82558376250417050e-20, + -2.35988430361080379e-22, + 2.99065522604094021e-24, + -3.49438444822789960e-26, + 2.09646884579793774e-01, + -2.82508379733606256e-03, + 3.80692442805539733e-05, + -5.12999777457614036e-07, + 6.91289713951429698e-09, + -9.31543162809168753e-11, + 1.25529445433096031e-12, + -1.69155583874952043e-14, + 2.27937110972431293e-16, + -3.07097799215105704e-18, + 4.13433599359499591e-20, + -5.54689982435695900e-22, + 7.33913555275297833e-24, + -9.20196511028555065e-26, + 3.16776655013162545e-01, + -4.47565364857597028e-03, + 6.32353276808293160e-05, + -8.93435234017624011e-07, + 1.26231102412093625e-08, + -1.78348576808949437e-10, + 2.51983848577369489e-12, + -3.56019882573531693e-14, + 5.02998484773601225e-16, + -7.10576001218490640e-18, + 1.00328491880873320e-19, + -1.41337660315350962e-21, + 1.97375766902940849e-23, + -2.67043820933166379e-25, + 4.68648144368902952e-01, + -7.05542701025424230e-03, + 1.06218387704324732e-04, + -1.59910177864264004e-06, + 2.40742355419884142e-08, + -3.62433958439884083e-10, + 5.45638605339078789e-12, + -8.21448213676006122e-14, + 1.23665621988048141e-15, + -1.86159942735224812e-17, + 2.80145039225766219e-19, + -4.21033824125526312e-21, + 6.29807731773630947e-23, + -9.27254290483481103e-25, + 6.97474855897503021e-01, + -1.14735776094238694e-02, + 1.88742263670565189e-04, + -3.10484168867824505e-06, + 5.10751629224512697e-08, + -8.40194904263717338e-10, + 1.38213417564215545e-11, + -2.27362924415885506e-13, + 3.74011815080496319e-15, + -6.15224604964424444e-17, + 1.01183873953841271e-18, + -1.66314026672285638e-20, + 2.72823199504108061e-22, + -4.44731423832299690e-24, + 1.09657877882048238e+00, + -2.07072916945119055e-02, + 3.91027017474724042e-04, + -7.38397520026139160e-06, + 1.39435607076924206e-07, + -2.63303809697187257e-09, + 4.97210765555942484e-11, + -9.38909066405335503e-13, + 1.77298412450474010e-14, + -3.34795289625873740e-16, + 6.32163445100286045e-18, + -1.19344019969791810e-19, + 2.25186484262207707e-21, + -4.24153154683083829e-23, +# root=10 base[27]=84.0 */ + 1.40117533308432699e-03, + -1.63063559718854111e-05, + 1.89767289505495999e-07, + -2.20844094333967589e-09, + 2.57010120673902447e-11, + -2.99098791347422880e-13, + 3.48079992860680941e-15, + -4.05082248216023758e-17, + 4.71417235154358164e-19, + -5.48599044371534623e-21, + 6.38307113751891062e-23, + -7.42001220498833291e-25, + 8.58700685426940500e-27, + -9.74003130387678151e-29, + 1.27320648447347088e-02, + -1.49009888599529105e-04, + 1.74393919377399236e-06, + -2.04102153223354147e-08, + 2.38871223703258526e-10, + -2.79563249288613657e-12, + 3.27187193165754493e-14, + -3.82923717512225460e-16, + 4.48153088201209112e-18, + -5.24479292183198021e-20, + 6.13703477096197688e-22, + -7.17477854383238440e-24, + 8.35266580896917864e-26, + -9.54207226115278247e-28, + 3.60659135331431596e-02, + -4.26991310050683632e-04, + 5.05523251728894709e-06, + -5.98498732911658939e-08, + 7.08574198880301087e-10, + -8.38894661840308415e-12, + 9.93183509251346642e-14, + -1.17584841037739723e-15, + 1.39210325816343575e-17, + -1.64808767799864611e-19, + 1.95084894479512388e-21, + -2.30740242279847689e-23, + 2.71885281870398862e-25, + -3.15074372775027616e-27, + 7.28725790128872258e-02, + -8.78348681092867693e-04, + 1.05869233122623499e-05, + -1.27606436519510987e-07, + 1.53806749635251056e-09, + -1.85386542695326278e-11, + 2.23450325026984630e-13, + -2.69329275586715843e-15, + 3.24626959541491711e-17, + -3.91269190880548875e-19, + 4.71530461392025043e-21, + -5.67871841313909693e-23, + 6.81737500440720278e-25, + -8.07275068012478906e-27, + 1.25723437148344219e-01, + -1.55400731796384475e-03, + 1.92083417305196818e-05, + -2.37425131631609039e-07, + 2.93469857491933311e-09, + -3.62744062460566072e-11, + 4.48370571961853827e-13, + -5.54209161079484027e-15, + 6.85029007192560461e-17, + -8.46712252461303975e-19, + 1.04644385866454852e-20, + -1.29258996517742616e-22, + 1.59269231203639554e-24, + -1.94200507951033104e-26, + 1.98919149675512358e-01, + -2.54340522759152797e-03, + 3.25202986353042775e-05, + -4.15808622166156941e-07, + 5.31658125679044336e-09, + -6.79784752193881888e-11, + 8.69181275474583938e-13, + -1.11134562700511849e-14, + 1.42097628671527903e-16, + -1.81684495512729005e-18, + 2.32280621269243621e-20, + -2.96847469465460727e-22, + 3.78688724480147064e-24, + -4.79568844069388670e-26, + 2.99822419434531529e-01, + -4.00947373367759041e-03, + 5.36180037881799890e-05, + -7.17024358082756737e-07, + 9.58864361870562538e-09, + -1.28227284058809661e-10, + 1.71476137689574150e-12, + -2.29312016694741828e-14, + 3.06654322268106028e-16, + -4.10078001271318943e-18, + 5.48350866753061051e-20, + -7.33048489784700539e-22, + 9.78833573976076716e-24, + -1.30103865243587864e-25, + 4.42012970840546915e-01, + -6.27639685619483557e-03, + 8.91221753548793850e-05, + -1.26549711908560160e-06, + 1.79695227528600173e-08, + -2.55159606370985871e-10, + 3.62315814409590450e-12, + -5.14472969495540539e-14, + 7.30528625634891834e-16, + -1.03731023360170202e-17, + 1.47286931687837229e-19, + -2.09098079106297975e-21, + 2.96659346024420724e-23, + -4.19827856609072449e-25, + 6.54382518299367999e-01, + -1.00999492998890029e-02, + 1.55885851176542798e-04, + -2.40599213667761469e-06, + 3.71348529468687177e-08, + -5.73151207917525601e-10, + 8.84619902087139722e-12, + -1.36535044348069565e-13, + 2.10732344956349118e-15, + -3.25249336261004357e-17, + 5.01987996842843351e-19, + -7.74705402820042345e-21, + 1.19524261140837038e-22, + -1.84186863783957057e-24, + 1.01949361043722653e+00, + -1.78992010002751757e-02, + 3.14255423641426565e-04, + -5.51736757881872576e-06, + 9.68681610633937384e-08, + -1.70070970892763206e-09, + 2.98592792815453630e-11, + -5.24237901472685620e-13, + 9.20401544997295553e-15, + -1.61594096509972248e-16, + 2.83707343672324999e-18, + -4.98086404336965951e-20, + 8.74385782874498306e-22, + -1.53413077295471127e-23, +# root=10 base[28]=88.0 */ + 1.33882764906381453e-03, + -1.48876590843106383e-05, + 1.65549608394793035e-07, + -1.84089873931192438e-09, + 2.04706504663281580e-11, + -2.27632037212965071e-13, + 2.53125049475957903e-15, + -2.81473067887898259e-17, + 3.12995731015675295e-19, + -3.48047793506625974e-21, + 3.87019068952761406e-23, + -4.30314178908099248e-25, + 4.78221461867477807e-27, + -5.30174713504163370e-29, + 1.21624635936056231e-02, + -1.35977081567605984e-04, + 1.52023202941898538e-06, + -1.69962864081444906e-08, + 1.90019514171502146e-10, + -2.12442970678675954e-12, + 2.37512530114653215e-14, + -2.65540438326281106e-16, + 2.96875706597877858e-18, + -3.31907905295854905e-20, + 3.71068278946028691e-22, + -4.14812411982283692e-24, + 4.63500885950910485e-26, + -5.16715967497511899e-28, + 3.44345397001629000e-02, + -3.89241473547878233e-04, + 4.39991142756562918e-06, + -4.97357601540430586e-08, + 5.62203553126813105e-10, + -6.35504180570409551e-12, + 7.18361809503060918e-14, + -8.12022460680440237e-16, + 9.17894375716663758e-18, + -1.03756758490251215e-19, + 1.17282694034803094e-21, + -1.32561281416320372e-23, + 1.49768578765267403e-25, + -1.68861876176906058e-27, + 6.95194326778159621e-02, + -7.99386454132991649e-04, + 9.19194358234702341e-06, + -1.05695845087245283e-07, + 1.21536991260619850e-09, + -1.39752326372605889e-11, + 1.60697680953337672e-13, + -1.84782209880762741e-15, + 2.12476340406080569e-17, + -2.44320622836993632e-19, + 2.80933997005331840e-21, + -3.23011924135342925e-23, + 3.71262948461623381e-25, + -4.25981382412787927e-27, + 1.19797755750312249e-01, + -1.41099033594122448e-03, + 1.66187898567052240e-05, + -1.95737822765851687e-07, + 2.30542028573254579e-09, + -2.71534781413815027e-11, + 3.19816467720029452e-13, + -3.76683123645847788e-15, + 4.43661143590857147e-17, + -5.22547634257773034e-19, + 6.15454456724734817e-21, + -7.24839313437570010e-23, + 8.53430182760816370e-25, + -1.00345081367353867e-26, + 1.89236166103559311e-01, + -2.30185199608041232e-03, + 2.79995241975007013e-05, + -3.40583737190706186e-07, + 4.14283047159408672e-09, + -5.03930236135123642e-11, + 6.12976282249096202e-13, + -7.45618907220629914e-15, + 9.06964028956962233e-17, + -1.10322125470911332e-18, + 1.34193572417423675e-20, + -1.63223457267335469e-22, + 1.98493447462107578e-24, + -2.41137758694671653e-26, + 2.84591360849147157e-01, + -3.61252014795164370e-03, + 4.58562824269035491e-05, + -5.82086341914098059e-07, + 7.38883510616686017e-09, + -9.37917286127706632e-11, + 1.19056498148917856e-12, + -1.51126859861597452e-14, + 1.91836014066323071e-16, + -2.43510774836967942e-18, + 3.09103370777016909e-20, + -3.92352805653387311e-22, + 4.97957446529369845e-24, + -6.31534627545858310e-26, + 4.18243585311852073e-01, + -5.61963500489512900e-03, + 7.55069502493209535e-05, + -1.01453199913827508e-06, + 1.36315289367816956e-08, + -1.83156944547517760e-10, + 2.46094670787671312e-12, + -3.30659512182797640e-14, + 4.44283087835471412e-16, + -5.96950392399915444e-18, + 8.02075239895273627e-20, + -1.07766645817115652e-21, + 1.44783992407071845e-23, + -1.94422973228960697e-25, + 6.16307237653836881e-01, + -8.95905161857614776e-03, + 1.30234728720461049e-04, + -1.89317857368934212e-06, + 2.75205019968094408e-08, + -4.00056307699421255e-10, + 5.81548436445115293e-12, + -8.45377446659525023e-14, + 1.22889673479053229e-15, + -1.78640509006167713e-17, + 2.59683073181753896e-19, + -3.77488318397474940e-21, + 5.48716472167237180e-23, + -7.97341541628856969e-25, + 9.52539653516314533e-01, + -1.56259977895051964e-02, + 2.56337682128228179e-04, + -4.20510793383776012e-06, + 6.89829625833243112e-08, + -1.13163543028570109e-09, + 1.85639859146445207e-11, + -3.04534094235875720e-13, + 4.99574884401874399e-15, + -8.19530638568945931e-17, + 1.34440294459626237e-18, + -2.20542546866194444e-20, + 3.61784969716834618e-22, + -5.93302649132203841e-24, +# root=10 base[29]=92.0 */ + 1.28179332819603874e-03, + -1.36463831481584483e-05, + 1.45283774638169068e-07, + -1.54673769188140847e-09, + 1.64670658746327472e-11, + -1.75313668203446731e-13, + 1.86644557588232770e-15, + -1.98707785468818676e-17, + 2.11550679426329971e-19, + -2.25223591038324338e-21, + 2.39779881114996552e-23, + -2.55274806077318667e-25, + 2.71758245972885932e-27, + -2.89203702295522583e-29, + 1.16416562112252597e-02, + -1.24582401496854949e-04, + 1.33321019630848213e-06, + -1.42672593093782673e-08, + 1.52680116581972483e-10, + -1.63389600576960320e-12, + 1.74850282841504895e-14, + -1.87114854378350648e-16, + 2.00239698032663270e-18, + -2.14285119467196512e-20, + 2.29315429080446517e-22, + -2.45398020115067502e-24, + 2.62596783796916600e-26, + -2.80904851593198603e-28, + 3.29443963442586432e-02, + -3.56285666414301802e-04, + 3.85314317997527335e-06, + -4.16708101530080667e-08, + 4.50659717974961530e-10, + -4.87377568745057090e-12, + 5.27087034790552319e-14, + -5.70031858822616792e-16, + 6.16475630863828973e-18, + -6.66703324193905424e-20, + 7.21022477054612074e-22, + -7.79761540637889255e-24, + 8.43251834472485284e-26, + -9.11619943994262813e-28, + 6.64613653848170755e-02, + -7.30613688406158866e-04, + 8.03167913562596574e-06, + -8.82927198891757431e-08, + 9.70607049133170462e-10, + -1.06699402282160804e-11, + 1.17295278809707098e-13, + -1.28943387694192491e-15, + 1.41748219000769624e-17, + -1.55824619802447395e-19, + 1.71298705188777097e-21, + -1.88308244952881056e-23, + 2.06999673834854646e-25, + -2.27480194340607404e-27, + 1.14405653044649738e-01, + -1.28684708910289177e-03, + 1.44745944510826820e-05, + -1.62811795043458706e-07, + 1.83132458009866297e-09, + -2.05989358246570535e-11, + 2.31699045387135952e-13, + -2.60617577360797570e-15, + 2.93145447471277682e-17, + -3.29733099561694856e-19, + 3.70886948882004134e-21, + -4.17175035916079011e-23, + 4.69227163550227966e-25, + -5.27637079951646321e-27, + 1.80452362140376105e-01, + -2.09314870623226101e-03, + 2.42793801889582464e-05, + -2.81627531099315359e-07, + 3.26672533053529962e-09, + -3.78922271671527265e-11, + 4.39529110681422510e-13, + -5.09829728132177326e-15, + 5.91374589869071691e-17, + -6.85962091633739756e-19, + 7.95677852113862095e-21, + -9.22938389852909796e-23, + 1.07053118692950769e-24, + -1.24144092871866645e-26, + 2.70833403459412370e-01, + -3.27173341372421827e-03, + 3.95233357250322819e-05, + -4.77451512485953240e-07, + 5.76773044564662788e-09, + -6.96755872021772015e-11, + 8.41698046884211393e-13, + -1.01679171918544513e-14, + 1.22830912001399528e-16, + -1.48382715843451458e-18, + 1.79249822749060329e-20, + -2.16537419392527421e-22, + 2.61578015401178971e-24, + -3.15921643021912259e-26, + 3.96900944012684553e-01, + -5.06082816606082987e-03, + 6.45299088166844027e-05, + -8.22811799818607589e-07, + 1.04915576410170694e-08, + -1.33776377243640542e-10, + 1.70576378818552084e-12, + -2.17499543444602108e-14, + 2.77330608702756502e-16, + -3.53620337934773003e-18, + 4.50896143261852667e-20, + -5.74930120499991781e-22, + 7.33077844614709233e-24, + -9.34543555072805938e-26, + 5.82420728976241975e-01, + -8.00112329595194065e-03, + 1.09917059630678011e-04, + -1.51000797650069629e-06, + 2.07440418871673537e-08, + -2.84975497154873762e-10, + 3.91490888859322550e-12, + -5.37818575476481476e-14, + 7.38839208414265370e-16, + -1.01499535664564725e-17, + 1.39437021085932844e-19, + -1.91554231270243630e-21, + 2.63150195598015277e-23, + -3.61432304936364032e-25, + 8.93841880735413818e-01, + -1.37599541438540082e-02, + 2.11823077572944495e-04, + -3.26084053212570122e-06, + 5.01979345110882349e-08, + -7.72755553156098172e-10, + 1.18959305936784682e-11, + -1.83127981468872292e-13, + 2.81910332540373052e-15, + -4.33977558633059098e-17, + 6.68072380653097846e-19, + -1.02844156372851393e-20, + 1.58319765935081473e-22, + -2.43660864096624319e-24, +# root=10 base[30]=96.0 */ + 1.22942077479416020e-03, + -1.25541288690165106e-05, + 1.28195451786034332e-07, + -1.30905728546283467e-09, + 1.33673305312211535e-11, + -1.36499393506270912e-13, + 1.39385230160284086e-15, + -1.42332078435951844e-17, + 1.45341227990681315e-19, + -1.48413994066280988e-21, + 1.51551707653510682e-23, + -1.54755649783003897e-25, + 1.58026666506986552e-27, + -1.61346331828106990e-29, + 1.11636291879201269e-02, + -1.14562363114939774e-04, + 1.17565128880140766e-06, + -1.20646599396146688e-08, + 1.23808837573702879e-10, + -1.27053960393830033e-12, + 1.30384140323171752e-14, + -1.33801606749110847e-16, + 1.37308647300371408e-18, + -1.40907608022260607e-20, + 1.44600885376964244e-22, + -1.48390866891850045e-24, + 1.52279577990848712e-26, + -1.56250376367619643e-28, + 3.15779008056814026e-02, + -3.27345127415633536e-04, + 3.39334882018118060e-06, + -3.51763788461847545e-08, + 3.64647931674799471e-10, + -3.78003985731280817e-12, + 3.91849235425321523e-14, + -4.06201598584119346e-16, + 4.21079648758569299e-18, + -4.36502635329236677e-20, + 4.52490480661873710e-22, + -4.69063628992708624e-24, + 4.86242041948875007e-26, + -5.03985686796579197e-28, + 6.36610597628674835e-02, + -6.70349582757786460e-04, + 7.05876661144821276e-06, + -7.43286597866045288e-08, + 7.82679180341786477e-10, + -8.24159484508867186e-12, + 8.67838155089234760e-14, + -9.13831700607609256e-16, + 9.62262803125151529e-18, + -1.01326063725092781e-19, + 1.06696115653160634e-21, + -1.12350708499470808e-23, + 1.18304613015607231e-25, + -1.24558196791201297e-27, + 1.09478148782586132e-01, + -1.17839664269055416e-03, + 1.26839799809005026e-05, + -1.36527330719943060e-07, + 1.46954757588537381e-09, + -1.58178590792024904e-11, + 1.70259656748389953e-13, + -1.83263427537853055e-15, + 1.97260375533453696e-17, + -2.12326353826071966e-19, + 2.28542996738800836e-21, + -2.45998094752864809e-23, + 2.64785674617470159e-25, + -2.84971435322344333e-27, + 1.72448016606937343e-01, + -1.91159733571203772e-03, + 2.11901791960323231e-05, + -2.34894496854226333e-07, + 2.60382057848412815e-09, + -2.88635182847078955e-11, + 3.19953953296310877e-13, + -3.54671011366776419e-15, + 3.93155092686539248e-17, + -4.35814940222181366e-19, + 4.83103627708634059e-21, + -5.35523257254074325e-23, + 5.93629616275132380e-25, + -6.57953736480009986e-27, + 2.58344640472636444e-01, + -2.97699480404771573e-03, + 3.43049426034669418e-05, + -3.95307739679982553e-07, + 4.55526805152243866e-09, + -5.24919320780235027e-11, + 6.04882720859992438e-13, + -6.97027317285924270e-15, + 8.03208727669859746e-17, + -9.25565239820400526e-19, + 1.06656084328437505e-20, + -1.22903465992094198e-22, + 1.41625698720903496e-24, + -1.63177270132562090e-26, + 3.77631353894975708e-01, + -4.58142000670119266e-03, + 5.55817441039055897e-05, + -6.74317192729175563e-07, + 8.18080979179225192e-09, + -9.92495068656822178e-11, + 1.20409407670979737e-12, + -1.46080579262379899e-14, + 1.77224820189634513e-16, + -2.15008982774432705e-18, + 2.60848685603664619e-20, + -3.16461319616727123e-22, + 3.83930198508230479e-24, + -4.65713111211079834e-26, + 5.52067581658029938e-01, + -7.18902717871121744e-03, + 9.36155526847476897e-05, + -1.21906225788422160e-06, + 1.58746356345531055e-08, + -2.06719595246108298e-10, + 2.69190374142447482e-12, + -3.50539857822013430e-14, + 4.56473201391768871e-16, + -5.94419659742982196e-18, + 7.74053603209273666e-20, + -1.00797293943623309e-21, + 1.31258225801512871e-23, + -1.70895190738046659e-25, + 8.41961254142634341e-01, + -1.22093178063706620e-02, + 1.77047863620226142e-04, + -2.56737898952308063e-06, + 3.72296775632552339e-08, + -5.39869219589064383e-10, + 7.82866770100563704e-12, + -1.13523860495768791e-13, + 1.64621457840560990e-15, + -2.38718311967828302e-17, + 3.46166489030945512e-19, + -5.01977553924174874e-21, + 7.27919736599412960e-23, + -1.05533701258006745e-24, + ]) + +DATA_W = np.array([ +# root=6 base[0]=0.0 */ + 4.68191818023631134e-01, + -1.45170048876671811e-02, + 5.14736742524254552e-04, + -1.87036507785185037e-05, + 6.67536123709177513e-07, + -2.31759441798646411e-08, + 7.81990082225856950e-10, + -2.57077791673372889e-11, + 8.24809968383298353e-13, + -2.58951252400149340e-14, + 7.95836164769633417e-16, + -2.40116164443139403e-17, + 7.11294842847795793e-19, + -2.05705362037095823e-20, + 3.93060289803588703e-01, + -3.41407175855545156e-02, + 2.63809148379061907e-03, + -1.72927802762273911e-04, + 1.00892255988079650e-05, + -5.37668473839741412e-07, + 2.65821244248589374e-08, + -1.23199373512337088e-09, + 5.39279377464798182e-11, + -2.24191389608054918e-12, + 8.88956201267968428e-14, + -3.37327724935385425e-15, + 1.22829739434203260e-16, + -4.29641198711664959e-18, + 2.84443237569889595e-01, + -5.35165649536975194e-02, + 6.71552139047160157e-03, + -6.55826564387053564e-04, + 5.37807668379012532e-05, + -3.85213441562946824e-06, + 2.46918298785757218e-07, + -1.43970828330915504e-08, + 7.72567401493197438e-10, + -3.84884038456033174e-11, + 1.79220972850254478e-12, + -7.84234668696407315e-14, + 3.23890943391757566e-15, + -1.26546876303908709e-16, + 1.83282975178210544e-01, + -5.67049390826931954e-02, + 1.02283008049457811e-02, + -1.34754798285909461e-03, + 1.42330195985579952e-04, + -1.26704203204518809e-05, + 9.80650538416785238e-07, + -6.73928579149659400e-08, + 4.17527442149567287e-09, + -2.35886037569073280e-10, + 1.22616899242814583e-11, + -5.90674739792320390e-13, + 2.65251154325464704e-14, + -1.11424694305173885e-15, + 1.03896381402773130e-01, + -4.31695643334346832e-02, + 9.97625123813350272e-03, + -1.61832679208380849e-03, + 2.03881594416244709e-04, + -2.10995683419174559e-05, + 1.85859136822596246e-06, + -1.42800495147289160e-07, + 9.74221449719899707e-09, + -5.98226682446005856e-10, + 3.34191216499979397e-11, + -1.71314606472487005e-12, + 8.11626659871168706e-14, + -3.56936536666364523e-15, + 4.16052301993916837e-02, + -1.99753438949547175e-02, + 5.28383322123325561e-03, + -9.62930751830167104e-04, + 1.33970091236807924e-04, + -1.50888090216179426e-05, + 1.42876346622049582e-06, + -1.16781302153728025e-07, + 8.40082788574310538e-09, + -5.39841138124837779e-10, + 3.13553296478549325e-11, + -1.66186507698389844e-12, + 8.10099167284629402e-14, + -3.65004953302808627e-15, +# root=6 base[1]=2.5 */ + 4.17155083137000005e-01, + -1.11449485771202075e-02, + 3.41823488291325935e-04, + -1.09118055813648477e-05, + 3.45810759720881999e-07, + -1.07471572373508267e-08, + 3.25780728429269817e-10, + -9.67626775311538982e-12, + 2.80534496080717475e-13, + -8.00022846801872112e-15, + 2.24922321001069558e-16, + -6.09833415233773570e-18, + 1.67262054692295004e-19, + -4.54743170794528569e-21, + 2.88587611840684821e-01, + -1.92309940894317306e-02, + 1.26365710855329749e-03, + -7.18449473731826816e-05, + 3.68349363898150533e-06, + -1.74337460788710900e-07, + 7.72299831440342323e-09, + -3.23135026415614565e-10, + 1.28547558332750252e-11, + -4.88561320110636826e-13, + 1.78077210491884708e-14, + -6.24385928702716386e-16, + 2.11044012329474462e-17, + -6.88463117443852515e-19, + 1.42910179144594279e-01, + -2.09284395462391026e-02, + 2.22762534807030479e-03, + -1.89087560196073856e-04, + 1.37310667291856548e-05, + -8.83157550689539699e-07, + 5.14055298259851936e-08, + -2.74732859513953949e-09, + 1.36222669916050447e-10, + -6.31517417534588108e-12, + 2.75369375191326774e-13, + -1.13475722846743325e-14, + 4.43617949947926821e-16, + -1.64850900845028700e-17, + 5.45445230596317901e-02, + -1.41493274770410141e-02, + 2.23489955190636202e-03, + -2.63768564524528143e-04, + 2.53765068972166642e-05, + -2.08404250130034368e-06, + 1.50328686537516992e-07, + -9.70988178895214196e-09, + 5.69437347431642903e-10, + -3.06386104503710886e-11, + 1.52480368747261987e-12, + -7.06496240426108824e-14, + 3.06390708701844445e-15, + -1.24750855274864580e-16, + 1.77343211575596328e-02, + -6.75490258202208951e-03, + 1.44893413960767679e-03, + -2.20819636279448591e-04, + 2.63909482570249985e-05, + -2.61105940626611467e-06, + 2.21265163202742761e-07, + -1.64391299485153366e-08, + 1.08914449680438210e-09, + -6.51831146276956964e-11, + 3.55984739234370767e-12, + -1.78866992257285796e-13, + 8.32463349620918878e-15, + -3.60356505061188825e-16, + 4.72539699959455793e-03, + -2.21518460663758937e-03, + 5.72560307240309427e-04, + -1.02247097224854549e-04, + 1.39767395383156464e-05, + -1.55017118126920609e-06, + 1.44821651304338729e-07, + -1.16971796059622002e-08, + 8.32608663767503504e-10, + -5.30009020864407181e-11, + 3.05240676143082268e-12, + -1.60545027993881942e-13, + 7.77171884606819991e-15, + -3.47961119296329795e-16, +# root=6 base[2]=5.0 */ + 3.77329416787099470e-01, + -8.85403591385736793e-03, + 2.38148487246577975e-04, + -6.75031486428278884e-06, + 1.91413238548058651e-07, + -5.38008339972967587e-09, + 1.47137716455541723e-10, + -3.98276468520526180e-12, + 1.06334938348770256e-13, + -2.65900159075596356e-15, + 7.22461400024153150e-17, + -1.83212971309187276e-18, + 3.90150430163120251e-20, + -1.12115563963452872e-21, + 2.27554159813722040e-01, + -1.17804240462867655e-02, + 6.65926627477751460e-04, + -3.31408114645354430e-05, + 1.50306476825697915e-06, + -6.34757980014641235e-08, + 2.52854383092215081e-09, + -9.57254752107926009e-11, + 3.46533809217320651e-12, + -1.20526439775060013e-13, + 4.03488872911787977e-15, + -1.30605572444797412e-16, + 4.09588684641017930e-18, + -1.24227216458328094e-19, + 8.43949784291552901e-02, + -9.45703259758133401e-03, + 8.56219775183533326e-04, + -6.30536059562193321e-05, + 4.04371944665094265e-06, + -2.32722484773040642e-07, + 1.22504705467316944e-08, + -5.97335570141015105e-10, + 2.72297906051278521e-11, + -1.16852490355850389e-12, + 4.74481560583060409e-14, + -1.83091083615263687e-15, + 6.73676664625364821e-17, + -2.36727313084406641e-18, + 2.04097206707036308e-02, + -4.26657538838944549e-03, + 5.80002216162412332e-04, + -6.04146637790853956e-05, + 5.22691111518635367e-06, + -3.91453396417903992e-07, + 2.60393168010074406e-08, + -1.56539584104934713e-09, + 8.61141299520317380e-11, + -4.37566741001166845e-12, + 2.06865109268564120e-13, + -9.15226471277159976e-15, + 3.80742959328500406e-16, + -1.49330507074160235e-17, + 3.68715872237146414e-03, + -1.24140524904209934e-03, + 2.41291598801732921e-04, + -3.39104364461449096e-05, + 3.78714993754307889e-06, + -3.53744523711329626e-07, + 2.85334393089216037e-08, + -2.03133973435264007e-09, + 1.29672905288676980e-10, + -7.51224189960992153e-12, + 3.98693799503765508e-13, + -1.95328502658825273e-14, + 8.88948856516279198e-16, + -3.77242879488612060e-17, + 5.79451636598775897e-04, + -2.62053319040160494e-04, + 6.55312504808748314e-05, + -1.13773347385315944e-05, + 1.51842618011678788e-06, + -1.64991702962037420e-07, + 1.51434455191529470e-08, + -1.20440686711523522e-09, + 8.45770089409020738e-11, + -5.31980548727645398e-12, + 3.03130090339795197e-13, + -1.57922267141875163e-14, + 7.57946113407316190e-16, + -3.36738619313614446e-17, +# root=6 base[3]=7.5 */ + 3.45274716165393625e-01, + -7.22789346269617043e-03, + 1.72501958346824431e-04, + -4.38861146105355426e-06, + 1.11765104556036951e-07, + -2.87438646149411771e-09, + 7.20632063705209864e-11, + -1.68538231332832501e-12, + 4.70351056657959583e-14, + -9.83618014082293022e-16, + 1.87267547671509744e-17, + -8.01696933008078663e-19, + 1.27410945240841445e-20, + -8.30433816331086628e-23, + 1.89040941277889757e-01, + -7.71375658167449286e-03, + 3.79276823308924297e-04, + -1.66788050327132906e-05, + 6.74355837555567690e-07, + -2.55451111353602958e-08, + 9.19099720624716013e-10, + -3.16390191126760252e-11, + 1.04200187162417684e-12, + -3.32977018249296182e-14, + 1.02803733451909276e-15, + -3.05159607907473562e-17, + 8.90467913651848670e-19, + -2.52703039353914159e-20, + 5.66639301667590592e-02, + -4.80635211448494307e-03, + 3.73774197268526333e-04, + -2.39246415987457100e-05, + 1.35616662358083609e-06, + -6.97880051259604242e-08, + 3.31735218545783127e-09, + -1.47308701292392552e-10, + 6.15291188746158675e-12, + -2.43657599805355952e-13, + 9.18138760306680043e-15, + -3.30205592317476125e-16, + 1.13868972029684372e-17, + -3.76721259096403982e-19, + 9.46337511260488332e-03, + -1.53548384554592649e-03, + 1.78035865755750021e-04, + -1.61879157905600738e-05, + 1.24748066392798258e-06, + -8.44160455543823997e-08, + 5.13274728938088365e-09, + -2.84769737577538421e-10, + 1.45745734641415764e-11, + -6.93923642346831190e-13, + 3.09317151761374129e-14, + -1.29743181113215102e-15, + 5.14266850627481261e-17, + -1.93054882283549458e-18, + 9.68586144770995226e-04, + -2.74904184441717564e-04, + 4.71593392395835140e-05, + -5.98656606440910942e-06, + 6.14381763976919960e-07, + -5.34177689196649317e-08, + 4.05174639751307310e-09, + -2.73498092280869380e-10, + 1.66677245370123845e-11, + -9.27149489296234463e-13, + 4.74780520365848638e-14, + -2.25375627819199041e-15, + 9.97401012020856004e-17, + -4.12901292874793212e-18, + 7.93287853526754262e-05, + -3.39088527720763101e-05, + 8.07874091105822177e-06, + -1.34770522506889579e-06, + 1.74002509804248405e-07, + -1.83878589577965010e-08, + 1.64821584123497879e-09, + -1.28449547190732996e-10, + 8.86250845316805276e-12, + -5.48920237681161827e-13, + 3.08568370059416203e-14, + -1.58834304744020980e-15, + 7.54194864457617078e-17, + -3.31875698693940335e-18, +# root=6 base[4]=10.0 */ + 3.18827481866619911e-01, + -6.03195815049238204e-03, + 1.28938061325087252e-04, + -2.97966663859969121e-06, + 6.85041367149113779e-08, + -1.57014186133236208e-09, + 4.13042008838960736e-11, + -6.60597582185885443e-13, + 1.82358506065557928e-14, + -7.59137647247794932e-16, + -2.67049397568455822e-18, + -1.24297230185435746e-19, + 1.84910727760999041e-20, + 2.79346044360133957e-22, + 1.63202778977313168e-01, + -5.32900384731320800e-03, + 2.30205850626734180e-04, + -9.02307408295638983e-06, + 3.27911047001866241e-07, + -1.12268862412911840e-08, + 3.64206201155060692e-10, + -1.15669739183915529e-11, + 3.47222469700969040e-13, + -9.99906592095395937e-15, + 2.95191509416479238e-16, + -8.03463698717538583e-18, + 2.07340346519148988e-19, + -5.84236140631585012e-21, + 4.20100488411195988e-02, + -2.67927115766216284e-03, + 1.81769608736457482e-04, + -1.01518372412932536e-05, + 5.10454571870744344e-07, + -2.35491200676961502e-08, + 1.00871019505559570e-09, + -4.09198029121740293e-11, + 1.56385294493765842e-12, + -5.68557349185710523e-14, + 1.99333645580087330e-15, + -6.65874278717046351e-17, + 2.13799573714822659e-18, + -6.66820231328615778e-20, + 5.29158258853149304e-03, + -6.44158043463991773e-04, + 6.38706006682949258e-05, + -5.03390488505124383e-06, + 3.43640646262803234e-07, + -2.08886559039705501e-08, + 1.15305560310036971e-09, + -5.86829769748726609e-11, + 2.77579083914087017e-12, + -1.22994005188495391e-13, + 5.13692177084674943e-15, + -2.02947504256816389e-16, + 7.61573811078754250e-18, + -2.72016020983090393e-19, + 3.28887784554604697e-04, + -7.43261375670293482e-05, + 1.09966599023506976e-05, + -1.23532140878189378e-06, + 1.14580694929033757e-07, + -9.14040595945251942e-09, + 6.43680550285769047e-10, + -4.07346216640908748e-11, + 2.34613132607048498e-12, + -1.24179473966657122e-13, + 6.08625217718657279e-15, + -2.77903861649323150e-16, + 1.18817420021716971e-17, + -4.77043680507022902e-19, + 1.27486665043532230e-05, + -4.96988531521788296e-06, + 1.10208719693227234e-06, + -1.73629273953878329e-07, + 2.14021372020620018e-08, + -2.17683795105342885e-09, + 1.88975510130737533e-10, + -1.43331008935790546e-11, + 9.66208888689675495e-13, + -5.86542467826475595e-14, + 3.23996054444918595e-15, + -1.64233021597131493e-16, + 7.69316777640203277e-18, + -3.34481371874110856e-19, +# root=6 base[5]=12.5 */ + 2.96559769729653255e-01, + -5.12690877060698481e-03, + 9.88815859409316971e-05, + -2.08639562711147924e-06, + 4.57471005270350350e-08, + -7.60792390254910195e-10, + 2.67466431603570645e-11, + -5.27642805336974828e-13, + -9.53260821801762294e-15, + -6.57090185715639487e-16, + 1.68586757295867374e-17, + 1.09420858488562693e-18, + 2.56189424827427062e-20, + -6.30584116345197438e-22, + 1.44991037279162877e-01, + -3.84571974144156661e-03, + 1.47282676311431897e-04, + -5.18898000811044474e-06, + 1.69875887771945136e-07, + -5.38245178075939009e-09, + 1.54715227359297067e-10, + -4.48920002572752949e-12, + 1.34858116136324508e-13, + -3.17051298314096189e-15, + 8.24032576072390068e-17, + -2.88452656391880580e-18, + 4.70857042041512249e-20, + -1.01687126553872807e-21, + 3.35873766866301091e-02, + -1.60239876943137462e-03, + 9.68063293149483656e-05, + -4.74464110200351739e-06, + 2.11583546293715892e-07, + -8.88991342615114902e-09, + 3.39491758790235808e-10, + -1.25630627012529867e-11, + 4.50853909768321178e-13, + -1.46574878419426065e-14, + 4.74252072497283446e-16, + -1.54291649618715002e-17, + 4.36919210801827490e-19, + -1.28155394660592231e-20, + 3.45402427637573521e-03, + -3.05519864419411728e-04, + 2.63539163702975755e-05, + -1.79359011061269047e-06, + 1.08071416362226813e-07, + -5.90678846615049462e-09, + 2.94021121074663704e-10, + -1.36695344283692310e-11, + 5.96649590798967183e-13, + -2.44116070227756146e-14, + 9.50593494881439030e-16, + -3.52865041704568138e-17, + 1.24240130434052688e-18, + -4.20541944103014978e-20, + 1.44418100385246121e-04, + -2.43715738807830716e-05, + 3.07736134178902285e-06, + -3.00412820390031395e-07, + 2.48229222216219007e-08, + -1.79443297914477116e-09, + 1.15889078457392425e-10, + -6.80096493462977794e-12, + 3.66508818382448217e-13, + -1.82843867018446008e-14, + 8.50430406992626184e-16, + -3.70611362181466567e-17, + 1.51967046055729818e-18, + -5.87932119962650671e-20, + 2.57994127350127131e-06, + -8.61910882473275149e-07, + 1.72220744072318338e-07, + -2.50103314736324385e-08, + 2.89018599895033168e-09, + -2.78932583013581154e-10, + 2.31854466407425399e-11, + -1.69567796854620897e-12, + 1.10833652139056921e-13, + -6.55279054210784860e-15, + 3.53804069031813762e-16, + -1.75819715325471577e-17, + 8.09405839279486434e-19, + -3.46577724479243971e-20, +# root=6 base[6]=15.0 */ + 2.77491967339250301e-01, + -4.42451790222428681e-03, + 7.78317168957591538e-05, + -1.44714826834489239e-06, + 3.55081557720509463e-08, + -3.45228482925283195e-10, + 5.68688759527908722e-12, + -9.74764102333049309e-13, + -8.01375672230387703e-15, + 1.06155220356956529e-15, + 6.01733267597964096e-17, + -2.90110983540143417e-19, + -1.14906448329349519e-19, + -3.54491367378146139e-21, + 1.31626194541458380e-01, + -2.87737438653630885e-03, + 9.83258660457975132e-05, + -3.16554485180482591e-06, + 9.13146847110561402e-08, + -2.77820530391371802e-09, + 7.55512520903842023e-11, + -1.57583712582656188e-12, + 5.49774648552805372e-14, + -1.80114366103707643e-15, + 2.80869525202515610e-18, + -4.81207977098118218e-19, + 7.39482959689951886e-20, + 1.07574739562402069e-21, + 2.84325421484197781e-02, + -1.00926971272586284e-03, + 5.54816866879268369e-05, + -2.43444383184781117e-06, + 9.35143716906356675e-08, + -3.71689222696208716e-09, + 1.30274836730826356e-10, + -3.95160314310466245e-12, + 1.44061343372047034e-13, + -4.79233548822390029e-15, + 1.01407696050970838e-16, + -3.64291186744093245e-18, + 1.54546722730094652e-19, + -1.10461527563710576e-21, + 2.54945979654272632e-03, + -1.58390848263457963e-04, + 1.22685920053622466e-05, + -7.25761023728989655e-07, + 3.79620858098028946e-08, + -1.89499287341237527e-09, + 8.52528497487483417e-11, + -3.53512593181441544e-12, + 1.44497774755663694e-13, + -5.50959301936984835e-15, + 1.92101244583339894e-16, + -6.82367474315634636e-18, + 2.32415951887642443e-19, + -6.82363261662803788e-21, + 8.02091609142491333e-05, + -9.41239587266456864e-06, + 1.02778666307976460e-06, + -8.61208197498668325e-08, + 6.24692169907977015e-09, + -4.06821311496517784e-10, + 2.38534881844151072e-11, + -1.28313766955130354e-12, + 6.42478984510965313e-14, + -2.99469935165438573e-15, + 1.30822095041556666e-16, + -5.40959597956567502e-18, + 2.11222208657113418e-19, + -7.79495567493040015e-21, + 7.13770090953643770e-07, + -1.84331548476049947e-07, + 3.20448290787845413e-08, + -4.15850090200853095e-09, + 4.40167679782111988e-10, + -3.95882655591804103e-11, + 3.10414853858773586e-12, + -2.16263305252530515e-13, + 1.35701479135637054e-14, + -7.74851053974961798e-16, + 4.06069122781402013e-17, + -1.96671748470714290e-18, + 8.85311238544556862e-20, + -3.71732637478430668e-21, +# root=6 base[7]=17.5 */ + 2.60942167579689355e-01, + -3.86219179798217172e-03, + 6.36455631439158357e-05, + -9.36042897564814893e-07, + 2.78102831759948247e-08, + -5.16000365743422733e-10, + -1.68359143647699419e-11, + -2.93007458036049778e-13, + 5.32715828395281370e-14, + 1.35129481091780282e-15, + -8.34174813225920578e-17, + -4.71854039382349626e-18, + 8.18921969831274722e-20, + 1.19083120289333139e-20, + 1.21479556423961216e-01, + -2.22152141815064839e-03, + 6.75570096684519154e-05, + -2.06268902588668855e-06, + 5.10851058498729371e-08, + -1.35461041403290574e-09, + 4.65464351710817858e-11, + -8.08614643628063137e-13, + -3.16290438397271316e-15, + -1.07205394922863033e-15, + 5.27370322050581389e-17, + 1.81066973466348249e-18, + -4.42910409996285241e-20, + -5.50143072015824622e-21, + 2.51278138156887654e-02, + -6.61534689531638356e-04, + 3.32586547374815698e-05, + -1.39309839384549182e-06, + 4.35796271500512917e-08, + -1.53400713233009788e-09, + 6.26032359864987478e-11, + -1.51115421269022760e-12, + 2.40574655683770899e-14, + -2.01784378801122385e-15, + 7.46064004835290509e-17, + 1.21079593808291669e-18, + -4.95681252631228788e-21, + -6.19822848100859332e-21, + 2.06855944562495293e-03, + -8.70468121672368444e-05, + 6.23965365937886204e-06, + -3.36572027537258066e-07, + 1.45830555606576193e-08, + -6.56003405375520124e-10, + 2.91439573097690570e-11, + -1.03344086373449333e-12, + 3.48476265927829727e-14, + -1.47973140034511820e-15, + 5.03360997646975660e-17, + -1.04136324957921159e-18, + 4.40220232245394013e-20, + -2.30725899444430283e-21, + 5.42391863200009726e-05, + -4.08824442571865048e-06, + 4.00771776298219223e-07, + -2.91870302673448880e-08, + 1.80521852860120777e-09, + -1.05578598778125963e-10, + 5.68278942270876255e-12, + -2.74566309374069877e-13, + 1.25600293815648997e-14, + -5.55546451279612332e-16, + 2.25387187303070965e-17, + -8.51193628985905649e-19, + 3.24450509775633039e-20, + -1.16802861110227637e-21, + 2.86700993124422041e-07, + -4.92498560989164560e-08, + 7.33436026238274195e-09, + -8.24110445137198532e-10, + 7.76051764436059616e-11, + -6.38044052458438428e-12, + 4.64106169305008846e-13, + -3.03118176419878727e-14, + 1.80370624824297263e-15, + -9.85120404282212231e-17, + 4.96241784664659592e-18, + -2.32364170289598592e-19, + 1.01755316205603386e-20, + -4.16510682933396448e-22, +# root=6 base[8]=20.0 */ + 2.46450056741052664e-01, + -3.39131855745477672e-03, + 5.46725583535227199e-05, + -5.94630640475733054e-07, + 1.38622197137774814e-08, + -8.11497341627713891e-10, + -1.03330665436693493e-13, + 1.29123750061206118e-12, + 1.65670746579344486e-14, + -3.17176536502655573e-15, + -4.67283675394746134e-17, + 7.10307261660684203e-18, + 1.37427271269424205e-19, + -1.58008773431133555e-20, + 1.13534968457799354e-01, + -1.76788406903298782e-03, + 4.69892876374249056e-05, + -1.40956321136232499e-06, + 3.31816216598935714e-08, + -5.39109110371967693e-10, + 2.01495318223223032e-11, + -1.03746065138366120e-12, + 3.60509607942743851e-15, + 1.23911373708120425e-15, + 2.06280252428685668e-17, + -3.35090621675472176e-18, + -4.41873379144447895e-20, + 7.25993203915400992e-21, + 2.29221843404541423e-02, + -4.52349219639591185e-04, + 1.99401323257969692e-05, + -8.73093265180268070e-07, + 2.47430430272741258e-08, + -4.96963089846252788e-10, + 2.46469766792983671e-11, + -1.27104158034778194e-12, + 9.77056847498836746e-15, + 9.90046408467592372e-16, + 3.62557381997688834e-17, + -3.57301264794543111e-18, + -6.45678859268005422e-20, + 7.08200537987670924e-21, + 1.79917274599261049e-03, + -5.01101163078388208e-05, + 3.26835217093691696e-06, + -1.78279620918778600e-07, + 6.60086967086063196e-09, + -2.14870941864291008e-10, + 1.01765252154697118e-11, + -4.50222797145242666e-13, + 9.66814575964931258e-15, + -1.23180159899146064e-16, + 1.74959119328985729e-17, + -8.96444627287783754e-19, + -8.22436634367388742e-21, + 9.24202048918989546e-22, + 4.26099576903338876e-05, + -1.91468942235372395e-06, + 1.72560122875149144e-07, + -1.17697365437617629e-08, + 6.09102730778597459e-10, + -2.97011343123042635e-11, + 1.53538027607915791e-12, + -7.14861577821566708e-14, + 2.71243468969607410e-15, + -1.03436070330591234e-16, + 4.69438324982959018e-18, + -1.76532831662275258e-19, + 4.16204988963988979e-21, + -1.36662099632647905e-22, + 1.65073367271511216e-07, + -1.58593949488079989e-08, + 2.06807833373170411e-09, + -2.00930902720114556e-10, + 1.61940557651068332e-11, + -1.18419108614536941e-12, + 7.93789316374793133e-14, + -4.79557386762537488e-15, + 2.64053849674487807e-16, + -1.36271495789464509e-17, + 6.60841982028222557e-19, + -2.95365567022991747e-20, + 1.22603756596436859e-21, + -4.91212816891723455e-23, +# root=6 base[9]=22.5 */ + 2.33718121346730701e-01, + -2.97988352343996803e-03, + 4.83649515032879643e-05, + -4.90793204582873591e-07, + 4.01015367117551357e-10, + -4.23170195289068592e-10, + 2.73061740124667545e-11, + 2.36176464496476580e-13, + -6.04387249440426518e-14, + 2.20544740326546077e-16, + 1.37166592124359268e-16, + -2.46447108873967405e-18, + -2.77725233330625300e-19, + 9.47166700096097677e-21, + 1.07119953890115263e-01, + -1.45129837325641900e-03, + 3.29640000198776862e-05, + -9.47754572941666236e-07, + 2.51225402844813010e-08, + -3.51182285193807762e-10, + -1.05911542409622987e-12, + -3.20242502648924274e-13, + 3.14745585082977505e-14, + -2.48275418732564103e-16, + -5.73625756079256988e-17, + 1.21341716914599319e-18, + 1.14691535378054129e-19, + -4.49282222661843239e-21, + 2.13741746233564803e-02, + -3.28609003139971679e-04, + 1.15839270419622763e-05, + -5.35585889036040785e-07, + 1.81699145968039288e-08, + -2.62013768159612059e-10, + -1.01115641246472250e-12, + -4.12551391096878912e-13, + 3.56021311293712660e-14, + -2.51610420248146338e-16, + -6.08697154173000288e-17, + 9.78573559960934696e-19, + 1.36890115927135037e-19, + -4.34572285475166821e-21, + 1.63966640089349518e-03, + -3.09844765729363878e-05, + 1.65360616387197632e-06, + -9.74523412595765662e-08, + 3.89940513103535829e-09, + -8.81267448792926984e-11, + 1.75563101070566213e-12, + -1.51748627318021371e-13, + 8.90997965720380732e-15, + -1.05565912600368133e-16, + -9.07808930348876193e-18, + 4.83513898946622672e-20, + 2.99663243868373419e-20, + -7.38308476442129070e-22, + 3.70050128506496306e-05, + -9.68401276935603463e-07, + 7.51696745477638715e-08, + -5.31217610925737999e-09, + 2.61200094520583381e-10, + -9.52884335261294353e-12, + 3.74147305892450964e-13, + -2.02868657951652835e-14, + 9.34851076636346008e-16, + -2.40122304194274949e-17, + 3.29852472498349021e-19, + -2.97754645444299398e-20, + 2.49524174642848321e-21, + -5.22066156205835057e-23, + 1.23934966404469628e-07, + -5.85482899720777019e-09, + 6.72063254775882834e-10, + -6.06731556606302530e-11, + 4.20157809356675997e-12, + -2.54544855970303012e-13, + 1.51586459046947379e-14, + -8.77917787277270625e-16, + 4.54959462446185659e-17, + -2.07198628760959539e-18, + 9.05459722428778407e-20, + -4.11854789978851776e-21, + 1.78061111941925434e-22, + -6.24125946196110806e-24, +# root=6 base[10]=25.0 */ + 2.22534719670072545e-01, + -2.61682830114286355e-03, + 4.23474946457848758e-05, + -5.17758048219361534e-07, + -1.95991272826744546e-09, + 1.29858005948501884e-10, + 1.35800214845558701e-11, + -8.70579810036109265e-13, + 3.60683448788004110e-16, + 1.78339507023897816e-15, + -5.28827416341216384e-17, + -2.20678287404387531e-18, + 1.75965538079174771e-19, + -5.46026901253224954e-22, + 1.01779077585325367e-01, + -1.22679561634927818e-03, + 2.37625640879455607e-05, + -6.04597343334899567e-07, + 1.76259146164467736e-08, + -3.90674459402535065e-10, + 4.86107030979253787e-13, + 2.63058729666080511e-13, + 1.76305441454920792e-15, + -8.11431544424064951e-16, + 2.46803830626302409e-17, + 8.69293810410620527e-19, + -7.53214008603649586e-20, + 4.21903936111385676e-22, + 2.02108047811700303e-02, + -2.57121216723999282e-04, + 6.71833648328150632e-06, + -2.89964128074001221e-07, + 1.23312927571919826e-08, + -3.17701860027694071e-10, + -4.45194322079288534e-13, + 2.70302616602350714e-13, + 3.17426317307539027e-15, + -9.17717049843597863e-16, + 2.61224083298096617e-17, + 1.04756013882094449e-18, + -8.29259582687961331e-20, + 1.47228940636669200e-22, + 1.53611311361928323e-03, + -2.14968214713900962e-05, + 8.05079469318421906e-07, + -4.78040559909802642e-08, + 2.35794423900825687e-09, + -7.03162243245831009e-11, + 5.43188791552188525e-13, + 2.42331916026587020e-14, + 1.52439183341888744e-15, + -1.98035687584291412e-16, + 5.26164444135150548e-18, + 2.02830460485069456e-19, + -1.53049342159598694e-20, + -5.16828335119342879e-23, + 3.40146805868908841e-05, + -5.63041441816585743e-07, + 3.13877584022151221e-08, + -2.31163457304102912e-09, + 1.28710623520536945e-10, + -4.72462672980063675e-12, + 1.06513161241952157e-13, + -2.61389891596599285e-15, + 2.21045693916182990e-16, + -1.44440016326402801e-17, + 3.92232047021852543e-19, + 5.96549144551101263e-21, + -5.67657041788294079e-22, + -1.30466150456950740e-23, + 1.07883393260773847e-07, + -2.53823072885832405e-09, + 2.26120548344582579e-10, + -2.04979567131048707e-11, + 1.38467349452840583e-12, + -7.17077947572908031e-14, + 3.24830019133839474e-15, + -1.58630708606171548e-16, + 8.64903610358744872e-18, + -4.29391974673922055e-19, + 1.65177824743978270e-20, + -4.92086624401272031e-22, + 1.67865225717233249e-23, + -9.59491724475856444e-25, +# root=6 base[11]=27.5 */ + 2.12705221774807274e-01, + -2.30316030350787406e-03, + 3.60680543945171643e-05, + -5.18299460046831210e-07, + 2.11948107537401027e-09, + 2.07079533645816306e-10, + -4.34320944786676028e-12, + -3.01180586094298760e-13, + 2.18623254842455126e-14, + -3.56523688481874264e-16, + -2.56784659043985715e-17, + 1.68483488581179303e-18, + -2.02321200279242809e-20, + -2.27182234285979365e-21, + 9.72121519475128981e-02, + -1.06149930897583345e-03, + 1.79502062385903494e-05, + -3.82108964481341268e-07, + 1.04717947304480271e-08, + -3.03622345515593034e-10, + 5.76756343608651563e-12, + 6.32076170076985846e-14, + -8.34774135462088369e-15, + 1.38101685595287537e-16, + 1.11908377849713813e-17, + -7.28574682697152065e-19, + 9.42456291048072079e-21, + 9.24432421577882370e-22, + 1.92718850861829175e-02, + -2.14412868608896025e-04, + 4.21784427678955475e-06, + -1.41606952108219116e-07, + 6.44320695426944308e-09, + -2.48351279709835319e-10, + 5.22994375024065379e-12, + 7.39225354143761191e-14, + -8.87278979864104706e-15, + 1.36390045990721043e-16, + 1.29376168173304896e-17, + -8.14545625158537689e-19, + 9.54657459243163929e-21, + 1.10068450449908464e-21, + 1.46014591497074602e-03, + -1.68103940281238565e-05, + 4.14396677374417806e-07, + -2.03575435751236047e-08, + 1.14350421704649270e-09, + -4.85514014082814392e-11, + 1.16505670550427527e-12, + 5.39286051364387369e-15, + -1.36821934333636719e-15, + 1.60191501333161048e-17, + 2.74699396731475089e-18, + -1.61118647345921606e-19, + 1.74587707837262100e-21, + 2.23300468758020360e-22, + 3.21300259487122941e-05, + -3.94250734040924227e-07, + 1.32914449536822773e-08, + -8.84865422396370497e-10, + 5.63538935165501262e-11, + -2.61574465286779942e-12, + 7.63807484421234964e-14, + -7.91023551657400346e-16, + -2.29172921416654516e-17, + -7.18373835654105011e-19, + 1.79321713023891506e-19, + -9.08184453407953996e-21, + 1.07986396667358160e-22, + 1.09462257959049034e-23, + 1.00206203303379593e-07, + -1.42374363595991668e-09, + 7.63733501485559886e-11, + -6.67331325490090561e-12, + 4.85140965273366494e-13, + -2.63591574608127959e-14, + 1.06969461731448771e-15, + -3.46095822308372676e-17, + 1.21539742889179082e-18, + -6.55255400049623026e-20, + 3.81729839065123128e-21, + -1.64873541299350593e-22, + 4.20618208355673545e-24, + -1.84464823871358904e-26, +# root=6 base[12]=30.0 */ + 2.04031449925086705e-01, + -2.03864890709769091e-03, + 3.01654238269362339e-05, + -4.58559642677450092e-07, + 4.87824491672676101e-09, + 6.48642377723334902e-11, + -5.61534021180903146e-12, + 1.12591931625598179e-13, + 4.13865904663402386e-15, + -3.83932971997865546e-16, + 1.15957611565295280e-17, + 6.27832780195026035e-20, + -2.09242487500923399e-20, + 8.60789544856893511e-22, + 9.32277933206452913e-02, + -9.33802155704284063e-04, + 1.41946679796442031e-05, + -2.55482028041275446e-07, + 5.79726648960728490e-09, + -1.67805737775807037e-10, + 4.85550504417387669e-12, + -8.86639428763574138e-14, + -1.16846038969691470e-15, + 1.55934531704635577e-16, + -4.83201884352635887e-18, + -2.84740659785654948e-20, + 8.90057072030791585e-21, + -3.65313400850289203e-22, + 1.84729910922195213e-02, + -1.86046457107522366e-04, + 2.99599560666382622e-06, + -7.12246092998118135e-08, + 2.76052821244734192e-09, + -1.23478178257979970e-10, + 4.43117213055531915e-12, + -8.86704075292012404e-14, + -1.24640454795432972e-15, + 1.68134257915583615e-16, + -5.24147715709339537e-18, + -3.55452984783299836e-20, + 1.01157547430522899e-20, + -4.13704874049837837e-22, + 1.39834168130508027e-03, + -1.42253442316884489e-05, + 2.52711099814696148e-07, + -8.33631067286328695e-09, + 4.42792271912641504e-10, + -2.27342478716691464e-11, + 8.72555478972469948e-13, + -1.93326235915072709e-14, + -1.30394120391843243e-16, + 2.86976439307023357e-17, + -9.16550123363206918e-19, + -8.93531514485037408e-21, + 2.00896384041025550e-21, + -8.14650337112295882e-23, + 3.07155966834422048e-05, + -3.18436689416308215e-07, + 6.65516022469341385e-09, + -3.11100707882137993e-10, + 2.01716616626763468e-11, + -1.12253650378554964e-12, + 4.60934470133910528e-14, + -1.19502177420338412e-15, + 5.98586367863862200e-18, + 9.42892356075460953e-19, + -3.13580124186392977e-20, + -7.80159302953971192e-22, + 1.07954279044569545e-22, + -4.29735015376456050e-24, + 9.53692199992405978e-08, + -1.03350756837758057e-09, + 2.92339832156963313e-11, + -2.00399223567011079e-12, + 1.52541560014466923e-13, + -9.33558225026451267e-15, + 4.34843817304162110e-16, + -1.48799734170480102e-17, + 3.48705305119131060e-19, + -5.65657432937246181e-21, + 2.27948744002431492e-22, + -2.20616990780280009e-23, + 1.41067155117544406e-24, + -5.49438743446810182e-26, +# root=6 base[13]=32.5 */ + 1.96326601087425251e-01, + -1.81795253457434037e-03, + 2.51533931595432631e-05, + -3.76243473565999894e-07, + 5.11772268848147938e-09, + -2.67852916388575571e-11, + -2.07878219514763353e-12, + 1.06865143025256184e-13, + -2.34991057547728476e-15, + -2.81639718586678100e-17, + 4.60487905631852443e-18, + -1.90126436842051415e-19, + 3.21348016299546145e-21, + 9.14080295528672377e-23, + 8.97022191839739053e-02, + -8.31149329751513415e-04, + 1.15928087048302952e-05, + -1.84109634878487643e-07, + 3.40081190736685167e-09, + -8.13946358191546307e-11, + 2.43954831646046310e-12, + -7.09016501268228192e-14, + 1.38115123450353704e-15, + 7.27893634206102777e-18, + -1.91612048778581254e-18, + 8.02636060822499044e-20, + -1.33897823769861146e-21, + -3.95270164668887961e-23, + 1.77721827444455548e-02, + -1.64900870228696771e-04, + 2.34115896831428601e-06, + -4.19020157731475025e-08, + 1.14861760654906102e-09, + -4.72432847224344849e-11, + 2.02369289178028918e-12, + -6.94461965445986206e-14, + 1.47112460744017386e-15, + 6.46626559412313758e-18, + -2.06119877724492153e-18, + 8.84277450833473510e-20, + -1.50281164527314841e-21, + -4.41904113471381837e-23, + 1.34498279281495907e-03, + -1.25114359374233509e-05, + 1.83362874202136040e-07, + -3.93407947279241207e-09, + 1.54375005911741884e-10, + -8.05437521495743800e-12, + 3.79201849141792842e-13, + -1.36667269775964884e-14, + 3.10728094980673076e-16, + 9.82159116623477464e-21, + -3.58679231958696435e-19, + 1.62320314998813524e-20, + -2.79824805622561345e-22, + -8.65629796691126143e-24, + 2.95306114285872142e-05, + -2.76011079991821045e-07, + 4.28280439319020903e-09, + -1.18529064587527783e-10, + 6.28488638982073460e-12, + -3.73871358382086480e-13, + 1.86261466878929965e-14, + -7.06922153152746964e-16, + 1.79451284791048504e-17, + -1.30175759404888336e-19, + -1.29581948317953815e-20, + 6.75789995531718737e-22, + -1.15295229318197387e-23, + -4.58795211949538967e-25, + 9.15943818392107288e-08, + -8.65460477206468688e-10, + 1.51684066475900291e-11, + -6.11004856595530566e-13, + 4.22904774960527685e-14, + -2.79354343779766858e-15, + 1.49697420653988191e-16, + -6.27330388949792357e-18, + 1.95988221012834968e-19, + -3.92766267365059463e-21, + 1.54504334010729772e-23, + 1.56499215975562950e-24, + 8.34044433647087380e-27, + -6.15065030653207155e-27, +# root=6 base[14]=35.0 */ + 1.89430545484684937e-01, + -1.63344696195144427e-03, + 2.11057191217018011e-05, + -3.00494174416677331e-07, + 4.28107245185564192e-09, + -4.92825001717241998e-11, + -1.18335027041126256e-13, + 3.76349002239133096e-14, + -1.60769193762311766e-15, + 3.85657989156692476e-17, + -1.20917739803204397e-19, + -3.76949253183923671e-20, + 1.99743894127344758e-21, + -5.59045279749672421e-23, + 8.65502796501378818e-02, + -7.46425141691508349e-04, + 9.66492580839525608e-06, + -1.40124635328985709e-07, + 2.22300210201168601e-09, + -4.18129953184992960e-11, + 1.04082616375236349e-12, + -3.16557843351382560e-14, + 9.23063280865635270e-16, + -1.96719087461431504e-17, + 8.41211019337880345e-20, + 1.59487989382111009e-20, + -8.50924948832740504e-22, + 2.35681625404124074e-23, + 1.71472177004048931e-02, + -1.47928033777847460e-04, + 1.92439079548154449e-06, + -2.90110950171153443e-08, + 5.58799314334437474e-10, + -1.68802615009917442e-11, + 6.96975616457905464e-13, + -2.83575960651389482e-14, + 9.43026110931084610e-16, + -2.15837452125573027e-17, + 1.19201599520054192e-19, + 1.68085066949718948e-20, + -9.34281731767230752e-22, + 2.65152106405476288e-23, + 1.29761835834521630e-03, + -1.12009749412398167e-05, + 1.46951454857113919e-07, + -2.36891837738081029e-09, + 5.88449021737156961e-11, + -2.49088571154660331e-12, + 1.22848354729527188e-13, + -5.35373192966712986e-15, + 1.84793374248334182e-16, + -4.43804903865919385e-18, + 3.53937710849729879e-20, + 2.85253996518533271e-21, + -1.72017318607757708e-22, + 5.04570382804422422e-24, + 2.84879112924540481e-05, + -2.46167977349756216e-07, + 3.27997563062785806e-09, + -5.91447820572150715e-11, + 1.98243370495247914e-12, + -1.06153189042398858e-13, + 5.73564349395024664e-15, + -2.60827826270753192e-16, + 9.37191510928468737e-18, + -2.42530298676015645e-19, + 2.95076287418667057e-21, + 9.66700444154023598e-23, + -7.31984090946823839e-24, + 2.29453782649296123e-25, + 8.83407304533530603e-08, + -7.65166731159709150e-10, + 1.05488095267652554e-11, + -2.34697035819993708e-13, + 1.12527980216194452e-14, + -7.23299869331184262e-16, + 4.21318237760004839e-17, + -2.03035607021430774e-18, + 7.88395667037039591e-20, + -2.36432204664954833e-21, + 4.78506719956893201e-23, + -2.26139014420048425e-25, + -2.71460214777288397e-26, + 1.09463443554744648e-27, +# root=6 base[15]=37.5 */ + 1.83213157219807243e-01, + -1.47793498081207173e-03, + 1.78785071721924207e-05, + -2.39767190574388930e-07, + 3.32747255790674348e-09, + -4.40959248353651779e-11, + 4.05117729377374263e-13, + 5.53478517351237896e-15, + -5.16062304605399082e-16, + 1.99439924719061234e-17, + -5.05462484118614544e-19, + 5.93305195975484954e-21, + 1.92562911029201297e-22, + -1.48427741060601401e-23, + 8.37093478046417178e-02, + -6.75283079177584349e-04, + 8.17294193421432982e-06, + -1.10138713279752148e-07, + 1.57938032804617479e-09, + -2.47397799760525581e-11, + 4.71274532007298856e-13, + -1.19859066458198495e-14, + 3.63407679769915549e-16, + -1.05549000759445199e-17, + 2.41132422876206526e-19, + -2.73295690111998487e-21, + -8.33769805149129464e-23, + 6.39468592594217627e-24, + 1.65842777905757556e-02, + -1.33794321293429077e-04, + 1.62109646511790086e-06, + -2.20795756501512395e-08, + 3.38929727159434297e-10, + -6.93217653668077098e-12, + 2.20467003602996602e-13, + -8.85652172474998659e-15, + 3.41580006375875103e-16, + -1.10410628220131212e-17, + 2.67501435642215710e-19, + -3.32736798121984864e-21, + -8.22944420675851271e-23, + 6.92123148543592679e-24, + 1.25500430215113603e-03, + -1.01260213396333864e-05, + 1.22934282405183449e-07, + -1.70645444148423867e-09, + 2.92441937678372966e-11, + -8.07125487124570705e-13, + 3.45160600661160514e-14, + -1.58934245677860826e-15, + 6.46269434957736211e-17, + -2.15122418156969520e-18, + 5.39192860866149005e-20, + -7.48971876094339133e-22, + -1.23739324190230598e-23, + 1.25366102675664610e-24, + 2.75518212516570395e-05, + -2.22350843476988304e-07, + 2.70919381210028110e-09, + -3.88987711147992443e-11, + 7.88633244982600690e-13, + -2.93855339835069357e-14, + 1.50539389618877442e-15, + -7.41763800447567412e-17, + 3.11959703998805326e-18, + -1.07200444696012155e-19, + 2.83024722393144603e-21, + -4.63782399141004650e-23, + -2.49871782181194749e-25, + 5.16620047469521000e-26, + 8.54342328508637898e-08, + -6.89801676966465313e-10, + 8.47088629524659081e-12, + -1.30523881110805836e-13, + 3.47881597561554612e-15, + -1.75487069995342568e-16, + 1.02467152697940025e-17, + -5.34951972468915106e-19, + 2.35879290048154877e-20, + -8.61784359481772183e-22, + 2.52738577157001204e-23, + -5.42662984871681915e-25, + 5.39431063431365743e-27, + 1.73138118069044914e-28, +# root=6 base[16]=40.0 */ + 1.76022446455379983e-01, + -2.09683890658592977e-03, + 3.74642734440892023e-05, + -7.43464672719161699e-07, + 1.54488400994005441e-08, + -3.25070776020737861e-10, + 6.46853172698656097e-12, + -8.98362798477311900e-14, + -1.74279376993770363e-15, + 2.58270519433866733e-16, + -1.62141000630941990e-17, + 7.36650503671982647e-19, + -2.36753250447090994e-20, + 3.08804959097316361e-22, + 8.04238973768299642e-02, + -9.58040646175089736e-04, + 1.71185964908443390e-05, + -3.39983373278921449e-07, + 7.10818278336533193e-09, + -1.55062439629888935e-10, + 3.65715809971408576e-12, + -1.03718604344980433e-13, + 3.91612883002722143e-15, + -1.81051836453672367e-16, + 8.45884676053157650e-18, + -3.44485273553426133e-19, + 1.05065857264614835e-20, + -1.28292131313646367e-22, + 1.59333537654981414e-02, + -1.89806021184870581e-04, + 3.39206797186118143e-06, + -6.74865109002212529e-08, + 1.43000078917250323e-09, + -3.35910711436588108e-11, + 1.03355010430370019e-12, + -4.82484760710756096e-14, + 2.86798189263383278e-15, + -1.69399917565999497e-16, + 8.81671175849950045e-18, + -3.78604225354044751e-19, + 1.20576386019657163e-20, + -1.70839146198848597e-22, + 1.20574345610716636e-03, + -1.43636485922292318e-05, + 2.56770496540299383e-07, + -5.12464477760214898e-09, + 1.11182167982735689e-10, + -2.93575664676932544e-12, + 1.20856142382324406e-13, + -7.50091265318619278e-15, + 5.10310046086191352e-16, + -3.17444308200071517e-17, + 1.69465024246810297e-18, + -7.43693498358197887e-20, + 2.45387261521889097e-21, + -4.07076019560555589e-23, + 2.64702673240697160e-05, + -3.15341237416017165e-07, + 5.64009204945927446e-09, + -1.13202350849068115e-10, + 2.55918949858014230e-12, + -8.02976103252864129e-14, + 4.38783353884191699e-15, + -3.23269508436706322e-16, + 2.34737613398323706e-17, + -1.50449405100713331e-18, + 8.22410202319716188e-20, + -3.72051257069590505e-21, + 1.29963736358663559e-22, + -2.67757080920812446e-24, + 8.20798114083532145e-08, + -9.77878801943505898e-10, + 1.75091476810250376e-11, + -3.55651792716726237e-13, + 8.73259854629563561e-15, + -3.57673472249479636e-16, + 2.57594713273001116e-17, + -2.14231847616843653e-18, + 1.63776811610110542e-19, + -1.08955020149764868e-20, + 6.21441718918669615e-22, + -2.99018952509532349e-23, + 1.16821695026344758e-24, + -3.30516336223499040e-26, +# root=6 base[17]=44.0 */ + 1.68183360433110274e-01, + -1.82905267513910940e-03, + 2.98361236353812165e-05, + -5.40751894605543175e-07, + 1.02878078525515759e-08, + -2.00953660128172264e-10, + 3.95940192631831887e-12, + -7.56037755356436447e-14, + 1.19707478341228773e-15, + -1.19747695079286667e-18, + -1.34353505173659513e-18, + 9.64492075919426464e-20, + -4.89471403230059585e-21, + 1.98726691640230108e-22, + 7.68422464323693932e-02, + -8.35686440651392309e-04, + 1.36320722538970887e-05, + -2.47085176269074463e-07, + 4.70361306915362536e-09, + -9.22555864971366318e-11, + 1.85964491657280787e-12, + -3.94398016738695834e-14, + 9.52552245195648408e-16, + -2.96106279447245938e-17, + 1.19710364872732357e-18, + -5.40299804058121863e-20, + 2.34458106181438092e-21, + -8.91954487788058123e-23, + 1.52237645230947558e-02, + -1.65563886873879078e-04, + 2.70078027969769275e-06, + -4.89596116758551935e-08, + 9.33239901363264729e-10, + -1.84694787653159533e-11, + 3.90533315152703648e-13, + -9.95794883415828092e-15, + 3.66851751748371126e-16, + -1.86740257150183225e-17, + 1.03850812611391838e-18, + -5.43364343223918980e-20, + 2.51614470246124449e-21, + -9.91110807896803843e-23, + 1.15204550335268829e-03, + -1.25289199726821229e-05, + 2.04383733984038167e-07, + -3.70602581040914837e-09, + 7.08072414595315969e-11, + -1.42364306600641168e-12, + 3.25563793462789928e-14, + -1.04627770066821620e-15, + 5.22151224027538354e-17, + -3.18287944130097581e-18, + 1.90191048569668221e-19, + -1.02487228396715379e-20, + 4.82783443250706108e-22, + -1.93315274630519432e-23, + 2.52913958801559194e-05, + -2.75053757223080091e-07, + 4.48710441208753084e-09, + -8.14007585209271716e-11, + 1.56168035610638306e-12, + -3.22735401930560150e-14, + 8.33480180954014905e-16, + -3.46447560935726120e-17, + 2.13138658122861772e-18, + -1.42000185524045277e-19, + 8.78786085839031439e-21, + -4.83112831369693237e-22, + 2.31845063221977138e-23, + -9.50979933631602001e-25, + 7.84242383182626155e-08, + -8.52897150735796431e-10, + 1.39148194425702027e-11, + -2.52668258937560172e-13, + 4.88895317966430430e-15, + -1.06724485811971749e-16, + 3.37044131105188071e-18, + -1.86008899490016394e-19, + 1.33694974168836275e-20, + -9.46776011972762227e-22, + 6.05468712375227267e-23, + -3.42676806257338791e-24, + 1.70272470064289983e-25, + -7.33292787804619563e-27, +# root=6 base[18]=48.0 */ + 1.61307016637013578e-01, + -1.61379666528636118e-03, + 2.42170403098847183e-05, + -4.03781290902274213e-07, + 7.06886093222566027e-09, + -1.27266038650651576e-10, + 2.33125662587023275e-12, + -4.30267596613683963e-14, + 7.82847463281512324e-16, + -1.30014863615768861e-17, + 1.30796920152294419e-19, + 4.16359452697477047e-21, + -4.16338774293540938e-22, + 2.28856932274206999e-23, + 7.37004744903655556e-02, + -7.37336690210967376e-04, + 1.10646643609239736e-05, + -1.84486868303690191e-07, + 3.22990544856835453e-09, + -5.81725747559590797e-11, + 1.06818509835092287e-12, + -1.99696288416787020e-14, + 3.85082523315025870e-16, + -8.05168142897450998e-18, + 2.03247007980652377e-19, + -6.74862269133794984e-21, + 2.73720634345840688e-22, + -1.16169124511624575e-23, + 1.46013255654887739e-02, + -1.46079024490879751e-04, + 2.19210111195445669e-06, + -3.65504179163510568e-08, + 6.39974666682645541e-10, + -1.15359338645990285e-11, + 2.12946959344114975e-13, + -4.09151701438469758e-15, + 8.82330629605201067e-17, + -2.51745906809788173e-18, + 1.03114777308287738e-19, + -5.13813221720930085e-21, + 2.58842896508643615e-22, + -1.20811865638002782e-23, + 1.10494294169450908e-03, + -1.10544070520782889e-05, + 1.65885620403789293e-07, + -2.76597663166226750e-09, + 4.84395594866998895e-11, + -8.74437117318014863e-13, + 1.62919189599803898e-14, + -3.27833867877755647e-16, + 8.29211900713982360e-18, + -3.15815538853936349e-19, + 1.63863543590426399e-20, + -9.11063145436649358e-22, + 4.79005891359860624e-23, + -2.27929720459596975e-24, + 2.42573304601999097e-05, + -2.42682604945716385e-07, + 3.64177337695103883e-09, + -6.07248674675337750e-11, + 1.06379999370846625e-12, + -1.92533188699384440e-14, + 3.64528828254193568e-16, + -7.90653196937845965e-18, + 2.45404919728434115e-19, + -1.18885070155046803e-20, + 7.02254319008091658e-22, + -4.10624118369304789e-23, + 2.20784598170358639e-24, + -1.06647846209422064e-25, + 7.52177757747004728e-08, + -7.52516824948013791e-10, + 1.12925602575747241e-11, + -1.88310143909861099e-13, + 3.30104540388914570e-15, + -6.00553628923540282e-17, + 1.17392193703402004e-18, + -2.90752738835455207e-20, + 1.17363778788041462e-21, + -6.96345932771089427e-23, + 4.48283961291409845e-24, + -2.72010360158254874e-25, + 1.49851638893692462e-26, + -7.41187402427848537e-28, +# root=6 base[19]=52.0 */ + 1.55211097268809189e-01, + -1.43769465338954082e-03, + 1.99751192021575959e-05, + -3.08365955102649639e-07, + 4.99839802351946273e-09, + -8.33341865046186094e-11, + 1.41495729619003409e-12, + -2.43237211077573203e-14, + 4.21009457613781462e-16, + -7.25449783830464458e-18, + 1.19946924578590118e-19, + -1.64324715518946091e-21, + 2.67617149388533620e-24, + 1.26890073923994052e-24, + 7.09152754208112746e-02, + -6.56876435954993924e-04, + 9.12654528676906351e-06, + -1.40891109374261414e-07, + 2.28375484244401570e-09, + -3.80763084568028812e-11, + 6.46647716022548708e-13, + -1.11303888194485231e-14, + 1.93922105485744721e-16, + -3.44124121772503037e-18, + 6.39139548706012277e-20, + -1.33721795091965273e-21, + 3.51973001479824861e-23, + -1.19462121332642370e-24, + 1.40495299467594814e-02, + -1.30138466203449536e-04, + 1.80812492289597100e-06, + -2.79129599832581659e-08, + 4.52454595870241950e-10, + -7.54412087767157898e-12, + 1.28181020969793899e-13, + -2.21246663662635080e-15, + 3.90970866008589137e-17, + -7.36747710466151369e-19, + 1.66239440368431530e-20, + -5.20478435847513759e-22, + 2.18157150831450046e-23, + -1.01406775932328358e-24, + 1.06318627476281128e-03, + -9.84811819409311129e-06, + 1.36828331918004510e-07, + -2.11229217359827155e-09, + 3.42396035903350150e-11, + -5.70968200407306996e-13, + 9.70916808333961770e-15, + -1.68405867756013308e-16, + 3.04927724761509317e-18, + -6.31297383980310182e-20, + 1.79154566220730017e-21, + -7.39495951954231252e-23, + 3.66783101657923581e-24, + -1.82951990034130693e-25, + 2.33406267363260079e-05, + -2.16200356808104251e-07, + 3.00385690767043615e-09, + -4.63722372715170368e-11, + 7.51696388598217218e-13, + -1.25375081295571887e-14, + 2.13499264923789777e-16, + -3.73455215646953565e-18, + 7.04276806518660206e-20, + -1.67126955296730679e-21, + 6.01040105570436667e-23, + -2.97901789599406346e-24, + 1.60285079943533089e-25, + -8.25684020201717286e-27, + 7.23752362515929063e-08, + -6.70399823720297750e-10, + 9.31444172509124092e-12, + -1.43792849221312109e-13, + 2.33099102297127837e-15, + -3.88935641798532913e-17, + 6.64172273668306951e-19, + -1.18126319433066482e-20, + 2.40228586074958369e-22, + -6.99061096305730983e-24, + 3.19647223441576355e-25, + -1.80557730940657757e-26, + 1.02415526107601992e-27, + -5.41393516562440192e-29, +# root=6 base[20]=56.0 */ + 1.49758250952601563e-01, + -1.29145143001406200e-03, + 1.67049772529205251e-05, + -2.40086917181961114e-07, + 3.62309132190676653e-09, + -5.62371851906622633e-11, + 8.89064630993442439e-13, + -1.42372565337954255e-14, + 2.30123616007187252e-16, + -3.74237408384484610e-18, + 6.08824228567058219e-20, + -9.74034190896655658e-22, + 1.44355894838251842e-23, + -1.50749414895907873e-25, + 6.84238936493710842e-02, + -5.90058542629264514e-04, + 7.63243147455660526e-06, + -1.09694670449135248e-07, + 1.65537505188425085e-09, + -2.56945842248959818e-11, + 4.06217316372064631e-13, + -6.50576773040551278e-15, + 1.05221244775344084e-16, + -1.71648949157834207e-18, + 2.83122936687004875e-20, + -4.78396265967184717e-22, + 8.63013867257197469e-24, + -1.81526665839252030e-25, + 1.35559445715016484e-02, + -1.16900697575553428e-04, + 1.51211532590085035e-06, + -2.17323927554731540e-08, + 3.27958297239246189e-10, + -5.09056223834694788e-12, + 8.04818513603041684e-14, + -1.28926005091808772e-15, + 2.08800847376378051e-17, + -3.42921677657868808e-19, + 5.82333499023892130e-21, + -1.09228268384310124e-22, + 2.59256394258035956e-24, + -8.49408520680878446e-26, + 1.02583461965432068e-03, + -8.84636124162078200e-06, + 1.14428046530115536e-07, + -1.64458051978375241e-09, + 2.48179877750431431e-11, + -3.85227311135227800e-13, + 6.09082422947959306e-15, + -9.76107344706993304e-17, + 1.58458220927228265e-18, + -2.63297349119778696e-20, + 4.69215963666540286e-22, + -1.01972646748543891e-23, + 3.14602972874534842e-25, + -1.30226732839296487e-26, + 2.25206283387847854e-05, + -1.94208315747325462e-07, + 2.51209256814541167e-09, + -3.61042513147748466e-11, + 5.44841722740046858e-13, + -8.45720022820752205e-15, + 1.33730801680054952e-16, + -2.14466851779310458e-18, + 3.49573906242145293e-20, + -5.92456803201487455e-22, + 1.13915667251654132e-23, + -2.98080609610519408e-25, + 1.14838995312406217e-26, + -5.42519798523527368e-28, + 6.98325633986986237e-08, + -6.02206311642228899e-10, + 7.78956355222262927e-12, + -1.11953047266428878e-13, + 1.68946445307429787e-15, + -2.62250526196824545e-17, + 4.14772427935432818e-19, + -6.66095711118523578e-21, + 1.09433023458638134e-22, + -1.92562890554634089e-24, + 4.20769958941287205e-26, + -1.38854912414465567e-27, + 6.45661124357068885e-29, + -3.32610694914451817e-30, +# root=6 base[21]=60.0 */ + 1.44842765564677706e-01, + -1.16842886872401590e-03, + 1.41380524051439374e-05, + -1.90078077465476082e-07, + 2.68326044581293689e-09, + -3.89607749476972683e-11, + 5.76183462030275769e-13, + -8.63169639571024468e-15, + 1.30550302412348497e-16, + -1.98890301189516228e-18, + 3.04616073563424165e-20, + -4.67651824516429016e-22, + 7.14103073361860493e-24, + -1.05760257333572785e-25, + 6.61780297501618903e-02, + -5.33850069308153068e-04, + 6.45961466611690791e-06, + -8.68458471366894354e-08, + 1.22597004561330185e-09, + -1.78010111515475481e-11, + 2.63256045802782450e-13, + -3.94382129051804656e-15, + 5.96514567540374266e-17, + -9.09031401069817432e-19, + 1.39417374566357677e-20, + -2.15337280658185149e-22, + 3.36835054623956086e-24, + -5.44159503376394121e-26, + 1.31110004896905687e-02, + -1.05764836858522108e-04, + 1.27976023733697245e-06, + -1.72056489279595196e-08, + 2.42885658241221779e-10, + -3.52668608451633889e-12, + 5.21556692538535262e-14, + -7.81354264404337823e-16, + 1.18195166486084814e-17, + -1.80228052560584968e-19, + 2.77240980775584066e-21, + -4.33813742068406621e-23, + 7.12923042169702085e-25, + -1.34151643669865552e-26, + 9.92163853257411023e-04, + -8.00366441598548758e-06, + 9.68447716518320682e-08, + -1.30202290898336727e-09, + 1.83801672782423178e-11, + -2.66879121035695535e-13, + 3.94685446360870872e-15, + -5.91303904147410351e-17, + 8.94634715371738793e-19, + -1.36561844427932742e-20, + 2.11162221635995854e-22, + -3.37812259915731782e-24, + 6.00047559836792338e-26, + -1.36604731054249265e-27, + 2.17814382184216266e-05, + -1.75708197216730983e-07, + 2.12607867563731718e-09, + -2.85839195033678277e-11, + 4.03508461945054337e-13, + -5.85892763363229856e-15, + 8.66478288439480921e-17, + -1.29819421343836710e-18, + 1.96479137799949125e-20, + -3.00459927450410734e-22, + 4.68704387365303119e-24, + -7.77641556052877639e-26, + 1.54732990595185845e-27, + -4.33852677707172229e-29, + 6.75404630107287641e-08, + -5.44840651751612594e-10, + 6.59260131449487646e-12, + -8.86337788840696495e-14, + 1.25120996187861375e-15, + -1.81675488493876351e-17, + 2.68683899148061274e-19, + -4.02593001539597398e-21, + 6.09698015535911862e-23, + -9.35617597984871642e-25, + 1.48427617468548742e-26, + -2.63006257502592752e-28, + 6.20641553863837926e-30, + -2.17313649376180227e-31, +# root=6 base[22]=64.0 */ + 1.40381770978469017e-01, + -1.06377306549716570e-03, + 1.20912223871463973e-05, + -1.52702743705185033e-07, + 2.02493897422011377e-09, + -2.76191989032476858e-11, + 3.83688599083309502e-13, + -5.39946010707477475e-15, + 7.67144084157129567e-17, + -1.09800544483322131e-18, + 1.58072969943632143e-20, + -2.28603212500891183e-22, + 3.31585603245028906e-24, + -4.80615280427210786e-26, + 6.41398207219741057e-02, + -4.86033287899767421e-04, + 5.52442693105578428e-06, + -6.97692195872225127e-08, + 9.25185812665587182e-10, + -1.26190919781441774e-11, + 1.75305665713016969e-13, + -2.46699135755547983e-15, + 3.50506307324304627e-17, + -5.01687267355063232e-19, + 7.22334202358359462e-21, + -1.04523390639337394e-22, + 1.51992184473911315e-24, + -2.22519330190525986e-26, + 1.27071963923551991e-02, + -9.62915139619247132e-05, + 1.09448353890419630e-06, + -1.38224766695883435e-08, + 1.83295146533456201e-10, + -2.50005816922921354e-12, + 3.47310588069160376e-14, + -4.88753863594003346e-16, + 6.94419458874984010e-18, + -9.93985552920950632e-20, + 1.43152080847323005e-21, + -2.07403132122884934e-23, + 3.03237537205122992e-25, + -4.53448400770920542e-27, + 9.61606320330054306e-04, + -7.28677873237754184e-06, + 8.28241144639108306e-08, + -1.04600421051717632e-09, + 1.38707049442773475e-11, + -1.89189789180593289e-13, + 2.62824418414466132e-15, + -3.69861189530958520e-17, + 5.25504493242364260e-19, + -7.52265037767544936e-21, + 1.08388562442090190e-22, + -1.57376973151050306e-24, + 2.32258515445137943e-26, + -3.59778895938605082e-28, + 2.11105943720328160e-05, + -1.59970069711313395e-07, + 1.81827661458517323e-09, + -2.29634208291327014e-11, + 3.04510089780339476e-13, + -4.15337233965594093e-15, + 5.76991038177153586e-17, + -8.11976722112848409e-19, + 1.15369589479346301e-20, + -1.65176040915155288e-22, + 2.38171600896250746e-24, + -3.47088739293094719e-26, + 5.20326169413087471e-28, + -8.52411571260265474e-30, + 6.54602925674841943e-08, + -4.96039447341367795e-10, + 5.63816049253027287e-12, + -7.12055861662823933e-14, + 9.44232993478610170e-16, + -1.28788885875216187e-17, + 1.78915072082173629e-19, + -2.51781706588215246e-21, + 3.57759298189342382e-23, + -5.12344959051671467e-25, + 7.39831735438573902e-27, + -1.08569940734619786e-28, + 1.67574423849347678e-30, + -3.01933590679997749e-32, +# root=6 base[23]=68.0 */ + 1.36309258899767999e-01, + -9.73861201703823151e-04, + 1.04364462558011597e-05, + -1.24269302596888179e-07, + 1.55368739107698171e-09, + -1.99800931328276389e-11, + 2.61697812870895120e-13, + -3.47221346581261532e-15, + 4.65123803964489316e-17, + -6.27675961398285301e-19, + 8.52016251087556218e-21, + -1.16204935672588444e-22, + 1.59103972374320176e-24, + -2.18441629093247454e-26, + 6.22791076621849807e-02, + -4.44952948306585091e-04, + 4.76836691228472609e-06, + -5.67781039822294347e-08, + 7.09873012929552802e-10, + -9.12881767437622034e-12, + 1.19568593233620422e-13, + -1.58643929246360406e-15, + 2.12513102966490588e-17, + -2.86782952920417566e-19, + 3.89286843022743046e-21, + -5.30966875248960217e-23, + 7.27149485361501792e-25, + -9.99332606214037772e-27, + 1.23385572846306368e-02, + -8.81527954996635840e-05, + 9.44695107394696992e-07, + -1.12487142927678576e-08, + 1.40637995055402080e-10, + -1.80857504454830211e-12, + 2.36885852381667980e-14, + -3.14300804527661104e-16, + 4.21025087523299645e-18, + -5.68168406505956745e-20, + 7.71262347428988897e-22, + -1.05207135034584756e-23, + 1.44150833014727972e-25, + -1.98534531899614496e-27, + 9.33709868196673748e-04, + -6.67088810858683417e-06, + 7.14890018228123870e-08, + -8.51236923205109475e-10, + 1.06426611161163666e-11, + -1.36862384315748617e-13, + 1.79261364463457349e-15, + -2.37844503199304732e-17, + 3.18607497632670631e-19, + -4.29959605002640485e-21, + 5.83670338293899530e-23, + -7.96322521783609036e-25, + 1.09202783108944742e-26, + -1.50959890888837359e-28, + 2.04981704798889025e-05, + -1.46449134104338233e-07, + 1.56943157260626061e-09, + -1.86876032536150926e-11, + 2.33643329037246480e-13, + -3.00460409436470507e-15, + 3.93540887704467305e-17, + -5.22151306974435042e-19, + 6.99455185271656818e-21, + -9.43921413213443755e-23, + 1.28144757464191118e-24, + -1.74885575627774578e-26, + 2.40174563045905522e-28, + -3.34086931572689788e-30, + 6.35612722723389628e-08, + -4.54113370556025757e-10, + 4.86653516698969122e-12, + -5.79470172575559377e-14, + 7.24487449813965231e-16, + -9.31675633996135382e-18, + 1.22030211036862219e-19, + -1.61910133796411477e-21, + 2.16889617356059318e-23, + -2.92699959840770946e-25, + 3.97406006435355317e-27, + -5.42668779737063224e-29, + 7.47292289890625900e-31, + -1.05169118117257074e-32, +# root=6 base[24]=72.0 */ + 1.32571911948254961e-01, + -8.95940260533929517e-04, + 9.08220358887372628e-06, + -1.02296140967847000e-07, + 1.20980647961315929e-09, + -1.47165729509758238e-11, + 1.82333391302587271e-13, + -2.28838709971075017e-15, + 2.89967049995636781e-17, + -3.70145841797682425e-19, + 4.75274078706590461e-21, + -6.13179600963213828e-23, + 7.94232925198502757e-25, + -1.03197455851735729e-26, + 6.05715300915712768e-02, + -4.09351209118587807e-04, + 4.14961932657323215e-06, + -4.67386619822197236e-08, + 5.52755319796363435e-10, + -6.72393818767816724e-12, + 8.33073336432431595e-14, + -1.04555411714978663e-15, + 1.32484686459536002e-17, + -1.69118045809461184e-19, + 2.17150825954155908e-21, + -2.80160327895671027e-23, + 3.62889948220617245e-25, + -4.71556775775155290e-27, + 1.20002569385940401e-02, + -8.10994815571079551e-05, + 8.22110619311630637e-07, + -9.25972898331790068e-09, + 1.09510290589056618e-10, + -1.33212725141304252e-12, + 1.65046088078899651e-14, + -2.07142168694509777e-16, + 2.62474851237873040e-18, + -3.35051883571832640e-20, + 4.30213664673954197e-22, + -5.55050831795783505e-24, + 7.18982871576847884e-26, + -9.34457239880225969e-28, + 9.08109276148348480e-04, + -6.13713455217570010e-06, + 6.22125245515312593e-08, + -7.00722145150874721e-10, + 8.28709845356048910e-12, + -1.00807601061823065e-13, + 1.24897228837039603e-15, + -1.56753082247839189e-17, + 1.98625631943773370e-19, + -2.53547785715594501e-21, + 3.25561463924187378e-23, + -4.20036855590981454e-25, + 5.44130733485991899e-27, + -7.07432621604846309e-29, + 1.99361486805411321e-05, + -1.34731392045238689e-07, + 1.36578071805595962e-09, + -1.53832817661918849e-11, + 1.81930557523471166e-13, + -2.21307652715432736e-15, + 2.74192742279524802e-17, + -3.44127394662404896e-19, + 4.36052206108295592e-21, + -5.56625747651249901e-23, + 7.14723697507201049e-25, + -9.22151638734556775e-27, + 1.19472644938521173e-28, + -1.55412688995116642e-30, + 6.18185401272247373e-08, + -4.17778684288954163e-10, + 4.23504918011293801e-12, + -4.77008892936679670e-14, + 5.64135112103520900e-16, + -6.86236656437393487e-18, + 8.50224150776725319e-20, + -1.06707940322353648e-21, + 1.35212253013097615e-23, + -1.72600223337819245e-25, + 2.21625335791573420e-27, + -2.85957560502076380e-29, + 3.70562096185004526e-31, + -4.82523928623693443e-33, +# root=6 base[25]=76.0 */ + 1.29126128553008729e-01, + -8.27884704697229691e-04, + 7.96179325303460948e-06, + -8.50761710218040295e-08, + 9.54539004472602780e-10, + -1.10157375881854337e-11, + 1.29479866805233574e-13, + -1.54168155827924583e-15, + 1.85328836624575085e-17, + -2.24438010748719811e-19, + 2.73399028635662284e-21, + -3.34634303893429313e-23, + 4.11209985049867983e-25, + -5.06919649434044563e-27, + 5.89971666419767740e-02, + -3.78256921590546056e-04, + 3.63770871613655546e-06, + -3.88709325934309744e-08, + 4.36124720412583653e-10, + -5.03304260305653376e-12, + 5.91587881118474895e-14, + -7.04387600182945355e-16, + 8.46759396456888036e-18, + -1.02544751888747902e-19, + 1.24914833381576811e-21, + -1.52893003960385011e-23, + 1.87880368634273563e-25, + -2.31611371362262369e-27, + 1.16883485902115006e-02, + -7.49391709442686369e-05, + 7.20692364802523777e-07, + -7.70099711628143703e-09, + 8.64037724375145795e-11, + -9.97131892299503754e-13, + 1.17203685702002344e-14, + -1.39551240916455600e-16, + 1.67757531095446207e-18, + -2.03158709582401614e-20, + 2.47477692832696531e-22, + -3.02907406349898965e-24, + 3.72224509900206485e-26, + -4.58870242409252464e-28, + 8.84505876160857790e-04, + -5.67095826610944895e-06, + 5.45377840720750053e-08, + -5.82766431808274788e-10, + 6.53853227028726055e-12, + -7.54571110916215972e-14, + 8.86928961050688265e-16, + -1.05604219202967664e-17, + 1.26949090695600858e-19, + -1.53738636121833865e-21, + 1.87276680426645181e-23, + -2.29222864371581154e-25, + 2.81679478324771520e-27, + -3.47257149735327975e-29, + 1.94179721748316757e-05, + -1.24497205483707411e-07, + 1.19729354222621079e-09, + -1.27937446909863989e-11, + 1.43543464334920800e-13, + -1.65654533572782429e-15, + 1.94711672946482294e-17, + -2.31837893518296299e-19, + 2.78697292001963043e-21, + -3.37509649893383020e-23, + 4.11137396880475052e-25, + -5.03224612488597170e-27, + 6.18390475678702596e-29, + -7.62389954317073720e-31, + 6.02117646349025331e-08, + -3.86044246371110524e-10, + 3.71259966356596960e-12, + -3.96711838495263517e-14, + 4.45103392444911235e-16, + -5.13665984093450467e-18, + 6.03767134842741431e-20, + -7.18889107899418830e-22, + 8.64191985007704781e-24, + -1.04655898090205401e-25, + 1.27486645365479335e-27, + -1.56041741123308084e-29, + 1.91755739391148668e-31, + -2.36426687714213364e-33, +# root=6 base[26]=80.0 */ + 1.25935858403138146e-01, + -7.68030095520723225e-04, + 7.02575408682183819e-06, + -7.14107830786600425e-08, + 7.62120084507804702e-10, + -8.36598738891090041e-12, + 9.35362124383608024e-14, + -1.05936625755240716e-15, + 1.21134649593262775e-17, + -1.39539040960936505e-19, + 1.61685188063100984e-21, + -1.88242516340410558e-23, + 2.20031641824956826e-25, + -2.58013428542134483e-27, + 5.75395460831169686e-02, + -3.50909610930433572e-04, + 3.21003649137995621e-06, + -3.26272762649755436e-08, + 3.48209352597807945e-10, + -3.82238325921505574e-12, + 4.27362887289122305e-14, + -4.84019836514928930e-16, + 5.53458946581969729e-18, + -6.37547810665031234e-20, + 7.38732595623948666e-22, + -8.60071887677500213e-24, + 1.00531511593168690e-25, + -1.17885285512019245e-27, + 1.13995690068189274e-02, + -6.95212005874893004e-05, + 6.35963176439268181e-07, + -6.46402192241600520e-09, + 6.89862331903791875e-11, + -7.57279552935511748e-13, + 8.46679033159819079e-15, + -9.58926147785811048e-17, + 1.09649691110514374e-18, + -1.26309134563280798e-20, + 1.46355573271927453e-22, + -1.70394969976053926e-24, + 1.99170180566702371e-26, + -2.33551235383188755e-28, + 8.62652725867246186e-04, + -5.26095794994417316e-06, + 4.81259745327529149e-08, + -4.89159382087363520e-10, + 5.22047474543963957e-12, + -5.73064885341430063e-14, + 6.40717184530711874e-16, + -7.25659237479628518e-18, + 8.29764747131694529e-20, + -9.55833675142410183e-22, + 1.10753341168836584e-23, + -1.28944958585936824e-25, + 1.50720408118215865e-27, + -1.76738313371926953e-29, + 1.89382197212068294e-05, + -1.15496276325921178e-07, + 1.05653208141457566e-09, + -1.07387452434548633e-11, + 1.14607529558033603e-13, + -1.25807620931077165e-15, + 1.40659647341078982e-17, + -1.59307374456171914e-19, + 1.82162145106389398e-21, + -2.09838648348621091e-23, + 2.43142006361758232e-25, + -2.83078944518721179e-27, + 3.30883800344439185e-29, + -3.88003334756348979e-31, + 5.87241354653583894e-08, + -3.58133925815264190e-10, + 3.27612278164723306e-12, + -3.32989868999381881e-14, + 3.55378076196875365e-16, + -3.90107617447329948e-18, + 4.36161176003245891e-20, + -4.93984544293404827e-22, + 5.64853225320018092e-24, + -6.50673265192114613e-26, + 7.53941223879969347e-28, + -8.77778897952284174e-30, + 1.02601453366920116e-31, + -1.20313908826391141e-33, +# root=6 base[27]=84.0 */ + 1.22970999696354888e-01, + -7.15056454676179349e-04, + 6.23683598265504999e-06, + -6.04428009598167041e-08, + 6.15054570024755706e-10, + -6.43749536833409732e-12, + 6.86260495024082865e-14, + -7.41079600845150644e-16, + 8.07972575689802893e-18, + -8.87428721414556899e-20, + 9.80432050690966918e-22, + -1.08836484644689978e-23, + 1.21297393042748140e-25, + -1.35619998401750005e-27, + 5.61849150324214425e-02, + -3.26706184779894360e-04, + 2.84958324012884894e-06, + -2.76160529282053725e-08, + 2.81015758532275702e-10, + -2.94126364089548595e-12, + 3.13549436031618492e-14, + -3.38596047105160613e-16, + 3.69159156434111550e-18, + -4.05462323914917204e-20, + 4.47955140706434000e-22, + -4.97269166224048907e-24, + 5.54202518139324494e-26, + -6.19641900272724046e-28, + 1.11311934079068899e-02, + -6.47260875672030038e-05, + 5.64551217341890374e-07, + -5.47121280025898015e-09, + 5.56740320259875732e-11, + -5.82714674064376757e-13, + 6.21195104307665230e-15, + -6.70816728174699390e-17, + 7.31367479370116836e-19, + -8.03290268341370073e-21, + 8.87475812336316567e-23, + -9.85175340173842416e-25, + 1.09797006980717888e-26, + -1.22761677665463312e-28, + 8.42343629811137659e-04, + -4.89809183497814727e-06, + 4.27219350345908795e-08, + -4.14029392963886816e-10, + 4.21308520159927438e-12, + -4.40964392323772056e-14, + 4.70084131870152533e-16, + -5.07634875293622983e-18, + 5.53456143225489716e-20, + -6.07883104426088150e-22, + 6.71589801887208048e-24, + -7.45523094355211756e-26, + 8.30879568265025835e-28, + -9.28988730061470806e-30, + 1.84923646141438888e-05, + -1.07530106384594368e-07, + 9.37894668780905426e-10, + -9.08938136966441865e-12, + 9.24918346161126259e-14, + -9.68069803832193988e-16, + 1.03199773325481259e-17, + -1.11443464075382216e-19, + 1.21502821846003839e-21, + -1.33451427818074790e-23, + 1.47437257903284872e-25, + -1.63668181137089672e-27, + 1.82406894474509341e-29, + -2.03945300055687128e-31, + 5.73416160896977930e-08, + -3.33432214162257220e-10, + 2.90824873681513922e-12, + -2.81845955272539252e-14, + 2.86801141046747116e-16, + -3.00181659823634906e-18, + 3.20004602226411781e-20, + -3.45566857785451595e-22, + 3.76759181946413888e-24, + -4.13809737254583061e-26, + 4.57177371869290711e-28, + -5.07506655471522922e-30, + 5.65612191966821803e-32, + -6.32399282559854469e-34, +# root=6 base[28]=88.0 */ + 1.20206193572779604e-01, + -6.67904963026280012e-04, + 5.56659065026750905e-06, + -5.15490034926713386e-08, + 5.01233529282505132e-10, + -5.01295941158862967e-12, + 5.10642624745834238e-14, + -5.26918851938369986e-16, + 5.48941818433072331e-18, + -5.76121388877596049e-20, + 6.08203399504216730e-22, + -6.45144019704473484e-24, + 6.87043867322214160e-26, + -7.34027499513441597e-28, + 5.49216871370821480e-02, + -3.05162873279271911e-04, + 2.54335106226531296e-06, + -2.35525155393819849e-08, + 2.29011419958172874e-10, + -2.29039935673088057e-12, + 2.33310394760723679e-14, + -2.40746932189217920e-16, + 2.50809129815692050e-18, + -2.63227357364001372e-20, + 2.77885488515441406e-22, + -2.94763497267266364e-24, + 3.13907355554604267e-26, + -3.35373973499961865e-28, + 1.08809263386558126e-02, + -6.04579887933268470e-05, + 5.03881381006700312e-07, + -4.66615648631505081e-09, + 4.53710823750968411e-11, + -4.53767318263366133e-13, + 4.62227828707779903e-15, + -4.76960882295917878e-17, + 4.96895818181258135e-19, + -5.21498452633849159e-21, + 5.50538719545117885e-23, + -5.83976944025050090e-25, + 6.21904204684125822e-27, + -6.64433252332205152e-29, + 8.23404881393973234e-04, + -4.57510707657609790e-06, + 3.81307965747802727e-08, + -3.53107438521140243e-10, + 3.43341821633891887e-12, + -3.43384573377477378e-14, + 3.49786992971356184e-16, + -3.60936106442722925e-18, + 3.76021700267669580e-20, + -3.94639535435653367e-22, + 4.16615511376766218e-24, + -4.41919604517314123e-26, + 4.70620738256755977e-28, + -5.02804238527652620e-30, + 1.80765933912472829e-05, + -1.00439470561158468e-07, + 8.37103253747740740e-10, + -7.75193314225379957e-12, + 7.53754397639576619e-14, + -7.53848252546564321e-16, + 7.67903784440278750e-18, + -7.92379955938552615e-20, + 8.25498067308183811e-22, + -8.66370673701362247e-24, + 9.14615564004802382e-26, + -9.70166826285028927e-28, + 1.03317577285868104e-29, + -1.10382973345648581e-31, + 5.60523816222870321e-08, + -3.11445381991084212e-10, + 2.59571203604358740e-12, + -2.40374004877742735e-14, + 2.33726168595616177e-16, + -2.33755271374827742e-18, + 2.38113648091939455e-20, + -2.45703284456402477e-22, + 2.55972636523845364e-24, + -2.68646523037249217e-26, + 2.83606426974348046e-28, + -3.00831910310970214e-30, + 3.20369893222115103e-32, + -3.42278468756528576e-34, +# root=6 base[29]=92.0 */ + 1.17619904390742047e-01, + -6.25717465088081789e-04, + 4.99301527244315982e-06, + -4.42694348765390524e-08, + 4.12129736032437014e-10, + -3.94637340214139473e-12, + 3.84885200888756729e-14, + -3.80248976647851893e-16, + 3.79280754596404506e-18, + -3.81117301269284221e-20, + 3.85215440816257108e-22, + -3.91220585972577226e-24, + 3.98895992145708805e-26, + -4.08039195868048004e-28, + 5.37400228560658277e-02, + -2.85887588920024857e-04, + 2.28128696628069361e-06, + -2.02265122932507900e-08, + 1.88300284282417912e-10, + -1.80308084697220383e-12, + 1.75852374645794320e-14, + -1.73734103950348351e-16, + 1.73291727505273331e-18, + -1.74130837694053789e-20, + 1.76003259832720348e-22, + -1.78746984542272503e-24, + 1.82253844250395861e-26, + -1.86431334295264846e-28, + 1.06468184175595951e-02, + -5.66392250188978673e-05, + 4.51961997734699884e-07, + -4.00721831070957524e-09, + 3.73055095287043700e-11, + -3.57221179851540953e-13, + 3.48393655537700076e-15, + -3.44196998697033438e-17, + 3.43320575235972317e-19, + -3.44982996153872662e-21, + 3.48692584920930362e-23, + -3.54128373227103980e-25, + 3.61076062606939539e-27, + -3.69352385559147665e-29, + 8.05688962821967270e-04, + -4.28612536354083152e-06, + 3.42018412363682461e-08, + -3.03242850392937269e-10, + 2.82306282505532407e-12, + -2.70324101158660984e-14, + 2.63643946928760683e-16, + -2.60468162422377552e-18, + 2.59804936394058975e-20, + -2.61062959338218282e-22, + 2.63870159207108593e-24, + -2.67983645953625622e-26, + 2.73241251043534248e-28, + -2.79504288435189241e-30, + 1.76876675252304971e-05, + -9.40953195340221941e-08, + 7.50849055224398876e-10, + -6.65723246147867600e-12, + 6.19760217113093100e-14, + -5.93455172651746531e-16, + 5.78789916890777812e-18, + -5.71817968276274561e-20, + 5.70361957082851762e-22, + -5.73123753831139654e-24, + 5.79286531312112508e-26, + -5.88317061625227460e-28, + 5.99859328633446254e-30, + -6.13608868678046862e-32, + 5.48463899515717437e-08, + -2.91773269732662159e-10, + 2.32825272291350058e-12, + -2.06429234979507649e-14, + 1.92176896675428116e-16, + -1.84020158517825048e-18, + 1.79472717002100769e-20, + -1.77310836630436261e-22, + 1.76859352806619450e-24, + -1.77715738088742823e-26, + 1.79626708523590316e-28, + -1.82426919389227931e-30, + 1.86005976281559238e-32, + -1.90269470468863877e-34, +# root=6 base[30]=96.0 */ + 1.15193709036950989e-01, + -5.87791865930573608e-04, + 4.49889514715099008e-06, + -3.82599782934495149e-08, + 3.41642970480666761e-10, + -3.13786696623599930e-12, + 2.93538713889352409e-14, + -2.78163445526805147e-16, + 2.66128044123985711e-18, + -2.56499389422827043e-20, + 2.48673321534858322e-22, + -2.42239547405153948e-24, + 2.36908618733384355e-26, + -2.32447337800476046e-28, + 5.26315047490210561e-02, + -2.68559547581173901e-04, + 2.05552562967367808e-06, + -1.74808177120436100e-08, + 1.56095187607467383e-10, + -1.43367777212790748e-12, + 1.34116561948129001e-14, + -1.27091668691316692e-16, + 1.21592746125279041e-18, + -1.17193455661698832e-20, + 1.13617759274672692e-22, + -1.10678195851540629e-24, + 1.08242517722602329e-26, + -1.06204177864557950e-28, + 1.04272020055998747e-02, + -5.32062434185581019e-05, + 4.07234812504462555e-07, + -3.46324921500438894e-09, + 3.09251286096916381e-11, + -2.84036107502591052e-13, + 2.65707866495248101e-15, + -2.51790350474024959e-17, + 2.40896043597820306e-19, + -2.32180296145072802e-21, + 2.25096229535925333e-23, + -2.19272451217767308e-25, + 2.14446955919886237e-27, + -2.10408655753168967e-29, + 7.89069676925376637e-04, + -4.02633738966096595e-06, + 3.08171493908999233e-08, + -2.62078449974208882e-10, + 2.34023290503244252e-12, + -2.14941917747298171e-14, + 2.01072176658070557e-16, + -1.90540214330523286e-18, + 1.82296039908165389e-20, + -1.75700471870826140e-22, + 1.70339664486846091e-24, + -1.65932569588864625e-26, + 1.62280916908636032e-28, + -1.59224967477312278e-30, + 1.73228165504622094e-05, + -8.83920723492203135e-08, + 6.76543328324139181e-10, + -5.75353108032569316e-12, + 5.13762301159446442e-14, + -4.71872068972320957e-16, + 4.41423176115699410e-18, + -4.18301865456877370e-20, + 4.00203042842759665e-22, + -3.85723483115907873e-24, + 3.73954651339655788e-26, + -3.64279549296267057e-28, + 3.56262904972029608e-30, + -3.49554035929348870e-32, + 5.37150503440283253e-08, + -2.74088489156497900e-10, + 2.09784354841984300e-12, + -1.78407022169486728e-14, + 1.59308780943634544e-16, + -1.46319346319653353e-18, + 1.36877672629068019e-20, + -1.29708155117636519e-22, + 1.24096024058851001e-24, + -1.19606163663336594e-26, + 1.15956853001257613e-28, + -1.12956771624168740e-30, + 1.10470949229055294e-32, + -1.08390645278071689e-34, +# root=7 base[0]=0.0 */ + 4.08427546530376773e-01, + -1.07194133735321814e-02, + 3.20466358447717679e-04, + -9.88925408898335678e-06, + 3.01927897125757393e-07, + -9.01373829642861443e-09, + 2.62574924080278269e-10, + -7.47595644989844576e-12, + 2.08364077803493883e-13, + -5.69678248366882226e-15, + 1.52944932098950463e-16, + -4.03933931188566217e-18, + 1.04932917388534399e-19, + -2.68580928599462552e-21, + 3.57096729556732329e-01, + -2.49474506326113031e-02, + 1.60867913875746278e-03, + -8.93009577451073721e-05, + 4.45448014115909750e-06, + -2.04585265763753710e-07, + 8.77880718477090858e-09, + -3.55409768184551529e-10, + 1.36710988031753063e-11, + -5.02266609801520962e-13, + 1.76960729127642080e-14, + -5.99809661870595730e-16, + 1.96089522230851183e-17, + -6.19026934165545219e-19, + 2.77669612443939062e-01, + -4.19257674455023113e-02, + 4.38695349782221040e-03, + -3.63535941993188159e-04, + 2.56419087520354420e-05, + -1.59762667665497580e-06, + 8.99542770793386363e-08, + -4.64773536276231292e-09, + 2.22782435276166754e-10, + -9.98804074555123924e-12, + 4.21473192693350879e-13, + -1.68233572196655918e-14, + 6.37761969267554851e-16, + -2.30121065172076434e-17, + 1.96872137787354934e-01, + -5.01703589110845394e-02, + 7.64356956060294624e-03, + -8.66459776646676095e-04, + 7.99475941295169860e-05, + -6.29759286574927551e-06, + 4.36130694462114975e-07, + -2.70850899658440743e-08, + 1.52995169402379482e-09, + -7.94472354519928070e-11, + 3.82400890839821385e-12, + -1.71734756391674633e-13, + 7.23484837013367002e-15, + -2.86809552577083693e-16, + 1.28883709341404890e-01, + -4.62466652140177820e-02, + 9.32341825418646873e-03, + -1.33957350642275870e-03, + 1.51560060203022112e-04, + -1.42574879933401297e-05, + 1.15373778283328508e-06, + -8.21942102688436604e-08, + 5.24235318855477417e-09, + -3.03155934607303761e-10, + 1.60532914838911832e-11, + -7.84651757586852105e-13, + 3.56321230221804825e-14, + -1.50933333029215385e-15, + 7.49670713431007524e-02, + -3.30680271411809418e-02, + 8.04675638231481215e-03, + -1.36150838892143519e-03, + 1.77518127618552597e-04, + -1.88948869196445851e-05, + 1.70331426469857277e-06, + -1.33392230419312220e-07, + 9.24530979390330721e-09, + -5.75201346576465145e-10, + 3.24839998620119946e-11, + -1.68028304791736574e-12, + 8.02017486596963319e-14, + -3.54883923569866061e-15, + 3.05631251745759717e-02, + -1.49464520200727619e-02, + 4.02689168896739648e-03, + -7.45995718882767282e-04, + 1.05295311457639018e-04, + -1.20105830581872061e-05, + 1.15010938497392310e-06, + -9.49472878219686785e-08, + 6.89136037900681221e-09, + -4.46409550233242726e-10, + 2.61174199420888329e-11, + -1.39340986911978744e-12, + 6.83339527099023965e-14, + -3.09590976374214185e-15, +# root=7 base[1]=2.5 */ + 3.70026076548772176e-01, + -8.56002427814723556e-03, + 2.25774031590966263e-04, + -6.21789511422653903e-06, + 1.70935515680696379e-07, + -4.62492213806620994e-09, + 1.22531391145861304e-10, + -3.18460687818280633e-12, + 8.11272715512720267e-14, + -2.03540650873776764e-15, + 5.01086069378029611e-17, + -1.21770348839140189e-18, + 2.93499458319627233e-20, + -6.82071373979690070e-22, + 2.77636229765424014e-01, + -1.54032464848352715e-02, + 8.59262953694924642e-04, + -4.19839053454561364e-05, + 1.86261610435924567e-06, + -7.67283390733310530e-08, + 2.97382430874295052e-09, + -1.09393272333102645e-10, + 3.84339700347091311e-12, + -1.29575961260750516e-13, + 4.20735422755784525e-15, + -1.31948231637376954e-16, + 4.00607688050290660e-18, + -1.17881863896665714e-19, + 1.59922134292820012e-01, + -1.91443027023336168e-02, + 1.71825050069161810e-03, + -1.24681163745211747e-04, + 7.82244118985154940e-06, + -4.38632630380727931e-07, + 2.24367200330989649e-08, + -1.06145800689318593e-09, + 4.69043586935007449e-11, + -1.95021244128659760e-12, + 7.67312732368359447e-14, + -2.86966751428487274e-15, + 1.02384198340177917e-16, + -3.49161131930596365e-18, + 7.41827427564365899e-02, + -1.57117786536252087e-02, + 2.08454353432500515e-03, + -2.10295626334193296e-04, + 1.75411955810349526e-05, + -1.26408390185425945e-06, + 8.08597429039402747e-08, + -4.67555884051718241e-09, + 2.47591245666332121e-10, + -1.21246740852145386e-11, + 5.53243826009869954e-13, + -2.36638219127796698e-14, + 9.53452977657449535e-16, + -3.62897088088309139e-17, + 2.97115905415779903e-02, + -9.47561094860407786e-03, + 1.73087634671336191e-03, + -2.28744060891828679e-04, + 2.40839152590301962e-05, + -2.12799056789534980e-06, + 1.62969531779167796e-07, + -1.10575084238636984e-08, + 6.75284995565504496e-10, + -3.75640049094650262e-11, + 1.92110281316653952e-12, + -9.10043661706678354e-14, + 4.01755568243751367e-15, + -1.65901410892157396e-16, + 1.09132509996791600e-02, + -4.55628901505415393e-03, + 1.05366062527819477e-03, + -1.70566604787897341e-04, + 2.14041898738559268e-05, + -2.20370072830854219e-06, + 1.92959915505996980e-07, + -1.47295347933320483e-08, + 9.98056780024349604e-10, + -6.08596014409041133e-11, + 3.37597754280063689e-12, + -1.71850487834961724e-13, + 8.08539239372202382e-15, + -3.53173873389292287e-16, + 3.26509043435514734e-03, + -1.57254479589216765e-03, + 4.17131951375205668e-04, + -7.61903549606389127e-05, + 1.06192722966327849e-05, + -1.19775416790098859e-06, + 1.13547543991323556e-07, + -9.28969328892054665e-09, + 6.68786564024225618e-10, + -4.30042586437922692e-11, + 2.49914694176028849e-12, + -1.32518191473488152e-13, + 6.46232836354790008e-15, + -2.91271411921180647e-16, +# root=7 base[2]=5.0 */ + 3.38983321347566868e-01, + -7.01192005490760151e-03, + 1.64962438494822996e-04, + -4.08892230885278935e-06, + 1.01893884100164136e-07, + -2.51691717248647560e-09, + 6.09458606106872140e-11, + -1.45838859399197134e-12, + 3.40364415695369839e-14, + -7.87333168700770186e-16, + 1.81956057559176528e-17, + -3.89103376700949263e-19, + 9.14129024943634759e-21, + -2.07257932439721094e-22, + 2.27168606334642614e-01, + -1.01334885457304864e-02, + 4.93843294740470089e-04, + -2.14177774196404819e-05, + 8.50674367591912704e-07, + -3.15933985774074029e-08, + 1.11067816426639474e-09, + -3.72473556447087236e-11, + 1.19852686232335892e-12, + -3.71534769160621233e-14, + 1.11332972958575764e-15, + -3.23419998491838551e-17, + 9.12004308171066035e-19, + -2.50114691109619316e-20, + 1.03676216859525869e-01, + -9.77206483927139762e-03, + 7.56571664495048007e-04, + -4.81620582523513855e-05, + 2.68971362828275627e-06, + -1.35718730123144428e-07, + 6.30162770989058739e-09, + -2.72579567611733841e-10, + 1.10824880504034400e-11, + -4.26332291121961137e-13, + 1.55973219389822941e-14, + -5.44901626100711961e-16, + 1.82364002794942163e-17, + -5.85732015950637473e-19, + 3.35630880636670903e-02, + -5.76459705585742610e-03, + 6.60502860749541182e-04, + -5.88382841533361501e-05, + 4.40554374056311709e-06, + -2.88499925174683355e-07, + 1.69353313494669132e-08, + -9.06009288838460678e-10, + 4.47000823917087298e-11, + -2.05194319557512178e-12, + 8.82426582254525332e-14, + -3.57448508601635136e-15, + 1.36990049769268390e-16, + -4.97964357900272447e-18, + 8.36620026900123173e-03, + -2.29859694074484007e-03, + 3.73315024140031919e-04, + -4.47050546970465473e-05, + 4.32561759163350833e-06, + -3.55090936848162035e-07, + 2.54887847424212033e-08, + -1.63285272785511898e-09, + 9.47354372602391341e-11, + -5.03320029538815968e-12, + 2.46990045802466347e-13, + -1.12722369821073205e-14, + 4.81155302552246032e-16, + -1.92735834191141286e-17, + 1.83066726883950970e-03, + -7.07967731337965332e-04, + 1.53026504454616678e-04, + -2.33874938936131933e-05, + 2.79398744531357280e-06, + -2.75706871663120763e-07, + 2.32668042013963897e-08, + -1.71961292336018611e-09, + 1.13252245931848745e-10, + -6.73432371248030927e-12, + 3.65304746480365006e-13, + -1.82283025177706676e-14, + 8.42451988898237761e-16, + -3.62152297384408737e-17, + 3.66785916407495630e-04, + -1.72891346347455295e-04, + 4.48981682783519627e-05, + -8.04757652395892801e-06, + 1.10325402881716930e-06, + -1.22641209706501059e-07, + 1.14781816951392025e-08, + -9.28426000650035061e-10, + 6.61626908791676695e-11, + -4.21568483717204796e-12, + 2.42977992256943229e-13, + -1.27880329159312344e-14, + 6.19385610506391996e-16, + -2.77444146110289352e-17, +# root=7 base[3]=7.5 */ + 3.13298941262963482e-01, + -5.86414402860065131e-03, + 1.24240205000195113e-04, + -2.79381493231569617e-06, + 6.34158375422934235e-08, + -1.44303393511299740e-09, + 3.19377786098342199e-11, + -7.09391606449664444e-13, + 1.55997560660881768e-14, + -3.05022940788947076e-16, + 7.65354074413290084e-18, + -1.46499754054828592e-19, + 1.95535303182160813e-21, + -8.76921019649876372e-23, + 1.93181767962337630e-01, + -7.01951521254395167e-03, + 3.01524046488003288e-04, + -1.17035060995796315e-05, + 4.18978046148233217e-07, + -1.41039530737599864e-08, + 4.51885484042736009e-10, + -1.38668887396426262e-11, + 4.09926903130526955e-13, + -1.17256691145058879e-14, + 3.24490204978206126e-16, + -8.75253069769692293e-18, + 2.30011946107552756e-19, + -5.86035707963812010e-21, + 7.38480720465753970e-02, + -5.46305119122303656e-03, + 3.68202827649654631e-04, + -2.06452634703111874e-05, + 1.02907213819285475e-06, + -4.67982486076609462e-08, + 1.97421896106766740e-09, + -7.80880210041414478e-11, + 2.91979287294725686e-12, + -1.03842976880038177e-13, + 3.52704026045252825e-15, + -1.14905581304308152e-16, + 3.60046889506044759e-18, + -1.08627912889157423e-19, + 1.78543265843739973e-02, + -2.43500011041299091e-03, + 2.40415441441750241e-04, + -1.88268604671790144e-05, + 1.26009745726268143e-06, + -7.46563548072477872e-08, + 4.00346495220678436e-09, + -1.97231359360375182e-10, + 9.02282875920790429e-12, + -3.86384605233064790e-13, + 1.55837973778733472e-14, + -5.94912285098843700e-16, + 2.15816126465682393e-17, + -7.45644084701822906e-19, + 2.89758338097062442e-03, + -6.63114896380294448e-04, + 9.41642924646720567e-05, + -1.00791917454203443e-05, + 8.85945792114672430e-07, + -6.68782394391318487e-08, + 4.45787767883254822e-09, + -2.67345929177471118e-10, + 1.46205731901651763e-11, + -7.36527501762656316e-13, + 3.44474637502062382e-14, + -1.50520474769102919e-15, + 6.17634231685230750e-17, + -2.38709278895503798e-18, + 3.66039431929262020e-04, + -1.27308513101330733e-04, + 2.51966486563767338e-05, + -3.57758395471133603e-06, + 4.01567331769363277e-07, + -3.75633949700753984e-08, + 3.02655356592229327e-09, + -2.14830278335016848e-10, + 1.36553130610552689e-11, + -7.86946047022102979e-13, + 4.15186800944489913e-14, + -2.02114273352954458e-15, + 9.13703930444378112e-17, + -3.85106725092249624e-18, + 4.41469836206203589e-05, + -2.01650893530704012e-05, + 5.08346313001480232e-06, + -8.88024503033425041e-07, + 1.19075900371493253e-07, + -1.29859513216697057e-08, + 1.19528621990014072e-09, + -9.52786115444407656e-11, + 6.70272077650134935e-12, + -4.22200466015438109e-13, + 2.40856306823134978e-14, + -1.25599000873010564e-15, + 6.03285138680108625e-17, + -2.68201325828614039e-18, +# root=7 base[4]=10.0 */ + 2.91639642737198723e-01, + -4.98902903354517431e-03, + 9.59685932192574351e-05, + -1.97425016905486303e-06, + 4.08665515484761114e-08, + -8.66798087806919013e-10, + 1.77665951482412762e-11, + -3.38327387405523079e-13, + 8.72857406348298716e-15, + -1.13088070299787020e-16, + 2.07567133396948769e-18, + -1.24437131224829486e-19, + -2.16493616190065864e-22, + 6.92521919884223819e-24, + 1.69175383340182284e-01, + -5.07330085107507260e-03, + 1.93598143966576032e-04, + -6.77681875453683520e-06, + 2.20182021871824810e-07, + -6.75177198465966418e-09, + 1.98092758342311675e-10, + -5.59359917720072396e-12, + 1.51789003961005109e-13, + -4.03910493032296636e-15, + 1.03681099401531860e-16, + -2.56475181873918039e-18, + 6.39656567268555886e-20, + -1.52601162323421367e-21, + 5.66367882628750277e-02, + -3.28594960940737854e-03, + 1.95048527281267876e-04, + -9.68320026571550345e-06, + 4.32616387990735093e-07, + -1.77759442127188700e-08, + 6.82736193600694611e-10, + -2.47442859579807975e-11, + 8.50426475859947170e-13, + -2.79999465745340309e-14, + 8.83056898044695402e-16, + -2.67594504731420259e-17, + 7.85578472663936510e-19, + -2.22416778337779547e-20, + 1.08980482536107162e-02, + -1.15958314657727793e-03, + 9.90929020103087366e-05, + -6.81102407726019802e-06, + 4.06940042217998762e-07, + -2.17654523548125611e-08, + 1.06353907598965703e-09, + -4.81140609835988769e-11, + 2.03402085495310373e-12, + -8.09799742883269987e-14, + 3.05196625699774691e-15, + -1.09366481223566672e-16, + 3.74094438804576446e-18, + -1.22351836891397020e-19, + 1.22766861801907202e-03, + -2.26146161413783503e-04, + 2.77556030291673904e-05, + -2.62614264762214607e-06, + 2.07727200915772823e-07, + -1.42943898877230754e-08, + 8.77613502450549666e-10, + -4.88949763281951285e-11, + 2.50216923315889959e-12, + -1.18697429173245054e-13, + 5.25660496693987144e-15, + -2.18556524659716940e-16, + 8.57082212256078359e-18, + -3.17855214498715108e-19, + 9.01434302078534661e-05, + -2.71291769705099802e-05, + 4.80323130629517222e-06, + -6.22193806901576711e-07, + 6.46550312338328937e-08, + -5.66202477226875687e-09, + 4.30912399140443387e-10, + -2.91027134237553582e-11, + 1.77080786908507498e-12, + -9.81910800041012978e-14, + 5.00642428881181122e-15, + -2.36414217306162735e-16, + 1.04014056548207801e-17, + -4.27896238412911015e-19, + 5.85408254945858756e-06, + -2.54924282479529533e-06, + 6.15867642984161802e-07, + -1.03803809545227475e-07, + 1.35059982027805277e-08, + -1.43566668480634883e-09, + 1.29271735939531266e-10, + -1.01101106871576595e-11, + 6.99500308064700244e-13, + -4.34210413837427141e-14, + 2.44518278219454943e-15, + -1.26044886979784104e-16, + 5.99197524460281660e-18, + -2.63922057818204959e-19, +# root=7 base[5]=12.5 */ + 2.73083109443806704e-01, + -4.30610944882538031e-03, + 7.56962081050025653e-05, + -1.43860309251024574e-06, + 2.71756302966912420e-08, + -5.25970609075096086e-10, + 1.16437695678769170e-11, + -1.18855629493993618e-13, + 4.83707119703354784e-15, + -1.37617298194628684e-16, + -3.04377799477536641e-18, + -8.48586838692002602e-20, + 2.74185707860727900e-21, + 1.10061071627103421e-22, + 1.51537564665796626e-01, + -3.79872743404363437e-03, + 1.29669378287511214e-04, + -4.12073047286840591e-06, + 1.22358178487741212e-07, + -3.43847821409706361e-09, + 9.22652926489721280e-11, + -2.43881726643765309e-12, + 6.03572362320491531e-14, + -1.46917952882424052e-15, + 3.73121173265688225e-17, + -8.07938244018638852e-19, + 1.80358431239517164e-20, + -4.74193399200015494e-22, + 4.60144311150033139e-02, + -2.09489863865768879e-03, + 1.11000654707465746e-04, + -4.90535892623805941e-06, + 1.97508642603576008e-07, + -7.36369173715027607e-09, + 2.57280153324763200e-10, + -8.61700245092675726e-12, + 2.71609625978561356e-13, + -8.24692078223628988e-15, + 2.44869009353872633e-16, + -6.83844043449888610e-18, + 1.87024792197202720e-19, + -5.05378585204505662e-21, + 7.44931242678521441e-03, + -6.08990010927426182e-04, + 4.55595399566674199e-05, + -2.74907247184257994e-06, + 1.46795760259872477e-07, + -7.08889178629228473e-09, + 3.15111732367753853e-10, + -1.30899751145691082e-11, + 5.10176975023657672e-13, + -1.88342562842443406e-14, + 6.62458349012494770e-16, + -2.22055027738736358e-17, + 7.13963327258483607e-19, + -2.20535678083477324e-20, + 6.25878437089655553e-04, + -8.97369484934274316e-05, + 9.48916513201059624e-06, + -7.87188776773254052e-07, + 5.56753837408086367e-08, + -3.47007569249354351e-09, + 1.94960345179073956e-10, + -1.00291515563672369e-11, + 4.77289152586168061e-13, + -2.11921802240463117e-14, + 8.83499180137784821e-16, + -3.47522632771150223e-17, + 1.29527924803413693e-18, + -4.58491648175201176e-20, + 2.80188759580081397e-05, + -6.95826153384425050e-06, + 1.07742010100073440e-06, + -1.24978842190606163e-07, + 1.18426182724237684e-08, + -9.58344661417361260e-10, + 6.81105170805566568e-11, + -4.33283841352501515e-12, + 2.50110117678386203e-13, + -1.32369931818210104e-14, + 6.47532721029270009e-16, + -2.94697499408387878e-17, + 1.25448228515557444e-18, + -5.01069904369789713e-20, + 8.91049041224544137e-07, + -3.59888181192343442e-07, + 8.17237338125937874e-08, + -1.30974172786453386e-08, + 1.63484551438178255e-09, + -1.67858924948670621e-10, + 1.46774653136919606e-11, + -1.11944243254294218e-12, + 7.57913003112443420e-14, + -4.61672797816045363e-15, + 2.55714377874772304e-16, + -1.29903415078411294e-17, + 6.09574108818076254e-19, + -2.65405324599693184e-20, +# root=7 base[6]=15.0 */ + 2.56969977203170385e-01, + -3.76290636195295144e-03, + 6.07413933767356792e-05, + -1.07364959893644459e-06, + 1.92486469179343485e-08, + -2.74506868599476549e-10, + 9.54372056092191587e-12, + -7.08468402403587961e-14, + -2.67736844594968306e-15, + -2.70413324435886092e-16, + -1.32723805675284069e-18, + 2.28840759730870272e-19, + 1.06985783937118688e-20, + 1.26823775440030422e-22, + 1.38145145161137739e-01, + -2.93043208033398964e-03, + 9.00321598517498463e-05, + -2.61266993536744701e-06, + 7.11542734684274186e-08, + -1.86536100975003595e-09, + 4.47794911879410538e-11, + -1.12299571879758643e-12, + 2.75320456801904734e-14, + -5.05890000532091337e-16, + 1.38708448754534999e-17, + -3.81809316710822551e-19, + 2.25971455635820639e-21, + -1.62687915143675477e-22, + 3.91014485089338365e-02, + -1.39798737229465805e-03, + 6.71357662624039246e-05, + -2.65523052649619062e-06, + 9.65568378326815224e-08, + -3.32100704219014797e-09, + 1.03760482478579838e-10, + -3.24731568399055042e-12, + 9.70370750432381592e-14, + -2.55160188461546496e-15, + 7.37808513423516576e-17, + -2.04162922135234747e-18, + 4.39998140426040963e-20, + -1.29861164399793457e-21, + 5.57828063626889404e-03, + -3.45153351804983047e-04, + 2.30403432764625936e-05, + -1.22162478939316147e-06, + 5.83727580106250141e-08, + -2.56148848240829072e-09, + 1.02993698854956859e-10, + -3.93955819662823330e-12, + 1.42202472064738115e-13, + -4.81814477225786325e-15, + 1.58774145818252761e-16, + -4.99695474703304927e-18, + 1.48737010692923282e-19, + -4.38221771810304203e-21, + 3.74979248474154882e-04, + -4.04610741449526942e-05, + 3.71908608740877697e-06, + -2.68903770528909762e-07, + 1.69437195663756368e-08, + -9.53954179342746695e-10, + 4.87755115449331574e-11, + -2.30753240962211358e-12, + 1.01695825980880162e-13, + -4.20271150102422597e-15, + 1.64225796397554979e-16, + -6.08241879723687755e-18, + 2.14282810589722017e-19, + -7.20988982248261258e-21, + 1.10910617351549412e-05, + -2.15037044130851906e-06, + 2.86701832940129301e-07, + -2.92709973371839774e-08, + 2.49469306940622000e-09, + -1.84305619901177081e-10, + 1.20963233929627361e-11, + -7.17592971509973005e-13, + 3.89376979349102288e-14, + -1.95037714924447130e-15, + 9.08392490243478517e-17, + -3.95633032094090743e-18, + 1.61899979511342477e-19, + -6.24200241913005769e-21, + 1.64936956220278583e-07, + -5.89661982138934782e-08, + 1.22424393033596726e-08, + -1.82767831905653723e-09, + 2.15458496957364038e-10, + -2.11052620772868778e-11, + 1.77423486794527705e-12, + -1.30889457093707766e-13, + 8.61312436734017858e-15, + -5.11931738580604940e-16, + 2.77563205646212736e-17, + -1.38391739196522452e-18, + 6.38799469822899477e-20, + -2.74111047671999932e-21, +# root=7 base[7]=17.5 */ + 2.42815554510079912e-01, + -3.32361561346317157e-03, + 4.95620949936624968e-05, + -7.98109752258740023e-07, + 1.58008590760213477e-08, + -8.76437836873519986e-11, + 4.98414910260854335e-12, + -2.93511431969108937e-13, + -9.54170078406801160e-15, + 2.66840017692101569e-17, + 1.88881332681658674e-17, + 5.45196570176944477e-19, + -9.04231780649091522e-21, + -1.16094652991790238e-21, + 1.27689374604265826e-01, + -2.31873142669964966e-03, + 6.44436351676693891e-05, + -1.72335087262470837e-06, + 4.25016750793228997e-08, + -1.08221467110146610e-09, + 2.35109348152242897e-11, + -4.58032064658387048e-13, + 1.54180998797013091e-14, + -2.70149081436997436e-16, + -1.58962505702353769e-18, + -2.90523618577995015e-19, + 6.43415705274155244e-21, + 3.82785394328063133e-22, + 3.44132431865815797e-02, + -9.66388811057686823e-04, + 4.27175765865882393e-05, + -1.53189784779910658e-06, + 4.91893796072778128e-08, + -1.63926347144151001e-09, + 4.56901485034663887e-11, + -1.18869007164737286e-12, + 4.09358052676123323e-14, + -9.52985448332870628e-16, + 1.42424064387024213e-17, + -8.67484142649404641e-19, + 1.83093231021288456e-20, + 2.58577799760746974e-22, + 4.49166094043494928e-03, + -2.06766744828934334e-04, + 1.26451405428648911e-05, + -5.93142110532628459e-07, + 2.50348917693438369e-08, + -1.02430507354151952e-09, + 3.70654655429749383e-11, + -1.26967843593344796e-12, + 4.45339914863955681e-14, + -1.37221926782288449e-15, + 3.94633505902557110e-17, + -1.29738166714129049e-18, + 3.51132954071849511e-20, + -8.05372146106515661e-22, + 2.57211867229649612e-04, + -2.01311457498038928e-05, + 1.64798848011147956e-06, + -1.03615079100613922e-07, + 5.77583431264123636e-09, + -2.95677353636231058e-10, + 1.36879218762278413e-11, + -5.91389967092022333e-13, + 2.42419025819072393e-14, + -9.26585411549274868e-16, + 3.36403332323981843e-17, + -1.18012323498408832e-18, + 3.89491509196810207e-20, + -1.23058734024722069e-21, + 5.53813322792811931e-06, + -7.86782145935883164e-07, + 9.04070827260301249e-08, + -8.00750495376357566e-09, + 6.06580496310372916e-10, + -4.05629724482560466e-11, + 2.43360843072851015e-12, + -1.33387972738495846e-13, + 6.74944712505140827e-15, + -3.17274229147562432e-16, + 1.39613358272769796e-17, + -5.77998209788571971e-19, + 2.25772537865053912e-20, + -8.34994217796786367e-22, + 3.99104575859189491e-08, + -1.16881683305168841e-08, + 2.14449216625656917e-09, + -2.90318277174231941e-10, + 3.16751007039788161e-11, + -2.91303092832214746e-12, + 2.32381423362914632e-13, + -1.64053610660569168e-14, + 1.03996068992351472e-15, + -5.98633818546234595e-17, + 3.15725340787075615e-18, + -1.53681466967407265e-19, + 6.94608681809885610e-21, + -2.92608420733886218e-22, +# root=7 base[8]=20.0 */ + 2.30259354654290621e-01, + -2.96123745666958043e-03, + 4.14558819153416807e-05, + -5.56164651584882347e-07, + 1.44258819740892655e-08, + -9.41689088854955397e-11, + -6.13342453466601513e-12, + -4.08388393020141772e-13, + 7.82982027387255826e-15, + 8.88995088620949403e-16, + 9.44755776173016360e-18, + -1.40123260599289046e-18, + -5.39779114333201570e-20, + 1.06599663125175740e-21, + 1.19328953144115624e-01, + -1.87580651235713745e-03, + 4.72188667898837663e-05, + -1.18930094992204739e-06, + 2.57080140348702111e-08, + -6.25996243733609366e-10, + 1.59395581715877666e-11, + -1.48871566609374939e-13, + 2.87344350706750126e-15, + -4.20776500700598458e-16, + -1.46148924767940366e-19, + 4.70256753435155613e-19, + 1.77701564175686731e-20, + -5.06086560126185125e-22, + 3.11307789904750713e-02, + -6.86951071152746553e-04, + 2.81427227893788646e-05, + -9.56603080368934126e-07, + 2.53135896917638031e-08, + -8.23365684873086538e-10, + 2.60288051160177819e-11, + -3.73858752990250513e-13, + 1.05988663408191493e-14, + -8.10051124787789034e-16, + 3.21850207305700436e-18, + 5.17789009545476017e-19, + 3.25918977807954143e-20, + -6.01193341565083463e-22, + 3.82973244020353700e-03, + -1.28559875430116270e-04, + 7.38415992017591587e-06, + -3.17825728427145159e-07, + 1.12355943885486789e-08, + -4.37350414036502434e-10, + 1.56903375194068145e-11, + -4.16857176286099435e-13, + 1.35196660867204565e-14, + -5.40384166967584420e-16, + 1.02538467295285680e-17, + -1.60693242465544150e-19, + 1.66893870901398516e-20, + -2.95137436771603611e-22, + 1.96924021910118861e-04, + -1.07058851092767853e-05, + 8.09462513139791360e-07, + -4.50341169681385040e-08, + 2.15553819568528864e-09, + -1.01770561661704367e-10, + 4.36745176622103941e-12, + -1.65653984951260325e-13, + 6.31998654932865354e-15, + -2.35547520272629643e-16, + 7.48768696277401521e-18, + -2.39000096392346505e-19, + 8.51913407858003505e-21, + -2.30926633670236549e-22, + 3.40055265245395998e-06, + -3.28830886147376743e-07, + 3.34104360559463403e-08, + -2.55480853796264784e-09, + 1.69103454687683407e-10, + -1.02222267611694270e-11, + 5.58074701191046732e-13, + -2.78957931958614115e-14, + 1.31007177973046524e-15, + -5.76002511463114627e-17, + 2.36425429590654801e-18, + -9.25038655480647649e-20, + 3.45213787265651683e-21, + -1.20634734206862759e-22, + 1.35127089302115061e-08, + -2.87964749209189496e-09, + 4.54324914419484816e-10, + -5.40695744763909118e-11, + 5.32911870458788403e-12, + -4.51769157107436137e-13, + 3.36595196118906550e-14, + -2.24359286141831443e-15, + 1.35518973831346837e-16, + -7.48412403247913290e-18, + 3.80834169690865856e-19, + -1.79762163274547422e-20, + 7.90966733688920993e-22, + -3.25391813972529987e-23, +# root=7 base[9]=22.5 */ + 2.19040696259128420e-01, + -2.65257347941546097e-03, + 3.60701602030009694e-05, + -3.51417812898923149e-07, + 1.04140467669347370e-08, + -3.21712100160531268e-10, + -9.58602876137406238e-12, + 2.77078656136322138e-13, + 2.79264409155246383e-14, + -2.74544471019973094e-16, + -5.97169601628716907e-17, + -2.33534833536875632e-19, + 1.17333476126674076e-19, + 2.07561576528199343e-21, + 1.12499621203564576e-01, + -1.54897279383125509e-03, + 3.50655990032702679e-05, + -8.58747604779902861e-07, + 1.66739083275848785e-08, + -2.95921787280483583e-10, + 1.10548934185250708e-11, + -2.51327389451408788e-13, + -6.31505693546665093e-15, + 6.44244164844122374e-17, + 2.08748961658077449e-17, + -2.39714425242864752e-20, + -3.96518525790558718e-20, + -4.75051550917980589e-22, + 2.87688850629482240e-02, + -5.01887950902204431e-04, + 1.86513358633444991e-05, + -6.52577074522863126e-07, + 1.43369774847199366e-08, + -3.10525827842265816e-10, + 1.64602437734547651e-11, + -4.12979399151407587e-13, + -8.21752415105881177e-15, + -7.73502154956092935e-18, + 3.40436103386653122e-17, + 8.02756572790358740e-20, + -5.90510248478219820e-20, + -1.17649713746785928e-21, + 3.41306959452712493e-03, + -8.22348420614927715e-05, + 4.41731819761062169e-06, + -1.90864667731633462e-07, + 5.49506257580151179e-09, + -1.67229017112111868e-10, + 7.69125898761220728e-12, + -2.19155082041598604e-13, + 1.30953596515964781e-15, + -1.19216840289387134e-16, + 1.19599071431931505e-17, + -1.65902515334660885e-20, + -1.32720751576495765e-20, + -4.66093517332032023e-22, + 1.64291771163485530e-04, + -5.92966174145256566e-06, + 4.23760772446788623e-07, + -2.23828468156211803e-08, + 8.83684119598691406e-10, + -3.59255989000435705e-11, + 1.60755749016037141e-12, + -5.61527309878103003e-14, + 1.52748698932944402e-15, + -6.12003015245202507e-17, + 2.60381223703373958e-18, + -4.61093635807429866e-20, + 4.91812700512095109e-22, + -9.69048740993025250e-23, + 2.47476005065621266e-06, + -1.50033349993591061e-07, + 1.40338000159358290e-08, + -9.56718519742161604e-10, + 5.35503804544831090e-11, + -2.88167913787120074e-12, + 1.47398397589891139e-13, + -6.65358096767742957e-15, + 2.78041678795368003e-16, + -1.17018723748508209e-17, + 4.61883767123991604e-19, + -1.58541061717328820e-20, + 5.50380086127078172e-22, + -2.08839657507052501e-23, + 6.55753052542002863e-09, + -8.71213368529743487e-10, + 1.18627113363569107e-10, + -1.21318163892432087e-11, + 1.04739695804878625e-12, + -8.03712970570615176e-14, + 5.51583244037111477e-15, + -3.41313686209980490e-16, + 1.93669114275004545e-17, + -1.01713768768960757e-18, + 4.94607514337577634e-20, + -2.23864211423415535e-21, + 9.53288909858275336e-23, + -3.81915164791116181e-24, +# root=7 base[10]=25.0 */ + 2.08984092856665582e-01, + -2.37859825459513100e-03, + 3.26110877507178215e-05, + -2.44582757556105114e-07, + 2.73457968802750630e-09, + -3.81927558123023980e-10, + 6.29124377447027313e-12, + 6.31251127868719116e-13, + -1.26413226306503357e-14, + -1.33004911545268719e-15, + 3.09558321302878199e-17, + 2.68276491876251718e-18, + -7.15620937483139427e-20, + -5.40286932398318628e-21, + 1.06805426354772276e-01, + -1.30550201779278509e-03, + 2.62053498176548956e-05, + -6.27620944646644421e-07, + 1.27487407033614178e-08, + -1.30643011274691961e-10, + 2.51352441823751062e-12, + -2.89268507509373127e-13, + 6.07234607686890937e-15, + 3.95752661691375009e-16, + -1.09502781199302747e-17, + -8.31400662091806858e-19, + 2.68102624360868381e-20, + 1.58438561963366061e-21, + 2.70151914603280509e-02, + -3.80455284990324392e-04, + 1.20494825392838677e-05, + -4.55787657979669100e-07, + 1.10175918061639600e-08, + -7.56040011120555520e-11, + 2.83375801853471463e-12, + -4.61630945637154772e-13, + 9.29891393881986916e-15, + 6.35095764909494066e-16, + -1.44459347666914361e-17, + -1.43672693360005857e-18, + 3.66717664195927655e-20, + 2.85631964155579373e-21, + 3.14214634610545740e-03, + -5.47622651578667685e-05, + 2.57104061267283254e-06, + -1.21692272693220323e-07, + 3.51821460710315441e-09, + -5.24729720111600985e-11, + 2.08423826697928179e-12, + -1.67622037443809740e-13, + 3.55805319127238819e-15, + 1.43458933256911164e-16, + -2.38165375730031917e-18, + -4.38251573209519283e-19, + 8.94687822166465676e-21, + 8.46097677859212277e-22, + 1.45933856766013550e-04, + -3.41689931844538487e-06, + 2.21814162563294018e-07, + -1.23507340503588356e-08, + 4.45839863616577909e-10, + -1.21037273059200155e-11, + 5.08493378571246794e-13, + -2.64741043199881064e-14, + 6.90483899877214212e-16, + -5.98254751570936438e-19, + 3.12450785117811476e-19, + -5.34297819213414175e-20, + 8.77975336627394740e-22, + 7.47233312814497890e-23, + 2.04250579772008864e-06, + -7.25062459823180481e-08, + 6.27641074010788982e-09, + -4.17982471843176811e-10, + 2.01217102886631335e-11, + -8.63162345829439638e-13, + 4.15901256524930249e-14, + -1.95376427242431120e-15, + 7.05209180074011324e-17, + -2.17220944968943306e-18, + 9.29928107891258450e-20, + -4.27321703648851461e-21, + 1.05354105423465147e-22, + -7.79731960942688207e-25, + 4.33373225299837667e-09, + -3.07259541692528683e-10, + 3.72716481080376130e-11, + -3.35875115571560423e-12, + 2.45802833354505191e-13, + -1.64401581872004293e-14, + 1.03646399579461757e-15, + -5.95704755605623780e-17, + 3.09220565581448636e-18, + -1.50385424123081450e-19, + 7.03494689329289857e-21, + -3.07810409433855278e-22, + 1.22314437560571578e-23, + -4.60179173262555241e-25, +# root=7 base[11]=27.5 */ + 1.99973271303916622e-01, + -2.12920806587506501e-03, + 2.97265573886384622e-05, + -2.48994422367612201e-07, + -2.34129076798287727e-09, + -9.60795774953315714e-11, + 1.37254499494445832e-11, + -1.56994403056396301e-13, + -2.34300032069477034e-14, + 7.36030341135809414e-16, + 3.38533275886554515e-17, + -2.11107705202391871e-18, + -2.90306615314030464e-20, + 4.76549494667905589e-21, + 1.01959651005056592e-01, + -1.12270625265196012e-03, + 1.98158845640122064e-05, + -4.43496756396014908e-07, + 1.02372408103138437e-08, + -1.36647653477949530e-10, + -1.59602036276663055e-12, + 6.83191498662405566e-15, + 8.23859386152711059e-15, + -2.61895508640506349e-16, + -9.83666162921073138e-18, + 6.83238056740957223e-19, + 6.72111740402896289e-21, + -1.47887663274847970e-21, + 2.56556088838946553e-02, + -3.03049953331337271e-04, + 7.58971369605749836e-06, + -2.91485054776542366e-07, + 9.37997879429350609e-09, + -1.14196538504210484e-10, + -3.78195827473908266e-12, + 1.20344753342090533e-14, + 1.36270682411578730e-14, + -4.07379800331360739e-16, + -1.73918182112295751e-17, + 1.08866817357585532e-18, + 1.61655079635033358e-20, + -2.50608095439444930e-21, + 2.95624506861979401e-03, + -3.91471231068434074e-05, + 1.41895938590402793e-06, + -7.23943412538096498e-08, + 2.67075001148237419e-09, + -4.25138951422275961e-11, + -5.30503332536683094e-13, + -1.51016602952782645e-14, + 4.27450082717689893e-15, + -1.19068163861304320e-16, + -4.88552589867537997e-18, + 2.89222547078993021e-19, + 5.90165358909297454e-21, + -7.21293406664040811e-22, + 1.35027694483117871e-04, + -2.12911180874941000e-06, + 1.09984565153351688e-07, + -6.69810977943441815e-09, + 2.78585525043056340e-10, + -6.32540685010024355e-12, + 6.94901181851982809e-14, + -5.72944887174608470e-15, + 5.14205216273396925e-16, + -1.36463083323307046e-17, + -3.66597309842462811e-19, + 2.14331272288488012e-20, + 7.90995004925698499e-22, + -6.92009490105526313e-23, + 1.82748404318415121e-06, + -3.79209938835178594e-08, + 2.75688917958574634e-09, + -1.94654480885613164e-10, + 9.48902841583983088e-12, + -3.20560233623701731e-13, + 1.01339208863645371e-14, + -5.12367768109317730e-16, + 2.69120150479679910e-17, + -8.11331507248068826e-19, + 6.37848679325067440e-21, + -9.31971605137217548e-23, + 4.65763786477740883e-23, + -2.44723003339457056e-24, + 3.51561187046218952e-09, + -1.21830565640518923e-10, + 1.29166301801721049e-11, + -1.11989286730160839e-12, + 7.26100540536845301e-14, + -3.96509477897422901e-15, + 2.12868550371631002e-16, + -1.17166217715946662e-17, + 5.96138698894498099e-19, + -2.59346012679034975e-20, + 1.01865014203749906e-21, + -4.24429054191712124e-23, + 1.89832331591818452e-24, + -7.29425394268636906e-26, +# root=7 base[12]=30.0 */ + 1.91912180330647247e-01, + -1.90402626871477684e-03, + 2.65014723401862502e-05, + -2.86579325545934548e-07, + -1.63932554008752620e-09, + 1.25198989398098218e-10, + 3.64236291896122642e-12, + -3.96878662952207288e-13, + 6.66633020433024088e-15, + 5.08467509143630165e-16, + -2.80509309705100631e-17, + -5.76669508783096544e-20, + 5.29849600301856356e-20, + -1.53984213575115360e-21, + 9.77558170929204717e-02, + -9.82901654912486005e-04, + 1.53809618949944165e-05, + -3.03171542864389515e-07, + 7.24845819091592180e-09, + -1.52872729055140328e-10, + 6.54853298813883655e-13, + 9.88696346959079879e-14, + -1.76837255386920508e-15, + -1.64222503138200825e-16, + 9.05602755032926090e-18, + 3.33433112461688425e-23, + -1.60560401202275034e-20, + 4.99423627292466927e-22, + 2.45460284924057873e-02, + -2.53974318255328630e-04, + 4.90303492974541385e-06, + -1.63809470124290986e-07, + 6.40289190286131844e-09, + -1.67669429486619473e-10, + 3.61149644264361546e-14, + 1.70262257861801221e-13, + -2.76455023245674191e-15, + -2.79998047996543537e-16, + 1.48895018493505240e-17, + 3.12035547327101267e-20, + -2.78649949728803742e-20, + 8.00285583022008495e-22, + 2.81779290205582322e-03, + -3.06128351115635448e-05, + 7.76468074722594826e-07, + -3.70809138212581996e-08, + 1.71912278580650529e-09, + -4.95365766675892047e-11, + 1.95887669592275577e-13, + 4.04500592320252309e-14, + -5.42209755470011446e-16, + -8.49143220189995143e-17, + 4.25268063627262217e-18, + 1.40766907834624518e-20, + -8.08720205474483912e-21, + 2.17568060486741921e-22, + 1.27856791918993682e-04, + -1.50415226393547111e-06, + 5.23877792530603091e-08, + -3.18968790737287889e-09, + 1.63239129043720119e-10, + -5.22762286860628437e-12, + 5.72732173375739402e-14, + 2.06910674224480350e-15, + 4.15382083720418318e-18, + -9.17923104673128642e-18, + 4.12434506770668905e-19, + 1.43788500943067802e-21, + -7.49246529784346463e-22, + 1.81983965435481857e-23, + 1.70820368461854182e-06, + -2.30479263435910190e-08, + 1.15338871459448923e-09, + -8.43585549111060462e-11, + 4.74352154043513130e-12, + -1.77143093468423392e-13, + 3.87630346396045218e-15, + -5.51333421682040286e-17, + 4.27039351556586435e-18, + -3.76955361260435633e-19, + 1.46395281910241214e-20, + -5.15040365543458685e-23, + -1.72282921357421416e-23, + 3.27571515119540491e-25, + 3.17152709699140061e-09, + -5.71537362248409150e-11, + 4.49965053675005215e-12, + -3.96573361204777098e-13, + 2.61038363465420843e-14, + -1.28644583298953374e-15, + 5.23601279731553971e-17, + -2.20635669192132764e-18, + 1.12680687641136697e-19, + -5.75224709246305782e-21, + 2.31868467894967538e-22, + -6.64150626066688078e-24, + 1.57443861034326068e-25, + -7.16089130395543266e-27, +# root=7 base[13]=32.5 */ + 1.84697958898375564e-01, + -1.70601150193419289e-03, + 2.29942077603480833e-05, + -2.91227604163155471e-07, + 1.00837284329902907e-09, + 1.13059253408725551e-10, + -3.13965870949845644e-12, + -8.02569980222053375e-14, + 8.67021502349340269e-15, + -2.26874252447151348e-16, + -4.77608364048090151e-18, + 5.52178990379415807e-19, + -1.42001950833020647e-20, + -3.15440546695290803e-22, + 9.40497538065422772e-02, + -8.72657397362082139e-04, + 1.23428147607730768e-05, + -2.10022469762008263e-07, + 4.52470733689242753e-09, + -1.13485300527047861e-10, + 2.19139341134436160e-12, + 8.08235165187908066e-15, + -2.49954667228691404e-15, + 6.86479095584750546e-17, + 1.49739732499094653e-18, + -1.72003835672088025e-19, + 4.51118751406272053e-21, + 8.92607302899615674e-23, + 2.35982619409717230e-02, + -2.21118836864081227e-04, + 3.44530342526992812e-06, + -8.67829065178965706e-08, + 3.36731254527172769e-09, + -1.25066568963499251e-10, + 2.79775546794023258e-12, + 2.13144734361797600e-14, + -4.16994326299191855e-15, + 1.12237012141583780e-16, + 2.62954303317792462e-18, + -2.91932367342073251e-19, + 7.45880479304007115e-21, + 1.67932976113354117e-22, + 2.70551191697607349e-03, + -2.57853319180323603e-05, + 4.65576980162013707e-07, + -1.69206488697174525e-08, + 8.49102333250902042e-10, + -3.49245480564376114e-11, + 8.41587808794436945e-13, + 3.27970657272430000e-15, + -1.08845720487616723e-15, + 2.93130849533506438e-17, + 8.12253078184786370e-19, + -8.44310758028710736e-20, + 2.10847650581676270e-21, + 5.15639446813184672e-23, + 1.22488898452055047e-04, + -1.20112614206742868e-06, + 2.66222952118526246e-08, + -1.32246164826568258e-09, + 7.63036604868403456e-11, + -3.34056485644434204e-12, + 8.84090953334801601e-14, + -2.43675671897252028e-16, + -8.02071806737020443e-17, + 2.12010399674755572e-18, + 8.91880437733955918e-20, + -8.08682831321231697e-21, + 1.96012586461898686e-22, + 5.12345701907880341e-24, + 1.62956048055365084e-06, + -1.68181270007714249e-08, + 4.94883084754703562e-10, + -3.21207380824139568e-11, + 2.04624161646416342e-12, + -9.60200594185532128e-14, + 2.92974258533255662e-15, + -3.78890219966333859e-17, + -8.43096300353442504e-19, + 1.38673662528780942e-20, + 3.59259367190010334e-21, + -2.48314028240361854e-22, + 5.98922293486494826e-24, + 1.29571580687261068e-25, + 2.99267184395900521e-09, + -3.46849861573736312e-11, + 1.57484011052552255e-12, + -1.32060745711478856e-13, + 9.42435905968227378e-15, + -5.03243101941851330e-16, + 1.98898440711309842e-17, + -5.95025487908335311e-19, + 1.68717828683064637e-20, + -7.77322654508891633e-22, + 4.73816126479971062e-23, + -2.26840981214503569e-24, + 6.87528994062787986e-26, + -7.75079436508252459e-28, +# root=7 base[14]=35.0 */ + 1.78220264884072943e-01, + -1.53561909270237356e-03, + 1.96566854815812361e-05, + -2.61400096435368505e-07, + 2.46232676053274790e-09, + 3.41693526151744453e-11, + -2.78053116448414288e-12, + 6.44989340568087696e-14, + 1.00940933829903690e-15, + -1.37684543756975030e-16, + 4.85704696580538868e-18, + -2.81636391457918283e-20, + -5.36219126333914970e-21, + 2.73577512350516318e-22, + 9.07421808004042207e-02, + -7.82919340745389454e-04, + 1.01911593573173585e-05, + -1.52982002154604762e-07, + 2.76278459132817105e-09, + -6.48104618928227141e-11, + 1.68571446572353582e-12, + -3.16332998851521128e-14, + -1.75705967354144165e-16, + 4.15089581300862344e-17, + -1.49527705785403430e-18, + 8.50777354474957887e-21, + 1.65684660246380385e-21, + -8.41745420480115581e-23, + 2.27633883430462675e-02, + -1.96972396485437727e-04, + 2.65645658694519915e-06, + -4.92858205082180851e-08, + 1.52469775541367276e-09, + -6.18765823997985834e-11, + 2.16592149933477249e-12, + -4.56373770609780461e-14, + -3.26703856142474028e-16, + 6.87917157750357643e-17, + -2.49383488504352811e-18, + 1.39009590238642067e-20, + 2.83475346423819001e-21, + -1.44179541933442282e-22, + 2.60879880103397251e-03, + -2.26879925549317940e-05, + 3.24491948075262730e-07, + -7.85160014603211108e-09, + 3.44166897392052718e-10, + -1.65057406343036387e-11, + 6.16429275862446270e-13, + -1.37597514146688844e-14, + -5.63340100057863693e-17, + 1.85005293725708065e-17, + -6.87911707670284905e-19, + 3.54843654714724529e-21, + 8.22598873131677149e-22, + -4.17128116920622190e-23, + 1.18033358029875590e-04, + -1.03522915246059887e-06, + 1.62299140011585784e-08, + -5.27315577130600465e-10, + 2.90019853751260156e-11, + -1.50944250419877778e-12, + 5.88840380635200040e-14, + -1.41811077958416316e-15, + 1.55557195244792303e-18, + 1.48493436325486883e-18, + -5.80743781963685912e-20, + 2.21295749572779144e-22, + 7.85264727465513474e-23, + -3.94225327016643093e-24, + 1.56838712309056230e-06, + -1.39673828378610078e-08, + 2.53783591577283598e-10, + -1.13271428308774904e-11, + 7.31442806619957504e-13, + -4.04629276866113693e-14, + 1.66645533692722123e-15, + -4.51838906202610450e-17, + 4.14018789250453198e-19, + 2.56950597164061714e-20, + -1.15350398479493348e-21, + -3.23199947810173329e-24, + 2.31675081900117235e-24, + -1.12521649047266807e-25, + 2.87188546523676893e-09, + -2.64826897705088144e-11, + 6.33364078313373593e-13, + -4.06550672790438488e-14, + 3.02403006467407693e-15, + -1.81448037690275891e-16, + 8.31337933749366975e-18, + -2.81314177294603926e-19, + 6.48755959389221523e-21, + -8.76461021098374442e-23, + 1.91322541501444789e-24, + -2.29534686932134170e-25, + 1.70550746985140976e-26, + -7.44306664718409454e-28, +# root=7 base[15]=37.5 */ + 1.72373417248732147e-01, + -1.39021153049175765e-03, + 1.67688072509515358e-05, + -2.19528258055658126e-07, + 2.62861437320457742e-09, + -1.05987630697958256e-11, + -1.02888269507575696e-12, + 4.97638768331285326e-14, + -1.13630665334188984e-15, + -4.65994650182580448e-18, + 1.57868744807871217e-18, + -6.88311082132812126e-20, + 1.35773632128676744e-21, + 1.65153299159512087e-23, + 8.77628825541018898e-02, + -7.08067446905061510e-04, + 8.58412875616515472e-06, + -1.17247631057542446e-07, + 1.80058715959315271e-09, + -3.46134274631909103e-11, + 8.72400032626562852e-13, + -2.32897675197766753e-14, + 4.52377164592378989e-16, + 5.06652824827908958e-19, + -4.86291893074610808e-19, + 2.13140970542289481e-20, + -4.15142690374407872e-22, + -5.28078657589978899e-24, + 2.20147383018395315e-02, + -1.77749609108955001e-04, + 2.17852090071607867e-06, + -3.23992738293087982e-08, + 7.04766993571795632e-10, + -2.47498704575051936e-11, + 9.91454018294160554e-13, + -3.30397639289303681e-14, + 7.06954328482331103e-16, + 6.11950265319009827e-19, + -7.98812457593598075e-19, + 3.57141966080152684e-20, + -7.08504862271181636e-22, + -8.73488050017227626e-24, + 2.52274685660209760e-03, + -2.03958299447400288e-05, + 2.54669700353072039e-07, + -4.31054306373044257e-09, + 1.31706210165216454e-10, + -6.09645558231857450e-12, + 2.72208451852317675e-13, + -9.48000560798148638e-15, + 2.11725270464858948e-16, + -2.63543955542303262e-19, + -2.15727569270702836e-19, + 9.98758137786800138e-21, + -2.01391676539462180e-22, + -2.48193987325326089e-24, + 1.14120705116812240e-04, + -9.24672808228450665e-07, + 1.19032483714178267e-08, + -2.40924141028407101e-10, + 9.91340490400666472e-12, + -5.32397874860843440e-13, + 2.50409840987586163e-14, + -9.00849546621799135e-16, + 2.12930942222035690e-17, + -9.96816383586493661e-20, + -1.75813702517076940e-20, + 8.72399391869687013e-22, + -1.80069565460128813e-23, + -2.32078957062947823e-25, + 1.51593239711882481e-06, + -1.23312473727932430e-08, + 1.67317278225626866e-10, + -4.32034115951893115e-12, + 2.29915438296149864e-13, + -1.35977401120704222e-14, + 6.67263458605126571e-16, + -2.50679066462744960e-17, + 6.48627561846187505e-19, + -6.61315981073183002e-21, + -3.28384739654970256e-22, + 1.96398425463701889e-23, + -4.16673939492497842e-25, + -6.94167630588377085e-27, + 2.77387075886459672e-09, + -2.27617571903122971e-11, + 3.44792746013810075e-13, + -1.27523447101887302e-14, + 8.62064103197386765e-16, + -5.56684931598154521e-17, + 2.91041059668154706e-18, + -1.19309025224168743e-19, + 3.67802342908389770e-21, + -7.46712861372790046e-23, + 4.08419632111940983e-25, + 2.82371746442849328e-26, + -3.83060076981666586e-28, + -6.28583174225279726e-29, +# root=7 base[16]=40.0 */ + 1.65608788397920370e-01, + -1.97271846757954023e-03, + 3.52268418630655175e-05, + -6.95313860046449087e-07, + 1.39296754971836573e-08, + -2.38190835714961908e-10, + 1.27750650892417524e-13, + 3.29642633072739535e-13, + -2.36569033932324910e-14, + 1.02968758754705813e-15, + -2.11751518571146226e-17, + -9.33091890899151413e-19, + 1.21776636206499278e-19, + -6.73884935699275516e-21, + 8.43181431697737765e-02, + -1.00445152049609843e-03, + 1.79538561199208077e-05, + -3.57696168512306970e-07, + 7.63222098890892189e-09, + -1.82416433333134433e-10, + 5.55045432963906891e-12, + -2.24666127993250967e-13, + 9.94464915025542107e-15, + -3.68707872940018151e-16, + 7.17793400153264707e-18, + 2.94646249959443583e-19, + -3.82217825240791232e-20, + 2.08624486504308073e-21, + 2.11503393092487973e-02, + -2.51989138291965162e-04, + 4.51353469610428981e-06, + -9.17245786989421672e-08, + 2.20840520953714798e-09, + -7.91325221076041754e-11, + 4.39732426013496312e-12, + -2.72422542958348187e-13, + 1.46885748669214177e-14, + -5.94769917002254519e-16, + 1.24914030970580189e-17, + 4.54140256834446530e-19, + -6.31070154754383290e-20, + 3.52697674810867640e-21, + 2.42363121918850793e-03, + -2.88820561790435565e-05, + 5.19181987368733482e-07, + -1.09071232657976013e-08, + 3.11567199620362953e-10, + -1.57463773353528591e-11, + 1.10927113101904680e-12, + -7.51382481736708038e-14, + 4.19572441953485158e-15, + -1.74351047841575955e-16, + 3.91519934810139841e-18, + 1.12284623525096792e-19, + -1.74447554457924628e-20, + 9.99959055079540373e-22, + 1.09632437231861268e-04, + -1.30695628086541775e-06, + 2.36333522042928990e-08, + -5.23350101470441016e-10, + 1.85503387190548405e-11, + -1.22562336997992155e-12, + 9.72376707300187864e-14, + -6.86501553710741399e-15, + 3.92583490225877525e-16, + -1.68209294354713658e-17, + 4.15880189765733977e-19, + 7.42338041701885678e-21, + -1.49642957766348122e-21, + 8.97496713280449672e-23, + 1.45620344906210387e-06, + -1.73710022489164021e-08, + 3.17391285121460165e-10, + -7.66213335888594704e-12, + 3.53433113937320492e-13, + -2.88000801886985569e-14, + 2.46186248660696260e-15, + -1.79636066070529351e-16, + 1.05892523224673837e-17, + -4.76548683969594039e-19, + 1.36213350274270366e-20, + 4.02266093806976767e-23, + -3.26999945364963498e-23, + 2.16871032336266691e-24, + 2.66413836072297157e-09, + -3.18245755741923053e-11, + 5.94583398134172677e-13, + -1.69202232563256686e-14, + 1.09493515896598685e-15, + -1.06783630460632874e-16, + 9.76149471874470913e-18, + -7.47088177966622936e-19, + 4.67509334392538928e-20, + -2.32660260280929058e-21, + 8.50459852672646134e-23, + -1.60598348996236160e-24, + -4.93367434790392793e-26, + 5.76429598502716955e-27, +# root=7 base[17]=44.0 */ + 1.58233586282373689e-01, + -1.72084023593289275e-03, + 2.80693561415569955e-05, + -5.08409188907674104e-07, + 9.62362328725863068e-09, + -1.82183496830403088e-10, + 3.03503600315337292e-12, + -1.40643007506332763e-14, + -2.79223437081358303e-15, + 2.20894065198382946e-16, + -1.13322084234462031e-17, + 4.21027613729620378e-19, + -8.95976373930036526e-21, + -1.62697496096022284e-22, + 8.05630279395101734e-02, + -8.76152843962268286e-04, + 1.42926596345323021e-05, + -2.59156851010044498e-07, + 4.94826147839613402e-09, + -9.88009726764283704e-11, + 2.15629818045017609e-12, + -5.82400846960258452e-14, + 2.14026150687548162e-15, + -9.41889475726423307e-17, + 3.99832785575864079e-18, + -1.37505790827895251e-19, + 2.76674145184612909e-21, + 5.64576183962327912e-23, + 2.02083526377504173e-02, + -2.19775744046202053e-04, + 3.58592887124947583e-06, + -6.51716375649542366e-08, + 1.26745340737176936e-09, + -2.80598971013764543e-11, + 8.72932866975274239e-13, + -4.24442708901880514e-14, + 2.48468709070193305e-15, + -1.37160218545998158e-16, + 6.40628151086812680e-18, + -2.31600252978690926e-19, + 4.97106109849916849e-21, + 7.83951625100271094e-23, + 2.31567761631746964e-03, + -2.51845990861412958e-05, + 4.11063053536342996e-07, + -7.50039779822602390e-09, + 1.50402215195001636e-10, + -3.86281386389994218e-12, + 1.65921604585114898e-13, + -1.04161403804091037e-14, + 6.75781812040443831e-16, + -3.87071116461737064e-17, + 1.84210840979887278e-18, + -6.78891011802655743e-20, + 1.53155308843580700e-21, + 1.72295699076633885e-23, + 1.04748378814111814e-04, + -1.13924584770633274e-06, + 1.86053874355576867e-08, + -3.41683990743885224e-10, + 7.18954136193052135e-12, + -2.23443303612776016e-13, + 1.24988918994047203e-14, + -8.95609525142196181e-16, + 6.07860504800473326e-17, + -3.55278798769095394e-18, + 1.71990725374805551e-19, + -6.50285408385407998e-21, + 1.57624500594032236e-22, + 7.67129752150064723e-25, + 1.39131193329073994e-06, + -1.51327285808869399e-08, + 2.47380336297016017e-10, + -4.59389743444449436e-12, + 1.04477838344440335e-13, + -4.11283339251653137e-15, + 2.84832263893769380e-16, + -2.21444679642500361e-17, + 1.55047977881929658e-18, + -9.25788479716583886e-20, + 4.59636496624992628e-21, + -1.81236968100492099e-22, + 4.90575839425422328e-24, + -2.11435555817537410e-26, + 2.54534643461324100e-09, + -2.76876450578588873e-11, + 4.53544596847513594e-13, + -8.61858464409418619e-15, + 2.26415474061418043e-16, + -1.21121969944954897e-17, + 1.00868513755481935e-18, + -8.37989700607086433e-20, + 6.08977456487351237e-21, + -3.77611278907396856e-22, + 1.97360834505420261e-23, + -8.47266179273861635e-25, + 2.77955489723284601e-26, + -5.19167286990524621e-28, +# root=7 base[18]=48.0 */ + 1.51764057308854755e-01, + -1.51832376084338268e-03, + 2.27842446045580108e-05, + -3.79868884487652857e-07, + 6.64654475152202675e-09, + -1.19190820198331350e-10, + 2.13402606784388412e-12, + -3.50812093441673696e-14, + 3.18313904796601609e-16, + 1.55437411018705159e-17, + -1.46107058521782848e-18, + 8.08982899031824621e-20, + -3.50070964710895547e-21, + 1.18780349718471980e-22, + 7.72691255299629426e-02, + -7.73039376967523057e-04, + 1.16004607641090137e-05, + -1.93427533033729199e-07, + 3.38757249247164570e-09, + -6.11571617981113998e-11, + 1.13803877708545820e-12, + -2.25770127928074076e-14, + 5.29795883734791848e-16, + -1.67314832504991425e-17, + 6.79560473742281895e-19, + -2.93005938944808176e-20, + 1.15540736827751823e-21, + -3.74819817590751538e-23, + 1.93821094135809800e-02, + -1.93908568787671761e-04, + 2.90989860136503074e-06, + -4.85305442988595875e-08, + 8.51647988252955453e-10, + -1.55953635906326565e-11, + 3.13298910209896116e-13, + -8.21585895647295353e-15, + 3.32395341809731313e-16, + -1.76034189887762487e-17, + 9.47338356412375656e-19, + -4.59864964904539232e-20, + 1.91004128117832771e-21, + -6.39979107367171839e-23, + 2.22099754242812515e-03, + -2.22200286526204788e-05, + 3.33455379841340028e-07, + -5.56333385736449037e-09, + 9.79636750790312514e-11, + -1.83692869951882886e-12, + 4.13650093232274766e-14, + -1.44435542370534189e-15, + 7.75563991664886105e-17, + -4.68247830564806455e-18, + 2.63945405638461514e-19, + -1.30590899573510028e-20, + 5.49234698916481944e-22, + -1.86791627466374839e-23, + 1.00465522731822354e-04, + -1.00511213034372182e-06, + 1.50843795700169824e-08, + -2.51816716606260530e-10, + 4.45884015226682394e-12, + -8.67837515158098015e-14, + 2.27779390283284681e-15, + -1.02985632184046227e-16, + 6.48340147086486975e-18, + -4.14377268039976845e-19, + 2.38688184119936186e-20, + -1.19659896883621664e-21, + 5.10207315918127060e-23, + -1.77171875632603138e-24, + 1.33442397220553785e-06, + -1.33503564754338475e-08, + 2.00373028337058462e-10, + -3.34839807519822472e-12, + 5.98486944946139199e-14, + -1.23714047645213332e-15, + 3.96381498748941011e-17, + -2.24528230280205466e-18, + 1.56248113740314011e-19, + -1.03449049288978524e-20, + 6.06980301745045835e-22, + -3.09449699896235084e-23, + 1.34812002185676562e-24, + -4.84512051916936871e-26, + 2.44126757452166362e-09, + -2.44240400026915946e-11, + 3.66632398608792974e-13, + -6.13930157061589438e-15, + 1.11830051946966622e-16, + -2.58417404009621754e-18, + 1.08760268333851156e-19, + -7.56091289004787133e-21, + 5.68029495924974487e-22, + -3.89230901822847709e-23, + 2.34766986886939366e-24, + -1.23571277096583707e-25, + 5.62396548022936546e-27, + -2.16540274291849506e-28, +# root=7 base[19]=52.0 */ + 1.46028774427777980e-01, + -1.35264030095837693e-03, + 1.87933802972868065e-05, + -2.90121464075286641e-07, + 4.70243079869569138e-09, + -7.83678209709763251e-11, + 1.32708242152572836e-12, + -2.24806343730996051e-14, + 3.62400659231448478e-16, + -4.37977632226700367e-18, + -4.27453612809425244e-20, + 7.16711242800355382e-21, + -4.26628946457453236e-22, + 1.96316836297932243e-23, + 7.43490641576359940e-02, + -6.88683057476033203e-04, + 9.56846377688312063e-06, + -1.47713664969675662e-07, + 2.39441790186586039e-09, + -3.99312863597165731e-11, + 6.79249696738840119e-13, + -1.17940315989961550e-14, + 2.13663450603926271e-16, + -4.35483507193468365e-18, + 1.14211374737177556e-19, + -4.02262272936019044e-21, + 1.64518730415455796e-22, + -6.64850702716599970e-24, + 1.86496439256234221e-02, + -1.72748568939623651e-04, + 2.40014669594302527e-06, + -3.70530290218108340e-08, + 6.00733053326445615e-10, + -1.00330309749019911e-11, + 1.72307164907582079e-13, + -3.14596042588143005e-15, + 6.93208057081837561e-17, + -2.24078844753240617e-18, + 1.02293706619282967e-19, + -5.17451149119485465e-21, + 2.49170668086390195e-22, + -1.07677971988366902e-23, + 2.13706421383381973e-03, + -1.97952742089531336e-05, + 2.75033571920450724e-07, + -4.24604168228095797e-09, + 6.88612421446319629e-11, + -1.15293033034525586e-12, + 2.01193902123810265e-14, + -3.97104196269760835e-16, + 1.10220979622789629e-17, + -4.82364184203119152e-19, + 2.62450499998246333e-20, + -1.41819955417909413e-21, + 6.99735857369454327e-23, + -3.05993431870419834e-24, + 9.66688443660271198e-05, + -8.95427719805295401e-07, + 1.24410231116513446e-08, + -1.92076791871108775e-10, + 3.11658742993859368e-12, + -5.23893335390577102e-14, + 9.37591602418596875e-16, + -2.06616365737957801e-17, + 7.26660930710263939e-19, + -3.86262037101527941e-20, + 2.27615539035545855e-21, + -1.26502200096503908e-22, + 6.32382214739944443e-24, + -2.79307942990356437e-25, + 1.28399486852901223e-06, + -1.18934374109214160e-08, + 1.65247628829101712e-10, + -2.55145443439335129e-12, + 4.14334046843742644e-14, + -7.01169557006638988e-16, + 1.30735073457675911e-17, + -3.35721840347599774e-19, + 1.48733560090267154e-20, + -9.01383927421013615e-22, + 5.56651062887598546e-23, + -3.15493017040229968e-24, + 1.59858850214737615e-25, + -7.16035120918704108e-27, + 2.34900956353392159e-09, + -2.17585059936950723e-11, + 3.02316147796963995e-13, + -4.66852864902935123e-15, + 7.59364244863869850e-17, + -1.30215791020319123e-18, + 2.62086178847773032e-20, + -8.43715527605248067e-22, + 4.70646813546827656e-23, + -3.15148300050605315e-24, + 2.02234035429627971e-25, + -1.17338236478911595e-26, + 6.08197844289625525e-28, + -2.79938843639820191e-29, +# root=7 base[20]=56.0 */ + 1.40898519735084438e-01, + -1.21504887708721063e-03, + 1.57167067692980007e-05, + -2.25883241314227795e-07, + 3.40873384248289244e-09, + -5.29080738496585999e-11, + 8.36215430067956818e-13, + -1.33693928850479316e-14, + 2.14262720802703549e-16, + -3.34806706835603336e-18, + 4.55038793752983173e-20, + -2.01555323563958263e-22, + -2.52623691941149238e-23, + 1.74792789070501665e-24, + 7.17370471736473309e-02, + -6.18629769091201087e-04, + 8.00200156461653999e-06, + -1.15006221804570589e-07, + 1.73553455894524623e-09, + -2.69394025040217299e-11, + 4.25965575219465720e-13, + -6.82876406686906728e-15, + 1.11014761146359167e-16, + -1.85317246271580148e-18, + 3.33164600461090933e-20, + -7.21011082313655647e-22, + 2.09015643168735064e-23, + -7.62757623936480695e-25, + 1.79944482183410637e-02, + -1.55176464826519756e-04, + 2.00721411688601636e-06, + -2.88480808184956764e-08, + 4.35346370695883332e-10, + -6.75841328615005897e-12, + 1.06963969657781901e-13, + -1.72465365833384458e-15, + 2.88807736998578405e-17, + -5.44737586422431356e-19, + 1.38238457827575622e-20, + -5.14548306420366859e-22, + 2.34984793093521883e-23, + -1.08699297000964447e-24, + 2.06198528187874139e-03, + -1.77816837831224815e-05, + 2.30006857998824018e-07, + -3.30571097702991617e-09, + 4.98876551157172930e-11, + -7.74632542904541196e-13, + 1.22792821803640946e-14, + -1.99901530518875454e-16, + 3.51023740300446590e-18, + -7.79752385890938669e-20, + 2.65141917194626457e-21, + -1.24320604604264252e-22, + 6.28140209174731364e-24, + -3.01379130071461625e-25, + 9.32726927952622228e-05, + -8.04344025056538394e-07, + 1.04042272035637535e-08, + -1.49532401573778546e-10, + 2.25673106256893713e-12, + -3.50534644066233588e-14, + 5.57062757431671748e-16, + -9.20800470252208386e-18, + 1.73462749333069446e-19, + -4.66899818277858887e-21, + 1.98654914642209300e-22, + -1.04691701520404191e-23, + 5.51794942491006685e-25, + -2.69128184909267918e-26, + 1.23888579938672873e-06, + -1.06836242495638162e-08, + 1.38193218554430290e-10, + -1.98616118841739658e-12, + 2.99768418382478353e-14, + -4.65889810080149548e-16, + 7.43491675477857840e-18, + -1.25989803317566555e-19, + 2.63273598728512127e-21, + -8.77604996113280708e-23, + 4.42703355728963051e-24, + -2.50091879835817053e-25, + 1.35233197366779929e-26, + -6.68346356340948224e-28, + 2.26648458168725028e-09, + -1.95451995682106842e-11, + 2.52818295424199324e-13, + -3.63362912655059446e-15, + 5.48483533458215261e-17, + -8.53369615521789057e-19, + 1.37296438194855297e-20, + -2.43789072606660746e-22, + 6.01584368498704738e-24, + -2.55659391943361168e-25, + 1.47987220928829562e-26, + -8.80147618345900860e-28, + 4.87514099593056006e-29, + -2.45383281233482316e-30, +# root=7 base[21]=60.0 */ + 1.36273835550349665e-01, + -1.09930435863633889e-03, + 1.33016420847243805e-05, + -1.78833012420732635e-07, + 2.52451742596121726e-09, + -3.66557370597607625e-11, + 5.42082762578270580e-13, + -8.11961746586430406e-15, + 1.22696784271085339e-16, + -1.86078664385730233e-18, + 2.79126778976467465e-20, + -3.92128723667655960e-22, + 3.95099521160847060e-24, + 4.52782924664284382e-26, + 6.93824362925258842e-02, + -5.59699624850169743e-04, + 6.77239568901946109e-06, + -9.10510113775334101e-08, + 1.28533297791629438e-09, + -1.86629886284329504e-11, + 2.76007439422882497e-13, + -4.13523338711013836e-15, + 6.25806615466739612e-17, + -9.56317976590565101e-19, + 1.48497982140156487e-20, + -2.40645293566216937e-22, + 4.38879229677266355e-24, + -1.01705742009805549e-25, + 1.74038200102882776e-02, + -1.40394486741135147e-04, + 1.69878087910216057e-06, + -2.28391452246782025e-08, + 3.22411955780387314e-10, + -4.68145489771192635e-12, + 6.92395788234542139e-14, + -1.03792615845865531e-15, + 1.57569903038648686e-17, + -2.44659475891237959e-19, + 4.06732083243769126e-21, + -8.23832767348591308e-23, + 2.37955993383699607e-24, + -9.27280296895886061e-26, + 1.99430514744944679e-03, + -1.60878156338029938e-05, + 1.94663440209817349e-07, + -2.61713984905135482e-09, + 3.69452762142205006e-11, + -5.36457844419144167e-13, + 7.93535174680093034e-15, + -1.19060910727199459e-16, + 1.81703966704366790e-18, + -2.89591590345102056e-20, + 5.32414186405739242e-22, + -1.37167521530343255e-23, + 5.21663241178157980e-25, + -2.37531584413106284e-26, + 9.02112216676261702e-05, + -7.27722888696201210e-07, + 8.80548645084817825e-09, + -1.18384808048594191e-10, + 1.67120244651348217e-12, + -2.42670403358107541e-14, + 3.59036040189265170e-16, + -5.39465564835082569e-18, + 8.30205778035585285e-20, + -1.37697626054796395e-21, + 2.89147512853696550e-23, + -9.33126541391708502e-25, + 4.18800611793732924e-26, + -2.04305864999180597e-27, + 1.19822209589213260e-06, + -9.66591106229211989e-09, + 1.16958050553430696e-10, + -1.57243564597624739e-12, + 2.21976889861607250e-14, + -3.22339562009876290e-16, + 4.77071741030881261e-18, + -7.18512425790864412e-20, + 1.12093239424755147e-21, + -1.97724164168132274e-23, + 4.91560411886527984e-25, + -1.93954669813679339e-26, + 9.68574949474729195e-28, + -4.91531843328307837e-29, + 2.19209220597149450e-09, + -1.76833396746652635e-11, + 2.13969380671822605e-13, + -2.87670048699386792e-15, + 4.06099907429234060e-17, + -5.89756728132589142e-19, + 8.73425578387711282e-21, + -1.32139598095340461e-22, + 2.11508204887889111e-24, + -4.14628261297082426e-26, + 1.28680233974487927e-27, + -6.10123354873448293e-29, + 3.29480790101401951e-30, + -1.72421560357058202e-31, +# root=7 base[22]=64.0 */ + 1.32076754389603535e-01, + -1.00084001589645843e-03, + 1.13759029984025116e-05, + -1.43668815465775243e-07, + 1.90514310264265600e-09, + -2.59852357513635006e-11, + 3.60988832848052199e-13, + -5.07995506704990626e-15, + 7.21692149183639064e-17, + -1.03248675516624334e-18, + 1.48306229590640277e-20, + -2.12311115526707298e-22, + 2.95238281500633978e-24, + -3.60216153562521841e-26, + 6.72455351399161849e-02, + -5.09567506936863522e-04, + 5.79192522139077048e-06, + -7.31475151993598468e-08, + 9.69984248137251614e-10, + -1.32301227256624034e-11, + 1.83794352169983462e-13, + -2.58646826256914713e-15, + 3.67499497159106429e-17, + -5.26156111291907701e-19, + 7.58615915839226457e-21, + -1.10452995565867260e-22, + 1.64587549504333818e-24, + -2.61989234297076944e-26, + 1.68678018905846147e-02, + -1.27819397065789581e-04, + 1.45284065355709322e-06, + -1.83482486695031493e-08, + 2.43309881357100320e-10, + -3.31863293925382691e-12, + 4.61030885915024027e-14, + -6.48819517850691910e-16, + 9.22137680063444187e-18, + -1.32234674688590242e-19, + 1.92177432120817643e-21, + -2.89672115977648653e-23, + 4.89300299864320353e-25, + -1.07872455772669638e-26, + 1.93288278760409514e-03, + -1.46468350835435635e-05, + 1.66481128463391193e-07, + -2.10252731971185353e-09, + 2.78809020087258075e-11, + -3.80282869081568019e-13, + 5.28301397352568356e-15, + -7.43544966041120126e-17, + 1.05726485327651205e-18, + -1.52016414303751542e-20, + 2.23849449982148671e-22, + -3.56266351218283051e-24, + 7.08469584775472196e-26, + -2.05280777817674524e-27, + 8.74328173059390448e-05, + -6.62540979828579600e-07, + 7.53067604082993350e-09, + -9.51065891515461287e-11, + 1.26117643218866425e-12, + -1.72019042954581993e-14, + 2.38978123100529123e-16, + -3.36382653387996882e-18, + 4.78668099646276056e-20, + -6.91149801427141681e-22, + 1.03876258541286380e-23, + -1.78749667838034709e-25, + 4.27694753566931098e-27, + -1.52329012556723720e-28, + 1.16131820038137040e-06, + -8.80013846178065799e-09, + 1.00025498720755324e-10, + -1.26324437916871370e-12, + 1.67514622411122559e-14, + -2.28483371007505195e-16, + 3.17429259096303631e-18, + -4.46893188665444533e-20, + 6.36698908211063931e-22, + -9.25666511222274755e-24, + 1.43705725551520038e-25, + -2.76123994705194901e-27, + 8.05201148365449305e-29, + -3.34623426343314756e-30, + 2.12457822669063679e-09, + -1.60994485082630072e-11, + 1.82992049025469493e-13, + -2.31104756089935231e-15, + 3.06460447128994289e-17, + -4.18002147730985512e-19, + 5.80752170684298598e-21, + -8.17899285332067807e-23, + 1.16795504187817571e-24, + -1.72002736065702538e-26, + 2.82962147417157164e-28, + -6.41759029524908051e-30, + 2.31810638824359622e-31, + -1.08862694143257998e-32, +# root=7 base[23]=68.0 */ + 1.28245173025315462e-01, + -9.16247357833369406e-04, + 9.81902378931309147e-06, + -1.16917503189823576e-07, + 1.46177090023152939e-09, + -1.87980661760158278e-11, + 2.46215682375004272e-13, + -3.26679322493762574e-15, + 4.37603772469947444e-17, + -5.90515208944527792e-19, + 8.01402742158516506e-21, + -1.09187180757813508e-22, + 1.48797216162438613e-24, + -2.00420308044643524e-26, + 6.52947244884522632e-02, + -4.66498016117936445e-04, + 4.99925601835715743e-06, + -5.95273566981703101e-08, + 7.44245776323531256e-10, + -9.57084425165851335e-12, + 1.25358233952895321e-13, + -1.66325733047516506e-15, + 2.22804217794569108e-17, + -3.00677926134741262e-19, + 4.08202340602833605e-21, + -5.57128708717580808e-23, + 7.65177839290547501e-25, + -1.06376077296757943e-26, + 1.63784625236428373e-02, + -1.17015889632784056e-04, + 1.25400831361394680e-06, + -1.49317818350185068e-08, + 1.86685857015402785e-10, + -2.40074097764323857e-12, + 3.14447458744045910e-14, + -4.17211278563692103e-16, + 5.58894272201783325e-18, + -7.54340597529782249e-20, + 1.02487035124542234e-21, + -1.40396908037009321e-23, + 1.95990553648335541e-25, + -2.89999625246615182e-27, + 1.87680934983202913e-03, + -1.34088602898357182e-05, + 1.43696914432770307e-07, + -1.71103409297189311e-09, + 2.13923476340771994e-11, + -2.75101123311651570e-13, + 3.60325855446352604e-15, + -4.78085595127289584e-17, + 6.40464962625456197e-19, + -8.64635018362510978e-21, + 1.17619977324539347e-22, + -1.62122725986185311e-24, + 2.32376076749421530e-26, + -3.76907304913742070e-28, + 8.48963682921043415e-05, + -6.06541917348224293e-07, + 6.50004550092325177e-09, + -7.73976219894576310e-11, + 9.67670285984326045e-13, + -1.24440390920246844e-14, + 1.62991466134185254e-16, + -2.16261236119041928e-18, + 2.89730179765325709e-20, + -3.91280556287646306e-22, + 5.33333927477036298e-24, + -7.42252624737653608e-26, + 1.10712247816016140e-27, + -2.02631634221460668e-29, + 1.12762805410788863e-06, + -8.05633616318942954e-09, + 8.63362450903286461e-11, + -1.02802666021846695e-12, + 1.28529900603134237e-14, + -1.65286812635367794e-16, + 2.16492275695747354e-18, + -2.87251289664735825e-20, + 3.84873456436737008e-22, + -5.20076162413168827e-24, + 7.11174823107999192e-26, + -1.00518623872916504e-27, + 1.59242119065367984e-29, + -3.39445995577623779e-31, + 2.06294365383657022e-09, + -1.47386964172442239e-11, + 1.57948188917954897e-13, + -1.88072748863932474e-15, + 2.35139547061202531e-17, + -3.02384719563619237e-19, + 3.96063956619526219e-21, + -5.25527547778955868e-23, + 7.04250194131076982e-25, + -9.52682199929000668e-27, + 1.31055533945047561e-28, + -1.90532042594162396e-30, + 3.33573839251025514e-32, + -8.66639881418502875e-34, +# root=7 base[24]=72.0 */ + 1.24728928345232137e-01, + -8.42936236760034397e-04, + 8.54489841781444907e-06, + -9.62442786652353914e-08, + 1.13823406090753211e-09, + -1.38459372338480674e-11, + 1.71546506311880611e-13, + -2.15300546965952594e-15, + 2.72812394036528840e-17, + -3.48246702697497288e-19, + 4.47147174995724481e-21, + -5.76836217000343946e-23, + 7.46812390222795867e-25, + -9.68379193196825242e-27, + 6.35044643000651499e-02, + -4.29172405028568048e-04, + 4.35054805425698401e-06, + -4.90017948498510307e-08, + 5.79520286524066122e-10, + -7.04951801840259212e-12, + 8.73411586589483535e-14, + -1.09618094148563021e-15, + 1.38899772816007987e-17, + -1.77307302610250796e-19, + 2.27668534794888106e-21, + -2.93747422902294090e-23, + 3.80598920825792455e-25, + -4.95195262836182733e-27, + 1.59293954721652330e-02, + -1.07653171171359904e-04, + 1.09128706526041501e-06, + -1.22915605638334607e-08, + 1.45366281436602396e-10, + -1.76829396036540671e-12, + 2.19085683002011032e-14, + -2.74964980867118693e-16, + 3.48415415835199654e-18, + -4.44761360274257531e-20, + 5.71124529029670746e-22, + -7.37137096821754774e-24, + 9.56644900935421693e-26, + -1.25362768593066314e-27, + 1.82535071995769166e-03, + -1.23359856214722077e-05, + 1.25050673375270540e-07, + -1.40849092259796909e-09, + 1.66575339926877027e-11, + -2.02628949250544644e-13, + 2.51050472783221497e-15, + -3.15082716988211882e-17, + 3.99250712551968930e-19, + -5.09662916071094852e-21, + 6.54534222608234888e-23, + -8.45266555837940899e-25, + 1.09995725992589524e-26, + -1.45852548092114220e-28, + 8.25686674022876773e-05, + -5.58011062050796029e-07, + 5.65659374139741361e-09, + -6.37122593806046416e-11, + 7.53493764026998235e-13, + -9.16580153020604148e-15, + 1.13561214042186505e-16, + -1.42525902191886639e-18, + 1.80599566208624167e-20, + -2.30550473881959128e-22, + 2.96133035719498934e-24, + -3.82764346519024763e-26, + 5.00223474748191769e-28, + -6.75471088723670615e-30, + 1.09671058522512821e-06, + -7.41172962671432757e-09, + 7.51331761513846516e-11, + -8.46252113214954116e-13, + 1.00082102998732996e-14, + -1.21743900887958840e-16, + 1.50836634198462907e-18, + -1.89308876328054991e-20, + 2.39881489509887579e-22, + -3.06242361312194746e-24, + 3.93460473852217421e-26, + -5.09287910325619606e-28, + 6.70144845892719667e-30, + -9.31099478230897599e-32, + 2.00638156672629750e-09, + -1.35594184107812006e-11, + 1.37452689625793384e-13, + -1.54817931345815930e-15, + 1.83095603885863564e-17, + -2.22724870406030834e-19, + 2.75948736670663565e-21, + -3.46332483896416526e-23, + 4.38858146473558273e-25, + -5.60309141910056265e-27, + 7.20235014336463257e-29, + -9.34699169284814570e-31, + 1.24541028723369107e-32, + -1.81907157786766143e-34, +# root=7 base[25]=76.0 */ + 1.21486998257004930e-01, + -7.78906862643717417e-04, + 7.49077180500278719e-06, + -8.00430459463053562e-08, + 8.98068266057345383e-10, + -1.03640441181262546e-11, + 1.21819809225050059e-13, + -1.45047533080916767e-15, + 1.74364735856965342e-17, + -2.11160156646201519e-19, + 2.57224270094665165e-21, + -3.14834304425518011e-23, + 3.86863296072665983e-25, + -4.76813614306670599e-27, + 6.18538685939808777e-02, + -3.96572500927163719e-04, + 3.81385021888487040e-06, + -4.07531021167567689e-08, + 4.57242316579966295e-10, + -5.27674757151965284e-12, + 6.20233159538004240e-14, + -7.38494755786509929e-16, + 8.87760353989236960e-18, + -1.07510088131813620e-19, + 1.30963466274218703e-21, + -1.60297180653555702e-23, + 1.96983909644454898e-25, + -2.42863309306672394e-27, + 1.55153617178981768e-02, + -9.94758442619903476e-05, + 9.56662324103094714e-07, + -1.02224668374224173e-08, + 1.14694199341057133e-10, + -1.32361401376697003e-12, + 1.55578657446885519e-14, + -1.85243278789963698e-16, + 2.22684933693274851e-18, + -2.69677447321619051e-20, + 3.28509274825272812e-22, + -4.02101093236223963e-24, + 4.94199579195285007e-26, + -6.09719620102710375e-28, + 1.77790655845396330e-03, + -1.13989450672695271e-05, + 1.09624013360042588e-07, + -1.17139330453903020e-09, + 1.31428176110759490e-11, + -1.51673037291964692e-13, + 1.78277710264145369e-15, + -2.12270428448024223e-17, + 2.55174895766587912e-19, + -3.09024045505395800e-21, + 3.76442546258864733e-23, + -4.60793206551229005e-25, + 5.66469615383031512e-27, + -6.99676710064740180e-29, + 8.04225586306689144e-05, + -5.15624583103756357e-07, + 4.95877783894570414e-09, + -5.29872879235614684e-11, + 5.94507633091264264e-13, + -6.86084073446356545e-15, + 8.06428751375949827e-17, + -9.60192846655917903e-19, + 1.15426899745962689e-20, + -1.39785521206595539e-22, + 1.70284044895366355e-24, + -2.08454938493834682e-26, + 2.56356695189096981e-28, + -3.17203110653775175e-30, + 1.06820509663087232e-06, + -6.84873519318196772e-09, + 6.58645018364596141e-11, + -7.03798685100887276e-13, + 7.89649191085819103e-15, + -9.11284740040561353e-17, + 1.07113143631093334e-18, + -1.27536722110011942e-20, + 1.53314770925205411e-22, + -1.85669461723001799e-24, + 2.26183411982509824e-26, + -2.76916150182690271e-28, + 3.40753281020673078e-30, + -4.22833569458884772e-32, + 1.95423208660223754e-09, + -1.25294459925079273e-11, + 1.20496076327352503e-13, + -1.28756731949288138e-15, + 1.44462687113854430e-17, + -1.66715351411456755e-19, + 1.95958571094593036e-21, + -2.33322590087560730e-23, + 2.80482560280511348e-25, + -3.39675882798442515e-27, + 4.13809364145190231e-29, + -5.06730590008439585e-31, + 6.24223814219361232e-33, + -7.78609511159960428e-35, +# root=7 base[26]=80.0 */ + 1.18485465194100498e-01, + -7.22593265371149641e-04, + 6.61010892268388720e-06, + -6.71861053732980348e-08, + 7.17032891915501633e-10, + -7.87105372647841026e-12, + 8.80025894414544116e-14, + -9.96693915459641359e-16, + 1.13968296729132425e-17, + -1.31283878404017189e-19, + 1.52119839959614432e-21, + -1.77105925659825320e-23, + 2.07013707710562255e-25, + -2.42744319265978165e-27, + 6.03256685864325404e-02, + -3.67901006069886361e-04, + 3.36546967627471980e-06, + -3.42071216897628497e-08, + 3.65069998521881352e-10, + -4.00746688847549505e-12, + 4.48056226718631771e-14, + -5.07456562289423436e-16, + 5.80257984339812644e-18, + -6.68418521396582422e-20, + 7.74502821823572066e-22, + -9.01717820641689014e-24, + 1.05399608332670655e-25, + -1.23594999355868576e-27, + 1.51320295766210096e-02, + -9.22839155465274774e-05, + 8.44191003165504391e-07, + -8.58047974054269480e-09, + 9.15737884820541612e-11, + -1.00522893330624836e-12, + 1.12389969876645808e-14, + -1.27289889949231366e-16, + 1.45551325803008147e-18, + -1.67665433756779987e-20, + 1.94275577316648646e-22, + -2.26186528658553051e-24, + 2.64386947810987248e-26, + -3.10046727111961868e-28, + 1.73398049727443711e-03, + -1.05748213720800895e-05, + 9.67359155658218695e-08, + -9.83237869845768692e-10, + 1.04934478541368246e-11, + -1.15189265051414734e-13, + 1.28787757711743774e-15, + -1.45861588389037011e-17, + 1.66787384294940287e-19, + -1.92127974017072710e-21, + 2.22620682482078489e-23, + -2.59188358363177998e-25, + 3.02968120739832530e-27, + -3.55325115951375932e-29, + 7.84355890602901872e-05, + -4.78345831934217052e-07, + 4.37579230713277734e-09, + -4.44761873786728869e-11, + 4.74664948658468394e-13, + -5.21051872963786427e-15, + 5.82563855690990547e-17, + -6.59796326865721300e-19, + 7.54452947414077828e-21, + -8.69079724680537732e-23, + 1.00701256598456554e-24, + -1.17243056302714375e-26, + 1.37050709312776065e-28, + -1.60759073434863255e-30, + 1.04181335956022885e-06, + -6.35358367508351983e-09, + 5.81210511560981593e-11, + -5.90750789897085336e-13, + 6.30469268801043581e-15, + -6.92082266219700970e-17, + 7.73784980916398312e-19, + -8.76368289348086307e-21, + 1.00209508377920569e-22, + -1.15434725325502072e-24, + 1.33755707391605117e-26, + -1.55728515168711666e-28, + 1.82046562941036432e-30, + -2.13589798307737559e-32, + 1.90594961765756469e-09, + -1.16235890672322547e-11, + 1.06329789508153833e-13, + -1.08075139544257050e-15, + 1.15341452554129871e-17, + -1.26613267015873325e-19, + 1.41560402905651180e-21, + -1.60327548110881756e-23, + 1.83328695015399905e-25, + -2.11182602561888435e-27, + 2.44700587090113720e-29, + -2.84903127411976144e-31, + 3.33079359899942875e-33, + -3.90960171505348856e-35, +# root=7 base[27]=84.0 */ + 1.15696008183505020e-01, + -6.72753556823654894e-04, + 5.86786338787344389e-06, + -5.68669915000146489e-08, + 5.78667805763924531e-10, + -6.05665171995890430e-12, + 6.45661172506420821e-14, + -6.97237167907036532e-16, + 7.60172739502307596e-18, + -8.34928241394025508e-20, + 9.22429467542796501e-22, + -1.02397689415031601e-23, + 1.14121380255423958e-25, + -1.27596489043661793e-27, + 5.89054449422782359e-02, + -3.42525625761802284e-04, + 2.98756291725256918e-06, + -2.89532498953987415e-08, + 2.94622823271753279e-10, + -3.08368257493182658e-12, + 3.28731814050048598e-14, + -3.54991207142836772e-16, + 3.87034212889152766e-18, + -4.25095216356174395e-20, + 4.69645579739932223e-22, + -5.21347453005162785e-24, + 5.81037662987452158e-26, + -6.49646224228075532e-28, + 1.47757821169187085e-02, + -8.59187808644347174e-05, + 7.49397254687856681e-07, + -7.26260386370601105e-09, + 7.39028904306004605e-11, + -7.73507812216566798e-13, + 8.24587551130661774e-15, + -8.90456346696427006e-17, + 9.70832697943651713e-19, + -1.06630453644217059e-20, + 1.17805424151712703e-22, + -1.30774287965863024e-24, + 1.45747042230439254e-26, + -1.62957494382066814e-28, + 1.69315807195472077e-03, + -9.84544007227572224e-06, + 8.58734922344708715e-08, + -8.32222366162483274e-10, + 8.46853821227396155e-12, + -8.86363229785003100e-14, + 9.44895544067601558e-16, + -1.02037465042827970e-17, + 1.11247797720316053e-19, + -1.22187924026431981e-21, + 1.34993336524353378e-23, + -1.49854402709344804e-25, + 1.67011925640108289e-27, + -1.86734816971509855e-29, + 7.65890106346074200e-05, + -4.45352697357651394e-07, + 3.88443696954046252e-09, + -3.76450897929400617e-11, + 3.83069350666513482e-13, + -4.00941199505410978e-15, + 4.27417947990745292e-17, + -4.61560478348857380e-19, + 5.03222877549705516e-21, + -5.52709900227360220e-23, + 6.10634464337877131e-25, + -6.77857866321072995e-27, + 7.55470536520860564e-29, + -8.44695842642775753e-31, + 1.01728635470949368e-06, + -5.91535545767045526e-09, + 5.15946699415523169e-11, + -5.00017376525130333e-13, + 5.08808274335396277e-15, + -5.32546390035081487e-17, + 5.67713883039741625e-19, + -6.13063379046186146e-21, + 6.68401071201688261e-23, + -7.34131753684137021e-25, + 8.11069581766401191e-27, + -9.00358940876240274e-29, + 1.00345063815971114e-30, + -1.12198420944837077e-32, + 1.86107859053109656e-09, + -1.08218707020754077e-11, + 9.43900752912018135e-14, + -9.14758789436623466e-16, + 9.30841332597265674e-18, + -9.74269123312815617e-20, + 1.03860643407703287e-21, + -1.12157125122638898e-23, + 1.22280901647039966e-25, + -1.34306030356772821e-27, + 1.48381474163692837e-29, + -1.64716714556087334e-31, + 1.83577964358967472e-33, + -2.05269918484154018e-35, +# root=7 base[28]=88.0 */ + 1.13094768601092702e-01, + -6.28391557838027894e-04, + 5.23726991744267960e-06, + -4.84993530561370091e-08, + 4.71580442941090955e-10, + -4.71639162517051673e-12, + 4.80432894237816673e-14, + -4.95746216233089297e-16, + 5.16466299161144217e-18, + -5.42037920187461529e-20, + 5.72221951770007133e-22, + -6.06977155184623617e-24, + 6.46398188181053508e-26, + -6.90602193896031191e-28, + 5.75810502858919021e-02, + -3.19939165521683044e-04, + 2.66650267034670028e-06, + -2.46929519526128471e-08, + 2.40100382490828920e-10, + -2.40130278965247165e-12, + 2.44607517962943143e-14, + -2.52404139988757315e-16, + 2.62953559312306094e-18, + -2.75973089895625394e-20, + 2.91340982518441109e-22, + -3.09036241867092117e-24, + 3.29107068302123826e-26, + -3.51613142110925836e-28, + 1.44435723033988963e-02, + -8.02532160660111442e-05, + 6.68862827703494962e-07, + -6.19395504495171637e-09, + 6.02265366359547422e-11, + -6.02340358373026836e-13, + 6.13571019304415470e-15, + -6.33127986987347290e-17, + 6.59590043527314732e-19, + -6.92248102220194118e-21, + 7.30796769262070390e-23, + -7.75183385308980584e-25, + 8.25528889121328279e-27, + -8.81983183364461658e-29, + 1.65509012246190944e-03, + -9.19622254221689122e-06, + 7.66450457102975967e-08, + -7.09765811291731416e-10, + 6.90136372099595603e-12, + -6.90222305508718015e-14, + 7.03091528984799689e-16, + -7.25501874127029575e-18, + 7.55824766215531794e-20, + -7.93247662387857843e-22, + 8.37420612966966667e-24, + -8.88283285159412902e-26, + 9.45974325924485823e-28, + -1.01066588883416560e-29, + 7.48670293046677825e-05, + -4.15985723808368386e-07, + 3.46699361284026442e-09, + -3.21058394780265466e-11, + 3.12179133286965420e-13, + -3.12218004759722807e-15, + 3.18039322391061598e-17, + -3.28176510354305976e-19, + 3.41892892456097302e-21, + -3.58820919822705104e-23, + 3.78802295700026920e-25, + -4.01809735588300194e-27, + 4.27905999684514867e-29, + -4.57169226176567531e-31, + 9.94414299103900713e-07, + -5.52529138420531055e-09, + 4.60500176850919944e-11, + -4.26442803437020768e-13, + 4.14649007587999647e-15, + -4.14700638257349237e-17, + 4.22432748835527971e-19, + -4.35897373730351980e-21, + 4.54116029720250215e-23, + -4.76600523699302463e-25, + 5.03140601405721812e-27, + -5.33700036326834674e-29, + 5.68362280693818881e-31, + -6.07231673937141726e-33, + 1.81923521692056418e-09, + -1.01082664227094121e-11, + 8.42463890433064766e-14, + -7.80157492419468245e-16, + 7.58581285431051633e-18, + -7.58675741365666684e-20, + 7.72821281990414337e-22, + -7.97454193869776255e-24, + 8.30784387045827401e-26, + -8.71918735450234247e-28, + 9.20472594680294972e-30, + -9.76379734224347267e-32, + 1.03979311914779174e-33, + -1.11090540953776859e-35, +# root=7 base[29]=92.0 */ + 1.10661484858512890e-01, + -5.88699881599308566e-04, + 4.69762738570362884e-06, + -4.16504453277777610e-08, + 3.87748049787449044e-10, + -3.71290507970759570e-12, + 3.62115307362630302e-14, + -3.57753363172195853e-16, + 3.56842421351147333e-18, + -3.58570317516183690e-20, + 3.62426010214746970e-22, + -3.68075889601946287e-24, + 3.75297216674335116e-26, + -3.83899504084186077e-28, + 5.63421686357995777e-02, + -2.99730552570765679e-04, + 2.39174916812173511e-06, + -2.12059002950680326e-08, + 1.97417972813747840e-10, + -1.89038782912652735e-12, + 1.84367322913797821e-14, + -1.82146483427767408e-16, + 1.81682686671781562e-18, + -1.82562427417375913e-20, + 1.84525514115414786e-22, + -1.87402092743605114e-24, + 1.91078758235446861e-26, + -1.95458527296530779e-28, + 1.41328124857224395e-02, + -7.51841080719964242e-05, + 5.99943937629503556e-07, + -5.31926654081069849e-09, + 4.95201242451883417e-11, + -4.74182967415308036e-13, + 4.62465124492875451e-15, + -4.56894393231249741e-17, + 4.55731010148890733e-19, + -4.57937742924126268e-21, + 4.62861929736798191e-23, + -4.70077510660913082e-25, + 4.79300022790556091e-27, + -4.90286201604694647e-29, + 1.61948012973363331e-03, + -8.61535304578267830e-06, + 6.87476245033805902e-08, + -6.09535184614000925e-10, + 5.67451505622405217e-12, + -5.43366647199924266e-14, + 5.29939161485115991e-16, + -5.23555656011386853e-18, + 5.22222534393930489e-20, + -5.24751231279388081e-22, + 5.30393861005363830e-24, + -5.38662201499679113e-26, + 5.49230288771552095e-28, + -5.61819379729615536e-30, + 7.32562322048934067e-05, + -3.89710433404821976e-07, + 3.10975840437313984e-09, + -2.75719659669304361e-11, + 2.56683354724015592e-13, + -2.45788710517980222e-15, + 2.39714866242947704e-17, + -2.36827325045804508e-19, + 2.36224295314948209e-21, + -2.37368136499797445e-23, + 2.39920546947487005e-25, + -2.43660682510022336e-27, + 2.48441096878727924e-29, + -2.54135711940882365e-31, + 9.73019037613661991e-07, + -5.17629230232555215e-09, + 4.13050745139473193e-11, + -3.66222053506967311e-13, + 3.40937259899539860e-15, + -3.26466550853448362e-17, + 3.18399024128116916e-19, + -3.14563674599389384e-21, + 3.13762706012994501e-23, + -3.15282002355501107e-25, + 3.18672217694671871e-27, + -3.23640018351796116e-29, + 3.29989563428879577e-31, + -3.37553410902341597e-33, + 1.78009357021119822e-09, + -9.46978865644967406e-12, + 7.55657337801914296e-14, + -6.69986400590997653e-16, + 6.23729033792620969e-18, + -5.97255537248794590e-20, + 5.82496368212943205e-22, + -5.75479772677451915e-24, + 5.74014437496942666e-26, + -5.76793920300485368e-28, + 5.82996163586421058e-30, + -5.92084528432614258e-32, + 6.03700743309527961e-34, + -6.17538544411744189e-36, +# root=7 base[30]=96.0 */ + 1.08378823757927290e-01, + -5.53017969267734157e-04, + 4.23273951620107707e-06, + -3.59965095239513675e-08, + 3.21431296859985116e-10, + -2.95223006319230117e-12, + 2.76172898717393535e-14, + -2.61707234628386236e-16, + 2.50383850231812612e-18, + -2.41324828870224864e-20, + 2.33961752887451943e-22, + -2.27908602254932348e-24, + 2.22893052488181368e-26, + -2.18695701837883803e-28, + 5.51799749707497303e-02, + -2.81563470099354871e-04, + 2.15505624127605471e-06, + -1.83272564297479310e-08, + 1.63653473072983729e-10, + -1.50309788708082897e-12, + 1.40610620326191856e-14, + -1.33245574695603158e-16, + 1.27480388786385211e-18, + -1.22868080268388324e-20, + 1.19119245077836004e-22, + -1.16037345047527406e-24, + 1.13483728946107460e-26, + -1.11346690655588798e-28, + 1.38412890045015273e-02, + -7.06270955146564867e-05, + 5.40572123714599823e-07, + -4.59719043073540779e-09, + 4.10506713457974487e-11, + -3.77035550816573357e-13, + 3.52706255134898893e-15, + -3.34231849309533799e-17, + 3.19770515396934792e-19, + -3.08201047449798412e-21, + 2.98797507248106835e-23, + -2.91066900451187075e-25, + 2.84661435757707959e-27, + -2.79300910934195466e-29, + 1.58607443036098560e-03, + -8.09316460699781033e-06, + 6.19442035283577092e-08, + -5.26792424558021005e-10, + 4.70399976111665232e-12, + -4.32045343676265108e-14, + 4.04166384009397560e-16, + -3.82996547380604883e-18, + 3.66425293113615119e-20, + -3.53167830403659110e-22, + 3.42392306056862952e-24, + -3.33533797469955490e-26, + 3.26193770388020109e-28, + -3.20051141334488656e-30, + 7.17451450200126391e-05, + -3.66089546168232720e-07, + 2.80200965365775236e-09, + -2.38291458281420655e-11, + 2.12782665538973193e-13, + -1.95433172894792740e-15, + 1.82822289281649572e-17, + -1.73246238057894956e-19, + 1.65750328548306764e-21, + -1.59753393180780974e-23, + 1.54879148051412253e-25, + -1.50872053747769608e-27, + 1.47551835696163188e-29, + -1.44773254012200097e-31, + 9.52948163721722814e-07, + -4.86255008170133047e-09, + 3.72174305792939228e-11, + -3.16508395845474485e-13, + 2.82626580991113722e-15, + -2.59582280011356112e-17, + 2.42831992059884645e-19, + -2.30112691782724299e-21, + 2.20156320239302488e-23, + -2.12190947049805143e-25, + 2.05716776648224234e-27, + -2.00394391222050587e-29, + 1.95984342871746310e-31, + -1.92293718781527370e-33, + 1.74337482969078268e-09, + -8.89581169603308938e-12, + 6.80875772343187918e-14, + -5.79037550739160484e-16, + 5.17052329034504469e-18, + -4.74893840435265499e-20, + 4.44249959145207463e-22, + -4.20980584378937337e-24, + 4.02765860635780560e-26, + -3.88193576795713610e-28, + 3.76349379868524626e-30, + -3.66612320631989462e-32, + 3.58544340523655667e-34, + -3.51792516620958112e-36, + # root=8 base[0]=0.0 */ + 3.62026985353205766e-01, + -8.21967169247591126e-03, + 2.11637589719356606e-04, + -5.65414308955532637e-06, + 1.50325490351670367e-07, + -3.92480346922230493e-09, + 1.00311659464138055e-10, + -2.51205203352069777e-12, + 6.17189444390914801e-14, + -1.49037469958129249e-15, + 3.54119960877608601e-17, + -8.29058869909935899e-19, + 1.91356664584000006e-20, + -4.35784807673988492e-22, + 3.25501219086986482e-01, + -1.87710575052660623e-02, + 1.03024404535001133e-03, + -4.92808675063600236e-05, + 2.13411859443973370e-06, + -8.56187820985115304e-08, + 3.22658601784206670e-09, + -1.15281616094922533e-10, + 3.93100415121687809e-12, + -1.28568338567628926e-13, + 4.04875408021722964e-15, + -1.23136209522103806e-16, + 3.62569162905593098e-18, + -1.03485970794482205e-19, + 2.66141370764159779e-01, + -3.29407890236906309e-02, + 2.92317659563199987e-03, + -2.08356436128618038e-04, + 1.27772845238301096e-05, + -6.98257632192828314e-07, + 3.47464590697754603e-08, + -1.59742422779586567e-09, + 6.85547136217001193e-11, + -2.76764170657975757e-12, + 1.05734880065604815e-13, + -3.84064387686925652e-15, + 1.33142462292881962e-16, + -4.41458323229601194e-18, + 2.01515248853045420e-01, + -4.27023871357566989e-02, + 5.54460929243084932e-03, + -5.44094759243125576e-04, + 4.40023468531914084e-05, + -3.06968336820566662e-06, + 1.89972986480232376e-07, + -1.06276751648236068e-08, + 5.44711426394221104e-10, + -2.58365843667000066e-11, + 1.14291693475664983e-12, + -4.74442496653151991e-14, + 1.85745044810587018e-15, + -6.87866125014667494e-17, + 1.43460294213292677e-01, + -4.41030056916754329e-02, + 7.71359949511442669e-03, + -9.75003043973956640e-04, + 9.82431817498310474e-05, + -8.31872845766514265e-06, + 6.11607551218894349e-07, + -3.99176441536666919e-08, + 2.34989248764434406e-09, + -1.26276038841462535e-10, + 6.25212904499080968e-12, + -2.87343357897933242e-13, + 1.23333414046298380e-14, + -4.96219553991764259e-16, + 9.56903403336124003e-02, + -3.76832614404289043e-02, + 8.20838682738045389e-03, + -1.25604604832243462e-03, + 1.49631824995028406e-04, + -1.46876242304621325e-05, + 1.23116559366237064e-06, + -9.03146980617078472e-08, + 5.90205086443426216e-09, + -3.48260851828932737e-10, + 1.87520607850449368e-11, + -9.29228850612189194e-13, + 4.26729662004949364e-14, + -1.82396575378317250e-15, + 5.67354008667712018e-02, + -2.60101249914593789e-02, + 6.55997690082847900e-03, + -1.14432270136976318e-03, + 1.53087318803302869e-04, + -1.66519228913833509e-05, + 1.52894012059229027e-06, + -1.21618053021704853e-07, + 8.54191178272377836e-09, + -5.37495414202022690e-10, + 3.06501236849439905e-11, + -1.59862951248407551e-12, + 7.68486570248679542e-14, + -3.42119864536887679e-15, + 2.34090727064109674e-02, + -1.15938372572488065e-02, + 3.16510413464343677e-03, + -5.93505545067102812e-04, + 8.46930091890757668e-05, + -9.75601635215949914e-06, + 9.42528177455216273e-07, + -7.84361512655380728e-08, + 5.73452295573187348e-09, + -3.73943481347875915e-10, + 2.20109929110501456e-11, + -1.18089605743175341e-12, + 5.82109462486339048e-14, + -2.64983663093752085e-15, +# root=8 base[1]=2.5 */ + 3.32155587713814981e-01, + -6.76230153904169243e-03, + 1.55995572759643343e-04, + -3.76654814119207477e-06, + 9.11805757636857601e-08, + -2.17950876653509939e-09, + 5.11615699415519826e-11, + -1.18006911249824136e-12, + 2.67447236291443334e-14, + -5.97133531235830241e-16, + 1.31241726817180109e-17, + -2.85147292945239159e-19, + 6.10055124443265619e-21, + -1.29057253564197033e-22, + 2.63832306706191733e-01, + -1.24214830713480443e-02, + 5.98385898266294786e-04, + -2.55138106836833348e-05, + 9.93342719411510354e-07, + -3.60753975460221420e-08, + 1.23772099563314051e-09, + -4.04553991272759432e-11, + 1.26733019689976072e-12, + -3.82230229736840028e-14, + 1.11380079166212374e-15, + -3.14443009433443574e-17, + 8.62000311355338327e-19, + -2.29726295886878386e-20, + 1.69117485971627346e-01, + -1.69087989571356477e-02, + 1.30252482933841370e-03, + -8.20251855117634773e-05, + 4.50369685141705137e-06, + -2.22566498770705818e-07, + 1.00951842057399862e-08, + -4.25854108767762162e-10, + 1.68654398791545671e-11, + -6.31511767697481548e-13, + 2.24786527141822885e-14, + -7.63886838075532555e-16, + 2.48693685088390774e-17, + -7.77205366977779816e-19, + 9.03638902532609006e-02, + -1.59388363172492005e-02, + 1.80600868794271452e-03, + -1.57774132399198061e-04, + 1.15222834333597249e-05, + -7.33719662216842155e-07, + 4.18078017805355659e-08, + -2.16904481631175153e-09, + 1.03741339087003606e-10, + -4.61667725235104895e-12, + 1.92534564724498160e-13, + -7.56755027730734362e-15, + 2.81623711275149035e-16, + -9.95020415558308818e-18, + 4.22149520238171566e-02, + -1.13466833682508757e-02, + 1.77711443702018219e-03, + -2.04393140405932601e-04, + 1.89666439572991237e-05, + -1.49308557194609452e-06, + 1.02849252273486832e-07, + -6.33016929309801040e-09, + 3.53375909250695240e-10, + -1.80946112812144780e-11, + 8.57321099390301301e-13, + -3.78481274934629026e-14, + 1.56573604282872741e-15, + -6.09059482716796159e-17, + 1.81845426097936719e-02, + -6.60458602781751822e-03, + 1.33755212838944392e-03, + -1.92085386576341103e-04, + 2.16472373382977928e-05, + -2.02341024667040421e-06, + 1.62405311586961427e-07, + -1.14610911732214423e-08, + 7.23431234599261985e-10, + -4.13747426215320600e-11, + 2.16587867267943738e-12, + -1.04621545014895820e-13, + 4.69449940910150889e-15, + -1.96483025328331465e-16, + 7.39193098690114556e-03, + -3.26656972179870542e-03, + 7.94790634686249058e-04, + -1.34262931954533845e-04, + 1.74593061489844527e-05, + -1.85207272560721089e-06, + 1.66309423947924666e-07, + -1.29691369702533717e-08, + 8.94876863181043491e-10, + -5.54198267031339493e-11, + 3.11522988445672758e-12, + -1.60388311723983993e-13, + 7.62000309403554990e-15, + -3.35636389800517761e-16, + 2.39641907365816670e-03, + -1.17453787585004811e-03, + 3.17127755266334934e-04, + -5.88584755068081547e-05, + 8.32087479591201263e-06, + -9.50405646027450306e-07, + 9.11139535531932137e-08, + -7.52939940284583620e-09, + 5.46963607331246918e-10, + -3.54581731059981079e-11, + 2.07589006087917593e-12, + -1.10818550045346133e-13, + 5.43754931591902719e-15, + -2.46470705656105881e-16, +# root=8 base[2]=5.0 */ + 3.07347184147444163e-01, + -5.67325905871450716e-03, + 1.18300962017144049e-04, + -2.59938306754579302e-06, + 5.76197755824434922e-08, + -1.26819086556683127e-09, + 2.74715253071284889e-11, + -5.87080517934273552e-13, + 1.23124947854345880e-14, + -2.56089471198390582e-16, + 5.21319556976998386e-18, + -1.05183682105070785e-19, + 2.14915969050361330e-21, + -3.99930126648025257e-23, + 2.22101866830171329e-01, + -8.63484404028497590e-03, + 3.68115279183089050e-04, + -1.40948095411295824e-05, + 4.96360530383941079e-07, + -1.64001690789629381e-08, + 5.14456440572813643e-10, + -1.54388393598465101e-11, + 4.45703848698073312e-13, + -1.24283537828237815e-14, + 3.35847205776512505e-16, + -8.81663477756751406e-18, + 2.25325732981626322e-19, + -5.61327873947521427e-21, + 1.17459755416957023e-01, + -9.47002794392412008e-03, + 6.37404921463694029e-04, + -3.55883355042540839e-05, + 1.75370377477720140e-06, + -7.84963424355704540e-08, + 3.24841231091222440e-09, + -1.25781456965862991e-10, + 4.59652273683613773e-12, + -1.59549474450078814e-13, + 5.28661931676966748e-15, + -1.67872829263679339e-16, + 5.12484625426102450e-18, + -1.50689768295211189e-19, + 4.68153498057589518e-02, + -6.77155574424879916e-03, + 6.67587302984177762e-04, + -5.17444553676249124e-05, + 3.40139365595965881e-06, + -1.97048618740084844e-07, + 1.03021774062292231e-08, + -4.93916532059408861e-10, + 2.19632988785385168e-11, + -9.13598296609915464e-13, + 3.57832999937120898e-14, + -1.32658566516655883e-15, + 4.67469057859741777e-17, + -1.56969934982087005e-18, + 1.48384134196624662e-02, + -3.40677629467531261e-03, + 4.71767567605493421e-04, + -4.88724060790426138e-05, + 4.14028237994310312e-06, + -3.00655876659178684e-07, + 1.92652348350263604e-08, + -1.11075720114726408e-09, + 5.84349080567276731e-11, + -2.83451187164094401e-12, + 1.27808359596456530e-13, + -5.39164119147723904e-15, + 2.13918254030534175e-16, + -8.00784533821158479e-18, + 4.07106503023487148e-03, + -1.33359952000641204e-03, + 2.47115495636678463e-04, + -3.28812400919274717e-05, + 3.46790196802136240e-06, + -3.05817483721869956e-07, + 2.33121037100908248e-08, + -1.57122289306350344e-09, + 9.51724492934692358e-11, + -5.24494100084922311e-12, + 2.65516157702747529e-13, + -1.24423002206134823e-14, + 5.43130691288935498e-16, + -2.21707675704580843e-17, + 1.06721275016353231e-03, + -4.48686766898158753e-04, + 1.04154173231544539e-04, + -1.68820246980020480e-05, + 2.11739534613568843e-06, + -2.17604298086443990e-07, + 1.90015840782395599e-08, + -1.44553820945140683e-09, + 9.75680683112378740e-11, + -5.92448573923136323e-12, + 3.27186449225616889e-13, + -1.65791602988068259e-14, + 7.76423921026060026e-16, + -3.37575119406165105e-17, + 2.54038659258327124e-04, + -1.22777145444888928e-04, + 3.26742532310614787e-05, + -5.98451289927296519e-06, + 8.36027255498801713e-07, + -9.44770096778277390e-08, + 8.97091341681324691e-09, + -7.34944039989008479e-10, + 5.29722441969676807e-11, + -3.40965431578681689e-12, + 1.98322343802902120e-13, + -1.05242082073647141e-14, + 5.13568404325621717e-16, + -2.31616548514262986e-17, +# root=8 base[3]=7.5 */ + 2.86369257547781253e-01, + -4.83766891695547579e-03, + 9.19053419329104071e-05, + -1.84943887584101490e-06, + 3.77161785537194158e-08, + -7.68885460195638099e-10, + 1.54056167745373917e-11, + -3.07836292952834482e-13, + 5.96232679980359866e-15, + -1.15761980791423195e-16, + 2.28694816715657187e-18, + -3.78104582632713233e-20, + 8.61683823601575920e-22, + -1.58626218107009825e-23, + 1.92543588121356246e-01, + -6.25266028736221665e-03, + 2.37635370499168547e-04, + -8.22871195957230243e-06, + 2.63672263129555259e-07, + -7.96551919721199991e-09, + 2.29453999217133342e-10, + -6.34586123033468132e-12, + 1.69401121953259956e-13, + -4.37974398247361588e-15, + 1.10018986972690053e-16, + -2.69283554351257225e-18, + 6.42259312316903039e-20, + -1.49816998769878402e-21, + 8.76181551625965366e-02, + -5.69874452901663383e-03, + 3.37938215572511640e-04, + -1.68069952879213285e-05, + 7.45859075295458237e-07, + -3.03156878827898222e-08, + 1.14684206523765596e-09, + -4.08152807974100755e-11, + 1.37751171375706354e-12, + -4.43430885507195717e-14, + 1.36773440551138760e-15, + -4.05742203318054081e-17, + 1.16067526754182490e-18, + -3.20805820156372872e-20, + 2.74762850561222904e-02, + -3.22029403675241823e-03, + 2.76554987568545802e-04, + -1.89997481491116241e-05, + 1.12283564435792837e-06, + -5.90849738847582304e-08, + 2.82905145975798738e-09, + -1.25063001921845436e-10, + 5.15798058144314862e-12, + -2.00019370075384775e-13, + 7.33703175702961497e-15, + -2.55801097949508016e-16, + 8.50919650446903138e-18, + -2.70693736472094256e-19, + 6.18868727199742372e-03, + -1.18653500528819616e-03, + 1.43891610405700644e-04, + -1.33180174192856119e-05, + 1.02281127453132958e-06, + -6.80723296104376180e-08, + 4.03292346025017982e-09, + -2.16560012967994909e-10, + 1.06770775504124919e-11, + -4.88018540783548208e-13, + 2.08342268513222278e-14, + -8.35716953953961028e-16, + 3.16505906066540708e-17, + -1.13502090061352545e-18, + 1.09145940810300595e-03, + -3.14187431210123007e-04, + 5.23836514626956681e-05, + -6.37310271841296576e-06, + 6.22088929258948361e-07, + -5.12590440387151795e-08, + 3.67942819240768783e-09, + -2.35037762335582041e-10, + 1.35675630763106202e-11, + -7.15951281428993550e-13, + 3.48485120846441132e-14, + -1.57589251785537769e-15, + 6.65985631098899855e-17, + -2.63970417028921448e-18, + 1.75245360395659991e-04, + -6.88411488832272396e-05, + 1.50285678560659287e-05, + -2.31020288316435224e-06, + 2.76777194846882764e-07, + -2.73321899906788132e-08, + 2.30469187395046663e-09, + -1.70004588717566845e-10, + 1.11651461667187707e-11, + -6.61652623520276690e-13, + 3.57531683968636561e-14, + -1.77660258374593761e-15, + 8.17485447283184862e-17, + -3.49835222111098190e-18, + 2.81997244185942087e-05, + -1.33676861470357776e-05, + 3.48917953306820199e-06, + -6.28027879241438670e-07, + 8.63919434277696398e-08, + -9.63054608987137151e-09, + 9.03427972986356420e-10, + -7.32161355038508898e-11, + 5.22611278167841334e-12, + -3.33451878646407404e-13, + 1.92417764805061023e-14, + -1.01373636696721719e-15, + 4.91437210898111042e-17, + -2.20302770182529535e-18, +# root=8 base[4]=10.0 */ + 2.68361600525555022e-01, + -4.18199176460956699e-03, + 7.28832676138728886e-05, + -1.35149916093805873e-06, + 2.54348020789997377e-08, + -4.84312163969019955e-10, + 8.94093174148098819e-12, + -1.68705621368665493e-13, + 3.13086809109846266e-15, + -4.81587164296552622e-17, + 1.26024436926477452e-18, + -1.48494245528626133e-20, + 1.03043788532442612e-22, + -1.43650283658696080e-23, + 1.70797147683661582e-01, + -4.68526114852332171e-03, + 1.59773250549886166e-04, + -5.03623013181852551e-06, + 1.47680606011081796e-07, + -4.09847799789364235e-09, + 1.08896809006576389e-10, + -2.78537673350744165e-12, + 6.89805106996065030e-14, + -1.66047832512036166e-15, + 3.87772481180596397e-17, + -8.89131375595769138e-19, + 1.98818116099189037e-20, + -4.30903458995947426e-22, + 6.91887687207665414e-02, + -3.63708574603272081e-03, + 1.91811835394724788e-04, + -8.54299026933702461e-06, + 3.42843004550327850e-07, + -1.26931763150504783e-08, + 4.40163472342794861e-10, + -1.44263398533312575e-11, + 4.50328088193981681e-13, + -1.34648103021130526e-14, + 3.86670155893492410e-16, + -1.07242139145548650e-17, + 2.87628911372069438e-19, + -7.46378624658265169e-21, + 1.79130894573935884e-02, + -1.68506551028367656e-03, + 1.26706028137879589e-04, + -7.72284055611063789e-06, + 4.10563307817893979e-07, + -1.96228810183200172e-08, + 8.60074720726595082e-10, + -3.50259793938112090e-11, + 1.33813124197451456e-12, + -4.83029874646042546e-14, + 1.65629676549792161e-15, + -5.41968642022701861e-17, + 1.69815116565086865e-18, + -5.10543908537115563e-20, + 3.02222137478680257e-03, + -4.73761144012885553e-04, + 5.00499471699553569e-05, + -4.11558407654548019e-06, + 2.85124740786990637e-07, + -1.73088848996548748e-08, + 9.43700065424058834e-10, + -4.69785514816204309e-11, + 2.16077789372132717e-12, + -9.26431401875209206e-14, + 3.72803058461577331e-15, + -1.41572516906544764e-16, + 5.09601636482651155e-18, + -1.74333370217964013e-19, + 3.53666796774195380e-04, + -8.69142135287904625e-05, + 1.28335071333852691e-05, + -1.40968603864007442e-06, + 1.26007247435607466e-07, + -9.61125444414374164e-09, + 6.44224643664648099e-10, + -3.87060924616741027e-11, + 2.11442058301714044e-12, + -1.06149838447997060e-13, + 4.93826959474676988e-15, + -2.14310768273193004e-16, + 8.72337665528092060e-18, + -3.34133322072658546e-19, + 3.37031422838081544e-05, + -1.20716754772289503e-05, + 2.43464742189543529e-06, + -3.49962082287909967e-07, + 3.95874405576810897e-08, + -3.71983777063496332e-09, + 3.00352342349628640e-10, + -2.13267878701713496e-11, + 1.35422914692675128e-12, + -7.78844832181064711e-14, + 4.09758728753959814e-15, + -1.98795919731600003e-16, + 8.95271355740992139e-18, + -3.75785029210038049e-19, + 3.33102342162253417e-06, + -1.53601934580019241e-06, + 3.90385034257309527e-07, + -6.86412149586385190e-08, + 9.25208474283844937e-09, + -1.01322337512945954e-09, + 9.35792753556459068e-11, + -7.48024052980960486e-12, + 5.27443986521793799e-13, + -3.32877677626810737e-14, + 1.90210008294329671e-15, + -9.93264857640250451e-17, + 4.77660353586600276e-18, + -2.12570944770724829e-19, +# root=8 base[5]=12.5 */ + 2.52705934822863465e-01, + -3.65754693213835805e-03, + 5.88212027460843168e-05, + -1.01179304422504327e-06, + 1.75646352387147476e-08, + -3.16379362651114060e-10, + 5.42110326682272618e-12, + -8.78243266358946436e-14, + 2.14154349526416176e-15, + -1.18775896237183196e-17, + 4.72520060451124194e-19, + -2.55948364704428352e-20, + -4.61949428738367180e-22, + -3.88583317140495026e-24, + 1.54279238386396178e-01, + -3.61406777313097102e-03, + 1.11207804646142950e-04, + -3.20974014555866121e-06, + 8.66174343476511075e-08, + -2.21756456679688063e-09, + 5.45846631180338370e-11, + -1.29754717869279764e-12, + 2.97668942204988911e-14, + -6.74704010375305473e-16, + 1.46476706850878727e-17, + -3.09585462539157587e-19, + 6.76077496746341881e-21, + -1.34370469368366653e-22, + 5.71703499930778167e-02, + -2.43554587697372097e-03, + 1.15375201784474179e-04, + -4.62732302019333253e-06, + 1.68741107122832886e-07, + -5.70834861501156127e-09, + 1.82028987622132549e-10, + -5.51284411172023335e-12, + 1.59115016434292133e-13, + -4.43927063621221094e-15, + 1.18778337581660966e-16, + -3.07029992941474395e-18, + 7.77686333501478121e-20, + -1.89097993641270310e-21, + 1.27390308498499718e-02, + -9.54342437632108888e-04, + 6.33890261857006474e-05, + -3.43520039043144988e-06, + 1.64630801849180632e-07, + -7.15439812700310290e-09, + 2.87253333729005694e-10, + -1.07808050032571528e-11, + 3.81284881654226068e-13, + -1.28093603642353558e-14, + 4.10204019397843741e-16, + -1.25788110724080130e-17, + 3.70894652259513788e-19, + -1.05197544832704759e-20, + 1.69790489415921377e-03, + -2.13431282275270117e-04, + 1.96441488049368279e-05, + -1.43040701308438844e-06, + 8.91559304498356851e-08, + -4.92200162282705471e-09, + 2.46188809023779823e-10, + -1.13248406366469062e-11, + 4.84263095178356506e-13, + -1.94086833700102756e-14, + 7.33553056305657095e-16, + -2.62762668982589066e-17, + 8.95703621179230149e-19, + -2.91236147080116504e-20, + 1.38499553106596158e-04, + -2.81833159984409533e-05, + 3.63885216681342302e-06, + -3.56953425267896364e-07, + 2.89507384229667971e-08, + -2.02722870615317721e-09, + 1.25920280414491697e-10, + -7.06550996114139162e-12, + 3.62842332144013342e-13, + -1.72219512967795324e-14, + 7.61273333896069365e-16, + -3.15306190648434627e-17, + 1.22973434885839382e-18, + -4.52962172946705896e-20, + 7.81891536751146831e-06, + -2.47327053445490555e-06, + 4.51402691070689928e-07, + -5.97029495914202436e-08, + 6.29296048409034011e-09, + -5.56410869711227932e-10, + 4.26083830226029937e-11, + -2.88798180466988350e-12, + 1.76003538783890465e-13, + -9.75977127436215566e-15, + 4.97039680117282855e-16, + -2.34221877719973273e-17, + 1.02759772055796802e-18, + -4.21319883292710259e-20, + 4.28598659966342268e-07, + -1.89741979269322314e-07, + 4.64509982478394411e-08, + -7.91001134960435174e-09, + 1.03745126022289457e-09, + -1.10979755320178023e-10, + 1.00437152858193560e-11, + -7.88729841098447730e-13, + 5.47541770965587828e-14, + -3.40825673592871774e-15, + 1.92373358695935092e-16, + -9.93572982612325537e-18, + 4.73103659922054208e-19, + -2.08673626482578919e-20, +# root=8 base[6]=15.0 */ + 2.38946154311171333e-01, + -3.23120436461254556e-03, + 4.81780210913074642e-05, + -7.75011487475361399e-07, + 1.23775496749209944e-08, + -2.08364572546893972e-10, + 3.86846035936375002e-12, + -2.50836798923973300e-14, + 1.72384694191118412e-15, + -2.17921621143859440e-17, + -1.09241432735071397e-18, + -4.13182347631949459e-20, + 8.81224100222465337e-23, + 2.88939626454871083e-23, + 1.41387685082078413e-01, + -2.85787552987125338e-03, + 7.97435235988446867e-05, + -2.11816159465795923e-06, + 5.28975409311714899e-08, + -1.25483914314779475e-09, + 2.86135661911581556e-11, + -6.42361343597715332e-13, + 1.34559578443656105e-14, + -2.86150625466644270e-16, + 6.22730215439111759e-18, + -1.07727822875522812e-19, + 2.32359904995015789e-21, + -5.42222200569849452e-23, + 4.89775184788492843e-02, + -1.69611695461865529e-03, + 7.29258076674694415e-05, + -2.64718026588941607e-06, + 8.82062429111630097e-08, + -2.73700039072626234e-09, + 8.02055292485987522e-11, + -2.27164333521974791e-12, + 6.01727843017945808e-14, + -1.56596333975180079e-15, + 4.00514225189313628e-17, + -9.35362961089561040e-19, + 2.25395437435973701e-20, + -5.34310041237351981e-22, + 9.72623646742102992e-03, + -5.76206201855571543e-04, + 3.42319072790336381e-05, + -1.65358617626560854e-06, + 7.16903157512584222e-08, + -2.83880213329581713e-09, + 1.04446893829326986e-10, + -3.62477607874391759e-12, + 1.18510419290234471e-13, + -3.70555620226142135e-15, + 1.11143416096892569e-16, + -3.18156703503700135e-18, + 8.83066220509592522e-20, + -2.36647851786703714e-21, + 1.07624663185392020e-03, + -1.06513916373467195e-04, + 8.59613951743401698e-06, + -5.53357059594308967e-07, + 3.10172811047024831e-08, + -1.55531366658762902e-09, + 7.12344019313607893e-11, + -3.02337709475422970e-12, + 1.19896008552150138e-13, + -4.48100857556785923e-15, + 1.58691492883245981e-16, + -5.34573271446561164e-18, + 1.72084377013379325e-19, + -5.30262375642839244e-21, + 6.49408361887095676e-05, + -1.06047016475340873e-05, + 1.18896636176193855e-06, + -1.03258901500581923e-07, + 7.54605763159465356e-09, + -4.81875285419205499e-10, + 2.75614370600633247e-11, + -1.43562544820396634e-12, + 6.89020280112492602e-14, + -3.07459925073356456e-15, + 1.28439563782706126e-16, + -5.05059454539286638e-18, + 1.87795639787662556e-19, + -6.62015170940910768e-21, + 2.24280602977687585e-06, + -6.02058460423836021e-07, + 9.73293055019955640e-08, + -1.16447718523697669e-08, + 1.12792347262186157e-09, + -9.27325421438176342e-11, + 6.66533799284328585e-12, + -4.27319804825711691e-13, + 2.47914798235754390e-14, + -1.31587608776808857e-15, + 6.44463342919400083e-17, + -2.93246444381039798e-18, + 1.24672035695947578e-19, + -4.96914221324115838e-21, + 6.21430839315082439e-08, + -2.58497316058891127e-08, + 5.99830565111207154e-09, + -9.77039142788106619e-10, + 1.23475884974614130e-10, + -1.28007304017416485e-11, + 1.12783627552579146e-12, + -8.65444926448371328e-14, + 5.88834786006694344e-15, + -3.60124127026842973e-16, + 2.00128525650727433e-17, + -1.01945127807420276e-18, + 4.79479150174333850e-20, + -2.09166172454274597e-21, +# root=8 base[7]=17.5 */ + 2.26737660063994456e-01, + -2.87989876760759433e-03, + 3.99445377583267761e-05, + -6.05404112811413142e-07, + 9.10957047573253477e-09, + -1.18825452781217058e-10, + 3.74126311915777554e-12, + 5.88800634460530042e-15, + -2.22781421310604420e-16, + -9.33201212532223205e-17, + -2.04649166611948051e-18, + 2.10668973783215526e-20, + 2.99104673641559095e-21, + 8.13299468298352308e-23, + 1.31089169153017410e-01, + -2.30890308943045280e-03, + 5.86815814234846646e-05, + -1.44060963740011903e-06, + 3.34278222690289562e-08, + -7.43288813120212846e-10, + 1.54041372742020303e-11, + -3.36204215410651302e-13, + 6.72728345827107495e-15, + -1.08072294978873102e-16, + 3.06363981888257067e-18, + -5.39540386329280062e-20, + 5.71246666684916880e-23, + -3.64499931251152619e-23, + 4.31878057235169296e-02, + -1.21935727922859588e-03, + 4.81088821783148352e-05, + -1.58749620271740645e-06, + 4.85016628202738840e-08, + -1.40048363563099164e-09, + 3.68986917778569865e-11, + -1.00380798584348095e-12, + 2.50079991690427120e-14, + -5.48702775614290341e-16, + 1.51218137345274175e-17, + -3.30508782523896484e-19, + 5.47288023709802127e-21, + -1.97089537864301625e-22, + 7.86622728530712162e-03, + -3.65798118365986903e-04, + 1.97600650088040351e-05, + -8.52672022876615944e-07, + 3.35454925606012900e-08, + -1.21967533872787128e-09, + 4.08251812374417745e-11, + -1.32269005924615675e-12, + 4.01780241699293114e-14, + -1.14895756698471160e-15, + 3.29441529969213722e-17, + -8.80724023014216969e-19, + 2.23416479083352664e-20, + -5.91013906459935832e-22, + 7.55085055297100840e-04, + -5.77465615407377972e-05, + 4.14459155710047660e-06, + -2.35577836616254064e-07, + 1.18876689020434991e-08, + -5.42444587738634529e-10, + 2.26856596501762265e-11, + -8.89350122278863575e-13, + 3.26856667732787456e-14, + -1.13496053589395168e-15, + 3.76885803518955522e-17, + -1.19118555585313898e-18, + 3.60686444594532185e-20, + -1.05418043689752659e-21, + 3.58585790817642379e-05, + -4.54914741255204084e-06, + 4.43821465000145670e-07, + -3.38975936597666841e-08, + 2.22230988636721101e-09, + -1.28866491014167032e-10, + 6.75250538984702324e-12, + -3.25070637084479685e-13, + 1.45127459461899049e-14, + -6.05883186150090583e-16, + 2.38125081151289591e-17, + -8.84857993315731660e-19, + 3.12241641847777137e-20, + -1.04890220572696147e-21, + 8.06641779192231768e-07, + -1.75231757233690682e-07, + 2.46448250391389809e-08, + -2.62392258162834235e-09, + 2.30491281638966863e-10, + -1.74179763400768340e-11, + 1.16299093485218013e-12, + -6.98717875636879277e-14, + 3.82650757697203036e-15, + -1.92914904867944776e-16, + 9.02264648005316790e-18, + -3.93894615627467804e-19, + 1.61329040840215764e-20, + -6.21767415034596181e-22, + 1.06502834393969090e-08, + -4.01677035976472577e-09, + 8.63129718719955156e-10, + -1.32156883531447313e-10, + 1.58772459351437386e-11, + -1.57806143148563688e-12, + 1.34180311059437593e-13, + -9.98850402217690088e-15, + 6.62060574150178536e-16, + -3.95814326319187824e-17, + 2.15633787635683116e-18, + -1.07937658342754927e-19, + 4.99853700307982602e-21, + -2.15071912434899208e-22, +# root=8 base[8]=20.0 */ + 2.15814466851310283e-01, + -2.58707291235968232e-03, + 3.34916071024456691e-05, + -4.73787473192186589e-07, + 7.62522978111141434e-09, + -3.14309775697100714e-11, + 3.21416362258889310e-12, + -6.58522350328602217e-14, + -4.34215694554361045e-15, + -1.00555309391823132e-16, + 3.30951589548252702e-18, + 2.35598715409391910e-19, + 4.08438555161578654e-21, + -1.48107599291086553e-22, + 1.22694469471218676e-01, + -1.90052087806832112e-03, + 4.41700559025143941e-05, + -1.00740537368883365e-06, + 2.16096940265792633e-08, + -4.65095371884936300e-10, + 8.56024199003445092e-12, + -1.64371279413885493e-13, + 4.43452584001774450e-15, + -3.78170467376853480e-17, + 2.37261975197703246e-19, + -8.00934990942431703e-20, + -5.10906835296636876e-22, + 3.98931579643150783e-23, + 3.89756300564775074e-02, + -8.99351253876245712e-04, + 3.29239964765326123e-05, + -9.95558314198871505e-07, + 2.74740640588459685e-08, + -7.76482268737169798e-10, + 1.77106560899454033e-11, + -4.27991058083928112e-13, + 1.31112271303748702e-14, + -1.87655934578975586e-16, + 3.51980352896400436e-18, + -2.40925435855363688e-19, + 1.35982662218717499e-22, + 3.03581156607478320e-23, + 6.66520039921382392e-03, + -2.41082879914937835e-04, + 1.20868016658125778e-05, + -4.68247413824173500e-07, + 1.65667665531242905e-08, + -5.69721145935614175e-10, + 1.70221844365960251e-11, + -5.05103912419386014e-13, + 1.54155818739939246e-14, + -3.76321551280467126e-16, + 9.75920338670999238e-18, + -3.03874856573980016e-19, + 5.53098241373617482e-21, + -1.29960499146593925e-22, + 5.76185634229570772e-04, + -3.33312546743372320e-05, + 2.17778817992177739e-06, + -1.09322691207648562e-07, + 4.94799610868123765e-09, + -2.08042543315639056e-10, + 7.88677076625866141e-12, + -2.84666643301913343e-13, + 9.84339184194945719e-15, + -3.13067858551798518e-16, + 9.70392262246333722e-18, + -2.94696088908310862e-19, + 8.14401256409826462e-21, + -2.25795112802666770e-22, + 2.28390674773754356e-05, + -2.17212481094539711e-06, + 1.87223365721603920e-07, + -1.25103760089758393e-08, + 7.33036407392969194e-10, + -3.86262898732830426e-11, + 1.84502437408563206e-12, + -8.18154566200555731e-14, + 3.39274469064877097e-15, + -1.31814032241870123e-16, + 4.85715574291891670e-18, + -1.70191136201281517e-19, + 5.66500349189126568e-21, + -1.80833126638072789e-22, + 3.63540500354768261e-07, + -6.04671875446253352e-08, + 7.34312821272651814e-09, + -6.85672266581141916e-10, + 5.40096120187443829e-11, + -3.71540841529502280e-12, + 2.28239462715649669e-13, + -1.27396017928576978e-14, + 6.53320999067302981e-16, + -3.10457410851814143e-17, + 1.37691552880926353e-18, + -5.72948378550260223e-20, + 2.24670812432218796e-21, + -8.32576598212885433e-23, + 2.29592875989342585e-09, + -7.40360482549271162e-10, + 1.42867729025730016e-10, + -2.00909963160863060e-11, + 2.25431059563481307e-12, + -2.11803377027699779e-13, + 1.71815171456118907e-14, + -1.22907324952027739e-15, + 7.87380808616707198e-17, + -4.57112541864138613e-18, + 2.42754387373481766e-19, + -1.18831246668556035e-20, + 5.39600567523491389e-22, + -2.28185324108213995e-23, +# root=8 base[9]=22.5 */ + 2.05968927180916028e-01, + -2.33983270576158288e-03, + 2.85285513707155492e-05, + -3.53560485444445662e-07, + 7.52838026831787588e-09, + 5.99041987618018010e-12, + -8.10397791173652580e-13, + -2.15335388220200277e-13, + -2.91736219422872846e-15, + 2.43624205043070361e-16, + 1.21199366551754801e-17, + -3.07368721475288859e-20, + -1.95002701176997197e-20, + -5.56099643092380147e-22, + 1.15729993325549549e-01, + -1.59027912955943154e-03, + 3.38812999633401061e-05, + -7.26196131316707603e-07, + 1.40666677312331052e-08, + -3.00207515829958114e-10, + 5.71289926718620435e-12, + -4.92476478425094792e-14, + 2.42291261490369358e-15, + -9.23076973972361480e-17, + -2.33288349638400152e-18, + 1.05381469960266125e-20, + 5.11067761532563646e-21, + 1.12902895831518359e-22, + 3.58385086851341350e-02, + -6.77320368068659671e-04, + 2.31678959762278522e-05, + -6.60411678467398254e-07, + 1.54447392656124889e-08, + -4.53594405856261605e-10, + 1.06621399566234480e-11, + -1.09266651576166008e-13, + 6.49158881807759533e-15, + -2.35614525182707010e-16, + -4.46356963892386517e-18, + -2.78471861058283877e-20, + 1.14015466867940733e-20, + 2.88960200257687538e-22, + 5.86404764695621413e-03, + -1.63100235148235553e-04, + 7.74309819235096708e-06, + -2.76081804201197748e-07, + 8.35500553153021860e-09, + -2.85556736754020439e-10, + 8.15451939812940569e-12, + -1.75351571544511511e-13, + 6.27526005085379296e-15, + -1.88360780610385267e-16, + 1.16517157134180714e-18, + -8.51332675809632154e-20, + 5.47387698440942035e-21, + 7.47305177869724456e-23, + 4.70950210551721276e-04, + -2.00712398055855400e-05, + 1.23081985224151381e-06, + -5.53381908527909481e-08, + 2.18215344645991826e-09, + -8.70714747878216407e-11, + 3.04662082134131540e-12, + -9.49436263459442097e-14, + 3.24239577601622478e-15, + -1.00383555170520018e-16, + 2.45170371648363621e-18, + -7.83408934611687751e-20, + 2.46795839064813767e-21, + -3.64986269329868671e-23, + 1.64152852141863796e-05, + -1.12166289913149528e-06, + 8.80729902014905703e-08, + -5.15962647290984033e-09, + 2.66483352596255066e-10, + -1.29022382506250771e-11, + 5.62025344928196318e-13, + -2.26195768490614240e-14, + 8.79180477340702983e-16, + -3.18604583681570054e-17, + 1.07671472710491339e-18, + -3.60264357483884070e-20, + 1.14178383938652525e-21, + -3.30984319200548552e-23, + 2.02208732192551568e-07, + -2.41238020209787905e-08, + 2.56000899552420328e-09, + -2.07410274699477549e-10, + 1.44853541886104854e-11, + -9.02811957506366167e-13, + 5.06198031462710503e-14, + -2.60250199228956230e-15, + 1.24269145319874323e-16, + -5.52681560008653155e-18, + 2.30672161490255148e-19, + -9.10315221996516657e-21, + 3.39647401185068886e-22, + -1.20149127795840769e-23, + 6.65858984383914682e-10, + -1.67470580474089589e-10, + 2.81127294395432779e-11, + -3.53005492558359400e-12, + 3.62102113814118675e-13, + -3.16181703512923923e-14, + 2.41233822742305884e-15, + -1.63875779108059240e-16, + 1.00466854279816963e-17, + -5.61600675547942052e-19, + 2.88645440977765994e-20, + -1.37332191448611819e-21, + 6.08244197224925266e-23, + -2.51643108496973165e-24, +# root=8 base[10]=25.0 */ + 1.97042064039465031e-01, + -2.12653573310388156e-03, + 2.50033101184003413e-05, + -2.35310661711805457e-07, + 6.95614362697704133e-09, + -8.53264210005261253e-11, + -6.27013755265889451e-12, + -9.66492629342506118e-14, + 1.13120215759144610e-14, + 3.78652399371741030e-16, + -1.26076246138809527e-17, + -9.20632561103280677e-19, + 3.67323145403169479e-21, + 1.69319318496316657e-21, + 1.09860645397366216e-01, + -1.35066976783573345e-03, + 2.63423420289413083e-05, + -5.42069131221654765e-07, + 9.35215050812152888e-09, + -1.74488408701043965e-10, + 4.82005000442260661e-12, + -3.72326393778716635e-14, + -1.74747638890489916e-15, + -9.85494822019739469e-17, + 3.60560919693351412e-18, + 2.03752916233291724e-19, + -2.01317312448780125e-21, + -4.04010890008908283e-22, + 3.34548531202902427e-02, + -5.20078958663590667e-04, + 1.64692477804855869e-05, + -4.72697041693655243e-07, + 8.76790889840086159e-09, + -2.19870754298071504e-10, + 9.03009866338151614e-12, + -6.30612053456143537e-14, + -3.81028865114289624e-15, + -2.53543577546529354e-16, + 7.71610076181515277e-18, + 4.85540844083467818e-19, + -1.50476694924953660e-21, + -9.27538150697178239e-22, + 5.31726870215450554e-03, + -1.12506677248059591e-04, + 5.07442544282690557e-06, + -1.78796320891908890e-07, + 4.29479470002667953e-09, + -1.32108877486320253e-10, + 5.08276365414283164e-12, + -7.63699457883150743e-14, + 1.92843476209547518e-16, + -1.33292585626380305e-16, + 3.48222191127021565e-18, + 1.55861017614214137e-19, + 6.70888075292327334e-22, + -3.38919224180795435e-22, + 4.06844030042700271e-04, + -1.23976680804294806e-05, + 7.29606159449263598e-07, + -3.11125106511076601e-08, + 1.00503465946631968e-09, + -3.69233993103621703e-11, + 1.40267081454084863e-12, + -3.49646109751546237e-14, + 8.39978169335516553e-16, + -4.18405333414915251e-17, + 1.07301841758004933e-18, + 2.67560697516190525e-21, + 7.08418268331659503e-22, + -5.44064458146462735e-23, + 1.30270677768555619e-05, + -6.07983936759197648e-07, + 4.51229963325764474e-08, + -2.39667484344205508e-09, + 1.04835016024531594e-10, + -4.65928238840741681e-12, + 1.95290246609931992e-13, + -6.86055256456316764e-15, + 2.37345208940692802e-16, + -8.91319392332863909e-18, + 2.74737557342532150e-19, + -7.08361180601732561e-21, + 2.63923842391847899e-22, + -8.70529022972222837e-24, + 1.35085185283469003e-07, + -1.06996161059290320e-08, + 1.02729166216522903e-09, + -7.26318035797743415e-11, + 4.39950431147475492e-12, + -2.48364373696572538e-13, + 1.27696269131464788e-14, + -5.95485597263954124e-16, + 2.62665145681620822e-17, + -1.10113724341392026e-18, + 4.27093140936843400e-20, + -1.57077979902395225e-21, + 5.66179247207336257e-23, + -1.90509574764238128e-24, + 2.71886519085364100e-10, + -4.68755165842139307e-11, + 6.74718277767621193e-12, + -7.35331842829961913e-13, + 6.72680661975484361e-14, + -5.36477244021367891e-15, + 3.78989089327035568e-16, + -2.40992065580588679e-17, + 1.39769493067565979e-18, + -7.44947089136604834e-20, + 3.67148401182624198e-21, + -1.68491703945033946e-22, + 7.23472380631468742e-24, + -2.91053071548996496e-25, +# root=8 base[11]=27.5 */ + 1.88920522184168077e-01, + -1.93609607245165643e-03, + 2.27640852162194951e-05, + -1.45911952969985604e-07, + 3.77212055212001363e-09, + -2.19975546177652391e-10, + -2.93989541544056993e-12, + 3.23132590824568721e-13, + 8.90942250326286584e-15, + -5.75319831418046088e-16, + -2.03915128098467916e-17, + 9.52572742197841952e-19, + 4.46368737832245079e-20, + -1.48669531254122567e-21, + 1.04841536713826122e-01, + -1.16363328089418776e-03, + 2.06392080816944295e-05, + -4.14564894306202827e-07, + 6.89299681784078354e-09, + -7.95602358711325905e-11, + 2.74010806642403276e-12, + -1.09198172155171646e-13, + -1.31608990556633022e-15, + 1.28930004985658588e-16, + 4.27178946536665623e-18, + -2.39175746036136972e-19, + -8.86528532911654846e-21, + 3.95249544898988470e-22, + 3.16051377275888903e-02, + -4.08891541386077501e-04, + 1.15292145812164490e-05, + -3.56742461297954040e-07, + 6.29843599045166516e-09, + -4.35138367642073053e-11, + 4.81439710146948000e-12, + -2.38173540997857223e-13, + -3.70975608305798900e-15, + 2.91342742290742828e-16, + 1.15991244421583485e-17, + -5.24377665432341472e-19, + -2.44208810970253653e-20, + 8.01540145701402258e-22, + 4.93627844846775306e-03, + -7.94867773261036627e-05, + 3.27339112263042127e-06, + -1.25348471073165865e-07, + 2.68855660330897580e-09, + -3.82554244199352409e-11, + 2.56978149663009894e-12, + -1.08844166824764288e-13, + -8.47277252743318955e-16, + 8.75093475112566484e-17, + 4.86725200744206817e-18, + -1.86959072700647844e-19, + -9.47061262036014358e-21, + 2.55294129261534595e-22, + 3.66887600905968796e-04, + -7.82657345348706078e-06, + 4.33483968619653182e-07, + -1.94036689537841386e-08, + 5.34811515496589365e-10, + -1.30552917722149847e-11, + 6.34974461184324929e-13, + -2.35127881846408612e-14, + 1.46839934795025979e-16, + 2.82244246197434072e-18, + 9.15809515133710556e-19, + -2.75327463828400201e-20, + -1.27046983189821120e-21, + 2.33992508197850867e-23, + 1.11676224287850573e-05, + -3.39225575603061826e-07, + 2.40285825775534538e-08, + -1.26316292756495071e-09, + 4.63738051121411178e-11, + -1.65174013181491474e-12, + 7.37144585668923481e-14, + -2.72487747791266603e-15, + 6.25127827203061179e-17, + -1.83600443664056931e-18, + 1.07772638375957089e-19, + -2.84693301231263497e-21, + -2.22214456065700214e-23, + -8.96106553872248723e-25, + 1.04503711832597790e-07, + -5.06281474167700388e-09, + 4.55873037699483533e-10, + -2.96616878561017052e-11, + 1.51605566245844167e-12, + -7.44732572159437538e-14, + 3.65671078617894244e-15, + -1.58264140970265339e-16, + 6.00622490507302365e-18, + -2.34581412254544505e-19, + 9.37757564115456207e-21, + -3.09146192764861604e-22, + 8.76997757033507529e-24, + -3.33008919559601301e-25, + 1.54528407755835199e-10, + -1.56965470085922337e-11, + 1.97957961199653146e-12, + -1.85730652954661359e-13, + 1.46716271687280291e-14, + -1.04840404872774534e-15, + 6.80074036837395482e-17, + -3.98733572021174193e-18, + 2.14888618805991188e-19, + -1.08261208998249558e-20, + 5.08842361489929859e-22, + -2.22199059954570902e-23, + 9.13695323612914297e-25, + -3.58113783413587508e-26, +# root=8 base[12]=30.0 */ + 1.81530270531868876e-01, + -1.76030375856275011e-03, + 2.12268542771020574e-05, + -1.21212750936489402e-07, + -5.27315066465277491e-10, + -1.72000786123409171e-10, + 6.45799779486829799e-12, + 2.23598922677588029e-13, + -1.35013704795333369e-14, + -3.20112291454020848e-16, + 2.84370196270545624e-17, + 3.66859392800316264e-19, + -5.66544801246173267e-20, + -2.28698706412806559e-22, + 1.00488234244591898e-01, + -1.01664684869154473e-03, + 1.62823093763027415e-05, + -3.14496826202838442e-07, + 5.70775079872202964e-09, + -5.03743367825583012e-11, + -1.14313494826615747e-13, + -6.84085326558907459e-14, + 3.40565528654010879e-15, + 5.75440340345589487e-17, + -6.35275749917765849e-18, + -5.52267275770476508e-20, + 1.24404851657148296e-20, + -1.73224746427085905e-23, + 3.01292950345566773e-02, + -3.32105380608512500e-04, + 7.83810954681259013e-06, + -2.59015661413122780e-07, + 6.02249519401768253e-09, + -9.89685905085455568e-12, + -1.62853195138021209e-12, + -1.56856791552580987e-13, + 7.98306208916482075e-15, + 1.65421778131027720e-16, + -1.53480809585637629e-17, + -2.07394578239763660e-19, + 3.10500911466777726e-20, + 1.33370243358456550e-22, + 4.66215592668357912e-03, + -5.86266735787693239e-05, + 2.01005375572407351e-06, + -8.61462000013201473e-08, + 2.29314100692941205e-09, + -1.24673694409751252e-11, + -2.36193172101408370e-13, + -6.91382983350383265e-14, + 3.15152275760034614e-15, + 6.05618407413191240e-17, + -5.48964121420531157e-18, + -9.55285267829023591e-20, + 1.16453895862846922e-20, + 8.79271812572627075e-23, + 3.41227056038975371e-04, + -5.16013590264090743e-06, + 2.45465426229033545e-07, + -1.23187010697729163e-08, + 3.76600877718144849e-10, + -4.91247754809610032e-12, + 9.04858488860774892e-14, + -1.32209934947428499e-14, + 5.16836462337070423e-16, + 6.54391034979068524e-18, + -6.58739744493492572e-19, + -1.79665408889023323e-20, + 1.63164373471997006e-21, + 1.93635565641995330e-23, + 1.01143215221658539e-05, + -1.97015428804120258e-07, + 1.24814321775805763e-08, + -7.11751109611873343e-10, + 2.58474055066289526e-11, + -6.09799162901735035e-13, + 1.99249414109472583e-14, + -1.20868025162636248e-15, + 4.21407048861935226e-17, + -1.39559057278387214e-19, + -1.48005370513469509e-20, + -1.62603617148968274e-21, + 9.39647711319713466e-23, + 1.33562440249234805e-24, + 8.97565162465691789e-08, + -2.51561911502266757e-09, + 2.08416233965169802e-10, + -1.37470991288680526e-11, + 6.32015804077726341e-13, + -2.39352801838603708e-14, + 1.03690715591659547e-15, + -4.98062651085882288e-17, + 1.84999805312082138e-18, + -4.73009090707511360e-20, + 1.50915872827421274e-21, + -8.73166322677988164e-23, + 3.18245568584665478e-24, + -1.69873279122662252e-26, + 1.13381608742553908e-10, + -5.94603367088829435e-12, + 6.76684823249215344e-13, + -5.75592340040982858e-14, + 3.86168402240659545e-15, + -2.34830179631150708e-16, + 1.38587103261035933e-17, + -7.64241688359546204e-19, + 3.77385263706152620e-20, + -1.71450152442767581e-21, + 7.61365806657525662e-23, + -3.28909221801402785e-24, + 1.28768676115818275e-25, + -4.49498155618129666e-27, +# root=8 base[13]=32.5 */ + 1.74819003101188197e-01, + -1.59665052908757737e-03, + 1.96389983863009332e-05, + -1.47557126970994190e-07, + -2.17914361696769234e-09, + 6.44571780660381264e-12, + 6.46637761716105410e-12, + -1.85354395831848887e-13, + -7.05328986861442883e-15, + 4.84093830797964798e-16, + 2.02588083769010400e-18, + -9.10909413496592971e-19, + 1.62818613968559581e-20, + 1.26721033492651800e-21, + 9.66603488148773671e-02, + -9.00011551110329613e-04, + 1.30213346876625342e-05, + -2.31803893745648197e-07, + 4.58320428526198921e-09, + -6.35676913543760376e-11, + -5.23353211817690624e-13, + 2.91108909448638093e-14, + 1.65485192945363248e-15, + -1.09358502008166145e-16, + -1.39506126787708725e-19, + 1.90915067504589358e-19, + -3.99798659658555857e-21, + -2.43309566198302400e-22, + 2.89088671071023005e-02, + -2.80229166288724059e-04, + 5.29190916115294766e-06, + -1.67308298741532559e-07, + 5.23499482116878459e-09, + -7.15352896154441995e-11, + -2.37653252938217066e-12, + 8.15116341193281307e-14, + 4.20077920025317519e-15, + -2.70307537375906409e-16, + -1.05416027164602305e-18, + 4.98076912705702854e-19, + -8.82700522903322502e-21, + -6.98347617298302723e-22, + 4.45411309909124736e-03, + -4.60808706858971051e-05, + 1.18593523336532717e-06, + -5.22013980483152489e-08, + 1.89208755016151970e-09, + -2.94991627226065420e-11, + -7.36010319309612719e-13, + 2.52055707413094773e-14, + 1.72198774630389361e-15, + -1.03003132588041179e-16, + -4.98141813872348609e-19, + 1.89708997641222816e-19, + -3.01988991609087534e-21, + -2.81328371088893893e-22, + 3.23712878885581209e-04, + -3.69245958864489759e-06, + 1.30673922916555192e-07, + -7.05246164321595180e-09, + 2.79953646105715283e-10, + -5.29133218771612020e-12, + -5.12893174477007069e-14, + 1.79060500970283080e-15, + 2.85202304837161171e-16, + -1.50231010076440060e-17, + -7.67193239442550086e-20, + 2.63985901884420389e-20, + -3.47335475370984558e-22, + -4.30041655087165166e-23, + 9.48072879592094174e-06, + -1.25101993888370331e-07, + 6.07837988986091659e-09, + -3.78660559649400765e-10, + 1.64382619725884642e-11, + -3.96039140546415171e-13, + 2.97444293324055632e-15, + -1.15519889027268680e-16, + 2.10221499401784391e-17, + -9.18913884175354765e-19, + -1.73045398465499984e-21, + 1.27615280933732828e-21, + -9.66926966639617361e-24, + -2.59155674792948597e-24, + 8.21873539203902919e-08, + -1.36576464971438744e-09, + 9.16633868476687129e-11, + -6.48338809039412120e-12, + 3.18157636780592710e-13, + -1.03911232138749212e-14, + 2.66966652605650749e-16, + -1.12541432816343301e-17, + 6.73097248716995640e-19, + -2.53547393721981296e-20, + 3.02652348963145939e-22, + 8.43483217520098034e-24, + 3.50324729514081689e-25, + -5.88719562063039164e-26, + 9.71755604974088441e-11, + -2.51273176501700251e-12, + 2.45014815163733956e-13, + -2.06624256097762041e-14, + 1.27983676460147329e-15, + -6.39599246166422176e-17, + 3.05755373326406096e-18, + -1.57031850447534693e-19, + 7.91872488733493545e-21, + -3.40948055450372641e-22, + 1.23151266232556823e-23, + -4.41373757975845983e-25, + 1.90570752240373116e-26, + -8.28218493816394489e-28, +# root=8 base[14]=35.0 */ + 1.68734643667689060e-01, + -1.44715935809965816e-03, + 1.76851932378563169e-05, + -1.74984792008157789e-07, + -9.85375265947148130e-10, + 8.89254581521143257e-11, + 4.88663237976773910e-13, + -1.75289015853393953e-13, + 5.24109918620040654e-15, + 1.08394500892548302e-16, + -1.19849510372022117e-17, + 2.13371853497847515e-19, + 1.23780442372130814e-20, + -7.40671879105768089e-22, + 9.32526558612509493e-02, + -8.05820227986748247e-04, + 1.06364293909773062e-05, + -1.68985375735293351e-07, + 3.26869882848165627e-09, + -6.37121706168283287e-11, + 5.07233799965026803e-13, + 2.99824239312838864e-14, + -1.04528852855718005e-15, + -2.33682091209054126e-17, + 2.56824789865498558e-18, + -4.88589917360307130e-20, + -2.42657318213004097e-21, + 1.54788517081498172e-22, + 2.78617526404437918e-02, + -2.44625066629485996e-04, + 3.73205212930245610e-06, + -9.71545789727503481e-08, + 3.46095131652489659e-09, + -9.44056907370025262e-11, + 4.63457164659635600e-13, + 8.42301587193550347e-14, + -2.68152703899380412e-15, + -6.24684399104339578e-17, + 6.61401091850455601e-18, + -1.17197727263581766e-19, + -6.80132401376557738e-21, + 4.06114144825692459e-22, + 4.28545868436056281e-03, + -3.86339848946572995e-05, + 7.19412620663278344e-07, + -2.72981073905768628e-08, + 1.20087352952536089e-09, + -3.56960376962793744e-11, + 2.32150359100620981e-13, + 2.95467739388044919e-14, + -9.46694252629012906e-16, + -2.55127409312617374e-17, + 2.53695025770608143e-18, + -4.31094876427823166e-20, + -2.69629677225333331e-21, + 1.55874957779654194e-22, + 3.10594354617866187e-04, + -2.91777811885769399e-06, + 6.92886072542188831e-08, + -3.45731551086283154e-09, + 1.69166822430583837e-10, + -5.36283989606744134e-12, + 5.18268151671098116e-14, + 3.43344808893799853e-15, + -1.11678943597689759e-16, + -4.12467725760026270e-18, + 3.65511640811464227e-19, + -5.87199957318608184e-21, + -3.98870358233785553e-22, + 2.21660521795448929e-23, + 9.05434547781001546e-06, + -9.07574606068864254e-08, + 2.86316487274279634e-09, + -1.75244968329128631e-10, + 9.23849100256055043e-12, + -3.16142071993160144e-13, + 4.62361557299265664e-15, + 1.02466308354626307e-16, + -3.32619917070729911e-18, + -2.85152454889209474e-19, + 2.05990967796827767e-20, + -3.14877453634220216e-22, + -2.18104633213238044e-23, + 1.16635147014005203e-24, + 7.78018923961321130e-08, + -8.71042748413513360e-10, + 3.84664234773960207e-11, + -2.78050414170285146e-12, + 1.58246683765326198e-13, + -6.07295950768859817e-15, + 1.37012100528371908e-16, + -1.29376661720272175e-18, + 5.59144202228686133e-20, + -8.00482446833524163e-21, + 4.25323010867432184e-22, + -7.30736173027961583e-24, + -3.03407400734208883e-25, + 1.69982092069844442e-26, + 8.98633874544433713e-11, + -1.27335826083348708e-12, + 8.75260751782384517e-14, + -7.52914021778405251e-15, + 4.88176779672478426e-16, + -2.33661093745770310e-17, + 8.78673707918675790e-19, + -3.16550968876923330e-20, + 1.44542568904937011e-21, + -7.50954024463165260e-23, + 3.24801636751231269e-24, + -9.82815251850209285e-26, + 1.91502648654973089e-27, + -4.49888467863237008e-29, +# root=8 base[15]=37.5 */ + 1.63215467153135951e-01, + -1.31421262462316215e-03, + 1.55478394165060059e-05, + -1.77195138844292098e-07, + 6.15883460676018685e-10, + 6.15793374885700871e-11, + -2.00840788067252747e-12, + -1.38096060139452526e-14, + 3.49643513524787130e-15, + -1.22306152933792035e-16, + -8.26840627620318866e-20, + 1.75643057410955261e-19, + -6.73707452645563508e-21, + 1.71426585546230138e-23, + 9.01878492256714265e-02, + -7.28042425084436976e-04, + 8.88309915491839274e-06, + -1.26005261309276336e-07, + 2.16353605238355582e-09, + -4.54393401360863590e-11, + 8.63390810251816480e-13, + -2.33160078995469505e-15, + -6.88206627745199772e-16, + 2.54649479983750964e-17, + 1.54810292408151022e-20, + -3.67379665165700719e-20, + 1.42190841733262905e-21, + -5.14848183583905153e-24, + 2.69367301809887022e-02, + -2.18627032542741199e-04, + 2.83984293088438920e-06, + -5.56636347353269937e-08, + 1.82181573489102366e-09, + -6.52453393937688860e-11, + 1.57179442621827956e-12, + 3.93347690593454087e-16, + -1.80712136976906868e-15, + 6.54076000560922875e-17, + 7.03265290130826466e-20, + -9.67208415517600803e-20, + 3.69927377742149592e-21, + -9.24314735694567868e-24, + 4.14075215105865271e-03, + -3.39135195124323191e-05, + 4.85149152343223277e-07, + -1.32779855129485565e-08, + 5.90561982166759399e-10, + -2.38865840844257143e-11, + 6.08825312437849637e-13, + -7.90675248890776201e-16, + -6.57052773729018066e-16, + 2.41882300422131023e-17, + 4.41179835639917036e-20, + -3.73889317300485309e-20, + 1.41700539717361484e-21, + -2.71850502738714730e-24, + 2.99824028628725605e-04, + -2.49099011553296858e-06, + 4.07900240968299124e-08, + -1.51659155534459541e-09, + 7.97813116323192155e-11, + -3.42198320457537362e-12, + 9.18054186673804724e-14, + -3.84957640159373745e-16, + -8.38652452171500503e-17, + 3.19145077573465426e-18, + 1.14035782633175435e-20, + -5.41190325809558821e-21, + 2.02020163707731046e-22, + -2.45834540599060762e-25, + 8.72677557284585381e-06, + -7.41887008477214531e-08, + 1.45997584370174247e-09, + -7.12960926026098341e-11, + 4.17317856597742062e-12, + -1.87464497406722251e-13, + 5.38095308677665226e-15, + -4.66000198529213134e-17, + -3.47300195732268022e-18, + 1.41529691229443330e-19, + 1.24978361451493862e-21, + -3.00908558092122608e-22, + 1.09418323546573854e-23, + -7.53652376744692073e-27, + 7.47718573736622454e-08, + -6.61857680113191428e-10, + 1.68323563573020595e-11, + -1.05264789029478233e-12, + 6.70196024928712283e-14, + -3.18455698090012577e-15, + 1.01555380510841312e-16, + -1.59434049412279706e-18, + -2.08572068019014536e-20, + 1.14647183822039541e-21, + 5.07838597373303271e-23, + -5.64173513166120285e-24, + 1.96966428417601077e-25, + -4.95101975831548866e-28, + 8.57466950970908023e-11, + -8.31039215564510512e-13, + 3.16793295681388969e-14, + -2.54309095099015997e-15, + 1.79023001082590503e-16, + -9.47160270256385044e-18, + 3.70295158031713635e-19, + -1.06231496031274990e-20, + 2.50381848217172527e-22, + -8.93836747885039564e-24, + 5.56774642403167749e-25, + -2.97628355131286539e-26, + 1.05059322296958029e-27, + -1.86931691681135306e-29, +# root=8 base[16]=40.0 */ + 1.56815600396265187e-01, + -1.86728295126894648e-03, + 3.31724009106351548e-05, + -6.27333813748390939e-07, + 9.49916410064959545e-09, + 9.17248145194094746e-11, + -1.89360276884251316e-11, + 9.53116791422042791e-13, + -1.18570348470806136e-14, + -2.03257953408122127e-15, + 1.81175809633345520e-16, + -6.67365700061666618e-18, + -7.14275288524506940e-20, + 2.43262361627511547e-20, + 8.66468872675466850e-02, + -1.03232983958373350e-03, + 1.84856261784107656e-05, + -3.73519371132508372e-07, + 8.52905384738345196e-09, + -2.43604158727046729e-10, + 8.73875116794587075e-12, + -2.95039796695902783e-13, + 4.03343268698636602e-15, + 4.13009897639676845e-16, + -3.80536955679641459e-17, + 1.39226126338426627e-18, + 1.53553648428053175e-20, + -5.05545616433144279e-21, + 2.58762109449279000e-02, + -3.08664590735661340e-04, + 5.62028805222299123e-06, + -1.28719040893101470e-07, + 4.64752797788812691e-09, + -2.61905109390245787e-10, + 1.50282001815383016e-11, + -6.26855327096886237e-13, + 8.89132994921244946e-15, + 1.05962187247080555e-15, + -9.81498597850569767e-17, + 3.63595262477064867e-18, + 3.97124232981130499e-20, + -1.33652470511102916e-20, + 3.97697045726497830e-03, + -4.75345984546239264e-05, + 8.89571425231950574e-07, + -2.42381815757970924e-08, + 1.26199641029755498e-09, + -8.99226805669672800e-11, + 5.60720607655113172e-12, + -2.42914815852388260e-13, + 3.81353051851091871e-15, + 3.83632051985230452e-16, + -3.68584392882341937e-17, + 1.38006036607345238e-18, + 1.54136512317662257e-20, + -5.15802588529907438e-21, + 2.87877633588594535e-04, + -3.45175879025766948e-06, + 6.73594708234332714e-08, + -2.27050722034398293e-09, + 1.55306168693415933e-10, + -1.23745390418511398e-11, + 8.02260744508338609e-13, + -3.58774942223630999e-14, + 6.48895035035290442e-16, + 4.88284789985342884e-17, + -5.02832293532334356e-18, + 1.91231095035248696e-19, + 2.28078614567430078e-21, + -7.40543921124659334e-22, + 8.37492580812791773e-06, + -1.00930051374767746e-07, + 2.09981379020763861e-09, + -9.06824220928979982e-11, + 7.61054999209771997e-12, + -6.48704608089034735e-13, + 4.34007082876005378e-14, + -2.02323675571509049e-15, + 4.41080878757456252e-17, + 2.03231224695030356e-18, + -2.43499141724716114e-19, + 9.47221278192869978e-21, + 1.36091855946883593e-22, + -4.00254181698562802e-23, + 7.16935043401692065e-08, + -8.71752036887060140e-10, + 2.01246618385937887e-11, + -1.16029957130761940e-12, + 1.14434023783910481e-13, + -1.02945939329403126e-14, + 7.16498364310278208e-16, + -3.56927477032076159e-17, + 9.98539542227154660e-19, + 1.39704740436096677e-20, + -3.02175203112783399e-21, + 1.20724226552737324e-22, + 3.09208549549877471e-24, + -6.79754342642626790e-25, + 8.20449356623010864e-11, + -1.01770259395676373e-12, + 2.87558140485071942e-14, + -2.38674231996818581e-15, + 2.73090212542196000e-16, + -2.63161290463419584e-17, + 1.97762641956279973e-18, + -1.12794970429545307e-19, + 4.56687859999890952e-21, + -1.04692853957422290e-22, + -2.65516032781068460e-27, + -4.51926863535539266e-26, + 2.32448953410297822e-26, + -2.51118725096330254e-27, +# root=8 base[17]=44.0 */ + 1.49833228116970474e-01, + -1.62941289179202174e-03, + 2.65586960256432104e-05, + -4.77545903193694570e-07, + 8.58010616540992614e-09, + -1.16544885906197753e-10, + -1.71019595139014831e-12, + 2.77421776067638097e-13, + -1.61405233076598725e-14, + 5.62759900251647828e-16, + -3.49886845748069216e-18, + -1.08054901354733954e-18, + 8.57927759741811339e-20, + -3.57514857613093466e-21, + 8.27878153777444614e-02, + -9.00362621071350419e-04, + 1.46914931093981683e-05, + -2.67086510933011752e-07, + 5.18978690734560245e-09, + -1.12348858249229924e-10, + 3.07835835343216752e-12, + -1.12123365151775538e-13, + 4.39895210295299651e-15, + -1.33355588492183386e-16, + 7.95450128523814806e-19, + 2.32786102850692365e-19, + -1.81389147889748364e-20, + 7.41537905365112610e-22, + 2.47230824705291195e-02, + -2.68913808720375896e-04, + 4.39809252756825744e-06, + -8.18107550638339002e-08, + 1.83565312574348144e-09, + -6.41453080557985784e-11, + 3.49346181296127252e-12, + -2.03968390324429271e-13, + 9.92308379900087494e-15, + -3.31391152394399368e-16, + 2.41598187741476628e-18, + 5.81935044723202642e-19, + -4.68586672673378658e-20, + 1.95908717052258434e-21, + 3.79957492876422482e-03, + -4.13375237637092776e-05, + 6.78677464986566219e-07, + -1.31003263502103988e-08, + 3.55855637112823126e-10, + -1.77837214016951145e-11, + 1.20718804827792337e-12, + -7.60586222595194497e-14, + 3.80920447646292957e-15, + -1.30350502502753959e-16, + 1.14792341038569811e-18, + 2.13757930086257450e-19, + -1.77403576513049258e-20, + 7.52463621937966319e-22, + 2.75017374859923985e-04, + -2.99312164745302503e-06, + 4.94365805079873369e-08, + -1.00840762783150717e-09, + 3.42212069002493121e-11, + -2.20279205358794975e-12, + 1.65456024404586253e-13, + -1.07732999004708618e-14, + 5.49814289754000108e-16, + -1.93572922767866724e-17, + 2.14366427649135106e-19, + 2.81309020222241952e-20, + -2.45795315853484981e-21, + 1.06573172628319230e-22, + 7.99989533100615322e-06, + -8.71151185489730653e-08, + 1.45255197317540017e-09, + -3.21409653327640003e-11, + 1.39357516412037416e-12, + -1.07585801468857691e-13, + 8.57200749680546190e-15, + -5.71613394452533898e-16, + 2.98151987085740590e-17, + -1.09400385992135805e-18, + 1.58749717471963797e-20, + 1.27334356727115307e-21, + -1.23040933735035402e-22, + 5.53512807290179535e-24, + 6.84695255804883294e-08, + -7.46322513774925349e-10, + 1.26471130040463062e-11, + -3.17183912542720369e-13, + 1.79797816519971143e-14, + -1.59361228211793007e-15, + 1.32773328960283992e-16, + -9.09656376901832264e-18, + 4.90769536640588856e-19, + -1.92581374706959751e-20, + 3.85995696400950370e-22, + 1.32367420757973338e-23, + -1.69016888134514284e-24, + 8.17678898746391713e-26, + 7.83208162925564248e-11, + -8.55463409150056675e-13, + 1.50011980312298874e-14, + -4.69834486096545418e-16, + 3.63794290875928489e-17, + -3.64104985978040740e-18, + 3.19500806815252808e-19, + -2.29825542193764888e-20, + 1.33008156421000776e-21, + -5.96015052134815748e-23, + 1.82546762353637296e-24, + -1.60197492946816594e-26, + -2.05139427761506227e-27, + 1.31461358417727147e-28, +# root=8 base[18]=48.0 */ + 1.43707276966266922e-01, + -1.43771375627183115e-03, + 2.15728625023292073e-05, + -3.59331549834955352e-07, + 6.23780092512864891e-09, + -1.06289817289162496e-10, + 1.39833245270487067e-12, + 1.50043420361469130e-14, + -2.76492129632430550e-15, + 1.72274420384647867e-16, + -7.56446680494499457e-18, + 2.24265022515795575e-19, + -1.67698227923498537e-21, + -3.00196681177827104e-22, + 7.94029254983440180e-02, + -7.94388217919904057e-04, + 1.19211847687047680e-05, + -1.98844984206142064e-07, + 3.49246856809470824e-09, + -6.41676534099816327e-11, + 1.29305562717105855e-12, + -3.26171419305912159e-14, + 1.12884133320947623e-15, + -4.60497079714399426e-17, + 1.74041548320970167e-18, + -4.80206682418070432e-20, + 2.88292850719013447e-22, + 6.64717859862560129e-23, + 2.37121835600242019e-02, + -2.37232062894468775e-04, + 3.56097193548434723e-06, + -5.95728710953089500e-08, + 1.07204013777089399e-09, + -2.26152217014227696e-11, + 7.17127016880599372e-13, + -3.58145501158313140e-14, + 2.03517392616512703e-15, + -1.04385367208933735e-16, + 4.34279993111181291e-18, + -1.26976058996605202e-19, + 1.00503099229098370e-21, + 1.62866666103548953e-22, + 3.64419854872967668e-03, + -3.64596964181710469e-05, + 5.47505054217675360e-07, + -9.20435586175370315e-09, + 1.72200215963227278e-10, + -4.36195909406626028e-12, + 1.95458459695720503e-13, + -1.22468279564178282e-14, + 7.54145470536917235e-16, + -3.97675797527196562e-17, + 1.67958809275234777e-18, + -5.00946008775583459e-20, + 4.61776211400766237e-22, + 5.95220795137603679e-23, + 2.63769248390782079e-04, + -2.63906088602765314e-06, + 3.96555579458731513e-08, + -6.71739706626844677e-10, + 1.33076393824206119e-11, + -4.16628097516277752e-13, + 2.39038765814820839e-14, + -1.66309797327485282e-15, + 1.05842446356121847e-16, + -5.66479513169193899e-18, + 2.42581905889413420e-19, + -7.42475234129549313e-21, + 8.23085785496400485e-23, + 7.78438582551898584e-24, + 7.67261871869425145e-06, + -7.67699172448321026e-08, + 1.15473840952620318e-09, + -1.97929341265598269e-11, + 4.25997537867002927e-13, + -1.68042509913745853e-14, + 1.15208916667052647e-15, + -8.51047823431616889e-17, + 5.53387306617094345e-18, + -3.00598852256606219e-19, + 1.31183648996016166e-20, + -4.17227976172756495e-22, + 5.78858744718477469e-24, + 3.49090972769813593e-25, + 6.56672117431187197e-08, + -6.57102662550336583e-10, + 9.90064638340963202e-12, + -1.73085853789079041e-13, + 4.21790223337619349e-15, + -2.13501328555300131e-16, + 1.67462611377456502e-17, + -1.29130268406648999e-18, + 8.57900168750792689e-20, + -4.76019174441840577e-21, + 2.14257213536109441e-22, + -7.25041076992628483e-24, + 1.32661763400330282e-25, + 3.58441974948552515e-27, + 7.51123640232996430e-11, + -7.51747254176062753e-13, + 1.13663683380092453e-14, + -2.06821916825238335e-16, + 6.22247320572061433e-18, + -4.18291170433082319e-19, + 3.68139026483541790e-20, + -2.96755728344044408e-21, + 2.04095331823808886e-22, + -1.18149735803076360e-23, + 5.66827480157406952e-25, + -2.16207930318256811e-26, + 5.73906519316926277e-28, + -3.66952635817417781e-30, +# root=8 base[19]=52.0 */ + 1.38276476009180138e-01, + -1.28083162211050554e-03, + 1.77955507972318647e-05, + -2.74690329807024149e-07, + 4.44808576203255340e-09, + -7.36116704292446730e-11, + 1.19501998318272434e-12, + -1.59691191248833910e-14, + -4.51548705648968624e-17, + 1.99792743987601311e-17, + -1.31245038841914656e-18, + 6.27521509589235462e-20, + -2.36188329910344260e-21, + 6.47853346643777169e-23, + 7.64022240894755428e-02, + -7.07701226791016338e-04, + 9.83272677620148334e-06, + -1.51798899348381156e-07, + 2.46151403032600726e-09, + -4.11565819129038085e-11, + 7.10592025702242475e-13, + -1.31963756107825493e-14, + 2.97298613676821439e-16, + -9.23330037131327514e-18, + 3.62960040215003091e-19, + -1.45818808537356831e-20, + 5.11401293674586565e-22, + -1.33938893651908901e-23, + 2.28160757476072451e-02, + -2.11341768898519163e-04, + 2.93642649381891381e-06, + -4.53467601863333835e-08, + 7.37486413975393253e-10, + -1.25965410409251685e-11, + 2.44058406710424371e-13, + -6.71408114130021023e-15, + 2.93514438317873386e-16, + -1.56649150091762066e-17, + 8.03114305887096350e-19, + -3.59198462652400204e-20, + 1.32368589826877945e-21, + -3.61048106284888803e-23, + 3.50647925851272670e-03, + -3.24800275102591810e-05, + 4.51301007345455636e-07, + -6.97288056672230041e-09, + 1.13951301362458821e-10, + -2.01387767424162620e-12, + 4.56478570777990851e-14, + -1.74248235079788906e-15, + 9.77405482795551807e-17, + -5.73869724139895897e-18, + 3.03613326892697803e-19, + -1.37627865701011619e-20, + 5.12442153608260143e-22, + -1.42069368294244475e-23, + 2.53800901468121602e-04, + -2.35092833868730445e-06, + 3.26673687226394708e-08, + -5.05124076274604948e-10, + 8.31641787243712890e-12, + -1.54545519092297446e-13, + 4.22396498651520932e-15, + -2.06788831171969175e-16, + 1.30797910294147805e-17, + -7.97832104251289102e-19, + 4.28263552203413305e-20, + -1.96020698634101851e-21, + 7.38360375079621877e-23, + -2.09245687885188591e-24, + 7.38264922473098953e-06, + -6.83848953231941986e-08, + 9.50327715204905894e-10, + -1.47123446566257956e-11, + 2.45023016481231367e-13, + -4.89610255029044789e-15, + 1.65094139333016656e-16, + -9.74305981139414707e-18, + 6.60220740555780008e-19, + -4.11972963946126911e-20, + 2.23853851711419386e-21, + -1.03686885053339389e-22, + 3.97189692892928911e-24, + -1.16305492123259882e-25, + 6.31853734765328707e-08, + -5.85284923256267377e-10, + 8.13474688409053203e-12, + -1.26189532137012340e-13, + 2.14166483699035335e-15, + -4.76939958572643470e-17, + 2.02910034448989416e-18, + -1.38384230357141887e-19, + 9.83160578098402492e-21, + -6.25717154951089428e-22, + 3.45335922698850360e-23, + -1.62964483897800485e-24, + 6.41809228270639040e-26, + -1.98103579140854397e-27, + 7.22733396433070426e-11, + -6.69475142994099611e-13, + 9.30758772475666152e-15, + -1.44963874370317184e-16, + 2.55350880332689155e-18, + -6.82403865923059779e-20, + 3.80353083500640105e-21, + -2.93398861229601841e-22, + 2.17721333908877133e-23, + -1.42412862509349896e-24, + 8.09006462506336149e-26, + -3.96443448556361176e-27, + 1.65168894355612312e-28, + -5.63750450995249953e-30, +# root=8 base[20]=56.0 */ + 1.33418574259079575e-01, + -1.15054498339150720e-03, + 1.48823377024574668e-05, + -2.13889675595551331e-07, + 3.22743701501630188e-09, + -5.00544711636423364e-11, + 7.86894255249930184e-13, + -1.22031347385269205e-14, + 1.66655906520134105e-16, + -6.78839312950031830e-19, + -1.06306326597606332e-19, + 7.63340729494069484e-21, + -3.80224748474987118e-22, + 1.55434923137978712e-23, + 7.37180757412644327e-02, + -6.35713322181370982e-04, + 8.22297983915520535e-06, + -1.18182555238698220e-07, + 1.78353205728961556e-09, + -2.76927103037384695e-11, + 4.38753726722177770e-13, + -7.11175409059522444e-15, + 1.21524038905343094e-16, + -2.41209210151433767e-18, + 6.43766614616977102e-20, + -2.29885844101147036e-21, + 9.11434115112941311e-23, + -3.42504657066491031e-24, + 2.20145053824313680e-02, + -1.89843741888939122e-04, + 2.45564146352627427e-06, + -3.52939822509242387e-08, + 5.32787292493008838e-10, + -8.29259467698265235e-12, + 1.33530225234308568e-13, + -2.35699563765992640e-15, + 5.49152567679607496e-17, + -2.01084223611617932e-18, + 9.73569725660680077e-20, + -4.83071238684633645e-21, + 2.19284786725326476e-22, + -8.70939982493722201e-24, + 3.38329015700303010e-03, + -2.91760603616749444e-05, + 3.77395370722229807e-07, + -5.42439457261339609e-09, + 8.19240300835446342e-11, + -1.28019622724532945e-12, + 2.11576582984469445e-14, + -4.21583156482113804e-16, + 1.31904995690670390e-17, + -6.39109950864086523e-19, + 3.50082642983310998e-20, + -1.80964152040925578e-21, + 8.33947580778849164e-23, + -3.33976608182503338e-24, + 2.44884396596669576e-04, + -2.11177962057117340e-06, + 2.73162087990250336e-08, + -3.92648798746342449e-10, + 5.93447345121931817e-12, + -9.33031838207703213e-14, + 1.60259480976663443e-15, + -3.71783039458999653e-17, + 1.49014533093690867e-18, + -8.36146994804468764e-20, + 4.81377323794036476e-21, + -2.53080254096688829e-22, + 1.17636843573456892e-23, + -4.74679230375939871e-25, + 7.12328237939300865e-06, + -6.14281956754816623e-08, + 7.94588930279344097e-10, + -1.14227615533795164e-11, + 1.72837701945791923e-13, + -2.74292270247316918e-15, + 4.98352330401362434e-17, + -1.38423121346452393e-18, + 6.78108978226076964e-20, + -4.15027756516229051e-21, + 2.45680267437474371e-22, + -1.30719847263916402e-23, + 6.13133313500971770e-25, + -2.49956934017987308e-26, + 6.09655420984529930e-08, + -5.25741461300285919e-10, + 6.80067033306330989e-12, + -9.77807449115311547e-14, + 1.48225469170587948e-15, + -2.38839443199292236e-17, + 4.72336214896770169e-19, + -1.61919918347047788e-20, + 9.34652924777668472e-22, + -6.06617893207394384e-23, + 3.66782438577641192e-24, + -1.97722654974507651e-25, + 9.39637261723888637e-27, + -3.89436861331244864e-28, + 6.97342156841443323e-11, + -6.01359354196414983e-13, + 7.77898047505110000e-15, + -1.11883471807931018e-16, + 1.70217224165534571e-18, + -2.82448927578217425e-20, + 6.45513669168252772e-22, + -2.86492456017841835e-23, + 1.90889979322749017e-24, + -1.30145576868698728e-25, + 8.06477872376617187e-27, + -4.44277316514216341e-28, + 2.16545134378910078e-29, + -9.27724285934957303e-31, +# root=8 base[21]=60.0 */ + 1.29039402885070653e-01, + -1.04094507390770736e-03, + 1.25954910855896540e-05, + -1.69339100196846907e-07, + 2.39047614303613456e-09, + -3.47068492032166914e-11, + 5.12968332351824801e-13, + -7.65576318709757385e-15, + 1.13425115002076226e-16, + -1.55934325532223916e-18, + 1.32948403926967704e-20, + 3.84426600051783693e-22, + -3.49743518319514687e-23, + 1.80621552340658949e-24, + 7.12984419429794347e-02, + -5.75155808342310993e-04, + 6.95941645132908446e-06, + -9.35654234106695152e-08, + 1.32083209047913742e-09, + -1.91789885211356953e-11, + 2.83700335305263638e-13, + -4.25631174414282020e-15, + 6.48849674057093287e-17, + -1.02484345103339956e-18, + 1.79733395296797405e-20, + -4.02272284095610493e-22, + 1.23787784574081361e-23, + -4.58838266156900832e-25, + 2.12919276113223803e-02, + -1.71759375898907087e-04, + 2.07829800725165957e-06, + -2.79415995166925240e-08, + 3.94451971397298466e-10, + -5.72890760918681520e-12, + 8.48908395759220518e-14, + -1.28760343004762416e-15, + 2.07724987678100908e-17, + -4.09094230782155301e-19, + 1.20836599102711898e-20, + -5.09141228103124979e-22, + 2.37935793114640434e-23, + -1.06232056142001018e-24, + 3.27224108561492135e-03, + -2.63967688122372677e-05, + 3.19402434629106302e-07, + -4.29420829802082281e-09, + 6.06238374668505189e-11, + -8.80814777112347048e-13, + 1.30891464465265523e-14, + -2.02070233481629254e-16, + 3.54633572033709435e-18, + -8.90511831301995719e-20, + 3.56724480328819732e-21, + -1.77553595083967886e-22, + 8.80218673032743394e-24, + -4.01000108053353398e-25, + 2.36846603324414166e-04, + -1.91061261595983073e-06, + 2.31185304722020274e-08, + -3.10818820069403125e-10, + 4.38827942340589536e-12, + -6.37948380163981702e-14, + 9.52144112540469723e-16, + -1.50918475775166673e-17, + 2.96193532010895719e-19, + -9.37715487197476329e-21, + 4.50378225949220985e-22, + -2.40557131289790594e-23, + 1.22035490058120855e-24, + -5.61217600586681776e-26, + 6.88947623057503650e-06, + -5.55765640612225044e-08, + 6.72480158038066582e-10, + -9.04127959136929341e-12, + 1.27660783591657543e-13, + -1.85750998699607061e-15, + 2.79081745799463304e-17, + -4.59883989582850010e-19, + 1.03946763935309394e-20, + -4.05400120457547953e-22, + 2.18426228018321981e-23, + -1.21254944187629280e-24, + 6.23843595471583114e-26, + -2.89225119208420205e-27, + 5.89644812877951890e-08, + -4.75659287989592664e-10, + 5.75551351877545983e-12, + -7.73819861023227218e-14, + 1.09278084584491403e-15, + -1.59230555663222178e-17, + 2.41813457075480541e-19, + -4.22935893195522190e-21, + 1.14121998663618408e-22, + -5.35977480891538315e-24, + 3.12593212728537967e-25, + -1.78212523675597018e-26, + 9.28666038111843204e-28, + -4.35020198132526413e-29, + 6.74453415142106264e-11, + -5.44073381184367637e-13, + 6.58333820724870533e-15, + -8.85140248398223455e-17, + 1.25034555985441995e-18, + -1.82688176092461693e-20, + 2.83149028866346746e-22, + -5.49514555973851975e-24, + 1.87611860776733664e-25, + -1.04781714797782682e-26, + 6.51105742649601400e-28, + -3.80883322743797868e-29, + 2.02091841731007660e-30, + -9.64359207898872031e-32, +# root=8 base[22]=64.0 */ + 1.25065134131820938e-01, + -9.47707955124251172e-04, + 1.07719851026156582e-05, + -1.36041795443306359e-07, + 1.80400269482216722e-09, + -2.46055748761476987e-11, + 3.41804537118473355e-13, + -4.80821534968077078e-15, + 6.81573403270358768e-17, + -9.63753320510076294e-19, + 1.30908165450551546e-20, + -1.42744224390616966e-22, + -4.14136903422733461e-25, + 1.25178111407704207e-25, + 6.91025299666292586e-02, + -5.23639284690292396e-04, + 5.95187004973525151e-06, + -7.51674954445785001e-08, + 9.96770752184346487e-10, + -1.35955107781030947e-11, + 1.88874179271897628e-13, + -2.65833034462351839e-15, + 3.78029802936318018e-17, + -5.43618152852076682e-19, + 7.99544653009979609e-21, + -1.25673950204306271e-22, + 2.35779184672261874e-24, + -5.97827875165150720e-26, + 2.06361601407759679e-02, + -1.56374942318599294e-04, + 1.77741313516097525e-06, + -2.24473503425300668e-08, + 2.97667271985665832e-10, + -4.06012626534088139e-12, + 5.64138128998710443e-14, + -7.94887705152314451e-16, + 1.13795875479775494e-17, + -1.69334972399520999e-19, + 2.86790535555708151e-21, + -6.70437249061466059e-23, + 2.33714073296290669e-24, + -9.93716170471679120e-26, + 3.17145973292031575e-03, + -2.40324183192074525e-05, + 2.73161005715166261e-07, + -3.44981257099977161e-09, + 4.57470194377697667e-11, + -6.24000133647459354e-13, + 8.67248009635711217e-15, + -1.22420934454800582e-16, + 1.77168787605699804e-18, + -2.77915914009096045e-20, + 5.62320114419181257e-22, + -1.77892095545114926e-23, + 7.74254349500322536e-25, + -3.60413582284600004e-26, + 2.29551993744037998e-04, + -1.73947961118094368e-06, + 1.97715436911180275e-08, + -2.49699414826428976e-10, + 3.31121059259562152e-12, + -4.51678172688679358e-14, + 6.27999728623267522e-16, + -8.88951332858316220e-18, + 1.30763614346674409e-19, + -2.20783258116830338e-21, + 5.42369397386000662e-23, + -2.12357216047345947e-24, + 1.02550324370822789e-25, + -4.94471656231061283e-27, + 6.67728809296064040e-06, + -5.05985869130922418e-08, + 5.75121543976730569e-10, + -7.26334722313809092e-12, + 9.63183577497153039e-14, + -1.31396053747532764e-15, + 1.82798901402524027e-17, + -2.59850389339866030e-19, + 3.91618390256806703e-21, + -7.29883027330639303e-23, + 2.18473877960595459e-24, + -9.94354020277974029e-26, + 5.08915758811221153e-27, + -2.50228974491200575e-28, + 5.71484414050101155e-08, + -4.33054608903225747e-10, + 4.92225300036014595e-12, + -6.21643585376231034e-14, + 8.24362961902538747e-16, + -1.12471166261508007e-17, + 1.56621398627307125e-19, + -2.24148525543248444e-21, + 3.50785134512587047e-23, + -7.47071670771545802e-25, + 2.72292684549849497e-26, + -1.38411612098557246e-27, + 7.36067078235220024e-29, + -3.67356374807854191e-30, + 6.53681006075189410e-11, + -4.95340846105813384e-13, + 5.63022102099353010e-15, + -7.11055699644690216e-17, + 9.42951712930693604e-19, + -1.28678109253553699e-20, + 1.79515686118052570e-22, + -2.60194893624430246e-24, + 4.35484644258859304e-26, + -1.12577359266959696e-27, + 5.02705721137083926e-29, + -2.79369404762743143e-30, + 1.53422817133596687e-31, + -7.78950448059505953e-33, +# root=8 base[23]=68.0 */ + 1.21436961714503466e-01, + -8.67606107028798083e-04, + 9.29775669268201671e-06, + -1.10710648836988908e-07, + 1.38416912536285282e-09, + -1.78001154242185798e-11, + 2.33143607192929773e-13, + -3.09325165136940339e-15, + 4.14267403725816038e-17, + -5.58325830083580888e-19, + 7.52870810922562122e-21, + -9.95576624066089142e-23, + 1.18700719771012386e-24, + -7.31496576668270231e-27, + 6.70978474070611786e-02, + -4.79380423862092405e-04, + 5.13731117048000891e-06, + -6.11712130231866839e-08, + 7.64798240383044597e-10, + -9.83514639242589133e-12, + 1.28820256605009871e-13, + -1.70921317439344292e-15, + 2.28979403833328015e-17, + -3.09159966580215454e-19, + 4.20744768440464085e-21, + -5.80616102284381139e-23, + 8.33051966760957102e-25, + -1.33769641877282900e-26, + 2.00374997103270752e-02, + -1.43157872802194788e-04, + 1.53416055974618799e-06, + -1.82676229064332243e-08, + 2.28392521438590574e-10, + -2.93708443223790626e-12, + 3.84702756083271905e-14, + -5.10481545151156874e-16, + 6.84325931118280831e-18, + -9.27434156346573042e-20, + 1.28637505156735343e-21, + -1.92585437811808834e-23, + 3.60293477859896801e-25, + -9.87593611303627217e-27, + 3.07945485235010512e-03, + -2.20011584496827144e-05, + 2.35776831025878501e-07, + -2.80745210914383410e-09, + 3.51004177365493945e-11, + -4.51385725725281457e-13, + 5.91242599323222310e-15, + -7.84675624074568326e-17, + 1.05301609293211407e-18, + -1.43585698605541050e-20, + 2.05229656279849717e-22, + -3.44411045126212245e-24, + 8.35578031769353967e-26, + -3.00691671805009592e-27, + 2.22892630058856901e-04, + -1.59245590745019424e-06, + 1.70656562771067707e-08, + -2.03204926908404728e-10, + 2.54058830271867652e-12, + -3.26716688585360513e-14, + 4.27959724505942338e-16, + -5.68110902644038345e-18, + 7.63623513806397873e-20, + -1.05089795289324670e-21, + 1.56872654422343116e-23, + -3.02945782590540185e-25, + 9.17850247067690595e-27, + -3.83501337161831883e-28, + 6.48357820992548779e-06, + -4.63219103277937176e-08, + 4.96411735666855556e-10, + -5.91089566058278124e-12, + 7.39015507630754952e-14, + -9.50370208580931588e-16, + 1.24493024451872449e-17, + -1.65323671172262058e-19, + 2.22762086527126938e-21, + -3.10823469108021342e-23, + 4.93239417983139235e-25, + -1.12001715675576815e-26, + 4.06848462356601416e-28, + -1.85971173799556337e-29, + 5.54905500945411713e-08, + -3.96452113707648552e-10, + 4.24860462280434654e-12, + -5.05891743920048245e-14, + 6.32496551327520131e-16, + -8.13393984250201903e-18, + 1.06557945155125892e-19, + -1.41589150411312943e-21, + 1.91524099658818641e-23, + -2.73074264841434886e-25, + 4.73113993050286927e-27, + -1.29005273688746144e-28, + 5.43529850835226806e-30, + -2.63791156244827388e-31, + 6.34717548204372095e-11, + -4.53473813466143285e-13, + 4.85968136396090124e-15, + -5.78654197635801521e-17, + 7.23469528711026851e-19, + -9.30399564383387677e-21, + 1.21903039669265289e-22, + -1.62154649930786972e-24, + 2.20929016099792015e-26, + -3.27529497307439361e-28, + 6.51846468203723075e-30, + -2.20245470604303732e-31, + 1.05462069010801247e-32, + -5.36382252946533595e-34, +# root=8 base[24]=72.0 */ + 1.18107385555648384e-01, + -7.98186887634141744e-04, + 8.09127141031292974e-06, + -9.11349137420800367e-08, + 1.07780809552896868e-09, + -1.31108910631009862e-11, + 1.62439481305532063e-13, + -2.03870190530812574e-15, + 2.58323918678740743e-17, + -3.29713412564669017e-19, + 4.23072776408206150e-21, + -5.43983477844659549e-23, + 6.93752349988108649e-25, + -8.43482740841098226e-27, + 6.52581489340143261e-02, + -4.41024060818620469e-04, + 4.47068904524042035e-06, + -5.03549862487068848e-08, + 5.95523820656141463e-10, + -7.24419153693361042e-12, + 8.97531089241358507e-14, + -1.12645341361135806e-15, + 1.42736703098081513e-17, + -1.82213477060803545e-19, + 2.34027600466848745e-21, + -3.02335037567269105e-23, + 3.93962930237359414e-25, + -5.24456579049930168e-27, + 1.94881086486835102e-02, + -1.31703472352748789e-04, + 1.33508650296306703e-06, + -1.50375617382665030e-08, + 1.77841897200807612e-10, + -2.16334064468978029e-12, + 2.68030913479066633e-14, + -3.36396891027399891e-16, + 4.26283558188285500e-18, + -5.44372503538766185e-20, + 7.00547843953128412e-22, + -9.13947950323068545e-24, + 1.24330419859689656e-25, + -1.93312888339189091e-27, + 2.99502191435440952e-03, + -2.02407936554745542e-05, + 2.05182216815813966e-07, + -2.31104145578609608e-09, + 2.73315587491189048e-11, + -3.32472166378970518e-13, + 4.11922885429282475e-15, + -5.16997526265277323e-17, + 6.55200889650234432e-19, + -8.37184426572408186e-21, + 1.08082208781594427e-22, + -1.43244212877574942e-24, + 2.07885937549972975e-26, + -3.89546507710381383e-28, + 2.16781327729049584e-04, + -1.46503973874137776e-06, + 1.48512013141085312e-08, + -1.67274447457619033e-10, + 1.97827324194032982e-12, + -2.40645235688941670e-14, + 2.98152789806139813e-16, + -3.74213682779401398e-18, + 4.74313269078191260e-20, + -6.06581238911239608e-22, + 7.86905129518963816e-24, + -1.06745327277117958e-25, + 1.69005940792177251e-27, + -3.84139543070657825e-29, + 6.30581052595084594e-06, + -4.26155845722108466e-08, + 4.31996900094889974e-10, + -4.86573721319613330e-12, + 5.75447006064965215e-14, + -6.99997474448916460e-16, + 8.67280439147748909e-18, + -1.08856080767158852e-19, + 1.38002788984885148e-21, + -1.76717229752918275e-23, + 2.30918652462331799e-25, + -3.24005792043247641e-27, + 5.73535795610512613e-29, + -1.57052100024363636e-30, + 5.39691021758619048e-08, + -3.64731041093772416e-10, + 3.69730183740332595e-12, + -4.16440469460961531e-14, + 4.92503851315835583e-16, + -5.99102316644300373e-18, + 7.42277639461663564e-20, + -9.31706112457034381e-22, + 1.18155888867711638e-23, + -1.51615312472627082e-25, + 2.00384151879557130e-27, + -2.95754188432108509e-29, + 6.03358948860617277e-31, + -1.96956719110930894e-32, + 6.17314770775207781e-11, + -4.17190299544310557e-13, + 4.22908468874011619e-15, + -4.76337096408605165e-17, + 5.63340716852721563e-19, + -6.85271898161951524e-21, + 8.49048413802684029e-23, + -1.06581122725053877e-24, + 1.35242969721321076e-26, + -1.74198983889227655e-28, + 2.35025858932371511e-30, + -3.77650083665176658e-32, + 9.32112747136374519e-34, + -3.61032973279668321e-35, +# root=8 base[25]=76.0 */ + 1.15037561321972043e-01, + -7.37556670763441532e-04, + 7.09310570867516728e-06, + -7.57937634353425996e-08, + 8.50392097047720682e-10, + -9.81384325417264472e-12, + 1.15352701599530194e-13, + -1.37347298605454045e-15, + 1.65107882587312034e-17, + -1.99947911380192283e-19, + 2.43551623899233641e-21, + -2.98002942149882749e-23, + 3.65596778834433963e-25, + -4.47376008930067680e-27, + 6.35619717974191395e-02, + -4.07523905821104886e-04, + 3.91917022431751547e-06, + -4.18785047127034096e-08, + 4.69869126919088678e-10, + -5.42246569567743196e-12, + 6.37360990331026264e-14, + -7.58888452961641278e-16, + 9.12276565955119912e-18, + -1.10479487647265365e-19, + 1.34583757263723367e-21, + -1.64749081798915533e-23, + 2.02579947824302736e-25, + -2.50452411819840001e-27, + 1.89815775124906605e-02, + -1.21699286346723583e-04, + 1.17038586585564062e-06, + -1.25062212649173320e-08, + 1.40317504401683578e-10, + -1.61931656042371895e-12, + 1.90335785855474985e-14, + -2.26627784987144625e-16, + 2.72435430905692335e-18, + -3.29937309236447318e-20, + 4.01994029767823102e-22, + -4.92572989467808149e-24, + 6.08574222699944814e-26, + -7.68380411545736794e-28, + 2.91717588626878768e-03, + -1.87033044684080224e-05, + 1.79870267540385789e-07, + -1.92201344066127681e-09, + 2.15646376229292264e-11, + -2.48863998068738852e-13, + 2.92516796772402322e-15, + -3.48292322318863866e-17, + 4.18694596373348442e-19, + -5.07090949867452396e-21, + 6.18015860783291082e-23, + -7.58463674516019360e-25, + 9.44327205919625885e-27, + -1.23220400885526516e-28, + 2.11146789548889973e-04, + -1.35375542868318475e-06, + 1.30191085512966483e-08, + -1.39116386297564604e-10, + 1.56086029245069014e-12, + -1.80129128516317822e-14, + 2.11725295346276707e-16, + -2.52096271211755426e-18, + 3.03057073388784181e-20, + -3.67065933219962105e-22, + 4.47556002018868392e-24, + -5.50572423295220910e-26, + 6.93422113038920888e-28, + -9.48240293413296474e-30, + 6.14191112309376678e-06, + -3.93785079240028409e-08, + 3.78704349685547586e-10, + -4.04666574525771956e-12, + 4.54028461820213295e-14, + -5.23965874608926610e-16, + 6.15874039461633638e-18, + -7.33308029200522524e-20, + 8.81558688616439042e-22, + -1.06786774686390807e-23, + 1.30288084415015039e-25, + -1.60848086628160141e-27, + 2.06047108925159774e-29, + -3.00583435726854702e-31, + 5.25663477507223270e-08, + -3.37026098221260353e-10, + 3.24119059058935337e-12, + -3.46339167996310670e-14, + 3.88586184260442326e-16, + -4.48443045936031932e-18, + 5.27104030959026739e-20, + -6.27613431790696678e-22, + 7.54514535673348389e-24, + -9.14127506141300385e-26, + 1.11645090367056591e-27, + -1.38602317702932677e-29, + 1.82228072767175176e-31, + -2.90922719062584138e-33, + 6.01269645110722316e-11, + -3.85500555282200643e-13, + 3.70737096935676119e-15, + -3.96153123803009178e-17, + 4.44476529482135143e-19, + -5.12942631474819628e-21, + 6.02917795811856591e-23, + -7.17887519077050546e-25, + 8.63079454868238151e-27, + -1.04597530219742038e-28, + 1.27985630986843140e-30, + -1.60494942729347812e-32, + 2.20785479236847369e-34, + -4.03965839775514999e-36, +# root=8 base[26]=80.0 */ + 1.12195372044619601e-01, + -6.84232619692573736e-04, + 6.25919498751219813e-06, + -6.36193652633611741e-08, + 6.78967432370156500e-10, + -7.45319942555579132e-12, + 8.33307548192596538e-14, + -9.43781948009344579e-16, + 1.07917996240013655e-17, + -1.24314243484344743e-19, + 1.44043362551253616e-21, + -1.67698101519044064e-23, + 1.95987552166615031e-25, + -2.29646686366203975e-27, + 6.19915703336365587e-02, + -3.78060643636634925e-04, + 3.45840759051991137e-06, + -3.51517561235865185e-08, + 3.75151457421787717e-10, + -4.11813364541917275e-12, + 4.60429362125686244e-14, + -5.21470048761684078e-16, + 5.96281916318922988e-18, + -6.86877222823230807e-20, + 7.95892601604094179e-22, + -9.26631246083650994e-24, + 1.08318070720052559e-25, + -1.27053527229408079e-27, + 1.85126068958218967e-02, + -1.12900641825310435e-04, + 1.03278784299622301e-06, + -1.04974053619277399e-08, + 1.12031868533687773e-10, + -1.22980251892992684e-12, + 1.37498498152593388e-14, + -1.55727147339471134e-16, + 1.78068347294172433e-18, + -2.05123379341937531e-20, + 2.37682264062128112e-22, + -2.76748983652207947e-24, + 3.23650281277334639e-26, + -3.80461732544164384e-28, + 2.84510233108537349e-03, + -1.73510884256242112e-05, + 1.58723572328898124e-07, + -1.61328939968872732e-09, + 1.72175713624444623e-11, + -1.89001691390488907e-13, + 2.11313999368134155e-15, + -2.39328637569125543e-17, + 2.73663753767411196e-19, + -3.15244318574335497e-21, + 3.65291058198560234e-23, + -4.25390754254126222e-25, + 4.97847559551768991e-27, + -5.87313032073862230e-29, + 2.05930066121281412e-04, + -1.25588129035833518e-06, + 1.14884991613749489e-08, + -1.16770770991918381e-10, + 1.24621725221865041e-12, + -1.36800460259925639e-14, + 1.52950232457371863e-16, + -1.73227396439189533e-18, + 1.98079488752565872e-20, + -2.28176979722228224e-22, + 2.64410605952117396e-24, + -3.07976645975187878e-26, + 3.60832317583053846e-28, + -4.27942816563045625e-30, + 5.99016526082141997e-06, + -3.65315110071859021e-08, + 3.34181452333081607e-10, + -3.39666872862809452e-12, + 3.62504001136554007e-14, + -3.97929928916072085e-16, + 4.44906952967470773e-18, + -5.03889937470735733e-20, + 5.76181200661105155e-22, + -6.63735230848563414e-24, + 7.69174093724577960e-26, + -8.96184952076954874e-28, + 1.05172094994972464e-29, + -1.25719953082061549e-31, + 5.12676109884873247e-08, + -3.12659703629151324e-10, + 2.86013556417903511e-12, + -2.90708325154720751e-14, + 3.10253779408632959e-16, + -3.40573522549103773e-18, + 3.80779429408813453e-20, + -4.31260873272027061e-22, + 4.93133133208953825e-24, + -5.68074561230615713e-26, + 6.58370654758116361e-28, + -7.67454254846624538e-30, + 9.02965964676945160e-32, + -1.09262515721386472e-33, + 5.86414304659365723e-11, + -3.57629542636318941e-13, + 3.27150880597313329e-15, + -3.32520897833008006e-17, + 3.54877574464909460e-19, + -3.89558206877012081e-21, + 4.35546944267215735e-23, + -4.93289307988079531e-25, + 5.64062347781108990e-27, + -6.49797140383212817e-29, + 7.53192358778284181e-31, + -8.78743523593186234e-33, + 1.03867976352335482e-34, + -1.28422244794322280e-36, +# root=8 base[27]=84.0 */ + 1.09554000239280094e-01, + -6.37038774996760595e-04, + 5.55635338757350173e-06, + -5.38480670008788811e-08, + 5.47947798082602140e-10, + -5.73511942539122207e-12, + 6.11384656673387735e-14, + -6.60222612661463883e-16, + 7.19817089434908179e-18, + -7.90603969885548367e-20, + 8.73459658669452639e-22, + -9.69613958103284468e-24, + 1.08061282091518930e-25, + -1.20812726747154971e-27, + 6.05321270155746646e-02, + -3.51984518664102725e-04, + 3.07006488366844392e-06, + -2.97527979272433906e-08, + 3.02758873605855889e-10, + -3.16883889910114894e-12, + 3.37809788929522531e-14, + -3.64794338930178015e-16, + 3.97722217789081883e-18, + -4.36834290153391534e-20, + 4.82614987391363933e-22, + -5.35745099691793333e-24, + 5.97086749878978638e-26, + -6.67607926192868104e-28, + 1.80767718252049826e-02, + -1.05113501599877405e-04, + 9.16816657976845322e-07, + -8.88510888034484841e-09, + 9.04131961995604225e-11, + -9.46313644590942706e-13, + 1.00880487392017790e-14, + -1.08938911764934934e-16, + 1.18772200692202072e-18, + -1.30452299582892895e-20, + 1.44123992874363332e-22, + -1.59991387448127903e-24, + 1.78316894274574064e-26, + -1.99417509040938169e-28, + 2.77812119858691399e-03, + -1.61543250020531610e-05, + 1.40900588742935576e-07, + -1.36550428201034722e-09, + 1.38951146489700495e-11, + -1.45433820930534731e-13, + 1.55037759707188755e-15, + -1.67422316457930164e-17, + 1.82534571667008001e-19, + -2.00485133497599324e-21, + 2.21496807412519227e-23, + -2.45885270941429941e-25, + 2.74066157715765340e-27, + -3.06596304817520090e-29, + 2.01081935038761081e-04, + -1.16925889781559961e-06, + 1.01984618406647015e-08, + -9.88359483632536696e-11, + 1.00573601419181037e-12, + -1.05265796715326313e-14, + 1.12217180298456345e-16, + -1.21181190997331966e-18, + 1.32119530426010327e-20, + -1.45112299774287750e-22, + 1.60321085643067791e-24, + -1.77976544213734306e-26, + 1.98392933210459419e-28, + -2.22049109095599566e-30, + 5.84914114065570111e-06, + -3.40118087782108904e-08, + 2.96656398856222188e-10, + -2.87497438114429185e-12, + 2.92551983654817121e-14, + -3.06200804260817195e-16, + 3.26421230420632415e-18, + -3.52496058720609664e-20, + 3.84313907158944477e-22, + -4.22107959123359906e-24, + 4.66349616293641838e-26, + -5.17719170095449123e-28, + 5.77188765190189558e-30, + -6.46479789807117151e-32, + 5.00606376550573974e-08, + -2.91094503328781903e-10, + 2.53897249768380610e-12, + -2.46058433710409691e-14, + 2.50384432465013702e-16, + -2.62065953696592069e-18, + 2.79371869585301373e-20, + -3.01688355219743752e-22, + 3.28920111313626609e-24, + -3.61266950805480786e-26, + 3.99134140871822053e-28, + -4.43116292893184356e-30, + 4.94122447486742131e-32, + -5.54063284788572370e-34, + 5.72608581817615809e-11, + -3.32962620002020478e-13, + 2.90415286195582673e-15, + -2.81449013378736554e-17, + 2.86397220451974513e-19, + -2.99758894700251544e-21, + 3.19553920765190351e-23, + -3.45080193243141011e-25, + 3.76228762663918488e-27, + -4.13228661190202565e-29, + 4.56547088041383970e-31, + -5.06889172289948515e-33, + 5.65451038556504672e-35, + -6.35310772902829105e-37, +# root=8 base[28]=88.0 */ + 1.07090853875733791e-01, + -5.95031842140634451e-04, + 4.95923652680086333e-06, + -4.59246452815343082e-08, + 4.46545432033089213e-10, + -4.46601034335402794e-12, + 4.54927929117374954e-14, + -4.69428305626320580e-16, + 4.89048411652968051e-18, + -5.13262498394074312e-20, + 5.41844122749988949e-22, + -5.74754164675027144e-24, + 6.12081812911600689e-26, + -6.53935443091984550e-28, + 5.91711590161361836e-02, + -3.28774330175978077e-04, + 2.74013851328957990e-06, + -2.53748512628964111e-08, + 2.46730788022478530e-10, + -2.46761510092234388e-12, + 2.51362388669347242e-14, + -2.59374315503563614e-16, + 2.70215058555091289e-18, + -2.83594125664895577e-20, + 2.99386407724243805e-22, + -3.17570345015803741e-24, + 3.38195565586967342e-26, + -3.61323951878731660e-28, + 1.76703445410468507e-02, + -9.81822189569946146e-05, + 8.18290404060104280e-07, + -7.57771813073533287e-09, + 7.36814709350632721e-11, + -7.36906454986589668e-13, + 7.50646106372735270e-15, + -7.74572206608651917e-17, + 8.06946030889626952e-19, + -8.46900086023684958e-21, + 8.94060807379335942e-23, + -9.48364156077773462e-25, + 1.00996050921507307e-26, + -1.07904715224899646e-28, + 2.71565958958272947e-03, + -1.50890936969403134e-05, + 1.25758622175552594e-07, + -1.16457847559701746e-09, + 1.13237063745181697e-11, + -1.13251163635443346e-13, + 1.15362736275974749e-15, + -1.19039809115086058e-17, + 1.24015167141436920e-19, + -1.30155491648431098e-21, + 1.37403383921646115e-23, + -1.45749087910445076e-25, + 1.55216254324223657e-27, + -1.65838309318028792e-29, + 1.96560929543902003e-04, + -1.09215687209947591e-06, + 9.10247800122296789e-09, + -8.42928283678384729e-11, + 8.19616073898206078e-13, + -8.19718129678451950e-15, + 8.35001808208395692e-17, + -8.61616663215332979e-19, + 8.97628579858392525e-21, + -9.42072607572000544e-23, + 9.94533425365791039e-25, + -1.05494134545233464e-26, + 1.12347339921377183e-28, + -1.20040519492278401e-30, + 5.71763256315960109e-06, + -3.17690382848936128e-08, + 2.64776040416578216e-10, + -2.45193905744700084e-12, + 2.38412769225518133e-14, + -2.38442455565937626e-16, + 2.42888225050272707e-18, + -2.50630046589418468e-20, + 2.61105319022022895e-22, + -2.74033361679918603e-24, + 2.89293421979355263e-26, + -3.06865626689720541e-28, + 3.26803984247631839e-30, + -3.49203162248223342e-32, + 4.89351043351645062e-08, + -2.71899459422417141e-10, + 2.26612029019174326e-12, + -2.09852403550274146e-14, + 2.04048679379332004e-16, + -2.04074086822077679e-18, + 2.07879056656720858e-20, + -2.14504995779939495e-22, + 2.23470395792052458e-24, + -2.34535042280296329e-26, + 2.47595662753088015e-28, + -2.62635770498866733e-30, + 2.79704895723288330e-32, + -2.98903187784253659e-34, + 5.59734394266646161e-11, + -3.11006753309139672e-13, + 2.59205632684091226e-15, + -2.40035470614513836e-17, + 2.33396996910633608e-19, + -2.33426058707213981e-21, + 2.37778297302688204e-23, + -2.45357245399310700e-25, + 2.55612141508818107e-27, + -2.68268240550964734e-29, + 2.83207565502876030e-31, + -3.00412298180590812e-33, + 3.19945706228238036e-35, + -3.41960772376362853e-37, +# root=8 base[29]=92.0 */ + 1.04786747002020314e-01, + -5.57447296429626482e-04, + 4.44824224982031613e-06, + -3.94393287119134892e-08, + 3.67163488232180033e-10, + -3.51579635613302881e-12, + 3.42891523158879642e-14, + -3.38761143533221859e-16, + 3.37898561297815556e-18, + -3.39534727765371360e-20, + 3.43185730966407411e-22, + -3.48535668666191541e-24, + 3.55373608034143225e-26, + -3.63519066321528955e-28, + 5.78980654765807456e-02, + -3.08007653561410348e-04, + 2.45779765480098332e-06, + -2.17915041877455392e-08, + 2.02869697652382582e-10, + -1.94259115254139769e-12, + 1.89458652236245733e-14, + -1.87176483958399286e-16, + 1.86699879392024651e-18, + -1.87603914315833191e-20, + 1.89621212045202120e-22, + -1.92577228647848220e-24, + 1.96355431398175496e-26, + -2.00856182344804421e-28, + 1.72901592979152960e-02, + -9.19806447973293913e-05, + 7.33974660876031825e-07, + -6.50761947995848553e-09, + 6.05831880608935124e-11, + -5.80118009154365847e-13, + 5.65782336693110654e-15, + -5.58967073916666636e-17, + 5.57543784797901992e-19, + -5.60243513990969979e-21, + 5.66267793744050222e-23, + -5.75095395806636781e-25, + 5.86378407484614660e-27, + -5.99819806001489979e-29, + 2.65723097779591716e-03, + -1.41360073381496207e-05, + 1.12800592070438619e-07, + -1.00012080721192689e-09, + 9.31070219049125468e-12, + -8.91551962096872836e-14, + 8.69520243190276497e-16, + -8.59046234800048703e-18, + 8.56858858898987755e-20, + -8.61007927358003178e-22, + 8.70266323302034756e-24, + -8.83833034211430156e-26, + 9.01173595624021014e-28, + -9.21832837618479330e-30, + 1.92331834598117462e-04, + -1.02317195906466634e-06, + 8.16456867993338960e-09, + -7.23892921910657838e-11, + 6.73913727732945101e-13, + -6.45310196751856261e-15, + 6.29363517852525119e-17, + -6.21782373181638897e-19, + 6.20199138614504092e-21, + -6.23202257986810019e-23, + 6.29903542746195851e-25, + -6.39723253316301239e-27, + 6.52274782732236902e-29, + -6.67230089345875047e-31, + 5.59461518106429201e-06, + -2.97623811834554360e-08, + 2.37493808443318815e-10, + -2.10568486431210710e-12, + 1.96030364904515919e-14, + -1.87710070503295510e-16, + 1.83071445179664366e-18, + -1.80866215500785986e-20, + 1.80405678775121974e-22, + -1.81279236939641777e-24, + 1.83228532913221275e-26, + -1.86084946122630149e-28, + 1.89736122199037201e-30, + -1.94087244374562767e-32, + 4.78822440190503632e-08, + -2.54725222788800314e-10, + 2.03262174803116522e-12, + -1.80217786634313053e-14, + 1.67775145630588831e-16, + -1.60654113103168078e-18, + 1.56684085095085719e-20, + -1.54796710505744477e-22, + 1.54402554194444097e-24, + -1.55150200833951785e-26, + 1.56818535120565165e-28, + -1.59263261894268018e-30, + 1.62388355954383087e-32, + -1.66113459053647755e-34, + 5.47691462320467478e-11, + -2.91362346559194947e-13, + 2.32497369396609259e-15, + -2.06138507331934755e-17, + 1.91906241518024664e-19, + -1.83760991022683495e-21, + 1.79219953965402547e-23, + -1.77061118336621416e-25, + 1.76610270636954170e-27, + -1.77465452227288037e-29, + 1.79373750628635837e-31, + -1.82170157951629317e-33, + 1.85745103824357144e-35, + -1.90008242065661490e-37, +# root=8 base[30]=96.0 */ + 1.02625266595858786e-01, + -5.23659646419169164e-04, + 4.00803409945837328e-06, + -3.40855460349621377e-08, + 3.04367323695887498e-10, + -2.79550364897974788e-12, + 2.61511579242898452e-14, + -2.47813860609787678e-16, + 2.37091606001336848e-18, + -2.28513505129096384e-20, + 2.21541316174166723e-22, + -2.15809511820167629e-24, + 2.11060223866593802e-26, + -2.07085693704549968e-28, + 5.67037776714647626e-02, + -2.89338884575123044e-04, + 2.21456841978628400e-06, + -1.88333661708116168e-08, + 1.68172786544622661e-10, + -1.54460614475921650e-12, + 1.44493602207134672e-14, + -1.36925169814801611e-16, + 1.31000777493116894e-18, + -1.26261099433023226e-20, + 1.22408739640681808e-22, + -1.19241732544829482e-24, + 1.16617598201725887e-26, + -1.14421546664537442e-28, + 1.69335078929324229e-02, + -8.64055709669360136e-05, + 6.61338862344640308e-07, + -5.62422765819381561e-09, + 5.02216135374503176e-11, + -4.61267333814948631e-13, + 4.31502741780135305e-15, + -4.08901053689006735e-17, + 3.91208979500686973e-19, + -3.77054829801101789e-21, + 3.65550487929226328e-23, + -3.56092822557055871e-25, + 3.48256347922021898e-27, + -3.41698286781903248e-29, + 2.60241915418772240e-03, + -1.32792044232449089e-05, + 1.01637589426626757e-07, + -8.64357100592538949e-10, + 7.71828789701770756e-12, + -7.08896793453024823e-14, + 6.63153203337085898e-16, + -6.28417892510377716e-18, + 6.01227901499497351e-20, + -5.79475155128321122e-22, + 5.61794755172722648e-24, + -5.47259783108968494e-26, + 5.35216341741109822e-28, + -5.25137687710722296e-30, + 1.88364524763058692e-04, + -9.61156094471169043e-07, + 7.35658443014535004e-09, + -6.25626406940226936e-11, + 5.58653908370879156e-13, + -5.13103384556490110e-15, + 4.79993923310512642e-17, + -4.54852314950666177e-19, + 4.35172050432660162e-21, + -4.19427293415908343e-23, + 4.06630123290633325e-25, + -3.96109632812591138e-27, + 3.87392537111806610e-29, + -3.80097632893778404e-31, + 5.47921269515974193e-06, + -2.79584421826832584e-08, + 2.13990882058976744e-10, + -1.81984381382111551e-12, + 1.62503188474406271e-14, + -1.49253293959029634e-16, + 1.39622298918068127e-18, + -1.32309020588596127e-20, + 1.26584356918655975e-22, + -1.22004467347023536e-24, + 1.18281982184134231e-26, + -1.15221746223700572e-28, + 1.12686092765575069e-30, + -1.10564160129329870e-32, + 4.68945567855853604e-08, + -2.39285975470627581e-10, + 1.83146888588153655e-12, + -1.55753707359306093e-14, + 1.39080474216370226e-16, + -1.27740379109217953e-18, + 1.19497566337081957e-20, + -1.13238401654493399e-22, + 1.08338873558511354e-24, + -1.04419115327872433e-26, + 1.01233177977035480e-28, + -9.86140361816612044e-31, + 9.64438713470366790e-33, + -9.46278323185292465e-35, + 5.36393999632701995e-11, + -2.73702472603719713e-13, + 2.09488901962032577e-15, + -1.78155760017248154e-17, + 1.59084416080169113e-19, + -1.46113275317390299e-21, + 1.36684898946823472e-23, + -1.29525478731753965e-25, + 1.23921251610235869e-27, + -1.19437714665740363e-29, + 1.15793544294151959e-31, + -1.12797693490084961e-33, + 1.10315408060800850e-35, + -1.08238255672103704e-37, +# root=9 base[0]=0.0 */ + 3.24999665801807502e-01, + -6.49261526314212287e-03, + 1.46413202875198163e-04, + -3.43891700772671211e-06, + 8.07662388964341717e-08, + -1.86952973850080952e-09, + 4.24773559893679216e-11, + -9.47577481562160159e-13, + 2.07754085223664288e-14, + -4.48363442247332806e-16, + 9.53534473962828613e-18, + -2.00078485265139067e-19, + 4.14503031697917400e-21, + -8.48312168265932226e-23, + 2.98132498941523272e-01, + -1.44922712432620331e-02, + 6.88051699948310645e-04, + -2.87749915481184762e-05, + 1.09612395949347564e-06, + -3.88731242789370286e-08, + 1.30051982684709857e-09, + -4.14081996542805129e-11, + 1.26270359925787391e-12, + -3.70528472202060622e-14, + 1.05012764458466473e-15, + -2.88288873414006936e-17, + 7.68424322372695113e-19, + -1.99127137357458642e-20, + 2.52849332610883715e-01, + -2.61326471765078693e-02, + 1.99639763316024430e-03, + -1.23947162402932368e-04, + 6.67892093400775336e-06, + -3.23004368446978952e-07, + 1.43109002673289313e-08, + -5.88953457281274694e-10, + 2.27369195269952131e-11, + -8.29487933709012223e-13, + 2.87591345720689028e-14, + -9.51863390364719417e-16, + 3.01841123827675753e-17, + -9.19007675685227222e-19, + 2.00891356877180044e-01, + -3.58207880585233382e-02, + 4.00703921857513412e-03, + -3.43307765417963276e-04, + 2.44922519304514440e-05, + -1.52015802963455428e-06, + 8.43174912547727612e-08, + -4.25525141688844461e-09, + 1.97915122088922292e-10, + -8.56507313723186642e-12, + 3.47445117293374733e-13, + -1.32887969861570166e-14, + 4.81491705805945413e-16, + -1.65747777957719487e-17, + 1.51527785104164037e-01, + -3.99662669333086459e-02, + 6.08195380019698438e-03, + -6.77362245632618450e-04, + 6.07790533848057130e-05, + -4.62475620881323520e-06, + 3.07990570622826288e-07, + -1.83374595710437601e-08, + 9.91089262076310139e-10, + -4.91831394425551609e-11, + 2.26095981486461330e-12, + -9.69624172637233426e-14, + 3.90156997660706114e-15, + -1.47821288836466914e-16, + 1.09111312408168917e-01, + -3.79322231512518038e-02, + 7.33014131715834828e-03, + -1.00516627853677290e-03, + 1.08348016052099035e-04, + -9.70666270147706830e-06, + 7.48356744399226858e-07, + -5.08429209685590423e-08, + 3.09647588364841192e-09, + -1.71247861724743861e-10, + 8.68706515566053273e-12, + -4.07484006668418930e-13, + 1.77909687553410741e-14, + -7.25975179117925905e-16, + 7.39786100606203839e-02, + -3.09973030334847049e-02, + 7.13706714909439002e-03, + -1.14449482059180221e-03, + 1.41826734832929945e-04, + -1.43927020073798888e-05, + 1.24093604506508119e-06, + -9.32356638916694630e-08, + 6.21808381465589104e-09, + -3.73304226880242791e-10, + 2.03976113951411406e-11, + -1.02341601016708250e-12, + 4.74943877271252570e-14, + -2.04800348272375913e-15, + 4.44822090195109501e-02, + -2.09392172088312227e-02, + 5.41915738276537318e-03, + -9.67049825793527733e-04, + 1.31943551650589609e-04, + -1.45982605599078561e-05, + 1.36025690130067802e-06, + -1.09591035944325639e-07, + 7.78315258681891494e-09, + -4.94515193715085102e-10, + 2.84386855654621606e-11, + -1.49430295930514968e-12, + 7.23008608949926626e-14, + -3.23705715592438791e-15, + 1.85071613536259144e-02, + -9.25080266969007838e-03, + 2.55051347732503011e-03, + -4.82721537769454159e-04, + 6.94739912157775924e-05, + -8.06548998795933205e-06, + 7.84776136063335224e-07, + -6.57357985364619336e-08, + 4.83489988582260850e-09, + -3.17027586962610686e-10, + 1.87564565609452246e-11, + -1.01107155448980504e-12, + 5.00599128747134518e-14, + -2.28815481195174940e-15, +# root=9 base[1]=2.5 */ + 3.01138130549991945e-01, + -5.46693094645276170e-03, + 1.11823527246560921e-04, + -2.39822900456089287e-06, + 5.17544431507921077e-08, + -1.10598773146658052e-09, + 2.32659444923313046e-11, + -4.81672789922436895e-13, + 9.81468032423444550e-15, + -1.97187695445198781e-16, + 3.90715653745028242e-18, + -7.65192994306970636e-20, + 1.47955004911678634e-21, + -2.83457263613176955e-23, + 2.49340186166825434e-01, + -1.01206514468222940e-02, + 4.26907972054941175e-04, + -1.60862467707071449e-05, + 5.56127168619780931e-07, + -1.80018538421847961e-08, + 5.52328309045461918e-10, + -1.61928676838330802e-11, + 4.56259877277271994e-13, + -1.24094807110724877e-14, + 3.26902011636492323e-16, + -8.36318682028666871e-18, + 2.08239303029279218e-19, + -5.05276241553508702e-21, + 1.72883258452123378e-01, + -1.46868435071293799e-02, + 9.85075819495373223e-04, + -5.45202431502846626e-05, + 2.64904201601432747e-06, + -1.16510047456810309e-07, + 4.72650473740205088e-09, + -1.79111704747414000e-10, + 6.39816189661944184e-12, + -2.16907706709575642e-13, + 7.01540695314976293e-15, + -2.17362820967251969e-16, + 6.47327683022957558e-18, + -1.85669484777546511e-19, + 1.02692834833810420e-01, + -1.53367911152320607e-02, + 1.50534936641774837e-03, + -1.15231849360109828e-04, + 7.43988741592846532e-06, + -4.21940277918487407e-07, + 2.15500285168935380e-08, + -1.00788797458360296e-09, + 4.36834719579394352e-11, + -1.77018878485966459e-12, + 6.75297921568804180e-14, + -2.43838894772957466e-15, + 8.37051019282170154e-17, + -2.73910460882135664e-18, + 5.40396955827223135e-02, + -1.23749977618060059e-02, + 1.67936070504982947e-03, + -1.69469642845936883e-04, + 1.39403547564765706e-05, + -9.81320000579926774e-07, + 6.09090047703615574e-08, + -3.40103859378706797e-09, + 1.73316252581341304e-10, + -8.14761053795222037e-12, + 3.56283412358723290e-13, + -1.45883848611658241e-14, + 5.62340582097963426e-16, + -2.04744408729290091e-17, + 2.62251626736981075e-02, + -8.26391394395600137e-03, + 1.46456478359570721e-03, + -1.86206052285967154e-04, + 1.87751513555702438e-05, + -1.58483952671057686e-06, + 1.15825274862728581e-07, + -7.49786437253007648e-09, + 4.37033465909042870e-10, + -2.32218074069103134e-11, + 1.13567351762840121e-12, + -5.15135871695835342e-14, + 2.18084310230823303e-15, + -8.65075894252606724e-17, + 1.21511596326006246e-02, + -4.80800618602459946e-03, + 1.04839945717190926e-03, + -1.60147104441636326e-04, + 1.90067714009585629e-05, + -1.85595724797842250e-06, + 1.54594492204943591e-07, + -1.12602948216088123e-08, + 7.30220332097860634e-10, + -4.27398387162611622e-11, + 2.28206558489663973e-12, + -1.12116787392975374e-13, + 5.10414369655180642e-15, + -2.16272659288483999e-16, + 5.35029362536966480e-03, + -2.45462450026227201e-03, + 6.18879028865572172e-04, + -1.07830344779844719e-04, + 1.43994129607343616e-05, + -1.56272091863309863e-06, + 1.43111084138659880e-07, + -1.13512364308841095e-08, + 7.94861294898695772e-10, + -4.98604048506487381e-11, + 2.83420242591158168e-12, + -1.47350566054518099e-13, + 7.06065505588975694e-15, + -3.13331827685210510e-16, + 1.83639382192321717e-03, + -9.11037470806357508e-04, + 2.49139283771634393e-04, + -4.67898985404050877e-05, + 6.68606430299224798e-06, + -7.71119396700291442e-07, + 7.45778264288893743e-08, + -6.21222279412310875e-09, + 4.54569414349833808e-10, + -2.96649982166838459e-11, + 1.74735891073511678e-12, + -9.38061838882486505e-14, + 4.62677850807211554e-15, + -2.10730207792412827e-16, +# root=9 base[2]=5.0 */ + 2.80895198417161096e-01, + -4.67488493963554106e-03, + 8.73703728093066449e-05, + -1.72079874985000616e-06, + 3.42851258005591966e-08, + -6.79580806180460987e-10, + 1.32911503552823933e-11, + -2.56539669160647712e-13, + 4.87533886877861244e-15, + -9.16429579799761129e-17, + 1.69493523416929926e-18, + -3.11941320121419009e-20, + 5.63502052488496185e-22, + -1.00650843264699109e-23, + 2.14648116302021741e-01, + -7.34960520096949402e-03, + 2.77353292548898828e-04, + -9.47726925480056339e-06, + 2.98977736207463503e-07, + -8.87455257844496832e-09, + 2.50721873727470946e-10, + -6.79232243297102951e-12, + 1.77396085398055778e-13, + -4.48443104568137544e-15, + 1.10070415735999083e-16, + -2.62971176920696384e-18, + 6.12789359418520933e-20, + -1.39435767102461702e-21, + 1.26579118131014190e-01, + -8.84676802509641765e-03, + 5.24382798903446430e-04, + -2.59792129182024001e-05, + 1.14173540485101031e-06, + -4.57779146981866735e-08, + 1.70352566096810480e-09, + -5.95234093411027261e-11, + 1.96925993049380000e-12, + -6.20733396695871109e-14, + 1.87323928408424468e-15, + -5.43283476213128557e-17, + 1.51897719702463804e-18, + -4.10188374784547262e-20, + 5.88680977140116565e-02, + -7.29850243403376044e-03, + 6.28625780669696699e-04, + -4.29611370510280284e-05, + 2.50795770663299498e-06, + -1.29812504944122722e-07, + 6.09617663163990378e-09, + -2.63787644395299519e-10, + 1.06340270484832298e-11, + -4.02680602326758341e-13, + 1.44145501336086993e-14, + -4.90234491887363285e-16, + 1.59051547591034680e-17, + -4.93503663678065574e-19, + 2.24135125073204947e-02, + -4.38307664781940540e-03, + 5.26275817306923188e-04, + -4.78165909543508476e-05, + 3.58602800807175852e-06, + -2.32352968444597144e-07, + 1.33770614989796258e-08, + -6.97312976322801656e-10, + 3.33571908852268245e-11, + -1.47913935931715393e-12, + 6.12717425917558063e-14, + -2.38573894755460119e-15, + 8.77552381224420220e-17, + -3.05882211303363761e-18, + 7.39442646182898039e-03, + -2.07191373415600366e-03, + 3.32470672154378671e-04, + -3.87930783218625041e-05, + 3.62720246027752040e-06, + -2.86285260453831957e-07, + 1.96972121238235270e-08, + -1.20732985505564887e-09, + 6.69634504037088408e-11, + -3.40037174330957154e-12, + 1.59529889568266812e-13, + -6.96525942372704672e-15, + 2.84697164706754210e-16, + -1.09338906056398359e-17, + 2.27530202725482718e-03, + -8.37091927850524479e-04, + 1.70735765167709776e-04, + -2.45906114132836157e-05, + 2.77090933623887473e-06, + -2.58391506088942519e-07, + 2.06557380421364504e-08, + -1.44997467461253180e-09, + 9.09505648669154571e-11, + -5.16533227874424139e-12, + 2.68356659881454123e-13, + -1.28599172753099370e-14, + 5.72294068189950995e-16, + -2.37516440529361252e-17, + 6.94210486025151558e-04, + -3.07856465395395251e-04, + 7.50521002575747293e-05, + -1.26858592740513635e-05, + 1.64887148551697683e-06, + -1.74691383909625107e-07, + 1.56577231717074532e-08, + -1.21823663394874890e-09, + 8.38404198621162829e-11, + -5.17755106802511220e-12, + 2.90166962599043295e-13, + -1.48930050323399384e-14, + 7.05323198976429119e-16, + -3.09682068278935810e-17, + 1.86904013012503210e-04, + -9.18271392406321674e-05, + 2.48533555349479660e-05, + -4.62260931137014239e-06, + 6.54717422705042109e-07, + -7.49023173415738873e-08, + 7.19090356985356342e-09, + -5.94972196775970135e-10, + 4.32683233960493445e-11, + -2.80770067642627731e-12, + 1.64519480630367953e-13, + -8.78954580681075150e-15, + 4.31584853214359962e-16, + -1.95753315671656483e-17, +# root=9 base[3]=7.5 */ + 2.63474735975202212e-01, + -4.05012606296207243e-03, + 6.96137919487175140e-05, + -1.26579801459430416e-06, + 2.33812407350836167e-08, + -4.31800556002211967e-10, + 7.87601363409409772e-12, + -1.42504389765758549e-13, + 2.52663696467511525e-15, + -4.48669763168942937e-17, + 7.72548953266661622e-19, + -1.32591079306943815e-20, + 2.40618828653822872e-22, + -3.38661264957185630e-24, + 1.89066431784662647e-01, + -5.51601103787844552e-03, + 1.87377227187481899e-04, + -5.84138572260563890e-06, + 1.69032136552096834e-07, + -4.62155377502206710e-09, + 1.20703732641382680e-10, + -3.03233946692541676e-12, + 7.36422279025444822e-14, + -1.73517036508953106e-15, + 3.97865599129725985e-17, + -8.89690521596950058e-19, + 1.94408022297938931e-20, + -4.15693999808330704e-22, + 9.79697151001032163e-02, + -5.64567749700244179e-03, + 2.97932232432214148e-04, + -1.32752154279006439e-05, + 5.29632401079199896e-07, + -1.94159825633113380e-08, + 6.64375803663886343e-10, + -2.14457410129992383e-11, + 6.58117507555384813e-13, + -1.93100809261187710e-14, + 5.44184455184096456e-16, + -1.47813270222556250e-17, + 3.88086022175616981e-19, + -9.86729936197009311e-21, + 3.72225852088808665e-02, + -3.80528808160590561e-03, + 2.88425092453392358e-04, + -1.76132257235953621e-05, + 9.30132596849754966e-07, + -4.39419286435582700e-08, + 1.89684084089629719e-09, + -7.58901124364944422e-11, + 2.84296256367264171e-12, + -1.00482645342850740e-13, + 3.37054260082429542e-15, + -1.07800222293279807e-16, + 3.29980262895077606e-18, + -9.68996523499042591e-20, + 1.06899435032410759e-02, + -1.75842976491268174e-03, + 1.85869874645158294e-04, + -1.51381370218259142e-05, + 1.03100647599108217e-06, + -6.12593801925670459e-08, + 3.25943853199752200e-09, + -1.58045264834061533e-10, + 7.07170348237324224e-12, + -2.94733447712088875e-13, + 1.15248376512288790e-14, + -4.25236533491355452e-16, + 1.48743108896504791e-17, + -4.94657038073803975e-19, + 2.45418969766769083e-03, + -5.99238103390298585e-04, + 8.60315233167514002e-05, + -9.12573687946848819e-06, + 7.84909202528654672e-07, + -5.75132941041311746e-08, + 3.70117599771158519e-09, + -2.13523239058518445e-10, + 1.12064931451113311e-11, + -5.41001461015968060e-13, + 2.42293726419550062e-14, + -1.01358000861674955e-15, + 3.98248837630657811e-17, + -1.47476578751055561e-18, + 4.94595812144223634e-04, + -1.66023810937800939e-04, + 3.12338398622691107e-05, + -4.19366824411715882e-06, + 4.44375123516352400e-07, + -3.92462288886866124e-08, + 2.98898033367835242e-09, + -2.00899884794404986e-10, + 1.21178820257757569e-11, + -6.64262661343798970e-13, + 3.34188302997239463e-14, + -1.55526581430210550e-15, + 6.73881349341499587e-17, + -2.72943273829079323e-18, + 9.90311138552302781e-05, + -4.19738747204107546e-05, + 9.79808427888452366e-06, + -1.59348476218152325e-06, + 2.00192301787085094e-07, + -2.05816916192557518e-08, + 1.79619524858392014e-09, + -1.36466738313672174e-10, + 9.19387559154597088e-12, + -5.56999047207124229e-13, + 3.06815331542378034e-14, + -1.55032699498855958e-15, + 7.23882778790143291e-17, + -3.13765128297039202e-18, + 1.96494570138554070e-05, + -9.53080820526899087e-06, + 2.54525870579759039e-06, + -4.67593376261603304e-07, + 6.54910243622819687e-08, + -7.41731581212420801e-09, + 7.05638137774964742e-10, + -5.79046554606957030e-11, + 4.17955213817202439e-12, + -2.69362908079239229e-13, + 1.56848959989966806e-14, + -8.33160536461749708e-16, + 4.06932013836744139e-17, + -1.83670046576638123e-18, +# root=9 base[4]=10.0 */ + 2.48300041377624625e-01, + -3.54821007414730331e-03, + 5.64137457958489228e-05, + -9.51725419647594717e-07, + 1.63538530776952269e-08, + -2.82825434788917184e-10, + 4.81182022574456405e-12, + -8.24908414021186569e-14, + 1.35416493825948431e-15, + -2.27409385844989924e-17, + 3.95214336703440022e-19, + -4.74746056626040956e-21, + 1.29507743984160264e-22, + -1.59156325135615313e-24, + 1.69613258592583332e-01, + -4.25753129138963481e-03, + 1.30898545618037194e-04, + -3.74364408752324399e-06, + 9.98585686446114113e-08, + -2.52560965666168027e-09, + 6.12146584635694265e-11, + -1.43090315292560988e-12, + 3.24181081647734814e-14, + -7.13916941210596626e-16, + 1.53307884057109091e-17, + -3.21866167384323855e-19, + 6.59923917783664075e-21, + -1.33008925254498638e-22, + 7.93155060500789072e-02, + -3.78011805525835460e-03, + 1.78995966331070246e-04, + -7.20962338501572601e-06, + 2.62157840547637677e-07, + -8.81547877572528340e-09, + 2.78151073118630272e-10, + -8.31333207005399476e-12, + 2.37108552067672699e-13, + -6.48617438394750517e-15, + 1.70899150519322079e-16, + -4.35291375759064842e-18, + 1.07369668786078941e-19, + -2.57178180402443160e-21, + 2.55633575954699391e-02, + -2.14400854271967799e-03, + 1.43762964734768956e-04, + -7.86105695123953437e-06, + 3.76136474236003019e-07, + -1.62359595701814270e-08, + 6.44643420942374398e-10, + -2.38525545566269219e-11, + 8.30297684427922275e-13, + -2.73811793205132470e-14, + 8.60114335363815250e-16, + -2.58485190419485761e-17, + 7.45721187591014891e-19, + -2.06994357724987400e-20, + 5.78026863419170249e-03, + -7.89126362012901989e-04, + 7.32996764684856967e-05, + -5.33798721779526745e-06, + 3.29410757671507739e-07, + -1.79064466361388444e-08, + 8.78375343931057723e-10, + -3.95172054132695138e-11, + 1.64954653050961276e-12, + -6.44427551162080754e-14, + 2.37203852837565538e-15, + -8.27019898161903352e-17, + 2.74299827868501788e-18, + -8.67788937310462566e-20, + 9.56303668878371455e-04, + -1.99359048884080486e-04, + 2.53530370962867487e-05, + -2.42523811956253997e-06, + 1.90569436655186295e-07, + -1.28833273124839690e-08, + 7.71031030764042549e-10, + -4.16409910642604383e-11, + 2.05751555803651056e-12, + -9.39733644265781654e-14, + 3.99913765134029614e-15, + -1.59581407545337576e-16, + 6.00196180139293049e-18, + -2.13444293831983141e-19, + 1.26749286368933479e-04, + -3.79682134520284927e-05, + 6.49032440237272132e-06, + -8.02749534877751195e-07, + 7.91930234496441749e-08, + -6.56674047494255040e-09, + 4.72817606409758757e-10, + -3.02196083919560953e-11, + 1.74191074372150854e-12, + -9.16412886724717833e-14, + 4.44144072068871079e-15, + -1.99781854428763287e-16, + 8.39133322226774792e-18, + -3.30359155224990999e-19, + 1.58887045167691566e-05, + -6.33849918053522694e-06, + 1.39911544370225838e-06, + -2.16688455304273449e-07, + 2.60865582842522087e-08, + -2.58347457323707358e-09, + 2.18140792952757099e-10, + -1.60946870229539072e-11, + 1.05633611145367842e-12, + -6.25156637782875940e-14, + 3.37184389539533377e-15, + -1.67172010402272465e-16, + 7.67259158513950090e-18, + -3.27431428232010984e-19, + 2.15481493055263971e-06, + -1.02713476947413125e-06, + 2.69492565284066316e-07, + -4.87203596704205567e-08, + 6.72672141488323674e-09, + -7.52185550636448472e-10, + 7.07465138034940741e-11, + -5.74630143184546430e-12, + 4.10954865826275714e-13, + -2.62645808467713883e-14, + 1.51779167929862836e-15, + -8.00654409722830416e-17, + 3.88577055502063641e-18, + -1.74366522773981068e-19, +# root=9 base[5]=12.5 */ + 2.34943249967214302e-01, + -3.13852738042490155e-03, + 4.63947182081252590e-05, + -7.29747127134967011e-07, + 1.16875586946297368e-08, + -1.90817664071976697e-10, + 3.00553764120341360e-12, + -4.95173654046800667e-14, + 7.83986280760785764e-16, + -9.61145695483903769e-18, + 2.88976482314480062e-19, + -1.01944266550064255e-21, + 9.72675207325342240e-24, + -3.37054945656008917e-24, + 1.54426857486192282e-01, + -3.36625663567187428e-03, + 9.41201747050660878e-05, + -2.48196123650279760e-06, + 6.13111272184845218e-08, + -1.44012949782147543e-09, + 3.25159815287750978e-11, + -7.09370899857241824e-13, + 1.50390355929914141e-14, + -3.10729100698788902e-16, + 6.24461111344873754e-18, + -1.23967455491014229e-19, + 2.39104055278832268e-21, + -4.48573608734685094e-23, + 6.65965944118130787e-02, + -2.63428697892878743e-03, + 1.12820002029933453e-04, + -4.12894693249315779e-06, + 1.37411534262488460e-07, + -4.25217828637520576e-09, + 1.24110631467455281e-10, + -3.44267586355519455e-12, + 9.14503790348422371e-14, + -2.33843573826412239e-15, + 5.76163356956924823e-17, + -1.37969367665727688e-18, + 3.20237843239466525e-20, + -7.21103695779788337e-22, + 1.88077158714303021e-02, + -1.28908608742584504e-03, + 7.70347424815240252e-05, + -3.78277640455864615e-06, + 1.64401528730244283e-07, + -6.49539195431390038e-09, + 2.37552241354475344e-10, + -8.13641896680807859e-12, + 2.63329802833578360e-13, + -8.10583066067570285e-15, + 2.38416909230218929e-16, + -6.73184332727436675e-18, + 1.82969947094310135e-19, + -4.79674971257436766e-21, + 3.48900307795144138e-03, + -3.90639650890835884e-04, + 3.19405223553887027e-05, + -2.07811926826405116e-06, + 1.16117052479255407e-07, + -5.76869206388769960e-09, + 2.60557405409503256e-10, + -1.08598829064414433e-11, + 4.22185085570311257e-13, + -1.54316822228603121e-14, + 5.33610171209707920e-16, + -1.75425388759884725e-17, + 5.50469400389945358e-19, + -1.65281959328816187e-20, + 4.33902838740643569e-04, + -7.56982855432446948e-05, + 8.46806827250995404e-06, + -7.25983521023790992e-07, + 5.18401312397137040e-08, + -3.21751699449608635e-09, + 1.78238313684976632e-10, + -8.97084300094116623e-12, + 4.15482724994221722e-13, + -1.78772970300323569e-14, + 7.19920885992345120e-16, + -2.72931335237917181e-17, + 9.78768390222007530e-19, + -3.33000435146799051e-20, + 3.86905416825173061e-05, + -1.00871659431338714e-05, + 1.54368916964182622e-06, + -1.73831744219903453e-07, + 1.58094636719262775e-08, + -1.22028202998618711e-09, + 8.24298409046842998e-11, + -4.97499300313456872e-12, + 2.72303079664675209e-13, + -1.36686189058972459e-14, + 6.34728071747664847e-16, + -2.74575363603621615e-17, + 1.11278890061766548e-18, + -4.23995406885141744e-20, + 2.94189718950645796e-06, + -1.08217839420252787e-06, + 2.22388194610349451e-07, + -3.23924441302806345e-08, + 3.69832841574086934e-09, + -3.49727167759482461e-10, + 2.83553892289129839e-11, + -2.01833320498862669e-12, + 1.28306863361140826e-13, + -7.37990590004293336e-15, + 3.87988037364045718e-16, + -1.87979966384349945e-17, + 8.44999939289772343e-19, + -3.53895340126627238e-20, + 2.49921266676991391e-07, + -1.16267439768540822e-07, + 2.97846066712252291e-08, + -5.27132137420136454e-09, + 7.14334463011840161e-10, + -7.85759667622831747e-11, + 7.28393426270232854e-12, + -5.84047652731708212e-13, + 4.12905216745785321e-14, + -2.61176426210097097e-15, + 1.49527977904549793e-16, + -7.82136556138980095e-18, + 3.76680332423523809e-19, + -1.67847782350115017e-20, +# root=9 base[6]=15.0 */ + 2.23080130233187512e-01, + -2.79948520595081803e-03, + 3.86453413926360711e-05, + -5.69781525378974118e-07, + 8.49380634361461745e-09, + -1.32730075767050929e-10, + 1.93357884563766884e-12, + -2.78424444282841499e-14, + 6.31425042719946049e-16, + 4.92817843536552933e-19, + 1.84468455714838300e-19, + -5.39531001655230827e-21, + -1.94521318527784951e-22, + -3.52009420772579161e-24, + 1.42300092513591908e-01, + -2.71769623962216838e-03, + 6.93930148985241507e-05, + -1.69489523204022785e-06, + 3.89462308063187509e-08, + -8.52557146311142793e-10, + 1.79999868542785947e-11, + -3.67833176434342717e-13, + 7.29040917594989209e-15, + -1.43048902415296802e-16, + 2.67246244467849632e-18, + -4.96201600542917099e-20, + 9.54017776760667423e-22, + -1.56766523718493389e-23, + 5.75961625332096980e-02, + -1.89809391534799922e-03, + 7.41048249511347818e-05, + -2.47655594955320559e-06, + 7.57751856202895971e-08, + -2.16396984394546751e-09, + 5.86262657623820794e-11, + -1.51467303783678649e-12, + 3.74307658499321175e-14, + -9.01713488283775884e-16, + 2.07378631708923854e-17, + -4.64950149290249578e-19, + 1.03363370968019530e-20, + -2.15980404683004637e-22, + 1.46486868302411356e-02, + -8.17849925930260466e-04, + 4.39636115588798438e-05, + -1.94507841262981967e-06, + 7.70302948731069143e-08, + -2.79154000786209288e-09, + 9.42315234832816955e-11, + -2.99282420396742132e-12, + 9.00924565965713869e-14, + -2.59335033906232853e-15, + 7.14254801720412049e-17, + -1.89422763668044781e-18, + 4.85831012634559511e-20, + -1.20137780090633473e-21, + 2.31484945196574728e-03, + -2.10263166053457689e-04, + 1.52153138460180887e-05, + -8.84766669997462598e-07, + 4.47951658161771001e-08, + -2.03395852790039779e-09, + 8.45741999796339405e-11, + -3.26408820777477867e-12, + 1.18069013974418550e-13, + -4.03410736455790191e-15, + 1.30874999863108629e-16, + -4.05094498595767667e-18, + 1.20083887527680422e-19, + -3.41586771005700961e-21, + 2.26373328027869742e-04, + -3.24167843960506720e-05, + 3.18055025899150868e-06, + -2.43336004659904010e-07, + 1.57348436358287605e-08, + -8.93456024518990554e-10, + 4.56550375162448727e-11, + -2.13404448292707600e-12, + 9.23225671773249914e-14, + -3.72940600828857250e-15, + 1.41623602346066726e-16, + -5.08340810869930752e-18, + 1.73224345787973307e-19, + -5.61915319750775070e-21, + 1.41149336334777635e-05, + -3.11707773038844728e-06, + 4.21504445461233620e-07, + -4.27569917738620234e-08, + 3.55307672439316923e-09, + -2.53271504923018622e-10, + 1.59355465601913255e-11, + -9.02215729427213641e-13, + 4.66036460521693389e-14, + -2.21923257548601829e-15, + 9.82105471303865050e-17, + -4.06517826786966855e-18, + 1.58214494125450101e-19, + -5.80835791545076334e-21, + 6.45663678773375783e-07, + -2.13216210958066647e-07, + 4.00505082916975877e-08, + -5.40781159554784165e-09, + 5.78634843512111221e-10, + -5.17238408284512366e-11, + 3.99204113980632482e-12, + -2.72060171737051277e-13, + 1.66399497068379648e-14, + -9.24673695403252699e-16, + 4.71353565575998037e-17, + -2.22116771396403702e-18, + 9.73752216191738837e-20, + -3.98704001640846874e-21, + 3.12691402634807208e-08, + -1.40459289561059910e-08, + 3.48126706693346724e-09, + -5.98698749390554340e-10, + 7.91486991665089221e-11, + -8.52149221254904755e-12, + 7.75282746784330801e-13, + -6.11498233495689147e-14, + 4.26063904942344436e-15, + -2.66030815036998175e-16, + 1.50551898253406043e-17, + -7.79326702976127207e-19, + 3.71809708901834149e-20, + -1.64272242854438421e-21, +# root=9 base[7]=17.5 */ + 2.12460226337716301e-01, + -2.51554818829006393e-03, + 3.25433099876455074e-05, + -4.52819434653592446e-07, + 6.25212537720213281e-09, + -9.33435642248235676e-11, + 1.44609676655217346e-12, + -6.57900113160319611e-15, + 6.96102193489516167e-16, + -8.21949760204849151e-20, + -2.97478671477556568e-19, + -1.66068824447185393e-20, + -1.96628668857328022e-22, + 5.37044917172162557e-24, + 1.32424203550134512e-01, + -2.23447275839940094e-03, + 5.22979083575105381e-05, + -1.18777463163465666e-06, + 2.54992749598339596e-08, + -5.21900434919190763e-10, + 1.03184511685252904e-11, + -1.99872401940932337e-13, + 3.64304624752204806e-15, + -6.87644997377094293e-17, + 1.26541512779403724e-18, + -1.85837373525272266e-20, + 4.09379151714901245e-22, + -7.36366415778711685e-24, + 5.10265556514115995e-02, + -1.40637458461660703e-03, + 5.04457128464618133e-05, + -1.54625893092984314e-06, + 4.37211054552790530e-08, + -1.15564097243820371e-09, + 2.90508449800775221e-11, + -7.08847671320838187e-13, + 1.60545709542237387e-14, + -3.67581388325362284e-16, + 8.15150659019872801e-18, + -1.59636351921941877e-19, + 3.58862520317854735e-21, + -7.30683974705006556e-23, + 1.19577219424362897e-02, + -5.42118339829908966e-04, + 2.65073832367654106e-05, + -1.05993165125260423e-06, + 3.84056107208243380e-08, + -1.27974080142888669e-09, + 3.99144450677826381e-11, + -1.18174263767092496e-12, + 3.29945186460884796e-14, + -8.90691397169817563e-16, + 2.31006416299177420e-17, + -5.70420391331530820e-19, + 1.39039488611397790e-20, + -3.25469459374688796e-22, + 1.66387051772929565e-03, + -1.21328398771618551e-04, + 7.84371847647393576e-06, + -4.08007335789247016e-07, + 1.87562354196379410e-08, + -7.79115746960337776e-10, + 2.98329504168280322e-11, + -1.06727919949084127e-12, + 3.58905286141823608e-14, + -1.14623092127295163e-15, + 3.48873423006198767e-17, + -1.01497852198198650e-18, + 2.84134073821707024e-20, + -7.64928786789733637e-22, + 1.33741107124967743e-04, + -1.54249097782472921e-05, + 1.33034863553350468e-06, + -9.05830878687601323e-08, + 5.29577241353151278e-09, + -2.74538962255853812e-10, + 1.29113647926694753e-11, + -5.59250962401747377e-13, + 2.25408849346433941e-14, + -8.52646562085500421e-16, + 3.04526072580725438e-17, + -1.03195982146612165e-18, + 3.33221383023302671e-20, + -1.02764413431508043e-21, + 6.12763602570162208e-06, + -1.11386100172440960e-06, + 1.31866664106152258e-07, + -1.19430281367577017e-08, + 9.00232045727114106e-10, + -5.88656354116710210e-11, + 3.42836421590865555e-12, + -1.81016724061478446e-13, + 8.77507707987719756e-15, + -3.94309303056396484e-16, + 1.65455923622064091e-17, + -6.52149970769123382e-19, + 2.42618246713395234e-20, + -8.54430999646816080e-22, + 1.72068244644766867e-07, + -4.93203089197218735e-08, + 8.30117579467481385e-09, + -1.02296389585654990e-09, + 1.01277588525071352e-10, + -8.46498769990141137e-12, + 6.16038970906972280e-13, + -3.98619727657603490e-14, + 2.32833663889501028e-15, + -1.24173342555884429e-16, + 6.10072601348163965e-18, + -2.78110831120525061e-19, + 1.18329678629576950e-20, + -4.71596680760866126e-22, + 4.34145408549649038e-09, + -1.85111702200636905e-09, + 4.37965497252074883e-10, + -7.24213854174231367e-11, + 9.26146106036009366e-12, + -9.69251445787994265e-13, + 8.60533153426754591e-14, + -6.64473432076565046e-15, + 4.54440937601610485e-16, + -2.79132091953604114e-17, + 1.55683509683296590e-18, + -7.95492615433381644e-20, + 3.75128651387561670e-21, + -1.64013787369749682e-22, +# root=9 base[8]=20.0 */ + 2.02886541291493999e-01, + -2.27536622447287824e-03, + 2.76541179874297220e-05, + -3.65853172608825818e-07, + 4.72997346315383005e-09, + -5.84531613554915423e-11, + 1.54807496992008850e-12, + 1.18172840396143246e-14, + 2.89021778526342586e-16, + -2.76975875900058696e-17, + -1.05110098148953585e-18, + -1.12144753702853018e-20, + 6.26981283238756429e-22, + 2.90618329082513205e-23, + 1.24241653649261277e-01, + -1.86688131806280323e-03, + 4.01869879382568009e-05, + -8.51526965329123867e-07, + 1.71439195853522944e-08, + -3.30213591018759786e-10, + 6.04380958759330504e-12, + -1.14441291004569427e-13, + 1.92457220859758244e-15, + -3.00252855917934636e-17, + 7.50941626029795689e-19, + -7.70180114667744869e-21, + 4.04510468169557370e-23, + -7.64805628946016789e-24, + 4.61054197030213372e-02, + -1.06667736941833450e-03, + 3.54315935854326446e-05, + -9.99582147464601874e-07, + 2.62282053771807282e-08, + -6.48808932952294094e-10, + 1.47880780529607785e-11, + -3.55092084981527656e-13, + 7.37303277994309879e-15, + -1.42796609539923321e-16, + 3.81617322699479544e-18, + -5.83357615266059867e-20, + 9.08529166381563673e-22, + -3.99884998283642780e-23, + 1.01453619560715712e-02, + -3.72145003977791019e-04, + 1.67728217503703169e-05, + -6.07580878318938610e-07, + 2.02207973444702681e-08, + -6.23832991224485477e-10, + 1.78225993726021182e-11, + -5.00029881665205058e-13, + 1.29375253895413344e-14, + -3.20055795278628567e-16, + 8.18449645751368424e-18, + -1.83593149867212448e-19, + 4.09996904086980670e-21, + -1.00539684680871713e-22, + 1.27895536798652842e-03, + -7.40352269633759821e-05, + 4.33698297483457353e-06, + -2.01897892304201299e-07, + 8.45136359143565398e-09, + -3.22240351262520210e-10, + 1.13361868844476222e-11, + -3.77760369985410662e-13, + 1.18056692804160919e-14, + -3.51153746182721073e-16, + 1.00937190650385237e-17, + -2.74884178743299301e-19, + 7.24418069739870893e-21, + -1.86076500657351188e-22, + 8.80375508155235745e-05, + -8.01909955922910696e-06, + 6.13416564074689009e-07, + -3.70934209449470525e-08, + 1.96101438631740303e-09, + -9.27967502181613030e-11, + 4.00895111932584356e-12, + -1.60836209840162404e-13, + 6.02923190711802212e-15, + -2.13103588698437385e-16, + 7.14964034405800740e-18, + -2.28176292839378477e-19, + 6.96594528215523250e-21, + -2.03877679577716616e-22, + 3.13047339190067858e-06, + -4.54468990942942602e-07, + 4.69751219532307197e-08, + -3.77172335094654785e-09, + 2.56560841135339419e-10, + -1.53127133413351094e-11, + 8.21341860468974406e-13, + -4.02537173779190371e-14, + 1.82267958366445094e-15, + -7.69295912621340483e-17, + 3.04716888463512729e-18, + -1.13864838314007024e-19, + 4.03203658303881757e-21, + -1.35653712440232176e-22, + 5.66282795820699064e-08, + -1.35257903897951745e-08, + 2.00207304652100618e-09, + -2.21697079400376996e-10, + 2.00536904125463191e-11, + -1.55015454289948002e-12, + 1.05347170114890881e-13, + -6.41636764591878728e-15, + 3.55120159550368277e-16, + -1.80476248537277850e-17, + 8.49106854186235878e-19, + -3.72255951701068705e-20, + 1.52894006738718358e-21, + -5.90216895822342316e-23, + 6.96034652508359610e-10, + -2.74016752347670719e-10, + 6.06934918957140949e-11, + -9.50798260124051235e-12, + 1.16257889145398537e-12, + -1.17163192728061826e-13, + 1.00732419367047324e-14, + -7.56621453307973517e-16, + 5.05204240128391136e-17, + -3.03877028907112416e-18, + 1.66387590952592607e-19, + -8.36417076809611703e-21, + 3.88735372822226971e-22, + -1.67772663374880264e-23, +# root=9 base[9]=22.5 */ + 1.94201453844604299e-01, + -2.07048282875439606e-03, + 2.36862382990928607e-05, + -2.97390861723601392e-07, + 3.95964583568667016e-09, + -1.75056361329423943e-11, + 1.79877143573337611e-12, + -3.18625204747779010e-15, + -1.45734281041309591e-15, + -6.44154375541021542e-17, + -2.41227058887116524e-19, + 6.33664355774995838e-20, + 2.44987147184050694e-21, + 2.00943697215883089e-23, + 1.17358384116154929e-01, + -1.58205122327607114e-03, + 3.14193692177678759e-05, + -6.23152461599646544e-07, + 1.17630388832673522e-08, + -2.17463318038297332e-10, + 3.57657056741527108e-12, + -6.50403346430115643e-14, + 1.29718157442561698e-15, + -7.64482893810243356e-18, + 3.11980658072692119e-19, + -1.52406318945389095e-20, + -3.16722336159872247e-22, + -2.41469073083296925e-24, + 4.23385583570311252e-02, + -8.24946414110852067e-04, + 2.55805708720728894e-05, + -6.67408859483345067e-07, + 1.61169125286456334e-08, + -3.90356241794172569e-10, + 7.55926854365547818e-12, + -1.76492855266485378e-13, + 4.42534572478480663e-15, + -3.57962379835502231e-17, + 1.50923620803064026e-18, + -6.10817172009471006e-20, + -8.76667970572466309e-22, + -1.97422511734700750e-23, + 8.88565053688428197e-03, + -2.62444116810007383e-04, + 1.10753619824604431e-05, + -3.64656248382195433e-07, + 1.10912188155601343e-08, + -3.26042961597234628e-10, + 8.25874737871332911e-12, + -2.20191647315746595e-13, + 5.77237157918367261e-15, + -1.11717232631281541e-16, + 2.97408623123428790e-18, + -7.92699096177549629e-20, + 7.86204808974460767e-22, + -3.50759678824013174e-23, + 1.03956390027519193e-03, + -4.71406385611104482e-05, + 2.55248826953142914e-06, + -1.06406625124738529e-07, + 4.05007879382756852e-09, + -1.43795101977280412e-10, + 4.59090861441261392e-12, + -1.43022029642189385e-13, + 4.24353249536027050e-15, + -1.13815823011399697e-16, + 3.13362654300001811e-18, + -8.28011182018946208e-20, + 1.89768532643794315e-21, + -4.95715336074861781e-23, + 6.35588823967523769e-05, + -4.47221642996276848e-06, + 3.08836192170376609e-07, + -1.65505703650883153e-08, + 7.90930739521464917e-10, + -3.43327884019965166e-11, + 1.35656209176982556e-12, + -5.04484558640918397e-14, + 1.76381863397512826e-15, + -5.78930219101137650e-17, + 1.82738532035280365e-18, + -5.50110153379999771e-20, + 1.57383463454720758e-21, + -4.39418376802155758e-23, + 1.85229082948645199e-06, + -2.07757058075992988e-07, + 1.88877356007612231e-08, + -1.33648452892413378e-09, + 8.17678585492945818e-11, + -4.44480542539982682e-12, + 2.18613349179773106e-13, + -9.91305085910761083e-15, + 4.17891113935099278e-16, + -1.64975538937258222e-17, + 6.14778637233592259e-19, + -2.16999221806904290e-20, + 7.28394212342363111e-22, + -2.33361697953027652e-23, + 2.31448769050653681e-08, + -4.39029965075492672e-09, + 5.64365442776447381e-10, + -5.53591063664394839e-11, + 4.52395150300472871e-12, + -3.20225680292191262e-13, + 2.01358993667955285e-14, + -1.14482933580541340e-15, + 5.95773935939709177e-17, + -2.86471000503415322e-18, + 1.28218087224500122e-19, + -5.37288240490456667e-21, + 2.11816191044885501e-22, + -7.87858441626305600e-24, + 1.35860041220455602e-10, + -4.72151012498522002e-11, + 9.53266303207329414e-12, + -1.38677116930362054e-12, + 1.59645491166083762e-13, + -1.53026827485077212e-14, + 1.26125816214952808e-15, + -9.13851758749620388e-17, + 5.91566886566790763e-18, + -3.46382034259807641e-19, + 1.85256141245848553e-20, + -9.12220921071362418e-22, + 4.16288813166069029e-23, + -1.76776636941368005e-24, +# root=9 base[10]=25.0 */ + 1.86277404504786859e-01, + -1.89420265884986268e-03, + 2.04933484189691743e-05, + -2.34643741510089759e-07, + 3.99798957790520641e-09, + 1.72888263752253820e-11, + 7.36560947816105542e-13, + -8.12794148738797897e-14, + -2.97197151566701560e-15, + 1.38578644717022933e-17, + 4.69290295328437591e-18, + 1.26161789130068228e-19, + -2.13971053621029117e-21, + -2.36014729937203026e-22, + 1.11489645571570692e-01, + -1.35771102549318758e-03, + 2.49408784282143997e-05, + -4.65611618121953572e-07, + 8.14799533469837354e-09, + -1.48994085603156418e-10, + 2.30350258507355121e-12, + -2.70917472457431620e-14, + 1.04763492968810760e-15, + -1.23818918326309112e-17, + -5.93448690669723885e-19, + -1.96274091351850162e-20, + 4.93830119205244602e-22, + 3.69380800928713575e-23, + 3.94028172235301941e-02, + -6.48490187578712267e-04, + 1.88892583501188129e-05, + -4.63542576787119562e-07, + 9.80242926309286889e-09, + -2.53152370681868512e-10, + 4.45501293190615607e-12, + -4.98943255441273423e-14, + 3.45785076123975470e-15, + -4.15307561550398265e-17, + -1.98554025136750034e-18, + -8.07657389498630485e-20, + 1.37911130317943341e-21, + 1.27440632304592040e-22, + 7.98904871853801761e-03, + -1.88762552710367959e-04, + 7.57902695889984751e-06, + -2.30355719135068127e-07, + 6.14764162396092403e-09, + -1.83999493155275368e-10, + 4.20136477787093803e-12, + -8.32170455327095080e-14, + 3.11956400961778094e-15, + -5.54438848840277750e-17, + -1.59904124092258826e-20, + -5.59529041258134361e-20, + 9.17570471970740333e-22, + 4.79014272807737183e-23, + 8.85063235181051560e-04, + -3.09120878029314072e-05, + 1.58575682673121475e-06, + -5.97527610887834118e-08, + 2.01751336847930487e-09, + -6.93966223905038399e-11, + 2.00915221164149946e-12, + -5.44262871244226896e-14, + 1.71438450479546714e-15, + -4.15710821572539751e-17, + 8.41217418838242431e-19, + -3.11875824909782490e-20, + 6.42806489582362323e-22, + -3.67100906981726552e-24, + 4.96005062687262410e-05, + -2.62350524248115126e-06, + 1.68147803087036875e-07, + -8.00599023236863372e-09, + 3.41742805115907789e-10, + -1.38661310786346298e-11, + 4.99386269150123703e-13, + -1.69203001453959743e-14, + 5.67050657161753201e-16, + -1.71638701993239756e-17, + 4.92429088490929426e-19, + -1.47750979789377511e-20, + 3.89180865037048591e-22, + -9.51273706880379467e-24, + 1.24625454864284900e-06, + -1.03847865623243049e-07, + 8.48451840247365703e-09, + -5.27147133036843196e-10, + 2.88333500364316196e-11, + -1.43385670624578981e-12, + 6.44087556059010300e-14, + -2.68901347523694231e-15, + 1.05762749960515948e-16, + -3.88692149459935116e-18, + 1.35538351847338193e-19, + -4.53114200175388325e-21, + 1.43237317832828882e-22, + -4.34118150533086682e-24, + 1.16653848206671928e-08, + -1.65999814866518018e-09, + 1.85510054312684385e-10, + -1.59234680409111869e-11, + 1.16433006058303254e-12, + -7.49369554514520890e-14, + 4.32416675502755019e-15, + -2.27786334876962172e-16, + 1.10724492082158767e-17, + -5.00254404203012466e-19, + 2.11654850483118924e-20, + -8.42879955736706605e-22, + 3.17061501553960360e-23, + -1.13029032027903899e-24, + 3.43583539453202123e-11, + -9.81876168656052257e-12, + 1.75080365109314509e-12, + -2.30672535906568035e-13, + 2.45280450346355999e-14, + -2.20213495765246516e-15, + 1.71800622012312445e-16, + -1.18815131991195605e-17, + 7.39053846680618965e-19, + -4.18085649137910624e-20, + 2.17008610327386836e-21, + -1.04093997931437827e-22, + 4.64203408447672399e-24, + -1.93156564078399714e-25, +# root=9 base[11]=27.5 */ + 1.79012226711313949e-01, + -1.74040336112014265e-03, + 1.80734146090638692e-05, + -1.67895979124694327e-07, + 4.28802469576010017e-09, + -1.12719558756590521e-12, + -2.49193879607042246e-12, + -1.25114682513732891e-13, + 1.60884775317558118e-15, + 2.33551362492788845e-16, + 3.21639021036309855e-18, + -2.82526590347490774e-19, + -1.19282953318892397e-20, + 1.29327709118006010e-22, + 1.06425322610707432e-01, + -1.17852508439495558e-03, + 2.00465845682715634e-05, + -3.56275876178276170e-07, + 5.67664320481548957e-09, + -9.96301094358708952e-11, + 1.90813512955309047e-12, + -6.25851359926117196e-15, + 8.25147562319325612e-17, + -3.93931887793853181e-17, + -2.66972806037425204e-19, + 4.48339864176874821e-20, + 1.58709638538148367e-21, + -3.41205478615351907e-23, + 3.70791578476831613e-02, + -5.17308478207038707e-04, + 1.41187100799065386e-05, + -3.41672996157587651e-07, + 5.75173642123112104e-09, + -1.52557509549878307e-10, + 4.24313869681790696e-12, + 1.68035021593683896e-14, + 4.93864643602835673e-17, + -1.46017152209810021e-16, + -1.49086018753953258e-18, + 1.51780330919193408e-19, + 6.68503740897434456e-21, + -7.31868565001683597e-23, + 7.33978878722233927e-03, + -1.37762531728148125e-04, + 5.29950953946428144e-06, + -1.56568549506530767e-07, + 3.33737318182189893e-09, + -1.01794743746337934e-10, + 2.94568226514846846e-12, + -1.90547148378718314e-14, + 7.15925110369159562e-16, + -8.14963418724967579e-17, + -4.31879669594463665e-19, + 5.88159522799234284e-20, + 3.28884140841040906e-21, + -2.57974042783657092e-23, + 7.82900216525436038e-04, + -2.06360386822982299e-05, + 1.02390768849305448e-06, + -3.63785697270946860e-08, + 1.01516960222339159e-09, + -3.44720839684764112e-11, + 1.06170202423371285e-12, + -1.91551285457447348e-14, + 5.76447563394204773e-16, + -2.60545058359069998e-17, + 1.82784904419629094e-19, + 2.90316001996306707e-21, + 7.75634153880044064e-22, + -5.33022788559576320e-24, + 4.12963433910092030e-05, + -1.58717383621065708e-06, + 9.74759915732069411e-08, + -4.23586947571605801e-09, + 1.54480816067695478e-10, + -5.97692407161837001e-12, + 2.07870014801856372e-13, + -5.85912640732646842e-15, + 1.87149676395527485e-16, + -6.25935604534870364e-18, + 1.34353350316428593e-19, + -3.28882921870267015e-21, + 1.50830111480597889e-22, + -2.31278187492649586e-24, + 9.35310785763210478e-07, + -5.51698569575275390e-08, + 4.19609359085060078e-09, + -2.31313028502661157e-10, + 1.10540403636061560e-11, + -5.08818200367395336e-13, + 2.11431174292200445e-14, + -7.92258349585906973e-16, + 2.92131684505136356e-17, + -1.02535150230611269e-18, + 3.22006592915668342e-20, + -1.01169756646080740e-21, + 3.22221912191968382e-23, + -8.59961286250131125e-25, + 7.11610085975677040e-09, + -7.09253886131314703e-10, + 7.04484655651419814e-11, + -5.26087439926829301e-12, + 3.39736851102192442e-13, + -1.98557153384797467e-14, + 1.04649504653900259e-15, + -5.05933470232131478e-17, + 2.28860321023504041e-18, + -9.67572670148535213e-20, + 3.83461142467697321e-21, + -1.44541010946963521e-22, + 5.17675654928711036e-24, + -1.75032125639222889e-25, + 1.18958976725691247e-11, + -2.51876660118179496e-12, + 3.86746382648891283e-13, + -4.48743649016926072e-14, + 4.31248539111403019e-15, + -3.56522768394808492e-16, + 2.59400637506249627e-17, + -1.69085129060887066e-18, + 9.99973470013006513e-20, + -5.41511872874151237e-21, + 2.70603988613680236e-22, + -1.25589583634104233e-23, + 5.44048105491606689e-25, + -2.20660168135594478e-26, +# root=9 base[12]=30.0 */ + 1.72328639266706829e-01, + -1.60273666533930492e-03, + 1.64562645590095124e-05, + -1.03701481436957730e-07, + 3.44752038848980558e-09, + -8.92550401291596807e-11, + -4.01403042825267637e-12, + 5.37391655083998938e-14, + 8.27300432469669101e-15, + 1.58550769977263905e-17, + -1.38402968846763982e-17, + -2.17861234102119021e-19, + 2.02538992748750352e-20, + 6.55270101673156509e-22, + 1.02006890792905952e-01, + -1.03384520710525832e-03, + 1.62583496064618180e-05, + -2.78973023996201243e-07, + 4.12387622141922040e-09, + -5.69092210341580259e-11, + 1.56904154143205416e-12, + -2.36242920576230942e-14, + -9.34714721209966389e-16, + -7.66624907482108146e-19, + 2.02618796233196124e-18, + 1.89110892301873629e-20, + -3.09861749263251821e-21, + -6.99037465350043530e-23, + 3.52118050998131774e-02, + -4.19389981308094617e-04, + 1.04883427445706911e-05, + -2.68421260698866115e-07, + 3.73716390486454077e-09, + -4.97559196438870510e-11, + 3.96145328577201498e-12, + -5.98650783001011959e-14, + -4.07393929911930486e-15, + -1.71058095697696544e-17, + 7.80766121047019055e-18, + 1.18178952463614660e-19, + -1.11926850711188925e-20, + -3.63157458059672973e-22, + 6.86273958014046049e-03, + -1.02104584632192033e-04, + 3.68587356982062065e-06, + -1.15785985210002589e-07, + 1.96720230659639015e-09, + -3.75725577811927716e-11, + 2.30879331966966449e-12, + -3.91400329349051463e-14, + -1.59273694993672377e-15, + -1.73876542141076592e-17, + 3.70257332913406499e-18, + 5.93279547586227678e-20, + -4.92604286945629050e-21, + -1.83260820994131083e-22, + 7.14304921496715329e-04, + -1.39590149862587275e-05, + 6.66123202584872604e-07, + -2.44222671132748751e-08, + 5.44422990512171778e-10, + -1.41421902736771937e-11, + 6.56913359310613093e-13, + -1.35035663149780382e-14, + -1.19838451628906137e-16, + -8.35137415041027424e-18, + 7.71367964286618818e-19, + 1.06104557384431998e-20, + -8.02136193651033843e-22, + -3.85924206372100500e-23, + 3.62346106139352681e-05, + -9.76228450783521718e-07, + 5.82807264844061083e-08, + -2.49536932295576501e-09, + 7.42751443545256709e-11, + -2.45603586399069391e-12, + 1.00081269761230888e-13, + -2.61361124181658224e-15, + 3.94720587337747977e-17, + -2.15434547173230836e-18, + 9.63041278168073984e-20, + 9.00206690578894451e-23, + -3.07633515697518874e-23, + -4.05178251402605634e-24, + 7.67601802089401088e-07, + -3.03227306044129389e-08, + 2.21817610139664099e-09, + -1.14294233998546904e-10, + 4.58305305640907302e-12, + -1.88900676723992999e-13, + 7.87649224113884921e-15, + -2.64671686003022256e-16, + 7.95417211270842962e-18, + -2.96923423229432898e-19, + 9.97212564549673383e-21, + -2.02656419515604251e-22, + 5.76925627912553802e-24, + -3.16260383010608705e-25, + 5.10593751487060253e-09, + -3.28998020893389308e-10, + 3.02179115192457848e-11, + -2.00295486721394201e-12, + 1.11202143706499732e-13, + -5.86669079895597546e-15, + 2.87466825081913191e-16, + -1.25892323278423421e-17, + 5.18545199419637690e-19, + -2.08837061127794315e-20, + 7.78720507086199620e-22, + -2.65848251820165608e-23, + 9.14186032773295530e-25, + -3.10059782004163259e-26, + 5.74336422235364353e-12, + -7.87652707024373156e-13, + 1.04322031950719106e-13, + -1.04243943483596353e-14, + 8.82479950571517699e-16, + -6.61255701045194582e-17, + 4.42596420786505194e-18, + -2.67859733154327328e-19, + 1.48787270015655749e-20, + -7.64220080090491288e-22, + 3.64133561035810647e-23, + -1.62009738447084433e-24, + 6.77655154180984535e-26, + -2.66435447337786527e-27, +# root=9 base[13]=32.5 */ + 1.66174219256657901e-01, + -1.47529153887018599e-03, + 1.54695749914566665e-05, + -6.70384913853412170e-08, + 9.63421551623560996e-10, + -1.41013640343716338e-10, + 5.09784903207334539e-13, + 2.21946672352363438e-13, + -3.87455594207620473e-16, + -3.97026684380612469e-16, + 5.13843273019233432e-19, + 6.96470433938207885e-19, + -3.97854553279108230e-22, + -1.21806078579246370e-21, + 9.81119262383637197e-02, + -9.16121978000696154e-04, + 1.32748824350034445e-05, + -2.20331024151377596e-07, + 3.29312044727961642e-09, + -3.00480337628777995e-11, + 5.91727022989758496e-13, + -3.95229123210631742e-14, + 2.72754742576023786e-16, + 5.14995778834281980e-17, + -3.01859562344067523e-19, + -9.21724487950180540e-20, + 6.83814374396303618e-22, + 1.57150263469083337e-22, + 3.36830315963660976e-02, + -3.47396882955941955e-04, + 7.60778261066024741e-06, + -2.12242255187346351e-07, + 3.48654953756989322e-09, + 1.21098114708871135e-11, + 8.02345798606038007e-13, + -1.40658293269352910e-13, + 5.02301595307120517e-16, + 2.15438672934774918e-16, + -2.23102526707842819e-19, + -3.86820604267819899e-19, + 2.54167261045352321e-22, + 6.74405269263883488e-22, + 6.50519748411322683e-03, + -7.76800589650328228e-05, + 2.46898499196209673e-06, + -8.77848895228208918e-08, + 1.65273858596830075e-09, + -5.92920980355538183e-13, + 6.14142277441935666e-13, + -7.14565829554728368e-14, + 3.05242546264054633e-16, + 9.80729624441848548e-17, + 1.27002641717563364e-19, + -1.83266888952250427e-19, + -2.88345494452154995e-22, + 3.19613138995932851e-22, + 6.67457645908812861e-04, + -9.67082150132042894e-06, + 4.18388149120979054e-07, + -1.72553754545301665e-08, + 3.85996855399419473e-10, + -3.40481368372780076e-12, + 2.23427741954640804e-13, + -1.61591175455525823e-14, + 1.11324601846899184e-16, + 1.66674597303921081e-17, + 1.09620135928259001e-19, + -3.54154815944852518e-20, + -1.52297792272302518e-22, + 6.05692973652872637e-23, + 3.30970671716190277e-05, + -6.12558311375614472e-07, + 3.42051816352309053e-08, + -1.59240108555535932e-09, + 4.37748390335558897e-11, + -8.35264847481127083e-13, + 3.80360207260831382e-14, + -1.88988705884926076e-15, + 2.42426862872334156e-17, + 8.49094977611681760e-19, + 2.71379487744346050e-20, + -3.15970372496955151e-21, + -1.94824914880752099e-23, + 4.78499332806141678e-24, + 6.74567549525583720e-07, + -1.70480268211770315e-08, + 1.18934806704584140e-09, + -6.30232224752635272e-11, + 2.21067066909204776e-12, + -6.75286785744947591e-14, + 2.88524053384951838e-15, + -1.18740806342557726e-16, + 2.69112602383990762e-18, + -3.95438523899537540e-20, + 3.10958523728952811e-21, + -1.54346677255757767e-22, + 1.82390748193919577e-25, + 1.11503710262500168e-25, + 4.15462775373805924e-09, + -1.60115023163851750e-10, + 1.39379746877269610e-11, + -8.80806413448691454e-13, + 4.16848316966710415e-14, + -1.84737115434937481e-15, + 8.68347922707171074e-17, + -3.71618854668053336e-18, + 1.30309578999970399e-19, + -4.47305640756247691e-21, + 1.80930579854543053e-22, + -6.43107251346530387e-24, + 1.51604805341686665e-25, + -3.98176926082403236e-27, + 3.71144131594408415e-12, + -2.86045659599928651e-13, + 3.38094210594809075e-14, + -2.94401125060215534e-15, + 2.12801315340048217e-16, + -1.41002236548240399e-17, + 8.66091547682708170e-19, + -4.82879874367875800e-20, + 2.46447066569709010e-21, + -1.18434377713509898e-22, + 5.38872597589535239e-24, + -2.28042776819528934e-25, + 8.99241010652986965e-27, + -3.40661113460855719e-28, +# root=9 base[14]=35.0 */ + 1.60515576200911003e-01, + -1.35469092277622672e-03, + 1.46720531351589784e-05, + -7.15901856409091642e-08, + -1.28946647541355102e-09, + -6.73167006567982098e-11, + 4.73954770758489263e-12, + 3.61668792920973325e-14, + -8.41694464730845373e-15, + 4.48497833153613192e-17, + 1.39561407888580284e-17, + -2.57537034637917476e-19, + -2.06322214191915796e-20, + 7.05016003604984165e-22, + 9.46442998341677638e-02, + -8.19645464943552548e-04, + 1.09287756674781774e-05, + -1.72015960702711593e-07, + 2.75603875054724898e-09, + -2.66809152263570506e-11, + -1.69344529848237241e-13, + -9.82567241359854416e-15, + 1.19062521071447986e-15, + -1.03674992991833332e-17, + -1.73449214717048497e-18, + 4.05975424279970274e-20, + 2.34742287619834288e-21, + -1.01566413167917563e-22, + 3.24004022434768862e-02, + -2.95754919775406677e-04, + 5.40357319055375432e-06, + -1.54694957432892042e-07, + 3.63941033633018572e-09, + -7.72567756477880268e-12, + -1.92907910012563975e-12, + -3.07166968405493333e-14, + 4.82552386765462784e-15, + -2.74121514063886137e-17, + -7.69118094451947684e-18, + 1.42342848927811291e-19, + 1.14242041197063600e-20, + -3.90900893861257975e-22, + 6.22794551350812093e-03, + -6.16911656618020281e-05, + 1.57470739743804222e-06, + -6.12563157900230843e-08, + 1.64470461880267676e-09, + -5.82367671629753268e-12, + -7.94970367489381800e-13, + -1.80150810273567218e-14, + 2.33506026836653853e-15, + -1.18454696412580075e-17, + -3.66146692911559610e-18, + 6.19405947757048526e-20, + 5.64539138882563611e-21, + -1.78387898506710356e-22, + 6.34300077526931240e-04, + -7.05097597191428069e-06, + 2.46688025811018618e-07, + -1.14726177406694003e-08, + 3.39185034206939144e-10, + -2.55616662258622242e-12, + -9.93066864556413119e-14, + -4.89205125594891689e-15, + 4.71515617181066611e-16, + -2.29448361661272772e-18, + -6.93208148192716475e-19, + 1.01191568483883829e-20, + 1.14093381538285194e-21, + -3.21886070711069690e-23, + 3.10885362096944214e-05, + -4.04474296603776243e-07, + 1.88636178151481321e-08, + -9.92078710382815665e-10, + 3.24909596351332886e-11, + -4.40510061511065939e-13, + 5.70099661105266700e-16, + -6.67729879447513305e-16, + 4.47427479617008119e-17, + -2.77177005908898156e-19, + -5.38012311643842979e-20, + 5.56090711191644421e-22, + 1.02988654482723218e-22, + -2.44018339796579924e-24, + 6.21353564415661408e-07, + -1.00401951550463421e-08, + 6.10220355872004204e-10, + -3.56609909457368998e-11, + 1.33007306440730619e-12, + -2.92176157338206861e-14, + 6.51324022471020274e-16, + -4.35373209452231481e-17, + 2.07050450468452761e-18, + -2.46099815346107354e-20, + -1.21593525926491385e-21, + -6.50116996256296609e-24, + 4.06790327618321811e-24, + -7.53571530284844727e-26, + 3.68328601904159924e-09, + -8.17705937052700155e-11, + 6.43795911474031535e-12, + -4.24606557985593629e-13, + 1.90970465318082416e-14, + -6.51272639355377626e-16, + 2.42471042413385823e-17, + -1.17081403440402893e-18, + 4.75350914691596216e-20, + -1.17067545748440620e-21, + 2.10543626299995564e-23, + -1.29843332423696012e-24, + 7.92102576807116329e-26, + -1.50518324135220044e-27, + 2.94499526255123245e-12, + -1.14866059453074906e-13, + 1.23057651510344985e-14, + -1.00416040206078143e-15, + 6.26588827666671893e-17, + -3.45497151744257026e-18, + 1.88762585824524385e-19, + -1.00285886679890455e-20, + 4.78931810617452572e-22, + -2.03914307095287569e-23, + 8.38483058808194715e-25, + -3.52645119981923744e-26, + 1.40619657519310631e-27, + -4.78126337957542738e-29, +# root=9 base[15]=37.5 */ + 1.55325544659183939e-01, + -1.24116407783215620e-03, + 1.36645023785060812e-05, + -9.69642723667278392e-08, + -1.55568750529347084e-09, + 3.27110092378320265e-11, + 2.80474524546081188e-12, + -1.33000002397223551e-13, + -1.01715059969367472e-15, + 2.37427421012093174e-16, + -4.23009547095905819e-18, + -2.76442344560822922e-19, + 1.35297065289764760e-20, + 1.09616489673166568e-22, + 9.15285079913748245e-02, + -7.39764550080862222e-04, + 9.11075251272671507e-06, + -1.32433451829273658e-07, + 2.17888995058986507e-09, + -3.04537486513877178e-11, + -3.62032063689458372e-14, + 1.35648783920768672e-14, + 1.53027195456696877e-16, + -3.07438929457738313e-17, + 6.13412091269253902e-19, + 3.15347385267043365e-20, + -1.73790390600144119e-21, + -5.04673537197752125e-24, + 3.12934440189987159e-02, + -2.58990131089886083e-04, + 3.88326507919926091e-06, + -1.00223724979333845e-07, + 3.03219617873842577e-09, + -4.94976961131634824e-11, + -1.09527619981189838e-12, + 6.70039044400591606e-14, + 6.58516664432757840e-16, + -1.32854967264435728e-16, + 2.36423795675386598e-18, + 1.52705325141535195e-19, + -7.48919063854067819e-21, + -6.04758488744301744e-23, + 6.00233174626302237e-03, + -5.16023153541527422e-05, + 9.90190520951609946e-07, + -3.69425332156617108e-08, + 1.33548543581435263e-09, + -2.37200758381855991e-11, + -4.71483126242436299e-13, + 3.01048736771527538e-14, + 3.62535199812960435e-16, + -6.39904073638715058e-17, + 1.09176334043650645e-18, + 7.50275158562230672e-20, + -3.55490284429875954e-21, + -3.49775668286869245e-23, + 6.09295184328010253e-04, + -5.54074086409532356e-06, + 1.39412995726637842e-07, + -6.60262838282969285e-09, + 2.61033762749439506e-10, + -5.11086627451102951e-12, + -6.71267779258870983e-14, + 5.05435700849440147e-15, + 8.84854092425841355e-17, + -1.25965442765428271e-17, + 2.03193044364922460e-19, + 1.49291706526773242e-20, + -6.76894029420422722e-22, + -8.38376431542478453e-24, + 2.97086334041307955e-05, + -2.93032883229219080e-07, + 9.77859664688479882e-09, + -5.45653316594699226e-10, + 2.30536962089274906e-11, + -5.11019943672348769e-13, + -1.94217444780368833e-15, + 2.99299845120987331e-16, + 1.06552746737072237e-17, + -1.10950009112613505e-18, + 1.67787160564075567e-20, + 1.28111034540000973e-21, + -5.48792259369484635e-23, + -9.10737033732505913e-25, + 5.88703309530288269e-07, + -6.54882936004351927e-09, + 2.92605720033146778e-10, + -1.84986215006398079e-11, + 8.37403371777891171e-13, + -2.18435042071801126e-14, + 1.69952199595114926e-16, + 1.21393397202941446e-18, + 6.11755980713360534e-19, + -4.26700733901218550e-20, + 6.42670454024732706e-22, + 4.11083421633893439e-23, + -1.65411518635234139e-24, + -4.23979911803965512e-26, + 3.43317337372933755e-09, + -4.62825299586232051e-11, + 2.82456400317515673e-12, + -2.00149378370853391e-13, + 9.97391944825648987e-15, + -3.25702085563402305e-16, + 7.20749506462827602e-18, + -2.19774510371471093e-19, + 1.45051961965675040e-20, + -6.91231922351884104e-22, + 1.36719527405074345e-23, + 2.14906758366551972e-25, + -8.87168187194321399e-27, + -7.91292855661746021e-28, + 2.62480268078931333e-12, + -5.16007868018616418e-14, + 4.58700369308605612e-15, + -3.79471980917186802e-16, + 2.28423824962164301e-17, + -1.06689567757425951e-18, + 4.53067441657554868e-20, + -2.11099557318307351e-21, + 1.04903216364051580e-22, + -4.60170739204987973e-24, + 1.61239406960590971e-25, + -4.91221705970063503e-27, + 1.80646131674476611e-28, + -8.48993896962109902e-30, +# root=9 base[16]=40.0 */ + 1.49261961322027931e-01, + -1.77308932898947590e-03, + 3.06330780923247850e-05, + -4.73041004921725102e-07, + -1.27388466863190579e-09, + 5.52451147415632627e-10, + -1.45426244559839492e-11, + -1.21175993116229850e-12, + 1.23854940591664073e-13, + -2.85739847901244882e-15, + -2.76124876918646045e-16, + 2.55964131794794101e-17, + -4.58613754626021557e-19, + -6.39371262685705312e-20, + 8.79322645089160720e-02, + -1.04808469733188615e-03, + 1.88529399437816336e-05, + -3.90327751460571594e-07, + 9.42877040624067491e-09, + -2.59452828915358399e-10, + 5.47848964543711646e-12, + 9.07601696487561642e-14, + -1.46764616246158176e-14, + 3.54569875759346398e-16, + 3.37131774178428897e-17, + -3.18127354003120309e-18, + 6.41851787815486706e-20, + 7.18717736722581923e-21, + 3.00471608420120988e-02, + -3.60687063965429414e-04, + 7.02497789186095227e-06, + -2.14277400345462495e-07, + 1.06306742488854558e-08, + -5.18465105561728614e-10, + 1.26697355092433418e-11, + 5.70553585722519502e-13, + -6.64236775613027532e-14, + 1.53674616759407903e-15, + 1.53844689226830421e-16, + -1.41940426656052850e-17, + 2.54564530336685221e-19, + 3.53729214492134560e-20, + 5.75798442769523758e-03, + -6.99235635129173195e-05, + 1.53085536644893330e-06, + -6.68233499201921070e-08, + 4.41540848800314862e-09, + -2.39666530896571409e-10, + 6.22488276562122994e-12, + 2.55770272912902637e-13, + -3.10359897282016627e-14, + 7.06558847793474595e-16, + 7.50585623085540028e-17, + -6.83497837569632979e-18, + 1.17780809262641705e-19, + 1.74987455087812448e-20, + 5.83661916498179833e-04, + -7.21315161322315883e-06, + 1.84091858879718697e-07, + -1.08395628494121743e-08, + 8.27667709856357017e-10, + -4.73036094454608935e-11, + 1.32110638611393847e-12, + 4.25017052263377852e-14, + -5.70335556530965833e-15, + 1.25386155151633122e-16, + 1.49688115701023645e-17, + -1.33307742297141447e-18, + 2.17696006462993573e-20, + 3.52321857141907760e-21, + 2.83964365072076790e-05, + -3.60279574228347520e-07, + 1.11306939146807607e-08, + -8.36761748867826370e-10, + 6.97410040657042171e-11, + -4.15400714541626220e-12, + 1.27664654649483967e-13, + 2.52578340323079322e-15, + -4.29275707041661736e-16, + 8.56160488946371432e-18, + 1.32810526087158066e-18, + -1.13602370004873538e-19, + 1.72958944395257737e-21, + 3.10373411268819083e-22, + 5.60696517572306337e-07, + -7.41057871359843306e-09, + 2.89724976727857404e-10, + -2.66612939190235115e-11, + 2.37124537449910152e-12, + -1.48066917906165443e-13, + 5.18345282639288986e-15, + 1.99351301335415005e-17, + -1.08882614939499349e-17, + 1.37559143480118639e-19, + 4.98007204954171794e-20, + -3.94896473779270417e-21, + 5.70963689898896426e-23, + 1.08376315355407052e-23, + 3.24833455310937967e-09, + -4.60481193229341078e-11, + 2.42907408229080566e-12, + -2.66707271859073463e-13, + 2.52830737969965251e-14, + -1.69376547958056851e-15, + 7.15070064735962994e-17, + -1.19629111526344214e-18, + -2.80838805474473297e-20, + -2.74918831026683497e-21, + 6.98505208875482023e-22, + -4.84096408363028772e-23, + 8.46273982620735080e-25, + 1.07891927092649164e-25, + 2.44187035599717634e-12, + -4.03440987616645868e-14, + 3.27064673166401117e-15, + -4.31126187262758428e-16, + 4.51505104031053449e-17, + -3.49256374300252623e-18, + 2.01482811042610398e-19, + -9.33435306796097543e-21, + 4.77142965240160540e-22, + -3.70895523415914202e-23, + 3.06909637916136123e-24, + -1.90328930155613564e-25, + 7.36416738959272164e-27, + -1.05614586516734859e-28, +# root=9 base[17]=44.0 */ + 1.42624207567129985e-01, + -1.55039070305578721e-03, + 2.51218844733476934e-05, + -4.29077221813604374e-07, + 5.31462558594997719e-09, + 1.16492370732831269e-10, + -1.38378906758419088e-11, + 5.68315355027088681e-13, + 3.49322855259552867e-17, + -1.63887448445946967e-15, + 1.11348681909599775e-16, + -2.79074529534756279e-18, + -1.28429031010161352e-19, + 1.61288369805919141e-20, + 8.40150684289875660e-02, + -9.13779147385719278e-04, + 1.49265622861282968e-05, + -2.73728802479201265e-07, + 5.55228544078207034e-09, + -1.34814416805381367e-10, + 4.01236648469505860e-12, + -1.10360484578199599e-13, + 5.23795226774507624e-16, + 1.99494392887684101e-16, + -1.37155457673389804e-17, + 3.39431858254325703e-19, + 1.56525540110134243e-20, + -1.94100592361463892e-21, + 2.87037210181144073e-02, + -3.12549336394710772e-04, + 5.19184894741682046e-06, + -1.08638089447264195e-07, + 3.64634811292640700e-09, + -1.93481616685954428e-10, + 1.02318907534751707e-11, + -3.66355861965749418e-13, + 1.01716211117909438e-15, + 8.87062591758333081e-16, + -6.12640347652780706e-17, + 1.53770916655467596e-18, + 7.12666574577835892e-20, + -8.93326244781237436e-21, + 5.49899355295452655e-03, + -5.99895205654460124e-05, + 1.02364310233064048e-06, + -2.55827136465781759e-08, + 1.25267594430259978e-09, + -8.40214023118501470e-11, + 4.80891984648678540e-12, + -1.78338082786354503e-13, + 7.34273294428106408e-16, + 4.16096762113196440e-16, + -2.92278647913858862e-17, + 7.37410819833030976e-19, + 3.45653598810423884e-20, + -4.33618798895180749e-21, + 5.57169055189303260e-04, + -6.09554067491822043e-06, + 1.08207711702835894e-07, + -3.33411743950025535e-09, + 2.13649722486979025e-10, + -1.59259456484849774e-11, + 9.43507012836565147e-13, + -3.60088143937004359e-14, + 2.28064215349427498e-16, + 7.72721723026497549e-17, + -5.58301015896733382e-18, + 1.41648207909572565e-19, + 6.80781344941333948e-21, + -8.52683154740748939e-22, + 2.70896666686612691e-05, + -2.97636448605492969e-07, + 5.59289117168865008e-09, + -2.17329265286782171e-10, + 1.69019472769725753e-11, + -1.33840212566961951e-12, + 8.13454806053822036e-14, + -3.21672301877664297e-15, + 3.08944940860952791e-17, + 5.97415125931338166e-18, + -4.53156429004981002e-19, + 1.15409998150711369e-20, + 5.87835279739475212e-22, + -7.30359806180184260e-23, + 5.34330952057908420e-07, + -5.91016634024246474e-09, + 1.20704956600317488e-10, + -6.03450423032657281e-12, + 5.42502209946198529e-13, + -4.48718278384400698e-14, + 2.80427217970831603e-15, + -1.16658988211212529e-16, + 1.68677034062368119e-18, + 1.65502083256349355e-19, + -1.38440494833639265e-20, + 3.49299054505553760e-22, + 2.07098760251325060e-23, + -2.50347754877394046e-24, + 3.08973697126027591e-09, + -3.45733640709946113e-11, + 8.04350061810168564e-13, + -5.31193692213222651e-14, + 5.36965884435622401e-15, + -4.63290148873657648e-16, + 3.01598380220406214e-17, + -1.36095587399066797e-18, + 3.01561827208952438e-20, + 9.57170414855449421e-22, + -1.09783520748586346e-22, + 2.47900868990917692e-24, + 2.50212005079057132e-25, + -2.76200433983798273e-26, + 2.31211682821088152e-12, + -2.65454209037574222e-14, + 7.86929063622506885e-16, + -7.26272513707869041e-17, + 8.24348735214734889e-18, + -7.58813570608574310e-19, + 5.37375921163995820e-20, + -2.84955572853232299e-21, + 1.04971175609515019e-22, + -2.12875113661935489e-24, + 1.47835334377416599e-26, + -4.65767423085463201e-27, + 7.97156919108079309e-28, + -6.55149723890859456e-29, +# root=9 base[18]=48.0 */ + 1.36794142454821188e-01, + -1.36848069837508220e-03, + 2.05153696006494794e-05, + -3.38485569766052762e-07, + 5.47210921780322075e-09, + -5.49757563043969851e-11, + -2.20305786495303166e-12, + 2.19234786526483648e-13, + -1.08541305941333063e-14, + 2.93823857426121949e-16, + 3.81684722372821324e-18, + -9.39668931605370105e-19, + 5.62287672615446021e-20, + -1.74184650786943103e-21, + 8.05798722151834512e-02, + -8.06171213705294187e-04, + 1.21001407287105716e-05, + -2.02192728332801001e-07, + 3.59544356201049668e-09, + -7.00428586936545008e-11, + 1.67104667753942684e-12, + -5.21374208822021933e-14, + 1.74644750257420584e-15, + -4.06376569271911322e-17, + -5.07133859820807226e-19, + 1.18533634483660803e-19, + -6.90146106799107828e-21, + 2.07129913128698112e-22, + 2.75294386623477667e-02, + -2.75460936171664165e-04, + 4.14493725964305520e-06, + -7.10917665245169706e-08, + 1.49594780205940191e-09, + -5.10639946892181255e-11, + 2.71495668523774431e-12, + -1.49169753321929665e-13, + 6.52987129642177457e-15, + -1.72391429290262401e-16, + -1.93693474110967747e-18, + 5.17267174896130664e-19, + -3.10844608501792751e-20, + 9.63490520241506610e-22, + 5.27382388070916485e-03, + -5.27824128029929981e-05, + 7.97495662952142140e-07, + -1.42504808400429809e-08, + 3.70675934959179973e-10, + -1.83369442087370516e-11, + 1.19884802712466183e-12, + -7.04072533609571996e-14, + 3.16006512495525717e-15, + -8.55785676578493181e-17, + -7.99206351383423995e-19, + 2.45016183347549093e-19, + -1.49402703995724199e-20, + 4.68110711907770173e-22, + 5.34323103163816425e-04, + -5.34958417324149213e-06, + 8.13283776822161016e-08, + -1.54102717176573676e-09, + 5.05566947480233399e-11, + -3.18690195092197438e-12, + 2.27593148469085276e-13, + -1.37345729091289703e-14, + 6.26279456118543619e-16, + -1.74774424493839086e-17, + -1.15193168572572230e-19, + 4.63537740470258475e-20, + -2.88890984662854983e-21, + 9.18686714837844252e-23, + 2.59765974434809891e-05, + -2.60211190445384536e-07, + 3.99244365465511714e-09, + -8.20432443943758639e-11, + 3.41636122405945414e-12, + -2.53646918987575696e-13, + 1.90233795009174653e-14, + -1.16958573391058577e-15, + 5.42722727400674719e-17, + -1.57851881461260040e-18, + -4.29568234957366869e-21, + 3.71063206372771738e-21, + -2.39596424484795656e-22, + 7.78786554883464801e-24, + 5.12305251206937075e-07, + -5.13598890013254600e-09, + 7.99216960902034936e-11, + -1.83820642909749294e-12, + 9.72677807063172712e-14, + -8.11571510364173156e-15, + 6.29898612619119765e-16, + -3.94665255012101536e-17, + 1.87646276549132774e-18, + -5.79562464409420494e-20, + 1.60810586230836005e-22, + 1.11113726737921762e-22, + -7.65127017798076847e-24, + 2.57268027213223204e-25, + 2.96166325162475859e-09, + -2.97321344981973325e-11, + 4.73742625596879232e-13, + -1.28323260038023631e-14, + 8.66249808682799661e-16, + -7.91653495743963397e-17, + 6.34397559177145156e-18, + -4.08123040085979233e-19, + 2.01900776384981205e-20, + -6.85139640519942007e-22, + 7.52959920502887880e-24, + 8.61003847575106940e-25, + -6.91677740922663405e-26, + 2.46319702889231185e-27, + 2.21508981624499065e-12, + -2.23020561161651855e-14, + 3.73311737189712783e-16, + -1.32602685234473198e-17, + 1.16757526243039136e-18, + -1.16391098529186975e-19, + 9.76842717128998209e-21, + -6.62366559180618389e-22, + 3.56020417533596213e-23, + -1.43985311308980216e-24, + 3.62813037493177968e-26, + 8.74842935436774170e-29, + -5.78938855960733629e-29, + 2.30884503840859918e-30, +# root=9 base[19]=52.0 */ + 1.31624718009246855e-01, + -1.21921093354043341e-03, + 1.69375510797639250e-05, + -2.61095319722273665e-07, + 4.17917089317638491e-09, + -6.39137564358034134e-11, + 5.85076263756821707e-13, + 2.50449127315640402e-14, + -2.41835113265728638e-15, + 1.29486837763248467e-16, + -4.91396424895949895e-18, + 1.07962147821348861e-19, + 1.57361683852534430e-21, + -3.00415698511083317e-22, + 7.75346785564733632e-02, + -7.18191749353859748e-04, + 9.97870026171831343e-06, + -1.54093449043427290e-07, + 2.50434007405861768e-09, + -4.24658827775115614e-11, + 7.82563708093635203e-13, + -1.77383620025451148e-14, + 5.46937932390022876e-16, + -1.98764178038881903e-17, + 6.48435588060941860e-19, + -1.28665130560768920e-20, + -2.40432087188825656e-22, + 3.84050820079322029e-23, + 2.64890051850672249e-02, + -2.45367140215646681e-04, + 3.41019610539074872e-06, + -5.28544196865139925e-08, + 8.86098027587883517e-10, + -1.79656199097367707e-11, + 5.82154744280114741e-13, + -2.94590418145988970e-14, + 1.61001558460105735e-15, + -7.64392669400219089e-17, + 2.80385975918160809e-18, + -6.12015299510733730e-20, + -8.48603431524646151e-22, + 1.66035865948575992e-22, + 5.07448629977569864e-03, + -4.70059801619044141e-05, + 6.53621396491229433e-07, + -1.01907265849077264e-08, + 1.79282888234132115e-10, + -4.52432389690043558e-12, + 2.10355229790109293e-13, + -1.30133778821704061e-14, + 7.58575193488309072e-16, + -3.68082901001480739e-17, + 1.36789901490672489e-18, + -3.06072154176612138e-20, + -3.61331873607212557e-22, + 7.86926990397906034e-23, + 5.14123734373813290e-04, + -4.76259992632064505e-06, + 6.62724696982177487e-08, + -1.04247189703692180e-09, + 1.96246183292221676e-11, + -6.24813051995327239e-13, + 3.65669828139345174e-14, + -2.46171957962379280e-15, + 1.47142409726483875e-16, + -7.22294314029115060e-18, + 2.71725731782258119e-19, + -6.27514331669696018e-21, + -5.67428850538898234e-23, + 1.49155466319443083e-23, + 2.49943501152542034e-05, + -2.31548034544640379e-07, + 3.22551041870313235e-09, + -5.14038120678818483e-11, + 1.06026638709150346e-12, + -4.25403004994251418e-14, + 2.89952676882404287e-15, + -2.04382637291807600e-16, + 1.24120324585773116e-17, + -6.16218157858638464e-19, + 2.35585796201853249e-20, + -5.68476422835968093e-22, + -2.98972382624138671e-24, + 1.19888967659966531e-24, + 4.92926369205058965e-07, + -4.56684225573407951e-09, + 6.37219012533846983e-11, + -1.03571196689701320e-12, + 2.41533627238506577e-14, + -1.21331723130372189e-15, + 9.20242623664654210e-17, + -6.69147732615751937e-18, + 4.12419528004399039e-19, + -2.07819683209694114e-20, + 8.13637384102226366e-22, + -2.09126017420023484e-23, + -3.87220488411624013e-28, + 3.62716806212630391e-26, + 2.84956277911975597e-09, + -2.64039914688516910e-11, + 3.69429722384481626e-13, + -6.20072249562624418e-15, + 1.71488497142764907e-16, + -1.07373988989266804e-17, + 8.83684745451686765e-19, + -6.60373496157671612e-20, + 4.14900229743074681e-21, + -2.14075363724332737e-22, + 8.71573254268124392e-24, + -2.46758048469396479e-25, + 1.86670566483914547e-27, + 2.92197037316177155e-28, + 2.13113701990015248e-12, + -1.97523680709401951e-14, + 2.77919819585684159e-16, + -4.97136216327637447e-18, + 1.79123591355365477e-19, + -1.41169876631204328e-20, + 1.25236232712013651e-21, + -9.70348694362122557e-23, + 6.31977197408565291e-24, + -3.42413581371730852e-25, + 1.50971581900652894e-26, + -5.08035125713645886e-28, + 1.01670913976572017e-29, + 1.25584379939389335e-31, +# root=9 base[20]=56.0 */ + 1.27000515676136766e-01, + -1.09519785718027924e-03, + 1.41662656845023895e-05, + -2.03567052495927536e-07, + 3.06701010945708250e-09, + -4.70188708196746238e-11, + 6.87037100980821142e-13, + -6.52591235987590423e-15, + -1.92826693702206096e-16, + 1.98297969100875343e-17, + -1.09954847683803292e-18, + 4.68215093380564966e-20, + -1.52522309016609821e-21, + 3.09264615657358336e-23, + 7.48107436984501578e-02, + -6.45136089107734793e-04, + 8.34488247300669048e-06, + -1.19938308388622452e-07, + 1.81058326998543237e-09, + -2.81771201699827739e-11, + 4.52473533296733176e-13, + -7.80082144050055212e-15, + 1.62850960010791394e-16, + -4.68979223271403284e-18, + 1.70310369532552218e-19, + -6.20440420579772446e-21, + 1.87719550524715223e-22, + -3.49692266342304281e-24, + 2.55583919971570546e-02, + -2.20405000294472144e-04, + 2.85103832966893105e-06, + -4.09939407925634385e-08, + 6.21382116564133078e-10, + -9.97015341669157118e-12, + 1.88806934013840926e-13, + -5.50336084641839892e-15, + 2.54228388082678979e-16, + -1.33842280254626692e-17, + 6.48300898925494808e-19, + -2.65759868473509167e-20, + 8.55159257631051793e-22, + -1.72896169011562556e-23, + 4.89620728540723655e-03, + -4.22229529588923563e-05, + 5.46198892564160853e-07, + -7.85881879581029007e-09, + 1.19912662212243018e-10, + -2.01703733709878482e-12, + 4.68503759979551832e-14, + -1.94202504475133470e-15, + 1.10979916787182361e-16, + -6.27068851629100258e-18, + 3.10628641532938325e-19, + -1.28645188941552355e-20, + 4.17933749017588291e-22, + -8.64043904260001191e-24, + 4.96061034465446237e-04, + -4.27784704329147210e-06, + 5.53424333416361239e-08, + -7.97073625593184076e-10, + 1.22820399058050372e-11, + -2.20681052773056992e-13, + 6.38003501546918325e-15, + -3.32981662714517890e-16, + 2.08391304094410916e-17, + -1.20925471358393799e-18, + 6.05263375927820155e-20, + -2.52616080518072769e-21, + 8.29670675350022584e-23, + -1.76542286010521093e-24, + 2.41162035436752287e-05, + -2.07970161141125248e-07, + 2.69078680469800598e-09, + -3.88113085092313701e-11, + 6.06666386645203968e-13, + -1.19072439825961419e-14, + 4.28628619360178662e-16, + -2.61179154367011042e-17, + 1.71673973041142328e-18, + -1.01188786733490165e-19, + 5.10971823503338722e-21, + -2.15280597231528200e-22, + 7.17838387089658560e-24, + -1.58987277502157188e-25, + 4.75607376806344839e-07, + -4.10150835749985525e-09, + 5.30750183832231673e-11, + -7.67247576984215449e-13, + 1.22518450451108979e-14, + -2.70440976537010114e-16, + 1.20556390833571849e-17, + -8.19357986135231333e-19, + 5.56130592289434854e-20, + -3.32124286137093228e-21, + 1.69512558951693114e-22, + -7.23923470511950159e-24, + 2.46898734139985360e-25, + -5.79104282818458893e-27, + 2.74943739822692716e-09, + -2.37106579392359648e-11, + 3.06903257613072023e-13, + -4.45275604854052225e-15, + 7.35769116817998103e-17, + -1.90718423286964483e-18, + 1.04832432003387952e-19, + -7.74075636124104012e-21, + 5.39411783954855223e-22, + -3.27152934168732739e-23, + 1.69703463907807421e-24, + -7.40962876810580817e-26, + 2.62195744400388071e-27, + -6.70978823772523340e-29, + 2.05624622284600602e-12, + -1.77330799926025182e-14, + 2.29647662048270558e-16, + -3.35612250987493076e-18, + 5.92021039819164032e-20, + -1.95707147477014170e-21, + 1.33703631033744885e-22, + -1.06247249412863320e-23, + 7.63777027346668827e-25, + -4.75727573527284283e-26, + 2.54867411453817403e-27, + -1.16429301637953517e-28, + 4.43275589775195459e-30, + -1.32231244358987539e-31, +# root=9 base[21]=60.0 */ + 1.22832003829656172e-01, + -9.90870708918508130e-04, + 1.19895773337559720e-05, + -1.61190565031141683e-07, + 2.27507225270176831e-09, + -3.29844784800997300e-11, + 4.82719807989091981e-13, + -6.79329765495340573e-15, + 7.05415407543452723e-17, + 9.60900683315317247e-19, + -1.25829909785397436e-19, + 7.15773706132965441e-21, + -3.18931310827884207e-22, + 1.17425991248622381e-23, + 7.23552453708664611e-02, + -5.83680916786278128e-04, + 7.06257210797156932e-06, + -9.49525830934767555e-08, + 1.34045970848118275e-09, + -1.94696374996556368e-11, + 2.88572662377898492e-13, + -4.37803214756970599e-15, + 7.02382583076365113e-17, + -1.32303907028227413e-18, + 3.39876421349023846e-20, + -1.16228847781244393e-21, + 4.31714301965976968e-23, + -1.47704834558598514e-24, + 2.47194934598987080e-02, + -1.99409150347338042e-04, + 2.41286799633946938e-06, + -3.24410160289996198e-08, + 4.58175894486034509e-10, + -6.68006885170973868e-12, + 1.01605282422913884e-13, + -1.76490991152318799e-15, + 4.45342481592660028e-17, + -1.80619102947548326e-18, + 8.92218774938927013e-20, + -4.26518044210016369e-21, + 1.81287027314037765e-22, + -6.57507428335886774e-24, + 4.73549980446251375e-03, + -3.82007075269655502e-05, + 4.62233724472307305e-07, + -6.21512631733770510e-09, + 8.78407606222385926e-11, + -1.28852093711536766e-12, + 2.04016552399686273e-14, + -4.21860017592526691e-16, + 1.49335707983955230e-17, + -7.69056592132746233e-19, + 4.13995608560753158e-20, + -2.03235973434186404e-21, + 8.72652977590229250e-23, + -3.18566828511633092e-24, + 4.79778875514683741e-04, + -3.87031939714334167e-06, + 4.68316670613688689e-08, + -6.29750939729031732e-10, + 8.90993605293321804e-12, + -1.31883529103364587e-13, + 2.20928361034875148e-15, + -5.54893254949841498e-17, + 2.49027719476205283e-18, + -1.42709919217307932e-19, + 7.93197715757727569e-21, + -3.93679421145530717e-22, + 1.70095592902599472e-23, + -6.24885985911793723e-25, + 2.33246383996013734e-05, + -1.88157160497550072e-07, + 2.27676045341326696e-09, + -3.06200801553912751e-11, + 4.33895572517748535e-13, + -6.50714065402270403e-15, + 1.17613375687392967e-16, + -3.61573385405981686e-18, + 1.91747313747194771e-19, + -1.16471922474341220e-20, + 6.58861463678850241e-22, + -3.29648828221304876e-23, + 1.43396484678039706e-24, + -5.31262503947876104e-26, + 4.59996490081984811e-07, + -3.71074034872108950e-09, + 4.49017006801078031e-11, + -6.04006006273983376e-13, + 8.57886566770457776e-15, + -1.31175863660757471e-16, + 2.62495156269116333e-18, + -9.89323575044146300e-20, + 5.92184874682943908e-21, + -3.73354627019391970e-22, + 2.14018646935108727e-23, + -1.08012828738291772e-24, + 4.74215644054268804e-26, + -1.77890719788508794e-27, + 2.65919203934838949e-09, + -2.14514225571612965e-11, + 2.59577679774830223e-13, + -3.49293013809850178e-15, + 4.97977263074694040e-17, + -7.85150934947236233e-19, + 1.80779183169581551e-20, + -8.36816035900953121e-22, + 5.49637770483094961e-23, + -3.56594849052643423e-24, + 2.07252789182478293e-25, + -1.05887578215204825e-26, + 4.71773476852138153e-28, + -1.80614049997844331e-29, + 1.98875300358141467e-12, + -1.60430856723288011e-14, + 1.94140619145452345e-16, + -2.61406990988333187e-18, + 3.75408191049068472e-20, + -6.26876912416339445e-22, + 1.78735028290410522e-23, + -1.02941368670677466e-24, + 7.32712473824237473e-26, + -4.89796790372924761e-27, + 2.90793646219162239e-28, + -1.52047911144458361e-29, + 6.97636211409329571e-31, + -2.78217497735987317e-32, +# root=9 base[22]=64.0 */ + 1.19048916058267881e-01, + -9.02118766319865350e-04, + 1.02538014678913331e-05, + -1.29497379543246946e-07, + 1.71719319802490542e-09, + -2.34181000690782732e-11, + 3.24937499602635134e-13, + -4.53711294639054833e-15, + 6.16669790926864413e-17, + -6.91529091296915720e-19, + -1.50331303167595093e-21, + 6.27126637207136706e-22, + -3.73003859820446172e-23, + 1.69332716088752711e-24, + 7.01267850279264221e-02, + -5.31400798017522737e-04, + 6.04009025689425271e-06, + -7.62816679086977573e-08, + 1.01154866008227067e-09, + -1.37974974894789217e-11, + 1.91725589289685691e-13, + -2.70256416986814182e-15, + 3.87502935605998189e-17, + -5.78659664373241393e-19, + 9.76537932539122512e-21, + -2.16650308681488166e-22, + 6.63535475993469518e-24, + -2.37855293075431892e-25, + 2.39581607760906909e-02, + -1.81548117949540018e-04, + 2.06354079077667137e-06, + -2.60610085587014002e-08, + 3.45601298863130903e-10, + -4.71582724569247083e-12, + 6.57282474488725785e-14, + -9.44667650484601252e-16, + 1.49702521188218872e-17, + -3.20137317905507930e-19, + 1.09569034024075039e-20, + -4.93838166625844789e-22, + 2.27881573713134149e-23, + -9.68908040642717856e-25, + 4.58965171009235312e-03, + -3.47790736800482214e-05, + 3.95311499507589413e-07, + -4.99252072663677481e-09, + 6.62113286702480497e-11, + -9.04039254756133147e-13, + 1.26617598307893059e-14, + -1.87587930995672684e-16, + 3.40510971152466785e-18, + -9.93812712799711976e-20, + 4.47165613735616298e-21, + -2.25587378895102057e-22, + 1.07838814749672578e-23, + -4.64071831281261742e-25, + 4.65002221623548998e-04, + -3.52365447378785600e-06, + 4.00511458473855469e-08, + -5.05823188999530695e-10, + 6.70892812041049045e-12, + -9.16880888213864249e-14, + 1.29343037436203470e-15, + -2.00063805476185004e-17, + 4.26416085120447700e-19, + -1.58503017866930124e-20, + 8.14541164151209974e-22, + -4.28762415203501377e-23, + 2.07734774244603910e-24, + -8.99388543058283333e-26, + 2.26062654662130006e-05, + -1.71303848782634926e-07, + 1.94710346844281882e-09, + -2.45910855862383568e-11, + 3.26206941633840897e-13, + -4.46419213422824010e-15, + 6.36344357871464401e-17, + -1.04400540415839819e-18, + 2.65573001218402458e-20, + -1.18580491147904627e-21, + 6.56697787944555870e-23, + -3.53519053971626407e-24, + 1.72749979544354880e-25, + -7.52130969757605223e-27, + 4.45829106536834396e-07, + -3.37836625518754144e-09, + 3.83998080205354342e-11, + -4.84981258084612925e-13, + 6.43474374655719193e-15, + -8.82387489583848272e-17, + 1.27722733912113881e-18, + -2.27067667800249259e-20, + 6.97417354741748836e-22, + -3.58286251176887992e-23, + 2.08111113434754017e-24, + -1.13767030829131222e-25, + 5.60381072992823495e-27, + -2.45711831900445474e-28, + 2.57729183554266140e-09, + -1.95299860359139795e-11, + 2.21985652903845696e-13, + -2.80370469446365596e-15, + 3.72120131809448441e-17, + -5.11934055316828155e-19, + 7.59082941614181358e-21, + -1.51116971583225351e-22, + 5.67211103195494718e-24, + -3.25643198047574822e-25, + 1.95894132538829853e-26, + -1.08596102432219359e-27, + 5.40359640681189073e-29, + -2.39493371030002680e-30, + 1.92750154903070275e-12, + -1.46060610907346452e-14, + 1.66018810903450250e-16, + -2.09694079218789500e-18, + 2.78490745558223270e-20, + -3.85487155443203999e-22, + 5.97651107529179039e-24, + -1.42039797686054534e-25, + 6.67250037298085060e-27, + -4.21805328406552665e-28, + 2.62162378622046522e-29, + -1.48067945002945551e-30, + 7.49975469014803853e-32, + -3.39359364775888784e-33, +# root=9 base[23]=68.0 */ + 1.15595275712414292e-01, + -8.25870194049577438e-04, + 8.85049105195677713e-06, + -1.05384938475551786e-07, + 1.31758233959298081e-09, + -1.69435997482818074e-11, + 2.21899884138968579e-13, + -2.94167225744608443e-15, + 3.91988568034320461e-17, + -5.14040257349608779e-19, + 6.02232330489527107e-21, + -2.77464766874555715e-23, + -2.39012809541003509e-24, + 1.58993959514023230e-25, + 6.80923885593234524e-02, + -4.86485920962913233e-04, + 5.21345769293115135e-06, + -6.20779093897024378e-08, + 7.76134493890529479e-10, + -9.98095613720938223e-12, + 1.30733187063715376e-13, + -1.73489057530320951e-15, + 2.32661967520491909e-17, + -3.15869268922308051e-19, + 4.40851082832478327e-21, + -6.69828704788377961e-23, + 1.26483126821924537e-24, + -3.31290909334491749e-26, + 2.32631282319248275e-02, + -1.66203368782992446e-04, + 1.78112912455087017e-06, + -2.12083429920803781e-08, + 2.65160032802736299e-10, + -3.41003082905886524e-12, + 4.46788283435336596e-14, + -5.94185537893254175e-16, + 8.07392927325452538e-18, + -1.17233371280569746e-19, + 2.12058552880236867e-21, + -5.90541776011418600e-23, + 2.34311034572404292e-24, + -1.02071371005989582e-25, + 4.45650470649260749e-03, + -3.18394881513883211e-05, + 3.41209935881027607e-07, + -4.06287227548942370e-09, + 5.07968500208161544e-11, + -6.53297921204945803e-13, + 8.56374216790465468e-15, + -1.14283612047368446e-16, + 1.58543291190425069e-18, + -2.53426760465468163e-20, + 5.96676859692881628e-22, + -2.25405478231010376e-23, + 1.04310074377977639e-24, + -4.78303104154605940e-26, + 4.51512384748280920e-04, + -3.22582925075988650e-06, + 3.45698090195161353e-08, + -4.11631619402616297e-10, + 5.14654434671194584e-12, + -6.61951401635645049e-14, + 8.68335894742475642e-16, + -1.16472420892288553e-17, + 1.66461993906269742e-19, + -3.00304575737394864e-21, + 8.92642980294692865e-23, + -3.98641222768334225e-24, + 1.96042588008949482e-25, + -9.15895112804452108e-27, + 2.19504517470205741e-05, + -1.56824954981661179e-07, + 1.68062490446690522e-09, + -2.00116499963333602e-11, + 2.50204304614525994e-13, + -3.21852711417998973e-15, + 4.22637128187938207e-17, + -5.71086565033302190e-19, + 8.50647857519543436e-21, + -1.76976640964437929e-22, + 6.39607369751368623e-24, + -3.15758932891804673e-25, + 1.60284267713029726e-26, + -7.56810556047227602e-28, + 4.32895486474469637e-07, + -3.09282087216586906e-09, + 3.31444195908476214e-11, + -3.94659939479538446e-13, + 4.93448825180318749e-15, + -6.34864897219678974e-17, + 8.34941101031920801e-19, + -1.14048959211957781e-20, + 1.79939633489311493e-22, + -4.40582227094321149e-24, + 1.87193218992856680e-25, + -9.86670052618061200e-27, + 5.11141692675425114e-28, + -2.43392103317979750e-29, + 2.50252391744933093e-09, + -1.78792768030977525e-11, + 1.91604472082908462e-13, + -2.28149271113276622e-15, + 2.85265633398311075e-17, + -3.67121425427984614e-19, + 4.83987572277465742e-21, + -6.72398826653621592e-23, + 1.15299955549599207e-24, + -3.40031916713682834e-26, + 1.65525753418893594e-27, + -9.14759654397181049e-29, + 4.81708632613312736e-30, + -2.31519503676025444e-31, + 1.87158421682445985e-12, + -1.33715295311924562e-14, + 1.43296920918297763e-16, + -1.70628589602325703e-18, + 2.13355093688967663e-20, + -2.74718860337877358e-22, + 3.63810558460458801e-24, + -5.21406196281201141e-26, + 1.02358893967186666e-27, + -3.77717824348667274e-29, + 2.07726333209415722e-30, + -1.19564252960283884e-31, + 6.41337799126842066e-33, + -3.12774304011301636e-34, +# root=9 base[24]=72.0 */ + 1.12425867744450597e-01, + -7.59790364010850530e-04, + 7.70204339803804046e-06, + -8.67508974523693976e-08, + 1.02596038285679819e-09, + -1.24801814490401618e-11, + 1.54623670377333108e-13, + -1.94045768807154787e-15, + 2.45745450453787853e-17, + -3.12680269327634465e-19, + 3.94671731784799562e-21, + -4.68249565285362289e-23, + 3.84884679407250449e-25, + 5.83068249231786200e-27, + 6.62254216132680817e-02, + -4.47561030253839764e-04, + 4.53695472180805959e-06, + -5.11013605776418387e-08, + 6.04350837066058202e-10, + -7.35156857815077854e-12, + 9.10836668046271403e-14, + -1.14317162781519480e-15, + 1.44871291369569585e-17, + -1.85059615416349574e-19, + 2.38489314383797831e-21, + -3.12896918198045011e-23, + 4.33388918201954302e-25, + -6.99992229459931858e-27, + 2.26252964213930832e-02, + -1.52905043557579067e-04, + 1.55000818437102798e-06, + -1.74583025971172296e-08, + 2.06470868682418263e-10, + -2.51160227484724060e-12, + 3.11187842689409988e-14, + -3.90645169565671358e-16, + 4.95741729309425788e-18, + -6.38449274425138052e-20, + 8.57537881875722272e-22, + -1.33316529232249697e-23, + 2.95458524844508258e-25, + -9.83958195990431701e-27, + 4.33431561661526930e-03, + -2.92919352671633960e-05, + 2.96934217476366509e-07, + -3.34447753634307485e-09, + 3.95535272016042932e-11, + -4.81148595282729143e-13, + 5.96168540874715644e-15, + -7.48637732807685815e-17, + 9.52162287371104178e-19, + -1.24222854622406632e-20, + 1.77481914502126714e-22, + -3.37068132064716123e-24, + 1.02230917758460255e-25, + -4.19415635382507793e-27, + 4.39132752947948249e-04, + -2.96772300670594542e-06, + 3.00839976008612398e-08, + -3.38846963642590564e-10, + 4.00738232027193050e-12, + -4.87480911246842090e-14, + 6.04051723716855525e-16, + -7.58905613385314093e-18, + 9.68393966567269631e-20, + -1.28733416062538484e-21, + 1.99679627429452488e-23, + -4.64599356326631877e-25, + 1.72490021185914596e-26, + -7.74480146263624913e-28, + 2.13486110892344883e-05, + -1.44277018442450441e-07, + 1.46254535153901549e-09, + -1.64731790336457836e-11, + 1.94820632963435833e-13, + -2.36993189724164873e-15, + 2.93691166484618174e-17, + -3.69240576990614389e-19, + 4.73400021632335248e-21, + -6.46152736730870067e-23, + 1.11134751287683007e-24, + -3.13237677426806385e-26, + 1.32917506471221630e-27, + -6.26191699145628286e-29, + 4.21026295464009743e-07, + -2.84535693439220617e-09, + 2.88435650994312330e-11, + -3.24875566436527936e-13, + 3.84215689564075371e-15, + -4.67392764289045662e-17, + 5.79286658600459972e-19, + -7.29055441190671742e-21, + 9.41219911681802697e-23, + -1.33365325230429913e-24, + 2.60405963280115031e-26, + -8.75004065550866826e-28, + 4.07224699639782454e-29, + -1.97693768481184891e-30, + 2.43390935492524236e-09, + -1.64487133857222802e-11, + 1.66741659861619770e-13, + -1.87807220232792120e-15, + 2.22111542080956630e-17, + -2.70201223692482669e-19, + 3.34955538531340879e-21, + -4.22237722283918588e-23, + 5.51039101839918704e-25, + -8.25324728794121456e-27, + 1.88513967613681652e-28, + -7.44225524527517146e-30, + 3.70779929407811836e-31, + -1.84032239865310089e-32, + 1.82026885009788441e-12, + -1.23016416157877902e-14, + 1.24702529342530163e-16, + -1.40457043313706004e-18, + 1.66113069941664458e-20, + -2.02086308158099529e-22, + 2.50610011877289435e-24, + -3.16855795754877978e-26, + 4.21743236470455425e-28, + -6.93469487025475297e-30, + 1.94760782761854705e-31, + -8.97772623086409734e-33, + 4.73329061031566198e-34, + -2.39972355040347794e-35, +# root=9 base[25]=76.0 */ + 1.09503716418612340e-01, + -7.02076744237018087e-04, + 6.75189413883928113e-06, + -7.21477287836852701e-08, + 8.09484253328606001e-10, + -9.34175070483639686e-12, + 1.09803602590864913e-13, + -1.30739269906501428e-15, + 1.57156554904091243e-17, + -1.90258808086589149e-19, + 2.31333159114610305e-21, + -2.80452518130481404e-23, + 3.29367908654742740e-25, + -3.27566698839157596e-27, + 6.45041033129976488e-02, + -4.13564327541377538e-04, + 3.97726115006775153e-06, + -4.24992384349918034e-08, + 4.76833645843398212e-10, + -5.50283894295349252e-12, + 6.46808234591992702e-14, + -7.70138127136347714e-16, + 9.25809719458078370e-18, + -1.12125908893921930e-19, + 1.36641399173813103e-21, + -1.67591253077917940e-23, + 2.07892698860361746e-25, + -2.66282857330041557e-27, + 2.20372241097211777e-02, + -1.41290387769648881e-04, + 1.35879410470473228e-06, + -1.45194676734451128e-08, + 1.62905761879344831e-10, + -1.87999390604903104e-12, + 2.20976482957381340e-14, + -2.63115636874692907e-16, + 3.16340792957342156e-18, + -3.83439474370569355e-20, + 4.69471481408688757e-22, + -5.89547755311734979e-24, + 8.09004733581009497e-26, + -1.43197435684115785e-27, + 4.22165892665439524e-03, + -2.70669220319937763e-05, + 2.60303440826900727e-07, + -2.78148645720868898e-09, + 3.12077682311853478e-11, + -3.60149524792462599e-13, + 4.23324950920017866e-15, + -5.04064969709815919e-17, + 6.06155363118263830e-19, + -7.35696249451148925e-21, + 9.07517793698221428e-23, + -1.18173804988455448e-24, + 1.85444089421547168e-26, + -4.35604947584905003e-28, + 4.27718899694624303e-04, + -2.74229498659504425e-06, + 2.63727371735898696e-08, + -2.81807306217213095e-10, + 3.16182644126925812e-12, + -3.64886977156372760e-14, + 4.28895460963599519e-16, + -5.10718789527748046e-18, + 6.14342071083092316e-20, + -7.47082712272719189e-22, + 9.31662943884211767e-24, + -1.27577313205423060e-25, + 2.33639095080042432e-27, + -6.84012450033716230e-29, + 2.07937221347967223e-05, + -1.33317746781482293e-07, + 1.28212096589007443e-09, + -1.37001728134898664e-11, + 1.53713441804470293e-13, + -1.77391364308653721e-15, + 2.08510786039457706e-17, + -2.48304397526575742e-19, + 2.98814338058988656e-21, + -3.64396302449746365e-23, + 4.61513006592920472e-25, + -6.75518847575217485e-27, + 1.45897037012356037e-28, + -5.04359991166214813e-30, + 4.10083061737223718e-07, + -2.62922383159577579e-09, + 2.52853283273660091e-11, + -2.70187742508464396e-13, + 3.03145745784047614e-15, + -3.49842466728882739e-17, + 4.11218738872166746e-19, + -4.89740491533040135e-21, + 5.89737807445469477e-23, + -7.22114228701700158e-25, + 9.35084223072560244e-27, + -1.49327060196897713e-28, + 3.82167771121652993e-30, + -1.49875964624932387e-31, + 2.37064765552636674e-09, + -1.51992703280141730e-11, + 1.46171861097669193e-13, + -1.56192733379865596e-15, + 1.75245434256668254e-17, + -2.02240629965645422e-19, + 2.37725323607530452e-21, + -2.83156315489615580e-23, + 3.41309298573434961e-25, + -4.20579946737921280e-27, + 5.63154441041537643e-29, + -1.01000842284906867e-30, + 3.07447035319015355e-32, + -1.33091591838912582e-33, + 1.77295677555343463e-12, + -1.13672098209678791e-14, + 1.09318814661560502e-16, + -1.16813212646803768e-18, + 1.31062348705022529e-20, + -1.51251886876544098e-22, + 1.77795105500739160e-24, + -2.11823793441820376e-26, + 2.55784902489439116e-28, + -3.18828659921768055e-30, + 4.52313161949987371e-32, + -9.59366123131275836e-34, + 3.51294686679974148e-35, + -1.65341795061569688e-36, +# root=9 base[26]=80.0 */ + 1.06798249742697013e-01, + -6.51317829499812044e-04, + 5.95809842493395628e-06, + -6.05589761493004481e-08, + 6.46305922061453859e-10, + -7.09466562458530302e-12, + 7.93221508226118719e-14, + -8.98381107474327719e-16, + 1.02726160258541075e-17, + -1.18330255572125641e-19, + 1.37085741427394798e-21, + -1.59443277786398496e-23, + 1.85434199597776484e-25, + -2.12447906595586144e-27, + 6.29104249641640467e-02, + -3.83664353482284111e-04, + 3.50966897673328378e-06, + -3.56727842847153304e-08, + 3.80712046611688820e-10, + -4.17917366193006321e-12, + 4.67253967972228520e-14, + -5.29199474212597005e-16, + 6.05120760644247105e-18, + -6.97063218828462919e-20, + 8.07725469764521347e-22, + -9.40602400393541318e-24, + 1.10064789485582437e-25, + -1.29705633113940464e-27, + 2.14927587946751250e-02, + -1.31075341045739827e-04, + 1.19904560824755759e-06, + -1.21872733914633419e-08, + 1.30066713127440517e-10, + -1.42777564764666744e-12, + 1.59632976853778053e-14, + -1.80796322923582631e-16, + 2.06736337586727884e-18, + -2.38165496928173591e-20, + 2.76101027442751447e-22, + -3.22333782635574654e-24, + 3.81945990348460895e-26, + -4.75554291317878134e-28, + 4.11735600510331964e-03, + -2.51100311379944640e-05, + 2.29700509026944640e-07, + -2.33470927433307516e-09, + 2.49168088825556908e-11, + -2.73518203301341035e-13, + 3.05808094555425053e-15, + -3.46351344039963220e-17, + 3.96051282848674199e-19, + -4.56314797118643347e-21, + 5.29383167416757703e-23, + -6.20521881262503479e-25, + 7.49897611810715948e-27, + -1.01083703429675639e-28, + 4.17151411506712269e-04, + -2.54403187851874196e-06, + 2.32721900768803756e-08, + -2.36541913833428053e-10, + 2.52445550199732509e-12, + -2.77115965220546852e-14, + 3.09830690390873697e-16, + -3.50908335229340797e-18, + 4.01272117818981946e-20, + -4.62410012197816592e-22, + 5.37029322981945134e-24, + -6.33206143892382081e-26, + 7.86980701716045311e-28, + -1.17359150045264258e-29, + 2.02799795501238349e-05, + -1.23679107988356367e-07, + 1.13138665201898216e-09, + -1.14995779563766136e-11, + 1.22727395185687173e-13, + -1.34721020176202912e-15, + 1.50625485210696551e-17, + -1.70596311997235676e-19, + 1.95087904786890233e-21, + -2.24867335034567034e-23, + 2.61556085775300063e-25, + -3.11001567091029483e-27, + 4.01687476546718898e-29, + -6.75610257319719588e-31, + 3.99951295490553855e-07, + -2.43913556928473054e-09, + 2.23126239384319108e-11, + -2.26788744593294118e-13, + 2.42036639234399031e-15, + -2.65689864637500563e-17, + 2.97056038475478278e-19, + -3.36443669892681747e-21, + 3.84764902297462109e-23, + -4.43658070021069281e-25, + 5.17200845419835448e-27, + -6.22477966345098401e-29, + 8.47449218226242261e-31, + -1.63741839778473260e-32, + 2.31207696548775053e-09, + -1.41003897950389541e-11, + 1.28986965238543534e-13, + -1.31104221574758011e-15, + 1.39918872350165831e-17, + -1.53592571538404098e-19, + 1.71725215363627933e-21, + -1.94496743293927279e-23, + 2.22448684560535116e-25, + -2.56640287784858297e-27, + 3.00217912794144408e-29, + -3.68059992361531639e-31, + 5.39784562185130699e-33, + -1.22317522923645162e-34, + 1.72915300677683092e-12, + -1.05453805278892907e-14, + 9.64665978310194725e-17, + -9.80500487181757405e-19, + 1.04642339172732731e-20, + -1.14868626399857863e-22, + 1.28429886224161673e-24, + -1.45462806026945970e-26, + 1.66391375952935763e-28, + -1.92158425748388851e-30, + 2.26184297432018625e-32, + -2.86411556358069798e-34, + 4.71901182193379983e-36, + -1.29596782338349637e-37, +# root=9 base[27]=84.0 */ + 1.04283940278864784e-01, + -6.06394229530507456e-04, + 5.28906679420547615e-06, + -5.12577230496382376e-08, + 5.21588945406483904e-10, + -5.45923334742271107e-12, + 5.81974192008690264e-14, + -6.28462791054248851e-16, + 6.85190282565996019e-18, + -7.52570235544059540e-20, + 8.31427301523975117e-22, + -9.22870455931891282e-24, + 1.02801121661567224e-25, + -1.14652763073018283e-27, + 6.14293494105647014e-02, + -3.57201721633923540e-04, + 3.11557015671118837e-06, + -3.01938013733566102e-08, + 3.07246441698496182e-10, + -3.21580822565184497e-12, + 3.42816890791076016e-14, + -3.70201415491262263e-16, + 4.03617386782885723e-18, + -4.43309411163057701e-20, + 4.89770321070960442e-22, + -5.43698821846552188e-24, + 6.06015359840675501e-26, + -6.77943389475494582e-28, + 2.09867631723544314e-02, + -1.22034630166524097e-04, + 1.06440542921517371e-06, + -1.03154300798891944e-08, + 1.04967875612044721e-10, + -1.09865082969631151e-12, + 1.17120188335968341e-14, + -1.26475867135147188e-16, + 1.37892231885780793e-18, + -1.51453551821268212e-20, + 1.67333207206664095e-22, + -1.85802145582667352e-24, + 2.07363383772623171e-26, + -2.33438238648051041e-28, + 4.02042270147203590e-03, + -2.33781071172300187e-05, + 2.03907563831699194e-07, + -1.97612127836250903e-09, + 2.01086383169227595e-11, + -2.10467936693892835e-13, + 2.24366505603066663e-15, + -2.42289164328232594e-17, + 2.64159769417581769e-19, + -2.90141903318242981e-21, + 3.20583055423989657e-23, + -3.56101138679640136e-25, + 3.98238421593476756e-27, + -4.52799522467259777e-29, + 4.07330578821444786e-04, + -2.36856137050576795e-06, + 2.06589685137460425e-08, + -2.00211441410875290e-10, + 2.03731395782633805e-12, + -2.13236351036843303e-14, + 2.27317741356739069e-16, + -2.45476201447349208e-18, + 2.67634984993906972e-20, + -2.93963016306550236e-22, + 3.24835168635899278e-24, + -3.61024623983979783e-26, + 4.04956269853773289e-28, + -4.67110027344521543e-30, + 1.98025359156817028e-05, + -1.15148540391065457e-07, + 1.00434386035596590e-09, + -9.73335778222710485e-12, + 9.90448174698446943e-14, + -1.03665689037618660e-15, + 1.10511415654761225e-17, + -1.19339259414596233e-19, + 1.30112186315008250e-21, + -1.42914535487604483e-23, + 1.57944424769881261e-25, + -1.75680285770228223e-27, + 1.97903069371391727e-29, + -2.32924911627547526e-31, + 3.90535398415958171e-07, + -2.27090011552661035e-09, + 1.98071515345848553e-11, + -1.91956261341956064e-13, + 1.95331079954331229e-15, + -2.04444125278678177e-17, + 2.17944923997061703e-19, + -2.35354847569482423e-21, + 2.56601646773067147e-23, + -2.81857973902254139e-25, + 3.11559940656048488e-27, + -3.46945095086605305e-29, + 3.93256521360182631e-31, + -4.76161658358500913e-33, + 2.25764464089963260e-09, + -1.31278380823663108e-11, + 1.14503089079656003e-13, + -1.10967924155743848e-15, + 1.12918871844803283e-17, + -1.18187029528908112e-19, + 1.25991709857777245e-21, + -1.36056298717460461e-23, + 1.48339723071525343e-25, + -1.62947378790316940e-27, + 1.80171627981527021e-29, + -2.00989538257936591e-31, + 2.29978461328101103e-33, + -2.90297929980644716e-35, + 1.68844423317959491e-12, + -9.81802986295267396e-15, + 8.56344160350422854e-17, + -8.29905416563933420e-19, + 8.44496138444215190e-21, + -8.83895573990525410e-23, + 9.42265223668905055e-25, + -1.01753734310910601e-26, + 1.10941385715561321e-28, + -1.21875671727391093e-30, + 1.34828651160429816e-32, + -1.50880353071129464e-34, + 1.75532015534322327e-36, + -2.37364933204082401e-38, +# root=9 base[28]=88.0 */ + 1.01939282779246923e-01, + -5.66408026674394805e-04, + 4.72067404805029116e-06, + -4.37154549848205881e-08, + 4.25064507586865129e-10, + -4.25117435150702375e-12, + 4.33043767239682007e-14, + -4.46846606748395687e-16, + 4.65522883921172656e-18, + -4.88572076151270243e-20, + 5.15778161484432574e-22, + -5.47100798422574170e-24, + 5.82606313735021500e-26, + -6.22296589413300512e-28, + 6.00482088015027934e-02, + -3.33647505900595191e-04, + 2.78075353477834485e-06, + -2.57509636836077388e-08, + 2.50387893752374268e-10, + -2.50419071193350453e-12, + 2.55088145161156856e-14, + -2.63218826923323232e-16, + 2.74220255474722249e-18, + -2.87797641229737915e-20, + 3.03824081157241788e-22, + -3.22278092822193535e-24, + 3.43212408867635905e-26, + -3.66702713853429458e-28, + 2.05149093899486129e-02, + -1.13987552474034096e-04, + 9.50018459173918153e-07, + -8.79757610121976480e-09, + 8.55426840401912918e-11, + -8.55533355254839634e-13, + 8.71484810643871697e-15, + -8.99262530521761434e-17, + 9.36847934787213363e-19, + -9.83234238961708927e-21, + 1.03799034482606380e-22, + -1.10105901936417001e-24, + 1.17271724581391838e-26, + -1.25375235551998772e-28, + 3.93002993137308351e-03, + -2.18365328606521402e-05, + 1.81994514766892824e-07, + -1.68534682479636571e-09, + 1.63873650280103019e-11, + -1.63894055284006970e-13, + 1.66949866989856477e-15, + -1.72271231201447139e-17, + 1.79471462250210233e-19, + -1.88357793830174844e-21, + 1.98848391018194279e-23, + -2.10937233748769500e-25, + 2.24707028892691896e-27, + -2.40470617868152847e-29, + 3.98172402654496140e-04, + -2.21237621763657851e-06, + 1.84388400292299614e-08, + -1.70751522572014876e-10, + 1.66029180957089188e-12, + -1.66049854378224048e-14, + 1.69145861275781284e-16, + -1.74537223111060202e-18, + 1.81832186557928364e-20, + -1.90835601991284385e-22, + 2.01465669954196812e-24, + -2.13723625160244359e-26, + 2.27737286010852628e-28, + -2.44064475770949064e-30, + 1.93573075878874430e-05, + -1.07555537901201884e-07, + 8.96411442958231149e-10, + -8.30115226844693314e-12, + 8.07157377798889437e-14, + -8.07257882568663650e-16, + 8.22309243132525975e-18, + -8.48519577168965777e-20, + 8.83984489364817954e-22, + -9.27756305120608671e-24, + 9.79445053488503549e-26, + -1.03910760276047424e-27, + 1.10767115610640413e-29, + -1.18952353269294386e-31, + 3.81754835001173038e-07, + -2.12115483718553773e-09, + 1.76785640743666734e-11, + -1.63711042983369511e-13, + 1.59183414422251636e-15, + -1.59203235488783055e-17, + 1.62171587616044782e-19, + -1.67340659273514387e-21, + 1.74334911910721533e-23, + -1.82967748613224661e-25, + 1.93164449195776622e-27, + -2.04950711699422233e-29, + 2.18596660756435534e-31, + -2.35447021627606322e-33, + 2.20688511431670443e-09, + -1.22621761564100608e-11, + 1.02197945700139190e-13, + -9.46396563146486484e-16, + 9.20222811955457154e-18, + -9.20337395782660393e-20, + 9.37497135420740117e-22, + -9.67379044274413648e-24, + 1.00781249132738895e-25, + -1.05772139318602606e-27, + 1.11669301076626350e-29, + -1.18500346324689382e-31, + 1.26498548571713530e-33, + -1.36866397860996638e-35, + 1.65048226680754399e-12, + -9.17061978774158663e-15, + 7.64316619782344555e-17, + -7.07789786931193884e-19, + 6.88214997168927762e-21, + -6.88300692346603638e-23, + 7.01134100185332228e-25, + -7.23482195490940527e-27, + 7.53722021491465863e-29, + -7.91052194701525316e-31, + 8.35189115847372318e-33, + -8.86506671698024293e-35, + 9.47766899980700332e-37, + -1.03360425425108656e-38, +# root=9 base[29]=92.0 */ + 9.97460142259339183e-02, + -5.30631473451560450e-04, + 4.23426098648164918e-06, + -3.75421124837852656e-08, + 3.49501206672081682e-10, + -3.34667010272977516e-12, + 3.26396836670825356e-14, + -3.22465147583221993e-16, + 3.21644059146199046e-18, + -3.23201514571501393e-20, + 3.26676858501792631e-22, + -3.31769238748317102e-24, + 3.38276975261323212e-26, + -3.46023283055505231e-28, + 5.87562451496462870e-02, + -3.12573020387732644e-04, + 2.49422774914863560e-06, + -2.21145033378123270e-08, + 2.05876683280888844e-10, + -1.97138472667019633e-12, + 1.92266855980724855e-14, + -1.89950860837239430e-16, + 1.89467191975562756e-18, + -1.90384627220821936e-20, + 1.92431829577911676e-22, + -1.95431686816767615e-24, + 1.99266053786380734e-26, + -2.03834454549007655e-28, + 2.00735220816184411e-02, + -1.06787651438429166e-04, + 8.52129602080639740e-07, + -7.55521340659183111e-09, + 7.03358449370694030e-11, + -6.73505169390873692e-13, + 6.56861746253460722e-15, + -6.48949365511807867e-17, + 6.47296958336258266e-19, + -6.50431309701308646e-21, + 6.57425535259963655e-23, + -6.67675307149458737e-25, + 6.80781638757632690e-27, + -6.96427187375362304e-29, + 3.84547360699001367e-03, + -2.04572517712257727e-05, + 1.63242000143893375e-07, + -1.44734808530840087e-09, + 1.34741992078504679e-11, + -1.29023015619489827e-13, + 1.25834644191040110e-15, + -1.24318873827796945e-17, + 1.24002323790702648e-19, + -1.24602775733353670e-21, + 1.25942701457226003e-23, + -1.27906562125597786e-25, + 1.30419343411799583e-27, + -1.33428178182795071e-29, + 3.89605548094312999e-04, + -2.07263385564369332e-06, + 1.65389222337831796e-08, + -1.46638594277396233e-10, + 1.36514336178673211e-12, + -1.30720134513849859e-14, + 1.27489824489250980e-16, + -1.25954116375041737e-18, + 1.25633403591403450e-20, + -1.26241762462474430e-22, + 1.27599380673089514e-24, + -1.29589542648812401e-26, + 1.32138348540151005e-28, + -1.35203981273554138e-30, + 1.89408265920258158e-05, + -1.00761908141528588e-07, + 8.04046193852598061e-10, + -7.12889279809309537e-12, + 6.63669801812267322e-14, + -6.35501063073949634e-16, + 6.19796784206358325e-18, + -6.12330879685091265e-20, + 6.10771728991471061e-22, + -6.13729350226326040e-24, + 6.20329930675414849e-26, + -6.30008421949679861e-28, + 6.42420087991881644e-30, + -6.57442975519644143e-32, + 3.73541211637778851e-07, + -1.98717437548196839e-09, + 1.58569842770690265e-11, + -1.40592346405659746e-13, + 1.30885534848259704e-15, + -1.25330241500962656e-17, + 1.22233124650021883e-19, + -1.20760737678423204e-21, + 1.20453252016165516e-23, + -1.21036555933322135e-25, + 1.22338420004818998e-27, + -1.24248078725264067e-29, + 1.26701665257412942e-31, + -1.29698239665759796e-33, + 2.15940300938089478e-09, + -1.14876490006715306e-11, + 9.16675817842888590e-14, + -8.12749775568844132e-16, + 7.56635704523394475e-18, + -7.24521129762194773e-20, + 7.06617018568835485e-22, + -6.98105303948406701e-24, + 6.96327778492363016e-26, + -6.99699946470116385e-28, + 7.07227032883546949e-30, + -7.18274566010655006e-32, + 7.32509405979711195e-34, + -7.50129032213031003e-36, + 1.61497141412253067e-12, + -8.59136746173042583e-15, + 6.85562275963529871e-17, + -6.07838207447260199e-19, + 5.65871691575700094e-21, + -5.41853886674522635e-23, + 5.28463784313648413e-25, + -5.22098056911673445e-27, + 5.20768705608345567e-29, + -5.23290868280567267e-31, + 5.28921688090018999e-33, + -5.37194223829695231e-35, + 5.47906176583334658e-37, + -5.61470089808976870e-39, +# root=9 base[30]=96.0 */ + 9.76885111398050204e-02, + -4.98469167482285826e-04, + 3.81522890766802043e-06, + -3.24458718012928505e-08, + 2.89725831442157475e-10, + -2.66102684468669765e-12, + 2.48931648797974772e-14, + -2.35892854514039547e-16, + 2.25686390497630573e-18, + -2.17520936247646789e-20, + 2.10884140938871464e-22, + -2.05428054308371553e-24, + 2.00907172266199321e-26, + -1.97123499998377508e-28, + 5.75442553106246119e-02, + -2.93627538217104700e-04, + 2.24739330930253565e-06, + -1.91125190559754305e-08, + 1.70665485839278169e-10, + -1.56750068511068509e-12, + 1.46635322682298757e-14, + -1.38954709083769253e-16, + 1.32942503933059980e-18, + -1.28132573195038184e-20, + 1.24223112921683909e-22, + -1.21009164801407640e-24, + 1.18346142257925697e-26, + -1.16117583613653883e-28, + 1.96594570790925745e-02, + -1.00315104499283959e-04, + 7.67800922360975203e-07, + -6.52961353007401608e-09, + 5.83062683777630793e-11, + -5.35521960863679275e-13, + 5.00965876957798196e-15, + -4.74725778357282394e-17, + 4.54185641393839865e-19, + -4.37752963351951033e-21, + 4.24396664191818474e-23, + -4.13416556750969064e-25, + 4.04318884622974017e-27, + -3.96706961901828993e-29, + 3.76615140173289318e-03, + -1.92173095068197189e-05, + 1.47087201257292597e-07, + -1.25087447990691979e-09, + 1.11696998293131466e-11, + -1.02589648099225028e-13, + 9.59697580731851147e-16, + -9.09429567902635343e-18, + 8.70080940559471966e-20, + -8.38600951987554477e-22, + 8.13014382880211999e-24, + -7.91979991427956319e-26, + 7.74552532031733431e-28, + -7.59975720934767243e-30, + 3.81568990204779110e-04, + -1.94700865705928438e-06, + 1.49021929468816196e-08, + -1.26732799948349833e-10, + 1.13166217449477409e-12, + -1.03939072690188596e-14, + 9.72321071890364614e-17, + -9.21391853088018332e-19, + 8.81525649538494053e-21, + -8.49631589123638307e-23, + 8.23708493472288403e-25, + -8.02397630382317184e-27, + 7.84742266969695462e-29, + -7.69981557981252045e-31, + 1.85501261768828800e-05, + -9.46545898201783509e-08, + 7.24475957358459986e-10, + -6.16116479625315043e-12, + 5.50162006488474643e-14, + -5.05303880191439422e-16, + 4.72697704245832203e-18, + -4.47938264721966999e-20, + 4.28557153738699799e-22, + -4.13051733706450780e-24, + 4.00449139169918759e-26, + -3.90088921569854474e-28, + 3.81506613184609400e-30, + -3.74336041065600251e-32, + 3.65836019588699132e-07, + -1.86672899393905194e-09, + 1.42877411183338780e-11, + -1.21507313944860057e-13, + 1.08500112971470695e-15, + -9.96534246987739612e-18, + 9.32230028747905880e-20, + -8.83400739391378631e-22, + 8.45178312895549025e-24, + -8.14599330582238852e-26, + 7.89745200277352316e-28, + -7.69313713368749299e-30, + 7.52390708201197779e-32, + -7.38264530574578558e-34, + 2.11486009315034266e-09, + -1.07913667397947493e-11, + 8.25959498094237827e-14, + -7.02421181973228533e-16, + 6.27227901953609369e-18, + -5.76086114424536766e-20, + 5.38912512681915802e-22, + -5.10684806922768718e-24, + 4.88588819236701417e-26, + -4.70911432898861172e-28, + 4.56543566729922278e-30, + -4.44732682029027777e-32, + 4.34951906824909971e-34, + -4.26798974654611360e-36, + 1.58165871792756701e-12, + -8.07063282229922528e-15, + 6.17717476937118549e-17, + -5.25325807472205443e-19, + 4.69090358490161676e-21, + -4.30842507317199456e-23, + 4.03041164123751243e-25, + -3.81930265652599676e-27, + 3.65405149047183258e-29, + -3.52184617066989301e-31, + 3.41439258706290832e-33, + -3.32606591330539985e-35, + 3.25294623263538687e-37, + -3.19214261786861597e-39, +# root=10 base[0]=0.0 */ + 2.94787305690703827e-01, + -5.25233239794754576e-03, + 1.05155942772750444e-04, + -2.19881062311142222e-06, + 4.61561607650595516e-08, + -9.57909712606783191e-10, + 1.95593419251106989e-11, + -3.92800785658025440e-13, + 7.76423087761664155e-15, + -1.51253761846845535e-16, + 2.90701617542313322e-18, + -5.51833133259039533e-20, + 1.03539341859294182e-21, + -1.92113454956562339e-23, + 2.74474082073013048e-01, + -1.14414702104499635e-02, + 4.76232161498638617e-04, + -1.76262812160611022e-05, + 5.97280122994071175e-07, + -1.89188285306281940e-08, + 5.67283667204721937e-10, + -1.62387664578221792e-11, + 4.46451820651013489e-13, + -1.18422826172611814e-14, + 3.04133706734887059e-16, + -7.58363150080410606e-18, + 1.84016904176771898e-19, + -4.35100573039903929e-21, + 2.39274390230779760e-01, + -2.09807929266950660e-02, + 1.39785428165851294e-03, + -7.64474491847967478e-05, + 3.65525071550768785e-06, + -1.57782957563922912e-07, + 6.27086289717726900e-09, + -2.32520050778684233e-10, + 8.12006127738113549e-12, + -2.68956115112003704e-13, + 8.49540458418724915e-15, + -2.56999851265812187e-16, + 7.47197832876289747e-18, + -2.09230397821794365e-19, + 1.97192271313549633e-01, + -2.99410804980929715e-02, + 2.91654114574838638e-03, + -2.20111311820960973e-04, + 1.39541488073498895e-05, + -7.75128003703128867e-07, + 3.87132712911681391e-08, + -1.76874371787762749e-09, + 7.48395901771478038e-11, + -2.95964665051903877e-12, + 1.10168997912643023e-13, + -3.88169242876474532e-15, + 1.30044768408114185e-16, + -4.15439010193536076e-18, + 1.55302521265543642e-01, + -3.53324800070512202e-02, + 4.70676357360555291e-03, + -4.64104863446781265e-04, + 3.72104521968219637e-05, + -2.54969608705282501e-06, + 1.53942527058948168e-07, + -8.35970404006921123e-09, + 4.14338047191223017e-10, + -1.89500422710869599e-11, + 8.06562563261187426e-13, + -3.21635047760206721e-14, + 1.20826251407857080e-15, + -4.29068112940170070e-17, + 1.17769618557127489e-01, + -3.60360523214897643e-02, + 6.17178683938950871e-03, + -7.57323316755047389e-04, + 7.36901603632672693e-05, + -6.00565113092041344e-06, + 4.24113496774217264e-07, + -2.65560475457585793e-08, + 1.49894604213055010e-09, + -7.72228635053307990e-11, + 3.66637081863253725e-12, + -1.61660561911461309e-13, + 6.66158921822035936e-15, + -2.57559357276681076e-16, + 8.58550863452313268e-02, + -3.24830596530552781e-02, + 6.75680330497724704e-03, + -9.85925607967322879e-04, + 1.12011785789687559e-04, + -1.04944210975450831e-05, + 8.40687313901195926e-07, + -5.90250693540212316e-08, + 3.69787888519324423e-09, + -2.09543203604240085e-10, + 1.08543225001997132e-11, + -5.18361300821793708e-13, + 2.29819762354117588e-14, + -9.50110432495054721e-16, + 5.89856147429765679e-02, + -2.58123531617336158e-02, + 6.19152433356844403e-03, + -1.02888234348888128e-03, + 1.31473984771675399e-04, + -1.36994512419361869e-05, + 1.20840335417646686e-06, + -9.25977269031315341e-08, + 6.28169709125628055e-09, + -3.82729369609557585e-10, + 2.11814939106316501e-11, + -1.07455903279457669e-12, + 5.03464563239918400e-14, + -2.18890156723436080e-15, + 3.58382276383145473e-02, + -1.71939779112217118e-02, + 4.53638112727000001e-03, + -8.23715552341416240e-04, + 1.14129100382109923e-04, + -1.27995209076764131e-05, + 1.20697429883438038e-06, + -9.82713769822508329e-08, + 7.04453886537431284e-09, + -4.51294925267316617e-10, + 2.61439810509878399e-11, + -1.38270720494108733e-12, + 6.72907825150527448e-14, + -3.02834374697527293e-15, + 1.50008143202449221e-02, + -7.55053565026467342e-03, + 2.09769217060997186e-03, + -3.99928007856536843e-04, + 5.79510908888721812e-05, + -6.77024835299514518e-06, + 6.62595818213401998e-07, + -5.58016194022342017e-08, + 4.12482415499416655e-09, + -2.71729070447298635e-10, + 1.61463401199957707e-11, + -8.73908700896743368e-13, + 4.34333800105311493e-14, + -1.99233579557847951e-15, +# root=10 base[1]=2.5 */ + 2.75309354196115963e-01, + -4.50538032191343581e-03, + 8.26424770723807719e-05, + -1.59136396879887243e-06, + 3.09276692589025234e-08, + -5.96723365087707698e-10, + 1.13569574898506182e-11, + -2.13025289544528227e-13, + 3.93794127908408123e-15, + -7.18417707502798647e-17, + 1.29410721085224009e-18, + -2.30520203007475805e-20, + 4.06057606176689003e-22, + -7.08411738401595668e-24, + 2.35185001357215678e-01, + -8.33982967799468990e-03, + 3.11603414345745138e-04, + -1.04869546615720093e-05, + 3.25154694325933782e-07, + -9.46955556909960650e-09, + 2.62121424469390014e-10, + -6.95022163133177878e-12, + 1.77518143420313191e-13, + -4.38590350699443038e-15, + 1.05163948844235989e-16, + -2.45356002731020282e-18, + 5.58169601906248130e-20, + -1.23974131859443034e-21, + 1.73049980429221928e-01, + -1.26690935951226710e-02, + 7.48753077776907641e-04, + -3.68120709384521671e-05, + 1.59808854511503899e-06, + -6.30990173660014511e-08, + 2.30736827787812855e-09, + -7.91025894680950385e-11, + 2.56474877891410239e-12, + -7.91623046029553085e-14, + 2.33777951985181483e-15, + -6.63187695129495837e-17, + 1.81309879775437960e-18, + -4.78672607203395015e-20, + 1.11499695098959073e-01, + -1.42962235902808297e-02, + 1.23020317905518065e-03, + -8.33695308584033319e-05, + 4.80107659744575299e-06, + -2.44348611717443343e-07, + 1.12582661010159708e-08, + -4.77228944967789866e-10, + 1.88263459945448749e-11, + -6.97120992725042573e-13, + 2.43905000463188948e-14, + -8.10540672005214242e-16, + 2.56926162624608978e-17, + -7.78900228731541188e-19, + 6.44529964714814635e-02, + -1.27137242427243780e-02, + 1.51054935268563886e-03, + -1.34904564701004688e-04, + 9.90566346357813811e-06, + -6.26930946031417729e-07, + 3.52051792831361721e-08, + -1.78844665367053262e-09, + 8.33383097154019059e-11, + -3.59918311699236600e-12, + 1.45219050728193809e-13, + -5.50881216808361397e-15, + 1.97488354363362582e-16, + -6.71252911336028353e-18, + 3.44407280523061979e-02, + -9.45411458115300897e-03, + 1.47395745607406471e-03, + -1.66573019149915587e-04, + 1.50641473473957747e-05, + -1.14948274225814858e-06, + 7.64690156405555997e-08, + -4.53401491613150596e-09, + 2.43429109941077414e-10, + -1.19759827942755285e-11, + 5.44878026992250235e-13, + -2.30953588800200718e-14, + 9.17451750623949167e-16, + -3.42857506556858505e-17, + 1.75354633026952207e-02, + -6.16711017174208318e-03, + 1.19874514097082201e-03, + -1.64645152587968919e-04, + 1.77203118700910616e-05, + -1.58138379232827406e-06, + 1.21229324728449781e-07, + -8.17806121081552564e-09, + 4.94003593065949301e-10, + -2.70741598354461599e-11, + 1.36011998141040847e-12, + -6.31483654217314506e-14, + 2.72788343426168875e-15, + -1.10105231545141287e-16, + 8.66836358706540855e-03, + -3.63810861343187228e-03, + 8.37325605274486006e-04, + -1.33998127157416595e-04, + 1.65507927319807218e-05, + -1.67254463618039748e-06, + 1.43501947502560188e-07, + -1.07235158370742170e-08, + 7.11033979703899762e-10, + -4.24280301551748461e-11, + 2.30377012456675412e-12, + -1.14848291995608168e-13, + 5.29533119324755318e-15, + -2.26857670278821534e-16, + 4.06196858043422326e-03, + -1.91268866740152907e-03, + 4.94855150400891060e-04, + -8.82325229774319546e-05, + 1.20233356149041674e-05, + -1.32819280130256661e-06, + 1.23538957830064715e-07, + -9.93360642492911443e-09, + 7.04016516696490154e-10, + -4.46339162495062660e-11, + 2.56111120458691851e-12, + -1.34269344435698061e-13, + 6.48178869887519025e-15, + -2.89546627199038528e-16, + 1.45356426356992377e-03, + -7.27523416727234636e-04, + 2.00865090013159655e-04, + -3.80663041784885201e-05, + 5.48506728634986053e-06, + -6.37466431432828993e-07, + 6.20862721677965634e-08, + -5.20519140876028929e-09, + 3.83154408267957794e-10, + -2.51423496944311350e-11, + 1.48852673390191525e-12, + -8.02901918866008990e-14, + 3.97764367308164471e-15, + -1.81910757159102480e-16, +# root=10 base[2]=5.0 */ + 2.58499959321647821e-01, + -3.91303357768707418e-03, + 6.61643151799319433e-05, + -1.17898678960039887e-06, + 2.13003409081114952e-08, + -3.83569329040845992e-10, + 6.82885937659330787e-12, + -1.20088996213262955e-13, + 2.08291077880535024e-15, + -3.57207140132986455e-17, + 6.04655223176875547e-19, + -1.01517817418278355e-20, + 1.68007176804139045e-22, + -2.77367155033608562e-24, + 2.06122657081819732e-01, + -6.27439445361266390e-03, + 2.11675543180808772e-04, + -6.51403935409163800e-06, + 1.85699068331474759e-07, + -4.99335263914102887e-09, + 1.28069270183126190e-10, + -3.15596097373831770e-12, + 7.51111267625065964e-14, + -1.73322953989023617e-15, + 3.88962659300479161e-17, + -8.50969232726407733e-19, + 1.81857905443028232e-20, + -3.80094118938427888e-22, + 1.32063907935007802e-01, + -8.09089226776521682e-03, + 4.26807102363876837e-04, + -1.89442394133648522e-05, + 7.49192665908943995e-07, + -2.71320233789297430e-08, + 9.14917353692662326e-10, + -2.90532294228761991e-11, + 8.75883471457841250e-13, + -2.52217668727527500e-14, + 6.96985430194436706e-16, + -1.85527594044713627e-17, + 4.77134910429689470e-19, + -1.18782661154506187e-20, + 6.91134626985920597e-02, + -7.44491552447895406e-03, + 5.66955092561256249e-04, + -3.45280782283388581e-05, + 1.80708455615473928e-06, + -8.42776602695195504e-08, + 3.58162989621094632e-09, + -1.40799740206228612e-10, + 5.17520275659489693e-12, + -1.79277630836824259e-13, + 5.88944562325584538e-15, + -1.84370930736013936e-16, + 5.52199610517347811e-18, + -1.58627614751740629e-19, + 3.03553155918875502e-02, + -5.13192949362410548e-03, + 5.41403433729584454e-04, + -4.36355268687917773e-05, + 2.92496815544961117e-06, + -1.70474601305555838e-07, + 8.87739666803961030e-09, + -4.20657926656978873e-10, + 1.83757912221288027e-11, + -7.47233650730767042e-13, + 2.84982722044473015e-14, + -1.02545626970380914e-15, + 3.49822445880057070e-17, + -1.13485744140381715e-18, + 1.16439344890289613e-02, + -2.82393785075662563e-03, + 3.97017427059832915e-04, + -4.10135370712869814e-05, + 3.42527522439314057e-06, + -2.43317741934305024e-07, + 1.51684490018481148e-08, + -8.47498379172305129e-10, + 4.30834008114261883e-11, + -2.01535847845291394e-12, + 8.75104017216410274e-14, + -3.55182252652168679e-15, + 1.35513484704065902e-16, + -4.87761012268155245e-18, + 4.11070612223873519e-03, + -1.32398655162833468e-03, + 2.37808508911330690e-04, + -3.04636481424251262e-05, + 3.08172603605828314e-06, + -2.60154661911814481e-07, + 1.89677188375464472e-08, + -1.22256865377523539e-09, + 7.08442482818686770e-11, + -3.73769164240631006e-12, + 1.81320627122140758e-13, + -8.15183835632514575e-15, + 3.41839118313352581e-16, + -1.34248170784829554e-17, + 1.41386639561831757e-03, + -5.62996106446662968e-04, + 1.23178982574654472e-04, + -1.88338146088985288e-05, + 2.23322892973368117e-06, + -2.17564475270743233e-07, + 1.80609858202869362e-08, + -1.30997949357192849e-09, + 8.45392745453890199e-11, + -4.92169350574092042e-12, + 2.61291604528628268e-13, + -1.27603737234650002e-14, + 5.77330139597460087e-16, + -2.43086114846368044e-17, + 4.87502675175349991e-04, + -2.24086125630249011e-04, + 5.65599968884055224e-05, + -9.85749438976275988e-06, + 1.31586308559174780e-06, + -1.42681984803435316e-07, + 1.30501215252190760e-08, + -1.03349723005690906e-09, + 7.22411637507001846e-11, + -4.52275811784102658e-12, + 2.56554172249665145e-13, + -1.33095315077423555e-14, + 6.36346000775296744e-16, + -2.81759151140725887e-17, + 1.43573748634347631e-04, + -7.13545625672867763e-05, + 1.95495529032011271e-05, + -3.67780238223855214e-06, + 5.26346623772467026e-07, + -6.07879184230203986e-08, + 5.88623649078786638e-09, + -4.90855549721821979e-10, + 3.59533489401536995e-11, + -2.34842139868694428e-12, + 1.38443280238425147e-13, + -7.43788303623921955e-15, + 3.67112024812553577e-16, + -1.67311221006453028e-17, +# root=10 base[3]=7.5 */ + 2.43824328271191992e-01, + -3.43504707453083907e-03, + 5.38341680234207180e-05, + -8.91669070626988615e-07, + 1.50299469808820223e-08, + -2.53535410544196914e-10, + 4.23502849492747233e-12, + -7.00931720545078062e-14, + 1.14301307943203854e-15, + -1.85269533756707917e-17, + 2.94228681082621590e-19, + -4.70424010362766793e-21, + 7.30485372625210921e-23, + -1.11564308187866452e-24, + 1.83979328562894923e-01, + -4.84979033921521460e-03, + 1.48507780636664448e-04, + -4.20059232647388399e-06, + 1.10603926150392485e-07, + -2.75697583190320317e-09, + 6.57534184606368640e-11, + -1.51078257873053309e-12, + 3.36037265060250653e-14, + -7.26188099935387874e-16, + 1.52905199869500804e-17, + -3.14400902104857313e-19, + 6.32498623015512543e-21, + -1.24626941101717555e-22, + 1.05331134994241293e-01, + -5.41664207908034920e-03, + 2.56717485941872572e-04, + -1.03339596840928691e-05, + 3.73639850066171896e-07, + -1.24485080344611167e-08, + 3.88091997873318094e-10, + -1.14399857756288063e-11, + 3.21269802021034718e-13, + -8.64401614278971616e-15, + 2.23807063086672718e-16, + -5.59559608720899536e-18, + 1.35477604318002085e-19, + -3.18215329149289236e-21, + 4.63374503104294830e-02, + -4.17836520057185412e-03, + 2.82612334648308858e-04, + -1.54954807620690607e-05, + 7.38062495703786418e-07, + -3.15730226745018795e-08, + 1.23840097241585415e-09, + -4.51629263658831732e-11, + 1.54671131108279094e-12, + -5.01157934783319745e-14, + 1.54516781602645774e-15, + -4.55397443702569732e-17, + 1.28772287195350729e-18, + -3.50188762151491281e-20, + 1.60305191290073396e-02, + -2.29946428667189172e-03, + 2.14928417350295815e-04, + -1.56004442469594126e-05, + 9.52847653437855228e-07, + -5.10434702826052770e-08, + 2.46010837322262916e-09, + -1.08514381195623185e-10, + 4.43439893868339371e-12, + -1.69413337773173383e-13, + 6.09363498947174271e-15, + -2.07510733569604703e-16, + 6.72048464526557452e-18, + -2.07591644794676097e-19, + 4.53491024146404978e-03, + -9.57174503834519659e-04, + 1.20377465288284236e-04, + -1.12955483541765017e-05, + 8.66449235162801702e-07, + -5.70176021605042139e-08, + 3.31574284675913205e-09, + -1.73824706255907183e-10, + 8.33270608997479566e-12, + -3.69172153440107560e-13, + 1.52411691943702603e-14, + -5.90199292303476836e-16, + 2.15516858359950503e-17, + -7.44615933971962977e-19, + 1.11565545738825868e-03, + -3.23683475991622159e-04, + 5.31090543694544978e-05, + -6.28692111089764616e-06, + 5.93087871781457700e-07, + -4.70347263626728820e-08, + 3.24125629863494860e-09, + -1.98485636981533955e-10, + 1.09762872307469442e-11, + -5.54808652762302875e-13, + 2.58745494886622095e-14, + -1.12176398604465081e-15, + 4.54869028779873163e-17, + -1.73182598818629326e-18, + 2.60220177094294171e-04, + -9.70006544991785136e-05, + 1.99559565612977358e-05, + -2.88873317073973528e-06, + 3.26275176699654566e-07, + -3.04353363268407872e-08, + 2.42994156780988108e-09, + -1.70152362399808348e-10, + 1.06362096752868816e-11, + -6.01525513617658632e-13, + 3.11016380857720919e-14, + -1.48259160092422431e-15, + 6.56082489997652719e-17, + -2.70693201971436433e-18, + 6.28076003780153797e-05, + -2.79784225575667693e-05, + 6.84335106930514939e-06, + -1.15906868229693687e-06, + 1.50805606591264077e-07, + -1.59807861600260939e-08, + 1.43180040250105553e-09, + -1.11302200358634917e-10, + 7.65035366926393433e-12, + -4.71718604935907312e-13, + 2.63900942021171548e-14, + -1.35187605263587450e-15, + 6.38925585394457858e-17, + -2.79930330932753022e-18, + 1.45229086813472919e-05, + -7.15300466229107623e-06, + 1.94091094176282740e-06, + -3.61827764217601381e-07, + 5.13507408273256314e-08, + -5.88521291059903688e-09, + 5.65893734409621643e-10, + -4.68874046837330766e-11, + 3.41407186242833667e-12, + -2.21789501765012759e-13, + 1.30091103228423231e-14, + -6.95658275728077163e-16, + 3.41868995122418707e-17, + -1.55179767685060578e-18, +# root=10 base[4]=10.0 */ + 2.30883024713537971e-01, + -3.04343823087631967e-03, + 4.44259094635350286e-05, + -6.86833202285986472e-07, + 1.08356862208774442e-08, + -1.71856962072811752e-10, + 2.69834256151931989e-12, + -4.22672834582184927e-14, + 6.46104486189142801e-16, + -1.00364618268523535e-17, + 1.48214631283302094e-19, + -2.21252237428400654e-21, + 3.74617740271187235e-23, + -3.35508171348597497e-25, + 1.66674617704616362e-01, + -3.83696928615626749e-03, + 1.07142151643855335e-04, + -2.79877235536798413e-06, + 6.83577221781490744e-08, + -1.58552462171531267e-09, + 3.52834551718652327e-11, + -7.58227324646046934e-13, + 1.58068099459195564e-14, + -3.20740074430376554e-16, + 6.35236340554848155e-18, + -1.23026511200437901e-19, + 2.33475130959810295e-21, + -4.34694679685759296e-23, + 8.71087667989129677e-02, + -3.77340301381966052e-03, + 1.61748448039920211e-04, + -5.93257762705921693e-06, + 1.96841514186451798e-07, + -6.05229740313827266e-09, + 1.74923486716990369e-10, + -4.79775184911846385e-12, + 1.25769951968917125e-13, + -3.16736447361163502e-15, + 7.69552027641580349e-17, + -1.80952182460013956e-18, + 4.12869767380783976e-20, + -9.15910738586427284e-22, + 3.31992998563186217e-02, + -2.49978495410819969e-03, + 1.50941433575063253e-04, + -7.47043459538044136e-06, + 3.24509835660005183e-07, + -1.27540117337108112e-08, + 4.62283766130553808e-10, + -1.56537611256115268e-11, + 4.99820018190384644e-13, + -1.51529101773280495e-14, + 4.38533508662257820e-16, + -1.21668184734283591e-17, + 3.24724151893758604e-19, + -8.35600715197211247e-21, + 9.37063625392685860e-03, + -1.13059325958031693e-03, + 9.36413010133708659e-05, + -6.11700431357613055e-06, + 3.40204866030554237e-07, + -1.67366408544340637e-08, + 7.45807866594123486e-10, + -3.05866912643458474e-11, + 1.16768976355650484e-12, + -4.18504464132830621e-14, + 1.41742732816123300e-15, + -4.56026052612492201e-17, + 1.39958152631565449e-18, + -4.10871916173310472e-20, + 2.01971285282911408e-03, + -3.65699367953183205e-04, + 4.08921297649158410e-05, + -3.46825723868409091e-06, + 2.43319170347086141e-07, + -1.47752819035833618e-08, + 7.98557317033121037e-10, + -3.91401422688558952e-11, + 1.76318170949294214e-12, + -7.37349049088283024e-14, + 2.88475568076307339e-15, + -1.06236279205557478e-16, + 3.70109835482864034e-18, + -1.22366216756620133e-19, + 3.52191495333991993e-04, + -9.04261652227151527e-05, + 1.34033010970817583e-05, + -1.45333957494769361e-06, + 1.26901584887660625e-07, + -9.39196565716719125e-09, + 6.08085813725180555e-10, + -3.51847129151786720e-11, + 1.84742174483703994e-12, + -8.90393215687078829e-14, + 3.97435119953147043e-15, + -1.65462774903352187e-16, + 6.46240572415889070e-18, + -2.37647023960105413e-19, + 5.49315767556941882e-05, + -1.88596991628832590e-05, + 3.60331311598822075e-06, + -4.88827119489081584e-07, + 5.21394355684733885e-08, + -4.62214285928118733e-09, + 3.52574258012085386e-10, + -2.36943991884299671e-11, + 1.42705329463032934e-12, + -7.80239037920293771e-14, + 3.91177107518476371e-15, + -1.81290858611548380e-16, + 7.81806749145631563e-18, + -3.15025280724843771e-19, + 8.83359436407634128e-06, + -3.77631583511423860e-06, + 8.87378377827939539e-07, + -1.44989757157717901e-07, + 1.82716055986208482e-08, + -1.88200101490557773e-09, + 1.64394893480239571e-10, + -1.24920540679700402e-11, + 8.41247143952552058e-13, + -5.09210502471627365e-14, + 2.80143677702521323e-15, + -1.41340035843576780e-16, + 6.58799267880696114e-18, + -2.85011555466910805e-19, + 1.51387804749168093e-06, + -7.36929099331186583e-07, + 1.97502364298358714e-07, + -3.63977466880070356e-08, + 5.11181330354223778e-09, + -5.80324974787606335e-10, + 5.53230611857499777e-11, + -4.54806665767938498e-12, + 3.28805778085435408e-13, + -2.12209863073645964e-14, + 1.23726061359517461e-15, + -6.57966164354492398e-17, + 3.21694592852282184e-18, + -1.45333120466531852e-19, +# root=10 base[5]=12.5 */ + 2.19371730068243787e-01, + -2.71829184517602363e-03, + 3.71211022614581845e-05, + -5.37804957106533815e-07, + 7.96108010566354850e-09, + -1.19259338893795538e-10, + 1.75719779266674515e-12, + -2.63894728591625314e-14, + 3.72514760949955022e-16, + -5.57085525649446692e-18, + 8.62548791059091170e-20, + -6.66845319777951655e-22, + 2.88956817662432124e-23, + -1.19423553266579663e-25, + 1.52851717580809177e-01, + -3.09772300920548114e-03, + 7.92043012430621886e-05, + -1.91903439255559262e-06, + 4.36513581640640547e-08, + -9.45474417387914882e-10, + 1.96954615282007368e-11, + -3.97014881891827161e-13, + 7.77929294587141333e-15, + -1.48570530501653136e-16, + 2.77459645516611430e-18, + -5.07527363136234846e-20, + 9.08708207685504701e-22, + -1.60619570987166491e-23, + 7.42173373630101302e-02, + -2.71855345819283596e-03, + 1.06090984964007405e-04, + -3.56204081698649162e-06, + 1.08865770831339852e-07, + -3.09881240642296265e-09, + 8.32691237345469481e-11, + -2.13011476503273780e-12, + 5.22438464050381724e-14, + -1.23381353140682494e-15, + 2.81733001426975123e-17, + -6.24311700795366360e-19, + 1.34304250441931282e-20, + -2.81836765966594607e-22, + 2.51506886513258553e-02, + -1.57866437881528602e-03, + 8.56432658642453527e-05, + -3.83805175866713190e-06, + 1.52446614171542824e-07, + -5.51616627097817346e-09, + 1.85082557954889950e-10, + -5.82697358617621195e-12, + 1.73650362638784417e-13, + -4.92968264007527664e-15, + 1.33987910287996467e-16, + -3.50089068867562405e-18, + 8.81983128622197280e-20, + -2.14759047590610191e-21, + 5.98523299383839791e-03, + -6.02853657134604201e-04, + 4.43558820184894865e-05, + -2.60891005747764450e-06, + 1.32174777590800785e-07, + -5.97201971391939513e-09, + 2.46007083089070720e-10, + -9.37651202085406046e-12, + 3.34204211332463583e-13, + -1.12276889789193830e-14, + 3.57714495515483503e-16, + -1.08608509206910521e-17, + 3.15481727325888703e-19, + -8.78992992702820443e-21, + 1.01814314929234845e-03, + -1.56022291781096508e-04, + 1.54555236566884226e-05, + -1.18085446201229487e-06, + 7.55483870913928931e-08, + -4.22149505816302694e-09, + 2.11468523617512637e-10, + -9.66413851017618430e-12, + 4.07993366883913140e-13, + -1.60610926085217981e-14, + 5.93838754485443415e-16, + -2.07408777896927721e-17, + 6.87501626202599361e-19, + -2.16921507262333657e-20, + 1.29314093563108679e-04, + -2.88468632032206990e-05, + 3.82438598272288115e-06, + -3.76866247518658606e-07, + 3.02558385052804096e-08, + -2.07732490325691068e-09, + 1.25678730577268001e-10, + -6.83637844070457797e-12, + 3.39203468545578085e-13, + -1.55186856513772704e-14, + 6.60154496490326936e-16, + -2.62861726419772875e-17, + 9.85045841139422054e-19, + -3.48594576957762271e-20, + 1.34943311793650274e-05, + -4.18624884374585834e-06, + 7.32816091707688114e-07, + -9.21647719907735334e-08, + 9.19912660361865297e-09, + -7.68886727201045729e-10, + 5.56428590142818392e-11, + -3.56634008388897694e-12, + 2.05773164866028442e-13, + -1.08204152759639455e-14, + 5.23534865812409252e-16, + -2.34866262654603620e-17, + 9.83081537554005706e-19, + -3.85442176628937760e-20, + 1.38375407078613110e-06, + -5.60274748891022907e-07, + 1.25098810955310439e-07, + -1.95383890543254185e-08, + 2.36643024196266416e-09, + -2.35349814981776924e-10, + 1.99280541487289324e-11, + -1.47281059226497371e-12, + 9.67435106093133348e-14, + -5.72613049641318567e-15, + 3.08710574839004175e-16, + -1.52921074614312937e-17, + 7.00992160153398827e-19, + -2.98703738012488651e-20, + 1.64028147794742687e-07, + -7.86035614093666056e-08, + 2.07291301339423704e-08, + -3.76414633234855649e-09, + 5.21675869829399177e-10, + -5.85229742692945094e-11, + 5.51968402552214894e-12, + -4.49410510013995500e-13, + 3.22077400191597707e-14, + -2.06222470909143946e-15, + 1.19366727832354843e-16, + -6.30583781169814920e-18, + 3.06432227494853700e-19, + -1.37664352667289906e-20, +# root=10 base[6]=15.0 */ + 2.09054462546346798e-01, + -2.44513979485160970e-03, + 3.13597848783324075e-05, + -4.27446924992390834e-07, + 5.94402806265092758e-09, + -8.47689309367125973e-11, + 1.15955941970990657e-12, + -1.70462024459198547e-14, + 2.30460718447942320e-16, + -2.33677723388598537e-18, + 8.31818822325691420e-20, + 3.63699673238449805e-22, + 7.47234358043487591e-24, + -8.71446464431412439e-25, + 1.41597304664497103e-01, + -2.54561624994125704e-03, + 5.98163661569719009e-05, + -1.34953572333409589e-06, + 2.86952362846798085e-08, + -5.82322203612922349e-10, + 1.13908325668893282e-11, + -2.15940068128674118e-13, + 3.98842955077290786e-15, + -7.18892176873744710e-17, + 1.26570557901143692e-18, + -2.20434372419323746e-20, + 3.71415695863483563e-22, + -6.17223038826942293e-24, + 6.48062390484696466e-02, + -2.01528527909354679e-03, + 7.20558842743932251e-05, + -2.22475401719758761e-06, + 6.28697559119776412e-08, + -1.66157167857786034e-09, + 4.16410672710964580e-11, + -9.95685797390185361e-13, + 2.28984101333421414e-14, + -5.08701042451997195e-16, + 1.09076864617490197e-17, + -2.28902396793679419e-19, + 4.64736615509246368e-21, + -9.18183380210282682e-23, + 1.99638031511666057e-02, + -1.04333166213254410e-03, + 5.12343145783769900e-05, + -2.08610879431220168e-06, + 7.59909610389170209e-08, + -2.53741422692954098e-09, + 7.89799341801327913e-11, + -2.31556273935431502e-12, + 6.44954568801815141e-14, + -1.71679806189194480e-15, + 4.38457132206362530e-17, + -1.08008887851164954e-18, + 2.56975840415408181e-20, + -5.91985401970847568e-22, + 4.12619612011383419e-03, + -3.44644994382690354e-04, + 2.26349992552386910e-05, + -1.20033506389370319e-06, + 5.54680538650151038e-08, + -2.30365648284659765e-09, + 8.77716356732460662e-11, + -3.10981143867766333e-12, + 1.03485005719354553e-13, + -3.25820968924510922e-15, + 9.76046335688114220e-17, + -2.79509831833163538e-18, + 7.67867648180240452e-20, + -2.02861746917751454e-21, + 5.73953242995295636e-04, + -7.35036895268350882e-05, + 6.44524351614249257e-06, + -4.42748074982650458e-07, + 2.57905678222239677e-08, + -1.32388981320462926e-09, + 6.13587712522489120e-11, + -2.60966694032004852e-12, + 1.03048208871950735e-13, + -3.81086785124352161e-15, + 1.32878682126764655e-16, + -4.39202670435567434e-18, + 1.38208112269457776e-19, + -4.15215898973658579e-21, + 5.49625126575140624e-05, + -1.04565409280585808e-05, + 1.23017207817418812e-06, + -1.09456939590145896e-07, + 8.03527844960573998e-09, + -5.09254133978549185e-10, + 2.86564709458928587e-11, + -1.45898590540436927e-12, + 6.81211047261932342e-14, + -2.94646916368773707e-15, + 1.18989779128468101e-16, + -4.51449923023069901e-18, + 1.61733724917350312e-19, + -5.48873804118030812e-21, + 3.89976885969476197e-06, + -1.06951195147267438e-06, + 1.69184423503777518e-07, + -1.95124634690068694e-08, + 1.80588465320756943e-09, + -1.41181733416781242e-10, + 9.62446388100916239e-12, + -5.84542742812653026e-13, + 3.21223060707247070e-14, + -1.61581219488005618e-15, + 7.50742912606088446e-17, + -3.24520807360313894e-18, + 1.31282017796299649e-19, + -4.98862464206755541e-21, + 2.47006389511055016e-07, + -9.30860764438401573e-08, + 1.94807894099758113e-08, + -2.87619695837702217e-09, + 3.31703988377551705e-10, + -3.16012367689807619e-11, + 2.57608088085569291e-12, + -1.84066886835870285e-13, + 1.17312419452650452e-14, + -6.75800027484249161e-16, + 3.55554988951403134e-17, + -1.72280864685771445e-18, + 7.74087399348016134e-20, + -3.23916455491281300e-21, + 1.86951803876023172e-08, + -8.76828659893515207e-09, + 2.26317646065594387e-09, + -4.03097648234789293e-10, + 5.49172857522034812e-11, + -6.06802399658749356e-12, + 5.64646817159658337e-13, + -4.54225565128244432e-14, + 3.22024800911483829e-15, + -2.04186344884731756e-16, + 1.17147978424065773e-17, + -6.13907049255474127e-19, + 2.96146567969412846e-20, + -1.32154510621793707e-21, +# root=10 base[7]=17.5 */ + 1.99745298050238246e-01, + -2.21328196510820006e-03, + 2.67495899375294412e-05, + -3.44541490225379895e-07, + 4.49234607184778311e-09, + -6.18876748351140570e-11, + 7.77622579355297922e-13, + -1.03456224278794620e-14, + 2.09577789034355365e-16, + 1.20982682085509010e-18, + 8.56342972046807733e-20, + -8.45914547083023364e-22, + -6.62906919275707282e-23, + -1.79440409947200583e-24, + 1.32279299064696987e-01, + -2.12485580696077309e-03, + 4.60354094143783376e-05, + -9.70553660129530721e-07, + 1.93583643325464162e-08, + -3.69159685091108814e-10, + 6.80230444794647642e-12, + -1.21571197865372271e-13, + 2.11854660117846580e-15, + -3.63647793044808301e-17, + 5.97539679214160750e-19, + -9.94168530567208480e-21, + 1.65523274375817529e-22, + -2.33350547046876889e-24, + 5.77501163985913377e-02, + -1.53074031181744757e-03, + 5.04508536612667633e-05, + -1.43856927364775268e-06, + 3.77396625902832292e-08, + -9.28270798277098990e-10, + 2.17702273789273202e-11, + -4.88108423685958294e-13, + 1.05041905793553167e-14, + -2.22012637393781039e-16, + 4.43566528710815010e-18, + -8.79710157871741855e-20, + 1.73890840063745888e-21, + -3.10173817084721109e-23, + 1.64765039277528953e-02, + -7.16203201198161322e-04, + 3.21035406060221883e-05, + -1.19172664729178099e-06, + 3.99467936875154646e-08, + -1.23367202785187304e-09, + 3.57119930084348888e-11, + -9.77094638233444127e-13, + 2.54496506617473028e-14, + -6.37351354997217338e-16, + 1.52868437507746206e-17, + -3.55217524732529479e-19, + 8.01568055046813027e-21, + -1.74041203218332912e-22, + 3.03601906321067849e-03, + -2.08975493866981270e-04, + 1.23389875757364573e-05, + -5.91013966284912856e-07, + 2.49629771957860401e-08, + -9.54220923915665194e-10, + 3.36673160069018853e-11, + -1.10978490936521121e-12, + 3.44894231359577313e-14, + -1.01829120275453742e-15, + 2.86776245589335520e-17, + -7.74459859992072216e-19, + 2.01225000324021481e-20, + -5.03682958382312924e-22, + 3.57195341964848187e-04, + -3.77719228362341481e-05, + 2.93889400056085586e-06, + -1.81375069068482515e-07, + 9.61665916298146885e-09, + -4.53177019006201887e-10, + 1.94168679728759956e-11, + -7.67776716246315945e-13, + 2.83216901474939527e-14, + -9.82641495500241012e-16, + 3.22635791666335612e-17, + -1.00758033513774555e-18, + 3.00500450387618105e-20, + -8.58055859426135609e-22, + 2.68043804661823828e-05, + -4.26929718241337080e-06, + 4.43522079754360887e-07, + -3.54580843738488961e-08, + 2.37053442989005257e-09, + -1.38150502466492825e-10, + 7.20411661060727774e-12, + -3.42078751068013993e-13, + 1.49773758846827970e-14, + -6.10371549373551171e-16, + 2.33214260055648708e-17, + -8.40300584306805736e-19, + 2.86863586166826089e-20, + -9.30613456691783133e-22, + 1.33316529472600369e-06, + -3.15523793451739986e-07, + 4.45236309448747057e-08, + -4.66085474937129678e-09, + 3.96559469973515890e-10, + -2.87795500304038329e-11, + 1.83557729125418081e-12, + -1.04985821094572120e-13, + 5.46316575483513276e-15, + -2.61477042831864219e-16, + 1.16081856156591557e-17, + -4.81242114852279585e-19, + 1.87335229381868778e-20, + -6.87100173839738206e-22, + 5.14805839357592835e-08, + -1.76521850647585516e-08, + 3.40644903092052792e-09, + -4.69308376460113683e-10, + 5.09861973119558055e-11, + -4.61074674323790074e-12, + 3.59002764776357793e-13, + -2.46287303010011305e-14, + 1.51373182489816724e-15, + -8.44108611100835674e-17, + 4.31298022062691836e-18, + -2.03531675673723225e-19, + 8.92877027029990178e-21, + -3.65611105605005504e-22, + 2.27947756974276441e-09, + -1.03716478555943619e-09, + 2.59990564593748164e-10, + -4.51313992151540103e-11, + 6.01230348556002411e-12, + -6.51428567460181132e-13, + 5.95816335137457652e-14, + -4.72049481712321068e-15, + 3.30153867340131761e-16, + -2.06817219301014063e-17, + 1.17370912592671448e-18, + -6.09050595967283009e-20, + 2.91193084996252449e-21, + -1.28895412271779964e-22, +# root=10 base[8]=20.0 */ + 1.91295587284857210e-01, + -2.01468923141083717e-03, + 2.30085613531262419e-05, + -2.81636092074817134e-07, + 3.42192222296223146e-09, + -4.58821810766460447e-11, + 5.92342413002201078e-13, + -2.42329176854312858e-15, + 2.94928519610771308e-16, + 2.63843616837275667e-18, + -5.19148150436362226e-20, + -5.95198120922371897e-21, + -1.31079222191024023e-22, + 4.36065169519397409e-26, + 1.24449440321880975e-01, + -1.79840236129939421e-03, + 3.60293946520781107e-05, + -7.12048733298979320e-07, + 1.33669978146407387e-08, + -2.40155179722629187e-10, + 4.17916707781233187e-12, + -7.08419162557104614e-14, + 1.15278651294355813e-15, + -1.92343802169365737e-17, + 3.00531905811187199e-19, + -4.18615234636103385e-21, + 8.50457461059766384e-23, + -1.07243926204691245e-24, + 5.23378764806917210e-02, + -1.18716674370879130e-03, + 3.62790923972119208e-05, + -9.58916935436453167e-07, + 2.34609608896233831e-08, + -5.38130704966565069e-10, + 1.18141663147021873e-11, + -2.51913690553116969e-13, + 4.96054375619737810e-15, + -1.02145909356960023e-16, + 1.95487225177944984e-18, + -3.26708820741006573e-20, + 7.28548356024893198e-22, + -1.17425977808330613e-23, + 1.40479756762849298e-02, + -5.07325145290143183e-04, + 2.09523874085481586e-05, + -7.11278674428960045e-07, + 2.20270649252945827e-08, + -6.30492151406780406e-10, + 1.69981863466856402e-11, + -4.36717323803103027e-13, + 1.05793861653380127e-14, + -2.51064514747061520e-16, + 5.68779907060256375e-18, + -1.22568803024473701e-19, + 2.68234380771636943e-21, + -5.47562943519205883e-23, + 2.36060201563962528e-03, + -1.33052160892937549e-04, + 7.13141295286050119e-06, + -3.09068257651823277e-07, + 1.19668191850860601e-08, + -4.21720215897761550e-10, + 1.37957240351962867e-11, + -4.24073849873969593e-13, + 1.22996356203968187e-14, + -3.41144855159334541e-16, + 9.04172313249170482e-18, + -2.29814173544748918e-19, + 5.66158985380012423e-21, + -1.34184669975800721e-22, + 2.42300518844380553e-04, + -2.09054040843771115e-05, + 1.45221192500375659e-06, + -8.05095286949828365e-08, + 3.88908496161705181e-09, + -1.68272910272063029e-10, + 6.66443974034331186e-12, + -2.44991304364403318e-13, + 8.43563444143455003e-15, + -2.74442377840022661e-16, + 8.47814831228910680e-18, + -2.49853250673030005e-19, + 7.05557596109735143e-21, + -1.91225962510764580e-22, + 1.48231702286889196e-05, + -1.94023206418198876e-06, + 1.77832352837523421e-07, + -1.27301989852675487e-08, + 7.73166846235939808e-10, + -4.13256529564486296e-11, + 1.99183791249377002e-12, + -8.79812107810025041e-14, + 3.60247317630330842e-15, + -1.37951488540712176e-16, + 4.97337126567541945e-18, + -1.69708798370721410e-19, + 5.50549043924723250e-21, + -1.70256899522037109e-22, + 5.38722568522776500e-07, + -1.07213100861131930e-07, + 1.33546134624037498e-08, + -1.25756713009508758e-09, + 9.76368243389432533e-11, + -6.53395054743582245e-12, + 3.87521899192174510e-13, + -2.07538812038208337e-14, + 1.01721032657999211e-15, + -4.60904057217296819e-17, + 1.94577635419497408e-18, + -7.70136498519055971e-20, + 2.87239474440178283e-21, + -1.01272766132123386e-22, + 1.28208751745620763e-08, + -3.88683065415872343e-09, + 6.79120179066875649e-10, + -8.60670032007367676e-11, + 8.70527340721799910e-12, + -7.39791407226220570e-13, + 5.45404464188116020e-14, + -3.56495269152709507e-15, + 2.09861490400950314e-16, + -1.12590947595975602e-17, + 5.55632772629974355e-19, + -2.54106113379130416e-20, + 1.08351623086970468e-21, + -4.32401439447762341e-23, + 3.04485127315990062e-10, + -1.32570318858864089e-10, + 3.19135827054890217e-11, + -5.35067900750162808e-12, + 6.91915143370547926e-13, + -7.30708551190985485e-14, + 6.53607352361022734e-15, + -5.07838619209761484e-16, + 3.49135021647909574e-17, + -2.15400911246069252e-18, + 1.20592817488481608e-19, + -6.18196131319090856e-21, + 2.92342623036841686e-22, + -1.28130895221164223e-23, +# root=10 base[9]=22.5 */ + 1.83584791346363185e-01, + -1.84327326619601866e-03, + 1.99296377049372082e-05, + -2.33457084278243664e-07, + 2.64672998451289345e-09, + -3.13549480087520106e-11, + 6.64552443397265557e-13, + 7.51660898712828663e-15, + 2.73881677386316682e-16, + -6.30945958851871845e-18, + -4.24457586424466788e-19, + -9.59366845609601636e-21, + 5.10558466538866637e-23, + 8.43808200558086140e-24, + 1.17782877992990365e-01, + -1.54104241967806602e-03, + 2.86255134636857282e-05, + -5.31758824512708898e-07, + 9.42532999347519040e-09, + -1.60054148771422354e-10, + 2.62271932793463120e-12, + -4.30079112895468784e-14, + 6.41860903184599798e-16, + -9.88860912798698279e-18, + 1.86950037507017998e-19, + -1.42457413720581464e-21, + 2.77403252183680700e-23, + -1.32418450028346495e-24, + 4.81048408557168752e-02, + -9.37309237212916187e-04, + 2.67132170775089121e-05, + -6.56351006232626926e-07, + 1.50424612517358705e-08, + -3.24214047872987937e-10, + 6.52408036710668193e-12, + -1.39197376862316978e-13, + 2.42368162916087216e-15, + -4.43351468874083336e-17, + 1.09986717963546002e-18, + -1.00260829616645911e-20, + 2.36455722036438781e-22, + -9.17551888148889484e-24, + 1.23072101790462178e-02, + -3.68688575380284587e-04, + 1.41774082110652192e-05, + -4.41121404492907351e-07, + 1.26735635705207733e-08, + -3.38023798640536582e-10, + 8.41245614271754640e-12, + -2.07517236591134448e-13, + 4.61885049454096619e-15, + -1.01793522456042432e-16, + 2.34397456204716130e-18, + -4.32047704839366958e-20, + 9.12748853790282935e-22, + -2.05745321009468032e-23, + 1.92288306514722140e-03, + -8.81225290902376942e-05, + 4.34196737426504732e-06, + -1.70445973642308152e-07, + 6.07102405701979014e-09, + -1.97902519106226453e-10, + 5.98851790310690493e-12, + -1.73025972665608812e-13, + 4.67032022452944101e-15, + -1.21336209618018224e-16, + 3.06752036281338546e-18, + -7.24681249856297305e-20, + 1.69538621053784490e-21, + -3.86934696568713687e-23, + 1.77011010547046963e-04, + -1.23033449317676990e-05, + 7.71272945469769382e-07, + -3.83984643018724043e-08, + 1.69343744514535072e-09, + -6.73693112570276786e-11, + 2.46477377351312989e-12, + -8.44025507656042953e-14, + 2.71049337017928341e-15, + -8.26313465501783652e-17, + 2.40512153292405581e-18, + -6.67411049790286062e-20, + 1.78400398363646822e-21, + -4.59125289533741109e-23, + 9.17126466682775121e-06, + -9.67637637319043753e-07, + 7.86025702333392014e-08, + -5.02517244667670499e-09, + 2.77046159288293797e-10, + -1.35640672333063789e-11, + 6.03164324968147285e-13, + -2.47492707524333131e-14, + 9.45829147498622830e-16, + -3.39652126264034470e-17, + 1.15318414775296140e-18, + -3.71814710612470069e-20, + 1.14374014403788697e-21, + -3.36419349858285518e-23, + 2.55562351288203223e-07, + -4.15978926845309187e-08, + 4.54665308005353418e-09, + -3.82300394316602729e-10, + 2.69301895335387008e-11, + -1.65291752986981217e-12, + 9.06938727627153915e-14, + -4.52620276838496306e-15, + 2.07974439338980581e-16, + -8.88106115420943737e-18, + 3.54988365606703320e-19, + -1.33578570890480470e-20, + 4.75416722354082486e-22, + -1.60499384067587046e-23, + 3.88601902869684209e-09, + -1.00571693746208036e-09, + 1.56195320596449438e-10, + -1.79437850609903100e-11, + 1.66952512598748065e-12, + -1.31957838740006987e-13, + 9.12804356622002315e-15, + -5.63878341016639272e-16, + 3.15625828326110831e-17, + -1.61846622670570034e-18, + 7.66823802828230010e-20, + -3.38010533691837620e-21, + 1.39396995711938317e-22, + -5.39710527643442640e-24, + 4.60649355187700493e-11, + -1.87789959730188943e-11, + 4.27123657152602957e-12, + -6.82998353442777382e-13, + 8.48756945992648818e-14, + -8.66547149515662646e-15, + 7.52939335368776287e-16, + -5.70491008724600570e-17, + 3.83690505944342699e-18, + -2.32193726097957173e-19, + 1.27792582409016230e-20, + -6.45222691527451875e-22, + 3.01004157944382205e-23, + -1.30330117739184508e-24, +# root=10 base[10]=25.0 */ + 1.76513790851380914e-01, + -1.69436380914027448e-03, + 1.73645815163243704e-05, + -1.95174232537352930e-07, + 2.19991170891774798e-09, + -1.22353140462901246e-11, + 9.35974157237184601e-13, + 8.66736594525931535e-15, + -3.39177012473539600e-16, + -2.89025860757492064e-17, + -5.70837620773224917e-19, + 9.42468243326823489e-21, + 8.58160644234290174e-22, + 2.08386370824353989e-23, + 1.12039627134845776e-01, + -1.33522198469371431e-03, + 2.30536554629734158e-05, + -4.03513588847910192e-07, + 6.76693596107032580e-09, + -1.09518667987302526e-10, + 1.66218264717144399e-12, + -2.68310297417102521e-14, + 4.06946944209656868e-16, + -3.54722982429857432e-18, + 1.25699637581384505e-19, + -2.05224544187232716e-21, + -5.79193383610803550e-23, + -1.68055926229973693e-24, + 4.47383215824596822e-02, + -7.51460328322850913e-04, + 2.00913810022039324e-05, + -4.60222014252224575e-07, + 9.84834019490309586e-09, + -2.06832333700531500e-10, + 3.52862637174556532e-12, + -7.94228064724091421e-14, + 1.53012182980237769e-15, + -7.68659802950098640e-18, + 7.19312877604139983e-19, + -1.20498079507754879e-20, + -3.61750487174736143e-22, + -1.32542935235038018e-23, + 1.10300375462489466e-02, + -2.73447174378795596e-04, + 9.90829432726632911e-06, + -2.83171091853402583e-07, + 7.53547172863964553e-09, + -1.91967889222742006e-10, + 4.23096716030927281e-12, + -1.03339702708380263e-13, + 2.27606662209413751e-15, + -3.65193554290253733e-17, + 1.08226660766984327e-18, + -2.06003739309600709e-20, + 9.23192832873604655e-23, + -1.26859143096105429e-23, + 1.62890043210413477e-03, + -6.01740564193267675e-05, + 2.77024642569117160e-06, + -9.85527858421505799e-08, + 3.23059967191323605e-09, + -9.87480874803299481e-11, + 2.71809206331771747e-12, + -7.48366587468962395e-14, + 1.91663289051786551e-15, + -4.42243566157051354e-17, + 1.12489285299023040e-18, + -2.52217128041978632e-20, + 4.88057261374037066e-22, + -1.30477962056865874e-23, + 1.37757155844859657e-04, + -7.60057054041799380e-06, + 4.37172318975408395e-07, + -1.95253192215190245e-08, + 7.87190605902880826e-10, + -2.89763591693062144e-11, + 9.73864985396181933e-13, + -3.12180736705005857e-14, + 9.38811683304360304e-16, + -2.65512595299738351e-17, + 7.35340629188778851e-19, + -1.92269700867730355e-20, + 4.79154560700392941e-22, + -1.19706459063335631e-23, + 6.26090416459774683e-06, + -5.21138191279868602e-07, + 3.79704822468090590e-08, + -2.16211126118896121e-09, + 1.08221702233195995e-10, + -4.85976683446730606e-12, + 1.98883412000446961e-13, + -7.58267997260573812e-15, + 2.70307336959123520e-16, + -9.07841487426246015e-18, + 2.90269179380913302e-19, + -8.82755156339540581e-21, + 2.56773936273940254e-22, + -7.18452257871812057e-24, + 1.40651028600799704e-07, + -1.81638434420675169e-08, + 1.74467820700701146e-09, + -1.30184952656722184e-10, + 8.28877950037912444e-12, + -4.64961293725300712e-13, + 2.35036807548471898e-14, + -1.08912381100774510e-15, + 4.67399489213559707e-17, + -1.87378485080320770e-18, + 7.06601963341259016e-20, + -2.51843868798596173e-21, + 8.52204015818387906e-23, + -2.74528358027440917e-24, + 1.44783463330995423e-09, + -3.06786607678970882e-10, + 4.17120852274775561e-11, + -4.28353776983237620e-12, + 3.62535126160549143e-13, + -2.63899255195320565e-14, + 1.69772202977314839e-15, + -9.83270444022615188e-17, + 5.19497797978816223e-18, + -2.52899622899026625e-19, + 1.14328187543579468e-20, + -4.82953733974068496e-22, + 1.91616451812551636e-23, + -7.16267374507052805e-25, + 8.25521458537435398e-12, + -3.04336702527412201e-12, + 6.39307254768753541e-13, + -9.58428212859492815e-14, + 1.12931879677787684e-14, + -1.10267065382201502e-15, + 9.22464788812467830e-17, + -6.76556693857995202e-18, + 4.42378536134551215e-19, + -2.61203680725178561e-20, + 1.40685043547230456e-21, + -6.96877394653013677e-23, + 3.19630773994145170e-24, + -1.36319128776852323e-25, +# root=10 base[11]=27.5 */ + 1.70000166250887180e-01, + -1.56422753909822077e-03, + 1.52297033252635731e-05, + -1.60665936025680104e-07, + 2.18861424583349339e-09, + 1.08305051766151296e-11, + 8.47765790846118368e-13, + -2.15599252867240414e-14, + -1.55514608962063161e-15, + -2.80699812718940606e-17, + 1.03972520774111684e-18, + 6.56810084170065873e-20, + 9.68320124881701663e-22, + -4.11349304625391148e-23, + 1.07039325994192511e-01, + -1.16847433797410668e-03, + 1.87952201016670037e-05, + -3.10828283325100778e-07, + 4.92184717502913480e-09, + -7.72587259807363606e-11, + 1.07963778353372043e-12, + -1.51173332740540083e-14, + 3.38804192751350251e-16, + -1.35723073547281867e-18, + -4.31989959396170003e-20, + -5.51919077341976277e-21, + -3.55656456659480995e-23, + 4.24689962592365801e-24, + 4.20223663171262474e-02, + -6.10429034702867539e-04, + 1.53907230720748173e-05, + -3.31798551441875573e-07, + 6.40656303168451352e-09, + -1.43388282209096459e-10, + 1.98036462768452834e-12, + -3.07673913286420980e-14, + 1.58107051359192113e-15, + 3.31194653488977989e-18, + -3.77944557306178594e-19, + -3.93098154263899971e-20, + -4.78480365123783216e-22, + 2.20979830038484113e-23, + 1.00758093317697816e-02, + -2.05983659181830156e-04, + 7.12245899963142920e-06, + -1.88649917766061576e-07, + 4.51549901354259816e-09, + -1.17876372117198578e-10, + 2.20879575821243492e-12, + -4.49670525976803360e-14, + 1.51881683111284852e-15, + -1.20445774384379922e-17, + 8.89831852652462420e-20, + -2.69648867285790685e-20, + -1.76143848551708785e-22, + 9.09134506715233855e-24, + 1.42610602704629479e-03, + -4.19940528934711766e-05, + 1.84237586425480513e-06, + -5.97224236182144573e-08, + 1.76880231923827742e-09, + -5.29364515923581699e-11, + 1.29297196992392622e-12, + -3.21368567198285966e-14, + 9.14783721114606981e-16, + -1.65049527470792833e-17, + 3.44687586842650013e-19, + -1.32908480319710242e-20, + 1.06048350112353443e-22, + -1.43847347047818044e-24, + 1.13118768523450523e-04, + -4.86334636878941369e-06, + 2.62741775805825392e-07, + -1.05422876166119060e-08, + 3.85010953184596234e-10, + -1.34129982927787174e-11, + 4.09199392263769663e-13, + -1.21182273068255671e-14, + 3.56860073008988716e-16, + -9.03229334126536414e-18, + 2.31787228162357033e-19, + -6.36148212206445720e-21, + 1.31348530090727506e-22, + -3.06865450129442107e-24, + 4.65313398705542657e-06, + -2.97719624644512036e-07, + 1.98850656334438189e-08, + -1.00659192611555886e-09, + 4.55719415863395907e-11, + -1.89425171928242837e-12, + 7.09822219211519720e-14, + -2.50810806647748559e-15, + 8.41443760726988509e-17, + -2.62055908592301380e-18, + 7.87130681654697706e-20, + -2.28587432766427512e-21, + 6.18070354514230095e-23, + -1.64676907771697135e-24, + 8.84676440528897968e-08, + -8.74977760182759850e-09, + 7.48153457357052119e-10, + -4.92791410981462642e-11, + 2.82622194514676208e-12, + -1.44919134480234658e-13, + 6.72215630215377588e-15, + -2.88425530061885104e-16, + 1.15428777728714212e-17, + -4.32686951989880923e-19, + 1.53513106233570958e-20, + -5.17167604891238251e-22, + 1.65652637962883578e-23, + -5.08005659924935743e-25, + 6.62596845996375624e-10, + -1.09392268314059450e-10, + 1.29376099648440237e-11, + -1.17293835228082847e-12, + 8.94456865317441450e-14, + -5.94767039219923435e-15, + 3.52980594208077092e-16, + -1.90277681473524964e-17, + 9.42459943860722607e-19, + -4.32732267872518931e-20, + 1.85529929025749389e-21, + -7.46805549327603667e-23, + 2.83520425480943406e-24, + -1.01810929677223850e-25, + 1.85244400440731405e-12, + -5.84603695370128918e-13, + 1.10177093791330460e-13, + -1.51480561138267376e-14, + 1.66388916537456384e-15, + -1.53258514076995537e-16, + 1.22057421102845102e-17, + -8.58414027070809182e-19, + 5.41371859242697454e-20, + -3.09787424876599393e-21, + 1.62343787933437166e-22, + -7.85031229121160501e-24, + 3.52482865752203860e-25, + -1.47523065819943672e-26, +# root=10 base[12]=30.0 */ + 1.63975590149887135e-01, + -1.44948438929399940e-03, + 1.35217255997002073e-05, + -1.23124129728884427e-07, + 2.52828831248747715e-09, + 1.78111089201840000e-11, + -5.12546602045371407e-13, + -7.34798755432855110e-14, + -1.08793033061919472e-15, + 7.16171511133359750e-17, + 3.49674001685554529e-18, + -5.76786193284200644e-22, + -4.67308338001154097e-21, + -1.33041207047198688e-22, + 1.02644275131386617e-01, + -1.03180250651499256e-03, + 1.54910058134292206e-05, + -2.43154941519039536e-07, + 3.60755827448390192e-09, + -5.52705055336967318e-11, + 7.95698785796164488e-13, + -5.85196244154539359e-15, + 2.03928462348815767e-16, + -7.28053575923656565e-18, + -2.01349557895340475e-19, + 1.72709359240259819e-21, + 3.66711472588799350e-22, + 6.42322105165857147e-24, + 3.98038776860016180e-02, + -5.01689204584171910e-04, + 1.19373462862846315e-05, + -2.49843627156234692e-07, + 3.97365677396446491e-09, + -1.00562048219026368e-10, + 1.80382400307680529e-12, + 1.52924927296325814e-14, + 9.99729253788886023e-16, + -4.58805407617320965e-17, + -1.82038619082302462e-18, + -8.26908426875906417e-22, + 2.59862396383137214e-21, + 7.23596430831287610e-23, + 9.35301580960421798e-03, + -1.56993169070042193e-04, + 5.22273602440413997e-06, + -1.32716516121567599e-07, + 2.61268135857625877e-09, + -7.49168174703051462e-11, + 1.55619423337112644e-12, + -4.96136773334067843e-15, + 8.64462554892778305e-16, + -3.11843248334328086e-17, + -8.92675968752282427e-19, + -4.30165740082319123e-21, + 1.44324094850310745e-21, + 4.12236644814039931e-23, + 1.28365426883487858e-03, + -2.97114168037889052e-05, + 1.26532871279501046e-06, + -3.84581244833459502e-08, + 9.62525985520936002e-10, + -2.98757670352873992e-11, + 7.26441241629895189e-13, + -1.07584062264879813e-14, + 4.42897828905758076e-16, + -1.26388035812172977e-17, + -8.82235336371579776e-20, + -4.11914106590779319e-21, + 3.77768814039442740e-22, + 9.16994754516404061e-24, + 9.71927692738988819e-05, + -3.18013018640189286e-06, + 1.65804611637159954e-07, + -6.09006080017085892e-09, + 1.93063286679999488e-10, + -6.62178625239000111e-12, + 1.90932372303941622e-13, + -4.56633097175577877e-15, + 1.44914383583008669e-16, + -3.90128944147823811e-18, + 5.47417045244885316e-20, + -2.10508753479320632e-21, + 7.54759771536261670e-23, + 2.77872422247469129e-25, + 3.71825465254881496e-06, + -1.76937473657768292e-07, + 1.11763594682704493e-08, + -5.07299560492840310e-10, + 2.03026585065751038e-11, + -7.98641002538269332e-13, + 2.76744652558033179e-14, + -8.71924705706107737e-16, + 2.84072684347176268e-17, + -8.42816357673380551e-19, + 2.17772869744495908e-20, + -6.41687687077981982e-22, + 1.76526028339342864e-23, + -3.41618571929279035e-25, + 6.25467473528199469e-08, + -4.53565902281112886e-09, + 3.54841776328441087e-10, + -2.06258505738401447e-11, + 1.05415257564383851e-12, + -4.98050584206375837e-14, + 2.11819160897760187e-15, + -8.33516866438185609e-17, + 3.12860994272396491e-18, + -1.09598168455236944e-19, + 3.61187889317101385e-21, + -1.15936143614273547e-22, + 3.51984876139757163e-24, + -1.00324452983249205e-25, + 3.68220663696370294e-10, + -4.46150343874798004e-11, + 4.63527305592279781e-12, + -3.67406849858998114e-13, + 2.50136225939956198e-14, + -1.51283869914511103e-15, + 8.22667996680449773e-17, + -4.09919548309361495e-18, + 1.89396870535086964e-19, + -8.15278471530500369e-21, + 3.29483255584286671e-22, + -1.25804981036254621e-23, + 4.54544659078826142e-25, + -1.55920259872403361e-26, + 5.51089103291968825e-13, + -1.37058490950139749e-13, + 2.24988435443235024e-14, + -2.76435888335738651e-15, + 2.77498868843797218e-16, + -2.37289787755929849e-17, + 1.77492631871239331e-18, + -1.18344472396974535e-19, + 7.12942666524213692e-21, + -3.92090592965879695e-22, + 1.98494764972570768e-23, + -9.31226197662826367e-25, + 4.07119146471819947e-26, + -1.66426807682027796e-27, +# root=10 base[13]=32.5 */ + 1.58385639433818032e-01, + -1.34651374443151071e-03, + 1.22945450171997836e-05, + -8.12209832731481815e-08, + 2.58789184384070316e-09, + -1.98514673673529666e-11, + -2.50031127892192643e-12, + -4.47707188286947063e-14, + 3.28163465987422164e-15, + 1.31060506590119584e-16, + -2.46434769655430683e-18, + -2.45503692166613664e-19, + -1.11824831397226922e-21, + 3.45534386375563444e-22, + 9.87477241673390127e-02, + -9.18642146332868895e-04, + 1.28862265810412066e-05, + -1.93285720229855113e-07, + 2.68245416271054338e-09, + -3.76905602938859315e-11, + 6.75204714073626181e-13, + -4.59576226598596090e-15, + -1.35035633124006966e-16, + -8.46729071434434903e-18, + 2.48645267275524223e-19, + 1.49093612994503638e-20, + -1.14821168990980276e-22, + -2.49087541302699160e-23, + 3.79704750005355265e-02, + -4.17238761467173718e-04, + 9.26244447654542867e-06, + -1.99816422506434927e-07, + 2.44052326589366829e-09, + -5.05005682774604352e-11, + 2.34355285900694964e-12, + 9.31929937603459493e-15, + -1.57300866320170296e-15, + -7.52545707914456258e-17, + 1.41885406447480543e-18, + 1.33934212362908832e-19, + 5.91673832055372256e-22, + -1.90368749509580900e-22, + 8.79939012220767522e-03, + -1.20971773249734551e-04, + 3.83805612783175960e-06, + -1.00877626373882307e-07, + 1.48748127624781882e-09, + -3.73759506961080858e-11, + 1.59155727715714181e-12, + -1.06926436696561788e-15, + -7.22136507640471647e-16, + -4.56904745487058313e-17, + 7.86672892429431681e-19, + 7.42517897454474600e-20, + 4.92011123475873704e-22, + -1.04391809019853329e-22, + 1.18244803155304794e-03, + -2.12126377531604620e-05, + 8.79361423374009444e-07, + -2.69698075031512628e-08, + 5.21351842094318835e-10, + -1.49012824240107254e-11, + 5.50128100767230832e-13, + -4.52734149406789817e-15, + -6.15667944012906809e-17, + -1.33550140243552649e-17, + 2.14504336797399827e-19, + 1.66601953473028923e-20, + 1.82558587026779681e-22, + -2.42537652729323349e-23, + 8.67249576660670038e-05, + -2.10213346621560569e-06, + 1.07594611716480087e-07, + -3.84714327719478419e-09, + 9.82964500731304742e-11, + -3.16762725714251105e-12, + 1.09168773413595876e-13, + -1.86911665945082393e-15, + 3.15595741707556328e-17, + -2.46784979685359156e-18, + 4.29848057788916488e-20, + 1.33617251815069015e-21, + 3.97686525615759067e-23, + -2.79515214325307965e-24, + 3.15722023426687208e-06, + -1.07368927315731769e-07, + 6.60870012125577417e-09, + -2.80913959209434719e-10, + 9.42429408062277592e-12, + -3.47847870798359113e-13, + 1.23686475373023126e-14, + -3.22627585460134549e-16, + 8.84452175153555086e-18, + -3.35263582679871840e-19, + 7.62291947476340468e-21, + -8.52587115382056595e-23, + 6.45781426623419917e-24, + -2.20249559185940495e-25, + 4.88376256270662596e-08, + -2.46124425047827850e-09, + 1.82842655492861247e-10, + -9.59461818085956845e-12, + 4.23342591464947661e-13, + -1.85116669373234181e-14, + 7.45762516071229775e-16, + -2.60945859482550299e-17, + 9.00171256051899362e-19, + -3.13373512889462906e-20, + 9.34395058608288066e-22, + -2.60559015528272924e-23, + 8.58925999840071266e-25, + -2.37573318616037147e-26, + 2.43265243793733827e-10, + -2.01207446187586929e-11, + 1.89364330320421727e-12, + -1.31423880508498546e-13, + 7.85424124468858471e-15, + -4.32271735907059735e-16, + 2.15619650250922170e-17, + -9.81651440654455872e-19, + 4.21237684801739926e-20, + -1.70383528603422292e-21, + 6.42269152563058274e-23, + -2.30606298011824400e-24, + 7.98641590231964469e-26, + -2.59402080400554983e-27, + 2.25587804397436775e-13, + -3.94681580730641250e-14, + 5.56110146765799830e-15, + -5.94934189054857487e-16, + 5.34029353847644762e-17, + -4.17179175373516337e-18, + 2.88828442081954354e-19, + -1.80188245366480914e-20, + 1.02569364405116278e-21, + -5.36985560055333879e-23, + 2.60328032606750115e-24, + -1.17619456760884667e-25, + 4.97533220760832539e-27, + -1.97478149401657274e-28, +# root=10 base[14]=35.0 */ + 1.53191050308241178e-01, + -1.25140452840001083e-03, + 1.15441176291896698e-05, + -4.64189498982156747e-08, + 1.56497384230155847e-09, + -7.98545997747006682e-11, + -1.82455529048178553e-12, + 9.75573362354362468e-14, + 4.00520923318916860e-15, + -1.27992831408533967e-16, + -7.50287792250816750e-18, + 1.44570451395248230e-19, + 1.32248089432018978e-20, + -1.19644141727903338e-22, + 9.52656069100314834e-02, + -8.24152252772980911e-04, + 1.08021430562909946e-05, + -1.55571721954578847e-07, + 2.07688990977353042e-09, + -2.37038795000142849e-11, + 4.60042577693293005e-13, + -1.08724984009888846e-14, + -1.49987850222678882e-16, + 8.70914974167258333e-18, + 3.87944893950598270e-19, + -1.36179690067178249e-20, + -6.66550870338668850e-22, + 1.87102785429865644e-23, + 3.64353939193705137e-02, + -3.52123546558429134e-04, + 7.07544446180896504e-06, + -1.65831784459457653e-07, + 1.97639261989438653e-09, + 1.34783639099646052e-12, + 1.63294023216330175e-12, + -6.29890985148244380e-14, + -2.05354663446822435e-15, + 6.85619028354275287e-17, + 4.12957200350808347e-18, + -8.05492705299714418e-20, + -7.22566177249538848e-21, + 6.76125727501607566e-23, + 8.36975814797070658e-03, + -9.47484821763165149e-05, + 2.75220068178296245e-06, + -8.10559470308321194e-08, + 1.10085459359959385e-09, + -3.29883148187505030e-12, + 1.06932885642590855e-12, + -3.85165231015824494e-14, + -1.11267375076195001e-15, + 3.59403311637318172e-17, + 2.40672577304104645e-18, + -4.20856976966758000e-20, + -4.16201048108587414e-21, + 2.90916385186550840e-23, + 1.10979346545550094e-03, + -1.53487261396152773e-05, + 5.98124291575033475e-07, + -2.03469468717016001e-08, + 3.42383346760073534e-10, + -3.79177774887020956e-12, + 3.43455371077490490e-13, + -1.11610403113145250e-14, + -2.26805962825074856e-16, + 7.12432662978232384e-18, + 6.12672622271081877e-19, + -9.21132358099853134e-21, + -1.01722011793305879e-21, + 3.90475385857542565e-24, + 7.97780160916580159e-05, + -1.40327596228120395e-06, + 6.91901568790900701e-08, + -2.65551538146347280e-09, + 5.71999196413260329e-11, + -1.12859917498063334e-12, + 6.07055549624425212e-14, + -1.82559816412924691e-15, + -1.16721466410739379e-17, + 3.52892586642917932e-19, + 8.02456752559900695e-20, + -1.00721592198380214e-21, + -1.15455228875195440e-22, + -1.38568962646995303e-25, + 2.81517178452990920e-06, + -6.58570773543283278e-08, + 3.95785156267814722e-09, + -1.72271307788500408e-10, + 4.82935538971826262e-12, + -1.36576819366937131e-13, + 5.87903583382401521e-15, + -1.77579447791712055e-16, + 1.85727445408978662e-18, + -5.97263465378071898e-20, + 6.15615067342148299e-21, + -7.99690137162435957e-23, + -5.11586694166495131e-24, + -7.34783571128409369e-26, + 4.13210978965126261e-08, + -1.36675026867312788e-09, + 9.87180076087181439e-11, + -5.01157022151358957e-12, + 1.86101805108060496e-13, + -6.95508744150643683e-15, + 2.90117216553351952e-16, + -9.79969095188879868e-18, + 2.51128542838878795e-19, + -8.44653215818530578e-21, + 3.43405461276177579e-22, + -7.16586486474003305e-24, + 5.84868187479681693e-26, + -7.43449242285242267e-27, + 1.85426447122504334e-10, + -9.65531632523667099e-12, + 8.56110437773373120e-13, + -5.39914465699573151e-14, + 2.75571695374638593e-15, + -1.35152168771778518e-16, + 6.37480772720037971e-18, + -2.65813159277323292e-19, + 1.01285174996517823e-20, + -3.89299386918984679e-22, + 1.43728382647246505e-23, + -4.59600883154638680e-25, + 1.42133171768532083e-26, + -4.97711813550116174e-28, + 1.25917722075169939e-13, + -1.35476792180501625e-14, + 1.66843156583184050e-15, + -1.53546283970110784e-16, + 1.19962060999336571e-17, + -8.43251973042411522e-19, + 5.35176407975728876e-20, + -3.07906581133108837e-21, + 1.63313329804100754e-22, + -8.07305336149031490e-24, + 3.71790197630905696e-25, + -1.59940597548906786e-26, + 6.49466799575236055e-28, + -2.49673563817987467e-29, +# root=10 base[15]=37.5 */ + 1.48367038285617370e-01, + -1.16098543347725844e-03, + 1.10799284673647286e-05, + -3.54172140613127322e-08, + -1.97991087169572562e-10, + -8.22243442881925318e-11, + 1.71388266096814823e-12, + 1.15522863170921891e-13, + -3.19011783455818450e-15, + -1.76050937476347411e-16, + 6.02893472265940060e-18, + 2.59633575856500805e-19, + -1.09389524957341562e-20, + -3.74285592574662660e-22, + 9.21307630138644140e-02, + -7.44670307501784138e-04, + 9.12066586399980987e-06, + -1.25642994786658437e-07, + 1.68726348413124564e-09, + -1.64982824668871766e-11, + 1.48171642415976436e-13, + -9.20032034144739441e-15, + 2.48850541767668613e-16, + 7.87634942624659592e-18, + -4.00562466178642193e-19, + -1.00721681709873040e-20, + 7.26468573522396574e-22, + 9.89929525306345507e-24, + 3.51282785677392295e-02, + -3.02929844082666406e-04, + 5.28110632753896782e-06, + -1.32559372282579471e-07, + 2.22700757314150983e-09, + 1.51003147992804553e-11, + -5.17659222497084545e-13, + -6.91659310177763092e-14, + 1.83645132329883906e-15, + 9.50150756980954698e-17, + -3.29982091859306296e-18, + -1.41590859796349431e-19, + 6.01553020119814123e-21, + 2.02982348944573200e-22, + 8.02906421972713301e-03, + -7.63201287805896818e-05, + 1.88641935811459527e-06, + -6.29940114078600242e-08, + 1.19040300208367031e-09, + 7.11337179079188423e-12, + -2.16371016567821736e-13, + -4.13528471664911202e-14, + 1.05456599373927921e-15, + 5.46223152046517038e-17, + -1.81392529096787837e-18, + -8.42879514791499836e-20, + 3.33937382577054885e-21, + 1.24030378877789763e-22, + 1.05654902635027022e-03, + -1.14506832141433940e-05, + 3.85461576935138943e-07, + -1.51441971821376499e-08, + 3.20941564373624432e-10, + 2.53162515066943834e-13, + -6.67533957124926399e-15, + -1.11055967214703770e-14, + 2.68492215860623775e-16, + 1.31499409022828718e-17, + -4.12540365387804742e-19, + -2.16846958375955135e-20, + 7.81581568323623421e-22, + 3.27141350180983247e-23, + 7.50903789057010056e-05, + -9.62950496131539270e-07, + 4.22781083427908368e-08, + -1.85953204777159706e-09, + 4.49573306726752317e-11, + -2.97199469230686834e-13, + 9.74853675867311173e-15, + -1.54914668746898174e-15, + 3.56460069193117299e-17, + 1.42270956235163791e-18, + -4.09349607476370640e-20, + -2.74212787344663043e-21, + 8.57669189248189766e-23, + 4.18506553573217022e-24, + 2.60361029448478810e-06, + -4.13154372539363814e-08, + 2.28455262474771275e-09, + -1.10768023701898071e-10, + 3.13772216200997154e-12, + -4.89679365558821880e-14, + 1.69378530440401452e-15, + -1.16053707042777630e-16, + 2.68392463071980176e-18, + 5.41923421436740613e-20, + -1.25169702825277362e-21, + -1.73033864582246224e-22, + 4.38152897465816430e-24, + 2.47771272630911816e-25, + 3.71128293582160150e-08, + -7.75462543926337135e-10, + 5.28582561209983970e-11, + -2.84818403753004951e-12, + 9.82004437623398589e-14, + -2.57797550142503399e-15, + 9.79367420168542275e-17, + -4.57845028595493110e-18, + 1.20402938952641411e-19, + -8.17286797024400427e-22, + 4.39498433017577315e-23, + -5.77017376305609836e-24, + 1.19486966464332357e-25, + 5.27766183236395859e-27, + 1.57242290672487351e-10, + -4.81025363067520954e-12, + 4.04864706915041090e-13, + -2.52166373345886871e-14, + 1.12591021625632819e-15, + -4.46301300195645011e-17, + 1.97078340223820126e-18, + -8.54601059370785208e-20, + 2.90613616716586765e-21, + -8.38789744108088345e-23, + 3.14960910300755699e-24, + -1.31945152524488299e-25, + 3.37874374263446191e-27, + -3.72208518368631111e-29, + 9.01030091513394907e-14, + -5.24766875370643591e-15, + 5.86622646386556232e-16, + -4.80757849295861439e-17, + 3.19200673116696222e-18, + -1.94918143260443569e-19, + 1.13287790521820461e-20, + -6.04686328259520089e-22, + 2.92717803830706101e-23, + -1.33032981396881559e-24, + 5.83595425773421075e-26, + -2.41705241221080813e-27, + 9.18658950003721006e-29, + -3.29326602670123730e-30, +# root=10 base[16]=40.0 */ + 1.42655831583371501e-01, + -1.67882943551804476e-03, + 2.66166501591564188e-05, + -2.24342054979146074e-07, + -8.30235441192322054e-09, + 1.91110213934553962e-11, + 4.27497715116402681e-11, + -1.61460655886745568e-12, + -1.11818866473782261e-13, + 9.87360359084833105e-15, + 1.24626317351400460e-16, + -4.26317160955515499e-17, + 8.58046354171934001e-19, + 1.39428326693720119e-19, + 8.85101300696953530e-02, + -1.05525074776106616e-03, + 1.89948769201463658e-05, + -3.88636090557247010e-07, + 8.44187798484518884e-09, + -1.55238588665137595e-10, + 5.05297035939193068e-13, + 4.39662407282368905e-14, + 6.16135907352738973e-15, + -5.55014417542717127e-16, + -4.64661551660734546e-19, + 2.03555019971754348e-18, + -6.90973339508527262e-20, + -5.10978041292057142e-21, + 3.36885364350255623e-02, + -4.12515355466414621e-04, + 9.21366527931493566e-06, + -3.48493102915831658e-07, + 1.43007210176823559e-08, + -2.15970494330384744e-10, + -1.90621231463379512e-11, + 7.93947290382308233e-13, + 6.29701200720563341e-14, + -5.44562130900872773e-15, + -6.63060910744562623e-17, + 2.32732899930100201e-17, + -4.73615294808066799e-19, + -7.58858363700182304e-20, + 7.67798326466864571e-03, + -9.80437388390476103e-05, + 2.83874791916690435e-06, + -1.54839814297076255e-07, + 7.53244579493860331e-09, + -1.23186598519669296e-10, + -1.04616253093808581e-11, + 4.28515472720444660e-13, + 3.72802048071262674e-14, + -3.12919429544409900e-15, + -4.20620414596352392e-17, + 1.35018926391377707e-17, + -2.52873672238095997e-19, + -4.52895996414090710e-20, + 1.00599830842081875e-03, + -1.36392964160567060e-05, + 5.18626289657592722e-07, + -3.54786235455200406e-08, + 1.87962958123493417e-09, + -3.56772565300531416e-11, + -2.24795646957365442e-12, + 9.09876887353817639e-14, + 9.65217471306950980e-15, + -7.71619892351242057e-16, + -1.14094362251053186e-17, + 3.34182835222442050e-18, + -5.55002637728822150e-20, + -1.16387923844902026e-20, + 7.10402359613884467e-05, + -1.04606741424711317e-06, + 5.21318426806724628e-08, + -4.14567362885638564e-09, + 2.34125315349479686e-10, + -5.36627209382650139e-12, + -1.95283452895649308e-13, + 7.51016513390333228e-15, + 1.24663548106949157e-15, + -9.21332272286919903e-17, + -1.46452362270167610e-18, + 3.93254654080813593e-19, + -5.31068992068844005e-21, + -1.45033532940080477e-21, + 2.43914972868748968e-06, + -4.02340629791267772e-08, + 2.61137838025678122e-09, + -2.31913823937270436e-10, + 1.39699284684262207e-11, + -3.99241308936012383e-13, + -3.79307585983688847e-15, + 6.58265859568508444e-17, + 8.10427166361586154e-17, + -5.31474390109832740e-18, + -7.97129720024856556e-20, + 2.09316851636330486e-20, + -1.76750374107457399e-22, + -8.55275268320672217e-23, + 3.42134391995556033e-08, + -6.62693343864463128e-10, + 5.58316236587902816e-11, + -5.44450823673710883e-12, + 3.55498148382797120e-13, + -1.31153973390319720e-14, + 2.16050666525398327e-16, + -1.53754637770055375e-17, + 2.55814816727841174e-18, + -1.44844755073283076e-19, + -9.17298541870448128e-22, + 4.09390525292433046e-22, + 1.39933602177984888e-24, + -2.17722664661633498e-24, + 1.40565687537187437e-10, + -3.48024039997095008e-12, + 3.83964083217258746e-13, + -4.13667954442097349e-14, + 3.04805950984497006e-15, + -1.52873936140801228e-16, + 6.49258136991463829e-18, + -4.32367131128125564e-19, + 3.58220375616131152e-20, + -1.90400433101866153e-21, + 3.73566576535591771e-23, + 4.59848273670685818e-25, + 1.52952102877685196e-25, + -2.21909341942016494e-26, + 7.38914452931594303e-14, + -2.89684933977679166e-15, + 4.41271293677735444e-16, + -5.59014990988075770e-17, + 5.21458103797723616e-18, + -3.99025417190067599e-19, + 2.96174348365434519e-20, + -2.33175418843200457e-21, + 1.77053251698170203e-22, + -1.15711845535545561e-23, + 6.56401355609805884e-25, + -3.76934732174467941e-26, + 2.45688093948521846e-27, + -1.53882430529074575e-28, +# root=10 base[17]=44.0 */ + 1.36346524867653252e-01, + -1.47862350242804847e-03, + 2.32699532959954878e-05, + -3.17052572157809500e-07, + -2.12090496034615829e-09, + 3.92782513705178668e-10, + -7.39580956712521989e-12, + -9.43968217755101296e-13, + 7.74388537773723712e-14, + -1.05869189273604504e-15, + -2.02226736637234592e-16, + 1.42553565107193433e-17, + -7.98169082909452940e-20, + -4.29108933414916218e-20, + 8.45664483320199001e-02, + -9.19878802442136560e-04, + 1.50429803223764064e-05, + -2.77138071057556308e-07, + 5.60451329470717228e-09, + -1.21650890609232659e-10, + 2.12476591519793974e-12, + 2.04618865195403654e-14, + -3.49780068186656524e-15, + 5.41230593723837946e-17, + 9.33202976723326874e-18, + -6.93261595213804038e-19, + 8.26113459540322601e-21, + 1.70127208238820048e-21, + 3.21643199393882723e-02, + -3.52087236834450765e-04, + 6.20724906670313428e-06, + -1.69625073721349046e-07, + 7.67289614208513664e-09, + -3.41199490422512249e-10, + 6.50825041377388046e-12, + 4.68428382632209341e-13, + -4.14273580893167335e-14, + 5.62840223270730762e-16, + 1.10729726918629088e-16, + -7.79618410010942740e-18, + 4.45285780193753114e-20, + 2.33763844256539517e-20, + 7.32202559265007075e-03, + -8.09674751460122020e-05, + 1.59248968926481106e-06, + -6.24315181174053026e-08, + 3.81527087371777375e-09, + -1.89372994695463937e-10, + 3.82418806736495511e-12, + 2.62276867044303876e-13, + -2.36140577621991058e-14, + 3.11273170867865176e-16, + 6.48403321540205818e-17, + -4.52418659999692876e-18, + 2.25319477349074615e-20, + 1.38450685442903495e-20, + 9.57676041319794453e-04, + -1.07495315678039512e-05, + 2.43471500268990914e-07, + -1.28639273180986045e-08, + 9.11133078880446615e-10, + -4.75096953627031996e-11, + 1.03261277842573555e-12, + 6.02634042764028821e-14, + -5.66567083677843117e-15, + 7.05242652160732730e-17, + 1.63141989610354862e-17, + -1.12309992411057098e-18, + 4.56966622216337194e-21, + 3.52142242229331669e-21, + 6.74527397316678921e-05, + -7.73582846966457840e-07, + 2.08005918702404299e-08, + -1.39807332181320556e-09, + 1.07959570385087916e-10, + -5.83763648661404649e-12, + 1.39560981828215857e-13, + 6.20116876601068856e-15, + -6.32035771321682295e-16, + 6.90578451144673355e-18, + 1.98445347662556844e-18, + -1.33680038375606581e-19, + 3.86008490423204633e-22, + 4.31645337395137749e-22, + 2.30691425360520062e-06, + -2.72972270332100367e-08, + 8.99601715579814592e-10, + -7.35036460251565943e-11, + 6.02659874727832241e-12, + -3.38300371983765865e-13, + 9.14256381108057073e-15, + 2.51890574744729474e-16, + -3.05921451514931783e-17, + 2.20524832178773315e-19, + 1.14238034393460948e-19, + -7.42128280333177705e-21, + 1.15307925798352980e-23, + 2.46529130654298352e-23, + 3.21544013855803991e-08, + -3.99042053573819290e-10, + 1.67543790729399122e-11, + -1.61136156063117645e-12, + 1.39022864235945532e-13, + -8.19013524917463403e-15, + 2.59694116206351225e-16, + 2.02322679195585901e-18, + -4.99472181204560084e-19, + -2.92003447740632869e-21, + 2.84693215450603436e-21, + -1.73952784425443069e-22, + 1.82389438382949545e-25, + 5.74087827887753465e-25, + 1.30561111217223743e-10, + -1.75586783348458928e-12, + 9.95260107483951352e-14, + -1.10740668559726981e-14, + 1.01158828250921355e-15, + -6.42531394277249219e-17, + 2.53562802124835792e-18, + -3.95620432460467854e-20, + -3.72400406234278123e-22, + -1.71324621757999502e-22, + 2.64968237434682756e-23, + -1.48262879544194792e-24, + 9.85019502659101242e-27, + 3.85267361909185660e-27, + 6.65407938629119368e-14, + -1.06357809853545780e-15, + 9.18309457899669574e-17, + -1.19772753955788786e-17, + 1.20802975063390266e-18, + -8.95903585652352451e-20, + 4.99155810320192573e-21, + -2.32192082716704057e-22, + 1.26809611800452719e-23, + -9.88907054477113521e-25, + 7.57228459331607063e-26, + -4.27181780317675188e-27, + 1.50477467383277134e-28, + -2.34908502314665976e-30, +# root=10 base[18]=48.0 */ + 1.30780114762700989e-01, + -1.30775171516377890e-03, + 1.94756042383442781e-05, + -3.02519365102785924e-07, + 2.99925939657012749e-09, + 1.13244818040016158e-10, + -1.00626700525752447e-11, + 3.39262888147296255e-13, + 4.70757089059399957e-15, + -1.24256862493631964e-15, + 6.77925340588813599e-17, + -9.57905233412094100e-19, + -1.21392497347106938e-19, + 1.01175172511079893e-20, + 8.11084895640341585e-02, + -8.11479895953131280e-04, + 1.21841085584405934e-05, + -2.04153886557638846e-07, + 3.67542645923863850e-09, + -7.32903303028403570e-11, + 1.65722794169448266e-12, + -3.41977608248685825e-14, + -3.49064203338832770e-17, + 5.85074721934290660e-17, + -3.18431667685280745e-18, + 4.39758862607118389e-20, + 5.45795728227888752e-21, + -4.48853825809241632e-22, + 3.08447431840907296e-02, + -3.08935086721293757e-04, + 4.71724738060117893e-06, + -9.07769016299648373e-08, + 2.84284373384788575e-09, + -1.42420792347760949e-10, + 6.96279966632248682e-12, + -2.11835336229388877e-13, + -2.10660693913731777e-15, + 6.70868901963634926e-16, + -3.68908447028978583e-17, + 5.20646233272690417e-19, + 6.63057590893041079e-20, + -5.52222868710767715e-21, + 7.02002573502226706e-03, + -7.04349998605868056e-05, + 1.10438264725988264e-06, + -2.54993680041304077e-08, + 1.18092009848545786e-09, + -7.49273827804133920e-11, + 3.95392155624898548e-12, + -1.24372963358341399e-13, + -1.08171907912368176e-15, + 3.84679229881001872e-16, + -2.13551349090111758e-17, + 3.01514240269139164e-19, + 3.88148930551926740e-20, + -3.23464226426938852e-21, + 9.17863401646139840e-04, + -9.23332266324586478e-06, + 1.50381136492673344e-07, + -4.27843898261146376e-09, + 2.59100529095802201e-10, + -1.81911664690602062e-11, + 9.90523814488246625e-13, + -3.20190803000613895e-14, + -2.06892862072945290e-16, + 9.33974716640839590e-17, + -5.26066471032728907e-18, + 7.40869083411816719e-20, + 9.73814694582584073e-21, + -8.11612461980961359e-22, + 6.46163945768627395e-05, + -6.52464359574724445e-07, + 1.12002133293395003e-08, + -3.98549784674832311e-10, + 2.91082788462769475e-11, + -2.16083295241234531e-12, + 1.20263760238759963e-13, + -4.01738271126723495e-15, + -1.30764792052903832e-17, + 1.06633790583222948e-17, + -6.14195495140030720e-19, + 8.56083787477819143e-21, + 1.17443772431121885e-21, + -9.77737811120099484e-23, + 2.20827253523087503e-06, + -2.24213339418812016e-08, + 4.13825842520527878e-10, + -1.85863738971091115e-11, + 1.55480063373473480e-12, + -1.19870142065619732e-13, + 6.81921721078934932e-15, + -2.38069339095055611e-16, + 2.87260767522039714e-19, + 5.43379351594582154e-19, + -3.24602177764059775e-20, + 4.37633484039374040e-22, + 6.60882218032051962e-23, + -5.47760739026619195e-24, + 3.07435561966123923e-08, + -3.14811516037595558e-10, + 6.43786368169117090e-12, + -3.68206653140581671e-13, + 3.41791806762707847e-14, + -2.72163119476666066e-15, + 1.59229076133440446e-16, + -5.92219159478280899e-18, + 4.45530826188871731e-20, + 1.03461705720272243e-20, + -6.62101026718776352e-22, + 7.92051762295936508e-24, + 1.55093027105735082e-24, + -1.26756451265962748e-25, + 1.24572662690591136e-10, + -1.29431022304956496e-12, + 3.09086404826569557e-14, + -2.28709881134157851e-15, + 2.31865951052625077e-16, + -1.91560673648445279e-17, + 1.17116458589097542e-18, + -4.81153643313152871e-20, + 8.20172771123119475e-22, + 4.41606210492924970e-23, + -3.44990748148400307e-24, + 1.56377244505985150e-26, + 1.22518878681304702e-26, + -9.57450815149513482e-28, + 6.31725522058737054e-14, + -6.77766394752889741e-16, + 2.13590110738852618e-17, + -2.13384328018511642e-18, + 2.37921594016035304e-19, + -2.09616902986288764e-20, + 1.40621586414482065e-21, + -6.98674356903013515e-23, + 2.37792163004704675e-24, + -4.60521274744973725e-26, + 1.01730141504928217e-27, + -1.95000305904274757e-28, + 2.30746040956758242e-29, + -1.56211238471099877e-30, +# root=10 base[19]=52.0 */ + 1.25839016825951028e-01, + -1.16554919275459082e-03, + 1.61742710057159199e-05, + -2.46366962185565959e-07, + 3.58957129759428709e-09, + -2.29288937774259243e-11, + -2.17730564329059068e-12, + 1.69207625558856036e-13, + -7.26300871499886472e-15, + 1.41456839654655468e-16, + 6.29316162677788237e-18, + -7.38094428921727631e-19, + 3.54064576789722258e-20, + -7.47104383563259805e-22, + 7.80432802899502509e-02, + -7.22905621761121028e-04, + 1.00448753596881239e-05, + -1.55222949347960195e-07, + 2.53464399390070215e-09, + -4.39260720257913279e-11, + 8.58826974191476852e-13, + -2.03174937525372800e-14, + 5.15020600183529797e-16, + -7.76937076947225151e-18, + -3.33869133837795261e-19, + 3.57265621091989462e-20, + -1.61574661592250345e-21, + 3.09876418122299901e-23, + 2.96784482751739805e-02, + -2.74948483406365891e-04, + 3.83085660236767069e-06, + -6.09542825606750976e-08, + 1.20859371682650823e-09, + -4.03062485523139039e-11, + 2.08519787743117795e-12, + -1.07725398623411562e-13, + 4.22547320809652185e-15, + -8.14119626007160458e-17, + -3.37718523451941430e-18, + 4.02273685936212686e-19, + -1.93152571014327757e-20, + 4.07080903880880533e-22, + 6.75435639744014979e-03, + -6.25888418905678844e-05, + 8.75858116566673675e-07, + -1.45780445426854288e-08, + 3.64928125920191460e-10, + -1.78630502641489357e-11, + 1.12425342134660167e-12, + -6.16475436983710638e-14, + 2.47250099434010174e-15, + -4.91114082061657296e-17, + -1.88847945946790760e-18, + 2.32374749795644160e-19, + -1.12587358322718320e-20, + 2.39740282738191283e-22, + 8.83082864797439374e-04, + -8.18589058785996089e-06, + 1.15287567938247024e-07, + -2.04267634109629726e-09, + 6.51733212773760617e-11, + -4.03049659881695754e-12, + 2.74371096547220694e-13, + -1.53962935946273880e-14, + 6.26165323756184009e-16, + -1.29023341917980475e-17, + -4.41681648550298557e-19, + 5.71254331699098203e-20, + -2.80216549250836936e-21, + 6.04472471962136558e-23, + 6.21633590958475070e-05, + -5.76523243319677475e-07, + 8.19426787934883695e-09, + -1.57728084593189971e-10, + 6.37611419086752374e-12, + -4.58304423300480798e-13, + 3.25328186188174804e-14, + -1.85362278810259608e-15, + 7.65303472172437364e-17, + -1.65562064347199471e-18, + -4.74226119272063986e-20, + 6.65705100060173500e-21, + -3.32561476310853396e-22, + 7.30146862643813492e-24, + 2.12421248192025576e-06, + -1.97150079731745500e-08, + 2.83941747484429599e-10, + -6.08928827467909957e-12, + 3.08231179718372572e-13, + -2.45539083837121177e-14, + 1.79238504706777288e-15, + -1.03621238750633080e-16, + 4.36361556702580310e-18, + -1.00821906360158938e-19, + -2.15586026573052997e-21, + 3.51780271938416088e-22, + -1.80798685396698771e-23, + 4.06651712453631679e-25, + 2.95683871766311532e-08, + -2.74731376091206340e-10, + 4.03624977154288483e-12, + -9.98034582989409956e-14, + 6.25264538941930173e-15, + -5.37297768443643976e-16, + 4.01589996178536496e-17, + -2.36396423267379113e-18, + 1.02461904801713521e-19, + -2.59410290133059149e-21, + -3.09053112408219947e-23, + 7.23624617967870707e-24, + -3.90550787852888689e-25, + 9.07805964340801539e-27, + 1.19776818523593396e-10, + -1.11496733697883413e-12, + 1.69275807631166446e-14, + -5.09202868713944074e-16, + 3.92326001373219284e-17, + -3.58971832892197772e-18, + 2.75528440298293954e-19, + -1.66770446153365819e-20, + 7.57880842546826530e-22, + -2.19655513496539192e-23, + 1.92352796334464060e-26, + 4.01708605374770169e-26, + -2.41288706592797520e-27, + 5.83083299348484624e-29, + 6.07020662838359685e-14, + -5.67290944507236282e-16, + 9.21298808094979831e-18, + -3.76235911292313458e-19, + 3.60358630100727837e-20, + -3.52609960326644599e-21, + 2.83083806788241604e-22, + -1.81548550210997790e-23, + 9.09851042811518306e-25, + -3.32763410616975866e-26, + 6.72453620462586147e-28, + 1.03604619270610343e-29, + -1.33450407530027427e-30, + 2.58816291328137851e-32, +# root=10 base[20]=56.0 */ + 1.21418201453976776e-01, + -1.04705125982259054e-03, + 1.35415483211766251e-05, + -1.94235288130336484e-07, + 2.87906852116566260e-09, + -3.92607381822954995e-11, + 1.71328163485704584e-13, + 2.71114514454312014e-14, + -2.01423905291000961e-15, + 9.56673160931247040e-17, + -3.11869020771453016e-18, + 4.17328791467541674e-20, + 2.76989302456131350e-21, + -2.53729725016665415e-22, + 7.53014722812638121e-02, + -6.49368226121062515e-04, + 8.39970625606511571e-06, + -1.20740580813070811e-07, + 1.82453537601115630e-09, + -2.85744467901141184e-11, + 4.72471414929932727e-13, + -8.91664742422518231e-15, + 2.13418035609588970e-16, + -6.10061311574703257e-18, + 1.55413671757743632e-19, + -1.41684232844661740e-21, + -1.56457891641899344e-22, + 1.23481937079908791e-23, + 2.86357160649576802e-02, + -2.46946407655051863e-04, + 3.19541113708490996e-06, + -4.61361015153729346e-08, + 7.24688116882075554e-10, + -1.42136499273375103e-11, + 4.70124536193697549e-13, + -2.38292887118909388e-14, + 1.24531398127974892e-15, + -5.45626629313632199e-17, + 1.73812106938116072e-18, + -2.32304687474418957e-20, + -1.50964898486282148e-21, + 1.38568567125172054e-22, + 6.51702029239728704e-03, + -5.62024303489774637e-05, + 7.27647181362522980e-07, + -1.05804077913412111e-08, + 1.76206785709880563e-10, + -4.46078158461444426e-12, + 2.13600903250217378e-13, + -1.29449563104839759e-14, + 7.13382653115496576e-16, + -3.18186990494129010e-17, + 1.02602375752878865e-18, + -1.42982850990898105e-20, + -8.51722730772322892e-22, + 8.01775092892298974e-23, + 8.52047823040144917e-04, + -7.34829623529331609e-06, + 9.52154453021033621e-08, + -1.39881754966859544e-09, + 2.52142511928147128e-11, + -8.20434187489182193e-13, + 4.86219601249127537e-14, + -3.15855584116638898e-15, + 1.77532988448283435e-16, + -7.99380071273171233e-18, + 2.60798542414277151e-19, + -3.82592945625340312e-21, + -2.02563019171115592e-22, + 1.97650378341083517e-23, + 5.99781784418022828e-05, + -5.17296748577225176e-07, + 6.71070523047205412e-09, + -1.00034803719372744e-10, + 1.99561381722067613e-12, + -8.19015353186785804e-14, + 5.53931616506127019e-15, + -3.73173198264240925e-16, + 2.12345266442250749e-17, + -9.64992944362891262e-19, + 3.19615195041397545e-20, + -5.01381562082483189e-22, + -2.24136319768363907e-23, + 2.31378853789871788e-24, + 2.04951623464574387e-06, + -1.76779572477015480e-08, + 2.29716747180253253e-10, + -3.49599060562708138e-12, + 7.91824763435300727e-14, + -4.00796974183824586e-15, + 2.96001989369510183e-16, + -2.04209563813341345e-17, + 1.17491389391565458e-18, + -5.40154669202107578e-20, + 1.82702598211447601e-21, + -3.12922066372810788e-23, + -1.08371780039677356e-24, + 1.23250330645790080e-25, + 2.85281009399502856e-08, + -2.46096195204587269e-10, + 3.20602062979684750e-12, + -5.03016341794383091e-14, + 1.33572400297941622e-15, + -8.17023874588750075e-17, + 6.43003611486333531e-18, + -4.52339032171883399e-19, + 2.63675960343329388e-20, + -1.23255395361610676e-21, + 4.30034413998936952e-23, + -8.27974933436567756e-25, + -1.85521393225532637e-26, + 2.57769760526516187e-27, + 1.15559143945190932e-10, + -9.97058255347887040e-13, + 1.30435676221216086e-14, + -2.14845446229386337e-16, + 7.00806137452090632e-18, + -5.10564281737005919e-19, + 4.23143165452690524e-20, + -3.04007416422973738e-21, + 1.80691806468602388e-22, + -8.67970461524041968e-24, + 3.18448739958835513e-25, + -7.21981618951787669e-27, + -5.28024176412690304e-29, + 1.50346778459096283e-29, + 5.85606978542559590e-14, + -5.05467153024369479e-16, + 6.66922733520850648e-18, + -1.20634456170450503e-19, + 5.28172980725305476e-21, + -4.58233749048653186e-22, + 4.00715551301400602e-23, + -2.97743230107996420e-24, + 1.83999474872406365e-25, + -9.35364392261474724e-27, + 3.79198817461705763e-28, + -1.11347916532498802e-29, + 1.43314987529708810e-31, + 7.34395545356813152e-33, +# root=10 base[21]=60.0 */ + 1.17432929085536819e-01, + -9.47316417990596367e-04, + 1.14623903451372470e-05, + -1.54068262902144376e-07, + 2.16954418644972777e-09, + -3.08899461497015484e-11, + 4.00512139407667515e-13, + -1.71975214530845211e-15, + -2.45103276752896885e-16, + 1.80217063990974866e-17, + -8.91022237282486804e-19, + 3.40909193494028511e-20, + -9.41295706521774926e-22, + 1.08222941798998013e-23, + 7.28298663374227356e-02, + -5.87509653590027642e-04, + 7.10890786421706783e-06, + -9.55770377073752117e-08, + 1.34948602557596073e-09, + -1.96238761528726391e-11, + 2.92894337038390462e-13, + -4.58901812334738069e-15, + 8.19567219008248193e-17, + -1.89658284855734747e-18, + 5.61117909459277711e-20, + -1.71155621953821952e-21, + 4.08045140128205808e-23, + -2.72081235878017533e-25, + 2.76958044211337295e-02, + -2.23419022997811104e-04, + 2.70348582495176165e-06, + -3.63670884054795809e-08, + 5.16320687980205998e-10, + -7.83124302540816818e-12, + 1.46585490147732394e-13, + -4.53433445820679733e-15, + 2.16658543783957573e-16, + -1.11020637126931061e-17, + 5.05693390325290065e-19, + -1.88951487959993543e-20, + 5.17463078434391924e-22, + -5.92703525435849285e-24, + 6.30310925064029009e-03, + -5.08466177045326120e-05, + 6.15306751606102355e-07, + -8.28418035307992795e-09, + 1.18648806963416091e-10, + -1.91673771159646236e-12, + 4.62215954987082347e-14, + -2.05279457770689528e-15, + 1.17345308562936260e-16, + -6.34463312502381252e-18, + 2.93884120645964163e-19, + -1.10732185768353931e-20, + 3.06280872569044932e-22, + -3.67245464364559965e-24, + 8.24080194335131792e-04, + -6.64780502767318942e-06, + 8.04535890366808594e-08, + -1.08455057398535971e-09, + 1.57316564247572346e-11, + -2.76457580306124047e-13, + 8.52214282676872826e-15, + -4.65701418060488232e-16, + 2.85358256741435233e-17, + -1.57295514205486036e-18, + 7.34326540322375382e-20, + -2.78530737141968375e-21, + 7.79199712249868788e-23, + -9.87384314794535573e-25, + 5.80094051643879338e-05, + -4.67960748284327126e-07, + 5.66408744361058154e-09, + -7.64912953362993158e-11, + 1.12945532027738561e-12, + -2.20695890329262361e-14, + 8.50855183586832271e-16, + -5.28357302902947094e-17, + 3.35602501220323969e-18, + -1.87095299208253689e-19, + 8.79439716378539415e-21, + -3.36273318713118736e-22, + 9.55229454225463315e-24, + -1.29978050185832778e-25, + 1.98223882617806610e-06, + -1.59907986981467360e-08, + 1.93582913967491111e-10, + -2.62097374764693978e-12, + 3.96804107264320086e-14, + -8.83108663592112064e-16, + 4.15406159743419175e-17, + -2.80725435155052585e-18, + 1.82444101642945076e-19, + -1.02672900276821924e-20, + 4.86526298057179450e-22, + -1.88102412829781585e-23, + 5.45911785193841126e-25, + -8.14391856818822312e-27, + 2.75915878291753658e-08, + -2.22584824485557490e-10, + 2.69529200118780052e-12, + -3.66317951108737844e-14, + 5.75010943211687508e-16, + -1.50033439997853076e-17, + 8.42134953071236063e-19, + -6.04613812255146117e-20, + 4.00067889404989821e-21, + -2.27500492937863156e-22, + 1.09021126456709151e-23, + -4.28447763842871966e-25, + 1.28318652950306582e-26, + -2.15906221475413100e-28, + 1.11765268527735260e-10, + -9.01640155192225396e-13, + 1.09226220374234908e-14, + -1.49370467205431291e-16, + 2.48018274973586068e-18, + -7.89947610295125496e-20, + 5.20492704302148868e-21, + -3.92177704995812292e-22, + 2.64273200331171245e-23, + -1.52507373964666173e-24, + 7.44127148533599992e-26, + -3.00380144623839191e-27, + 9.45914596689164115e-29, + -1.87535916882819816e-30, + 5.66377793660461278e-14, + -4.56927467311375345e-16, + 5.53990792874625355e-18, + -7.66932625776727136e-20, + 1.41216987184591211e-21, + -5.91107093723605593e-23, + 4.55498484612341697e-24, + -3.60035650329356757e-25, + 2.49221363170828646e-26, + -1.47915179128718064e-27, + 7.48694993881980572e-29, + -3.19128748598182569e-30, + 1.10660419416280003e-31, + -2.81865222509970870e-33, +# root=10 base[22]=64.0 */ + 1.13816127794921562e-01, + -8.62466140813775996e-04, + 9.80308152265597354e-06, + -1.23802247750356771e-07, + 1.64123067045796463e-09, + -2.23288122100296858e-11, + 3.04567127332373456e-13, + -3.81950951172681386e-15, + 2.14201752236128057e-17, + 1.67394337277941878e-18, + -1.26562315658526958e-19, + 6.34928254738481441e-21, + -2.58411856937494379e-22, + 8.56655870160903105e-24, + 7.05867881546663745e-02, + -5.34886572830075300e-04, + 6.07971145916685422e-06, + -7.67821837786993263e-08, + 1.01820552405869882e-09, + -1.38906262135186430e-11, + 1.93244210996467744e-13, + -2.74196730521367279e-15, + 4.05276423936902587e-17, + -6.73579633991199084e-19, + 1.44603126805060760e-20, + -4.14895520739302643e-22, + 1.33624926786642553e-23, + -3.94976520283903103e-25, + 2.68428041329064927e-02, + -2.03407149087064863e-04, + 2.31200601854495397e-06, + -2.92005098831290778e-08, + 3.87474250054424625e-10, + -5.31600913859113079e-12, + 7.69262930778290533e-14, + -1.33751585846070128e-15, + 3.69524095837176308e-17, + -1.61096273837775121e-18, + 7.91600452314527908e-20, + -3.61239392163075882e-21, + 1.43173826701163574e-22, + -4.70447568002174008e-24, + 6.10898021334781594e-03, + -4.62921271368889716e-05, + 5.26177452709992743e-07, + -6.64617756521846471e-09, + 8.82808776182395203e-11, + -1.22207694500230220e-12, + 1.87590134298982524e-14, + -4.11847506130468968e-16, + 1.62732288130550681e-17, + -8.62100794407640873e-19, + 4.50124898065560215e-20, + -2.09167977891083790e-21, + 8.35182213099941523e-23, + -2.75989041139767331e-24, + 7.98699363678766726e-04, + -6.05232004915540243e-06, + 6.87939752244217127e-08, + -8.69052237959808302e-10, + 1.15607470634297037e-11, + -1.62118610021790565e-13, + 2.69254282466902557e-15, + -7.44842235801817361e-17, + 3.64150273568578303e-18, + -2.08363588458119394e-19, + 1.11138421601761020e-20, + -5.20370603994728518e-22, + 2.08797542583849149e-23, + -6.93960675877191070e-25, + 5.62227705512623416e-05, + -4.26040584198833119e-07, + 4.84266393066401328e-09, + -6.11869489660809942e-11, + 8.15667259921161883e-13, + -1.16465620908519257e-14, + 2.13631533525147010e-16, + -7.32175265845795067e-18, + 4.09322372876114085e-19, + -2.43711661867785991e-20, + 1.31530285215264644e-21, + -6.19453797018573487e-23, + 2.49916283954259311e-24, + -8.36923902701321725e-26, + 1.92118755648546475e-06, + -1.45582358291225324e-08, + 1.65481319951342877e-10, + -2.09139373936521693e-12, + 2.79634604610439944e-14, + -4.09449322895532295e-16, + 8.48316381582767077e-18, + -3.52685515729470026e-19, + 2.15668565440539943e-20, + -1.31627047328625735e-21, + 7.16783877144323246e-23, + -3.39722533951841635e-24, + 1.38056406005118877e-25, + -4.67249774862578978e-27, + 2.67417863767029149e-08, + -2.02642145933734919e-10, + 2.30345685759173135e-12, + -2.91227556865893827e-14, + 3.91115704939343664e-16, + -5.93683117979930235e-18, + 1.42706165634204706e-19, + -7.05547847959202285e-21, + 4.60040406087939965e-22, + -2.86008077069378614e-23, + 1.57168127020877021e-24, + -7.51188251072137298e-26, + 3.08504792134787074e-27, + -1.06064894771453301e-28, + 1.08322950984135579e-10, + -8.20843638293116002e-13, + 9.33096908760838871e-15, + -1.18043886311574421e-16, + 1.59654256150870196e-18, + -2.56068969466940546e-20, + 7.40991689839484788e-22, + -4.29154519409229264e-23, + 2.94279569623261128e-24, + -1.86150629279207425e-25, + 1.03522150785276801e-26, + -5.01290026053107766e-28, + 2.09428909844059465e-29, + -7.38618563922112338e-31, + 5.48933368666937708e-14, + -4.15968751909620601e-16, + 4.72887206111936225e-18, + -5.98940538063637747e-20, + 8.21165974928968105e-22, + -1.45375295961564486e-23, + 5.41162316493083685e-25, + -3.65750492610874813e-26, + 2.62988074212999151e-27, + -1.70236475535386595e-28, + 9.67204488867988608e-30, + -4.80574906325728724e-31, + 2.07801371880941684e-32, + -7.70922943846529436e-34, +# root=10 base[23]=68.0 */ + 1.10514292089757521e-01, + -7.89569114483553553e-04, + 8.46146719804304370e-06, + -1.00752524438338620e-07, + 1.25963125319281450e-09, + -1.61940583492420178e-11, + 2.11633941616687400e-13, + -2.76607770695050572e-15, + 3.38836357174579311e-17, + -2.49161914302723131e-19, + -8.55862292467046258e-21, + 7.17610739967498533e-22, + -3.63043368494627718e-23, + 1.51025738896713614e-24, + 6.85390468708160228e-02, + -4.89677070443896045e-04, + 5.24765589897876993e-06, + -6.24851256979596452e-08, + 7.81227323220244269e-10, + -1.00466458082646792e-11, + 1.31613823142960257e-13, + -1.74832254831300805e-15, + 2.35750238711924221e-17, + -3.28239775335044711e-19, + 5.02916145108914017e-21, + -9.71028182413358081e-23, + 2.56676566141982443e-24, + -8.15687433534639870e-26, + 2.60640872842454706e-02, + -1.86214816348360740e-04, + 1.99558363610408207e-06, + -2.37620211112535107e-08, + 2.97106157433288469e-10, + -3.82320242543062091e-12, + 5.03355646641921364e-14, + -6.90754188836306479e-16, + 1.09857716088155378e-17, + -2.61990379919893499e-19, + 1.00819032290041425e-20, + -4.65823614125180159e-22, + 2.08425414935774335e-23, + -8.38711225273727189e-25, + 5.93175706579147574e-03, + -4.23794264175526779e-05, + 4.54162179762204240e-07, + -5.40788963998823178e-09, + 6.76238446645115552e-11, + -8.71060556430170726e-13, + 1.15590932616834111e-14, + -1.66613311482176437e-16, + 3.23510703441484535e-18, + -1.09580482043513118e-19, + 5.27427785297183919e-21, + -2.62731359930641346e-22, + 1.20179208864920844e-23, + -4.87410398884908122e-25, + 7.75528878867712485e-04, + -5.54076463472157529e-06, + 5.93780415736620837e-08, + -7.07046020571805459e-10, + 8.84266965731172582e-12, + -1.14067461346658358e-13, + 1.53101354164114125e-15, + -2.35814514601807561e-17, + 5.63666033245866628e-19, + -2.39101725569313502e-20, + 1.26252396315838533e-21, + -6.45641730102563637e-23, + 2.97821590126094184e-24, + -1.21306772300297621e-25, + 5.45917324601515993e-05, + -3.90030543093836127e-07, + 4.17979684010721581e-09, + -4.97718716103489222e-11, + 6.22600638803469591e-13, + -8.04779572966366158e-15, + 1.09743245702517310e-16, + -1.83975239304604405e-18, + 5.37825806565803173e-20, + -2.64656648460118609e-21, + 1.46664345207317676e-22, + -7.60413821881246451e-24, + 3.52760225797973282e-25, + -1.44298115762029541e-26, + 1.86545336104810309e-06, + -1.33277290536127320e-08, + 1.42827968085572354e-10, + -1.70079480651382681e-12, + 2.12816208187390156e-14, + -2.75886449209097454e-16, + 3.84589522185800822e-18, + -7.16399776425236819e-20, + 2.52864351307018031e-21, + -1.37820083693080211e-22, + 7.86725841996639085e-24, + -4.11830562478634805e-25, + 1.92108259001341444e-26, + -7.90049235257491578e-28, + 2.59659992876329853e-08, + -1.85514058881965060e-10, + 1.98808397728351894e-12, + -2.36748790662887144e-14, + 2.96364774616398710e-16, + -3.85827235066092928e-18, + 5.55005148543604522e-20, + -1.17816201295532426e-21, + 4.95224209433106027e-23, + -2.90678327683298053e-24, + 1.69479093166503259e-25, + -8.94977540666282958e-27, + 4.20338355076065954e-28, + -1.74181923017172572e-29, + 1.05180468472742965e-10, + -7.51461836565759741e-13, + 8.05315522240167535e-15, + -9.59051009138751901e-17, + 1.20136294014483829e-18, + -1.57451524238804856e-20, + 2.37561959520870118e-22, + -5.95305768751485920e-24, + 2.94816799021539552e-25, + -1.83349348399846829e-26, + 1.08875207477214757e-27, + -5.80978642451781906e-29, + 2.75639670770404021e-30, + -1.15609107308140892e-31, + 5.33008623305408163e-14, + -3.80808068585422190e-16, + 4.08100934462357804e-18, + -4.86055119039475438e-20, + 6.09638838242120419e-22, + -8.09158015351705180e-24, + 1.32855640743030692e-25, + -4.18667809908553620e-27, + 2.44108868883699542e-28, + -1.59944296562889592e-29, + 9.70507537196115931e-31, + -5.26900972271643737e-32, + 2.54825885226930417e-33, + -1.09447281287007879e-34, +# root=10 base[24]=72.0 */ + 1.07484195269965804e-01, + -7.26393822574555219e-04, + 7.36350046266612543e-06, + -8.29377519901983316e-08, + 9.80861848008499636e-10, + -1.19312777849279844e-11, + 1.47789497996540974e-13, + -1.85160013574398688e-15, + 2.32033151734096082e-17, + -2.78143603715579751e-19, + 2.46078237602789983e-21, + 2.89362978890364724e-23, + -3.33018284984744118e-24, + 1.71409186965004737e-25, + 6.66598333824028610e-02, + -4.50496848174742563e-04, + 4.56671529849696191e-06, + -5.14365653831112513e-08, + 6.08315251556634551e-10, + -7.39980782301665324e-12, + 9.16828992712673120e-14, + -1.15083494198947910e-15, + 1.45954193567342999e-17, + -1.87206591998964992e-19, + 2.45840055141060574e-21, + -3.46768098315660178e-23, + 5.91852006471393977e-25, + -1.38037415049127705e-26, + 2.53494583709438261e-02, + -1.71315326289335891e-04, + 1.73663443006834114e-06, + -1.95603491210153621e-08, + 2.31332017810938028e-10, + -2.81419108392816179e-12, + 3.48860358276571580e-14, + -4.39612185242490034e-16, + 5.71192495288178161e-18, + -8.27818090285447623e-20, + 1.67011405934975133e-21, + -5.47187360233036799e-23, + 2.32399265181995106e-24, + -1.00216941773924890e-25, + 5.76911929195984743e-03, + -3.89885472279657410e-05, + 3.95229411879359437e-07, + -4.45161628418865191e-09, + 5.26478545385565809e-11, + -6.40530758170370202e-13, + 7.94701001024052737e-15, + -1.00762757788076848e-16, + 1.35852557545726173e-18, + -2.30471295126032959e-20, + 6.47286150356941644e-22, + -2.75661625841163059e-23, + 1.29381479308669147e-24, + -5.74760667525922878e-26, + 7.54265315615651184e-04, + -5.09743470967555125e-06, + 5.16730260214846108e-08, + -5.82013092517484130e-10, + 6.88337194320452254e-12, + -8.37569319417197243e-14, + 1.04043644085915320e-15, + -1.33098338186000499e-17, + 1.88781203575406199e-19, + -3.81632671777716552e-21, + 1.35719683435370481e-22, + -6.49961565900580106e-24, + 3.16035528934414768e-25, + -1.41887910461499380e-26, + 5.30949284044131248e-05, + -3.58823249464180368e-07, + 3.63741477077025167e-09, + -4.09696483705699016e-11, + 4.84549872029995812e-13, + -5.89715716604084071e-15, + 7.33811613930867555e-17, + -9.50426540763561371e-19, + 1.44007767798591556e-20, + -3.48804347794060007e-22, + 1.46663242823933282e-23, + -7.48091051959073934e-25, + 3.70329118123572692e-26, + -1.67316572905374081e-27, + 1.81430608871326738e-06, + -1.22613444954350007e-08, + 1.24294063115353068e-10, + -1.39997592997886991e-12, + 1.65579943219614292e-14, + -2.01572488946865253e-16, + 2.51435033057451662e-18, + -3.31306464230340843e-20, + 5.46047305979879830e-22, + -1.58215023047212031e-23, + 7.50943049321528039e-25, + -3.98151920115567612e-26, + 1.99400169613338966e-27, + -9.05756653264152037e-29, + 2.52540597132244672e-08, + -1.70670610237287222e-10, + 1.73009953154021761e-12, + -1.94868835058734767e-14, + 2.30486428889417534e-16, + -2.80699882864778135e-18, + 3.51371575006963883e-20, + -4.74475771482331882e-22, + 8.70458238769905365e-24, + -3.00434217535530923e-25, + 1.56126527016019080e-26, + -8.50316621656506239e-28, + 4.29912611472042194e-29, + -1.96457762035915593e-30, + 1.02296614853623646e-10, + -6.91335412611877731e-13, + 7.00811529567532176e-15, + -7.89358460235140432e-17, + 9.33688125607364646e-19, + -1.13780962131504337e-20, + 1.43214123089889735e-22, + -2.00720659803029028e-24, + 4.23712238829154807e-26, + -1.73729437036577541e-27, + 9.69770383703012788e-29, + -5.39732644704295032e-30, + 2.75640081095183975e-31, + -1.27011081183721440e-32, + 5.18394513053425361e-14, + -3.50338561202657797e-16, + 3.55140772569935774e-18, + -4.00015411872661525e-20, + 4.73205264712369417e-22, + -5.77324182143475456e-24, + 7.34133199434503515e-26, + -1.09884491455137352e-27, + 2.83610285590792013e-29, + -1.39061089883960204e-30, + 8.26777746762233938e-32, + -4.70662703022431810e-33, + 2.43970471791592678e-34, + -1.14112938506237041e-35, +# root=10 base[25]=76.0 */ + 1.04690486935931429e-01, + -6.71217001789535528e-04, + 6.45511502101725957e-06, + -6.89764786724711914e-08, + 7.73903265057284172e-10, + -8.93111303886646686e-12, + 1.04974706337247748e-13, + -1.24968265432838566e-15, + 1.50041747224724047e-17, + -1.80351021689388289e-19, + 2.10925552760687933e-21, + -2.07375778321086757e-23, + -9.70310718080774956e-27, + 1.25260907599636975e-26, + 6.49272239357586295e-02, + -4.16277140941923550e-04, + 4.00335036208058905e-06, + -4.27780161581354854e-08, + 4.79961487739480599e-10, + -5.53893636683310945e-12, + 6.51052226549810003e-14, + -7.75201519542473274e-16, + 9.31980237841952761e-18, + -1.12933449701086302e-19, + 1.38009304149413458e-21, + -1.71449337430979837e-23, + 2.23757976318267679e-25, + -3.36652884201054643e-27, + 2.46905801706262772e-02, + -1.58302226693055986e-04, + 1.52239749693361607e-06, + -1.62676610049351431e-08, + 1.82520248980169574e-10, + -2.10636322475499032e-12, + 2.47596297020443934e-14, + -2.94927949745172059e-16, + 3.55552566158196470e-18, + -4.37985220699346381e-20, + 5.81484814232579577e-22, + -9.89457267227249574e-24, + 2.66218534005712433e-25, + -1.00640477175319551e-26, + 5.61916946334896795e-03, + -3.60269800110762275e-05, + 3.46472601512054886e-07, + -3.70225193748911193e-09, + 4.15386335539503181e-11, + -4.79377832495879388e-13, + 5.63537513318493732e-15, + -6.71690459904949253e-17, + 8.13296199663057617e-19, + -1.02762757104839491e-20, + 1.52866953498871907e-22, + -3.47586474211882453e-24, + 1.26357761326068018e-25, + -5.48399271462928172e-27, + 7.34660597954492280e-04, + -4.71023393269025146e-06, + 4.52984682283416034e-08, + -4.84039291817782497e-10, + 5.43084346037286415e-12, + -6.26755473506350704e-14, + 7.36872378804969156e-16, + -8.79096379243620621e-18, + 1.07113452613060109e-19, + -1.40217326739381395e-21, + 2.38942902990640309e-23, + -6.87804925377080869e-25, + 2.90810469912919686e-26, + -1.32804781454341332e-27, + 5.17148953312465267e-05, + -3.31567060385975841e-07, + 3.18869088655634011e-09, + -3.40729362185735266e-11, + 3.82293426994636478e-13, + -4.41199322245338300e-15, + 5.18797717728676908e-17, + -6.19727042433203047e-19, + 7.61743959185452211e-21, + -1.04521067067786349e-22, + 2.07056140550160440e-24, + -7.16699662860440584e-26, + 3.30175280209774439e-27, + -1.54686765736356162e-28, + 1.76714899696298843e-06, + -1.13299735895381267e-08, + 1.08960714321397036e-10, + -1.16430600261827829e-12, + 1.30633706515666452e-14, + -1.50765951191160464e-16, + 1.77322312572589533e-18, + -2.12201845698437613e-20, + 2.64023034670466515e-22, + -3.85246769753418715e-24, + 8.95654415320889253e-26, + -3.57830266909893160e-27, + 1.73963193944058246e-28, + -8.27950696379821243e-30, + 2.45976610931685924e-08, + -1.57706481512287088e-10, + 1.51666823308819871e-12, + -1.62064488948680337e-14, + 1.81834876761869776e-16, + -2.09864815960952843e-18, + 2.46910561649145330e-20, + -2.96249443581260948e-22, + 3.75046169641970683e-24, + -5.93279375914147613e-26, + 1.63026397086987569e-27, + -7.29346247962897536e-29, + 3.67970176245350494e-30, + -1.77193433024995970e-31, + 9.96377410818769600e-11, + -6.38821614715711030e-13, + 6.14356780351749938e-15, + -6.56474785385491152e-17, + 7.36561865410050937e-19, + -8.50146800377960503e-21, + 1.00071544868350790e-22, + -1.20554495438009957e-24, + 1.56696944121427898e-26, + -2.76649058311311307e-28, + 9.06160150035723504e-30, + -4.44625874122297474e-31, + 2.30826432868732845e-32, + -1.12370797924525520e-33, + 5.04920503355103919e-14, + -3.23726860895116929e-16, + 3.11329159788550049e-18, + -3.32672888785164120e-20, + 3.73260414688458488e-22, + -4.30860776226672847e-24, + 5.07632107929462439e-26, + -6.16071403624621255e-28, + 8.39002761160206319e-30, + -1.74689996425508120e-31, + 6.95036618110202880e-33, + -3.70125370031484737e-34, + 1.97372666375941941e-35, + -9.74391299656693755e-37, +# root=10 base[26]=80.0 */ + 1.02103938890331272e-01, + -6.22689192206672833e-04, + 5.69621055518368508e-06, + -5.78971098272239541e-08, + 6.17897574028150315e-10, + -6.78281874885975824e-12, + 7.58354008674688529e-14, + -8.58877726475573771e-16, + 9.81976001565390794e-18, + -1.13026755129586486e-19, + 1.30355852894549984e-21, + -1.48077758358443607e-23, + 1.52894008813248035e-25, + -7.91808539702258521e-28, + 6.33230917066156529e-02, + -3.86181035241125699e-04, + 3.53269097452147048e-06, + -3.59067832101622535e-08, + 3.83209362880430307e-10, + -4.20658739984696943e-12, + 4.70319036912882278e-14, + -5.32671543065524674e-16, + 6.09096513493731825e-18, + -7.01684774823441123e-20, + 8.13358792166313631e-22, + -9.48823612182159156e-24, + 1.11921822468271026e-25, + -1.36249414818063880e-27, + 2.40805593964781260e-02, + -1.46857253907057319e-04, + 1.34341474106690367e-06, + -1.36546622129193390e-08, + 1.45727188599021765e-10, + -1.59968533418606986e-12, + 1.78854138090750075e-14, + -2.02573014931412396e-16, + 2.31700032383965366e-18, + -2.67397140025666477e-20, + 3.13168347337207005e-22, + -3.84786520919894194e-24, + 5.60184928547932967e-26, + -1.20430141832619229e-27, + 5.48033878045284164e-03, + -3.34222926689250644e-05, + 3.05739072895740471e-07, + -3.10757627596340587e-09, + 3.31651101399981617e-11, + -3.64062286550607161e-13, + 4.07045496374553958e-15, + -4.61052488362315233e-17, + 5.27572000453524227e-19, + -6.10573741087607005e-21, + 7.26683557500457726e-23, + -9.62406939534561591e-25, + 1.76210420876282401e-26, + -5.22759788869777012e-28, + 7.16509617960043210e-04, + -4.36969229659636526e-06, + 3.99728913000249975e-08, + -4.06290265886706072e-10, + 4.33606810298788283e-12, + -4.75982225606707323e-14, + 5.32184336241103138e-16, + -6.02844613542758045e-18, + 6.90251002457083453e-20, + -8.02105236889466801e-22, + 9.76561008176753878e-24, + -1.42288812398632903e-25, + 3.23020187824765461e-27, + -1.15701071991422712e-28, + 5.04371950799545487e-05, + -3.07595344542417744e-07, + 2.81380803050660712e-09, + -2.85999531811636036e-11, + 3.05228471709545075e-13, + -3.35058183635365669e-15, + 3.74625465628101642e-17, + -4.24415043077283662e-19, + 4.86374341171542177e-21, + -5.68406352094657786e-23, + 7.13617917428100815e-25, + -1.16470018852979766e-26, + 3.19338988676619440e-28, + -1.28549554827886043e-29, + 1.72348871875515257e-06, + -1.05108364060550661e-08, + 9.61505966269441038e-11, + -9.77288626248533192e-13, + 1.04299595413697012e-14, + -1.14492904526554904e-16, + 1.28015809611375403e-18, + -1.45053156422373210e-20, + 1.66431674052493681e-22, + -1.96042685979720993e-24, + 2.56433624872519702e-26, + -4.76548837473194924e-28, + 1.53536717149489198e-29, + -6.67457668424636110e-31, + 2.39899360351543533e-08, + -1.46304579958539829e-10, + 1.33835901502607146e-12, + -1.36032755336135719e-14, + 1.45178852249659019e-16, + -1.59367733355477522e-18, + 1.78195545448339800e-20, + -2.01958010735715843e-22, + 2.32129491541497070e-24, + -2.76523818336856034e-26, + 3.82320919354668628e-28, + -8.22345539725589019e-30, + 3.03966817306088257e-31, + -1.39470745510722602e-32, + 9.71760293053225577e-11, + -5.92635934044140541e-13, + 5.42129061029545057e-15, + -5.51027866270187842e-17, + 5.88076133895275954e-19, + -6.45553514594105129e-21, + 7.21848662701605295e-23, + -8.18398750997841394e-25, + 9.43200287772368498e-27, + -1.14297574520194182e-28, + 1.70867173270665433e-30, + -4.33889685056409524e-32, + 1.80660619519364537e-33, + -8.63672368104779327e-35, + 4.92445624497196175e-14, + -3.00321977278552501e-16, + 2.74727302913743351e-18, + -2.79236837053880748e-20, + 2.98011435414283861e-22, + -3.27140694417340014e-24, + 3.65830320232884496e-26, + -4.15027238710254464e-28, + 4.80647459309618962e-30, + -6.00359464702626550e-32, + 1.01513620702336782e-33, + -3.14739708179494933e-35, + 1.46242319917377575e-36, + -7.24731972626156432e-38, +# root=10 base[27]=84.0 */ + 9.97001457526636853e-02, + -5.79740206460299082e-04, + 5.05658617105021627e-06, + -4.90046928133262129e-08, + 4.98662533194986473e-10, + -5.21927299485417762e-12, + 5.56393467217489245e-14, + -6.00837885847773238e-16, + 6.55065038865630960e-18, + -7.19429471513429499e-20, + 7.94444746426712585e-22, + -8.79509148290234635e-24, + 9.66591857623372436e-26, + -1.01030707809531378e-27, + 6.18323009011422370e-02, + -3.59544819315251005e-04, + 3.13600702688360062e-06, + -3.03918604020521427e-08, + 3.09261853131354656e-10, + -3.23690262013731050e-12, + 3.45065634000053104e-14, + -3.72629828630171273e-16, + 4.06265335185308712e-18, + -4.46220364737137148e-20, + 4.93004334664740639e-22, + -5.47400570333575587e-24, + 6.10769232094965591e-26, + -6.86468223289659241e-28, + 2.35136401957340355e-02, + -1.36728010965282877e-04, + 1.19256343055531134e-06, + -1.15574426318317456e-08, + 1.17606361893583991e-10, + -1.23093212996911254e-12, + 1.31221898989675313e-14, + -1.41704455809769419e-16, + 1.54499135335149166e-18, + -1.69722565869817287e-20, + 1.87718404264666754e-22, + -2.09693198629814483e-24, + 2.41148536196783472e-26, + -3.08140180442009492e-28, + 5.35131730590686014e-03, + -3.11170437750266270e-05, + 2.71407798675478784e-07, + -2.63028362536372213e-09, + 2.67652714166008355e-11, + -2.80139896157570914e-13, + 2.98639595425786738e-15, + -3.22497685371293593e-17, + 3.51629742150438589e-19, + -3.86381363739961958e-21, + 4.28075576131262578e-23, + -4.82739015595761720e-25, + 5.80903504813116279e-27, + -8.71488482625556051e-29, + 6.99641111990027906e-04, + -4.06829979687003770e-06, + 3.54843570686000271e-08, + -3.43888141144503510e-10, + 3.49934105528875788e-12, + -3.66260101338364843e-14, + 3.90447229701521036e-16, + -4.21642596705816062e-18, + 4.59755807669272907e-20, + -5.05390162745997152e-22, + 5.61298419952796410e-24, + -6.41571800194657059e-26, + 8.20274240142211570e-28, + -1.46224399986832223e-29, + 4.92497719037775119e-05, + -2.86379450261587773e-07, + 2.49784705595236305e-09, + -2.42072860327517285e-11, + 2.46328792013581975e-13, + -2.57821157948426389e-15, + 2.74847454762115897e-17, + -2.96809584501445224e-19, + 3.23663542445197747e-21, + -3.55982982942910473e-23, + 3.96713416033497062e-25, + -4.61903458188721687e-27, + 6.37441646438726608e-29, + -1.34865239528126682e-30, + 1.68291329727714269e-06, + -9.78586836613209251e-09, + 8.53538983556843766e-11, + -8.27186847818916305e-13, + 8.41729793783465975e-15, + -8.81000450202580674e-17, + 9.39182285196091222e-19, + -1.01424236491009285e-20, + 1.10612373134783396e-22, + -1.21749704279100693e-24, + 1.36324343964296088e-26, + -1.62756188479310264e-28, + 2.46601718717923301e-30, + -6.14330027203254156e-32, + 2.34251503447870321e-08, + -1.36213456808499403e-10, + 1.18807540756268403e-12, + -1.15139480560921492e-14, + 1.17163773462064538e-16, + -1.22630036200981302e-18, + 1.30728858031809678e-20, + -1.41179415350874615e-22, + 1.53992368000949409e-24, + -1.69681220068283590e-26, + 1.91281257352077017e-28, + -2.36407714617044298e-30, + 4.01131283001256993e-32, + -1.16479284232406091e-33, + 9.48882520174462929e-11, + -5.51759823420002497e-13, + 4.81253682620030125e-15, + -4.66395472385958086e-17, + 4.74595284244777830e-19, + -4.96737604162712259e-21, + 5.29545075908709332e-23, + -5.71893392486887464e-25, + 6.23940582281543948e-27, + -6.88646213064016615e-29, + 7.84312105158439709e-31, + -1.01920590980998415e-32, + 1.98804831133831139e-34, + -6.67137146189242696e-36, + 4.80852169575142202e-14, + -2.79607751787468420e-16, + 2.43878322660116544e-18, + -2.36348831852182838e-20, + 2.40504145871210410e-22, + -2.51725020907273619e-24, + 2.68351815282223413e-26, + -2.89826629631315080e-28, + 3.16333107879909759e-30, + -3.50169539382580793e-32, + 4.06104405052652187e-34, + -5.73036716144200213e-36, + 1.34354278078417627e-37, + -5.20358506962313682e-39, +# root=10 base[28]=88.0 */ + 9.74585475369953019e-02, + -5.41511594823777744e-04, + 4.51317709498519711e-06, + -4.17939447048369262e-08, + 4.06380821868854875e-10, + -4.06431422679672120e-12, + 4.14009349340240421e-14, + -4.27205444566957444e-16, + 4.45060432708568795e-18, + -4.67093498943748456e-20, + 4.93082253415357207e-22, + -5.22889267697441707e-24, + 5.56018996035785115e-26, + -5.89601663286118216e-28, + 6.04421005727041882e-02, + -3.35836097528541071e-04, + 2.79899414439770415e-06, + -2.59198795080480665e-08, + 2.52030336266450069e-10, + -2.52061718235306918e-12, + 2.56761419626213607e-14, + -2.64945437432087240e-16, + 2.76019049691603012e-18, + -2.89685647572268606e-20, + 3.05818282548425976e-22, + -3.24400201950944915e-24, + 3.45511816599471413e-26, + -3.69368567341461783e-28, + 2.29849736275086688e-02, + -1.27712037995333970e-04, + 1.06440388376579903e-06, + -9.85683391675280144e-09, + 9.58423115393267467e-11, + -9.58542456764912335e-13, + 9.76414542740102275e-15, + -1.00753701855813618e-16, + 1.04964987090909821e-18, + -1.10163757619381751e-20, + 1.16310345993728070e-22, + -1.23452121091104875e-24, + 1.31924072427658208e-26, + -1.43375242486246010e-28, + 5.23100150061048264e-03, + -2.90651567944405941e-05, + 2.42240796246688241e-07, + -2.24325308551393525e-09, + 2.18121318611577760e-11, + -2.18148479371762818e-13, + 2.22215879520008946e-15, + -2.29298922666107108e-17, + 2.38883842569204625e-19, + -2.50721234762022239e-21, + 2.64751819543256573e-23, + -2.81277027165288797e-25, + 3.02156822557750790e-27, + -3.36798817800230142e-29, + 6.83910801302858190e-04, + -3.80003230183732574e-06, + 3.16710092799780114e-08, + -2.93287053174029444e-10, + 2.85175842178584055e-12, + -2.85211353839800134e-14, + 2.90529162381705439e-16, + -2.99789814580080376e-18, + 3.12322686385144518e-20, + -3.27810123843458101e-22, + 3.46233075465981592e-24, + -3.68351125885770923e-26, + 3.98670017986578919e-28, + -4.60186553513360774e-30, + 4.81424696025802319e-05, + -2.67495321365770956e-07, + 2.22941441872393359e-09, + -2.06453283318071971e-11, + 2.00743566163742722e-13, + -2.00768565006718145e-15, + 2.04511939133880162e-17, + -2.11030928730212362e-19, + 2.19854522230560075e-21, + -2.30767365413495206e-23, + 2.43813391291132478e-25, + -2.59886354548954741e-27, + 2.84198534225848583e-29, + -3.43479530409895195e-31, + 1.64507568514704590e-06, + -9.14057905010032335e-09, + 7.61812902960540001e-11, + -7.05471238428638505e-13, + 6.85960571943443429e-15, + -6.86046000886416923e-17, + 6.98837546115905431e-19, + -7.21114272801038592e-21, + 7.51271707958318438e-23, + -7.88613102532715851e-25, + 8.33561054936997645e-27, + -8.90879023521276299e-29, + 9.88112657630549250e-31, + -1.26700105205384101e-32, + 2.28984733292392974e-08, + -1.27231414020823379e-10, + 1.06039816877973343e-12, + -9.81973928873423227e-15, + 9.54816244380195870e-17, + -9.54935167035760283e-19, + 9.72740366590977830e-21, + -1.00374961424753657e-22, + 1.04573949675269618e-24, + -1.09781768523136315e-26, + 1.16111336410300218e-28, + -1.24565993985653827e-30, + 1.40923503406005368e-32, + -1.95007347113342217e-34, + 9.27548415313858136e-11, + -5.15376264418773299e-13, + 4.29535465929835380e-15, + -3.97768160595981679e-17, + 3.86767398295014503e-19, + -3.86815576745461198e-21, + 3.94028007987109129e-23, + -4.06589758475217891e-25, + 4.23606252985339289e-27, + -4.44763580466567898e-29, + 4.70852219557788991e-31, + -5.08040063872580705e-33, + 5.91797632108232608e-35, + -9.05889980297425617e-37, + 4.70040978105109554e-14, + -2.61170155023778421e-16, + 2.17669791898661812e-18, + -2.01571510660397851e-20, + 1.95996805734435721e-22, + -1.96021226094636691e-24, + 1.99676240436872302e-26, + -2.06042721510431248e-28, + 2.14672709020096093e-30, + -2.25449489374433144e-32, + 2.39072237832380323e-34, + -2.60564863181559395e-36, + 3.18868333997612771e-38, + -5.64763587971900722e-40, +# root=10 base[29]=92.0 */ + 9.53616839753069073e-02, + -5.07307597915854225e-04, + 4.04814429123171612e-06, + -3.58919511143007259e-08, + 3.34138901470764515e-10, + -3.19956741295474495e-12, + 3.12050082498673906e-14, + -3.08291208516930952e-16, + 3.07506191926095993e-18, + -3.08995033611757066e-20, + 3.12316477428163219e-22, + -3.17177470338118161e-24, + 3.23353685586166867e-26, + -3.30509458556092285e-28, + 5.91416621659579880e-02, + -3.14623371981687463e-04, + 2.51058886641592219e-06, + -2.22595654647740613e-08, + 2.07227150398036274e-10, + -1.98431620685462440e-12, + 1.93528048189595090e-14, + -1.91196861167603827e-16, + 1.90710020607340285e-18, + -1.91633481771575446e-20, + 1.93694170645546564e-22, + -1.96714085472838078e-24, + 2.00575878110750887e-26, + -2.05186673097329974e-28, + 2.24904417995271735e-02, + -1.19645244607245697e-04, + 9.54728878336629614e-07, + -8.46488656615091596e-09, + 7.88045177402337894e-11, + -7.54597461975558389e-13, + 7.35950115652562422e-15, + -7.27085068825547481e-17, + 7.25233810072008294e-19, + -7.28746397260305961e-21, + 7.36588969896348745e-23, + -7.48113977785354425e-25, + 7.63045937609890545e-27, + -7.81936196084922712e-29, + 5.11845420009172849e-03, + -2.72292874564088786e-05, + 2.17280571045688644e-07, + -1.92646878989952284e-09, + 1.79346105520695998e-11, + -1.71733956308259363e-13, + 1.67490127728346639e-15, + -1.65472593032418156e-17, + 1.65051313892728054e-19, + -1.65851023052544646e-21, + 1.67638079932060083e-23, + -1.70275670930624846e-25, + 1.73762555749421588e-27, + -1.78549938046936640e-29, + 6.69196159283873466e-04, + -3.56000735252038252e-06, + 2.84076633191677788e-08, + -2.51870089051299336e-10, + 2.34480412068289897e-12, + -2.24528147597798001e-14, + 2.18979688403210230e-16, + -2.16341933732095130e-18, + 2.15791214825091861e-20, + -2.16837337111937995e-22, + 2.19177936273463979e-24, + -2.22654015492915289e-26, + 2.27379747717034162e-28, + -2.34559370400821636e-30, + 4.71066631717381997e-05, + -2.50599267371094950e-07, + 1.99969800918204830e-09, + -1.77298678173615204e-11, + 1.65057578987775855e-13, + -1.58051890744842417e-15, + 1.54146169693806850e-17, + -1.52289384769384064e-19, + 1.51901785221702506e-21, + -1.52638735307672093e-23, + 1.54290423906690802e-25, + -1.56764380511443391e-27, + 1.60254444467056382e-29, + -1.66211117693015724e-31, + 1.60968115744699894e-06, + -8.56322421494050543e-09, + 6.83316539367190642e-11, + -6.05847076147831963e-13, + 5.64018032502944109e-15, + -5.40078904832175973e-17, + 5.26732673862909133e-19, + -5.20387890812134366e-21, + 5.19063742980416311e-23, + -5.21584589146449397e-25, + 5.27247818399949619e-27, + -5.35829568006023205e-29, + 5.48530507983316531e-31, + -5.73172203734660507e-33, + 2.24058025932615110e-08, + -1.19194978728643984e-10, + 9.51135907812675831e-13, + -8.43303030982410338e-15, + 7.85079494619629091e-17, + -7.51757655803122945e-19, + 7.33180503801333634e-21, + -7.24349010889586018e-23, + 7.22506500109460213e-25, + -7.26020508983159224e-27, + 7.33941303997600330e-29, + -7.46139304788487414e-31, + 7.65352066405470176e-33, + -8.08156844531893375e-35, + 9.07591802754705539e-11, + -4.82823077519097791e-13, + 3.85276603970508791e-15, + -3.41596742618154824e-17, + 3.18012135878384435e-19, + -3.04514459569164895e-21, + 2.96989416744939298e-23, + -2.93412084550743534e-25, + 2.92666116489412704e-27, + -2.94092656635958367e-29, + 2.97324217486523289e-31, + -3.02419609464263993e-33, + 3.11142078028836742e-35, + -3.33711769573126275e-37, + 4.59927839500053457e-14, + -2.44673623351514041e-16, + 1.95241335957725116e-18, + -1.73106292208281036e-20, + 1.61154644810553812e-22, + -1.54314612928278676e-24, + 1.50501253539927576e-26, + -1.48688453133460777e-28, + 1.48310758408836933e-30, + -1.49036399296218743e-32, + 1.50694326857767805e-34, + -1.53412976859703843e-36, + 1.58669180574404311e-38, + -1.74786337210801619e-40, +# root=10 base[30]=96.0 */ + 9.33946183175933392e-02, + -4.76558984233788356e-04, + 3.64753074305698165e-06, + -3.10197153944395011e-08, + 2.76990949381530379e-10, + -2.54406156457809021e-12, + 2.37989872651748608e-14, + -2.25524197714598810e-16, + 2.15766357315607626e-18, + -2.07959807512389360e-20, + 2.01614675278786356e-22, + -1.96398026690125277e-24, + 1.92073498002930357e-26, + -1.88442853505101528e-28, + 5.79217221676576535e-02, + -2.95553615171109414e-04, + 2.26213529326601359e-06, + -1.92378893898011255e-08, + 1.71784981854930428e-10, + -1.57778285061678068e-12, + 1.47597190623997134e-14, + -1.39866195336288828e-16, + 1.33814552617911813e-18, + -1.28973071087253447e-20, + 1.25037969264136258e-22, + -1.21802958552071728e-24, + 1.19122587663441825e-26, + -1.16880082160933994e-28, + 2.20265219750606610e-02, + -1.12393381200432080e-04, + 8.60246741342690446e-07, + -7.31580100763749530e-09, + 6.53265396160369397e-11, + -6.00000609971978042e-13, + 5.61283857139161944e-15, + -5.31884362753022259e-17, + 5.08871129054210687e-19, + -4.90459942734659230e-21, + 4.75495810195056711e-23, + -4.63195753316023092e-25, + 4.53015559939426427e-27, + -4.44559498475865974e-29, + 5.01287368748052839e-03, + -2.55788827625412252e-05, + 1.95777992517394212e-07, + -1.66495583894513822e-09, + 1.48672446746870117e-11, + -1.36550258530994266e-13, + 1.27738963158150450e-15, + -1.21048122548822134e-17, + 1.15810691283819696e-19, + -1.11620623161497457e-21, + 1.08215142920666002e-23, + -1.05416595505223459e-25, + 1.03104328717855344e-27, + -1.01205656966686050e-29, + 6.55392367988178858e-04, + -3.34423039345713068e-06, + 2.55963764729201637e-08, + -2.17679402656260278e-10, + 1.94377103838597233e-12, + -1.78528330990888551e-14, + 1.67008280650063013e-16, + -1.58260552363738461e-18, + 1.51413041260373711e-20, + -1.45934896348796672e-22, + 1.41482714772650663e-24, + -1.37825237158424446e-26, + 1.34810737844015826e-28, + -1.32376872164626639e-30, + 4.61349741713782587e-05, + -2.35410099905322211e-07, + 1.80180335496422452e-09, + -1.53230860011622077e-11, + 1.36827694418225534e-13, + -1.25671282449952963e-15, + 1.17561984129990520e-17, + -1.11404204211325007e-19, + 1.06584045282389603e-21, + -1.02727846645722555e-23, + 9.95940274663921673e-26, + -9.70207828207189280e-28, + 9.49071842646662451e-30, + -9.32412993415188723e-32, + 1.57647758560673538e-06, + -8.04419537653977166e-09, + 6.15693983531987692e-11, + -5.23604966883128938e-13, + 4.67553731664982048e-15, + -4.29431171255462610e-17, + 4.01720898955441535e-19, + -3.80679159023239339e-21, + 3.64208215460599700e-23, + -3.51031330326068075e-25, + 3.40323706086387668e-27, + -3.31537083653539038e-29, + 3.24354318944165300e-31, + -3.18885729544283556e-33, + 2.19436286573846378e-08, + -1.11970406558176815e-10, + 8.57009339337489058e-13, + -7.28826915228535110e-15, + 6.50806935583987889e-17, + -5.97742603025372272e-19, + 5.59171555369529492e-21, + -5.29882710250338129e-23, + 5.06956167625909620e-25, + -4.88614975077478413e-27, + 4.73712450772354946e-29, + -4.61494568357181288e-31, + 4.51574453103540106e-33, + -4.44403574218455912e-35, + 8.88870524018862117e-11, + -4.53558504411156379e-13, + 3.47148756680049019e-15, + -2.95225904600027272e-17, + 2.63622352939803443e-19, + -2.42127584779572120e-21, + 2.26503611415265880e-23, + -2.14639581344841118e-25, + 2.05352744816404887e-27, + -1.97923426616211197e-29, + 1.91887978126383553e-31, + -1.86946488324738094e-33, + 1.82975400354847402e-35, + -1.80339175636626161e-37, + 4.50440714059386731e-14, + -2.29843617348181395e-16, + 1.75919810161769765e-18, + -1.49607579150728492e-20, + 1.33592281094031331e-22, + -1.22699672500546178e-24, + 1.14782126133045590e-26, + -1.08769956065478702e-28, + 1.04063808585292532e-30, + -1.00299083091563284e-32, + 9.72415503622946120e-35, + -9.47440473859238106e-37, + 9.27730348877915447e-39, + -9.16732804946075812e-41, + ])","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/mmd_4c2e_symm.py",".py","32123","570","import numpy as np +from numba import njit, prange + +from .integral_helpers import hermite_gauss_coeff, aux_hermite_int, Fboys + +def mmd_4c2e_symm(basis, slice=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the 4c2e electron-electron ERIs for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + indx_startD = int(slice[6]) + indx_endD = int(slice[7]) + + ints4c2e = mmd_4c2e_symm_internal2(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,\ + indx_startA,indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD,indx_endD) + + return ints4c2e + +@njit(parallel=True, cache=False, fastmath=True, error_model=""numpy"") +def mmd_4c2e_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD): + # This function calculates the 4D electron-electron repulsion integrals (ERIs) array for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # returns (AB|CD) + + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + num_D = indx_endD - indx_startD + array_shape = (num_A, num_B, num_C, num_D) + + + # Check if the slice of the matrix requested has some symmetries that can be used + all_symm = False + left_side_symm = False + right_side_symm = False + both_left_right_symm = False + no_symm = False + if indx_startA==indx_startB==indx_startC==indx_startD and indx_endA==indx_endB==indx_endC==indx_endD: + all_symm = True + elif (indx_startA==indx_startB and indx_endA==indx_endB) and (indx_startC==indx_startD and indx_endC==indx_endD): + both_left_right_symm = True + elif indx_startA==indx_startB and indx_endA==indx_endB: + left_side_symm = True + elif indx_startC==indx_startD and indx_endC==indx_endD: + right_side_symm = True + else: + no_symm = True + + + # Initialize the 4c2e array with zeros + fourC2E = np.zeros(array_shape, dtype=np.float64) + + + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + two_pi_2_5 = 2*np.power(np.pi,2.5) + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(indx_startB, indx_endB): #B + if (all_symm and j<=i) or (left_side_symm and j<=i) or right_side_symm or no_symm or (both_left_right_symm and j<=i): + if all_symm: + if itriangle2kl: + continue + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff3 = tempcoeff2*Nl + npriml = bfs_nprim[l] + + val = 0.0 + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + tempP = alphaik*alphajk/gammaP + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + # PI = P - I + # PJ = P - J + # fac1 = twopisq/gammaP*screenfactorAB + # onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in range(nprimk): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in range(npriml): + alphalk = bfs_expnts[l][lk] + gammaQ = alphakk + alphalk + tempQ = alphakk*alphalk/gammaQ + alpha = gammaP*gammaQ/(gammaP+gammaQ) + + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + RPQ = np.linalg.norm(PQ) + T = alpha*RPQ*RPQ + # boys = Fboys(0,T) + + # QK = Q - K + # QL = Q - L + tempcoeff7 = tempcoeff6*dlk*Nlk + + # fac2 = fac1/gammaQ + + + # omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))*screenfactorKL + # delta = 0.25*(1/gammaQ) + onefourthgammaPinv + # PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + # sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + sum1 = 0.0 + for t in range(la+lb+1): + # if t%2 == 0: + # t_temp = t/2 + # else: + # t_temp = t//2 + 1 + for u in range(ma+mb+1): + # if u%2 == 0: + # u_temp = u/2 + # else: + # u_temp = u//2 + 1 + for v in range(na+nb+1): + # if v%2 == 0: + # v_temp = v/2 + # else: + # v_temp = v//2 + 1 + # n_min = int(t_temp + u_temp + v_temp) + # n_max = int(t + u + v) + # n = np.arange(n_min,n_max+1,1) + # boys = np.zeros((n.shape[0]),dtype=np.float64) + # for n_i in n: + # boys[n_i-n_min] = np.power(-2.0*alpha,n_i)*Fboys(n_i,T) + # print(n_min, n_max) + # print(boys) + for tau in range(lc+ld+1): + for nu in range(mc+md+1): + for phi in range(nc+nd+1): + sum1 += hermite_gauss_coeff(la,lb,t,IJ[0],alphaik,alphajk,gammaP,tempP) * \ + hermite_gauss_coeff(ma,mb,u,IJ[1],alphaik,alphajk,gammaP,tempP) * \ + hermite_gauss_coeff(na,nb,v,IJ[2],alphaik,alphajk,gammaP,tempP) * \ + hermite_gauss_coeff(lc,ld,tau,KL[0],alphakk,alphalk,gammaQ,tempQ) * \ + hermite_gauss_coeff(mc,md,nu ,KL[1],alphakk,alphalk,gammaQ,tempQ) * \ + hermite_gauss_coeff(nc,nd,phi,KL[2],alphakk,alphalk,gammaQ,tempQ) * \ + np.power(-1,tau+nu+phi) * \ + aux_hermite_int(t+tau,u+nu,v+phi,0,\ + alpha,PQ[0],PQ[1],PQ[2],RPQ,T,boys=None,n_min=None) + + sum1 *= two_pi_2_5/(gammaP*gammaQ*np.sqrt(gammaP+gammaQ)) + + val += sum1*tempcoeff7 + + + fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] = val + # return fourC2E + + + + # Symmetries that can be used (for reference) + # fourC2E[j,i,k,l] = fourC2E[i,j,k,l] + # fourC2E[i,j,l,k] = fourC2E[i,j,k,l] + # fourC2E[j,i,l,k] = fourC2E[i,j,k,l] + # fourC2E[k,l,i,j] = fourC2E[i,j,k,l] + # fourC2E[k,l,j,i] = fourC2E[i,j,k,l] + # fourC2E[l,k,i,j] = fourC2E[i,j,k,l] + # fourC2E[l,k,j,i] = fourC2E[i,j,k,l] + + + if all_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + fourC2E[k-indx_startC, l-indx_startD, i-indx_startA, j-indx_startB] = val + fourC2E[k-indx_startC, l-indx_startD, j-indx_startB, i-indx_startA] = val + fourC2E[l-indx_startD, k-indx_startC, i-indx_startA, j-indx_startB] = val + fourC2E[l-indx_startD, k-indx_startC, j-indx_startB, i-indx_startA] = val + + if left_side_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + fourC2E[j-indx_startB, i-indx_startA, :, :] = fourC2E[i-indx_startA, j-indx_startB, :, :] + + if right_side_symm: + # Fill the remaining values of the array using symmetries + for k in range(indx_startC, indx_endC): + for l in range(indx_startD, indx_endD): + if l<=k: + fourC2E[:, :, l-indx_startD, k-indx_startC] = fourC2E[:, :, k-indx_startC, l-indx_startD] + + if both_left_right_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + + + return fourC2E + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def mmd_4c2e_symm_internal2(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD): + # This function calculates the 4D electron-electron repulsion integrals (ERIs) array for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # Some useful resources: + # https://chemistry.stackexchange.com/questions/71527/how-does-one-compute-the-number-of-unique-2-electron-integrals-for-a-given-basis + # returns (AB|CD) + + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + num_D = indx_endD - indx_startD + array_shape = (num_A, num_B, num_C, num_D) + + + # Check if the slice of the matrix requested has some symmetries that can be used + all_symm = False + left_side_symm = False + right_side_symm = False + both_left_right_symm = False + no_symm = False + if indx_startA==indx_startB==indx_startC==indx_startD and indx_endA==indx_endB==indx_endC==indx_endD: + all_symm = True + elif (indx_startA==indx_startB and indx_endA==indx_endB) and (indx_startC==indx_startD and indx_endC==indx_endD): + both_left_right_symm = True + elif indx_startA==indx_startB and indx_endA==indx_endB: + left_side_symm = True + elif indx_startC==indx_startD and indx_endC==indx_endD: + right_side_symm = True + else: + no_symm = True + + + # Initialize the 4c2e array with zeros + fourC2E = np.zeros(array_shape, dtype=np.float64) + + + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + two_pi_2_5 = 2*np.power(np.pi,2.5) + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff1 = dik*Nik*Ni + + for j in range(indx_startB, indx_endB): #B + if (all_symm and j<=i) or (left_side_symm and j<=i) or right_side_symm or no_symm or (both_left_right_symm and j<=i): + if all_symm: + if itriangle2kl: + continue + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff6 = tempcoeff5*Nl + npriml = bfs_nprim[l] + + val = 0.0 + + for lk in range(npriml): + alphalk = bfs_expnts[l][lk] + gammaQ = alphakk + alphalk + tempQ = alphakk*alphalk/gammaQ + alpha = gammaP*gammaQ/(gammaP+gammaQ) + + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + RPQ = np.linalg.norm(PQ) + T = alpha*RPQ*RPQ + tempcoeff7 = tempcoeff6*dlk*Nlk + + + + + + + + + + + + sum1 = 0.0 + for t in range(la+lb+1): + for u in range(ma+mb+1): + for v in range(na+nb+1): + for tau in range(lc+ld+1): + for nu in range(mc+md+1): + for phi in range(nc+nd+1): + sum1 += hermite_gauss_coeff(la,lb,t,IJ[0],alphaik,alphajk,gammaP,tempP) * \ + hermite_gauss_coeff(ma,mb,u,IJ[1],alphaik,alphajk,gammaP,tempP) * \ + hermite_gauss_coeff(na,nb,v,IJ[2],alphaik,alphajk,gammaP,tempP) * \ + hermite_gauss_coeff(lc,ld,tau,KL[0],alphakk,alphalk,gammaQ,tempQ) * \ + hermite_gauss_coeff(mc,md,nu ,KL[1],alphakk,alphalk,gammaQ,tempQ) * \ + hermite_gauss_coeff(nc,nd,phi,KL[2],alphakk,alphalk,gammaQ,tempQ) * \ + np.power(-1,tau+nu+phi) * \ + aux_hermite_int(t+tau,u+nu,v+phi,0,\ + alpha,PQ[0],PQ[1],PQ[2],RPQ,T,boys=None,n_min=None) + + sum1 *= two_pi_2_5/(gammaP*gammaQ*np.sqrt(gammaP+gammaQ)) + + val += sum1*tempcoeff7 + + + fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] += val + + + + # Symmetries that can be used (for reference) + # fourC2E[j,i,k,l] = fourC2E[i,j,k,l] + # fourC2E[i,j,l,k] = fourC2E[i,j,k,l] + # fourC2E[j,i,l,k] = fourC2E[i,j,k,l] + # fourC2E[k,l,i,j] = fourC2E[i,j,k,l] + # fourC2E[k,l,j,i] = fourC2E[i,j,k,l] + # fourC2E[l,k,i,j] = fourC2E[i,j,k,l] + # fourC2E[l,k,j,i] = fourC2E[i,j,k,l] + + + if all_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + fourC2E[k-indx_startC, l-indx_startD, i-indx_startA, j-indx_startB] = val + fourC2E[k-indx_startC, l-indx_startD, j-indx_startB, i-indx_startA] = val + fourC2E[l-indx_startD, k-indx_startC, i-indx_startA, j-indx_startB] = val + fourC2E[l-indx_startD, k-indx_startC, j-indx_startB, i-indx_startA] = val + + if left_side_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + fourC2E[j-indx_startB, i-indx_startA, :, :] = fourC2E[i-indx_startA, j-indx_startB, :, :] + + if right_side_symm: + # Fill the remaining values of the array using symmetries + for k in range(indx_startC, indx_endC): + for l in range(indx_startD, indx_endD): + if l<=k: + fourC2E[:, :, l-indx_startD, k-indx_startC] = fourC2E[:, :, k-indx_startC, l-indx_startD] + + if both_left_right_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + + + return fourC2E","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/make_taylor.py",".py","1486","45","# The following source code was obtained from https://github.com/peter-reinholdt/pyboys under the BSD-3 license + +#!/usr/bin/env python +import sympy +import mpmath +import numpy as np + +max_order = 16 +max_angular = 10 +expansion_points = np.arange(-50, 50, dtype=np.float64) +offset = - int(expansion_points[0]) +num_points = len(expansion_points) + + +z,z0 = sympy.symbols('z z0', assume='real') +a = sympy.symbols('a', assume='integer') +f = sympy.Function('fun') + + +hyp = sympy.hyper([a],[a+1], z) +gen = sympy.series(hyp, z, x0=z0, n=None) +exp = 0 +for i in range(max_order): + # nextgen = next(gen).subs(sympy.hyper((a+i,), (a+i+1,), z0), 'table[ai+{},{}]'.format(i,'zi')) + nextgen = next(gen).subs(sympy.hyper((a+i,), (a+i+1,), z0), 'table(ai+{},{})'.format(i,'zi')) # Fixed by bing chat + print(nextgen) + exp += nextgen + + +with open(""taylor.py"", ""w"") as f: + f.write(""import numpy as np\n"") + f.write(""from numba import jit\n"") + f.write(""\n\n"") + f.write(""table = np.array([\n"") + for i in range(max_angular+max_order): + print(i) + f.write(""{},\n"".format([float(mpmath.hyp1f1(i+0.5, i+1.5, x)) for x in expansion_points])) + f.write(""])\n"") + f.write(""\n\n"") + f.write(""@jit(nopython=True, cache=True)\n"") + f.write(""def taylor(a,z):\n"") + f.write("" z0 = int(np.round(z))\n"") + f.write("" zi = z0 + {}\n"".format(offset)) + f.write("" ai = a\n"") + f.write("" return {}\n"".format(exp.subs(a,a+0.5).evalf()))","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/overlap_mat_symm.py",".py","8549","184","import numpy as np +from numba import njit , prange + +from .integral_helpers import calcS + +def overlap_mat_symm(basis, slice=None): + """""" + Compute the overlap matrix for a given basis set using symmetry-aware integrals. + + This function evaluates the overlap integrals ⟨χ_i | χ_j⟩ between all pairs + of basis functions defined in the `basis` object. It supports partial evaluation + of the overlap matrix by specifying a slice. + + The integrals are computed using an efficient Numba-accelerated backend that + benefits from parallelization via `prange` and preprocessed NumPy arrays. + + Parameters + ---------- + basis : object + A basis set object that contains information about basis functions, such as: + - bfs_coords: Cartesian coordinates of the basis function centers. + - bfs_coeffs: Contraction coefficients. + - bfs_expnts: Gaussian exponents. + - bfs_prim_norms: Primitive normalization constants. + - bfs_contr_prim_norms: Contraction normalization factors. + - bfs_lmn: Angular momentum quantum numbers (ℓ, m, n). + - bfs_nprim: Number of primitives per basis function. + - bfs_nao: Total number of atomic orbitals. + + slice : list of int, optional + A 4-element list specifying a sub-block of the matrix to compute: + [start_row, end_row, start_col, end_col]. + If None (default), the full overlap matrix is computed. + + Returns + ------- + S : ndarray of shape (end_row - start_row, end_col - start_col) + The computed (sub)matrix of overlap integrals. + + Notes + ----- + This function is optimized for performance using preallocated NumPy arrays + and avoids nested Python lists which are not supported efficiently by Numba. + + Examples + -------- + >>> S = overlap_mat_symm(basis) + >>> S_block = overlap_mat_symm(basis, slice=[0, 10, 0, 10]) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + S = overlap_mat_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d) + return S + +@njit(parallel=True, cache=True) +def overlap_mat_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col): + # This function calculates the overlap matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the overlap matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (num_rows, num_cols) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + + # Initialize the matrix with zeros + S = np.zeros(matrix_shape) + + for i in prange(start_row, end_row): + I = bfs_coords[i] + lmni = bfs_lmn[i] + Ni = bfs_contr_prim_norms[i] + for j in prange(start_col, end_col): #Because we are only evaluating the lower triangular matrix. + if lower_tri or upper_tri or (both_tri_symm and j<=i) or both_tri_nonsymm: + result = 0.0 + + J = bfs_coords[j] + IJ = I - J + tempfac = np.sum(IJ**2) + + Nj = bfs_contr_prim_norms[j] + + lmnj = bfs_lmn[j] + for ik in prange(bfs_nprim[i]): + alphaik = bfs_expnts[i][ik] + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + for jk in prange(bfs_nprim[j]): + + alphajk = bfs_expnts[j][jk] + gamma = alphaik + alphajk + screenfactor = np.exp(-alphaik*alphajk/gamma*tempfac) + if (abs(screenfactor)<1.0e-12): + continue + + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + temp = dik*djk + temp = temp*Nik*Njk + temp = temp*Ni*Nj + temp = temp*screenfactor*Sx*Sy*Sz + result += temp + S[i - start_row, j - start_col] = result + + if both_tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Si,j=Sj,i + for i in prange(start_row, end_row): + for j in prange(start_col, end_col): + if j>i: + S[i-start_row, j-start_col] = S[j-start_col, i-start_row] + return S","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/conv_3c2e_symm.py",".py","13213","284","import numpy as np +from numba import njit, prange + +from .integral_helpers import innerLoop4c2e + +def conv_3c2e_symm(basis, auxbasis, slice=None): + """""" + Compute three-center two-electron (3c2e) electron repulsion integrals (ERIs) + using the conventional and slow (analytical) formula-based method with symmetry exploitation. + + This function evaluates integrals of the form (A B | C), where: + - A and B are primary basis functions from `basis` + - C is an auxiliary basis function from `auxbasis` + + The ""conv"" variant uses explicit analytical integral formulas and nested + loops over primitive Gaussians, following the derivations in: + + J. Chem. Educ. 2018, 95, 9, 1572–1578 + https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + Compared to the Rys quadrature method, this conventional approach is + significantly more computationally expensive, but can be useful for + validation or when Rys is not applicable. + + Symmetries exploited + -------------------- + For 3c2e integrals, the following bra symmetry is used: + + (A B | C) = (B A | C) + + This reduces the number of computed integrals from N_bf² * N_aux + to N_bf*(N_bf+1)/2 * N_aux when the full tensor is computed. + + Parameters + ---------- + basis : object + Primary basis set object containing: + - bfs_coords : Cartesian coordinates of basis function centers + - bfs_coeffs : Contraction coefficients + - bfs_expnts : Gaussian exponents + - bfs_prim_norms : Primitive normalization constants + - bfs_contr_prim_norms : Contraction normalization factors + - bfs_lmn : Angular momentum quantum numbers (ℓ, m, n) + - bfs_nprim : Number of primitives per basis function + - bfs_nao : Total number of atomic orbitals + + auxbasis : object + Auxiliary basis set object with the same attributes as `basis`. + + slice : list of int, optional + A 6-element list specifying a sub-block of integrals to compute: + [start_A, end_A, start_B, end_B, start_C, end_C] + If None (default), computes the full (Nbf, Nbf, Naux) tensor. + + **Note:** When slices are used, AB symmetry exploitation is limited + to permutations that lie entirely within the specified slice. + + Returns + ------- + ints3c2e : ndarray + The computed 3-center 2-electron integrals for the requested range. + Shape: (Nbf, Nbf, Nauxbf) or + (end_A - start_A, end_B - start_B, end_C - start_C) + if slice is given. + + Notes + ----- + - All basis set data are pre-packed into NumPy arrays for Numba acceleration. + - Uses explicit primitive Gaussian formula evaluation without numerical quadrature. + - Symmetry exploitation is maximal only for full-range computations. + - Conventional evaluation scales poorly compared to Rys quadrature, but is + exact for the given formula set. + + Examples + -------- + >>> eri_full = conv_3c2e_symm(basis, auxbasis) + >>> eri_block = conv_3c2e_symm(basis, auxbasis, slice=[0,5, 0,5, 0,10]) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 3c2e integrals efficiently. + # This function calculates the 3c2e electron-electron ERIs for a given basis object and auxbasis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is an 6 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + # slice = [indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC] + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + #We convert the required properties to numpy arrays as this is what Numba likes. + aux_bfs_coords = np.array([auxbasis.bfs_coords]) + aux_bfs_contr_prim_norms = np.array([auxbasis.bfs_contr_prim_norms]) + aux_bfs_lmn = np.array([auxbasis.bfs_lmn]) + aux_bfs_nprim = np.array([auxbasis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + maxnprimaux = max(auxbasis.bfs_nprim) + aux_bfs_coeffs = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_expnts = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + aux_bfs_prim_norms = np.zeros([auxbasis.bfs_nao, maxnprimaux]) + for i in range(auxbasis.bfs_nao): + for j in range(auxbasis.bfs_nprim[i]): + aux_bfs_coeffs[i,j] = auxbasis.bfs_coeffs[i][j] + aux_bfs_expnts[i,j] = auxbasis.bfs_expnts[i][j] + aux_bfs_prim_norms[i,j] = auxbasis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, auxbasis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + + ints3c2e = conv_3c2e_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords[0], aux_bfs_contr_prim_norms[0], aux_bfs_lmn[0], aux_bfs_nprim[0], aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts,indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC) + return ints3c2e + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def conv_3c2e_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts,aux_bfs_coords, aux_bfs_contr_prim_norms, aux_bfs_lmn, aux_bfs_nprim, aux_bfs_coeffs, aux_bfs_prim_norms, aux_bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC): + # This function calculates the three-centered two electron integrals for density fitting + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # The integrals are performed using the formulas https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + # returns (AB|P) + + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + matrix_shape = (num_A, num_B, num_C) + + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + tri_symm = False + no_symm = False + if indx_startA==indx_startB and indx_endA==indx_endB: + tri_symm = True + else: + no_symm = True + + + # Initialize the matrix with zeros + threeC2E = np.zeros(matrix_shape, dtype=np.float64) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + L = np.zeros((3)) + ld, md, nd = int(0), int(0), int(0) + alphalk = 0.0 + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in prange(indx_startB, indx_endB): #B + if (tri_symm and j<=i) or no_symm: + J = bfs_coords[j] + IJ = I - J + IJsq = np.sum(IJ**2) + Nj = bfs_contr_prim_norms[j] + lmnj = bfs_lmn[j] + lb, mb, nb = lmnj + tempcoeff1 = Ni*Nj + nprimj = bfs_nprim[j] + + for k in prange(indx_startC, indx_endC): #C + K = aux_bfs_coords[k] + Nk = aux_bfs_contr_prim_norms[k] + lmnk = aux_bfs_lmn[k] + lc, mc, nc = lmnk + tempcoeff2 = tempcoeff1*Nk + nprimk = aux_bfs_nprim[k] + + + + KL = K #- L + KLsq = np.sum(KL**2) + + val = 0.0 + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff3 = tempcoeff2*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff4 = tempcoeff3*djk*Njk + + for kk in range(nprimk): + dkk = aux_bfs_coeffs[k][kk] + Nkk = aux_bfs_prim_norms[k][kk] + alphakk = aux_bfs_expnts[k][kk] + tempcoeff5 = tempcoeff4*dkk*Nkk + + + gammaQ = alphakk #+ alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + + Q = K#(alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + QK = Q - K + QL = Q #- L + + + fac2 = fac1/gammaQ + + + omega = (fac2)*np.sqrt(pi/(gammaP + gammaQ))#*screenfactorKL + delta = 0.25*(1/gammaQ) + onefourthgammaPinv + PQsqBy4delta = np.sum(PQ**2)/(4*delta) + + sum1 = innerLoop4c2e(la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,gammaP,gammaQ,PI,PJ,QK,QL,PQ,PQsqBy4delta,delta) + + val += omega*sum1*tempcoeff5 + + threeC2E[i-indx_startA, j-indx_startB, k-indx_startC] = val + + + if tri_symm: + #We save time by evaluating only the lower diagonal elements and then use symmetry Si,j=Sj,i + for i in prange(indx_startA, indx_endA): + for j in prange(indx_startB, indx_endB): + if j<=i: + threeC2E[j-indx_startB, i-indx_startA, :] = threeC2E[i-indx_startA, j-indx_startB, :] + + + return threeC2E","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/schwarz_helpers_cupy.py",".py","28728","633","import numpy as np +from numba import cuda +import numba +import math +try: + import cupy as cp +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator + pass +from .rys_helpers_cuda import coulomb_rys, coulomb_rys_3c2e, Roots, DATA_X, DATA_W + +def eri_4c2e_diag_cupy(basis, cp_stream=None): + # Used for Schwarz inequality test + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + DATA_X_cuda = cp.asarray(DATA_X) + DATA_W_cuda = cp.asarray(DATA_W) + + # Initialize the matrix with zeros + fourC2E_diag = cp.zeros((basis.bfs_nao, basis.bfs_nao), dtype=cp.float64) + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((basis.bfs_nao + (thread_x - 1))//thread_x, (basis.bfs_nao + (thread_y - 1))//thread_y) + rys_eri_4c2e_diag_internal_cuda[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, DATA_X_cuda, DATA_W_cuda, fourC2E_diag) + + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + # cp._default_memory_pool.free_all_blocks() + return fourC2E_diag + + + +@cuda.jit(fastmath=True, cache=True, max_registers=50)#(device=True) +def rys_eri_4c2e_diag_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, DATA_X, DATA_W, out): + # This function calculates the ""diagonal"" elements of the 4c2e ERI array + # Used to implement Schwarz screening + # http://vergil.chemistry.gatech.edu/notes/df.pdf + # returns a 2D array whose elements are given as A[i,j] = (ij|ij) + nao = bfs_coords.shape[0] + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + i, j = cuda.grid(2) + + if i=indx_startA and i=indx_startB and j=indx_startA and i=indx_startB and j=0 and i=0 and jthreshold: + # if max_val<1e-8: + # if (auxbfs_lm[k])>=1: # s aux functions + # continue + # elif max_val<1e-7: + # if (auxbfs_lm[k])>=2: # s, p aux functions + # continue + # elif max_val<1e-6: + # if (auxbfs_lm[k])>=3: # s, p, d aux functions + # continue + # J_tri[j+offset] += ints3c2e_1d[offset_3c2e+index_k]*df_coeff[k] + # index_k += 1 + # else: + # continue + # else: + # if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + # J_tri[j+offset] += ints3c2e_1d[offset_3c2e+index_k]*df_coeff[k] + # index_k += 1 + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + # J_tri[j+offset] += ints3c2e_1d[offset_3c2e+index_k]*df_coeff[k] + val += ints3c2e_1d[offset_3c2e+index_k]*df_coeff[k] + index_k += 1 + J_tri[j+offset] = val + +def df_coeff_calculator_algo10_cupy(ints3c2e_1d, dmat_1d, nao, offsets_3c2e, naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, cp_stream=None): + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + # cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + + df_coeff = cp.zeros(naux, dtype=cp.float64) + + thread_x = 32 + thread_y = 32 + blocks_per_grid = ((nao + (thread_x - 1))//thread_x, (nao + (thread_y - 1))//thread_y) + size_dmat_1d = dmat_1d.shape[0] + df_coeff_calculator_algo10_cuda_internal[blocks_per_grid, (thread_x, thread_y), nb_stream](ints3c2e_1d, dmat_1d, nao, size_dmat_1d, offsets_3c2e, naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, df_coeff) + + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + # cp._default_memory_pool.free_all_blocks() + return df_coeff + +@cuda.jit(fastmath=True, cache=True)#(device=True) +def df_coeff_calculator_algo10_cuda_internal(ints3c2e_1d, dmat_1d, nao, size_dmat_1d, offsets_3c2e, naux, sqrt_ints4c2e_diag, sqrt_diag_ints2c2e, threshold, strict_schwarz, df_coeff): + # This function calculates the coefficients of the auxiliary basis for + # density fitting. + # This can also be simply calculated using: + # df_coeff = contract('pqP,pq->P', ints3c2e, dmat) # For general 3d and 2d arrays + # or + # df_coeff = contract('pP,p->P', ints3c2e, dmat_tri) # For triangular versions of the above arrays + # However, we need to create a custom function to + # do this with a sparse 1d array holding the values of significant + # elements of ints3c2e array. + # nelements = ints3c2e_1d.shape[0] + i, j = cuda.grid(2) + if i>=0 and i=0 and j<=i: + offset = int(j + i*(i+1)/2) + if offset>=size_dmat_1d: + return + sqrt_ij = sqrt_ints4c2e_diag[i,j] + if strict_schwarz: + if sqrt_ij*sqrt_ij<1e-13: + return + index_k = 0 + # linear_index = j + i*(i+1)//2 + offset_3c2e = offsets_3c2e[offset] + dmat_val = dmat_1d[offset] + for k in range(0, naux): + if sqrt_ij*sqrt_diag_ints2c2e[k]>threshold: + # df_coeff[k] += ints3c2e_1d[offset_3c2e+index_k]*dmat_val # This leads to race condition + temp = ints3c2e_1d[offset_3c2e+index_k]*dmat_val + cuda.atomic.add(df_coeff, k, temp) # Arguments are array, array index, value to add + index_k += 1 + +","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/kin_mat_symm_cupy.py",".py","12693","317","try: + import cupy as cp + from cupy import fuse +except Exception as e: + # Handle the case when Cupy is not installed + cp = None + # Define a dummy fuse decorator for CPU version + def fuse(kernel_name): + def decorator(func): + return func + return decorator +from numba import cuda +import math +from numba import njit , prange +import numpy as np +import numba + + +def kin_mat_symm_cupy(basis, slice=None, cp_stream=None): + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the kinetic energy matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = cp.array([basis.bfs_coords]) + bfs_contr_prim_norms = cp.array([basis.bfs_contr_prim_norms]) + bfs_lmn = cp.array([basis.bfs_lmn]) + bfs_nprim = cp.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = cp.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = cp.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index + b = int(slice[1]) #row end index + c = int(slice[2]) #column start index + d = int(slice[3]) #column end index + + # Infer the matrix shape from the start and end indices + num_rows = b - a + num_cols = d - c + start_row = a + end_row = b + start_col = c + end_col = d + matrix_shape = (num_rows, num_cols) + + # Check if the slice of the matrix requested falls in the lower/upper triangle or in both the triangles + upper_tri = False + lower_tri = False + both_tri_symm = False + both_tri_nonsymm = False + if end_row <= start_col: + upper_tri = True + elif start_row >= end_col: + lower_tri = True + elif start_row==start_col and end_row==end_col: + both_tri_symm = True + else: + both_tri_nonsymm = True + + # Initialize the matrix with zeros + T = cp.zeros(matrix_shape) + + thread_x = 32 + thread_y = 32 + + if cp_stream is None: + device = 0 + cp.cuda.Device(device).use() + cp_stream = cp.cuda.Stream(non_blocking = True) + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + else: + nb_stream = cuda.external_stream(cp_stream.ptr) + cp_stream.use() + + + blocks_per_grid = ((num_rows + (thread_x - 1))//thread_x, (num_cols + (thread_y - 1))//thread_y) + kin_mat_symm_internal_cuda[blocks_per_grid, (thread_x, thread_y), nb_stream](bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, a, b, c, d, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, T) + if both_tri_symm: + symmetrize[blocks_per_grid, (thread_x, thread_y), nb_stream](a,b,c,d,T) + + # cuda.synchronize() + cp_stream.synchronize() + cp.cuda.Stream.null.synchronize() + return T #+ T.T - cp.diag(cp.diag(T)) + +LOOKUP_TABLE = np.array([ + 1, 1, 2, 6, 24, 120, 720, 5040, 40320, + 362880, 3628800, 39916800, 479001600, + 6227020800, 87178291200, 1307674368000, + 20922789888000, 355687428096000, 6402373705728000, + 121645100408832000, 2432902008176640000], dtype='int64') + +@cuda.jit(fastmath=True, cache=True, device=True) +def fastFactorial(n): + # This is the way to access global constant arrays (which need to be on host, i.e. created using numpy for some reason) + # See https://stackoverflow.com/questions/63311574/in-numba-how-to-copy-an-array-into-constant-memory-when-targeting-cuda + LOOKUP_TABLE_ = cuda.const.array_like(LOOKUP_TABLE) + # 2-3x faster than the fastFactorial_old for values less than 21 + if n<= 1: + return 1 + elif n<=20: + return LOOKUP_TABLE_[n] + else: + factorial = 1 + for i in range(2, n+1): + factorial *= i + return factorial + # factorial = 1 + # for i in range(2, n+1): + # factorial *= i + # return factorial + +LOOKUP_TABLE_COMB = np.array([[ 1, 0, 0, 0, 0, 0], + [ 1, 1, 0, 0, 0, 0], + [ 1, 2, 1, 0, 0, 0], + [ 1, 3, 3, 1, 0, 0], + [ 1, 4, 6, 4, 1, 0], + [ 1, 5, 10, 10, 5, 1]]) + +@cuda.jit(fastmath=True, cache=True, device=True) +def comb(x, y): + table = cuda.const.array_like(LOOKUP_TABLE_COMB) + if y == 0: + return 1 + if x == y: + return 1 + if x<=5 and y<=5: + return table[x,y] + binom = fastFactorial(x) // fastFactorial(y) // fastFactorial(x - y) + return binom + +@cuda.jit(fastmath=True, cache=True, device=True) +def doublefactorial(n): + if n <= 0: + return 1 + else: + result = 1 + for i in range(n, 0, -2): + result *= i + return result + + +@cuda.jit(fastmath=True, cache=True, device=True) +def c2k(k,la,lb,PA,PB): + temp = 0.0 + for i in range(la+1): + if i>k: + continue + factor1 = comb(la,i) + factor2 = PA**(la-i) + for j in range(lb+1): + # if j>k: + # continue + if (i+j)==k : + temp += factor1*comb(lb,j)*factor2*PB**(lb-j) + return temp + +@cuda.jit(fastmath=True, cache=True, device=True) +def calcS(la,lb,gamma,PA,PB): + temp = 0.0 + fac1 = math.sqrt(math.pi/gamma) + fac2 = 2*gamma + for k in range(0, int((la+lb)/2)+1): + temp += c2k(2*k,la,lb,PA,PB)*fac1*doublefactorial(2*k-1)/(fac2)**k + return temp + +@cuda.jit(fastmath=True, cache=True, max_registers=60)#(device=True) +def kin_mat_symm_internal_cuda(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, start_row, end_row, start_col, end_col, lower_tri, upper_tri, both_tri_symm, both_tri_nonsymm, out): + # This function calculates the kinetic energy matrix and uses the symmetry property to only calculate half-ish the elements + # and get the remaining half by symmetry. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the kinetic matrix for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + i, j = cuda.grid(2) + if i>=start_row and i=start_col and j=start_row and i=start_col and ji: + out[i-start_row, j-start_col] = out[j-start_col, i-start_row]","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/cross_overlap_mat_symm.py",".py","8685","185","import numpy as np +from numba import njit , prange + +from .integral_helpers import calcS + +def cross_overlap_mat_symm(basisA, basisB, slice=None): + """""" + Compute the overlap matrix between two distinct basis sets. + + This function calculates the overlap integrals ⟨χ_i^A | χ_j^B⟩ between basis functions + from two different basis sets, `basisA` and `basisB`. It supports block-wise computation + of the matrix to save time and memory during large-scale calculations. + + S_{μν}^{AB} = ⟨ χ_μ^A | χ_ν^B ⟩ + + All integrals are evaluated using a Numba-accelerated backend that converts + required basis set properties into NumPy arrays for efficient performance. + + Parameters + ---------- + basisA : object + The first basis set object containing properties such as: + - bfs_coords: Cartesian coordinates of centers + - bfs_coeffs: Contraction coefficients + - bfs_expnts: Gaussian exponents + - bfs_prim_norms: Primitive normalization constants + - bfs_contr_prim_norms: Contraction normalization constants + - bfs_lmn: Angular momentum quantum numbers + - bfs_nprim: Number of primitives per AO + - bfs_nao: Total number of atomic orbitals + + basisB : object + The second basis set object, structured identically to `basisA`. + + slice : list of int, optional + A 4-element list `[start_row, end_row, start_col, end_col]` that defines + a block of the full matrix to compute. Rows correspond to functions in `basisA`, + and columns to those in `basisB`. If `None` (default), the full matrix is computed. + + Returns + ------- + S : ndarray of shape (end_row - start_row, end_col - start_col) + The computed cross overlap (sub)matrix. + + Notes + ----- + The function handles contraction and normalization internally. Since Numba does not + support jagged lists, the function reshapes data into padded 2D arrays based on + the maximum number of primitives in either basis set. + + Examples + -------- + >>> S = cross_overlap_mat_symm(basisA, basisB) + >>> S_block = cross_overlap_mat_symm(basisA, basisB, slice=[0, 5, 0, 10]) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the matrix efficiently. + + # This function calculates the overlap matrix between two basis objects: basisA and basisB. + # The basis objects hold the information of basis functions like: exponents, coeffs, etc. + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows (basisA) to be calculated. + # the third and fourth element give the range of columns (basisB) to be calculated. + # slice = [start_row, end_row, start_col, end_col] + # The integrals are performed using the formulas + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfsA_coords = np.array([basisA.bfs_coords]) + bfsA_contr_prim_norms = np.array([basisA.bfs_contr_prim_norms]) + bfsA_lmn = np.array([basisA.bfs_lmn]) + bfsA_nprim = np.array([basisA.bfs_nprim]) + + bfsB_coords = np.array([basisB.bfs_coords]) + bfsB_contr_prim_norms = np.array([basisB.bfs_contr_prim_norms]) + bfsB_lmn = np.array([basisB.bfs_lmn]) + bfsB_nprim = np.array([basisB.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprimA = max(basisA.bfs_nprim) + bfsA_coeffs = np.zeros([basisA.bfs_nao, maxnprimA]) + bfsA_expnts = np.zeros([basisA.bfs_nao, maxnprimA]) + bfsA_prim_norms = np.zeros([basisA.bfs_nao, maxnprimA]) + for i in range(basisA.bfs_nao): + for j in range(basisA.bfs_nprim[i]): + bfsA_coeffs[i,j] = basisA.bfs_coeffs[i][j] + bfsA_expnts[i,j] = basisA.bfs_expnts[i][j] + bfsA_prim_norms[i,j] = basisA.bfs_prim_norms[i][j] + + maxnprimB = max(basisB.bfs_nprim) + bfsB_coeffs = np.zeros([basisB.bfs_nao, maxnprimB]) + bfsB_expnts = np.zeros([basisB.bfs_nao, maxnprimB]) + bfsB_prim_norms = np.zeros([basisB.bfs_nao, maxnprimB]) + for i in range(basisB.bfs_nao): + for j in range(basisB.bfs_nprim[i]): + bfsB_coeffs[i,j] = basisB.bfs_coeffs[i][j] + bfsB_expnts[i,j] = basisB.bfs_expnts[i][j] + bfsB_prim_norms[i,j] = basisB.bfs_prim_norms[i][j] + + + if slice is None: + slice = [0, basisA.bfs_nao, 0, basisB.bfs_nao] + + #Limits for the calculation of overlap integrals + a = int(slice[0]) #row start index (basisA) + b = int(slice[1]) #row end index (basisA) + c = int(slice[2]) #column start index (basisB) + d = int(slice[3]) #column end index (basisB) + + S = cross_overlap_mat_internal(bfsA_coords[0], bfsA_contr_prim_norms[0], bfsA_lmn[0], bfsA_nprim[0], bfsA_coeffs, bfsA_prim_norms, bfsA_expnts, + bfsB_coords[0], bfsB_contr_prim_norms[0], bfsB_lmn[0], bfsB_nprim[0], bfsB_coeffs, bfsB_prim_norms, bfsB_expnts, + a, b, c, d) + return S + +@njit(parallel=True, cache=True) +def cross_overlap_mat_internal(bfsA_coords, bfsA_contr_prim_norms, bfsA_lmn, bfsA_nprim, bfsA_coeffs, bfsA_prim_norms, bfsA_expnts, + bfsB_coords, bfsB_contr_prim_norms, bfsB_lmn, bfsB_nprim, bfsB_coeffs, bfsB_prim_norms, bfsB_expnts, + start_row, end_row, start_col, end_col): + # This function calculates the overlap matrix between two different basis objects. + # Since the two basis objects can be different, we don't use symmetry properties. + # The reason we need this extra function is because we want the callable function to be simple and not require so many + # arguments. But when using Numba to optimize, we can't have too many custom objects and stuff. Numba likes numpy arrays + # so passing those is okay. But lists and custom objects are not okay. + # This function calculates the overlap matrix between basisA (rows) and basisB (columns). + # It is possible to only calculate a slice (block) of the complete matrix. + # slice is a 4 element list whose first and second elements give the range of the rows to be calculated. + # the third and fourth element give the range of columns to be calculated. + # The integrals are performed using the formulas here https://pubs.acs.org/doi/full/10.1021/acs.jchemed.8b00255 + + # Infer the matrix shape from the start and end indices + num_rows = end_row - start_row + num_cols = end_col - start_col + matrix_shape = (num_rows, num_cols) + + # Initialize the matrix with zeros + S = np.zeros(matrix_shape) + + for i in prange(start_row, end_row): + I = bfsA_coords[i] + lmni = bfsA_lmn[i] + Ni = bfsA_contr_prim_norms[i] + for j in prange(start_col, end_col): + result = 0.0 + + J = bfsB_coords[j] + IJ = I - J + tempfac = np.sum(IJ**2) + + Nj = bfsB_contr_prim_norms[j] + + lmnj = bfsB_lmn[j] + for ik in prange(bfsA_nprim[i]): + alphaik = bfsA_expnts[i][ik] + dik = bfsA_coeffs[i][ik] + Nik = bfsA_prim_norms[i][ik] + for jk in prange(bfsB_nprim[j]): + + alphajk = bfsB_expnts[j][jk] + gamma = alphaik + alphajk + screenfactor = np.exp(-alphaik*alphajk/gamma*tempfac) + if (abs(screenfactor)<1.0e-12): + continue + + djk = bfsB_coeffs[j][jk] + Njk = bfsB_prim_norms[j][jk] + + P = (alphaik*I + alphajk*J)/gamma + PI = P - I + PJ = P - J + Sx = calcS(lmni[0],lmnj[0],gamma,PI[0],PJ[0]) + Sy = calcS(lmni[1],lmnj[1],gamma,PI[1],PJ[1]) + Sz = calcS(lmni[2],lmnj[2],gamma,PI[2],PJ[2]) + temp = dik*djk + temp = temp*Nik*Njk + temp = temp*Ni*Nj + temp = temp*screenfactor*Sx*Sy*Sz + result += temp + S[i - start_row, j - start_col] = result + + return S","Python" +"Quantum Chemistry","manassharma07/PyFock","pyfock/Integrals/rys_4c2e_symm.py",".py","40271","765","import numpy as np +from numba import njit, prange + +from .integral_helpers import Fboys +from .rys_helpers import coulomb_rys, ChebGausInt + +def rys_4c2e_symm(basis, slice=None): + """""" + Compute four-center two-electron (4c2e) electron repulsion integrals (ERIs) + using the Rys quadrature method with exploitation of 8-fold permutational + symmetry. + + This function evaluates integrals of the form (A B | C D), where A, B, C, D + are basis functions from the same primary basis set. It uses Numba-accelerated + backends and symmetry-aware optimizations to reduce computational cost. + + Symmetries exploited + -------------------- + The 4c2e integrals obey the following permutational symmetry relations: + + (A B | C D) = (B A | C D) # exchange within bra + = (A B | D C) # exchange within ket + = (B A | D C) + = (C D | A B) # bra ↔ ket exchange + = (D C | A B) + = (C D | B A) + = (D C | B A) + + These 8 equivalent permutations mean that only a subset of integrals + needs to be explicitly computed; the rest can be obtained by symmetry. + + This reduces the number of independent integrals from: + N_bf^4 → N_bf*(N_bf+1)/2 * N_bf*(N_bf+1)/2 + when computing the full tensor. + + Parameters + ---------- + basis : object + Primary basis set object containing: + - bfs_coords : Cartesian coordinates of basis function centers. + - bfs_coeffs : Contraction coefficients. + - bfs_expnts : Gaussian exponents. + - bfs_prim_norms : Primitive normalization constants. + - bfs_contr_prim_norms : Contraction normalization factors. + - bfs_lmn : Angular momentum quantum numbers (ℓ, m, n). + - bfs_nprim : Number of primitives per basis function. + - bfs_shell_index : Index of the shell each basis function belongs to. + - bfs_nao : Total number of atomic orbitals. + + slice : list of int, optional + An 8-element list specifying a sub-block of integrals to compute: + [start_A, end_A, start_B, end_B, start_C, end_C, start_D, end_D] + If None (default), computes the full (Nbf, Nbf, Nbf, Nbf) block. + + **Note:** When slices are used, not all 8-fold symmetries may be + available because the requested block may not contain all + symmetric permutations. In such cases, only the applicable + symmetries are used. + + Returns + ------- + ints4c2e : ndarray + The computed 4-center 2-electron integrals for the requested range. + + Notes + ----- + - Precomputes and stores basis set data in NumPy arrays for Numba efficiency. + - Exploits all possible symmetry permutations when the full tensor is + computed (no slice) to reduce redundant work. + - If a slice is specified, symmetry exploitation is limited to the + permutations that fall within the slice's index ranges. + + Examples + -------- + >>> eri_full = rys_4c2e_symm(basis) + >>> eri_block = rys_4c2e_symm(basis, slice=[0,5, 0,5, 0,5, 0,5]) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the 4c2e electron-electron ERIs for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + indx_startD = int(slice[6]) + indx_endD = int(slice[7]) + + ints4c2e = rys_4c2e_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts,\ + indx_startA,indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD,indx_endD) + + return ints4c2e + +@njit(parallel=True, cache=True, fastmath=True, error_model=""numpy"") +def rys_4c2e_symm_internal(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD): + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the 4D electron-electron repulsion integrals (ERIs) array for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # returns (AB|CD) + + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + num_D = indx_endD - indx_startD + array_shape = (num_A, num_B, num_C, num_D) + + + # Check if the slice of the matrix requested has some symmetries that can be used + all_symm = False + left_side_symm = False + right_side_symm = False + both_left_right_symm = False + no_symm = False + if indx_startA==indx_startB==indx_startC==indx_startD and indx_endA==indx_endB==indx_endC==indx_endD: + all_symm = True + elif (indx_startA==indx_startB and indx_endA==indx_endB) and (indx_startC==indx_startD and indx_endC==indx_endD): + both_left_right_symm = True + elif indx_startA==indx_startB and indx_endA==indx_endB: + left_side_symm = True + elif indx_startC==indx_startD and indx_endC==indx_endD: + right_side_symm = True + else: + no_symm = True + + + # Initialize the 4c2e array with zeros + fourC2E = np.zeros(array_shape, dtype=np.float64) + + sRys = np.ones((12,12)) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + #Loop pver BFs + for i in prange(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + for j in range(indx_startB, indx_endB): #B + if (all_symm and j<=i) or (left_side_symm and j<=i) or right_side_symm or no_symm or (both_left_right_symm and j<=i): + # Take care of further symmetries + if all_symm: + if itriangle2kl: + continue + L = bfs_coords[l] + KL = K - L + KLsq = np.sum(KL**2) + Nl = bfs_contr_prim_norms[l] + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + tempcoeff3 = tempcoeff2*Nl + npriml = bfs_nprim[l] + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + roots = np.zeros((norder)) + weights = np.zeros((norder)) + G = np.zeros((n+1,m+1)) + + val = 0.0 + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + gammaP = alphaik + alphajk + screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if abs(screenfactorAB)<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + P = (alphaik*I + alphajk*J)/gammaP + PI = P - I + PJ = P - J + fac1 = twopisq/gammaP*screenfactorAB + onefourthgammaPinv = 0.25/gammaP + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in range(nprimk): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in range(npriml): + alphalk = bfs_expnts[l][lk] + gammaQ = alphakk + alphalk + screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if abs(screenfactorKL)<1.0e-8: + #TODO: Check for optimal value for screening + continue + if abs(screenfactorAB*screenfactorKL)<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + Q = (alphakk*K + alphalk*L)/gammaQ + PQ = P - Q + + PQsq = np.sum(PQ**2) + rho = gammaP*gammaQ/(gammaP+gammaQ) + + tempcoeff7 = tempcoeff6*dlk*Nlk + + if norder<=10: + val += tempcoeff7*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + else: + print(""Error: Rys quadrature order greater than 10 not implemented."") + # T = rho*PQsq + # sERI = 34.9868366552497256925 * (screenfactorAB+screenfactorKL) / ((gammaP*gammaQ) * np.sqrt(gammaP + gammaQ)) + # val += tempcoeff7*sERI*ChebGausInt(1E-8,50000, gammaP, gammaQ, la, lb, lc, ld,ma, mb, mc, md, na, nb, nc,nd, I[0], + # J[0], K[0], L[0], I[1], J[1], K[1], L[1], I[2], J[2], K[2], + # L[2], P[0], P[1], P[2], Q[0], Q[1], Q[2], T, sRys) + + + fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] = val + + + + # Symmetries that can be used (for reference) + # fourC2E[j,i,k,l] = fourC2E[i,j,k,l] + # fourC2E[i,j,l,k] = fourC2E[i,j,k,l] + # fourC2E[j,i,l,k] = fourC2E[i,j,k,l] + # fourC2E[k,l,i,j] = fourC2E[i,j,k,l] + # fourC2E[k,l,j,i] = fourC2E[i,j,k,l] + # fourC2E[l,k,i,j] = fourC2E[i,j,k,l] + # fourC2E[l,k,j,i] = fourC2E[i,j,k,l] + + + if all_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + fourC2E[k-indx_startC, l-indx_startD, i-indx_startA, j-indx_startB] = val + fourC2E[k-indx_startC, l-indx_startD, j-indx_startB, i-indx_startA] = val + fourC2E[l-indx_startD, k-indx_startC, i-indx_startA, j-indx_startB] = val + fourC2E[l-indx_startD, k-indx_startC, j-indx_startB, i-indx_startA] = val + + if left_side_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + fourC2E[j-indx_startB, i-indx_startA, :, :] = fourC2E[i-indx_startA, j-indx_startB, :, :] + + if right_side_symm: + # Fill the remaining values of the array using symmetries + for k in range(indx_startC, indx_endC): + for l in range(indx_startD, indx_endD): + if l<=k: + fourC2E[:, :, l-indx_startD, k-indx_startC] = fourC2E[:, :, k-indx_startC, l-indx_startD] + + if both_left_right_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in prange(indx_startC, indx_endC): + for l in prange(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + + + return fourC2E + +def rys_4c2e_symm_old(basis, slice=None): + """""" + Compute four-center two-electron (4c2e) electron repulsion integrals (ERIs) + using the Rys quadrature method with exploitation of 8-fold permutational + symmetry. + + This function evaluates integrals of the form (A B | C D), where A, B, C, D + are basis functions from the same primary basis set. It uses Numba-accelerated + backends and symmetry-aware optimizations to reduce computational cost. + + Symmetries exploited + -------------------- + The 4c2e integrals obey the following permutational symmetry relations: + + (A B | C D) = (B A | C D) # exchange within bra + = (A B | D C) # exchange within ket + = (B A | D C) + = (C D | A B) # bra ↔ ket exchange + = (D C | A B) + = (C D | B A) + = (D C | B A) + + These 8 equivalent permutations mean that only a subset of integrals + needs to be explicitly computed; the rest can be obtained by symmetry. + + This reduces the number of independent integrals from: + N_bf^4 → N_bf*(N_bf+1)/2 * N_bf*(N_bf+1)/2 + when computing the full tensor. + + Parameters + ---------- + basis : object + Primary basis set object containing: + - bfs_coords : Cartesian coordinates of basis function centers. + - bfs_coeffs : Contraction coefficients. + - bfs_expnts : Gaussian exponents. + - bfs_prim_norms : Primitive normalization constants. + - bfs_contr_prim_norms : Contraction normalization factors. + - bfs_lmn : Angular momentum quantum numbers (ℓ, m, n). + - bfs_nprim : Number of primitives per basis function. + - bfs_shell_index : Index of the shell each basis function belongs to. + - bfs_nao : Total number of atomic orbitals. + + slice : list of int, optional + An 8-element list specifying a sub-block of integrals to compute: + [start_A, end_A, start_B, end_B, start_C, end_C, start_D, end_D] + If None (default), computes the full (Nbf, Nbf, Nbf, Nbf) block. + + **Note:** When slices are used, not all 8-fold symmetries may be + available because the requested block may not contain all + symmetric permutations. In such cases, only the applicable + symmetries are used. + + Returns + ------- + ints4c2e : ndarray + The computed 4-center 2-electron integrals for the requested range. + + Notes + ----- + - Precomputes and stores basis set data in NumPy arrays for Numba efficiency. + - Exploits all possible symmetry permutations when the full tensor is + computed (no slice) to reduce redundant work. + - If a slice is specified, symmetry exploitation is limited to the + permutations that fall within the slice's index ranges. + + Examples + -------- + >>> eri_full = rys_4c2e_symm(basis) + >>> eri_block = rys_4c2e_symm(basis, slice=[0,5, 0,5, 0,5, 0,5]) + """""" + # Here the lists are converted to numpy arrays for better use with Numba. + # Once these conversions are done we pass these to a Numba decorated + # function that uses prange, etc. to calculate the 4c2e integrals efficiently. + # This function calculates the 4c2e electron-electron ERIs for a given basis object. + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # It is possible to only calculate a slice (block/subset) of the complete set of integrals. + # slice is an 8 element list whose first and second elements give the range of the A functions to be calculated. + # and so on. + + #We convert the required properties to numpy arrays as this is what Numba likes. + bfs_coords = np.array([basis.bfs_coords]) + bfs_contr_prim_norms = np.array([basis.bfs_contr_prim_norms]) + bfs_lmn = np.array([basis.bfs_lmn]) + bfs_nprim = np.array([basis.bfs_nprim]) + + + #The remaining properties like bfs_coeffs are a list of lists of unequal sizes. + #Numba won't be able to work with these efficiently. + #So, we convert them to a numpy 2d array by applying a trick, + #that the second dimension is that of the largest list. So that + #it can accomadate all the lists. + maxnprim = max(basis.bfs_nprim) + bfs_coeffs = np.zeros([basis.bfs_nao, maxnprim]) + bfs_expnts = np.zeros([basis.bfs_nao, maxnprim]) + bfs_prim_norms = np.zeros([basis.bfs_nao, maxnprim]) + shell_indices = np.array([basis.bfs_shell_index], dtype=np.uint16)[0] + for i in range(basis.bfs_nao): + for j in range(basis.bfs_nprim[i]): + bfs_coeffs[i,j] = basis.bfs_coeffs[i][j] + bfs_expnts[i,j] = basis.bfs_expnts[i][j] + bfs_prim_norms[i,j] = basis.bfs_prim_norms[i][j] + + + + + if slice is None: + slice = [0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao, 0, basis.bfs_nao] + + #Limits for the calculation of 4c2e integrals + indx_startA = int(slice[0]) + indx_endA = int(slice[1]) + indx_startB = int(slice[2]) + indx_endB = int(slice[3]) + indx_startC = int(slice[4]) + indx_endC = int(slice[5]) + indx_startD = int(slice[6]) + indx_endD = int(slice[7]) + + + ints4c2e = rys_4c2e_symm_internal(bfs_coords[0], bfs_contr_prim_norms[0], bfs_lmn[0], bfs_nprim[0], bfs_coeffs, bfs_prim_norms, bfs_expnts, shell_indices,\ + indx_startA,indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD,indx_endD) + + return ints4c2e + +@njit(parallel=False, cache=True, fastmath=True, error_model=""numpy"") +def rys_4c2e_symm_internal_old(bfs_coords, bfs_contr_prim_norms, bfs_lmn, bfs_nprim, bfs_coeffs, bfs_prim_norms, bfs_expnts, shell_indices, indx_startA, indx_endA, indx_startB, indx_endB, indx_startC, indx_endC, indx_startD, indx_endD): + # Based on Rys Quadrature from https://github.com/rpmuller/MolecularIntegrals.jl + # This function calculates the 4D electron-electron repulsion integrals (ERIs) array for a given basis object and mol object. + # This uses 8 fold symmetry to only calculate the unique elements and assign the rest via symmetry + # The basis object holds the information of basis functions like: exponents, coeffs, etc. + + # returns (AB|CD) + + # Infer the matrix shape from the start and end indices + num_A = indx_endA - indx_startA + num_B = indx_endB - indx_startB + num_C = indx_endC - indx_startC + num_D = indx_endD - indx_startD + array_shape = (num_A, num_B, num_C, num_D) + + + # Check if the slice of the matrix requested has some symmetries that can be used + all_symm = False + left_side_symm = False + right_side_symm = False + both_left_right_symm = False + no_symm = False + if indx_startA==indx_startB==indx_startC==indx_startD and indx_endA==indx_endB==indx_endC==indx_endD: + all_symm = True + elif (indx_startA==indx_startB and indx_endA==indx_endB) and (indx_startC==indx_startD and indx_endC==indx_endD): + both_left_right_symm = True + elif indx_startA==indx_startB and indx_endA==indx_endB: + left_side_symm = True + elif indx_startC==indx_startD and indx_endC==indx_endD: + right_side_symm = True + else: + no_symm = True + + + # Initialize the 4c2e array with zeros + fourC2E = np.zeros(array_shape, dtype=np.float64) + + sRys = np.ones((12,12)) + + pi = 3.141592653589793 + pisq = 9.869604401089358 #PI^2 + twopisq = 19.739208802178716 #2*PI^2 + + maxprims = bfs_coeffs.shape[1] + + #Loop pver BFs + for i in range(indx_startA, indx_endA): #A + I = bfs_coords[i] + Ni = bfs_contr_prim_norms[i] + lmni = bfs_lmn[i] + la, ma, na = lmni + nprimi = bfs_nprim[i] + + jshell_previous = -12 # Some random number + kshell_previous = -10 # Some random number + lshell_previous = -122 # Some random number + gammaP = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + screenfactorAB = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + gammaQ = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + screenfactorKL = np.zeros((maxprims, maxprims), dtype=np.float64) # Should be Hoisted out + + for j in range(indx_startB, indx_endB): #B + if (all_symm and j<=i) or (left_side_symm and j<=i) or right_side_symm or no_symm or (both_left_right_symm and j<=i): + # Take care of further symmetries + if all_symm: + if itriangle2kl: + continue + + lmnl = bfs_lmn[l] + ld, md, nd = lmnl + lshell = shell_indices[l] + if lshell!=lshell_previous: + L = bfs_coords[l] + npriml = bfs_nprim[l] + Nl = bfs_contr_prim_norms[l] + + if kshell!=kshell_previous or lshell!=lshell_previous: + KL = K - L + KLsq = np.sum(KL**2) + + if jshell!=jshell_previous or kshell!=kshell_previous or lshell!=lshell_previous: + tempcoeff3 = tempcoeff2*Nl + + + norder = int((la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)/2 + 1 ) + n = int(max(la+lb,ma+mb,na+nb)) + m = int(max(lc+ld,mc+md,nc+nd)) + # roots = np.zeros((norder)) + # weights = np.zeros((norder)) + roots = np.zeros((10)) + weights = np.zeros((10)) + G = np.zeros((n+1,m+1)) + + val = 0.0 + + #Loop over primitives + for ik in range(nprimi): + dik = bfs_coeffs[i][ik] + Nik = bfs_prim_norms[i][ik] + alphaik = bfs_expnts[i][ik] + tempcoeff4 = tempcoeff3*dik*Nik + + for jk in range(nprimj): + alphajk = bfs_expnts[j][jk] + # gammaP = alphaik + alphajk + # screenfactorAB = np.exp(-alphaik*alphajk/gammaP*IJsq) + if jshell!=jshell_previous: + gammaP[ik,jk] = alphaik + alphajk + screenfactorAB[ik,jk] = np.exp(-alphaik*alphajk/gammaP[ik,jk]*IJsq) + # if abs(screenfactorAB)<1.0e-8: + if abs(screenfactorAB[ik,jk])<1.0e-8: + #TODO: Check for optimal value for screening + continue + djk = bfs_coeffs[j][jk] + Njk = bfs_prim_norms[j][jk] + # P = (alphaik*I + alphajk*J)/gammaP + P = (alphaik*I + alphajk*J)/gammaP[ik,jk] + # PI = P - I + # PJ = P - J + # fac1 = twopisq/gammaP*screenfactorAB + # fac1 = twopisq/gammaP[ik,jk]*screenfactorAB[ik,jk] + # onefourthgammaPinv = 0.25/gammaP + # onefourthgammaPinv = 0.25/gammaP[ik,jk] + tempcoeff5 = tempcoeff4*djk*Njk + + for kk in range(nprimk): + dkk = bfs_coeffs[k][kk] + Nkk = bfs_prim_norms[k][kk] + alphakk = bfs_expnts[k][kk] + tempcoeff6 = tempcoeff5*dkk*Nkk + + for lk in range(npriml): + alphalk = bfs_expnts[l][lk] + # gammaQ = alphakk + alphalk + # screenfactorKL = np.exp(-alphakk*alphalk/gammaQ*KLsq) + if kshell!=kshell_previous or lshell!=lshell_previous: + gammaQ[kk,lk] = alphakk + alphalk + screenfactorKL[kk,lk] = np.exp(-alphakk*alphalk/gammaQ[kk,lk]*KLsq) + # if abs(screenfactorKL)<1.0e-8: + if abs(screenfactorKL[kk,lk])<1.0e-8: + #TODO: Check for optimal value for screening + continue + # if abs(screenfactorAB*screenfactorKL)<1.0e-10: + if abs(screenfactorAB[ik,jk]*screenfactorKL[kk,lk])<1.0e-10: + #TODO: Check for optimal value for screening + continue + dlk = bfs_coeffs[l][lk] + Nlk = bfs_prim_norms[l][lk] + # Q = (alphakk*K + alphalk*L)/gammaQ + Q = (alphakk*K + alphalk*L)/gammaQ[kk,lk] + PQ = P - Q + + PQsq = np.sum(PQ**2) + tempcoeff7 = tempcoeff6*dlk*Nlk + + # (ss|ss) case + if (la+ma+na+lb+mb+nb+lc+mc+nc+ld+md+nd)==0: + val += tempcoeff7*twopisq/(gammaP[ik,jk]*gammaQ[kk,lk])*np.sqrt(pi/(gammaP[ik,jk]+gammaQ[kk,lk]))\ + *screenfactorAB[ik,jk]*screenfactorKL[kk,lk]*Fboys(0,PQsq/(1/gammaP[ik,jk]+1/gammaQ[kk,lk])) + else: + # rho = gammaP*gammaQ/(gammaP+gammaQ) + rho = gammaP[ik,jk]*gammaQ[kk,lk]/(gammaP[ik,jk]+gammaQ[kk,lk]) + if norder<=10: + val += tempcoeff7*coulomb_rys(roots,weights,G,PQsq, rho, norder,n,m,la,lb,lc,ld,ma,mb,mc,md,na,nb,nc,nd,alphaik, alphajk, alphakk, alphalk,I,J,K,L) + + else: + T = rho*PQsq + # sERI = 34.9868366552497256925 * (screenfactorAB+screenfactorKL) / ((gammaP*gammaQ) * np.sqrt(gammaP + gammaQ)) + # val += tempcoeff7*sERI*ChebGausInt(1E-8,50000, gammaP, gammaQ, la, lb, lc, ld,ma, mb, mc, md, na, nb, nc,nd, I[0], + # J[0], K[0], L[0], I[1], J[1], K[1], L[1], I[2], J[2], K[2], + # L[2], P[0], P[1], P[2], Q[0], Q[1], Q[2], T, sRys) + sERI = 34.9868366552497256925 * (screenfactorAB[ik,jk]+screenfactorKL[kk,lk]) / ((gammaP[ik,jk]*gammaQ[kk,lk]) * np.sqrt(gammaP[ik,jk] + gammaQ[kk,lk])) + val += tempcoeff7*sERI*ChebGausInt(1E-8,50000, gammaP[ik,jk], gammaQ[kk,lk], la, lb, lc, ld,ma, mb, mc, md, na, nb, nc,nd, I[0], + J[0], K[0], L[0], I[1], J[1], K[1], L[1], I[2], J[2], K[2], + L[2], P[0], P[1], P[2], Q[0], Q[1], Q[2], T, sRys) + + + + lshell_previous = lshell + fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] = val + + kshell_previous = kshell + jshell_previous = jshell + + # Symmetries that can be used (for reference) + # fourC2E[j,i,k,l] = fourC2E[i,j,k,l] + # fourC2E[i,j,l,k] = fourC2E[i,j,k,l] + # fourC2E[j,i,l,k] = fourC2E[i,j,k,l] + # fourC2E[k,l,i,j] = fourC2E[i,j,k,l] + # fourC2E[k,l,j,i] = fourC2E[i,j,k,l] + # fourC2E[l,k,i,j] = fourC2E[i,j,k,l] + # fourC2E[l,k,j,i] = fourC2E[i,j,k,l] + + + if all_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in range(indx_startC, indx_endC): + for l in range(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + fourC2E[k-indx_startC, l-indx_startD, i-indx_startA, j-indx_startB] = val + fourC2E[k-indx_startC, l-indx_startD, j-indx_startB, i-indx_startA] = val + fourC2E[l-indx_startD, k-indx_startC, i-indx_startA, j-indx_startB] = val + fourC2E[l-indx_startD, k-indx_startC, j-indx_startB, i-indx_startA] = val + + if left_side_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + fourC2E[j-indx_startB, i-indx_startA, :, :] = fourC2E[i-indx_startA, j-indx_startB, :, :] + + if right_side_symm: + # Fill the remaining values of the array using symmetries + for k in range(indx_startC, indx_endC): + for l in range(indx_startD, indx_endD): + if l<=k: + fourC2E[:, :, l-indx_startD, k-indx_startC] = fourC2E[:, :, k-indx_startC, l-indx_startD] + + if both_left_right_symm: + # Fill the remaining values of the array using symmetries + for i in range(indx_startA, indx_endA): + for j in range(indx_startB, indx_endB): + if j<=i: + for k in range(indx_startC, indx_endC): + for l in range(indx_startD, indx_endD): + val = fourC2E[i-indx_startA, j-indx_startB, k-indx_startC, l-indx_startD] + if l<=k: + fourC2E[j-indx_startB, i-indx_startA, k-indx_startC, l-indx_startD] = val + fourC2E[i-indx_startA, j-indx_startB, l-indx_startD, k-indx_startC] = val + fourC2E[j-indx_startB, i-indx_startA, l-indx_startD, k-indx_startC] = val + + + return fourC2E + +","Python" +"Quantum Chemistry","manassharma07/PyFock","Third_Party_LICENSES/BSD_3-Clause_License_MMD.m",".m","1512","29","BSD 3-Clause License + +Copyright (c) 2021, Joshua Goings +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","MATLAB" +"Quantum Chemistry","manassharma07/PyFock","Third_Party_LICENSES/BSD_3-Clause_License_PyBoys.m",".m","1514","29","BSD 3-Clause License + +Copyright (c) 2017, Peter Reinholdt +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","MATLAB"