From: Luciano Abriata (
Date: Mon May 13 2019 - 12:13:27 CDT

Replying to my own question, with info likely important for developers:

I now got to understand that the problem is in the z direction, which is by some reason multiplied by -1 for the wireframe but not for the rest of the 3D elements, hence resulting in a mismatch between electron density and atom locations.

I solved my problem by exporting obj/mtl separately for molecules and wireframe electron density, and then overlaying them on my application but reversing the z direction of the wireframe.

However, I guess this should be easy to fix in VMD itself.

I can explain more if this wasn't clear.


De: Luciano Abriata
Enviado: viernes, 26 de abril de 2019 09:54
Asunto: obj/mtl and isosurface as wireframe, possibly a small bug


I see a related question in the list (OBJ rendering with multiple colors and transparency); I think my question is related but somehow "easier to solve":

When I export a view that consists in a molecule with the electron density as wireframe, the resulting object is wrong, with the electron density not fitting the atoms (as I do see correctly on screen in VMD).

What's strange is that if I render the electron density with a solid surface instead of wireframe, it does fit correctly. Hence I guess there's just some small bug when exporting wireframes?

Also the exported color is wrong for wireframe but correct for solid surface.

I experienced the same on VMD 1.9.2 in Linux and 1.9.3 in Windows.

If not a bug, what may I be doing wrong? Thanks,