/** * Constructs a shallow copy of the provided IAtomContainer with the same * atoms, bonds, electron containers and stereochemistry of another * AtomContainer. Removing atoms/bonds in this copy will not affect * the original, however changing the properties will. * * @param src the source atom container */ AtomContainer2(IAtomContainer src) { this(src.getAtomCount(), src.getBondCount(), src.getLonePairCount(), src.getSingleElectronCount()); for (IAtom atom : src.atoms()) addAtom(atom); for (IBond bond : src.bonds()) addBond(bond); for (ISingleElectron se : src.singleElectrons()) addSingleElectron(se); for (ILonePair lp : src.lonePairs()) addLonePair(lp); for (IStereoElement se : src.stereoElements()) addStereoElement(se); }
/** * Constructs a shallow copy of the provided IAtomContainer with the same * atoms, bonds, electron containers and stereochemistry of another * AtomContainer. Removing atoms/bonds in this copy will not affect * the original, however changing the properties will. * * @param src the source atom container */ AtomContainer2(IAtomContainer src) { this(src.getAtomCount(), src.getBondCount(), src.getLonePairCount(), src.getSingleElectronCount()); for (IAtom atom : src.atoms()) addAtom(atom); for (IBond bond : src.bonds()) addBond(bond); for (ISingleElectron se : src.singleElectrons()) addSingleElectron(se); for (ILonePair lp : src.lonePairs()) addLonePair(lp); for (IStereoElement se : src.stereoElements()) addStereoElement(se); }
if (!atom.getFlag(CDKConstants.VISITED)) { atom.setFlag(CDKConstants.VISITED, true); addAtom(atom);
if (!atom.getFlag(CDKConstants.VISITED)) { atom.setFlag(CDKConstants.VISITED, true); addAtom(atom);