def _run(self): self._set_best_arguments_of_vectors_and_supercell() max_num_op = 0 best_cells = [] points_on_sphere = [] for i, point in enumerate(self._get_all_points_on_sphere()): modcell = self._get_cell_with_modulation( self._get_modulation(point)) symmetry = get_symmetry_dataset(modcell, tolerance=self._symmetry_tolerance) if self._store_all: self._all_cells.append(modcell) refined_cell = get_crystallographic_cell( modcell, tolerance=self._symmetry_tolerance) num_op = len(symmetry['rotations']) if num_op > max_num_op: max_num_op = num_op best_cells = [refined_cell] points_on_sphere = [point.copy()] if num_op == max_num_op: is_found = True for bc in best_cells: if xtal_compare(bc, refined_cell, tolerance=self._symmetry_tolerance, angle_tolerance=1.0): is_found = False break if is_found: best_cells.append(refined_cell) points_on_sphere.append(point.copy()) self._points_on_sphere = points_on_sphere
def _find_equivalent_crystal_structure(self, cell): for tid in self._ancestral_cells: if xtal_compare(self._ancestral_cells[tid], cell, tolerance=self._symmetry_tolerance, angle_tolerance=1.0): return tid return 0
def _run(self): self._set_vectors_and_supercell() max_num_op = 0 best_cells = [] best_spacegroup_types = [] points_on_sphere = [] phase_shifts = self._get_phase_shifts_at_lattice_points() for point in self._get_phases(): modulation = self._get_modulation(point) for phase in phase_shifts: amplitude = self._get_normalize_amplitude(modulation / phase) modcell = self._get_cell_with_modulation( modulation / phase * amplitude) symmetry = get_symmetry_dataset( modcell, tolerance=self._symmetry_tolerance) num_op = len(symmetry['rotations']) if num_op > max_num_op: max_num_op = num_op best_cells = [modcell] best_spacegroup_types = [symmetry['number']] points_on_sphere = [[point, phase, amplitude]] elif num_op == max_num_op: if symmetry['number'] in best_spacegroup_types: cell_in_best_cells = False for bc in best_cells: if xtal_compare( bc, modcell, tolerance=self._symmetry_tolerance, angle_tolerance=1.0): cell_in_best_cells = True break if not cell_in_best_cells: best_cells.append(modcell) points_on_sphere.append([point, phase, amplitude]) else: best_cells.append(modcell) points_on_sphere.append([point, phase, amplitude]) best_spacegroup_types.append(symmetry['number']) self._points_on_sphere = points_on_sphere
def _run(self): self._set_vectors_and_supercell() max_num_op = 0 best_cells = [] best_spacegroup_types = [] points_on_sphere = [] phase_shifts = self._get_phase_shifts_at_lattice_points() for point in self._get_phases(): modulation = self._get_modulation(point) for phase in phase_shifts: amplitude = self._get_normalize_amplitude(modulation / phase) modcell = self._get_cell_with_modulation(modulation / phase * amplitude) symmetry = get_symmetry_dataset( modcell, tolerance=self._symmetry_tolerance) num_op = len(symmetry['rotations']) if num_op > max_num_op: max_num_op = num_op best_cells = [modcell] best_spacegroup_types = [symmetry['number']] points_on_sphere = [[point, phase, amplitude]] elif num_op == max_num_op: if symmetry['number'] in best_spacegroup_types: cell_in_best_cells = False for bc in best_cells: if xtal_compare(bc, modcell, tolerance=self._symmetry_tolerance, angle_tolerance=1.0): cell_in_best_cells = True break if not cell_in_best_cells: best_cells.append(modcell) points_on_sphere.append([point, phase, amplitude]) else: best_cells.append(modcell) points_on_sphere.append([point, phase, amplitude]) best_spacegroup_types.append(symmetry['number']) self._points_on_sphere = points_on_sphere
def _run(self): self._set_best_arguments_of_vectors_and_supercell() max_num_op = 0 best_cells = [] points_on_sphere = [] for i, point in enumerate(self._get_all_points_on_sphere()): modcell = self._get_cell_with_modulation( self._get_modulation(point)) symmetry = get_symmetry_dataset( modcell, tolerance=self._symmetry_tolerance) if self._store_all: self._all_cells.append(modcell) refined_cell = get_crystallographic_cell( modcell, tolerance=self._symmetry_tolerance) num_op = len(symmetry['rotations']) if num_op > max_num_op: max_num_op = num_op best_cells = [refined_cell] points_on_sphere = [point.copy()] if num_op == max_num_op: is_found = True for bc in best_cells: if xtal_compare(bc, refined_cell, tolerance=self._symmetry_tolerance, angle_tolerance=1.0): is_found = False break if is_found: best_cells.append(refined_cell) points_on_sphere.append(point.copy()) self._points_on_sphere = points_on_sphere