Depicting Substructure Search Match

A program that performs a substructure search initialized with the given SMARTS pattern and highlights the identified matches on the depicted molecule.

Command Line Interface

A description of the command line interface can be obtained by executing the program with the –help argument.

prompt> python match2img.py --help

will generate the following output:

Simple parameter list
 highlight options :
   -highlightcolor : Highlighting color
   -highlightstyle : Highlighting style

 image options :
   -height : Height of output image
   -width : Width of output image

 input/output options :
   -in : Input filename
   -out : Output filename
   -smarts : SMARTS pattern

 molecule display options :
   -aromstyle : Aromatic ring display style
   -atomcolor : Atom coloring style
   -atomlabelfontscale : Atom label font scale
   -atomprop : Atom property display
   -atomstereostyle : Atom stereo display style
   -bondcolor : Bond coloring style
   -bondprop : Bond property display
   -bondstereostyle : Bond stereo display style
   -hydrstyle : Hydrogen display style
   -linewidth : Default bond line width
   -protgroupdisp : Protective group display style
   -scale : Scaling of the depicted molecule
   -superdisp : Super atom display style
   -titleloc : Location of the molecule title

 prepare depiction options :
   -clearcoords : Clear and regenerate 2D coordinates of molecule(s)
   -orientation : Set the preferred orientation of 2D coordinates
   -suppressH : Suppress explicit hydrogens of molecule(s)

Examples

prompt> python match2img.py -in indole.ism -out image.png -smarts "c1ccccc1"

will generate the image shown in Figure: Example of using the program with default highlighting

../_images/match2img-01.png

Example of using the program with default highlighting

prompt> python match2img.py -in indole.ism -out image.png -smarts "c1ccccc1" -highlightcolor green

will generate the image shown in Figure: Example of using the program with green highlighting

../_images/match2img-02.png

Example of using the program with green highlighting

prompt> python match2img.py -in indole.ism -out image.png -smarts "c1ccccc1" -highlightstyle BallAndStick

will generate the image shown in Figure: Example of using the program with ball and stick

../_images/match2img-03.png

Example of using the program with ball and stick highlighting

See also