Logo Search packages:      
Sourcecode: cdk version File versions  Download package

boolean org::openscience::cdk::AtomContainer::contains ( IAtom  atom  )  [inline, inherited]

True, if the AtomContainer contains the given atom object.

Parameters:
atom the atom this AtomContainer is searched for
Returns:
True, if the AtomContainer contains the given atom object

Implements org::openscience::cdk::interfaces::IAtomContainer.

Reimplemented in org::openscience::cdk::debug::DebugAminoAcid, org::openscience::cdk::debug::DebugAtomContainer, org::openscience::cdk::debug::DebugBioPolymer, org::openscience::cdk::debug::DebugCrystal, org::openscience::cdk::debug::DebugMolecule, org::openscience::cdk::debug::DebugMonomer, org::openscience::cdk::debug::DebugPolymer, org::openscience::cdk::debug::DebugRing, and org::openscience::cdk::debug::DebugStrand.

Definition at line 1424 of file AtomContainer.java.

References org::openscience::cdk::AtomContainer::atoms(), and org::openscience::cdk::AtomContainer::getAtomCount().

Referenced by org::openscience::cdk::AtomContainer::add(), org::openscience::cdk::Polymer::addAtom(), org::openscience::cdk::AtomContainer::addAtom(), org::openscience::cdk::AtomContainer::addBond(), org::openscience::cdk::AtomContainer::contains(), org::openscience::cdk::graph::invariant::ConjugatedPiSystemsDetector::detect(), org::openscience::cdk::AtomContainer::getBond(), org::openscience::cdk::AtomContainer::getBondOrderSum(), org::openscience::cdk::AtomContainer::getConnectedAtomsCount(), org::openscience::cdk::AtomContainer::getConnectedAtomsList(), org::openscience::cdk::AtomContainer::getConnectedBondsList(), org::openscience::cdk::AtomContainer::getConnectedElectronContainersList(), org::openscience::cdk::AtomContainer::getConnectedLonePairsCount(), org::openscience::cdk::AtomContainer::getConnectedLonePairsList(), org::openscience::cdk::AtomContainer::getConnectedSingleElectronsCount(), org::openscience::cdk::AtomContainer::getConnectedSingleElectronsList(), org::openscience::cdk::AtomContainer::getMaximumBondOrder(), org::openscience::cdk::AtomContainer::getMinimumBondOrder(), org::openscience::cdk::RingSet::getRings(), and org::openscience::cdk::AtomContainer::removeAtomAndConnectedElectronContainers().

      {
            for (int i = 0; i < getAtomCount(); i++)
            {
                  if (atom == atoms[i]) return true;
            }
            return false;
      }


Generated by  Doxygen 1.6.0   Back to index