[SciPy-dev] Period table?
adamadamadamamiadam at gmail.com
Sun Dec 17 20:15:11 CST 2006
Well I've sketched up some starting source code for it, to get a feel of how
to organize everything.
Basically there will be a "periodic" class and an "element" class.
Element objects will consist of various data like atomic number, atomic
mass, name, symbol, melting point, freezing point, critical point, density,
etc... as well as various methods to calculate things like the state of the
element at a given temperature.
The periodic class will act as the organized framework for the whole thing.
It will contain several dictionaries mapping unique qualities of each
element to their element objects, so that you can quickly do element
lookups. I think using dictionaries instead of one big sequence works better
in this case, because it allows for faster lookups to the fairly non-dynamic
and unchanging collection of data.
On the user end, the periodic table would work much like a combination
between an array and a dictionary. You can use symbol, name, or atomic
number as dictionary keys to look up the desired element, and the whole
table of elements can be iterated over like a list. Methods will be used to
return lists of elements by group, period, series, number of valence
electrons, state at a given room temperature, density, etc...
Default temperature measurements will be in Celsius, although there will be
unit conversions supported (I'm assuming scipy has a unit conversion package
I could borrow from)
I'm not much of a chemistry buff, so I'll need some help filling in the
actual information, but I can work on the organizational structure in the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev