After a while, the anxiety dreams -- the old, old nightmares of failing without knowing why-began to come again and again to Patricia O'Toole.

The dreams began not too long after she was well into what eventually was more than five years of researching and writing her book "The Five of Hearts: An Intimate Portrait of Henry Adams and His Friends 1880-1918."

"I saw Henry and Clover Adams riding their horses, but when I went toward them, they melted away. I met John Hay at a party, but he turned and walked in the other direction. Clara Hay sent me on errands that I couldn't do. I dreamed about Clarence King over and over again. In one dream, he held out his hand to me and said, 'I can explain everything.' And then he was gone."

For a century or so, and especially recently, many books have been written about the lives of each of those five long-gone Lafayette Square literati and aesthetes. Still, O'Toole's book (Clarkson Potter/Publishers) is the first to interweave the intricacies of their accomplishments, scandals and secrets.

O'Toole is also the curator of the first exhibit of portraits and memorabilia of the five and their famous friends -- a show that opened yesterday at the National Portrait Gallery, continuing through Nov. 4.

The high-ceilinged mid-1800s rooms of the Portrait Gallery offer some of the flavor that the wits and the writers of the day found in the Adams salon at 1607 H St. on Lafayette Square. Henry Adams, also a historian, and Marian Hooper Adams, called "Clover," a woman of letters and an accomplished pioneer photographer, were the hosts. They were able to entertain with some elegance on their annual income of $25,000 (five times a senator's pay).

The habitues, permitted to bring with them anyone but bores, were bachelor Clarence King, an explorer and Western surveyor, who became the first head of the U.S. Geological Survey; John Hay, a financier and journalist (whose big scoop was the guilt of Mrs. O'Leary's cow in the Chicago fire), and later ambassador to Great Britain and secretary of state; and his wife, Clara Stone Hay, the much-needed silent audience -- Clover Adams once said Hay talked enough for two.

The Adamses' salons were held at an elongated teatime. They quipped their way through dinner, critiqued the political and philosophic, scientific and social, love and literary scenes until past midnight, when Clover Adams crumpled.

The five, who as children had no doubt spent too much time being brilliant, alone and different, made up for it as adults by organizing a mock secret society that they called the Five of Hearts.

From 1880 to 1881, they delighted in their friendship, and thought no one else in the world was so clever, so affectionate. They remained friends, over distances of time, geography and death -- forever.

Much that is revealed in the book is, understandably, not in the exhibit, but the exhibit gives a full and rich picture of the best face of their time.

The Portrait Gallery show also marks the first retrospective of Clover Hooper Adams's photographs -- Henry would never allow his wife's photographs to be published. All have been lent from that rich treasure house, the Massachusetts Historical Society.

No painted portrait is known of Clover Adams. Indeed, the one small, not too clear photograph of Clover Adams in the exhibit is the only one known to exist except for a partial view of her in a group picnic photograph.

Thank heaven, the show does not include the vial of the photographic chemical potassium cyanide that, O'Toole reveals in her book, was found by a niece in Henry Adams's desk, 33 years after Clover Adams died of the poison. ("It made cold chills go down my back to find he kept it so long," says O'Toole.) Nor does it include the fragment of Adams's diary with the notation indicating he burned the record of their 13 years of marriage. Or Clover Adams's last letter to her sister, found on her desk when she was discovered in her death throes.

Nowhere is there in the exhibit (though there is in the book) a picture of Clarence King's common-law wife, Ada Copeland of West Point, Ga., a k a Mrs. Todd, later Mrs. King, the unsophisticated woman for whom King rejected all the rich and worldly prospects he knew. Without the knowledge of the Hearts or anyone else from his overt life, they lived together for 13 years and had five children. She thought he was a railway porter.

Museum-goers looking for evidence of the unsanctioned love of John Hay and Nannie Lodge will have to judge if the twinkle in the eyes of their portraits is enough, or read O'Toole's book, the first to uncover that alliance. As far as O'Toole could find, neither Hay's wife, Clara, nor Nannie Lodge's husband, Massachusetts Sen. Henry Cabot Lodge, knew of the affair. But Secretary of State Hay's bitter conflicts with Lodge made it difficult to get congressional approval of State's Open Door Policy in China, or the Hay-Pauncefote Treaty, from which the United States eventually gained control of the Panama Canal Zone.

But there is plenty in the show to excite the imagination about the fivesome.

Visitors will need a certain amount of courage to pass the familiar, larger-than-life, hooded, bronze figure that guards the exhibition entry. The Museum of American Art lent the 1969 casting of one of Washington's most highly regarded outdoor sculptures to the Portrait Gallery.

The original 1886-1891 massive memorial sculpture was made by a friend of the Five of Hearts, Augustus Saint-Gaudens, to brood over the grave of Clover and, eventually, of Henry Adams, in Rock Creek Cemetery. Though the statue is often called "Grief," Adams despised the term. O'Toole writes that Adams instructed the sculptor that the work should express "acceptance of the inevitable." She adds that Adams, in his old age, remarked that the sculpture was all he cared to say about the Five of Hearts.

The exhibit also includes letters on the stationery John Hay had printed for the friends, with the symbol of five pips on a playing card; a tea set, the pieces in the shape of hearts, decorated with a clock set at 5 and festooned with roses, that Clarence King caused to have made (Stuart Symington Jr., a Hay descendant, lent the set); and a menu celebrating an otherwise unremembered occasion of a Five of Hearts dinner.

Henry Adams was not fond of being portrayed. You can still see the line through the middle where he tore in two an 1894 watercolor of him in his Washington study, painted by his wife's cousin, Mabel Hooper La Farge. So it is understandable why a 1904 bronze medallion by Saint-Gaudens portrays Adams with a porcupine body.

Hay, on the other hand, apparently didn't mind being immortalized by art. Three formal portraits of him are shown here: a bronze bust by Saint-Gaudens, an oil by John Singer Sargent and a watercolor by Sir Leslie Ward.

Other famous faces of the era look down from the wall at the visitor: Andrew Carnegie, who offered to buy the Philippines and give its people their independence, is shown painted as a cherubic-looking man. Henry James earned the right to have his portrait hung in this country by his friendship and his short story about the Adamses and their salon.

Also on the wall from the Hay house is a stained-glass window designed by John La Farge, a longtime friend and traveling companion of Adams. Former senator Stuart Symington and former representative James M. Symington, Hay descendants, gave the window to the Museum of American Art, which lent it to the show.

The other day, O'Toole evoked the intimate elite, appropriately at lunch in the bright and light Hay-Adams Hotel dining room, where the baronial Hay and Adams houses by architect H.H. Richardson once stood. The houses were torn down in 1927 and replaced by the Harry Wardman hotel, designed by Mihran Mesrobian (and remodeled in the 1980s).

The lives of the Five of Hearts are the story of Washington, the country and the world, in the Gilded Age between the War Between the States and World War I. As O'Toole said, "Their times were much like our own: conspicuous consumption, advances in technology, shifts in social life -- and all the anxieties that people feel now about change."

The similarity of their swing into the next century with our own helps account for the interest in their era. The great amount of raw material now organized and, in many cases, available on microfilm facilitates the academic study of the period. However, it's still a treasure hunt. O'Toole writes that the Five of Hearts "left a trail of paper reaching from Massachusetts to California: thousands of letters, diary entries, memoirs, literary manuscripts and documents as diverse as receipts, death certificates, menus, court testimony and architectural drawings."

O'Toole, a freelance financial writer whose column appears in Lear's magazine, first learned of the Five of Hearts in 1983 from Paul C. Nagel's "Descent From Glory: Four Generations of the John Adams Family." "And when I went to the library to find a book about the Five, I found there was none. I was first disappointed, and then elated." O'Toole set out on her own parallel survey, culminating now with the book and the exhibit.

Hay and Adams knew each other in Washington when they were both young secretaries, Hay to Lincoln and Adams to his father, Massachusetts Rep. Charles Francis Adams.

On a western trip Adams met King completing his Fortieth Parallel survey. O'Toole writes: "In the evening, after a long, gritty day in the field, he {King} donned silk hose, gleaming shoes, and a suit freshly pressed by his valet. Materializing at the campfire, he looked to an astonished Henry Adams like 'a bird of paradise rising in the sagebrush.' "

The actual time in which all five came together was but a teatime in their lives. From 1880 to 1881, they were all in Washington, with their headquarters Clover and Henry's rented house (from W.W. Corcoran).

The five had similarities. The women were both heiresses. All were small -- King at 5 feet 6 inches, the tallest; Clover Adams, 5 feet 2 inches, the smallest. The Adamses' living room had made-to-fit low-and-small leather chairs. In 1880, Clara Hay was youngest at 31, Hay and Adams oldest at 42. Four were wits, punsters, jokers. Clara was a good audience, unlike some people who found the other four too precious and too provocative.

But they had important differences. Clover and Henry Adams had no children, Clara and John Hay had four. Hay, without especially caring, fell into powerful positions through presidency after presidency. Adams never attained the office that he felt his heritage, his abilities and his taste entitled him. Clover Adams was never encouraged to develop her talent. King died bankrupt.

In temperament they also were different.

O'Toole writes that Henry's brother, Charles, "On hearing of Henry's engagement to Clover, he had burst out, 'Heavens! -- no -- they're all crazy as coots. She'll kill herself, just like her aunt.' "

Photographer and social chronicler Clover was descended from Massachusetts gentry, known for its money and melancholia. Her mother was a poet, her women relatives feminists. Her letters are still worth reading for the picture they give of the daily life of the well-to-do and of her scorn for such social pretentions as formal calls.

After her death, Henry spent the rest of his life traveling (including two hilarious trips, one with La Farge and later one with King in what they said was pursuit of exotic women), presiding over a breakfast salon that met in his Lafayette House at lunchtime, and in a strange romance (if that is the right word) with Elizabeth Sherman Cameron, the beauty of that Washington era, who was married to Sen. J. Donald Cameron, rich and repulsive.

Journalist, historian, man of letters, Henry Adams, was, of course, the descendant of four erstwhile Washington figures -- great-grandson of John and Abigail Adams, the first president and wife to move into the White House, in 1800; and grandson of the sixth president and his consort, John Quincy and Louisa Catherine Adams. Henry himself was a journalist first, because, as he said, it was "the last resource of the educated poor who could not be artists and would not be tutors."

The Library of America has recently republished his histories, "The Education of Henry Adams," "Mont-Saint-Michel and Chartres," and the novels "Democracy" and "Esther." "Democracy" was the first roman a` clef about the intertwining of Washington society and politics. All five were accused of writing it, individually and jointly.

Balladeer, politician, financier, banker, journalist and diplomat, John Hay coauthored Lincoln's 10-volume biography and is credited with an anti-union novel, "The Bread-Winners." His wife, Clara Stone, was notable for her maternal affections and her pleasure in ladies luncheons.

Geologist Clarence King ("King of Diamonds," he was sometimes nicknamed) was a treasure hunter, a swashbuckler, a lover of adventure and unsophisticated women. He conceived and carried out the idea of the Geological Survey of the Fortieth Parallel, which preceded the railroad west. His book, "Mountaineering in the Sierra Nevada," has recently been reprinted. Hay and Adams dreamed of the life King led, and Hay paid for much of it. Once King signed a letter to Hay, O'Toole writes, "unremittingly yours." At his death, Hay discovered the truth of King's unlicensed marriage and set up a trust fund for his family.

O'Toole quotes Clover Adams as saying of the two men's hero worship of King that she "never knew such fanatic adoration could exist in this practical age." Henry said women "were jealous of the power {King} had over men; but women were many and Kings were one."

O'Toole, in her last chapter, "Playing Out the Hand," writes:

"To a literal mind, the Five of Hearts had ceased in 1885 with the death of Clover Adams but the extraordinary flower of their friendship bloomed until the spring day in 1918 when Henry was buried beside Clover at Rock Creek. In the last summer at Beverly {Mass.}, his eyesight nearly gone, Henry had spent hours listening to his nieces read the philosophy of his old friend William James. It was James, pondering the mysteries of the human mind in the 'Principles of Psychology,' who had speculated that perhaps the greatest breach in nature was a breach between one mind and another. For all their intimacy, each of the hearts felt this isolation as keenly as James... . To Henry Adams, master of irony, the separateness of human beings was unbearable -- and inevitable. The tragedy of the Five of Hearts was that they could not close the breach. The glory was that they tried."