Package schrodinger :: Package application :: Package desmond :: Module maestro
[hide private]
[frames] | no frames]

Module maestro

A collection of numerous useful functions and classes for working with Maestro.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  Entry
A class for representing an entry in the Project Table.
  EntryGroup
A class for representing an entry group in the Project Table
  Workspace
A class for representing the Workspace.
Functions [hide private]
 
get_entry_id(entry_name)
Returns the entry ID of the entry whose entry name being 'entry_name', or None if there is no such an entry.
 
duplicate_entry(entry_id)
Makes a copy of an entry, and returns the ID of the copy entry (i.e., the new entry).
 
get_entryname_prefix(suggested_prefix='')
Returns a string to be used as a prefix of entry names so that the resulted entry name is guaranteed to be different from those existing at the time of getting this prefix.
 
_draw_arrow_callback()
A callback function to be registered by using schrodinger.maestro.workspace_draw_function_add.
 
begin_drawing()
Turns on and initializes the drawing mechanism.
 
end_drawing()
Turns off the drawing mechanism and cleans up.
 
draw_arrow(atom_from, atom_to, color='green', radius=0.15, transparency=0.0, resolution=36)
Draws an arrowed line from 'atom_from' to 'atom_to'.
 
draw_1_arrow(atom_from, atom_to, color='green', radius=0.15, transparency=0.5, resolution=36)
Similar to draw_arrow.
 
clean_drawing()
Erases all drawings.
 
noautofit_call(callback)
Supresses autofit preference when calling to 'callback'.
 
autoprojectsync_call(callback)
Temporarily sets 'projectsync' preference to 'auto' before calling to 'callback'.
 
nofitgrow_call(callback)
Temporarily sets 'fitgrow' preference to 'false' before calling to 'callback'.
 
depreference_call(callback)
 
_run()
Variables [hide private]
  _version = '$Revision: 1.29 $'
  mae = None
hash(x)
  ARROW_GROUP = None
hash(x)
  ARROW_GROUP_refcount = 0
  __package__ = 'schrodinger.application.desmond'
Function Details [hide private]

get_entry_id(entry_name)

 

Returns the entry ID of the entry whose entry name being 'entry_name', or None if there is no such an entry.

Note that if there are more than one entries have the same name of 'entry_name', the entry id of the first one will be returned.

duplicate_entry(entry_id)

 

Makes a copy of an entry, and returns the ID of the copy entry (i.e., the new entry).

Parameters:
  • entry_id - The ID of the entry to be copied. If this entry does not exist, nothing will be copied, and None will be returned.

get_entryname_prefix(suggested_prefix='')

 

Returns a string to be used as a prefix of entry names so that the resulted entry name is guaranteed to be different from those existing at the time of getting this prefix.

Note a side-effect of this function: the row selection on the project table will be changed.

Parameters:
  • suggested_prefix - A string from which the returned prefix will be derived.

_draw_arrow_callback()

 

A callback function to be registered by using schrodinger.maestro.workspace_draw_function_add. The registration is done by the begin_drawing function below.

begin_drawing()

 

Turns on and initializes the drawing mechanism. This should be called before any 'draw_*' function is called.

end_drawing()

 

Turns off the drawing mechanism and cleans up.

This should be called after any drawing is actually done. Note that drawing is NOT done immediately after the call to a 'draw_*' function, it is delayed until the next round of update of the Workspace. This means if you call this function too early, your drawing will not be taken to the Workspace at all.

draw_arrow(atom_from, atom_to, color='green', radius=0.15, transparency=0.0, resolution=36)

 

Draws an arrowed line from 'atom_from' to 'atom_to'.

Parameters:
  • atom_from - The source atom. Should be an atom index or schrodinger.structure._StructureAtom instance.' Must be valid for the current state of the Workspace.
  • atom_to - The destination atom. Should be an atom index or schrodinger.structure._StructureAtom instance.' Must be valid for the current state of the Workspace.
  • radius - The radius of the arrow in Angstroms.
  • transparency - Transparency, in the range 0.0 (none) to 1.0 (invisible).
  • resolution - Valid range of 4 to 50.

draw_1_arrow(atom_from, atom_to, color='green', radius=0.15, transparency=0.5, resolution=36)

 

Similar to draw_arrow. Draws only this arrow; the other arrows (if any) will be erased.

noautofit_call(callback)

 

Supresses autofit preference when calling to 'callback'. The original preference is recovered after calling to 'callback'.

autoprojectsync_call(callback)

 

Temporarily sets 'projectsync' preference to 'auto' before calling to 'callback'. The original preference is recovered after calling to 'callback'.

nofitgrow_call(callback)

 

Temporarily sets 'fitgrow' preference to 'false' before calling to 'callback'. The original preference is recovered after calling to 'callback'.