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

Class EntryGroup

object --+
         |
        EntryGroup

A class for representing an entry group in the Project Table

Instance Methods [hide private]
 
__init__(self, struc, group_name=None)
Creates an entry group with a given list of CTs (via 'struc').
 
dtor(self)
Deletes all entries in this entry-group (including removing them from the Project Table).
 
add(self, e)
Adds an entry into this entry-group.
 
duplicate(self, entry)
Duplicates an entry (or entries), and the new copy will be put in this entry-group.
 
delete(self, entry)
Deletes one or more entries from the Project Table.
 
set_readonly(self, readonly=True)
Sets all entries in this group to be readonly if 'readonly' is True.
 
set_deletable(self, deletable=True)
Sets all entries in this group to be deletable if 'deletable' is True.
 
is_shown(self)
Returns True if all entries in this group are included into the Workspace, False otherwise.
 
is_shown_only(self)
Returns True if all entries in this group and only entries in this group are included into the Workspace.
 
show(self, should_show=True)
Shows all entries in this group onto Maestro workspace if 'should_show' is True, hides them if it is False.
 
show_only(self, should_show=True)
Shows all entries in this group onto Maestro workspace and hides other entries if 'should_show' is True, hides them (not others) if False.
 
commit(self)
Commits any belonging changes in the Workspace to their corresponding entries that are in this entry-group.
 
get_ct(self, copy=False)
Returns a list of 'Structure' objects of the CTs of this group.
 
get_entry(self, entry_id)
Returns an 'Entry' object whose entry ID is 'entry_id', or None if the entry is not in this group.
 
write(self, fname, mode='')
Writes all CTs to a file, whose name is given by 'fname'.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, struc, group_name=None)
(Constructor)

 

Creates an entry group with a given list of CTs (via 'struc'). The group name will be 'group_name'. If 'group_name' is None, a random name will be applied.

Parameters:
Overrides: object.__init__

add(self, e)

 

Adds an entry into this entry-group.

Parameters:
  • e - Must be either an Entry object or a CT. In the latter case, an Entry object will be created based on the CT.

duplicate(self, entry)

 

Duplicates an entry (or entries), and the new copy will be put in this entry-group.

Note that 'entry' must be an Entry object or a list of Entry objects and that the entry or entries must be currently in this entry-group, otherwise this function has no effect for the outside entry or entries.

What will be returned?

  • If 'entry' is a single 'Entry' object, then an 'Entry' object corresponding to the copied entry will be returned, or if this function has not done anything, None will be returned.
  • If 'entry' is a list of 'Entry' object, then a list of 'Entry' objects corresponding to the copied entries will be returned, or if nothing has been copied, None will be returned.

delete(self, entry)

 

Deletes one or more entries from the Project Table.

Deletion happens only when the entry is in this entry group.

Parameters:
  • entry - Can be either a single Entry object or a list of Entry objects.

set_readonly(self, readonly=True)

 

Sets all entries in this group to be readonly if 'readonly' is True. If 'readonly' is False, sets all entries in this group to be not readonly.

set_deletable(self, deletable=True)

 

Sets all entries in this group to be deletable if 'deletable' is True. If 'deletable' is False, sets all entries in this group to be not deletable.

Will silenty ignore entries of this group which are already deleted.

write(self, fname, mode='')

 

Writes all CTs to a file, whose name is given by 'fname'.

The format of the file is determined by the extensiion name of 'fname'.

Parameters:
  • mode - If set to 'a', then instead of overwriting this function will append the structure to the end of the file.