Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module base_panel :: Class InputTabMixin
[hide private]
[frames] | no frames]

Class InputTabMixin

object --+
         |
        InputTabMixin
Known Subclasses:

A mixin for panels that use the Input tab. This mixin removes the input selector and keeps the selected structures table up to date. Note that this mixin must appear on the inheritance list before ReadEditMixin.

Instance Methods [hide private]
 
setPanelOptions(self)
Remove the input selector
 
setup(self)
Store a reference to the input tab and make sure that data from table delegates is commited when the gear menu is accessed
 
projectUpdated(self)
Update the table whenever the project updates
 
workspaceChanged(self, what_changed)
Update the table whenever the workspace changes in case the user changed the charge of a molecule.
(str, utils.SpinTreatment, dict)
_getTheoryAndSpinData(self)
Get keywords related to the theory and spin
 
_updateMmJag(self)
Update self._jag_input in preparation for the edit dialog.
 
_addMmJagStruc(self, eid, struc, keywords)
Add the specified structure and keywords to self._jag_input
str
_getIncludedEntryId(self)
Get the entry ID for the structure in the Input table.
tuple
_getTheorySettings(self)
Get the theory method name and the current spin treatment setting
tuple
_getSettingsAffectedBySpinTreatment(self)
Get all mmjag values that need to be set on a per-structure basis dependent on the spin treatment and the spin multiplicity.
dict
_applySpinKeywords(self, keywords, spin_treatment, unres_keywords, res_keywords)
Add the appropriate spin-treatment-related keywords to the per-structure keyword dictionary

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

projectUpdated(self)

 

Update the table whenever the project updates

Decorators:
  • @af2.maestro_callback.project_updated

workspaceChanged(self, what_changed)

 

Update the table whenever the workspace changes in case the user changed the charge of a molecule.

Parameters:
  • what_changed (str) - A flag indicating what changed in the workspace
Decorators:
  • @af2.maestro_callback.workspace_changed

_getTheoryAndSpinData(self)

 

Get keywords related to the theory and spin

Returns: (str, utils.SpinTreatment, dict)
The string name of the chosen theory, the spin treatment, and a dictionary of spin-related keywords

_addMmJagStruc(self, eid, struc, keywords)

 

Add the specified structure and keywords to self._jag_input

Parameters:
  • eid (str) - The entry id of the structure to add
  • struc (schrodinger.structure.Structure) - The structure to add
  • keywords (dict) - The mmjag keywords to add

_getIncludedEntryId(self)

 

Get the entry ID for the structure in the Input table. Note that this function will only be called when exactly one entry is selected.

Returns: str
The entry ID

_getTheorySettings(self)

 

Get the theory method name and the current spin treatment setting

Returns: tuple
A tuple of
  • the method name (str), or None if there is no theory tab
  • the current spin treatment setting (utils.SpinTreatment), or None if there is no theory tab

_getSettingsAffectedBySpinTreatment(self)

 

Get all mmjag values that need to be set on a per-structure basis dependent on the spin treatment and the spin multiplicity.

Returns: tuple
A tuple of
  • A dictionary of {keyword: value} for all settings required for an unrestricted spin treatment
  • A dictionary of {keyword: value} for all settings required for a restricted spin treatment

_applySpinKeywords(self, keywords, spin_treatment, unres_keywords, res_keywords)

 

Add the appropriate spin-treatment-related keywords to the per-structure keyword dictionary

Parameters:
  • keywords (dict) - The per-structure keyword dictionary for the current structure. If this dictionary does not contain a spin multiplicity setting (mm.MMJAG_IKEY_MULTIP), then no changes will be made.
  • spin_treatment (utils.SpinTreatment) - The spin treatment setting. If this setting is not utils.SpinTreatment.Automatic, then no changes will be made to keywords.
  • unres_keywords (dict) - A keyword dictionary to add to keywords if the structure requires an unrestricted spin treatment (if the spin multiplicity is greater than one).
  • res_keywords (dict) - A keyword dictionary to add to keywords if the structure requires an restricted spin treatment (if the spin multiplicity is one).
Returns: dict
The updated keywords dictionary

Note: The input keywords dictionary will be modified in place as a side-effect of this function. Ensure that the contents of the original dictionary are no longer needed after this function call.