schrodinger.project_utils.project_utils module¶
-
schrodinger.project_utils.project_utils.set_entry_pinned(entry_id, pin)¶ Pin or unpin an entry from the workspace.
Parameters: - entry_id (str) – the entry ID of a row in the project
- pin (bool) – whether to pin or unpin the specified entry to the workspace
-
schrodinger.project_utils.project_utils.set_entry_included(entry_id, include)¶ For the specified entry, either include it in or exclude it from the workspace. If the entry is pinned and
includeisTrue, keep the entry pinned. If the entry is pinned andincludeisFalse, exclude the entry anyway.Parameters: - entry_id (str) – the entry ID of a row in the project
- include (bool) – whether to include (
True) or exclude (False)
-
schrodinger.project_utils.project_utils.entry_is_included(entry_id)¶ Return whether the specified entry is included in the workspace.
Parameters: entry_id (str) – the entry ID of a row in the project Returns: whether the entry is included in the workspace Return type: bool
-
schrodinger.project_utils.project_utils.set_entry_locked(entry_id, lock)¶ Set the supplied project table entry to be “locked” or “unlocked.”
These operations are grouped because they are both performed when locking an entry in the visual interface.
Parameters: - entry_id (str) – the entry ID of a row in the project
- lock (bool) – whether to lock or unlock the specified entry
-
schrodinger.project_utils.project_utils.entry_is_locked(entry_id)¶ Return whether the supplied project entry is read-only and not deletable.
These properties are both tested because both values are set when locking an entry in the visual interface.
Parameters: entry_id (str) – the entry ID of a row in the project Returns: whether the entry is locked Return type: bool
-
schrodinger.project_utils.project_utils.remove_entries(entry_ids)¶ Cleanly remove the specified entries from the project. If an entry cannot be found, do not raise an exception.
Parameters: entry_id (list(str)) – a list of entry IDs
-
schrodinger.project_utils.project_utils.create_subgroup(entry_ids, group_name, subgroup_title)¶ Create a subgroup of the specified project group, and place the supplied entries into it.
Parameters: - entry_ids (list(str)) – entry IDs for project entries to be placed into the new subgroup
- group_name (str) – name of the group to which this new subgroup will belong
- subgroup_title (str) – the title of the new subgroup
Returns: the new group object
Return type:
-
schrodinger.project_utils.project_utils.move_group(group, row_number)¶ Move all of the entries in the specified group to be below a specified row number in the project, while still retaining their group identity.
Parameters: - group (project.EntryGroup) – a non-empty entry group
- row_number (int) – the number of a row in the project: one that designates order within the project, not an entry ID
-
schrodinger.project_utils.project_utils.preserve_selection(pt)¶ Save the selection state of the project, then restore it on exit.
Parameters: pt (project.Project) – the project instance
-
schrodinger.project_utils.project_utils.unlock_entries(entry_ids, update_pt=True)¶ Temporarily unlock the specified entries, if they are locked. Otherwise, do not modify their lock state. Suppress signals from the project model during this process.
Parameters: - entry_ids (list(str)) – a list of entry IDs
- update_pt (bool) – whether to update the project table on exiting the context environment