def filter_symmetries_inputs(request, sample, get_process_builder): from aiida.orm import DataFactory builder = get_process_builder( calculation_string='symmetry_representation.filter_symmetries', code_string='symmetry_repr') builder.symmetries = DataFactory('singlefile')( file=sample('symmetries.hdf5')) structure = DataFactory('structure')() structure.set_pymatgen_structure( mg.Structure.from_file(sample(request.param))) builder.structure = structure return builder
def inner(projections_dict={'kind_name': 'As', 'ang_mtm_name': 'sp3'}): from aiida.orm import DataFactory, CalculationFactory from aiida_wannier90.orbitals import generate_projections res = dict() a = 5.367 * pymatgen.core.units.bohr_to_ang structure_pmg = pymatgen.Structure(lattice=[[-a, 0, a], [0, a, a], [-a, a, 0]], species=['Ga', 'As'], coords=[[0] * 3, [0.25] * 3]) structure = DataFactory('structure')() structure.set_pymatgen_structure(structure_pmg) res['structure'] = structure res['projections'] = generate_projections(projections_dict, structure=structure) KpointsData = DataFactory('array.kpoints') kpoints = KpointsData() kpoints.set_kpoints_mesh([2, 2, 2]) res['kpoints'] = kpoints kpoint_path_tmp = KpointsData() kpoint_path_tmp.set_cell_from_structure(structure) kpoint_path_tmp.set_kpoints_path() point_coords, path = kpoint_path_tmp.get_special_points() kpoint_path = DataFactory('parameter')(dict={ 'path': path, 'point_coords': point_coords, }) res['kpoint_path'] = kpoint_path res['parameters'] = DataFactory('parameter')( dict=dict(num_wann=4, num_iter=12, wvfn_formatted=True)) return res