schrodinger.application.phase.packages.shape_binary_utils module

class schrodinger.application.phase.packages.shape_binary_utils.ShapeFileWriter(filename, metadata='')

Bases: contextlib.AbstractContextManager

__init__(filename, metadata='')
Parameters:
  • filename (str) – File name (expected to exist if metadata is empty).
  • metadata (str) – Text to be stored as file-scope “metadata”. If empty, “append” opening mode is assumed. If not empty, existing file with the same name will be truncated.
append(title, shapes)

Appends shapes to the associated binary file.

Parameters:
  • title (str) – Title of the shapes.
  • shapes (list(shape.ShapeStructure)) – List of shape.ShapeStructure instances (may have different number of spheres).
class schrodinger.application.phase.packages.shape_binary_utils.ShapeFileReader(filename, block_size=10000)

Bases: contextlib.AbstractContextManager

__init__(filename, block_size=10000)
Parameters:
  • filename (str) – File name.
  • block_size (int) – Number of (title, structures) entries to read in one scoop.
metadata

File-scope metadata from the associated “shape binary” file.

class schrodinger.application.phase.packages.shape_binary_utils.SingularShapeFileReader(filename)

Bases: schrodinger.application.phase.packages.shape_binary_utils.ShapeFileReader

__init__(filename)
Parameters:
  • filename (str) – File name.
  • block_size (int) – Number of (title, structures) entries to read in one scoop.
metadata

File-scope metadata from the associated “shape binary” file.