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¶
A
pyqtSignal
emitted by instances of the class.
- __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, stretch=True)¶
Bases:
schrodinger.ui.qt.swidgets.SLabeledComboBox
Labeled Combobox that allows the user to select a species.
- species_changed¶
A
pyqtSignal
emitted by instances of the class.
- species_updated¶
A
pyqtSignal
emitted by instances of the class.
- __init__(label, species_collections=None, default=SpeciesCollectionTypes.formula, layout=None, command=None, update_command=None, stretch=True)¶
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
stretch (bool) – Whether or not to add stretch after the widgets
- 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