See http://chemapps.stolaf.edu/jmol/docs/examples-12/new.htm


On Sat, Sep 18, 2010 at 5:27 PM, Robert Hanson <[email protected]> wrote:

> I guess a lot of this "bond set" business is not documented....
>
>
> On Sat, Sep 18, 2010 at 3:41 PM, Robert Hanson <[email protected]> wrote:
>
>> Eric, an interesting challenge with an amazingly simple solution.
>>
>> Option 1: using CONNECTED(), select BONDS and color BONDS
>>
>> load c6h6.smol
>> select bonds @{connected({_C},{_C},"aromaticDouble")}; color bonds yellow
>> select bonds @{connected({_C},{_C},"aromaticSingle")}; color bonds red
>> select bonds @{connected({_H},{_C},"single")}; color bonds blue
>>
>> 1) the CONNECTED function returns a bond set
>> 2) the SELECT command can select bonds
>> 3) the COLOR command can color selected bonds
>>
>> Option 2: actually, you don't need the select business
>>
>> load c6h6.smol
>> color @{connected({_C},{_C},"aromaticDouble")} yellow
>> color @{connected({_C},{_C},"aromaticSingle")} red
>> color @{connected({_H},{_C},"single")}  blue
>>
>> 1) the CONNECTED function returns a bond set
>> 2) the COLOR command can color bond sets
>>
>> Note that you can create a bond set yourself. They are designated using
>> [{...}]
>>
>> Var a = [{2 4 6}]  # three bonds
>> color @a red
>>
>> Bob
>>
>>
>>
>> On Sat, Sep 18, 2010 at 1:17 PM, Eric Martz <[email protected]>wrote:
>>
>>> SELECTING HBONDS
>>>
>>> I would like to be able to color hbonds according to what they
>>> connect. I would like to be able to distinguish, for example, these
>>> categores of hydrogen bonds:
>>>
>>> protein sidechain TO protein sidechain
>>> protein sidechain TO protein backbone
>>> protein backbone  TO protein backbone
>>> protein           TO water
>>> water             TO water
>>> water             TO DNA
>>> protein sidechain TO DNA sidechain
>>> protein backbone  TO DNA backbone
>>> protein backbone  TO DNA sidechain
>>> protein sidechain TO DNA backbone
>>> DNA sidechain     TO DNA sidechain (Watson-Crick)
>>> DNA sidechain     TO DNA backbone
>>>
>>> Conveniently, the hbonds command accepts two atom expressions. Thus,
>>> each of the above categories can be calculated separately. Yay!
>>>
>>> The problem arises in coloring what has just been calculated.
>>>
>>> I have not discovered any way to select the above subsets of atom
>>> pairs without selecting unwanted hbonds. For example, if I "select
>>> (protein and sidechain), (DNA and backbone)", the "color hbonds
>>> yellow", I am not only coloring the hbonds from protein-sidechain to
>>> DNA-backbone, but also the hbonds from protein-sidechain to
>>> protein-sidechain, and from DNA-backbone to DNA-backbone.
>>>
>>> I am aware of "set bondmode or" vs. "set bondmode and" but I don't
>>> see how these could help.
>>>
>>> Possible solutions:
>>>
>>> 1. IF "CALCULATE HBONDS" LEFT THE ATOMS IT CONNECTS SELECTED, THIS
>>> WOULD BE EASY.
>>>
>>> A slight complication arises when you want to color a subset of
>>> hbonds after selecting something else. When you repeat the "calculate
>>> hbonds (protein and sidechain) (DNA and backbone)" command, it adds
>>> no new hbonds if they are already in existence. IT COULD NEVERTHELESS
>>> SELECT THEM. Alternatively (and I think I would prefer this) the
>>> "calculate hbonds" command could delete, then recalculate hbonds.
>>> Currently, it appears to me that one must "hbonds delete" before
>>> "calculate hbonds" in order to re-calculate a set.
>>>
>>> 2. A "select hbonded (atom expression 1) (atom expression 2)" command
>>> would solve the problem in a more direct manner.
>>>
>>> At the same time, for similar purposes, a "select connected (...)
>>> (...)" would be useful for covalent bonds. Like "calculate hbonds",
>>> "connect" also accepts two atom expressions.
>>>
>>> There is already "select connected" and "select connected (atom
>>> expression)", but no option for a second atom expression.
>>>
>>> ---------------
>>> HIDING/DISPLAYING HBONDS
>>>
>>> I would like to have e.g. checkboxes that show and hide each of the
>>> above categories of hydrogen bonds. "hide hbonds" does nothing.
>>> "hbonds hide" is illegal. Am I missing the syntax here? Or do we need
>>> new code in Jmol to hide/display hbonds?
>>>
>>> If hiding and displaying is not available, I can do "hbonds delete"
>>> and start over from the beginning, recalculating for all the
>>> currently checked categories and colorings, but this is a bit cumbersome.
>>>
>>> Thanks, -Eric
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing.
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> Jmol-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>
>>
>>
>>
>> --
>> Robert M. Hanson
>> Professor of Chemistry
>> St. Olaf College
>> 1520 St. Olaf Ave.
>> Northfield, MN 55057
>> http://www.stolaf.edu/people/hansonr
>> phone: 507-786-3107
>>
>>
>> If nature does not answer first what we want,
>> it is better to take what answer we get.
>>
>> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>>
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to