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.