Libavogadro and Eigen

Dear All:
First of all, happy new year
I have been quite inactive lately due to familiar problems, I am happy to see
that a lot of new things have been already done.
Respect to the use of Eigen for libavogadro, Kalzium and likely Kryomol…
These templates are designed for row major C-matrices, however if would be
great if storage could be also done as column major since most linear algebra
libraries are fortran based (LAPACK).
I will start the porting of Kryomol to KDE4 next month and I will use now
libavogadro for the rendering engine, I will report all the problems I face.

Only one thing, I think that methods such as getMolecule should be also
duplicatead as const Molecule* getMolecule() const for const correctness.

And finally one problem I have been struggling with Kryomol, the propietary
ATI drivers are linked against libstdc++.so.5, however most systems
implemente now libstdc++.so.6, I dont know why ( should not be versioned the
libraries ? ), KryoMol is calling std library from both versions and nasty
memory errors take place. Anyone of you have any idea how to tackle the
problem?

My best wishes


Dr. Armando Navarro-Vázquez
Departamento de quimica organica
Universidade de Santiago de Compostela
http://desoft03.usc.es/armando/index.html

Hi Armando

On Mon, 8 Jan 2007, Armando Navarro Vázquez wrote:

Respect to the use of Eigen for libavogadro, Kalzium and likely Kryomol…
These templates are designed for row major C-matrices,

No, Eigen uses colum-major storage, like OpenGL :slight_smile: don’t know where you
got the impression that it used row-major storage from :slight_smile:

And thanks for your interest in Eigen, you’re making the right choice :slight_smile:

however if would be
great if storage could be also done as column major since most linear algebra
libraries are fortran based (LAPACK).

Well, if they use column-major storage, then all is fine since that’s what
Eigen uses; however I seem to remember that some of the “big libraries”
propose the two possibilities, column-major or row-major.

If you ever had a need for that, one could consider also providing the two
possibilities in Eigen. Eigen is extensible in that respect.
However I won’t do it unless there’s a real need for it.

I will start the porting of Kryomol to KDE4 next month and I will use now
libavogadro for the rendering engine, I will report all the problems I face.

Cool news, I’m of course also considering porting Kalzium 3d to
libavogadro, however that’ll have to wait until I have some time :slight_smile:

And finally one problem I have been struggling with Kryomol, the propietary
ATI drivers are linked against libstdc++.so.5, however most systems
implemente now libstdc++.so.6, I dont know why ( should not be versioned the
libraries ? ), KryoMol is calling std library from both versions and nasty
memory errors take place. Anyone of you have any idea how to tackle the
problem?

I don’t know a solution, sorry. I can only suggest that you don’t spend
time on this problem: it’s a problem in ATI’s drivers, not in your own
software. Just refuse to do more work just because ATI didn’t do its own
work properly. The best you can do is e-mail ATI about that, and in
KryoMol use the GL_RENDERER or GL_VENDOR string to detect when the ATI
proprietary driver is used, and in that case let the user know that
because of a bug in the ATI driver, the app might crash. Just so the user
doesn’t believe it’s KryoMol’s fault.

Benoit

Only one thing, I think that methods such as getMolecule should be also
duplicatead as const Molecule* getMolecule() const for const correctness.

Yeah no problem. One area i’m REALLY bad at is doing const’s. I never
figure where it’s really important to do so and so i normally just hope
everything plays nice. I in no way think it’s a good thing. I’ll do
what i can and any place you feel there should be a const let me know.

Just a word of warning. While libavogadro is pretty stable it’s still
very new. The engines haven’t all been converted to the new plugin
style (right now only ball and stick) and i haven’t finallized all the
function calls. However all interface to and from the GLWidget is
pretty much set which is really all you guys need. So it should be very
close. I don’t want to discourage you though because having two major
projects use it will definatly help it’s development. Thanks for the
interest.

-Donald