In a peaceful valley east of San Francisco Bay, fragrant with eucalyptus and dotted with vineyards, a new generation of nuclear weapons is coming to life.

Nestled against the foothills at one end of the valley, the Lawrence Livermore National Laboratory is seized with an excitement unknown for more than two decades. The nation's brightest young physicists are being recruited, and old hands rhapsodize about the potential for "third-generation" nuclear arms -- a greater advance over hydrogen bombs, they say, than H-bombs were over atom bombs in the early 1950s.

"We have only begun to understand the implications of this type of weapon, of this type of technology," George H. Miller, chief of weapons research, said in an interview. "Precisely how it will be used ultimately, I can't really predict, but fundamentally it is very, very different from what we've looked at or thought about in the past."

Physicists say dozens, perhaps hundreds, of new varieties of weapons could be developed, keeping Livermore and its test site in Nevada busy for decades. The potential for these weapons -- nuclear-powered directed-energy weapons, or NDEWs -- is cited here and at the nation's other nuclear weapons design lab in Los Alamos, N.M., as a chief reason to resist a nuclear test ban treaty with the Soviet Union.

"The emphasis on the directed-energy stuff has given the lab a new lease on life," Ray E. Kidder, a weapons designer here, said. "All the other stuff was getting to be pretty routine."

The new weapons could be used to destroy other missiles, to attack satellites, to incapacitate Soviet mobile missiles on the ground, to disrupt enemy communications or for uncounted other missions, according to scientists here. What would distinguish these "third-generation" weapons from existing arms is that some type of energy produced in every nuclear explosion -- X-rays, for example, or microwaves, or gamma rays -- would be stepped-up and focused on a distant target.

"The appropriate way to think of the problem is that a nuclear bomb is a source of power just like a plug in the wall," Miller said. "So conceptually, anything you can do non-nuclearly, you can do with a nuclear bomb.

"The weapons we've looked at in the past have been very indiscriminate," he added. "These new technologies are very selective."

Critics contend that nuclear weapons will never be "selective" enough to make their use less devastating to civilization than the atomic bomb developed in 1945 or hydrogen bomb of 1952. They worry that third-generation weapons could make nuclear war more likely, as leaders become persuaded that a "surgical" or "selective" attack is possible.

"These things are not of any use, but clearly they will be presented to Congress as magical devices," Kosta Tsipis, a physicist at the Massachusetts Institute of Technology, said. "They'll be thinking of these things as tactical weapons. But a nuclear weapon is a nuclear weapon is a nuclear weapon."

The new ferment in nuclear weapons research has been encouraged by the Reagan administration. Richard L. Wagner, until recently Defense Secretary Caspar W. Weinberger's chief assistant for nuclear weapons, told Congress last year that the labs should "explore the technology beyond stated requirements almost in an intellectual sense, the same way that characterized the program back during the '50s and '60s."

Such an attitude appears to be taking hold here, where only the barbed wire rimming the campus reminds visitors that the physicists in open-necked shirts and blue jeans are not chasing ordinary academic pursuits.

"What the potential of these systems will turn out to be in terms of offense or defense is not clear at this juncture -- these areas are new," Roger E. Batzel, Livermore's director, told Congress last year. "They are idea-rich. And we have no reason to believe that we have more than scratched the surface with respect to the potential of these technologies."

Among the 1,700 physicists, engineers and others who work in the weapons programs that occupy this mile-square campus, fewer than 100 sit at computer terminals and design nuclear weapons, Miller said.

The others, working in an odd mix of World War II Navy huts and modern lab buildings, predict atmospheric effects or develop new materials or measure what happens inside nuclear explosions, which resemble nothing in the universe except the interiors of stars.

"All portions of the business are very creative," said Miller, wearing pointy cowboy boots and wire rim glasses. "Absolutely every part of the weapons program is in one fashion unique."

Miller disagreed that the challenge of designing "conventional" nuclear arms has waned. Livermore and Los Alamos compete fiercely to design each new warhead, and Livermore scientists speak proudly of their designs now in the field: warheads for the MX missile, the B83 bomb, the SUBROC antisubmarine weapon and so on.

Moreover, there are new frontiers even in old-fashioned warheads. For example, Livermore is developing an "earth-penetrating warhead" that could burrow into Soviet command bunkers and missile silos -- "to hold at risk what your adversaries hold dearly," as Livermore's arms-control expert Paul S. Brown said.

But the possibilities of third-generation weapons, which are somewhere between brainstorm and battlefield in their development, suggest new frontiers to the physicists here.

The concept that has received most attention is the nuclear-powered X-ray laser championed by Livermore's founder, Edward Teller. Teller envisions the weapon as part of President Reagan's missile defense scheme, a bomb that would explode in outer space and aim its X-rays thousands of miles to burn through Soviet missiles in flight. (The gift shop at Livermore sells Edward Teller T-shirts with the slogan, "Better a shield than a sword.")

Kidder said he believes the violence of the nuclear explosion will not allow sufficiently accurate targeting of X-rays to fit the role Teller sees. But he said the weapon, if it can be built, might be useful as a kind of "searchlight" to destroy "soft" targets in space, such as satellites.

The potential application for missile defense has provided a bureaucratic shelter for third-generation nuclear weapons in Reagan's Strategic Defense Initiative, a top defense priority. Although Reagan has frequently called his initiative "non-nuclear," research on new nuclear weapons consumes a substantial portion of SDI funds.

Most potential third-generation weapons, which scientists have been working on since before Reagan launched SDI in 1983, remain secret. "The only thing we can say we've tested is the X-ray laser," Brown said. By some accounts, the X-ray concept has been tested in underground explosions in Nevada at least five times.

But scientists here also have a few other ideas. There is, for example, the microwave bomb. Its effects, radiated over a long distance, could damage the electronics in mobile enemy missiles that could not be pinpointed by conventional missiles, scientists here said.

The "hypervelocity pellet bomb" might blast out a cloud of pellets that could destroy well-protected targets. Asked how the bomb could be constructed not to vaporize the pellets themselves, Miller replied, "That's the trick. That's why it's a research program."

And there are others: the "electromagnetic pulse bomb," which could disrupt enemy communications; the "optical laser bomb"; the "gamma ray bomb."

None have been proved practical. Even today's nuclear weapons are extraordinarily complex -- the B61 bomb has more than 1,800 parts -- and to validate the basic physics and then develop workable weapons would require years and perhaps dozens of tests for each variant, scientists here said.

Moreover, weapons that emphasize certain effects, such as X-rays, will still generate the other effects of today's nuclear bombs, such as blast. If exploded inside the atmosphere, Tsipis said, they will still have terrible effects.

Brown, Livermore's resident arms-control expert, said that the new weapons may never be built, even if they prove scientifically practical. But he said it is important to keep experimenting and testing to see what is possible in this still unfolding world.

"If we came up with an idea, the Soviets may have too," Brown said. "You can't put a ban on thinking. That's our job, to think of new systems and better ways to accomplish the mission of defense. I don't see systems necessarily going all the way. They the politicians don't have to buy it."

Kidder suggested that Livermore promotes third-generation weapons in part because its funding and recruiting success depends on finding new challenges.

"It was getting pretty pedestrian," he said. "People were aware that they'd come to the end of phase two, and sure, there were a few things to do, but nothing very new. So you had to find something else.

"You want to do something novel and something interesting to keep yourself interested in your work," Kidder added. "Even if there hadn't been an SDI, the lab would have spent a lot of effort on nuclear-powered directed-energy weapons, because that's all that's left."