From: Nina J. <jel...@gm...> - 2010-10-24 20:51:59
|
On 24 October 2010 23:37, gilleain torrance <gil...@gm...>wrote: > 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... > Well, these two are not good examples I admit ... > 1) Either the bonds are being drawn on top of the atom symbols, or the > symbol background is not drawn. > Well, it was working fine in the previous setup (cdk 1.3.3 & JCP 3.0.1) but today I've upgraded to cdk 1.3.6 and JCP 3.1.3 and something has changed outside of my code ... > 2) In the phosphyl-cysteine thing, the atom symbols are not centered > on the atom positions. > Interestingly, this doesn't have the same issue http://apps.ideaconsult.net:8080/ambit2/depict?search=CP%28%3DO%29%28O%29CCC%28N%29C%28%3DO%29[O-] > 3) Hydrogens are missing from the NH4+ ion and amine groups - that > could be due to a preference setting I guess. > It's default preferences - could you give me a hint how to set preferences in code, without touching JCP properties ? > 4) The counter-ion text font is very different size to the larger > structure. > Yep, this is because of me allocating equal size boxes for the two (or more if any) parts and scaling each structure separately. Is it possible to force same scaling ? > > 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... > MoleculeSet is a slightly different thing IMHO, just having a single procedure to get an image of this kind of disconnected structures would save lot of time. Thanks for the quick reply this late! Best regards, Nina > > gilleain > |