public void setForceFieldConfigurator ( String ffname , IChemObjectBuilder builder ) throws CDKException { ffname = ffname . toLowerCase ( ) ; boolean check = false ; if ( ffname == ffName && parameterSet != null ) { } else { check = this . checkForceFieldType ( ffname ) ; ffName = ffname ; if ( ffName . equals ( "mm2" ) ) { //logger.debug("ForceFieldConfigurator: open Force Field mm2"); //f = new File(mm2File); //readFile(f); ins = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "org/openscience/cdk/modeling/forcefield/data/mm2.prm" ) ; //logger.debug("ForceFieldConfigurator: open Force Field mm2 ... READY"); mm2 = new MM2BasedParameterSetReader ( ) ; mm2 . setInputStream ( ins ) ; //logger.debug("ForceFieldConfigurator: mm2 set input stream ... READY"); try { this . setMM2Parameters ( builder ) ; } catch ( Exception ex1 ) { throw new CDKException ( "Problems with set MM2Parameters due to " + ex1 . toString ( ) , ex1 ) ; } } else if ( ffName . equals ( "mmff94" ) || ! check ) { //logger.debug("ForceFieldConfigurator: open Force Field mmff94"); //f = new File(mmff94File); //readFile(f); ins = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "org/openscience/cdk/modeling/forcefield/data/mmff94.prm" ) ; mmff94 = new MMFF94BasedParameterSetReader ( ) ; mmff94 . setInputStream ( ins ) ; try { this . setMMFF94Parameters ( builder ) ; } catch ( Exception ex2 ) { throw new CDKException ( "Problems with set MM2Parameters due to" + ex2 . toString ( ) , ex2 ) ; } } } //throw new CDKException("Data file for "+ffName+" force field could not be found"); }
Constructor for the ForceFieldConfigurator object