Hmmm, this looks like a SMILES round tripping problem to me.
I suggest that the SmilesGenerator should produce lower case SMILES by
default now with the SmilesParser not deducing bond orders anymore but
setting the aromaticity flags.
If I remember right the rationale for removing the bond deducing code
from the SmilesParser was to get WYSIWYG molecules from the
SmilesParser. In other words, the SmilesParser doesn't assume
single/double bonds that are not present in the SMILES strings but
rather marks aromatic atoms as such. The WYSIWYG SMILES representation
of a molecule with set aromaticity flags would be the use of lower case
atom symbols, in my eyes.
Best regards,
Andreas
Egon Willighagen wrote:
> On Tue, Apr 1, 2008 at 2:17 PM, Gianfranco Frau <[EMAIL PROTECTED]> wrote:
>> please look out this code. It creates a IMolecule object from SMILES of
>> benzene, uses the aromaticity detector and than generates again the SMILES
>> from the molecule.
>
> First of all, the SmilesGenerator will not use 'c' in its output,
> unless you explicitly indicate you want that. (Possible).
>
>> The code print out the string: "C1CCCCC1", so a molecule without
>> aromaticity.
>
> The above code does not apply deduction of double bond orders. The
> input SMILES does not explicitly have bond orders, and the
> SmilesParser in trunk/ will not do this for you automatically.
>
>> Is it correct? What's the matter?
>
> However, the combination is a bit ugly in use... adding the extra line
> below should address the issue, though:
>
>> try{
>>
>> //create molecule parsing the smile
>> SmilesParser sp = new
>> SmilesParser(DefaultChemObjectBuilder.getInstance());
>> IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance();
>> IMolecule m = builder.newMolecule( sp.parseSmiles("c1ccccc1"));
>>
>> //aromaticity
>> AtomContainerManipulator.percieveAtomTypesAndConfigerAtoms(m);
>> CDKHueckelAromaticityDetector.detectAromaticity(m);
>
> DeduceBondSystemTool dbst = new DeduceBondSystemTool();
> molecule = dbst.fixAromaticBondOrders(molecule);
>
>> //generation of new fingerprint
>> SmilesGenerator sg = new SmilesGenerator();
>>
>> System.out.print(sg.createSMILES(m));
>>
>> }
>>
>> catch (Exception e){
>> e.printStackTrace();
>> }
>
> Please let me knows if this solved your problem.
>
> Kind regards,
>
> Egon Willighagen
>
--
Andreas Schüller
PhD student in the research group of Prof. Dr. Gisbert Schneider
Johann Wolfgang Goethe University
Beilstein-endowed Chair for Chemoinformatics
Building B - 3rd floor
Siesmayerstr. 70
60323 Frankfurt am Main
Germany
Tel.: +49 69 798 24879
Fax: +49 69 798 24880
http://www.modlab.de/
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user