ElectronVisualized

ElectronVisualPromo

ElectronVisualized

Web-based atomic and molecular orbitals viewer developed by a high school student, using spherical harmonics and Density Functional Theory formulas.


Official Build 6.0

Developed and Designed by John Seong. Served under the MIT License.

Launch Web App

Download on the Mac App Store


Atomic Orbitals

ElectronVisualized uses the spherical harmonics formula to accurately depict the shape of each atomic orbital based upon its four quantum numbers. Each dot represent a probable location of where an electron might be.

Screenshot 2022-09-11 at 11 42 22 AM

Screenshot 2022-09-11 at 11 41 49 AM


Molecular Orbitals

Thanks to Density Functional Theory and GPAW library, we were able to derive the electron density of a molecule without going through complex steps of solving a N-dimensional Schrödinger’s Equation.

Screenshot 2022-09-11 at 11 40 50 AM

Screenshot 2022-09-11 at 11 41 16 AM


World Engine REST API Guide

https://electronvisual.org/api/load/<molecule_name_goes_here>

Loads the x, y, and z coordinates of a molecule based upon the DFT calculations, all from the Amazon S3 server with blazingly fast speed guaranteed.

https://electronvisual.org/api/loadSPH/<atom_name_goes_here>

Retrieves the x, y, and z coordinates of an individual atom derived from the Spherical Harmonics formula. This might take a little more time as it is more precise and contains significantly more information.

P/S: Remove the ‘<>’ brackets upon its actual usage!


Project Sketches

These sketches were drawn at the early stage of development.

IMG_7647

Screen Shot 2022-06-05 at 10 10 18 PM


Technologies Used

Front-End: ./client


Back-End: ./server


How to Run Locally

  1. Install C-based dependencies BLAS and Libxc globally, e.g. using brew on macOS or other package managers like APT on Linux or Chocolatey on Windows (Heroku runs on top of Ubuntu by default, so in this case, I set up a Dockerfile to apt-get install. A bit of trial and error were involved in the process of finding the right method, as Heroku’s official APT buildpack was not suitable for deploying applications that involve scientific computing (modules such as SciPy or GPAW)
  2. Setup the client-side: cd client && npm install
  3. yarn build to convert React *.JSX into production files that Flask (our back-end) can read
  4. Setup the server-side: On a seperate terminal, go to the root folder, and set up a virtual environment
  5. OPTIONAL: gpaw install-data <dir> if you would like to generate your own version of GPAW datasets; otherwise, use the one that is pre-packaged in this repo
  6. Run export GPAW_SETUP_PATH=~/gpaw-setups-<version> to direct the API to the GPAW datasets that are rendered in step 5 (or use the one that is already included in this repo)
  7. Just as a side note, Step 6 when deploying on Heroku can be replaced by setting an environment variable in the CONFIG_VAR menu on the dashboard (Just set it to GPAW_SETUP_PATH=server/datasets/gpaw-setups-0.9.20000 if you don’t know what you’re doing)
  8. Execute pip3 install requirements.txt && cd client && yarn start-api to download all the PyPi dependencies as well as running the Flask server (Optionally, you can go to the root folder and execute flask run instead)