use of ambit2.sln.SLNAtom in project ambit-mirror by ideaconsult.
the class SLN2ChemObject method QueryAtomContainerToSLNContainer.
public SLNContainer QueryAtomContainerToSLNContainer(IQueryAtomContainer query) {
clearAllErrorsAndWarnings();
SLNContainer slnCon = new SLNContainer(SilentChemObjectBuilder.getInstance());
for (int i = 0; i < query.getAtomCount(); i++) {
// SLNAtom slnAtom = (SLNAtom) slnContainer.getAtom(i);
// IQueryAtom atom = slnAtomToQueryAtom(slnAtom);
IQueryAtom atom = (IQueryAtom) query.getAtom(i);
SLNAtom slnAtom = queryAtomToSLNAtom(atom);
if (currentConversionWarning != null)
conversionWarnings.add(currentConversionWarning + " for atom: " + (i + 1));
if (slnAtom == null) {
conversionErrors.add(currentConversionError + " for atom: " + (i + 1));
continue;
}
slnCon.addAtom(slnAtom);
// convertedAtoms.put(slnAtom, atom);
}
return slnCon;
}
Aggregations