On Tue, Dec 8, 2015 at 10:34 AM, Rolf Huehne <rhue...@leibniz-fli.de> wrote:

> >
> >     var fileNumberInfo = atomBitset.file.all.count();
> >>     var fileNumberList = [];
> >>
> >>     if (fileNumberInfo.type == "array") {
> >>       for (var i from [1, fileNumberInfo.size]) {
> >>         var fileNumber = fileNumberInfo[i].[1];
> >>         fileNumberList.push(fileNumber);
> >>       }
> >>     }
> >>     return fileNumberList;
> >> }
> >>
> >
> > not sure I see the need for the above
> >
> Q: Is there a simpler way to get all first array elements out of an
> array of arrays?
>

$ print [[1,3,4],[4,5,6],[7,8,8]].col(1)
1.0
4.0
7.0


> Q: Or did you just mean that using '_modelIndex/modelIndex' would be
> easier? ( As I said earlier, 'file' reflects more properly what I want
> to achieve than 'modelIndex'.)
>
>
Oh, I see. This is about files, not models. I did not notice that.



> >
> >
> >
> >>     var atomExpressionUpperCase = ("" + atomExpression) % 9999;  #
> >> convert to upper case
> >>
> >
> > This isn't really necessary; for historical reasons, Jmol "==" testing is
> > not case-sensitive. If you want it to be, you need to use LIKE instead of
> > "=="
> >
> Q: And the same is true for 'case' in 'switch' statements, as the
> 'displayModel' function above suggests?
>

I guess so. No "like" for SWITCH.

Q: Does that mean that multiple parameters cannot be supplied to a
> function in a single variable and it must have been 'display @keyword
> @atomExpression' or 'dummy=script("display " + atomExpression)'? Or did
> you mean something else?
>
>
Right, you  just say

xxx @a @b @c ....

Bob
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to