Author: Shehani Wetthasinghe
Last modified: 10/31/2025
Overview: This repository contains Python scripts to generate the systems/input files for Molecular Dynamics simulation in DFTB+ and conduct the analysis/further calculations based on the performed simulations.
Steps to generate the systems/input files:
- Generate the initial configuration containing two graphene sheets with a specified separation along the Z-axis and defined simulation box dimensions in the X and Y directions. This script also calculates the number of water molecules required to achieve the specified water number density for a given box size with the selected single or dual cations: gen_graphenebox/generate_sheets.ipynb
- Translate the system to the center using IQmol
- Add selected single or dual cations with the preferred orientation.
- single cation to the top graphene sheet: gen_graphenebox/add_cations.ipynb
- dual cations to the top graphene sheet: gen_graphenebox/add_dual_cations.ipynb
- one cation to the top graphene sheet and the second one to the bottom graphene sheet:gen_graphenebox/add_dual_cations_inv.ipynb
- Add the calculated number of water molecules (given in step1) to the system using Spartan
- Generate an initial DFTB+ input file containing frozen graphene sheets and cation(s) to facilitate the construction of multiple systems with distinct water molecule orientations: gen_infile_frozen.pygen_graphenebox/gen_infile_frozen.py
- Generate multiple input files for thermalization simultaneously using the distinct water molecule orientations from step 5: gen_graphenebox/gen_sim_therm.py
- Analyze the thermalization statistics to confirm that the system has reached proper thermal equilibrium: gen_graphenebox/therm_analysis.py
- Generate multiple input files for molecular dynamics simulations simultaneously using the final geometry extracted from the thermalization step: gen_graphenebox/gen_sim.py
- Check for thermalization statistics at the end of dynamics simulations.
Steps to analyze MD data:
- Identify single or dual OH- in each MD step for single cation or dual cation systems.
- single cation system: md_analysis/oh_identifier_single.py
- dual cation system: md_analysis/oh_identifier_dual.py
- Calculate the diffusion coefficient(s)
- single cation system: md_analysis/individual_based_newD_single.ipynb
- dual cation system: md_analysis/individual_based_newD_dual.ipynb
