<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Sep 5, 2016, at 7:13 AM, Igor Peixoto Rodrigues <<a href="mailto:igorl.kjuru@hotmail.com" class="">igorl.kjuru@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><span style="font-size: 15px; line-height: 21.3px; white-space: nowrap; color: rgb(68, 68, 68);" class="">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?</span></div></div></div></blockquote><div><br class=""></div>Hi Igor,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>So, for example, to find the number of C-N bonds in 3fx2:</div><div><br class=""></div><div>sel @/element=C @/element=N (reports 905 bonds)</div><div>sel C (can use this simpler form if there’s only one element; reports 556 bonds)</div><div>sel N (reports 0 bonds)</div><div><br class=""></div><div>905 - 556 - 0 = 349</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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.</div><div><br class=""></div><div>—Eric</div><div><br class=""><br class=""></div><div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline"></div><br class=""><div><blockquote type="cite" class=""></blockquote></div></div><br class=""></body></html>