S SmartDocs
Chuỗi bài: AI for Chemistry python 20 dòng · Cập nhật 2024-06-25

cosmo.py

AI for Chemistry/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

AI for Chemistry python Cập nhật 2023-11-13

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 →
AI for Chemistry python Cập nhật 2024-03-20

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 →
AI for Chemistry python Cập nhật 2024-06-27

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 →
AI for Chemistry python Cập nhật 2024-06-27

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 →
AI for Chemistry python Cập nhật 2024-04-26

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 →
AI for Chemistry python Cập nhật 2024-03-20

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 →