schrodinger.infra.mmlist module

A wrapper for the mmlist mmlib.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.infra.mmlist.mmlist(handle_or_list, manage_handle=True)

Bases: schrodinger.infra.mmobject.MmObject

Wrap an anderlying mmlist “instance” and provides access to its members through the python sequence syntax.

__init__(handle_or_list, manage_handle=True)

Initialize an object with an existing mmlist handle or python list of ints.

static initialize(error_handler=None)

Initialize mmlist.

static terminate()

Terminate mmlist.

__repr__()

Programmer-readable representation, prints the mmlist handle

__len__()

Return the number of elements in the mmlist.

__getitem__(index)

Return an item from the underlying mmlist library.

__setitem__(index, value)

Set an item in the underlying mmlist library.

__delitem__(index)
__iter__()

Provide an iterator over the list. This also allows one to create a python list by invoking list() on an instantiated mmlist object.

__contains__(value)

Returns True if the list contains the specified value, False otherwise

__class__

alias of builtins.type

__del__()

Decrement the reference count. If the handle is being actively managed, call _delete when it the count hits zero.

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.infra.mmlist', '__doc__': '\n Wrap an anderlying mmlist "instance" and provides access to its members\n through the python sequence syntax.\n\n ', '__init__': <function mmlist.__init__>, '_delete': <function mmlist._delete>, 'initialize': <staticmethod object>, 'terminate': <staticmethod object>, '__repr__': <function mmlist.__repr__>, '__len__': <function mmlist.__len__>, '__getitem__': <function mmlist.__getitem__>, '__setitem__': <function mmlist.__setitem__>, '__delitem__': <function mmlist.__delitem__>, '__iter__': <function mmlist.__iter__>, '__contains__': <function mmlist.__contains__>})
__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_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__int__()

Return the handle of the object so that the object reference can be used in functions that expect an integer handle.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.infra.mmlist'
__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

__setattr__

Implement setattr(self, name, value).

__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).

__weakref__

list of weak references to the object (if defined)