def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs): """ Supports the same kwargs as :class:`JSONVaspInputSet`. """ with open(os.path.join(MODULE_DIR, "GWVaspInputSet.json")) as f: DictSet.__init__(self, "MP Static exact diagonalization", json.load(f), sort_structure=False, **kwargs) self.structure = structure self.tests = self.__class__.get_defaults_tests() self.convs = self.__class__.get_defaults_convs() self.functional = functional self.sym_prec = sym_prec self.user_kpoints_settings = {} self.set_dens(spec) npar = self.get_npar(self.structure) #single step exact diagonalization, output WAVEDER self.user_incar_settings.update({ "ALGO": "Exact", "NELM": 1, "LOPTICS": "TRUE" }) # for large systems exact diagonalization consumes too much memory self.set_gw_bands(15) self.user_incar_settings.update({"NPAR": npar})
def __init__(self, name, incar, poscar, kpoints, potcar=None, qadapter=None, script_name='submit_script', vis_logger=None, reuse_path=None, test=False, **kwargs): """ default INCAR from config_dict """ self.name = name self.test = test #print (test) self.incar_init = Incar.from_dict(incar.as_dict()) self.poscar_init = Poscar.from_dict(poscar.as_dict()) if not self.test: self.potcar_init = Potcar.from_dict(potcar.as_dict()) if not isinstance(kpoints, str): self.kpoints_init = Kpoints.from_dict(kpoints.as_dict()) #print (kpoints) else: self.kpoints_init = kpoints self.reuse_path = reuse_path # complete reuse paths self.extra = kwargs if qadapter is not None: self.qadapter = qadapter.from_dict(qadapter.to_dict()) else: self.qadapter = None self.script_name = script_name config_dict = {} config_dict['INCAR'] = self.incar_init.as_dict() config_dict['POSCAR'] = self.poscar_init.as_dict() # caution the key and the value are not always the same if not self.test: config_dict['POTCAR'] = self.potcar_init.as_dict() # dict(zip(self.potcar.as_dict()['symbols'], # self.potcar.as_dict()['symbols'])) if not isinstance(kpoints, str): #print (self.kpoints_init) config_dict['KPOINTS'] = self.kpoints_init.as_dict() else: # need to find a way to dictify this kpoints string more # appropriately config_dict['KPOINTS'] = {'kpts_hse': self.kpoints_init} # self.user_incar_settings = self.incar.as_dict() DictSet.__init__(self, poscar.structure, config_dict) #**kwargs) if vis_logger: self.logger = vis_logger else: self.logger = logger
def __init__(self, name, incar, poscar, kpoints, potcar=None, qadapter=None, script_name='submit_script', vis_logger=None, reuse_path=None, test=False, **kwargs): """ default INCAR from config_dict """ self.name = name self.test = test self.incar_init = Incar.from_dict(incar.as_dict()) self.poscar_init = Poscar.from_dict(poscar.as_dict()) if not self.test: self.potcar_init = Potcar.from_dict(potcar.as_dict()) if not isinstance(kpoints, str): self.kpoints_init = Kpoints.from_dict(kpoints.as_dict()) else: self.kpoints_init = kpoints self.reuse_path = reuse_path # complete reuse paths self.extra = kwargs if qadapter is not None: self.qadapter = qadapter.from_dict(qadapter.to_dict()) else: self.qadapter = None self.script_name = script_name config_dict = {} config_dict['INCAR'] = self.incar_init.as_dict() config_dict['POSCAR'] = self.poscar_init.as_dict() # caution the key and the value are not always the same if not self.test: config_dict['POTCAR'] = self.potcar_init.as_dict() # dict(zip(self.potcar.as_dict()['symbols'], # self.potcar.as_dict()['symbols'])) if not isinstance(kpoints, str): config_dict['KPOINTS'] = self.kpoints_init.as_dict() else: # need to find a way to dictify this kpoints string more # appropriately config_dict['KPOINTS'] = {'kpts_hse':self.kpoints_init} # self.user_incar_settings = self.incar.as_dict() DictSet.__init__(self, poscar.structure, config_dict) #**kwargs) if vis_logger: self.logger = vis_logger else: self.logger = logger
def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs): """ Supports the same kwargs as :class:`JSONVaspInputSet`. """ with open(os.path.join(MODULE_DIR, "GWVaspInputSet.json")) as f: DictSet.__init__(self, "MP Static Self consistent run for GW", json.load(f), sort_structure=False, **kwargs) self.structure = structure self.tests = self.__class__.get_defaults_tests() self.convs = self.__class__.get_defaults_convs() self.user_kpoints_settings = {} self.functional = functional self.set_dens(spec) self.sym_prec = sym_prec
def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs): """ Supports the same kwargs as :class:`JSONVaspInputSet`. """ with open(os.path.join(MODULE_DIR, "GWVaspInputSet.json")) as f: DictSet.__init__(self, "MP Static G0W0", json.load(f), sort_structure=False, **kwargs) self.structure = structure self.tests = self.__class__.get_defaults_tests() self.convs = self.__class__.get_defaults_convs() self.functional = functional self.user_kpoints_settings = {} self.sym_prec = sym_prec npar = self.get_npar(structure) # G0W0 calculation with reduced cutoff for the response function self.user_incar_settings.update({ "ALGO": "GW0", "ENCUTGW": 250, "LWAVE": "FALSE", "NELM": 1 }) self.set_dens(spec) self.nomega_max = 2 * self.get_kpoints(structure).kpts[0][0]**3 nomega = npar * int(self.nomega_max / npar) self.set_gw_bands(15) self.user_incar_settings.update({"NPAR": npar}) self.user_incar_settings.update({"NOMEGA": nomega}) self.tests = self.__class__.get_defaults_tests()