Difference between revisions of "Scripting"
AngelHerraez (talk | contribs) (Bob's new URL) |
AngelHerraez (talk | contribs) (remove obsolete sections) |
||
Line 6: | Line 6: | ||
'''An introduction to Jmol scripting is available here:''' | '''An introduction to Jmol scripting is available here:''' | ||
* http://www.clunet.edu/BioDev/omm/scripting/molmast.htm | * http://www.clunet.edu/BioDev/omm/scripting/molmast.htm | ||
− | |||
− | |||
− | |||
− | |||
The Jmol [[Jmol_Application|Application]] and [[Jmol_Applet|Applet]] have a command language that closely resembles the [http://www.mdl.com/support/developer/chime/developer_tools.jsp command language] of the browser plugin [http://www.mdl.com/ MDL Chime]. A set of commands is called a ''command script'', and writing such sets of commands or scripts is called ''scripting''. | The Jmol [[Jmol_Application|Application]] and [[Jmol_Applet|Applet]] have a command language that closely resembles the [http://www.mdl.com/support/developer/chime/developer_tools.jsp command language] of the browser plugin [http://www.mdl.com/ MDL Chime]. A set of commands is called a ''command script'', and writing such sets of commands or scripts is called ''scripting''. |
Revision as of 01:05, 21 November 2006
Jmol Scripting
Documentation of Jmol's scripting language can be found here:
An introduction to Jmol scripting is available here:
The Jmol Application and Applet have a command language that closely resembles the command language of the browser plugin MDL Chime. A set of commands is called a command script, and writing such sets of commands or scripts is called scripting.
Chime's command language (see "About Chime" at http://molviz.org) is a superset of the command language of Roger Sayle's public domain application RasMol. (The command language of open-source RasMol has diverged somewhat from that in RasMol and Chime).
CONNECT implementation
10.00.49 will have the following implementation: (Bob Hanson hansonr@stolaf.edu)
select (atom expression) connect <min distance> <max distance> <option STATIC> <bond type> (target atom expression) where <bond type> includes SINGLE, DOUBLE, TRIPLE, AROMATIC, HBOND, DELETE
properties:
- Bonds that are already made are revised.
- Bonds are introduced exactly as desired, not just as single bonds.
- Actions are independent of the setting of BONDMODE
rationale/comments:
- You can be as specific as you want in selecting the atom sets and now the distance range, so that suggests to me that there should be no surprises. The command does just what it says and not "connect-unless-not-already-connected."
- It needs no dependency upon BONDMODE because the distance ranges -- that typically really do define bond order -- are the determining factors.
- It is also more flexible than using BONDMODE, because now we have a specific starting set and a target set between which bonds will be built or removed.
- The STATIC parameter indicates to only operate on atoms that are already connected.
examples:
select (carbon) connect 1.3 1.5 DOUBLE (oxygen) connect 1.5 1.7 SINGLE (oxygen) connect 1.7 1.9 DELETE (oxygen) connect STATIC DOUBLE (oxygen)
SEE THE EXAMPLE AT http://www.stolaf.edu/people/hansonr/jmol/test/json/connect.htm
BONDORDER implementation
An earlier implementation of something like this, "bondorder", created or removed bonds based on the setting of BONDMODE. The difference between bondorder and connect is that bondorder only acts on bonds ALREADY defined. While this could be useful, a simple parameter "STATIC" to the connect command does the same thing. We are thus planning to remove the BONDORDER command. (It was never documented, anyway.)
-Bob Hanson