Welcome to the Python in Chemistry Blog

Posted in: Python Basics

We will be using the Jupyter Notebooks app to use Python notebooks which we use to teach coding alongside chemistry content. The resources here are designed for different experience levels; some notebooks and resources are for absolute beginners, others more advanced, and we will also have PhD students sharing their work too – all of it will be interactive.

The resources shared here are designed to extend what we currently cover in our first and second year computational chemistry labs, for those of you who haven’t done CH10009, CH10193 or CH20023 we will share similar resources designed to help you learn to code.

If you aren’t a chemist the resources contain enough information for you to attempt to work it through, we use chemistry to set in some context for coding in Python, but teaching some coding is one of our primary aims.

If you have no experience of Python welcome, the first thing you need to do is download Anaconda – an application which runs the Jupyter notebooks.

You can download Anaconda for Windows, OSX and Linux here

You need to install this and then open the Jupyter notebook application. This will open a window in your chosen internet browser, and open on a page which is a file navigator. Jupyter notebooks are appended with the file type .ipynb, you can’t open these files by double clicking on them, instead you need to have them downloaded and saved to your computer, and open them from the navigator window in your web browser.

Jupyter's interface with file structure open in a web browser

You can open a file by clicking on the .ipynb files – in this case you can tell I’ve opened the ‘Gas Laws tutorial.ipynb’ file because it is highlighted in green. You can open a new notebook by selecting ‘New’ in the top right hand corner of the screen. It is essential that you download resources to your own computer and open them after opening Anaconda.

a project in Jupyter highlighting an opened file in green

At the moment we haven’t shared any notebooks for you to open, but when we do share them they will look a little bit like this one shared below. In the next post we will share our first resource until then if you have any questions or problems please leave a comment (or just leave a comment to say hello!) we will do our best to answer you.

An example Jupyter Python notebook

Posted in: Python Basics


  • (we won't publish this)

Write a response