Rajarshi Guha <[EMAIL PROTECTED]> wrote: > On Wed, 2006-01-11 at 21:40 +0100, Christoph Steinbeck wrote: > > zhen Qixiong wrote: > > > How are you! Every body, > > > My Name is Qixiong. I am using CDk to develop software > > > which can be used to display chemical structure. While > > > using CDK, I came across some problems. That is: > > > 1. I CAN display the chemical structure Correctly on > > > JFrame + JPanel on a stand-alone application. Here,¡± > > > Correctly¡± means the chemical structure image is > > > correct ,from the eyes of chemists, and the > > > orientation and dimension for that image are the same > > > every time while the application is run. > > > > > > > The easy one: > > You can use StructureDiagramGenerator only once in the whole process. Once > you > > have generated the coordinates, you can store them and only do a screen > refresh > > if the user presses the refresh button. > > > > The more diffucult one: > > You can help us write a "best fit" method for placing the molecule with "new" > > > coordinates such that is best superimposed with the molecule with the "old" > > coordinates. > > I had noticed this before. I just tried it in the link that you sent and
So do I (also in standalone applcaition). It seems each time the structure is displayed it calls StructureDiagramGenerator with random starting coordinates. If this can be avoided, rotation will not occur. Best fit is another issue :) Regards, Nina > it appears that each time the structure is cleaned up, it gets rotated. > > There are two possible solutions I can see: > > Going by Christoph's suggestion of doing a best fit, you could try using > the Kabsch alignment on the two molecules (though I'm not sure what will > happen when it is asked to align 2D coordinates) > > Alternatively, each time the structure is rendered, rotate the structure > so that the principal axes of inertia are aligned to some reference > frame (say the X and Y axes). This of course is only applicable is the > structures for a given molecule differ by a rotation, each time they are > generated. > > ------------------------------------------------------------------- > Rajarshi Guha <[EMAIL PROTECTED]> <http://jijo.cjb.net> > GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE > ------------------------------------------------------------------- > Every nonzero finite dimensional inner product > space has an orthonormal basis. > It makes sense, when you don't think about it. > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&opÌk > _______________________________________________ > Cdk-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cdk-user > -- ------------------------------------------------------------------ Assoc. Prof. Dr. Nina Nikolova-Jeliazkova * * Institute for Parallel Processing * * Bulgarian Academy of Sciences * IST Foundation * Acad. G. Bonchev St 25-A * The Bulgarian NREN * 1113 Sofia, Bulgaria * * Tel: +359 886 802011 * * ICQ: 10705013 http://www.ist.bg www: http://ambit.acad.bg/nina ------------------------------------------------------------------ PGP Public Key http://cert.acad.bg/pgp-keys/keys/nina-nikolova-0xEEABA669.asc 8E99 8BAD D804 1A43 27B7 7F87 CF04 C7D1 EEAB A669 ------------------------------------------------------------------ ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

