On the Characterization and Software Implementation of General Protein Lattice Models