schrodinger.trajectory.trajectory_gui_dir.frame_structure_exporter module

class schrodinger.trajectory.trajectory_gui_dir.frame_structure_exporter.FrameStructureExporter(player_obj, export_mode: schrodinger.trajectory.trajectory_gui_dir.export_structure_enums.ExportMode, parent: PyQt5.QtWidgets.QWidget)

Bases: object

This class provides ability to export structures in the file. Client can export trajectory structures in three ways 1. Export current frame. 2. Export current frame full system ct and all its components. 3. Export set of frames specified in the range.

EXPORT_TRJ_FILE_PREF = 'TRJ_PLAYER_EXPORT_TRJ_FILE'
__init__(player_obj, export_mode: schrodinger.trajectory.trajectory_gui_dir.export_structure_enums.ExportMode, parent: PyQt5.QtWidgets.QWidget)
Parameters
  • player_obj (TrajectoryPlayer) – Trajectory player toolbar object.

  • export_mode – Indicates whether exports need to be done in

snapshot mode or player mode.

Parameters

parent – Parent widget (used to set export structures dialog parent)

clearData()

Clean all temporary data members.

allInRange(start_frame, end_frame, step_size, atoms_asl, writer)

Export all structures specified in the range including start and end frame if step size is 1. Otherwise, export frames in the range based on step size, but last frame is need not to be included.

Parameters
  • start_frame (int) – Starting frame in the range.

  • end_frame (int) – End frame in the range.

  • step_size (int) – Step size to be used when stepping in the range.

  • atoms_asl (str) – Set of atoms to be exported from a given frame.

  • writer (structure.StructureWriter) – Write object which writes structures in the file.

Return type

bool

Returns

Whether frame is exported successfully.

currentFrameOnly(frame, atoms_asl, writer)

Export only frame number associated structure.

Parameters
  • frame (int) – Frame number of structure to be exported.

  • atoms_asl (str) – Set of atoms to be exported from a given frame.

  • writer (structure.StructureWriter) – Write object which writes structures in the file.

Return type

bool

Returns

Whether frame is exported successfully.

getUpdatedFrameStructure(frame: int)
Parameters

frame – Frame number of structure to be exported.

Returns

Update frame structure.

Return type

structure.Structure

getUpdatedCMSModelCopy(frame)
currentFrameWithComponentStructures(frame, writer)

Export current frame along with its component structures.

Parameters
  • frame (int) – Frame number of structure to be exported.

  • writer (structure.StructureWriter) – Write object which writes structures in the file.

Return type

bool

Returns

Whether frame is exported successfully.

showExportStructuresDlg()

Show export structure dialog and collect necessary input data.

showExportSnapshotStructuresDlg(all_frames: list, selected_frames: list, use_trajectory_settings: bool, display_settings_manager: schrodinger.trajectory.trajectory_gui_dir.display_settings_manager.DisplaySettingsManager, cooltowarmcolor_map)

Show export snapshot structure dialog and collect necessary input data.

Parameters
  • all_frames – List of all frames listed in the snapshot panel.

  • selected_frames – List of all selected frames in the snapshot

panel.

Parameters

use_trajectory_settings – True if trajectory settings should be

used exporting a frame.

Parameters

display_settings_manager – Valid display setting manager to apply

the display settings, otherwise None

Parameters

cooltowarmcolor_map – Instance of cool to warm color map

object. It is used to apply color on exported frames. It will be None if cool to warm color gradient should not be applied. :type: maestro_ui.CoolToWarmColorMap

exportTrajectory()

Export trajectory to file.