schrodinger.application.matsci.speciesgui module¶
GUI Module to group structure object in to species
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.speciesgui.GroupingMethodSelector(species_collections, default, command=None, layout=None)¶
Bases:
schrodinger.ui.qt.swidgets.ActionPushButton
Widget to select the method of finding species
- selection_type_changed¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- __init__(species_collections, default, command=None, layout=None)¶
Constructs a new instance of GroupingMethodSelector
- Parameters
species_collections (list) – List of species.SpeciesCollectionTypes that are supported by the selector
default (species.SpeciesCollectionTypes) – The default species.SpeciesCollectionTypes
command (callable) – The command to call whenever the finder method is changed
layout (QLayout) – layout to place the GroupingMethodSelector in
- getMenuAction(menu, sc_type)¶
Add passed species finder to the passed menu
- Parameters
menu (
QtWidgets.QMenu
) – Menu to add the species finder tosc_type (
SpeciesCollectionTypes
) – The type of SpeciesCollectionTypes
- Return type
QtWidgets.QAction
- Returns
Menu item for the species finder
- setSpeciesCollection(sc_type)¶
Sets the species finder to be used to find species
- Parameters
sc_type (str) – Name of the SpeciesCollectionTypes
- findSpecies(structs)¶
Find and load species for the current species collection
- Parameters
structs – The structure to find species in
- getFlags()¶
Gets the flags for the driver
- Returns
list
- Return type
list of flags and value for the command line
- class schrodinger.application.matsci.speciesgui.SpeciesSelector(label, species_collections=None, default=SpeciesCollectionTypes.formula, layout=None, command=None, update_command=None)¶
Bases:
schrodinger.ui.qt.swidgets.SLabeledComboBox
Labeled Combobox that allows the user to select a species.
- species_changed¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- species_updated¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- __init__(label, species_collections=None, default=SpeciesCollectionTypes.formula, layout=None, command=None, update_command=None)¶
Create a SpeciesSelector instance
- Parameters
label (str) – The text for the combobox
species_collections (list or None) – List of species.SpeciesCollectionTypes that are supported by the selector. If None all the available collection types will be added.
default (species.SpeciesCollectionTypes) – The default species.SpeciesCollectionTypes
layout (QLayout) – layout to place the SpeciesSelector in
command (callable) – The slot to connect to the species_changed signal
update_command (callable) – The slot to connect to the species_updated signal
- property species_collection¶
Get species collection in the selector
- Returns
Species collection in the selector
- Return type
- property species_collection_type¶
Get name of the species collection type in the selector
- Returns
Name of the species collection type in the selector
- Return type
str
- currentSpecies()¶
Return the currently selected species
- Return type
species.SpeciesData
- Returns
The currently selected species
- speciesChanged()¶
React to a new species being selected
- speciesUpdated()¶
React to a species selection method being selected
- hasSpecies()¶
Check if any species have been loaded
- Return type
bool
- Returns
True of any species has been loaded, False if not
- reloadSpecies()¶
Reload species with previously called structure
- loadSpecies(structs)¶
Find all the species in the given structures and load them into the species type combobox
- Parameters
structs (list(
structure.Structure
)) – The list of structures to find the species in
- getFlags()¶
Gets the flags for the driver
- Returns
list
- Return type
list of flags and value for the command line
- reset()¶
Reset the widget, including clearing the species type combo