def __init__(self, qoi_name, structures, temperature_min=0, temperature_max=2700, temperature_step=100, time_total=10, time_step=0.001, supercell=[5, 5, 5]): _qoi_name = qoi_name _qoi_type = 'lmps_thermal_expansion' _structures = OrderedDict() _structures['ideal'] = structures['ideal'] Qoi.__init__(self, qoi_name=_qoi_name, qoi_type=_qoi_type, structures=_structures) self.temperature_min = temperature_min self.temperature_max = temperature_max self.temperature_step = temperature_step self.time_total = time_total self.time_step = time_step self.supercell = supercell
def __init__(self, qoi_name, structures): assert type(qoi_name) is str assert type(structures) is OrderedDict assert 'ideal' in structures assert 'defect' in structures qoi_type = StackingFaultEnergyCalculation.qoi_type Qoi.__init__(self,qoi_name=qoi_name,qoi_type=qoi_type,structures=structures)
def __init__(self, qoi_name, structures): assert isinstance(qoi_name, str) _qoi_name = qoi_name _structures = OrderedDict() _structures['low'] = structures['low'] _structures['high'] = structures['high'] Qoi.__init__(self, qoi_name=qoi_name, qoi_type=self.qoi_type, structures=_structures)
def __init__(self, qoi_name, structures): _qoi_name = qoi_name _qoi_type = 'lmps_surface_energy' _structures = OrderedDict() _structures['ideal'] = structures['ideal'] _structures['slab'] = structures['slab'] Qoi.__init__(self, qoi_name=_qoi_name, qoi_type=_qoi_type, structures=_structures)
def __init__(self,qoi_name,structures): assert isinstance(qoi_name,str) assert isinstance(structures,dict) _qoi_name = qoi_name _qoi_type = 'lmps_defect' _structures = OrderedDict() _structures['ideal'] = structures['ideal'] _structures['defect'] = structures['defect'] Qoi.__init__(self, qoi_name=_qoi_name, qoi_type=_qoi_type, structures=_structures)
def __init__(self, qoi_name, structures): assert isinstance(qoi_name, str) _qoi_name = qoi_name _qoi_type = 'lmps_relax_all' _structures = OrderedDict() if isinstance(structures, str): _structures['ideal'] = structures elif isinstance(structures, dict): _structures['ideal'] = structures['ideal'] elif isinstance(structures, list): _structures['ideal'] = structures[0] else: msg_err = ("structures must be either str, dict, or list") raise ValueError(msg_err) Qoi.__init__(self, qoi_name=qoi_name, qoi_type=_qoi_type, structures=_structures)
def test____init__(): from pypospack.qoi import Qoi qoi = Qoi(qoi_name=qoi_name, qoi_type=qoi_type, structure_names=structure_names) assert qoi.qoi_name == qoi_name assert qoi.qoi_type == qoi_type assert qoi.structure_names == structure_names assert qoi.reference_values is None assert qoi.task_definitions is None assert qoi.task_dependencies is None assert qoi.results is None