Too Long Didn't Read:
        There is no more Molecule in new CDK versions only AtomContainer, this 
could be confusing - vote here: http://strawpoll.me/501772

Hi all,

As you may (or may not) know the CDK main chemical structure object is the 
AtomContainer and Molecule (excluding protein structures polymers etc). 

In the CDK 1.4 there were both instances and the distinction was a Molecule is 
connected (but this was not checked). If you are using CDK 1.4 code looks 
something like this.

> MDLV2000Reader reader = new MDLV2000Reader();
> IMolecule      mol    = reader.read(new Molecule());

The new version of CDK. 1.6 will have API changes one of which is there is no 
more IMolecule/Molecule. 
This simplifies interactions with the rest of the API as you no longer have to 
create a new Molecule() when you have an AtomContainer however
it does mean the main chemical structure class is now an AtomContainer.

> MDLV2000Reader reader    = new MDLV2000Reader();
> IAtomContainer container = reader.read(new AtomContainer());

This is semantically correct for the current inheritance hierarchy with Crystal 
extends AtomContainer etc. However I believe that the name AtomContainer is not 
intuitive and having discussed with many people this seems to be the consensus. 
New users I've helped find it particularly confusing. I understand the semantics
argument but I strongly believe the object model should not try to exactly 
represent reality. In particularly we should consider the domain of 
applicability and ease of use.

I propose we rename AtomContainer to Molecule - this is a huge API change but 
remember if you will be upgrading from 1.4 versions you will have to rename
Molecule from you code already - with this change you would have to rename 
AtomContainer instead. 
API changes are a pain but as the toolkit has evolved there are inevitable 
incompatibilities. When the release happens we will provide some scripts to 
patch you code.

I have discussed with Egon and we decided this of course needs input from the 
mailing list. If you have a concise suggestion for a name we are also happy to 
hear it.

Most importantly please vote for you preferred choice here: 
http://strawpoll.me/501772

Some names from other toolkits

RDKit:      RWMol, ROMol 
ChemAxon:   Molecule (extends MolGraph)
Open Babel: OBMol
PerlMol:           Chemistry::Mol
OUCH:      Molecule
Daylight:          molecule
Many thanks,
John
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to