Пример #1
0
 def TRACE_MAX(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'GLOBAL',
             'Variable': 'TRACE_MAX',
             'Success': True,
             'Previous': self.__TRACE_MAX,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__TRACE_MAX = val
     else:
         errorMessage = "TRACE_MAX must be an integer"
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'GLOBAL',
             'Variable': 'TRACE_MAX',
             'Success': False,
             'Previous': self.__TRACE_MAX,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'GLOBAL',
             'Variable': 'TRACE_MAX',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #2
0
 def NS_MAX(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT/POISSON/EWALD',
             'Variable': 'NS_MAX',
             'Success': True,
             'Previous': self.__NS_MAX,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__NS_MAX = val
     else:
         errorMessage = "NS_MAX must be aN integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT/POISSON/EWALD',
             'Variable': 'NS_MAX',
             'Success': False,
             'Previous': self.__NS_MAX,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'DFT/POISSON/EWALD',
             'Variable': 'NS_MAX',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #3
0
 def MAO(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'SUBSYS.KIND',
             'Variable': 'MAO',
             'Success': True,
             'Previous': self.__MAO,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__MAO = val
     else:
         errorMessage = "MAO must be aN integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'SUBSYS.KIND',
             'Variable': 'MAO',
             'Success': False,
             'Previous': self.__MAO,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'subsys.kind',
             'Variable': 'MAO',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #4
0
 def CHARGE(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT',
             'Variable': 'CHARGE',
             'Success': True,
             'Previous': self.__CHARGE,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__CHARGE = val
     else:
         errorMessage = "CHARGE must be aN integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT',
             'Variable': 'CHARGE',
             'Success': False,
             'Previous': self.__CHARGE,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'DFT',
             'Variable': 'CHARGE',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #5
0
 def MAX_SCF(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'SCF.OUTER_SCF',
             'Variable': 'MAX_SCF',
             'Success': True,
             'Previous': self.__MAX_SCF,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__MAX_SCF = val
     else:
         errorMessage = "MAX_SCF must be a positive integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'SCF.OUTER_SCF',
             'Variable': 'MAX_SCF',
             'Success': False,
             'Previous': self.__MAX_SCF,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'SCF.OUTER_SCF',
             'Variable': 'MAX_SCF',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #6
0
 def LMAX_DFTB(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'SUBSYS.KIND',
             'Variable': 'LMAX_DFTB',
             'Success': True,
             'Previous': self.__LMAX_DFTB,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__LMAX_DFTB = val
     else:
         errorMessage = "LMAX_DFTB must be aN integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'SUBSYS.KIND',
             'Variable': 'LMAX_DFTB',
             'Success': False,
             'Previous': self.__LMAX_DFTB,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'SUBSYS.KIND',
             'Variable': 'LMAX_DFTB',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #7
0
 def D3_EXCLUDE_KIND(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT.XC.VDW_POT.PAIR_POT',
             'Variable': 'D3_EXCLUDE_KIND',
             'Success': True,
             'Previous': self.__D3_EXCLUDE_KIND,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__D3_EXCLUDE_KIND = val
     else:
         errorMessage = "D3_EXCLUDE_KIND must be aN integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT.XC.VDW_POT.PAIR_POT',
             'Variable': 'D3_EXCLUDE_KIND',
             'Success': False,
             'Previous': self.__D3_EXCLUDE_KIND,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'DFT.XC.VDW_POT.PAIR_POT',
             'Variable': 'D3_EXCLUDE_KIND',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #8
0
 def SEED(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'FORCE_EVAL.SUBSYS',
             'Variable': 'SEED',
             'Success': True,
             'Previous': self.__SEED,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__SEED = val
     else:
         errorMessage = "SEED must be an  integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'FORCE_EVAL.SUBSYS',
             'Variable': 'SEED',
             'Success': False,
             'Previous': self.__SEED,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'DFT',
             'Variable': 'SEED',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #9
0
 def MULTIPLICITY(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT',
             'Variable': 'MULTIPLICITY',
             'Success': True,
             'Previous': self.__MULTIPLICITY,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__MULTIPLICITY = val
     else:
         errorMessage = "MULTIPLICITY must be an  integer."
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DFT',
             'Variable': 'MULTIPLICITY',
             'Success': False,
             'Previous': self.__MULTIPLICITY,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'DFT',
             'Variable': 'MULTIPLICITY',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #10
0
 def MM_STACK_SIZE(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DBCSR',
             'Variable': 'MM_STACK_SIZE',
             'Success': True,
             'Previous': self.__MM_STACK_SIZE,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__MM_STACK_SIZE = val
     else:
         errorMessage = "MM_STACK_SIZE must be an integer. You passed {}.".format(
             val)
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'DBCSR',
             'Variable': 'MM_STACK_SIZE',
             'Success': False,
             'Previous': self.__MM_STACK_SIZE,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'DBCSR',
             'Variable': 'MM_STACK_SIZE',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Пример #11
0
def _validate_NGRIDS(val,errorLog=[]):
  if utilities.is_integer(val) or (val is None):
    return val
  else:
    errorMessage = "NGRIDS must be an integer."
    errorLog.append({'Date': datetime.datetime.now(), 'Type': 'init', 'Module': 'DFT.MGRID',
                     'Variable': 'NGRIDS', 'ErrorMessage': errorMessage})
    raise TypeError
Пример #12
0
def _validate_N_HISTORY_VEC(val,errorLog=[]):
  if utilities.is_integer(val) or (val is None):
    return val
  else:
    errorMessage = "N_HISTORY_VEC  must be AN integer."
    errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'SCF OT',
                            'Variable':'N_HISTORY_VEC','ErrorMessage':errorMessage})
    raise TypeError
Пример #13
0
def _validate_ELEC_CONF(val, errorLog=[]):
    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "ELEC_CONF must be an integer."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'SUBSYS.KIND',
            'Variable': 'ELEC_CONF',
            'ErrorMessage': errorMessage
        })
        raise TypeError
Пример #14
0
def _validate_SEED(val, errorLog=[]):
    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "SEED must be an integer."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'FORCE_EVAL.SUBSYS',
            'Variable': 'SEED',
            'ErrorMessage': errorMessage
        })
        raise TypeError
Пример #15
0
def _validate_O_SPLINE(val, errorLog=[]):
    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "O_SPLINE must be an integer."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'DFT/POISSON/EWALD',
            'Variable': 'O_SPLINE',
            'ErrorMessage': errorMessage
        })
        raise TypeError
Пример #16
0
def _validate_MAX_SCF(val, errorLog=[]):
    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "MAX_SCF  must be AN integer."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'SCF OUTER_SCF',
            'Variable': 'MAX_SCF',
            'ErrorMessage': errorMessage
        })
        raise TypeError
Пример #17
0
def _validate_D3_EXCLUDE_KIND(val, errorLog=[]):
    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "D3_EXCLUDE_KIND must be an integer."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'XC/VDW_POTENTIAL/PAIR_POTENTIAL',
            'Variable': 'D3_EXCLUDE_KIND',
            'ErrorMessage': errorMessage
        })
        raise TypeError
Пример #18
0
def _validate_MULTIPLICITY(val, errorLog=[]):
    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "MULTIPLICITY must be an integer."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'DFT',
            'Variable': 'MULTIPLICITY',
            'ErrorMessage': errorMessage
        })
        raise TypeError
Пример #19
0
def _validate_NROW_BLOCK(val, errorLog=[]):
    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "NROW_BLOCK level must be AN integer."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'SCF',
            'Variable': 'NROW_BLOCK',
            'ErrorMessage': errorMessage
        })
        raise TypeError