Package org.openscience.cdk.interfaces

Examples of org.openscience.cdk.interfaces.IRingSet


   */
  public static void main(String[] args) throws Exception {
    SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
    IMolecule mol = sp.parseSmiles("C1CC12CC2CC1CC1");
    AllRingsFinder ar = new AllRingsFinder();
    IRingSet ringSet = ar.findAllRings(mol);
    List l = RingPartitioner.partitionRings(ringSet);
    for(Object o : l) {
      IAtomContainer ac = RingPartitioner.convertToAtomContainer((IRingSet)o);
      IMolecule nMol = new Molecule(ac);
      System.out.println(new SmilesGenerator().createSMILES(nMol));
View Full Code Here


                            placedNeighbours.addAtom((IAtom)l.get(i));
                        else
                            unplacedNeighbours.addAtom((IAtom)l.get(i));
                    }
                    ap.distributePartners(lastplaced, placedNeighbours, GeometryTools.get2DCenter(placedNeighbours), unplacedNeighbours, 1.4);
                    IRingSet ringset=new SSSRFinder(container).findSSSR();
                    for(IAtomContainer ring:ringset.atomContainers()){
                        ringPlacer.placeRing((IRing)ring, GeometryTools.get2DCenter(container), chemModelRelay.getRenderer().getRenderer2DModel().getBondLength() / chemModelRelay.getRenderer().getRenderer2DModel().getScale());
                    }
                    lastplaced=container.getAtom(counter);
                    counter++;
                    if(counter==container.getAtomCount())
View Full Code Here

        }
    }

    public static void checkAromaticity(IMolecule theMolecule) throws CDKException {
        AromaticityCalculator theCalculator = new org.openscience.cdk.aromaticity.AromaticityCalculator();
        IRingSet theRingSet = new org.openscience.cdk.RingSet();
        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);
            }
        }

        if (!theModifiedRingSet.isEmpty()) {
            theMolecule.setProperty("Aromatic_Ring", getcheckAromaticityDataFormat(theMolecule, theModifiedRingSet));
        }


    }
View Full Code Here

            }
        }
    }

    public static void checkRingStructure(IMolecule theMolecule) throws CDKException {
        IRingSet theRingSet = new org.openscience.cdk.RingSet();
        theRingSet = ringPerception(theMolecule);

        theMolecule.setProperty("Ring_Perception", getRingPerceptionDataFormat(theMolecule, theRingSet));
    }
View Full Code Here

        theMolecule.setProperty("Ring_Perception", getRingPerceptionDataFormat(theMolecule, theRingSet));
    }

    public static IRingSet ringPerception(IMolecule theMolecule) throws CDKException {
        AllRingsFinder theFinder = new org.openscience.cdk.ringsearch.AllRingsFinder();
        IRingSet theRingSet = new org.openscience.cdk.RingSet();

        theRingSet = theFinder.findAllRings(theMolecule);

        for (int i = theRingSet.getAtomContainerCount() - 1; i >= 0; i--) {
            if (theRingSet.getAtomContainer(i).getAtomCount() > 6) {
                theRingSet.removeAtomContainer(i);
            }
        }

        return theRingSet;
    }
View Full Code Here

TOP

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

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.