Menu

#191 bonds ID numbers

closed
Nicolas
5
2011-11-01
2011-10-18
berlin
No

it would very nice if it could tell us the definition of bond ID numbers.

I want to use the bond ID numbers to set the color of each bonds.
But can not make sure of the bond ID numbers is represent which bonds.
So I can not continue my work.

Example:
the *.spt file can set up the color of bonds like this:

select BONDS ({0:100});
color bonds opaque [0,200,0];
select BONDS ({101});
color bonds opaque [200,100,0];

Discussion

  • Egon Willighagen

    berlin222, thanx for posting here. Got your email, but my reply was bounced.

     
  • Egon Willighagen

    BTW, Robert replied on the developers ML:

    "You most easily select bonds using:

    x = {atomno=1 or atomno=2}.bonds

    or the like."

     
  • berlin

    berlin - 2011-10-27

    egonw, thanks you very much.
    I can't get your email may due to the server of "yahoo.com.cn" have some trouble. maybe, the email of "berlin222012@gmail.com" would get your email.

    do you mean can select and color bonds by:
    "
    select bonds ({{atomno=1 or atomno=2}.bonds});
    color bonds opaque [0,200,0];
    "
    but it does not work.
    may you help more!
    thanx!

     
  • Bob Hanson

    Bob Hanson - 2011-10-27

    almost. You need to surround that math expression with @{ }

    select bonds @{ {atomno=1 or atomno=2}.bonds }

    color bonds opaque [0,200,0]

     
  • berlin

    berlin - 2011-11-01

    thanks you all!
    "select bonds @{ {atomno=1 or atomno=2}.bonds }" is not work too.

    But, I got the way:
    "
    select ({2 3});
    color bonds opaque [0,200,0];
    "
    select the bond of atom 2 and 3, and set its color.

     
  • Bob Hanson

    Bob Hanson - 2011-11-01

    Ah, yes, that has been there forever. Your initial question was about bond identifiers and the BONDS command, but what you were really asking was "How can I color specific bonds specific colors."

    select bonds @{ {atomno=1 or atomno=2}.bonds }

    has worked since at least version 11.1. I forgot to ask, what version are you using? Here is an example from 12.2:

    load $caffeine
    select bonds @{ {atomno=1 or atomno=2}.bonds }
    color bonds yellow

     
  • Bob Hanson

    Bob Hanson - 2011-11-01
    • status: open --> closed
     
  • berlin

    berlin - 2011-11-05

    I am using the version 12.2.0,
    select and set bonds in function _setModelState of "*.spt" files.

     

Log in to post a comment.