Jump to content

ThirdYearMgOExpt-1415

From ChemWiki
(Redirected from ThirdYearMgOExpt-1314)

Thermal Expansion of MgO

This is the welcome page for the computational experiment about the thermal expansion of MgO, part of the third year computational chemistry lab.

The computational experiment will be from 10:00 to 17:00 on Monday, Tuesday, Thursday and Friday. During these 4 days demonstrators will be available to answer all your questions.

There is an introductory lecture to the lab at 10:00 on the Start Date of your session. You will received and email with more details.

The deadline is at 12:00 noon on Wed of the second week following the week of the experiment.

Work submitted late will be penalised according to the Late Submission Policy.

There is a link set up on Blackboard for submitting the report in PDF and the Jupyter notebooks as a .zip folder in 3rd Year Chemistry Laboratories / Y3C Third Year Computational Laboratory/.

In each exercise there are a number questions and sub-questions. The final report will be expected to contain answers to these questions.

Questions related to this computational experiment can be directed to the demonstrators, Dr Giuseppe Mallia and Prof. Nicholas Harrison.

Introduction

The properties of materials (solids, liquids, gasses) are a statistical average over the many different energy states of the molecules making up the material.

The vibrational free energy of H2 can be computed analytically by summing over the harmonic vibrations of the molecule.

This cannot be done by hand for a real material containing many atoms.


The aim of this experiment is to predict how a material expands, when heated up. A simple model,

based on interatomic potentials, will be adopted to describe the interactions in a MgO crystal.

You will compare two different approximations to study the thermal expansion of MgO. In the former

approximation, you will calculate the vibrational energy levels, which will then be used to compute the free energy.


In the latter approximation, you will use a technique called molecular dynamics that

will essentially reproduce vibrations as motions of the atoms.

The simulations will be performed by using the interatomic potential program gulp though a

jupyter-notebook.

Instructions

You will use Microsoft Azure Lab Windows virtual machine, where everything is installed.

Below there are some steps that are necessary only in case of local installation (check with demonstrators). Move to next session.

For Windows users

Alternatively, in order to run this computational experiment, you can install anaconda on your Windows computer.

- Download the zip file from blackboard.

- Please avoid to save the zip file in a folder tree, where a folder has a name with one or more space (" ").

- Extract the files.

- Run Anaconda

- Run Jupyter Notebook

- Run the main.ipynb

- Follow the instructions in the notebook.

For Mac users (please get in touch with a demonstrator) - the installation depends on your Mac version

1. Open a terminal and type the command below:

2. sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" (https://brew.sh/)

3. brew install gcc (https://formulae.brew.sh/formula/gcc#default)

4.1 conda create --name MgOexp python=3.7.2

4.2 conda activate MgOexp

4.3 jupyter-notebook

Previous years related contents

- Maths and Physics for Chemist

- Thermodynamics

- Statistical thermodynamics

- Python

Good skills on python is not a requirement. All the scripts are written in a way where you only need to write an input value (e.g. Temperature = 300 K). However, feel free to edit and play with the scripts.

New contents

- Phonons and reciprocal space

- Quasi-Harmonic approximation

- Molecular dynamics

Submission

The report will be submitted as a PDF document via Turnit in Blackboard.

Additionally, all the files (including the lab notebooks) will be also submitted via Blackboard as a .zip folder.

Write up

The report structure will consist of three sections:

  • Introduction/Summary (Half-page)
  • Questions & answers (No page limit)
  • Conclusions (Half-page)

Tips to write a report:

  • The golden rule: Aim for clarity
    • Structured statements that flow in a logical manner.
    • Good use of diagrams and appropriate level of theory.
    • Careful choice of content.
  • Keep your language clear and simple.
  • Label all tables and figures. Labels should be self-contained, which means that tables and figures should be interpretable by themself.
  • Appropriate referencing of figures and tables.
  • Cite previous works (with an accepted citation style) whenever is appropriate.

Introduction/Summary:

  • The purpose of the Introduction/Summary is to put the reader in the context of the experiment and to explain how the experiment was carried in the lab. It may contain a brief review of previous research, why the research was undertaken, an explanation of the techniques and why they are used and why it is important in a broader context.

Questions & Answers:

  • There are a number of questions in the lab script that has to be answered in this section of the report.
  • Depending on the nature of the question, it might be appropriate to use figures or tables to give a proper answer.
  • It is highly encourage to rationalise the answers.

Conclusions:

  • The Conclusions gives a general description of the results and findings and it should be related back to the Introduction. If appropriate, suggest improvements or additional experiments.

Suggested Time Frame

Try to finish all the calculations by Thursday. All the calculations takes seconds, however, it takes time to analyse the results and understand all the new concepts that you will learn in this lab.

Mark Scheme

The break-down for the marks for this lab are as follows:

Introduction/Summary 20%
Questions & Answers 60%
Conclusions 20%



Plagiarism

Submissions are checked for plagiarism. External images may be used if correctly cited, but it's always better to create your own.

Demonstrators

The demonstrators will be available via Microsoft team channel. Feel free to contact them.

Related literature

How Chemistry and Physics meet in the Solid State by Roald Hoffman

Introduction to the theory of Lattice Dynamics

Introduction to Lattice Dynamics. Dove, Martin T. (ebook available in the library)


Alternative instructions for Microsoft Azure Labs Linux virtual machine

Read this section only if recommended by the demonstrators.

The following steps are based on ssh connection to a Linux virtual machine.

1. Click on the link in the email with subject "Register for Lab - IC_Chemistry_yr3_UK" or ""Register for Lab - IC_Chemistry_Linux_UK"

2. Start the virtual machine.

3. Click on the vertical three dots (bottom right of the virtual machine box) and rest the password.

4. Click on the computer icon at the left of the three vertical dot.

5. Copy the content of the box that will appear

  For instance: 
  ssh -p 12345 chemistry@ml-lab-123456789.uksouth.cloudapp.azure.com

6. Modify the previous line by adding "-X" after ssh and "-L 8888:localhost:8888"

  For instance:
  ssh -X -p 12345 chemistry@ml-lab-123456789.uksouth.cloudapp.azure.com -L 8888:localhost:8888

7. On Windows open the prompt command and type the ssh line; on Mac/Linux open a terminal and type the ssh line.

8. Type "yes" to answer the following question:

  Are you sure you want to continue connecting (yes/no/[fingerprint])?

9. Type your password, when prompted (the password will not be displayed for security reason) once done, press "Enter".

10. After that a prompt similar to the following one will appear

   chemistry@ML-RefVm-123456:~$

type the following and press "Enter"

   conda activate

the prompt will change into:

   (base) chemistry@ML-RefVm-670265:~$

11. Type the following and press "Enter"

   jupyter-notebook --no-browser

A message similar to the following one will be printed:

   To access the notebook, open this file in a browser:
       file:///home/chemistry/.local/share/jupyter/runtime/nbserver-4021-open.html
   Or copy and paste one of these URLs:
       http://localhost:8888/?token=123456789123456789123456789123456789123456789123
    or http://127.0.0.1:8888/?token=123456789123456789123456789123456789123456789123


12. Open a tab in your browser and type last line printed above a jupyter-notebook page will be opened.

13. Go in the folder "yr3", then "MgO-lab-master", then click on "main.ipynb" to start your computational experiment

14. Select "Python [conda env:py37_default]" if prompted to choose a kernel.

15. To transfer the file use https://winscp.net/eng/docs/free_ftp_client_for_windows or scp on Mac/Linux.

Additional instructions for the manual installation of the gulp program and the setup of ASE on your personal computer

Read this section only if recommended by the demonstrators.

The experiment uses Gulp for all the calculations. Jupyter Notebook and python is used as interface between the user and Gulp.

To install the lab in Windows:

1. If you do have anaconda installed you can go to point 3.

2. Download and install Anaconda

3. Download the ASE package.

4. Download GULP from the website. Download version 4.3 which has the executable for Windows ready to download.

5. Copy Gulp to c:\gulp-4.3.

6. Sets a system environment variable for GULP_LIB to C:\gulp-4.3\Libraries and add to C:\gulp-4.3\Exe to the PATH system variable. How do I set or change the PATH system variable?

7. Copy the ionic.lib file that you will find in the library folder you downloaded to the $GULP_LIB folder

To install the lab in Linux/Unix:

1. If you do have conda installed you can go to point 6.

2. Open a terminal and create a new conda environment: conda create -n TE_MgO

3. Activate the environment: conda activate TE_MgO

4. Install ASE: conda install -c conda-forge ase=3.19.1

5. Install Jupyter: conda install -c anaconda notebook

6. Download GULP from the website. The version 5.0 only has the source files. Download this one if you feel comfortable with compiling it by yourself. Otherwise, download version 4.3 which has the executable ready to download.

7. Set $GULP_LIB and $ASE_GULP_COMMAND in your ~/.bashrc or ~/.bash_profile (see this page for more information)

8. Copy the ionic.lib file that you will find in the library folder you downloaded to the $GULP_LIB folder