Examples of addAtom()


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

                bondInRange = renderModel.getHighlightedBond();
            }
            IAtomContainer tocopyclone =
                jcpPanel.getChemModel().getBuilder().newInstance(IAtomContainer.class);
            if (atomInRange != null) {
                tocopyclone.addAtom(atomInRange);
                jcpPanel.get2DHub().removeAtom(atomInRange);
                renderModel.setHighlightedAtom(null);
            } else if (bondInRange != null) {
                tocopyclone.addBond(bondInRange);
                jcpPanel.get2DHub().removeBond(bondInRange);
View Full Code Here

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

      if (atom != secondAtom)
        connectedAtoms.addAtom(atom);
    }
    for (IAtom atom : sourceContainer.getConnectedAtomsList(secondAtom)) {
      if (atom != firstAtom)
        connectedAtoms.addAtom(atom);
    }
    Point2d conAtomsCenter = GeometryTools.get2DCenter(connectedAtoms);
    double distance1 = newPoint1.distance(conAtomsCenter);
    double distance2 = newPoint2.distance(conAtomsCenter);
    Vector2d ringCenterVector = new Vector2d(sharedAtomsCenter);
View Full Code Here

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

   */
  public IRing addPhenyl(IBond bond, boolean phantom) {
    IAtomContainer sharedAtoms = bond.getBuilder().newInstance(IAtomContainer.class);
    IAtom firstAtom = bond.getAtom(0); // Assumes two-atom bonds only
    IAtom secondAtom = bond.getAtom(1);
    sharedAtoms.addAtom(firstAtom);
    sharedAtoms.addAtom(secondAtom);
    sharedAtoms.addBond(bond);
    IAtomContainer sourceContainer = ChemModelManipulator
        .getRelevantAtomContainer(chemModel, firstAtom);

View Full Code Here

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

        IAtom a6L = new Atom("O", new Point3d(-1.596, -1.239, 20.958));
        a1L.setImplicitHydrogenCount(1);
        a3L.setImplicitHydrogenCount(2);
        a4L.setImplicitHydrogenCount(3);
        a5L.setImplicitHydrogenCount(1);
        acL.addAtom(a1L);
        acL.addAtom(a2L);
        acL.addAtom(a3L);
        acL.addAtom(a4L);
        acL.addAtom(a5L);
        acL.addAtom(a6L);
View Full Code Here

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

  public IRing addPhenyl(IBond bond, boolean phantom) {
    IAtomContainer sharedAtoms = bond.getBuilder().newInstance(IAtomContainer.class);
    IAtom firstAtom = bond.getAtom(0); // Assumes two-atom bonds only
    IAtom secondAtom = bond.getAtom(1);
    sharedAtoms.addAtom(firstAtom);
    sharedAtoms.addAtom(secondAtom);
    sharedAtoms.addBond(bond);
    IAtomContainer sourceContainer = ChemModelManipulator
        .getRelevantAtomContainer(chemModel, firstAtom);

    Point2d sharedAtomsCenter = GeometryTools.get2DCenter(sharedAtoms);
View Full Code Here

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

        a1L.setImplicitHydrogenCount(1);
        a3L.setImplicitHydrogenCount(2);
        a4L.setImplicitHydrogenCount(3);
        a5L.setImplicitHydrogenCount(1);
        acL.addAtom(a1L);
        acL.addAtom(a2L);
        acL.addAtom(a3L);
        acL.addAtom(a4L);
        acL.addAtom(a5L);
        acL.addAtom(a6L);
       
View Full Code Here

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

        a3L.setImplicitHydrogenCount(2);
        a4L.setImplicitHydrogenCount(3);
        a5L.setImplicitHydrogenCount(1);
        acL.addAtom(a1L);
        acL.addAtom(a2L);
        acL.addAtom(a3L);
        acL.addAtom(a4L);
        acL.addAtom(a5L);
        acL.addAtom(a6L);
       
        acL.addBond(new Bond(a1L, a2L, CDKConstants.BONDORDER_SINGLE));
View Full Code Here

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

    // decide on which side to draw the ring??
    IAtomContainer connectedAtoms = bond.getBuilder().newInstance(IAtomContainer.class);
    for (IAtom atom : sourceContainer.getConnectedAtomsList(firstAtom)) {
      if (atom != secondAtom)
        connectedAtoms.addAtom(atom);
    }
    for (IAtom atom : sourceContainer.getConnectedAtomsList(secondAtom)) {
      if (atom != firstAtom)
        connectedAtoms.addAtom(atom);
    }
View Full Code Here

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

        a4L.setImplicitHydrogenCount(3);
        a5L.setImplicitHydrogenCount(1);
        acL.addAtom(a1L);
        acL.addAtom(a2L);
        acL.addAtom(a3L);
        acL.addAtom(a4L);
        acL.addAtom(a5L);
        acL.addAtom(a6L);
       
        acL.addBond(new Bond(a1L, a2L, CDKConstants.BONDORDER_SINGLE));
        acL.addBond(new Bond(a1L, a3L, CDKConstants.BONDORDER_SINGLE));
View Full Code Here

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

      if (atom != secondAtom)
        connectedAtoms.addAtom(atom);
    }
    for (IAtom atom : sourceContainer.getConnectedAtomsList(secondAtom)) {
      if (atom != firstAtom)
        connectedAtoms.addAtom(atom);
    }
    Point2d conAtomsCenter = GeometryTools.get2DCenter(connectedAtoms);
    double distance1 = newPoint1.distance(conAtomsCenter);
    double distance2 = newPoint2.distance(conAtomsCenter);
    Vector2d ringCenterVector = new Vector2d(sharedAtomsCenter);
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.