Examples of atoms()


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

            if (selection != null) {
                IAtomContainer ac = selection.getConnectedAtomContainer();
                if (ac != null) {
                    int implicitHs = 0;
                    for (IAtom atom : ac.atoms()) {
                        if (atom.getImplicitHydrogenCount() != null) {
                            implicitHs += atom.getImplicitHydrogenCount();
                        }
                    }
                    String formula = MolecularFormulaManipulator
View Full Code Here

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

                    ReactionManipulator.getAllAtomContainers(
                            (IReaction)object)) {
                    wholeModel.add(container);
                }
                ShapeSelection container = new RectangleSelection();
                for (IAtom atom : wholeModel.atoms()) {
                    container.atoms.add(atom);
                }
                for (IBond bond : wholeModel.bonds()) {
                    container.bonds.add(bond);
                }
View Full Code Here

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

                    MoleculeSetManipulator.getAllAtomContainers(
                            reaction.getReactants())) {
                        wholeModel.add(container);
                }
                ShapeSelection container = new RectangleSelection();
                for (IAtom atom : wholeModel.atoms()) {
                    container.atoms.add(atom);
                }
                for (IBond bond : wholeModel.bonds()) {
                    container.bonds.add(bond);
                }
View Full Code Here

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

                    MoleculeSetManipulator.getAllAtomContainers(
                            reaction.getProducts())) {
                        wholeModel.add(container);
                }
                ShapeSelection container = new RectangleSelection();
                for (IAtom atom : wholeModel.atoms()) {
                    container.atoms.add(atom);
                }
                for (IBond bond : wholeModel.bonds()) {
                    container.bonds.add(bond);
                }
View Full Code Here

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

            double r = model.getSelectionRadius() / model.getScale();

            double d = 4 * r;
            IAtomContainer selectedAC = selection.getConnectedAtomContainer();
            if (selectedAC != null) {
                for (IAtom atom : selectedAC.atoms()) {
                    Point2d p = atom.getPoint2d();
                    IRenderingElement element;
                    element = new OvalElement(
                          p.x, p.y, d, false, selectionColor);
                    selectionElements.add(element);
View Full Code Here

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

        IAtom atomA = (IAtom) it.next();
        IAtom atomB = mergeMap.get(atomA);
        Vector2d shift = new Vector2d();
        shift.sub(atomB.getPoint2d(), atomA.getPoint2d());

        for (IAtom shiftAtom : movedAtomContainer.atoms()) {
          shiftAtom.getPoint2d().add(shift);
        }
      }
    }
    List<IAtom> mergedAtoms = new ArrayList<IAtom>();
View Full Code Here

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

      for (IAtom atom : container1.atoms()) {

        if (!atom.equals(mergedAtom)) {
          if (container1.getBond(mergedAtom, atom) != null) {
            if (model.getMerge().containsKey(atom)) {
              for (IAtom atom2 : container2.atoms()) {
                if (!atom2.equals(mergedPartnerAtom)) {
                  if (container1.getBond(mergedPartnerAtom,
                      atom2) != null) {
                    if (model.getMerge().get(atom).equals(
                        atom2)) {
View Full Code Here

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

 
  public void mouseClickedDown(Point2d worldCoordinate) {
      IAtomContainer selectedAC = getSelectedAtomContainer( worldCoordinate );
      if(selectedAC == null)
          return;
      for(IAtom atom:selectedAC.atoms()) {
          chemModelRelay.removeAtom(atom);
      }
      for(IBond bond:selectedAC.bonds()) {
        chemModelRelay.removeBondAndLoneAtoms( bond );
      }
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;
      Set<IAtom> newSelection = new HashSet<IAtom>();
      for(IAtom atom:selectedAC.atoms()) {
          newSelection.add( atom );
          int newCharge = change;
          if( atom.getFormalCharge() != null)
              newCharge += atom.getFormalCharge();
          chemModelRelay.setCharge(atom, newCharge);
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;
       Set<IAtom> newSelection = new HashSet<IAtom>();
       for(IAtom atom:selectedAC.atoms()) {
           newSelection.add( atom );
           chemModelRelay.setValence(atom, valence==-1 ? null : valence);
       }
       setSelection( new MultiSelection<IAtom>(newSelection) );
       chemModelRelay.updateView();// FIXME do you really need to call it here?
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.