schrodinger.active_learning.fake_nodes module

schrodinger.active_learning.fake_nodes.al_validate_args(args)

Validate command-line arguments. This is for testing general active learning module only.

Parameters

args (argparse.Namespace) – argument namespace with command line options

Returns

(validation outcome, error message)

Return type

(bool, str)

schrodinger.active_learning.fake_nodes.al_parse_input_file(args)

Parse the input file. Some inter-keyword dependencies and validation are handled here. This is for testing general active learning module only.

Parameters

args (argparse.Namespace) – argument namespace (modified in place!)

schrodinger.active_learning.fake_nodes.al_get_parser()

Creates argument parser for active learning job. This is for testing general active learning module only.

Returns

configured argument parser

Return type

argparse.ArgumentParser

schrodinger.active_learning.fake_nodes.al_parse_args(argv=None)

Parses and validates command-line arguments. This is for testing general active learning module only.

Parameters

argv (list(str)) – argument list

Returns

argument namespace with command line options

Return type

argparse.Namespace

class schrodinger.active_learning.fake_nodes.DummyCalculateScoreNode(args, iter_num, job_name, job_dir)

Bases: schrodinger.active_learning.al_node.ScoreProviderNode

Dummy Class for obtaining the scores for active learrning.

__init__(args, iter_num, job_name, job_dir)

Initialize node for obtaining the score of each ligand (SMILES).

runNode(smi_file_name, active_learning_job)
addOptionalRestartFiles(active_learning_job)

Add node’s optional restart file(s) to driver’s restart dict. Dump the restart dict to the restart .pkl file.

Parameters

active_learning_job (ActiveLearningJob instance) – current AL driver

checkOutcome(score_csv_file)

Validate the .csv score file.

Parameters

score_csv_file (str) – name of generated .csv score file.

classmethod getName(iter_num)
needsHistogram()

Whether we can generate a histogram plot of calculated target scores.

Returns

whether the histogram of score can be plotted

Return type

bool

writeScoreCsv(title_to_score, output_csv)

Write score to .csv file that ligand_ml needs for training

Parameters
  • title_to_score (defaultdict(lambda : BAD_SCORE)) – dict that maps ligand title to score

  • output_csv – ligand_ml training .csv file.

  • output_csv – str

class schrodinger.active_learning.fake_nodes.DummyRescoreNode(args, iter_num, job_name, job_dir)

Bases: schrodinger.active_learning.al_node.ActiveLearningNode

Dummy rescore node for devtest

__init__(args, iter_num, job_name, job_dir)

Initialize node for active learning workflow.

Parameters
  • iter_num (int) – current active learning iteration number.

  • job_name (str) – active learning job name.

  • job_dir (str) – directory of where the jobs in the node will run.

runNode(ligands_csv, active_learning_job, **kwargs)
addOptionalRestartFiles(active_learning_job)

Add node’s optional restart file(s) to driver’s restart dict. Dump the restart dict to the restart .pkl file.

Parameters

active_learning_job (ActiveLearningJob instance) – current AL driver

classmethod getName(iter_num)
needsHistogram()

Whether we can generate a histogram plot of calculated target scores.

Returns

whether the histogram of score can be plotted

Return type

bool

class schrodinger.active_learning.fake_nodes.DummyPilotScoreNode(args, iter_num, job_name, job_dir)

Bases: schrodinger.active_learning.al_node.ActiveLearningNode

Dummy pilot score node for devtest

__init__(args, iter_num, job_name, job_dir)

Initialize node for active learning workflow.

Parameters
  • iter_num (int) – current active learning iteration number.

  • job_name (str) – active learning job name.

  • job_dir (str) – directory of where the jobs in the node will run.

runNode(csv_list, active_learning_job, **kwargs)
addOptionalRestartFiles(active_learning_job)

Add node’s optional restart file(s) to driver’s restart dict. Dump the restart dict to the restart .pkl file.

Parameters

active_learning_job (ActiveLearningJob instance) – current AL driver

classmethod getName(iter_num)
needsHistogram()

Whether we can generate a histogram plot of calculated target scores.

Returns

whether the histogram of score can be plotted

Return type

bool