schrodinger.application.fragment_virtual_screening.frag_vs_stages module¶
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.StageInfo(stage_dict)¶
Bases:
object
- __init__(stage_dict)¶
A simple class that stores the information of each fragment VS stage.
- Parameters
stage_dict (dict) – a dictionary that defines the stage.
- to_dict()¶
Convert the instance to a dictionary so that it could be future dumped to a yaml file.
- Returns
a dictionary that defines the stage.
- Return type
dict
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.FragmentVSStage(stage_info, frag_vs_workflow=None)¶
Bases:
object
Base class for different virtual screening stages.
- __init__(stage_info, frag_vs_workflow=None)¶
Initialize the virtual screening stage.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
frag_vs_workflow (FragmentVSWorkflow instance) – current fragment virtual screening job.
- updateStageDict()¶
Update the stage status and paths of necessary files in self.stage_info. Write the stage status to the workflow. Dump the workflow status .yaml file.
- static validateStage(stage_info)¶
Validate input argument file for the workflow.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
- registerJobcontrolInputs(job_specs_args_builder)¶
Register the input files for current stage with jobcontrol.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
job_specs_args_builder (launchapi.JobSpecificationArgsBuilder) – job arguments builder
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.BqQueryStage(stage_info, frag_vs_workflow=None)¶
Bases:
schrodinger.application.fragment_virtual_screening.frag_vs_stages.FragmentVSStage
Implementation of BigQuery query stage in fragment VS workflow. Input argument file (args_file) requires the specification of two files: 1.
QUERY_OPTIONS_FILE
- a yaml file containing 4 BQ related parameters, seeYAML_ARGNAMES_HELP
definition inbq_query_task.py
. 2.QUERY_SQL_FILE
- an SQL command file containing the SQL commands for the query to be carried out. This stage queries a list of ligands with conditions defined in the SQL file, generates and then downloads one or more CSV files containing the queried ligands with SMILES strings and names. A list of the CSV files are stored instage_info.output_file_list
, thus can be used as input file list for the next stage, usually Glide.- app_name = 'Query'¶
- run()¶
- static validateStage(stage_info)¶
Validate by checking: 1. whether the google cloud library is available (through bq_query_task module); 2. whether the SQL and query_options files exist.
- registerJobcontrolInputs(job_specs_args_builder)¶
Register the input files for current stage with jobcontrol.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
job_specs_args_builder (launchapi.JobSpecificationArgsBuilder) – job arguments builder
- __init__(stage_info, frag_vs_workflow=None)¶
Initialize the virtual screening stage.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
frag_vs_workflow (FragmentVSWorkflow instance) – current fragment virtual screening job.
- updateStageDict()¶
Update the stage status and paths of necessary files in self.stage_info. Write the stage status to the workflow. Dump the workflow status .yaml file.
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.GlideStage(stage_info, frag_vs_workflow=None)¶
Bases:
schrodinger.application.fragment_virtual_screening.frag_vs_stages.FragmentVSStage
Implementation of Glide docking stage in fragment VS workflow. Input argument file (args_file) should be similar to Glide docking input file except for supporting the Glide command line arguments ‘NSTRUCT’ and ‘NJOBS’ as keywords and not supporting keywords ‘LIGANDFILE’, ‘GRIDFILE’.
- app_name = 'Glide'¶
- __init__(stage_info, frag_vs_workflow=None)¶
Initialize the virtual screening stage.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
frag_vs_workflow (FragmentVSWorkflow instance) – current fragment virtual screening job.
- infile_setup()¶
- docking_config_setup()¶
- run()¶
Create Glide docking job with input argument file and input ligand file. NSTRUCT and NJOBS can be included in the argument file. Run the Glide docking job. Write the poses of the best ligands to a .maegz file which will be the input file for the next stage.
- static validateStage(stage_info)¶
Validate the input argument file. Exit if the validation failed.
- Parameters
stage_info. (StageInfo) – a StageInfo instance that holds current stage’s information
- registerJobcontrolInputs(job_specs_args_builder)¶
Register the input files for current stage with jobcontrol.
- Parameters
job_specs_args_builder (launchapi.JobSpecificationArgsBuilder) – job arguments builder
- updateStageDict()¶
Update the stage status and paths of necessary files in self.stage_info. Write the stage status to the workflow. Dump the workflow status .yaml file.
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.ALGlideStage(stage_info, frag_vs_workflow=None)¶
Bases:
schrodinger.application.fragment_virtual_screening.frag_vs_stages.FragmentVSStage
Implementation of AL-Glide stage in fragment VS workflow. The inputs are specified by input arguments file.
- app_name = 'AL-Glide'¶
- makeInputArgsFile()¶
Update the paths of the files that were specified in the AL-Glide’s input arguments file to runtime path relative to the job directory.
- Returns
path of the new input argument file.
- Return type
str
- run()¶
Build the input arguments file and input command line for the current AL-Glide stage. Parse the AL-Glide inputs. Run the AL-Glide job. Write the poses of the best ligands to a .maegz file which will be the input file for the next stage.
- static runALGlide(al_glide_args)¶
Run AL-Glide job with parsed arguments. Return the result csv file and pose file.
- Parameters
al_glide_args (argparse.Namespace) – parsed AL-Glide arguments
- Returns
path of the result csv file, path of the pose file
- Return type
str, str
- static restart(stage_info)¶
Whether current stage should be restarted.
- static validateStage(stage_info)¶
Validate the input argument file. Exit if the validation failed.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
- registerJobcontrolInputs(job_specs_args_builder)¶
Register the input files for current stage with jobcontrol.
- Parameters
job_specs_args_builder (launchapi.JobSpecificationArgsBuilder) – job arguments builder
- __init__(stage_info, frag_vs_workflow=None)¶
Initialize the virtual screening stage.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
frag_vs_workflow (FragmentVSWorkflow instance) – current fragment virtual screening job.
- updateStageDict()¶
Update the stage status and paths of necessary files in self.stage_info. Write the stage status to the workflow. Dump the workflow status .yaml file.
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.WScoreSIPStage(stage_info, frag_vs_workflow=None)¶
Bases:
schrodinger.application.fragment_virtual_screening.frag_vs_stages.GlideStage
Implementation of WScore score in place stage in fragment VS workflow. Input argument file (args_file) requires
WSCORE_GRID_FILE
andWSCORE_WMAP_FILE
. This stage follows a Glide stage, takes the Glide output poses as input, and carries out a score in place calculation.- app_name = 'WScoreSIP'¶
- infile_setup()¶
- get_ws_grid_wmap_files()¶
- get_ws_sip_docking_config(ws_grid_fname, ws_wmap_fname)¶
- static validateStage(stage_info)¶
Validate by checking whether the wscore grid file and watermap files exist.
- __init__(stage_info, frag_vs_workflow=None)¶
Initialize the virtual screening stage.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
frag_vs_workflow (FragmentVSWorkflow instance) – current fragment virtual screening job.
- docking_config_setup()¶
- registerJobcontrolInputs(job_specs_args_builder)¶
Register the input files for current stage with jobcontrol.
- Parameters
job_specs_args_builder (launchapi.JobSpecificationArgsBuilder) – job arguments builder
- run()¶
Create Glide docking job with input argument file and input ligand file. NSTRUCT and NJOBS can be included in the argument file. Run the Glide docking job. Write the poses of the best ligands to a .maegz file which will be the input file for the next stage.
- updateStageDict()¶
Update the stage status and paths of necessary files in self.stage_info. Write the stage status to the workflow. Dump the workflow status .yaml file.
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.WScoreStage(stage_info, frag_vs_workflow=None)¶
Bases:
schrodinger.application.fragment_virtual_screening.frag_vs_stages.FragmentVSStage
- app_name = 'WSCORE'¶
- run()¶
Create Wscore docking job with input argument file and input ligand file. Run the WScore docking job. Write the poses of the best ligands to a .maegz file which will be the input file for the next stage.
- static restart(stage_info)¶
Restartability of WScore job is not implemented yet.
- static validateStage(stage_info)¶
Validate the input argument file. Exit if the validation failed.
- Parameters
stage_info. (StageInfo) – a StageInfo instance that holds current stage’s information
- registerJobcontrolInputs(job_specs_args_builder)¶
Register the input files for current stage with jobcontrol.
- Parameters
job_specs_args_builder (launchapi.JobSpecificationArgsBuilder) – job arguments builder
- __init__(stage_info, frag_vs_workflow=None)¶
Initialize the virtual screening stage.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
frag_vs_workflow (FragmentVSWorkflow instance) – current fragment virtual screening job.
- updateStageDict()¶
Update the stage status and paths of necessary files in self.stage_info. Write the stage status to the workflow. Dump the workflow status .yaml file.
- class schrodinger.application.fragment_virtual_screening.frag_vs_stages.ALABFEPStage(stage_info, frag_vs_workflow=None)¶
Bases:
schrodinger.application.fragment_virtual_screening.frag_vs_stages.FragmentVSStage
- app_name = 'AL-ABFEP'¶
- makeInputArgsFile()¶
Update the paths of the files that were specified in the AL-ABFEP’s input arguments file to absolute runtime path.
- Returns
path of the new input argument file.
- Return type
str
- run()¶
Build the input arguments file and input command line for the current AL-ABFEP stage. Parse the AL-ABFEP inputs. Run the AL-ABFEP job. Write the poses of the best ligands to a .maegz file which will be the input file for the next stage.
- runALABFEP(al_abfep_args)¶
Run AL-ABFEP job with parsed arguments. Return the result csv file and pose file.
- Parameters
al_abfep_args (argparse.Namespace) – parsed AL-ABFEP arguments
- Returns
path of the result csv file, path of the pose file
- Return type
str, str
- static sortResultByScore(input_pose_file_list, fep_prediction_error_file_list, optimization_target, sorted_output_pose_file, sorted_output_csv_file)¶
Sorted all the ABFEP scored ligands. Dump their ABFEP input poses to a .mae file. Dump their ABFEP calculation results to a .csv file
- Parameters
input_pose_file_list (list(str)) – list of .mae files that contain ABFEP input poses
fep_prediction_error_file_list (list(str)) – list of .csv files that contain ABFEP results.
optimization_target (str) – ML optimization target (dG, LE and LLE etc.)
sorted_output_pose_file (str) – a .mae file contains the sorted ligands’ ABFEP input poses
sorted_output_csv_file (str) – a .csv file contains the sorted ligands’ ABFEP results.
- registerJobcontrolInputs(job_specs_args_builder)¶
Register the input files for current stage with jobcontrol.
- Parameters
job_specs_args_builder (launchapi.JobSpecificationArgsBuilder) – job arguments builder
- static restart(stage_info)¶
Whether current stage should be restarted.
- static validateStage(stage_info)¶
Validate the input argument file. Exit if the validation failed.
- Parameters
stage_info. (StageInfo) – a StageInfo instance that holds current stage’s information
- __init__(stage_info, frag_vs_workflow=None)¶
Initialize the virtual screening stage.
- Parameters
stage_info. – a StageInfo instance that holds current stage’s information
frag_vs_workflow (FragmentVSWorkflow instance) – current fragment virtual screening job.
- updateStageDict()¶
Update the stage status and paths of necessary files in self.stage_info. Write the stage status to the workflow. Dump the workflow status .yaml file.