I am proposing a quite radical restructuring of the source tree.
RATIONALE: the source-directory is quite cluttered with files. One does
not immediatly know whether a specific file belongs to a fileformat, a
core class or some utility class. Also, the data files are in there,
although they are not code. It is also quite hard at the moment to
switch off some fileformats when debugging others because all source
files are randomly specified in the Makefile.
PROPOSAL: This is the proposal:
1. The name of the top-source-directory:
We pondered renaming $SRCDIR from $TOPDIR/src/ to $TOPDIR/openbabel/. I
think this is not neccessary anymore. There were issues with including
headers and stuff, but once we switch to automake, there should be no
problems so this issue is purely cosmetic. If we are going to make the
changes proposed below, it would be a good time to change the whole
directory, too. I don't care about the name though.
2. The current subdirectories in $SRCDIR:
- the stuff in math/ should be put into util/
- windows/ and macos/ do not seem to contain any code. Therefore, I
propose to move them to $TOPDIR. That's not really crucial though and
can still be done at a later date.
3. The data files:
I propose putting the data .txt files into $TOPDIR/data. At the same
time we could think about dropping the .txt extension, I find that
highly misleading on Unix, but perhaps its required on other platforms?
If we keep the generated binary headers at all, they should stay
somewhere in $SRCDIR I guess.
4. The source files in $SRCDIR: I still don't have intimate knowledge
about the source-tree, so please correct me where I'm wrong here.
- put all the base classes and headers into $SRCDIR/base/.
This would be on a first glance:
generic, base, mol, atom, bond, residue, ring, chains
Also, cwrap, main should be in there I think.
- put all fileformats into $SRCDIR/fileformats/.
Nothing much to say here, except that having them seperate was probably
the major motivation for this proposal.
- put the utility stuff in $SRCDIR/util/.
oberror, obifstream, molchrg, grid, fileformat, matrix, math/*,
bondtyper, data, chiral
- not sure about these:
bitvec, binary, parsmat, smi, molvector typer, patty, rotor
IMPLEMENTATION: If this change is accepted, I think it would be easiest
to do this during/after the switch to automake. This way, only small
parts of the Makefiles needed to be changed and no big Makefile-snippets
need to be copied around and inter-dependencies checked. Every
subdirectory would build a convieniance-library which all get linked
together to libopenbabel.a/babel. I am of course willing to do the
TIMING: If accepted, should the switch be done before or after the next
release? When is the next release scheduled? Should the switch to
automake be done before/after the next release?
What do you think about this proposal? Does it make sense? Do only parts
of it make sense, like seperating the fileformats or relocating the data