schrodinger.application.combiglide.combenumdock module

Creates the Combiglide Interactive Enumeration and Dock panel.

The panel emits a job_submitted(jobid) signal when an enumeration job is submitted, allowing other panels to react and track the job if necessary.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.combiglide.combenumdock.BaseInteractiveEnumeration(untangle=True, jobname=None, write_files_only=False)

Bases: PyQt5.QtCore.QObject

This is the main class for the panel, to show the panel simply create an instance of this class.

appendNewCollection(item)
applyCurrentCollection(item=None)
applyCurrentSelection(item=None)
browseForNewCollection(item)
browse_for_collection_dir()
checkForCollectionChanges()
checkForCombLibChanges(autoSave=False)
checkForPaletteChanges()
clearCollection(clearSelection=True)
clearCombdef()
clearDefaultCollection()
clearPalette()
close()
closePalette()
collectionChanged()

A slot to be called by the 2d-viewer collection table

collectionRefreshed()
contextMenuRequested(pos)
coreSketch()
countTotalStructures()

Count the total number of structures that will be enumerated and update the feedback widget

createCombLibSelectFile(struct=None, checkChanges=True, src=None)
createRowInCollectionTable(from_atom, to_atom, row, aname, r_num, rpath, minLink, maxLink, bondToH=False)
deleteCollectionRow(item)
doubleClickTable(row, column)
enableRevert()
ensureValidCollectionTitles(filename)

Check all the fragment titles in filename and create a new file with valid (non-duplicate, non-blank) titles if the original file contains duplicate or blank titles.

Parameters:filename (str) – The absolute path to the file to check
Return type:str
Returns:The path to the file to use. If filename contains all valid titles, filename is returned
enumerate()
enumeration_files_written
exportCollection(askToAssociate=True)
exportCombLibSelectFile()
exportCoreSelectFile()
exportPalette()
flashRow(row)
fragImportFromSketcher()
getCollectionFilename(oldFilename='')
getCore()
getCoreCBChanged(str)
getPTGroupnameCollection()
getPTGroupnamePalette()
gridBrowse()
growFluoro(struct, atom1, atom2)

Grow a fluorine in the forward direction

Parameters:
  • struct (schrodinger.structure.Structure) – The structure object to grow the fluorene on
  • atom1 (int) – The atom index of the from atom
  • atom2 (int) – The atom index of the to atom
Return type:

tuple

Returns:

(int, int, dictionary) The new atom1, the new atom2, and a dictionary mapping old atoms to new

growFragmentForward(handle, fragment, struct, atom1, atom2)

Grow a fragment in the forward direction

Parameters:
  • handle (mmfrag handle) – A handle created via mmfrag_new()
  • fragment (str) – Name of a fragment available in the mmfrag handle set, such as “Methyl” or “fluoro”
  • struct (schrodinger.structure.Structure) – The structure object to grow the fluorene on
  • atom1 (int) – The atom index of the from atom
  • atom2 (int) – The atom index of the to atom
Return type:

tuple

Returns:

(int, int, dictionary) The new atom1, the new atom2, and a dictionary mapping old atoms to new

growMethyl(struct, atom1, atom2)

Grow a methyl in the forward direction

Parameters:
  • struct (schrodinger.structure.Structure) – The structure object to grow the methyl on
  • atom1 (int) – The atom index of the from atom
  • atom2 (int) – The atom index of the to atom
Return type:

tuple

Returns:

(int, int, dictionary) The new atom1, the new atom2, and a dictionary mapping old atoms to new

help()
helpNC()
hideCoreImportWidgets()

Hide the widgets that allow importing the core into the panel. Workflows that implement this will have to manually import a core, probably using the createCombLibSelectFile method.

This allows the panel to be used to modify a specific structure only.

importCombLibSelectFile(filenameTxt='')
importFragmentCollection()
importPalette()
initializeGrowers()

Initialize the mmfrag and mmbuild libraries to prepare for growing fragments

job_submitted
loadStructIntoStructView(struct)
loadZoomStruct(index)
makeAllTitlesUnique()

Make sure all fragment titles are unique and non-blank

openCollectionPanel()
paletteChanged()
paletteRefreshed()
postLaunch(job)

Called when the job is launched. Opens the monitor panel.

renameCollection(item)
revertCollection()
revertCombLib()
saveCurrentCollection(filename)
saveCurrentCombLibDef(filename)
savePalette(filename)
scan_collection_dir(directory)
setComblibDir(comblibDir)
setDefaultCollection(filenameTxt=None)
setFragmentCollection(filenameTxt)

This function assumes that we know for sure we want to load the collection - anything that calls this function is presumed to have already prompted the user to save changes if necessary. Also the caller of this function will be responsible for setting the text in the Collection Table filename line and setting the collectionbp if there is a selected collection.

showMainWindow()
showNC()
swapPics()
tabChange(newtab)
updateLibraryCounts()
updateSelection()
validateLinkerChange(row, column)

Check any edits the user makes to one of the linker cells in the Collection Table to make sure it is a positive integer and the min < max

Parameters:
  • row (int) – The table row of the cell
  • column (int) – The table column of the cell
class schrodinger.application.combiglide.combenumdock.CgHydrogenFragmentAnnotator(atom1, atom2)

Bases: schrodinger.infra._canvas2d.ChemViewAnnotator

annotate(view, dm)
class schrodinger.application.combiglide.combenumdock.ConnectionStorage

Bases: schrodinger.application.combiglide.connection_storage.ConnectionStorage

This class is used to store the data of the current connection table.

containsMultipleCores()

This panel does not use multiple cores, so override the parent class function

class schrodinger.application.combiglide.combenumdock.InteractionEnumerationPanel(untangle=True, matsci=False)

Bases: schrodinger.application.combiglide.combenumdock.BaseInteractiveEnumeration

For opening the stand-alone panel.

postLaunch(job)

Called when the job is launched. Opens a dialog stating that the job has started.

class schrodinger.application.combiglide.combenumdock.MaterialEnumerationDialog(jobname=None, write_files_only=False, untangle=True)

Bases: schrodinger.application.combiglide.combenumdock.BaseInteractiveEnumeration

Class for opening the Interactive Enumeratio panel as a dialog from Materials Science panels.

postLaunch(job)

Called when the job is launched. Closes the panel.

class schrodinger.application.combiglide.combenumdock.WidgetWithClosedSignal

Bases: PyQt5.QtWidgets.QWidget

windowClosed
class schrodinger.application.combiglide.combenumdock.collectionViewerModel(parent_panel, rowcount=0, columncount=4, unique=False)

Bases: schrodinger.ui.qt.structtable.ViewerModel

appendStruct(struct)
clearStructs()
doesTitleExist(title)

Check if the given title already exists in the fragment library

Return type:bool
Returns:True if title already exists, False if not
getStructureCount()

Return the current number of structures in the model

Return type:int
Returns:The number of structures in the model
getUniqueTitle(beginning)

Adds a number to the beginning string in order to create a title that is unique in the current set of titles.

Parameters:beginning (str) – The string that will begin the title and have an integer appended to it to be unique
Return type:str
Returns:A title unlike any currently found in the table
removeStruct(row, column)
uniquifyTitles()

Modify any duplicate and blank titles in the Fragment Collection so that all titles are unique

Return type:set
Returns:set of modified structure titles
class schrodinger.application.combiglide.combenumdock.createFragmentDelegate(tableview, tablemodel, ncwindow, filename=None)

Bases: schrodinger.ui.qt.structtable.StructureReaderDelegate

appendFile(input)

Accepts either a filename as input, or a single ct.

generatePicture(index)
paintCell(painter, option, index, pic)

Overwrite this method for custom cell drawing

setFile(filename=None)
class schrodinger.application.combiglide.combenumdock.editableViewerTable(tablemodel, fetchExportTitle, parent=None)

Bases: schrodinger.ui.qt.structtable.ViewerTable

changed
leftClicked
mousePressEvent(event)
schrodinger.application.combiglide.combenumdock.get_maestro_groupname()
schrodinger.application.combiglide.combenumdock.get_sidebar_dict(dir_kws)

This function is used to get a dictionary to be used with filedialog.py

schrodinger.application.combiglide.combenumdock.get_unique_title(beginning, structs)

Adds FRAGMENT_INCREMENT_TAGx (x=integer) to the beginning string in order to create a title that is unique in the set of titles in structs.

This method strips off any ‘FRAGMENT_INCREMENT_TAGx’ (where x=integer) ending off of the beginning string before adding the new suffix in order to avoid names like frag-ied1-ied1.

Parameters:
  • beginning (str) – The string that will begin the title and have an integer appended to it to be unique
  • structs (list) – A list of Structure objects to use to check if a title is unique
Return type:

str

Returns:

A title unlike any currently found in the list of structures

class schrodinger.application.combiglide.combenumdock.glidePrecisionDialog

Bases: object

retranslateUi(Dialog)
setupUi(Dialog)
schrodinger.application.combiglide.combenumdock.random() → x in the interval [0, 1).

Return the target of a symbolic link, can handle symlinks to symlinks Uses ‘linkresolver.exe’ on Windows to resolve shortcuts (‘.lnk’)

class schrodinger.application.combiglide.combenumdock.simpleEnumDockDelegate(tableview, tablemodel, parent_panel, filename=None)

Bases: schrodinger.ui.qt.structtable.StructureReaderDelegate

appendFile(filename)
generatePicture(index)
paintCell(painter, option, index, pic)

Overwrite this method for custom cell drawing

setFile(filename=None)
schrodinger.application.combiglide.combenumdock.uniquify_titles(structs)

Modify any duplicate and blank titles in structs so that all titles are unique. Note that this directly modifies the structures in the list.

Parameters:structs (list) – A list of Structure objects to use to check if a title is unique
Return type:set
Returns:set of modified structure titles