@Override public Object clone() throws CloneNotSupportedException { ChemSequence clone = (ChemSequence) super.clone(); // clone the chemModels clone.chemModelCount = getChemModelCount(); clone.chemModels = new ChemModel[clone.chemModelCount]; for (int f = 0; f < clone.chemModelCount; f++) { clone.chemModels[f] = (ChemModel) ((ChemModel) chemModels[f]).clone(); } return clone; }
/** * {@inheritDoc} */ @Override public void addBond(IBond bond) { ensureBondCapacity(numBonds + 1); final BaseBondRef bref = newBondRef(bond); bref.setIndex(numBonds); addToEndpoints(bref); bonds[numBonds++] = bref; }
/** * Add an Atom and makes it the C-terminus atom. * * @param atom The Atom that is the C-terminus * * @see #getCTerminus */ @Override public void addCTerminus(IAtom atom) { super.addAtom(atom); setCTerminus(atom); }
@Override public IChemObjectBuilder getBuilder() { return SilentChemObjectBuilder.getInstance(); } }
/** * {@inheritDoc} */ @Override public IAtomContainer newAtomContainer() { if (CDK_LEGACY_AC) return new AtomContainer(0,0,0,0); else return new AtomContainer2(0,0,0,0); } }
/** * Clones this AminoAcid object. * * @return The cloned object */ @Override public IAminoAcid clone() throws CloneNotSupportedException { AminoAcid clone = (AminoAcid) super.clone(); // copying the new N-terminus and C-terminus pointers if (getNTerminus() != null) clone.setNTerminus(clone.getAtom(getAtomNumber(getNTerminus()))); if (getCTerminus() != null) clone.setCTerminus(clone.getAtom(getAtomNumber(getCTerminus()))); return clone; }
/** * {@inheritDoc} */ @Override public void addAtom(IAtom atom) { if (contains(atom)) return; ensureAtomCapacity(numAtoms + 1); final BaseAtomRef aref = newAtomRef(atom); aref.setIndex(numAtoms); atoms[numAtoms++] = aref; }
@BeforeClass public static void setUp() { setTestObjectBuilder(new ITestObjectBuilder() { @Override public IChemObject newTestObject() { return new PDBAtom(new Element()); } }); }
/** * {@inheritDoc} */ @Override public int getConnectedBondsCount(IAtom atom) { return getAtomRef(atom).getBondCount(); }
@Override public Iterator<IElectronContainer> iterator() { return new ElectronContainerIterator(); } };
/** * {@inheritDoc} */ @Override public IAtomContainer newAtomContainer() { if (CDK_LEGACY_AC) return new AtomContainer(0,0,0,0); else return new AtomContainer2(0,0,0,0); } }
/** * Clones this AminoAcid object. * * @return The cloned object */ @Override public IAminoAcid clone() throws CloneNotSupportedException { AminoAcid clone = (AminoAcid) super.clone(); // copying the new N-terminus and C-terminus pointers if (getNTerminus() != null) clone.setNTerminus(clone.getAtom(getAtomNumber(getNTerminus()))); if (getCTerminus() != null) clone.setCTerminus(clone.getAtom(getAtomNumber(getCTerminus()))); return clone; }
/** * {@inheritDoc} */ @Override public void addBond(IBond bond) { ensureBondCapacity(numBonds + 1); final BaseBondRef bref = newBondRef(bond); bref.setIndex(numBonds); addToEndpoints(bref); bonds[numBonds++] = bref; }
/** * {@inheritDoc} */ @Override public void addAtom(IAtom atom) { if (contains(atom)) return; ensureAtomCapacity(numAtoms + 1); final BaseAtomRef aref = newAtomRef(atom); aref.setIndex(numAtoms); atoms[numAtoms++] = aref; }
@Override public Object clone() throws CloneNotSupportedException { ChemSequence clone = (ChemSequence) super.clone(); // clone the chemModels clone.chemModelCount = getChemModelCount(); clone.chemModels = new ChemModel[clone.chemModelCount]; for (int f = 0; f < clone.chemModelCount; f++) { clone.chemModels[f] = (ChemModel) ((ChemModel) chemModels[f]).clone(); } return clone; }
/** * Add an Atom and makes it the C-terminus atom. * * @param atom The Atom that is the C-terminus * * @see #getCTerminus */ @Override public void addCTerminus(IAtom atom) { super.addAtom(atom); setCTerminus(atom); }
/** * {@inheritDoc} */ @Override public int getConnectedBondsCount(IAtom atom) { return getAtomRef(atom).getBondCount(); }