Hi Angel thanks for the fast response, I label the C-alpha atom of the
residue selected with my function colorLabel, that you can access at:
http://bl210.caspur.it/MODEL-DB/TEST/Jmol-12new/myJMOLfunctions.spt
And actually the line I write in php
"colorLabel('NAT','CAV','manual','2:A','ONE')" appears as a message (but not
the output of that line, which is what I want)...
So I try the following in the console with an error:
select 2:A.CA and 1.1 ----> 1 átomos seleccionados
catom={selected}
show catom ----> catom = ({9})
show catom.label ---->
ERROR en guión: el número de argumentos no es correcto
----
         show catom . >> label <<

show catom[0].label --->
ERROR en guión: el número de argumentos no es correcto
----
         show catom [ >> 1 << ] . label


I do this after the label is present in the applet, which looks like "NAT -
manual N_A_2 CAV:2"

What is wrong there? ".label" should work, right? I use it in my function
colorLabel, line 85, for example...
Thanks again for your time Angel, Paul and everyone else,
Daniel


El 21 de septiembre de 2011 11:29, Angel Herráez <[email protected]>escribió:

> 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
>
------------------------------------------------------------------------------
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

Reply via email to