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

Class Entry

object --+
         |
        Entry

A class for representing an entry in the Project Table.

Instance Methods [hide private]
 
__init__(self, ct=None, entry_name=None, entry_id=None)
Creates an 'Entry' object using a given CT ('ct') or an entry ID.
 
dtor(self)
Deletes this entry (including removing it from the Project Table.).
 
set_readonly(self, readonly=True)
Sets this entry to be readonly if 'readonly' is True.
 
set_deletable(self, deletable=True)
Sets this entry to be deletable if 'deletable' is True.
 
show(self, should_show=True)
Shows the CT in Maestro workspace if 'should_show' is True, hides it if False.
 
show_only(self, should_show=True)
Shows the CT in Maestro workspace and hides other CTs if 'should_show' is True, hides it (not others) if False.
 
is_shown(self)
Returns True if this entry is already included into the Workspace.
 
_commit(self)
 
commit(self)
Commits any belonging change in the current workspace to this entry.
 
rename(self, name)
Changes the entry name to 'name'.
 
get_ct(self, copy=False)
Returns a 'Structure' object of the CT of this entry.
 
write(self, fname, mode='')
Writes the CT 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, ct=None, entry_name=None, entry_id=None)
(Constructor)

 

Creates an 'Entry' object using a given CT ('ct') or an entry ID.

Public attributes:

  • name - The entry name
  • id - The entry ID
Parameters:
  • ct - If given, a new entry will be created into the Project Table. In this case, the name of the entry can optionally be given via the 'entry_name' argument. If not given, a random entry name will be applied.
  • entry_id - If 'ct' is not given but 'entry_id' is given, an 'Entry' object will be created for the existing entry. Note that if 'ct' is not None, then any value for 'entry_id' will be ignored.
Overrides: object.__init__

set_readonly(self, readonly=True)

 

Sets this entry to be readonly if 'readonly' is True. If 'readonly' is False, sets this entry to be not readonly.

set_deletable(self, deletable=True)

 

Sets this entry to be deletable if 'deletable' is True. If 'deletable' is False, sets this entry to be undeletable.

write(self, fname, mode='')

 

Writes the CT to a file, whose name is given by 'fname'. The format of the file is determined by the extension 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.