Molecular queries

MolecularGraph.remove_hydrogens!Method
remove_hydrogens!(q::MolGraph) -> Nothing

Remove hydrogens from the molecular query.

Should be applied after specialize_nonaromatic!. This function is intended for generalization of PAINS query in PubChem dataset.

source
MolecularGraph.QueryTruthTableType
QueryTruthTable(fml::Function, props::Vector{QueryLiteral}) -> QueryTruthTable

Truth table evaluator for query match and containment.

This is expected to be generated by using generate_truthtable. Note that the properties must be unique and sorted if QueryTruthTable constructors is manually called for testing.

  • function: function that takes a vector whose size is length(props) that corresponds to each property variables and returns true or false.
  • props: QueryLiteral vector.
source
MolecularGraph.find_queriesMethod
find_queries(mol::MolGraph, query_diagram; subsets=[], filtering=true
    ) -> DictDiGraph, vprops, eprops

Find query relationship diagram by the given molecule. The filtered diagram represents query relationship that the molecule have.

source