#653 New SMSD code

Needs_Revision
closed
nobody
smsd (1)
master
1
2013-12-18
2013-07-08
John May
No

This patch adds the new SMSD code. I've gone though changes since the old code and added those which weren't already corrected in the main SMSD code. Unfortunately the only way I found was to remove the whole tree then reimport SMSD.

Remaining issues,
- fixed a couple of issues which you can see in final few commits
- several test failures that Asad is working on
- ~70 javadoc errors to fix - should be quite easy

Managed to import the SMSD history so there's about ~300 commits. Really can't check all of these :(. Not ideal but I think it's the best we can do.

branch:46fe28a

Long term solution would defiantly be to abstract over the functionality. Having interfaces for isomorphism/subgraph isomorphism and MCS is a must. I'll bring this up in the next hangout.

Discussion

  • Egon Willighagen

    • Group: Needs_Review --> Needs_Revision
     
  • Egon Willighagen

    John, it's not just a replacement of SMSD... there is other stuff changed too, and even test classes from cdk/coverage/ outright removed ...

    To see what changed besides smsd, try:

    git diff master.. | grep "^diff" | cut -d' ' -f3 | grep -v "a/src/test/org/openscience/cdk/smsd/" | grep -v "a/src/main/org/openscience/cdk/smsd"

    Which gives me:

    a/src/main/org/openscience/cdk/DynamicFactory.java
    a/src/main/org/openscience/cdk/tautomers/InChITautomerGenerator.java
    a/src/test/org/openscience/cdk/coverage/ChargesCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/CipCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/CoverageAnnotationTest.java
    a/src/test/org/openscience/cdk/coverage/HashCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/PcoreCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/QsaratomicCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/QsarbondCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/RenderCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/RenderawtCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/RenderbasicCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/RenderextraCoverageTest.java
    a/src/test/org/openscience/cdk/coverage/TautomerCoverageTest.java
    a/src/test/org/openscience/cdk/debug/DebugRingTest.java
    a/src/test/org/openscience/cdk/dict/OWLReactTest.java
    a/src/test/org/openscience/cdk/fingerprint/EStateFingerprinterTest.java
    a/src/test/org/openscience/cdk/fingerprint/LingoFingerprinterTest.java
    a/src/test/org/openscience/cdk/fingerprint/MACCSFingerprinterTest.java
    a/src/test/org/openscience/cdk/fingerprint/PubchemFingerprinterTest.java
    a/src/test/org/openscience/cdk/fingerprint/SignatureFingerprinterTest.java
    a/src/test/org/openscience/cdk/fragment/ExhaustiveFragmenterTest.java
    a/src/test/org/openscience/cdk/fragment/FragmentUtilsTest.java
    a/src/test/org/openscience/cdk/fragment/MurckoFragmenterTest.java
    a/src/test/org/openscience/cdk/graph/SpanningTreeTest.java
    a/src/test/org/openscience/cdk/graph/invariant/EquivalentClassPartitionerTest.java
    a/src/test/org/openscience/cdk/graph/matrix/TopologicalMatrixTest.java
    a/src/test/org/openscience/cdk/io/GamessReaderTest.java
    a/src/test/org/openscience/cdk/io/Gaussian98ReaderTest.java
    a/src/test/org/openscience/cdk/io/Mol2WriterTest.java
    a/src/test/org/openscience/cdk/io/cml/CML2WriterTest.java
    a/src/test/org/openscience/cdk/io/program/GaussianInputWriterTest.java
    a/src/test/org/openscience/cdk/modulesuites/MioTests.java
    a/src/test/org/openscience/cdk/modulesuites/MioformatsTests.java
    a/src/test/org/openscience/cdk/modulesuites/MiordfTests.java
    a/src/test/org/openscience/cdk/modulesuites/MpdbTests.java
    a/src/test/org/openscience/cdk/pharmacophore/PharmacophoreAngleBondTest.java
    a/src/test/org/openscience/cdk/pharmacophore/PharmacophoreAtomTest.java
    a/src/test/org/openscience/cdk/pharmacophore/PharmacophoreBondTest.java
    a/src/test/org/openscience/cdk/pharmacophore/PharmacophoreQueryAngleBondTest.java
    a/src/test/org/openscience/cdk/pharmacophore/PharmacophoreQueryAtomTest.java
    a/src/test/org/openscience/cdk/pharmacophore/PharmacophoreQueryBondTest.java
    a/src/test/org/openscience/cdk/pharmacophore/PharmacophoreQueryTest.java
    a/src/test/org/openscience/cdk/qsar/DescriptorNamesTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/atomic/PartialTChargePEOEDescriptorTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_G3RTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GDRTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GHR_topolTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSRTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/molecular/AutocorrelationDescriptorMassTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/molecular/FMFDescriptorTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/molecular/HybridizationRatioDescriptorTest.java
    a/src/test/org/openscience/cdk/qsar/descriptors/molecular/KierHallSmartsDescriptorTest.java
    a/src/test/org/openscience/cdk/renderer/elements/AbstractElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/ArrowElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/AtomSymbolElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/ElementGroupTest.java
    a/src/test/org/openscience/cdk/renderer/elements/GeneralPathTest.java
    a/src/test/org/openscience/cdk/renderer/elements/LineElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/OvalElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/PathElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/RectangleElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/RingElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/TextElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/TextGroupElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/WedgeLineElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/path/AbstractPathElementTest.java
    a/src/test/org/openscience/cdk/renderer/elements/path/CubicToTest.java
    a/src/test/org/openscience/cdk/renderer/elements/path/LineToTest.java
    a/src/test/org/openscience/cdk/renderer/elements/path/MoveToTest.java
    a/src/test/org/openscience/cdk/renderer/elements/path/QuadToTest.java
    a/src/test/org/openscience/cdk/renderer/font/AWTFontManagerTest.java
    a/src/test/org/openscience/cdk/renderer/font/AbstractFontManagerTest.java
    a/src/test/org/openscience/cdk/renderer/generators/AbstractGeneratorTest.java
    a/src/test/org/openscience/cdk/renderer/generators/parameter/AbstractGeneratorParameterTest.java
    a/src/test/org/openscience/cdk/silent/ReactionSetTest.java
    a/src/test/org/openscience/cdk/silent/RingSetTest.java
    a/src/test/org/openscience/cdk/silent/RingTest.java
    a/src/test/org/openscience/cdk/similarity/LingoSimilarityTest.java
    a/src/test/org/openscience/cdk/similarity/TanimotoTest.java
    a/src/test/org/openscience/cdk/smiles/smarts/parser/visitor/SmartsQueryVisitorTest.java
    a/src/test/org/openscience/cdk/tools/periodictable/PeriodicTableElementTest.java
    a/src/test/org/openscience/cdk/tools/periodictable/PeriodicTableTest.java

    Now many of these files seem to be purely a EOF change, but certainly not all.

    Extending the earlier command, I get these suspect commits which change more then just SMSD files:

    $ git diff master.. | grep "^diff" | cut -d' ' -f3 | grep -v "a/src/test/org/openscience/cdk/smsd/" | grep -v "a/src/main/org/openscience/cdk/smsd" | cut -c3-100 | xargs git log --oneline master.. --

    af7864e Correctting error message in dynamic factory.
    35fb346 Required test dependencies
    b053835 Migrating SMSD packages.
    324b0be Removing old SMSD test classes.
    fffc71d Updating to new SMSD API.
    45f45b2 Required dependency.

    Perhaps you can also try to rebase it on the latest master: I got a conflicts, some of which were outside SMSD which made me suspicious:


    CONFLICT (rename/delete): src/test/org/openscience/cdk/coverage/TautomerCoverageTest.java deleted in Removing old SMSD test classes. and renamed in HEAD. Version HEAD of src/test/org/openscience/cdk/coverage/TautomerCoverageTest.java left in tree.
    CONFLICT (rename/delete): src/test/org/openscience/cdk/coverage/HashCoverageTest.java deleted in Removing old SMSD test classes. and renamed in HEAD. Version HEAD of src/test/org/openscience/cdk/coverage/HashCoverageTest.java left in tree.
    CONFLICT (rename/delete): src/test/org/openscience/cdk/coverage/CipCoverageTest.java deleted in Removing old SMSD test classes. and renamed in HEAD. Version HEAD of src/test/org/openscience/cdk/coverage/CipCoverageTest.java left in tree.
    CONFLICT (rename/delete): src/main/org/openscience/cdk/smsd/filters/BaseFilter.java deleted in Removing old SMSD test classes. and renamed in HEAD. Version HEAD of src/main/org/openscience/cdk/smsd/filters/BaseFilter.java left in tree.
    Failed to merge in the changes.
    Patch failed at 0145 Removing old SMSD test classes.

    When you have resolved this problem run "git rebase --continue".
    If you would prefer to skip this patch, instead run "git rebase --skip".
    To check out the original branch and stop rebasing run "git rebase --abort".


     
  • Egon Willighagen

    Oh, and I forgot... it doesn't compile for me either:

    compile-module:
    [echo] Compiling classes for CDK's smsd module from src/main...
    [echo] Datafiles defined: ${module.datafiles.present}
    [echo] Extra files defined: ${module.extrafiles.present}
    [echo] CDK dependencies defined: true
    [echo] Library dependencies defined: true
    [echo] Developer Library dependencies defined: ${module.devellibdepends.present}
    [echo] Autogenerated files specified: ${module.autogenerated.present}
    [mkdir] Created dir: /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd
    [mkdir] Created dir: /home/egonw/var/Projects/SourceForge/git/cdk/build/smsd
    [copy] Copying 85 files to /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd
    [javac] Compiling 85 source files to /home/egonw/var/Projects/SourceForge/git/cdk/build/smsd
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/ChemicalFilters.java:47: error: cannot find symbol
    [javac] public class ChemicalFilters extends BaseFilter {
    [javac] ^
    [javac] symbol: class BaseFilter
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:48: error: BaseMapping is not abstract and does not override abstract method toString() in IAtomMapping
    [javac] public class BaseMapping extends ChemicalFilters implements IAtomMapping {
    [javac] ^
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:156: error: cannot find symbol
    [javac] IAtomContainer reactant = getQuery();
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: class BaseMapping
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:157: error: cannot find symbol
    [javac] IAtomContainer product = getTarget();
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: class BaseMapping
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:242: error: cannot find symbol
    [javac] return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget())
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: class BaseMapping
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:242: error: cannot find symbol
    [javac] return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget())
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: class BaseMapping
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:248: error: cannot find symbol
    [javac] return this.getQuery();
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:253: error: cannot find symbol
    [javac] return this.getTarget();
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:292: error: cannot find symbol
    [javac] return makeBondMapsOfAtomMaps(getQuery(), getTarget(), getMCSList());
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: class BaseMapping
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/BaseMapping.java:292: error: cannot find symbol
    [javac] return makeBondMapsOfAtomMaps(getQuery(), getTarget(), getMCSList());
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: class BaseMapping
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/helper/MoleculeInitializer.java:121: warning: [deprecation] setTimeout(long) in AllRingsFinder has been deprecated
    [javac] arf.setTimeout(90000);
    [javac] ^
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/EnergyFilter.java:107: error: cannot find symbol
    [javac] IAtomContainer educt = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class, chemfilter.getQuery());
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/EnergyFilter.java:108: error: cannot find symbol
    [javac] IAtomContainer product = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class, chemfilter.getTarget());
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/FragmentFilter.java:98: error: cannot find symbol
    [javac] IAtomContainer Educt = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class, chemfilter.getQuery());
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/FragmentFilter.java:99: error: cannot find symbol
    [javac] IAtomContainer product = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class, chemfilter.getTarget());
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:110: error: cannot find symbol
    [javac] double atomScore = getAtomScore(score, atomMapMCS, chemfilter.getQuery(), chemfilter.getTarget());
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:110: error: cannot find symbol
    [javac] double atomScore = getAtomScore(score, atomMapMCS, chemfilter.getQuery(), chemfilter.getTarget());
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:111: error: cannot find symbol
    [javac] Map<IBond, IBond=""> bondMaps = makeBondMapsOfAtomMaps(chemfilter.getQuery(), chemfilter.getTarget(), atomMapMCS);
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:111: error: cannot find symbol
    [javac] Map<IBond, IBond=""> bondMaps = makeBondMapsOfAtomMaps(chemfilter.getQuery(), chemfilter.getTarget(), atomMapMCS);
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:113: error: cannot find symbol
    [javac] if (chemfilter.getQuery().getBondCount() > 1
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:114: error: cannot find symbol
    [javac] && chemfilter.getTarget().getBondCount() > 1
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:115: error: cannot find symbol
    [javac] && !(chemfilter.getQuery() instanceof IQueryAtomContainer
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:116: error: cannot find symbol
    [javac] || chemfilter.getTarget() instanceof IQueryAtomContainer)) {
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:117: error: cannot find symbol
    [javac] List<IAtomContainer> subgraphRList = getMappedFragment(chemfilter.getQuery(), atomMapMCS.getMappings().keySet());
    [javac] ^
    [javac] symbol: method getQuery()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] /home/egonw/var/Projects/SourceForge/git/cdk/build/src/smsd/org/openscience/cdk/smsd/filters/StereoFilter.java:119: error: cannot find symbol
    [javac] List<IAtomContainer> subgraphPList = getMappedFragment(chemfilter.getTarget(), atomMapMCS.getMappings().values());
    [javac] ^
    [javac] symbol: method getTarget()
    [javac] location: variable chemfilter of type ChemicalFilters
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 24 errors
    [javac] 2 warnings

    BUILD FAILED

     
  • John May

    John May - 2013-09-24
     
  • John May

    John May - 2013-09-24

    Going to have another shot at this after ~Oct 10th.

     
  • John May

    John May - 2013-10-06

    Update: Tried patching again the but the test run for a very long time (I haven't let them finish). Asad has now tried patching it but again the tests still take a long time to run.

     
  • John May

    John May - 2013-12-18

    Haven't heard anything more from this on Asad, we could try again in future but for now this isn't feasible.

     
  • John May

    John May - 2013-12-18
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks