schrodinger.application.matsci.atomicsymbolsgui module

GUI elements that help with atomic symbols

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.atomicsymbolsgui.ElementValidator

Bases: schrodinger.ui.qt.swidgets.EnforcingValidatorMixin, PyQt6.QtGui.QValidator

A QValidator to check if the input is a partial or valid atomic symbol. Partial symbols are 1- or 2-(Uu) letter strings that could begin a valid atomic symbol.

validate(text, pos)

Check if the text is a partial or valid atomic symbol. Partial symbols are strings that could begin a valid atomic symbol.

See PyQt documentation for argument and return value documentation.

class schrodinger.application.matsci.atomicsymbolsgui.AtomNameLabelValidator(*args, **kwargs)

Bases: schrodinger.ui.qt.swidgets.EnforcingValidatorMixin, PyQt6.QtGui.QValidator

Manage validation of a atom name label.

VALID_LABEL_PUNCTUATION = '_()[]'
__init__(*args, **kwargs)

Overwrite parent to set the valid label characters dictionary on creation

validate(value, position)

See PyQt documentation for arguments and return values.

class schrodinger.application.matsci.atomicsymbolsgui.ElementListValidator(parent=None, is_empty_valid=False)

Bases: schrodinger.ui.qt.swidgets.EnforcingValidatorMixin, PyQt6.QtGui.QValidator

A QValidator to check if the inputs from a lineedit is a valid atomic symbols separated by comma. Empty lines are treated as intermediate state. All symbols are invalid. If input is not in atomicsymbol.ATOMIC_SYMBOLS then consider it intermediate state. All other states are consider valid state.

__init__(parent=None, is_empty_valid=False)

Create ElementListValidator object.

Parameters
  • parent (QObject) – the object that owns the validator

  • is_empty_valid (bool) – If True, empty string is a valid value

validate(text, pos)

Check if the text is a valid atomic symbols separated by comma.

See PyQt documentation for argument and return value documentation.

class schrodinger.application.matsci.atomicsymbolsgui.ElementEdit(default, layout=None, **kwargs)

Bases: schrodinger.ui.qt.swidgets.SLineEdit

A QLineEdit that only accepts atomic symbols and always contains the last valid value when it loses keyboard focus

__init__(default, layout=None, **kwargs)

Create an ElementEdit instance

Parameters
  • default (str) – Default atomic symbol

  • layout (QBoxLayout) – The layout to place this line edit into

class schrodinger.application.matsci.atomicsymbolsgui.ElementListEdit(text, layout=None, is_empty_valid=False, **kwargs)

Bases: schrodinger.ui.qt.swidgets.SLabeledEdit

A QLineEdit that only accepts atomic symbols and always contains the last valid value when it loses keyboard focus

__init__(text, layout=None, is_empty_valid=False, **kwargs)

Create an ElementEdit instance

Parameters
  • default (str) – Default atomic symbol

  • layout (QBoxLayout) – The layout to place this line edit into

  • is_empty_valid (bool) – If True, empty string is a valid value

class schrodinger.application.matsci.atomicsymbolsgui.CoarseGrainNameEdit(default, layout=None, **kwargs)

Bases: schrodinger.ui.qt.swidgets.SLineEdit

A QLineEdit that only accepts valid coarse grain names and always contains the last valid value when it loses keyboard focus

__init__(default, layout=None, **kwargs)

Create an CoarseGrainNameEdit instance

Parameters
  • default (str) – Default atomic symbol

  • layout (QBoxLayout) – The layout to place this line edit into