On Nov 24, 2009, at 10:41 AM, Konstantin Tokarev wrote:
In my version of labelsettingswidget I’ve created “preview” box, which displays how label of 1st atom of molecule will be displayed using current style.
Why do we need the 1st atom? Can’t we use an arbitrary atom like a carbon?
Cheers,
-Geoff
I thought about it. I simply create a static global Atom in labelengine.cpp and set some arbitrary values for formalCharge, partialCharge, residue, etc
But in atom.h is written “All atoms must be owned by a Molecule”
I don’t think that’s a big deal for what you want. I think it’ll work.
Cheers,
-Geoff
Geoffrey Hutchison wrote:
I thought about it. I simply create a static global Atom in labelengine.cpp and set some arbitrary values for formalCharge, partialCharge, residue, etc
But in atom.h is written “All atoms must be owned by a Molecule”
I don’t think that’s a big deal for what you want. I think it’ll work.
For what you want it will work fine unless you try getting the atom’s
position. Then it would fail, probably with a segfault.
Marcus