[Molvis-list] rasmol connect bug
sternberg at anl.gov
Sun Apr 20 13:16:45 EDT 2008
Thanks Herbert. I located the "not-really" bug - it is due to
optimization and rather simple to fix:
In molecule.c, change
#define AbsMaxBondDist 600
#define AbsMaxBondDist 800
Roger implemented fast progressive short-circuit evaluation of dx^2 +
dy^2 + dz^2 > AbsMaxBondDist^2, and 600 (=2.4 A) was just a tad too
short for metal bonds that are aligned to the axes; 800 (3.2 Angstrom)
works fine now, but could possibly be even 1000.
The performance impact of a larger value is negligible on today's
On Apr 16, 2008, at 21:27 , Herbert J. Bernstein wrote:
> Thank you for the problem report. Until we locate the bug, you can
> bonding one atom pair at a time with the bond command, e.g.
> bond 0 1
> bond 0 2
> bond 1 2
> I have entered the report into the tracker on sourceforge for you.
> H. J. Bernstein
> At 7:04 PM -0500 4/16/08, Michael Sternberg wrote:
>> Dear Rasmol users,
>> I'm encountering a bug in the "connect" command, wherein certain
>> bonds are not detected, come what may.
>> Consider the following xyz-file, which is an excerpt from a larger
>> model of a surface I'm trying to render:
>> ==== test.xyz ================================
>> Ni 2.74059 4.93685 0.02301
>> Ni 1.31849 7.41686 0.03767
>> Ni 4.16141 7.41082 0.01675
>> These 3 atoms are arranged in a roughly equilateral triangle with
>> distances 2.843, 2.853 and 2.859 Angstroms.
>> Run any rasmol version 2.6.4 to the very latest
>> rasmol -xyz test.xyz
>> RasMol> connect on
>> This will draw just *one* bond, not three. Curiously, it's the
>> *middle* length bond that's detected, not the shorter or longer ones.
>> This shortcoming of rasmol's bond detection has bugged me on and
>> off for quite some time. Usually, I got around it by re-declaring
>> the offending atoms to be types with larger covalent radii. That
>> won't work in the full structure that I'm handling here, as it
>> introduces unphysical bonds in other parts of the structure. I may
>> have some recourse in supplying bond info trough, say, the alchemy
>> format, but I wonder if the root of this isn't a shortcut taken in
>> the bond detection routine?
>> Regards, Michael
>> Molvis-list mailing list
>> Molvis-list at bioinformatics.org
> Herbert J. Bernstein, Professor of Computer Science
> Dowling College, Kramer Science Center, KSC 121
> Idle Hour Blvd, Oakdale, NY, 11769
> yaya at dowling.edu
More information about the Molvis-list