ForceFieldConfigurator { public void setMM2Parameters(IChemObjectBuilder builder) throws CDKException { try { if (mm2 == null) mm2 = new MM2BasedParameterSetReader(); mm2.readParameterSets(builder); } catch (Exception ex1) { throw new CDKException("Problem within readParameterSets due to:" + ex1.toString(), ex1); } parameterSet = mm2.getParamterSet(); atomTypes = mm2.getAtomTypes(); } ForceFieldConfigurator(); void setInputStream(InputStream ins); String[] getFfTypes(); boolean checkForceFieldType(String ffname); void setForceFieldConfigurator(String ffname, IChemObjectBuilder builder); void setAtomTypes(List<IAtomType> atomtypes); void setParameters(Map<String, Object> parameterset); void setMM2Parameters(IChemObjectBuilder builder); void setMMFF94Parameters(IChemObjectBuilder builder); List<IAtomType> getAtomTypes(); Map<String, Object> getParameterSet(); IRingSet assignAtomTyps(IAtomContainer molecule); IAtom configureAtom(IAtom atom, String hoseCode, boolean _boolean); IAtom configureMM2BasedAtom(IAtom atom, String hoseCode, boolean hetRing); String removeAromaticityFlagsFromHoseCode(String hoseCode); IAtom configureMMFF94BasedAtom(IAtom atom, String hoseCode, boolean isInHetRing);  }
@Test public void testSetMM2Parameters() throws CDKException { forceFieldConfigurator.setMM2Parameters(DefaultChemObjectBuilder.getInstance()); assertNotNull(forceFieldConfigurator.getParameterSet()); List<IAtomType> atomtypeList = forceFieldConfigurator.getAtomTypes(); IAtomType atomtype1 = atomtypeList.get(1); assertEquals("Csp2", atomtype1.getAtomTypeName()); assertEquals(6, (int) atomtype1.getAtomicNumber()); assertEquals(12, (int) atomtype1.getMassNumber()); }