Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cdk/cdk
base: a9a27edc3473
Choose a base ref
...
head repository: cdk/cdk
compare: 938306a0387e
Choose a head ref
  • 9 commits
  • 57 files changed
  • 1 contributor

Commits on Nov 3, 2012

  1. Added unit test for tetrahedral chirality stereo element

    Change-Id: Ia8db95fe4d3af3e518a030f971a525a63ea2dcda
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    83333d7 View commit details
    Browse the repository at this point in the history
  2. Added ability to setStereoElements - this was required due to clone()…

    … being shall on List. We need to be able to set a new array when have cloned a AtomContainer
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    84f8f0e View commit details
    Browse the repository at this point in the history
  3. Added unit tests for DoubleBond and AtomParity cloning

    Change-Id: I1c0d5ee2f6bbe931492cf826a25cfde56d758716
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    a7e4255 View commit details
    Browse the repository at this point in the history
  4. Reworked AtomContainer.clone() so it is clear what is going on. We no…

    …w use a HashMap between the original and cloned atoms to avoid to a linear search each time the atom mapping is needed. This is also useful when we add StereoElement cloning (not yet implemented). We also store a bond mapping as well - we will need the bond mapping for double bond stereo chemistry. The stereo elements in the clone need to be set to an empty array on the clone so we don't remove elements from the original (cloning odditity). It was also clear we need to change the clone() method on Polymer which currently undoes all the cloning work we do in the AtomContainer. For all clone instances I added some code to correctly create HashMaps that won't need to resized. The default HashMap implementation works best at 0.75 capacity - we therefore need to do some simple arithmetic to ensure we don't get a resize. The implemented method is what is used in the Guava library.
    
    Change-Id: I1b467707c630b1854a6665df67899a695427dfba
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    f98b04a View commit details
    Browse the repository at this point in the history
  5. Added a 'map' method on all IStereoElements. The map method allows a …

    …stereo element on one container/molecule to mapped to a stereo element on another. This mapping is achieved using two symbol tables, one for atoms and one for bonds. All methods are null safe and the mapping will not fail if any content in the stereo elements is null. The mapping simplifies the cloning of molecules/atom containers but could also be used when comparing isomorphic graphs.
    
    Change-Id: I12c40b34a9b0b30f499eaa0ef29ae77e5caf07b0
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    267ec79 View commit details
    Browse the repository at this point in the history
  6. Added stereo element shallow copy

    Change-Id: Icbcb095271a5121c58fec1bca43e1f508b6a0e8c
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    7a1f243 View commit details
    Browse the repository at this point in the history
  7. Added deep cloning of stereo element to atom containers and polymers …

    …(atom container subclass)
    
    Change-Id: I344ba0fb0409f2e35858501e33b7d3ddcc8553a9
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    a46545d View commit details
    Browse the repository at this point in the history
  8. Used return covariance on clone() to provide cleaner front-end API

    Change-Id: Idaf10f55a17ba56bbf7052b4932c0f9b335db1c3
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    c3d4af0 View commit details
    Browse the repository at this point in the history
  9. Added unit tests for bugs 1270 (removalAllElements should remove ster…

    …eo elements) and 1273 (double bond stereo chemistry constructor should throw an exception on wrong input). Added @cdk.bug tag for bug 1264 (stereo element cloning)
    
    Change-Id: I71ebc95fe2fead344c305b7b505573378892c155
    Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
    johnmay authored and egonw committed Nov 3, 2012
    Copy the full SHA
    938306a View commit details
    Browse the repository at this point in the history