The ab initio method depends on what problem we are solving. We need to find the problem and try to solve it from the basic rules of quantum mechanics and classical mechanics. Most of the problems can be solved from first principle methods. For classical electromagnetics, the four equations of maxwells is the basic of first principle method.