Help with 3-D interactive QM visualisation of a hydrogen atom

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 2K views
AndreasC
Gold Member
Messages
559
Reaction score
321
TL;DR
I decided to do a 3D simulation/visualisation of the behavior of a hydrogen atom in various energy states. However I am not a programmer and I don't know what the best way to go about doing that would be.
First of all, I got to decide what I'm going to use to make the simulation. I know Fortran, Matlab etc but I'm pretty sure these won't help me much. I learned some C++ a couple years ago but my knowledge is rusty, however I think I'm going to use that combined with Unreal Engine, since it makes it easier to create the environment. Of course that means I'm going to have to learn some UE basics.

My idea was fixing the nucleus, and then splitting up the 3d space into discrete points, with probabilities assigned to them according to the wave function. I'm going to have one image of the electron representing the mean position which will be hardcoded, and then and then at each time step the program will pick random points all over the space and checking if it succeeds or fails in finding an electron there according to the probabilities. It will stop when a predetermined number of electrons has been found, say 20. At that point it will display ghost images of all these electrons all at once, to give the user a rough idea of the probability distribution. The actual algorithm may need some tweaks since it sounds like it might be somewhat intensive for a complicated wavefunction if I am to do this in every time step. Or maybe not, idk. I do have an idea to maybe make it more efficient though. Then maybe I could have another algorithm calculating the mean position of the ghost images and create another ghost image to compare it with the hardcoded result.

Is this a good approach? What else would you suggest? Could I potentially expand it for even more complicated states/atoms while maintaining any accuracy whatsoever? Is using Unreal Engine a good idea or are there better options?
 
Physics news on Phys.org
Also I just realized that maybe this isn't the best section for this...

I also have an additional question, are there any libraries that could prove useful?
 
The platform depends on your goals (short term and long term) and your audience.

These days, I lean towards visualizations that I can easily share with others.
So, I prefer web-based platforms [in spite of some limitations].
If the limitations are too severe, then I'll opt for a specialized library.

Some possibly useful ideas:

https://www.wired.com/2016/03/can-solve-quantum-mechanics-classic-particle-box-problem-code/
https://www.wired.com/story/in-guardians-of-the-galaxy-vol-2-planet-sovereign-defies-physics/
https://www.glowscript.org/#/user/GlowScriptDemos/folder/Examples/program/HardSphereGas-VPython

https://www.geogebra.org/m/mfQhepUA
http://www.falstad.com/qmatom/index.html
 
  • Like
  • Informative
Likes   Reactions: pbuk and AndreasC
I'm trying to understand your objective. It sounds like you want to be able to generate figures like the following. Is that correct?https://en.wikipedia.org/wiki/Atomic_orbital

1595689624657.png
 
anorlunda said:
I'm trying to understand your objective. It sounds like you want to be able to generate figures like the following. Is that correct?https://en.wikipedia.org/wiki/Atomic_orbital

View attachment 266835
Well, sorta. I want to do this except I want to visualise the concept by "ghost" electrons appearing randomly in 3d space that the user can navigate around.
 
robphy said:
The platform depends on your goals (short term and long term) and your audience.

These days, I lean towards visualizations that I can easily share with others.
So, I prefer web-based platforms [in spite of some limitations].
If the limitations are too severe, then I'll opt for a specialized library.

Some possibly useful ideas:

https://www.wired.com/2016/03/can-solve-quantum-mechanics-classic-particle-box-problem-code/
https://www.wired.com/story/in-guardians-of-the-galaxy-vol-2-planet-sovereign-defies-physics/
https://www.glowscript.org/#/user/GlowScriptDemos/folder/Examples/program/HardSphereGas-VPython

https://www.geogebra.org/m/mfQhepUA
http://www.falstad.com/qmatom/index.html
I do want to share it with others, that is my goal. However I am not familiar with online platforms. What would you recommend?

I am more or less familiar with the math required to solve the problems either numerically or analytically, my issue is primarily with the implementation. Although I may discover more problems as I go along.

I can't check it right now but on the surface your final link looks like it might be pretty useful.