@@ -248,8 +248,8 @@ namespace pmfe {
248
248
// if inside==true, dangle i+1 instead of i-1
249
249
Rational NNTM::Ed5 (int i, int j, const RNASequence& seq, bool inside) const {
250
250
// Input specification
251
- assert (i >= 0 && i < seq.len ());
252
- assert (j >= 0 && j < seq.len ());
251
+ assert (i >= 0 and i < seq.len ());
252
+ assert (j >= 0 and j < seq.len ());
253
253
254
254
Rational penalty = 0 ;
255
255
@@ -272,8 +272,8 @@ namespace pmfe {
272
272
// if inside==true, dangle j-1 instead of j+1
273
273
Rational NNTM::Ed3 (int i, int j, const RNASequence& seq, bool inside) const {
274
274
// Input specification
275
- assert (i >= 0 && i < seq.len ());
276
- assert (j >= 0 && j < seq.len ());
275
+ assert (i >= 0 and i < seq.len ());
276
+ assert (j >= 0 and j < seq.len ());
277
277
278
278
Rational penalty = 0 ;
279
279
@@ -330,9 +330,9 @@ namespace pmfe {
330
330
Compute the energy of an internal loop between pairs (i, j) and (ip, jp)
331
331
*/
332
332
// Input specification
333
- assert (i >= 0 && i < seq.len ());
334
- assert (j >= 0 && j < seq.len ());
335
- assert (i < ip && ip < jp && jp < j);
333
+ assert (i >= 0 and i < seq.len ());
334
+ assert (j >= 0 and j < seq.len ());
335
+ assert (i < ip and ip < jp and jp < j);
336
336
337
337
Rational energy = Rational::infinity ();
338
338
@@ -360,7 +360,7 @@ namespace pmfe {
360
360
+ eLL (size)
361
361
+ auPenalty (i, j, seq)
362
362
+ auPenalty (ip, jp, seq);
363
- } else if (size <= 30 && size > 1 ) {
363
+ } else if (size <= 30 and size > 1 ) {
364
364
/* Does not depend upon i and j and ip and jp - Stacking Energies */
365
365
energy = constants.bulge [size]
366
366
+ auPenalty (i, j, seq)
@@ -376,7 +376,7 @@ namespace pmfe {
376
376
/* Internal loop */
377
377
378
378
if (size > 30 ) {
379
- if (! ((size1 == 1 || size2 == 1 ) && constants.gail )) { /* normal internal loop with size > 30*/
379
+ if (not ((size1 == 1 or size2 == 1 ) and constants.gail )) { /* normal internal loop with size > 30*/
380
380
energy = constants.tstki [seq.base (i)][seq.base (j)][seq.base (i + 1 )][seq.base (j - 1 )]
381
381
+ constants.tstki [seq.base (jp)][seq.base (ip)][seq.base (jp + 1 )][seq.base (ip - 1 )] + constants.inter [30 ]
382
382
+ eLL (size)
@@ -396,7 +396,7 @@ namespace pmfe {
396
396
energy = constants.iloop21 [seq.base (jp)][seq.base (ip)][seq.base (j - 1 )][seq.base (i + 2 )][seq.base (i + 1 )][seq.base (j)][seq.base (i)];
397
397
} else if (size == 2 ) { /* 1*1 internal loops */
398
398
energy = constants.iloop11 [seq.base (i)][seq.base (i + 1 )][seq.base (ip)][seq.base (j)][seq.base (j - 1 )][seq.base (jp)];
399
- } else if ((size1 == 1 or size2 == 1 ) && constants.gail ) { /* gail = (Grossly Asymmetric Interior Loop Rule) (on/off <-> 1/0) */
399
+ } else if ((size1 == 1 or size2 == 1 ) and constants.gail ) { /* gail = (Grossly Asymmetric Interior Loop Rule) (on/off <-> 1/0) */
400
400
energy = constants.tstki [seq.base (i)][seq.base (j)][BASE_A][BASE_A] + constants.tstki [seq.base (jp)][seq.base (ip)][BASE_A][BASE_A]
401
401
+ constants.inter [size]
402
402
+ penterm;
@@ -417,8 +417,8 @@ namespace pmfe {
417
417
*/
418
418
419
419
// Input specification
420
- assert (i >= 0 && i < seq.len ());
421
- assert (j >= 0 && j < seq.len ());
420
+ assert (i >= 0 and i < seq.len ());
421
+ assert (j >= 0 and j < seq.len ());
422
422
assert (i < j);
423
423
424
424
Rational energy = Rational::infinity ();
@@ -431,7 +431,7 @@ namespace pmfe {
431
431
energy = constants.hairpin [30 ] + eLL (size) + constants.tstkh [seq.base (i)][seq.base (j)][seq.base (i + 1 )][seq.base (j - 1 )]; /* size penalty + terminal mismatch stacking energy*/
432
432
}
433
433
434
- else if (size <= 30 && size > 4 ) {
434
+ else if (size <= 30 and size > 4 ) {
435
435
energy = constants.hairpin [size] + constants.tstkh [seq.base (i)][seq.base (j)][seq.base (i + 1 )][seq.base (j - 1 )]; /* size penalty + terminal mismatch stacking energy*/
436
436
}
437
437
@@ -455,7 +455,7 @@ namespace pmfe {
455
455
energy += auPenalty (i, j, seq);
456
456
}
457
457
458
- else if (size < 3 && size != 0 ) {
458
+ else if (size < 3 and size != 0 ) {
459
459
/* no terminal mismatch */
460
460
energy = constants.hairpin [size];
461
461
} else if (size == 0 )
@@ -464,16 +464,16 @@ namespace pmfe {
464
464
/* GGG Bonus => GU closure preceded by GG */
465
465
/* i-2 = i-1 = i = G, and j = U; i < j */
466
466
if (i >= 2 ) {
467
- if (seq.base (i - 2 ) == BASE_G && seq.base (i - 1 ) == BASE_G && seq.base (i) == BASE_G
468
- && seq.base (j) == BASE_U) {
467
+ if (seq.base (i - 2 ) == BASE_G and seq.base (i - 1 ) == BASE_G and seq.base (i) == BASE_G
468
+ and seq.base (j) == BASE_U) {
469
469
energy += constants.gubonus ;
470
470
/* printf ("\n GGG bonus for i %d j %d ", i, j); */
471
471
}
472
472
}
473
473
474
474
/* Poly-C loop => How many C are needed for being a poly-C loop */
475
475
Rational tlink = 1 ;
476
- for (int index = 1 ; (index <= size) && (tlink == 1 ); ++index) {
476
+ for (int index = 1 ; (index <= size) and (tlink == 1 ); ++index) {
477
477
if (seq.base (i + index) != BASE_C)
478
478
tlink = 0 ;
479
479
}
@@ -494,8 +494,8 @@ namespace pmfe {
494
494
Compute the energy of a stack of pairs (i, j) and (i+1, j-1)
495
495
*/
496
496
// Input specification
497
- assert (i >= 0 && i < seq.len ());
498
- assert (j >= 0 && j < seq.len ());
497
+ assert (i >= 0 and i < seq.len ());
498
+ assert (j >= 0 and j < seq.len ());
499
499
assert (i < j);
500
500
501
501
return constants.stack [seq.base (i)][seq.base (j)][seq.base (i+1 )][seq.base (j-1 )];
@@ -507,8 +507,8 @@ namespace pmfe {
507
507
*/
508
508
509
509
// Input specification
510
- assert (i >= 0 && i < seq.len ());
511
- assert (j >= 0 && j < seq.len ());
510
+ assert (i >= 0 and i < seq.len ());
511
+ assert (j >= 0 and j < seq.len ());
512
512
assert (i < j);
513
513
514
514
MinBox<Rational> vals;
@@ -527,7 +527,7 @@ namespace pmfe {
527
527
}
528
528
529
529
for (int q = minq; q <= maxq; q++) {
530
- if (q - p > TURN && seq.can_pair (p, q)) {
530
+ if (q - p > TURN and seq.can_pair (p, q)) {
531
531
vals.insert (eL (i, j, p, q, seq) + seq.V [p][q]);
532
532
}
533
533
}
0 commit comments