Example #1
0
 def virt_orbtitals(self):
   all_orbs = irclib.all_orbs(self.lines)
   val_orbs = op.num_valence_orbs(self.atoms())
   epsilon = []
   Epsilon = {}
   num_orbs = len(all_orbs[0][1])
   Epsilon["Reaction Coordinate"] = self.rxCoord()
   end = val_orbs
   start = 1
   for j in range(start,end):
     for coord in range(0,len(all_orbs)):
       epsilon.append(all_orbs[coord][1][j])
     Epsilon[str(j)] = epsilon
     epsilon = []
   return Epsilon
Example #2
0
 def fukuiPlusMartinezVal(self):
     print "-----------------------------------------------------------------"
     print "\nProcessing Chi plus Valence.... \n\n"
     occ_orb = sp.get_orbitals(self.lines)[0]
     all_orb = sp.get_orbitals(self.lines)[2]
     atom_list = sp.get_xyz(self.lines)[0]
     valence_orbs = op.num_valence_orbs(atom_list)
     molecule = self.fchkFile.split("_")[0]
     chiplus=[] 
     denvirt=0.0 
     # Compute the denominator of chiplus
     start = int(len(occ_orb))
     end = start + int(valence_orbs)
     for j in range(start,end):
       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,end):
       print i
       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"+" fukuiPlusIAPval.cub")
     cub_final = "fukuiPlusIAPval.cub"
     return cub_final
Example #3
0
 def fukuiMinusMartinezVal(self):
     print "Processing Chi minus.... \n\n"
     occ_orb = sp.get_orbitals(self.lines)[0]
     atom_list = sp.get_xyz(self.lines)[0]
     valence_orbs = op.num_valence_orbs(atom_list)
     molecule = self.fchkFile.split("_")[0]
     chiminus=[]
     denocc=0.0
     start = int(len(occ_orb)) - int(valence_orbs)
     # Compute the denominator of chimins
     for j in range(start,len(occ_orb)):
         denocc=denocc+float(occ_orb[j])-float(occ_orb[start])
     # Compute the division to get total chiminus
     for i in range(start,len(occ_orb)):
         chiminus_i = (float(occ_orb[i])-float(occ_orb[start]))/denocc
         chiminus.append(chiminus_i)
         # Calculo del cubo perteneciente al orbital i-esimo 
         if i==start:
             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>start:
             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"+" fukuiMinusIAPval.cub")
     os.system("rm *cub_sq")
     cub_final = "fukuiMinusIAPval.cub"
     return cub_final