Skip to content


June 22, 2009

I am making this post after 1.5 months after beginning my GSoC project and exactly 1 month after its official commencement.  I have basically completed most of the work that I had planned. I have finished 3 calculator widgets and added them to the calculator widget along with the mass Calculator and the equation balancer which were already present.

Here are some screenshots where I have used the various calculators to solve a simple chemistry problem. (The problem is intentionally made very simple to attract a larger audience.)

Consider the following question :-

(Sodium Carbonate)Na2 CO3 on reacting with (HydroChloric acid) HCl gives

(Common Salt) NaCl and (Carbon Dioxide) CO2 and (water)H20.

If 1 mole of Sodium Carbonate is consumed, find the volume of Carbon Dioxide that is released at 1 atmosphere and 273 K. ( Assume CO2 is ideal.)

If a solution of common salt occupies 1 liter. What is its concentration of common salt if 117 grams are added..

The first step would be to balance the equation using the equation balancer in kalzium. ( The usage of this widget involves typing the equation in the form


! mole of Sodium Carbonate produces 1 mole of Carbon Dioxide and 1 mole of Salt.

Next step would be to calculate the molecular mass of Carbon Dioxide. (The usage of this widget is trivial, just enter the formula get the results)


Next we use the gas Calculator to find out the volume occupied by CO2 at the given conditions.


( Usage of the widget : seleect what you want to calculate using the radio button eg. volume, then enter required and relevant data. Not everything is compulsary. Select among the many units that are present)

Vand der Vaals constants have been set to zero because the gas is considered ideal. We get the volume of Carbon Dioxide.

We now use the concentration Calculator to calculate the concentration of the solution. First calculate its molecular mass.


Now for the concentration.


(Usage: specify all the data you have, not all are compulsary, eg density is unnecessary. You can select the way in which you specify amount (mass / volume / moles) You can specify a number of relevant units.)

There is also a nuclear Calculator that can answer questions simillar to the following one.

If initially 4 grams of Uranium-235 are present, after what amount of time will it reduce to 2 grams. ( Again the question is too simple but the calculator can do better problems.)


( Usage: select time from the radio buttons to calculate time. enter other data (initial and final amounts), selecting Uranium 235 automatically gets the halfLife from kalzium data. Thus we get the time required.)

You can also calculate final / initial amounts. You can specify time in halfLives using the slider which can vary from 0 to 10 half-lives.

I have gone through the plasma API FAQ and I have after some difficulty created plasmoid widgets for the same. These widgets are more difficult compared to the Qt ones because there is no equivalent of the awesome “Qt designer” for Plasma although it will be out soon.

The following is a plasmoid for the nuclear Calculator mentioned above. Looks cool doesn’t it?


Apart from that, I tried to use the Gnome Chemistry Utils library and create a new library called freeChem but it failed because, it wasn’t very easy to eliminate GTK from the code and put Qt instead. Now I plan to use the files in Kalzium itself to complete the molecular mass calculator.

Please feel free to ask any questions regarding the functioning / layout / ease of use of these widgets. Any suggestions are welcome. I have time for more Chemical calculators. If you have any ideas so comment.


20 days into SoC

June 1, 2009

21th April 2009 00:40, that was when my SoC results were announced. Because of the net cuts in my hostel after 11:59 PM, we are forced to turn off our computers and go to sleep. (Well they are trying) I had to go all the way to my Department Computing Facilities to find out my results. In the darkness of the night I slowly cycled and went to the DCF.  People like Akarsh Simha (kstar) felt I would obviously get in, but for me it was butterflies in the stomach as usual. It felt more like frogs in my stomach because what was about to be announced was a really big thing in my life. At 12:45 I some how managed to get into the site despite all its internal server errors and finally got to see a new link that wasn’t there before saying ‘student projects’. I quickly clicked on it to find out what it was about, and there came another 500. My friend Virus ( SuryaKiran ) messaged me and congratulated me, only then I felt relieved. I waited there for another 15 minutes patiently and found out that it was my application for the molecular calculator project that had been accepted. And now 22 days after the unofficial start of my project ( 9 days after the official start ), I am making this post to brief about my progress.

Now to get technical, I started off with the design of the user interface of the various calculator widgets. The current user interface file can be found in the kde branches at along with the other files that I have created. The user interface was done using the Qt designer / Qt creator. The design is simillar to the kstars calculator design which consists of a single calculator main widget that loads all the different calculators and shows them on selection. The design is not yet complete and can be further improved; please feel free to comment.

After that I started writing the classes for the various calculators. I have written the nuclear Calculator, gas Calculator and the concentration Calculators (sources in the above link ). I had to use the unit conversion library for the same. I found it really tough as an amateur noob to use a library without having any reference  / documentation about it. I gradually figured it out through some little help I received in the IRC. A person in the kde-devel channel showed me how to fix the problems I had with the CmakeLists.txt to include the library. I still did not know how to use the library.  Not a single page could I find after hours of search. I finally got the author’s name and started googling the name. I found his blog here but it was of no use as it had only descriptions of the unit conversion widget and not the library. Only this mail with just one line of info managed to teach me, how to use the library. I managed to finish of the calculators last week with unit conversion. Any new tabs that you would like to see in the calculator, please go ahead and make a request.

I have now begun my second phase, the plasma phase. I managed to create the hello world plasmoid widget using python, and now even as I write, am trying to make it work in C++. Not even in my worst night-mares had I realised it would take this long. Python hello world was like copying a couple of files from the tutorial, zipping them using plasmapkg and directly running that using plasmoid viewer.
Although C++ version is also easy, I have been facing a lot of difficulty. Firstly I faced an error during compilation saying “libphonon not found”. When I installed it ( sudo apt get ) everything worked, and now I have segmentation faults with no backtraces. After several hours of loafing around in the kde-devel/plasma channels disguised as n00b_max, I have found out the problems. I am now downloading the entire kdelibs / pimlibs / support etc, will build it and try to eliminate the segfault.


April 20, 2009

I have been selected for the Google Summer of code program under Kalzium under the molecular calculator project. Yippeeeee!!! 🙂 🙂 🙂 :D. I have started doing some ground work for the molecular calculator project. I have started designing the user-interface for the same. There was a user-interface for the Kstars calculator. It was really user friendly and cool. The same kind of interface could work out even in Kalzium. I have created a basic interface using the Qt designer. I have taken some screen shots of the same. Please comment. The calculator as of now looks kind of primitive, and I haven’t completed it yet. It will look great once completed. Please shower me with suggestions.


The above is the Calculator in Kstars.


There are tabs on the left which you can choose, on the right, you do the calculations.
The above software is kstars. The desktop planetorium of KDE.

The following are the screen shots of the molecular calculator interface design that I have tried to come up with for Kalzium.


The above is the layout of the molecular calculator, I plan to create. It has different tabs for different calculations.


After filling it up, it will look like the picture above. This is the introduction page. There are other tabs which include

  • Molecular mass calculator
  • Concentration calculator
  • Nuclear calculator
  • Gas densities
  • Equation Balancer
  • Scientific calculator

The picture you see below is the Concentration calculator, where the user enters the amount of substance along with the units and quantity ( which by default are according to the configurations.) The result is printed at the bottom.

The concentration calculator has 2 other parts which calculate the amount of solute and the amount of solvent respectively.


You can see the molecular calculator below. It has two parts, the molecular mass calculator and the molecule predictor.
The user can select the molecules from the list of commonly used compounds / history or he can enter the molecule in the text area. There is also a prediction for the molecule that pops out once the user starts typing the molecule. There is also a table of short-forms for compounds like amino acids. sugars, etc.
The molecule predictor will take in the molecular mass, some of the elements present in the molecule and predict all possible molecular formulae for the molecule.


Bottom: You can see the display of results, composition and other data.

Kalzium – Video play feature

April 3, 2009

This is a cool feature that I have added to Kalzium. It will be really attractive in schools. I call it the play feature. You can basically play the periodic table like a video where you can see the temperature increase from 0 K to 6000 K gradually and see all the elements melt and eventually boil.

This is an addition to the somwidget. I have added the same feature to the Time-widget. When the play button is clicked on, you start from some year in the 1600s. The periodic table displays only the elements that had been discovered then. The year gradually increases to 1994 and stops.

To make things convinient, there is a pause button and the speed slider with which you can select the speed. The navigation slider already exists.

Here are some cool screen-shots of the same.

This is the som-widget, the temperature is currently at absolute zero. Red elements are solid at this temperature.


I start playing the periodic-table video, gradually some elements melt and some even boil. The blue elements are liquid at this temperature and the green ones are gaseous.


As we proceed this is what it looks like. The text area in the widget indicates the elements that melt or boil around that temperature with a threshold of 25 K.


Most elements have boiled here. Note the Grey boxes are elements whose values are unknown.


This is at 6000 K. This shows no solid or even liquid element at that temperature.

This is the time widget, at each year between 1664 and 1994, it shows the elements which had been discovered in blue and the undiscovered ones in blue.


Once again I hit the play button and start the video and, also increase the speed.


Many elements have been discovered at around this year you see.


1994 – Almost all elements have been discovered.


These are the features that will be available in KDE 4.3 probably. I am sure students will like it.
If you have any suggestions about this feature or an earlier feature, please comment.
Also suggest any additional feature if you wish to see it in Kalzium in the next release of KDE ( 4.3).

Kalzium KDE 4.3

March 30, 2009

Please check out my GSoC proposal in this blog.
I have made two proposals

1 Kalzium Beautification.
2 Molecular Calculator for Kalzium.

These are the major changes of Kalzium in KDE 4.3

The nuclide board looks beautiful and user friendly.
I have added the legend at the side, also there is a tab which has a slider to zoom in and out.


This is a picture I have taken after zooming in.
The nuclide board widget shows the stability of compounds.


Kalzium ( Calcium )


Major bugs involved in the above widget have been fixed. This is the first of the changes for Kalzium in KDE 4.3.

The other changes include the Wikipedia integration feature for Kalzium.

This is the beginning of the feature that I have started adding. It gives a link to a particular article in wikipedia. The same feature will be extended to all places in Kalzium where further reference. Eg. kalzium help and Kalzium knowledge database.


You can choose the language of your choice. Right now there are 10 languages in which wiki has 100K + articles.


Here is the selective plotting feature. You can now choose to plot only metals or may be only d-block elements.

In the screen shot you can see that only the p block elements  have been plotted.


Changes to Kalzium in KDE 4.2.

I have fixed a bug in the plotting widget that used to plot unknown values and consider them as known values. The average and other statistics were affected because of those unknown values. Now the unknown values are plotted in red and the known values are plotted in green.


Please comment about the features that I have implemented and please feel free to comment on my contributions and if you have any ideas of your own. Please do comment.

Please check out my GSoC proposal in this blog.
I have made two proposals

1 Kalzium Beautification.
2 Molecular Calculator for Kalzium.

Kalzium 4.1

March 30, 2009

Here are some screen shots of Kalzium for KDE 4.1.


This is the main Kalzium screen, the detailed graphical overview.
This is the iconic view of Kalzium. There are other views like, group view, block view, gradient views.


Here is the cool detailed info widget of Kalzium


Here is a gradient view


Here is the detailed info widget again. It has a lot of data on various elements.

The best part of Kalzium is the 3D molecular viewer




The above 4 shots are of a molecule in different views in Kalzium.


Kalzium help! has a wide range of topics to refer.


The som widget. You can change the temperature and observe elements melt. Currently Red – solid, green gas and blue – liquid.


Kalzium nuclide board. This has now been changed.

Kalzium is an awesome software. Try it out. Its free and open source
Sudo apt-get install kalzium.

So this is Kalzium, the periodic table of elements for KDE

kalzium KDE 3.x

March 30, 2009
Kalzium in KDE 3.x

Kalzium in KDE 3.x

This is Kalzium KDE’s periodic table of elements. The picture you see is that of an older version of Kalzium


Here is the detailed info widget.


Here you can see the picture of an element


Here is the chemical data


Here is the plot widget where you can see the melting points of various elements plotted against their atomic numbers


This is the gradient view of atomic density.