schrodinger.infra.mmproj module

Python-level wrappers for the SWIG-wrapped C and C++ functions.

This module exists to make use of pymmproj a bit easier and provides access to all functions and constants present in that module.

It adds a layer of automatic error checking to the SWIG wrapped mmproj functions. Instead of returning function return values to the user, the values are checked for indication of failure. If a failure occurs, an MmException is raised. (The underlying return code can be accessed as the ‘rc’ attribute of an MmException.) If a failure does not occur, the caller will not see the mmlib function return value at all.

To access the mmproj functions in their “pure” form (i.e. the basic SWIG wrapped functions without automatic error checking) use the pymmproj module, which can be imported with ‘import pymmproj’.

To call mmproj functions from python, use input arguments of the appropriate type. Output arguments will be returned as function return values. In the event that there are multiple output arguments, a tuple of these values will be returned. (If you are using functions from the pymmproj module, the first value in your return tuple will always be the return value of the C function.)