-
Notifications
You must be signed in to change notification settings - Fork 397
Open
Labels
bugBugs and bugfixesBugs and bugfixes
Description
I get a NullPointerException when running the following code:
String pdb = "4i4q";
Structure s = StructureTools.getStructure(pdb);
assertNotNull(s);
Atom[] atoms = StructureTools.getRepresentativeAtomArray(s);
assertNotNull(atoms);
assertEquals(146, atoms.length);
CeSymmResult result = CeSymm.analyze(atoms);
MultipleAlignment msa = result.getMultipleAlignment();
List<Atom[]> msaAtoms = msa.getAtomArrays();
// Commenting our this line fixes the error below
new MultipleAlignmentJmol(msa, msaAtoms);
// Throws NPE
SymmetryTools.divideStructure(result);Stack trace:
Exception in thread "main" java.lang.NullPointerException
at org.biojava.nbio.structure.StructureTools.addGroupToStructure(StructureTools.java:547)
at org.biojava.nbio.structure.symmetry.utils.SymmetryTools.divideStructure(SymmetryTools.java:538)
at main.TestSymmetryDisplay.main(TestSymmetryDisplay.java:53)
The weird thing is that the error goes away if I don't create the MultipleAlignmentJmol instance. We must be modifying the CESymmResult state in a way that breaks divideStructure.
Note that this blocks moving CE-Symm to BioJava 5
Metadata
Metadata
Assignees
Labels
bugBugs and bugfixesBugs and bugfixes