Beispiel #1
0
 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
         })
Beispiel #2
0
 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
         })
Beispiel #3
0
 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
         })
Beispiel #4
0
 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
         })
Beispiel #5
0
 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
         })
Beispiel #6
0
 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
         })
Beispiel #7
0
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
Beispiel #8
0
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
Beispiel #9
0
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
Beispiel #10
0
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
Beispiel #11
0
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
Beispiel #12
0
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
Beispiel #13
0
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
Beispiel #14
0
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
Beispiel #15
0
 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})
Beispiel #16
0
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
Beispiel #17
0
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
Beispiel #18
0
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
Beispiel #19
0
 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})
Beispiel #20
0
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
Beispiel #21
0
 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})
Beispiel #22
0
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
Beispiel #23
0
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
Beispiel #24
0
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
Beispiel #25
0
 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})