Dear Alexander and Rolf,
thanks for your help! I tried the instruction
Jmol.evaluate(jmolApplet, "print {atomNo=" + atomNo + "}.property_pp");
in the following code:
function pickResidue(jmolObj,msg,atomNo) {
var pp = Jmol.evaluate(jmolApplet, "print {atomNo=" + atomNo +
"}.property_pp");
}
after setting the property with the following script:
set frank off
delete NOT :A
cartoon ONLY
color [xFADACB]
background hover [xFCD6E2]
color hover [xD60B51]
font hover 12 sanserif
hover %[label]
set hoverDelay 0.01
select 35; color [xbe1622]; spacefill 70%
set hoverLabel "P35";
data "property_pp"
Q13253_35
Q13253_35
Q13253_35
Q13253_35
Q13253_35
Q13253_35
Q13253_35
Q13253_35
Q13253_35
Q13253_35
end "property_pp"
set PickCallback "pickResidue"
And the variable pp has the value "ERROR" after executing it. Any idea why
it is so? Or how to debug it?
Thanks again for your help!
Best,
Roberto
On Tue, Jan 14, 2014 at 5:32 PM, Alexander Rose <[email protected]
> wrote:
> Hi,
>
>
> > The question is: how can I retrieve the "label" of the atom that was
> > clicked? I set such label in a Jmol script using the "set
> > hoverLabel" command and I would like to read it back in the
> > pickResidue function to decide what to do (visualize some
> > information or not).
> >
> >
> > If this is not possible,
>
> It is possible as Rolf pointed out but you can also add your own data to
> atoms
>
> is there any way to attach some data to the
> > atoms (via Jmol script) that can be accessed later on inside the
> > pickResidue function?
>
> see the data command in the scripting documentation
>
> {*}.property_xxx = load("myfile.dat")
>
> where xxx is some name for your data
> and where "myfile.dat" contains a number per line for each of your atoms
>
> you can then access that number via
>
> Jmol.evaluate(jmolApplet, "print {atomNo=" + atomNo + "}.property_xxx");
>
>
> Best
> Alexander
>
> >
> >
> > I would really appreciate any help as I already spent one day on this
> > problem without being able to solve it... :((
> >
> >
> > Thanks!
> > Roberto
> >
> ------------------------------------------------------------------------------
> > CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> > Learn Why More Businesses Are Choosing CenturyLink Cloud For
> > Critical Workloads, Development Environments & Everything In Between.
> > Get a Quote or Start a Free Trial Today.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Jmol-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jmol-users
> >
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
--
La chiocciol@
http://lachiocciola.tumblr.com/
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users