def main(): Bash.mkdir('cova') cova_list = Array.frange_stp(1.0, 1.05, 0.05) series = series_vasp.Produce('POSCAR', 'cova') series.set_cova(cova_list) series.make_files() series.append_list_run('run_cova.sh')
def main(): Bash.mkdir('kp') kp_list = Array.frange_stp(0.08, 0.24, 0.02) #kp_list = Array.frange_stp(0.04, 0.07, 0.02) series = series_vasp.Produce('POSCAR', 'kp') series.set_kp_relax(kp_list) series.make_files() series.make_list_run('run.sh')
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')
def main(): Bash.mkdir("cova") # cova_list = Array.frange_stp(0.95/(2**0.5), 1.45/(2**0.5), 0.05/(2**0.5)) # from bcc to fcc # cova_list = Array.frange_stp(0.90, 1.60, 0.05) # from bcc to fcc for D03 rate = 2 ** 0.5 rate = 1.0 / (2 ** 0.5) rate = rate * 2 rate = 1 print(rate) cova_list = Array.frange_stp(0.90 * rate, 1.60 * rate, 0.05 * rate) # cova_list = [1.275, 1.325, 1.375] # cova_list.append(1.00) # cova_list.append(1.05) series = series_vasp.Produce("POSCAR", "cova") series.set_cova(cova_list) series.make_files() series.append_list_run("run_cova.sh")
def frange(): volume_list = Array.frange_stp(90, 140, 5) series = series_vasp.Produce('POSCAR', 'vol') series.set_volume(volume_list) series.make_files() series.append_list_run('run_volume.sh')