目標設定
[1]でcifファイルをcif2cellを用いてPOSCARファイルに変換した.その際,507142件存在したcifファイルは,308325件がPOSCARファイルに変換され,残りはエラーのため変換されなかった.そこで,生成されたPOSCARファイルパス一覧,またはPOSCARが存在する親ディレクトリのパス一覧を取得し,.npy形式で保存する.
[1] cifファイルをPOSCARファイルに一括変換(ログ)
スクリプトの説明
- get_poscar_existed_path_list.py[2]
- 入力:
- cif/(というディレクトリ名のパス)
- 出力:
- poscar_existed_file_path_list.npy
- poscar_existed_folder_path_list.npy
- 入力:
[2] https://github.com/k-morii-toridai/scripts_get_poscar_existed_path_list.git
詳細ログ
git clone https://github.com/k-morii-toridai/scripts_get_poscar_existed_path_list.git
ls -CF
get_poscar_existed_path_list.ipynb* get_poscar_existed_path_list.py* old/ sample_get_poscar_existed_path_list.py.txt*
cat sample_get_poscar_existed_path_list.py.txt
# how to use:
python3 get_poscar_existed_path_list.py
# exaple:
python3 get_poscar_existed_path_list.py /mnt/ssd_elecom_black_c2c_480G/cif
環境に応じて,cif/というディレクトリのパスを書き換えて以下のように実行する.
python3 get_poscar_existed_path_list.py /mnt/ssd_elecom_black_c2c_480G/cif
len(poscar_folder_path_list): 507142
Now getting poscar folder sub path list!!!
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 507142/507142 [06:40<00:00, 1266.63it/s]
len(poscar_existed_file_path_list): 308325
Both poscar_existed_file_path_list and poscar_existed_folder_path_list were saved as .npy
ls -CF
get_poscar_existed_path_list.ipynb* old/ poscar_existed_folder_path_list.npy*
get_poscar_existed_path_list.py* poscar_existed_file_path_list.npy* sample_get_poscar_existed_path_list.py.txt*