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
-
asDict()¶ Intended for serialization support.
Returns: Dictionary that describes the instance. Return type: dict
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.phase.packages.conformer_reader', '__init__': <function ConformerReaderOptions.__init__>, 'asDict': <function ConformerReaderOptions.asDict>, '__dict__': <attribute '__dict__' of 'ConformerReaderOptions' objects>, '__weakref__': <attribute '__weakref__' of 'ConformerReaderOptions' objects>, '__doc__': None})¶
-
__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.application.phase.packages.conformer_reader'¶
-
__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.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
-
db_ids¶ Noneimplies source other than PhaseDB.
-
close()¶
-
getConformers(want_IDs=False)¶ Yields blocks of conformers from the source.
If
want_IDsis True, yields tuples of (ID, conformers). If reading from PhaseDB, IDs are stringified DB IDs; for structure file source – IDs are m2io text for the structures; for ligprepping operation – IDs are given by the input text.Yield: conformers or (name, conformers) pairs Ytype: list(structure.Structure) or (str, list(structure.Structure))
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.phase.packages.conformer_reader', '__init__': <function ConformerReader.__init__>, 'db_ids': <property object>, 'close': <function ConformerReader.close>, 'getConformers': <function ConformerReader.getConformers>, '_getReaderFromPhaseDb': <function ConformerReader._getReaderFromPhaseDb>, '_getReaderFromFile': <function ConformerReader._getReaderFromFile>, '_getReaderFromLigprep': <function ConformerReader._getReaderFromLigprep>, '_getConformers': <function ConformerReader._getConformers>, '_busToText': <staticmethod object>, '__dict__': <attribute '__dict__' of 'ConformerReader' objects>, '__weakref__': <attribute '__weakref__' of 'ConformerReader' objects>, '__doc__': None})¶
-
__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.application.phase.packages.conformer_reader'¶
-
__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)
-
-
schrodinger.application.phase.packages.conformer_reader.add_file_options(parser)¶ 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 Returns: Argument group object Return type: argparse._ArgumentGroup
-
schrodinger.application.phase.packages.conformer_reader.add_confgen_options(parser, refine)¶ 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
Returns: Argument group object
Return type: argparse._ArgumentGroup
-
schrodinger.application.phase.packages.conformer_reader.add_standard_confgen_options(argument_group, refine)¶ 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
-
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.get_dict_from_confgen_options(confgen_options)¶ Creates/populates dictionary that describes the
confgen_options(intended for serialization support).Parameters: confgen_options (PhpConfOptions) – Conformer generation options. Returns: Dictionary that can be used to re-construct the options. Return type: dict(str,)
-
schrodinger.application.phase.packages.conformer_reader.get_confgen_options_from_dict(obj)¶ Instantiates conformer generation options from a dictionary.
Parameters: obj (dict(str,)) – Dictionary that describes the options. Returns: 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