Sure.
>and any disease
Impossible. Modeling a drug's effect on mental illness would require... fully simulating a human brain. Modeling the effect of thalidomide on fetuses would require fully simulating fetal development. That's not happening any time soon.
If that drug then also kills the patient, it's not much of a medicine.
Sure you can direct an algorithm to optimize for a metric (like curing a disease), but it will be completely ignorant to all other aspects of being (like not having harmful side-effects).
Genes are not the end all be all to medicine let alone biology. There are places where medicine won't go, such as the delicate structures of the brain. Much too unethical. Neurotransmitters fire across synapses. You will always be uncertain of what temperature or charge you need. No way of telling what's really on the inside. And that's with an incomplete model.
You also can't just zap or plunge in medicine. If you are going gene by gene or protein by protein, yet alone cell by cell, how long is that going to take?