def load_ecp(filename_or_basisname, symb): '''Convert the basis of the given symbol to internal format ''' if os.path.isfile(filename_or_basisname): # read basis from given file return parse_nwchem.load_ecp(filename_or_basisname, symb) name = filename_or_basisname.lower().replace(' ', '').replace('-', '').replace('_', '') basmod = ALIAS[name] symb = ''.join([i for i in symb if i.isalpha()]) return parse_nwchem.load_ecp(os.path.join(os.path.dirname(__file__), basmod), symb)
def load_ecp(filename_or_basisname, symb): '''Convert the basis of the given symbol to internal format ''' symb = ''.join([i for i in symb if i.isalpha()]) if os.path.isfile(filename_or_basisname): # read basis from given file try: return parse_nwchem.load_ecp(filename_or_basisname, symb) except RuntimeError: with open(filename_or_basisname, 'r') as fin: return parse_ecp(fin.read(), symb) name = _format_basis_name(filename_or_basisname) if name in ALIAS: basmod = ALIAS[name] return parse_nwchem.load_ecp(join(_BASIS_DIR, basmod), symb) else: return parse_ecp(filename_or_basisname, symb)
def load_ecp(filename_or_basisname, symb): '''Convert the basis of the given symbol to internal format ''' symb = ''.join([i for i in symb if i.isalpha()]) if os.path.isfile(filename_or_basisname): # read basis from given file try: return parse_nwchem.load_ecp(filename_or_basisname, symb) except RuntimeError: with open(filename_or_basisname, 'r') as fin: return parse_ecp(fin.read(), symb) name = _format_basis_name(filename_or_basisname) if name in ALIAS: basmod = ALIAS[name] return parse_nwchem.load_ecp(os.path.join(_BASIS_DIR, basmod), symb) else: return parse_ecp(filename_or_basisname, symb)
def load_ecp(filename_or_basisname, symb): '''Convert the basis of the given symbol to internal format ''' if os.path.isfile(filename_or_basisname): # read basis from given file try: return parse_nwchem.load_ecp(filename_or_basisname, symb) except RuntimeError: with open(filename_or_basisname, 'r') as fin: return parse_nwchem.parse_ecp(fin.read()) name = _format_basis_name(filename_or_basisname) if name not in ALIAS: return parse_ecp(filename_or_basisname) basmod = ALIAS[name] symb = ''.join([i for i in symb if i.isalpha()]) return parse_nwchem.load_ecp( os.path.join(os.path.dirname(__file__), basmod), symb)
def load_ecp(filename_or_basisname, symb): '''Convert the basis of the given symbol to internal format ''' if os.path.isfile(filename_or_basisname): # read basis from given file try: return parse_nwchem.load_ecp(filename_or_basisname, symb) except RuntimeError: with open(filename_or_basisname, 'r') as fin: return parse_nwchem.parse_ecp(fin.read()) name = filename_or_basisname.lower().replace(' ', '').replace('-', '').replace('_', '') if name not in ALIAS: return parse_ecp(filename_or_basisname) basmod = ALIAS[name] symb = ''.join([i for i in symb if i.isalpha()]) return parse_nwchem.load_ecp(os.path.join(os.path.dirname(__file__), basmod), symb)