Chef and molecular gastronomy ace Wylie Dufresne’s previous stab at sweet treats included saffron-coconut ice cream with caviar and poppy seeds, which he served at his wd~50 restaurant.

Now, he’s taking on the doughnut.

Du’s Donuts and Coffee opened last week on the ground floor of the William Vale Hotel in Williamsburg. Collaborating with head baker Colin Kull, formerly of San Francisco’s Tartine, Dufresne thinks they may have created the perfect doughnut.

“That was definitely the aim,” he says, although he knows doughnut competition is stiff. “There are a lot of great doughnut makers in this town.”

After months of recipe refinement, the glaze stays on the doughnut (not your fingers). The doughnuts are the old-fashioned cake variety, but the flavors are anything but, with offerings like peanut butter-yuzu, pomegranate-tahini and grapefruit-chamomile. He wants “to bring acidity and texture to the doughnuts.”

Dufresne, who makes an animated cameo in the “Simpsons” episode “The Food Wife,” thinks Homer Simpson might prefer a classic flavor like strawberries and cream for its resemblance to his iconic beloved pink doughnut.

Doughnuts cost $3.50 each, or a dozen for $40.