예제 #1
0
int main()
{
	check1();
	check2();

	convert1();
	convert2();
	convert3();
	convert4();
	convert5();

	return 0;
}
예제 #2
0
void param_read_alternative_temperature(const char *path, param_t p, 
                                        real_t temperature, int use_dna_params)
{
  struct param DG;
  struct param DH;
  param_t dg=&DG;//gibbs free energy parameters at 37C
  param_t dh=&DH;//enthalpy parameters
  param_read_from_text(path, p, use_dna_params,0);
  param_read_from_text(path, &DG, use_dna_params,0);
  param_read_from_text(path, &DH, use_dna_params,1);
  p->use_dna_params = use_dna_params;
  p->use_enthalpy_params = 0;
  p->temperature = temperature;
  int i,j,k,l,m,n,o,pp;
  for(i=0;i<NBASE;i++){
    for(j=0;j<NBASE;j++){
      for(k=0;k<NBASE;k++){
        convert3(p->dangle_3p,dg->dangle_3p,dh->dangle_3p,p->temperature,i,j,k);
        convert3(p->dangle_5p,dg->dangle_5p,dh->dangle_5p,p->temperature,i,j,k);
        for(l=0;l<NBASE;l++){
          convert4(p->coaxial,dg->coaxial,dh->coaxial,p->temperature,i,j,k,l);
          convert4(p->coaxstack,dg->coaxstack,dh->coaxstack,p->temperature,i,j,k,l);
          convert4(p->stack,dg->stack,dh->stack,p->temperature,i,j,k,l);
          convert4(p->tstack,dg->tstack,dh->tstack,p->temperature,i,j,k,l);
          convert4(p->tstackcoax,dg->tstackcoax,dh->tstackcoax,p->temperature,i,j,k,l);
          convert4(p->tstackh,dg->tstackh,dh->tstackh,p->temperature,i,j,k,l);
          convert4(p->tstacki,dg->tstacki,dh->tstacki,p->temperature,i,j,k,l);
          convert4(p->tstacki1n,dg->tstacki1n,dh->tstacki1n,p->temperature,i,j,k,l);
          convert4(p->tstacki23,dg->tstacki23,dh->tstacki23,p->temperature,i,j,k,l);
          convert4(p->tstackm,dg->tstackm,dh->tstackm,p->temperature,i,j,k,l);
          for(m=0;m<NBASE;m++){
            for(n=0;n<NBASE;n++){
              p->int11[i][j][k][l][m][n] = dgT(dg->int11[i][j][k][l][m][n],dh->int11[i][j][k][l][m][n],p->temperature);
              for(o=0;o<NBASE;o++){
                p->int21[i][j][k][l][m][n][o] = dgT(dg->int21[i][j][k][l][m][n][o],dh->int21[i][j][k][l][m][n][o],p->temperature);
                for(pp=0;pp<NBASE;pp++){
                  p->int22[i][j][k][l][m][n][o][pp] = dgT(dg->int22[i][j][k][l][m][n][o][pp],dh->int22[i][j][k][l][m][n][o][pp],p->temperature);
                }
              }
            }
          }
        }
      }
    }
  }
  for(i=0;i<p->ntriloop;i++)
    p->triloop[i].val = dgT(dg->triloop[i].val,dh->triloop[i].val,p->temperature);
  for(i=0;i<p->ntloop;i++)
    p->tloop[i].val = dgT(dg->tloop[i].val,dh->tloop[i].val,p->temperature);
  for(i=0;i<p->nhexaloop;i++)
    p->hexaloop[i].val = dgT(dg->hexaloop[i].val,dh->hexaloop[i].val,p->temperature);
  for(i=0;i<LOOP_MAX+1;i++){
    p->internal_loop_initiation[i] = dgT(dg->internal_loop_initiation[i],dh->internal_loop_initiation[i],p->temperature);
    p->bulge_loop_initiation[i] = dgT(dg->bulge_loop_initiation[i],dh->bulge_loop_initiation[i],p->temperature);
    p->hairpin_loop_initiation[i] = dgT(dg->hairpin_loop_initiation[i],dh->hairpin_loop_initiation[i],p->temperature);
  }
  p->Extrapolation_for_large_loops = dgT(dg->Extrapolation_for_large_loops,dh->Extrapolation_for_large_loops,p->temperature);
  p->maximum_correction = dgT(dg->maximum_correction,dh->maximum_correction,p->temperature);
  p->fm_array_first_element = dgT(dg->fm_array_first_element,dh->fm_array_first_element,p->temperature);
  p->a = dgT(dg->a,dh->a,p->temperature);
  p->b = dgT(dg->b,dh->b,p->temperature);
  p->c = dgT(dg->c,dh->c,p->temperature);
  p->multibranched_loop_offset = p->a;
  p->multibranched_loop_per_nuc_penalty = p->b;
  p->multibranched_loop_helix_penalty = p->c;
  p->a_2c = p->a + 2*p->c;
  p->a_2b_2c = p->a + 2*p->b + 2*p->c;
  p->terminal_AU_penalty = dgT(dg->terminal_AU_penalty,dh->terminal_AU_penalty,p->temperature);
  p->bonus_for_GGG_hairpin = dgT(dg->bonus_for_GGG_hairpin,dh->bonus_for_GGG_hairpin,p->temperature);
  p->c_hairpin_slope = dgT(dg->c_hairpin_slope,dh->c_hairpin_slope,p->temperature);
  p->c_hairpin_intercept = dgT(dg->c_hairpin_intercept,dh->c_hairpin_intercept,p->temperature);
  p->c_hairpin_of_3 = dgT(dg->c_hairpin_of_3,dh->c_hairpin_of_3,p->temperature);
  p->Bonus_for_Single_C_bulges_adjacent_to_C = dgT(dg->Bonus_for_Single_C_bulges_adjacent_to_C,dh->Bonus_for_Single_C_bulges_adjacent_to_C,p->temperature);

  p->Extrapolation_for_large_loops = dgT(dg->Extrapolation_for_large_loops,dh->Extrapolation_for_large_loops,p->temperature);
}