def __init__(self, materials, substrates, elasticity=None, substrate_settings=None, query=None, **kwargs): """ Calculates matching substrates for Args: materials (Store): Store of materials documents diffraction (Store): Store of substrate matches elasticity (Store): Store of elastic tensor documents substrate_settings (path): Store of xrd settings query (dict): dictionary to limit materials to be analyzed """ self.materials = materials self.substrates = substrates self.elasticity = elasticity self.substrate_settings = substrate_settings self.query = query if query else {} self.__settings = load_settings(self.substrate_settings, default_substrate_settings) super().__init__(sources=[materials], targets=[substrates], **kwargs)
def __init__(self, materials, substrates, elasticity=None, substrates_file=None, query=None, **kwargs): """ Calculates matching substrates Args: materials (Store): Store of materials documents diffraction (Store): Store of substrate matches elasticity (Store): Store of elastic tensor documents substrates_file (path): file of substrates to consider query (dict): dictionary to limit materials to be analyzed """ self.materials = materials self.substrates = substrates self.elasticity = elasticity self.substrates_file = substrates_file self.query = query if query else {} self.__settings = load_settings(self.substrates_file, DEFAULT_SUBSTRATES) super().__init__(sources=[materials, elasticity], targets=[substrates], **kwargs)
def __init__(self, tasks, materials, mat_prefix="mp-", materials_settings=None, query=None, ltol=0.2, stol=0.3, angle_tol=5, separate_mag_orderings=False, require_structure_opt=True, **kwargs): """ Creates a materials collection from tasks and tags Args: tasks (Store): Store of task documents materials (Store): Store of materials documents to generate mat_prefix (str): prefix for all materials ids materials_settings (Path): Path to settings files query (dict): dictionary to limit tasks to be analyzed ltol (float): StructureMatcher tuning parameter for matching tasks to materials stol (float): StructureMatcher tuning parameter for matching tasks to materials angle_tol (float): StructureMatcher tuning parameter for matching tasks to materials separate_mag_orderings (bool): Separate magnetic orderings into different materials require_structure_opt (bool): Requires every material have a structure optimization """ self.tasks = tasks self.materials_settings = materials_settings self.materials = materials self.mat_prefix = mat_prefix self.query = query if query else {} self.ltol = ltol self.stol = stol self.angle_tol = angle_tol self.separate_mag_orderings = separate_mag_orderings self.require_structure_opt = require_structure_opt self.__settings = load_settings(self.materials_settings, default_mat_settings) self.allowed_tasks = { t_type for d in self.__settings for t_type in d['quality_score'] } super().__init__(sources=[tasks], targets=[materials], **kwargs)
def __init__( self, tasks, materials, task_types=None, materials_settings=None, query=None, ltol=LTOL, stol=STOL, angle_tol=ANGLE_TOL, separate_mag_orderings=False, **kwargs ): """ Creates a materials collection from tasks and tags Args: tasks (Store): Store of task documents materials (Store): Store of materials documents to generate materials_settings (Path): Path to settings files query (dict): dictionary to limit tasks to be analyzed ltol (float): StructureMatcher tuning parameter for matching tasks to materials stol (float): StructureMatcher tuning parameter for matching tasks to materials angle_tol (float): StructureMatcher tuning parameter for matching tasks to materials separate_mag_orderings (bool): Separate magnetic orderings into different materials """ self.tasks = tasks self.materials_settings = materials_settings self.materials = materials self.task_types = task_types self.query = query if query else {} self.ltol = ltol self.stol = stol self.angle_tol = angle_tol self.separate_mag_orderings = separate_mag_orderings self.__settings = load_settings(self.materials_settings, default_mat_settings) self.allowed_tasks = { t_type for d in self.__settings for t_type in d["quality_score"] } sources = [tasks] if self.task_types: sources.append(self.task_types) super().__init__(sources=sources, targets=[materials], **kwargs)
def __init__(self, materials, diffraction, xrd_settings=None, **kwargs): """ Calculates diffraction patterns for materials Args: materials (Store): Store of materials documents diffraction (Store): Store of diffraction data such as formation energy and decomposition pathway xrd_settings (Store): Store of xrd settings """ self.materials = materials self.diffraction = diffraction self.xrd_settings = xrd_settings self.__settings = load_settings(self.xrd_settings, DEFAULT_XRD_SETTINGS) super().__init__( source=materials, target=diffraction, ufn=self.calc, projection=["structure"], **kwargs)
def __init__(self, materials, diffraction, xrd_settings=None, query=None, **kwargs): """ Calculates diffraction patterns for materials Args: materials (Store): Store of materials documents diffraction (Store): Store of diffraction data such as formation energy and decomposition pathway xrd_settings (Store): Store of xrd settings query (dict): dictionary to limit materials to be analyzed """ self.materials = materials self.diffraction = diffraction self.xrd_settings = xrd_settings self.query = query if query else {} self.__settings = load_settings(self.xrd_settings, default_xrd_settings) super().__init__(sources=[materials], targets=[diffraction], **kwargs)