0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

元素種C,Oを含むPOSCARファイルのパスのみ抽出(ログ)

Last updated at Posted at 2023-11-24

目標設定

元素種C,Oを含むPOSCARファイルのパスのみを抽出する.

スクリプトの説明

  • get_C_O_existed_poscar_abs_path_list.py[1]
    • 入力:poscar_existed_file_path_list.npy
    • 出力:C_O_existed_poscar_abs_path_list.npy

[1] https://github.com/k-morii-toridai/scripts_get_C_O_existed_poscar_abs_path_list.git

流れ

以下の順にスクリプトを実行する.

  1. get_poscar_existed_path_list.py[1]
  2. get_C_O_existed_poscar_abs_path_list.py[1]

詳細ログ

pwd

/mnt/ssd_elecom_black_c2c_480G/scripts

sudo git clone https://github.com/k-morii-toridai/scripts_get_C_O_existed_poscar_abs_path_list.git

[sudo] password for morii-k:
Cloning into 'scripts_get_C_O_existed_poscar_abs_path_list'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (6/6), 1.68 MiB | 7.63 MiB/s, done.

ls -CF

get_C_O_existed_poscar_abs_path_list.ipynb* get_poscar_existed_path_list.py*
get_C_O_existed_poscar_abs_path_list.py* 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

time 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 [07:09<00:00, 1181.95it/s]
len(poscar_existed_file_path_list): 308325
Both poscar_existed_file_path_list and poscar_existed_folder_path_list were saved as .npy

real 7m37.918s
user 5m40.155s
sys 24m50.178s

ls -CF

get_C_O_existed_poscar_abs_path_list.ipynb* get_poscar_existed_path_list.py* poscar_existed_folder_path_list.npy*
get_C_O_existed_poscar_abs_path_list.py* poscar_existed_file_path_list.npy* sample_get_poscar_existed_path_list.py.txt*

time python3 get_C_O_existed_poscar_abs_path_list.py

len(poscar_abs_path_list_loaded): 308325
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 308325/308325 [11:19<00:00, 453.72it/s]
len(C_O_existed_poscar_abs_path_list): 205733
C_O_existed_poscar_abs_path_list was saved as C_O_existed_poscar_abs_path_list.npy!!!

real 11m27.497s
user 4m23.311s
sys 10m19.401s

これより,POSCARファイル308325件の内,元素種CまたはOを含むものは,205733件であることが分かった.

ls -CF

C_O_existed_poscar_abs_path_list.npy* get_poscar_existed_path_list.py* sample_get_poscar_existed_path_list.py.txt*
get_C_O_existed_poscar_abs_path_list.ipynb* poscar_existed_file_path_list.npy*
get_C_O_existed_poscar_abs_path_list.py* poscar_existed_folder_path_list.npy*

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?