Esempio n. 1
0
# -----------------------------------------------------------------------------
#
from chimera.extension import EMO, manager


# -----------------------------------------------------------------------------
#
class SAXS_EMO(EMO):
    def name(self):
        return 'Small-Angle X-Ray Profile'

    def description(self):
        return 'Compute small angle x-ray scattering profile'

    def categories(self):
        return ['Higher-Order Structure']

    def icon(self):
        return None

    def activate(self):
        self.module('gui').show_saxs_dialog()
        return None


# -----------------------------------------------------------------------------
#
manager.registerExtension(SAXS_EMO(__file__))
from chimera.extension import EMO, manager


# -----------------------------------------------------------------------------
#
class ModelZ_Dialog_EMO(EMO):
    def name(self):
        return 'ecsudraft'

    def description(self):
        return "a draft for ecsu validation tool"

    def categories(self):
        return ['Utilities']

    def icon(self):
        return self.path('logo.jpg')

    def activate(self):
        # self.module('volumedialog').show_volume_dialog()
        d = self.module('backbone').colorBB()
        return None


# -----------------------------------------------------------------------------
# Register dialogs and menu entry.
#
manager.registerExtension(ModelZ_Dialog_EMO(__file__))
from chimera.extension import EMO, manager


# -----------------------------------------------------------------------------
#
class Hide_Dust_EMO(EMO):
    def name(self):
        return 'Hide Dust'

    def description(self):
        return 'Hide small surface pieces'

    def categories(self):
        return ['Volume Data']

    def icon(self):
        return None

    def activate(self):
        self.module('gui').show_dust_dialog()
        return None


# -----------------------------------------------------------------------------
#
manager.registerExtension(Hide_Dust_EMO(__file__))
Esempio n. 4
0
#
class BioMovie_EMO(EMO):
    def name(self):
        return 'BioMovie'

    def description(self):
        return self.categoryDescriptions()['Utilities']

    def categories(self):
        return self.categoryDescriptions().keys()

    def categoryDescriptions(self):
        # since we want to use specialized descriptions for certain categories...
        return {
            'Utilities': 'Run movie script',
        }

    def icon(self):
        return None  #self.path('volseg.png')

    def activate(self):
        # self.module('volumedialog').show_volume_dialog()
        d = self.module('biomovie').show_dialog()
        return None


# -----------------------------------------------------------------------------
# Register dialogs and menu entry.
#
manager.registerExtension(BioMovie_EMO(__file__))
Esempio n. 5
0
from chimera.extension import EMO, manager


class XlinkAnalyzer_EMO(EMO):
    def name(self):
        return 'Xlink Analyzer'

    def description(self):
        return 'Xlink Analyzer modeling visualization'

    def categories(self):
        return ['Utilities']

    def icon(self):
        return None

    def activate(self):
        self.module('gui').show_dialog()
        return None


manager.registerExtension(XlinkAnalyzer_EMO(__file__))
Esempio n. 6
0
from  chimera.extension import EMO, manager

# -----------------------------------------------------------------------------
#
class MapQ_Dialog_EMO ( EMO ):

  def name(self):
    return 'MapQ'
  def description(self):
    return self.categoryDescriptions()['Volume Data']
  def categories(self):
    return self.categoryDescriptions().keys()
  def categoryDescriptions(self):
    # since we want to use specialized descriptions for certain categories...
    return {
      'Volume Data': 'Evaluate map & model',
    }
  def icon(self):
    return None #self.path('volseg.png')
  def activate(self):
    # self.module('volumedialog').show_volume_dialog()
    d = self.module('mapq').show_dialog()
    return None

# -----------------------------------------------------------------------------
# Register dialogs and menu entry.
#
manager.registerExtension ( MapQ_Dialog_EMO ( __file__ ) )
		return 'Electrostatic Surface Coloring'
	def description(self):
		return 'Color surface using an electrostatic potential data file'
	def categories(self):
		return ['Surface/Binding Analysis']
	def icon(self):
		return self.path('gumball.png')
	def activate(self):
		m = self.module('gui')
		d = m.show_surface_color_dialog()
		d.use_electrostatics_colormap()
		return None

# -----------------------------------------------------------------------------
#
manager.registerExtension(Surface_Color_EMO(__file__))
manager.registerExtension(Electrostatic_Surface_Color_EMO(__file__))

# -----------------------------------------------------------------------------
#
def register_file_types():

  from VolumeData import file_types, electrostatics_types
  ftypes = filter(lambda ft: ft[1] in electrostatics_types, file_types)
  for descrip, name, prefix_list, suffix_list, batch in ftypes:
    def open_cb(path, ftype=name):
      from VolumeViewer import open_volume_file
      vlist = open_volume_file(path, ftype, open_models = False,
			       show_data = False, show_dialog = False)
      import chimera
      if len(vlist) > 0 and not chimera.nogui:
    def description(self):
        return 'Calculates mean, standard deviation, and root mean square for volume data'

    def categories(self):
        return ['Volume Data']

    def icon(self):
        return None

    def activate(self):
        self.module().show_volume_statistics()
        return None


# -----------------------------------------------------------------------------
#
manager.registerExtension(Volume_Statistics_EMO(__file__))


# -----------------------------------------------------------------------------
#
def show_stats():
    from VolumeStatistics import show_volume_statistics
    show_volume_statistics(show_reply_log=False)


from Accelerators import add_accelerator
add_accelerator('md', 'Print mean and standard deviation of volume data',
                show_stats)
# -----------------------------------------------------------------------------
#
from chimera.extension import EMO, manager

# -----------------------------------------------------------------------------
#
class SAXS_EMO(EMO):

    def name(self):
        return 'Small-Angle X-Ray Profile'
    def description(self):
        return 'Compute small angle x-ray scattering profile'
    def categories(self):
        return ['Higher-Order Structure']
    def icon(self):
        return None
    def activate(self):
        self.module('gui').show_saxs_dialog()
        return None

# -----------------------------------------------------------------------------
#
manager.registerExtension(SAXS_EMO(__file__))
Esempio n. 10
0
from chimera.extension import EMO, manager


class CHEWD_EMO(EMO):
    def name(self):
        return 'CHEWD'

    def description(self):
        return 'Molecular Surface Viewer for the residues wise energies'

    def categories(self):
        return ['Utilities']

    def icon(self):
        return None

    def activate(self):
        from chimera.dialogs import display
        display(self.module('gui').CHEWDDialog.name)
        return None


manager.registerExtension(CHEWD_EMO(__file__))
#
from chimera.extension import EMO, manager
class Volume_Filter_EMO(EMO):
  def name(self):
    return 'Volume Filter'
  def description(self):
    return 'Filter volume data'
  def categories(self):
    return ['Volume Data']
  def icon(self):
    return None
  def activate(self):
    self.module('gui').show_volume_filter_dialog()
    return None

manager.registerExtension(Volume_Filter_EMO(__file__))

# -----------------------------------------------------------------------------
# Register vop command.
#
def vop_cmd(cmdname, args):
    from VolumeFilter.vopcommand import vop_command
    vop_command(cmdname, args)
from Midas.midas_text import addCommand
addCommand('vop', vop_cmd, help = True)

# ---------------------------------------------------------------------------
# Register keyboard shortcuts for filtering.
#
def fourier():
  from VolumeFilter import fourier_transform
from chimera.extension import EMO, manager

# -----------------------------------------------------------------------------
#
class Hide_Dust_EMO(EMO):

	def name(self):
		return 'Hide Dust'
	def description(self):
		return 'Hide small surface pieces'
	def categories(self):
		return ['Volume Data']
	def icon(self):
		return None
	def activate(self):
		self.module('gui').show_dust_dialog()
		return None

# -----------------------------------------------------------------------------
#
manager.registerExtension(Hide_Dust_EMO(__file__))
Esempio n. 13
0
            'Volume Data': 'Fit structures into segmented regions',
        }

    def icon(self):
        return self.path('fitseg.png')

    def activate(self):
        # self.module('volumedialog').show_volume_dialog()
        d = self.module('fit_dialog').show_fit_segments_dialog()
        return None


# -----------------------------------------------------------------------------
# Register dialogs and menu entry.
#
manager.registerExtension(Fit_Segments_EMO(__file__))
manager.registerExtension(Segment_Map_EMO(__file__))


# -----------------------------------------------------------------------------
# Register segmentation file reader.
#
def open_seg(path):
    from Segger import segment_dialog as sd
    d = sd.show_volume_segmentation_dialog()
    d.OpenSegFiles([(path, 'Segmentation')])
    return []


import chimera
fi = chimera.fileInfo
# -----------------------------------------------------------------------------
#
from chimera.extension import EMO, manager

# -----------------------------------------------------------------------------
#
class NMWiz_EMO(EMO):

    def name(self):
        return 'Normal Mode Wizard'
    def description(self):
        return 'Visualization of Normal Mode'
    def categories(self):
        return ['Structure Analysis']
    def icon(self):
        return None
    def activate(self):
        self.module('gui').show_nmwiz_dialog()
        return None

# -----------------------------------------------------------------------------
#
manager.registerExtension(NMWiz_EMO(__file__))
from chimera.extension import EMO, manager

# -----------------------------------------------------------------------------
#
class Unit_Cell_EMO(EMO):

  def name(self):
    return 'Unit Cell'
  def description(self):
    return 'Make molecule copies to for crystal unit cell'
  def categories(self):
    return ['Higher-Order Structure']
  def icon(self):
    return None
  def activate(self):
    self.module().show_unit_cell_dialog()

manager.registerExtension(Unit_Cell_EMO(__file__))

# -----------------------------------------------------------------------------
#
def show_unit_cell_dialog():
  import UnitCell
  UnitCell.show_unit_cell_dialog()
from Accelerators import add_accelerator
add_accelerator('uc', 'Show unit cell dialog', show_unit_cell_dialog)
Esempio n. 16
0
from chimera.extension import EMO, manager

class XlinkAnalyzer_EMO(EMO):

    def name(self):
        return 'Xlink Analyzer'
    def description(self):
        return 'Xlink Analyzer modeling visualization'
    def categories(self):
        return ['Utilities']
    def icon(self):
        return None
    def activate(self):
        self.module('gui').show_dialog()
        return None

manager.registerExtension(XlinkAnalyzer_EMO(__file__))
#
class Unit_Cell_EMO(EMO):
    def name(self):
        return 'Unit Cell'

    def description(self):
        return 'Make molecule copies to for crystal unit cell'

    def categories(self):
        return ['Higher-Order Structure']

    def icon(self):
        return None

    def activate(self):
        self.module().show_unit_cell_dialog()


manager.registerExtension(Unit_Cell_EMO(__file__))


# -----------------------------------------------------------------------------
#
def show_unit_cell_dialog():
    import UnitCell
    UnitCell.show_unit_cell_dialog()


from Accelerators import add_accelerator
add_accelerator('uc', 'Show unit cell dialog', show_unit_cell_dialog)