Attach Molecular Properties as SD Data

The molecular properties calculated by OEFilter can be attached as SD data to the molecule. The OEFilter.SetSDTag method is used to attach the calculated molecular properties to molecules passed to the filter object.

SD tag data corresponds to the tabular data functionality. The SD data tag names are exactly the same as the names found in the table header. The SD data values are exactly what is output in the data table. The only exceptions are the “SMILES”, “Name”, and “Filter” columns since this information can be obtained other ways.

This example demonstrates how to set the table output to the oenul output stream to allow all properties to be attached as SD data, and write the tabular data to an output in the OEFormat.SDF, OEFormat.OEB, or the OEFormat.CSV format. To specifically write to the OEFormat.CSV format, also see the MolPropCSV example.

Warning

By default, only the properties up to the failing property will be attached to each molecule. Use OEFilter.SetTable to force every property to be attached as SD data. The same rule applies to SD data as tabular output data, only the properties specified in the filter file will be attached as SD data.

Command Line Interface

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

prompt> MolPropSDData --help

will generate the following output:

Simple parameter list
 filter options :
   -filtertype : filter type

 input/output options :
   -in : Input filename
   -out : Output filename

 other options :
   -verbose : Error level of messages

Code

Download code

MolPropSDData.cs

Examples

prompt> MolPropSDData -in drugs.sdf -out out_mpsd.sdf -filtertype Lead