-
Notifications
You must be signed in to change notification settings - Fork 2
/
electron_visualized.py
68 lines (52 loc) · 4.09 KB
/
electron_visualized.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
'''
█████████████████████████████████████████████████████████████████████████████████████████████████████████████
█▄─▄▄─█▄─▄███▄─▄▄─█─▄▄▄─█─▄─▄─█▄─▄▄▀█─▄▄─█▄─▀█▄─▄███▄─█─▄█▄─▄█─▄▄▄▄█▄─██─▄██▀▄─██▄─▄███▄─▄█░▄▄░▄█▄─▄▄─█▄─▄▄▀█
██─▄█▀██─██▀██─▄█▀█─███▀███─████─▄─▄█─██─██─█▄▀─█████▄▀▄███─██▄▄▄▄─██─██─███─▀─███─██▀██─███▀▄█▀██─▄█▀██─██─█
▀▄▄▄▄▄▀▄▄▄▄▄▀▄▄▄▄▄▀▄▄▄▄▄▀▀▄▄▄▀▀▄▄▀▄▄▀▄▄▄▄▀▄▄▄▀▀▄▄▀▀▀▀▀▄▀▀▀▄▄▄▀▄▄▄▄▄▀▀▄▄▄▄▀▀▄▄▀▄▄▀▄▄▄▄▄▀▄▄▄▀▄▄▄▄▄▀▄▄▄▄▄▀▄▄▄▄▀▀
----------------------------------------------------------------------------
Purpose: An interactive module that visualizes the electron configurations of different elements.
Displayed in an orbital format, based upon the internal calculations performed that involve the famous Density Functional Theory,
which simplifies the N-dimensional Schrödinger's Euqation problem into a three-dimensional one.
Author: John Seong
Created: 23-Mar-2022
-----------------------------------------------------------------------------
I think this project deserves a level 4+ because...
1. Each dot represent a probable location that the electron might reside at based upon electron density at a given location
— according to the Density Functional Theory (DFT)
3. Used industry standard Quantum Mechanics simulation libaries such as ASE and GPAW for numerically computing the electron density
-----------------------------------------------------------------------------
'''
from server import create_app
from dotenv import load_dotenv
import os
load_dotenv()
app = create_app()
if __name__ == '__main__':
port = int(os.environ.get("PORT", 8080))
from waitress import serve
serve(app, host="0.0.0.0", port=port, threads=100)
'''
TIPS & TRICKS
PIP FREEZE LOCALLY: pip3 freeze -l > requirements.txt
DEPLOYING FLASK + REACT APP ON HEROKU: https://www.realpythonproject.com/how-to-setup-automated-deployment-for-multiple-apps-under-a-single-github-repository-in-heroku/
HOW TO INSTALL ASE AND GPAW ON LINUX (SERVER): http://dtu.cnwiki.dk/10302/page/2699/optional-install-ase-and-gpaw-on-your-laptop
ATOMIC ORBITAL (SPHERICAL HARMONICS) MLAB: https://dpotoyan.github.io/Chem324/H-atom-wavef.html
SHIFT+ALT+CLICK BELOW = MULTIPLE CURSORS ON VSCODE
UPDATED (NOV. 29, 2022): MAKE SURE YOU brew install jpeg BEFORE PERFORMING PIP INSTALL FROM REQUIREMENTS.TXT ACTION!
ALSO COMMENT OUT THE GPAW LINE IF YOU HAVE INSTALLED PREVIOUSLY USING BREW...
-----------------------------------------------------------------------------
VVIP: ENVIRONMENTAL VARIABLES REQUIRED
(ON THE SERVER, GO ON THE SETTINGS, OR LOCALLY, CREATE A NEW .ENV FILE IN THE ROOT FOLDER)
<< BELOW IS A VERY IMPORTANT STEP TO SUCCESSFULLY RUN ASE AND GPAW LOCALLY (MACOS) >>
1. export C_INCLUDE_PATH=/my/path/to/libxc/5.2.0/include
2. export LIBRARY_PATH=/my/path/to/libxc/5.2.0/lib
3. export LD_LIBRARY_PATH=/my/path/to/libxc/5.2.0/lib
(IN CASE OF MACOS: /opt/homebrew/Cellar/libxc/6.1.0 IS THE PATH FOR LIBXC)
4. GPAW_SETUP_PATH="server/datasets/gpaw-setups-0.9.20000"
5. SECRET_KEY — FOR FLASK
6. AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION="us-east-2", AWS_ACCESS_KEY_ID
How to connect to DigitalOcean VPS console terminal from your local machine:
1. ssh <username>@<IP_ADDRESS>
2. Enter password
<username> can be root, or your own username
'''