# Copyright 2004-2008 Nanorex, Inc. See LICENSE file for details. """ WhatsThisText_for_CommandToolbars.py This file provides functions for setting the "What's This" text for widgets (typically QActions) in the Command Toolbar. @author: Mark @version:$Id$ @copyright: 2004-2008 Nanorex, Inc. See LICENSE file for details. """ from foundation.whatsthis_utilities import fix_whatsthis_text_and_links # Try to keep this list in order (by appearance in Command Toolbar). --Mark # Command Toolbar Menus (i.e. Build, Tools, Move and Simulation ###### def whatsThisTextForCommandToolbarBuildButton(button): """ "What's This" text for the Build button (menu). """ button.setWhatsThis( """Build


The Build Command Set for modeling and editing structures interactively.

""") return def whatsThisTextForCommandToolbarInsertButton(button): """ "What's This" text for the Insert button (menu). """ button.setWhatsThis( """Insert


The Insert Command Set which includes commands for inserting various things into the current part.

""") return def whatsThisTextForCommandToolbarToolsButton(button): """ Menu of Build tools. """ button.setWhatsThis( """Tools


The Tools Command Set which includes specialized tools for model editing.

""") return def whatsThisTextForCommandToolbarMoveButton(button): """ "What's This" text for the Move button (menu). """ button.setWhatsThis( """Move


The Move Command Set which includes specialized rotation and translation commands that operate on the current selection.

""") return def whatsThisTextForCommandToolbarSimulationButton(button): """ "What's This" text for the Simulation button (menu). """ button.setWhatsThis( """Simulation


The Simulation Command Set which includes commands for setting up, launching and playing back movies of molecular dynamics simulations.

""") return # Build command toolbars #################### def whatsThisTextForAtomsCommandToolbar(commandToolbar): """ "What's This" text for widgets in the Build Atoms Command Toolbar. @note: This is a placeholder function. Currenly, all the tooltip text is defined in BuildAtoms_Command.py. """ commandToolbar.exitModeAction.setWhatsThis( """Exit Atoms

Exits the Build Atoms command set.

""") commandToolbar.atomsToolAction.setWhatsThis( """Atoms Tool


Activates Atoms Tool Mode for depositing and/or selecting atoms. Double-click to insert a new atom into the model by itself. Single-click on bondpoints to insert and bond a new atom to an existing atom.

""") commandToolbar.transmuteAtomsAction.setWhatsThis( """Transmute Atoms


Transmutes the selected atoms to the active element type. The active element type in set using the Atom Chooser in the property manager.


Hot Tip: Use the Selection Filter to limit selects to specific atom types in the raphics area command toolbar.

""") commandToolbar.bondsToolAction.setWhatsThis( """Bonds Tool


Enters Bonds Tool Mode for changing bonds (i.e. the bond order) or deleting bonds. Singe-clicking bonds will transmute them into the active bond type. The active bond type in set by selecting one of the bond types (i.e. single, double, triple, etc.) in the flyout area of the command toolbar.


Hot Tip: It is possible to transmute multiple bonds at the same time. To do this, select all the atoms with bonds you want to transmute, then click on the bond type in the command toolbar.

""") commandToolbar.bond1Action.setWhatsThis( """Single Bond


Sets the active bond type to single. Singe-clicking a highlighted bond transmutes it into a single bond.


Hot Tip: It is possible to transmute multiple bonds into single bonds at the same time. To do this, select all the atoms with bonds you want to transmute, then click on this button. Note: Only selected atoms with bonds between them will be transmuted.

""") commandToolbar.bond2Action.setWhatsThis( """Double Bond


Sets the active bond type to double. Singe-clicking a highlighted bond transmutes it into a double bond.


Hot Tip: It is possible to transmute multiple bonds into double bonds at the same time. To do this, select all the atoms with bonds you want to transmute, then click on this button. Note: Only selected atoms with bonds between them will be transmuted.

""") commandToolbar.bond3Action.setWhatsThis( """Triple Bond


Sets the active bond type to triple. Singe-clicking a highlighted bond transmutes it into a triple bond.


Hot Tip: It is possible to transmute multiple bonds into triple bonds at the same time. To do this, select all the atoms with bonds you want to transmute, then click on this button. Note: Only selected atoms with bonds between them will be transmuted.

""") commandToolbar.bondaAction.setWhatsThis( """Aromatic Bond


Sets the active bond type to aromatic. Singe-clicking a highlighted bond transmutes it into an aromatic bond.


Hot Tip: It is possible to transmute multiple bonds into aromatic bonds at the same time. To do this, select all the atoms with bonds you want to transmute, then click on this button. Note: Only selected atoms with bonds between them will be transmuted.

""") commandToolbar.bondgAction.setWhatsThis( """Graphitic Bond


Sets the active bond type to graphitic. Singe-clicking a highlighted bond transmutes it into a graphitic bond.


Hot Tip: It is possible to transmute multiple bonds into graphitic bonds at the same time. To do this, select all the atoms with bonds you want to transmute, then click on this button. Note: Only selected atoms with bonds between them will be transmuted.

""") commandToolbar.cutBondsAction.setWhatsThis( """Cut Bonds


Activates cut bonds mode. Singe-clicking a highlighted bond deletes it.

""") # Convert all "img" tags in the button's "What's This" text # into abs paths (from their original rel paths). # Partially fixes bug 2943. --mark 2008-12-07 fix_whatsthis_text_and_links(commandToolbar.subControlActionGroup) fix_whatsthis_text_and_links(commandToolbar.bondToolsActionGroup) return def whatsThisTextForProteinCommandToolbar(commandToolbar): """ "What's This" text for the Build Protein Command Toolbar """ commandToolbar.exitModeAction.setWhatsThis( """Exit Protein

Exits the Build Protein command set.

""") commandToolbar.modelProteinAction.setWhatsThis( """Model Protein


Enter protein modeling mode. Protein modeling sub-commands are displayed to the right in the flyout area of the command toolbar.

""") commandToolbar.simulateProteinAction.setWhatsThis( """Simulate Protein with Rosetta


Enter protein simulation mode using Rosetta. Rosetta simulation sub-commands are displayed to the right in the flyout area of the command toolbar.

Rosetta is a collection of computational tools for the prediction and design of protein structures and protein-protein interactions.

Click here for more information about Rosetta for NanoEngineer-1

""") commandToolbar.buildPeptideAction.setWhatsThis( """Insert Peptide


Insert a peptide chain by clicking two endpoints in the graphics area. The user can also specify different conformation options (i.e. Alpha helix, Beta sheet, etc.) in the property manager.

""") commandToolbar.compareProteinsAction.setWhatsThis( """Compare Proteins


Select two protein structures and compare them visually.

""") commandToolbar.displayProteinStyleAction.setWhatsThis( """Edit (Protein Display) Style


Edit the Protein Display Style settings used whenever the Global Display Style is set to Protein.

""") commandToolbar.rosetta_fixedbb_design_Action.setWhatsThis( """Fixed Backbone Protein Sequence Design


Design an optimized fixed backbone protein sequence using Rosetta.

""") commandToolbar.rosetta_backrub_Action.setWhatsThis( """Backrub Motion


Design an optimized backbone protein sequence using Rosetta with backrub motion allowed.

""") commandToolbar.editResiduesAction.setWhatsThis( """Edit Residues


Provides an interface to edit residues so that Rosetta can predict the optimized sequence of an initial sequence (peptide chain).

""") commandToolbar.rosetta_score_Action.setWhatsThis( """Compute Rosetta Score


Produce the Rosetta score, which is useful for predicting errors in a peptide/protein structure.

The Rosetta scoring function is an all-atom force field that focuses on short-range interactions (i.e., van der Waals packing, hydrogen bonding and desolvation) while neglecting long-range electrostatics.

""") # Convert all "img" tags in the button's "What's This" text # into abs paths (from their original rel paths). # Partially fixes bug 2943. --mark 2008-12-07 fix_whatsthis_text_and_links(commandToolbar.subControlActionGroup) fix_whatsthis_text_and_links(commandToolbar.subControlActionGroupForModelProtein) fix_whatsthis_text_and_links(commandToolbar.subControlActionGroupForSimulateProtein) return def whatsThisTextForDnaCommandToolbar(commandToolbar): """ "What's This" text for the Build DNA Command Toolbar """ commandToolbar.exitModeAction.setWhatsThis( """Exit DNA

Exits the Build DNA command set.

""") commandToolbar.dnaDuplexAction.setWhatsThis( """Insert DNA


Insert a DNA duplex by clicking two endpoints in the graphics area.

""") commandToolbar.breakStrandAction.setWhatsThis( """Break Strands


This command provides an interactive mode where the user can break strands by clicking on a bond in a DNA strand.

You can also join strands while in this command by dragging and dropping strand arrow heads onto their strand conjugate (i.e. 3' on to 5' and vice versa).


Hot Tip: Changing the Global display style to CPK results in faster interactive graphics while in this command, especially for large models.

""") commandToolbar.joinStrandsAction.setWhatsThis( """Join Strands


This command provides an interactive mode where the user can join strands by dragging and dropping strand arrow heads onto their strand conjugate (i.e. 3' on to 5' and vice versa).


Hot Tip: Changing the Global display style to CPK results in faster interactive graphics while in this command, especially for large models.

""") commandToolbar.convertDnaAction.setWhatsThis( """Convert DNA


Converts the selected DNA from PAM3 to PAM5 or PAM5 to PAM3. The only reason to convert to PAM5 is to get more accurate minimizations of DNA nanostructures.

Here is the protocol for producing more accurate minimizations:
1. Make sure the current model is saved. 2. Select File > Save As... to save the model under a new name (i.e. model_name_minimized).
3. Select Build > DNA > Convert to convert the entire model from PAM3 to PAM5.
4. Select Tools > Minimize Energy.
5. In the Minimize Energy dialog, select GROMACS with ND1 force field as the Physics engine.
6. Click the Minimize Energy button.
7. After minimize completes, convert from PAM5 to PAM3.

Next, visually inspect the model for structural distortions such as puckering, warping, or other unwanted strained areas that will require model changes to correct. Model changes should be made in a version of the model that hasn't been minimized. You can either click Edit > Undo or save this model and reopen the previous version.


Hot Tip: Changing the Global display style to CPK or DNA Cylinder may make the model easier to visually inspect.

Click here for a technical overview of the NanoEngineer-1 PAM3 and PAM5 reduced models.

""") commandToolbar.orderDnaAction.setWhatsThis( """Order DNA


Produces a comma-separated value (.CSV) text file containing all DNA strand sequences in the model.


Hot Tip: This file can be used to order oligos from suppliers of custom oligonucleotides such as Integrated DNA Technologies and Gene Link.

""") commandToolbar.editDnaDisplayStyleAction.setWhatsThis( """Edit (DNA Display) Style


Edit the DNA Display Style settings used whenever the Global Display Style is set to DNA Cylinder. These settings also apply to DNA strands and segments that have had their display style set to DNA Cylinder.

""") commandToolbar.makeCrossoversAction.setWhatsThis( """Make Crossovers


Creates crossovers interactively between two or more selected DNA segments.

To create crossovers, select the DNA segments to be searched for potential crossover sites. Transparent green spheres indicating potential crossover sites are displayed as you move (rotate or translate) a DNA segment. After you are finished moving a DNA segment, crossover sites are displayed as a pair of white cylinders that can be highlighted/selected. Clicking on a highlighted crossover site makes a crossover.

""") # Convert all "img" tags in the button's "What's This" text # into abs paths (from their original rel paths). # Partially fixes bug 2943. --mark 2008-12-07 fix_whatsthis_text_and_links(commandToolbar.subControlActionGroup) return def whatsThisTextForNanotubeCommandToolbar(commandToolbar): """ "What's This" text for widgets in the Build Nanotube Command Toolbar. """ commandToolbar.exitModeAction.setWhatsThis( """Exit Nanotube

Exits the Build Nanotube command set.

""") commandToolbar.insertNanotubeAction.setWhatsThis( """Insert Nanotube


Insert a carbon or boron-nitride nanotube by clicking two endpoints in the graphics area.

""") # Convert all "img" tags in the button's "What's This" text # into abs paths (from their original rel paths). # Partially fixes bug 2943. --mark 2008-12-07 fix_whatsthis_text_and_links(commandToolbar.subControlActionGroup) return def whatsThisTextForCrystalCommandToolbar(commandToolbar): """ "Tool Tip" text for widgets in the Build Crystal (crystal) Command Toolbar. """ commandToolbar.exitModeAction.setWhatsThis( """Exit Crystal

Exits the Build Crystal command set.

""") commandToolbar.polygonShapeAction.setWhatsThis( """Polygon


Defines the selection shape as a polygon with the user specifying the vertices.


Remember: You must double-click to define the final vertex and close the polygon.

""") commandToolbar.circleShapeAction.setWhatsThis( """Circle


Defines the selection shape as a circle with the user specifying the center (first click) and radius (second click).

""") commandToolbar.squareShapeAction.setWhatsThis( """Square


Defines the selection shape as a square with the user specifying the center (first click) and a corner (second click).

""") commandToolbar.rectCtrShapeAction.setWhatsThis( """Rectangle


Defines the selection shape as a rectangle with the user defining the center (first click) and corner (second click).

""") commandToolbar.rectCornersShapeAction.setWhatsThis( """Rectangle Corners


Defines the selection shape as a rectangle with the user specifying one corner (first click) and then the opposite corner (second click).

""") commandToolbar.hexagonShapeAction.setWhatsThis( """Hexagon


Defines the selection shape as a hexagon with the user specifying the center (first click) and corner (second click).

""") commandToolbar.triangleShapeAction.setWhatsThis( """Triangle


Defines the selection shape as a triangle with the user specifying the center (first click) and corner (second click).

""") commandToolbar.diamondShapeAction.setWhatsThis( """Diamond


Defines the selection shape as a diamond with the user specifying the center (first click) and corner (second click).

""") commandToolbar.lassoShapeAction.setWhatsThis( """Lasso


Defines the selection shape as a freeform lasso. Draw the shape by dragging the mouse while holding down the LMB.

""") # Convert all "img" tags in the button's "What's This" text # into abs paths (from their original rel paths). # Partially fixes bug 2943. --mark 2008-12-07 fix_whatsthis_text_and_links(commandToolbar.subControlActionGroup) return # Move command toolbar #################### def whatsThisTextForMoveCommandToolbar(commandToolbar): """ "What's This" text for widgets in the Move Command Toolbar. """ commandToolbar.exitModeAction.setWhatsThis( """Exit Move

Exits the Move command set.

""") # NOTE: "What's This" descriptions for Translate, Rotate and # Align to Common Axis can be found in WhatsThisText_for_MainWindow.py. # (and they should remain there until Ui_MoveFlyout is refactored ) # - Mark 2008-12-02 return def whatsThisTextForMovieCommandToolbar(commandToolbar): """ "What's This" text for widgets in the Movie Command Toolbar. """ return