// source code generated by dimer.py
#include "muscle_context.h"

static SCORE GapScoreMM(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapOpen = ctx->params.g_scoreGapOpen;
    SCORE &g_scoreGapExtend = ctx->params.g_scoreGapExtend;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapOpen*(PPA.m_LL*PPB.m_LG + PPA.m_LG*PPB.m_LL + PPA.m_LG*PPB.m_GL + PPA.m_GL*PPB.m_LG) +
	  g_scoreGapExtend*(PPA.m_LL*PPB.m_GG + PPA.m_GG*PPB.m_LL) +
	  g_scoreGapAmbig*(PPA.m_GL*PPB.m_GG + PPA.m_GG*PPB.m_GL);
	}

static SCORE GapScoreMD(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapOpen = ctx->params.g_scoreGapOpen;
    SCORE &g_scoreGapExtend = ctx->params.g_scoreGapExtend;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapOpen*(PPA.m_LL*PPB.m_LL + PPA.m_LL*PPB.m_GL + PPA.m_GL*PPB.m_LL + PPA.m_GL*PPB.m_GL) +
	  g_scoreGapExtend*(PPA.m_LL*PPB.m_LG + PPA.m_LL*PPB.m_GG) +
	  g_scoreGapAmbig*(PPA.m_GL*PPB.m_LG + PPA.m_GL*PPB.m_GG);
	}

static SCORE GapScoreMI(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapOpen = ctx->params.g_scoreGapOpen;
    SCORE &g_scoreGapExtend = ctx->params.g_scoreGapExtend;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapOpen*(PPA.m_LL*PPB.m_LL + PPA.m_LL*PPB.m_GL + PPA.m_GL*PPB.m_LL + PPA.m_GL*PPB.m_GL) +
	  g_scoreGapExtend*(PPA.m_LG*PPB.m_LL + PPA.m_GG*PPB.m_LL) +
	  g_scoreGapAmbig*(PPA.m_LG*PPB.m_GL + PPA.m_GG*PPB.m_GL);
	}

static SCORE GapScoreDM(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapOpen = ctx->params.g_scoreGapOpen;
    SCORE &g_scoreGapExtend = ctx->params.g_scoreGapExtend;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapOpen*(PPA.m_LG*PPB.m_LL + PPA.m_LG*PPB.m_GL) +
	  g_scoreGapExtend*(PPA.m_LL*PPB.m_LG + PPA.m_LL*PPB.m_GG) +
	  g_scoreGapAmbig*(PPA.m_GL*PPB.m_LG + PPA.m_GL*PPB.m_GG + PPA.m_GG*PPB.m_LL + PPA.m_GG*PPB.m_GL);
	}

static SCORE GapScoreDD(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapExtend = ctx->params.g_scoreGapExtend;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapExtend*(PPA.m_LL*PPB.m_LL + PPA.m_LL*PPB.m_LG + PPA.m_LL*PPB.m_GL + PPA.m_LL*PPB.m_GG) +
	  g_scoreGapAmbig*(PPA.m_GL*PPB.m_LL + PPA.m_GL*PPB.m_LG + PPA.m_GL*PPB.m_GL + PPA.m_GL*PPB.m_GG);
	}

static SCORE GapScoreDI(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapOpen = ctx->params.g_scoreGapOpen;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapOpen*(PPA.m_LL*PPB.m_LL + PPA.m_LL*PPB.m_GL + PPA.m_GL*PPB.m_LL + PPA.m_GL*PPB.m_GL) +
	  g_scoreGapAmbig*(PPA.m_LG*PPB.m_LL + PPA.m_LG*PPB.m_GL + PPA.m_GG*PPB.m_LL + PPA.m_GG*PPB.m_GL);
	}

static SCORE GapScoreIM(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapOpen = ctx->params.g_scoreGapOpen;
    SCORE &g_scoreGapExtend = ctx->params.g_scoreGapExtend;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapOpen*(PPA.m_LL*PPB.m_LG + PPA.m_GL*PPB.m_LG) +
	  g_scoreGapExtend*(PPA.m_LG*PPB.m_LL + PPA.m_GG*PPB.m_LL) +
	  g_scoreGapAmbig*(PPA.m_LL*PPB.m_GG + PPA.m_LG*PPB.m_GL + PPA.m_GL*PPB.m_GG + PPA.m_GG*PPB.m_GL);
	}

static SCORE GapScoreID(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapOpen = ctx->params.g_scoreGapOpen;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapOpen*(PPA.m_LL*PPB.m_LL + PPA.m_LL*PPB.m_GL + PPA.m_GL*PPB.m_LL + PPA.m_GL*PPB.m_GL) +
	  g_scoreGapAmbig*(PPA.m_LL*PPB.m_LG + PPA.m_LL*PPB.m_GG + PPA.m_GL*PPB.m_LG + PPA.m_GL*PPB.m_GG);
	}

static SCORE GapScoreII(const ProfPos &PPA, const ProfPos &PPB)
	{
    MuscleContext *ctx = getMuscleContext();
    SCORE &g_scoreGapExtend = ctx->params.g_scoreGapExtend;
    SCORE &g_scoreGapAmbig = ctx->params.g_scoreGapAmbig;
	return
	  g_scoreGapExtend*(PPA.m_LL*PPB.m_LL + PPA.m_LG*PPB.m_LL + PPA.m_GL*PPB.m_LL + PPA.m_GG*PPB.m_LL) +
	  g_scoreGapAmbig*(PPA.m_LL*PPB.m_GL + PPA.m_LG*PPB.m_GL + PPA.m_GL*PPB.m_GL + PPA.m_GG*PPB.m_GL);
	}
