schrodinger.infra.mmobject module¶
A base class for creation of garbage collected, object-oriented wrappers of the mmlibs.
-
class
schrodinger.infra.mmobject.
MmObject
(handle, manage_handle=True, error_handler=None)¶ Bases:
object
An abstraction of the bookkeeping needed to create a garbage collected MM object. To subclass, you must provide:
- a static initialize() function that calls the necessary mmlib initialize functions. Takes a single argument that is the error handler.
- a static terminate() function that takes no arguments and calls the mmlib terminate functions for everything initialized in init().
- a _delete() instance method that takes no arguments (other than self) and deletes the object via mmlib calls.