m.chkfile=el+basis+"_r"+str(r)+"_s"+str(S)+"_"+method+"_"+str(run)+"mirror.chk" m.irrep_nelec = symm_dict[run] m.max_cycle=100 m = addons.remove_linear_dep_(m) m.conv_tol=1e-5 m.diis=scf.ADIIS() total_energy=m.kernel() #Compute the Mulliken orbital occupancies... m.analyze() #m.stability(external=True) assert(np.sum(m.mo_occ)==25) #Once we get past the vdz basis, just read-in the existingmirror.chk file... else: dm=m.from_chk(el+'vdz'+"_r"+str(r)+"_s"+str(S)+"_"+method+"_"+str(run)+"mirror.chk") m.chkfile=el+basis+"_r"+str(r)+"_s"+str(S)+"_"+method+"_"+str(run)+"mirror.chk" m.irrep_nelec = symm_dict[run] m.max_cycle=100 m = addons.remove_linear_dep_(m) m.conv_tol=1e-5 m.diis=scf.ADIIS() total_energy=m.kernel(dm) m.analyze() #m.stability(external=True) assert(np.sum(m.mo_occ)==25) datacsv['run'].append(run) datacsv['bond-length'].append(r) datacsv['S'].append(S)
############################################################################################## if("U" in method): if("HF" in method): m=UHF(mol) else: m=UKS(mol) m.xc=method[1:] else: if(method=="ROHF"): m=ROHF(mol) else: m=ROKS(mol) m.xc=method ############################################################################################## dm=m.from_chk(el+'vdz'+"_r"+str(r)+"_s"+str(S[run])+"_"+method+"_"+str(run)+".chk") m.chkfile=el+basis+"_r"+str(r)+"_s"+str(S[run])+"_"+method+"_"+str(run)+".chk" m.irrep_nelec = symm_dict[run] m.max_cycle=100 m = addons.remove_linear_dep_(m) m.conv_tol=1e-6 total_energy=m.kernel(dm) m.analyze() assert(np.sum(m.mo_occ)==25) datacsv['run'].append(run) datacsv['bond-length'].append(r) datacsv['S'].append(S[run]) datacsv['method'].append(method) datacsv['basis'].append(basis) datacsv['pseudopotential'].append('trail')
if ("U" in method): if ("HF" in method): m = UHF(mol) else: m = UKS(mol) m.xc = method[1:] else: if (method == "ROHF"): m = ROHF(mol) else: m = ROKS(mol) m.xc = method ############################################################################################## dm = m.from_chk(el + 'vdz' + "_r" + str(r) + "_c" + str(charge) + "_s" + str(mol.spin) + "_" + method + "_" + run + ".chk") m.chkfile = el + basis + "_r" + str( r) + "_c" + str(charge) + "_s" + str( mol.spin ) + "_" + method + "_" + run + ".chk" m.irrep_nelec = symm_dict[run] m.max_cycle = 100 m = addons.remove_linear_dep_(m) m.conv_tol = 1e-6 total_energy = m.kernel(dm) m.analyze() datacsv['molecule'].append(run) datacsv['bond-length'].append(r) datacsv['charge'].append(charge)