schrodinger.application.matsci.chargegui module¶
Classes to aid in assigning charges to atoms in a GUI
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.matsci.chargegui.
BasisSetSelector
(label, basis_set, tip=None, layout=None)¶ Bases:
schrodinger.ui.qt.swidgets.SFrame
A frame that contains a label, line edit and pop up widgets for specifying a basis set
-
reset
()¶ Reset the widgets
-
setStructure
(struct)¶ Set the structure for the basis set edit to determine valid basis sets
Parameters: struct ( schrodinger.structure.Structure
) – The structure to use for checking basis sets
-
validate
()¶ Check if all widgets are in allowed states
Return type: (False, msg) or True Returns: False and error message if something is wrong, True if everything is OK. Return value is acceptable for an AF2 valiator.
-
-
class
schrodinger.application.matsci.chargegui.
ChargePropertySelector
(label, layout=None, tip=None)¶ Bases:
schrodinger.ui.qt.propertyselector.PropertySelectorMenu
A widget that allows the user to pick from a list of properties from a combobox and shows the user the “User” version of the property name (Property Name rather than x_prog_Property_Name)
-
static
getAllPotentialAtomChargeProperties
(structs)¶ Accumulate a list of all numeric atomic properties in all structures, removing any on the NON_CHARGE_PROPS list
Parameters: structs (list) – Each item is a schrodinger.structure.Structure
object.Return type: list Returns: A list of all numeric (r_, i_) atom properties found in structs. The list is sorted alphabetically.
-
getSelectedProp
()¶ Return the x_prog_property_name form of the selected property
Return type: str or None Returns: The x_prog_property_name value of the selected property or None if no property is selected
-
isVisible
()¶ Check if the combobox is visible
Return type: bool Returns: True if visible, False if not
-
reset
()¶ Reset the combobox
-
setVisible
(state)¶ Set the combobox and label visible or hidden
Parameters: state (bool) – Whether to show (True) or hide (False) the widgets
-
updateProperties
(structs)¶ Fill the combobox with all allowed atom properties available in structs
Parameters: structs (list or None) – If a list, each item is a schrodinger.structure.Structure
object. Use None to remove all atom properties but the default
-
static
-
class
schrodinger.application.matsci.chargegui.
NeighborTreatment
(quantum=False, label=None, basis_set='3-21G', layout_type='horizontal', **kwargs)¶ Bases:
schrodinger.ui.qt.swidgets.SFrame
An SFrame that contains a set of widgets that allows the user to pick whether neighboring atoms will be dealt with as atoms, existing charges or on-the-fly ESP charges
-
getBasis
()¶ Get the currently selected basis set if the treatment method requires one
Return type: str or None Returns: A current basis set or None if the current treatment does not use a basis set
-
getFlags
(flag_names=None)¶ Get the command line flags generated by this set of widgets
Parameters: flag_names (dict) – Used to modify flag names to custom values. Keys are default flag names (BASIS_FLAG, USE_Q_FLAG module constants) and values are the new flag string to use. Return type: list Returns: A list of command line flags and values that capture the current state of these widgets.
-
getQProp
()¶ Get the currently selected charge property if applicable
Return type: str or None Returns: The current charge property or None if the current treatment does not use a charge property (or none is available). The property will be in the x_prog_property_name format.
-
methodChanged
()¶ React to changing the treatment method
-
reset
()¶ Reset all the widgets
-
updateProperties
(structs)¶ Update the available charge properties based on structs
Parameters: structs (list) – A list of structures to pull charge properties from
-
validate
()¶ Validate that the widgets are in a proper state
Return type: True or (False, msg) Returns: True if everything is OK or (False, msg) if something is wrong. msg will describe the issue. The return value is consistent with af2 validation methods
-