def N_SIZE_MNK_STACKS(self, val): if utilities.is_positive_integer(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'DBCSR', 'Variable': 'N_SIZE_MNK_STACKS', 'Success': True, 'Previous': self.__N_SIZE_MNK_STACKS, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__N_SIZE_MNK_STACKS = val else: errorMessage = "N_SIZE_MNK_STACKS must be a positive integer. You passed {}.".format( val) self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'DBCSR', 'Variable': 'N_SIZE_MNK_STACKS', 'Success': False, 'Previous': self.__N_SIZE_MNK_STACKS, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'DBCSR', 'Variable': 'N_SIZE_MNK_STACKS', 'ErrorMessage': errorMessage, 'Location': self.__location })
def BACKUP_COPIES(self, val): if utilities.is_positive_integer(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'PRINT / RESTART', 'Variable': 'BACKUP_COPIES', 'Success': True, 'Previous': self.__BACKUP_COPIES, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__BACKUP_COPIES = val else: errorMessage = "BACKUP_COPIES must be a positive integer." self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'PRINT / RESTART', 'Variable': 'BACKUP_COPIES', 'Success': False, 'Previous': self.__BACKUP_COPIES, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'PRINT / RESTART', 'Variable': 'BACKUP_COPIES', 'ErrorMessage': errorMessage, 'Location': self.__location })
def COMMON_ITERATION_LEVELS(self, val): if utilities.is_positive_integer(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'PROGRAM_RUN_INFO', 'Variable': 'COMMON_ITERATION_LEVELS', 'Success': True, 'Previous': self.__COMMON_ITERATION_LEVELS, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__COMMON_ITERATION_LEVELS = val else: errorMessage = "COMMON_ITERATION_LEVELS must be a positive integer." self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'PROGRAM_RUN_INFO', 'Variable': 'COMMON_ITERATION_LEVELS', 'Success': False, 'Previous': self.__COMMON_ITERATION_LEVELS, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'PROGRAM_RUN_INFO', 'Variable': 'COMMON_ITERATION_LEVELS', 'ErrorMessage': errorMessage, 'Location': self.__location })
def STEP_START_VAL(self, val): if utilities.is_positive_integer(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'GEO_OPT', 'Variable': 'STEP_START_VAL', 'Success': True, 'Previous': self.__STEP_START_VAL, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__STEP_START_VAL = val else: errorMessage = "STEP_START_VAL must be a positive integer." self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'GEO_OPT', 'Variable': 'STEP_START_VAL', 'Success': False, 'Previous': self.__STEP_START_VAL, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'GEO_OPT', 'Variable': 'STEP_START_VAL', 'ErrorMessage': errorMessage, 'Location': self.__location })
def MAX_ELEMENTS_PER_BLOCK(self, val): if utilities.is_positive_integer(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'DBCSR', 'Variable': 'MAX_ELEMENTS_PER_BLOCK', 'Success': True, 'Previous': self.__MAX_ELEMENTS_PER_BLOCK, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__MAX_ELEMENTS_PER_BLOCK = val else: errorMessage = "MAX_ELEMENTS_PER_BLOCK must be a positive integer. You passed {}.".format( val) self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'DBCSR', 'Variable': 'MAX_ELEMENTS_PER_BLOCK', 'Success': False, 'Previous': self.__COMM_THREAD_LOAD, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'DBCSR', 'Variable': 'MAX_ELEMENTS_PER_BLOCK', 'ErrorMessage': errorMessage, 'Location': self.__location })
def STRIDE(self, val): if utilities.is_positive_integer(val): self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'FORCE_EVAL/DFT/PRINT/E_DENSITY_CUBE', 'Variable': 'STRIDE', 'Success': True, 'Previous': self.__STRIDE, 'New': val, 'ErrorMessage': None, 'Location': self.__location }) self.__STRIDE = val else: errorMessage = "COMMON_ITERATION_LEVELS must be a positive integer." self.__changeLog.append({ 'Date': datetime.datetime.now(), 'Module': 'FORCE_EVAL/DFT/PRINT/E_DENSITY_CUBE', 'Variable': 'STRIDE', 'Success': False, 'Previous': self.__STRIDE, 'New': val, 'ErrorMessage': errorMessage, 'Location': self.__location }) self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'Setter', 'Module': 'FORCE_EVAL/DFT/PRINT/E_DENSITY_CUBE', 'Variable': 'STRIDE', 'ErrorMessage': errorMessage, 'Location': self.__location })
def _validate_ep_lin_solver(val,errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "EP_LIN_SOLVER iteration level must be a positive integer." errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'EACH', 'Variable':'EP_LIN_SOLVER','ErrorMessage':errorMessage}) raise TypeError
def _validate_qs_scf(val,errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "QS_SCF iteration level must be a positive integer." errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'EACH', 'Variable':'QS_SCF','ErrorMessage':errorMessage}) raise TypeError
def _validate_metadynamics(val,errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "METADYNAMICS iteration level must be a positive integer." errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'EACH', 'Variable':'METADYNAMICS','ErrorMessage':errorMessage}) raise TypeError
def _validate_spline_find_coeffs(val,errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "SPLINE_FIND_COEFFS iteration level must be a positive integer." errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'EACH', 'Variable':'SPLINE_FIND_COEFFS','ErrorMessage':errorMessage}) raise TypeError
def _validate_replica_eval(val,errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "REPLICA_EVAL iteration level must be a positive integer." errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'EACH', 'Variable':'REPLICA_EVAL','ErrorMessage':errorMessage}) raise TypeError
def _validate_yoshida(val): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "Nose YOSHIDA integrator order must be a positive integer." self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'NOSE', 'Variable':'YOSHIDA','ErrorMessage':errorMessage}) raise TypeError
def _validate_length(val): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "Nose LENGTH must be a positive integer." self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'NOSE', 'Variable':'LENGTH','ErrorMessage':errorMessage}) raise TypeError
def _validate_steps(val,errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "MD STEPS must be an integer." errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'MD', 'Variable':'STEPS','ErrorMessage':errorMessage}) raise TypeError
def ROOT(self,val): if utilities.is_positive_integer(val): self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'EACH','Variable':'ROOT', 'Success':True,'Previous':self.__ROOT,'New':val, 'ErrorMessage':None,'Location':self.__location}) self.__ROOT = val else: errorMessage = "ROOT iteration level must be a positive integer." self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'EACH','Variable':'ROOT', 'Success':False,'Previous':self.__ROOT,'New':val, 'ErrorMessage':errorMessage,'Location':self.__location}) self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'Setter','Module':'EACH', 'Variable':'ROOT','ErrorMessage':errorMessage,'Location':self.__location})
def _validate_ndim(val): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "GLE NDIM {Integer} Size of the gle matrix must be a positive number." self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'GLE', 'Variable': 'NDIM', 'ErrorMessage': errorMessage }) raise TypeError
def _validate_BACKUP_COPIES(val, errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "BACKUP_COPIES must be a positive integer." errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'PRINT / RESTART', 'Variable': 'BACKUP_COPIES', 'ErrorMessage': errorMessage }) raise TypeError
def _validate_STRIDE(val, errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "STRIDE level must be a positive integer." errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'FORCE_EVAL/DFT/PRINT/E_DENSITY_CUBE', 'Variable': 'STRIDE', 'ErrorMessage': errorMessage }) raise TypeError
def MTS(self,val): if utilities.is_positive_integer(val): self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'NOSE','Variable':'MTS', 'Success':True,'Previous':self.__MTS,'New':val,'ErrorMessage':None, 'Location':self.__location}) self.__MTS = val else: errorMessage = "Nose number of multiple time steps (MTS) must be a positive integer." self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'NOSE','Variable':'MTS', 'Success':False,'Previous':self.__MTS,'New':val, 'ErrorMessage':errorMessage,'Location':self.__location}) self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'Setter','Module':'NOSE', 'Variable':'MTS','ErrorMessage':errorMessage,'Location':self.__location})
def _validate_a_scale(val): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "scaling factor for matrix A (for generic matrix A, depends on the characteristic frequency of the system). must be a positive integer." self.__errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'GLE', 'Variable': 'A_SCALE', 'ErrorMessage': errorMessage }) raise TypeError
def LENGTH(self,val): if utilities.is_positive_integer(val): self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'NOSE','Variable':'LENGTH', 'Success':True,'Previous':self.__LENGTH,'New':val,'ErrorMessage':None, 'Location':self.__location}) self.__LENGTH = val else: errorMessage = "Nose LENGTH must be a positive integer." self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'NOSE','Variable':'LENGTH', 'Success':False,'Previous':self.__LENGTH,'New':val, 'ErrorMessage':errorMessage,'Location':self.__location}) self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'Setter','Module':'NOSE', 'Variable':'LENGTH','ErrorMessage':errorMessage,'Location':self.__location})
def _validate_COMMON_ITERATION_LEVELS(val, errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "COMMON_ITERATION_LEVELS level must be a positive integer." errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'PROGRAM_RUN_INFO', 'Variable': 'COMMON_ITERATION_LEVELS', 'ErrorMessage': errorMessage }) raise TypeError
def _validate_MAX_ITER(val, errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "GEO_OPT MAX_ITER must be an integer." errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'GEO_OPT', 'Variable': 'MAX_ITER', 'ErrorMessage': errorMessage }) raise TypeError return val
def _validate_STEP_START_VAL(val, errorLog=[]): if utilities.is_positive_integer(val) or (val is None): return val else: errorMessage = "The starting step value for the GEO_OPT module must be an integer." errorLog.append({ 'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'GEO_OPT', 'Variable': 'STEP_START_VAL', 'ErrorMessage': errorMessage }) raise TypeError return val
def SPLINE_FIND_COEFFS(self,val): if utilities.is_positive_integer(val): self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'EACH', 'Variable':'SPLINE_FIND_COEFFS','Success':True, 'Previous':self.__SPLINE_FIND_COEFFS,'New':val,'ErrorMessage':None, 'Location':self.__location}) self.__SPLINE_FIND_COEFFS = val else: errorMessage = "SPLINE_FIND_COEFFS iteration level must be a positive integer." self.__changeLog.append({'Date':datetime.datetime.now(),'Module':'EACH', 'Variable':'SPLINE_FIND_COEFFS','Success':False, 'Previous':self.__SHELL_OPT,'New':val,'ErrorMessage':errorMessage, 'Location':self.__location}) self.__errorLog.append({'Date':datetime.datetime.now(),'Type':'Setter','Module':'EACH', 'Variable':'SPLINE_FIND_COEFFS','ErrorMessage':errorMessage, 'Location':self.__location})