schrodinger.application.mopac.exceptions module¶
Some custom MOPAC exception classes
-
exception
schrodinger.application.mopac.exceptions.
MopacUserFacingException
¶ Bases:
Exception
Base class for custom Mopac exceptions. This is modeled on the mechanism we use in Jaguar. (c.f. JAGUAR-7506.)
The idea is to distinguish exceptions which are intended to be user-facing from those that are not. The former include “expected” exceptions such as those arising from user error (e.g. invalid input file keywords) or issues unrelated to errors in the Jaguar code (such as disk space exceeded, file permissions invalid etc). In these cases, a clear and informative message should be printed in the user-facing output files about the specific error encountered. In many cases, a user can use this information to try to fix the issue and rerun the job.
In contrast, exceptions arising from developer or coding errors, including all built-in exceptions, should NOT be specifically output in the user-facing files. Such messages will typically be technical in nature, not useful, and potentially confusing to a user. Instead, the exception should be suppressed, and a generic error message printed informing the user something went wrong and how they can report it or get help from us.
Finally, there should never be any tracebacks printed in the user-facing files. This is implemented using the mmshare global exception handler from cmdline utils, independently of the exception type.
-
__cause__
¶ exception cause
-
__class__
¶ alias of
builtins.type
-
__context__
¶ exception context
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.mopac.exceptions', '__doc__': '\n Base class for custom Mopac exceptions. This is modeled on the\n mechanism we use in Jaguar. (c.f. JAGUAR-7506.)\n\n The idea is to distinguish exceptions which are intended to be user-facing\n from those that are not. The former include "expected" exceptions such as\n those arising from user error (e.g. invalid input file keywords) or\n issues unrelated to errors in the Jaguar code (such as disk space exceeded,\n file permissions invalid etc). In these cases, a clear and informative\n message should be printed in the user-facing output files about the specific\n error encountered. In many cases, a user can use this information to try\n to fix the issue and rerun the job.\n\n In contrast, exceptions arising from developer or coding errors, including\n all built-in exceptions, should NOT be specifically output in the user-facing\n files. Such messages will typically be technical in nature, not useful,\n and potentially confusing to a user. Instead, the exception should be\n suppressed, and a generic error message printed informing the user something\n went wrong and how they can report it or get help from us.\n\n Finally, there should never be any tracebacks printed in the\n user-facing files. This is implemented using the mmshare global exception\n handler from cmdline utils, independently of the exception type.\n ', '__weakref__': <attribute '__weakref__' of 'MopacUserFacingException' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.mopac.exceptions'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__setstate__
()¶
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__suppress_context__
¶
-
__traceback__
¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.mopac.exceptions.
MopacRuntimeError
¶ Bases:
schrodinger.application.mopac.exceptions.MopacUserFacingException
-
__cause__
¶ exception cause
-
__class__
¶ alias of
builtins.type
-
__context__
¶ exception context
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.mopac.exceptions', '__doc__': None})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.mopac.exceptions'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__setstate__
()¶
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__suppress_context__
¶
-
__traceback__
¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.mopac.exceptions.
MopacIOError
¶ Bases:
schrodinger.application.mopac.exceptions.MopacUserFacingException
-
__cause__
¶ exception cause
-
__class__
¶ alias of
builtins.type
-
__context__
¶ exception context
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.mopac.exceptions', '__doc__': None})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.mopac.exceptions'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__setstate__
()¶
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__suppress_context__
¶
-
__traceback__
¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-