Menus¶
This chapter contains a listing of the menu options available in VIDA. Where possible, each section also contains a listing of the Python code that is run when that option is selected. All Python menu commands are wrapped in a standard exception handling block:
try: exec(<command>)
except Exception, e:
if 'Canceled' not in str(e):
DoMenuError(e)
raise;
File¶
Open¶
Open(PromptFilenames([], 'molecule,grid,surface,query,python,state'))
Open State¶
Open(PromptFilename('','Open','state'))
Open Special¶
From PDB…¶
LoadMoleculesFromPDB(PromptString('Enter PDB code(s)'))
Script…¶
Open(PromptFilename('', 'Open', 'python')
MTZ…¶
DoOpenMTZ()
Clear¶
Marked¶
DeleteScoped(MarkedScope, True)
Not Marked¶
DeleteScoped(MarkedScope, False)
Visible¶
DeleteScoped(VisibleScope, True)
Not Visible¶
DeleteScoped(VisibleScope, False)
Clear All¶
DeleteAll()
Save¶
try:
_tmp_keys = PromptKeys()
if _tmp_keys:
_tmp_sname = PromptSaveFilename(_tmp_keys)
if _tmp_sname:
Save(_tmp_sname, _tmp_keys)
except:
pass
Save Marked¶
try:
_tmp_keys = GetMoleculesScoped(MarkedScope)
_tmp_keys += GetGridsScoped(MarkedScope)
_tmp_keys += GetSurfacesScoped(MarkedScope)
if _tmp_keys:
_tmp_sname = PromptSaveFilename(_tmp_keys)
if _tmp_sname:
Save(_tmp_sname, _tmp_keys)
except:
pass
Save State¶
try:
_tmp_filters = 'OpenEye State Version 2 ( *.oes ) ;;' \
'OpenEye Mini State Version 2 ( *.oes ) ;;' \
'OpenEye State Version 1 ( *.oes ) '
_tmp_results = PromptSaveFilename(_tmp_filters)
if len(_tmp_results) == 2:
SaveStateFilter(_tmp_results[0], _tmp_results[1])
except:
pass
New List¶
From AND¶
try:
_tmp_ids = PromptIDs(['Lists'], 0)
if _tmp_ids:
ListNewAnd(_tmp_ids)
except:
pass
From OR¶
try:
_tmp_ids = PromptIDs(['Lists'], 0)
if _tmp_ids:
ListNewOr(_tmp_ids)
except:
pass
From XOR¶
try:
_tmp_ids = PromptIDs(['Lists'], 0)
if _tmp_ids:
ListNewXor(_tmp_ids)
except:
pass
From Marked¶
ListNewMarked()
New Molecule¶
From Name¶
try:
_tmp_smiles = PromptSmiles('New Molecule')
if _tmp_smiles:
_tmp_mol = MoleculeNew(_tmp_smiles)
if _tmp_mol:
MoleculeGenerateCoords(_tmp_mol, 1)
Active(_tmp_mol)
except:
pass
From Merge¶
All three options under this menu (Scoped, Marked, and Visible) execute the following code.
try:
_tmp_name = PromptString('Name:')
if _tmp_name:
_tmp_id = MoleculeMergeScoped(SCOPE, _tmp_name)
if _tmp_id:
Active(_tmp_id)
except:
pass
The SCOPE parameter is assigned a value according to which option was selected (SelectedScope, MarkedScope, and VisibleScope respectively).
From Split¶
Components
ids = MoleculeNewSubsetScoped(0,ActiveThenVisibleScope,1)
if ids:
Active(ids[0])
Selected
ids = MoleculeNewSubsetScoped(0,ActiveThenVisibleScope,SelectedScope,1)
if ids:
Active(ids[0])
Marked
ids = MoleculeNewSubsetScoped(0,ActiveThenVisibleScope,MarkedScope,1)
if ids:
Active(ids[0])
Import¶
Spreadsheet¶
_tmp_fname = ''
try:
_tmp_fname = PromptFilename('', 'Open', 'data')
if _tmp_fname:
eval( SpreadsheetPromptImport(_tmp_fname) or 'None' )
except:
pass
Export¶
Script History¶
try:
_tmp_fname = PromptFilename('journal.py', 'Save', 'python')
if _tmp_fname:
AppScriptSave(_tmp_fname)
except:
pass
Screenshot¶
MainWindowScreenshotPrompt()
Spreadsheet¶
try:
_tmp_fname = PromptFilename('', 'Save', 'data')
if _tmp_fname:
eval( SpreadsheetPromptExport(_tmp_fname) or 'None' )
except:
pass
POV-Ray¶
try:
_tmp_fname = PromptFilename('', 'Save', '')
if _tmp_fname:
ViewerExportPOVRAY(_tmp_fname)
except:
pass
Recents¶
All of the options in this menu call the following command:
OpenWithRecents(FILENAME)
The FILENAME parameter is assigned to the filename specified in the option that was selected under this menu.
Recent Directories¶
All of the options in this menu call the following command:
PromptOpenWithRecents('molecule,grid,surface,query,python,state', FILENAME)
The FILENAME parameter is assigned to the filename specified in the option that was selected under this menu.
Exit¶
Quit()
Edit¶
Undo¶
Undo()
Undo History¶
Redo¶
Redo()
Redo History¶
Copy¶
Copy()
Copy Image¶
MainWindowScreenshot()
Paste¶
PasteMolecules()
Select¶
All Visible¶
SelectAllMolecules()
Expression¶
try:
_tmp_selexpr = PromptString('Selection Expression')
if _tmp_selexpr:
Select(_tmp_selexpr)
except:
pass
Query¶
try:
_tmp_query = PromptQuery()
if _tmp_query:
SelectByQuery(_tmp_query, False, VisibleScope)
except:
pass
Invert¶
SelectInvert()
None¶
ClearSelection()
Mark¶
All Visible¶
MarkObjectsByScope(VisibleScope)
Query¶
try:
_tmp_query = PromptQuery()
if _tmp_query:
SelectByQuery(_tmp_query, True)
except:
pass
None¶
ClearMarked()
Hide¶
All¶
ClearVisible()
Selected¶
HideScoped(SelectedScope, True)
Marked¶
HideScoped(MarkedScope, True)
Not Selected¶
HideScoped(SelectedScope, False)
Not Marked¶
HideScoped(MarkedScope, False)
None¶
HideNoneScoped()
Find¶
By LINGO Similarity¶
Creates a new list of molecules, based on the LINGO similarity measure to a query molecule. LINGO is a fast text-based similarity measure that uses the canonical, isomeric SMILES strings of molecules for comparisons.
See also
try:
_tmp_key = PromptKey()
_tmp_cutoff = PromptFloat('Similarity Cutoff', 0.4)
if _tmp_key.IsValid() and _tmp_cutoff > 0.0:
ListNew('Find Results', FindBySimilarityScoped(_tmp_key, _tmp_cutoff))
except:
pass
By SMARTS¶
try:
_tmp_query = PromptQuery()
if _tmp_query:
ListNew('Find Results', FindBySMARTSScoped(_tmp_query))
except:
pass
By Query Molecule¶
try:
_tmp_key = PromptKey()
if _tmp_key.IsValid():
ListNew('Find Results', FindByQueryScoped(_tmp_key))
except:
pass
By Title¶
try:
_tmp_title = PromptString('Title Search')
if _tmp_title:
ListNew('Find Results', FindByTitleScoped(_tmp_title))
except:
pass
Find on Disk¶
FindOnDisk()
Clear Scripting Log¶
InterpreterClear()
Extensions¶
ExtensionsEdit()
Preferences¶
PreferencesEdit()
View¶
Fullscreen¶
if AppShowGet() == 'fullscreen':
AppShowSet('normal')
else:
AppShowSet('fullscreen')
Data¶
Sort Spreadsheet¶
eval( SpreadsheetPromptSort() or 'None' )
Filter Spreadsheet¶
eval( SpreadsheetPromptFilter() or 'None' )
Create Column¶
eval( SpreadsheetPromptColumnExpression() or 'None' )
Create Empty Column¶
_tmp_col = PromptString("Column Name")
_tmp_table = DataGetTable( DatatableCurrent() )
if _tmp_table.GetColumn( _tmp_col ) > _tmp_table.NumCols():
DatatableSetExpression( DatatableCurrent(), _tmp_col, "" )
else:
PromptError("Column %s already exists"%repr(_tmp_col))
Format Columns¶
for x in SpreadsheetPromptFormat()[:-1].split(';'):
eval(x or 'None')
Organize Columns¶
SpreadsheetColumnController()
Advanced Depiction Options¶
SpreadsheetPromptGraphemeOpts()
Show Statistics¶
SpreadsheetShowStatsSet(SpreadsheetCurrent(), \
not SpreadsheetShowStatsGet(SpreadsheetCurrent()))
Style¶
Color¶
Palette¶
try:
_tmp_color = PromptColor()
ColorSetScoped(_tmp_color)
except:
pass
Unique¶
ColorUniqueScoped()
Restore¶
MoleculeColorsResetScoped()
Molecules¶
All but two of the options (Carbon and Reference) in this menu call the following function.
MoleculeColorByScoped(SCHEME)
The SCHEME parameter is assigned based on which menu option was selected according to the table below.
Amino |
‘amino’ |
Alternate Locations |
‘alt location’ |
BFactor |
‘bfactor’ |
Chain |
‘chain’ |
CPK |
‘cpk’ |
CPKNew |
‘cpknew’ |
Element |
‘element’ |
Formal Charge |
‘formal charge’ |
Group |
‘group’ |
Partial Charge |
‘partial charge’ |
Residue |
‘residue’ |
Shapely |
‘shapely’ |
The Carbon menu option calls the following function.
try:
_tmp_color = PromptColor()
AtomColorSetScoped(6, _tmp_color)
except:
pass
The Reference menu option calls the following function.
AtomColorReferenceScoped()
Surfaces¶
All of the options in this menu call the following function.
SurfaceColorByScoped(SCHEME, PARAMS)
Both the SCHEME and PARAMS parameters are assigned based on which option was selected according to the table below.
Atom Color |
‘atom’ |
‘’ |
Curvature |
‘curvature’ |
‘’ |
Distance |
‘distance’ |
‘’ |
Electrostatic |
‘electrostatics’ |
‘’ |
Hydrogen Bond Potential |
‘hydrogen bonds’ |
‘’ |
Hydrophobicity |
‘hydrophobicity’ |
‘’ |
Surface Potential |
‘potential’ |
‘’ |
The Grid menu options calls the following function.
try:
id = PromptID(['g'], False)
SurfaceColorByScoped('grid', str(id))
except:
pass
Transparency¶
All of the options in this menu call the following function.
SurfaceTransparencySetScoped(N)
The N parameter is assigned to a value between 0 and 255 based on which option was selected. A value of 255 corresponds to 0 percent transparency and a value of 0 corresponds with 100 percent transparency. The specific values used in the menu are: 255, 230, 204, 179, 153, 128, 102, 77, 61, 26, 0.
Display¶
Molecules¶
All of the options in this menu call the following function.
MoleculeStyleSetScoped(STYLE)
The STYLE parameter is assigned based on which option was selected according to the table below.
Wireframe |
‘wireframe’ |
Stick |
‘stick’ |
Ball and Stick |
‘ball and stick’ |
CPK |
‘cpk’ |
Stars |
‘stars’ |
Hidden |
‘hidden’ |
Hydrogens
All of the options in this menu call the following function.
AtomHydrogenStyleSetScoped(STYLE)
The STYLE parameter is assigned based on which option was selected according to the table below.
All |
2 |
Polar |
1 |
None |
0 |
Non-Bonded Atoms
Both of the options in this menu call the following function with the HIDE parameter assigned based on which option was selected (Show assigns HIDE to False and Hide assigns HIDE to True).
BondHideNonbondedSet(HIDE)
C-Alpha Trace
Both of the options in this menu call the following function with the DRAW parameter assigned based on which option was selected (Show assigns DRAW to True and Hide assigns DRAW to False).
DrawCATracesSetScoped(DRAW)
Ribbons
Both of the options in this menu call the following function with the DRAW parameter assigned based on which option was selected (Show} assigns DRAW to True and Hide} assigns DRAW to False).
DrawRibbonsSetScoped(DRAW)
Atom Labels
The Atom Labels submenu provides a variety of labeling of options. The “Custom…” option launches a dialog which allows the user to build up more complex and customized labels. This dialog is launched using the following Python command:
ViewerLabelDialog('Atoms')
All of the other options in the submenu all call the following Python command but with different string arguments:
AtomLabelSetScoped('')
The arguments used can be found in the table below:
Name |
‘%n’ |
Index |
‘%i’ |
Element |
‘%e’ |
Isotope |
‘%iso’ |
Type |
‘%t’ |
Integer Type |
‘%it’ |
Implicit H Count |
‘%h’ |
Map Idx |
‘%m’ |
Partial Charge |
‘%p’ |
Formal Charge |
‘%f’ |
Atom Radius |
‘%rad’ |
Residue Info |
‘%r’ |
Residue Info (CA) |
‘%car’ |
B-Factor |
‘%bf’ |
C-Alpha B-Factor |
‘%cab’ |
Degree |
‘%d’ |
Is Chiral |
‘%c’ |
Chirality |
‘%chi’ |
Hybridization |
‘%hy’ |
Has Stereo Specified |
‘%sts’ |
Is In Ring |
‘%rng’ |
OEChem Idx |
‘%oei’ |
Symmetry Class |
‘%sy’ |
Atom Comment |
‘%cm’ |
Atom Occupancy |
‘%occ’ |
MMFF Atom Type |
‘%mmff’ |
Generic Data |
‘%gd(<GENERIC_DATA_TAG>)’ |
None |
‘’ |
Bond Labels
The Bond Labels submenu provides a variety of labeling of options. The “Custom…” option launches a dialog which allows the user to build up more complex and customized labels. This dialog is launched using the following Python command:
ViewerLabelDialog('Bonds')
All of the other options in the submenu all call the following Python command but with different string arguments:
BondLabelSetScoped('')
The arguments used can be found in the table below:
Name |
‘%n’ |
Index |
‘%i’ |
Type |
‘%t’ |
Integer Type |
‘%it’ |
Order |
‘%o’ |
Length |
‘%l’ |
Is Chiral |
‘%c’ |
Chirality |
‘%chi’ |
Has Stereo Specified |
‘%sts’ |
OEChem Idx |
‘%oei’ |
Generic Data |
‘%gd(<GENERIC_DATA_TAG>)’ |
None |
‘’ |
Electrostatic Potential
Both of the options in this menu call the following function with the DRAW parameter assigned based on which option was selected (Show assigns DRAW to True and Hide assigns DRAW to False).
ShowESGridScoped(DRAW)
Molecular Surface
Both of the options in this menu call the following function with the DRAW parameter assigned based on which option was selected (Show assigns DRAW to True and Hide assigns DRAW to False).
ShowSurfaceScoped('molecular', DRAW)
Accessible Surface
Both of the options in this menu call the following function with the DRAW parameter assigned based on which option was selected (Show assigns DRAW to True and Hide assigns DRAW to False).
ShowSurfaceScoped('accessible', DRAW)
Hydrogen Bonds
Add Targets
HBondAddTargetsScoped()
Remove Targets
HBondRemoveTargetsScoped()
External Hydrogen Bonds
HBondShowExternalSet(not HBondShowExternalGet())
Internal Hydrogen Bonds
HBondShowInternalSet(not HBondShowInternalGet())
Grids¶
Solid
ContourDrawAsSurfaceSetScoped(True)
Mesh
ContourDrawAsSurfaceSetScoped(False)
Cloud
ContourDrawStyleSetScoped('cloud')
Grid Corners
GridShowCornersSet(not GridShowCornersGet())
Electrostatic
GridTypeSetScoped(1)
ET
GridTypeSetScoped(5)
FRED
GridTypeSetScoped(2)
Generic
GridTypeSetScoped(0)
Difference Map
GridTypeSetScoped(4)
Regular Map
GridTypeSetScoped(3)
Add Contour
ContourTypedAddScoped()
Delete Contour
ContourTypedRemoveScoped()
Surfaces¶
All of the options in this menu except one (Restore) call the following function.
SurfaceStyleSetScoped(STYLE)
The STYLE parameter is assigned based on which option was selected according to the table below.
Solid |
‘solid’ |
Mesh |
‘mesh’ |
Points |
‘points’ |
The Restore option calls the following function.
SurfaceRestoreScoped()
Graphics¶
Depth Cue¶
ViewerDepthcueSet(not ViewerDepthcueGet())
Slabbing¶
ViewerSlabEnableSet(not ViewerSlabEnableGet())
Mirror Slabs¶
ViewerMirrorSlabsSet(not ViewerMirrorSlabsGet())
Slab Level¶
All of the options in this menu call the following function.
ViewerSlabEnableSet(True)
ViewerSlabFarSet(50+N/2)
The N parameter is assigned to a value between 10 and 80 corresponding to the desired percent of the scene to be contained within the slabbing planes.
Render Quality¶
All of the options in the menu call the following function.
ViewerLODSet(LOD)
The LOD parameter is assigned based on which option was selected according to the table below.
Fastest |
1 |
Fast |
2 |
Good |
3 |
Better |
4 |
Best |
5 |
Presentation |
6 |
Note: Presentation quality is optimized for creating output images with a white background.
Stereo¶
Off
ViewerStereoEnableSet(False)
Splitscreen
ViewerStereoEnableSet(True)
ViewerStereoHardwareSet(False)
Stencil
ViewerStereoStyleSet(2)
ViewerStereoEnableSet(True)
Angle
try:
angle = PromptFloat('Stereo Angle')
ViewerStereoAngleSet(angle)
except:
pass
Separation
try:
sep = PromptFloat('Stereo Separation')
ViewerStereoSeparationSet(sep)
except:
pass
Cross-Eyed
ViewerStereoCrossEyedSet(not ViewerStereoCrossEyedGet())
Symmetry¶
Edit Cell¶
XRayEditCrystalParams(ActiveID())
Show Unit Cell¶
DrawUnitCellSet(OEInternal.MenuVal)
Show Symmetry¶
DrawSymmetrySet(OEInternal.MenuVal)
Realize Symmetry In Cell¶
DoSymmetryRealize(True)
Realize Symmetry¶
DoSymmetryRealize(False)
Symmetry Radius¶
SymmetryRadiusSet(PromptFloat('Symmetry radius',SymmetryRadiusGet()))
Symmetry Operators¶
No Symmetry Color¶
SymmetryColorHelper(0,OEInternal.MenuVal)
Single Symmetry Color¶
SymmetryColorHelper(1,OEInternal.MenuVal)
Color By Operator¶
SymmetryColorHelper(2,OEInternal.MenuVal)
Unique Color¶
SymmetryColorHelper(3,OEInternal.MenuVal)
Bookmarks¶
Add¶
try:
_tmp_name = PromptString('Bookmark name', 'Bookmark ' + str(1 + len(Bookmarks())))
if _tmp_name:
BookmarkSave(_tmp_name)
except:
pass
Organize¶
exec(BookmarkOrganizeDialog())
Animated¶
ViewerBookmarksSetAnimated(not ViewerBookmarksGetAnimated())
Select¶
The Select menu provides a number of ways to select groups of atoms for use in various tasks, like coloring atoms, creating surfaces, etc. Most selection operations involve only molecules which are visible in the 3D Window. The Select menu also provides the ability to name sets of atoms and store them for later retrieval. These sets can be combined with the current selection through logical operations, allowing a high degree of flexibility in creating selection sets.
Clear¶
Clears all selected atoms and bonds.
All¶
Selects all visible atoms and bonds.
Invert¶
Inverts the current selection with respect to visible atoms.
Protein¶
Operations in this menu are protein-centric.
Backbone¶
Selects backbone atoms only.
Sidechains¶
Selects side chain atoms.
C-Alphas¶
Selects alpha carbon atoms in a protein.
Residue #…¶
Allows selection of atoms by residue number. A dialog will prompt for residue numbers and chain ID’s to include in the selection.
Residue Type…¶
Selects standard amino and nucleic acid residues by type. A dialog will prompt for residue names to be included in the selection.
Complete Residues¶
Selects all atoms in any residue that has at least one atom selected.
Zero Occupancy¶
Selects all atoms with an occupancy value of zero.
Partial Occupancy¶
Selects all atoms with an occupancy value less than 1.0.
Alt Locations¶
Selects all residues with alternate location specifiers.
Waters¶
Selects all water molecules.
Atom Numbers…¶
Selects atoms by their OEChem index value. A dialog will prompt for the atom numbers to include in the selection.
By Distance…¶
Selects residues within a specified distance of the currently selected atoms. A dialog will appear to allow the distance to be specified with a slider. A checkbox in this dialog provides an option to exclude the originally selected atoms from the final selection.
Heteroatoms¶
Selects all atoms that are not carbon or hydrogen.
Charged¶
Selects all atoms with a non-zero formal charge.
SMARTS Pattern…¶
Selects all atoms matching a SMARTS query pattern. A dialog will prompt for the SMARTS pattern to use.
Expression…¶
Selects atoms using an expression from VIDA’s selection language. A dialog will prompt for the expression to use.
Store¶
These options allow the storage of the current selection into a new or existing atom set.
New Set…¶
Creates a new atom set after prompting for a set name.
Into <Set_Name>¶
Replaces the contents of the named set Set_Name with the current selection.
Combine¶
Combines the current selection with named sets.
Include¶
Adds the atoms from the named set to the current selection (a logical OR operation).
Exclude¶
Removes atoms from the named set from the current selection (logical NOT operation).
Intersect¶
Selects the atoms that are in both the named set and the current selection (logical AND operation).
Delete Set¶
Deletes the named set. This does not delete any atoms.
Hide Selected¶
Turns off the visibility of all selected atoms.
Hide Unselected¶
Turns off the visibility of all unselected atoms in visible molecules.
Window¶
Main Window¶
2D Viewer¶
if OEInternal.MenuVal:
AppMainWindowSet('2D Viewer')
3D Viewer¶
if OEInternal.MenuVal:
AppMainWindowSet('3D Viewer')
Spreadsheet¶
if OEInternal.MenuVal:
AppMainWindowSet('Spreadsheet')
2D Preview¶
WindowVisibleSet('2D Preview')
2D Viewer¶
WindowVisibleSet('2D Viewer')
3D Viewer¶
WindowVisibleSet('3D Viewer')
List Window¶
WindowVisibleSet('List Window')
Process Manager¶
WindowVisibleSet('Process Manager')
Scripting Window¶
WindowVisibleSet('Scripting Window')
Spreadsheet¶
WindowVisibleSet('Spreadsheet')
Style Control¶
WindowVisibleSet('Style Control')
Help¶
About¶
About()
Documentation¶
All of the items in this menu open a specific document. The script to open the document can be found below:
AppOpenUrl('file:' + AppDocDir() + FILE_PATH)
The actual document path that is used is:
User Manual (HTML) <https://docs.eyesopen.com/applications/vida/index.html>_.
License¶
Open¶
AppOpenUrl('file:' + AppLicenseFile())
Set¶
AppLicenseUpdate(True)
Update¶
AppLicenseUpdate(False)
Open Examples Directory¶
AppOpenUrl('file:' + AppExamplesDir())
Open User Directory¶
AppOpenUrl('file:' + AppUserDir())
File Bug Report¶
AppOpenUrl('mailto:support@eyesopen.com')