├── .gitignore ├── LICENSE ├── README.md ├── labs ├── .DS_Store ├── NANO266 General Lab Instructions.pdf ├── README.md ├── Unix Cheat Sheet.md ├── XSEDEUserPortal.png ├── lab1 │ ├── H2.nw │ ├── NANO266 Lab 1 - Calculations on Molecules.pdf │ ├── NH3.nw │ ├── README.md │ └── submit_script ├── lab2 │ ├── Equation.png │ ├── NANO266 Lab 2 - Convergence of DFT calculations.pdf │ ├── README.md │ ├── Si.pbe-n-kjpaw_psl.0.1.UPF │ ├── Si.pw.in.template │ ├── Si.pz-n-kjpaw_psl.0.1.UPF │ ├── analyze.py │ ├── run_pw.py │ └── submit_script ├── lab3 │ ├── Au.pbe-dn-rrkjus_psl.0.1.UPF │ ├── Cu.fcc.pw.in.template │ ├── Cu.pbe-dn-rrkjus_psl.0.2.UPF │ ├── CuAu.scc.pw.in.template │ ├── Fe.bcc.pw.in.template │ ├── Fe.hcp.pw.in.template │ ├── Fe.pbe-nd-rrkjus.UPF │ ├── Formation energy.png │ ├── NANO266 Lab 3 - Phase Stability from Quantum Mechanics.pdf │ ├── O.pbe-n-rrkjus_psl.0.1.UPF │ ├── Pb.pbe-dn-rrkjus_psl.0.2.2.UPF │ ├── PbTiO3.pw.in.template │ ├── README.md │ ├── Ti.pbe-sp-van_ak.UPF │ ├── run_pw.py │ └── submit_script └── lab4 │ ├── Al.100.bulk.pw.in.template │ ├── Al.100.surf.pw.in.template │ ├── Al.111.bulk.pw.in.template │ ├── Al.111.surf.pw.in.template │ ├── Al.cif │ ├── Al.pbe-n-van.UPF │ ├── Binding energy.png │ ├── Coordinates.png │ ├── H.pbe-rrkjus.UPF │ ├── InsertLatticePlane.png │ ├── LabeledAl.png │ ├── NANO266 Lab 4 - Al surfaces.pdf │ ├── README.md │ ├── Surface energy.png │ ├── Transform.png │ ├── convert_to_cif.py │ ├── fcc_surf_gen.py │ ├── scf.py │ └── submit_script ├── lectures ├── 00-Course_Admin.tex ├── 01-Introduction_to_QM.tex ├── 02-The_Hartree_Fock_Approximation.tex ├── 03-Beyond_HF.tex ├── 04-Properties_of_Molecules_from_QM.tex ├── 05-DFT.tex ├── 06-XC_Functionals.tex ├── 07-Solving_the_Schrodinger_Equation_for_Periodic_Solids.tex ├── 08-Properties_of_Perioidic_Solids_from_QM.tex ├── 09-Tools_of_the_modelling_trade.tex ├── 10-Temperature.tex ├── 11-Surfaces_and_Interfaces.tex ├── 12-Transition_States.tex ├── 13-AIMD.tex ├── Lab_1.tex ├── Lab_2.tex ├── Lab_3.tex ├── Lab_4.tex ├── code │ ├── 9_expr.sh │ ├── 9_hello_world.c │ ├── 9_hello_world.java │ ├── 9_hello_world.py │ ├── 9_unix_for.sh │ ├── Lab_2_code.py │ └── example_materials_api.py ├── figures │ ├── 0.3_Jupiter_1.png │ ├── 0.3_Jupiter_2.png │ ├── 0.3_Jupiter_3.png │ ├── 0.4_LFP_surface.png │ ├── 0.4_catalysis.png │ ├── 0.5_HER.png │ ├── 0.5_H_storage.png │ ├── 0.5_Organic_PVs.png │ ├── 0.5_Solar.png │ ├── 0_DFT_a_practical_introduction.png │ ├── 0_martin_electronic_structure.png │ ├── 10_Heat_capacities.png │ ├── 10_LFP_PD.png │ ├── 10_LFP_PD2.png │ ├── 10_NCO_CE_PD.png │ ├── 10_NCO_PD.png │ ├── 10_Phonon_Diamond.png │ ├── 10_Phonon_Semiconductors.png │ ├── 10_Phonons.jpeg │ ├── 10_compressive_sensing.png │ ├── 10_configurational.png │ ├── 10_conformational.png │ ├── 10_electronic.png │ ├── 10_tensorial_CE.png │ ├── 10_vibrational.png │ ├── 11_Bi_in_Ni.png │ ├── 11_Bi_in_Ni_DFT.png │ ├── 11_Crystalium.png │ ├── 11_Cu_surface_energies.png │ ├── 11_GBs.png │ ├── 11_LFP_terminations.png │ ├── 11_PES.png │ ├── 11_Si111.png │ ├── 11_Solutes_at_Fe_GBs.png │ ├── 11_binding.png │ ├── 11_catalysis.png │ ├── 11_dolomite.png │ ├── 11_hetero_interfaces.png │ ├── 11_lattice_planes.png │ ├── 11_metastable.png │ ├── 11_miller_indices.png │ ├── 11_reconstructions.png │ ├── 11_surface_construction.png │ ├── 11_surface_functionals.png │ ├── 11_surface_kpoints.png │ ├── 11_tasker.png │ ├── 12-CINEB.png │ ├── 12-CINEB_2.png │ ├── 12-Growing_String.png │ ├── 12-H_TM_1.png │ ├── 12-H_TM_2.png │ ├── 12-LCO_Diffusion.png │ ├── 12-Methanol_Cu_1.png │ ├── 12-Methanol_Cu_2.png │ ├── 12-Multivalent_Cathodes.png │ ├── 12-O_diffusion_in_YSZ_1.png │ ├── 12-O_diffusion_in_YSZ_2.png │ ├── 12-Percolation.png │ ├── 12-variable_springs.png │ ├── 12_NEB.png │ ├── 12_PES.png │ ├── 12_transition_state.png │ ├── 13-H2O_1.png │ ├── 13-H2O_2.png │ ├── 13-InP_1.png │ ├── 13-InP_2.png │ ├── 13-InP_3.png │ ├── 13-LGPS_1.png │ ├── 13-LGPS_2.png │ ├── 13-LMPS.png │ ├── 13-LiOH.png │ ├── 13-MD_simulation.png │ ├── 13-Maxwell_Boltzmann.png │ ├── 13-Nobel.png │ ├── 13-Phonons_MD.png │ ├── 13-Surface_reactions.png │ ├── 13_CHD_Pt.png │ ├── 13_PES.png │ ├── 1_Diffusivity.jpg │ ├── 1_Papers_per_year.png │ ├── 1_Voltage.png │ ├── 1_moores_law.png │ ├── 1_nobelprizes.png │ ├── 1_phase_diagram.png │ ├── 1_polarons.png │ ├── 1_surfaces.png │ ├── 2_HF_SCF_Flowchart.png │ ├── 2_STO.png │ ├── 2_alkene.png │ ├── 2_atomic_orbitals.png │ ├── 30yearsthatshookphysics.png │ ├── 3_CI_excitations.png │ ├── 3_G2_G3.png │ ├── 3_compute_cost.png │ ├── 3_correlation_energies_vs_FCI.png │ ├── 3_degenerate_orbitals.png │ ├── 3_dissociation_of_HF.png │ ├── 3_ionization_potentials.png │ ├── 3_scaling.png │ ├── 4_energy_diagram.png │ ├── 4_model_chem.png │ ├── 4_scaling_factors.png │ ├── 5_DFT_paper1.png │ ├── 5_DFT_paper2.png │ ├── 5_LDA.png │ ├── 5_LDA_Corre.png │ ├── 5_bond_lengths.png │ ├── 5_paper_mountain.jpg │ ├── 5_phase_diagram_si.png │ ├── 5_radial_density_Ne.png │ ├── 5_xc_energies_Si.png │ ├── 6_EAs.png │ ├── 6_HSE_bandgap_MAE.png │ ├── 6_HSE_bandgaps.png │ ├── 6_IEs.png │ ├── 6_atomization_energies.png │ ├── 6_bandgaps.jpeg │ ├── 6_bond_lengths.png │ ├── 6_chimera.png │ ├── 6_cohesive_energies.png │ ├── 6_equilibrium_vol.png │ ├── 6_formation_energies_stats.png │ ├── 6_functional_choices.png │ ├── 6_ground_states.png │ ├── 6_hse_oxidation_energies.png │ ├── 6_hse_voltage.png │ ├── 6_jacobs_ladder.png │ ├── 6_mp_u_values.png │ ├── 6_oxidation_fitting.png │ ├── 6_oxidation_fitting2.png │ ├── 6_rxn_energies1.png │ ├── 6_rxn_energies2.png │ ├── 6_scan_performance.png │ ├── 6_scan_performance_2.png │ ├── 7_1D_crystal.png │ ├── 7_2D_crystal.png │ ├── 7_3D_crystal.png │ ├── 7_Bloch_Waves.png │ ├── 7_Brillouin_Zone_2D.png │ ├── 7_Brillouin_Zone_BCC.png │ ├── 7_Brillouin_Zone_FCC.png │ ├── 7_Brillouin_Zone_Hex.png │ ├── 7_Cu_fermi_surface.png │ ├── 7_PSP_comparison.png │ ├── 7_Pseudopotentials.png │ ├── 7_bravais_lattices.jpg │ ├── 7_conventional_unit_cell.png │ ├── 7_convergence_energy_cutoff.png │ ├── 7_convergence_kpoint.png │ ├── 7_crystal.png │ ├── 7_irr_BZ.png │ ├── 7_monkhorst_hexagonal.png │ ├── 7_monkhorst_square.png │ ├── 7_periodic_potential.png │ ├── 7_primitive_unit_cell.png │ ├── 8_3D_TM_Bulk_Moduli.png │ ├── 8_4D_TM_Bulk_Moduli.png │ ├── 8_Bandstructure_Cu.png │ ├── 8_Bandstructure_Si.png │ ├── 8_Configuration_Diagram.png │ ├── 8_Cu_EOS.png │ ├── 8_DOS_Ag.png │ ├── 8_DOS_Si.png │ ├── 8_DX_Centers.png │ ├── 8_Defect_Charge_Density.png │ ├── 8_Defect_Diagram.png │ ├── 8_Defect_Diagram_ZrO2_HfO2.png │ ├── 8_HT_Bandstructure.png │ ├── 8_MP_Elastic_Moduli.png │ ├── 8_conjugate_gradient.png │ ├── 8_magnetism_Fe.png │ ├── 8_phase_transition_pressure_III_V_and_II-VI.png │ ├── 9_ASE.png │ ├── 9_geeks.png │ ├── 9_lincoln.png │ ├── 9_programming_languages.png │ ├── 9_pymatgen.png │ ├── Lab1_1931_Nobel_Prize.png │ ├── Lab1_Alchemy_of_Air.png │ ├── Lab1_Dangerous_Fixation.png │ ├── Lab1_Haber_Bosch.png │ ├── Lab4_Al1.png │ ├── Lab4_Al2.png │ ├── Lab4_Al3.png │ ├── Lab4_Al4.png │ ├── Lab4_fcc_surfaces.png │ ├── Lab_2_Quantum_Espresso.png │ ├── Lab_2_Silicon_Valley.png │ ├── Lab_3-Cu_Au_PD.png │ ├── Lab_3-Fe_PD.png │ ├── Lab_3-Iron_Man.png │ ├── Lab_3-PbTiO3.png │ ├── computer.png │ ├── jupyter-logo.png │ ├── numpy-logo.jpeg │ ├── pandas-logo.png │ ├── pymatgen-overview.jpg │ └── scipy-logo.png ├── refs.bib └── template.tex ├── mmd_latex_templates ├── README.md ├── mmd-default-metadata.tex ├── mmd-mavrldoc-begin-doc.tex ├── mmd-mavrldoc-footer.tex ├── mmd-mavrldoc-header.tex ├── mmd-mavrldoc-layout.tex ├── mmd-mavrldoc-packages.tex ├── mmd-mavrldoc-setup.tex └── mmd-title.tex ├── scripts └── build_pdf └── tutorials └── PWSCF_IO.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | .DS_Store 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | .idea 12 | env/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | 45 | # Translations 46 | *.mo 47 | *.pot 48 | 49 | # Django stuff: 50 | *.log 51 | 52 | # Sphinx documentation 53 | docs/_build/ 54 | 55 | # PyBuilder 56 | target/ 57 | scratch 58 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Materials Virtual Lab 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of nano266 nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This is the public repository for UCSD's NANO266 - Quantum Mechanical Modeling 4 | of Materials and Nanostructures taught by Prof Shyue Ping Ong. The purpose of 5 | this repo is to serve as a persistent and evolving collection of course 6 | materials, including supplementary notes, lab homeworks, codes used, etc. 7 | 8 | While this repo is completely open and anyone is welcome to use the materials 9 | contain therein, I would ask that you acknowledge any usage. 10 | 11 | # Multimarkdown 12 | 13 | Many of the writeups (for labs, etc.) are done using multimarkdown. Github will 14 | pretty much render most of the documents properly. Where necessary, PDFs are 15 | also generated for you to download and view. 16 | 17 | # Viewing the Notebooks 18 | 19 | You can explore some of the supplementary notebooks using the excellent online 20 | ipython notebook viewer. To begin, go to this 21 | [link](http://nbviewer.ipython.org/github/materialsvirtuallab/nano266/tree/master/) 22 | which points to the root directory. 23 | 24 | # Acknowledgments 25 | 26 | Some of the materials are inspired by and adapted from excellent MIT Course 27 | 3.320: Atomistic Computer Modeling of Materials taught by Professors Gerbrand 28 | Ceder and Nicola Marzari. Those materials are available on MIT Open Courseware. 29 | 30 | -- 31 | Shyue Ping Ong 32 | -------------------------------------------------------------------------------- /labs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/materialsvirtuallab/nano266/0907e8798f5461f1d90cd2edef105fec9c57fb52/labs/.DS_Store -------------------------------------------------------------------------------- /labs/NANO266 General Lab Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/materialsvirtuallab/nano266/0907e8798f5461f1d90cd2edef105fec9c57fb52/labs/NANO266 General Lab Instructions.pdf -------------------------------------------------------------------------------- /labs/README.md: -------------------------------------------------------------------------------- 1 | LaTeX input: mmd-mavrldoc-header 2 | Title: NANO266 General Lab Instructions 3 | Author: Shyue Ping Ong 4 | Affiliation: University of California, San Diego 5 | Address: 9500 Gilman Drive, Mail Code 0448, La Jolla, CA 92093-0448 6 | Web: http://www.materialsvirtuallab.org 7 | Base Header Level: 2 8 | LaTeX Mode: mavrldoc 9 | LaTeX input: mmd-mavrldoc-begin-doc 10 | LaTeX footer: mmd-mavrldoc-footer 11 | 12 | # Introduction 13 | 14 | Welcome to the lab sessions for NANO266. Before you begin, you should read this 15 | carefully and follow all instructions to make sure that your computer / 16 | computing resource is set up properly. Your instructors are on hand to help you 17 | if you run into any problems. 18 | 19 | # First Principles Modeling Codes 20 | 21 | In the labs, we will be using two open-source first principles modeling codes: 22 | 23 | 1. NWchem (http://www.nwchem-sw.org) is a computational chemistry code that 24 | aims to be scalable both in their ability to treat large scientific 25 | computational chemistry problems efficiently. 26 | 2. QuantumEspresso (http://www.quantum-espresso.org/) is an integrated suite of 27 | computer codes for electronic-structure calculations and materials modeling 28 | at the nanoscale. It is based on density-functional theory, plane waves, and 29 | pseudopotentials. 30 | 31 | Before you start any of the labs, make sure that you have the software 32 | installed and in your path. You have three options: 33 | 34 | ## Option 1: Use XSEDE 35 | 36 | ![XSEDE user portal](XSEDEUserPortal.png) 37 | 38 | We have secured an XSEDE allocation for this course. Please go the the XSEDE 39 | portal (https://portal.xsede.org) and create an account as shown above. 40 | After you have done so, email your username to one of the TAs to be added 41 | to the allocation for this course. 42 | If you are on a MAC machine, you can open the Terminal app and then login to the allocations 43 | with 44 | 45 | ```bash 46 | ssh @login.expanse.sdsc.edu 47 | ``` 48 | 49 | If you are on a Windows machine, you need to download a SSH client like 50 | [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). 51 | Once you are logged in, immediately run 52 | 53 | ```bash 54 | module load gcc/10.2.0 python 55 | ``` 56 | 57 | to make sure that Python are loaded for you. You can also add this line to 58 | your `.bash_profile` so that it will always be loaded for you when you login. 59 | 60 | ## Option 2: Set up your own Mac 61 | 62 | If you have your own Mac, you can use the executables already included in 63 | this repo (see cloning the repo section). Run the following command to add 64 | the bin directory to your path as follows (assuming you are on bash): 65 | 66 | ```bash 67 | export PATH=$PATH:/bin/Mac 68 | # The following is to set the NWChem basis sets used in lab1. 69 | # Be careful that the ending slash is needed! 70 | export NWCHEM_BASIS_LIBRARY=/resources/nwchem_basis/ 71 | ``` 72 | 73 | ## Option 3: Compile your own 74 | 75 | You can download the source code for QuantumEspresso or NWChem and install 76 | it yourself. *Attempt this only if you have a fairly good familiarity with 77 | compiling things on Unix-based OSes, or are willing to spend the time to 78 | figure it out!* If you foresee you will be working on such calculations 79 | extensively in future, it is generally useful for you to learn how to do 80 | this. Start with the QuantumEspresso code as it is more straightforward to 81 | compile. 82 | 83 | In general, it is not recommended that you run on a native Windows OS for these 84 | labs. Most first principles codes are designed to run primarily on 85 | supercomputing clusters that have Unix-based OSes. If you have a Windows 86 | machine, you should try options 1 or 3 above. 87 | 88 | # Cloning the repo 89 | 90 | First, go to [Github](https://github.com). Create an account if you do not already 91 | have one. 92 | 93 | Next, create a ssh key if you do not have one on XSEDE with the following command: 94 | ``` 95 | ssh-keygen 96 | ``` 97 | 98 | You may press Enter to choose the defaults for all the prompts. 99 | 100 | Then, show your *public* SSH key: 101 | ``` 102 | cat ~/.ssh/id_rsa.pub 103 | ``` 104 | Copy this key. 105 | 106 | In your Github user profile, under "SSH and GPG keys", add the key you just copied. 107 | 108 | On wherever you are performing the calculations for the lab, you should clone 109 | this repo by doing: 110 | 111 | ``` 112 | git clone git@github.com:materialsvirtuallab/nano266.git 113 | ``` 114 | 115 | Check that you have the repo cloned successfully by doing a `ls`. If you are 116 | using XSEDE, make sure that you do the git clone in your home folder, i.e., 117 | the folder that you are in when you first log into XSEDE. This makes following 118 | the rest of the instructions much easier. 119 | 120 | This assumes you already have git installed, which comes by default in XSEDE 121 | and Mac and can easily be installed in Unix-based OSes. To update your repo to 122 | the latest version at any time, you can do: 123 | 124 | ``` 125 | cd ~/nano266 126 | git pull 127 | ``` 128 | 129 | from within the repo. 130 | 131 | # Using a Unix-based terminal 132 | 133 | If you have never used a Unix-based terminal, there is a bit of a slight 134 | learning curve. But in general, you will be working with only the following 135 | commands: 136 | 137 | ```bash 138 | cd # change directory to 139 | cp # copy to 140 | mv # move to 141 | rm # remove 142 | pwd # show path to the current directory 143 | mkdir # make a new directory 144 | ls # list files/directories in the current directory 145 | ``` 146 | 147 | A more comprehensive cheat sheet for Unix is given [here](https://github.com/materialsvirtuallab/nano266/blob/master/labs/Unix%20Cheat%20Sheet.md). 148 | 149 | You will also be doing some basic text editing in the terminal. For beginners, 150 | the `nano` command line editor has the smallest learning curve. Other options 151 | are `vi` and `emacs`. 152 | 153 | Finally, you will need to get your results over to your local computer to do 154 | analysis. The easiest way to do this is with: 155 | 156 | ```bash 157 | scp @login.expanse.sdsc.edu:~/nano266/ . 158 | ``` 159 | 160 | in your local Mac or Linux terminal. If you are on Windows, the equivalent is 161 | [pscp](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). 162 | 163 | # Programming in Python 164 | 165 | A lot of the labs use Python as a scripting language for automating 166 | calculations and analysis. You should ensure that you have Python 2.7.x 167 | installed with numpy. If you have a Mac, this should be already the case. If 168 | you use the virtual machine, it is also already set up. 169 | 170 | If you don't know Python, get a quick primer from the official [Python 171 | documentation](https://docs.python.org/2.7/). You do not really need to know 172 | much more than the basics for the purposes of the labs. Learning how to use a 173 | scripting language like Python can save you loads of time in automating 174 | calculations. 175 | -------------------------------------------------------------------------------- /labs/Unix Cheat Sheet.md: -------------------------------------------------------------------------------- 1 | # Unix Cheat Sheet 2 | 3 | ## Help on any Unix command. 4 | man {command} Type man rm to read the manual for the rm command. 5 | whatis {command} Give short description of command. 6 | 7 | ### List a directory 8 | 9 | You can combine attributes, e.g., `ls -laF` gets a long listing of all files with types. 10 | 11 | ```bash 12 | ls {path} 13 | ls {path_1} {path_2} # List both {path_1} and {path_2}. 14 | ls -l {path} # Long listing, with date, size and permisions. 15 | ls -a {path} # Show all files, including important .dot files that don't otherwise show. 16 | ls -F {path} # Show type of each file. "/" = directory, "*" = executable. 17 | ls -R {path} # Recursive listing, with all subdirs. 18 | ls {path} | more # Show listing one screen at a time. 19 | ``` 20 | 21 | ### Change to directory 22 | 23 | ```bash 24 | cd {dirname} # There must be a space between. 25 | cd ~ # Go back to home directory, useful if you're lost. 26 | cd .. # Go back one directory. 27 | ``` 28 | 29 | ### Make a new directory 30 | 31 | ```bash 32 | mkdir {dirname} 33 | ``` 34 | 35 | ### Remove a directory 36 | 37 | ```bash 38 | rmdir {dirname} # Only works if {dirname} is empty. 39 | rm -r {dirname} # Remove all files and subdirs. Careful! 40 | ``` 41 | 42 | ### Print working directory 43 | 44 | ```bash 45 | pwd # Show where you are as full path. Useful if you're lost or exploring. 46 | ``` 47 | 48 | ### Copy a file or directory 49 | 50 | ```bash 51 | cp {file1} {file2} 52 | cp -r {dir1} {dir2} # Recursive, copy directory and all subdirs. 53 | cat {newfile} >> {oldfile} # Append newfile to end of oldfile. 54 | ``` 55 | 56 | ### Move (or rename) a file 57 | 58 | ```bash 59 | mv {oldfile} {newfile} # Moving a file and renaming it are the same thing. 60 | mv {oldname} {newname} 61 | ``` 62 | 63 | ### Delete a file 64 | 65 | ```bash 66 | rm {filespec} # ? and * wildcards work like DOS should. "?" is any character; "*" is any string of characters. 67 | ``` 68 | 69 | ### View a text file 70 | 71 | ```bash 72 | more {filename} # View file one screen at a time. 73 | less {filename} # Like more, with extra features. 74 | cat {filename} # View file, but it scrolls. 75 | cat {filename} | more # View file one screen at a time. 76 | ``` 77 | 78 | ### Edit a text file. 79 | 80 | ```bash 81 | nano {filename} # Basic text editor 82 | ``` 83 | 84 | ### Create a text file. 85 | 86 | ```bash 87 | cat > {filename} # Enter your text (multiple lines with enter are ok) and press control-d to save. 88 | nano {filename} # Create some text and save it. 89 | ``` 90 | 91 | 92 | ### Compare two files 93 | 94 | ```bash 95 | diff {file1} {file2} # Show the differences. 96 | sdiff {file1} {file2} # Show files side by side. 97 | ``` 98 | 99 | ### Other text commands 100 | 101 | ```bash 102 | grep '{pattern}' {file} # Find regular expression in file. 103 | spell {file} # Display misspelled words. 104 | wc {file} # Count words in file. 105 | wc -l {file} # Count the number of lines in a file. 106 | ``` 107 | 108 | ### Wildcards and Shortcuts 109 | 110 | ```bash 111 | * # Match any string of characters, eg page* gets page1, page10, and page.txt. 112 | ? # Match any single character, eg page? gets page1 and page2, but not page10. 113 | [...] # Match any characters in a range, eg page[1-3] gets page1, page2, and page3. 114 | ~ # Short for your home directory, eg cd ~ will take you home, and rm -r ~ will destroy it. 115 | . # The current directory. 116 | .. # One directory up the tree, eg ls ... 117 | ``` 118 | 119 | ### Pipes and Redirection (You pipe a command to another command, and redirect it to a file.) 120 | 121 | ```bash 122 | {command} > {file} # Redirect output to a file, eg ls > list.txt writes directory to file. 123 | {command} >> {file} # Append output to an existing file, eg cat update >> archive adds update to end of archive. 124 | {command} < {file} # Get input from a file, eg sort < file.txt 125 | {command} < {file1} > {file2} # Get input from file1, and write to file2, eg sort < old.txt > new.txt sorts old.txt and saves as new.txt. 126 | {command} | {command} # Pipe one command to another, eg ls | more gets directory and sends it to more to show it one page at a time. 127 | ``` 128 | 129 | ### System info 130 | 131 | ```bash 132 | date # Show date and time. 133 | df # Check system disk capacity. 134 | du # Check your disk usage and show bytes in each directory. 135 | du -h # Check your disk usage in a human readable format 136 | printenv # Show all environmental variables 137 | uptime # Find out system load. 138 | w # Who's online and what are they doing? 139 | top # Real time processor and memory usage 140 | ``` 141 | 142 | ### DOS and UNIX commands 143 | 144 | ``` 145 | Action DOS UNIX 146 | change directory cd cd 147 | change file protection attrib chmod 148 | compare files comp diff 149 | copy file copy cp 150 | delete file del rm 151 | delete directory rd rmdir 152 | directory list dir ls 153 | edit a file edit pico 154 | environment set printenv 155 | find string in file find grep 156 | help help man 157 | make directory md mkdir 158 | move file move mv 159 | rename file ren mv 160 | show date and time date, time date 161 | show disk space chkdsk df 162 | show file type cat 163 | show file by screens type filename | more more 164 | sort data sort sort 165 | ``` 166 | 167 | -------------------------------------------------------------------------------- /labs/XSEDEUserPortal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/materialsvirtuallab/nano266/0907e8798f5461f1d90cd2edef105fec9c57fb52/labs/XSEDEUserPortal.png -------------------------------------------------------------------------------- /labs/lab1/H2.nw: -------------------------------------------------------------------------------- 1 | memory total 1000 mb 2 | geometry units angstroms 3 | H 0 0 0 4 | H 0 0 0.7414 5 | end 6 | 7 | title "H2 dft optimize" 8 | charge 0 9 | basis 10 | H library "6-31G" 11 | end 12 | dft 13 | mult 1 14 | xc b3lyp 15 | end 16 | task dft optimize 17 | 18 | title "H2 dft freq" 19 | charge 0 20 | basis 21 | H library "6-31G" 22 | end 23 | dft 24 | mult 1 25 | xc b3lyp 26 | end 27 | task dft freq 28 | 29 | title "H2 dft energy" 30 | charge 0 31 | basis 32 | H library "6-311G" 33 | end 34 | dft 35 | mult 1 36 | xc b3lyp 37 | end 38 | task dft energy 39 | -------------------------------------------------------------------------------- /labs/lab1/NANO266 Lab 1 - Calculations on Molecules.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/materialsvirtuallab/nano266/0907e8798f5461f1d90cd2edef105fec9c57fb52/labs/lab1/NANO266 Lab 1 - Calculations on Molecules.pdf -------------------------------------------------------------------------------- /labs/lab1/NH3.nw: -------------------------------------------------------------------------------- 1 | memory total 1000 mb 2 | geometry units angstroms noautoz 3 | N 0.257 -0.363 0.0 4 | H 0.257 0.727 0.0 5 | H 0.771 -0.727 0.89 6 | H 0.771 -0.727 -0.89 7 | end 8 | 9 | title "H3N1 dft optimize" 10 | charge 0 11 | basis 12 | H library "6-31G" 13 | N library "6-31G" 14 | end 15 | dft 16 | mult 1 17 | xc b3lyp 18 | end 19 | task dft optimize 20 | 21 | title "H3N1 dft freq" 22 | charge 0 23 | basis 24 | H library "6-31G" 25 | N library "6-31G" 26 | end 27 | dft 28 | mult 1 29 | xc b3lyp 30 | end 31 | task dft freq 32 | 33 | title "H3N1 dft energy" 34 | charge 0 35 | basis 36 | H library "6-311G" 37 | N library "6-311G" 38 | end 39 | dft 40 | mult 1 41 | xc b3lyp 42 | end 43 | task dft energy 44 | -------------------------------------------------------------------------------- /labs/lab1/README.md: -------------------------------------------------------------------------------- 1 | LaTeX input: mmd-mavrldoc-header 2 | Title: NANO266 Lab 1 - Calculations on Molecules 3 | Author: Shyue Ping Ong 4 | Affiliation: University of California, San Diego 5 | Address: 9500 Gilman Drive, Mail Code 0448, La Jolla, CA 92093-0448 6 | Web: http://www.materialsvirtuallab.org 7 | Base Header Level: 2 8 | LaTeX Mode: mavrldoc 9 | LaTeX input: mmd-mavrldoc-begin-doc 10 | LaTeX footer: mmd-mavrldoc-footer 11 | 12 | # Introduction 13 | 14 | We will begin our lab sessions with a gentle introduction into quantum 15 | mechanical modeling of molecules. For this purpose, we will be using 16 | computational chemistry techniques to study reaction energies, geometries, 17 | vibrational frequencies, etc. We will be using NWChem, an open source quantum 18 | chemistry code. Note that all calculations in this lab are fairly simple and on 19 | very small molecules. So you can run them on a modern desktop or laptop in 20 | serial mode, i.e., you do not actually need access to a supercomputing cluster 21 | to perform these calculations. 22 | 23 | For this lab, we will be studying one of the most important reactions in the 24 | world - the formation of ammonia from nitrogen and hydrogen. Through the 25 | Haber-Bosch process, this is the main industrial reaction for the production of 26 | ammonia, which is then used in the production of fertilizers, etc. It is 27 | estimated that one-third of the Earth's population is sustained by fertilizer 28 | generated from ammonia produced by the Haber process. 29 | 30 | In this lab, almost all analyses will be done using Unix-based command line 31 | tools as it is important for you to learn how to find data efficiently using 32 | these tools. Subsequent labs will provide you with the opportunity to use 33 | Python to automate and analyze data more effectively. You are of course welcome 34 | to write your own scripts if you have the know-how. 35 | 36 | # Initial setup 37 | 38 | It is assumed that you have already followed the instructions in the README.md 39 | in the root labs folder and have access to nwchem, either on XSEDE or on your 40 | own computer or virtual machine. Do a `git pull` 41 | so that you are up to date with 42 | the repo. Also, read through the README.md file in the main labs folder. 43 | Make sure you are in 44 | the lab1 folder by doing: 45 | 46 | ```bash 47 | cd /labs/lab1 48 | ``` 49 | 50 | # Submitting jobs to the Expanse queues 51 | 52 | Expanse uses the Simple Linux Utility for Resource Management (Slurm) job 53 | scheduling system. All supercomputing clusters use a job scheduler of some 54 | sort, e.g., PBS, Sun GridEngine, SLURM. They differ in some features, but work 55 | on the same basic principle. You send jobs to a queue, and they are run 56 | according to some priority system. For more information, you may read the 57 | guide at https://portal.xsede.org/sdsc-expanse 58 | 59 | For the purposes of this lab, a sample *submit_script* has been provided. It is imperative that 60 | you understand how the script works as you will be using this for the rest of 61 | this and the next lab. Read the user guide to understand what each of the 62 | options in the preamble means. You can then modify them to suit your needs. 63 | 64 | To submit the job, just simply run: 65 | 66 | ```bash 67 | sbatch submit_script 68 | ``` 69 | 70 | You may check on the status of your job using the following command: 71 | 72 | ```bash 73 | squeue -u 74 | ``` 75 | 76 | If you make a mistake and need to kill a job for whatever reason. use the 77 | `scancel` command. 78 | 79 | ```bash 80 | scancel 81 | ``` 82 | 83 | # Q1 (10 points): Geometry optimization and energy of H2 84 | 85 | We will start with one of the simplest molecules, diatomic hydrogen. In the 86 | directory, we have provided a sample `H2.nw` input file. First, open up the 87 | input file and understand its structure. Here's a replica of the input file 88 | with comments added. 89 | 90 | memory total 1000 mb # This specifies the memory for the job. 91 | 92 | geometry units angstroms # This section provides a summary of the input 93 | H 0 0 0 # geometry of the molecule. You usually get this 94 | H 0 0 0.7414 # from an experimental source or some chemistry 95 | end # rules 96 | 97 | # This nwchem job comprises three steps - geometry optimization, a frequency 98 | # calculation, and a final energy calculation at a larger basis set. 99 | 100 | title "H2 dft optimize" # This is just the title 101 | charge 0 # We are doing calculations on neutral H2. 102 | basis # Specifies the basis set for each atomic species 103 | H library "6-31G" 104 | end 105 | dft 106 | mult 1 # Spin multiplicity of 1, i.e., singlet state 107 | xc b3lyp # Exchange functional used is B3LYP. 108 | end 109 | task dft optimize # Specify that we want to do a geometry optimization 110 | 111 | title "H2 dft freq" 112 | charge 0 113 | basis 114 | H library "6-31G" # The same basis set must be used for the frequency calculation. 115 | end 116 | dft 117 | mult 1 118 | xc B3LYP # The same functional must be used for the frequency calculation. 119 | end 120 | task dft freq # Specify that we want to do a frequency calculation 121 | 122 | title "H2 dft energy" 123 | charge 0 124 | basis 125 | H library "6-311G" # A larger basis set is used to get better energies end 126 | dft 127 | mult 1 128 | xc b3lyp 129 | end 130 | task dft energy # Specify that we want to do an energy calculation 131 | 132 | Let us first create a separate directory to run the calculation. This makes it 133 | easier for us to clean up after we are done. 134 | 135 | ```bash 136 | mkdir scratch 137 | cd scratch 138 | ``` 139 | 140 | Now, we copy the input file and submit script we want over, and submit the job 141 | 142 | ```bash 143 | cp ../H2.nw . 144 | cp ../submit_script . 145 | sbatch submit_script 146 | ``` 147 | One of the most important line in submit script is the last one: 148 | `nwchem H2.nw > H2.nwout`, which calls nwchem binary to use `H2.nw` as input and pipe the output to a new file, `H2.nwout`. 149 | 150 | After the calculation is finished, check the output through: 151 | 152 | ```bash 153 | grep -A 8 '"geometry" -> ' H2.nwout 154 | ``` 155 | 156 | This command finds all instances that `"geometry" -> ` occurs in `H2.nwout` and 157 | prints out 8 lines after each occurence. The last configuration gives the final geometry of H2. 158 | 159 | To get the final total energy, we can use grep from the command line: 160 | 161 | ```bash 162 | grep "Total DFT energy" H2.nwout 163 | ``` 164 | 165 | The last energy line gives the total energy in **Hartree**. 166 | 167 | For this question, record down the final bond length of H2 in 168 | angstroms and the final total energy in eV. Keep all output files until the end 169 | of the lab. 170 | 171 | # Q2 (10 points): Geometry optimization and energy of N2 172 | 173 | Repeat Q1, but this time with N2. For this question, copy `H2.nw` to 174 | `N2.nw` and then modify the input and submit script accordingly. 175 | 176 | Tip: People can use `vi` for file editing. The basic commands for `vi` is covered in this [link](https://www.guru99.com/the-vi-editor.html). 177 | 178 | The experimental N2 bond length is around 1.1 angstroms. 179 | 180 | Again, record down the final bond length of N2 in angstroms and the 181 | final total energy in eV. 182 | 183 | # Q3 (25 points): Geometry optimization and energy of NH3 184 | 185 | The geometry of ammonia is somewhat more complex, so we have provided an 186 | `NH3.nw` file. Perform the same calculation as in Q1. 187 | 188 | For NH3, record down the final N-H bond lengths, and also, calculate 189 | the angle between the bonds, i.e., the H-N-H bond. Compare the calculated 190 | values with the experimental ones. Cite the source of your experimental data 191 | (e.g., by providing a journal citation or a weblink.) 192 | 193 | Now, modify the file to add polarization functions to the basis set. The 194 | easiest way is to change all "6-31G" to "6-31+G\*" and all "6-311G" to 195 | "6-311+G\*" (technically, this adds diffuse as well as polarization functions, 196 | but we are limited by the choice of basis sets available) Redo the calculation 197 | and determine the bond lengths and angles again. Comment on the difference in 198 | answer between the calculation with and without polarization functions. 199 | 200 | Tip: One of the fastest ways to make changes to a file is using the unix command line tool called *sed*. For example, you can do the following: 201 | 202 | ```bash 203 | sed 's/\(6-31[1]*\)G/\1+G*/' NH3.nw > NH3_polarized.nw 204 | ``` 205 | 206 | which will effectively replace all "6-31G" and "6-311G" with "6-31+G\*" and 207 | "6-311+G\*" in the file "NH3.nw". The first argument to *sed* is the regular 208 | expression. "s/" denotes that this is substitution. "\\\(6-31[1]*\\\)G" 209 | denotes that we want to match all instances of "6-31(1)G", where the second 1 210 | is optional. The brackets denote that we want to store the match before the G 211 | in the first variable. The second half of the expressions "/\\1\+G\*/" denotes 212 | that we want to replace all matches with the stored variable "\\1" followed by 213 | "+G\*". Finally, the last part of the command "> NH3_polarized.nw" means we 214 | want to pipe the output to a new file "NH3_polarized.nw". 215 | 216 | Also record down the final energy of the NH3 molecule in eV. 217 | 218 | # Q4 (25 points): Formation enthalpy of NH3. 219 | 220 | Calculate the formation enthalpy (per molecule) of NH3 in kJ/mol. To 221 | do this, you need to make sure that all calculations are done with the same 222 | basis set. So redo the calculations for Q1 and Q2 with the same basis set with 223 | polarization functions as in Q3. 224 | 225 | Once you completed the calcualtions, you need to extract the thermal 226 | corrections to the enthalpy as well as the energies. For example, 227 | 228 | ```bash 229 | grep "Thermal correction to Enthalpy" H2.nwout 230 | ``` 231 | 232 | Note the units stipulated by NWChem in the output. 233 | 234 | The enthalpy *H* is then given by the energy + the correction. The formation 235 | energy of NH3 is given by the enthalpy change of the following: 236 | 237 | 0.5 N2 + 1.5 H2 -> NH3 238 | 239 | Compare your calculated formation enthalpy with experimental values. The NIST 240 | Chemistry Webbook (http://webbook.nist.gov/chemistry/) is a good source of 241 | data for many common molecules. 242 | 243 | # Q5 (30 points) 244 | 245 | In this question, you will investigate the effect that functional choice and 246 | basis set choice has on the formation enthalpy of NH3. Repeat Q1-Q4, 247 | but now modify your input files to experiment with the HFexch, MP2 and B3LYP 248 | functionals (refer to nwchem documentation on how to do this). You can also 249 | modify the basis set used between 6-31+g\* and 6-311+g\*. 250 | Note that you can either modify the functional or basis set for the geometry 251 | optimiation and frequency step, or the final energy calculation step, or both. 252 | 253 | Discuss the effect of the functional and basis set on the geometries and final 254 | energies. What would be a general recommended strategy for other similar 255 | calculations if you want to perform the calculations as efficiently as possible 256 | while maintaining relatively good accuracy? 257 | 258 | Note that this is an open-ended question, and there is no right or wrong 259 | answer. It is more important for you to understand the tradeoffs and come up 260 | with a good justification for your recommendation. 261 | 262 | # Bonus (10 points) 263 | 264 | The formation enthalpy of ammonia is negative, but generally the reaction does 265 | not take place (or does so very slowly) under normal conditions. That is why 266 | the Haber process is performed under high pressures and temperatures with a 267 | catalyst. The main reason is that N2 is very unreactive. Can you 268 | give a rough estimate of the reaction barrier using a few simple calculations, 269 | assuming that one has to break the N2 triple bond for the reaction? 270 | -------------------------------------------------------------------------------- /labs/lab1/submit_script: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name="nwchem_job" 3 | #SBATCH --output="job.%j.%N.out" 4 | #SBATCH --partition=shared 5 | 6 | # We are doing relatively small jobs. Let's just use a single processor on 7 | # one node. 8 | #SBATCH --nodes=1 9 | #SBATCH --ntasks-per-node=1 10 | 11 | # This tells the queuing system that we want a walltime of 1 hour. For this lab, 12 | # this should be more than sufficient. 13 | #SBATCH -t 01:00:00 14 | 15 | # This sets the account, which is our NANO266 account 16 | #SBATCH -A csd914 17 | 18 | # When running things in the queue, you should add a load in order to ensure 19 | # that the modules you need are available. 20 | module reset 21 | module load cpu/0.15.4 22 | module load intel 23 | module load intel-mpi 24 | module load nwchem 25 | 26 | export ARMCI_NETWORK=MPI-MT 27 | 28 | nwchem H2.nw > H2.nwout 29 | -------------------------------------------------------------------------------- /labs/lab2/Equation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/materialsvirtuallab/nano266/0907e8798f5461f1d90cd2edef105fec9c57fb52/labs/lab2/Equation.png -------------------------------------------------------------------------------- /labs/lab2/NANO266 Lab 2 - Convergence of DFT calculations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/materialsvirtuallab/nano266/0907e8798f5461f1d90cd2edef105fec9c57fb52/labs/lab2/NANO266 Lab 2 - Convergence of DFT calculations.pdf -------------------------------------------------------------------------------- /labs/lab2/README.md: -------------------------------------------------------------------------------- 1 | LaTeX input: mmd-mavrldoc-header 2 | Title: NANO266 Lab 2 - Convergence of DFT calculations 3 | Author: Shyue Ping Ong 4 | Affiliation: University of California, San Diego 5 | Address: 9500 Gilman Drive, Mail Code 0448, La Jolla, CA 92093-0448 6 | Web: http://www.materialsvirtuallab.org 7 | Base Header Level: 2 8 | LaTeX Mode: mavrldoc 9 | LaTeX input: mmd-mavrldoc-begin-doc 10 | LaTeX footer: mmd-mavrldoc-footer 11 | 12 | # Introduction 13 | 14 | In this lab, we will look at convergence issues in bulk calculations 15 | with respect to parameters such as the energy cutoff and k-point grid. We will 16 | be using QuantumEspresso (http://www.quantum-espresso.org/), an open scource 17 | first principles code. 18 | 19 | # Initial setup 20 | 21 | It is assumed that you have already followed the instructions in the README.md 22 | in the root labs folder and have access to PWSCF, either on XSEDE or on your 23 | own computer or virtual machine. Do a `git pull` so that you are up to date with 24 | the repo. Also do a 25 | 26 | ```bash 27 | module load cpu/0.17.3b gcc/10.2.0/npcyll4 28 | 29 | module load python/3.8.12/7zdjza7 30 | ``` 31 | on login node to make sure python is loaded for later analysis. 32 | 33 | Once you are done with the above, make sure you are in the lab2 folder by doing: 34 | 35 | ```bash 36 | cd /labs/lab2 37 | ``` 38 | It is recommended to make a new directory and a new copy of inputs for each question in lab2. 39 | 40 | # Q1 (10 points): Convergence of *absolute* energies with respect to energy cutoff 41 | 42 | Start by looking at the `Si.pw.in.template`, which is a template for the input 43 | file for PWSCF. You should get yourself familiar with the format, and what each 44 | of the sections and parameters mean. Note that some parameters have 45 | placeholders `{xxx}`, which will be replaced by our run script. A PWSCF_IO 46 | tutorial is provided in the tutorials folder of this repo to help you 47 | understand the parameters. You may also wish to consult the QuantumEspresso 48 | online documentation. A quick explanation of the key parameters are given as 49 | follows: 50 | 51 | ``` 52 | &control # This is the control section 53 | calculation = 'scf' , # Specifies that we are doing a static SCF calculation. 54 | outdir = './tmp' , 55 | pseudo_dir = './' , # Location of pseudopotential files. 56 | tprnfor = .True., # Specifies that you want forces to be printed. Used 57 | tstress = .True., # in subsequent questions. 58 | / 59 | &system # Specifies the structure 60 | ibrav = 2, # For PWSCF, ibrav = 2 denotes an FCC cell. 61 | celldm(1) = {alat}, # This specifies the lattice parameter of the fcc cell. 62 | nat = 2, # We have two Si atoms per unit cell. 63 | ntyp = 1, # There is only one type of atom (Si) 64 | ecutwfc = {ecut} , # This stipulates the energy cutoff. 65 | / 66 | &ELECTRONS # These three sections are not used in this particular calculation. 67 | / 68 | &IONS 69 | / 70 | &CELL 71 | / 72 | ATOMIC_SPECIES # Specify the pseudopotential for each species. 73 | Si 28.055 {pseudopotential} 74 | ATOMIC_POSITIONS crystal # Specifies the atomic positions in frac. coords 75 | Si 0.00 0.00 0.00 76 | Si 0.25 0.25 0.25 77 | K_POINTS automatic # Specifies the k-point grid to be used 78 | {k} {k} {k} 0 0 0 79 | ``` 80 | 81 | We have also written a Python script called `run_pw.py` to help you in this 82 | simulation. Again, read through the script to understand what it does. It is 83 | heavily commented to aid you in your understanding. Note that this is a 84 | starting point. *You will need to understand enough to make changes in order to 85 | finish this lab.* A second script called `analyze.py` is provided to help you 86 | compile the results into a csv file, which can be opened with most spreadsheet 87 | programs for analysis. To run the python scripts, you simply need to type 88 | 89 | ```python