schrodinger.application.phase.packages.shape_creation_logic module

Creation of “binary shape files” from several kind of sources (PHASE-2070).

schrodinger.application.phase.packages.shape_creation_logic.add_arguments(p)

Adds shape-creation-specific arguments to the parser.

Parameters

p (argparser.ArgumentParser) – Parser-like instance.

schrodinger.application.phase.packages.shape_creation_logic.validate_args(args)

Validates command-line arguments added by add_arguments.

Parameters

args (argparse.Namespace) – Namespace holding command line options.

Returns

Tuple of validation success and error message.

Return type

(bool, str)

schrodinger.application.phase.packages.shape_creation_logic.runtimize_paths(args)

Runtimizes input file paths for the command line arguments.

Parameters

args (argparse.Namespace) – Namespace populated with command line arguments.

schrodinger.application.phase.packages.shape_creation_logic.get_input_files(args)

Identifies input files among arguments (for job control purposes).

Parameters

args (argparse.Namespace) – Namespace populated with command line arguments.

schrodinger.application.phase.packages.shape_creation_logic.get_jobname_and_outfile(args)

Returns the job name and job name-derived output file name. If job name is not provided it gets derived from the input file name.

Parameters

args (argparse.Namespace) – Namespace populated with command line arguments.

Returns

job name, output file name

Return type

str, str

class schrodinger.application.phase.packages.shape_creation_logic.ShapeCreator(args)

Bases: object

__init__(args)

Expects validated and runtimized command line arguments.

Parameters

args (argparse.Namespace) – Namespace populated with command line arguments.

getMetadata()

Returns JSON-able representation of the self.

schrodinger.application.phase.packages.shape_creation_logic.validate_shape_data_file_metadata(meta)

Validates shape data file metadata.

Parameters

meta (dict) – Shape data file metadata.

Returns

Validation outcome and complain (if any).

Return type

(bool, str)

schrodinger.application.phase.packages.shape_creation_logic.validate_shape_data_file_metadata_compatibility(meta1, meta2)

Validates shape data file metadata compatibility.

Parameters
  • meta1 (dict) – Validated shape data file metadata #1.

  • meta2 (dict) – Validated shape data file metadata #2.

Returns

Validation outcome and complain (if any).

Return type

(bool, str)

schrodinger.application.phase.packages.shape_creation_logic.estimate_shape_data_size(shape_type, num_conformers, compress, conformer_format=None)

Estimates number of bytes needed to store the shape data for a single molecule. Based on observations for 10,000 molecules picked from Enamine REAL.

Parameters
  • shape_type (str) – Shape assignment scheme name (“pharm”, “atom_color” or “atom_no_color”).

  • num_conformers (int) – Number of conformers per molecule.

  • compress (bool) – File-level compression.

  • conformer_format (conformer_storage.Format or NoneType) – Format used to store conformer structures (None for structureless shape data).

Returns

Estimated shape data size for a single molecule (in bytes).

Return type

int

schrodinger.application.phase.packages.shape_creation_logic.execute(args)

The “main” subroutine for the “create” task.

Parameters

args (argparse.Namespace) – Namespace populated with command line arguments.