schrodinger.pipeline.pipeio module

Core Pipeline I/O classes (Structures, Grid, and Text, and PhaseDB).

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.pipeline.pipeio.PipeIO

Bases: object

Parent class for all Pipeline I/O classes. Subclasses hold data that is passed between stages during execution.

getFiles()

Return a list of files representing this object.

This method must be implemented in subclasses.

check()

Make sure that the object is valid. If it’s not valid (e.g. file does not exist), raise a RuntimeError.

This method must be implemented in subclasses.

isFilled()

Check whether the object is used or empty.

This method must be implemented in subclasses.

getCount()

Return the number of items in this object.

This method may be overridden in subclasses.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.pipeline.pipeio', '__doc__': '\n Parent class for all Pipeline I/O classes. Subclasses hold data that is\n passed between stages during execution.\n\n ', 'getFiles': <function PipeIO.getFiles>, 'check': <function PipeIO.check>, 'isFilled': <function PipeIO.isFilled>, 'getCount': <function PipeIO.getCount>, '__dict__': <attribute '__dict__' of 'PipeIO' objects>, '__weakref__': <attribute '__weakref__' of 'PipeIO' objects>})
__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__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

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

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.pipeline.pipeio'
__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

__repr__

Return repr(self).

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

class schrodinger.pipeline.pipeio.Structures(ligs=[], count=None)

Bases: schrodinger.pipeline.pipeio.PipeIO

A class to hold the names of structure files.

__init__(ligs=[], count=None)

Initialize the object with a list of ligand files.

The list can be replaced later with setData.

Parameters:ligs (list) – A list of ligand structure file names.
check()

Make sure all files in the list exist. Raise a RuntimeError if “.” is in the list, and exit (sys.exit(1)) if any file can’t be found.

__str__()

Return a string representation of the object.

setData(ligfiles, count=None)

Replace the list of ligand files with ligfiles.

Raises:RuntimeError – Raised if “.” is in the list.
getFiles()

Return the list of ligand file names after checking that all of them exist via the check method.

isFilled()

Check whether the object is used or empty.

This method must be implemented in subclasses.

getCount(count_if_needed=False)

Return the number of items in this object.

This method may be overridden in subclasses.

count()

Return the number of structures in the set.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.pipeline.pipeio', '__doc__': '\n A class to hold the names of structure files.\n\n ', '__init__': <function Structures.__init__>, 'check': <function Structures.check>, '__str__': <function Structures.__str__>, 'setData': <function Structures.setData>, 'getFiles': <function Structures.getFiles>, 'isFilled': <function Structures.isFilled>, 'getCount': <function Structures.getCount>, 'count': <function Structures.count>})
__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.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.pipeline.pipeio'
__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

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

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

class schrodinger.pipeline.pipeio.Grid(gridfile=None)

Bases: schrodinger.pipeline.pipeio.PipeIO

A class to hold a set of grid files (compressed or uncompressed).

__init__(gridfile=None)
Parameters:gridfile (str) – The name of the grid file (for example, <gridjobname>.grd or <gridjobname>.zip). The value can be changed later with setData.
check()

Check that the grid file exists.

Raises:RuntimeError – Raised if the file is missing.
getPath()

Return the grid file name.

__str__()

Return a string representation of the object.

setData(gridfile)

Replace the grid file name.

Parameters:gridfile (str) – The replacement grid file name.
getFiles()

Return a list of grid file names, expanded from the representative file name, after checking for their existence.

For compressed grids, the zip file is the only item returned, but for uncompressed grids, all the standard grid component file names are returned.

isFilled()

Check whether the object is used or empty.

This method must be implemented in subclasses.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.pipeline.pipeio', '__doc__': '\n A class to hold a set of grid files (compressed or uncompressed).\n\n ', '__init__': <function Grid.__init__>, 'check': <function Grid.check>, 'getPath': <function Grid.getPath>, '__str__': <function Grid.__str__>, 'setData': <function Grid.setData>, 'getFiles': <function Grid.getFiles>, 'isFilled': <function Grid.isFilled>})
__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.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.pipeline.pipeio'
__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

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

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

getCount()

Return the number of items in this object.

This method may be overridden in subclasses.

class schrodinger.pipeline.pipeio.Text(files=[])

Bases: schrodinger.pipeline.pipeio.PipeIO

A class to hold the names of one or more text (or log) files.

__init__(files=[])
Parameters:files (list) – A list of text or log file names. The file paths can be later replaced with setData().
check()

Make sure all files in the list exist.

Raises:RuntimeError – Raised if “.” is in the list or if any file can’t be found.
__str__()

Return a string representation of the object.

setData(textfiles)

Replace the list of file names with textfiles.

Raises:RuntimeError – Raised if “.” is in the list.
getFiles()

Return the list of text file names after checking that all of them exist.

isFilled()

Check whether the object is used or empty.

This method must be implemented in subclasses.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.pipeline.pipeio', '__doc__': '\n A class to hold the names of one or more text (or log) files.\n\n ', '__init__': <function Text.__init__>, 'check': <function Text.check>, '__str__': <function Text.__str__>, 'setData': <function Text.setData>, 'getFiles': <function Text.getFiles>, 'isFilled': <function Text.isFilled>})
__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.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.pipeline.pipeio'
__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

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

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

getCount()

Return the number of items in this object.

This method may be overridden in subclasses.

class schrodinger.pipeline.pipeio.PhaseDB(path=None, remote=False)

Bases: schrodinger.pipeline.pipeio.PipeIO

A class to hold the absolute pathname of a Phase database.

__init__(path=None, remote=False)
Parameters:
  • path (str) – The path to the Phase database (This must end with .phdb.)
  • remote (bool) – A value to control whether the database should be checked for existence only on the remote host, since the localhost may not have access to that directory.
check()

Make sure all files in the list exist.

Raises:RuntimeError – Raised if “.” is in the list or if any file can’t be found.
getPath()

Returns the path (abolute base name).

For the old format, does NOT include “_phasedb”, for new format DOES include the “.phdb”.

__str__()

Return a string representation of the object.

setData(path)

Replace the stored database path.

getFiles()

Return the list of files.

isFilled()

Check whether the object is used or empty.

This method must be implemented in subclasses.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.pipeline.pipeio', '__doc__': '\n A class to hold the absolute pathname of a Phase database.\n\n ', '__init__': <function PhaseDB.__init__>, 'check': <function PhaseDB.check>, 'getPath': <function PhaseDB.getPath>, '__str__': <function PhaseDB.__str__>, 'setData': <function PhaseDB.setData>, 'getFiles': <function PhaseDB.getFiles>, 'isFilled': <function PhaseDB.isFilled>})
__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.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.pipeline.pipeio'
__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

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

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

getCount()

Return the number of items in this object.

This method may be overridden in subclasses.