Skip to content

Commit

Permalink
convert to kJ/mol
Browse files Browse the repository at this point in the history
  • Loading branch information
rkronberg committed Apr 19, 2024
1 parent 1d88ac5 commit b61bb75
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Part-1-NEB/Part-1-NEB.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**Then, view a movie of the minimum energy path alongside the optimized energy profile of the proton transfer (in meV):**"
"**Then, view a movie of the minimum energy path alongside the optimized energy profile of the proton transfer (in kJ/mol):**"
]
},
{
Expand All @@ -305,13 +305,13 @@
" plt.plot(energies, 'o-')\n",
" plt.plot(idx, energies[idx], 'o', markersize=10)\n",
" plt.xlabel('NEB image')\n",
" plt.ylabel('Energy (meV)')\n",
" plt.ylabel('Energy (kJ/mol)')\n",
" plt.tight_layout()\n",
" return plt.show()\n",
"\n",
"# Read the energy of each image, convert to meV and shift IS energy to 0\n",
"# Read the energy of each image, convert to kJ/mol and shift IS energy to 0\n",
"energies = np.loadtxt('energy-pbe.txt')\n",
"energies = 27211.38*(energies-energies[0])\n",
"energies = 2625.5*(energies-energies[0])\n",
"\n",
"# Create a list containing the structure of each optimized NEB image\n",
"images = []\n",
Expand All @@ -331,7 +331,7 @@
"source": [
"* Which image number corresponds to the TS?\n",
"* What can you say based on the reaction barrier height? What about the reaction energy?\n",
" * Hint: The thermal energy at room temperature is about $k_\\mathrm{B}T\\approx25$ meV"
" * Hint: The thermal energy at room temperature is about $k_\\mathrm{B}T\\approx2.5$ kJ/mol"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions Part-3-Hybrid/Part-3-Hybrid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
"id": "dc86be5e-b3cb-46b8-ac8e-0ca21be94c0e",
"metadata": {},
"source": [
"**Then, plot the PBE0 energy profile together with the PBE profile (in meV):**"
"**Then, plot the PBE0 energy profile together with the PBE profile (in kJ/mol):**"
]
},
{
Expand All @@ -282,16 +282,16 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"# Read the energy of each image, convert to meV and shift IS energy to 0\n",
"# Read the energy of each image, convert to kJ/mol and shift IS energy to 0\n",
"energy_pbe = np.loadtxt('../Part-1-NEB/energy-pbe.txt')\n",
"energy_pbe = 27211.38*(energy_pbe-energy_pbe[0])\n",
"energy_pbe = 2625.5*(energy_pbe-energy_pbe[0])\n",
"energy_pbe0 = np.loadtxt('energy-pbe0.txt')\n",
"energy_pbe0 = 27211.38*(energy_pbe0-energy_pbe0[0])\n",
"energy_pbe0 = 2625.5*(energy_pbe0-energy_pbe0[0])\n",
"\n",
"plt.plot(energy_pbe, 'o-', label='PBE')\n",
"plt.plot(energy_pbe0, 'o-', label='PBE0')\n",
"plt.xlabel('NEB image')\n",
"plt.ylabel('Energy (meV)')\n",
"plt.ylabel('Energy (kJ/mol)')\n",
"plt.legend()\n",
"plt.tight_layout()\n",
"plt.show()"
Expand All @@ -318,7 +318,7 @@
"metadata": {},
"outputs": [],
"source": [
"kT = 25.7 # Boltzmann's constant times 298 K in units of meV\n",
"kT = 2.479 # Boltzmann's constant times 298 K in units of kJ/mol\n",
"K = np.exp(-energy_pbe0[-1]/kT)\n",
"print(K)"
]
Expand Down
6 changes: 3 additions & 3 deletions Part-4-AIMD/Part-4-AIMD.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@
"metadata": {},
"outputs": [],
"source": [
"# Thermal energy at room temperature in meV\n",
"kT = 25.7\n",
"# Thermal energy at room temperature in kJ/mol\n",
"kT = 2.479\n",
"\n",
"# Initialize array for reaction coordinate\n",
"rc = np.zeros(len(trj))\n",
Expand Down Expand Up @@ -418,7 +418,7 @@
"# Helmholtz free energy profile\n",
"ax[2].plot(rxn, energy)\n",
"ax[2].set_xlabel('Reaction coordinate (Å)')\n",
"ax[2].set_ylabel('Free energy (meV)')\n",
"ax[2].set_ylabel('Free energy (kJ/mol)')\n",
"\n",
"plt.tight_layout()\n",
"plt.show()"
Expand Down

0 comments on commit b61bb75

Please sign in to comment.