El 21 de març de 2012 19:31, Robert Hanson <hans...@stolaf.edu> ha escrit:

> That's Jmol script, not JavaScript. Yes, essentially exactly like pyMol.
> You can write any macro you want.
>

I didn't explain well.
I can implement some of that functionality using JmolScript, but not
everything I want.
I would like to map commands to, or directly call ,Java (not JavaScript nor
JmolScript) functions from the Jmol console.
With pymol one can register any python function as a command available from
pymol's console.
Here it's explained: http://www.pymolwiki.org/index.php/Extend

Is there something similar in Jmol?




>
>
> 2012/3/21 Adrià Cereto Massagué <adrian.cer...@urv.cat>
>
>>
>>
>> El 21 de març de 2012 1:45, Robert Hanson <hans...@stolaf.edu> ha escrit:
>>
>> Custom commands can be simply set up by defining a function with that
>>> command name. is that what you mean -- sort of a macro?
>>>
>>>
>>>
>>> function colorMeBlue(atoms) {
>>>
>>>   color @atoms blue
>>>
>>> }
>>>
>>>
>>>
>>> colorMeBlue {helix}
>>>
>>>
>>>
>>>
>> Thank you. I have some commands I can implement in JmolScript, and
>> therefore defien as functions,
>> but I would like to call or execute an external Java method. Can it be
>> done?
>>
>> In PyMol it is possible to map a python function to a script command. Is
>> there something similar in Jmol?
>>
>>
>>>
>>>
>>> 2012/3/20 Adrià Cereto Massagué <adrian.cer...@urv.cat>
>>>
>>>>  Hello,
>>>>
>>>> I am new to Jmol, and I am developing an application which relies on it
>>>> (the Integration.java example has been very useful)
>>>>
>>>> I want to have some custom commands available from the scripting
>>>> console. Is there an easy way for doing so?
>>>>
>>>> I have tried extending AppConsole and overriding the enterPressed()
>>>> method and checking AppConsole.text for the last line, but then I have no
>>>> way no clear the custom command from the console unless i call
>>>> super.enterPressed(), which prints a script error about (obviously) not
>>>> recognizing the command.
>>>>
>>>> Thank you in  advance,
>>>>
>>>> Adrià
>>>>
>>>> --
>>>> *Adrià Cereto Massagué*
>>>> Ph.D Student
>>>> Nutrigenomics Research Group
>>>> Biochemistry and Biotechnology Department
>>>> Building N4, Campus Sescelades
>>>> Universitat Rovira i Virgili
>>>> Tarragona, Catalonia
>>>>
>>>> Languages: Català, Español, English, Français, Deutsch, Português
>>>>
>>>> Nota 
>>>> importante<http://www.gnu.org/philosophy/no-word-attachments.es.html>| 
>>>> Important
>>>> Notice <http://www.gnu.org/philosophy/no-word-attachments.html>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF email is sponsosred by:
>>>> Try Windows Azure free for 90 days Click Here
>>>> http://p.sf.net/sfu/sfd2d-msazure
>>>> _______________________________________________
>>>> Jmol-users mailing list
>>>> Jmol-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>
>>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF email is sponsosred by:
>>> Try Windows Azure free for 90 days Click Here
>>> http://p.sf.net/sfu/sfd2d-msazure
>>>
>>> _______________________________________________
>>> Jmol-users mailing list
>>> Jmol-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF email is sponsosred by:
>> Try Windows Azure free for 90 days Click Here
>> http://p.sf.net/sfu/sfd2d-msazure
>> _______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
>
> --
> 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
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
>
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to