Hi Max Two issues here. One is the way to achive this in Jmol scripting. The other is to specify what you are expecting to achieve, i.e. which is your criteria of bond ordering + coloring.
Atoms are indexed as the file is read, and so there is no issue: they receive a sequential number and you can refer to it. They also have many properties associated to each atom. Bonds, on the one hand, have no properties attached to them except thickness and color. On the other hand, it is not so easy to define their ordering and indexing. Among other things, each bond "belongs" to 2 atoms and each atom "has" several bonds, so what should their index/order be? (We recently experienced a case: the same protein, when read from a pdb file and when read from a cif file, has the same atom indexing in Jmol but different bond indexing) I believe that yes, most probably you can iterate or loop over the bonds collection and assign a color to each bond, read from your data file. But still the question is in which order those bonds will come, every time you have a new file. What are you expecting in this regard when you define your color-data file? > Good question. Since in the case of coloring atoms by the partial charge I > don't need to specify > the atoms, i.e, I think there is a direct correspondence of each line of the > file for each atom in the > respective ordering, YES > I thought that in the case of bonds we would have the same kind of > correspondence. NOT THE SAME (see above) > I have checked in the manual that specific bonds can be selected by the > command "select[{i}]" or > a set of bonds could be attributed to a variable by "x = {atomno < 30}.bonds" Right, but that x will be a collection of bonds -- in which order, is difficult to anticipate. > and I could change > the color of the selected bonds to red, for example. That would mean all bonds attached to that atom get the same red color. But each bond will also be attached to another atom, then which is the last color applied to it? So, in summary, I believe some of these "philosophical" or "logical" questions need to be answered before trying to find Jmol commands to do what you want. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users