/*created@2007Nov18*/
/*Codon reassignment via AI state*/
#include
#include
#include
/*walking system*/
#define LENGTH 70 //tRNAの長さ
#define W 0.0 //アンチコドン変異(CD化推進部位)でのpの変化量
#define Z 0.0 //アンチコドン変異(CD化推進部位)でのlの変化量
#define AI_P 2.0 //AI化の推進部位変異での変化量
#define AI_L 0.5 //AI化の推進部位変異での変化量
#define D 60.0 //領域[D,LENGTH]が中立部位になる
/*animo acid availability*/
#define A1 0.6
#define A2 0.1
#define GETA 10 //コドン再配置が生じるためにAI状態いるべき最低時間
#define BETA 100
/*codon system's paramters*/
#define BASEPOINT 1000.0
#define GAP 10.0
#define CODON1_WIDTH 50.0
#define CODON2_WIDTH 50.0
/*trna system*/
//l:trna range of recognition, p:center of range
//dl:change of range , dp:walking length
//So far, trna2 is fixed.
double l1,p1;
double l2,p2;
double dp,dl;
/*amino acid quantity*/
int limit_time;
/*変異回数 (walk()の呼び出し回数)*/
int t;
/*setting of codons' range */
double cdn1_min,cdn1_max;
double cdn2_min,cdn2_max;
/*AI state flag*/
//1:AI state, 0:NOT AI state
int cdn2_ai_flg = 0;
/*functions*/
init();
init_aa();
aa_comp();
walk();
int is_ai();
main(){
init();
init_aa();
while(1){
walk();
t++;
printf("aaa\n");
// is_ai();
while( is_ai() == 1 ){
printf("is_ai()=true\n");
aa_comp();
printf("limit_time = %5d \n",limit_time);
walk();
t++;
}
//if reassignment failed, initialize the x1,x2
init_aa();
}
}
init(){
cdn2_min = BASEPOINT;
cdn2_max = cdn2_min + CODON2_WIDTH;
cdn1_min = cdn2_max + GAP;
cdn1_max = cdn1_min + CODON1_WIDTH;
p1 = cdn1_min + CODON1_WIDTH / 2.0;
l1 = CODON1_WIDTH / 2.0;
p2 = cdn2_min + CODON2_WIDTH / 2.0;
l2 = CODON2_WIDTH / 2.0;
t = 0;
}
init_aa(){ //アミノ酸に対するtrna初期濃度
limit_time = (int) BETA / ( A1 - A2 ) + GETA;
}
aa_comp(){
limit_time--;
if( limit_time <= 0 ){
printf("codon reassigned.\n");
printf("mutation time is %5d \n",t);
exit(EXIT_SUCCESS);
}
}
walk(){
double rnd;
double dp = 0.0;
double dl = 0.0;
rnd = drand48() * LENGTH;
if( rnd >= 0.0 && rnd < 3.0 ){
//hit trna in the anticodon
printf("Mutation in anticodon.\n");
dp = W;
dl = Z;
}else if( rnd >= 3.0 && rnd < D ){
//hit trna in the non-anticodon, but effective
dp = AI_P;
dl = AI_L;
}else if( rnd >= D && rnd <= LENGTH){
//hit trna in the non-anticodon, ineffective
dp = 0.0;
dl = 0.0;
}
rnd = drand48();
if( rnd > 0.5 ) dp = -1*dp;
rnd = drand48();
if( rnd > 0.5 ) dl = -1*dl;
l1 = l1 + dl;
p1 = p1 + dp;
}
int is_ai(){
if( ( p1 - l1 ) <= cdn2_max ){
cdn2_ai_flg = 1;
}else{
cdn2_ai_flg = 0;
}
return cdn2_ai_flg;
}
2007年11月19日月曜日
AI state codon reassignment
Codon reassignments via AI state
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿