Examples of atoms()


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

        deletedAtoms.get(i).getPoint2d().x+=offset.x;
        deletedAtoms.get(i).getPoint2d().y+=offset.y;
        chemModelRelay.updateAtom(mergedPartnerAtoms.get(i));

        if (droppedContainer!=null) {
              for (IAtom mAt : droppedContainer.atoms()) {
                if (!containerWithMerge.contains(mAt)) {
                  containerWithMerge.addAtom(mAt);
                }
              }
              for (IBond mBond : droppedContainer.bonds()) {
View Full Code Here

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

            chemModelRelay.updateAtom(mergedPartnerAtoms.get(i));

            if (droppedContainer!=null) {
             
              //remove from atc1 what was merged in from atc2
              for (IAtom mAt : droppedContainer.atoms()) {
                if (containerWithMerge.contains(mAt)) {
                  containerWithMerge.removeAtom(mAt);
                }
              }
              for (IBond mBond : droppedContainer.bonds()) {
View Full Code Here

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

            // It could be that only a  selected bond is going to be moved.
            // So make sure that the attached atoms are included, otherwise
            // the undo will fail to place the atoms back where they were
           atomsToMove = new HashSet<IAtom>();

            for (IAtom atom : selectedAC.atoms()) {
                atomsToMove.add(atom);
            }
            for (IBond bond : selectedAC.bonds()) {
                for (IAtom atom : bond.atoms()){
                    atomsToMove.add(atom);
View Full Code Here

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

   */
  public void mouseClickedDown(Point2d worldCoord) {
     
      IAtomContainer selectedAC = getSelectedAtomContainer( worldCoord );
      if(selectedAC == null) return;
      for(IAtom atom:selectedAC.atoms()) {
            if(add){
                chemModelRelay.addSingleElectron(atom);
            }else{
                chemModelRelay.removeSingleElectron(atom);
            }
View Full Code Here

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

          if(mol != null) {
            StructureConverter.configureMolecule(mol);         
            makeStructure = !MultiFragmentStructureDiagramGenerator.hasStructure(mol);
            if(mol.getAtomCount() == 1) makeStructure = true;
           
            for (Iterator<IAtom> iterator = mol.atoms(); iterator.hasNext();) {//remove explicit hydrogen and make hydrogens properties of atoms to make viewing easier
              IAtom a = iterator.next();
              int hydrogen =0;
              List<IAtom> neighbours = mol.getConnectedAtomsList(a);
              for (IAtom neighbour : neighbours) {
                if (neighbour.getAtomicNumber() ==1 ){
View Full Code Here

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

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

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

      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

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

          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

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

      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
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.