Package schrodinger :: Package application :: Package combiglide :: Module combenumdock :: Class BaseInteractiveEnumeration
[hide private]
[frames] | no frames]

Class BaseInteractiveEnumeration

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt4.QtCore.QObject --+    
                            |    
            Qt.QtCore.QObject --+
                                |
                               BaseInteractiveEnumeration
Known Subclasses:

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

Instance Methods [hide private]
 
job_submitted(...)
 
enumeration_files_written(...)
 
__init__(self, untangle=True, jobname=None, write_files_only=False)
x.__init__(...) initializes x; see help(type(x)) for signature
 
showMainWindow(self)
 
hideCoreImportWidgets(self)
Hide the widgets that allow importing the core into the panel.
 
initializeGrowers(self)
Initialize the mmfrag and mmbuild libraries to prepare for growing fragments
tuple
growMethyl(self, struct, atom1, atom2)
Grow a methyl in the forward direction
tuple
growFluoro(self, struct, atom1, atom2)
Grow a fluorine in the forward direction
tuple
growFragmentForward(self, handle, fragment, struct, atom1, atom2)
Grow a fragment in the forward direction
str
ensureValidCollectionTitles(self, 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.
 
setDefaultCollection(self, filenameTxt=None)
 
clearDefaultCollection(self)
 
setComblibDir(self, comblibDir)
 
openCollectionPanel(self)
 
browse_for_collection_dir(self)
 
scan_collection_dir(self, directory)
 
enableRevert(self)
 
getCore(self)
 
closePalette(self)
 
clearPalette(self)
 
clearCollection(self, clearSelection=True)
 
clearCombdef(self)
 
getPTGroupnameCollection(self)
 
getPTGroupnamePalette(self)
 
updateLibraryCounts(self)
 
loadZoomStruct(self, index)
 
tabChange(self, newtab)
 
collectionRefreshed(self)
 
collectionChanged(self)
A slot to be called by the 2d-viewer collection table
 
paletteRefreshed(self)
 
paletteChanged(self)
 
checkForPaletteChanges(self)
 
exportPalette(self)
 
savePalette(self, filename)
 
checkForCollectionChanges(self)
 
close(self)
 
help(self)
 
helpNC(self)
 
showNC(self)
 
importPalette(self)
 
fragImportFromSketcher(self)
 
importFragmentCollection(self)
 
makeAllTitlesUnique(self)
Make sure all fragment titles are unique and non-blank
 
setFragmentCollection(self, 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.
 
exportCombLibSelectFile(self)
 
exportCoreSelectFile(self)
 
revertCombLib(self)
 
revertCollection(self)
 
importCombLibSelectFile(self, filenameTxt='')
 
checkForCombLibChanges(self, autoSave=False)
 
flashRow(self, row)
 
swapPics(self)
 
saveCurrentCollection(self, filename)
 
saveCurrentCombLibDef(self, filename)
 
createCombLibSelectFile(self, struct=None, checkChanges=True, src=None)
 
createRowInCollectionTable(self, from_atom, to_atom, row, aname, r_num, rpath, minLink, maxLink, bondToH=False)
 
loadStructIntoStructView(self, struct)
 
doubleClickTable(self, row, column)
 
contextMenuRequested(self, pos)
 
getCollectionFilename(self, oldFilename='')
 
applyCurrentCollection(self, item=None)
 
applyCurrentSelection(self, item=None)
 
browseForNewCollection(self, item)
 
appendNewCollection(self, item)
 
countTotalStructures(self)
Count the total number of structures that will be enumerated and update the feedback widget
 
exportCollection(self, askToAssociate=True)
 
renameCollection(self, item)
 
deleteCollectionRow(self, item)
 
updateSelection(self)
 
validateLinkerChange(self, 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
 
enumerate(self)
 
postLaunch(self, job)
Called when the job is launched.
 
gridBrowse(self)
 
coreSketch(self)
 
getCoreCBChanged(self, str)

Inherited from Qt.QtCore.QObject: connect, emit

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, untangle=True, jobname=None, write_files_only=False)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • untangle (bool) - True if the combgen untangle option should be used when enumerating structures, False if not
  • jobname (str) - The jobname for the panel. By default, the jobname is "cgenumerate". jobname must be supplied if write_files_only is True and will be the name of the directory the files are written to and will also be the base name of the files in that directory.
  • write_files_only (bool) - If True, the files required to run the job will be written and the enumeration_files_written signal will be emitted. If False, the enumeration job will be launched and the job_submitted signal will be emitted. The default is False.
Overrides: object.__init__

hideCoreImportWidgets(self)

 

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.

growMethyl(self, 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
Returns: tuple
(int, int, dictionary) The new atom1, the new atom2, and a dictionary mapping old atoms to new

growFluoro(self, 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
Returns: tuple
(int, int, dictionary) The new atom1, the new atom2, and a dictionary mapping old atoms to new

growFragmentForward(self, 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
Returns: tuple
(int, int, dictionary) The new atom1, the new atom2, and a dictionary mapping old atoms to new

ensureValidCollectionTitles(self, 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
Returns: str
The path to the file to use. If filename contains all valid titles, filename is returned

setFragmentCollection(self, 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.

validateLinkerChange(self, 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

postLaunch(self, job)

 

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