# Path: phydmslib/constants.py
# N_AA = len(INDEX_TO_AA)
# 
# N_NT = len(INDEX_TO_NT)
# 
# AA_TO_INDEX = {aa: i for (i, aa) in INDEX_TO_AA.items()}


import random
import unittest
import copy
import numpy
import scipy.optimize
import sympy
import phydmslib.models
from phydmslib.constants import N_AA, N_NT, AA_TO_INDEX
"""Tests invquadratic prior in `ExpCM_fitprefs`.

Written by Jesse Bloom.
"""




class test_fitprefs_invquadraticprior(unittest.TestCase):
    """Test `ExpCM_fitprefs` with inverse quadratic prior."""

    MODEL = phydmslib.models.ExpCM_fitprefs

    def setUp(self):
        """Set up for tests."""
        numpy.random.seed(1)
        random.seed(1)
        nsites = 1
        minpref = 0.001
        self.prefs = []
        for _r in range(nsites):

# Path: phydmslib/constants.py
# N_AA = len(INDEX_TO_AA)
# 
# N_NT = len(INDEX_TO_NT)
# 
# AA_TO_INDEX = {aa: i for (i, aa) in INDEX_TO_AA.items()}


# Path: tests/test_expcm_fitprefs_invquadraticprior.py
import random
import unittest
import copy
import numpy
import scipy.optimize
import sympy
import phydmslib.models
from phydmslib.constants import N_AA, N_NT, AA_TO_INDEX

"""Tests invquadratic prior in `ExpCM_fitprefs`.

Written by Jesse Bloom.
"""




class test_fitprefs_invquadraticprior(unittest.TestCase):
    """Test `ExpCM_fitprefs` with inverse quadratic prior."""

    MODEL = phydmslib.models.ExpCM_fitprefs

    def setUp(self):
        """Set up for tests."""
        numpy.random.seed(1)
        random.seed(1)
        nsites = 1
        minpref = 0.001
        self.prefs = []
        for _r in range(nsites):

            rprefs = numpy.random.dirichlet([0.7] * N_AA)