On (2) you can also just remove all the Sgroup info, likely you're not even using it.
mol.setProperty(CDKConstants.CTAB_SGROUPS, null); > On Tue, 30 Oct 2018 at 16:15, John Mayfield <john.wilkinson...@gmail.com> wrote: > 1) You can just include cdk-legacy and use the existing, but the > functionality was just a connivence the same as getMinMax(container) but > without the Java AWT dependency which caused problems for Andriod/SWT. IIRC > this was the only place AWT was use in the core package. If you just want > the width/height use: get2DDimension. Note this was 4+ years ago :-) > https://github.com/cdk/cdk/commit/214785ce18e2d06f1ba7d9fddc82c0ea9753a385#diff-9a119f1ec045c70b21aa694d01bbc773 > 2) Looks like a bug, but you really really really should not be using > clone. > > On Tue, 30 Oct 2018 at 15:51, Syed Asad Rahman <s9a...@gmail.com> wrote: > >> Thanks. >> >> >> >> I have started to play with the new release. >> >> Got few regression which is fine with API changes. >> >> >> >> Any pointer please? >> >> >> >> Q1) What is the equivalent of GeometryTools.getRectangle2D in the new >> GeometryUtil? >> >> import static org.openscience.cdk.geometry.GeometryTools.getRectangle2D; >> >> Q2) >> >> IAtomContainer clone = org.clone(); >> >> >> >> Throws java.lang.ClassCastException: java.util.ArrayList cannot be cast >> to org.openscience.cdk.sgroup.SgroupBracket >> >> java.lang.ClassCastException: java.util.ArrayList cannot be cast to >> org.openscience.cdk.sgroup.SgroupBracket >> >> at >> org.openscience.cdk.tools.manipulator.SgroupManipulator.copy(SgroupManipulator.java:108) >> >> at >> org.openscience.cdk.AtomContainer.clone(AtomContainer.java:1408) >> >> >> >> *From: *John Mayfield <john.wilkinson...@gmail.com> >> *Date: *Tuesday, 30 October 2018 at 15:39 >> *To: *Syed Asad Rahman <s9a...@gmail.com> >> *Cc: *cdkuser <cdk-user@lists.sourceforge.net> >> *Subject: *Re: [Cdk-user] CDK v2.2 >> >> >> >> Yes, but there has been no changes to SilentChemObjectBuilder...? >> >> >> >> - I did try testing RDT with the new AtomContainer APIs but your tests >> took too long to run and I have stuff to do :-). >> >> - Likewise I did the same with Ambit but there are integration tests with >> dependencies on DBs etc so difficult to see if there is actually anything >> wrong. Bigger problem in Ambit is extended type (e.g. SuppleAtomContainer) >> which needs to implement some new methods. Often trivial stuff convenience >> stuff that could be resolved with Java 8 and default method implementations >> on interfaces, but we're currently on Java 7 so not an option. >> >> >> >> John >> >> >> >> On Tue, 30 Oct 2018 at 14:47, Syed Asad Rahman <s9a...@gmail.com> wrote: >> >> Thank you John and Developers! >> >> >> >> This is a fantastic news! >> >> One quick question before I pull it into SMSD and RDT - Is >> SilentChemObjectBuilder thread safe? >> >> Best wishes, >> >> -Asad >> >> >> >> *From: *John Mayfield <john.wilkinson...@gmail.com> >> *Date: *Tuesday, 30 October 2018 at 12:01 >> *To: *cdkuser <cdk-user@lists.sourceforge.net> >> *Subject: *[Cdk-user] CDK v2.2 >> >> >> >> Dear CDK users, >> >> >> >> CDK 2.2 is now released and can be obtained from Maven central or the >> GitHub <https://github.com/cdk/cdk/releases/tag/cdk-2.2> site. The full >> release >> notes <https://github.com/cdk/cdk/wiki/2.2-Release-Notes> provide >> details on the new features and changes. >> >> >> >> As noted in v2.1/v2.1.1 the AtomContainer2 >> <https://github.com/cdk/cdk/wiki/AtomContainer2> is now the default so >> if you didn't try running v2.1/v2.1.1 with the flag >> CdkUseLegacyAtomContainer=false you may some breakages. As highlighted on >> the wiki page <https://github.com/cdk/cdk/wiki/AtomContainer2> this >> normally just requires addAtom/Bond statements be reordered and using >> ``Objects.equals(container1, container2)`` instead of reference comparison >> (container1 == container2). >> >> >> >> - John >> >> >> >>
_______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user