OEExprOpts¶
Pattern matching in OEChem TK is always done using query molecules or query graphs (OEQMolBase). Non-query molecules, i.e. those that are defined by OEMolBase abstract base-class must be converted into a query molecule before using them in pattern matching algorithms (OESubSearch, OEMCSSearch or OECliqueSearch).
The OEExprOpts
namespace contains expression options
that control the conversion into query molecules.
See also
OESubSearch::Init
methodOEMCSSearch::Init
methodOEQMolBase::BuildExpressions
method
The OEExprOpts
namespace contains both atom and bond
expressions options.
Some options such as OEExprOpts::Aromaticity
can be used
both as an atom or a bond expression.
Constant name |
Atom expression |
Bond expression |
Should be used with |
---|---|---|---|
X |
X |
||
X |
|||
X |
|||
X |
X |
||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
X |
||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
|||
X |
X |
||
X |
|||
X |
X |
||
X |
|||
X |
X |
||
X |
X |
||
X |
The OEExprOpts
namespace also contains some predefined atom and bonds
expression combinations listed in the table below.
Constant name |
Combination of expression flags |
---|---|
|
|
|
Aromaticity
The OEExprOpts::Aromaticity
flag can be used both
as atom and bond expression option.
When using this option as an atom expression option, atoms are considered equivalent if the
OEAtomBase::IsAromatic
method returns the same value for them.When using this option as a bond expression option, bonds are considered equivalent if the
OEBondBase::IsAromatic
method returns the same value for them.
AtomicNumber
The OEExprOpts::AtomicNumber
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetAtomicNum
method returns the
same value for them.
AutomorphAtoms
This constant along with OEExprOpts::AutomorphBonds
is used when determining automorphism related graphs
OEExprOpts::AutomorphAtoms
is the combination of the
following atom expression constants:
AutomorphBonds
This constant along with OEExprOpts::AutomorphAtoms
is used when determining automorphism related graphs.
OEExprOpts::AutomorphBonds
is equivalent to the
OEExprOpts::Aromaticity
constant.
BondOrder
The OEExprOpts::BondOrder
flag can be used
as a bond expression option.
When using this option, bonds are considered equivalent if the
OEBondBase::GetOrder
method returns the
same value for them.
DefaultAtoms
This constant along with OEExprOpts::DefaultBonds
is used when a moderate degree of discrimination is required
of the graph equivalence.
OEExprOpts::DefaultAtoms
is the combination of
the following atom expression constants:
This combination of flags is intended to give a moderate degree of discrimination of the graph equivalence of atoms. Accordingly, two atoms are considered equivalent if they have the same element, aromaticity value and formal charge.
DefaultBonds
OEExprOpts::DefaultBonds
is the combination of the
following bond expression constants:
This combination of flags is intended to give a moderate degree of discrimination of the graph equivalence of bonds. Accordingly, two bonds are considered equivalent if they have the same bond order and aromaticity value.
Chiral
The OEExprOpts::Chiral
flag can be used both
as atom and bond expression option.
When using this option as an atom expression option, if the query atom has specified tetrahedral configuration, than it can only be mapped to an atom with the same stereo configuration.
Warning
The OEExprOpts::Chiral
is not available
as an atom expression option in maximum common substructure
search (OEMCSSearch) and clique search
(OECliqueSearch).
When using this option as a bond expression option, if the query bond has specified cis/trans configuration, than it can only be mapped to a bond with the same stereo configuration.
Warning
The OEExprOpts::Chiral
is not available
as a bond expression option in maximum common substructure
search (OEMCSSearch) and clique search
(OECliqueSearch).
Degree
The OEExprOpts::Degree
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetDegree
method returns the
same value for them.
Hint
The OEAtomBase::GetDegree
method returns the total
degree including the contribution from implicit hydrogens.
EqAromatic
The OEExprOpts::EqAromatic
flag can be used
as an atom expression option.
When using this option, aromatic atoms are considered equivalent
regardless of their atomic number.
Warning
The OEExprOpts::EqAromatic
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqCAliphaticONS
The OEExprOpts::EqCAliphaticONS
flag can be used
as an atom expression option.
When using this option, aliphatic query carbon atoms are considered equivalent
with aliphatic oxygen, nitrogen, or sulfur atoms.
Warning
The OEExprOpts::EqCAliphaticONS
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqCHalogen
The OEExprOpts::EqCHalogen
flag can be used
as an atom expression option.
When using this option, carbons are considered equivalent
with halogen atoms.
Warning
The OEExprOpts::EqCHalogen
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqCPSAcidRoot
The OEExprOpts::EqCPSAcidRoot
flag can be used
as an atom expression option.
When using this option, query atoms which are the central atom of a carboxylic,
phosphonic, or sulfonic acid moiety are equivalent to a
potential match atom which is also the central atom of a
carboxylic, phosphonic, or sulfonic moiety.
Warning
The OEExprOpts::EqCPSAcidRoot
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqDoubleTriple
The OEExprOpts::EqDoubleTriple
flag can be used
as a bond expression option.
When using this option, double and triple bonds are considered equivalent.
Warning
The OEExprOpts::EqDoubleTriple
should always be used
with the OEExprOpts::BondOrder
flag.
EqHalogen
The OEExprOpts::EqHalogen
flag can be used
as an atom expression option.
When using this option, halide atoms (OEElemNo::F
,
OEElemNo::Cl
, OEElemNo::Br
,
and OEElemNo::I
) are considered equivalent.
Warning
The OEExprOpts::EqHalogen
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqKetoneSulfoneRoot
The OEExprOpts::EqKetoneSulfoneRoot
flag can be used
as an atom expression option.
When using this option, query atoms
which are the central atom of a ketone or sulfone moiety are
equivalent to a potential match atom which is also the central
atom of a ketone or sulfone moiety.
Warning
The OEExprOpts::EqKetoneSulfoneRoot
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqMetal
The OEExprOpts::EqMetal
flag can be used
as an atom expression option.
When using this option, metal atoms are considered equivalent.
Warning
The OEExprOpts::EqMetal
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqNotAromatic
The OEExprOpts::EqNotAromatic
flag can be used both
as atom and bond expression option.
When using this option as an atom expression option, aliphatic atoms are considered equivalent regardless of their atomic number.
When using this option as a bond expression option, aliphatic bonds are considered equivalent regardless of their bond order.
Warning
The OEExprOpts::EqNotAromatic
should always be used
with either the OEExprOpts::AtomicNumber
or
the OEExprOpts::BondOrder
flag.
EqON
The OEExprOpts::EqON
flag can be used
as an atom expression option.
When using this option, nitrogen and oxygen atoms are considered equivalent.
Warning
The OEExprOpts::EqON
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqONS
The OEExprOpts::EqONS
flag can be used
as an atom expression option.
When using this option, nitrogen, oxygen and sulfur atoms
are considered equivalent.
Warning
The OEExprOpts::EqONS
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqPS
The OEExprOpts::EqPS
flag can be used
as an atom expression option.
When using this option, phosphorus and sulfur atoms
are considered equivalent.
Warning
The OEExprOpts::EqPS
should always be used
with the OEExprOpts::AtomicNumber
flag.
EqSingleDouble
The OEExprOpts::EqSingleDouble
flag can be used
as a bond expression option.
When using this option, single and double bonds and are considered equivalent.
Warning
The OEExprOpts::EqSingleDouble
should always be used
with the OEExprOpts::BondOrder
flag.
ExactAtoms
OEExprOpts::ExactAtoms
is the combination of the
following bond expression constants:
This combination of flags is intended to give a high degree of discrimination of the graph equivalence of atoms.
ExactBonds
OEExprOpts::ExactBonds
is the combination of the
following bond expression constants:
This combination of flags is intended to give a high degree of discrimination of the graph equivalence of bonds.
ExplicitDegree
The OEExprOpts::ExplicitDegree
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetHvyDegree
method returns the
same value for them.
FormalCharge
The OEExprOpts::FormalCharge
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetFormalCharge
method returns the
same value for them and the query atom has a non-zero charge.
If you want to consider zero charges see option
OEExprOpts::StrictFormalCharge
.
See also
OEExprOpts::StrictFormalCharge
constants
HCount
The OEExprOpts::HCount
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetTotalHCount
method returns the
same value for them.
Hint
The OEAtomBase::GetTotalHCount
method returns
the number of explicit and implicit hydrogens i.e.
the expression built when the OEExprOpts::HCount
flag is set will therefore not discriminate between implicit and
explicit hydrogen counts.
HvyDegree
The OEExprOpts::HvyDegree
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetHvyDegree
method returns the
same value for them.
Hybridization
The OEExprOpts::Hybridization
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetHyb
method returns the
same value for them.
Warning
Hybridization of the molecules must be perceived by calling
the OEAssignHybridization
function.
ImplicitHCount
The OEExprOpts::ImplicitHCount
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetImplicitHCount
method returns the
same value for them.
IntType
The OEExprOpts::IntType
flag can be used both
as atom and bond expression option.
When using this option as an atom expression option, atoms are considered equivalent if the
OEAtomBase::GetIntType
method returns the same value for them.When using this option as a bond expression option, bonds are considered equivalent if the
OEBondBase::GetIntType
method returns the same value for them.
Mass
The OEExprOpts::Mass
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetIsotope
method returns the
same value for them.
RingMember
The OEExprOpts::RingMember
flag can be used both
as atom and bond expression option.
When using this option as an atom expression option, atoms are considered equivalent if the
OEAtomBase::IsInRing
method returns the same value for them.
When using this option as a bond expression option, bonds are considered equivalent if the
OEBondBase::IsInRing
method returns the same value for them.
StrictFormalCharge
The OEExprOpts::StrictFormalCharge
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetFormalCharge
method returns the
same value for them.
The formal charges must be equivalent even if the formal charge
of the query atom is zero.
See also
OEExprOpts::FormalCharge
constant
StringType
The OEExprOpts::StringType
flag can be used both
as atom and bond expression option.
When using this option as an atom expression option, atoms are considered equivalent if the
OEAtomBase::GetType
method returns the same value for them.When using this option as a bond expression option, bonds are considered equivalent if the
OEBondBase::GetType
method returns the same value for them.
SymmetryClass
The OEExprOpts::SymmetryClass
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetSymmetryClass
method returns the
same value for them.
Warning
Symmetry of the molecules must be perceived by calling
the OEPerceiveSymmetry
function.
Valence
The OEExprOpts::Valence
flag can be used
as an atom expression option.
When using this option, atoms are considered equivalent if the
OEAtomBase::GetValence
method returns the
same value for them.
Hint
The OEAtomBase::GetValence
method
includes the valence contribution from implicit hydrogens,
therefore, the expression test may return successfully even when
the explicit valence of two corresponding atoms differ.