Hi all,

not sure how many people of you actually use the application, and likely the 
subset of people knowing about the Macro menu is even smaller...

And, indeed, I had to check the source code how it works again... and I coded 
this :) Then it would be handy if you could make an extra menu item in the 
application menu to do run this small script. Enter the macro.

So, here a quick tutorial:

== Writing Macros ==

Say that you have a script you run very often, or repeatedly, for some reason. 
The same script every time. Not a long script, just you use it often. E.g. 
the script used on the PDB.org website:

select all;spacefill off;wireframe off;cartoon;color cartoon chain;select 
ligand;wireframe 40;spacefill 120

Or, in English: show the protein as cartoon and the ligands as full 
balls-and-sticks.

Macro's are stored as Java properties files in $HOME/.jmol/macros. The file is 
named something.macro. The extension is important, as is the Java property 
file format. A Jmol macro has two fields: "Title=" and "Script=". For 
example:

Title=PDB view
Script=select all;spacefill off;wireframe off;cartoon;color cartoon 
chain;select ligand;wireframe 40;spacefill 120

Give it a try. If you are wondering what $HOME is, then you're likely a 
windows user; it is your personal home directory, and is defined on your 
system too, as far as I know. Just run Jmol from the command line with 'java 
-jar Jmol.jar' and then you should see something come by that looks like:

User macros dir: /home/egonw/.jmol/macros
       exists: true
  isDirectory: true
Possible macro found: pdb.macro

As you can see, it successfully detected a possible macro. It has the content 
given above.

I hope you like it; it's an old and hidden feature of the application.

Egon

-- 
[EMAIL PROTECTED]
PhD student on Molecular Representation in Chemometrics
Radboud University Nijmegen
Blog: http://chem-bla-ics.blogspot.com/
http://www.cac.science.ru.nl/people/egonw/
GPG: 1024D/D6336BA6


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to