schrodinger.glide module¶
This module provides Python wrappers to the Glide backend C++ library, as well as some helper functions to make use of the library more Pythonic.
- schrodinger.glide.LoggerContext(levels: Optional[Dict[str, int]] = None, capture: Optional[bool] = None, main_level: Optional[int] = None, default_main_level: Optional[int] = None) ContextManager ¶
Context manager to set default logging levels and capturing for a given scope. Returns the new LoggerConfig, which can be used for further configuration or to fetch the captured messages.
- Parameters:
levels – dict of {name: level} to set the logging level for specific loggers. If a name has a “+” suffix, the setting will be recursive (apply to the logger’s children).
capture – If True, enable capture; if False, disable capture; if None, keep the current capture setting.
main_level – change the main logging level, with applies to functions that are not covered by any of the keys in
levels
.default_main_level – change the default for the main level, but only if the global default level is not already set, for example by the SCHRODINGER_GLIDE_LOG environment variable or by an enclosing LoggerContext.
- Yield:
LoggerConfig
- schrodinger.glide.DockingLicense(config=None)¶
Context manager to check out a docking license, and checking it in on exit. :raise schrodinger.infra.licensing.LicenseCheckoutError: can’t check out
- schrodinger.glide.GridgenLicense()¶
Context manager to check in a docking license, and checking it in on exit. :raise schrodinger.infra.licensing.LicenseCheckoutError: can’t check out
- exception schrodinger.glide.InputError¶
Bases:
ValueError
An input file or configuration setting is invalid and the job cannot proceed.
- class schrodinger.glide.HBondType¶
Bases:
Enum
- NEUTRAL_NEUTRAL = 0¶
- NEUTRAL_CHARGED = 1¶
- CHARGED_CHARGED = 2¶
- class schrodinger.glide.SkipReason¶
Bases:
Enum
- ATOMIC_NUMBER = 0¶
- ATOM_OVERLAP = 1¶
- BAD_ATOM = 2¶
- CONFGEN = 3¶
- EMPTY_MCS = 4¶
- FORCE_FIELD = 5¶
- LIGAND_DATA = 6¶
- LIGAND_SIZE = 7¶
- MINIMIZATION = 8¶
- NO_ATOMS = 9¶
- NO_GOOD_POSES = 10¶
- NO_MATCH = 11¶
- NO_POSES_STORED = 12¶
- PHASE_DB = 13¶
- PULL = 14¶
- REFINE = 15¶
- ROTBONDS = 16¶
- ROUGH_SCORE = 17¶
- EXCEPTION = 18¶
- class schrodinger.glide.Ptype¶
Bases:
Enum
- DSC_PHOBHYD = 0¶
- DSC_PHOBHVY = 1¶
- DSC_DONOR = 2¶
- DSC_ACCEP = 3¶
- DSC_POLAR = 4¶
- DSC_METAL = 5¶
- DSC_MAX_BASE = 5¶
- DSC_HALO_DONOR = 12¶
- DSC_HALO_ACCEP = 13¶
- DSC_DEFAULT = 0¶
- exception schrodinger.glide.SkipLigand(reason, message)¶
Bases:
Exception
Exception class for errors that mean that we cannot proceed with the current ligand, but are otherwise nonfatal. The expectation is that they will be caught and handled by the main ligand loop.
- Variables:
message – specific error message
reason – general reason for skipping the ligand, as one of the members of the SkipReason enum (e.g., SkipReason.CONFGEN)
- __init__(reason, message)¶
- reason: SkipReason¶
- message: str¶
- toJSON()¶
- classmethod fromJSON(json_str: str) SkipLigand ¶
- schrodinger.glide.get_unsupported_features(glide_job)¶
Check if the job is using any keyword not supported by Skate. (Developer keywords are ignored.)
- Returns:
list of unsupported keyword names used by the job
- Return type:
List(str)
- class schrodinger.glide.Config(glide_job=None)¶
Bases:
object
Glide job configuration; holds the values of all the keywords from the Glide input file (.in), and default values for unspecified keywords.
This class has a generic
get()
method that works for all types, but only for official keywords. For unofficial keywords, use the type-specific methods inherited from the parent class (getInt, getDouble, getString, getBool, getIntArray, getDoubleArray, getStringArray, getBoolArray), which also take an optional default value as a second argument (use of the second argument is strongly encouraged unless you can be certain that the keyword will be present in the input config).- __init__(glide_job=None)¶
- Parameters:
glide_job (Union[schrodinger.application.glide.glide.GlideJob, dict,str,None]) – SIF input filename, keyword dict, GlideJob object, or None, where None means use default settings for docking.
- Raises:
ValueError – job uses unsupported features
- get(keyword: str)¶
Return the value of an official keyword (i.e., one listed in mmim_keywords.yaml).
- Parameters:
keyword – keyword name
- Return type:
Union[int, float, str, bool, list]
- Throw:
KeyError if keyword is unknown. Note that this is unlike dict.get!
- getUpdated(additional_keywords: dict)¶
Return a new Config object with the keywords updated according to the input dictionary. Note that this method does not validate the input keywords for potential keyword conflicts or unsupported features.
- Parameters:
additional_keywords (Dict[str, Union[int, float, str, bool, list]]) – dictionary of keyword-value pairs
- Return type:
- getInt(*args)¶
- getBool(*args)¶
- getDouble(*args)¶
- getString(*args)¶
- getIntArray(*args)¶
- getBoolArray(*args)¶
- getDoubleArray(*args)¶
- getStringArray(*args)¶
- getType(keyword)¶