PRELIMINARY-IMAGE This is a preliminary API until Fall 2020 and may be improved based on user feedback. It is currently available in C++ and Python.

bool OESameSubSearchScreenTypes(const OESubSearchScreen &,
                                const OESubSearchScreen &)

Returns whether or not the types (OESubSearchScreenTypeBase) of the two OESubSearchScreen objects are the same.


int main(int, char* [])
  OEQMol qmol;
  OEParseSmarts(qmol, "c1cc[o,n,s]c1");
  OESubSearchScreen qscreen;
  OEMakeSubSearchQueryScreen(qscreen, qmol, OESubSearchScreenType::SMARTS);

  OEGraphMol tmol;
  OEParseSmiles(tmol, "c1ccoc1");
  OESubSearchScreen tscreen;
  OEMakeSubSearchTargetScreen(tscreen, tmol, OESubSearchScreenType::MDL);

  if (OESameSubSearchScreenTypes(qscreen, tscreen))
    std::cout << "same screen types" << std::endl;
    std::cout << "different screen types" << std::endl;

  return 0;


Screens with different types should never be compared with each other since they have been generated with different algorithms, they might have different lengths and their bits can represent different molecular features.

See also