Was it by chance?
Yes, sometimes, Penicillin was discovered by chance (and good observation), see http://www.nobelprize.org/nobel_prizes/medicine/laureates/1945/fleming-bio.html.
I know some where accidents, but how are the majority found, testing lots of chemicals on your target?
Other important classes, like tetracyclines, were discovered by screening of soil samples for antibacterial activity (The history of the tetracyclines
). At that time it was not known what is the target of tetracycline, it was only observed that it was able to inhibit bacterial growth.
A synthetic antibiotic, nalidixic acid, was discovered as an impurity in the synthesis of another pharmaceutical agent and later became the template for other important antibiotics like ciprofloxacin. (Origins of the Quinolone Class of Antibacterials)
I imagine now we would have the capability to quickly identify structures and molecules unique to pathogens and be able to model them on a computer, and generate suitable proteins or other compounds that can interfere with their bonding/properties to damage the pathogen?
In theory, yes, but from computer simulation to a drug there is a long, bumpy road. Most bacteria have a cell wall (with either one or two membranes, see here for a detailed discussion), so drugs need to penetrate this barrier before reaching their target. Even if they do so, they must also preferably inhibit bacterial enzymes but leave human enzymes active. This is especially complicated for targets, like DNA replication, protein synthesis, etc. which evolved early in evolution and are common to bacteria and humans. Some antibacterial drugs target tiny differences between humans bacteria, for some like Gentamicin it works well, for others like Chloramphenicol the side effects are dose-limiting. Here is a good blog entry on this topic: Antibiotics not as easy as theysay, look at the blog for other excellent comments on drug discovery and antibiotics).
For something like a 70s ribosome in a pathogen, what is the process of being able to understand its structure, its shape, etc? How much effort does it take to model onto a computer? Or instead a single protein (as a 70s ribosome will be more complex), how long does it take to model a new protein?
To quote Wikipedia:
"Prokaryotes have 70S ribosomes, each consisting of a small (30S) and a large (50S) subunit. [..] The large subunit is composed of a 5S RNA subunit (120 nucleotides), a 23S RNA subunit (2900 nucleotides) and 31 proteins."
To get a computer model of the structure for a single protein where a similar protein is known, it takes a few hours. But to validate this model, i.e. showing that the hypothetical structures matches the real structure, it takes months of human work. You can imagine how much work it is for 31 proteins. In addition tiny deviations in the model, may cause your predictions to give false positive or negative hits (i.e. your computer model predicts that inactive compounds bind to the target or real inhibitors don't do anything to the target).
The traditional approach, finding compounds which kill bacteria or inhibit their growth, is much more promising since one might discover novel targets in bacteria and microorganisms came up with dozens of ways of killing their competition. One new approach is to cultivate bacteria which cannot be cultivated with traditional methods and screen them for antibacterial compounds, e.g. as described in this summary of this research article
Some more good reads on this topic: