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

Class OptimizationAndScanMixin

       object --+        
                |        
      MarkerMixin --+    
                    |    
CoordinateMarkerMixin --+
                        |
                       OptimizationAndScanMixin

A mixin that receives updates from Scan and Optimization tabs when new coordinate is added. It then checks whether this coordinate is defined as both scan and constraints coordinate. If this is the case a warning is shown

This mixin also ensures that constraints from both the Scan and Optimization tabs are marked.

Classes that use this mixin must have both "Scan" and "Optimization" tabs.

Instance Methods [hide private]
 
setup(self)
Connect the appropriate signals from Scan and Optimization tabs
 
_connectMarkerSignals(self, tab)
Connect the signals from the specified tab to the appropriate slots
 
checkConstraintCoords(self, atoms, coordinate_type)
This function checks whether a given coordinate entity already exists in constraint coordinates list.
 
checkScanCoords(self, atoms, coordinate_type)
This function checks whether a given coordinate entity already exists in scan coordinates list.
 
resolveCoordsConflict(self, atoms, coordinate_type, is_scan)
Shows dialog that prompts user to resolve conflict between scan and constraint.
 
_setAcceptableConstraintEids(self, eids, picking_err)
Pass the constraint or scan picking restrictions to the appropriate tab.
 
_addCoordMarker(self, atom_nums, alt_color, colors, icons, tab_name, check_visibility=False)
Add a marker to the specified atoms using the specified settings
 
_addScanMarker(self, atom_nums, check_visibility=False)
Add a Scan tab marker for the specified atoms
 
_addOptimizationMarker(self, atom_nums, check_visibility=False)
Add an Optimization tab marker for the specified atoms
 
showAllJaguarMarkers(self)
Display the appropriate markers if a marker tab is active.
 
_removeAllTabMarkers(self, tab_name)
Remove all markers for the specified tab
 
stopPicking(self)
Stop atom picking in response to changing tabs

Inherited from CoordinateMarkerMixin: clearConstraintsIfProject, clearConstraintsIfWorkspace, layOut

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

Class Variables [hide private]
list MARKER_TAB_CLASSES = [<class 'schrodinger.application.jaguar.g...
A list of tab classes.
  SCAN = 'scan'
  OPTIMIZATION = 'optimization'
Instance Variables [hide private]

Inherited from MarkerMixin: MARKER_TABS

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setup(self)

 

Connect the appropriate signals from Scan and Optimization tabs

Overrides: MarkerMixin.setup

_connectMarkerSignals(self, tab)

 

Connect the signals from the specified tab to the appropriate slots

Parameters:
  • tab - The tab to connect signals for
Overrides: CoordinateMarkerMixin._connectMarkerSignals
(inherited documentation)

checkConstraintCoords(self, atoms, coordinate_type)

 

This function checks whether a given coordinate entity already exists in constraint coordinates list. If it is there already a warning message is shown.

checkScanCoords(self, atoms, coordinate_type)

 

This function checks whether a given coordinate entity already exists in scan coordinates list. If it is there already a warning message is shown.

resolveCoordsConflict(self, atoms, coordinate_type, is_scan)

 

Shows dialog that prompts user to resolve conflict between scan and constraint.

Parameters:
  • atoms (list) - list of atom for new coordinate
  • coordinate_type (int) - coordinate type
  • is_scan (bool) - flag coordinate as scan (True) or constraint (False)

_setAcceptableConstraintEids(self, eids, picking_err)

 

Pass the constraint or scan picking restrictions to the appropriate tab.

Parameters:
  • eids - The entry ids for which coordinate picking is acceptable.
  • picking_err - If picking should not be allowed at all, this is the text of the error that will displayed to the user. If picking is allowed, should be None.
Overrides: CoordinateMarkerMixin._setAcceptableConstraintEids
(inherited documentation)

_addCoordMarker(self, atom_nums, alt_color, colors, icons, tab_name, check_visibility=False)

 

Add a marker to the specified atoms using the specified settings

Parameters:
  • atom_nums (list) - A list of atom numbers
  • alt_color (tuple, str, int, or schrodinger.structutils.color) - The alt_color for the marker
  • colors (tuple) - A tuple of colors to use for marking (atoms, pairs, angles, torsions)
  • icons (tuple) - A tuple of icons to use for marking (atoms, pairs, angles, torsions)
  • tab_name (str) - The name of the tab that this marker is for. Must be one of self.SCAN or self.OPTIMIZATION
  • check_visibility (bool) - If True, markers that don't belong to the current tab will be hidden. Only necessary if adding a marker to one tab while on a different tab.
Overrides: CoordinateMarkerMixin._addCoordMarker

_addScanMarker(self, atom_nums, check_visibility=False)

 

Add a Scan tab marker for the specified atoms

Parameters:
  • atom_nums (list) - A list of atom numbers

_addOptimizationMarker(self, atom_nums, check_visibility=False)

 

Add an Optimization tab marker for the specified atoms

Parameters:
  • atom_nums (list) - A list of atom numbers

showAllJaguarMarkers(self)

 

Display the appropriate markers if a marker tab is active. Hide all markers otherwise.

Overrides: MarkerMixin.showAllJaguarMarkers

Note: This function is named showAllJaguarMarkers() so it will override the AF2 showAllJaguarMarkers() function. Note that it never actually shows all markers.

_removeAllTabMarkers(self, tab_name)

 

Remove all markers for the specified tab

Parameters:

stopPicking(self)

 

Stop atom picking in response to changing tabs

Overrides: CoordinateMarkerMixin.stopPicking
(inherited documentation)

Class Variable Details [hide private]

MARKER_TAB_CLASSES

A list of tab classes. Markers will only be displayed when a tab on this list is active.
Type:
list
Value:
[<class 'schrodinger.application.jaguar.gui.tabs.optimization_tab.Opti\
mizationTab'>,
 <class 'schrodinger.application.jaguar.gui.tabs.scan_tab.ScanTab'>]