def test_add_fw(self): wf1 = VaspWorkflow(self.fw1) wf1.add_fw(self.fw2) wf1.add_fw(self.fw3) wf_dic = wf1.wf.as_dict() ldic = wf_dic['links'] # Rebuild WF1 Dictionary to reflect FWs '-1', '-2', and '-3' instead # of higher FW_ID numbers min_fw_id = int(min(ldic.keys())) modifier = -( min_fw_id + 1 ) link_dic = {str(min_fw_id + modifier): [ldic[str(min_fw_id)][0] + modifier], str(min_fw_id + modifier - 1): [ldic[str(min_fw_id-1)][0] + modifier], str(min_fw_id + modifier - 2): []} self.assertDictEqual(link_dic, self.links1, msg=None)
vasp3.LHFCALC='.TRUE.' vasp3.HFSCREEN=0.2 vasp3.LSPECTRAL='False' vasp3.NEDOS=4096 vasp3.NOMEGA=1024 vasp3.NBANDS=nbands vasp3.LOPTICS='False' vasp3.LRPA='.FALSE.' vasp3.LFXC='True' vasp3.NKREDLFX=3 vasp3.NKREDLFY=3 vasp3.NKREDLFZ=3 vasp3.KPAR=kpar_chi vasp3.kpts_style='Gamma' vasp3.kpts=[6,6,6] vasp3.kpts_shift=[0,0,0] fw2=VaspFirework(vasp3, name=mname) fw2.copy_files_from_previous('WAVECAR', 'WAVEDER', mode='copy', ignore_errors=True) # Make Sequential Workflow #wf1 = VASPWorkflow(fw1,fw2,fw3, name=material_file_name.split('.')[0]) wf=VaspWorkflow(fw1,fw2,name=material_file_name.split('.')[0]) wf.to_file(material_file_name) # save specification to yaml file for later inspection # or manual add to lauchpad with lpad script #wf.add_wf_to_launchpad()