From: gilleain t. <gil...@gm...> - 2010-10-24 20:37:50
|
On Sun, Oct 24, 2010 at 8:53 PM, Nina Jeliazkova <jel...@gm...> wrote: >>Na+) are just text, and the bounds may not be computed properly, >>sorry. Text is really a pain. > > Hm, couldn't it be treated as a single atom, not just text ? Well, the difficulty comes when the bounding rectangle is calculated on atom positions (which are points). For a single atom, this is a single point, which is - according to Euclid - "that which has no part". In other words, no width or height and a bounds of (x,y,0,0). Text, on the other hand, has a definite size. > Is it possible to use the same "cleanup" method outside of JCP, for example > for rendering images like this > > > http://apps.ideaconsult.net:8080/ambit2/depict?search=[O-]C1%3DCC%28[N%2B]%28[O-]%29%3DO%29%3DCC%3DC1OC.[Na%2B] > http://apps.ideaconsult.net:8080/ambit2/depict?search=[NH4%2B].CP%28%3DO%29%28O%29CCC%28N%29C%28%3DO%29[O-] Thanks for the links, it's good to see how JCP rendering compares to other toolkits. Badly, it seems... 1) Either the bonds are being drawn on top of the atom symbols, or the symbol background is not drawn. 2) In the phosphyl-cysteine thing, the atom symbols are not centered on the atom positions. 3) Hydrogens are missing from the NH4+ ion and amine groups - that could be due to a preference setting I guess. 4) The counter-ion text font is very different size to the larger structure. So you could use the ControllerHub without JCP, certainly. It's in the controlbasic module, and could be used without connecting up all the bits. That is, you wouldn't be interacting with the images that you produce by a servlet, but you could pass in null for references to things that aren't being used. Of course, it would be nicer if there were dedicated MoleculeSetLayout classes... gilleain |