Trees | Indices | Help |
|
---|
|
object --+ | ProjectRow
ProjectRow allows access to the structure and properties of an entry in the project. It is an access mechanism and not a completely self-contained object - project row objects should be treated as transient, they may become invalid by subsequent project operations. This class represents a project entry. Each row is linked to one entry, but row != entry There are 3 ways to identify a row: ProjectRow.index: Internal project order, entry in project - NOT sorted and NOT same as entry_id. ProjectRow.row_number: Table row position - changes when table is sorted ProjectRow.entry_id: ID of the entry represented by this row, never changes. Normally it won't be necessary to create an explicit ProjectRow object, one will be returned by indexing into a ProjectTable object
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
surface.Surface |
|
||
|
|||
|
|||
Inherited from |
|
|||
doc =
|
|
|||
structure This attribute is obsolete. |
|||
title The title of the entry |
|||
index Internal Project index of the row. |
|||
row_number This is the Project Table row number, as it appears to the user in Maestro. |
|||
entry_id Entry ID of the row |
|||
group EntryGroup for the row |
|||
in_workspace Inclusion state of the entry (NOT_IN_WORKSPACE/IN_WORKSPACE/LOCKED_IN_WORKSPACE) WARNING: This property should NOT be treated as a boolean. |
|||
is_selected Whether the entry is selected |
|||
read_only Whether the entry is read only or not |
|||
deletable Whether the entry is deletable or not |
|||
cms_structure_reader Return StructureReader for associated CMS file or EmptyIterator if there is no associated file |
|||
cms_file Return associated CMS file or None if there is no associated file |
|||
surfaces Return an interator to the surface objects available for this entry |
|||
surface.SurfaceDict |
surface A dictionary of all surfaces for this row. |
||
|
Construct a ProjectRow for the given Project instance based on an entry index.
|
Return string representation
|
@return: The entry's structure @rtype: L{structure.Structure} @param props: Whether the accociated PT properties are included in the returned structure (default). @type props: bool @param copy: Whether to return a copy of the PT structure (default). If set to False, returns the original CT for the entry. Such use should in general be avoided, except as an optimization. NOTE: With copy=False, when the returned CT is modified, the changes are instantly propagated to the PT, but not the Workspace, and changes to properties do not propagate. Unless it's certain that properties didn't change, and that the structure is not included in the Workspace, any changes to it should be followed up by a call to setStructure(). WARNING: The current default (copy=True) is to make a duplicate of the entry's structure. These will be marked for garbage collection once they go out of scope in the calling code, but if, for example, you are in a loop your memory usage will grow until the loop is exited (and it may even take a while for it to drop since garbage collection is not necessarily immediate). This can cause large memory usage if, for example, you are iterating over a large number entries. In some cases you may want to explicitly delete the returned Structure. For example, in a loop iterating over a large number of entries you may want to delete the Structure while still in the loop (after you're done processing the Structure) to prevent memory bloat. |
Set the structure of the entry to the specified structure. If the entry is included in the Workspace, the Workspace CT will be updated accordingly. Arguments: struct (required) - Set the entry to this Structure object copy (optional, default True) - If True, a copy of the Structure (CT) is made and that copy is used to set the entry. If False, the original Structure, struct, is placed into the project table. Doing this hands off control of struct and you should no longer use struct. props (option, default True) - If True, update properties in the entry. If False, properties are ignored. |
Return property value of C{prop} corresponding to ProjectRow object. Return None if the property doesn't exist. C{prop} acts as the key. For example, title = proj_row['Title'] |
Set the C{value} for C{prop} in the ProjectRow object. C{prop} acts as the key of the property. For example, proj_row['Title'] = "Karthik" |
Delete the property C{prop} from ProjectRow object. In addition, this clears the cell in the project table. For example, del proj_row["Title"] |
Obsolete. Use ProjectRow.in_workspace property instead. |
The index property is not the same as Project Table row. This property indicates what order entries were added to the project. This can change when an entry in the project is deleted. |
If there is no associated cms file, then we return an empty iterator. This allows you to always just write a loop: for i in cms_structure_reader: and avoid checking if cms_structure_reader exists. If it does not, the loop will do nothing. If there is an associated cms file, then we return a StructureReader that allows one to retrieve the data by iterating. |
Returns the file instead of the reader. This is more convenient to use than the reader in some cases. If there is no associated cms file, then we return None. |
Create a new molecular surface for this row
|
Move this entry to group. If group does not exist it will be created.
|
|
doc
|
|
structureThis attribute is obsolete. Please use ProjectRow.getStructure() and ProjectRow.setStructure() instead. Reference for the entry Structure. Associated properties are not included. Properties can be accessed directly from the project via getPropertyNames() If you wish to update a structure in the project, you may work on that structure directly. Do something like: for row in pt.selected_rows: for atom in row.structure.atom atom.color = 44 #blue You must be careful that the project entry you modify is not also currently included in the Workspace. When that entry is excluded from the Workspace, its updated contents will be placed into the entry in the project, potentially overwriting any direct changes you made to the project entry. If you want to pass the returned structure to another operation, make a copy of it first as follows: st = row.structure.copy() The Structure returned by row.structure will be invalid after the entry is edited by Maestro or after setting row.structure to another structure. WARNING: If you are working with large numbers of entries, you may experience high memory usage. This typically happens when retrieving structures while iterating over large number of entries, but will increase for every structure you retrieve. So if your cumulative total of retrieved structurs is large then your memory foot print is likely to be large as well. This is because the returned structures are configured not to be garbage collected. You may wish to explicitly delete each Structure once you've finished processing it in order to minimize memory usage.
|
indexInternal Project index of the row. This is different from Project Table row number or from entry ID.
|
row_numberThis is the Project Table row number, as it appears to the user in Maestro. It is different from the internal row index.
|
entry_idEntry ID of the row
|
groupEntryGroup for the row
|
in_workspaceInclusion state of the entry (NOT_IN_WORKSPACE/IN_WORKSPACE/LOCKED_IN_WORKSPACE) WARNING: This property should NOT be treated as a boolean.
|
is_selectedWhether the entry is selected
|
read_onlyWhether the entry is read only or not
|
deletableWhether the entry is deletable or not
|
cms_structure_readerReturn StructureReader for associated CMS file or EmptyIterator if there is no associated file
|
cms_fileReturn associated CMS file or None if there is no associated file
|
surfacesReturn an interator to the surface objects available for this entry
|
surfaceA dictionary of all surfaces for this row. Keys are surface names and values are surface.Surface objects.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Oct 26 00:59:57 2016 | http://epydoc.sourceforge.net |