示例#1
0
    def __init__(self, temperatures, energies):
        if len(temperatures) != len(energies):
            print("Gibbs: data size are different !")
            exit()

        data = []
        for temp, ene in zip(temperatures, energies):
            data.append({'temp': float(temp), 'gibbs': float(ene)})
        DataBox.__init__(self, data)
示例#2
0
 def __init__(self, dos):
     DataBox.__init__(self, [])
     self.dos_lines = Cabinet.read_file(dos)
     self.num_atoms = self.get_num_atoms(self.dos_lines[0])
     (self.num_energy,
      self.fermi_energy) = self.get_parameters(self.dos_lines[5])
     print(self.get_parameters(self.dos_lines[5]))
     self.dos_data = self.__prep_dos_data(self.num_atoms,
                                          self.labels_orbital)
示例#3
0
 def __init__(self, data):
     """
     DataBox の labels
         label: クラスターのラベル R*N*
         MxCls: MaxCluster の個数
         CV_score: CV score
     """
     DataBox.__init__(self, data)
     self.output_keys = []
示例#4
0
 def __init__(self, temps, fit_params):
     data = []
     for temp, param in zip(temps, fit_params):
         [G, B, B1, V0] = param
         data.append({'temp': float(temp), 'G_P0': float(G),
                      'gibbs': float(G),
                      'B': float(B), 'B1': float(B1), 'V0': float(V0)})
     DataBox.__init__(self, data)
     self.is_per_atom = False
     self.pressure = 0
示例#5
0
 def __init__(self, compound, refs):
     if (compound.murnaghan['temp'] != refs.temp).all():
         print('Enthalpy: Temperatures are different !')
         exit()
     temp = [{'temp': x} for x in refs.temp]
     self.compound = compound
     self.murnaghan = compound.murnaghan
     self.refs = refs
     self.comp = compound.comp
     DataBox.__init__(self, temp)
     self['enthalpy'] = self.enthalpy()
示例#6
0
 def __init__(self, path_list, poscar='POSCAR', output='OSZICAR'):
     """
     initialize
     """
     if not path_list:
         print("path_list is empty !!!")
     self.filetype = {'poscar': poscar, 'output': output}
     self.path_list = path_list
     DataBox.__init__(self, self.get_data())
     #self.data, self.comp = self.get_data()
     #self.trim_bool(self.data, self.data['bool'], 'energy', 'mag')
     self.output_keys = []
示例#7
0
 def __init__(self, procar):
     """
     self.dataの構成
     'kpoint_id', 'orbitals_phase', 'kpoint', 'energy', 'spin'
     'orbitals_tot', 'occupancy'
     """
     flow_procar = open(procar)
     line = flow_procar.readline()
     line = flow_procar.readline()
     (self.num_kpoints,
      self.num_bands,
      self.num_atoms) = self.get_meta(line)
     print(self.get_meta(line))
     DataBox.__init__(self, self.get_data(flow_procar))
 def __init__(self, procar, poscar=None):
     """
     self.dataの構成
     'kpoint_id', 'orbitals_phase', 'kpoint', 'energy', 'spin'
     'orbitals_tot', 'occupancy'
     'dk', 'xaxis'を追加
     'dk'は前のk点からのk空間上の距離,
     'xaxis'はそれを積算したものでband描写の横軸に用いる
     poscarを読み込ませることで逆格子cellの各軸の長さを反映させて,
     bandの横軸の長さを対応させることができる
     defaultではposcarは読まずに、a*, b*, c*の長さは全て1
     """
     with open(procar, 'r') as flow_procar:
         line = flow_procar.readline()
         line = flow_procar.readline()
         (self.num_kpoints,
          self.num_bands,
          self.num_atoms) = self.get_meta(line)
         print(self.get_meta(line))
         DataBox.__init__(self, self.get_data(flow_procar))
 def __init__(self, path_list):
     self.path_list = path_list
     DataBox.__init__(self, self.get_data())
     self.output_keys = []
示例#10
0
 def __init__(self, data):
     DataBox.__init__(self, data)
示例#11
0
 def __init__(self, data):
     DataBox.__init__(self, data)
     self.output_keys = []
示例#12
0
 def __init__(self, temperatures, bulk_mods):
     data = []
     for temp, bulk in zip(temperatures, bulk_mods):
         data.append({'temp': float(temp), 'bulk': float(bulk)})
     DataBox.__init__(self, data)