schrodinger.application.desmond.feputils module

class schrodinger.application.desmond.feputils.LabelSpinner(label)

Bases: object

This object replaces a label’s icon with a spinning progress icon when start() is called. The original icon is restored when stop() is called.

start()

Start the animation

stop()

Stop the animation and restore the original icon

update()

Advance the animation by one frame. This method gets called periodically while the spinner is running.

class schrodinger.application.desmond.feputils.ProteinCheckLabelSpinner(protein, label, protein_health_btn, use_cache=False)

Bases: schrodinger.application.desmond.feputils.LabelSpinner

finish()

Display the results of the protein reliability check. If there are any problems, the warning label is set to visible and the tooltop set to the problem report. If there are no problems, the label is hidden.

results_cache = {}
setProtein(protein)

Set the protein for the spinner, stopping and restarting the spinner with the new protein if it has changed or if _use_cache is False. :param protein: the new protein :type protein: structure.Structure

showProteinHealthReport()

Bring up protein reliability panel to show results of protein check.

start()
stop()

Stop the animation and restore the original icon

update()

Check if the reliability calculation is finished and if so, stop the spinner and display the results.

class schrodinger.application.desmond.feputils.ProteinProcessManager(protein_file)

Bases: object

A lightweight thread that spawns the protein reliability process to run in the background.

isRunning()
poll()
results()
start()
terminate()
schrodinger.application.desmond.feputils.format_protein_label(ct, label, max_chars=40)

Sets the protein name on a label, truncating the text if necessary and setting the untruncated text in a tooltip, if the text has been truncated.

Parameters:
  • ct (schrodinger.structure.Structure) – the protein
  • label (QtWidgets.QLabel) – The label to modify
  • max_chars (int) – The max number of characters to allow on the label
schrodinger.application.desmond.feputils.generate_scripts(cd_params, jobname, cmd, opls_dir_setting)
schrodinger.application.desmond.feputils.get_ligands(ct_list)

Iterates through a list of structures and returns only the ligands.

Parameters:ct_list (list) – a list of structures
schrodinger.application.desmond.feputils.get_opls_dir_setting()
schrodinger.application.desmond.feputils.get_protein_label_string(ct)

Returns a string for use in GUI to indicate the protein. Returns the title if available; otherwise returns a short description. If called with None, returns “–”.

Parameters:ct (schrodinger.structure.Structure) – the protein
schrodinger.application.desmond.feputils.get_proteins(ct_list)

Iterates through a list of structures and returns only the proteins

Parameters:ct_list (list) – a list of structures
schrodinger.application.desmond.feputils.get_warning_pixmap(widget_height, widget_width=None)

Returns a standardized pixmap for a given widget size

schrodinger.application.desmond.feputils.import_pt_entries()

Imports selected entries from the project table. For convenience, workspace-included proteins are also imported.

Returns:a list of imported structures. Each structure is tagged with a property ‘s_fepmapper_entryid’ to store the entry id.
Return type:list
schrodinger.application.desmond.feputils.import_pv_file(filename)

Imports a list of structures from a structure file. Typically used on PV files, but can be used on any structure file. :param filename: the filename :type filename: str

schrodinger.application.desmond.feputils.is_prepped(protein)

Check if a protein has been prepared in Protein PrepWizard

Parameters:protein (protein: schrodinger.structure.Structure) – protein to check
schrodinger.application.desmond.feputils.launch_protein_reliability(protein_file)
schrodinger.application.desmond.feputils.make_fep_cmd(cd_params, ao, jobname, struct_fname, opt=[])

Generates an FEP command list based on the specified parameters.

Parameters:
  • cd_params (dict) – config dialog parameters
  • ao (dict) – FEP Advanced Options (AO) parameters
  • jobname (str) – the jobname
  • master_msj_fname (str) – the filename for the master msj file
  • struct_fname (str) – the filename for the input structure
Returns:

a command list for launching the job

Return type:

list

schrodinger.application.desmond.feputils.read_protein_reliability(p, std_err, reportfile, outputfile)
schrodinger.application.desmond.feputils.run_protein_reliability(protein_file)

Takes a protein ct and returns a message indicating problems, if any.

WARNING: This function runs very slowly (i.e., easily around 20 seconds).

Parameters:protein_file (schrodinger.structure.Structure) – A protein to assess
Returns:A tuple that contains a message indicating any problems with the protein and model that can be used to bring up protein reliability panel.
Return type:tuple
schrodinger.application.desmond.feputils.setup_protein_health_button(protein_health_btn)

utility function to set up protein health toolbutton. This button becomes visible when protein health check detects any problems. This is done to provide consistent look across several panels.

Parameters:protein_health_btn (QtWidgets.QToolButton) – toolbutton that is used to bring up protein relaiability report panel.
schrodinger.application.desmond.feputils.setup_protein_warning(protein_label, protein_warning_label)

Utility function to set up a protein warning label. This is done to provide a consistent look for protein warnings across several panels.

Parameters:
  • protein_label (QtWidgets.QLabel) – The protein or receptor label
  • protein_warning_label (QtWidgets.QLabel) – The label that will hold the warning image