print 'There is no such basis set in this file! \n 1. Continue 2. Exit \n' Ctrl_local_exit = raw_input('') if Ctrl_local_exit == '2': sys.exit(1) elif Ctrl_local_exit == '1': f.close() f = file(Usr_in_basis_name, 'r') Gbl_Z = raw_input( 'Please input what is the atomic number of the element that you want: ' ) else: print 'Wrong input, error exit!' sys.exit(1) if 'Z=' + Gbl_Z in line[:5]: z = int(Gbl_Z) basis = Classes.Basis_set(z) line = f.readline() while line[:2] != 'Z=' and line[:3] != 'END': if line[:6] == 'NUMEXP': basis.gbasis_read_in(f, line) line = f.readline() else: f.close() break #print basis.LT_EXP_COE_S #read regular basis if it is an augmented basis set Usr_in_basis_name_basename = os.path.basename(Usr_in_basis_name) Usr_in_basis_name_dirname = os.path.dirname( os.path.realpath(Usr_in_basis_name)) if 'AUG' in Usr_in_basis_name_basename: Usr_in_basis_name_basename_no_aug = Usr_in_basis_name_basename[4:]