Package org.openscience.cdk.ringsearch

Examples of org.openscience.cdk.ringsearch.AllRingsFinder


   * @param args
   */
  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


        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);
            }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.ringsearch.AllRingsFinder

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.