In this chapter, I review the basic algorithm underlying the CODEML model implemented in the software package PAML. This is intended as a companion to the software's manual, and a primer to the extensive literature available on CODEML. At the end of this chapter, I hope that you will be able to understand enough of how CODEML operates to plan your own analyses.
Keywords: Branch models; Branch-Site models; CODEML; Codon substitution model; Natural selection; PAML; Site models; dN/dS ratio.