cosmo.py
AI for Chemistry/code/2025_COSMO/data/s-profiles-all/check/cosmo.py
import os
# path
folder_path = r"D:\COSMOSAC-master\COSMO\COSMO_all\s-profiles-all\check\List-9"
# just keep the .cosmo file
file_extensions = [".gjf", ".log", ".chk"]
# all files
for root, dirs, files in os.walk(folder_path):
for file in files:
file_path = os.path.join(root, file)
# check
if any(file.endswith(ext) for ext in file_extensions):
try:
# remove
os.remove(file_path)
print(f"Deleted: {file_path}")
except Exception as e:
print(f"Error deleting {file_path}: {e}")
Bài viết liên quan
cosmo_to_s_profile_ver_1.1.1.py
cosmo_to_s_profile_ver_1.1.1.py — python source code from the AI for Chemistry learning materials (AI for Chemistry/2025_COSMO/data/s-profiles-all/List-9/cosmo_to_s_profile_ver_1.1.1.py).
Đọc bài viết →area.py
area.py — python source code from the AI for Chemistry learning materials (AI for Chemistry/2025_COSMO/data/s-profiles-all/area_volume-org/area.py).
Đọc bài viết →area_volume.py
area_volume.py — python source code from the AI for Chemistry learning materials (AI for Chemistry/2025_COSMO/data/s-profiles-all/area_volume-org/area_volume.py).
Đọc bài viết →volume.py
volume.py — python source code from the AI for Chemistry learning materials (AI for Chemistry/2025_COSMO/data/s-profiles-all/area_volume-org/volume.py).
Đọc bài viết →check_final_CID.py
check_final_CID.py — python source code from the AI for Chemistry learning materials (AI for Chemistry/2025_COSMO/data/s-profiles-all/check/check_final_CID.py).
Đọc bài viết →check_for_CID.py
check_for_CID.py — python source code from the AI for Chemistry learning materials (AI for Chemistry/2025_COSMO/data/s-profiles-all/check/check_for_CID.py).
Đọc bài viết →