def fukuiMinusMartinez(self): print "Processing Chi minus.... \n\n" occ_orb = sp.get_orbitals(self.lines)[0] molecule = self.fchkFile.split("_")[0] chiminus=[] denocc=0.0 # Compute the denominator of chimins for j in range(1,len(occ_orb)): denocc=denocc+float(occ_orb[j])-float(occ_orb[0]) # Compute the division to get total chiminus for i in range(0,len(occ_orb)): chiminus_i = (float(occ_orb[i])-float(occ_orb[0]))/denocc chiminus.append(chiminus_i) # Calculo del cubo perteneciente al orbital i-esimo if i==0: print "Computing cube for orbital "+str(i) cub_sum="F_minus_"+molecule+".cub" input1="cubegen 0 MO="+str(i+1)+" "+self.fchkFile+" "+cub_sum+" 0 h" commands.getstatusoutput(input1) cubman.sq_cube(cub_sum) cubman.mult_cube(cub_sum+"_sq",chiminus_i) if i>0: print "Computing cube for orbital "+str(i) cub_out=molecule+"_"+str(i+1)+".cub" input1="cubegen 0 MO="+str(i+1)+" "+self.fchkFile+" "+cub_out+" 0 h" commands.getstatusoutput(input1) cubman.sq_cube(cub_out) cubman.mult_cube(cub_out+"_sq",chiminus_i) cubman.sum_total(cub_sum+"_sq"+"_mult",cub_out+"_sq"+"_mult") os.system("mv "+cub_sum+"_sq_mult"+" fukuiMinusIAP.cub") os.system("rm *cub_sq") cub_final = "fukuiMinusIAP.cub" return cub_final
def fukuiPlusMartinez(self): print "-----------------------------------------------------------------" print "\nProcessing Chi plus.... \n\n" occ_orb = sp.get_orbitals(self.lines)[0] all_orb = sp.get_orbitals(self.lines)[2] molecule = self.fchkFile.split("_")[0] chiplus=[] denvirt=0.0 # Compute the denominator of chiplus start = int(len(occ_orb)) for j in range(start,len(all_orb)): ek_ej = float(all_orb[-1])-float(all_orb[j]) denvirt= denvirt + ek_ej # Compute the division to get total chiplus for i in range(start,len(all_orb)): chiplus_i=(float(all_orb[-1])-float(all_orb[i]))/denvirt chiplus.append(chiplus_i) if i==start: cub_sum="F_plus_"+molecule+".cub" input1="cubegen 0 MO="+str(i+1)+" "+self.fchkFile+" "+cub_sum+" 0 h" commands.getstatusoutput(input1) cubman.sq_cube(cub_sum) cubman.mult_cube(cub_sum+"_sq",chiplus_i) if i>start: cub_out=molecule+"_"+str(i+1)+".cub" input1="cubegen 0 MO="+str(i+1)+" "+self.fchkFile+" "+cub_out+" 0 h" commands.getstatusoutput(input1) cubman.sq_cube(cub_out) cubman.mult_cube(cub_out+"_sq",chiplus_i) cubman.sum_total(cub_sum+"_sq"+"_mult",cub_out+"_sq"+"_mult") os.system("mv "+cub_sum+"_sq_mult"+" fukuiPlusIAP.cub") cub_final = "fukuiPlusIAP.cub" return cub_final