Recent

Author Topic: TPeriodicTable  (Read 494 times)

wp

  • Hero Member
  • *****
  • Posts: 13649
TPeriodicTable
« on: July 16, 2026, 06:07:38 pm »
Reviving an old DOS project I stumbled across a component for the periodic table of elements, and I converted it to Lazarus, modernized it and put it into a package named ChemCtrls.

Visit the wiki to see in detail what TPeriodicTable is: https://wiki.freepascal.org/ChemCtrls#TPeriodicTable

Since there is already another chemistry-related component, TChemLabel, I decided to combine both components in the same package "ChemCtrls". You can find the development version on CCR (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/chemctrls/). But the current version is also available at Online-Package-Manager (OPM).

In order to avoid naming conflicts, please note that the old ChemText package (with the TChemLabel component) will be removed from OPM, it already has disappeared from CCR.
« Last Edit: July 16, 2026, 06:25:53 pm by wp »

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: TPeriodicTable
« Reply #1 on: July 16, 2026, 06:24:49 pm »
Great!
Will it allow for new discoveries?
Any "programmer" that knows only one programming language is not a programmer

dsiders

  • Hero Member
  • *****
  • Posts: 1679
Re: TPeriodicTable
« Reply #2 on: July 16, 2026, 06:49:10 pm »
Nice.

I see an unused area that would be perfect for electron shell diagrams.  ;)
https://commons.wikimedia.org/wiki/Category:SVG_electron_shell_diagrams_with_orbital_descriptions

wp

  • Hero Member
  • *****
  • Posts: 13649
Re: TPeriodicTable
« Reply #3 on: July 16, 2026, 08:00:38 pm »
Will it allow for new discoveries?
You mean new elements? Currently the elements are hard-coded. Since the discovery of new elements does not happen "every day" I decided to go the easier way. For adding a new element, I would just increment the anMax ("an" = atomic number), and then let the compiler tell me which array needs to be extended.

I see an unused area that would be perfect for electron shell diagrams.  ;)
The periodic table itself is the grid, it does not related to the empty area (which is due to unused lines in the TValueListEditor). I wanted to demonstrate how additional information (atomic mass, radius, electronegativity, ...) can be added. Did not know how to represent the electron configuration in the chart - yes, these electron shell diagrams would be a possibility, but I would put more color into them to distinguish between 1s, 1p, 2s, 2p, ... electrons

CM630

  • Hero Member
  • *****
  • Posts: 1772
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: TPeriodicTable
« Reply #4 on: July 17, 2026, 07:49:27 pm »
The world has changed drastically.
When I was a student the oceans on the Earth were four, the planets in the solar system were nine, rabbits were rodents, the periodic table had 8 columns.
Now the oceans are five, the planets are 8, the rabbits are not rodents and your periodic table looks peculiar and unreadable.
Can it switch to 8 columns mode?

BTW, rabbits tasted much better when they were rodents, this is what bother me most.
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

munair

  • Hero Member
  • *****
  • Posts: 902
  • software developer at SSGEOS
    • Solpage
Re: TPeriodicTable
« Reply #5 on: July 17, 2026, 10:17:16 pm »
Awesome! Thanks for sharing.
It's only logical.

wp

  • Hero Member
  • *****
  • Posts: 13649
Re: TPeriodicTable
« Reply #6 on: July 18, 2026, 12:19:25 am »
Can it switch to 8 columns mode?
No. That's out-dated and has been replaced by the standard IUPAC 18-column table (or 36-column in which the Lanthanides/Actinides are their correct place - use property CompactLayout to switch between them)

Maybe interesting also: https://www.youtube.com/watch?v=rz4Dd1I_fX0

 

TinyPortal © 2005-2018