Thanks again for the help. Well let me outline what I'm trying to do and
maybe you can help guide me into a better direction. I wanted to use JMOL
to generate surfaces (ala isosurface) which the points of that surface
could be used to generate input files for computational programs(ala
gaussian and another specialized one). Then I wanted JMOL to pull in the
output files, regenerate the surfaces and create 3D heat maps for display.
I noticed that JMOL seemed to have most of that already built in hence the
interest. I didn't get the impression that the scripting language was
flexible enough todo that although there's so much functionality I wouldn't
be surprised if I missed it.
Cheers Andrew
On Tue, May 1, 2012 at 9:03 AM, Robert Hanson <hans...@stolaf.edu> wrote:
> Andrew,
>
> That sounds terrifically interesting. Muon spectroscopy. Nice!
>
> Please don't add new commands to Jmol. At least not that way. You can
> create functions in Jmol using the function command just within a script,
> and do just about anything with that.
>
> What sort of commands are you interested in adding? Let me help you.
>
> Bob
>
>
> On Mon, Apr 30, 2012 at 4:57 PM, Andrew Long
> <andrew.long.3...@gmail.com>wrote:
>
>> Hello Everyone
>>
>> I'm a grad student who is interested in adding some specialized functions
>> for muon spectroscopy to JMOL. I was wondering if there is any special
>> tricks to adding new console commands to jmol. I've gotten to the point
>> where It accepts the new function (no script error command expected) but
>> the function doesn't seem to want to run. (I've included some cope
>> fragments and output below). I went and added some debuging statements
>> (just system.out.println) into the main functions in the script evaluator
>> but once the molecule is loaded into jmol none of the functions print out
>> when a command is entered. Does anything else need to be added besides a
>> couple lines in tokens (in order to be recognized) and adding a case in the
>> instruction dispatch loop? At this point I have a feeling I might be
>> missing something. Thanks for your time
>>
>> Cheers Andrew
>>
>>
>> Console output
>>
>> $ asdfasdf
>> script ERROR: command expected
>> ----
>> >> asdfasdf <<
>> $ examplecommand
>> $ write xyz
>> 4
>>
>> H -4.47785 -0.17300 0.00000
>> H -3.87856 0.17300 0.00000
>> H 0.00000 0.00000 0.34600
>> H 0.00000 0.00000 -0.34600
>>
>> $
>>
>>
>> excerpt from scriptevaluator
>>
>>
>> ..........
>> case Token.unbind:
>> unbind();
>> break;
>> case Token.vibration:
>> vibration();
>> break;
>> case Token.write:
>> write(null);
>> break;
>> case Token.exampleCommand:
>> System.out.println("case Token.exampleCommand:");
>> //
>> break;
>> case Token.zap:
>> zap(true);
>> break;
>> case Token.zoom:
>> zoom(false);
>> break;
>> ...........
>>
>> excerpt from Token
>> ................
>> final static int quaternion = 17 | 0 << 9 | mathfunc |
>> scriptCommand;
>> final static int sort = 18 | 0 << 9 | mathfunc |
>> mathproperty;
>> final static int count = 19 | 0 << 9 | mathfunc |
>> mathproperty;
>> public final static int within = 20 | 0 << 9 | mathfunc;
>> final static int write = 21 | 0 << 9 | mathfunc |
>> scriptCommand;
>> final static int exampleCommand = 22 | 0 << 9 | mathfunc |
>> scriptCommand;
>>
>> // xxx(a)
>>
>> final static int acos = 3 | 1 << 9 | mathfunc;
>> final static int sin = 4 | 1 << 9 | mathfunc;
>> final static int cos = 5 | 1 << 9 | mathfunc;
>> final static int sqrt = 6 | 1 << 9 | mathfunc;
>> ......................
>>
>> More from Token
>> ....................
>> "vector", new Token(vector),
>> "vectors", null,
>> "vibration", new Token(vibration),
>> "while", new Token(whilecmd),
>> "wireframe", new Token(wireframe),
>> "write", new Token(write),
>> "exampleCommand", new Token(exampleCommand), //exampleCommand
>> "zap", new Token(zap),
>> "zoom", new Token(zoom),
>> "zoomTo", new Token(zoomTo),
>> .............................
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Jmol-developers mailing list
>> Jmol-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>>
>>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers