Skip to content

Commit 6be8893

Browse files
committed
Important bug fix in the insertGap() move of MC
1 parent e95ffa3 commit 6be8893

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

biojava-structure-gui/src/main/java/demo/DemoMultipleMC.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void main(String[] args) throws IOException, StructureException, I
3232
//Protein Kinases (CEMC paper)
3333
//List<String> names = Arrays.asList("1cdk.A", "1cja.A", "1csn", "1b6c.B", "1ir3.A", "1fgk.A", "1byg.A", "1hck", "1blx.A", "3erk", "1bmk.A", "1kob.A", "1tki.A", "1phk", "1a06");
3434
//DHFR (Gerstein 1998 paper)
35-
//List<String> names = Arrays.asList("d1dhfa_", "8dfr", "d4dfra_", "3dfr");
35+
List<String> names = Arrays.asList("d1dhfa_", "8dfr", "d4dfra_", "3dfr");
3636
//TIM barrels (MUSTA paper)
3737
//List<String> names = Arrays.asList("1tim.A", "1vzw", "1nsj", "3tha.A", "4enl", "2mnr", "7tim.A", "1tml", "1btc", "a1piia1", "6xia", "5rub.A", "2taa.B");
3838
//Calcium Binding (MUSTA paper)
@@ -44,7 +44,7 @@ public static void main(String[] args) throws IOException, StructureException, I
4444
//GPCRs
4545
//List<String> names = Arrays.asList("2z73.A", "1u19.A", "4ug2.A", "4xt3", "4or2.A", "3odu.A");
4646
//Immunoglobulins (MAMMOTH paper)
47-
List<String> names = Arrays.asList("2hla.B", "3hla.B", "1cd8", "2rhe", "1tlk", "1ten", "1ttf");
47+
//List<String> names = Arrays.asList("2hla.B", "3hla.B", "1cd8", "2rhe", "1tlk", "1ten", "1ttf");
4848
//Globins (MAMMOTH, POSA, Gerstein&Levitt and MUSTA papers)
4949
//List<String> names = Arrays.asList("1mbc", "1hlb", "1thb.A", "1ith.A", "1idr.A", "1dlw", "1kr7.A", "1ew6.A", "1it2.A", "1eco", "3sdh.A", "1cg5.B", "1fhj.B", "1ird.A", "1mba", "2gdm", "1b0b", "1h97.A", "1ash.A", "1jl7.A");
5050
//Rossman-Fold (POSA paper)

biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/mc/MultipleAlignmentOptimizerMC.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ private void optimizeMC(int maxIter) throws StructureException {
193193
//Randomly select one of the steps to modify the alignment.
194194
//Because two moves are biased, the probabilities are not the same
195195
double move = rnd.nextDouble();
196-
if (move < 0.5){
196+
if (move < 0.4){
197197
moved = shiftRow();
198198
if (debug) System.out.println("did shift");
199199
}
200-
else if (move < 0.8){
200+
else if (move < 0.7){
201201
moved = expandBlock();
202202
if (debug) System.out.println("did expand");
203203
}
204-
else if (move < 0.9){
204+
else if (move < 0.85){
205205
moved = shrinkBlock();
206206
if (debug) System.out.println("did shrink");
207207
}
@@ -319,7 +319,8 @@ private boolean insertGap() {
319319
if (rnd.nextDouble() > 0.5) { //Introduce some randomness in the choice
320320
structure = str;
321321
block = b;
322-
position = col;
322+
position = col;
323+
maxDist = residueDistances.get(str, column);
323324
}
324325
}
325326
}

0 commit comments

Comments
 (0)