Package org.openscience.cdk.smiles

Examples of org.openscience.cdk.smiles.SmilesGenerator


        e.printStackTrace();
        response.setContentType("text/plain");
        response.getWriter().println("Error in CML Servlet");
      }     
    } else if("smiles".equals(serviceType)) {
      SmilesGenerator sg = new SmilesGenerator();
      String smiles = sg.createSMILES(mol);
      response.setContentType("text/plain");
      response.getWriter().println(smiles);     
    } else if("inchi".equals(serviceType)) {
      //try {
      //  new HydrogenAdder(new ValencyHybridChecker()).addImplicitHydrogensToSatisfyValency(mol);       
View Full Code Here


    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

  /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO Auto-generated method stub
    SmilesGenerator sg = new SmilesGenerator();
    System.out.println(sg.createSMILES(parseSmiles("CC(=O)C")));
    System.out.println(sg.createSMILES(parseSmiles("C1=CSC(=C1)C(=O)C2=C(C(=C(C=C2)OCC(=O)O)Cl)Cl")));
    System.out.println(sg.createSMILES(parseSmiles("CCC1(C(=O)NC(=O)NC1=O)c2ccccc2")));
    System.out.println(sg.createSMILES(parseSmiles("CC(=C/CO)\\C=C\\C=C(C)\\C=C\\C1=C(C)CCCC1(C)C")));
    System.out.println(sg.createSMILES(parseSmiles("ClCCN(CCCl)P1(=O)NCCCO1")));
    System.out.println(sg.createSMILES(parseSmiles("Cc1ccc2cc3c(ccc4ccccc34)c5CCc1c25")));
    System.out.println(sg.createSMILES(parseSmiles("Cc1ccc2cc3c(ccc4ccccc34)c5CCc1c25")));
    System.out.println(sg.createSMILES(parseSmiles("c1ccc2c(c1)cc3ccc4cccc5ccc2c3c45")));
    System.out.println(sg.createSMILES(parseSmiles("c1ccc2cc3c(ccc4ccccc34)cc2c1")));
    System.out.println(sg.createSMILES(parseSmiles("[H][C@]12CN3C4=C([C@@H](COC(N)=O)[C@@]3(OC)[C@@]1([H])N2)C(=O)C(N)=C(C)C4=O")));
    System.out.println(sg.createSMILES(parseSmiles("Cc1ccc2cc3c(ccc4ccccc34)c5CCc1c25")));
    //System.out.println(sg.createSMILES(parseSmiles("c1ccc-2c(c1)-c3cccc4c3c-2cc5ccccc45")));
    //System.out.println(sg.createSMILES(parseSmiles("n1ccnc1C", 0.009)));
    /*System.out.println(sg.createSMILES(parseSmiles("")));
    System.out.println(sg.createSMILES(parseSmiles("")));
    System.out.println(sg.createSMILES(parseSmiles("")));
 
View Full Code Here

      } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
            this.mol=sw.toString();
            SmilesGenerator sg=SmilesGenerator.isomeric();
            try {
                smiles = sg.create(tocopy);
            } catch (CDKException ex) {
                logger.error("Could not create SMILES: ", ex.getMessage());
                logger.debug(ex);   
            }
            // SVG output
View Full Code Here

     * @deprecated no such thing as chiral SMILES use {@link #getSmiles} for 'a' SMILES.
     */
    @Deprecated
  public static String getChiralSmiles(IChemModel model) throws CDKException, ClassNotFoundException, IOException, CloneNotSupportedException {
       
        SmilesGenerator smigen = SmilesGenerator.isomeric();
       
    StringBuilder sb = new StringBuilder();
        for(IAtomContainer container : ChemModelManipulator.getAllAtomContainers(model)) {
            if (sb.length() > 0)
                sb.append('.');
            sb.append(smigen.create(container));
        }
       
        return sb.toString();
  }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.smiles.SmilesGenerator

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.