本文整理汇总了Python中chimera.baseDialog.ModelessDialog.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ModelessDialog.__init__方法的具体用法?Python ModelessDialog.__init__怎么用?Python ModelessDialog.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chimera.baseDialog.ModelessDialog
的用法示例。
在下文中一共展示了ModelessDialog.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, models):
self.models = models
if len(models) > 1:
self.title = "Add Note to %d Models" % (len(models))
else:
self.title = "Add Note to %s" % models[0].name
ModelessDialog.__init__(self)
示例2: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self):
self.director = None
self.this_dir = os.path.split(os.path.abspath(__file__))[0]
ModelessDialog.__init__(self)
self.cache_width = None
self.cache_height = None
## get the width and height when the frame options are expanded
self.frmOptionsFrame.grid(row=FRM_OPTS_ROW ,column=0, columnspan=3, sticky='nsew')
chimera.tkgui.app.update_idletasks()
self.frm_width, self.frm_height = \
(self.frmOptionsFrame.winfo_width(), self.frmOptionsFrame.winfo_height())
self.frmOptionsFrame.grid_forget()
chimera.tkgui.app.update_idletasks()
## get the width and height when the movie options are expanded
self.movOptionsFrame.grid(row=MOV_OPTS_ROW,column=0, columnspan=3, sticky='nsew')
chimera.tkgui.app.update_idletasks()
self.mov_width, self.mov_height = \
(self.movOptionsFrame.winfo_width(), self.movOptionsFrame.winfo_height())
self.movOptionsFrame.grid_forget()
chimera.tkgui.app.update_idletasks()
w,h = map(int,self.getCurrentDimensions())
self._toplevel.wm_geometry('%sx%s' % (w+30,h+20))
#self.director.adjustGfxSize()
chimera.tkgui.app.after(1000, self.showStatus, "Click the record button to start capturing frames")
示例3: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, src_path = None):
self.currentPanelId = -1
self.panels = []
self.unique_id = 0
ModelessDialog.__init__(self)
self.NULL_PANEL = Panel(-1, self, name="")
self.NULL_PANEL.cmdStack.delB.configure(state="disabled")
self.NULL_PANEL.cmdStack.addB.configure(state="disabled")
self.NULL_PANEL.undoStack.delB.configure(state="disabled")
self.NULL_PANEL.undoStack.addB.configure(state="disabled")
self.refreshPanelInfo(-1)
self.save_path = None
self.updateWindowTitle()
self.gTitleOption.set("Chimera Demo")
if src_path:
self.loadDemo(src_path)
self.setSavePath(src_path)
self.updateWindowTitle()
self._toplevel.bind('<KeyRelease>', self.keyReleaseCB)
self._DIRTY = False
self._cached_save = None
示例4: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, residue, resType, lib, sessionData=None):
self._sesHandlerID = chimera.triggers.addHandler(SAVE_SESSION,
self._sessionCB, None)
self.residue = residue
self.lib = lib
self.resType = resType
self.title = "%s Side-Chain Rotamers" % residue
if sessionData:
self.bbdep, self.rotamers, self.tableData = sessionData
else:
from Rotamers import getRotamers
self.bbdep, self.rotamers = getRotamers(residue,
log=True, lib=lib, resType=resType)
from Midas import linewidth, color
linewidth(2, self.rotamers)
color('byhet', self.rotamers)
chimera.openModels.add(self.rotamers,
sameAs=residue.molecule, hidden=True, noprefs=True)
registerAttribute(chimera.Molecule, "chis")
registerAttribute(chimera.Molecule, "rotamerProb")
self.tableData = None
self.resHandlerID = chimera.triggers.addHandler(
'Residue', self._resChangeCB, None)
self.dependentDialogInfo = [('Clashes', 'clash'),
('H-Bonds', 'hbond'), ('Density', 'volume')]
for label, ddn in self.dependentDialogInfo:
setattr(self, ddn + "Dialog", None)
ModelessDialog.__init__(self)
示例5: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, models):
self.models = models
if len(models) > 1:
name = "Multiple Models"
else:
name = models[0].name
self.title = "Compute Secondary Structure for %s" % name
ModelessDialog.__init__(self)
示例6: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, model):
self.title = 'PDB Headers for %s' % model.name
self.model = model
from chimera import preferences
self.prefs = preferences.addCategory("PDB headers dialog",
preferences.HiddenCategory,
optDict={"ordering": "Alphabetical"})
ModelessDialog.__init__(self)
示例7: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, groupPanel):
self.groupPanel = groupPanel
options = {
"shownButs": {},
"executionList": ['attributes...'],
"shownColumns": {}
}
self.prefs = preferences.addCategory("Pseudobond Group Panel",
preferences.HiddenCategory,
optDict=options)
ModelessDialog.__init__(self)
示例8: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, modelList, subSelection, *args, **kw):
from chimera import preferences
self._removeHandler = None
for m in modelList:
m.preclusterColor = m.color
self.subSelection = subSelection
self._cluster(modelList)
ModelessDialog.__init__(self, *args, **kw)
chimera.extension.manager.registerInstance(self)
self._removeHandler = chimera.openModels.addRemoveHandler(
self._modelsChanged, None)
示例9: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, movie, startFrame, stride, endFrame, useSel,
ignoreBulk, ignoreHyds):
self.movie = movie
self.movie.subdialogs.append(self)
self.startFrame = startFrame
self.stride = stride
self.endFrame = endFrame
self.useSel = useSel
self.ignoreBulk = ignoreBulk
self.ignoreHyds = ignoreHyds
ModelessDialog.__init__(self)
示例10: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, modelPanel):
self.modelPanel = modelPanel
options = {
"freqButs": {},
"executionList": ['attributes...'],
"shownColumns": {},
"showColor": False,
"lastUse": None
}
self.prefs = preferences.addCategory("Model Panel",
preferences.HiddenCategory,
optDict=options)
ModelessDialog.__init__(self)
示例11: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, movie, startFrame, stride, endFrame, useSel, minRmsd,
maxRmsd, ignoreBulk, ignoreHyds, recolor):
self.movie = movie
self.movie.subdialogs.append(self)
self.startFrame = startFrame
self.stride = stride
self.endFrame = endFrame
self.useSel = useSel
self.minRmsd = minRmsd
self.maxRmsd = maxRmsd
self.ignoreBulk = ignoreBulk
self.ignoreHyds = ignoreHyds
self.recolor = recolor
self.title = self.titleFmt % (minRmsd, maxRmsd)
ModelessDialog.__init__(self)
示例12: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, model):
self.model = model
self.setInCallback = False
self.title = "%s attributes (model %s)" % (
readableName(model), model.oslIdent()[1:])
self.triggers = [('Model', chimera.triggers.addHandler(
'Model', self._refreshCB, None))]
self.refreshFuncs = {}
self.refreshFuncs['Model'] = []
if isinstance(self.model, chimera.Molecule) \
and len(self.model.pdbHeaders) > 0:
self.buttons = self.buttons + ["PDB Headers..."]
ModelessDialog.__init__(self)
示例13: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, viewdock, *args, **kw):
self.viewdock = viewdock
self.results = viewdock.results
self.compounds = Set()
self.selected = None
self.valueCache = {}
self._isMapped = False
self._colAddHandler = None
self._colDelHandler = None
self._colUpdHandler = None
self._needChangeCompounds = False
ModelessDialog.__init__(self, *args, **kw)
self._exitHandler = self.viewdock.triggers.addHandler(
self.viewdock.EXIT,
self._exit, None)
self._cpdChgHandler = self.viewdock.triggers.addHandler(
self.viewdock.COMPOUND_STATE_CHANGED,
self._compoundStateChanged,
None)
示例14: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, seqCanvas):
self.seqCanvas = seqCanvas
seqCanvas.mainCanvas.bind('<ButtonPress-1>', self._mouseDownCB)
seqCanvas.mainCanvas.bind('<ButtonRelease-1>', self._mouseUpCB)
seqCanvas.mainCanvas.bind('<B1-Motion>', self._mouseDragCB)
seqCanvas.mainCanvas.bind('<Button-3>',
lambda e: self._focusCB(e, pref="residue"))
seqCanvas.mainCanvas.bind('<Shift-Button-3>',
lambda e: self._focusCB(e, pref="region"))
self.title = "Region Browser for " + seqCanvas.mav.title
self._dragLines = []
self._dragRegion = None
self._prevDrag = None
self._bboxes = []
self._afterID = None
self._highlightedRegion = None
self.regions = []
self.associatedRegions = {}
self.renameDialogs = {}
self._scfDialog = None
ModelessDialog.__init__(self)
示例15: __init__
# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
def __init__(self, num, width, height, img_src, **kw):
"""num is the number of panels the wizard is to contain
width is the desired width of each panel, in pixels
height is the desired height of each panel, in pixels
img_src is the absolute path to a .gif file containing
an image to appear in the left-hand side of the wizard
"""
self.panel_width = width
self.panel_height = height
self.img_src = img_src
if kw.has_key('img_bg_color'):
self.img_bg_color = kw['img_bg_color']
else:
self.img_bg_color = None
self.numPanels = num
self.pCurrent = 0
self.pFrames = [None] * self.numPanels
ModelessDialog.__init__(self)