From: Rajarshi G. <raj...@gm...> - 2010-05-22 11:58:51
|
Actually, createSMILES(IMolecule molecule, boolean chiral, boolean doubleBondConfiguration[]) already handles disconnected components and so essentially ignores the unspoken 'contract' that IMolecule will not have disconnected components On Sat, May 22, 2010 at 5:14 AM, Nina Jeliazkova <ni...@ac...> wrote: > Hi All, > > I might be missing something , but one could generate valid SMILES for > disconnected components like CCCCCC.CCCCCC and for example have two versions > of the method with different signatures: > > makeSmiles(IAtomContainer) - will generate smiles with dots for disconnected > compounds. > makeSmiles(IMolecule) - will throw an exception if disconnected compounds > > Regards, > Nina > > Syed Asad Rahman wrote: > > Hi All, > > So, if we provide a flag which is set if AtomContainer/Molecule holds > disconnected components. > Hence this flag can be checked by underlining implementation (if they need > connected mols). > > Just a thought! > > > > Hi Rajarshi, > > I understood that it is all to do with connectivity. Smiles are only > valid for connected structures, and IMolecules are specifically meant > to be connected. This isn't a great way to model the situation, as I > may have said before, but I can't really imagine a better way to do it > so I only grumble about it to myself when writing things like: > > makeSmiles(container.getBuilder().newInstance(IMolecule.class, container)); > > however, my guess would be that the design came about when structure > generators were being made, since intermediate (possibly disconnected) > structures were AtomContainers, and the fully connected products were > Molecules. > > gilleain > > On Sat, May 22, 2010 at 3:40 AM, Rajarshi Guha <raj...@gm...> > wrote: > > > Hi, is there a reason that SmilesGenerator takes IMolecule and not > IAtomContainer? It seems a little klunk since given an IAtomContainer > I can't cast it to IMolecule to use the generator > > -- > Rajarshi Guha > NIH Chemical Genomics Center > > ------------------------------------------------------------------------------ > > _______________________________________________ > Cdk-devel mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-devel > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Cdk-devel mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-devel > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Cdk-devel mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-devel > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Cdk-devel mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-devel > > -- Rajarshi Guha NIH Chemical Genomics Center |