Skip to content

Commit bc85e4e

Browse files
committed
Resolve #523 16 Need to flip conditions, all ICrystals and IAtomContainers.
1 parent 998b83c commit bc85e4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

storage/io/src/main/java/org/openscience/cdk/io/cml/PDBConvention.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ public void endElement(CMLStack xpath, String uri, String local, String raw) {
213213
storeData();
214214
if (xpath.size() == 1) {
215215
// cdo.endObject("Molecule");
216-
if (currentMolecule instanceof IAtomContainer) {
217-
logger.debug("Adding molecule to set");
218-
currentMoleculeSet.addAtomContainer(currentMolecule);
219-
logger.debug("#mols in set: " + currentMoleculeSet.getAtomContainerCount());
220-
} else if (currentMolecule instanceof ICrystal) {
216+
if (currentMolecule instanceof ICrystal) {
221217
logger.debug("Adding crystal to chemModel");
222218
currentChemModel.setCrystal((ICrystal) currentMolecule);
223219
currentChemSequence.addChemModel(currentChemModel);
220+
} else {
221+
logger.debug("Adding molecule to set");
222+
currentMoleculeSet.addAtomContainer(currentMolecule);
223+
logger.debug("#mols in set: " + currentMoleculeSet.getAtomContainerCount());
224224
}
225225
}
226226
}

0 commit comments

Comments
 (0)