Package org.openscience.cdk.interfaces

Examples of org.openscience.cdk.interfaces.IRing.atoms()


      newAtomContainer = (IAtomContainer) chemModel.getMoleculeSet()
          .getAtomContainer(0);
    else
      chemModel.getMoleculeSet().addAtomContainer(newAtomContainer);
    newAtomContainer.add(ring);
    updateAtoms(ring, ring.atoms());
    structureChanged();
    if (undoable && getUndoRedoFactory() != null
        && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getAddAtomsAndBondsEdit(getIChemModel(),
View Full Code Here


      newAtomContainer = (IAtomContainer) chemModel.getMoleculeSet()
          .getAtomContainer(0);
    else
      chemModel.getMoleculeSet().addAtomContainer(newAtomContainer);
    newAtomContainer.add(ring);
    updateAtoms(ring, ring.atoms());
    structureChanged();
    if (undoable && getUndoRedoFactory() != null
        && getUndoRedoHandler() != null) {
      IUndoRedoable undoredo = getUndoRedoFactory()
          .getAddAtomsAndBondsEdit(getIChemModel(),
View Full Code Here

      return chemModel.getBuilder().newInstance(IRing.class);
    } else {
      ringPlacer.placeSpiroRing(newRing, sharedAtoms, sharedAtomsCenter,
          ringCenterVector, bondLength);

      for (IAtom ringAtom : newRing.atoms()) {
        if (ringAtom != atom) {
          if (phantom)
            this.addPhantomAtom(ringAtom);
          else
            sourceContainer.addAtom(ringAtom);
View Full Code Here

          this.addPhantomBond(ringBond);
        else
          sourceContainer.addBond(ringBond);
      }
      if (!phantom)
        updateAtoms(sourceContainer, newRing.atoms());

      JChemPaintRendererModel rModel = this.getRenderer().getRenderer2DModel();
      double d = rModel.getHighlightDistance() / rModel.getScale();
      for (IAtom newatom : newRing.atoms()) {
        if (atom != newatom && getClosestAtom(atom) != null) {
View Full Code Here

      if (!phantom)
        updateAtoms(sourceContainer, newRing.atoms());

      JChemPaintRendererModel rModel = this.getRenderer().getRenderer2DModel();
      double d = rModel.getHighlightDistance() / rModel.getScale();
      for (IAtom newatom : newRing.atoms()) {
        if (atom != newatom && getClosestAtom(atom) != null) {
          atom.getPoint2d().x += d;
        }
      }
      structureChanged();
View Full Code Here

            sharedAtomsCenter, ringCenterVector, bondLength);
      }
    }

    // add the ring to the source container/phantoms
    for (IAtom ringAtom : newRing.atoms()) {
      if (ringAtom != atom) {
        if (phantom)
          this.addPhantomAtom(ringAtom);
        else
          sourceContainer.addAtom(ringAtom);
View Full Code Here

        this.addPhantomBond(ringBond);
      else
        sourceContainer.addBond(ringBond);
    }
    if (!phantom)
      updateAtoms(sourceContainer, newRing.atoms());
    for (IAtom newatom : newRing.atoms()) {
      if (atom != newatom && getClosestAtom(atom) != null) {
        JChemPaintRendererModel rModel = this.getRenderer().getRenderer2DModel();
        double d = rModel.getHighlightDistance() / rModel.getScale();
        atom.getPoint2d().x += d;
View Full Code Here

      else
        sourceContainer.addBond(ringBond);
    }
    if (!phantom)
      updateAtoms(sourceContainer, newRing.atoms());
    for (IAtom newatom : newRing.atoms()) {
      if (atom != newatom && getClosestAtom(atom) != null) {
        JChemPaintRendererModel rModel = this.getRenderer().getRenderer2DModel();
        double d = rModel.getHighlightDistance() / rModel.getScale();
        atom.getPoint2d().x += d;
      }
View Full Code Here

    // atoms
    IRing newRing = createAttachRing(sharedAtoms, size, "C", phantom);
    ringPlacer.placeFusedRing(newRing, sharedAtoms, sharedAtomsCenter,
        ringCenterVector, bondLength);
    // add the new atoms and bonds
    for (IAtom ringAtom : newRing.atoms()) {
      if (ringAtom != firstAtom && ringAtom != secondAtom) {
        if (phantom)
          addPhantomAtom(ringAtom);
        else
          sourceContainer.addAtom(ringAtom);
View Full Code Here

        else
          sourceContainer.addBond(ringBond);
      }
    }
    if (!phantom)
      updateAtoms(sourceContainer, newRing.atoms());

    JChemPaintRendererModel rModel = this.getRenderer().getRenderer2DModel();
    double d = rModel.getHighlightDistance() / rModel.getScale();
    for (IAtom atom : newRing.atoms()) {
      if (atom != firstAtom && atom != secondAtom
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.