I'm excited to share a helpful tool I've developed: a Python script designed to extract zero point energy (ZPE) and free energy data from Gaussian output files.
With this script, you can easily access and utilize essential energy information from your Gaussian calculations.
Below, you'll find the script for your convenience:
import os
import sys
# Function to process the file
def process_file(filename):
norm_term_counter = 0
with open(filename, 'r+') as logfile:
for line in logfile:
if 'Sum of electronic and zero-point Energies' in line:
L1 = line.split()
print("Sum of electronic and zero-point Energies:" + L1[-1])
if 'Sum of electronic and thermal Free Energies' in line:
L2 = line.split()
print("Sum of electronic and thermal Free Energies:" + L2[-1])
# Function to wait for user input
def wait_for_input():
input("Press Enter to exit...")
# Main code
if __name__ == "__main__":
# Ask user for file name
filename = input("Enter the filename: ")
# Process the file
process_file(filename)
# Wait for user input to exit
wait_for_input()
领取专属 10元无门槛券
私享最新 技术干货