コード例 #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 O_SPLINE(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             "Date": datetime.datetime.now(),
             "Module": "DFT/POISSON/EWALD",
             "Variable": "O_SPLINE",
             "Success": True,
             "Previous": self.__O_SPLINE,
             "New": val,
             "ErrorMessage": None,
             "Location": self.__location,
         })
         self.__O_SPLINE = val
     else:
         errorMessage = "O_SPLINE must be aN integer."
         self.__changeLog.append({
             "Date": datetime.datetime.now(),
             "Module": "DFT/POISSON/EWALD",
             "Variable": "O_SPLINE",
             "Success": False,
             "Previous": self.__O_SPLINE,
             "New": val,
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
         self.__errorLog.append({
             "Date": datetime.datetime.now(),
             "Type": "Setter",
             "Module": "DFT/POISSON/EWALD",
             "Variable": "O_SPLINE",
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
コード例 #3
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,
         })
コード例 #4
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,
         })
コード例 #5
0
 def NGRIDS(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             "Date": datetime.datetime.now(),
             "Module": "DFT.MGRID",
             "Variable": "NGRIDS",
             "Success": True,
             "Previous": self.__NGRIDS,
             "New": val,
             "ErrorMessage": None,
             "Location": self.__location,
         })
         self.__NGRIDS = val
     else:
         errorMessage = "NGRIDS must be aN integer."
         self.__changeLog.append({
             "Date": datetime.datetime.now(),
             "Module": "DFT.MGRID",
             "Variable": "NGRIDS",
             "Success": False,
             "Previous": self.__NGRIDS,
             "New": val,
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
         self.__errorLog.append({
             "Date": datetime.datetime.now(),
             "Type": "Setter",
             "Module": "DFT.MGRID",
             "Variable": "NGRIDS",
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
コード例 #6
0
    def NMOL(self, val):

        if utilities.is_integer(val) or val is None:
            self.__changeLog.append({
                "Date": datetime.datetime.now(),
                "Module": "MOLECULE",
                "Variable": "NMOL",
                "Success": True,
                "Previous": self.__NMOL,
                "New": val,
                "ErrorMessage": None,
                "Location": self.__location,
            })
            self.__NMOL = val
        else:
            errorMessage = "Invalid option for NMOL: {}. Should be an integer.".format(
                val)
            self.__changeLog.append({
                "Date": datetime.datetime.now(),
                "Module": "MOLECULE",
                "Variable": "NMOL",
                "Success": False,
                "Previous": self.__NMOL,
                "New": val,
                "ErrorMessage": errorMessage,
                "Location": self.__location,
            })
            self.__errorLog.append({
                "Date": datetime.datetime.now(),
                "Type": "Setter",
                "Module": "MOLECULE",
                "Variable": "NMOL",
                "ErrorMessage": errorMessage,
                "Location": self.__location,
            })
コード例 #7
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,
         })
コード例 #8
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,
         })
コード例 #9
0
 def SEED(self, val):
     if utilities.is_integer(val) or val is None:
         self.__changeLog.append({
             "Date": datetime.datetime.now(),
             "Module": "GLOBAL",
             "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": "GLOBAL",
             "Variable": "SEED",
             "Success": False,
             "Previous": self.__SEED,
             "New": val,
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
         self.__errorLog.append({
             "Date": datetime.datetime.now(),
             "Type": "Setter",
             "Module": "GLOBAL",
             "Variable": "SEED",
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
コード例 #10
0
 def LEBEDEV_GRID(self, val):
     if utilities.is_integer(val):
         self.__changeLog.append({
             "Date": datetime.datetime.now(),
             "Module": "SUBSYS.KIND",
             "Variable": "LEBEDEV_GRID",
             "Success": True,
             "Previous": self.__LEBEDEV_GRID,
             "New": val,
             "ErrorMessage": None,
             "Location": self.__location,
         })
         self.__LEBEDEV_GRID = val
     else:
         errorMessage = "LEBEDEV_GRID must be aN integer."
         self.__changeLog.append({
             "Date": datetime.datetime.now(),
             "Module": "SUBSYS.KIND",
             "Variable": "LEBEDEV_GRID",
             "Success": False,
             "Previous": self.__LEBEDEV_GRID,
             "New": val,
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
         self.__errorLog.append({
             "Date": datetime.datetime.now(),
             "Type": "Setter",
             "Module": "SUBSYS.KIND",
             "Variable": "LEBEDEV_GRID",
             "ErrorMessage": errorMessage,
             "Location": self.__location,
         })
コード例 #11
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,
         })
コード例 #12
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
コード例 #13
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
コード例 #14
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
コード例 #15
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
コード例 #16
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
コード例 #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_NMOL(val, errorLog=[]):

    if utilities.is_integer(val) or (val is None):
        return val
    else:
        errorMessage = "Invalid option for NMOL: {}. Should be an integer".format(
            val)
        errorLog.append({
            "Date": datetime.datetime.now(),
            "Type": "init",
            "Module": "MOLECULE",
            "Variable": "NMOL",
            "ErrorMessage": errorMessage,
        })
        raise TypeError