def __init__(self, mol):
super().__init__(mol)
self.selection_type = ipy.Dropdown(description='Clicks select:',
value=self.viewer.selection_type,
options=('Atom', 'Residue', 'Chain'))
traitlets.link((self.selection_type, 'value'), (self.viewer, 'selection_type'))
self.residue_listname = ipy.Label('Selected residues:', layout=ipy.Layout(width='100%'))
self.residue_list = ipy.SelectMultiple(options=list(), height='150px')
self.viewer.observe(self._update_reslist, 'selected_atom_indices')
self.residue_list.observe(self.remove_atomlist_highlight, 'value')
self.atom_list.observe(self.remove_reslist_highlight, 'value')
self.subtools.children = [self.representation_buttons]
self.subtools.layout.flex_flow = 'column'
self.toolpane.children = [self.selection_type,
HBox([self.select_all_atoms_button, self.select_none]),
self.atom_listname,
self.atom_list,
self.residue_listname,
self.residue_list]
selection.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录