Package org.openscience.cdk.interfaces

Examples of org.openscience.cdk.interfaces.IRing


        IChemObject singleSelection = getHighlighted( worldCoord,
                closestAtom,closestBond );

        if (singleSelection == null) {
            //we build a phantom ring
            IRing ring = this.chemModelRelay.getIChemModel().getBuilder().newInstance(IRing.class,ringSize, "C");
            if (addingBenzene) {
                ring.getBond(0).setOrder(IBond.Order.DOUBLE);
                ring.getBond(2).setOrder(IBond.Order.DOUBLE);
                ring.getBond(4).setOrder(IBond.Order.DOUBLE);
            }
            double bondLength = ((ControllerHub)this.chemModelRelay).calculateAverageBondLength(this.chemModelRelay.getIChemModel().getMoleculeSet());
           
            ringPlacer.placeRing(ring, worldCoord, bondLength, RingPlacer.jcpAngles);
           
            for(IAtom atom : ring.atoms())
                this.chemModelRelay.addPhantomAtom(atom);
            for(IBond atom : ring.bonds())
                this.chemModelRelay.addPhantomBond(atom);
            //and look if it would merge somewhere
            chemModelRelay.getRenderer().getRenderer2DModel().getMerge().clear();
            for(IAtom atom : ring.atoms()){
                IAtom closestAtomInRing = this.chemModelRelay.getClosestAtom(atom);
                if( closestAtomInRing != null) {
                        chemModelRelay.getRenderer().getRenderer2DModel().getMerge().put(closestAtomInRing, atom);
                }
            }
View Full Code Here


        IRingSet theModifiedRingSet = new org.openscience.cdk.RingSet();

        theRingSet = ringPerception(theMolecule);

        for (int i = 0, s = theRingSet.getAtomContainerCount(); i < s; i++) {
            IRing theRing = new org.openscience.cdk.Ring();

            theRing.add(theRingSet.getAtomContainer(i));

            if (theCalculator.isAromatic(theRing, theMolecule)) {
                theModifiedRingSet.addAtomContainer(theRing);
            }
        }
View Full Code Here

        IRingSet theModifiedRingSet = new org.openscience.cdk.RingSet();

        theRingSet = ringPerception(theMolecule);

        for (int i = 0, s = theRingSet.getAtomContainerCount(); i < s; i++) {
            IRing theRing = new org.openscience.cdk.Ring();

            theRing.add(theRingSet.getAtomContainer(i));

            if (theCalculator.isAromatic(theRing, theMolecule)) {
                theModifiedRingSet.addAtomContainer(theRing);
            }
        }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.interfaces.IRing

Copyright © 2018 www.massapicom. 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.