def get_enthalpy(self, elements, num_atoms):
     """Convert energy (eV/atom) to enthalpy (kJ/mol)"""
     ref_energy = 0
     total_num = sum(num_atoms)
     for element, num in zip(elements, num_atoms):
         ref_energy += solid.REFERENCE[element] * num
     ref_energy = ref_energy / total_num
     enthalpy = ((self.data['energy'] - ref_energy) * 96.485344520851)
     dtype = ('enthalpy', 'f8')
     self.data = Array.add_data(self.data, enthalpy, dtype)
     self.output_list.append('enthalpy')
 def get_mae(self, osz1, osz2, label):
     """
     MAEの計算値をself.data_arrayに追加
     """
     initial = self.filetype
     self.alt_filetype(output=osz1)
     soc1 = self.get_data()
     self.alt_filetype(output=osz2)
     soc2 = self.get_data()
     mae = (soc2['energy'] - soc1['energy']) * (10 ** 6)
     bools = [soc2['bool'][x] and soc1['bool'][x]
              for x in range(0, len(soc1['bool']))]
     dtype = (label, 'f8')
     self.data = Array.add_data(self.data, mae, dtype)
     self.trim_bool(self.data, bools, 'mae')
     self.filetype = initial
     line = "MAE = '{0}' - '{1}'".format(osz2, osz1)
     print(line)
     self.output_list.append('mae')