Skip to content

Commit f2ebc2e

Browse files
committed
Method to get the principal axis index from a RotationGroup
1 parent d365f3f commit f2ebc2e

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ public MultipleAlignmentEnsembleImpl(
154154
blockTr = Calc.getTransformation(rot[bs], shift[bs]);
155155
} catch (IndexOutOfBoundsException e){
156156
blockTr = ident;
157+
} catch (NullPointerException e){
158+
blockTr = ident;
157159
}
158160
blockSet.setTransformations(Arrays.asList(ident, blockTr));
159161
Block block = new BlockImpl(blockSet);
@@ -181,6 +183,8 @@ public MultipleAlignmentEnsembleImpl(
181183
blockTr = Calc.getTransformation(rot[0], shift[0]);
182184
} catch (IndexOutOfBoundsException e){
183185
blockTr = ident;
186+
} catch (NullPointerException e){
187+
blockTr = ident;
184188
}
185189
blockSet.setTransformations(Arrays.asList(ident, blockTr));
186190
for (int bs=0; bs<afp.getBlockNum(); bs++){

biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationGroup.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ public int getHigherOrderRotationAxis(){
307307
public int getTwoFoldsPerpendicular(){
308308
return twoFoldsPerpendicular;
309309
}
310+
311+
public int getPrincipalAxisIndex(){
312+
return principalAxisIndex;
313+
}
310314

311315
private void calcPointGroup() {
312316
complete = false;

0 commit comments

Comments
 (0)