Examples of CMLWriter


Examples of org.openscience.cdk.io.CMLWriter

    * @throws Exception
    */
  public static Element molToCml(IMolecule mol, String name) throws Exception {
    deAromatise(mol);
    StringWriter output = new StringWriter();
    CMLWriter cmlw = new CMLWriter(output);
    cmlw.write(mol);
    Document doc = new Builder().build(output.toString(), "/localhost");
    Element e = (Element)doc.getRootElement();
    Nodes n = e.query(".//bond/@order");
    for(int i=0;i<n.size();i++) {
      Attribute a = (Attribute)n.get(i);
View Full Code Here

Examples of org.openscience.cdk.io.CMLWriter

    * @throws Exception
    */
  public static Element simpleMolToCml(IMolecule mol) throws Exception {
    //deAromatise(mol);
    StringWriter output = new StringWriter();
    CMLWriter cmlw = new CMLWriter(output);
    cmlw.write(mol);
    Document doc = new Builder().build(output.toString(), "/localhost");
    Element e = (Element)doc.getRootElement();
    Nodes n = e.query(".//bond/@order");
    for(int i=0;i<n.size();i++) {
      Attribute a = (Attribute)n.get(i);
View Full Code Here

Examples of org.openscience.cdk.io.CMLWriter

        if (!fileName.endsWith(".cml")) {
            fileName += ".cml";
            outFile = new File(fileName);
        }
        FileWriter sw = new FileWriter(outFile);
        cow = new CMLWriter(sw);
        if (cow != null && askIOSettings())
        {
            cow.addChemObjectIOListener(new SwingGUIListener(jcpPanel, IOSetting.Importance.HIGH));
        }
        cow.write(object);
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.