[Kalzium] Molecular Viewer Bug

Benoit Jacob jacob at math.jussieu.fr
Sat Aug 25 13:21:37 CEST 2007



On Sat, 25 Aug 2007, Johannes Simon wrote:
> I'm using openbabel 2.1.1.

OK, that's fine. It must be a bug in our code, then.

> It indeed only returns black colors.

Aha. I suppose that by "black colors" your mean 0,0,0. This is 
floats, so color components run from 0 to 1. 1,1,1 would be white, 
0.5,0.5,0.5 would be gray.

Let's find out why. Edit the body of this method: void Color::set(const 
OpenBabel::OBAtom *atom) add add qDebug()'s to see what's going on. Is the 
if(!atom) exiting the method prematuredly? If not, can you check the 
std::vector rgb returned by OpenBabel?

> Changing m_red (or m_gree,m_blue,m_alpha)
> at the beginning of applyAsMaterials() doesn't make any difference at all.

Uh, now that's strange. setting m_red to 1 should make a visual 
difference (everything should look more red, at least not black)! If it 
doesn't, that's a separate bug. I prefer to believe that we 
didn't understand each other.

Benoit


More information about the Kalzium mailing list