Package schrodinger :: Package application :: Package matsci :: Module builderwidgets
[hide private]
[frames] | no frames]

Module builderwidgets

Classes [hide private]
  TemplateCombo
A Combo Box for managing template lists
  TemplateManager
A dialog that manages the user templates - currently only allows deletion
  SketcherBox
Set of widgets that controls a 2D sketcher and has additional widgets that allow the user to load/save/delete templates for the sketcher and import structures from the workspace into the sketcher.
  ItemRow
A row of control widgets for a ligand
  StructureLabel
A label that gives information about the ligand for a given row and shows the set structure in a tooltip.
  RGroupStructureToolTip
A structure tooltip that displays Rx labels for the Rx atoms
  SketchDialog
A Dialog window that opens a SketcherBox instance
  TMLigandRowMixin
A mixin class that takes care of minimizing bidentate transition metal complex ligand structures so that they remain planar through the R1-...-R2 bond path.
  ItemRowWithTemplates
An ItemRow that holds the data for one unit and includes a combo for choosing Template structures
  ComplexTemplateSketcher
A 2D sketcher that is decorated with a number of widgets for creating and saving templates.
Functions [hide private]
str
get_builtin_directory(path, item_type)
Given a path to a script and an item type, generate the path to built-in templates for that script and item_type
 
convert_old_marker_props_to_new(struct)
Some template strutures may still use old-style properties to mark Rx atoms.
(dict, int)
get_marker_atom_indexes_from_structure(struct)
Get the indexes of atoms marked as Rx atoms
 
clear_marker_properties(struct)
Clear any marker properties that exist on the structure
 
set_marker_properties(struct, rx_atoms, clear=True)
Set the structure properties that store the atoms
Variables [hide private]
  __doc__ = ...
  maestro = schrodinger.get_maestro()
  ATOM_MARKER_PROP_BASE = 's_matsci_rx_marker_atom_'
  HIGHEST_RX_MARKER_XVAL = 'i_matsci_highest_rx_xval'
  OLD_FIRST_MARKER_PROP = 'i_matsci_complex_builder_site_atom1'
  OLD_SECOND_MARKER_PROP = 'i_matsci_complex_builder_site_atom2'
  ALL_OLD_MARKER_PROPS = [OLD_FIRST_MARKER_PROP, OLD_SECOND_MARK...
  TEMPLATE_EXTENSION = '.maegz'
  TEMPLATE_GLOB = '*'+ TEMPLATE_EXTENSION
  RECENT_TEMPLATE_FILE = 'recent.txt'
  VALID_CHARACTERS = set("-_.(),{}' abcdefghijklmnopqrstuvwxyz" ...
  CUSTOM_TEMPLATE = 'Custom'
  NO_TEMPLATE = 'This is not a template'
  TEMP_ELEMENT = 'Br'
  APP_DIR = 'matsci_templates'
  PREF_GROUP = 'general_builder_widgets'
  RESELECT_CURRENT_TEMPLATE = 'reselect current template'
  RESET_TO_DEFAULT_CUSTOM_DIR = 'reset to default custom dir'
Function Details [hide private]

get_builtin_directory(path, item_type)

 

Given a path to a script and an item type, generate the path to built-in templates for that script and item_type

If the script is located at /A/B/bob.py, the path returned will be /A/B/bob_dir/item_type_templates

Parameters:
  • path (str) - The path to the script (generated via __file__ property)
  • item_type (str) - The type item these templates are. Will form the base name of the template directory
Returns: str
The path to the built-in directory for templates of item_type for the script at path

convert_old_marker_props_to_new(struct)

 

Some template strutures may still use old-style properties to mark Rx atoms. This function converts those properties to new-style properties and removes the old ones.

Parameters:

get_marker_atom_indexes_from_structure(struct)

 

Get the indexes of atoms marked as Rx atoms

Parameters:
Returns: (dict, int)
dict keys are the int value of x in Rx, values are lists of atom indexes set to that Rx value (atom indexes are 1-based). The int return value is the highest value of x in the keys of the dictionary.

clear_marker_properties(struct)

 

Clear any marker properties that exist on the structure

Parameters:

set_marker_properties(struct, rx_atoms, clear=True)

 

Set the structure properties that store the atoms

Parameters:
  • struct (schrodinger.structure.Structure) - The structure with the Rx atoms
  • rx_atoms (dict) - keys are the int value of x in Rx, values are lists of atom indexes set to that Rx value (atom indexes are 1-based)
  • clear (bool) - Clear any existing marker properties before setting new ones

Variables Details [hide private]

__doc__

Value:
"""
Common widgets and code for builders such as the TM Complex Builder an\
d the
Oligamer builder

Copyright Schrodinger, LLC. All rights reserved.
"""

ALL_OLD_MARKER_PROPS

Value:
[OLD_FIRST_MARKER_PROP, OLD_SECOND_MARKER_PROP]

VALID_CHARACTERS

Value:
set("-_.(),{}' abcdefghijklmnopqrstuvwxyz" 'ABCDEFGHIJKLMNOPQRSTUVWXYZ\
0123456789')