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

Class SurfacesSubTab

PyQt4.QtCore.QObject --+    
                       |    
              BaseSubTab --+
                           |
                          SurfacesSubTab

This sub tab class is used for Surfaces property.

Instance Methods [hide private]
 
setup(self)
This function is called to customize sub tab behavior.
dict
getMmJagKeywords(self, checked)
This function returns dictionary of mmjag keywords for this sub tab.
 
_getElectrostaticKeywords(self)
This function gets electrostatic potential and ionization energy surface keywords.
 
_getNoncovalentKeywords(self)
This function returns keywords for noncovalent surface options.
 
_getElectroDensityKeywords(self)
This function returns keywords for electron density surface options.
 
_getSpinDensityKeywords(self)
This function returns keywords for spin density options.
 
_getOrbitalsKeywords(self)
This function returns keywords for molecular orbitals options.
 
_getBoxKeywords(self)
This function returns keywords for box size and grid density options.
 
_getDefaultKeywords(self)
This function returns default keywords.
 
loadSettings(self, keywords)
This function restores this sub tab from the keywords dictionary.
bool
_loadSurfaceSettings(self, keywords)
This function determines surfaces settings from mmjag keywords.
bool
_loadOrbitalsSettings(self, keywords)
This function loads orbitals settings from mmjag keywords.
 
theoryUpdated(self, theory_level, dft_functional, spin_treatment, basis)
This sub tab needs to be updated when theory level or 'spin unrestricted' toggle state are changed.
 
_updateOrbitals(self)
This function checks surfaces tabs widget states and theory settings and enables various molecular orbitals widgets as needed.
 
_enableEnergyUnits(self)
This function is used to check state of 'Electrostatic potential' and 'Average local ionization energy' check boxes to determine whether 'Energy units' combo box should be enabled.
 
_updateTotalAlphaOrbitals(self)
This function calculates total number of 'alpha' orbitals.
 
_updateTotalBetaOrbitals(self)
This function calculates total number of 'alpha' orbitals.
str
_totalOrbitalsLabel(self, start_base, start, end_base, end)
Calculate total number of orbitals and return text to display in the label.
dict
_getOrbitals(self, orbitals)
This function returns keywords for the given list of orbitals.
bool
_setOrbital(self, iorb, value)
This function sets widgets corresponding to a given molecular orbital.
 
_setOrbitalDefault(self, iorb)
Set orbital widgets to default values.
tuple
_parseOrbitalValue(self, iorb, value)
This function splits given orbital value into base ('homo-' or 'lumo+') and an orbital count.
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.

Inherited from BaseSubTab: __init__

Class Variables [hide private]
  SURFACES_ORBITAL_HOMOMINUS = "homo-"
  SURFACES_ORBITAL_LUMOPLUS = "lumo+"
  MOLECULAR_ORBITALS = OrderedDict((("HOMO-", SURFACES_ORBITAL_H...
  ALPHA_ORBITALS = [mm.MMJAG_SKEY_IORB1A, mm.MMJAG_SKEY_IORB2A]
  BETA_ORBITALS = [mm.MMJAG_SKEY_IORB1B, mm.MMJAG_SKEY_IORB2B]
  DEFAULT_ORBITAL = "0"
collections.OrderedDict ENERGY_UNIT_METHOD = OrderedDict((("kcal/mol", mm.MMJAG_ESPUNI...
An OrderedDict of {energy unit method: mmjag keyword value} used to populate 'Energy units' combo box.
Instance Variables [hide private]

Inherited from BaseSubTab: row_id, spin, theory_level, ui

Method Details [hide private]

setup(self)

 

This function is called to customize sub tab behavior. It should be reimplemented for any subclass that has custom features.

Overrides: BaseSubTab.setup
(inherited documentation)

getMmJagKeywords(self, checked)

 

This function returns dictionary of mmjag keywords for this sub tab. It is only used for tabs that don't have options.

Parameters:
  • checked - True if property row is 'checked'
Returns: dict
mmjag keywords dictionary
Overrides: BaseSubTab.getMmJagKeywords
(inherited documentation)

loadSettings(self, keywords)

 

This function restores this sub tab from the keywords dictionary.

Parameters:
  • keywords - mmjag keywrods dictionary
Overrides: BaseSubTab.loadSettings
(inherited documentation)

_loadSurfaceSettings(self, keywords)

 

This function determines surfaces settings from mmjag keywords. If any of the surface calculations are on return True, otherwise return False.

Parameters:
  • keywords (dict) - mmjag keywords dictionary
Returns: bool
True if at least one surface calculation is 'checked'.

_loadOrbitalsSettings(self, keywords)

 

This function loads orbitals settings from mmjag keywords.

Parameters:
  • keywords (dict) - mmjag keywrods dictionary
Returns: bool
False if all orbitals have default value of DEFAULT_ORBITAL. True otherwise.

theoryUpdated(self, theory_level, dft_functional, spin_treatment, basis)

 

This sub tab needs to be updated when theory level or 'spin unrestricted' toggle state are changed.

Parameters:
  • theory - The current level of theory. Must be one of "DFT", "HF" or "LMP2"
  • dft_functional - If c{theory} is "DFT", the currently selected functional level. If theory is not "DFT" or if the user has not specified a functional level, should be None.
  • spin_unrestricted - Whether the spin-unrestricted check box is checked in the theory tab. If theory is "LMP2", should be None.
  • basis - The currently selected basis set without the polarization or diffuse levels (i.e. "6-31G" rather than "6-31G**+")
Overrides: BaseSubTab.theoryUpdated

_totalOrbitalsLabel(self, start_base, start, end_base, end)

 

Calculate total number of orbitals and return text to display in the label.

Parameters:
  • start_base (int) - start orbitals base (HOMOMINUS or LUMOPLUS)
  • start (int) - start orbitals index
  • end_base (int) - end orbitals base (HOMOMINUS or LUMOPLUS)
  • end (int) - end orbitals index
Returns: str
text of label to show total number of orbitals

_getOrbitals(self, orbitals)

 

This function returns keywords for the given list of orbitals.

Parameters:
  • orbitals (list) - list of orbitals that contains mmjag keywords for iorb1a, iorb2a etc.
Returns: dict
dictionary of orbital setting, which has mmjag orbitals as keys and values that have format <homo-|lumo+>N.

_setOrbital(self, iorb, value)

 

This function sets widgets corresponding to a given molecular orbital. Orbital's base and count are parsed from a given value argument, which has format <homo-|lumo+>N.

Parameters:
  • iorb (string) - molecular orbital specified by mmjag keywords, such as iorb1a, iorb2a, iorb1b or iorb2b.
  • value (string) - orbital value obtained from mmjag keywords
Returns: bool
True if default orbital value was found and False otherwise

_setOrbitalDefault(self, iorb)

 

Set orbital widgets to default values. If 'from' orbital it will be homo-0 and if 'to' orbital it will be lumo+0.

Parameters:
  • iorb (string) - molecular orbital specified by mmjag keywords, such as iorb1a, iorb2a, iorb1b or iorb2b.

_parseOrbitalValue(self, iorb, value)

 

This function splits given orbital value into base ('homo-' or 'lumo+') and an orbital count. It then returns a (base, count) tuple. An exception is raised if value does not have format <homo-|lumo+>N.

Parameters:
  • iorb (string) - molecular orbital specified by mmjag keywords, such as iorb1a, iorb2a, iorb1b or iorb2b.
  • value (string) - mmjag orbital value
Returns: tuple
tuple that contains orbital's base and count

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

Class Variable Details [hide private]

MOLECULAR_ORBITALS

Value:
OrderedDict((("HOMO-", SURFACES_ORBITAL_HOMOMINUS), ("LUMO+", SURFACES\
_ORBITAL_LUMOPLUS)))

ENERGY_UNIT_METHOD

An OrderedDict of {energy unit method: mmjag keyword value} used to populate 'Energy units' combo box.
Type:
collections.OrderedDict
Value:
OrderedDict((("kcal/mol", mm.MMJAG_ESPUNIT_KCALMOL), ("kcal/mol/electr\
on", mm.MMJAG_ESPUNIT_KCALMOLELEC), ("kT/electorn at 298.15K", mm.MMJA\
G_ESPUNIT_KTELEC), ("hartrees", mm.MMJAG_ESPUNIT_HARTREE), ("kT at 298\
.15K", mm.MMJAG_ESPUNIT_KT), ("eV", mm.MMJAG_ESPUNIT_EV)))