Hi, Ah right, I got distracted by a related question - do isomorphic graphs give the same output? I think that it would be nice (if possible) that a SDG have both properties; that is, it should be deterministic and atom order indifferent. These both seem to be testable things, since the coordinates can be easily compared for equivalent atoms under permutations (including the identity).
Interestingly, the code avoids some non-determinism, as suggested in the comments on lines 353-357: "Order the rings because SSSRFinder.findSSSR() returns rings in an undeterministic order." so, to generate diagrams that differ in the placement of the rings, you could permute the sssr. Unfortunately, I don't know this part of the CDK code well enough to know where the randomness occurs. Casual inspection doesn't show any calls to random number generators... :) gilleain On Tue, Mar 23, 2010 at 1:28 PM, JEAN MARC NUZILLARD <jm.nuzill...@univ-reims.fr> wrote: > Hi, > > My first question was about identical inputs giving > different 2D coordinate sets, depending on... on what? > On a call to a random number generator? > > In a bridged polycyclic system, there is more > than one way to "remove" rings in order to get a > simpler ring system that would make a good starting point > for the drawing of the complete system. > May be it could be possible to enumerate these possibilities > without considering all atom number permutations. > This was my second question. > > Jean-Marc Nuzillard > www.univ-reims.fr/LSD > > Message de gilleain torrance <gilleain.torra...@gmail.com>: > >> Hi, >> >> There is a way to get different graphs for the same molecule, but >> there will be quite a few of them for camphor. It has 11 atoms, and >> only one permutation that is automorphic (swapping the methyl groups >> attached to the bridgehead carbon), so there are 11! / 2 = 19,958,400 >> permutations of the atoms. I'm not sure if there is a way to cut down >> this number. >> >> gilleain torrance >> >> On Mon, Mar 22, 2010 at 8:41 PM, JEAN MARC NUZILLARD >> <jm.nuzill...@univ-reims.fr> wrote: >>> Hi, >>> >>> I created two identical molecules by calling addAtoms and addBonds >>> in the same order with the same arguments and then I generated coordinates >>> using a StructureDiagramGenerator. >>> Looking with Jmol at the molecules in the corresponding SD file, >>> it appeared that the graphs were different. >>> Repeting the whole process, I sometimes get the same graphs, >>> but sometimes different ones. >>> The molecule is camphor. I am usign CDK-1.2.5. >>> >>> Is there a non-deterministic part in the SDG algorithm? >>> Is there a way to purposely get different graphs for the same molecule, >>> thus allowing the user to choose the best looking one? >>> >>> Jean-Marc Nuzillard >>> www.univ-reims.fr/LSD >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> Cdk-user mailing list >>> Cdk-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/cdk-user >>> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Cdk-user mailing list >> Cdk-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/cdk-user >> >> > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Cdk-user mailing list > Cdk-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cdk-user > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user