Two guys, one girl and the end of the world as they know it seems like a recipe for impassioned trouble if ever there was one.

But after an intriguing start, “Z for Zachariah” slackens. Director Craig Zobel deliberately avoids a move toward increased sexual tension that, while predictable, is inevitable between three people assuming they’re the last humans on Earth — and necessary to propel the otherwise languid action forward.

Following a nuclear war, a young woman is left alone on the family farm nestled in a deep valley in the American South that is somehow protected from the radioactive poison blanketing the air elsewhere. Ann Burden (Margot Robbie of “The Wolf of Wall Street”) believes herself to be the last person alive. She dons a hazmat suit to gather supplies among the ruins of a nearby town, and plays mournful tunes on a mini-organ in the small chapel on her property.

Then she spies John Loomis (Chiwetel Ejiofor), whooping in half-mad loneliness on the side of the road, and later saves him from the radioactivity-­poisoned swimming hole he’s bathing in.

The two opposites — she an idealistic, religious naif and he a pragmatic atheist scientist — form an uneasy bond and growing affection, until former miner Caleb (Chris Pine, continuing his quest for indie cred) shows up to provide some romantic competition.

The three join forces to build a hydroelectric water wheel to restore power to the farm. The pheromonal sparks that are supposed to be flying between them prove a more elusive enterprise.

Although it shares a title with a 1970s sci-fi novel by Newbery-­winning young-adult author Robert C. O’Brien, the film is quite different. In the book, Ann is a teen, and, more significantly, there is no Caleb.

Some of the novel’s underlying themes remain, however, including an implied battle between spiritual and scientific, as when Loomis argues for tearing down the chapel for wood to make the water wheel.

At times, the symbolism gets heavy-handed: It’s not tough to figure out what Loomis and Caleb are really vying for when they hunt for game with bows and arrows.

Zobel’s “Compliance,” a 2012 bare-bones study of perceived authority’s psychological effects, drew praise for its slow, quiet buildup. But the subtlety — a quality sorely lacking in most post-apocalypse sci-fi tales — that Zobel and screenwriter Nissar Modi commendably strive for here too often devolves into monotony, despite finely honed performances by Ejiofor and Robbie.