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

Class MaestroReader

  object --+    
           |    
FormatReader --+
               |
              MaestroReader
Known Subclasses:

A class for reading structures from a Maestro (M2io) format file.

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

Inherited from FormatReader: clearReadErrors, getReadErrors, startErrorQueuing, stopErrorQueuing

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

Class Variables [hide private]
  read_mode = 16
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename, index=1, error_handler=None, input_string=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.
  • input_string (string) - A string with the contents of a Maestro format file. If provided, the filename argument is ignored.
Overrides: object.__init__

getErrorHandler(self)

 

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

Overrides: FormatReader.getErrorHandler

next(self)

 

Return the next Structure object from the file. Set self.last_position to the file offset just before it was read.