Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for rcsb/symmetry#118
  • Loading branch information
sbliven committed Aug 30, 2024
commit e9e0f007298c8c90c9b78a906b9f37b5e6dd72b8
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import static org.junit.Assert.*;
import static org.junit.Assume.assumeNotNull;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -60,7 +61,7 @@ public void testEasyCases() throws IOException, StructureException {
CeSymmResult result = CeSymm.analyze(atoms);

assertTrue(result.isSignificant());
assertEquals(result.getNumRepeats(), orders[i]);
assertEquals(orders[i], result.getNumRepeats());
}
}

Expand All @@ -75,4 +76,26 @@ public void testAlphafold() throws IOException, StructureException {
CeSymmResult result = CeSymm.analyze(atoms);
assertNotNull(result);
}

@Test
public void testShort() throws IOException, StructureException {
// ERIC2_c35200, a near-perfect 15 residue beta-solenoid
// At 15 residues this should reliably trigger rcsb/symmetry#118
URL url = this.getClass().getResource("/AF-V9WDR2-F1-model_v4.cif");
assumeNotNull(url);
String file = url.getPath();
Structure s = StructureIO.getStructure(file);
assertNull(s.getPdbId());
Atom[] atoms = StructureTools.getRepresentativeAtomArray(s);
CESymmParameters params = new CESymmParameters();
params.setMinCoreLength(10); // Ensure it gets refined (should be 15 long)
CeSymmResult result = CeSymm.analyze(atoms, params);
assertNotNull(result);
assertTrue(result.isSignificant());
assertEquals(9, result.getNumRepeats());
assertEquals("R",result.getSymmGroup());
assertNotNull(result.getAxes());
assertNotEquals("Error", result.getReason());

}
}
Loading