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:
- Rip some vital chemical to shreds. Chlorine and other light halogens (fluorine, iodine) are huge here, because they have such high electron affinity that they can tear apart the otherwise relatively stable bonds within most organics, destroying that molecule. The most effective ones don't form any stable compounds; fluorine, for instance, is very effective at shredding organic compounds because it isn't happy just barging in on any one organic molecule and making itself at home; it'll deprotonate this one, split that one in half, before finally binding tightly and insolubly to calcium (robbing your body of that essential mineral).
- Bind to a vital chemical and not let go. Carbon monoxide is a deadly danger to most aerobic organisms because the hemoglobin (or related compound) that loosely binds oxygen for transport to cells will bind more stably with CO, so the chemical can't transport oxygen and can't get rid of the CO. A lot of more selective poisons attach themselves to enzymes, not necessarily destroying them, but preventing the enzyme doing the work it's supposed to. Cyanide is poisonous specifically because it works like (well, it is) a nitrile group, of which there are very many in a lot of inorganic biochemicals, and specifically it targets a key enzyme involved in cell respiration and programmed cell death.
- Mimic a chemical's interaction with a key receptor, causing it to go haywire. Many other "selective" poisons and antibiotics work this way; they fit into the receptor sites that a neurotransmitter or enzyme would, triggering some behavior of the cell, and by flooding the cellular environment with this chemical you cause the underlying programmed reaction to go haywire (or stop completely). A lot of insecticides and pesticides do this; they increase or shut down cell metabolism, or in creatures with a nervous system they mimic or trigger the release of massive amounts of neurotransmitters, basically causing cardiac or respiratory arrest because any normal message to control these actions is completely overridden.
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).