Hi all,

SMILESGenerator creates invalid smiles (SmilesParser can't read it anymore)
for ZINC58167940.

The generated smiles is:

O=C(Nc1cccc(c1)c2nnn[[nH]-]2)C4Oc3ccc(cc3C4)Cl

SMILES Generation is done like this:

AtomContainerManipulator.percieveAtomTypesAndConfigureUnsetProperties(mol);
mol = (IAtomContainer)
AtomContainerManipulator.removeHydrogensPreserveMultiplyBonded(mol);
CDKHueckelAromaticityDetector.detectAromaticity(mol);
SmilesGenerator generator = new SmilesGenerator(true);
String smiles = generator.createSMILES(mol);

After reading the molfile:

IAtomContainer mol = (IAtomContainer) molReader.read((ChemObject) new
AtomContainer(20, 20, 0, 0));
logger.debug("Perceiving Atom Types and configuring unset properties...");
AtomContainerManipulator.percieveAtomTypesAndConfigureUnsetProperties(mol);
boolean isAromatic = CDKHueckelAromaticityDetector.detectAromaticity(mol);
mol.setFlag(CDKConstants.ISAROMATIC, isAromatic);
CDKHydrogenAdder hydrogenAdder =
CDKHydrogenAdder.getInstance(mol.getBuilder());
hydrogenAdder.addImplicitHydrogens(mol);


My question is:

Is there an additional detection step or other tool I need to use to deal
with the charge? Or is it a bug?

Best Regards,

Joos

Molfile for ZINC58167940:

ZINC58167940
  -OEChem-04211110313D

 40 42  0     0  0  0  0  0  0999 V2000
    0.0246   -0.4743    2.6161 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0222   -0.8880    1.1670 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0225   -2.1540    0.7107 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0191   -2.0954   -0.7070 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0170   -0.7817   -1.0547 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0133   -0.0402    0.0940 N   0  0  0  0  0  0  0  0  0  0  0  0
    0.0055    1.3500    0.1603 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0096    2.1950   -0.8912 N   0  5  0  0  0  0  0  0  0  0  0  0
   -0.0129    3.4928   -0.3548 N   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0001    3.3675    0.9456 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0058    2.0720    1.2586 N   0  0  0  0  0  0  0  0  0  0  0  0
    0.0136   -0.2377   -2.4601 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0190   -3.2532   -1.6368 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.1276   -4.5399   -1.1841 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0667   -5.4381   -2.7260 S   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0865   -4.1195   -3.7600 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0919   -3.0944   -2.9474 N   0  0  0  0  0  0  0  0  0  0  0  0
   -0.1971   -4.1198   -5.2630 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.2017   -4.0365   -5.8773 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.0894   -4.0368   -7.4031 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.3959   -3.9590   -7.9769 O   0  0  0  0  0  0  0  0  0  0  0  0
    2.4037   -3.9528   -9.4058 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.0025   -0.3808    2.9690 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.5450   -1.2272    3.2081 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.5329    0.4844    2.7195 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0253   -3.0503    1.3131 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0018    4.1830    1.6536 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.0113   -0.0276   -2.7659 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.5989    0.6811   -2.4954 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.4507   -0.9731   -3.1355 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.2235   -4.9097   -0.1739 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.6840   -5.0381   -5.5913 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7867   -3.2611   -5.5841 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.6886   -3.1182   -5.5490 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.7913   -4.8952   -5.5561 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.6025   -4.9551   -7.7314 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.4999   -3.1781   -7.7243 H   0  0  0  0  0  0  0  0  0  0  0  0
    3.4316   -3.8920   -9.7633 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.9441   -4.8693   -9.7757 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.8414   -3.0923   -9.7685 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1 23  1  0  0  0  0
  1 24  1  0  0  0  0
  1 25  1  0  0  0  0
  2  6  1  0  0  0  0
  2  3  2  0  0  0  0
  3  4  1  0  0  0  0
  3 26  1  0  0  0  0
  4  5  2  0  0  0  0
  4 13  1  0  0  0  0
  5  6  1  0  0  0  0
  5 12  1  0  0  0  0
  6  7  1  0  0  0  0
  7 11  2  0  0  0  0
  7  8  1  0  0  0  0
  8  9  1  0  0  0  0
  9 10  2  0  0  0  0
 10 11  1  0  0  0  0
 10 27  1  0  0  0  0
 12 28  1  0  0  0  0
 12 29  1  0  0  0  0
 12 30  1  0  0  0  0
 13 17  1  0  0  0  0
 13 14  2  0  0  0  0
 14 15  1  0  0  0  0
 14 31  1  0  0  0  0
 15 16  1  0  0  0  0
 16 17  2  0  0  0  0
 16 18  1  0  0  0  0
 18 19  1  0  0  0  0
 18 32  1  0  0  0  0
 18 33  1  0  0  0  0
 19 20  1  0  0  0  0
 19 34  1  0  0  0  0
 19 35  1  0  0  0  0
 20 21  1  0  0  0  0
 20 36  1  0  0  0  0
 20 37  1  0  0  0  0
 21 22  1  0  0  0  0
 22 38  1  0  0  0  0
 22 39  1  0  0  0  0
 22 40  1  0  0  0  0
M  CHG  1   8  -1
M  END
$$$$
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to