This works for me to highlight amino acids in a polypeptide or nucleotides
in RNA/DNA:

function cb_h (){
timeout "myid" 1.0 ""
timeout "myid" off
res = {atomIndex=_atomHovered}.resno
color (resno=res) rasmol
color (resno=res) and (atomName="O??") pink
timeout "myid" 1.0 "h_timed_out(res)"
}
function h_timed_out(res) {
color {resno=res} jmol
}
set hoverCallback "jmolscript: cb_h()"

I found that timeout "myid" off by itself is insufficient to kill the
timeout routine when in a callback. Probably some threading issue...
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to