Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcoming features 馃殌setHoverable for atoms name #36

Closed
aishenri opened this issue Oct 7, 2022 Discussed in #5 · 0 comments 路 Fixed by #38
Closed

Upcoming features 馃殌setHoverable for atoms name #36

aishenri opened this issue Oct 7, 2022 Discussed in #5 · 0 comments 路 Fixed by #38

Comments

@aishenri
Copy link

aishenri commented Oct 7, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant