def psf_import(filename): """ Import a PSF pseudopotential from a file. """ from aiida_siesta.data.psf import PsfData node, _ = PsfData.get_or_create(filename) echo.echo_success('Imported: {}'.format(node))
def psf_import(filename): """ Import a PSF pseudopotential from a file. THIS COMMAND IS DEPRECATED AND WILL BE REMOVED IN aiida-siesta v2.0. """ from aiida_siesta.data.psf import PsfData node, _ = PsfData.get_or_create(filename) echo.echo_success('Imported: {}'.format(node))
##It make use of a legacy function. Mandatory to set cell and pbc #from aiida.tools.data.array.kpoints.legacy import get_explicit_kpoints_path as legacy_path #kpp = [('W', (0.500, 0.250, 0.750), 'L', (0.500, 0.500, 0.500), 40), # ('L', (0.500, 0.500, 0.500), 'G', (0., 0., 0.), 40)] #tmp=legacy_path(kpp) #bandskpoints.set_cell(structure.cell, structure.pbc) #bandskpoints.set_kpoints(tmp[3]) #bandskpoints.labels=tmp[4] #The pseudopotentials pseudos_dict = {} raw_pseudos = [("Si.psf", ['Si'])] for fname, kinds in raw_pseudos: absname = op.realpath( op.join(op.dirname(__file__), "data/sample-psf-family", fname)) pseudo, created = PsfData.get_or_create(absname, use_first=True) if created: print("\nCreated the pseudo for {}".format(kinds)) else: print("\nUsing the pseudo for {} from DB: {}".format(kinds, pseudo.pk)) for j in kinds: pseudos_dict[j] = pseudo #Resources options = { "max_wallclock_seconds": 600, # "withmpi" : True, "resources": { "num_machines": 1, "num_mpiprocs_per_machine": 1, }