@Test
 public void testDiff() throws Exception {
   ICDKMolecule mol1 = (ICDKMolecule) cdk.fromSMILES("C");
   ICDKMolecule mol2 = (ICDKMolecule) cdk.fromSMILES("C");
   debug.diff(mol1, mol2);
   // would like to test more, but the method does not return anything
 }
  @Test
  public void testSybylAtomTypePerceptionBenzene()
      throws CDKException, FileNotFoundException, IOException, BioclipseException, CoreException,
          InvocationTargetException {

    IAtomContainer ac = MoleculeFactory.makeBenzene();

    ICDKMolecule mol = new CDKMolecule(ac);

    debug.perceiveSybylAtomTypes(mol);

    System.out.println("** BENZENE **");

    System.out.println(AtomContainerDiff.diff(ac, mol.getAtomContainer()));

    for (int i = 0; i < mol.getAtomContainer().getAtomCount(); i++) {
      IAtom a = mol.getAtomContainer().getAtom(i);
      System.out.println("Atom: " + a.getSymbol() + i + ", type=" + a.getAtomTypeName());
    }

    assertEquals("C.ar", mol.getAtomContainer().getAtom(0).getAtomTypeName());
    assertEquals("C.ar", mol.getAtomContainer().getAtom(1).getAtomTypeName());
    assertEquals("C.ar", mol.getAtomContainer().getAtom(2).getAtomTypeName());
    assertEquals("C.ar", mol.getAtomContainer().getAtom(3).getAtomTypeName());
    assertEquals("C.ar", mol.getAtomContainer().getAtom(4).getAtomTypeName());
    assertEquals("C.ar", mol.getAtomContainer().getAtom(5).getAtomTypeName());
  }
  @Test
  public void testSybylAtomTypePerceptionFromSMILES()
      throws FileNotFoundException, IOException, BioclipseException, CoreException,
          InvocationTargetException {

    ICDKMolecule mol = cdk.fromSMILES("C1CCCCC1CCOC");

    debug.perceiveSybylAtomTypes(mol);

    for (int i = 0; i < mol.getAtomContainer().getAtomCount(); i++) {
      IAtom a = mol.getAtomContainer().getAtom(i);
      System.out.println("Atom: " + a.getSymbol() + i + ", type=" + a.getAtomTypeName());
    }
  }
  @Test
  public void testSybylAtomTypePerception()
      throws FileNotFoundException, IOException, BioclipseException, CoreException,
          InvocationTargetException {

    String path = getClass().getResource("/testFiles/atp.mol").getPath();
    ICDKMolecule mol = cdk.loadMolecule(new MockIFile(path));

    System.out.println("mol: " + mol.toString());

    debug.perceiveSybylAtomTypes(mol);

    for (int i = 0; i < mol.getAtomContainer().getAtomCount(); i++) {
      IAtom a = mol.getAtomContainer().getAtom(i);
      System.out.println("Atom: " + a.getSymbol() + i + ", type=" + a.getAtomTypeName());
    }
  }
  /**
   * Test that sybyl atom typing for 232 mols in an SDF does not throw exception
   *
   * @throws Exception
   */
  @Test
  public void testDepictSybylAtomTypesFromSDF() throws Exception {
    URI uri = getClass().getResource("/testFiles/m2d_ref_232.sdf").toURI();
    URL url = FileLocator.toFileURL(uri.toURL());
    String path = url.getFile();
    List<ICDKMolecule> mols = cdk.loadMolecules(path);

    int cnt = 0;
    for (ICDKMolecule mol : mols) {
      try {
        debug.perceiveSybylAtomTypes(mol);
      } catch (InvocationTargetException e) {
        System.out.println("Atom typing of molecule " + cnt + " failed.");
        e.printStackTrace();
        fail("Atom typing of molecule " + cnt + " failed due to: " + e.getMessage());
      } catch (NullPointerException e) {
        System.out.println("Atom typing of molecule " + cnt + " failed.");
        e.printStackTrace();
        fail("Atom typing of molecule " + cnt + " failed due to NPE: " + e.getMessage());
      }
      // would like to test more, but the method does not return anything
      cnt++;
    }
  }
 @Test
 public void testDepictSybylAtomTypes() throws Exception {
   ICDKMolecule mol = (ICDKMolecule) cdk.fromSMILES("CNCO");
   debug.perceiveSybylAtomTypes(mol);
   // would like to test more, but the method does not return anything
 }