Subsections of Data format

Subsections of Common data

Initial and optimized structure data

Initial and optimized structure data are saved in init_struc_data.pkl and opt_struc_data.pkl, respectively. pymatgen library is required to analyze these data files.

Data format

  • type: dict
    • key: structure ID
    • value: structure data
  • string form
    • {0: Structure Summary …,
      1: Structure Summary …,
      …}
  • structure data format

How to access

import pickle
with open('init_struc_data.pkl', 'rb') as f:
   init_struc_data = pickle.load(f)
with open('opt_struc_data.pkl', 'rb') as f:
   opt_struc_data = pickle.load(f)

# struc_step_data[ID]
#
#

# ---------- structure step data of ID 0
cid = 0      # ID
init_struc_data[cid]    # to show initial structure of ID 0
Structure Summary
Lattice
    abc : 5.727301 5.727301 4.405757
 angles : 90.0 90.0 90.0
 volume : 144.5175386563631
      A : 5.727301 0.0 0.0
      B : 0.0 5.727301 0.0
      C : 0.0 0.0 4.405757
PeriodicSite: Si (0.2506, 5.4767, 1.1014) [0.0438, 0.9562, 0.2500]
PeriodicSite: Si (2.6130, 3.1143, 1.1014) [0.4562, 0.5438, 0.2500]
PeriodicSite: Si (3.1143, 0.2506, 1.1014) [0.5438, 0.0438, 0.2500]
PeriodicSite: Si (5.4767, 2.6130, 1.1014) [0.9562, 0.4562, 0.2500]
PeriodicSite: Si (5.4767, 0.2506, 3.3043) [0.9562, 0.0438, 0.7500]
PeriodicSite: Si (3.1143, 2.6130, 3.3043) [0.5438, 0.4562, 0.7500]
PeriodicSite: Si (2.6130, 5.4767, 3.3043) [0.4562, 0.9562, 0.7500]
PeriodicSite: Si (0.2506, 3.1143, 3.3043) [0.0438, 0.5438, 0.7500]

Result data

Common result data such as space group, energies, etc. are saved in rslt_data.pkl. pandas library is required to analyze this data file.

Data format

  • type: pandas.core.frame.DataFrame
    • row lable: structure ID
  • string form
    • see blow

How to access

import pickle
with open('rslt_data.pkl', 'rb') as f:
   rslt_data = pickle.load(f)


# ---------- sort by Energy
# top 5
rslt_data.sort_values(by=['E_eV_atom']).head(5)
   Spg_num Spg_sym  Spg_num_opt Spg_sym_opt  E_eV_atom  Magmom      Opt
1       98  I4_122           12        C2/m  -3.978441     NaN  not_yet
3       36  Cmc2_1           36      Cmc2_1  -3.520306     NaN  not_yet
2       16    P222           16        P222  -3.348616     NaN  not_yet
4       36  Cmc2_1            4        P2_1  -3.304168     NaN  not_yet
0      139  I4/mmm          139      I4/mmm  -3.000850     NaN     done

Random Search (RS)

Table of contents

    Evolutionary algorithm (EA)

    Table of contents

      Bayesian Optimization (BO)

      Table of contents

        LAQA

        Table of contents

          Subsections of Optional data

          Energy step data

          Energy step data is saved in energy_step_data.pkl if you set energy_step_flag = True in [option] section of cryspy.in. NumPy library is required to analyze this data file.

          Warning

          energy_step_flag = True is currently available only with VASP, QE, and soiap.

          Info

          In soiap, energy_step_data is collected only if loopa == 1. This is because other data (struc, force, and stress) are output only when loopa == 1. See, https://github.com/nbsato/soiap/blob/master/doc/instructions.md

          Data format

          • type: dict
            • key: structure ID
            • value: list of energy step data in each stage
          • string form
            • {0: [array([-3.4439912 , -3.55040935, -3.66697038, ..]), array([-4.0613393 , -4.05445631, -4.06159641, …]), …],
              1: [array([-2.68209823, -2.69012487, -2.68364907, ..]), array([-2.79140967, -2.79183827, -2.79206508, …]), …],
              …}
          • unit of energy
            • eV/atom

          How to access

          import pickle
          with open('energy_step_data.pkl', 'rb') as f:
              energy_step_data = pickle.load(f)
          
          # energy_step_data[ID][stage][step]
          # energy_step_data[ID][0] <-- stage 1
          # energy_step_data[ID][1] <-- stage 2
          #
          # in LAQA
          # energy_step_data[ID][selection][step]
          # energy_step_data[ID][0] <-- 1st selection
          # energy_step_data[ID][1] <-- 2nd selection
          
          # ---------- energy step data of ID 3, stage 1
          cid = 3      # ID
          stage = 1    # stage
          energy_step_data[cid][stage-1][:10]    # show only 10 enegies in jupyter
          
          array([-3.4439912 , -3.55040935, -3.66697038, -3.77192063, -3.84320717,
                 -3.80679245, -3.84633935, -3.87374706, -3.89123193, -3.90422926])
          

          Structure step data

          Structure step data is saved in struc_step_data.pkl if you set struc_step_flag = True in [option] section of cryspy.in. pymatgen library is required to analyze this data file.

          Warning

          struc_step_flag = True is currently available only with VASP, QE, and soiap.

          Info

          struc_step_data includes initial structures. For example, struc_step_data[cid][0][0] is the initial structure of ID = cid.

          Data format

          • type: dict
            • key: structure ID
            • value: list of structure step data in each stage
          • string form
            • {0: [[Structure Summary …, Structure Summary, …], […], …],
              1: [[Structure Summary …, Structure Summary, …], […], …],
              …}
          • structure data format

          How to access

          import pickle
          with open('struc_step_data.pkl', 'rb') as f:
              struc_step_data = pickle.load(f)
          
          # struc_step_data[ID][stage][step]
          # struc_step_data[ID][0] <-- stage 1
          # struc_step_data[ID][1] <-- stage 2
          #
          #
          # in LAQA
          # struc_step_data[ID][selection][step]
          # struc_step_data[ID][0] <-- 1st selection
          # struc_step_data[ID][1] <-- 2nd selection
          
          # ---------- structure step data of ID 3, stage 1, step 4
          cid = 0      # ID
          stage = 1    # stage
          step = 0     # step index (start from 0)
          struc_step_data[cid][stage-1][step]    # to show initial structure of ID 0 at stage 1 in jupyter
          
          Structure Summary
          Lattice
              abc : 5.727301 5.727301 4.405757
           angles : 90.0 90.0 90.0
           volume : 144.5175386563631
                A : 5.727301 0.0 0.0
                B : 0.0 5.727301 0.0
                C : 0.0 0.0 4.405757
          PeriodicSite: Si (0.2506, 5.4767, 1.1014) [0.0438, 0.9562, 0.2500]
          PeriodicSite: Si (2.6130, 3.1143, 1.1014) [0.4562, 0.5438, 0.2500]
          PeriodicSite: Si (3.1143, 0.2506, 1.1014) [0.5438, 0.0438, 0.2500]
          PeriodicSite: Si (5.4767, 2.6130, 1.1014) [0.9562, 0.4562, 0.2500]
          PeriodicSite: Si (5.4767, 0.2506, 3.3043) [0.9562, 0.0438, 0.7500]
          PeriodicSite: Si (3.1143, 2.6130, 3.3043) [0.5438, 0.4562, 0.7500]
          PeriodicSite: Si (2.6130, 5.4767, 3.3043) [0.4562, 0.9562, 0.7500]
          PeriodicSite: Si (0.2506, 3.1143, 3.3043) [0.0438, 0.5438, 0.7500]
          

          Force step data

          Force step data is saved in force_step_data.pkl if you set force_step_flag = True in [option] section of cryspy.in. NumPy library is required to analyze this data file.

          Warning

          force_step_flag = True is currently available only with VASP, QE, and soiap.

          Data format

          • type: dict
            • key: structure ID
            • value: list of force step data in each stage
          • string form
            • {0: [array([[ 0.26314927, -0.26314927, -0. ], […], …[…]]), array([[…], …, […]]), …],
              1: [array([[ 0. , 0. , 0. ], […], …[…]]), array([[…], …, […]]), …],
              …}
          • unit of force
            • eV/Å

          How to access

          import pickle
          with open('force_step_data.pkl', 'rb') as f:
              force_step_data = pickle.load(f)
          
          # force_step_data[ID][stage][step][atom]
          # force_step_data[ID][0] <-- stage 1
          # force_step_data[ID][1] <-- stage 2
          #
          # in LAQA
          # force_step_data[ID][selection][step][atom]
          # force_step_data[ID][0] <-- 1st selection
          # force_step_data[ID][1] <-- 2nd selection
          
          # ---------- force step data of ID 3, stage 1
          cid = 0      # ID
          stage = 1    # stage
          force_step_data[cid][stage-1][:3]    # to show only 3 steps in jupyter 
          
          [array([[ 0.26314927, -0.26314927, -0.        ],
                  [-0.26314927,  0.26314927, -0.        ],
                  [ 0.26314927,  0.26314927,  0.        ],
                  [-0.26314927, -0.26314927, -0.        ],
                  [-0.26314927,  0.26314927, -0.        ],
                  [ 0.26314927, -0.26314927,  0.        ],
                  [-0.26314927, -0.26314927, -0.        ],
                  [ 0.26314927,  0.26314927,  0.        ]]),
           array([[-0.12103692,  0.12103692,  0.        ],
                  [ 0.12103692, -0.12103692, -0.        ],
                  [-0.12103692, -0.12103692, -0.        ],
                  [ 0.12103692,  0.12103692,  0.        ],
                  [ 0.12103692, -0.12103692, -0.        ],
                  [-0.12103692,  0.12103692,  0.        ],
                  [ 0.12103692,  0.12103692,  0.        ],
                  [-0.12103692, -0.12103692, -0.        ]]),
           array([[-0.29801618,  0.29801618,  0.        ],
                  [ 0.29801618, -0.29801618, -0.        ],
                  [-0.29801618, -0.29801618, -0.        ],
                  [ 0.29801618,  0.29801618,  0.        ],
                  [ 0.29801618, -0.29801618, -0.        ],
                  [-0.29801618,  0.29801618,  0.        ],
                  [ 0.29801618,  0.29801618,  0.        ],
                  [-0.29801618, -0.29801618, -0.        ]])]
          
          step = 0     # step index (start from 0)
          atom = 2     # atom index (start from 0)
          force_step_data[cid][stage-1][step][atom]
          
          array([0.26314927, 0.26314927, 0.        ])
          

          Stress step data

          Stress step data is saved in stress_step_data.pkl if you set stress_step_flag = True in [option] section of cryspy.in. NumPy library is required to analyze this data file.

          Warning

          stress_step_flag = True is currently available only with VASP, QE, and soiap.

          Data format

          • type: dict
            • key: structure ID
            • value: list of stress step data in each stage
          • string form
            • {0: [array([[-0.16770062, 0. , 0. ], […], […]]), array([[…], ]…], […]]), …],
              1: [array([[ 0.39260083, -0. , -0. ], […], […]]), array([[…], […], […]]), …],
              …}
          • unit of stress
            • eV/(Å**3)

          How to access

          import pickle
          with open('stress_step_data.pkl', 'rb') as f:
              stress_step_data = pickle.load(f)
          
          # stress_step_data[ID][stage][step][atom]
          # stress_step_data[ID][0] <-- stage 1
          # stress_step_data[ID][1] <-- stage 2
          #
          # in LAQA
          # stress_step_data[ID][selection][step][atom]
          # stress_step_data[ID][0] <-- 1st selection
          # stress_step_data[ID][1] <-- 2nd selection
          
          # ---------- stress step data of ID 3, stage 1
          cid = 0      # ID
          stage = 1    # stage
          stress_step_data[cid][stage-1][:3]    # to show only 3 steps in jupyter 
          
          [array([[-0.16770062,  0.        ,  0.        ],
                  [ 0.        , -0.16770062, -0.        ],
                  [ 0.        ,  0.        ,  0.21823358]]),
           array([[-0.16020785, -0.        , -0.        ],
                  [-0.        , -0.16020785,  0.        ],
                  [-0.        ,  0.        ,  0.18646321]]),
           array([[-0.13572003, -0.        ,  0.        ],
                  [-0.        , -0.13572003,  0.        ],
                  [-0.        ,  0.        ,  0.15953926]])]