Hi John,

I have switched to CDK 2.1.1 and it works properly now. I am wondering what
caused this discrepancy in the older version.

Thanks,

On Thu, Feb 8, 2018 at 11:12 AM, Yannick .Djoumbou <y.djoum...@gmail.com>
wrote:

> Hi John,
>
> I am using CDK 1.5.13. I just copy/pasted your code, and I get exactly the
> response as I did before: 2 different InChIKeys.
>
> Thanks,
>
> Yannick
>
> On Wed, Feb 7, 2018 at 4:20 PM, John Mayfield <john.wilkinson...@gmail.com
> > wrote:
>
>> Which version are you using, works okay for me on 2.2-SNAPSHOT and not
>> much should have changed their since a few years:
>>
>> public static void main(String[] args) throws CDKException {
>>     String             smi = 
>> "C[C@]12CC[C@H]3[C@@H](CCC4=CC(O)=CC=C34)[C@@H]1CC[C@@]2(O)C#C";
>>     IChemObjectBuilder bldr = SilentChemObjectBuilder.getInstance();
>>     SmilesParser       smipar = new SmilesParser(bldr);
>>     IAtomContainer mol = smipar.parseSmiles(smi);
>>     
>> System.out.println(InChIGeneratorFactory.getInstance().getInChIGenerator(mol).getInchiKey());
>>     // not needed
>>     // AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
>>     AtomContainerManipulator.convertImplicitToExplicitHydrogens(mol);
>>     
>> System.out.println(InChIGeneratorFactory.getInstance().getInChIGenerator(mol).getInchiKey());
>> }
>>
>> You don't need to assign the atom types, but I tried with/without the
>> answer was the same.
>>
>> BFPYWIDHMRZLRN-SLHNCBLASA-N
>> BFPYWIDHMRZLRN-SLHNCBLASA-N
>>
>> John
>>
>> On 7 February 2018 at 22:06, Yannick .Djoumbou <y.djoum...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> I have been under deep debugging more for a few hours, only to find that
>>> there seem the InChIKey of molecules seem to change when I use the
>>> AtomContainerManipulator to convert implicit hydrogens into explicit ones.
>>>
>>> For instance
>>>
>>> I have the following 17-Ethinylestradiol molecule:
>>>
>>> C[C@]12CC[C@H]3[C@@H](CCC4=CC(O)=CC=C34)[C@@H]1CC[C@@]2(O)C#C
>>>
>>> PubChem CID: 5991
>>>
>>>
>>> If I use
>>>
>>>
>>> InChIGeneratorFactory inchiGenFactory = InChIGeneratorFactory.getInsta
>>> nce();
>>>
>>> System.out.println("INCHIKEY BEFORE ADDING EXPLICIT HYDROGEN: ") +
>>> inchiGenFactory.getInChIGenerator(molClone).getInchiKey());
>>>
>>>
>>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms("
>>> 17-Ethinylestradiol");
>>>
>>> AtomContainerManipulator.convertImplicitToExplicitHydrogens("
>>> 17-Ethinylestradiol");
>>>
>>>
>>> System.out.println("INCHIKEY AFTER ADDING EXPLICIT HYDROGEN: ") +
>>> inchiGenFactory.getInChIGenerator(molClone).getInchiKey());
>>>
>>>
>>> I get the following output:
>>>
>>>
>>> INCHIKEY BEFORE ADDING EXPLICIT HYDROGEN: BFPYWIDHMRZLRN-SLHNCBLASA-N
>>>
>>> INCHIKEY AFTER ADDING EXPLICIT HYDROGEN: BFPYWIDHMRZLRN-OQPPHWFISA-N
>>>
>>> This causes a problem down the path for me.
>>>
>>>
>>> An interesting point is that I used the structures generated (via
>>> isomeric SMILES) upon conversion of implicit hydrogen by CDK and visualized
>>> them using Marvin Sketch (Seee attached file), and the look identical to
>>> me. I also used the isomeric SMILES strings before and after conversion to
>>> search for same stereoisitopes in PubChem, and found the exact same
>>> structure. So I am confused as to why CDK would return different InChIKeys.
>>>
>>>
>>> Is there an explanation for this, or may be some other steps I should
>>> take to avoid this?
>>>
>>>
>>> Thank you for your consideration.
>>>
>>>
>>> Best,
>>>
>>>
>>> Yannick
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Cdk-user mailing list
>>> Cdk-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>
>>>
>>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to