def all_distances(lines): all_dist = [] blocks = get_blocks(lines) for blockNum in range(0,len(blocks)): xyz = sp.get_xyz(blocks[blockNum]) dis = sp.bonddistance(xyz) all_dist.append(dis) return all_dist
def all_angles(lines): all_angles = [] blocks = get_blocks(lines) for blockNum in range(0,len(blocks)): xyz = sp.get_xyz(blocks[blockNum]) ang = sp.angles(xyz) all_angles.append(ang) return all_angles
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
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
def get_all_xyz(lines): xyz = [] blocks = get_blocks(lines) for blockNum in range(0,len(blocks)): xyz.append(sp.get_xyz(blocks[blockNum])) return xyz
def atoms(self): return sp.get_xyz(self.lines)[0]