Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

shmsi/pesplot

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PESPLOT

The purpose of this script is to plot PES (Potential Energy Surface) plots with variety of configurations and color options. The script is platform independent meaning that you should be able to use it on any machine.

Github All Releases

Requirements

Anyone who has Python 3 and matplotlib installed should be able to use the script. After installing Python 3 use pip to install matplotlib.

pip install matplotlib

Input File

The script supports .json files at the moment. Support for excel files will be added in future.

Example input files look like:

{
  "colors": [
    "red",
    "green"
  ],
  "data": {
    "CO_(2)+EDA": [0.0, 2.0],
    "L1_(EDA)": [-7.1, -3.1],
    "TS1_(EDA)": [-5.7, -2.1],
    "L2_(EDA)": [-9.2, -3.2],
    "TS2_(EDA)": [23.6, 35.6],
    "P_(EDA)": [-9.5, -4.5]
  }
}

Note: To create subscripted text use notation prefix_(subscript)_suffix. For instance for L1EDA the notation would be L1_(EDA). This will make it appear subscripted on the plot.

Configurations

The following can be configured:

  • Line width
  • Line color
  • Dashed line width
  • Text size
  • Plot style

Examples on how to configure will be given in the next section.

Examples

Provide data file to the script. Provide absolute path to a data file. That way the script will always work.

python data/data_one_route.json

localImage

This will plot with default argument.

  • Configure with line width and text size.

      python data/data_one_route.json --line-width 5 --text-size 7
    

localImage

  • Plot multiple routes

     python pesplot.py data/data_four_routes.json --line-width 3 --text-size 11
    

localImage

  • If you need a plot without text use arguments --no-values and --no-lables

     python pesplot.py data/data_two_routes.json --line-width 10 --line-length 2 --style  classic --no-values --no-labels
    

LocalImage

Syles

pesplot supports different matplotlib styles. To choose a specific style use argument --style <STYLE_NAME>. To use list of style use command python pesplot.py --help and scroll to the end of the page.

Limitations

This project is in its early development phase. Therefore there are some limitations to what it can do.

The limitations are:

  • If data points are close to each other, it is likely that the plot will have overlapping text
  • The font size does not scale as image size scales.
  • Color options are provided in an input file. However it would be easier if random colors are assigned to routes on the plot.
  • Json format might be hard to use for many. Excel files need to be supported.

Contact

About

Plot PES diagrams for chemical reactions

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.