Re: [Jmol-users] MF function question...

2016-07-08 Thread Otis Rothenberger
Bob, Thanks, that email is a big help on the @ usage. Otis --Otis rothenbergero...@chemagic.org http://chemagic.org > On Jul 8, 2016, at 9:19 AM, Robert Hanson wrote: > > > Happy to address that. @ is tricky because it has multiple uses: > > > 1. Original use: "define" > > > $ @mol

Re: [Jmol-users] MF function question...

2016-07-08 Thread Robert Hanson
Happy to address that. @ is tricky because it has multiple uses: 1. Original use: "define" *$ @molecule1 molecule=1* *$ select molecule1* 2. Shortcut to {atomno=n} *$ @3.color = "red"* *$ draw @1 @3* 3. Math insertion into a Jmol command: *$ draw ID @{"line"+i} * 4. Explicit refer

[Jmol-users] MF function question...

2016-06-30 Thread Otis Rothenberger
Bob, I’m going to define this global function in my Jmol Script: function mfa(){x=[];n={*}.molecule.max;for (var i = 1;i <= n; i++){x.push({molecule=i}.find("MF"))};return @x} The function works and returns the array to JavaScript via Jmol.evaluateVar, but it works with and without the @. Is t