Re: [Jmol-users] Color maps for bonds

2017-01-21 Thread Max Pinheiro Jr
Hi Bob, Thank you very much for your answer! This last script solved my problem. It is working pretty well. The function color("rgb",bmin, bmax, x.length) was the tricky. Thanks also for all other previous suggestions! All the best, Max Pinheiro Jr 2017-01-19 16:04 GMT-02:00 Robert Hanson

Re: [Jmol-users] Color maps for bonds

2017-01-19 Thread Robert Hanson
Yes, Max, there is a very simple way to do this. If you have a color scheme in mind, the color() function is what you want: *x = color(schemeName, min, max, value)* for example: $ x = color("rgb",0,2,1.5) $ print x {0.0 255.0 255.0}​ bmin = {*}.bonds.length.min bmax = {*}.bonds.length.max

Re: [Jmol-users] Color maps for bonds

2017-01-19 Thread Rolf Huehne
Am 19.01.17 um 05:26 schrieb Max Pinheiro Jr: > Hi Bob, > > The problem that still persist is how to use the values bond lengths to > assign the colors for each bond. I included a new variable to get the > bond length inside the for loop: y=x.bonds.length. However, I think the > variable colors[ ]

Re: [Jmol-users] Color maps for bonds

2017-01-19 Thread Angel Herráez
Hi Max Have you explored the "connect" command? >From your last description, I think that might do what you want. It's easy to select atom pairs by distance, and then you could "reconnect" them and apply color and thickness of bond https://chemapps.stolaf.edu/jmol/docs/#connect · Dr. Angel

Re: [Jmol-users] Color maps for bonds

2017-01-18 Thread Max Pinheiro Jr
Hi Bob, The problem that still persist is how to use the values bond lengths to assign the colors for each bond. I included a new variable to get the bond length inside the for loop: y=x.bonds.length. However, I think the variable colors[ ] just accept integer values, right? So, one possibility

Re: [Jmol-users] Color maps for bonds

2017-01-18 Thread Max Pinheiro Jr
As I said, the version of jmol I am running is the 14.6.3 of 2016-09-18. I ran your script again using the cafeine molecule loaded directly from jmol (File -> Get MOL), and, in this case, all bonds are colored as expected. However, the same script has no effect when I run it over my xyz file. I

Re: [Jmol-users] Color maps for bonds

2017-01-18 Thread Robert Hanson
What version of Jmol are you running? Should be no problem running that exact script. Just did it again now. On Wed, Jan 18, 2017 at 11:44 AM, Max Pinheiro Jr wrote: > Hi Bob, > > Thank for the tips. I tried to run your script right now, but something > seems to be wrong

Re: [Jmol-users] Color maps for bonds

2017-01-18 Thread Max Pinheiro Jr
Hi Bob, Thank for the tips. I tried to run your script right now, but something seems to be wrong with the color assignment. Jmol is returning the following error message: script ERROR: invalid argument color bonds "" for ( var i = { all } . bonds . count ; -- i

Re: [Jmol-users] Color maps for bonds

2017-01-18 Thread Robert Hanson
ps - I forgot to mention that this bond set syntax [{...}] makes it unnecessary to use BOND in the select command: select [{2}] selects the third bond in the model. On Tue, Jan 17, 2017 at 7:32 PM, Robert Hanson wrote: > If you know the ordering in the file, you can

Re: [Jmol-users] Color maps for bonds

2017-01-17 Thread Robert Hanson
If you know the ordering in the file, you can select them using the select BOND option, but that requires "atom/bond set" syntax: select bond ({0}) # first bond select bond ({1}) # second bond etc. Now, the trick here is that that syntax doesn't allow for variables. For example, you cannot

Re: [Jmol-users] Color maps for bonds

2017-01-17 Thread Angel Herráez
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

Re: [Jmol-users] Color maps for bonds

2017-01-17 Thread Max Pinheiro Jr
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, I thought that in the case of bonds we would have the same kind of

Re: [Jmol-users] Color maps for bonds

2017-01-17 Thread Robert Hanson
How are you determining which bonds go with which properties in your file? On Mon, Jan 16, 2017 at 10:14 AM, Max Pinheiro Jr wrote: > Dear Jmol team, > > I am trying to make a figure of a molecule in which the bonds are colored > by a RGB scale according to the values read