code: def getbfs(coords, gbasis):
      
  
      sym2powerlist = {
          'S' : [(0,0,0)],
          'P' : [(1,0,0),(0,1,0),(0,0,1)],
          'D' : [(2,0,0),(0,2,0),(0,0,2),(1,1,0),(0,1,1),(1,0,1)],
          'F' : [(3,0,0),(2,1,0),(2,0,1),(1,2,0),(1,1,1),(1,0,2),
                 (0,3,0),(0,2,1),(0,1,2), (0,0,3)]
          }
  
      bfs = []
      for i, at_coords in enumerate(coords):
          bs = gbasis[i]
          for sym,prims in bs:
              for power in sym2powerlist[sym]:
                  bf = cgbf(at_coords,power)
                  for expnt,coef in prims:
                      bf.add_pgbf(expnt,coef)
                  bf.normalize()
                  bfs.append(bf)
  
      return bfs
docs: Convenience function for both wavefunction and density based on PyQuante Ints.py.