def __init__(self, mol):
super().__init__(mol)
self._atomset = collections.OrderedDict()
self.atom_listname = ipy.Label('Selected atoms:', layout=ipy.Layout(width='100%'))
self.atom_list = ipy.SelectMultiple(options=list(self.viewer.selected_atom_indices),
layout=ipy.Layout(height='150px'))
traitlets.directional_link(
(self.viewer, 'selected_atom_indices'),
(self.atom_list, 'options'),
self._atom_indices_to_atoms
)
self.select_all_atoms_button = ipy.Button(description='Select all atoms')
self.select_all_atoms_button.on_click(self.select_all_atoms)
self.select_none = ipy.Button(description='Clear all selections')
self.select_none.on_click(self.clear_selections)
self.representation_buttons = ipy.ToggleButtons(options=['stick','ribbon', 'auto', 'vdw'],
value='auto')
self.representation_buttons.observe(self._change_representation, 'value')
selection.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录