public IChemModel parseSubstance(XMLStreamReader parser) throws Exception { IChemModel model = builder.newInstance(IChemModel.class); // assume the current element is PC-Compound if (!parser.getLocalName().equals("PC-Substance")) { return null; } while (parser.next() != XMLEvent.END_DOCUMENT) { if (parser.getEventType() == XMLEvent.END_ELEMENT) { if (EL_PCSUBSTANCE.equals(parser.getLocalName())) { break; // done parsing the molecule } } else if (parser.getEventType() == XMLEvent.START_ELEMENT) { if (EL_PCCOMPOUNDS.equals(parser.getLocalName())) { IAtomContainerSet set = parseCompoundsBlock(parser); model.setMoleculeSet(set); } else if (EL_PCSUBSTANCE_SID.equals(parser.getLocalName())) { String sid = getSID(parser); model.setProperty(CDKConstants.TITLE, sid); } } } return model; }
public IChemModel parseSubstance(XMLStreamReader parser) throws Exception { IChemModel model = builder.newInstance(IChemModel.class); // assume the current element is PC-Compound if (!parser.getLocalName().equals("PC-Substance")) { return null; } while (parser.next() != XMLEvent.END_DOCUMENT) { if (parser.getEventType() == XMLEvent.END_ELEMENT) { if (EL_PCSUBSTANCE.equals(parser.getLocalName())) { break; // done parsing the molecule } } else if (parser.getEventType() == XMLEvent.START_ELEMENT) { if (EL_PCCOMPOUNDS.equals(parser.getLocalName())) { IAtomContainerSet set = parseCompoundsBlock(parser); model.setMoleculeSet(set); } else if (EL_PCSUBSTANCE_SID.equals(parser.getLocalName())) { String sid = getSID(parser); model.setProperty(CDKConstants.TITLE, sid); } } } return model; }
} else if (line.indexOf("SCF Done:") >= 0) { model.setProperty("org.openscience.cdk.io.Gaussian03Reaer:SCF Done", line.trim()); } else if (line.indexOf("Harmonic frequencies") >= 0) {
} else if (line.indexOf("SCF Done:") >= 0) { model.setProperty("org.openscience.cdk.io.Gaussian03Reaer:SCF Done", line.trim()); } else if (line.indexOf("Harmonic frequencies") >= 0) {
model.setProperty(CDKConstants.REMARK, line.trim()); } else if (line.indexOf("Harmonic frequencies") >= 0) { logger.debug("Level of Theory for this model: " + levelOfTheory); description = lastRoute + ", model no. " + modelCounter; model.setProperty(CDKConstants.DESCRIPTION, description); } else {
model.setProperty(CDKConstants.REMARK, line.trim()); } else if (line.indexOf("Harmonic frequencies") >= 0) { logger.debug("Level of Theory for this model: " + levelOfTheory); description = lastRoute + ", model no. " + modelCounter; model.setProperty(CDKConstants.DESCRIPTION, description); } else {