MDL Query Depiction¶
In order to depict an MDL query the query molecule has to be imported by
calling the OEReadMDLQueryFile function.
The rest of the process is identical to depicting a molecule.
First the OEPrepareDepiction function has to be
called to generate the 2D atom coordinates, then the image can be
created by rendering the molecule (OERenderMolecule).
Listing 1: Example of MDL query depiction
  if (argc != 3)
    OEThrow.Usage("%s <mdlquery> <imagefile>", argv[0]);
  oemolistream ifs(argv[1]);
  OEGraphMol qmol;
  OEReadMDLQueryFile(ifs, qmol);
  OEPrepareDepiction(qmol);
  OERenderMolecule(argv[2], qmol);
See also
- OEReadMDLQueryFilefunction in the OEChem TK manual
Atom Query Features¶
The depiction of the following MDL atom query features is supported:
- The 8th column in the atom block in the V2K format file (or - HCOUNT=in the V3K format file) is used to define the number of allowed hydrogens for an atom. (See examples in Table: Example of depicting hydrogen count)- (H0)means no hydrogen atoms allowed unless explicitly drawn.
- (Hn)means atom must have- nor more implicit hydrogen(s)
 - Examples of depicting hydrogen count¶ - query             
- Query atom types: - A= any atom type except hydrogen
- Q= any atom type except hydrogen and carbon
- L= atom list
 - The - M ALSline in the property block in the V2K format file ( or- [aaa,bbb,..]in the V3K format) is used to list alternative atom types for an atom. (See examples in Table: Examples of depicting query atom types)- Examples of depicting query atom types¶ - query - target - target - target                                 
- M CHGline in the property block in the V2K format file (or- CHG=in the V3K format) is used to define atom formal charges. (See examples in Table: Example of depicting formal charge)- Examples of depicting formal charge¶ - query - target - target       
- M RBCline in the property block in the V2K format file (or- RBCNT=in the V3K format) is used to limit the number of allowed ring bonds attached to an atom. (See examples in Table: Example of depicting ring count)- (r0)means no ring bond allowed
- (r*)means as drawn
- (rn)means- nnumber of ring bonds allowed
 - Examples of depicting ring count¶ - query - target - target             
- M SUBline in the property block in the V2K format file (or- SUBST=in the V3K format) is used to set the number of allowed substitutions of an atom. (See examples in Table: Examples of depicting substitution count)- (s0)means no substitution allowed
- (s*)means as drawn
- (sn)means- nnumber of substitution(s) allowed
 - Examples of depicting substitution count¶ - query - target - target             
- M UNSline in the property block in the V2K format file (or- UNSAT=in the V3K format) is used to specify whether or not an atom is unsaturated, i.e., having at least one multiple bond. (See examples in Table: Examples of depicting unsaturated property)- Examples of depicting unsaturated property¶ - query - target - target       
Bond Query Features¶
The depiction of the following MDL bond query features is supported:
- Alternative bond types in the bond block (4 = aromatic, 5 = single or double, 6 = single or aromatic, 7 = double or aromatic, 8 = any bond). (See examples in Table: Examples of depicting query bond types) - Examples of depicting query bond types¶ - query - target - target - target                         - See also - OEBondDisplayTypenamespace
 
- The 6th column in the atom block in the V2K format file ( or - TOPO=in the V3K format) describes bond topology. (See examples in Table: Examples of depicting bond topology)- (rn)means that it can only mapped to ring bond
- (ch)means that it can only mapped to chain bond
 - Examples of depicting bond topology¶ - query - target - target             
- Double bond stereochemistry is considered if both ends of the bond are marked with stereo care flags in the atom block in the V2K format file ( or - STBOX=in the V3K format). (See examples in Table: Examples of depicting bond stereo care)- Examples of depicting bond stereo care¶ - query - target - target             
See also
- Depicting MDL Query example 
R-group Depiction¶
OEDepict TK can also depict R-group information by interpreting the M  RGP
line in the property block of an MDL file
(See examples in Table: Examples of depicting R-groups)
|   |   |