public void setAtomAt(IAtom atom, int position) { if (atom instanceof IQueryAtom) { super.setAtom(atom, position); } else { throw new IllegalArgumentException("Atom is not of type QueryAtom"); } } }
public void setAtomAt(IAtom atom, int position) { if (atom instanceof IQueryAtom) { super.setAtom(atom, position); } else { throw new IllegalArgumentException("Atom is not of type QueryAtom"); } } }
boolean openRing(int rnum) { if (prev == null) { error = "Cannot open ring, no previous atom"; return false; } if (bond == null) { bond = new QueryBond(null); bond.setExpression(null); } bond.setAtom(prev, 0); rings[rnum] = addBond(prev, bond); numRingOpens++; bond = null; return true; }
void append(IAtom atom) { if (curComponentId != 0) atom.setProperty(CDKConstants.REACTION_GROUP, curComponentId); mol.addAtom(atom); if (prev != null) { if (bond == null) { bond = new QueryBond(mol.getBuilder()); bond.setExpression(new Expr(SINGLE_OR_AROMATIC)); } bond.setAtom(prev, 0); bond.setAtom(atom, 1); addBond(prev, bond); addBond(atom, bond); } else local.put(atom, new LocalNbrs(true)); prev = atom; bond = null; }