# GaussParse

![Downloads](https://img.shields.io/pypi/dm/GaussParse) ![PyPI](https://img.shields.io/pypi/v/GaussParse) ![License](https://img.shields.io/pypi/l/GaussParse)

GaussParse is a versatile Python package designed for parsing output files generated by Gaussian software, a widely used computational chemistry tool. This package enables users to efficiently extract essential information and perform various analytical tasks directly from Gaussian output files. Whether you need to visualize energy profiles, analyze IRC (Intrinsic Reaction Coordinate) curves, retrieve summary results, or extract molecular orientations, GaussParse provides a streamlined interface to accomplish these tasks with ease.

Key Features:

* Energy Profile Plotting: Visualize and analyze energy profiles directly from Gaussian  output files.

* IRC Curve Plotting: Generate plots of IRC curves to study reaction pathways.
    
* Summary Results Extraction: Extract and summarize key computational results from Gaussian calculations.
    
* Molecular Orientation Analysis: Retrieve detailed information about molecular orientations and configurations.
    
* Publication-Ready Data: Extract molecular orientation data into a Word file formatted for publication as supplementary information.
    
* GaussParse simplifies the process of post-processing Gaussian output, making it an invaluable tool for computational chemists and researchers working in molecular dynamics, quantum chemistry, and related fields.

## Installation

Install this project

```bash
  pip install GaussParse
```
    
## Documentation

Import GaussParse

```python
import GaussParse as gp
```

Available methods

```python
# collect all files

# excel file
xls_file = r'...\\TS2-data.xlsx'
gp.collect_files_from(xls_file, sheet_name="Sheet1")

```

List all the Gaussian log files in an excel file,

![Alt text](https://drive.google.com/uc?export=view&id=1AM39B_p5YQKXObORiOvS_4jJnLwqmFsk)

All the Gaussian log files are saved in a folder:

![Alt text](https://drive.google.com/uc?export=view&id=1AJOlypBssDNATqbu4tyjszC1rUJJlqEZ)

```python
# Save result summary to Excel

# file
gaussian_log = r"...\1,2LO.txt"
# save in excel
gp.result_summary_to_excel(gaussian_log)
```

Results summary as:

![Alt Results summary](https://drive.google.com/uc?export=view&id=1A1aKcymJ9_W0m5L1Q7lnV8QqR1_igFf2)

The data are saved in an excel file:

![Alt Excel](https://drive.google.com/uc?export=view&id=1A8m0DQuJULAtnL7J3802LvmLOuasdben)

```python
# Save input orientation to txt

# folder
gaussian_log = r"...\\acetone-limonene-mechanism-1"
# save in txt
gp.input_orientation_to_txt(gaussian_log)

# Transform input orientation to xyz

# file
gaussian_log = r"...\g09_exp.log"
# save in txt
gp.txt_orientation_to_xyz(gaussian_log)

```

Gaussian log files (saved in a folder)

![Alt text](https://drive.google.com/uc?export=view&id=1AJOlypBssDNATqbu4tyjszC1rUJJlqEZ)

The molecular orientation are saved in a text file (Notepad), 

![Alt text](https://drive.google.com/uc?export=view&id=1AKZW9ZPGlUAHVguPnRrsSTnKrjB3RLO0)

```python
# Save IRC profile

# file path
plt_data = "...\\g09_exp.log"
# save IRC profile
gp.plot_irc_profile(plt_data)

```

IRC profile:

![Alt text](https://drive.google.com/uc?export=view&id=19qDj4djcjeooLGxhvWLfEK_9rgZIsOXA)

```python
# Save energy profile

# file path
plt_data = '...\\energy.xlsx'

# plot energy profile and save it
gp.plot_energy_profile(plt_data)
```   

Load data in an excel file:

![Alt text](https://drive.google.com/uc?export=view&id=19rKQlVjmXW3IPQYryzIUH-pjsCQVH-3e)

Energy profile:

![Alt text](https://drive.google.com/uc?export=view&id=19yZCJRZEzCZOJQesjXFCYAgfyz7kX5vd)

## License

[MIT](https://choosealicense.com/licenses/mit/)


## FAQ

For any question, contact me on [LinkedIn](https://www.linkedin.com/in/sina-gilassi/) 


## Authors

- [@sinagilassi](https://www.github.com/sinagilassi)

