Package org.openscience.cdk.exception

Examples of org.openscience.cdk.exception.CDKException


        System.err.println(">>BAD: lost track of the R-group");
        this.rGroupQuery=null;
        for (IAtomContainer atc : newSet.atomContainers() ) {
          atc.setProperty(CDKConstants.TITLE, null);
        }
        throw new CDKException ("R-group invalidated");
      }
    }
  }
View Full Code Here


           

        } catch (Exception e) {

            e.printStackTrace();
            throw new CDKException(e.getMessage());
        }
        return chemModel;
    }
View Full Code Here

           
            if (inchi.getInChI()==null) {
                //Something went wrong .. pick up the error from the log file
                String errMsg=getErrorMsg (tmpLogFile);
                if(!errMsg.equals("")) {
                    throw new CDKException (errMsg);
                }
                else {
                    throw new CDKException
                    ("Unknown problem with InChI generation.");
                }
            }
           
        } finally {
View Full Code Here

            stdinchi.run(args);

            //Check if something went wrong .. pick up any error from log file
            String errMsg=getErrorMsg (tmpLogFile);
            if(!errMsg.equals("")) {
                throw new CDKException (errMsg);
            }
           
            //From full InChI to Molfile ---------------------------------------
            argsList = new ArrayList<String>();
            argsList.add("");
            argsList.add(tmpOutFile);
            argsList.add(tmpMolFile);
            argsList.add(tmpLogFile);
            argsList.add(tmpPrbFile);
            argsList.add("-OutputSDF");

            args = new String[argsList.size()];
            args=argsList.toArray(args);

            //Call to make the full InChI file
            StdInChI stdinchi2 = new StdInChI();
            stdinchi2.run(args);

            //Check if something went wrong .. pick up any error from log file
            errMsg=getErrorMsg (tmpLogFile);
            if(!errMsg.equals("")) {
                throw new CDKException (errMsg);
            }

            //From Molfile to Atom container -----------------------------------
            InputStream ins = new FileInputStream(tmpMolFile);
            MDLV2000Reader reader = new MDLV2000Reader(ins);
View Full Code Here

    @Override public IAtomContainer parse(InChI inchi) throws CDKException {
        try {
            return new StdInChIParser().parseInchi(inchi.getInChI());
        } catch (Exception e) {
            throw new CDKException("Could not parse InChI", e);
        }
    }
View Full Code Here

    @Override public InChI generate(IAtomContainer container) throws CDKException {
        try {
            return new StdInChIGenerator().generateInchi(container);
        } catch (CDKException e) {
            throw new CDKException("Could not generate InChI", e);
        } catch (IOException e) {
            throw new CDKException("Could not generate InChI", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.exception.CDKException

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.