Package schrodinger :: Package application :: Package jaguar :: Package gui :: Package tabs :: Module multi_structure_tab :: Class MultiStructureTab
[hide private]
[frames] | no frames]

Class MultiStructureTab

         PyQt4.QtGui.QWidget --+    
                               |    
     base_tab.ProvidesBasisMixin --+
                                   |
         PyQt4.QtGui.QWidget --+   |
                               |   |
base_tab.ProvidesStructuresMixin --+
                                   |
         PyQt4.QtGui.QWidget --+   |
                               |   |
                base_tab.BaseTab --+
                                   |
                                  MultiStructureTab

A parent class for tabs that allow transition state, reactant, and product structures to be selected. MultiStructureTabs also contain a Molecule subtab. Note that this class is not intended to be directly instantiated and instead should be subclassed (such as the IRC tab or Transition State tabs).

Nested Classes [hide private]

Inherited from base_tab.ProvidesStructuresMixin: __metaclass__

Instance Methods [hide private]
 
setup(self)
Perform tab specific initialization.
 
reset(self)
Clear the stored structures
 
setStructureSelectorsEnabled(self, transition_state, reactant, product)
Enable or disable the three structure selection rows
 
chooseEntry(self, struc_type)
Open the EntrySelector dialog for the specified structure and save the selected entry.
 
_updateStrucListings(self)
Update the contents and status of all structure selection widgets based on the contents of self._entry_ids and the structures currently loaded into the project table.
schrodinger.project.ProjectRow or NoneType
_getRow(self, proj, eid)
Retrieve the specified row from the project table.
 
_updateMoleculeSubTabStruc(self)
Update the Molecule sub-tab structure.
 
projectUpdated(self)
Update the listing of structures when the project is updated.
 
_updateStructureWarningLabel(self)
Update the label that warns about mismatched structures
str or NoneType
validate(self)
Make sure that all of the appropriate structures are loaded and that they all have the same atoms.
 
structureCbToggled(self, struc_type)
Respond to the specified structure inclusion checkbox being toggled by including or excluding the relevant structure from the workspace.
NoneType or tuple
_compareStrucs(self)
Compare all structures loaded into this tab to make sure that they have the same atoms.
tuple
_getAtomicNumbersAndAtomNames(self)
Retrieve the atomic numbers and atom names for all structures that are relevant to the current job type (i.e.
NoneType or tuple
_compareAtomicNumbersAndAtomNames(self, entry_types, elems, atom_names)
Compare the provided atomic numbers and atom names and return a description of the differences
list
getStructures(self)
Get all of the structures that are loaded into the tab.
 
_getStruc(self, proj, entry_type)
Retrieve the specified structure
 
setStructures(self, entry_ids, jag_input=None)
Load the specified entry IDs into the tab
schrodinger.structure.Structure or NoneType
getRepresentativeStructure(self)
Retrieve one structure that can be used for basis selector calculations.
tuple
getEids(self)
Get the entry ids loaded into the tab
str or NoneType
getStructureTitleForJobname(self)
Get the structure title to be used in the job name.
 
getDefaultKeywords(self)
Get the default keywords for this tab.
dict
getMmJagKeywords(self)
Return all keywords that should be put into the mmjag handle.
str
getBasis(self, ignored=None)
Get the currently selected basis.
 
loadSettings(self, jag_input)
Restore tab settings from mmjag keywords.

Inherited from base_tab.BaseTab: __init__, activate, deactivate, error, loadPerAtomSettings, saveSettings, warning

Inherited from base_tab.BaseTab (private): _populateUi

Class Variables [hide private]
  ALL_STRUCS = range(3)
  ENTRY_TYPE_NAMES = "transition state", "reactant", "product"
  STRUC_DIFF_WARNING = "Warning: The %s and %s\n" "entries cont...
  ATOMS = "atoms"
  ATOM_LABELS = "atom labels"

Inherited from base_tab.ProvidesBasisMixin: basis_changed

Inherited from base_tab.ProvidesStructuresMixin: MULTIPLE_STRUC_JOB_TITLE

Inherited from base_tab.BaseTab: HELP_TOPIC, NAME, UI_MODULES

Instance Variables [hide private]

Inherited from base_tab.BaseTab: input_selector, task_name, ui

Method Details [hide private]

setup(self)

 

Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.

Overrides: base_tab.BaseTab.setup
(inherited documentation)

reset(self)

 

Clear the stored structures

Overrides: base_tab.BaseTab.reset

chooseEntry(self, struc_type)

 

Open the EntrySelector dialog for the specified structure and save the selected entry.

Parameters:
  • struc_type (int) - The structure to select. Must be one of self.TRANSITION_STATE, self.REACTANT, or self.PRODUCT.

_getRow(self, proj, eid)

 

Retrieve the specified row from the project table. If there is no such row, return None.

Parameters:
Returns: schrodinger.project.ProjectRow or NoneType
The requested row, or None if there is no such row.

_updateMoleculeSubTabStruc(self)

 

Update the Molecule sub-tab structure. This structure is used for basis set calculations.

projectUpdated(self)

 

Update the listing of structures when the project is updated. Note that the callback for this function is registered in the base_panel.MultiStructureMixin class so that it can be unregistered when the panel is closed.

validate(self)

 

Make sure that all of the appropriate structures are loaded and that they all have the same atoms.

Returns: str or NoneType
If the validation passes, None is returned. If the validation fails, a string that describes the error is returned.
Overrides: base_tab.BaseTab.validate

_compareStrucs(self)

 

Compare all structures loaded into this tab to make sure that they have the same atoms. Two structures are the same if they:

  • Have the same number of atoms
  • Have atoms with the same elements in the same order
  • Have atoms with the same names after Jaguar atom naming is applied
Returns: NoneType or tuple
None if all structures are the same. Otherwise, returns a tuple of:
  • The name of the first structure that's different
  • The name of the second structure that's different
  • What's different about the structures. This will be "atoms" if there are a different number of atoms or atoms with different elements, and it will be "atom labels" if there are atoms with different names after Jaguar atom naming is applied.

_getAtomicNumbersAndAtomNames(self)

 

Retrieve the atomic numbers and atom names for all structures that are relevant to the current job type (i.e. for all rows that are populated and enabled)

Returns: tuple
A tuple of
  • A list of entry types for all structures are relevant
  • A list of [atomic numbers for the first relevant structure, atomic numbers for the second relevant structure, ...]
  • A list of [atom names for the first relevant structure, atom names for the second relevant structure, ...]

_compareAtomicNumbersAndAtomNames(self, entry_types, elems, atom_names)

 

Compare the provided atomic numbers and atom names and return a description of the differences

Parameters:
  • entry_types (list) - A list of entry types for all structures are relevant
  • elems (list) - A list of [atomic numbers for the first relevant structure, atomic numbers for the second relevant structure, ...]
  • atom_names (list) - A list of [atom names for the first relevant structure, atom names for the second relevant structure, ...]
Returns: NoneType or tuple
None if all structures are the same. Otherwise, returns a tuple of:
  • The name of the first structure that's different
  • The name of the second structure that's different
  • What's different about the structures ("atoms" or "atom labels")

getStructures(self)

 

Get all of the structures that are loaded into the tab. Each structure will be a schrodinger.structure.Structure object containing the loaded structure, or None if no structure has been loaded.

Returns: list
A list of:
  • the transition state structure
  • the reactant structure
  • the product structure

_getStruc(self, proj, entry_type)

 

Retrieve the specified structure

Parameters:
  • proj (schrodinger.project.Project) - The current project
  • struc_type (int) - The structure to retrieve. Must be one of self.TRANSITION_STATE, self.REACTANT, or self.PRODUCT.

setStructures(self, entry_ids, jag_input=None)

 

Load the specified entry IDs into the tab

Parameters:
  • entry_ids (list) - A list of
    • the transition state structure entry ID
    • the reactant structure entry ID
    • the product structure entry ID

    Note that this value must be a list, not a tuple.

  • jag_input (schrodinger.application.jaguar.input.JaguarInput) - A JaguarInput object containing the job settings. Note that this argument is only used for the Transition State tab version of this function in order to determine if the search method is LST, as this will affect how the structures are loaded.

getRepresentativeStructure(self)

 

Retrieve one structure that can be used for basis selector calculations.

Returns: schrodinger.structure.Structure or NoneType
A single representative structure, or None if no structures are loaded.

getEids(self)

 

Get the entry ids loaded into the tab

Returns: tuple
A tuple of
  • A list of entry ids loaded into the tab
  • Whether the structures have matching atoms and atom names (bool)

getStructureTitleForJobname(self)

 

Get the structure title to be used in the job name. If the tab includes multiple structures, then MULTIPLE_STRUC_JOB_TITLE should be returned. If no structures have been specified yet, then None should be returned.

Returns: str or NoneType
The structure title
Overrides: base_tab.ProvidesStructuresMixin.getStructureTitleForJobname
(inherited documentation)

getDefaultKeywords(self)

 

Get the default keywords for this tab. Note that defaults that exist in mmjag should not be explicitly set here.

Overrides: base_tab.BaseTab.getDefaultKeywords
(inherited documentation)

getMmJagKeywords(self)

 

Return all keywords that should be put into the mmjag handle. This function should be defined in subclasses.

Returns: dict
All keywords that should be put into the mmjag handle
Raises:
Overrides: base_tab.BaseTab.getMmJagKeywords
(inherited documentation)

getBasis(self, ignored=None)

 

Get the currently selected basis. If more than one basis set is specified, mixed_name will be returned. If the tab does not allow for specifying multiple basis sets, then this argument may be ignored.

Parameters:
  • mixed_name - The name to return if more than one basis set is specified
Returns: str
The currently selected basis
Overrides: base_tab.ProvidesBasisMixin.getBasis
(inherited documentation)

loadSettings(self, jag_input)

 

Restore tab settings from mmjag keywords. This function should be defined in subclasses.

Parameters:
  • jag_input - The Jaguar settings to base the tab settings on
Overrides: base_tab.BaseTab.loadSettings
(inherited documentation)

Class Variable Details [hide private]

STRUC_DIFF_WARNING

Value:
"Warning:  The %s and %s\n" "entries contain different %s.  This must\\
n" "be resolved before running the job."