├── .gitignore
├── LICENSE.md
├── README.md
├── _config.yml
├── _toc.yml
├── appendix
└── acknowl.md
├── assets
├── data
│ ├── 2d_walk.npy
│ ├── README_dielectric_dataset.pdf
│ ├── anscombe.csv
│ ├── band_gap_featurized.csv
│ ├── band_gaps_sc.json
│ ├── dielectric_dataset.csv
│ ├── dielectric_dataset.json
│ ├── elem_props.csv
│ ├── element_structure.txt
│ ├── hardness_density.csv
│ ├── kmeans_data.npy
│ ├── lattice_diffusion.npy
│ ├── mentors.txt
│ ├── more_mp_materials.csv
│ ├── number_weight.npy
│ └── transistors.csv
├── fig
│ ├── 14
│ │ ├── github_branch.png
│ │ ├── github_compare.png
│ │ ├── github_compare2.png
│ │ ├── github_edits.png
│ │ ├── github_edits.svg
│ │ ├── github_fork.png
│ │ ├── github_forked.png
│ │ ├── github_open_pr.png
│ │ ├── github_propose.png
│ │ └── suggest_edit.png
│ ├── 15
│ │ ├── Anastasia_electr_final.png
│ │ ├── Luis_final.png
│ │ ├── back_to_the_science.png
│ │ ├── back_to_the_science.svg
│ │ ├── moores_law.png
│ │ ├── temp.png
│ │ ├── temp.svg
│ │ └── thats_all_folks.gif
│ ├── 01
│ │ ├── band_gap.png
│ │ ├── band_gap.svg
│ │ ├── crystal_family.png
│ │ ├── crystal_family.svg
│ │ ├── cube.png
│ │ ├── cube.svg
│ │ ├── dielectric_capacitor.png
│ │ ├── dielectric_polarization_atom.png
│ │ ├── dielectric_polarization_material.png
│ │ ├── jupyter_menu.png
│ │ ├── lattice_diffusion_schematic.png
│ │ ├── lattice_diffusion_schematic.svg
│ │ ├── length_scales.png
│ │ ├── length_scales.svg
│ │ ├── moores_law.png
│ │ ├── mse_tetrahedron.png
│ │ ├── mse_tetrahedron.svg
│ │ ├── nmos.png
│ │ ├── nmos.svg
│ │ ├── numpy_arrays.png
│ │ ├── numpy_arrays.svg
│ │ ├── pbc.png
│ │ ├── pbc.svg
│ │ ├── python.png
│ │ ├── python_so.png
│ │ ├── python_xkcd.png
│ │ ├── venn_diagram.png
│ │ └── venn_diagram.svg
│ ├── 02
│ │ ├── api.png
│ │ ├── api.svg
│ │ ├── convex_hull_NiAl.png
│ │ ├── diffraction.jpg
│ │ ├── images.png
│ │ ├── images.svg
│ │ ├── mapi_url.png
│ │ ├── mapi_url.svg
│ │ ├── microstructure.png
│ │ ├── pandas.png
│ │ ├── pandas.svg
│ │ ├── super_json.png
│ │ ├── super_json.svg
│ │ ├── table_format.png
│ │ ├── table_format.svg
│ │ └── xkcd_wisdom.png
│ ├── 03
│ │ ├── cited_by.png
│ │ ├── diel_df_example.png
│ │ ├── google_scholar.png
│ │ ├── ml_screening.svg
│ │ ├── ml_screening_1.png
│ │ ├── ml_screening_2.png
│ │ ├── ml_screening_3.png
│ │ ├── ml_screening_4.png
│ │ ├── ml_screening_5.png
│ │ ├── ml_screening_6.png
│ │ └── ml_screening_7.png
│ ├── 04
│ │ ├── RFCV.png
│ │ ├── anscombe.png
│ │ ├── histogram.png
│ │ ├── pearson.png
│ │ └── pearson.svg
│ ├── 05
│ │ ├── DL_CO2_0.png
│ │ ├── DL_CO2_1.png
│ │ ├── DL_CO2_2.png
│ │ ├── DL_CO2_3.png
│ │ ├── conda_activate.png
│ │ ├── conda_install.png
│ │ ├── conda_start.png
│ │ ├── conda_what_if.png
│ │ ├── edits.svg
│ │ └── ventura.jpg
│ ├── 06
│ │ ├── cross_validation.png
│ │ ├── cross_validation.svg
│ │ ├── gradient_descent.png
│ │ ├── gradient_descent.svg
│ │ ├── gradient_descent_1.png
│ │ ├── gradient_descent_2.png
│ │ ├── gradient_descent_3.png
│ │ ├── gradient_descent_4.png
│ │ └── linear_regression.png
│ ├── 07
│ │ ├── decision_tree_class.png
│ │ ├── decision_tree_class.svg
│ │ ├── magpie_features.png
│ │ ├── magpie_features.svg
│ │ ├── matminer.png
│ │ └── matminer.svg
│ ├── 08
│ │ └── austin.jpg
│ ├── appendix
│ │ ├── acknowl.png
│ │ ├── acknowl.svg
│ │ ├── jupyter_book.png
│ │ ├── lbl_logo.jpg
│ │ └── nsf_logo.png
│ ├── mi_favicon.svg
│ ├── mi_logo.svg
│ ├── preamble
│ │ ├── chrome_update.png
│ │ ├── enze.jpg
│ │ ├── firefox_update.png
│ │ ├── firefox_update_1.png
│ │ ├── firefox_update_2.png
│ │ ├── github_join.png
│ │ ├── mark.jpg
│ │ ├── mp_dashboard.png
│ │ ├── nmos.png
│ │ ├── nmos.svg
│ │ ├── petousis_n_Eg.png
│ │ ├── slack_pref.png
│ │ ├── slack_update.png
│ │ └── zoom_update.png
│ └── scripts
│ │ ├── miscellaneous.ipynb
│ │ ├── petousis_dataset.ipynb
│ │ └── pymatgen.ipynb
└── files
│ ├── make_blank_nb.py
│ ├── mp_api_key.txt
│ └── references.bib
├── chapters
├── 10
│ └── day_10.md
├── 11
│ └── day_11.md
├── 12
│ ├── active_learning_blank.ipynb
│ ├── day_12.md
│ ├── grad_school.md
│ └── welcome_back.md
├── 13
│ ├── day_13.md
│ └── presentations.md
├── 14
│ ├── day_14.md
│ ├── peer_review.md
│ └── pull_requests.md
├── 15
│ ├── day_15.md
│ ├── final_presentations.md
│ ├── next.md
│ ├── student_1.md
│ ├── student_2.md
│ ├── student_3.md
│ ├── student_4.md
│ ├── student_5.md
│ └── summary.md
├── 01
│ ├── day_01.md
│ ├── homework_01.md
│ ├── informatics.md
│ ├── intro_python_jupyter_blank.ipynb
│ ├── module.md
│ ├── python_gory_details_blank.ipynb
│ └── python_greatest_hits_blank.ipynb
├── 02
│ ├── convex_hull_NiAl.py
│ ├── databases.md
│ ├── day_02.md
│ ├── file_types_blank.ipynb
│ ├── homework_02.md
│ ├── materials_project_blank.ipynb
│ ├── opportunities.md
│ ├── reading_docs.md
│ ├── recap_logistics.md
│ └── tabular_data_blank.ipynb
├── 03
│ ├── day_03.md
│ ├── diel_guided.md
│ ├── guest_mp.md
│ ├── homework_03.md
│ ├── reading_papers.md
│ ├── recap_data.md
│ └── research_discuss.md
├── 04
│ ├── advanced_viz_blank.ipynb
│ ├── best_practices_viz.md
│ ├── best_practices_viz_blank.ipynb
│ ├── data_viz_blank.ipynb
│ ├── day_04.md
│ ├── helper_funcs_viz.py
│ └── homework_04.md
├── 05
│ ├── brief_intro_ml.md
│ ├── brief_intro_ml_blank.ipynb
│ ├── day_05.md
│ ├── guest_citrine.md
│ ├── homework_05.md
│ └── recap_viz.md
├── 06
│ ├── day_06.md
│ ├── helper_funcs_ml_intro.py
│ ├── homework_06.md
│ ├── intro_ml.md
│ ├── intro_ml_blank.ipynb
│ ├── ml_perf.md
│ ├── ml_perf_blank.ipynb
│ ├── ml_practice_blank.ipynb
│ └── recap_week_1.md
├── 07
│ ├── advanced_ml.md
│ ├── advanced_ml_blank.ipynb
│ ├── day_07.md
│ ├── features.md
│ ├── features_blank.ipynb
│ ├── helper_funcs_ml_adv.py
│ └── homework_07.md
├── 08
│ ├── day_08.md
│ ├── guest_aionics.md
│ ├── matminer_features_blank.ipynb
│ ├── practical.md
│ └── recap_ml.md
└── 09
│ ├── check_in.md
│ ├── day_09.md
│ └── test_other_features_enze.ipynb
├── intro.md
├── mi_favicon.png
├── mi_logo.png
├── preamble
├── overview.md
├── schedule.md
└── setup.md
└── requirements.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | # Jupyter book
2 | _build/
3 |
4 | # Jupyter notebook
5 | __pycache__
6 | **.egg-info
7 | **.ipynb_checkpoints
8 | .DS_Store
9 | **_master.ipynb
10 |
11 | # Other
12 | notes.md
13 | **mentors2.txt
14 | **band_gaps_only.json
15 | **df_holey.csv
16 | my_work/
17 | **model_complexity.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Introduction to Materials Informatics
2 |
3 | *Authors: [Enze Chen](https://enze-chen.github.io/) and [Mark Asta](https://mse.berkeley.edu/people_new/asta/) (University of California, Berkeley)*
4 |
5 |
6 | This is a 3-week curriculum for one of three modules for a summer 2022 research internship in the [Materials Sciences Division](https://www2.lbl.gov/msd/) at [Lawrence Berkeley National Laboratory](https://www.lbl.gov/).
7 | It is designed using the open-source [Jupyter Book](https://jupyterbook.org/en/stable/intro.html) software and interactivity is made possible with the generous support of the [DataHub](https://datahub.berkeley.edu/) program at UC Berkeley (non-Berkeley students may also use [Google Colaboratory](https://colab.research.google.com/)).
8 |
9 |
10 | ## Reading the book
11 |
12 | You may read the book here: https://enze-chen.github.io/mi-book-2022
13 |
14 |
15 |
16 | ## Citing this work
17 |
18 | This work was recently published in the _Journal of Chemical Education_ and can be cited as:
19 |
20 | ```
21 | @article{chen_asta_jce_2022,
22 | title = {Using {Jupyter} Tools to Design an Interactive Textbook to Guide Undergraduate Research in Materials Informatics},
23 | author = {Chen, Enze and Asta, Mark},
24 | year = {2022},
25 | journal = {Journal of Chemical Education},
26 | volume = {99},
27 | number = {10},
28 | pages = {3601--3606},
29 | doi = {10.1021/acs.jchemed.2c00640}
30 | }
31 | ```
32 |
33 | or perhaps the more conventional:
34 |
35 | - Enze Chen and Mark Asta. "Using Jupyter Tools to Design an Interactive Textbook to Guide Undergraduate Research in Materials Informatics." [_Journal of Chemical Education_](https://pubs.acs.org/doi/10.1021/acs.jchemed.2c00640), **99** (10), 2022, 3601–3606.
36 |
37 | You may also use the following BibTeX citation:
38 |
39 | ```
40 | @book{chen_asta_intro_mi_2022,
41 | title = {Introduction to Materials Informatics},
42 | author = {Chen, Enze and Asta, Mark},
43 | year = {2022},
44 | publisher = {GitHub},
45 | url = {https://enze-chen.github.io/mi-book-2022/},
46 | }
47 | ```
48 |
49 | or perhaps the more conventional:
50 |
51 | - Enze Chen and Mark Asta. _Introduction to Materials Informatics_. 2022. _GitHub_, https://enze-chen.github.io/mi-book-2022/.
52 |
53 |
54 | -----------
55 |
56 |
57 |
This work is licensed under a Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 International License.
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | # Book settings. Learn more at https://jupyterbook.org/customize/config.html
2 | title : Introduction to Materials Informatics
3 | author : Enze Chen and Mark Asta
4 | copyright : "2022"
5 | logo : mi_logo.png # logo in top-left corner
6 | only_build_toc_files : true # whether to ignore the extra files
7 | exclude_patterns : ["README.md", "LICENSE.md", "**_master.ipynb"]
8 |
9 |
10 |
11 | #######################################################################################
12 | # Force re-execution of notebooks on each build.
13 | # See https://jupyterbook.org/content/execute.html
14 | execute:
15 | execute_notebooks : cache # 'auto,' 'cache,' or 'force'
16 | timeout : 300 # max seconds for notebook to execute
17 | allow_errors : true # whether to allow and show errors
18 |
19 |
20 |
21 | #######################################################################################
22 | # Add GitHub buttons to your book
23 | # See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
24 | html:
25 | use_edit_page_button : true # button for users to edit page and submit a PR.
26 | use_issues_button : true # button for users to submit a GitHub issue
27 | use_repository_button : true # button for users to look at the source code in GitHub repo
28 | favicon : "mi_favicon.png" # the icon in the browser tab
29 | baseurl : https://enze-chen.github.io/mi-book-2022 # The base URL where the book is hosted
30 | extra_footer : |
31 |
32 |
33 |
34 | google_analytics_id : UA-197730750-1
35 | home_page_in_navbar : true
36 |
37 |
38 |
39 | #######################################################################################
40 | # Launch button settings
41 | launch_buttons:
42 | notebook_interface : classic
43 | binderhub_url : ""
44 | colab_url : https://colab.research.google.com
45 | jupyterhub_url : https://datahub.berkeley.edu
46 | thebe : false
47 |
48 | # Information about where the book exists on the web
49 | repository:
50 | url : https://github.com/enze-chen/mi-book-2022
51 | path_to_book : ""
52 | branch : master # source branch
53 |
54 |
55 |
56 | #######################################################################################
57 | # Parse and render settings
58 | parse:
59 | myst_enable_extensions: # default extensions to enable in the myst parser. See https://myst-parser.readthedocs.io/en/latest/using/syntax-optional.html
60 | - amsmath # LaTeX math
61 | - colon_fence # cleaner directives
62 | - dollarmath # in-line LaTeX
63 | - linkify # auto-detect HTML-like links
64 | - smartquotes # transforms quotes and dashes
65 | - substitution # allows variable/dictionary substitution
66 |
67 | myst_url_schemes : [mailto, http, https] # URI schemes that will be recognised as external URLs in Markdown links
68 |
69 |
70 |
71 | #######################################################################################
72 | # Define the name of the latex output file for PDF builds
73 | latex:
74 | latex_engine : pdflatex
75 | latex_documents:
76 | targetname : book.tex
77 |
78 | # Add a bibtex file so that we can create citations
79 | bibtex_bibfiles : ["assets/files/references.bib"]
80 |
81 |
82 |
83 | #######################################################################################
84 | # Advanced and power-user settings
85 | sphinx:
86 | config:
87 | language : en # include explicitly for accessibility
88 | mathjax_path : https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js # faster by 60-80%
89 | html_extra_path : ["assets"]
90 | html_js_files : https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
91 | bibtex_default_style : plain
92 |
--------------------------------------------------------------------------------
/_toc.yml:
--------------------------------------------------------------------------------
1 | # Table of contents
2 | # Learn more at https://jupyterbook.org/en/stable/structure/toc.html
3 | format : jb-book
4 | root : intro
5 |
6 | parts:
7 | - caption : Preamble 📜
8 | numbered : 3
9 | chapters:
10 | - file : preamble/overview
11 | - file : preamble/setup
12 | - file : preamble/schedule
13 |
14 |
15 | ###############################################################################
16 | ###############################################################################
17 | - caption : Week 1️⃣
18 | chapters:
19 | - file : chapters/01/day_01
20 | sections:
21 | - file : chapters/01/informatics
22 | - file : chapters/01/module
23 | - file : chapters/01/intro_python_jupyter_blank
24 | title : Intro to Python 🚀
25 | - file : chapters/01/homework_01
26 | sections:
27 | - file : chapters/01/python_gory_details_blank
28 | title : Python - Gory details 🚀
29 |
30 | - file : chapters/02/day_02
31 | sections:
32 | - file : chapters/02/recap_logistics
33 | - file : chapters/02/opportunities
34 | - file : chapters/02/file_types_blank
35 | title : Working with files 🚀
36 | - file : chapters/02/tabular_data_blank
37 | title : Processing tabular data 🚀
38 | - file : chapters/02/databases
39 | sections:
40 | - file : chapters/02/materials_project_blank
41 | title : The Materials Project 🚀
42 | - file : chapters/02/reading_docs
43 | - file : chapters/02/homework_02
44 |
45 | - file : chapters/03/day_03
46 | sections:
47 | - file : chapters/03/recap_data
48 | - file : chapters/03/research_discuss
49 | - file : chapters/03/reading_papers
50 | - file : chapters/03/homework_03
51 | sections:
52 | - file : chapters/03/diel_guided
53 |
54 | - file : chapters/04/day_04
55 | sections:
56 | - file : chapters/04/data_viz_blank
57 | title : Intro to data visualization 🚀
58 | - file : chapters/04/best_practices_viz
59 | sections:
60 | - file : chapters/04/best_practices_viz_blank
61 | title : Follow-along notebook 🚀
62 | - file : chapters/04/homework_04
63 | sections:
64 | - file : chapters/04/advanced_viz_blank
65 | title : Advanced data viz 🚀
66 |
67 | - file : chapters/05/day_05
68 | sections:
69 | - file : chapters/05/recap_viz
70 | - file : chapters/05/guest_citrine
71 | - file : chapters/05/brief_intro_ml
72 | - file : chapters/05/homework_05
73 |
74 |
75 | ###############################################################################
76 | ###############################################################################
77 | - caption : Week 2️⃣
78 | chapters:
79 | - file : chapters/06/day_06
80 | sections:
81 | - file : chapters/06/recap_week_1
82 | - file : chapters/06/intro_ml
83 | sections:
84 | - file : chapters/06/intro_ml_blank
85 | title : Follow-along notebook 🚀
86 | - file : chapters/06/ml_perf
87 | sections:
88 | - file : chapters/06/ml_perf_blank
89 | title : Follow-along notebook 🚀
90 | - file : chapters/06/homework_06
91 | sections:
92 | - file : chapters/06/ml_practice_blank
93 | title : More ML practice 🚀
94 |
95 | - file : chapters/07/day_07
96 | sections:
97 | - file : chapters/07/features
98 | sections:
99 | - file : chapters/07/features_blank
100 | title : Follow-along notebook 🚀
101 | - file : chapters/07/advanced_ml
102 | sections:
103 | - file : chapters/07/advanced_ml_blank
104 | title : Follow-along notebook 🚀
105 | - file : chapters/07/homework_07
106 |
107 | - file : chapters/08/day_08
108 | sections:
109 | - file : chapters/08/recap_ml
110 | - file : chapters/08/practical
111 | - file : chapters/08/guest_aionics
112 | - file : chapters/08/matminer_features_blank
113 | title : Matminer features 🚀
114 |
115 | - file : chapters/09/day_09
116 | sections:
117 | - file : chapters/09/check_in
118 |
119 | - file : chapters/10/day_10
120 |
121 |
122 | ###############################################################################
123 | ###############################################################################
124 | - caption : Week 3️⃣
125 | chapters:
126 | - file : chapters/11/day_11
127 |
128 | - file : chapters/12/day_12
129 | sections:
130 | - file : chapters/12/welcome_back
131 | - file : chapters/12/grad_school
132 |
133 | - file : chapters/13/day_13
134 | sections:
135 | - file : chapters/13/presentations
136 |
137 | - file : chapters/14/day_14
138 | sections:
139 | - file : chapters/14/pull_requests
140 | - file : chapters/14/peer_review
141 |
142 | - file : chapters/15/day_15
143 | sections:
144 | - file : chapters/15/final_presentations
145 | sections:
146 | - file : chapters/15/student_2
147 | - file : chapters/15/student_3
148 | - file : chapters/15/student_4
149 | - file : chapters/15/student_5
150 | - file : chapters/15/summary
151 | - file : chapters/15/next
152 |
153 |
154 | ###############################################################################
155 | ###############################################################################
156 | - caption : Appendices 📝
157 | chapters:
158 | - file : appendix/acknowl
159 |
--------------------------------------------------------------------------------
/appendix/acknowl.md:
--------------------------------------------------------------------------------
1 | (h1:appendix:acknowl)=
2 | # Acknowledgments
3 |
4 | We thank [Sinéad Griffin](https://www2.lbl.gov/msd/people/investigators/griffin_investigator.html) and [Ryan Miyakawa](https://www2.lbl.gov/msd/people/investigators/miyakawa_investigator.html) for teaching the other two modules in this sequence (Module 2: [Ferroelectrics](https://en.wikipedia.org/wiki/Ferroelectricity) and Module 3: [EUV Lithography](https://en.wikipedia.org/wiki/Extreme_ultraviolet_lithography), respectively).
5 | We thank Teresa Calarco, Laura King, and [Tiffany Reardon](https://engineering.berkeley.edu/popup/tiffany-reardon/) for their help in organizing the funding and logistics. 🙇
6 |
7 | We thank the developers of [Jupyter Book](https://jupyterbook.org/intro.html) and the [Executable Books Project](https://executablebooks.org/en/latest/index.html) for creating this software and providing **excellent documentation**. 🙏
8 | We also thank the [DataHub](https://datahub.berkeley.edu/) developers at UC Berkeley for the interactive computing resources and technical support.
9 |
10 | We are grateful for the support from our friends, colleagues, and mentors over the years, whose incredible wisdom and insights into teaching helped refine our own pedagogy.
11 | Enze thanks Prof. [Michelle Wilkerson](https://gse.berkeley.edu/michelle-h-wilkerson) in the UCB [Graduate School of Education](https://gse.berkeley.edu/) for her motivating comments and suggestions.
12 | And of course, to all of our former and current students (Ana, Jesse, Luis, Nastia, Sydney): thank you for your patience and invaluable feedback as you have challenged us to always perform at our best.
13 |
14 | Mark acknowledges support for his contributions by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences, Materials Sciences and Engineering Division, under Contract No. DE-AC02-05-CH11231 within the Materials Project program (KC23MP).
15 | Enze acknowledges Ph.D. funding through the [NSF Graduate Research Fellowship Program](https://www.nsfgrfp.org/) under Grant No. DGE-2146752.
16 | Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the [National Science Foundation](https://www.nsf.gov/).
17 |
18 |
19 | ```{image} ../assets/fig/appendix/acknowl.png
20 | :width: 100%
21 | ```
--------------------------------------------------------------------------------
/assets/data/2d_walk.npy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/data/2d_walk.npy
--------------------------------------------------------------------------------
/assets/data/README_dielectric_dataset.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/data/README_dielectric_dataset.pdf
--------------------------------------------------------------------------------
/assets/data/anscombe.csv:
--------------------------------------------------------------------------------
1 | 10,8.04,10,9.14,10,7.46,8,6.58
2 | 8,6.95,8,8.14,8,6.77,8,5.76
3 | 13,7.58,13,8.74,13,12.74,8,7.71
4 | 9,8.81,9,8.77,9,7.11,8,8.84
5 | 11,8.33,11,9.26,11,7.81,8,8.47
6 | 14,9.96,14,8.1,14,8.84,8,7.04
7 | 6,7.24,6,6.13,6,6.08,8,5.25
8 | 4,4.26,4,3.1,4,5.39,19,12.5
9 | 12,10.84,12,9.13,12,8.15,8,5.56
10 | 7,4.82,7,7.26,7,6.42,8,7.91
11 | 5,5.68,5,4.74,5,5.73,8,6.89
12 |
--------------------------------------------------------------------------------
/assets/data/elem_props.csv:
--------------------------------------------------------------------------------
1 | symbol,name,atomic_number,atomic_mass,atomic_radius,row,group,is_metal,electronegativity,density_solid,melting_point,molar_volume,refractive_index,elec_resist,therm_cond,youngs_mod,poissons_ratio
2 | H,Hydrogen,1,1.00794,0.25,1,1,False,2.2,,14.01 K,11.42,1.000132 (gas; liquid 1.12)(no units),,0.1805,,
3 | He,Helium,2,4.002602,,1,18,False,,,0.95 K,21.0,1.000035 (gas; liquid 1.028)(no units),,0.1513,,
4 | Li,Lithium,3,6.941,1.45,2,1,True,0.98,535.0,453.69 K,13.02,,9.5e-08,85.0,4.9,
5 | Be,Beryllium,4,9.012182,1.05,2,2,True,1.57,1848.0,1560.0 K,4.85,,3.8e-08,190.0,287.0,0.032
6 | B,Boron,5,10.811,0.85,2,13,False,2.04,2460.0,2349.0 K,4.39,,1000000000000.0,27.0,,
7 | C,Carbon,6,12.0107,0.7,2,14,False,2.55,2267.0,3800.0 K,5.29,2.417 (diamond)(no units),1e-05,140.0,,
8 | N,Nitrogen,7,14.0067,0.65,2,15,False,3.04,,63.05 K,13.54,1.000298 (gas; liquid 1.197)(no units),,0.02583,,
9 | O,Oxygen,8,15.9994,0.6,2,16,False,3.44,,54.8 K,17.36,1.000271 (gas; liquid 1.221)(no units),,0.02658,,
10 | F,Fluorine,9,18.9984032,0.5,2,17,False,3.98,,53.53 K,11.2,1.000195,,0.0277,,
11 | Ne,Neon,10,20.1797,,2,18,False,,,24.56 K,13.23,1.000067,,0.0491,,
12 | Na,Sodium,11,22.98976928,1.8,3,1,True,0.93,968.0,370.87 K,23.78,,4.9e-08,140.0,10.0,
13 | Mg,Magnesium,12,24.305,1.5,3,2,True,1.31,1738.0,923.0 K,14.0,,4.4e-08,160.0,45.0,0.29
14 | Al,Aluminum,13,26.9815386,1.25,3,13,True,1.61,2700.0,933.47 K,10.0,,2.7e-08,235.0,70.0,0.35
15 | Si,Silicon,14,28.0855,1.1,3,14,False,1.9,2330.0,1687.0 K,12.06,,0.001,150.0,47.0,
16 | P,Phosphorus,15,30.973762,1.0,3,15,False,2.19,1823.0,317.3 K,17.02,1.001212,1e-07,0.236,,
17 | S,Sulfur,16,32.065,1.0,3,16,False,2.58,1960.0,388.36 K,15.53,1.001111,1e+23,0.205,,
18 | Cl,Chlorine,17,35.453,1.0,3,17,False,3.16,,171.6 K,17.39,1.000773,10000000000.0,0.0089,,
19 | Ar,Argon,18,39.948,0.71,3,18,False,,,83.8 K,22.56,1.000281,,0.01772,,
20 | K,Potassium,19,39.0983,2.2,4,1,True,0.82,856.0,336.53 K,45.94,,7.5e-08,100.0,,
21 | Ca,Calcium,20,40.078,1.8,4,2,True,1.0,1550.0,1115.0 K,26.2,,3.4e-08,200.0,20.0,0.31
22 | Sc,Scandium,21,44.955912,1.6,4,3,True,1.36,2985.0,1814.0 K,15.0,,5.5e-07,16.0,74.0,0.28
23 | Ti,Titanium,22,47.867,1.4,4,4,True,1.54,4507.0,1941.0 K,10.64,,4e-07,22.0,116.0,0.32
24 | V,Vanadium,23,50.9415,1.35,4,5,True,1.63,6110.0,2183.0 K,8.32,,2e-07,31.0,128.0,0.37
25 | Cr,Chromium,24,51.9961,1.4,4,6,True,1.66,7140.0,2180.0 K,7.23,,1.27e-07,94.0,279.0,0.21
26 | Mn,Manganese,25,54.938045,1.4,4,7,True,1.55,7470.0,1519.0 K,7.35,,1.44e-06,7.8,198.0,
27 | Fe,Iron,26,55.845,1.4,4,8,True,1.83,7874.0,1811.0 K,7.09,,1e-07,80.0,211.0,0.29
28 | Co,Cobalt,27,58.933195,1.35,4,9,True,1.88,8900.0,1768.0 K,6.67,,6e-08,100.0,209.0,0.31
29 | Ni,Nickel,28,58.6934,1.35,4,10,True,1.91,8908.0,1728.0 K,6.59,,7.2e-08,91.0,200.0,0.31
30 | Cu,Copper,29,63.546,1.35,4,11,True,1.9,8920.0,1357.77 K,7.11,,1.72e-08,400.0,130.0,0.34
31 | Zn,Zinc,30,65.409,1.35,4,12,True,1.65,7140.0,692.68 K,9.16,1.00205,6e-08,120.0,108.0,0.25
32 | Ga,Gallium,31,69.723,1.3,4,13,True,1.81,5904.0,302.91 K,11.8,,1.4e-07,29.0,,
33 | Ge,Germanium,32,72.64,1.25,4,14,False,2.01,5323.0,1211.4 K,13.63,,0.0005,60.0,,
34 | As,Arsenic,33,74.9216,1.15,4,15,False,2.18,5727.0,1090.0 K,12.95,1.001552,3.3e-07,50.0,8.0,
35 | Se,Selenium,34,78.96,1.15,4,16,False,2.55,4819.0,494.0 K,16.42,1.000895,1e-08,0.52,10.0,0.33
36 | Br,Bromine,35,79.904,1.15,4,17,False,2.96,,265.8 K,19.78,1.001132,1e+18,0.12,,
37 | Kr,Krypton,36,83.798,,4,18,False,3.0,,115.79 K,27.99,1.000427,,0.00943,,
38 | Rb,Rubidium,37,85.4678,2.35,5,1,True,0.82,1532.0,312.46 K,55.76,,1.33e-07,58.0,2.4,
39 | Sr,Strontium,38,87.62,2.0,5,2,True,0.95,2630.0,1050.0 K,33.94,,1.35e-07,35.0,,0.28
40 | Y,Yttrium,39,88.90585,1.8,5,3,True,1.22,4472.0,1799.0 K,19.88,,6e-07,17.0,64.0,0.24
41 | Zr,Zirconium,40,91.224,1.55,5,4,True,1.33,6511.0,2128.0 K,14.02,,4.33e-07,23.0,68.0,0.34
42 | Nb,Niobium,41,92.90638,1.45,5,5,True,1.6,8570.0,2750.0 K,10.83,,1.52e-07,54.0,105.0,0.4
43 | Mo,Molybdenum,42,95.94,1.45,5,6,True,2.16,10280.0,2896.0 K,9.38,,5.5e-08,139.0,329.0,0.31
44 | Tc,Technetium,43,98.0,1.35,5,7,True,1.9,11500.0,2430.0 K,8.63,,2.2e-07,51.0,,
45 | Ru,Ruthenium,44,101.07,1.3,5,8,True,2.2,12370.0,2607.0 K,8.17,,7.1e-08,120.0,447.0,0.3
46 | Rh,Rhodium,45,102.9055,1.35,5,9,True,2.28,12450.0,2237.0 K,8.28,,4.3e-08,150.0,275.0,0.26
47 | Pd,Palladium,46,106.42,1.4,5,10,True,2.2,12023.0,1828.05 K,8.56,,1.08e-07,72.0,121.0,0.39
48 | Ag,Silver,47,107.8682,1.6,5,11,True,1.93,10490.0,1234.93 K,10.27,,1.63e-08,430.0,83.0,0.37
49 | Cd,Cadmium,48,112.411,1.55,5,12,True,1.69,8650.0,594.22 K,13.0,,7e-08,97.0,50.0,0.3
50 | In,Indium,49,114.818,1.55,5,13,True,1.78,7310.0,429.75 K,15.76,,8e-08,82.0,11.0,
51 | Sn,Tin,50,118.71,1.45,5,14,True,1.96,7310.0,505.08 K,16.29,,1.15e-07,67.0,50.0,0.36
52 | Sb,Antimony,51,121.76,1.45,5,15,False,2.05,6697.0,903.78 K,18.19,,4e-07,24.0,55.0,
53 | Te,Tellurium,52,127.6,1.4,5,16,False,2.1,6240.0,722.66 K,20.46,1.000991,0.0001,3.0,43.0,
54 | I,Iodine,53,126.90447,1.4,5,17,False,2.66,4940.0,386.85 K,25.72,,1000000000000000.0,0.449,,
55 | Xe,Xenon,54,131.293,,5,18,False,2.6,,161.4 K,35.92,1.000702,,0.00565,,
56 | Cs,Cesium,55,132.9054519,2.6,6,1,True,0.79,1879.0,301.59 K,70.94,,2.1e-07,36.0,1.7,
57 | Ba,Barium,56,137.327,2.15,6,2,True,0.89,3510.0,1000.0 K,38.16,,3.4e-07,18.0,13.0,
58 | La,Lanthanum,57,138.90547,1.95,8,3,True,1.1,6146.0,1193.0 K,22.39,,6.15e-07,13.0,37.0,0.28
59 | Ce,Cerium,58,140.116,1.85,8,4,True,1.12,6689.0,1068.0 K,20.69,,7.4e-07,11.0,34.0,0.24
60 | Pr,Praseodymium,59,140.90765,1.85,8,5,True,1.13,6640.0,1208.0 K,20.8,,7e-07,13.0,37.0,0.28
61 | Nd,Neodymium,60,144.242,1.85,8,6,True,1.14,6800.0,1297.0 K,20.59,,6.43e-07,17.0,41.0,0.28
62 | Pm,Promethium,61,145.0,1.85,8,7,True,1.13,7264.0,1373.0 K,20.23,,7.5e-07,15.0,46.0,0.28
63 | Sm,Samarium,62,150.36,1.85,8,8,True,1.17,7353.0,1345.0 K,19.98,,9.4e-07,13.0,50.0,0.27
64 | Eu,Europium,63,151.964,1.85,8,9,True,1.2,5244.0,1099.0 K,28.97,,9e-07,14.0,18.0,0.15
65 | Gd,Gadolinium,64,157.25,1.8,8,10,True,1.2,7901.0,1585.0 K,19.9,,1.31e-06,11.0,55.0,0.26
66 | Tb,Terbium,65,158.92535,1.75,8,11,True,1.1,8219.0,1629.0 K,19.3,,1.15e-06,11.0,56.0,0.26
67 | Dy,Dysprosium,66,162.5,1.75,8,12,True,1.22,8551.0,1680.0 K,19.01,,9.26e-07,11.0,61.0,0.25
68 | Ho,Holmium,67,164.93032,1.75,8,13,True,1.23,8795.0,1734.0 K,18.74,,8.14e-07,16.0,65.0,0.23
69 | Er,Erbium,68,167.259,1.75,8,14,True,1.24,9066.0,1802.0 K,18.46,,8.6e-07,15.0,70.0,0.24
70 | Tm,Thulium,69,168.93421,1.75,8,15,True,1.25,9321.0,1818.0 K,19.1,,6.76e-07,17.0,74.0,0.21
71 | Yb,Ytterbium,70,173.04,1.75,8,16,True,1.1,6570.0,1097.0 K,24.84,,2.5e-07,39.0,24.0,0.21
72 | Lu,Lutetium,71,174.967,1.75,8,17,True,1.27,9841.0,1925.0 K,17.78,,5.8e-07,16.0,69.0,0.26
73 | Hf,Hafnium,72,178.49,1.55,6,4,True,1.3,13310.0,2506.0 K,13.44,,3.4e-07,23.0,78.0,0.37
74 | Ta,Tantalum,73,180.94788,1.45,6,5,True,1.5,16650.0,3290.0 K,10.85,,1.35e-07,57.0,186.0,0.34
75 | W,Tungsten,74,183.84,1.35,6,6,True,2.36,19250.0,3695.0 K,9.47,,5.4e-08,170.0,411.0,0.28
76 | Re,Rhenium,75,186.207,1.35,6,7,True,1.9,21020.0,3459.0 K,8.86,,1.8e-07,48.0,463.0,0.3
77 | Os,Osmium,76,190.23,1.3,6,8,True,2.2,22610.0,3306.0 K,8.42,,8.1e-08,88.0,,0.25
78 | Ir,Iridium,77,192.217,1.35,6,9,True,2.2,22650.0,2739.0 K,8.52,,4.7e-08,150.0,528.0,0.26
79 | Pt,Platinum,78,195.084,1.35,6,10,True,2.28,21090.0,2041.4 K,9.09,,1.06e-07,72.0,168.0,0.38
80 | Au,Gold,79,196.966569,1.35,6,11,True,2.54,19300.0,1337.33 K,10.21,,2.2e-08,320.0,78.0,0.44
81 | Hg,Mercury,80,200.59,1.5,6,12,True,2.0,,234.32 K,14.09,1.000933,9.6e-07,8.3,,
82 | Tl,Thallium,81,204.3833,1.9,6,13,True,1.62,11850.0,577.0 K,17.22,,1.5e-07,46.0,8.0,0.45
83 | Pb,Lead,82,207.2,1.8,6,14,True,2.33,11340.0,600.61 K,18.26,,2.1e-07,35.0,16.0,0.44
84 | Bi,Bismuth,83,208.9804,1.6,6,15,True,2.02,9780.0,544.4 K,21.31,,1.3e-06,8.0,32.0,0.33
85 | Po,Polonium,84,210.0,1.9,6,16,False,2.0,9196.0,527.0 K,22.97,,4e-07,20.0,,
86 | At,Astatine,85,210.0,,6,17,False,2.2,,575.0 K,,,,2.0,,
87 | Rn,Radon,86,220.0,,6,18,False,2.2,,202.0 K,50.5,,,0.00361,,
88 | Fr,Francium,87,223.0,,7,1,True,0.7,,maybe about 300 K,,,,,,
89 | Ra,Radium,88,226.0,2.15,7,2,True,0.9,5000.0,973.0 K,41.09,,1e-06,19.0,,
90 | Ac,Actinium,89,227.0,1.95,9,3,True,1.1,10070.0,1323.0 K,22.55,,,12.0,,
91 | Th,Thorium,90,232.03806,1.8,9,4,True,1.3,11724.0,2115.0 K,19.8,,1.5e-07,54.0,79.0,0.27
92 | Pa,Protactinium,91,231.03588,1.8,9,5,True,1.5,15370.0,1841.0 K,15.18,,1.8e-07,47.0,,
93 | U,Uranium,92,238.02891,1.75,9,6,True,1.38,19050.0,1405.3 K,12.49,,2.8e-07,27.0,208.0,0.23
94 | Np,Neptunium,93,237.0,1.75,9,7,True,1.36,20450.0,910.0 K,11.59,,1.2e-06,6.0,,
95 | Pu,Plutonium,94,244.0,1.75,9,8,True,1.28,19816.0,912.5 K,12.29,,1.5e-06,6.0,96.0,0.21
96 | Am,Americium,95,243.0,1.75,9,9,True,1.3,,1449.0 K,17.63,,,10.0,,
97 | Cm,Curium,96,247.0,,9,10,True,1.3,13510.0,1613.0 K,18.05,,,8.8,,
98 | Bk,Berkelium,97,247.0,,9,11,True,1.3,14780.0,1259.0 K,16.84,,,10.0,,
99 | Cf,Californium,98,251.0,,9,12,True,1.3,15100.0,1173.0 K,16.5,,,,,
100 | Es,Einsteinium,99,252.0,,9,13,True,1.3,,1133.0 K,28.52,,,,,
101 | Fm,Fermium,100,257.0,,9,14,True,1.3,,1800.0 K,,,,,,
102 |
--------------------------------------------------------------------------------
/assets/data/element_structure.txt:
--------------------------------------------------------------------------------
1 | # Data from https://periodictable.com/Properties/A/CrystalStructure.html
2 | Hydrogen Hexagonal
3 | Helium Cubic
4 | Lithium Cubic
5 | Beryllium Hexagonal
6 | Boron Trigonal
7 | Carbon Hexagonal
8 | Nitrogen Hexagonal
9 | Oxygen Monoclinic
10 | Fluorine Monoclinic
11 | Neon Cubic
12 | Sodium Cubic
13 | Magnesium Hexagonal
14 | Aluminum Cubic
15 | Silicon Cubic
16 | Phosphorus Triclinic
17 | Sulfur Orthorhombic
18 | Chlorine Orthorhombic
19 | Argon Cubic
20 | Potassium Cubic
21 | Calcium Cubic
22 | Scandium Hexagonal
23 | Titanium Hexagonal
24 | Vanadium Cubic
25 | Chromium Cubic
26 | Manganese Cubic
27 | Iron Cubic
28 | Cobalt Hexagonal
29 | Nickel Cubic
30 | Copper Cubic
31 | Zinc Hexagonal
32 | Gallium Orthorhombic
33 | Germanium Cubic
34 | Arsenic Trigonal
35 | Selenium Monoclinic
36 | Bromine Orthorhombic
37 | Krypton Cubic
38 | Rubidium Cubic
39 | Strontium Cubic
40 | Yttrium Hexagonal
41 | Zirconium Hexagonal
42 | Niobium Cubic
43 | Molybdenum Cubic
44 | Technetium Hexagonal
45 | Ruthenium Hexagonal
46 | Rhodium Cubic
47 | Palladium Cubic
48 | Silver Cubic
49 | Cadmium Hexagonal
50 | Indium Tetragonal
51 | Tin Tetragonal
--------------------------------------------------------------------------------
/assets/data/hardness_density.csv:
--------------------------------------------------------------------------------
1 | # Data obtained from Wikipedia,,,
2 | Element,Number,Mohs hardness,Density (g/cc)
3 | lithium,3,0.6,0.534
4 | beryllium,4,5.5,1.85
5 | boron,5,9.4,2.34
6 | carbon,6,10,3.513
7 | sodium,11,0.5,0.968
8 | magnesium,12,2.5,1.738
9 | aluminium,13,2.75,2.7
10 | silicon,14,6.5,2.33
11 | sulfur,16,2,2.08
12 | potassium,19,0.4,0.89
13 | calcium,20,1.75,1.55
14 | titanium,22,6,4.506
15 | vanadium,23,7,6.11
16 | chromium,24,8.5,7.15
17 | manganese,25,6,7.21
18 | iron,26,4,7.86
19 | cobalt,27,5,8.9
20 | nickel,28,4,8.908
21 | copper,29,3,8.96
22 | zinc,30,2.5,7.14
23 | gallium,31,1.5,5.91
24 | germanium,32,6,5.323
25 | arsenic,33,3.5,5.727
26 | selenium,34,2,4.81
27 | rubidium,37,0.3,1.532
28 | strontium,38,1.5,2.64
29 | zirconium,40,5,6.52
30 | niobium,41,6,8.57
31 | molybdenum,42,5.5,10.28
32 | ruthenium,44,6.5,12.45
33 | rhodium,45,6,12.41
34 | palladium,46,4.75,12.023
35 | silver,47,2.5,10.49
36 | cadmium,48,2,8.65
37 | indium,49,1.2,7.31
38 | tin,50,1.5,7.265
39 |
--------------------------------------------------------------------------------
/assets/data/kmeans_data.npy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/data/kmeans_data.npy
--------------------------------------------------------------------------------
/assets/data/lattice_diffusion.npy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/data/lattice_diffusion.npy
--------------------------------------------------------------------------------
/assets/data/mentors.txt:
--------------------------------------------------------------------------------
1 | Enze
2 | Mark
3 | Ryan
4 | Sinead
--------------------------------------------------------------------------------
/assets/data/number_weight.npy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/data/number_weight.npy
--------------------------------------------------------------------------------
/assets/fig/01/band_gap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/band_gap.png
--------------------------------------------------------------------------------
/assets/fig/01/crystal_family.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/crystal_family.png
--------------------------------------------------------------------------------
/assets/fig/01/cube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/cube.png
--------------------------------------------------------------------------------
/assets/fig/01/dielectric_capacitor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/dielectric_capacitor.png
--------------------------------------------------------------------------------
/assets/fig/01/dielectric_polarization_atom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/dielectric_polarization_atom.png
--------------------------------------------------------------------------------
/assets/fig/01/dielectric_polarization_material.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/dielectric_polarization_material.png
--------------------------------------------------------------------------------
/assets/fig/01/jupyter_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/jupyter_menu.png
--------------------------------------------------------------------------------
/assets/fig/01/lattice_diffusion_schematic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/lattice_diffusion_schematic.png
--------------------------------------------------------------------------------
/assets/fig/01/length_scales.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/length_scales.png
--------------------------------------------------------------------------------
/assets/fig/01/moores_law.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/moores_law.png
--------------------------------------------------------------------------------
/assets/fig/01/mse_tetrahedron.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/mse_tetrahedron.png
--------------------------------------------------------------------------------
/assets/fig/01/nmos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/nmos.png
--------------------------------------------------------------------------------
/assets/fig/01/numpy_arrays.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/numpy_arrays.png
--------------------------------------------------------------------------------
/assets/fig/01/pbc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/pbc.png
--------------------------------------------------------------------------------
/assets/fig/01/python.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/python.png
--------------------------------------------------------------------------------
/assets/fig/01/python_so.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/python_so.png
--------------------------------------------------------------------------------
/assets/fig/01/python_xkcd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/python_xkcd.png
--------------------------------------------------------------------------------
/assets/fig/01/venn_diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/01/venn_diagram.png
--------------------------------------------------------------------------------
/assets/fig/01/venn_diagram.svg:
--------------------------------------------------------------------------------
1 |
2 |
136 |
--------------------------------------------------------------------------------
/assets/fig/02/api.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/api.png
--------------------------------------------------------------------------------
/assets/fig/02/convex_hull_NiAl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/convex_hull_NiAl.png
--------------------------------------------------------------------------------
/assets/fig/02/diffraction.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/diffraction.jpg
--------------------------------------------------------------------------------
/assets/fig/02/images.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/images.png
--------------------------------------------------------------------------------
/assets/fig/02/mapi_url.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/mapi_url.png
--------------------------------------------------------------------------------
/assets/fig/02/microstructure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/microstructure.png
--------------------------------------------------------------------------------
/assets/fig/02/pandas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/pandas.png
--------------------------------------------------------------------------------
/assets/fig/02/super_json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/super_json.png
--------------------------------------------------------------------------------
/assets/fig/02/super_json.svg:
--------------------------------------------------------------------------------
1 |
2 |
132 |
--------------------------------------------------------------------------------
/assets/fig/02/table_format.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/table_format.png
--------------------------------------------------------------------------------
/assets/fig/02/xkcd_wisdom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/02/xkcd_wisdom.png
--------------------------------------------------------------------------------
/assets/fig/03/cited_by.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/cited_by.png
--------------------------------------------------------------------------------
/assets/fig/03/diel_df_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/diel_df_example.png
--------------------------------------------------------------------------------
/assets/fig/03/google_scholar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/google_scholar.png
--------------------------------------------------------------------------------
/assets/fig/03/ml_screening_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/ml_screening_1.png
--------------------------------------------------------------------------------
/assets/fig/03/ml_screening_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/ml_screening_2.png
--------------------------------------------------------------------------------
/assets/fig/03/ml_screening_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/ml_screening_3.png
--------------------------------------------------------------------------------
/assets/fig/03/ml_screening_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/ml_screening_4.png
--------------------------------------------------------------------------------
/assets/fig/03/ml_screening_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/ml_screening_5.png
--------------------------------------------------------------------------------
/assets/fig/03/ml_screening_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/ml_screening_6.png
--------------------------------------------------------------------------------
/assets/fig/03/ml_screening_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/03/ml_screening_7.png
--------------------------------------------------------------------------------
/assets/fig/04/RFCV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/04/RFCV.png
--------------------------------------------------------------------------------
/assets/fig/04/anscombe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/04/anscombe.png
--------------------------------------------------------------------------------
/assets/fig/04/histogram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/04/histogram.png
--------------------------------------------------------------------------------
/assets/fig/04/pearson.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/04/pearson.png
--------------------------------------------------------------------------------
/assets/fig/05/DL_CO2_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/DL_CO2_0.png
--------------------------------------------------------------------------------
/assets/fig/05/DL_CO2_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/DL_CO2_1.png
--------------------------------------------------------------------------------
/assets/fig/05/DL_CO2_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/DL_CO2_2.png
--------------------------------------------------------------------------------
/assets/fig/05/DL_CO2_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/DL_CO2_3.png
--------------------------------------------------------------------------------
/assets/fig/05/conda_activate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/conda_activate.png
--------------------------------------------------------------------------------
/assets/fig/05/conda_install.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/conda_install.png
--------------------------------------------------------------------------------
/assets/fig/05/conda_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/conda_start.png
--------------------------------------------------------------------------------
/assets/fig/05/conda_what_if.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/conda_what_if.png
--------------------------------------------------------------------------------
/assets/fig/05/ventura.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/05/ventura.jpg
--------------------------------------------------------------------------------
/assets/fig/06/cross_validation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/06/cross_validation.png
--------------------------------------------------------------------------------
/assets/fig/06/gradient_descent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/06/gradient_descent.png
--------------------------------------------------------------------------------
/assets/fig/06/gradient_descent_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/06/gradient_descent_1.png
--------------------------------------------------------------------------------
/assets/fig/06/gradient_descent_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/06/gradient_descent_2.png
--------------------------------------------------------------------------------
/assets/fig/06/gradient_descent_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/06/gradient_descent_3.png
--------------------------------------------------------------------------------
/assets/fig/06/gradient_descent_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/06/gradient_descent_4.png
--------------------------------------------------------------------------------
/assets/fig/06/linear_regression.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/06/linear_regression.png
--------------------------------------------------------------------------------
/assets/fig/07/decision_tree_class.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/07/decision_tree_class.png
--------------------------------------------------------------------------------
/assets/fig/07/magpie_features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/07/magpie_features.png
--------------------------------------------------------------------------------
/assets/fig/07/matminer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/07/matminer.png
--------------------------------------------------------------------------------
/assets/fig/08/austin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/08/austin.jpg
--------------------------------------------------------------------------------
/assets/fig/14/github_branch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_branch.png
--------------------------------------------------------------------------------
/assets/fig/14/github_compare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_compare.png
--------------------------------------------------------------------------------
/assets/fig/14/github_compare2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_compare2.png
--------------------------------------------------------------------------------
/assets/fig/14/github_edits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_edits.png
--------------------------------------------------------------------------------
/assets/fig/14/github_fork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_fork.png
--------------------------------------------------------------------------------
/assets/fig/14/github_forked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_forked.png
--------------------------------------------------------------------------------
/assets/fig/14/github_open_pr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_open_pr.png
--------------------------------------------------------------------------------
/assets/fig/14/github_propose.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/github_propose.png
--------------------------------------------------------------------------------
/assets/fig/14/suggest_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/14/suggest_edit.png
--------------------------------------------------------------------------------
/assets/fig/15/Anastasia_electr_final.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/15/Anastasia_electr_final.png
--------------------------------------------------------------------------------
/assets/fig/15/Luis_final.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/15/Luis_final.png
--------------------------------------------------------------------------------
/assets/fig/15/back_to_the_science.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/15/back_to_the_science.png
--------------------------------------------------------------------------------
/assets/fig/15/moores_law.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/15/moores_law.png
--------------------------------------------------------------------------------
/assets/fig/15/temp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/15/temp.png
--------------------------------------------------------------------------------
/assets/fig/15/temp.svg:
--------------------------------------------------------------------------------
1 |
2 |
77 |
--------------------------------------------------------------------------------
/assets/fig/15/thats_all_folks.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/15/thats_all_folks.gif
--------------------------------------------------------------------------------
/assets/fig/appendix/acknowl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/appendix/acknowl.png
--------------------------------------------------------------------------------
/assets/fig/appendix/jupyter_book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/appendix/jupyter_book.png
--------------------------------------------------------------------------------
/assets/fig/appendix/lbl_logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/appendix/lbl_logo.jpg
--------------------------------------------------------------------------------
/assets/fig/appendix/nsf_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/appendix/nsf_logo.png
--------------------------------------------------------------------------------
/assets/fig/mi_favicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
88 |
--------------------------------------------------------------------------------
/assets/fig/preamble/chrome_update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/chrome_update.png
--------------------------------------------------------------------------------
/assets/fig/preamble/enze.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/enze.jpg
--------------------------------------------------------------------------------
/assets/fig/preamble/firefox_update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/firefox_update.png
--------------------------------------------------------------------------------
/assets/fig/preamble/firefox_update_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/firefox_update_1.png
--------------------------------------------------------------------------------
/assets/fig/preamble/firefox_update_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/firefox_update_2.png
--------------------------------------------------------------------------------
/assets/fig/preamble/github_join.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/github_join.png
--------------------------------------------------------------------------------
/assets/fig/preamble/mark.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/mark.jpg
--------------------------------------------------------------------------------
/assets/fig/preamble/mp_dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/mp_dashboard.png
--------------------------------------------------------------------------------
/assets/fig/preamble/nmos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/nmos.png
--------------------------------------------------------------------------------
/assets/fig/preamble/petousis_n_Eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/petousis_n_Eg.png
--------------------------------------------------------------------------------
/assets/fig/preamble/slack_pref.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/slack_pref.png
--------------------------------------------------------------------------------
/assets/fig/preamble/slack_update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/slack_update.png
--------------------------------------------------------------------------------
/assets/fig/preamble/zoom_update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enze-chen/mi-book-2022/a4b571327cf1c065f5f3d34e01316baee545896f/assets/fig/preamble/zoom_update.png
--------------------------------------------------------------------------------
/assets/files/make_blank_nb.py:
--------------------------------------------------------------------------------
1 | '''
2 | Copied liberally from the tool by Zach del Rosario, https://github.com/zdelrosario/jupyter-authoring
3 | Enze Chen, 2021/06/06
4 | '''
5 | import os
6 | import sys
7 | import nbformat
8 | import re
9 | from copy import deepcopy
10 | from datetime import datetime
11 |
12 | # command line interface
13 | if len(sys.argv) != 2:
14 | print('Usage: python make_blank_nb.py [dirname]')
15 | sys.exit(1)
16 | print(f'Starting cleaning at {datetime.now()}')
17 | dirname = sys.argv[1]
18 | files = os.listdir(dirname)
19 | for f in files:
20 | if f.endswith('_master.ipynb'):
21 |
22 | # Process the master notebook file
23 | filename_orig = os.path.join(dirname, f)
24 | filename_blank = filename_orig.replace('master', 'blank')
25 |
26 |
27 | # load the notebook
28 | nb_orig = nbformat.read(filename_orig, as_version=4)
29 | nb_blank = deepcopy(nb_orig)
30 | nb_solu = deepcopy(nb_orig)
31 |
32 | for cell_id in range(len(nb_orig['cells'])):
33 | cell_orig = nb_orig['cells'][cell_id]
34 | text_blank = cell_orig['source']
35 |
36 | # process markdown and code cells
37 | if (cell_orig['cell_type'] == 'markdown') or (cell_orig['cell_type'] == 'code'):
38 | text_blank = re.sub(
39 | '(\n|.)*?\n?',
40 | '',
41 | text_blank
42 | )
43 | text_blank = re.sub(
44 | '# solution-begin(\n|.)*?# solution-end',
45 | '',
46 | text_blank
47 | )
48 |
49 | else:
50 | raise ValueError(f'Unrecognized cell type {cell_orig["cell_type"]}.')
51 |
52 | # write the results
53 | nb_blank['cells'][cell_id]["source"] = text_blank
54 |
55 |
56 | # write blank notebook to file
57 | nbformat.write(nb_blank, filename_blank)
58 | print(f"{filename_orig.split('/')[-1]} successfully scrubbed! Blank notebook created.")
--------------------------------------------------------------------------------
/assets/files/mp_api_key.txt:
--------------------------------------------------------------------------------
1 | # Paste your Materials Project API key on the next line
2 |
3 |
--------------------------------------------------------------------------------
/chapters/01/day_01.md:
--------------------------------------------------------------------------------
1 | (h1:01:intro)=
2 | # Day 01: Introductions
3 |
4 |
5 | Welcome to the first day of Module 1!
6 | We're excited to learn with you. 🙌
7 |
8 | ```{attention}
9 | If you haven't done so already, please make sure that you've completed the [introductory survey](https://forms.gle/o9wmGWkj4E1HmoQN8) and completed the {doc}`../../preamble/setup` instructions.
10 | ```
11 |
12 | We also invite you to read through the {doc}`../../preamble/overview` and the condensed {doc}`Schedule <../../preamble/schedule>` to get a feel for what we'll be doing in this module.
13 | If you don't have time to do so, not to worry---we will clarify
everythingmost things today. 🙂
14 |
15 |
16 |
17 | ## Goals for today
18 |
19 | - Kick off the summer internship!
20 | - Get to know everyone better and our motivations for being here.
21 | - Discuss the structure of this module and clarify the expectations.
22 | - Introduce [materials informatics (MI)](https://en.wikipedia.org/wiki/Materials_informatics) at a high level.
23 | - Introduce the [Python programming language](https://www.python.org/) and how we will use it for MI.
24 | - Get ample practice with Python and the [Jupyter environment](https://jupyter.org/), including:
25 | - Common syntax, data types, and data structures
26 | - Working with files
27 | - Scientific computing in [NumPy](https://numpy.org/)
28 |
29 |
30 |
31 | ## Timing for today
32 |
33 | - We will begin the day at 9:00AM PDT.
34 | - We will have a mix of lectures and group exercises, interspersed with several short breaks.
35 | - We will take a longer break for lunch between 12:00PM and 1:00PM PDT.
36 | - Enze will hold drop-in office hours (OH) from 2:00PM to 3:00PM PDT if you want to chat about the reading, Python, or _anything else_ in this module/program.
37 | Attendance is optional, as you need it.
38 | - We will convene for a quick debrief at 3:00PM PDT.
39 |
40 |
41 |
42 | ## Activities for today
43 |
44 | ```{tableofcontents}
45 | ```
46 |
47 |
48 |
--------------------------------------------------------------------------------
/chapters/01/homework_01.md:
--------------------------------------------------------------------------------
1 | (h1:01:homework_01)=
2 | # Homework
3 |
4 | Today's "homework" is a mix of reading and programming.
5 |
6 | ## Reading
7 |
8 | To help prepare for tomorrow's tutorial on MI, please read the following papers, which can be found in [this Google Drive folder](https://drive.google.com/drive/folders/1o02Z8IsLw9kIsN79vahu-EeyOQP3OrNh?usp=sharing).
9 |
10 | 1. [The perspective](https://drive.google.com/file/d/15UQ5rXq0jP8AI4992YcEW8I-3_9QrT0Q/view?usp=sharing) by Jain et al. {cite}`b2-jain_2016`.
11 | - The most critical sections are **I, II, and V**. The rest can be safely skipped.
12 | 1. [The paper](https://drive.google.com/file/d/1WQnZgRzIpYCumWlbEWTEcRibTU_fSPTm/view?usp=sharing) by Kyle Michel and Bryce Meredig {cite}`b2-michel_2016`.
13 | - The exact schema (Physical Information File) is not important, but pay attention to their motivations and design choices, because they raise important issues.
14 | - Reading the abstract and figures closely should be the focus.
15 |
16 | To make your reading experience a little more interactive and to allow for more targeted questions, we'll experiment with leaving comments _directly on the PDF_ in Google Drive.
17 | You're welcome to ask/answer questions, share observations/reactions, link related content, etc.
18 | We've left a few comments on the two documents as a demonstration.
19 | Participation is _optional_, but encouraged if you do have questions or thoughts to share.
20 | This way we have full context for your questions, the discussion is preserved and organized (opposed to a stream of consciousness on Slack), and everyone can benefit from the discussion. 😊
21 | Enze will periodically check the Google Drive to respond to your comments, but you can also ping him for a faster response.
22 |
23 |
24 |
25 | ## Programming
26 |
27 | Today's programming assignment is intended to be a Python primer.
28 | These are some core concepts in the Python language and [NumPy](https://numpy.org/) {cite}`b2-harris_2020` that we believe are important for you to learn.
29 | As we move forward, we will be building on these concepts and you might find yourself applying them in your self-directed research.
30 |
31 | There are several exercises in {doc}`python_gory_details_blank` to help you build familiarity with the language.
32 | The notebook introduces the language from the very beginning, so even if you know these concepts already, we hope you will find the review helpful.
33 |
34 |
35 |
36 | ## References
37 |
38 | ```{bibliography}
39 | :style: unsrt
40 | :filter: docname in docnames
41 | :keyprefix: b2-
42 | ```
43 |
44 |
--------------------------------------------------------------------------------
/chapters/01/informatics.md:
--------------------------------------------------------------------------------
1 | (h1:01:informatics)=
2 | # Intro to MI
3 |
4 |
5 | The following presentation kicks off this module by continuing our discussion from earlier.
6 | Several of the slides will look familiar to you, but we will also give a few more details on the scientific problem at hand: dielectric materials.
7 |
8 |
9 |
10 | For some extra reading on the science, we recommend taking a look at Sections 4.1 through 4.4 and 7.1 through 7.4 of the Kasap textbook{cite}`b3-kasap_2017`.
11 |
12 |
13 | ## References
14 |
15 | ```{bibliography}
16 | :style: unsrt
17 | :filter: docname in docnames
18 | :keyprefix: b3-
19 | ```
--------------------------------------------------------------------------------
/chapters/02/convex_hull_NiAl.py:
--------------------------------------------------------------------------------
1 | import os
2 | import requests
3 |
4 | import numpy as np
5 | from scipy.spatial import ConvexHull
6 | import matplotlib.pyplot as plt
7 |
8 | from pymatgen.ext.matproj import MPRester
9 |
10 |
11 | def get_fractions(entries):
12 | '''
13 | Convert formulas into fraction of Al.
14 |
15 | Args:
16 | entries: list of responses queried using MPRester.
17 |
18 | Returns:
19 | A list of fraction of Al in the formula.
20 | '''
21 | fractions = []
22 | for e in entries:
23 | split = e['pretty_formula'].split('Ni')
24 | if split[1] == '':
25 | n_Ni = 1
26 | else:
27 | n_Ni = int(split[1])
28 |
29 | s2 = split[0].split('Al')
30 | if s2[1] == '':
31 | n_Al = 1
32 | else:
33 | n_Al = int(s2[1])
34 |
35 | fractions.append(n_Al / (n_Ni + n_Al))
36 | return fractions
37 |
38 |
39 |
40 | def plot_convex_hull(api_key):
41 | '''
42 | Plot the convex hull for NiAl compounds.
43 |
44 | Args:
45 | api_key: string for the MAPI key.
46 | '''
47 | props = ['formation_energy_per_atom', 'pretty_formula', 'e_above_hull']
48 | with MPRester(api_key=api_key) as mpr:
49 | entries = mpr.query({'elements':['Al', 'Ni']}, props)
50 | # display(entries)
51 |
52 | # clean up the entries
53 | fracs = get_fractions(entries)
54 | inds = np.argsort(fracs)
55 | fracs = sorted(fracs)
56 | fracs.insert(0, 0)
57 | fracs.append(1)
58 | entries_sorted = [entries[i] for i in inds]
59 | entries_sorted.insert(0, {'formation_energy_per_atom':0.0, 'pretty_formula':'Ni', 'e_above_hull':0.0})
60 | entries_sorted.append({'formation_energy_per_atom':0.0, 'pretty_formula':'Al', 'e_above_hull':0.0})
61 |
62 | # calculate convex hull using SciPy
63 | points = []
64 | for i in range(len(fracs)):
65 | points.append([fracs[i], entries_sorted[i]['formation_energy_per_atom']])
66 | points = np.array(points)
67 | hull = ConvexHull(points)
68 |
69 | # plotting
70 | plt.rcParams.update({'figure.figsize':(15,6), # Increase figure size
71 | 'font.size':20, # Increase font size
72 | 'mathtext.fontset':'cm', # Change math font to Computer Modern
73 | 'mathtext.rm':'serif', # Documentation recommended follow-up
74 | 'lines.linewidth':5, # Thicker plot lines
75 | 'lines.markersize':12, # Larger plot points
76 | 'axes.linewidth':2, # Thicker axes lines (but not too thick)
77 | 'xtick.direction':'in', # Change x-axis ticks to point in
78 | 'ytick.direction':'in', # Ditto for y-axis ticks
79 | 'xtick.major.size':8, # Make the x-ticks longer (our plot is larger!)
80 | 'xtick.major.width':2, # Make the x-ticks wider
81 | 'ytick.major.size':8, # Ditto for y-ticks
82 | 'ytick.major.width':2}) # Ditto for y-ticks})
83 | fig, ax = plt.subplots()
84 | ax.plot(points[:, 0], points[:, 1], 'd', ms=8, c='C1')
85 |
86 | for i, simplex in enumerate(hull.simplices):
87 | if i > 0:
88 | ax.plot(points[simplex, 0], points[simplex, 1], 'k', lw=3.5, alpha=0.6)
89 |
90 | for i, e in enumerate(entries_sorted):
91 | if e['e_above_hull'] < 0.01:
92 | ax.plot(points[i, 0], points[i, 1], 'o', c='C2')
93 | if points[i, 0] == 0.6:
94 | ax.text(points[i, 0] + 0.05, points[i, 1] - 0.01, e['pretty_formula'], va='center', ha='center', size=20)
95 | elif points[i, 0] == 4/7:
96 | ax.text(points[i, 0] + 0.04, points[i, 1] - 0.05, e['pretty_formula'], va='center', ha='center', size=20)
97 | else:
98 | ax.text(points[i, 0], points[i, 1] - 0.065, e['pretty_formula'], va='center', ha='center', size=20)
99 |
100 | ax.set_xlabel('Fraction of Al in Al$_{x}$Ni$_{1-x}$')
101 | ax.set_ylabel('Formation energy (eV/atom)')
102 | ax.set_xlim([-0.05, 1.05])
103 | ax.set_ylim([-0.8, 0])
104 | ax.set_xticks(np.linspace(0, 1, 11))
105 | plt.show()
106 | # fig.savefig('../02/convex_hull_NiAl.png', dpi=300, bbox_inches='tight')
--------------------------------------------------------------------------------
/chapters/02/databases.md:
--------------------------------------------------------------------------------
1 | (h1:02:databases)=
2 | # Databases
3 |
4 | Up until now, we've focused a lot on files and how different file types are suitable for different kinds of materials data and informatics applications.
5 | For an individual user working in a particular domain, files are familiar and friendly to work with and simply make the most sense.
6 | But in addition to files, another common source for data is a **database**, which consists of structured information that is controlled by a management system.
7 | Given the rapid development of several materials-related databases and your potential need to pull data from these sources, we'll spend some time in this lesson discussing their purpose and usage, with a particular focus on a local product: [The Materials Project](https://materialsproject.org/).
8 |
9 |
10 |
11 | ## Why might we use a database?
12 |
13 | It is likely that many of you have never used a database before (that's OK!), so let's start by discussing why a database is even necessary.
14 | When we talk about structured data in databases, what you should picture in your head is _not_ something like Google Drive that stores a collection of files, but rather a platform that stores a collection of _pandas DataFrame-esque objects_ (the actual DataFrames, not CSV files of that data).
15 | This is a crude analogy, but one that relates databases to something you already have experience with.
16 | And just as how you found DataFrames easy to work with thanks to its **indexing** capabilities, databases too are indexed in a way that facilitates data retrieval (we call these _queries_), slicing, and more.
17 | The other details can be saved for a dedicated course like [CS W186](https://www2.eecs.berkeley.edu/Courses/CSW186/), but some general reasons for using a database include:
18 |
19 | - When you have _too much data_ to sensibly organize into files.
20 | Besides, we saw that all files had limitations in their expressiveness, and we can't just store everything in binary files because then we have no idea what's in it until it's opened by the appropriate software.
21 | - When you need to **scale up** your operations to many users accessing multiple pieces of data _concurrently_.
22 | - You need a _standardized, flexible, and fast data access pattern_ that doesn't just involve combing through files.
23 | Particularly if the data are spread into bits and pieces across many different "files" uploaded to the database at different times, by different users, etc.
24 | - You need to enforce permissions and other security protocols that goes beyond "who has access to which files."
25 |
26 |
27 |
28 | ## What materials-related databases are publicly accessible?
29 |
30 | Here is a list of some common materials databases (and data infrastructure, more broadly) that you might consult for self-directed research:
31 |
32 | - [AFLOW](http://aflowlib.org/): First-principles calculated properties mostly for inorganic crystal structures.
33 | - [Crystallography Open Database](http://nanocrystallography.org/): Crystal structures of organic, inorganic, and metal-organic compounds.
34 | - [Materials Data Facility (MDF)](https://www.materialsdatafacility.org/): Data publication platform for materials datasets.
35 | - [Open Quantum Materials Database (OQMD)](http://oqmd.org/): First-principles calculated properties mostly for inorganic crystal structures.
36 | - [Materials Project (MP)](https://materialsproject.org/): First-principles calculated properties similar to AFLOW and OQMD.
37 | - [Citrination](https://citrination.com/): A database of various materials data contributed by the MI community.
38 | - [MatWeb](http://matweb.com/): A database for properties of various engineering materials and their datasheets.
39 | - These aren't databases _per se_, but there are other websites with lots of materials-related data such as Wikipedia, WolframAlpha, etc.
40 |
41 | For more sources, you can try searching on Google, reading MI review papers such as the one by [Himanen et al. _Adv. Sci._, 2019](https://onlinelibrary.wiley.com/doi/abs/10.1002/advs.201900808) {cite}`c2-himanen_2019`, or looking at the "Data availability" sections at the end of relevant papers.
42 |
43 |
44 |
45 | ## The Materials Project
46 |
47 | We'll begin our discussion of the Materials Project with these slides:
48 |
49 |
50 |
51 |
52 |
53 | ### Exploring the UI
54 |
55 | This will be done as part of the above discussion.
56 |
57 |
58 |
59 | ### Exploring the API
60 |
61 | Please see the accompanying Jupyter notebook.
62 |
63 |
64 |
65 | ## References
66 |
67 | Here are some more papers if you're interested in the technical details behind the Materials Project {cite}`c2-jain_2013, c2-ong_2013, c2-ong_2015`.
68 |
69 | ```{bibliography}
70 | :style: unsrt
71 | :filter: docname in docnames
72 | :keyprefix: c2-
73 | ```
74 |
75 |
--------------------------------------------------------------------------------
/chapters/02/day_02.md:
--------------------------------------------------------------------------------
1 | (h1:02:intro)=
2 | # Day 02: MI and data
3 |
4 | Welcome to day ✌ where we will take a deeper dive into the field of MI with a particular emphasis on data types, data representation, and data storage.
5 | As we discussed yesterday, there will be many hands-on exercises for you in these lessons to build confidence and experience working with programmatic tools.
6 |
7 |
8 |
9 | ## Goals for today
10 |
11 | - Discuss specific opportunities and challenges for materials informatics.
12 | - Work with the most common file types for storing materials data.
13 | - Learn how to use the [pandas package](https://pandas.pydata.org/) for working with tabular data.
14 | - Introduce the [Materials Project](https://materialsproject.org/) database user interface (UI) and its application programming interface (API) with [Pymatgen](https://pymatgen.org/).
15 | - Learn how to find and read software documentation.
16 |
17 |
18 |
19 | ## Timing for today
20 |
21 | - We will kick off the day at 9:00AM PDT.
22 | - We will have a mix of lectures and group exercises, interspersed with several short breaks.
23 | - Enze will hold drop-in OH from 2:00PM to 3:00PM PDT.
24 | - We will have our afternoon debrief at the scheduled time.
25 |
26 |
27 |
28 | ## Activities for today
29 |
30 | ```{tableofcontents}
31 | ```
32 |
33 |
34 |
--------------------------------------------------------------------------------
/chapters/02/homework_02.md:
--------------------------------------------------------------------------------
1 | (h1:02:homework_02)=
2 | # Homework
3 |
4 | The main "new thing" for today's homework is the paper on the dielectric constants, which you saw in the final exercise in {doc}`tabular_data_blank`.
5 | We recommend making that paper the priority, and then reviewing any of the code we went over yesterday/today as you need.
6 |
7 |
8 | ## Reading
9 |
10 | To recap some of the topics presented today in preparation for self-directed research, we suggest a few papers below on the Materials Project and its dielectric dataset.
11 | These papers can all be found in [this Google Drive folder](https://drive.google.com/drive/folders/1o02Z8IsLw9kIsN79vahu-EeyOQP3OrNh?usp=sharing).
12 |
13 | 1. [The perspective](https://drive.google.com/file/d/15UQ5rXq0jP8AI4992YcEW8I-3_9QrT0Q/view?usp=sharing) by Jain et al. {cite}`c3-jain_2016`.
14 | - The most critical sections are **I, II, and V**. The rest can be safely skipped.
15 | 1. The [paper about the dielectric constants dataset](https://drive.google.com/file/d/1yGQ7G8n_DrLdpsC9e72gb3eKSAGP5-AU/view?usp=sharing) on Materials Project (MP) by Ioannis Petousis et al. {cite}`c3-petousis_2017`.
16 | - We **strongly recommend reading the paper in its entirety** because it gives a comprehensive (and not-too-specialized) discussion about the data format, the underlying science, and some interesting trends that can motivate your self-directed research.
17 | It's not too long and mostly has tables and figures.
18 |
19 |
20 | Again, to make your reading experience a little more interactive and to allow for more targeted questions, we'll experiment with leaving comments _directly on the PDF_ in Google Drive.
21 | You're welcome to ask/answer questions, share observations/reactions, link related content, etc.
22 | Participation is _optional_, but encouraged if you do have questions or thoughts to share. 😊
23 | Enze will periodically check the Google Drive to respond to your comments.
24 |
25 |
26 |
27 | ## Programming
28 |
29 | There will be no programming "homework" today as we've already looked at quite a bit of code.
30 | We recommend reviewing the lessons that were most unclear, and/or trying some new things with the framework we laid out.
31 | Examples include further exploring the dielectric constants dataset, pandas functions, Pymatgen functions, or anything else of interest to you.
32 | Along the way, if you have any questions or get stuck anywhere, please don't hesitate to reach out and we'd be happy to help.
33 |
34 |
35 |
36 | ## References
37 |
38 | ```{bibliography}
39 | :style: unsrt
40 | :filter: docname in docnames
41 | :keyprefix: c3-
42 | ```
43 |
44 |
--------------------------------------------------------------------------------
/chapters/02/opportunities.md:
--------------------------------------------------------------------------------
1 | (h1:02:opportunities)=
2 | # Opportunities and challenges
3 |
4 | We'll begin our discussion with these slides:
5 |
6 |
7 |
8 |
9 |
10 | ## References
11 |
12 | Here are some helpful papers on this topic {cite}`c1-jain_2016, c1-mcdowell_2021`.
13 |
14 | ```{bibliography}
15 | :style: unsrt
16 | :filter: docname in docnames
17 | :keyprefix: c1-
18 | ```
19 |
20 |
--------------------------------------------------------------------------------
/chapters/02/reading_docs.md:
--------------------------------------------------------------------------------
1 | (h1:02:reading_docs)=
2 | # Reading documentation
3 |
4 | At this point, we've already introduced _a ton_ of concepts about Python and third-party Python packages (with more to come), so we want to give some pointers on how to search for and read documentation for Python code.
5 | This way, you can get answers to your questions directly from the source and apply this knowledge to all of your future work.
6 |
7 | ````{sidebar} Wisdom of the Ancients
8 | ```{figure} ../../assets/fig/02/xkcd_wisdom.png
9 | :align: center
10 | :width: 100%
11 | :alt: xkcd_wisdom
12 | [xkcd comic 979](https://xkcd.com/979/).
13 | ```
14 | ````
15 |
16 |
17 | ## Searching for documentation
18 |
19 | We've all been in situations in the past where some teacher mentions an off-hand comment like, "Oh, if you don't know what this is, just look it up on Google."
20 | While we can appreciate the intent, this standalone comment can be potentially misguided as it's pretty daunting to sift through all the Google search results to find what [we may not even know] we need.
21 | In a way, if we don't even know what something is, then by definition how would we know the proper keywords to conduct a search query?
22 | And so we write these notes to provide some guidance on this matter.
23 | Since we can't cover everything, we'll summarize two broad _categories_ of search queries that you might conduct for your work.
24 |
25 |
26 | ### Searching for an algorithm or use case
27 |
28 | The first category is when you want to generally know the Python syntax for accomplishing a certain task.
29 | Such as resolving an error message, as the figure suggests.
30 | Your queries might look like the following:
31 | ```markdown
32 | how to create a NumPy array in Python
33 | how to sort a list using lambda functions in Python
34 | python IndexError: list index out of range
35 | ```
36 |
37 | These queries are structured pretty much similarly to what you'd expect (i.e., what you would say if you were asking someone else).
38 | For error messages, we recommend _copying the error message directly_ from your Jupyter notebook or terminal window output and adding the word "python" to your search query.
39 |
40 | You will then get a huge list of results to sift through, so we offer some guidance on what sources might be more helpful than others:
41 |
42 | 1. [Stack Overflow](https://stackoverflow.com/): Anything from the `stackoverflow.com` domain is a very good place to look for a solution.
43 | The solutions are contributed _and voted on_ by community members, and there's a standard of excellence for what makes a good answer (such as providing a _minimum working example_ for a solution).
44 | 1. Stack Overflow is part of the larger [Stack Exchange](https://stackexchange.com/) community, and you might find answers to more domain-specific questions (like [statistics](https://stats.stackexchange.com/)) on other sites (e.g., `stats.stackexchange.com`).
45 | 1. Any of the tutorial or blog sites will have plenty of code examples, and some particularly well-known ones are:
46 | - [Tutorials Point](https://www.tutorialspoint.com/index.htm): `tutorialspoint.com`
47 | - [GeeksforGeeks](https://www.geeksforgeeks.org/): `geeksforgeeks.org`
48 | - [W3Schools](https://www.w3schools.com/): `w3schools.com`
49 | - [Towards Data Science](https://towardsdatascience.com/): `towardsdatascience.com`
50 | - [KDnuggets](https://www.kdnuggets.com/): `kdnuggets.com`
51 | - [Analytics Vidhya](https://www.analyticsvidhya.com/blog/): `analyticsvidhya.com`
52 | 1. [YouTube](https://www.youtube.com/): Videos can be a great source for information as there seems to be a lot of different video tutorials out there now.
53 | You may find it comforting to hear a human talk through your problems.
54 | Or not. 😂
55 | 1. Source documentation will often have simple examples for you to learn from. More on this below.
56 |
57 | Note that while we provide domains above for you to recognize the names, we still suggest _starting your search_ from a general search engine like Google and clicking the relevant results.
58 | Hopefully, one of these sources will give you the exact usage pattern you were looking for, or something pretty close that you can adapt.
59 |
60 |
61 |
62 | ### Searching for a package/module/function
63 |
64 | The second category is when you want to learn how a specific package works, like `pymatgen`, or the `MPRester` module, or `numpy.mean()`.
65 | Yes, you are probably thinking of a specific use case, but maybe you're also just curious as to what the possibilities are, or the package isn't popular enough to have questions on a site like Stack Overflow.
66 | For this, we suggest structuring your search query like:
67 |
68 | ```markdown
69 | pymatgen package documentation
70 | MPRester pymatgen examples
71 | numpy.mean function documentation
72 | python requests package documentation
73 | ```
74 |
75 | Notice that we try to be as **specific** as possible.
76 | If we want to look for documentation from the source, we include "documentation," and when we want to know usage examples/patterns, we explicitly include "examples."
77 | If it's a package, we'll say that; and if it's a function, we'll say that too, and even write the search term that way ("numpy.mean").
78 | If the package/function is a default one in Python, we recommend adding the keyword "python" as well.
79 |
80 | While the previous websites will likely have answers for you, here we will suggest a different approach and that is to consult **the source documentation written by the package developers**.
81 | The Python community prides itself on writing good documentation, and generally this is where you will find the most comprehensive and up-to-date information.
82 | Moreover, Python documentation will have not only the syntax (e.g., function names, arguments, and return types) but **also examples** for how you can use those functions (more on this in {ref}`h2:02:reading_docs`).
83 |
84 | So what are the source domains that you should look for?
85 |
86 | 1. If it's a general Python question, or a question about a package that comes bundled with Python (e.g., `os`, `json`), consult [the official documentation](https://docs.python.org/3/) at `docs.python.org/3/`.
87 | 1. If it's a third-party package, try to select links that are from the official documentation for that package.
88 | The ones you'll likely come across in this module are:
89 | - [NumPy](https://numpy.org/doc/stable/): `numpy.org/doc/stable/`
90 | - [pandas](https://pandas.pydata.org/docs/): `pandas.pydata.org/docs/`
91 | - [Matplotlib](https://matplotlib.org/stable/index.html): `matplotlib.org/stable/index.html`
92 | - [Scikit-learn](https://scikit-learn.org/stable/index.html): `scikit-learn.org/stable/index.html`
93 | - [Pymatgen](https://pymatgen.org/index.html): `pymatgen.org/index.html`
94 | - [Matminer](https://hackingmaterials.lbl.gov/matminer/): `hackingmaterials.lbl.gov/matminer/`
95 |
96 | We offer two more points of guidance regarding your search:
97 | - You can _try using the search bar on these sites for direct results_, which are generally pretty good.
98 | In other words, while we did not advise doing this in the previous section (since it's hard to pinpoint where we'll find answers to those broad inquiries), we _do_ recommend doing this if there's a question about how to use a specific package/function.
99 | An example would be to actually click the NumPy link above and search `numpy.mean` directly on the search bar on that page.
100 | - If you take the "Google search" route, be aware of _different versions_ of these packages, which may give different results.
101 | You'll notice our links typed out above have the word `stable` in the URL, which is an alias for the most recent, stable version.
102 | You might also run into `dev` (development) versions of the documentation (like NumPy v1.22) or need an older version (DataHub uses slightly older versions of these packages), and you can generally change this on the website itself.
103 | Most of the time, _it doesn't make a difference_, but just be aware. 👀
104 |
105 |
106 | (h2:02:reading_docs)=
107 | ## Reading the docs
108 |
109 | Now that you've pulled up the documentation page, it still might not be very clear how to _read and interpret_ what's on this page.
110 | Here, we hope to provide a breakdown of what each section is and what information to pay attention to, and we'll use the the documentation for the function [`numpy.mean()`](https://numpy.org/doc/stable/reference/generated/numpy.mean.html) as an example.
111 | While your particular page will be different, the overall structure will be similar as [good] Python developers have all conformed to the same standard.
112 |
113 | At the top of the page, there is the **function name** and the module(s) it lives under.
114 | This is followed by the **function header** which shows the input parameters.
115 | All input parameters with an equal sign (`=`) are _optional_, with the value that follows being the default value.
116 | Furthermore, _the order of the parameters is important_, because that determines how the values from the caller will be assigned if argument names aren't specified.
117 | For example, if argument names are specified, we can specify them out of order:
118 |
119 | ```python
120 | np.mean(a=arr, dtype=np.int32, axis=0)
121 | ```
122 |
123 | But if argument names aren't specified, then the assignment is based on the order in the header:
124 |
125 | ```python
126 | np.mean(arr, 1, np.float64)
127 | ```
128 |
129 | where `a=arr`, `axis=1`, and `dtype=np.float64` is assumed.
130 |
131 | Next we have a short **description** of what the function does, which in the example is `Compute the arithmetic mean along the specified axis.`
132 |
133 | Then we have a verbose explanation of each input parameter, starting with the name **and type**.
134 | When reading documentation, make sure to pay attention to the type that the function is expecting for maximum compatibility.
135 | What follows is a description of what the parameter will do, and particular _special cases_ to be aware of.
136 | Something that is nice about recent documentation is that it will note the version number that a particular parameter was introduced in, so you know what might be missing in older version of the package (for example, `where` is an invalid input argument in the DataHub version of NumPy, v1.19.5, since it was introduced in v1.20.0).
137 |
138 | Next is the **return** value and type, along with a description.
139 | Here the biggest thing to pay attention to is whether the output is returned as a **copy or in place**.
140 |
141 | There are then a few notes for data type considerations, and sometimes links to related methods (like [`np.average()`](https://numpy.org/doc/stable/reference/generated/numpy.average.html) in the example), which can be particularly handy when you realized after reading the documentation that the function you actually want is a different one.
142 |
143 | Finally, one of the most important things that you'll find at the end of NumPy, pandas, Matplotlib, and Scikit-learn documentation (among others) is a list of **examples** using that function and its various input arguments.
144 | Studying these are often a great way to learn how the module/function behaves!
145 |
146 |
147 |
--------------------------------------------------------------------------------
/chapters/02/recap_logistics.md:
--------------------------------------------------------------------------------
1 | (h1:02:recap_logistics)=
2 | # Recap first day
3 |
4 | Here's a quick slide deck summarizing the key points from yesterday:
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapters/03/day_03.md:
--------------------------------------------------------------------------------
1 | (h1:03:intro)=
2 | # Day 03: MI research
3 |
4 | Welcome to day 🕒 where we will contextualize some of the data science topics that we discussed yesterday within the domain of dielectric materials.
5 |
6 |
7 |
8 | ## Goals for today
9 |
10 | - Learn about dielectric materials and their properties.
11 | - Discuss how the Materials Project can help us design high-$\kappa$ dielectric materials.
12 | - Brainstorm what else needs to be done, what data should be gathered, and begin organizing the data.
13 |
14 |
15 |
16 | ## Timing for today
17 |
18 | - We will start the day at 9:00AM.
19 | - Mark will lead a research discussion about dielectric materials.
20 | - We will have a few more small discussions interspersed throughout the day.
21 | - Enze will hold drop-in OH from 2:00PM to 3:00PM.
22 | - We will have our afternoon debrief at the scheduled time.
23 |
24 |
25 |
26 | ## Activities for today
27 |
28 | ```{tableofcontents}
29 | ```
--------------------------------------------------------------------------------
/chapters/03/diel_guided.md:
--------------------------------------------------------------------------------
1 | (h1:03:diel_guided)=
2 | # Guided practice with dielectric data
3 |
4 | Here's one idea for a sequence of programming tasks that you can explore today. 💡
5 | Once again, these are just _suggestions_ and you don't have to get through everything today.
6 | We have plenty of time left to complete these tasks, which you surely will do.
7 |
8 | 1\) Create a new Python notebook in [the DataHub](https://datahub.berkeley.edu)!
9 | We recommend creating it in a sensible location (like `mi-book-2022/my-work`) so you can easily find it in the future.
10 |
11 | 2\) Start with creating a Markdown cell (like all of the tutorial notebooks) explaining what this notebook is about.
12 | You may want to have a [Markdown cheat sheet](https://www.markdownguide.org/cheat-sheet) handy for stylizing your Markdown cells.
13 |
14 | 3\) Then, in a Code cell(s), see if you can write some Python code to make a simple query to the Materials Project.
15 | This will involve importing some Python packages, loading your API key, and constructing the query syntax.
16 | Feel free to reference previous notebooks or ask for help if you get stuck!
17 |
18 | 4\) Now make a query for _just_ the materials with the dielectric properties already computed.
19 | There's some 7000 of these.
20 | You already did this yesterday, so this is to practice recall.
21 |
22 | 5\) **Challenge**: Write some more code to extract all the relevant dielectric properties of these materials and store them into a DataFrame, kinda like this:
23 | ```{image} ../../assets/fig/03/diel_df_example.png
24 | :alt: diel_df_example
25 | :width: 50%
26 | :align: center
27 | ```
28 | Essentially, we're asking you to convert data from JSON to tabular format.
29 |
30 | 6\) Can you save this DataFrame as a CSV file so you can easily access it later?
31 |
32 | 7\) Next, consider what _other_ properties you'll also want to get out of the Materials Project.
33 | Maybe the band gap? How about density?
34 | Modify the query to include these properties as well, and add them to the DataFrame.
35 | - Note: For this step, and to give you a mental **break from coding**, we invite you to explore the [Materials Project UI](https://materialsproject.org/).
36 | Click around and see what cool things you find!
37 |
38 | 8\) **Challenge**: Can you get structural information about your materials?
39 | How would you save such information?
40 | Note that with this step you may run out of memory (oof) and you'll have to look up ways to save a DataFrame as a binary file.
41 |
42 | 9\) **Challenge**: What _other_ properties relevant to the design of dielectric materials are important to consider and that we might obtain from another data source?
43 | This step is incredibly open-ended.
44 |
--------------------------------------------------------------------------------
/chapters/03/guest_mp.md:
--------------------------------------------------------------------------------
1 | (h1:03:guest_mp)=
2 | # Guest speaker: ???
3 |
4 | We're joined today by a guest from the Materials Project!
5 |
6 |
7 | ## References
8 |
9 | ```{bibliography}
10 | :style: unsrt
11 | :filter: docname in docnames
12 | ```
13 |
--------------------------------------------------------------------------------
/chapters/03/homework_03.md:
--------------------------------------------------------------------------------
1 | (h1:03:homework_03)=
2 | # Homework
3 |
4 | ## Reading
5 |
6 | 1. The first is [a short 2-page paper](https://drive.google.com/file/d/1YMPXFK3XPTCBDWABkOYEeeF_Sua-K3Us/view?usp=sharing) on, well, how to read a paper, by S. Keshav {cite}`d3-keshav_2007`.
7 | More information can be found on the previous page, {doc}`reading_papers`.
8 | - We recommend taking a look so that all of your future readings will feel more bearable and productive.
9 | 1. The [review article](https://drive.google.com/file/d/1cLXY2B3ZAPKHfLrwlsyCVMVfVQzDIEac/view?usp=sharing) by J. Robertson on "High dielectric constant oxides" {cite}`d3-robertson_2004`.
10 | - This is a pretty hefty article that goes deep into bonding, interfaces, defects, band structures... so please only **skim** up to and including Section 2.4.
11 |
12 |
13 |
14 | ## Programming
15 |
16 | We encourage you to work with your team to decide what data you will need and how to consolidate it in one place (e.g., a single table that you can save as a CSV file for repeated future use).
17 | We also want to give you some time to review the exercises and readings from the previous two days to help you prepare.
18 | If you're ready to move on or are looking for some more guided practice, we have a suggested sequence of steps for you to apply your newfound knowledge;
19 | but by all means do what feels best for you!
20 |
21 |
22 |
23 |
24 | ## References
25 |
26 | ```{bibliography}
27 | :style: unsrt
28 | :filter: docname in docnames
29 | :keyprefix: d3-
30 | ```
31 |
32 |
--------------------------------------------------------------------------------
/chapters/03/reading_papers.md:
--------------------------------------------------------------------------------
1 | (h1:03:reading_papers)=
2 | # Reading papers
3 |
4 | As was mentioned in the introduction to this module, MI is a relatively nascent field, and this means that a lot of the knowledge and methods are still being developed in the research side (and not much pedagogy has been established).
5 | Fortunately, this means that a lot of what we seek to learn has been documented in research papers; unfortunately, this means that to obtain that knowledge, we have to read research papers. 🤮
6 | Reading papers is an **important part** of the research process, whether it's brushing up on a topic, conducting a thorough _literature review_, etc., but it is a hard skill to master.
7 | So far, we've already had you read a few research papers and pointed out what to pay attention to, but what happens when you're doing your own literature search?
8 | What if instead of one paper you suddenly have ten that you have to sift through for information?
9 | And wait a sec—how do we even find papers and access them?
10 | This document attempts to answer these questions.
11 |
12 |
13 |
14 | ## How to read papers
15 |
16 | There's a lot of guidance out there on how to read a scientific research paper, such as one by S. Keshav that we've shared [in the Drive](https://drive.google.com/drive/u/1/folders/1bDWHhWAiN0xiZwL9euA6-ZIFW39d9ICf) {cite}`d2-keshav_2007`.
17 | We actually suggest you **start with this document** as it's short (2 pages!) and we left a few comments on there.
18 | If you don't like that advice, you can search for many more on Google.
19 |
20 |
21 |
22 | ## Finding papers
23 |
24 | ````{margin}
25 | ```{figure} ../../assets/fig/03/google_scholar.png
26 | :alt: google_scholar
27 | :width: 100%
28 | :align: center
29 | Google Scholar home page search bar.
30 | ````
31 |
32 | There are many resources that you can use for finding papers, but for simplicity and generally-good results, we recommend you enter search queries on [**Google Scholar**](https://scholar.google.com/) (different from Google search!).
33 | We're all pretty familiar with how _general_ Google search works, including its advanced search/filters, and this website has indexed essentially all of the relevant journals for our needs.
34 | If you've never used this platform before, we suggest you try it out with terms like "screening dielectric materials" or "materials informatics" and seeing what pops up.
35 | When you're finding papers, enter keywords (doesn't have to be a full sentence!) that describe what you're looking for.
36 |
37 | ````{margin}
38 | ```{figure} ../../assets/fig/03/cited_by.png
39 | :alt: cited_by
40 | :width: 100%
41 | :align: center
42 | Google Scholar "Cited by" feature.
43 | ````
44 |
45 | Another place to find relevant papers is in the list of references in a relevant paper that you have already read (or at least know of).
46 | This is because often times the paper you just read builds upon other work that could have a critical piece of information that you're looking for, and you will know this association based on how the older paper was cited in the newer paper.
47 | Another cool feature of Google Scholar is their "Cited by" feature that accompanies every search result.
48 | This address the reverse problem, and finds all of the indexed papers that _cite the article that's listed_.
49 |
50 |
51 |
52 | ## Accessing papers
53 |
54 | You've learned how to read papers, you've found the perfect paper you've been looking for, you've situated yourself in a comfortable reading environment, and then you realize:
55 | _Wait, what? I can't access this paper?_
56 | It is the unfortunate truth that scientific publishing is a business, and this means articles published by organizations like [Springer](https://www.springer.com/us), [ACS](https://pubs.acs.org/), [AAAS](https://www.aaas.org/journals), and many others keep articles behind a **paywall** and charge subscription fees for access.
57 | These fees can grow to be quite large and difficult for academic institutions to pay.
58 | If you haven't already heard, check out [UC Libraries' tussle with publishing giant Elsevier](https://www.lib.berkeley.edu/about/uc-elsevier). 🍵
59 | In short, if you don't have access to an article, you'll only be able to see the title, authors, and the abstract.
60 |
61 | Luckily, we have a few options available to us to access the full text.
62 | The first is that we might come across an article that is [**open access**](https://www.openaccess.nl/en/what-is-open-access), which means that somewhere along the publishing pipeline, someone else paid or waived the fees so that anyone can read the published article _for free_.
63 | These individual articles will be clearly labeled as such on the official publisher's website, and this is part of a broader "open science" movement.
64 | There are also a few sources, both official journals and _pre-print_ servers, that have _all open-access_ articles, including [_Nature Communications_](https://www.nature.com/ncomms/), [_npj Computational Materials_](https://www.nature.com/npjcompumats/), [_Scientific Data_](https://www.nature.com/sdata/), [_Science Advances_](https://advances.sciencemag.org/), [_PNAS_](https://www.pnas.org/), [_ACS Central Science_](https://pubs.acs.org/journal/acscii), and [_arXiv_](https://arxiv.org/).
65 | While these titles may not mean anything to you at the moment, they are definitely a blessing when you come across them. 🙏
66 |
67 | The second option, which **works for most articles** that you come across, is to take advantage of the fact that we go to a great research institution like UC Berkeley that _has already paid_ the subscription fee for us (the UCs as a whole have, technically).
68 | There are many ways to use your UC Berkeley credentials to access papers behind a paywall, but the simplest one we've found is to use the **EZProxy bookmarklet**.
69 | If you are unfamiliar with setting this up, please see [this helpful video from UCB libraries](https://screencast-o-matic.com/watch/cYfYrfz9iQ).
70 |
71 |
72 |
73 | ## References
74 |
75 |
76 | ```{bibliography}
77 | :style: unsrt
78 | :filter: docname in docnames
79 | :keyprefix: d2-
80 | ```
81 |
82 |
83 |
--------------------------------------------------------------------------------
/chapters/03/recap_data.md:
--------------------------------------------------------------------------------
1 | (h1:03:recap_data)=
2 | # Recap data discussion
3 |
4 | Here's a quick slide deck summarizing the key points from yesterday:
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapters/03/research_discuss.md:
--------------------------------------------------------------------------------
1 | (h1:03:res_discuss)=
2 | # Research discussion
3 |
4 |
5 |
6 |
7 |
8 |
9 | ## References
10 |
11 | Some helpful references on these topics include {cite}`d1-robertson_2004, d1-petousis_2017`.
12 |
13 | ```{bibliography}
14 | :style: unsrt
15 | :filter: docname in docnames
16 | :keyprefix: d1-
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/chapters/04/best_practices_viz.md:
--------------------------------------------------------------------------------
1 | (h1:03:best_practices_viz)=
2 | # Best practices for visualization
3 |
4 | We'll begin our discussion of best practices with these slides:
5 |
6 |
7 |
8 |
9 |
10 | ## References
11 |
12 | For more information, we point you to Refs {cite}`e1-szafir_2018, e1-rougier_2014`.
13 |
14 | ```{bibliography}
15 | :style: unsrt
16 | :filter: docname in docnames
17 | :keyprefix: e1-
18 | ```
19 |
20 |
21 |
--------------------------------------------------------------------------------
/chapters/04/day_04.md:
--------------------------------------------------------------------------------
1 | (h1:04:intro)=
2 | # Day 04: Data visualization
3 |
4 | Welcome to day 🍀 of this module, where we will be learning an important yet often neglected skill: data visualization.
5 | You'll find that the process of making compelling visualizations is not-too-hard when done programmatically and _easily_ makes you stand out amongst your peers. 😏
6 |
7 | ```{note}
8 | Today's lessons will be fairly self-guided, so feel free to proceed through the following content at your own pace.
9 | ```
10 |
11 |
12 | ## Goals for today
13 |
14 | - Learn how to visualize data programmatically using [Matplotlib](https://matplotlib.org/) in Python.
15 | - Identify best practices for data visualizations.
16 |
17 |
18 |
19 | ## Timing for today
20 |
21 | - We will kick off the day at 9:00AM.
22 | - We will have a mix of lectures and individual exercises, interspersed with several breaks.
23 | - Enze will hold drop-in OH from 2:00PM to 3:00PM.
24 | Come chat about anything that's on your mind, or if you just want a break! 🍵
25 | - We will have our afternoon debrief at the scheduled time.
26 |
27 |
28 |
29 | ## Activities for today
30 |
31 | ```{tableofcontents}
32 | ```
--------------------------------------------------------------------------------
/chapters/04/helper_funcs_viz.py:
--------------------------------------------------------------------------------
1 | import os
2 | import json
3 |
4 | import numpy as np
5 | import pandas as pd
6 | import matplotlib.pyplot as plt
7 |
8 |
9 | def space_group_to_crystal_system(space_group_number):
10 | '''
11 | Converts a space group number (1-230) to the crystal system.
12 |
13 | Args:
14 | space_group_number: An int for the space group.
15 |
16 | Returns:
17 | A string for the crystal system for that space group.
18 | '''
19 | if space_group_number <= 2:
20 | return 'triclinic'
21 | elif space_group_number <= 15:
22 | return 'monoclinic'
23 | elif space_group_number <= 74:
24 | return 'orthorhombic'
25 | elif space_group_number <= 142:
26 | return 'tetragonal'
27 | elif space_group_number <= 167:
28 | return 'trigonal'
29 | elif space_group_number <= 194:
30 | return 'hexagonal'
31 | else:
32 | return 'cubic'
33 |
34 |
35 | def plot_dielectric_data():
36 | '''
37 | Plots refractive index vs. band gap from dielectric dataset.
38 | '''
39 | with open('../../assets/data/dielectric_dataset.json', 'r') as f:
40 | data = json.load(f)
41 |
42 | n = []
43 | Eg = []
44 | system = []
45 |
46 | for m in data:
47 | n.append(m['n'])
48 | Eg.append(m['band_gap'])
49 | system.append(space_group_to_crystal_system(m['meta']['space_group']))
50 | df = pd.DataFrame({'n':n, 'Eg':Eg, 'system':system})
51 |
52 | symbols = ['s', 'h', 'X', 'o', '^', 'd', 'H']
53 | groups = df.groupby('system', sort=True)
54 |
55 | fig, ax = plt.subplots(figsize=(11, 7.5))
56 | for i, (name, group) in enumerate(groups):
57 | ax.scatter(group.Eg, group.n, marker=symbols[i], s=80, label=name)
58 | ax.set_yscale('log')
59 | ax.set_ylabel('$n$', fontsize=30)
60 | ax.set_xscale('log')
61 | ax.set_xlim(0.09, 10)
62 | ax.set_xlabel('$E_g$ (eV)', fontsize=28)
63 | ax.tick_params(which='major', length=15, width=5, pad=11, direction='in', labelsize=22)
64 | ax.tick_params(which='minor', length=10, width=3.5, direction='in', labelsize=22)
65 | ax.legend(title='crystal system', fontsize=20, title_fontsize=20)
66 | plt.show()
67 |
68 |
69 |
70 | def get_api_key():
71 | # get API key using one of two ways
72 | api_key = None
73 | try: # this is for running locally
74 | import os
75 | api_key = os.environ['MAPI_KEY']
76 | except: # this is for running on DataHub
77 | with open('../../assets/files/mp_api_key.txt', 'r') as f:
78 | api_key = f.readlines()[1].strip()
79 |
80 | # assert helps catch potential bugs
81 | assert api_key is not None, 'API key not set correctly in environment!'
82 | assert api_key != '', 'API key not found in mp_api_key.txt file!'
83 |
84 | return api_key
85 |
--------------------------------------------------------------------------------
/chapters/04/homework_04.md:
--------------------------------------------------------------------------------
1 | (h1:04:homework_04)=
2 | # Homework
3 |
4 | Today's lesson was meant to be pretty light to give you all a break from the first few days.
5 | There will be plenty more fun to come!
6 |
7 | ## Reading
8 |
9 | 1. [The perspective](https://drive.google.com/file/d/1t4i6gC-uyLAVXxgWy0k1NiRkEqrLtEn3/view?usp=sharing) by [Danielle Szafir](https://danielleszafir.com/) on data visualization {cite}`e2-szafir_2018`.
10 | - There are many pretty pictures and should be a fun read!
11 | Just reading the figure captions is fine if you don't have time for the whole article.
12 | - This article is to set the stage for tomorrow's discussion.
13 |
14 |
15 |
16 | ## Programming
17 |
18 | We hope the relatively light programming today will give you a chance to catch up the previous notebook exercises that are incomplete or revisit the ones that you wanted to learn more about.
19 | We see all of these concepts as ones that are important for the practice of MI and, consequently, for your self-directed research.
20 | They're also good skills to master for your future careers.
21 |
22 | If you want a change of pace, maybe you'll want to do some background reading on dielectric materials, which we recommend starting in the Kasap book (7.1-7.4){cite}`e2-kasap_2017` and then perhaps checking out the review article by J. Robertson on "High dielectric constant oxides" {cite}`e2-robertson_2004`.
23 |
24 | Or if you just want more coding practice and visualization examples, you can try the **optional** suggestions in {doc}`advanced_viz_blank`.
25 |
26 | It's really up to you. 🙂
27 |
28 |
29 |
30 | ## References
31 |
32 | ```{bibliography}
33 | :style: unsrt
34 | :filter: docname in docnames
35 | :keyprefix: e2-
36 | ```
37 |
38 |
--------------------------------------------------------------------------------
/chapters/05/brief_intro_ml.md:
--------------------------------------------------------------------------------
1 | (h1:05:brief_intro_ml)=
2 | # Brief intro to ML
3 |
4 | Here's a brief intro to machine learning (ML) to set the stage for what's to come next week.
5 | Our approach today will be at a high level and next week we'll dive into the math.
6 | You've probably heard a lot of these headlines, and we hope this can be more of an active discussion to get your thoughts on this topic.
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/chapters/05/brief_intro_ml_blank.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "74e79d1b",
6 | "metadata": {},
7 | "source": [
8 | "# foo\n",
9 | "\n"
10 | ]
11 | },
12 | {
13 | "cell_type": "code",
14 | "execution_count": null,
15 | "id": "07994d27",
16 | "metadata": {},
17 | "outputs": [],
18 | "source": [
19 | "a = 4\n",
20 | "\n",
21 | "\n",
22 | "\n",
23 | "print(a)"
24 | ]
25 | }
26 | ],
27 | "metadata": {
28 | "kernelspec": {
29 | "display_name": "Python 3 (ipykernel)",
30 | "language": "python",
31 | "name": "python3"
32 | },
33 | "language_info": {
34 | "codemirror_mode": {
35 | "name": "ipython",
36 | "version": 3
37 | },
38 | "file_extension": ".py",
39 | "mimetype": "text/x-python",
40 | "name": "python",
41 | "nbconvert_exporter": "python",
42 | "pygments_lexer": "ipython3",
43 | "version": "3.7.11"
44 | }
45 | },
46 | "nbformat": 4,
47 | "nbformat_minor": 5
48 | }
49 |
--------------------------------------------------------------------------------
/chapters/05/day_05.md:
--------------------------------------------------------------------------------
1 | (h1:05:intro)=
2 | # Day 05: Research + guest speaker
3 |
4 | Welcome to day 🖐 where you will have some time to work on your research projects, whether that is reviewing literature, gathering more data, finishing notebook exercises, or something else.
5 | To help prepare you for next week, we'll also briefly introduce the key ideas in machine learning (ML).
6 | In addition, we will be treated to a guest speaker!
7 | Ventura will be sharing his story about life as a data engineer in a materials informatics company and reflections on his educational journey that eventually took him to UCB. 🐻
8 |
9 |
10 |
11 | ## Goals for today
12 |
13 | - Reflect on everything that you learned this week. (which is a lot!)
14 | - Continue making progress toward your research goals.
15 | - Learn about the realities of working with customer data in industry!
16 |
17 |
18 |
19 | ## Timing for today
20 |
21 | - We will start the day at 9:00AM.
22 | - Ventura will be speaking on Zoom at HH:MMAM.
23 | - Enze will hold drop-in OH from 2:00PM to 3:00PM.
24 | - We will have our afternoon debrief at the scheduled time.
25 |
26 |
27 |
28 | ## Activities for today
29 |
30 | ```{tableofcontents}
31 | ```
--------------------------------------------------------------------------------
/chapters/05/guest_citrine.md:
--------------------------------------------------------------------------------
1 | (h1:05:guest_citrine)=
2 | # Guest speaker: Ventura!
3 |
4 | ```{image} ../../assets/fig/05/ventura.jpg
5 | :alt: ventura
6 | :align: center
7 | ```
8 |
9 |
10 |
11 | By now, you've gained a lot of experience working with datasets in all forms: text, tables (CSV), JSON, and databases queried through an API.
12 | In your self-directed research projects, you may have come across other data formats as well that you had to learn how to use and how to clean the data.
13 | All of the different file formats make MI work kinda painful when it comes to data processing and storage, and that's just for public data, which, on the whole, are relatively well organized.
14 | What about data ~ _in the real world_? ~
15 | How do you handle proprietary customer data that span different materials classes and industries?
16 | How do you communicate with R&D scientists who may not understand all of the best practices in MI that you all know?
17 | And how do you accomplish all this without upsetting your clients?
18 | Because, well, you know. 💰🙃
19 |
20 | For the past three years, Ventura has tackled these problems on a daily basis in his role as a Data Engineer at [Citrine Informatics](https://citrine.io/), an MI startup based in Redwood City, CA.
21 | He has helped develop several Python tools to facilitate data handling and improve the user experience for customers and Citrine team members.
22 | Ventura is exceptionally kind and positive (Enze can personally attest to this), and he will have several insights to share with us from his personal and professional experiences, including all of life's possibilities _without_ taking the graduate school route.
23 | And finally, he is a proud UCB transfer alum with a BS in Chemical and Biomolecular Engineering! 🐻
--------------------------------------------------------------------------------
/chapters/05/homework_05.md:
--------------------------------------------------------------------------------
1 | (h1:05:homework_05)=
2 | # Homework
3 |
4 | Have a great weekend! 🌊
5 |
6 |
7 | ## Video
8 |
9 | We recommend watching this 50-minute seminar given by Dr. Julia Ling on some of challenges of machine learning in materials science.
10 | She was one of Enze's mentors when they were both at Citrine.
11 | The presentation is well structured and has good examples.
12 |
13 |
14 |
15 |
16 | ## Reading
17 |
18 | Today's reading consists of one paper, which is [a review](https://drive.google.com/file/d/1m908yMJb6WnSuxqlvpx_m-ey7xCblkhy/view?usp=sharing) by Keith Butler et al. on the topic of machine learning in materials science {cite}`f1-butler_2018`, and arguably one of the best review papers in MI.
19 | - This is an _advanced_ article with several challenging concepts, but we **strongly recommend you read all of it**.
20 | It's OK if very little (or none) of it makes sense at the moment.
21 | The last section (Frontiers in machine learning) is less important for our purposes.
22 | - We recommend employing some of the techniques discussed in the Keshav paper to help get process this paper in multiple reads (no more than 2).
23 | - Please feel free to ask questions, look stuff up online, and we'll also spend some time tomorrow dissecting it.
24 | - _Protip_: When looking up ML (or any technical) concepts, we recommend searching for "topic X _intuition_" or "topic X _explained_."
25 |
26 |
27 | ## Programming
28 |
29 | No new programming assignments!
30 | We encourage you to work with your team to decide what data you will need and how to consolidate it in one place (e.g., a single table that you can save as a CSV file for repeated future use).
31 |
32 |
33 |
34 | ## References
35 |
36 | ```{bibliography}
37 | :style: unsrt
38 | :filter: docname in docnames
39 | :keyprefix: f1-
40 | ```
41 |
42 |
--------------------------------------------------------------------------------
/chapters/05/recap_viz.md:
--------------------------------------------------------------------------------
1 | (h1:05:recap_viz)=
2 | # Recap visualization discussion
3 |
4 | Here's a quick slide deck summarizing the key points from yesterday:
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/chapters/06/day_06.md:
--------------------------------------------------------------------------------
1 | (h1:06:intro)=
2 | # Day 06: ML speedrun (pt. 1)
3 |
4 | Welcome to day 🎲 where we will finally learn about the granddaddy of them all: **machine learning (ML)**. 😎
5 | Based on student feedback, we've decided to split this lesson across two days to make it more manageable.
6 | It's also now during the second week, now that you've had more time to really dig into the dataset.
7 | Today we will discuss the general, foundational principles of ML and a few special considerations.
8 |
9 |
10 |
11 | ## Goals for today
12 |
13 | - Introduce fundamental concepts and terms associated with supervised ML.
14 | - Practice implementing these concepts using [scikit-learn](https://scikit-learn.org/stable/index.html) in Python.
15 | - Discuss practical considerations when doing ML (for MSE, and more broadly).
16 |
17 |
18 |
19 | ## Timing for today
20 |
21 | - We will kick off the day at 9:00AM.
22 | - We will have a mix of lectures and exercises, interspersed with several short breaks.
23 | - Enze will hold drop-in OH from 2:00PM to 3:00PM. 🐢
24 | - We will have our afternoon debrief at the scheduled time.
25 |
26 |
27 | ## Activities for today
28 |
29 | ```{tableofcontents}
30 | ```
--------------------------------------------------------------------------------
/chapters/06/helper_funcs_ml_intro.py:
--------------------------------------------------------------------------------
1 | import os
2 | import json
3 |
4 | import numpy as np
5 | import pandas as pd
6 | import matplotlib.pyplot as plt
7 | from matplotlib.animation import FuncAnimation
8 | from matplotlib.artist import Artist
9 |
10 | from sklearn.linear_model import LinearRegression, Ridge
11 | from sklearn.preprocessing import PolynomialFeatures
12 | from sklearn.metrics import mean_squared_error, mean_absolute_error
13 | from sklearn.model_selection import KFold, cross_val_score, cross_val_predict
14 |
15 |
16 |
17 | def animate_gd():
18 | data = np.load('../../assets/data/number_weight.npy')
19 | m = len(data)
20 | X = np.column_stack([np.ones(m), data[:, 0]])
21 | y = data[:, 1].reshape(-1, 1)
22 | theta = np.zeros((2, 1))
23 | alpha = 1e-5
24 | err = np.sum((X @ theta - y)**2) / (2*m)
25 |
26 | fig, ax = plt.subplots()
27 | ax.scatter(data[:, 0], data[:, 1])
28 | h, = ax.plot([], [], c='k', alpha=0.5)
29 | t = ax.text(0, 0, '')
30 | plt.tight_layout()
31 | plt.close()
32 |
33 | def init():
34 | h.set_data([], [])
35 | return h,
36 |
37 | def animate(i):
38 | global err, theta, X, y, ax, t
39 | # h.set_data(data[:, 0], X @ theta)
40 | h.set_data([1, 100], [2, 200])
41 | Artist.remove(t)
42 | t = ax.text(2, 100, s=f'error = {err:.3f}', fontsize=18, ha='left', bbox=dict(fc='1.0', ec='white'))
43 |
44 | theta = theta - alpha * (X.T @ (X @ theta - y))
45 | err = np.sum((X @ theta - y)**2) / (2*m)
46 | return h, t
47 |
48 | plt.rcParams.update({'animation.html': 'jshtml', 'figure.figsize':(6, 4)})
49 | anim = FuncAnimation(fig, animate, init_func=init, frames=20, interval=500, repeat=False);
50 | return anim
51 |
52 |
53 |
54 | def gen_data(arr):
55 | rng = np.random.default_rng(seed=2)
56 | n = 10
57 |
58 | X = np.reshape(rng.choice(arr, size=n, replace=False), (-1, 1))
59 | y = X ** 2 + 2 * np.reshape(rng.normal(size=n), (-1, 1))
60 |
61 | X2 = rng.choice(arr, size=3, replace=False)
62 | y2 = X2 ** 2 + 2 * np.reshape(rng.normal(size=3), (-1, 1))
63 |
64 | return X, y, X2, y2
65 |
66 |
67 |
68 | def ml_fitting(d, dom, X1, y1, X2, y2):
69 | lr = LinearRegression()
70 | kfold = KFold(n_splits=5, shuffle=False)
71 | featurizer = PolynomialFeatures(d)
72 | Xp = featurizer.fit_transform(X1)
73 | lr.fit(Xp, y1)
74 |
75 | domp = featurizer.fit_transform(dom)
76 | yp = lr.predict(domp)
77 |
78 | yhat = lr.predict(Xp)
79 | train_err = mean_squared_error(y1, yhat, squared=False)
80 |
81 | y2hat = lr.predict(featurizer.fit_transform(X2))
82 | val_err = mean_squared_error(y2, y2hat, squared=False)
83 |
84 |
85 | return yp, train_err, val_err
86 |
87 |
88 |
89 | def plot_styling(ax, degree):
90 | ax[0].set_xlim(0, 6)
91 | ax[0].set_ylim(-5, 35)
92 | ax[0].set_xlabel('$x$')
93 | ax[0].set_ylabel('$y$')
94 | ax[0].legend(frameon=False)
95 | ax[1].set_xlabel('degree of polynomial (complexity)')
96 | ax[1].set_ylabel('error')
97 | ax[1].set_xlim(1, degree-1)
98 | ax[1].legend(frameon=False)
99 | plt.show()
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/chapters/06/homework_06.md:
--------------------------------------------------------------------------------
1 | (h1:06:homework_06)=
2 | # Homework
3 |
4 |
5 | ## Reading
6 |
7 | We recommend revisiting the papers by [Petousis et al.](https://drive.google.com/file/d/1yGQ7G8n_DrLdpsC9e72gb3eKSAGP5-AU/view?usp=sharing) on the dielectric constants datatset {cite}`g3-petousis_2017` and by [Robertson](https://drive.google.com/file/d/1cLXY2B3ZAPKHfLrwlsyCVMVfVQzDIEac/view?usp=sharing) on high-$\kappa$ oxides {cite}`g3-robertson_2004`.
8 | Even if you read a paper once before, it never hurts to do another pass!
9 | We hope that by doing so, you get a better sense of which properties should be the outputs and which might be good inputs.
10 |
11 |
12 |
13 | ## Programming
14 |
15 | We recommend reviewing the ML exercises from today, which covered quite a lot of information in a very short amount of time.
16 |
17 | If you want to try **applying your knowledge**, see if you can build a vanilla linear model for your dielectric materials.
18 | Be sure to consider:
19 | - Is this a regression or classification problem?
20 | - What are the inputs and what are the output(s)?
21 | - Where will I get the data? Hint: you should already have them!
22 | - What tools will help me? Hint: `pandas` and `scikit-learn`.
23 |
24 | See the accompanying notebook for some guided exercises, if you would find that helpful.
25 |
26 |
27 | ## References
28 |
29 | ```{bibliography}
30 | :style: unsrt
31 | :filter: docname in docnames
32 | :keyprefix: g3-
33 | ```
34 |
35 |
--------------------------------------------------------------------------------
/chapters/06/intro_ml.md:
--------------------------------------------------------------------------------
1 | (h1:06:intro_ml)=
2 | # Introduction to ML
3 |
4 | We'll begin our discussion of ML with these slides:
5 |
6 |
7 |
8 |
9 | ## References
10 |
11 | Some helpful references on these topics include {cite}`g1-butler_2018, g1-james_2017`.
12 |
13 | ```{bibliography}
14 | :style: unsrt
15 | :filter: docname in docnames
16 | :keyprefix: g1-
17 | ```
18 |
19 |
20 |
--------------------------------------------------------------------------------
/chapters/06/ml_perf.md:
--------------------------------------------------------------------------------
1 | (h1:06:ml_perf)=
2 | # Quantifying performance
3 |
4 | We'll begin our discussion of model performance with these slides:
5 |
6 |
7 |
8 |
9 | ## References
10 |
11 | Some helpful references on these topics include {cite}`g2-james_2017`.
12 |
13 | ```{bibliography}
14 | :style: unsrt
15 | :filter: docname in docnames
16 | :keyprefix: g2-
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/chapters/06/recap_week_1.md:
--------------------------------------------------------------------------------
1 | (h1:06:recap_week_1)=
2 | # Recap week 1
3 |
4 | Here's a quick slide deck summarizing the key points from the first week.
5 | We've come a long ways!
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapters/07/advanced_ml.md:
--------------------------------------------------------------------------------
1 | (h1:07:advanced_ml)=
2 | # Advanced ML methods
3 |
4 | We'll begin our discussion of advanced ML models with these slides:
5 |
6 |
7 |
8 |
9 | ## References
10 |
11 | Some helpful references on these topics include {cite}`h2-butler_2018, h2-james_2017`.
12 |
13 | ```{bibliography}
14 | :style: unsrt
15 | :filter: docname in docnames
16 | :keyprefix: h2-
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/chapters/07/day_07.md:
--------------------------------------------------------------------------------
1 | (h1:07:intro)=
2 | # Day 07: ML speedrun (pt. 2)
3 |
4 | Welcome to day 🎰 where we will continue our whirlwind tour of ML.
5 | Today we'll be focused on inputs and some advanced ML models that are effective for materials informatics.
6 | After today, you'll have all of the tools you need to complete your projects!
7 |
8 |
9 | ## Goals for today
10 |
11 | - Discuss various featurizations for materials and some advanced ML models and the intuition behind them so we can identify their utility.
12 | - Practice implementing these concepts using [scikit-learn](https://scikit-learn.org/stable/index.html) in Python.
13 |
14 |
15 |
16 | ## Timing for today
17 |
18 | - Today's schedule is identical to {doc}`../06/day_06`.
19 |
20 |
21 |
22 | ## Activities for today
23 |
24 | ```{tableofcontents}
25 | ```
--------------------------------------------------------------------------------
/chapters/07/features.md:
--------------------------------------------------------------------------------
1 | (h1:07:features)=
2 | # Featurization
3 |
4 | We'll begin our discussion of featurization with these slides:
5 |
6 |
7 |
8 |
9 | ## References
10 |
11 | Some helpful references on these topics include {cite}`h1-james_2017, h1-ward_2016, h1-ward_2018, h1-himanen_2020`.
12 |
13 | ```{bibliography}
14 | :style: unsrt
15 | :filter: docname in docnames
16 | :keyprefix: h1-
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/chapters/07/helper_funcs_ml_adv.py:
--------------------------------------------------------------------------------
1 | import os
2 | import json
3 |
4 | import numpy as np
5 | import pandas as pd
6 | import matplotlib.pyplot as plt
7 | from matplotlib.animation import FuncAnimation
8 | from matplotlib.artist import Artist
9 |
10 | from sklearn.linear_model import LinearRegression, Ridge
11 | from sklearn.preprocessing import PolynomialFeatures
12 | from sklearn.metrics import mean_squared_error, mean_absolute_error
13 | from sklearn.model_selection import KFold, cross_val_score, cross_val_predict
14 |
15 |
16 |
17 | def animate_gd():
18 | data = np.load('../../assets/data/number_weight.npy')
19 | m = len(data)
20 | X = np.column_stack([np.ones(m), data[:, 0]])
21 | y = data[:, 1].reshape(-1, 1)
22 | theta = np.zeros((2, 1))
23 | alpha = 1e-5
24 | err = np.sum((X @ theta - y)**2) / (2*m)
25 |
26 | fig, ax = plt.subplots()
27 | ax.scatter(data[:, 0], data[:, 1])
28 | h, = ax.plot([], [], c='k', alpha=0.5)
29 | t = ax.text(0, 0, '')
30 | plt.tight_layout()
31 | plt.close()
32 |
33 | def init():
34 | h.set_data([], [])
35 | return h,
36 |
37 | def animate(i):
38 | global err, theta, X, y, ax, t
39 | # h.set_data(data[:, 0], X @ theta)
40 | h.set_data([1, 100], [2, 200])
41 | Artist.remove(t)
42 | t = ax.text(2, 100, s=f'error = {err:.3f}', fontsize=18, ha='left', bbox=dict(fc='1.0', ec='white'))
43 |
44 | theta = theta - alpha * (X.T @ (X @ theta - y))
45 | err = np.sum((X @ theta - y)**2) / (2*m)
46 | return h, t
47 |
48 | plt.rcParams.update({'animation.html': 'jshtml', 'figure.figsize':(6, 4)})
49 | anim = FuncAnimation(fig, animate, init_func=init, frames=20, interval=500, repeat=False);
50 | return anim
51 |
52 |
53 |
54 | def gen_data(arr):
55 | rng = np.random.default_rng(seed=2)
56 | n = 10
57 |
58 | X = np.reshape(rng.choice(arr, size=n, replace=False), (-1, 1))
59 | y = X ** 2 + 2 * np.reshape(rng.normal(size=n), (-1, 1))
60 |
61 | X2 = rng.choice(arr, size=3, replace=False)
62 | y2 = X2 ** 2 + 2 * np.reshape(rng.normal(size=3), (-1, 1))
63 |
64 | return X, y, X2, y2
65 |
66 |
67 |
68 | def ml_fitting(d, dom, X1, y1, X2, y2):
69 | lr = LinearRegression()
70 | kfold = KFold(n_splits=5, shuffle=False)
71 | featurizer = PolynomialFeatures(d)
72 | Xp = featurizer.fit_transform(X1)
73 | lr.fit(Xp, y1)
74 |
75 | domp = featurizer.fit_transform(dom)
76 | yp = lr.predict(domp)
77 |
78 | yhat = lr.predict(Xp)
79 | train_err = mean_squared_error(y1, yhat, squared=False)
80 |
81 | y2hat = lr.predict(featurizer.fit_transform(X2))
82 | val_err = mean_squared_error(y2, y2hat, squared=False)
83 |
84 |
85 | return yp, train_err, val_err
86 |
87 |
88 |
89 | def plot_styling(ax, degree):
90 | ax[0].set_xlim(0, 6)
91 | ax[0].set_ylim(-5, 35)
92 | ax[0].set_xlabel('$x$')
93 | ax[0].set_ylabel('$y$')
94 | ax[0].legend(frameon=False)
95 | ax[1].set_xlabel('degree of polynomial (complexity)')
96 | ax[1].set_ylabel('error')
97 | ax[1].set_xlim(1, degree-1)
98 | ax[1].legend(frameon=False)
99 | plt.show()
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/chapters/07/homework_07.md:
--------------------------------------------------------------------------------
1 | (h1:07:homework_07)=
2 | # Homework
3 |
4 | ## Reading
5 |
6 | We understand these past two days have been a lot and don't want to pile on too much more;
7 | however, sometimes it helps to hear a different perspective on the same issue, so we recommend **skimming** the primer by [Wang et al.](https://drive.google.com/file/d/1Ybj77q1RvHAIzX1CnV2eEEJr78hicAZQ/view?usp=sharing) {cite}`h3-wang_2020`.
8 | There are some nice ideas in there!
9 |
10 |
11 | ## Programming
12 |
13 | No new programming assignments!
14 | We encourage you to work with your team to decide what data you will need and how to consolidate it in one place (e.g., a single table that you can save as a CSV file for repeated future use).
15 |
16 |
17 |
18 | ## References
19 |
20 | ```{bibliography}
21 | :style: unsrt
22 | :filter: docname in docnames
23 | :keyprefix: h3-
24 | ```
25 |
26 |
--------------------------------------------------------------------------------
/chapters/08/day_08.md:
--------------------------------------------------------------------------------
1 | (h1:08:intro)=
2 | # Day 08: Research + guest speaker
3 |
4 | Welcome to day 🎱 where we will have our second guest speaker!
5 | This is a really special opportunity and you won't want to miss Austin's story. 🤠
6 |
7 |
8 |
9 | ## Goals for today
10 |
11 | - [Check in](https://forms.gle/dtgH9RZcLvHkaDyEA) to see how we're all doing after last week's whirlwind of learning.
12 | - Roadmap the remaining two weeks of this module.
13 | - Learn about informatics for battery development and the journey from farm (UC Davis) to Farm (Stanford) to... founding your own startup! (and then back to the Farm)
14 | - Continue working on your self-directed research projects.
15 |
16 |
17 |
18 | ## Timing for today
19 |
20 | - We will start the day at 9:00AM.
21 | - Austin will be speaking from 11:00AM to 12:00PM.
22 | - There will be a [NERSC](https://www.nersc.gov/) tour with the ASPIRES program at 2:00PM.
23 | - We will have our afternoon debrief at the scheduled time.
24 |
25 |
26 |
27 | ## Activities for today
28 |
29 | ```{tableofcontents}
30 | ```
31 |
32 |
33 |
--------------------------------------------------------------------------------
/chapters/08/guest_aionics.md:
--------------------------------------------------------------------------------
1 | (h1:08:guest_aionics)=
2 | # Guest speaker: Austin!
3 |
4 | ```{image} ../../assets/fig/08/austin.jpg
5 | :alt: austin
6 | :align: center
7 | :width: 240px
8 | ```
9 |
10 |
11 |
12 | The world is facing an energy crisis {cite}`i1-davis_2018`, and new materials are certainly going to be a part of the solution.
13 | That's one of the reasons why we choose to focus on dielectric materials in this module, as they are integral components in energy storage devices and microelectronics.
14 | As we increase renewable energy output, however, we must also develop new technology to store and move this energy—and that calls for, in addition to dielectric capacitors, better batteries. 🔋
15 | Batteries are a hot technology (see Prof. [Kristin Persson](https://perssongroup.lbl.gov/)'s and Prof. [Gerd Ceder](https://ceder.berkeley.edu/)'s work in UCB MSE for examples) that are also tough to understand given their reactive kinetics and multiscale characteristics.
16 | This means traditional batteries R&D is incredibly slow and faces a lot of the challenges that we've previously discussed that plague materials design and development. 🐌
17 |
18 | To help address this need, Austin co-founded the battery informatics startup [Aionics](https://aionics.io/) to leverage the power of AI to improve the performance, cost, and safety of batteries.
19 | This is based off of the research he did during his Ph.D. in [Applied Physics at Stanford University](http://appliedphysics.stanford.edu/) working with Prof. [Evan Reed](https://reedgroup.stanford.edu/) and Prof. [Yi Cui](https://web.stanford.edu/group/cui_group/), where he is now an [Adjunct Professor of MSE](https://mse.stanford.edu/people/austin-sendek).
20 | He developed ML models to screen compounds from MP that could be promising candidates for _solid_ Li-ion electrolytes {cite}`i1-sendek_2017, i1-sendek_2020`.
21 | Austin [proudly hails from Yreka](https://www.siskiyoudaily.com/opinion/20170516/guest-opinion-path-forward-for-siskiyou-county) in [Siskiyou County, CA](https://goo.gl/maps/66CR7KNR4inYBgSR8) and he obtained his BS in [Applied Physics from UC Davis](https://www.ucdavis.edu/majors/applied-physics).
22 | His Twitter handle is [@BatteryCowboy](https://twitter.com/BatteryCowboy). 🤠
23 |
24 |
25 |
26 | ## References
27 |
28 | ```{bibliography}
29 | :style: unsrt
30 | :filter: docname in docnames
31 | :keyprefix: i1-
32 | ```
33 |
34 |
35 |
--------------------------------------------------------------------------------
/chapters/08/practical.md:
--------------------------------------------------------------------------------
1 | (h1:08:practical)=
2 | # Practical considerations
3 |
4 | We'll cover some practical tips for MI that may help you in your research project:
5 |
6 |
7 |
8 |
9 |
10 | ## References
11 |
12 | Some helpful references on these topics include {cite}`i2-wang_2020`.
13 |
14 | ```{bibliography}
15 | :style: unsrt
16 | :filter: docname in docnames
17 | :keyprefix: i2-
18 | ```
19 |
20 |
--------------------------------------------------------------------------------
/chapters/08/recap_ml.md:
--------------------------------------------------------------------------------
1 | (h1:08:recap_ml)=
2 | # Recap ML discussion
3 |
4 | Here's a quick slide deck summarizing the key points from Monday and Tuesday:
5 |
6 |
7 |
8 |
9 |
10 | ## Yikes 😱
11 |
12 | We understand that after last week's intense learning extravaganza and these two days of dense ML content, for us to now tell you to "go do self-directed research" can feel like we're tossing you into the deep end—and you'd be completely right!
13 | We've opened the floodgates and inundated you with science, data, and programming tools, and now we're asking you to make sense of it all and chart your path forward.
14 | And you have a presentation next week.
15 | The task sounds daunting.
16 | The path forward appears nebulous.
17 | Your anxiety is rising... 🌡
18 | Welcome to research! 🤣
19 |
20 | In all seriousness, whether or not you identify with the above feelings, we want you to know two things:
21 |
22 | 1. We have set high expectations for you because **we strongly believe you will meet these expectations**.
23 | Remember that we specifically chose you all out of a large applicant pool because we see in you the characteristics of a successful researcher.
24 | You may not realize it yet, and that's OK.
25 | That's why we're giving you this task. 😁
26 | 1. In terms of the technical skills, you may be better prepared than you think.
27 | While there will always be nuances and more things to learn, all of the exercises you completed for last week's tutorials should have prepared you well for both the programming aspect and how to think about problems in a data-driven way.
28 | We covered quite a bit of science too, even if it was subtly embedded, and now **your task will be to connect the dots and apply your knowledge** to tackle the MSE problem using data science methods.
29 | Fun! 💪
30 |
31 |
32 |
33 | ## Next steps
34 |
35 | To get our mindset back in the game, we recommend taking some time to review the concepts from last week, starting from the science/research topics.
36 | You might ask yourself the following:
37 | - Do I have enough information to get started or should I do a little more reading on the science (lit review)?
38 | - What properties are important for this application or might be helpful for modeling the dielectric constant?
39 | - Do I have a dataset that I can work with? Is it in a usable, cleaned form? What do the data look like?
40 | - What programming examples from last week will enable me to put my ideas into practice?
41 |
42 | By answering the above questions, you should be well on your way! 🤩
43 |
44 | ```{important}
45 | We've probably repeated this so much that it's getting on your nerves, but we will emphasize once more that self-_directed_ research does not mean you're working alone.
46 | We hope you feel supported by your peers and mentors to pursue the research that is meaningful to you and to ask questions if anything is ever unclear or you just want to discuss your thoughts. 💝
47 | ```
--------------------------------------------------------------------------------
/chapters/09/check_in.md:
--------------------------------------------------------------------------------
1 | (h1:09:check_in)=
2 | # Check-in meeting instructions
3 |
4 | As we approach the end of week 2 and look ahead to our final presentations during week 3, we'd like to schedule a slightly-more-formal-yet-still-pretty-informal **1-on-1 check-in with each of you** to make sure that you are in a good position to finish out the module strong.
5 | These check-in meetings are scheduled for 20 min, but they can take less or more time, as scheduling allows and as you need.
6 |
7 | We see these check-ins as serving a few purposes:
8 | - Organizing your thoughts and summarizing what you have learned in the first week of self-directed research.
9 | - Getting your questions and concerns addressed before the last week.
10 | - Giving you practice articulating your thoughts and making slides for your final presentation.
11 |
12 |
13 |
14 | ## Sign-up link
15 |
16 | **By 5:00PM PDT today**, please sign up for a 20-min check-in slot for **this Friday, 06/17**, in [this Google spreadsheet](https://docs.google.com/spreadsheets/d/1VH1nbG97xTVJqig3eme9XMOCeN_etm-ny-fZPlpD2Ag/edit?usp=sharing).
17 |
18 | ```{note}
19 | If none of the [remaining] times work for you, please let Enze know.
20 | ```
21 |
22 |
23 |
24 |
25 | ## Summary slides
26 |
27 | To help focus the conversation, we ask that you prepare the following for this meeting: a **super short presentation** with **no more than two** slides.
28 | The following are suggested contents, that you can also merge onto a single slide if you want.
29 |
30 | - The first slide could summarize some things you learned, tried, and/or found interesting so far.
31 | **Please include at least one figure** of your data/models/other.
32 | - The second slide could list questions you may have going forward, a figure with your model performance, etc.
33 |
34 | ```{attention}
35 | Please don't let this check-in meeting stress you out!
36 | The intent is for the exact opposite! 😅
37 | ```
38 |
39 | Again, this meeting is one of several small checkpoints to give you tangible milestones to work toward and keep things flowing. 🌊
40 | We understand this is still _early_ in a typical research process, so to clarify our expectations for what you should have prepared for this check-in, here are some examples:
41 | - You can produce a data visualization of some interesting (or not interesting) trends that you observed during exploratory data analysis of your feature space.
42 | We could then have a discussion about what other analyses to do, ML models to build, etc.
43 | - Perhaps you've already trained and validated ML models using the features you selected.
44 | Try to put together a figure and/or table summarizing the model performance, and we can discuss how to improve the model, what things to try next, etc.
45 | - Perhaps you got super stuck somewhere along the way, or found some interesting physics/chemistry but aren't sure how to proceed with a programmatic, data-driven solution.
46 | That's OK!
47 | Teach Enze about what you ran into and let's see if we can get unstuck.
48 |
49 |
--------------------------------------------------------------------------------
/chapters/09/day_09.md:
--------------------------------------------------------------------------------
1 | (h1:09:intro)=
2 | # Day 09: Research
3 |
4 | It is day 🀘 of this module and we will be continuing work on our self-directed research projects.
5 | We're more than 50% of the way through the module!
6 | How time flies.
7 |
8 |
9 |
10 | ## Goals for today
11 |
12 | - Continue working on your self-directed research projects.
13 | - Discuss tomorrow's check-in session and [sign up for a slot](https://docs.google.com/spreadsheets/d/1VH1nbG97xTVJqig3eme9XMOCeN_etm-ny-fZPlpD2Ag/edit?usp=sharing).
14 |
15 |
16 |
17 | ## Timing for today
18 |
19 | - We will start the day with morning scrum at 9:00AM.
20 | - We will convene for a brief check-in at 1:30PM.
21 | - Enze will hold drop-in OH from 2:00PM to 3:00PM. 🌱
22 | - We will have our afternoon debrief at the scheduled time.
23 |
24 |
25 |
26 | ## Activities for today
27 |
28 | ```{tableofcontents}
29 | ```
30 |
31 |
32 |
--------------------------------------------------------------------------------
/chapters/10/day_10.md:
--------------------------------------------------------------------------------
1 | (h1:10:intro)=
2 | # Day 10: Research
3 |
4 | It is day 🎳 and we will be continuing work on our self-directed research projects.
5 | Hang in there—the long weekend is almost here! 🙏🏼
6 |
7 |
8 |
9 | ## Goals for today
10 |
11 | - Continue working on your self-directed research projects.
12 | - [Check-in with Enze](https://docs.google.com/spreadsheets/d/1VH1nbG97xTVJqig3eme9XMOCeN_etm-ny-fZPlpD2Ag/edit?usp=sharing) at your selected time regarding your research project.
13 |
14 |
15 | ```{admonition} Milestone
16 | :class: important
17 | Clarify any questions and concerns you may have regarding your project, and summer experience as a whole, during the check-in.
18 | ```
19 |
20 |
21 | ## Timing for today
22 |
23 | - We will start the day with morning scrum at 9:00AM.
24 | - We will convene for a brief check-in at 1:30PM.
25 | - We will have our afternoon debrief at the scheduled time.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chapters/11/day_11.md:
--------------------------------------------------------------------------------
1 | (h1:11:intro)=
2 | # Day 11: Juneteenth
3 |
4 | In observance of [Juneteenth](https://en.wikipedia.org/wiki/Juneteenth) (which is on a Sunday this year), today is a holiday! 🙌🏿
5 | This means:
6 |
7 | Please **do not**:
8 |
9 | - Show up to morning scrum or afternoon debrief (unless you want to be a [one person band](https://www.youtube.com/watch?v=01GY7zYN-ps)). 🦗
10 | - Do research (unless it brings you joy and reduces stress). 🤪
11 |
12 |
13 | Please **do**:
14 |
15 | - Recharge your batteries. 🛌
16 | - Eat lots of good food. 😋
17 | - Spend some quality time with the people you care about. ❤
18 |
19 | We look forward to seeing you tomorrow!
--------------------------------------------------------------------------------
/chapters/12/active_learning_blank.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "74e79d1b",
6 | "metadata": {},
7 | "source": [
8 | "# foo\n",
9 | "\n"
10 | ]
11 | },
12 | {
13 | "cell_type": "code",
14 | "execution_count": null,
15 | "id": "07994d27",
16 | "metadata": {},
17 | "outputs": [],
18 | "source": [
19 | "a = 4\n",
20 | "\n",
21 | "\n",
22 | "\n",
23 | "print(a)"
24 | ]
25 | }
26 | ],
27 | "metadata": {
28 | "kernelspec": {
29 | "display_name": "Python 3 (ipykernel)",
30 | "language": "python",
31 | "name": "python3"
32 | },
33 | "language_info": {
34 | "codemirror_mode": {
35 | "name": "ipython",
36 | "version": 3
37 | },
38 | "file_extension": ".py",
39 | "mimetype": "text/x-python",
40 | "name": "python",
41 | "nbconvert_exporter": "python",
42 | "pygments_lexer": "ipython3",
43 | "version": "3.7.11"
44 | }
45 | },
46 | "nbformat": 4,
47 | "nbformat_minor": 5
48 | }
49 |
--------------------------------------------------------------------------------
/chapters/12/day_12.md:
--------------------------------------------------------------------------------
1 | (h1:12:intro)=
2 | # Day 12: Research + grad school
3 |
4 | It is day 🕛 of this module and we will be continuing work on our self-directed research projects. ☕
5 | To kick off this week, Mark will be leading a Q&A on all things graduate school related, so you _definitely_ don't want to miss this!
6 |
7 |
8 |
9 | ## Goals for today
10 |
11 | - Continue working on your self-directed research projects.
12 | - Learn about the [unwritten] rules and [unspoken] details 😉 of the graduate school saga—from preparation, to admissions, to experience.
13 | - (Tentative) Do a tutorial on active learning for materials development.
14 |
15 |
16 |
17 | ## Timing for today
18 |
19 | - We will start the day with morning scrum at 9:00AM.
20 | - Mark will host a discussion from 10:00AM to 11:00AM.
21 | - We will convene for a brief check-in at 1:30PM.
22 | - We will have our afternoon debrief at the scheduled time.
23 |
24 |
25 |
26 | ## Activities for today
27 |
28 | ```{tableofcontents}
29 | ```
30 |
31 |
32 |
--------------------------------------------------------------------------------
/chapters/12/grad_school.md:
--------------------------------------------------------------------------------
1 | (h1:12:grad_school)=
2 | # Grad school Q&A: Mark!
3 |
4 | ```{image} ../../assets/fig/preamble/mark.jpg
5 | :alt: mark_grad
6 | :align: center
7 | :width: 240px
8 | ```
9 |
10 | ```{admonition} Did you know?
11 | :class: tip
12 | What is the difference between a black hole and graduate school admissions?
13 | One is said to be so complex, so dense, so opaque that no information ever escapes it.
14 | The other is an astronomical object. 😁
15 | ```
16 |
17 | One of the main goals of this entire summer internship—and why you chose to sign up—is to give you all some research experience and for you to see what life as a graduate researcher is like.
18 | By now, you have already accumulated significant experience working with MI, with exciting journeys in EUV lithography and ferroelectrics to come(!)—and maybe, _just maybe_, you feel like this is where you belong. 😊
19 | But then as you thought a little deeper, you might have realized that situated squarely on the path between where you are now and your [potential] future life as a graduate student is the nebulous fog that is graduate school admissions.
20 | Like undergraduate admissions (unfortunately), the process is anything but clear and rife with pain points, inequities, and pitfalls.
21 | Unlike undergraduate admissions (unfortunately), there is also a different set of evaluation criteria that almost surely has changed in light of recent events.
22 | What the process is like now is anyone's guess. 🤷
23 |
24 | And who better to discuss all of this with than our very own?
25 | As you know from the introduction, Mark is currently a Professor of MSE at UCB and Director of MSD at LBL.
26 | What you may not know is that previously Mark served as Chair of the [UCB MSE department](https://mse.berkeley.edu/) (2012-2018) and before that held professorships at [Northwestern University](https://www.mccormick.northwestern.edu/materials-science/) (2000-2005) and [UC Davis](https://mse.engineering.ucdavis.edu/) (2005-2009).
27 | He has been on several graduate admissions committees (and chaired a few) and has mentored dozens of undergraduate and graduate students in his academic career.
28 | Bring your energy and questions for Mark as we get a special opportunity to hear about what it's all like _from a man on the inside_. 👀
29 |
30 |
31 |
32 | ## Pre-reading slides
33 |
34 | We ask that you skim the following slides (not necessarily the links) _before_ Mark's session to help situate ourselves and spur some questions:
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/chapters/12/welcome_back.md:
--------------------------------------------------------------------------------
1 | (h1:12:welcome_back)=
2 | # Welcome back!
3 |
4 | Here's a quick slide deck summarizing the key points from the first two weeks.
5 | We've come so far!
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/chapters/13/day_13.md:
--------------------------------------------------------------------------------
1 | (h1:13:intro)=
2 | # Day 13: Research
3 |
4 | It is day 13 and we are now in the home stretch 😢, so it's time to start thinking about our final project presentations.
5 |
6 |
7 |
8 |
9 | ## Goals for today
10 |
11 | - Continue working on your self-directed research projects.
12 | - Discuss tips for effective presentations.
13 |
14 |
15 |
16 | ## Timing for today
17 |
18 | - We will start the day with morning scrum at 9:00AM.
19 | - We will convene for a brief check-in at 1:30PM. ✅
20 | - We will have our afternoon debrief at the scheduled time.
21 |
22 |
23 |
24 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/chapters/13/presentations.md:
--------------------------------------------------------------------------------
1 | (h1:13:presentations)=
2 | # Giving presentations
3 |
4 | One of the final deliverables in this module is a presentation to showcase your research.
5 | Throughout the course of graduate school, you will be giving research-related talks _all the time_.
6 | Depending on the occasion and the audience, these talks will range in technicality and length.
7 | You may want to choose something short and fun when speaking to non-technical audiences, while for a thesis defense you should be prepared to delve into the technical details for up to 3 hours. 😱
8 |
9 | For this module, you will be giving a [**science slam**](https://en.wikipedia.org/wiki/Science_slam), which is presumably named after [poetry slams](https://en.wikipedia.org/wiki/Poetry_slam) (spoken word).
10 | In the same vein, a science slam is a short oral presentation that is given to **non-expert audiences**, where the focus is on communicating your work in a way that generates excitement and impresses impact, even when the audience isn't too familiar with your field.
11 | It attempts to engage broader audiences in science by breaking down some of the formality and jargon in research and is great practice for science communication!
12 |
13 | Please be aware that when we say "non-experts," we don't [necessarily] mean a "non-technical audience without a science background."
14 | All of us (interns and mentors), for example, are "non-experts" in all but a few fields, but we are still considered a "technical audience" as we know a thing or two about science. 😜
15 | We will be the primary audience for your presentation, so keep that in mind when preparing your content.
16 | But when in doubt, error on the side of less technicality.
17 |
18 | ```{margin}
19 | **Also keep in mind**
20 |
21 | No one:
22 |
23 | Literally nobody:
24 |
25 | _Not a single soul_:
26 |
27 | Reviewer #2: I don't like your presentation because it is too entertaining.
28 | ```
29 |
30 |
31 |
32 | ## Example slam
33 |
34 | There are many great examples of science slams on YouTube, but out of convenience more than anything else, here we've included a slam talk that Enze gave as part of his 2020 summer research internship at [Lawrence Livermore National Laboratory](https://www.llnl.gov/) (LLNL).
35 |
36 |