Exemplo n.º 1
0
 def FFT_POOL_SCRATCH_LIMIT(self, val):
     if utilities.is_number(val):
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'GLOBAL',
             'Variable': 'FFT_POOL_SCRATCH_LIMIT',
             'Success': True,
             'Previous': self.__FFT_POOL_SCRATCH_LIMIT,
             'New': val,
             'ErrorMessage': None,
             'Location': self.__location
         })
         self.__FFT_POOL_SCRATCH_LIMIT = val
     else:
         errorMessage = "FFT_POOL_SCRATCH_LIMIT must be a number. You passed {}".format(
             val)
         self.__changeLog.append({
             'Date': datetime.datetime.now(),
             'Module': 'GLOBAL',
             'Variable': 'FFTW_POOL_SCRATCH_LIMIT',
             'Success': False,
             'Previous': self.__FFTW_POOL_SCRATCH_LIMIT,
             'New': val,
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
         self.__errorLog.append({
             'Date': datetime.datetime.now(),
             'Type': 'Setter',
             'Module': 'GLOBAL',
             'Variable': 'EXTENDED_FFTW_POOL_SCRATCH_LIMIT',
             'ErrorMessage': errorMessage,
             'Location': self.__location
         })
Exemplo n.º 2
0
def _validate_temperature(val,errorLog=[]):
  if utilities.is_number(val) or (val is None):
    return val
  else:
    errorMessage = "MD TEMPERATURE must be a number."
    errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'MD',
                            'Variable':'TEMPERATURE','ErrorMessage':errorMessage})
    raise TypeError
Exemplo n.º 3
0
def _validate_timestep(val,errorLog=[]):
  if utilities.is_number(val) or (val is None):
    return val
  else:
    errorMessage = "MD TIMESTEP must be a number."
    errorLog.append({'Date':datetime.datetime.now(),'Type':'init','Module':'MD',
                            'Variable':'TIMESTEP','ErrorMessage':errorMessage})
    raise TypeError
Exemplo n.º 4
0
def _validate_timecon(val, errorLog=[]):
    if utilities.is_number(val) or (val is None):
        return val
    else:
        errorMessage = "BAROSTAT TIMECON must be a number."
        errorLog.append({
            'Date': datetime.datetime.now(),
            'Type': 'init',
            'Module': 'BAROSTAT',
            'Variable': 'TIMECON',
            'ErrorMessage': errorMessage
        })
        raise TypeError