I acheived a speed up of around 3x

By using local memory instead of global, I was able to acheive a speed
up of around 3x. There is still a question of wether or not the atomID
selection can be modified, I will need to check this on the full scale
code.