Package org.openscience.cdk

Examples of org.openscience.cdk.AtomContainer.addAtom()


        acD.addAtom(a1D);
        acD.addAtom(a2D);
        acD.addAtom(a3D);
        acD.addAtom(a4D);
        acD.addAtom(a5D);
        acD.addAtom(a6D);
       
        acD.addBond(new Bond(a1D, a2D, CDKConstants.BONDORDER_SINGLE));
        acD.addBond(new Bond(a1D, a3D, CDKConstants.BONDORDER_SINGLE));
        acD.addBond(new Bond(a1D, a4D, CDKConstants.BONDORDER_SINGLE));
        acD.addBond(new Bond(a2D, a5D, CDKConstants.BONDORDER_SINGLE));
View Full Code Here


            IChemObjectSelection sel = null;
            if (shiftPressed && curSel != null && curSel.isFilled()) {
                IAtomContainer container = new AtomContainer(curSel.getConnectedAtomContainer());               
                if (singleSelection instanceof IAtom) {
                    IAtom atom = (IAtom) singleSelection;
                    if (!container.contains(atom))  container.addAtom(atom);
                    else container.removeAtom(atom);
                } else if (singleSelection instanceof IBond) {
                    IBond bond = (IBond) singleSelection;
                    if (!container.contains(bond))  container.addBond(bond);
                    else container.addBond(bond);
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.