Skip to content

Commit 0f322ee

Browse files
committed
Catching empty coordinates earlier in quat sym detection
1 parent 50fa989 commit 0f322ee

File tree

1 file changed

+6
-0
lines changed
  • biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ public class Subunits {
6565
* @param modelNumbers Model number for the subunit
6666
*/
6767
public Subunits(List<Point3d[]> caCoords, List<Integer> sequenceClusterIds, List<Boolean> pseudoStoichiometry, List<Double> minSequenceIdentity, List<Double> maxSequenceIdentity, List<Integer> folds, List<String> chainIds, List<Integer> modelNumbers) {
68+
69+
for (int i=0; i<caCoords.size(); i++) {
70+
if (caCoords.get(i).length==0)
71+
throw new IllegalArgumentException("0-length coordinate array in subunit coordinates with index " +i+". Can't calculate quaternary symmetry for empty coordinates.");
72+
}
73+
6874
this.caCoords = caCoords;
6975
this.sequenceClusterIds = sequenceClusterIds;
7076
this.pseudoStoichiometry = pseudoStoichiometry;

0 commit comments

Comments
 (0)