pett at cgl.ucsf.edu
Tue Sep 6 10:59:33 PDT 2016
> On Sep 5, 2016, at 7:13 AM, Igor Peixoto Rodrigues <igorl.kjuru at hotmail.com> wrote:
> Hi my name is Igor Peixoto, and I have a question. There is some way to count the number of bonds in molecule? Like how much bonds of kind B-C, C-C, B-N.... for example?
There is. If you are only doing this for a few structures, then the easiest way is probably to use the commands to select the endpoint atoms, which will also select the bonds. The number of selected atoms and bonds will be reported on the right side of the command line. If the endpoint atoms are of different elements (say C and B) you will then have to do two additional selections to find the bonds between the identical elements (C-C and B-B in this example) and subtract those off, since those were also selected by the first command.
So, for example, to find the number of C-N bonds in 3fx2:
sel @/element=C @/element=N (reports 905 bonds)
sel C (can use this simpler form if there’s only one element; reports 556 bonds)
sel N (reports 0 bonds)
905 - 556 - 0 = 349
For a large number of structures you would probably want to use a Python script to do this more automatically. If so, let me know and I’ll provide some pointers.
UCSF Computer Graphics Lab
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users