From: John Stone (
Date: Mon Aug 16 2010 - 11:05:28 CDT

  Your small source code modification is probably the most
effective way of accomplishing what you want in the short-term.
We could probably implement a lookup table based scheme
that would allow users to have a small degree of customizability
in determining which atom types are not allowed to show bonds,
but it would cost some performance vs. the implementation that's
there now. We could also create a second selection box and have
only bonds between selection A and B get displayed. This might
work reasonably well and would be fully general, though the user
would need to make sure that the two selections didn't contain any
combinations that they wanted to specifically exclude.

As you say, the exlusions could also be used for the polyhedra representation.
In the case of the polyhedra representation, we may want to handle it
in a different way, by instead providing two atom selections,
effectively a set of "from" and "to" atoms. So rather than specifying
exclusions, one would provide two selections, and only draw polyhedra
that involve the two selections. One would have to make sure that the
two selections didn't both list the same atom type if such combinations
need to be excluded.

Let me know what you think of the idea of using second atom selections
as opposed to atom pair exclusion lookup tables based on atom type.

  John Stone

On Mon, Aug 16, 2010 at 05:12:10PM +0200, Georg Spiekermann wrote:
> hello,
> I would like to share a workaround to a problem I had when using
> DynamicBonds.
> When I visualize with VMD silicate melts from MD runs, the displaying of
> Si-O bonds is desired, but oxygen-oxygen-bonds are generally not
> desired, they look disturbing.
> In draw_dynamic_bonds (as in others, like draw_bonds) bonds between
> hydrogen and hydrogen are automatically excluded from being drawn. Bonds
> between two other atoms of the same type (for example
> oxygen-oxygen-bonds) seem not yet to be excludable when choosing
> DynamicBonds.
> My workaround to exclude oxygen-oxygen-bonds from being drawn by
> DynamicBonds is this:
> 1) in Atom.h: To "#define ATOMHYDROGEN 3" I added "#define ATOMOXYGEN
> 4".
> 2) in BaseMolecule.h: To the "IS_HYDROGEN(s)"-macro I added an adapted
> "IS_OXYGEN(s)"-macro. They recognize elements by the first character,
> "H" and "O".
> 3) in BaseMolecule.C: Analogous to "if (aname != NULL &&
> IS_HYDROGEN(aname)){ a->atomType = ATOMHYDROGEN;}" I added the
> equivalent for ATOMOXYGEN.
> 4) in DrawMolItem.C: In the for-loop I added "if (atom1->atomType ==
> atom2->atomType) {tmp = p->next;free(p);continue;}".
> It works and can be easily extended to more elements. It might also be
> applied to similar routines like draw_polyhedra for example.
> I am curious to know whether already exist other workarounds out there,
> please let me know.
> kind regards,
> Georg Spiekermann

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078