schrodinger.test.stu.outcomes.desmond_workups module

Desmond workup techniques, all based on actual numerical results. Intended for import and use as a test workup.

Running directly allows execution of any of the workup methods

Methods for comparing the following Desmond-style information:

Classes and helper functions have ‘private’ names, as only the workup methods are intended to be imported and used as test workups.

$Revision 0.1 $

@TODO: improve speed test to print avg ns/day. @TODO: improve speed test to be dependent on cpu^0.8

@copyright: (c) Schrodinger, Inc. All rights reserved.

schrodinger.test.stu.outcomes.desmond_workups.desmond_compare_FES(file1, file2, tolerance=0.1)[source]

Compare metadynamics FES files.

Tolerance is optional, and defaults to 0.1

schrodinger.test.stu.outcomes.desmond_workups.desmond_FEP_energies(filename, reference, tolerance=0.5)[source]

Compares the deltaF in an FEP result file to a standard.

schrodinger.test.stu.outcomes.desmond_workups.desmond_check_surface_area(filename, reference, tolerance=0.5, side1='r_chorus_box_ax', side2='r_chorus_box_bx')[source]

Compares surface area to a standard with optional tolerance and optional choice of box sides. Default sides are a and b.

example usage: desmond_check_surface_area(‘filename’, 7.5, tolerance=0.1)

schrodinger.test.stu.outcomes.desmond_workups.desmond_tgz_file_list(tgz_fname, *fnames_to_check)[source]
schrodinger.test.stu.outcomes.desmond_workups.desmond_compare_ene(file1, file2, tolerance, *quantities)[source]

Compares two Desmond ene files.

Checks that any quantities requested from the ene file match within some tolerance number of decimal points.

usage desmond_compare_ene(‘file1.ene’, ‘file2.ene’, 2, ‘P’, ‘E_c’)

schrodinger.test.stu.outcomes.desmond_workups.desmond_compare_eneseqs(file1, file2, *, columns=None, min_length=10, atol=0.01, rtol=1e-05, mean_atol=0.0001, mean_rtol=1e-05)[source]

Compare two columns between two Desmond ene files at matching time points.

Parameters
  • columns (sequence of str) – Column names to compare. Use all by default.

  • min_length (int) – Require at least that many matching time points.

  • atol (float) – Absolute tolerance (see numpy.isclose).

  • rtol (float) – Relative tolerance (see numpy.isclose).

  • mean_atol (float) – Absolute tolerance for mean values (see numpy.isclose).

  • mean_rtol (float) – Relative tolerance for mean values (see numpy.isclose).

schrodinger.test.stu.outcomes.desmond_workups.desmond_speed(filename, reference_rate, tolerance=0.05)[source]

Compares the average rate per step in ns/day against a standard.

example usage: desmond_speed(‘file1.log’, 7.5, tolerance=0.1)

Parameters
  • reference_rate – Value to be compared against in ns/day

  • tolerance – Tolerance. Default is 5%.

schrodinger.test.stu.outcomes.desmond_workups.desmond_stage_time(log_file, stage_num, max_time)[source]

:param log_file : Name of log file to be analyzed. :type log_file : str :param stage_num : Stage number :type stage_num : int :param max_time : Maximum acceptable time for the stage in seconds :type max_time : float :return : True if the stage completed successfully within max_time seconds, or False if not.

schrodinger.test.stu.outcomes.desmond_workups.desmond_st_stats(filename, *options)[source]

Compares the mean, median and/or standard deviation of a desmond st2 file to reference values.

usage: desmond_st_stats(‘file.st2’, ‘mean=1.2’, ‘median=2.3’, ‘stddev=1.2’, ‘tol=0.2’)

schrodinger.test.stu.outcomes.desmond_workups.read_dE_file(fname)[source]

Read a dE file and return a dict from time to energy_dict; energy_dict is a dict from (lambda_win, lambda_win) to energy value

schrodinger.test.stu.outcomes.desmond_workups.desmond_compare_deltaE(file1, file2)[source]

Compares two Desmond deltaE.txt files. Checks time and energy. No tolerance (exact sameness).

usage: desmond_compare_deltaE(‘file1’, ‘file2’)

schrodinger.test.stu.outcomes.desmond_workups.desmond_compare_energy_group(file1, file2, tolerance=0)[source]

Compares two Desmond enegrp.dat files. Checks all values upto tolerance value.

usage: desmond_compare_energy_group(‘file1’, ‘file2’, tolerance=0)

schrodinger.test.stu.outcomes.desmond_workups.desmond_test_mean_num_waters(tarname, limits)[source]

Check that the mean number of waters in the simulation is within the given limits.

Parameters
  • tarname (str) – the input tar file name

  • limits (tuple) – a 2-tuple containing the min and max values

schrodinger.test.stu.outcomes.desmond_workups.desmond_check_fep_master_msj(master_msj_fname: str, fep_type: schrodinger.application.desmond.constants.FEP_TYPES)[source]

Basic checks for the master msj.

Parameters
  • master_msj_fname – The input master msj file name.

  • fep_type – Type of fep used to run the job.

schrodinger.test.stu.outcomes.desmond_workups.desmond_check_fep_results(fmp_fname: str, launcher_path: str, fep_type: schrodinger.application.desmond.constants.FEP_TYPES, expected: Dict[Tuple[str, str], Dict[str, object]], membrane: bool = False, min_frames: int = 21, skip_parched: bool = False, skip_sid: bool = False, edges_to_skip_parched_check: Optional[List[Tuple[str, str]]] = None, deltaE_threshold: Optional[float] = None, expected_lambdas={'charge': 'charge:24', 'charge0': 'charge:24', 'core-hopping': 'flexible:16', 'default': 'default:12', 'fragment-linking': 'flexible:16', 'macrocycle-core-hopping': 'flexible:16', 'solvent_fragment_hydration': 'default:24'})[source]

Check the fep results given the fep type and an expected a dictionary mapping expected edge short ids to their corresponding attributes.

Parameters
  • fmp_fname – Name of the output fmp to check.

  • launcher_path – Path containing the output of the FepLauncher stage.

  • fep_type – Type of fep used to run the job.

  • expected – Dictionary mapping edge short ids to a dictionary of attributes to check. The attributes are the simulation_protocol, with the values constants.SIMULATION_PROTOCOL, ‘ddg’, ‘ddg_err’ with the values corresponding to the free energy. If the attributes are not present, the corresponding checks are skipped.

  • membrane – Set to True if this is a membrane fep run. Default is False.

  • min_frames – Minimum number of frames in the parched trajectories. Default is 21 for the number of frames in a standard 5 ns FEP job.

  • skip_parched – If True, skip checking the parched trajectories. Default is False.

  • skip_sid – If True, skip checking for sid analysis. Default is False.

  • edges_to_skip_parched_check – A list of short edge ids for which to skip checking for parched trajectory when skip_parched is False. If skip_parched is True then all edges will be skipped.

  • deltaE_threshold – If not None, maximum absolute value for the deltaE energy in kcal/mol.

  • expected_lambdas – Expected number of lambdas for each supported FEP type. If not given, use the default for each type.

schrodinger.test.stu.outcomes.desmond_workups.desmond_check_ab_fep_results(fmp_fname: str, expected_values: Dict[Tuple[str, str], Dict[str, object]], min_frames: int, expected_lambdas_complex: int, expected_lambdas_solvent: int, membrane: bool = False)[source]
schrodinger.test.stu.outcomes.desmond_workups.desmond_check_memory_usage(logfile: str, cpu_limits: List[float], gpu_limits: Optional[List[float]] = None)[source]

Get statistics on memory usage printed to desmond logfile and compare to specified inputs. :param logfile: The logfile containing the memory usages :param cpu_limits: The maximum acceptable value for the mean and maximum CPU memory usage in kB :param gpu_limits: The maximum acceptable value for the mean and maximum GPU memory usage in kB [optional]

schrodinger.test.stu.outcomes.desmond_workups.custom_charge_ct_count(input_mae_fname: str) → int[source]

Return the count of cts that have a custom charge block.