A safe and interactive Bash script to delete multiple file patterns across various directories and/or subdirectories.
- Accepts multiple directories as input
- Accepts multiple file name patterns (e.g.,
CHG*,*.xml,OUTCAR) - Option to include or exclude subdirectories
- Shows directory size and top 5 largest files before deletion
- Lists all files that match your patterns before asking for final confirmation
- Requires a single final confirmation (
delete) to proceed - Measures and displays execution time
Clone the repository or download the script
bash delete_vasp_files.sh
⚠️ Use with caution. This script permanently deletes files after your confirmation.
This script calculates the exciton binding energy (Eexb):
The script prompts the user to input:
- Electron effective mass (mₑ) in units of m₀
- Hole effective mass (mₕ) in units of m₀
- In-plane dielectric constant (εin)
- Out-of-plane dielectric constant (εout) It then calculates:
- Reduced exciton mass:
[ \mu = \frac{m_e \cdot m_h}{m_e + m_h} ] - Average dielectric constant:
[ \epsilon_{\text{avg}} = \frac{\epsilon_{\text{in}} + \epsilon_{\text{out}}}{2} ] - Exciton binding energy using the hydrogenic model:
[ E_{\text{exb}} = \frac{13.6057 \cdot \mu}{\epsilon_{\text{avg}}^2} ]
Run the script in any Python 3 environment:
python exciton_binding_energy.pyThis script is based on the model and methodology described in:
ACS Omega 2021, 6 (17), 11545–11555
DOI: 10.1021/acsomega.1c00734