Half of the homosexuals in a 12-square-mile area of San Francisco around Castro Street have at some point been infected with the AIDS virus, according to a random study of 1,035 men living in the predominantly gay neighborhood.

The study found that those with more than 10 sexual partners in the previous two years were twice as likely to have been infected and carry AIDS antibodies as those with 10 or fewer partners. It also confirmed previous findings that receptive anal intercourse is the riskiest sexual practice for AIDS transmission.

The scientists, headed by Dr. Warren Winkelstein of the University of California at Berkeley, are following the progress of the 1,035 men in an attempt to see which ones contract the virus and which of them go on to develop acquired immune deficiency syndrome.

Blood samples were collected between June 1984 and January 1985. Further tests on some of the men who tested positive for the AIDS antibody found that about half of them still had the virus in their blood, Winkelstein said in an interview, "and that's quite a large proportion."

There may be several reasons that scientists could not find the virus in the other half of antibody-positive men, Winkelstein said. The virus may have gone into hiding in immune system cells, the body may have fought off the attack, or efforts to find the virus may simply have failed, he said.

The ongoing study hopes to determine why some people infected with the AIDS virus remain healthy and others die.