Jimmy Carter takes out a pen and jots down what Leonid Brezhnev has told him in a moment of small talk.

"God will not forgive us if we fail."

The officially atheistic leader of the Soviet Communist Party struck a responsive chord with the American president, a born-again Christian, in their first casual meeting Friday. So much so that the next morning Carter makes a decision. He revises the opening remarks he had carefully prepared before leaving Washington and begins the first formal meeting of the Vienna summit by reminding Brezhnev of his own words.

"When we first met," Carter begins, looking at Brezhnev across the table in the conference room of the American Embassy, "Your first words were, 'God will not forgive us if we fail.'"

Carter says he shares this sentiment, according to American officials, and with that, the American president begins his first day of summitry with the aged Soviet leader who has done this sort of thing five times with Carter's predecessors.

The two leaders are meeting to deliver, in this first session, their overall assessment of the global situation. They are flanked by nine of their top advisers but the two presidents do all the talking.

By the time the session ends, Carter's aides note with cautious satisfaction that so far there have been no surprises. The two leaders had disagreed on what they were expected to disagree on: which country was triggering the escalation in military spending, and the responsibility for turbulence in Third World nations.

Carter officials feel that this summit, which they had long awaited, is being conducted in an atmosphere somewhat less formal than some of Carter's discussions with other world leaders. There is, in the opening remarks, some give-and-take, sometimes in the form of a serious interjection, sometimes in the form of a light jibe.

"It was certainly a more relaxed session than I expected," one American official will say later. Within the context of the limited expectations they have set for this summit, the Carter men finished the opening session encouraged that, at least so far, things seem to be going well enough.

Brezhnev speaks first.

He mentions defense spending and says that the Soviet Union has been forced to respond to increases in American military spending.

The Soviet president speaks for 40 minutes from a prepared text on military spending and other topics. The Americans note that he seems to have departed from it to offer an elaboration or two.

When Carter speaks, he takes the position that the Soviets have been spending a percentage of their national income for the military that is twice as large as the U.S. level.

Brezhnev interjects to say that American spending on technology has forced the Soviet Union to increase its spending.

One American official says later: "That was the only time when two president got into what we would call the real propaganda rhetoric."

Before leaving Vienna, the United States hopes to lay the groundwork for the next round of strategic arms negotiations - SALT III - which will get to the question of reductions in nuclear arms and address, for the first time, the question of forces in Europe. They also hope to develop a regular channel by which American and Soviet defense and military officials will discuss mutual problems.

To do this, the American officials spent long hours drafting a scenario on how the specific issues will be discussed. They have even written down suggested comments to be made by the officials sitting beside Carter, in the event that the president involves them in the discussions - in the hopes of involving their Soviet counterparts, particularly the defense ministers and military chiefs, in the responses.

All of this, White House officials feel, may lay a groundwork for later agreements. They talk, wistfully it seems, of Lyndon Johnson's 1967 Glassboro summit meeting with Soviet Premier Alexei Kosygin, of how it was not considered at the time to have been a great success - yet, in retrospect, it was when the United States made its first argument for SALT, as then-defense secreatary Robert McNamara made a strong case that antiballistic missile systems should be eliminated by both sides, because their existence could only lead the other side to build bigger and better missiles by which to thwart the ABM system.

The Carter officials would be very pleased if, in future years, someone would look back to Vienna as having paved the way for SALT III. This is, in large measure, what their scenarios are all about.

Epilogue: Soviet Ambassador to the United States Anatoliy Dobrynin, a veteran of many American-Russian summit tables, is chatting with some Carter officials prior to the first session, and he decides to pass on an old story - with, perhaps, a new message.

He wants to tell the new generation of American leadership about what he describes as a little mixup on the American side back in Glassboro.

McNamara had come to Glassboro prepared to talk in great and classified detail about the pitfalls of the ABM.

But, Dobrynin said, Johnson called on McNamara to give his briefing at an unexpected time. McNamara saw that there were many junior Soviet and American aides not cleared for the material and cut and trimmed his presentation to a shadow of its original form.

Dobrynin said, however, that he had heard the full briefing earlier, and was able to fill in the details for Kosygin. Thus the full impact of the McNamara argument was felt.

Says one Carter official: "The message of the ambassador's story was that at summits, things don't always work out as planned." CAPTION: Picture 1, Presidents Carter and Brezhnev wave as they depart from the U.S. Embassy after the first round of talk. UPI; Picture 2, President Carter grins at story related by President Brezhnev yesterday. AP