Molecular queries
MolecularGraph.remove_hydrogens!
— Methodremove_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.
MolecularGraph.QueryAny
— TypeQueryAny
Query component type that generate tautology function (arg -> true/false).
MolecularGraph.QueryLiteral
— TypeQueryLiteral
General query component type (arg -> key[arg] == value).
MolecularGraph.QueryOperator
— TypeQueryOperator
Query component type for logical operators (arg -> q1[arg] && q2[arg]).
MolecularGraph.QueryTree
— TypeQueryTree
Query component containar type for molecular graph properties.
MolecularGraph.QueryTruthTable
— TypeQueryTruthTable(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.
MolecularGraph.find_queries
— Methodfind_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.
MolecularGraph.query_containment_diagram
— Methodquery_containment_diagram(;sourcefile=DEFAULT_QUERY_DEFAULT_QUERIES
) -> DictDiGraph, vprops, eprops
Generate query containment diagram.