Skip to content

Commit 07fe43b

Browse files
committed
Handle short structures in the CeSymm iteration
1 parent 5591b2d commit 07fe43b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/internal/CeSymmIterative.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ private void iterate(Atom[] atoms) throws StructureException {
125125
logger.debug("Starting new iteration...");
126126

127127
// Return if the Atom array is too short
128-
if (atoms.length <= params.getWinSize()
129-
|| atoms.length <= params.getMinCoreLength()) {
128+
if ((atoms.length <= params.getWinSize()
129+
|| atoms.length <= params.getMinCoreLength())
130+
&& !levels.isEmpty()) {
130131
logger.debug("Aborting iteration due to insufficient Atom "
131132
+ "array length: %d", atoms.length);
132133
return;
@@ -204,7 +205,7 @@ private void iterate(Atom[] atoms) throws StructureException {
204205
*/
205206
private CeSymmResult reconstructSymmResult(Atom[] atoms)
206207
throws StructureException {
207-
208+
208209
// If one level, nothing to build or calculate
209210
if (levels.size() == 1)
210211
return levels.get(0);

0 commit comments

Comments
 (0)