public void readParameterSets(IChemObjectBuilder builder) throws Exception {
        //vdW,bond,angle,strbond,opbend,torsion,data
        LOG.debug("------ Read MMFF94 ParameterSets ------");

        if (ins == null) {
            ClassLoader loader = this.getClass().getClassLoader();
            ins = loader.getResourceAsStream(configFile);
        }
        if (ins == null) {
            throw new IOException("There was a problem getting the default stream: " + configFile);
        }

        BufferedReader r = new BufferedReader(new InputStreamReader(ins), 1024);
        String s;
        int[] a = {0, 0, 0, 0, 0, 0, 0, 0};

        if (insvdW == null) {
            insvdW = this.getClass().getClassLoader().getResourceAsStream(configFilevdW);
        }
        if (insvdW == null) {
            throw new IOException("There was a problem getting the default stream: " + configFilevdW);
        }

        BufferedReader rvdW = new BufferedReader(new InputStreamReader(insvdW), 1024);
        String svdW;
        int ntvdW;

        if (insDFSB == null) {
            insDFSB = this.getClass().getClassLoader().getResourceAsStream(configFileDFSB);
        }
        if (insDFSB == null) {
            throw new IOException("There was a problem getting the default stream: " + configFileDFSB);
        }

        BufferedReader rDFSB = new BufferedReader(new InputStreamReader(insDFSB), 1024);
        String sDFSB;
        int ntDFSB;

        try {
            while (true) {
                s = r.readLine();
                if (s == null) {
                    break;
                }
                st = new StringTokenizer(s, "\t; ");
                int nt = st.countTokens();
                if (s.startsWith("atom") & nt <= 8) {
                    setAtomTypes(builder);
                    a[0]++;
                } else if (s.startsWith("bond") & nt == 9) {
                    setBond();
                    a[1]++;
                } else if (s.startsWith("angle") & nt <= 10) {
                    setAngle();
                    a[2]++;
                } else if (s.startsWith("strbnd") & nt == 7) {
                    setStrBnd();
                    a[3]++;
                } else if (s.startsWith("torsion") & nt == 11) {
                    setTorsion();
                    a[4]++;
                } else if (s.startsWith("opbend") & nt == 6) {
                    setOpBend();
                    a[5]++;
                } else if (s.startsWith("data") & nt == 10) {
                    readatmmffvdw: while (true) {
                        svdW = rvdW.readLine();
                        if (svdW == null) {
                            break;
                        }
                        stvdW = new StringTokenizer(svdW, "\t; ");
                        ntvdW = stvdW.countTokens();
                        LOG.debug("ntvdW : " + ntvdW);
                        if (svdW.startsWith("vdw") & ntvdW == 9) {
                            st.nextToken();
                            sid = st.nextToken();
                            stvdW.nextToken();
                            sidvdW = stvdW.nextToken();
                            if (sid.equals(sidvdW)) {
                                setAtomTypeData();
                                a[6]++;
                            }
                            break readatmmffvdw;
                        }
                    }// end while
                }
            }// end while

            ins.close();
            insvdW.close();
        } catch (IOException e) {
            throw new IOException("There was a problem parsing the mmff94 forcefield");
        }

        try {
            LOG.debug("Parses the Default Stretch-Bend Parameters");
            while (true) {
                sDFSB = rDFSB.readLine();
                LOG.debug("sDFSB = " + sDFSB);
                if (sDFSB == null) {
                    LOG.debug("sDFSB == null, break");
                    break;
                }
                stDFSB = new StringTokenizer(sDFSB, "\t; ");
                ntDFSB = stDFSB.countTokens();
                LOG.debug("ntDFSB : " + ntDFSB);
                if (sDFSB.startsWith("DFSB") & ntDFSB == 6) {
                    setDefaultStrBnd();
                }
            }
            insDFSB.close();
            LOG.debug("insDFSB closed");
        } catch (IOException e) {
            throw new IOException("There was a problem parsing the Default Stretch-Bend Parameters (mmffdfsb.par)");
        }
    }
public void readParameterSets ( IChemObjectBuilder builder ) throws Exception { LOG . debug ( "------ Read MMFF94 ParameterSets ------" ) ; if ( ins == null ) { ClassLoader loader = this . getClass ( ) . getClassLoader ( ) ; ins = loader . getResourceAsStream ( configFile ) ; } if ( ins == null ) { throw new IOException ( "There was a problem getting the default stream: " + configFile ) ; } BufferedReader r = new BufferedReader ( new InputStreamReader ( ins ) , 1024 ) ; String s ; int [ ] a = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ; if ( insvdW == null ) { insvdW = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( configFilevdW ) ; } if ( insvdW == null ) { throw new IOException ( "There was a problem getting the default stream: " + configFilevdW ) ; } BufferedReader rvdW = new BufferedReader ( new InputStreamReader ( insvdW ) , 1024 ) ; String svdW ; int ntvdW ; if ( insDFSB == null ) { insDFSB = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( configFileDFSB ) ; } if ( insDFSB == null ) { throw new IOException ( "There was a problem getting the default stream: " + configFileDFSB ) ; } BufferedReader rDFSB = new BufferedReader ( new InputStreamReader ( insDFSB ) , 1024 ) ; String sDFSB ; int ntDFSB ; try { while ( true ) { s = r . readLine ( ) ; if ( s == null ) { break ; } st = new StringTokenizer ( s , "\t; " ) ; int nt = st . countTokens ( ) ; if ( s . startsWith ( "atom" ) & nt <= 8 ) { setAtomTypes ( builder ) ; a [ 0 ] ++ ; } else if ( s . startsWith ( "bond" ) & nt == 9 ) { setBond ( ) ; a [ 1 ] ++ ; } else if ( s . startsWith ( "angle" ) & nt <= 10 ) { setAngle ( ) ; a [ 2 ] ++ ; } else if ( s . startsWith ( "strbnd" ) & nt == 7 ) { setStrBnd ( ) ; a [ 3 ] ++ ; } else if ( s . startsWith ( "torsion" ) & nt == 11 ) { setTorsion ( ) ; a [ 4 ] ++ ; } else if ( s . startsWith ( "opbend" ) & nt == 6 ) { setOpBend ( ) ; a [ 5 ] ++ ; } else if ( s . startsWith ( "data" ) & nt == 10 ) { readatmmffvdw : while ( true ) { svdW = rvdW . readLine ( ) ; if ( svdW == null ) { break ; } stvdW = new StringTokenizer ( svdW , "\t; " ) ; ntvdW = stvdW . countTokens ( ) ; LOG . debug ( "ntvdW : " + ntvdW ) ; if ( svdW . startsWith ( "vdw" ) & ntvdW == 9 ) { st . nextToken ( ) ; sid = st . nextToken ( ) ; stvdW . nextToken ( ) ; sidvdW = stvdW . nextToken ( ) ; if ( sid . equals ( sidvdW ) ) { setAtomTypeData ( ) ; a [ 6 ] ++ ; } break readatmmffvdw ; } } } } ins . close ( ) ; insvdW . close ( ) ; } catch ( IOException e ) { throw new IOException ( "There was a problem parsing the mmff94 forcefield" ) ; } try { LOG . debug ( "Parses the Default Stretch-Bend Parameters" ) ; while ( true ) { sDFSB = rDFSB . readLine ( ) ; LOG . debug ( "sDFSB = " + sDFSB ) ; if ( sDFSB == null ) { LOG . debug ( "sDFSB == null, break" ) ; break ; } stDFSB = new StringTokenizer ( sDFSB , "\t; " ) ; ntDFSB = stDFSB . countTokens ( ) ; LOG . debug ( "ntDFSB : " + ntDFSB ) ; if ( sDFSB . startsWith ( "DFSB" ) & ntDFSB == 6 ) { setDefaultStrBnd ( ) ; } } insDFSB . close ( ) ; LOG . debug ( "insDFSB closed" ) ; } catch ( IOException e ) { throw new IOException ( "There was a problem parsing the Default Stretch-Bend Parameters (mmffdfsb.par)" ) ; } }
The main method which parses through the force field configuration file

@throws Exception Description of the Exception