schrodinger.application.phase.packages.shape_ligprep module¶
Thin LigPrep wrapper and related subroutines (for PHASE-2070).
-
class
schrodinger.application.phase.packages.shape_ligprep.
LigPrep
(input_file, options='[]')¶ Bases:
object
-
__init__
(input_file, options='[]')¶ Parameters: - input_file (str) – Input file name.
- options (str) – Ligprep command line options (in JSON format).
Raises: RuntimeError – If something goes wrong.
-
close
()¶
-
getInputReader
(text=False)¶ Returns an iterator over the input file associated with the LigPrep instance. If
text
is False, the iterator returnsstructure.Structure
instances. Otherwise the iterator is an_InputReader
that returns (text, structure) tuples.Parameters: text – Whether input text reading is desired. Ptype text: bool Returns: Iterator over input. Rype: StructureReader, ligprep SMILES reader or _InputReader
-
prepareStructure
(ct)¶ Applies ligprep to
ct
.Returns: (outcomes, failures, summary) tuple Return type: (list(structure.Structure), list(structure.Structure), dict)
-
yieldStructures
(text=False)¶ Reads consecutive entries from the input file, applies LigPrep and yields resulting structures. Optionally also yields input text from which the structures were obtained. TODO: support “strip” – minimize text size, like keep only the SMILES itself.
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.phase.packages.shape_ligprep', '__init__': <function LigPrep.__init__>, 'close': <function LigPrep.close>, 'getInputReader': <function LigPrep.getInputReader>, 'prepareStructure': <function LigPrep.prepareStructure>, 'yieldStructures': <function LigPrep.yieldStructures>, '__dict__': <attribute '__dict__' of 'LigPrep' objects>, '__weakref__': <attribute '__weakref__' of 'LigPrep' 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.shape_ligprep'¶
-
__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.shape_ligprep.
add_ligprep_arguments
(parser)¶ Registers ligprep-specific options.
Parameters: parser ( argparse.ArgumentParser
) – Command line argument parser.
-
schrodinger.application.phase.packages.shape_ligprep.
validate_ligprep_arguments
(args)¶ Validates ligprep-specific command line options.
Parameters: args ( argparse.Namespace
) – Populatedargparse.Namespace
instance.Returns: Tuple of validation success, and error message. Return type: bool, str
-
schrodinger.application.phase.packages.shape_ligprep.
validate_ligprep_options
(text)¶ Validates ligprep-specific command-line arguments.
Parameters: text (str) – Ligprep options as list of strings in JSON format. Returns: Tuple of validation success, and error message. Return type: bool, str