def test_add_basis(tmp_path): tmp_path = str(tmp_path) # Needed for python 3.5 for sf, refs in _source_data.items(): sf_path = os.path.join(auth_data_dir, sf) name = sf.split('.')[0] curate.add_basis(sf_path, tmp_path, 'test_subdir', 'test_' + name, 'test_basis_' + name, 'test_family', 'orbital', 'Test Basis Description: ' + name, '1', 'Test Basis Revision Description', 'Test Source', refs) md = api.get_metadata(tmp_path) assert len(md) == len(_source_data) # Re-read for sf in _source_data.keys(): name = name = sf.split('.')[0] name = 'test_basis_' + name bse_dict = api.get_basis(name, data_dir=tmp_path) assert bse_dict['family'] == 'test_family' # Compare against the file we created from sf_path = os.path.join(auth_data_dir, sf) assert curate.compare_basis_against_file(name, sf_path, data_dir=tmp_path) # Check that all the files exist and contain the right elements for fpath, elements in _expected_files.items(): fpath = os.path.join(tmp_path, fpath) assert os.path.isfile(fpath) fdata = fileio.read_json_basis(fpath) expect_elements = set(misc.expand_elements(elements, True)) assert set(fdata['elements'].keys()) == expect_elements # Validate the new data dir validator.validate_data_dir(tmp_path)
#!/usr/bin/env python3 from basis_set_exchange import curate if False: curate.add_basis( bs_file='tzp-zora.gbs', data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='jorge', file_base='TZP-ZORA', name='TZP-ZORA', family='jorge', role='orbital', description= 'TZP-ZORA, all-electron triple-zeta basis for calculations with the ZORA approach', version='1', revision_description='Data from supporting information', data_source='Data from supporting information', refs='canalneto2021a', file_fmt=None) curate.add_basis( bs_file='atzp-zora.gbs', data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='jorge', file_base='ATZP-ZORA', name='ATZP-ZORA', family='jorge', role='orbital', description= 'ATZP-ZORA, augmented all-electron triple-zeta basis for calculations with the ZORA approach', version='1',
#!/usr/bin/env python3 from basis_set_exchange import curate curate.add_basis( bs_file='x2c-SVPall-s.tm.bz2', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='ahlrichs_x2c', file_base='x2c-SVPall-s', name='x2c-SVPall-s', family='ahlrichs_x2c', role='orbital', description='All-electron relativistic split-valence for NMR shielding', version='1', revision_description='Data from Supporting info', data_source='Supporting info of franzke2019a', refs='franzke2019a', file_fmt=None) curate.add_basis( bs_file='x2c-TZVPall-s.tm.bz2', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='ahlrichs_x2c', file_base='x2c-TZVPall-s', name='x2c-TZVPall-s', family='ahlrichs_x2c', role='orbital', description='All-electron relativistic triple-zeta for NMR shielding', version='1',
#!/usr/bin/env python3 from basis_set_exchange import curate for basis in ['ano-r', 'ano-r0', 'ano-r1', 'ano-r2', 'ano-r3']: print('Parsing {}'.format(basis)) curate.add_basis( bs_file='{}.2.molcas'.format(basis), data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='ano', file_base=basis.upper(), name=basis.upper(), family='ano', role='orbital', description=basis.upper(), version='2', revision_description='Data from supporting information of erratum', data_source='Data from supporting information of erratum', refs=['zobel2020a', 'zobel2021a'], file_fmt=None)
#!/usr/bin/env python3 from basis_set_exchange import curate curate.add_basis( bs_file='DFO-1.gbs', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='dfo', file_base='DFO-1', name='DFO-1', family='dfo', role='orbital', description= 'Optimized gaussian basis set for Density-functional calculations', version='1', revision_description='Data from SI of paper', data_source='Data from SI of paper', refs='porezag1999a', file_fmt=None) curate.add_basis( bs_file='DFO-2.gbs', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='dfo', file_base='DFO-2', name='DFO-2', family='dfo', role='orbital', description=
#!/usr/bin/env python3 from basis_set_exchange import curate if False: curate.add_basis( bs_file='minix.tm.bz2', data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='grimme', file_base='minix', name='MINIX', family='jensen', role='orbital', description='Small basis set used in HF-3c method', version='1', revision_description='Data from Stefan Grimme', data_source='Data by email from Stefan Grimme', refs='Sure2013a', file_fmt=None) curate.add_basis( bs_file='def2-mTZVP.tm', data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='grimme', file_base='def2-mTZVP', name='def2-mTZVP', family='grimme', role='orbital', description='Small basis set used in B97-3c method', version='1', revision_description='Data from Sebastian Ehlert', data_source='Data from Sebastian Ehlert',
#!/usr/bin/env python3 from basis_set_exchange import curate curate.add_basis( bs_file='SBO4-DZ(d)-3G.gbs', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='zorilla', file_base='SBO4-DZ(d)-3G', name='SBO4-DZ(d)-3G', family='zorilla', role='orbital', description= 'SBO4-DZ(d)-3G Double-zeta expansion of simplified box orbitals', version='1', revision_description='Data from D. Zorilla', data_source='Data from D. Zorilla', refs='zorilla2019a', file_fmt=None) curate.add_basis( bs_file='SBO4-SZ-3G.gbs', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='zorilla', file_base='SBO4-SZ-3G', name='SBO4-SZ-3G', family='zorilla', role='orbital', description='SBO4-SZ-3G Single-zeta expansion of simplified box orbitals',
#!/usr/bin/env python3 from basis_set_exchange import curate basis_list = [ 'cc-pV5+dZ-X2C', 'cc-pV5Z-X2C', 'cc-pV6Z-X2C', 'cc-pVD+dZ-X2C', 'cc-pVDZ-X2C', 'cc-pVQ+dZ-X2C', 'cc-pVQZ-X2C', 'cc-pVT+dZ-X2C', 'cc-pVTZ-X2C' ] for basis in basis_list: curate.add_basis( bs_file=basis + '.gbasis', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='dunning_x2c', file_base='NEW_' + basis, name='NEW_' + basis, family='dunning_x2c', role='orbital', description=basis, version=1, revision_description='Data from ccRepo', data_source='ccRepo/Grant Hill', refs='peterson2018a', file_fmt=None)
#!/usr/bin/env python3 from basis_set_exchange import curate curate.add_basis( bs_file='ANO-VT-QZ.2.genbas.bz2', data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='ano_claudino', file_base='ANO-VT-QZ', name='ANO-VT-QZ', family='ano_claudino', role='orbital', description= 'ANO-VT-QZ (Atomic Natural Orbital - Virial Theorem - Quadruple Zeta)', version=2, revision_description= 'Retranslated from ACES format; original Gaussian\'94 data had negative exponents', data_source='Data from D. Claudino', refs=['claudino2016a', 'claudino2016b'], file_fmt='genbas')
#!/usr/bin/env python3 from basis_set_exchange import curate curate.add_basis(bs_file='6-311xxG(d,p).gbs', data_dir='/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='zorilla', file_base='6-311xxG(d,p)', name='6-311xxG(d,p)', family='zorilla', role='orbital', description='6-311xxG(d,p) basis set', version='1', revision_description='Data from D. Zorilla', data_source='Data from D. Zorilla', refs='sanchezmarquez2020a', file_fmt=None )
'ahgbs-9.gbs': 'AHGBS-9', 'ahgbsp1-9.gbs': 'AHGBSP1-9', 'ahgbsp2-9.gbs': 'AHGBSP2-9', 'ahgbsp3-9.gbs': 'AHGBSP3-9' } # Lehtola2020a for basis_file, name in hgbs_sets.items(): curate.add_basis( bs_file=basis_file, data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='lehtola_hgbs', file_base=name, name=name, family='lehtola_hgbs', role='orbital', description=name, version=1, revision_description='Data from S. Lehtola', data_source='Direct from S. Lehtola', refs='lehtola2020a', file_fmt=None) # Lehtola2020b for basis_file, name in guess_sets.items(): curate.add_basis( bs_file=basis_file, data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='lehtola_sap',
# name = str(n) + 'ZaPa-NR-CV' # # print("Adding ", name) # curate.add_basis(name.lower() + '.gbs.bz2', # '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', # 'ranasinghe', # name, # name, # 'ranasinghe', # 'orbital', # 'Ranasinghe-Petersson 2ZaPa-NR-CV basis set', # '1', # 'Data from Supplemental Information of publications', # 'Data from Supplemental Information of publications', # 'ranasinghe2015a' # ) # for n in range(2, 8): name = str(n) + 'ZaPa-NR' print("Adding ", name) curate.add_basis( name.lower() + '.gbs.bz2', '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', 'ranasinghe', name, name, 'ranasinghe', 'orbital', 'Ranasinghe-Petersson 2ZaPa-NR basis set', '1', 'Data from Supplemental Information of publications', 'Data from Supplemental Information of publications', 'ranasinghe2013a')
#!/usr/bin/env python3 from basis_set_exchange import curate for b in [ 'cc-pVDZ-F12_OPTRIplus', 'cc-pVTZ-F12_OPTRIplus', 'cc-pVQZ-F12_OPTRIplus' ]: name = b.replace('_', '-').replace('plus', '+') curate.add_basis( bs_file='parsed/{}.gbasis'.format(b), data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='dunning_fit', file_base=name, name=name, family='dunning_fit', role='optri', description=name, version=1, revision_description="Data from Grant Hill's ccRepo", data_source="Data from Grant Hill's ccRepo", refs=['shaw2017a'])
#!/usr/bin/env python3 from basis_set_exchange import curate for x in [2, 3, 4]: curate.add_basis( 'acv{}z-J.c4bas.bz2'.format(x), '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', 'acvXz-J', 'acv{}z-J'.format(x), 'acv{}z-J'.format(x), 'acvXz-J', 'orbital', 'acv{}z-J basis for indirect nuclear spin-spin coupling'.format(x), '1', 'Data from Supplemental Information of publications', 'Data from Supplemental Information of publications', 'rusakov2019a')
#!/usr/bin/env python3 from basis_set_exchange import curate curate.add_basis( bs_file='ANO-R.molcas', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='ano', file_base='ANO-R', name='ANO-R', family='ano', role='orbital', description='ANO-R', version='1', revision_description='Data from Supporting Information', data_source='Data from Supporting Information', refs='zobel2019a', file_fmt=None)
#!/usr/bin/env python3 from basis_set_exchange import curate curate.add_basis( bs_file='', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='', file_base='', name='', family='', role='', description='', version='', revision_description='', data_source='', refs='', file_fmt=None)
#!/usr/bin/env python3 from basis_set_exchange import curate for aug in ["", "aug-"]: for cv in ["", "wC"]: for v in ['D', 'T', 'Q', '5']: basis = '{}seg-cc-p{}V{}Z-PP'.format(aug, cv, v) print('Processing {}'.format(basis)) curate.add_basis( bs_file='{}.nw'.format(basis.lower()), data_dir= '/home/work/basis_set_exchange/basis_set_exchange/data', subdir='dunning', file_base=basis, name=basis, family='dunning', role='orbital', description=basis, version=1, revision_description='Data from George Schoendorff', data_source='Data from George Schoendorff', refs='schoendorff2022a', file_fmt=None)
polarization_name = ['', 'p1', 'p2', 'p3'] augmentation_type = ['', ', with more diffuse functions'] aug_name = ['', 'a'] for tol in [5, 7]: for pol in range(len(polarization_type)): for aug in [False, True]: name = '{}hgbs{}-{}'.format(aug_name[aug], polarization_name[pol], tol) basis_file = '{}.gbs'.format(name) description = 'Hydrogenic Gaussian basis set formed at tolerance 10^{{-{}}} {}{}'.format( tol, polarization_type[pol], augmentation_type[aug]) print(f'{name=}') print(f'{basis_file=}') print(f'{description=}') curate.add_basis( bs_file=basis_file, data_dir= '/home/work/basis_set_exchange/basis_set_exchange/data', subdir='lehtola_hgbs', file_base=name.upper(), name=name.upper(), family='lehtola_hgbs', role='orbital', description=description, version=1, revision_description='Data from S. Lehtola', data_source='Direct from S. Lehtola', refs='lehtola2020a', file_fmt=None)
#!/usr/bin/env python3 from basis_set_exchange import curate if False: for basis in ['pob-DZVP-rev2', 'pob-TZVP-rev2']: print('Adding {}'.format(basis)) curate.add_basis(bs_file='{}.crystal.bz2'.format(basis), data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='pob', file_base=basis, name=basis, family='pob', role='orbital', description=basis, version=1, revision_description='Data from Bredow\'s web site', data_source='Data from Bredow\'s web site', refs='Oliveira2019b', file_fmt=None ) curate.add_basis(bs_file='pob-TZVP.crystal.bz2', data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='pob', file_base='pob-TZVP', name='pob-TZVP', family='pob', role='orbital', description='pob-TZVP', version=1,
for aug in [False, True]: # for nval in range(2,6): for nval in range(5, 6): # Input file name infile = 'ccX{:02d}'.format(nval - 1) # Basis set name is basname = 'ccX-{}Z'.format(valence[nval - 2]) if aug: infile = 'a' + infile basname = 'aug-' + basname # Description description = '{} set for calculation of core excitations by the correlated wave function linear response and equation-of-motion methods'.format( 'Augmented basis' if aug else 'Basis') print('Parsing {} -> {}'.format(infile, basname)) curate.add_basis( bs_file=infile, data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='jensen', file_base=basname, name=basname, family='jensen', role='orbital', description=description, version='1', revision_description='Data from Frank Jensen', data_source='Data directly from Frank Jensen', refs='ambroise2021a', file_fmt='gaussian94')
#!/usr/bin/env python3 from basis_set_exchange import curate for basis in [ 'cc-pVDZ-F12rev2', 'cc-pVTZ-F12rev2', 'cc-pVQZ-F12rev2', 'cc-pV5Z-F12rev2' ]: print(basis) curate.add_basis( bs_file=basis + '.nw.bz2', data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='dunning_f12', file_base=basis, name=basis, family='dunning_f12', role='orbital', description=basis, version='1', revision_description='Data from K. Peterson', data_source='K. Peterson Website', refs='peterson2015a', file_fmt=None)
#!/usr/bin/env python3 from basis_set_exchange import curate for val in ['D', 'T', 'Q', '5']: for aug in ['', 'saug-', 'aug-']: basis = '{}ano-pV{}Z'.format(aug, val) print('Parsing {}'.format(basis)) curate.add_basis( bs_file='{}.bas'.format(basis), data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='ano', file_base=basis, name=basis, family='ano', role='orbital', description=basis, version='1', revision_description='Data from supporting information', data_source='Data from supporting information', refs=['neese2011a'], file_fmt='gamess_us')
description += ' for one-component calculations' else: description += ' for two-component calculations' if nmr: basname += '-s' description += ' of NMR shielding' curate.add_basis( bs_file='{}.tm.bz2'.format(basname), data_dir= '/home/work/basis_set_exchange/basis_set_exchange/data', subdir='ahlrichs_x2c', file_base=basname, name=basname, family='ahlrichs_x2c', role='orbital', description=description, version='1', revision_description='Data from Supporting info', data_source='Supporting info of franzke2020a', refs='franzke2020a', file_fmt=None) curate.add_basis( bs_file='x2c-JFIT.tm.bz2', data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='ahlrichs_x2c', file_base='x2c-JFIT', name='x2c-JFIT', family='ahlrichs_fit',
from basis_set_exchange import curate print(curate) flist = { 'aug-pcH-1': 'aug-pcH-1', 'aug-pcH-2': 'aug-pcH-2', 'aug-pcH-3': 'aug-pcH-3', 'aug-pcH-4': 'aug-pcH-4', 'pcH-1': 'pcH-1', 'pcH-2': 'pcH-2', 'pcH-3': 'pcH-3', 'pcH-4': 'pcH-4', } for k, v in flist.items(): curate.add_basis( bs_file=k, data_dir= '/home/ben/programming/bse_ng/basis_set_exchange/basis_set_exchange/data', subdir='jensen', file_base=k, name=k, family='jensen', role='orbital', description=v, version='1', revision_description='Data from Frank Jensen', data_source='Data from Frank Jensen', refs='jakobsen2019a', file_fmt='dalton')
#!/usr/bin/env python3 from basis_set_exchange import curate for val in ['1', '2']: basis='pecJ-{}'.format(val) print('Parsing {}'.format(basis)) curate.add_basis(bs_file='{}.1.cfour'.format(basis), data_dir='/home/work/basis_set_exchange/basis_set_exchange/data', subdir='pec', file_base=basis, name=basis, family='pec', role='orbital', description=basis, version='1', revision_description='Data from supporting information', data_source='Data from supporting information', refs=['rusakov2021a'], file_fmt='genbas' )