Source code for schrodinger.trajectory.trajectory_gui_dir.display_settings_data
from enum import IntFlag
[docs]class DisplayOnly(IntFlag):
"""
Holds enums for 'Display only' options.
"""
CURRENT = 0,
MATCHING = 1
DEFAULT_RADIUS = 5
MIN_RADIUS = 3
MAX_RADIUS = 8
[docs]class DisplaySettingsData:
"""
This class holds all the display settings related to trajectory player or
trajectory snapshot panel.
"""
[docs] def __init__(self):
"""
Default settings of each member
"""
# ha stands for 'Hide Atoms'
self.ha_beyond_binding_site = False
self.ha_solvents_only = False
self.ha_nonpolar_hydrogens = True
self.ha_protein_only = True
self.binding_site_radius = DEFAULT_RADIUS
self.display_only = False
self.display_only_option = DisplayOnly.CURRENT
self.matching_asl = ''
def __eq__(self, other):
"""
:param other: An object to compared with self.
:type other: DisplaySettingsData
:return: True if other is same as self.
:rtype: bool
"""
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
else:
return False
def __ne__(self, other):
"""
:param other: An object to compared with self.
:type other: DisplaySettingsData
:return: True if other is not same as self.
:rtype: bool
"""
return not self.__eq__(other)