Examples of AllRingsFinder


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

Examples of org.openscience.cdk.ringsearch.AllRingsFinder

        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
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.