Skip to content

michaeltitusgroup/pyTCPlotter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

pyTCPlotter

Michael S. Titus, Austin Hernandez, Victoria Tucker, Akhil Bejjipurapu, School of Materials Engineering, Purdue University, West Lafayette, IN 47907

calculate, plot, and save predictions from Thermo-Calc easily and efficiently

This code will work on the Purdue RCAC Bell or Negishi cluster.

Please follow one of the three methods to install the software:

1) Create anaconda environment and install packages manually.(Most Preffered. Method)

1a) open a jupyter notebook session:

  • go to: https://www.rcac.purdue.edu/compute/bell or https://www.rcac.purdue.edu/compute/negishi

  • login using your Purdue credentials

    • Gateway(Launch) => Top(Interactive Apps) => jupyter

    • To Launch Jupyter Notebook session on bell Cluster, select the queue from drop-down menu, Number of hours (up to user) and Processor Cores requested (choose 64)

    • Click launch, this starts a Jupyter Notebook session , then click on connect to jupyter

  • open up a new terminal window by selecting "New" -> "Terminal" with the dropdown menu in the top right module load anaconda/2022.10-py39

conda create --name tcplotter24a

conda activate tcplotter24a

conda install pip=9.0.1 #check versioning

conda install matplotlib ipython jupyter pandas

1b) Clone the respository:

  • enter: $ git clone https://github.itap.purdue.edu/michaeltitusgroup/pyTCPlotter

  • move into the directory: $ cd pyTCPlotter

pip install -r requirements.txt

ipython kernel install --user --name tcplotter24a --display-name "tcplotter24a"

1c) Open the workflow notebook:

  • return to the Jupyter notebook tab, enter into the tcplotter folder

  • open the tc_plotter_workflow.ipynb notebook

  • after opening your notebook or python code, from the top bar, select "Kernel" -> "Change kernel" -> "tcplotter24a"

  • enjoy!

2) Automatically install a conda environment

2a) open a jupyter notebook session:

  • go to: https://www.rcac.purdue.edu/compute/bell or https://www.rcac.purdue.edu/compute/negishi

  • login using your Purdue credentials

    • Gateway(Launch) => Top(Interactive Apps) => jupyter

    • To Launch Jupyter Notebook session on bell Cluster, select the queue from drop-down menu, Number of hours (up to user) and Processor Cores requested (choose 64)

    • Click launch, this starts a Jupyter Notebook session , then click on connect to jupyter

  • open up a new terminal window by selecting "New" -> "Terminal" with the dropdown menu in the top right

2b) Clone the respository:

  • enter: $ git clone https://github.itap.purdue.edu/michaeltitusgroup/pyTCPlotter

  • move into the directory: $ cd pyTCPlotter

2c) Change the setup file prefix to your username:

  • enter: sed -i 's/\[USERNAME\]/YourUsername/g' environment.yml

2d) Make and activate the anaconda environment and ipython kernel:

  • enter: $ conda env create -f environment.yml

  • source the new environment: $ conda activate tcplotter24a

  • enter: $ ipython kernel install --user --name tcplotter24a --display-name "tcplotter24a"

2e) Open the workflow notebook:

  • return to the Jupyter notebook tab, enter into the tcplotter folder

  • open the tc_plotter_workflow.ipynb notebook

  • after opening your notebook or python code, from the top bar, select "Kernel" -> "Change kernel" -> "tcplotter24a"

  • enjoy!

3) Install packages without anaconda environment (not recommended):

3a) Open up Bell terminal:

3b) Load the correct modules version:

  • Type in:

$ module load anaconda

  • To make sure this worked, you can type:

$ pip --version

It should return the following line:

$ pip 9.0.1 from /apps/cent7/anaconda/5.1.0-py36-new/lib/python3.6/site-packages (python 3.6)

This means that the python 3.6 version and pip 9.0.1 is currently running.

3c) install the required python modules:

$ pip install --user /depot/coe-mse/apps/thermocalc/2024a/SDK/TC-Python/TC_Python-2024.1.30332-76-py3-none-any.whl

Install ternary-python module:

$ pip install --user python-ternary

Move the directory (as there is another commonly-used module named ternary):

$ mv .local/lib/python3.6/site-packages/ternary .local/lib/python3.6/site-packages/ternary_plotter

3d) Update your PYTHONPATH variable to include the local python3.6 libraries:

$ echo 'export PYTHONPATH=$PYTHONPATH:/home/<username>/.local/lib/python3.6/site-packages' >> ~/.bash_profile

where username is your Purdue career account name

3e) re-source your bash profile:

$ source .bash_profile

3f) test the installation by typing:

$ python import tc_python

If you receive no errors, then you are good to go!

3g) Clone the respository:

$ git clone https://github.itap.purdue.edu/michaeltitusgroup/pyTCPlotter

3h) open a jupyter notebook session and begin:

go to: https://notebook.brown.rcac.purdue.edu/

You should now be setup!

Please commit and push any changes made to methods in the tc_python_plotter.py file.

Funding Acknowledgements:

  • NSF DMREF DMR2119619