From: E.L. W. (Egon) <eg...@sc...> - 2003-09-21 16:35:13
|
On Friday 19 September 2003 14:38, Christoph Steinbeck wrote: > Regarding RFC #19, I'm unhappy with including the mixture concept into > class Isotope. From an object oriented point of view, I would prefer > having something like an IsotopeMixture.java, if that is really needed. Something is needed to store information like 13C enriched atoms in a compound. And when enriched, you need to be able to say something like 30% 13C and 70% 12C. > Egon, in the RFC you mention that > > > The CDK does not formalize what an Isotope is. And the current class (not > > the proposed class) is used for both isotope mixtures and specific > > isotopes. > > I guess this due to the fact that macroscopic samples of elements (as > opposed to the abstract idea of a chemical element) often are mixtures > of various isoptopes with more or less well defined natural abundance. > > Isotopes mixtures, on the other hand, need not neccessarily resemble the > mixing ratio of the element they belong to. > Thus, it would make sense to me to have an IsotopeMixture class, which > may contain instances of isotopes and their various ratios. > > We would then have Element extending IsotopeMixture. IsoptopeMixture > does not extend Isotope, but contains instances of Isotopes. > Elements would be instantiated by an ElementFactory, which loads them > with the correct Isotopes in the correct Isotope ratios. I would prefer to keep the Element class as is it now, i.e. representing the concept of an Element, not an Element instance itself.. for which we Atom, I think... > I dislike the concept I just described as much as I dislike the proposed > inclusion of isMixture(). :-) Can you summarize the objections you have against my design? > But in any case, I think that an Isotope can never also be a mixture of > isotopes. Not if we consider the Isotope to be the concept of an isotope, like Element is the concept of an element... But I was considering the Isotope to be an instance of an isotope... which might be conceptually wrong... Ok, how about this then? ChemObject -> is a concept of a chemical entity | Element -> is a concept of a chemical element (a thing in the periodic table) | Isotope -> is a concept of a chemical isotope (e.g. 13C) | AtomType -> is a element/isotope with some specified behaviour | Atom -> an *instance*, with a specified state, e.g. including coordinates | (possibly?) | EnrichedIsotopeAtom And it is the instance that can be enriched, not the Isotope concept... Thus, the EnrichedIsotopeAtom would define the list of Isotopes, and overwrite the methods specified by the Isotope class... How's that? Egon -- PhD Molecular Representation in Chemometrics Laboratory of Analytical Chemistry http://www-cac.sci.kun.nl/people/egonw.html |