nglviewer / nglview

Jupyter widget to interactively view molecular structures and trajectories
http://nglviewer.org/nglview/latest/
Other
821 stars 134 forks source link

vmd-like: click two atoms to display distance #16

Closed hainm closed 5 years ago

hainm commented 8 years ago

In VMD, there is shortcut key (2) to change to click mode to display distance between two atoms.

arose commented 8 years ago

Yeah, this would be nice. Needs support in NGL, see https://github.com/arose/ngl/issues/46.

hainm commented 8 years ago

it's quite handy in pv

http://pv.readthedocs.io/en/v1.8.1/sample-measure-distance.html?highlight=distance

hainm commented 7 years ago

should be NGL.

arose commented 6 years ago

I recently added mouse bindings to do distance, angle, dihedral measurements. In the ts2 branch hold down alt (not shift as stated earlier) and click 2 to 4 atoms and then click on the last atom again to get a measurement. Click on all the atoms of a measurement and click the last one twice to remove it.

hainm commented 6 years ago

wanna cut a release for it so I can try in nglview? or I just use the local build.

arose commented 6 years ago

need to setup making releases for the ts2 branch, local build is faster for now

hainm commented 6 years ago

okie

hainm commented 6 years ago

@arose what's the exact command(s) to get ngl.js in ts2 branch?

hainm commented 6 years ago

npm install
npm run ts
npm run build-min
``` ?
arose commented 6 years ago

yes, looks good

hainm commented 6 years ago

thanks, but the updated ngl.dev.js does not work as expected. Shift with left mouse click will trigger the autoview to clicked atom.

arose commented 6 years ago

alt not shift, sorry

hainm commented 6 years ago

thanks. work now. Do you want to get feed back about that now or just experimenting?

arose commented 6 years ago

sure, feedback is always welcome