schrodinger.application.phase.packages.conformer_reader module

Conformer structure reader, which extracts blocks of conformers from the given input based on perception options.

Copyright Schrodinger LLC, All Rights Reserved.

class schrodinger.application.phase.packages.conformer_reader.ConformerReaderOptions(args, preferred_subset)

Bases: object

__init__(args, preferred_subset)

Initializes command line options used to read conformer blocks.

Parameters:args (argparser.Namespace) – argparser.Namespace with command line options
class schrodinger.application.phase.packages.conformer_reader.ConformerReader(source, options)

Bases: object

__init__(source, options)

Initializes…

Parameters:
  • source (str) – conformer structure input source
  • options (ConformerReaderOptions) – reader options derived from command line options
close()
getConformers()

Yields blocks of conformers read (or derived) from the source.

Yield:Conformer structures.
Ytype:list(structure.Structure)
schrodinger.application.phase.packages.conformer_reader.add_file_options(parser, create_group=True)

Adds file screening options to the provided parser and returns the argument group object that holds those options.

Parameters:
  • parser (argparser.ArgumentParser) – Argument parser object
  • create_group (bool) – Create a new argument group and put file screening options into that group.
Returns:

Argument group object

Return type:

argparse._ArgumentGroup

schrodinger.application.phase.packages.conformer_reader.add_confgen_options(parser, refine, default_conf_sample_name='rapid')

Adds conformer generation options to the provided parser and returns the argument group object that holds those options.

Parameters:
  • parser (argparser.ArgumentParser) – Argument parser object
  • refine (bool) – Flag to add -refine as mutually exclusive option to -flex
  • default_conf_sample_name (str) – Name of the conformer sampling method to be used by default (for help string only).
Returns:

Argument group object

Return type:

argparse._ArgumentGroup

schrodinger.application.phase.packages.conformer_reader.add_standard_confgen_options(argument_group, refine, default_conf_sample_name='rapid')

Adds standard conformer generation options to the provided argument group.

Parameters:
  • argument_group (argparser._ArgumentGroup) – Argument group object
  • refine (bool) – Set to True if argument_group supports -refine flag
  • default_conf_sample_name (str) – Name of the conformer sampling method to be used by default (for help string only).
schrodinger.application.phase.packages.conformer_reader.get_confgen_options(args)

Creates conformer generation options from the supplied parser.

Parameters:args (argparse.Namespace) – Command line arguments.
Returned:Conformer generation options
Return type:PhpConfOptions
schrodinger.application.phase.packages.conformer_reader.validate_confgen_conflicts(args)

Checks options for conflicts between file options and confgen options not detected by ArgumentParser.parse_args and returns an informative error message if a conflict is found.

Parameters:args (argparser.Namespace) – argparser.Namespace with command line options
Returns:tuple of validity and error message if a conflict is found
Return type:bool, str
schrodinger.application.phase.packages.conformer_reader.validate_confgen_nddo(args)

Checks for illegal use of -nddo flag.

Parameters:args (argparser.Namespace) – argparser.Namespace with command line arguments
Returns:tuple of validity and non-empty error message if not valid
Return type:bool, str
schrodinger.application.phase.packages.conformer_reader.validate_title_option(args)

Checks for illegal values of -title flag.

Parameters:args (argparser.Namespace) – argparser.Namespace with command line arguments
Returns:tuple of validity and non-empty error message if not valid
Return type:bool, str