Hi Nick,

Please use the 1.5.3 release. Technically 1.5 is unstable but it has a lot 
problems (like this) fixed.

Thanks,
J

On 5 Sep 2013, at 10:56, "Nick Vandewiele" <[email protected]> wrote:

> Hi,
>  
> I read in an inchi, converted it into an IAtomContainer with one AtomParity. 
> I clone it and suddenly, the reference of the central atom in the 
> IAtomContainer is lost, i.e. the atom number for that central atom in that 
> cloned molecule is -1. Cloning keeps the stereoelements, but somehow forgets 
> the references.
>  
> Is that normal behavior or just a bug?
>  
> Below, example code that I used.
>  
> String inchi = "InChI=1S/C4H10O/c1-3-4(2)5/h4-5H,3H2,1-2H3/t4-/m1/s1";// 
> (R)-2-butanol
>             InChIGeneratorFactory factory = 
> InChIGeneratorFactory.getInstance();
>             // Get InChIToStructure
>             InChIToStructure intostruct = factory.getInChIToStructure(inchi,
>                         DefaultChemObjectBuilder.getInstance());
>  
>             IAtomContainer ac = intostruct.getAtomContainer();
>             for(IStereoElement el : ac.stereoElements())
>                   if(el instanceof AtomParity){
>                         AtomParity ap = (AtomParity)el;
>                         IAtom a = ap.getAtom();
>                         System.out.println(ac.getAtomNumber(a));//3
>                   }
>            
>            
>            
>             IAtomContainer molCl = null;
>             try {
>                   molCl = (IAtomContainer) ac.clone();
>             } catch (CloneNotSupportedException e) {
>             }
>            
>            
>             for(IStereoElement el : molCl.stereoElements())
>                   if(el instanceof AtomParity){
>                         AtomParity ap = (AtomParity)el;
>                         IAtom a = ap.getAtom();
>                         System.out.println(molCl.getAtomNumber(a));//-1
>                   }
>            
> regards
> Nick
>  
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk_______________________________________________
> Cdk-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cdk-user

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to