Miguel wrote:
The Jmol scripting language needs a commmand for explicitly creating a bond.


What should the command be called?
----------------------------------

If this is a script command to create bonds then it seems that it should
be called 'bond' ... the verb bond.
The RasMol script command to create bonds is called bond.
bond <source> <dest> +
unbond <source> <dest>

Then again, the other script commands are called 'spacefill' and
'wireframe', not 'atom' and 'bond'. This has the advantage in that there
is not confusion between the command name and the abstract concept/object.

For the purposes of this memo, I am going to call it 'link' ... because it
links two atoms.

We may be able to consolidate 'wireframe' and 'link' under a unified
'bond' command.


Q: Thoughts on script command name? Do you like 'bond' or 'link' or
something else?


bond because it is the RasMol script command

How are atoms specified?
------------------------

The 'monitor' command in rasmol takes atom numbers as arguments. I don't
like this.
me, too
We already have a very flexible and powerful mechanism for specifying
atoms. Atom expressions allow us to select atom sets based upon a number
of characteristics.

The 'link' command should use atom sets to specify the atoms.
as the monitor command :-)
It is hard for me to specify more than one atom set. Therefore, the
mechanism would need to be:

  select <source-atom-set>;
  link <target-atom-set>;

Atoms in the source set would be bonded to atoms in the target atom set.
Nothing would be bonded with itself. If the bond already existed then a
second bond would not be created.

The following would all work;

  select atomno=1; link atomno=2; # link atoms 1 and 2

  select atomno=1,atomno=2; link selected; # also link atoms 1 and 2

  select [CYS]1.CA; link [ARG]2.CA

  select all; link all; # link every atom with every other

  select carbon; link hydrogen; # link each carbon with every hydrogen


Q: Thoughts?
why not
bond <src atom selection> <dest atom selection> [+-]
e.g.
bond ([CYS]1.CA) ([ARG]2.CA)
bond (carbon) (hydrogen and within(1.5, carbon))



Should distance be part of the criteria?
----------------------------------------

The last two examples above demonstrate a problem; it will be easy to
build a pile of spaghetti with *way* too many bonds. But this is a command
for adults, so we should be able to deal with it.

The 'polyhedra' command has a similar option that perhaps we should
consider. It might be useful to have a 'distance' criteria in the target
set specification. That is:

  select carbon; link 1.5 hydrogen;
yes, distance is important and an iterating distance command would be superior over the within command.
let distant evaluate <source> and <dest>
bond distant(1.5, (carbon) (hydrogen))
This would link carbons with each hydrogens if the distance was <= 1.5
Angstroms.

But, this might get in the way and become an annoyance if the distance is
never used.

 select atomno=1; link 99.0 atomno=2;
I would say, the command without distance is useless, distance need not to be optional.
The problem is, I don't know how easy it will be to make the distance
optional, unless we say that the atom expression is in parentheses ... as
parentheses may be needed to terminate the atom set selection )(
in:

  select atomno=1; link (atomno=2);
  select carbon; link 1.5 (hydrogen or oxygen);


Q: Thoughts?


What about multiple models/frames?
----------------------------------

Atoms can only be connected with other atoms that are in the same model.
That is hard-fast and fixed.

Atom expressions give full control over the sets of atoms that are to be
bonded, including specification of models.

Therefore, I do not think that there will be any problems with supporting
multiple models ... I think it will just work as desired.
agreed

Bond order
----------

Specifying bond order is modifying the properties of an existing bond.
Therefore, specifying bond order should operate like the existing
mechanism for specifying diameter.

We should extend the 'wireframe' command to allow the following:

  wireframe single | double | triple | aromatic | hydrogen | <diameter>
With RasMol script, I use the bond command before the wireframe command, if I want to draw a ligand with correct bond order.

Bond removal
------------

I think that we could remove bonds without causing problems. I think that
this could work on an existing selected set of bonds ... as another
extension to the 'wireframe' command.

  select <some-set-of-atoms>;
  set bondmode or; # choose or .OR. and
  wireframe delete;

Q: Is bond removal really desired/needed?
yes, though most cases I used this is after I had added a bond in error, because of the use of atom numbers in <src> and <dest>.
RasMol has the unbound command
unbond <src> <dest>
but I would like an (for adding optional) + - parameter for the bond command
bond <src> <dest> -

Regards, Jan


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to