schrodinger.application.livedesign.login module¶
Login page of the Maestro LiveDesign Export GUI.
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.livedesign.login.
Version
(major, minor)¶ Bases:
tuple
-
__contains__
¶ Return key in self.
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__len__
¶ Return len(self).
-
count
()¶ Return number of occurrences of value.
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
major
¶ Alias for field number 0
-
minor
¶ Alias for field number 1
-
-
class
schrodinger.application.livedesign.login.
LDMode
¶ Bases:
str
,enum.Enum
Enumerate the different LiveDesign modes.
-
DRUG_DISCOVERY
= 'DRUG_DISCOVERY'¶
-
MATERIALS_SCIENCE
= 'MATERIALS_SCIENCE'¶
-
-
schrodinger.application.livedesign.login.
download_ld_client
(url, tmp_dir, tar_filename, glob_path, timeout=None)¶ Download the ld client under tmp_dir. :param url: url of the ld client :type url: str
Parameters: - tmp_dir (str) – Directory under which ld client will be downloaded
- tar_filename (str) – tar filename of the client (without .tar.gz ext)
- glob_path (str) – glob path with wildcards (ex: ldclient-*)
- timeout (int or NoneType) – Timeout for the download request (in secs)
Returns: Returns the path to the client
Return type: str
Raises: Exception – Raises RuntimeError in case of any error
-
schrodinger.application.livedesign.login.
remove_previous_existing_files
(dirpath, name)¶ This helper method removed all files and directories matching the given name in the directory specified by dirpath.
Parameters: - dirpath – Path to the directory under which the files needs to be removed
- name (str) – to match any files or directories in the form of ‘name*’
-
schrodinger.application.livedesign.login.
required_login_info_set
()¶ Checks and returns whether the required login information is set in order to setup LDClient
-
schrodinger.application.livedesign.login.
get_ld_client_and_models
()¶ Returns a new instance of ldclient.client.LDClient() and ld_client.models using the login credentials and the host server set in the Live Design login panel. If the instantiation was unsuccessful, the first object in the tuple will hold the error msg - otherwise, it will hold an empty str.
Returns: tuple of error msg str, new instance of the LD Client, and the ldclient.models module Return type: (str, ldclient.client.LDClient(), ldclient.models)
-
schrodinger.application.livedesign.login.
format_host
(host)¶ Format the given host. Adds ‘https’ protocol if none, and removes any trailing ‘/’s
Parameters: host (str) – LiveDesign server host Returns: Formatted host Return type: str
-
schrodinger.application.livedesign.login.
get_host
()¶ Returns: the host for the current session Return type: str
-
schrodinger.application.livedesign.login.
get_credentials
()¶ Returns: the username and password for the current session Return type: tuple(str, str)
-
schrodinger.application.livedesign.login.
get_username
()¶ Returns: the username for the current session Return type: str
-
schrodinger.application.livedesign.login.
get_LD_version
(ld_client=None)¶ Given an LDClient instance, return the LD version number.
Parameters: ld_client (ld_client.LDClient or NoneType) – optionally, an instance of the LDClient Returns: the version of the LD server Return type: Version
-
schrodinger.application.livedesign.login.
get_LD_mode
(ld_client)¶ Given an LDClient instance, return the LD instance mode. For example, if the instance is in DRUG_DISCOVERY or MATERIAL_SCIENCE mode, etc. Note, that for older LD versions (< 8.6), there was no concept of a LD mode, and thus we assume the default mode of DRUG_DISCOVERY.
Parameters: ld_client ( ld_client.LDClient
) – instance of the LDClientReturns: the server mode. Return type: str