"'Fitmodel' estimates the parameters of various codon-based models of substitution, including those described in Guindon, Rodrigo, Dyer and Huelsenbeck (2004). These models are especially useful as they accommodate site-specific switches between selection regimes without a priori knowledge of the positions in the tree where changes of selection regimes occurred.
The program will ask for two input files: a tree file and a sequence file. The tree should be unrooted and in NEWICK format. The sequences should be in PHYLIP interleaved or sequential format. If you are planning to use codon-based models, the sequence length should be a multiple of 3. The program provides four types of codon models: M1, M2, M2a, and M3 (see PAML manual). Moreover, M2, M2a and M3 can be combined with 'switching' models (option 'M'). Two switching models are implemented: S1 and S2. S1 constraints the rates of changes between dN/dS values to be uniform (e.g., the rates of changes between negative and positive selection is constrained to be the same as the rate of change between neutrality and positive selection) while S2 allows for differents rates of change between the different classes of dN/dS values.
If you are using a 'switching' model, 'fitmodel' will output file with the following names: your_sequence_file_trees_w1, your_sequence_file_trees_w2, your_sequence_file_trees_w3 and your_sequence_file_trees_wbest. The w1, w2 and w3 files give the estimated tree with probabilities of w1, w2, and w3 (three maximum likelihood dN/dS ratio estimates) calculated on each edge of the tree and for each site. Hence, the first tree in one of these files reports the probabilities calculated at the first site of the alignment. Instead of probabilities, the wbest file allows you to identify which of the tree dN/dS is the most probable on any give edge, at any given site. A branch with label 0.0 means that w1 is the most probable class, 0.5 indicates the w2 is the most probable and 1.0 means that w3 has the highest posterior probability." (README.txt)