Are there ways to compute what chemicals kill a give bacteria but not another given bacteria ? Does that help much to make medication ?
The basic idea is sound, and is used to some degree; however, there are significant difficulties inherent in "tailoring" a chemical to selectively target certain organisms and not others.
There are three things that a chemical can do that make it toxic to cellular life:
The problem with all this comes in identifying which bacteria have a particular enzyme, receptor or other targeted chemical process, and thus would be susceptible to poisoning by the chemical. In addition, the chemical must not be toxic to human biochemistry (otherwise, no matter how beneficial it might be as a disinfecting agent, it will never see approval as an antibiotic medicine).
Antibiotics must have selective toxicity; while they do not affect eukaryotic cells (such as the ones that make up most plants and animals, thus allowing the chemical to be taken internally or directly applied), they have a much more pronounced effect on bacterial and archaeal cells. Usually, the chemical targets something common to a large class of bacteria (such as the thick peptidoglycan mesh forming the cell wall of Gram-positive bacteria), or most/all bacterial cells (such as the S30 robosomal subunit, key to bacterial protein synthesis and thus found in nearly all bacteria, but completely absent from eukaryote cells which use a different mechanism). However, even within an antibiotic's "target class", there are bacteria that are naturally resistant (perhaps they don't accept the chemical through the cell membrane due to some variation unique to the genus) or develop genetic resistance through overuse or misuse.
Also, bacteria are fickle; most are at least harmless if not beneficial in certain areas (E. coli, for instance, produces the essential vitamin K2 in your intestine), but lethal in others (ingestion of e-coli or introduction through an open cut can cause a fatal infection). Staph is relatively harmless on the skin, but fatal in the spine. Antibiotics don't stop and question bacteria; they kill any bacteria that comes across them, and so overuse of antibiotics to kill one harmful bacteria will kill the bacteria in beneficial places as well.
Lastly, not every infection is bacterial. Fungi and protozoa produce a significant portion of food-borne illnesses and poisonings, as well as other types of infection. These life forms are eukaryotes and unaffected by most antibacterial agents (in fact, penicillin was discovered when a fungus contaminated a bacterial culture; the fungus produces the antibiotic chemical as a natural defense).