Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#528 GeometryTools 2D/3D check unification [master]

Needs_Review
closed
nobody
master (162)
5
2012-10-28
2012-07-20
John May
No

This patch (for master) unifies the behaviour of GeometryTools.has2DCoordinates() and GeometryTools.has3DCoordinates().

  • the method now will return true only if all atoms in the container have 2D coordinates (or 3D for the 3D method).
  • adds a new enumeration to GeometryTools (CoordinateCoverage) which is returned from the get2DCoordinateCoverage (equivalent 3D method also).
  • the GeometryToolsTest was added to MStandardTests
  • several unit tests for the new methods were written
  • marked has2DCoordinatesNew for deprecation
  • small change in AtomPlacer that takes advantage of the \'has2DCoordinates\' behaviours
  • other uses in CDK (tests)
    • CML2Test needed no changes
    • JumboTest no changes
    • StructureDiagramGenerator no changes

I used tools/extractTestStats.bsh to overview all tests, removing the times and doing a \'diff\' pre/post patch shows the following:

7c7
< standard: run=644 failed=7 error=2


standard: run=688 failed=8 error=2
16c16
< smiles: run=257 failed=7 error=0


smiles: run=257 failed=7 error=1
46c46
< total: run=17733 failed=78 error=17


total: run=17777 failed=79 error=18

The extra fail on standard is due to a test which will randomly fail (will post bug on this) and the other error on smiles was from a timeout.

J

Discussion

  • Looks good! I'm a fan of your patches :)

    Let me know what you want to do with those suggestions... I left them as comments in your GitHub branch.

     
  • Has been applied.