Upcoming features 🚀setHoverable for atoms name
aishenri opened this issue · comments
import py3Dmol
v = py3Dmol.view(query="pdb:1ubq",style={'cartoon':{'color':'spectrum'},'stick':{}})
v.setHoverable({},True,'''function(atom,viewer,event,container) {
if(!atom.label) {
atom.label = viewer.addLabel(atom.resn+":"+atom.atom,{position: atom, backgroundColor: 'mintcream', fontColor:'black'});
}}''',
'''function(atom,viewer) {
if(atom.label) {
viewer.removeLabel(atom.label);
delete atom.label;
}
}''')
Discussed in #5
Originally posted by cbouy March 24, 2021
This is a list of upcoming features for mols2grid
🙏 Contributions are very much welcome 🙏
JupyterLab compatibility
Needs to refactor the grid as an ipywidget instead of an interactive HTML page
Better text search
The current text search is quite buggy as it escapes some regular expressions characters in the query without actually performing a regex search (see list.js issue) . As a consequence you can't search text containing -
or #
for example.
It's also not possible to exclude words from the search.
It would be great to 1) fix the text search 2) allow some more complex search on specific fields to be performed (i.e. a proper query system with AND, OR, NOT...etc)