schrodinger.application.jaguar.validation module¶
Jaguar keywords input validation and custom Exceptions
Copyright Schrodinger, LLC. All rights reserved.
-
exception
schrodinger.application.jaguar.validation.JaguarKeywordException[source]¶ Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingExceptionBase exception class for all custom Jaguar keyword validation errors
-
__init__(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
args¶
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.jaguar.validation.JaguarKeywordError(keyword, allowed_keywords)[source]¶ Bases:
schrodinger.application.jaguar.validation.JaguarKeywordExceptionException class raised when nonexistant Jaguar keyword is requested
-
__init__(keyword, allowed_keywords)[source]¶ - Parameters
keyword (string) – input keyword
allowed_keywords (list) – list of allowed keywords
-
args¶
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.jaguar.validation.JaguarKeywordValueTypeError(keyword, value, valid_type)[source]¶ Bases:
schrodinger.application.jaguar.validation.JaguarKeywordExceptionException class raised when Jaguar keyword value has wrong type
-
__init__(keyword, value, valid_type)[source]¶ - Parameters
keyword (string) – input keyword
value (string) – input value
valid_type (string) – types as described in keywordsDB_mod.py
-
args¶
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.jaguar.validation.JaguarKeywordValueError(keyword, value, settings)[source]¶ Bases:
schrodinger.application.jaguar.validation.JaguarKeywordExceptionException class raised when Jaguar keyword value is invalid
-
__init__(keyword, value, settings)[source]¶ - Parameters
keyword (string) – input keyword
value (string) – input value
settings (list of Settings objects) – settings associated with a keyword
-
args¶
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.jaguar.validation.JaguarKeywordFormatError(token)[source]¶ Bases:
schrodinger.application.jaguar.validation.JaguarKeywordExceptionException class raised when a string not in the keyword=value format is found
-
__init__(token)[source]¶ - Parameters
token (string) – The token that violates the keyword=value format
-
args¶
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
schrodinger.application.jaguar.validation.value_is_type(valid_type, value)[source]¶ Check if value has type equivalent to valid_type after converting string
- Parameters
valid_type (string) – types as described in keywordsDB.py
value (string) – keyword value from input
- Returns
True or False
-
schrodinger.application.jaguar.validation.keyword_value_pair_is_valid(keyword, value)[source]¶ Validate a specific keyword=value pair. The checks are case insensitive.
- Parameters
keyword (string) – e.g. ‘igeopt’
value (string) – e.g. ‘2’ or ‘0.004’ or any string
- Returns
True if all pairs valid, otherwise raise specialized exceptions.