test_class.declarator: targetGraph
test_class.modifier: private static
test_class.original_string: private static MoleculeGraph targetGraph;
test_class.type: MoleculeGraph
test_class.var_name: targetGraph
test_class.file: singa-structure/src/test/java/bio/singa/structure/algorithms/molecules/MoleculeIsomorphismFinderTest.java
test_class.identifier: MoleculeIsomorphismFinderTest
test_case.body: @Test
      void shouldFindAdeninePattern() {
  
          Set<Integer> correctIdentifiers = Stream.of(31, 30, 29, 26, 25, 21, 17, 13, 27, 28)
                  .collect(Collectors.toSet());
  
          List<LeafSubstructure<?>> patternLeafSubstructure = StructureParser.local()
                  .fileLocation(Resources.getResourceAsFileLocation("adenine.pdb"))
                  .everything()
                  .parse().getAllLeafSubstructures();
  
          MoleculeGraph patternGraph = MoleculeGraphs.createMoleculeGraphFromStructure((OakLeafSubstructure<?>) patternLeafSubstructure.get(0));
  
          MoleculeIsomorphism moleculeIsomorphism = MoleculeIsomorphismFinder.of(patternGraph, targetGraph);
  
          assertEquals(1, moleculeIsomorphism.getFullMatches().size());
  
          MoleculeGraph fullMatch = moleculeIsomorphism.getFullMatches().get(0);
          List<Integer> matchingIdentifiers = fullMatch.getNodes().stream()
                  .map(MoleculeAtom::getIdentifier)
                  .collect(Collectors.toList());
          assertEquals(correctIdentifiers.size(), matchingIdentifiers.size());
          assertTrue(matchingIdentifiers.containsAll(correctIdentifiers));
  
          List<Pair<MoleculeAtom>> atomPairs = moleculeIsomorphism.getAtomPairs(fullMatch);
          assertTrue(atomPairs.get(5).getFirst().getIdentifier() == 3 && atomPairs.get(5).getSecond().getIdentifier() == 21);
          assertTrue(atomPairs.get(8).getFirst().getIdentifier() == 10 && atomPairs.get(8).getSecond().getIdentifier() == 31);
      }
test_case.class_method_signature: MoleculeIsomorphismFinderTest.shouldFindAdeninePattern()
test_case.full_signature: @Test void shouldFindAdeninePattern()
test_case.identifier: shouldFindAdeninePattern
test_case.invocations: collect of toSet getAllLeafSubstructures parse everything fileLocation local getResourceAsFileLocation createMoleculeGraphFromStructure get of assertEquals size getFullMatches get getFullMatches collect map stream getNodes toList assertEquals size size assertTrue containsAll getAtomPairs assertTrue getIdentifier getFirst get getIdentifier getSecond get assertTrue getIdentifier getFirst get getIdentifier getSecond get
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldFindAdeninePattern()
focal_class.declarator: logger = LoggerFactory.getLogger(MoleculeIsomorphismFinder.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(MoleculeIsomorphismFinder.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: DEFAULT_ATOM_CONDITION = AtomConditions.isSameElement()
focal_class.modifier: private static final
focal_class.original_string: private static final BiFunction<MoleculeAtom, MoleculeAtom, Boolean> DEFAULT_ATOM_CONDITION = AtomConditions.isSameElement();
focal_class.type: BiFunction<MoleculeAtom, MoleculeAtom, Boolean>
focal_class.var_name: DEFAULT_ATOM_CONDITION
focal_class.declarator: DEFAULT_BOND_CONDITION = BondConditions.isSameType()
focal_class.modifier: private static final
focal_class.original_string: private static final BiFunction<MoleculeBond, MoleculeBond, Boolean> DEFAULT_BOND_CONDITION = BondConditions.isSameType();
focal_class.type: BiFunction<MoleculeBond, MoleculeBond, Boolean>
focal_class.var_name: DEFAULT_BOND_CONDITION
focal_class.declarator: atomCondition
focal_class.modifier: private final
focal_class.original_string: private final BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition;
focal_class.type: BiFunction<MoleculeAtom, MoleculeAtom, Boolean>
focal_class.var_name: atomCondition
focal_class.declarator: bondCondition
focal_class.modifier: private final
focal_class.original_string: private final BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition;
focal_class.type: BiFunction<MoleculeBond, MoleculeBond, Boolean>
focal_class.var_name: bondCondition
focal_class.declarator: pattern
focal_class.modifier: private
focal_class.original_string: private MoleculeGraph pattern;
focal_class.type: MoleculeGraph
focal_class.var_name: pattern
focal_class.declarator: target
focal_class.modifier: private
focal_class.original_string: private MoleculeGraph target;
focal_class.type: MoleculeGraph
focal_class.var_name: target
focal_class.file: singa-structure/src/main/java/bio/singa/structure/algorithms/molecules/MoleculeIsomorphismFinder.java
focal_class.identifier: MoleculeIsomorphismFinder
focal_class.class_method_signature: MoleculeIsomorphismFinder.MoleculeIsomorphismFinder(MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.full_signature: private  MoleculeIsomorphismFinder(MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.identifier: MoleculeIsomorphismFinder
focal_class.modifiers: private
focal_class.parameters: (MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.signature:  MoleculeIsomorphismFinder(MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.class_method_signature: MoleculeIsomorphismFinder.of(MoleculeGraph pattern, MoleculeGraph target)
focal_class.full_signature: public static MoleculeIsomorphism of(MoleculeGraph pattern, MoleculeGraph target)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (MoleculeGraph pattern, MoleculeGraph target)
focal_class.return: MoleculeIsomorphism
focal_class.signature: MoleculeIsomorphism of(MoleculeGraph pattern, MoleculeGraph target)
focal_class.class_method_signature: MoleculeIsomorphismFinder.of(MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.full_signature: public static MoleculeIsomorphism of(MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.return: MoleculeIsomorphism
focal_class.signature: MoleculeIsomorphism of(MoleculeGraph pattern, MoleculeGraph target, BiFunction<MoleculeAtom, MoleculeAtom, Boolean> atomCondition, BiFunction<MoleculeBond, MoleculeBond, Boolean> bondCondition)
focal_class.class_method_signature: MoleculeIsomorphismFinder.findIsomorphism()
focal_class.full_signature: private MoleculeIsomorphism findIsomorphism()
focal_class.identifier: findIsomorphism
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: MoleculeIsomorphism
focal_class.signature: MoleculeIsomorphism findIsomorphism()
focal_method.body: public static MoleculeIsomorphism of(MoleculeGraph pattern, MoleculeGraph target) {
          return new MoleculeIsomorphismFinder(pattern, target, DEFAULT_ATOM_CONDITION, DEFAULT_BOND_CONDITION).findIsomorphism();
      }
focal_method.class_method_signature: MoleculeIsomorphismFinder.of(MoleculeGraph pattern, MoleculeGraph target)
focal_method.full_signature: public static MoleculeIsomorphism of(MoleculeGraph pattern, MoleculeGraph target)
focal_method.identifier: of
focal_method.invocations: findIsomorphism
focal_method.modifiers: public static
focal_method.parameters: (MoleculeGraph pattern, MoleculeGraph target)
focal_method.return: MoleculeIsomorphism
focal_method.signature: MoleculeIsomorphism of(MoleculeGraph pattern, MoleculeGraph target)