def testSdfMCSAlignAtomMap(self):
     """Test case -  match test with return of atom maps for foreign SDF with a CC definition"""
     self.__lfh.write(
         "\nStarting OeAlignDepictTests testSdfMCSAlignAtomMap\n")
     try:
         extPairTup = (os.path.join(self.__datadir, "ATP.sdf"),
                       os.path.join(self.__datadir, "ATP.cif"))
         refPath = extPairTup[0]
         fitId = extPairTup[1]
         fitPath = extPairTup[1]
         oed = OeDepictMCSAlign(verbose=self.__verbose, log=self.__lfh)
         # oed.setSearchType(sType='exact')
         oed.setSearchType(sType="exact")
         #
         oed.setRefPath(refPath, type="SDF")
         # oed.setFitId(fitId,cachePath=self.__topCachePath)
         oed.setFitPath(fitPath, title="ATP")
         aML = oed.testAlign(suppressHydrogens=False,
                             unique=False,
                             minFrac=0.9)
         if len(aML) > 0:
             self.__lfh.write("Match suceeded for: %s %s\n" %
                              (refPath, fitId))
             for ii, aM in enumerate(aML):
                 self.__lfh.write("Mapping: %4d %s\n" % (ii, aM))
         else:
             self.__lfh.write("Match failed for: %s %s\n" %
                              (refPath, fitId))
     except:  # noqa: E722 pylint: disable=bare-except
         traceback.print_exc(file=self.__lfh)
         self.fail()
 def testMCSRelaxAlignPairDepict(self):
     """Test case -  Relaxed pairwise MCSS alignment  -"""
     self.__lfh.write(
         "\nStarting OeAlignDepictTests testMCSRelaceAlignPairDepict\n")
     try:
         oed = OeDepictMCSAlign(verbose=self.__verbose, log=self.__lfh)
         oed.setSearchType(sType="relaxed")
         oed.setRefPath(ccPath=os.path.join(self.__examples,
                                            "PRDCC_000225.cif"),
                        title="PRD_000225",
                        suppressHydrogens=False)
         oed.setFitPath(ccPath=os.path.join(self.__examples,
                                            "L_LDI_990_.comp.cif"),
                        title="L_LDI_990",
                        suppressHydrogens=False)
         fName = os.path.join(self.__testoutput, "relaxed-fit.png")
         aML = oed.alignPair(imagePath=fName)
         if len(aML) > 0:
             for (rCC, rAt, tCC, tAt) in aML:
                 self.__lfh.write("%5s %-5s %5s %-5s\n" %
                                  (rCC, rAt, tCC, tAt))
     except Exception as e:  # noqa: F841 pylint: disable=unused-variable
         traceback.print_exc(file=self.__lfh)
         self.fail()