Hi all,
I would like to nominate the following classes to be moved to a different
package to fix the hierarchy in CDK. Currently, the classes are sorted by
function in chemoinformatics, e.g. graph related stuff is in cdk.graph and
layout algorithms are in cdk.layout etc.
Below is the list of class I think are misplaced:
cdk.ChemFile > cdk.io
cdk.tools.AtomTypeFactory > cdk.config
cdk.tools.IsotopeFactory > cdk.config (*1)
cdk.tools.ConnectivityChecker > cdk.graph
cdk.tools.HOSECodePredictor > cdk.graph.invariant
cdk.tools.MathTools > cdk.math
cdk.tools.Projector > cdk.geometry
cdk.tools.RandomNumbersTool > cdk.math
cdk.iupac.generator.tools.AdjecencyMatrixTools > cdk.graph.matrix (*2)
cdk.iupac.parser.MoleculeBuilder > cdk.template
cdk.smiles.Primes > cdk.math
cdk.layout.TemplateHandler > cdk.template
cdk.graph.invariant.GIMatrix > cdk.math
*1: the data files in cdk.config should move to cdk.config.data
*2: there are a number of other implementations of graph matrices around; this
should also be put in this matrix. But could not find them quickly.
I would also propose to do this:
rename the cdk.isomorphism package to cdk.graph.isomorphism,
and cdk.ringsearch to cdk.graph.ringsearch:
cdk.isomorphism.* > cdk.graph.isomorphism
cdk.ringsearch.* > cdk.graph.ringsearch
There are also classes around the CDK library implementing things like nodes,
paths etc... this should be unified, or at least move to cdk.graph:
cdk.isomorphism.mcss.RGraph
cdk.isomorphism.mcss.RNode
cdk.ringsearch.Path
cdk.structgen.deterministic.Graph
cdk.structgen.stochastic.operator.ChemGraph
Three(!) different implementations of a graph??
Unifying this would require more work, and is to me of lower priority.
About the proposed cdk.graph.matrix package: there are several graph based
matrices found in CDK, but at different locations, and sometimes not even in
a separate class, making them difficult accesible to other classes. Which is
why I propose to refactor things a bit, and move them into the proposed new
package. These matrices did I find:
cdk.iupac.generator.tools.AdjecencyMatrixTools.class
cdk.AtomContainer.getConnectionMatrix()
cdk.AtomContainer.getAdjacencyMatrix()
cdk.graph.invariant.EquivalentClassPatitioner (a few matrix types defined)
cdk.graph.invariant.HuLuIndex.getExtendedAdjecencyMatrix()
cdk.graph.invariant.MorganNumbersTool.getMorganNumbers() > morganMatrix
cdk.graph.PathTools.computeFloydAPSP > allpairsshortestpath matrix
cdk.layout.AtomPlacer > another morgan matrix?
cdk.structgen.deterministic .GENMDeterministicGenerator > yet another
adjecency matrix
I propose to make each kind of matrix a separate class, with a unified
interface. A first step would be to place all these matrix kinds in separate
classes (reasonable priority), and in second step, have the other classes use
these new classes instead of there local implementation (lower priority).
Ok, comments, rants, flame wars appreciated, but constructive arguments and
supportive emails preferred.
Egon
