Hello Daniel
> Hello again everyone, I have already succeeded with all this
Glad to know. You just need to persevere :)
> when I select a
> residue, a label appears on its C-alpha
A label appears.... You mean you make it appear beciause you have
scripted that label, right? So add another action to that function.
> and I want the same label to
> appear in the textbox. I highlight selected residues and write the
> labels via a function called colorLabel I execute like this from in
> php:
> '<script>jmolCheckbox("colorLabel(\'NAT\',\''.$prefix.'\',\'manual\',\
> ''.$select_nat.'\',\'ONE\')",
> "DELcolorLabel(\'NAT\',\''.$select_nat.'\',\'ONE\')",
> "native");</script></td>';
I don't see there how you add the label.
> var i = x[2].indexOf("colorLabel");
But I would not expect "colorLabel" to be a part of Jmol script, so
it is not in the message reported.
> if (i!=-1){
> var label = jmolEvaluate('select 2:A.CA and 1.1; var at={selected};
> at.label');
Two ideas here:
1. you are not getting the label. Maybe use "show at.label" or "print
at.label"
2. it is likely that at is an atom set, so an array, not a single
atom (even if it's formed by just one atom). So, at.label is not
defined. Maybe "at[0].label". Anyway, you can first test that script
in the console and it will be easier to see the errors.
Say, you select manually or by a command at the console, then try
your command
select 2:A.CA and 1.1;
var at={selected};
print at.label;
print at[0].label;
#whatever
Hey!... "at" is a reserved word in JmolScript (meaning adenosine or
thymidine). Use another name just to be safe. Maybe that's all and
you don't need my other advice
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users