Jmol prerelease 10.00.47 is now availble for download from:
This release includes script language extentions that give one control
over bonds between atoms.
Note that this is the first prerelease that includes these extensions.
Therefore, users are encouraged to look for problems with these commands.=
Also, be aware that these commands are subject to change ... based upon
feedback from the user community.
There is no new functionality in the area of bond selections ... but a
reminder on the mechanism is in order.
There is no explicit command for selecting bonds. Rather, bonds are
implicitly selected based upon the atom selections.
There is an underlying 'bondmode' variable that can be set to AND or OR.
The default is AND.
When the bondmode is set to AND a bond is considered selected only if bot=
the atoms that it connects are selected.
When the bondmode is set to OR then a bond is considered selected if
either atom is selected.
One generally selects a subset of bonds in order to set the size and/or
color of the selected bonds.
With these new extenstions, on can set bond order. Alternatively, one can=
delete unwanted bonds.
Bond order for specific bonds can now be specified through scripts. The
following are now valid:
Selected bonds can now be deleted through the command:
RasMol/Chime contains a mechanism to recalculate the 'autobonding'.
When this command is executed, any underlying connectivity information is=
thrown away and the connectivity is recalculated using 'autobond'.
The RasMol documentation states that the boolean value determines whether=
a 'fast' or 'slow' algorithm is used.
For backwards compatibility with RasMol/Chime, Jmol now implements this
command. The value of the boolean argument is not used ... Jmol always
uses the same algorithm.
Adding new bonds
I have added the ability to create new bonds through script commands.
Because the 'connect' command already existed I decided to implement this=
as an extension of the current 'connect' command.
The general syntax is:
connect =7B<maxDistance>=7D (<targetAtomSet>);
The idea is that you select a source set of atoms. Atoms in the source se=
are connected with every atom in the target set that falls within the
optional maxDistance Angstroms from the source.
If maxDistance is not specified then the distance is essentially infinite=
... 1 meter ;-)
Atoms will not be connected with themselves.
If an atom in the source set is already bonded to an atom in the target
set then no change is made to the exis
If no bond is made between a source atom and a target atom then a new
single-order bond is created between the two atoms.
No atom will be connected with itself.
Note that it is easy to turn your molecule into a highly-connected-graph.=
Note that the target atom set must be contained within parentheses.
=23 various ways to link atom =231 with atom=232
select atomno=3D1; connect (atomno=3D2);
select atomno=3D1,atomno=3D2; connect (selected);
=23 connect all carbons with hydrogens that are within 1.5 angstroms
select carbon; connect 1.5 (hydrogen);
=23 connect every atom with every other atom;
select all; connect (all);
=23 connect every atom with every other atom that is within 5 angstroms;
select all; connect 5 (all);
Please play with this and let me know what you think.