Mayor Feinstein has acknowledged that the San Francisco law's effectiveness will depend on voluntary cooperation. Responding to contentions that the ordinance will open the door to illegal searches and seizures, the Mayor and the Chief of Police, Cornelius Murphy, have repeatedly said there will be no attempt to track down or collect weapons from people's homes. Rifle Group Assails Law

Mr. Stone of the rifle association asserted that experience had shown that residents would not relinquish their pistols, and he assailed the ordinance as a law that ''will make criminals out of thousands of law-abiding citizens.''

''You've got a criminal statute that nobody is going to want to enforce,'' he said. ''It will just take money away from some other enforcement needs.''

Officials in Morton Grove, Ill., where a citywide ban was enacted last February, have reported that only a few guns were turned in. In August of 1980, New York State enacted a law providing for a minimum one-year jail term for most persons convicted of carrying unlicensed, loaded handguns in public places.

In New York City, however, residents may apply for a permit. Applicants are photographed, fingerprinted and investigated before permits are issued, according to Sgt. Ed Burns of the Police Department.

Under New York law, people who normally carry large sums of money can obtain a permit, an exemption not contained in the San Francisco ordinance.

In lobbying for passage of the San Francisco law, proponents stressed figures that show gun-related crimes on the rise, particularly domestic violence or ''gun firings in the heat of violence,'' while overall crime has decreased. The city had 126 homicides last year, of which 86 were the result of gunshot wounds, according to the police.