本文整理汇总了Python中pymol.wizard.Wizard类的典型用法代码示例。如果您正苦于以下问题:Python Wizard类的具体用法?Python Wizard怎么用?Python Wizard使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Wizard类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, top, queue, UseOldTypes):
#print "New instance of Wizard SetAtomType"
Wizard.__init__(self)
self.top = top
self.FlexAID = self.top.top
self.queue = queue
# Save view
self.View = cmd.get_view()
self.State = cmd.get_state()
#self.pdbPath = self.FlexAID.SimPath + 'tmp.pdb'
self.pdbPath = self.FlexAID.IOFile.ProcessedLigandPath.get()
self.ErrorCode = 1
self.SelAtomName = '...'
self.SelAtomType = '...'
self.Set_DDL_Colors(UseOldTypes)
smm = []
smm.append([ 2, 'Type Selection', '' ])
for a in self.types:
smm.append([ 1, self.type_name[a], 'cmd.get_wizard().set_AtomType("' + a + '")'])
self.menu['type']=smm
self.atom = list()
self.ID = ''
示例2: __init__
def __init__(self,old_name,mode='object',_self=cmd):
Wizard.__init__(self,_self)
self.prefix = 'Renaming \\999%s\\--- to: \\999'%old_name
self.old_name = old_name
self.new_name = old_name
self.mode = mode
示例3: __init__
def __init__(self, top, queue, Sphere, SphereDisplay, SphereSize, ExtraPrompt):
#print "New instance of flexsphere Wizard"
Wizard.__init__(self)
self.top = top
self.queue = queue
self.App = self.top.top
self.App.WizardError = False
self.App.WizardResult = 0
self.Sphere = Sphere
self.SphereView = self.Sphere.Copy()
self.SphereSize = SphereSize
self.SphereDisplay = SphereDisplay
self.View = cmd.get_view()
self.ErrorCode = 0
self.Prompt = [ "Press Shift + Mouse3 (Wheel Click) to move the sphere.",
"Use the scaler in the " + self.App.Name + " interface to edit its radius." ]
if ExtraPrompt:
self.Prompt.append( ExtraPrompt )
示例4: __init__
def __init__(self,mode='label',pos='[0.0,0.0,0.0]',_self=cmd):
Wizard.__init__(self,_self)
self.mode = mode
if mode == 'label':
self.prefix = 'Label text: \888'
self.text = ''
self.pos = pos
示例5: __init__
def __init__(self,_self=cmd):
Wizard.__init__(self,_self)
self.editing_name = 0
self.copying = 0
self.points_name = ''
self.set_name(default_name)
self.mode = default_mode
self.modes = [
'box',
'walls',
'plane',
'quad',
]
self.mode_name = {
'box':'Box',
'walls':'Walls',
'plane':'Plane',
'quad':'Quad',
}
smm = []
smm.append([ 2, 'Box Mode', '' ])
for a in self.modes:
smm.append([ 1, self.mode_name[a], 'cmd.get_wizard().set_mode("'+a+'")'])
self.menu['mode']=smm
self.update_box()
示例6: __init__
def __init__(self, app, _self=cmd):
Wizard.__init__(self, _self)
# Clean the slate
self.cmd.unpick()
self.app = app
# Default values
self.rmsd_cutoff = 1.0
self.number_of_structures = 25
self.full_match = False
self.url = URL
self.LOGOurl = LOGOURL
self.ref = Wizard
# default values for sequence logo UI
self.operations = []
self.searches = []
self.database = DATABASE_FULL
self.database_name = "Full"
self.search = None # current search action
self.operation = None # current operation
self.dictionary = {}
self.searchThread = None
self.logoThread = None
self.status = 'waiting for selection'
self.searchProgress = 0.0
self.errorMessage = ''
self.makeLogo = 0
self.update()
示例7: __init__
def __init__(self,_self=cmd):
Wizard.__init__(self,_self)
self.cmd.unpick()
self.status = 0 # 0 no atoms selections, 1 atom selected, 2 atoms selected, 3 atoms selected
self.error = None
self.object_name = None
# mode selection subsystem
self.mode = self.session.get('default_mode','pairs')
self.modes = [
'pairs',
'angle',
'dihed',
'polar',
'heavy',
'neigh',
]
self.mode_name = {
'polar':'Polar Neighbors',
'heavy':'Heavy Neighbors',
'neigh':'Neighbors',
'pairs':'Distances',
'angle':'Angles',
'dihed':'Dihedrals',
}
smm = []
smm.append([ 2, 'Measurement Mode', '' ])
for a in self.modes:
smm.append([ 1, self.mode_name[a], 'cmd.get_wizard().set_mode("'+a+'")'])
self.menu['mode']=smm
# overwrite mode selection subsystem
self.object_mode = self.session.get('default_object_mode','append')
self.object_modes = [
'merge',
'overwr',
'append',
]
self.object_mode_name = {
'merge':'Merge With Previous',
'overwr':'Replace Previous',
'append':'Create New Object',
}
smm = []
smm.append([ 2, 'New Measurements?', '' ])
for a in self.object_modes:
smm.append([ 1, self.object_mode_name[a], 'cmd.get_wizard().set_object_mode("'+a+'")'])
self.menu['object_mode']=smm
self.selection_mode = self.cmd.get_setting_legacy("mouse_selection_mode")
self.cmd.set("mouse_selection_mode",0) # set selection mode to atomic
self.cmd.deselect() # disable the active selection (if any)
示例8: __init__
def __init__(self,_self=cmd):
self.cmd = _self
self.cmd.unpick()
Wizard.__init__(self,_self)
# mode selection subsystem
self.radius = default_radius
self.map = copy.deepcopy(default_map)
self.level = copy.deepcopy(default_level)
self.track = copy.deepcopy(default_track)
self.avail_maps = []
self.menu['radius'] = [
[1, '4.0 A Radius','cmd.get_wizard().set_radius(4)'],
[1, '5.0 A Radius','cmd.get_wizard().set_radius(5)'],
[1, '6.0 A Radius','cmd.get_wizard().set_radius(6)'],
[1, '8.0 A Radius','cmd.get_wizard().set_radius(8)'],
[1, '10.0 A Radius','cmd.get_wizard().set_radius(10)'],
[1, '15.0 A Radius','cmd.get_wizard().set_radius(15)'],
[1, '20.0 A Radius','cmd.get_wizard().set_radius(20)'],
[1, '50.0 A Radius','cmd.get_wizard().set_radius(50)'],
]
self.menu['map0'] = []
self.menu['map1'] = []
self.menu['map2'] = []
level_menu = lambda x:[ [1, '1.0 sigma','cmd.get_wizard().set_level(%d,1.0)'%x],
[1, '1.5 sigma','cmd.get_wizard().set_level(%d,1.5)'%x],
[1, '2.0 sigma','cmd.get_wizard().set_level(%d,2.0)'%x],
[1, '3.0 sigma','cmd.get_wizard().set_level(%d,3.0)'%x],
[1, '5.0 sigma','cmd.get_wizard().set_level(%d,5.0)'%x],
[1, '-3.0 sigma','cmd.get_wizard().set_level(%d,-3.0)'%x]]
self.menu['level0'] = level_menu(0)
self.menu['level1'] = level_menu(1)
self.menu['level2'] = level_menu(2)
self.menu['track'] = [
[ 1, "Track & Zoom", 'cmd.get_wizard().set_track(0)'],
[ 1, "Track & Center", 'cmd.get_wizard().set_track(1)'],
[ 1, "Track & Set Origin", 'cmd.get_wizard().set_track(2)'],
[ 1, "Track Off", 'cmd.get_wizard().set_track(3)'],
]
if (self.map[0] == '') and (self.map[1] == '') and (self.map[2]==''):
for a in self.cmd.get_names(): # automatically load first map we find
if self.cmd.get_type(a)=='object:map':
self.map[0]=a
break
self.update_map_menus()
self.cmd.set_key('pgup',lambda c=cmd:c.get_wizard().next_res(d=-1))
self.cmd.set_key('pgdn',lambda c=cmd:c.get_wizard().next_res())
示例9: __init__
def __init__(self,*arg,**kw):
_self = kw.get('_self',cmd)
Wizard.__init__(self,_self)
self.message = []
for a in arg:
if not isinstance(a,list):
self.message.append(a)
else:
self.message.extend(a)
示例10: __init__
def __init__(self,*arg,**kw):
_self = kw.get('_self',cmd)
self.valid = 1
Wizard.__init__(self,_self)
if len(arg):
self.old_button_mode = int(arg[0])
self.check_valid()
if self.valid:
self.recount()
示例11: __init__
def __init__(self,arg0=None,_self=cmd):
Wizard.__init__(self,_self)
self.gl = 5.0
self.short_cpu = 8.0
self.long_cpu = 16.0
self.message = []
if arg0!=None:
if hasattr(self,arg0):
getattr(self,arg0)()
示例12: __init__
def __init__(self,_self=cmd):
Wizard.__init__(self,_self)
self.memory = 0
self.n_pair = 0
self.status = 0 # 0 no atoms selections, 1 atom selected
self.message = None
self.selection_mode = cmd.get_setting_int("mouse_selection_mode")
cmd.set("mouse_selection_mode",0) # set selection mode to atomic
cmd.deselect() # disable the active selection (if any)
示例13: __init__
def __init__(self,*arg,**kw):
_self = kw.get('_self',cmd)
Wizard.__init__(self,_self)
self.message = []
for a in arg:
if not isinstance(a,list):
self.message.append(a)
else:
self.message.extend(a)
for a in self.message:
print(" " + _nuke_color_re.sub('',a))
self.dismiss = int(kw.get("dismiss",1))
示例14: __init__
def __init__(self,_self=cmd):
cmd.unpick();
Wizard.__init__(self,_self)
self.status = 0 # 0 no atoms selections, 1 atom selected
self.error = None
self.object_name = None
# mode selection subsystem
self.mode = default_mode
self.modes = [
'polar',
'heavy',
'neigh',
'pairs',
]
self.mode_name = {
'polar':'Polar Neighbors',
'heavy':'Heavy Neighbors',
'neigh':'Neighbors',
'pairs':'Pairwise Distances',
}
smm = []
smm.append([ 2, 'Measurement Mode', '' ])
for a in self.modes:
smm.append([ 1, self.mode_name[a], 'cmd.get_wizard().set_mode("'+a+'")'])
self.menu['mode']=smm
# overwrite mode selection subsystem
self.object_mode=default_object_mode
self.object_modes = [
'overwr',
'append',
]
self.object_mode_name = {
'overwr':'Replace Previous',
'append':'Create New',
}
smm = []
smm.append([ 2, 'New Distances?', '' ])
for a in self.object_modes:
smm.append([ 1, self.object_mode_name[a], 'cmd.get_wizard().set_object_mode("'+a+'")'])
self.menu['object_mode']=smm
self.selection_mode = cmd.get_setting_int("mouse_selection_mode")
cmd.set("mouse_selection_mode",0) # set selection mode to atomic
cmd.deselect() # disable the active selection (if any)
示例15: __init__
def __init__(self,_self=cmd):
Wizard.__init__(self,_self)
self.ligand = ""
for a in self.cmd.get_names("public_objects",1):
if self.cmd.count_atoms(a) < 1000:
self.ligand = a
break
self.target = "(none)"
self.message = []
self.menu = {}
self.update_menus()
self.cmd.edit_mode()