Package schrodinger :: Module structure :: Class Mol2Reader
[hide private]
[frames] | no frames]

Class Mol2Reader

                 object --+        
                          |        
_ReaderWriterContextManager --+    
                              |    
                   FormatReader --+
                                  |
                                 Mol2Reader

A class for reading structures from a mol2 format file.

Instance Methods [hide private]
 
__init__(self, filename, index=1, error_handler=None)
Initialize the reader.
 
__del__(self)
 
close(self)
Close the file.
 
__iter__(self)
 
getErrorHandler(self)
Returns the error handler by querying the mmmmol2 library and if the refcount is > 0 then return the error handler that is in use by mmmol2.
 
next(self)
Return the next Structure object from the file.

Inherited from FormatReader: clearReadErrors, getReadErrors, startErrorQueuing, stopErrorQueuing

Inherited from _ReaderWriterContextManager: __enter__, __exit__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename, index=1, error_handler=None)
(Constructor)

 

Initialize the reader.

Parameters:
  • filename (string) - The filename to read.
  • index (int) - The index of the first structure to read.
  • error_handler (int) - The handle of the mmerr object to use for error logging. Defaults to schrodinger.infra.mm.error_handler.
Overrides: object.__init__

getErrorHandler(self)

 

Returns the error handler by querying the mmmmol2 library and if the refcount is > 0 then return the error handler that is in use by mmmol2. Otherwise None is returned.

Overrides: FormatReader.getErrorHandler