Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home > Classes > Physical Chemistry 1 > Set up the equivalent of the math server on your personal computer

Set up the equivalent of the math server on your personal computer

by Jonathan Gutow last modified Sep 25, 2020 03:29 PM

Instructions for installing Python, Jupyter and the python modules/extensions to duplicate the capabilities of the P-Chem Math Server.

1. Install Python

  • Linux
    • You are in luck, Python is installed by default.
    • Do make sure to use your OS update features to make sure you have the latest version.
  • MacOS
    • You are probably in luck, Python is usually installed by default.
    • Check that you have a version 3 install by opening a terminal and typing python3 --version on the command line. You should get a response of "Python 3.X.X" telling you exactly which version.
    • If you do not have a Python 3 installed go to the Python website (https://python.org), download and install the latest version for MacOS.
  • Windows
    • You are not so lucky, but as of last year Windows will at least respond with a pointer to one method of installing Python if you open a terminal and type python3 on the command line. I do not recommend using this installer.
    • To install, go to the Python website (https://python.org), download and install the latest version for Windows.

2. Install Jupyter

  1. Open a terminal and type pip3 install -U jupyter on the command line. This will install or update as appropriate a Jupyter installation on your computer.
  2. Make sure it worked. Type the command jupyter notebook. If it worked your browser should open to a familiar looking Jupyter directory listing. If it does not but lists some links try pasting one of those into your browser.
  3. Congratulations, you now have a plain vanilla install of Python and Jupyter you can use for writing snippets of code.

3. Install the extra packages used in P-Chem

In P-Chem we use:

  • SymPy for symbolic algebra extended with
    • The development version of an extension for manipulating equations called Algebra_with_Sympy.
    • The development version of an extension allowing the typeset display of the Delta symbol (e.g. LaTeX: \bigtriangleupH) called DeltaSymbol.
  • jupyter-datainputtable for data input tables in worksheets.
  • Pandas for convenient manipulation of data sets (computations, plotting and I/O)
  • NumPy  for numerical manipulation of datasets, usually controlled by pandas.
  • matplotlib for plotting, usually controlled by SymPy or Pandas.
  • lmfit for fitting data.

Except for the SymPy extensions which are development versions these should all be easy to install if you successfully installed Jupyter.

Straightforward Installs

On the command line type: pip3 install -U sympy jupyter-datainputtable pandas numpy matplotlib lmfit . Once this works you can move on to the more difficult installation of the SymPy extensions.

Development version extension installs

  • Algebra_with_SymPy.
    • Use the link to go to the Github repository for this tool. Click on the green "Code" menu. Select "Download ZIP".
    • Decompress the ZIP file into the directory where you will be working with your notebooks.
    • Copy or move the file `algebraic_equations.py` out of the unzipped folder into the directory where you will be working.
  • DeltaSymbol.
    • Use the link to go to the Github repository for this tool. Click on the green "Code" menu. Select "Download ZIP".
    • Decompress the ZIP file into the directory where you will be working with your notebooks.
    • Copy or move the file `DeltaSymbol.py` out of the unzipped folder into the directory where you will be working.

You should now have a Jupyter + Python install that works the same as the one on the P-Chem Math Server.

Document Actions
by Jonathan Gutow last modified Sep 25, 2020 03:29 PM