@Override public boolean matches(IAtom atom) { return qatom.matches(atom); } }
private boolean hasDistanceConstraints(IQueryAtomContainer query) { for (IBond bond : query.bonds()) { if (bond instanceof PharmacophoreQueryBond) return true; } return false; }
/** * Constructor * @param smartQueryAtom query atom * @param container */ public DefaultVFAtomMatcher(IQueryAtom smartQueryAtom, IQueryAtomContainer container) { this(); this.smartQueryAtom = smartQueryAtom; this.symbol = smartQueryAtom.getSymbol(); }
/**{@inheritDoc} */ @Override public boolean matches(IBond bond1, IBond bond2) { return ((IQueryBond) bond1).matches(bond2); } }
/** * Creates an atom expression for the specified primitive and 'value'. */ public Expr(Type op, int val) { setPrimitive(op, val); }
/** * Test whether this expression matches an atom instance. * * @param atom an atom (nullable) * @return the atom matches */ public boolean matches(final IAtom atom) { return atom != null && matches(type, atom, UNKNOWN_STEREO); }
/** * Removes the single electron from the AtomContainer. * *@param singleElectron The SingleElectron to be removed. */ @Override public void removeSingleElectron(ISingleElectron singleElectron) { int pos = indexOf(singleElectron); if (pos != -1) removeSingleElectron(pos); }
/** * Sets the MaxBondOrder attribute of the AtomType object. * * @param maxBondOrder The new MaxBondOrder value * * @see #getMaxBondOrder */ @Override public void setMaxBondOrder(IBond.Order maxBondOrder) { this.maxBondOrder = maxBondOrder; notifyChanged(); }
/** {@inheritDoc} */ @Override public boolean isAromatic() { return getFlag(CDKConstants.ISAROMATIC); }
/** * Returns the position of a given bond in the electronContainers array. It * returns -1 if the bond does not exist. * *@param bond The bond to be sought *@return The Position of the bond in the electronContainers array in [0,..]. */ @Override public int getBondNumber(IBond bond) { return indexOf(bond); }
/** {@inheritDoc} */ @Override public boolean isInRing() { return getFlag(CDKConstants.ISINRING); }
/** * Sets the number of electrons in this bond * @param electronCount The number of electrons in this electron container. * @see #getElectronCount */ @Override public void setElectronCount(Integer electronCount) { this.electronCount = electronCount; notifyChanged(); }
@Override public Iterator<IAtom> iterator() { return new AtomIterator(); } };
@Override public Iterator<ISingleElectron> iterator() { return new SingleElectronIterator(); } };
/** * Returns the number of Bonds for a given Atom. * *@param atom The atom *@return The number of Bonds for this atom */ @Override public int getConnectedBondsCount(IAtom atom) { return getConnectedAtomsCount(atom); }
@Override public boolean matches(IAtom atom) { return qatom.matches(atom); } }
/** * Sets the hybridization of this atom. * * @param hybridization The hybridization * * @see #getHybridization */ @Override public void setHybridization(IAtomType.Hybridization hybridization) { this.hybridization = hybridization; notifyChanged(); }
/** {@inheritDoc} */ @Override public boolean isInRing() { return getFlag(CDKConstants.ISINRING); }
/** * Returns the position of a given single electron in the single electron array. * It returns -1 if the single electron does not exist. * *@param singleElectron The single electron to be sought *@return The Position of the single electron in the array. */ @Override public int getSingleElectronNumber(ISingleElectron singleElectron) { return indexOf(singleElectron); }
/** * Sets the covalent radius for this AtomType. * * @param radius The covalent radius for this AtomType * @see #getCovalentRadius */ @Override public void setCovalentRadius(Double radius) { this.covalentRadius = radius; notifyChanged(); }