Daylight v4.9
Release Date: 1 February 2008

Name

filter_fingertalk - program object to generate fingerprint data

Unix Synopsis

filter_fingertalk

Description

This is a talk program which can be called by DayCart or clients such as pipetalker to create a smarts based filter fingerprint. Bits are set in the fingerprint for the presence of the patterns described by the SMARTS in the filter file.

The input SMARTS filter file is read by sending the special message "Qwerty: Set FILTER_FILE <filename>".

A new set of filters can be set at any time.

After this message is sent then for each SMILES input the program returns an ASCII version of the fingerprint object with bits set as described above.

To facilitate use in DayCart the filter file can also be passed directly as long as it starts with [./$]. That is, rather than providing the special message "Qwerty: Set FILTER_FILE" on can simply provide the filename as input.

When used from DayCart the fingertest function can be used to select compounds with a particular profile of patterns. Alternately it can be used to create fingerprints based on structure keys.

Passing a space separated string of integers creates a target fingerprint for fingertest() with only the bits set on corresponding to the integer positions. Counts all start at 0. The first value should be the fingerprint size. This is corrected if it is not a power of 2 to the next greatest power of 2.

Input can also be an ASCII string of 1's and 0's. The corresponding bits are set, again starting at 0. The size is corrected if it is not a power of 2 to the next greatest power of 2.

The program responds to the following special messages in the Pipetalk protocol:

Qwerty: Set FILTER_FILE <file>

Specify the file of SMARTS patterns to be used for fingerprint creation. Any line beginning with the '#' character is a comment and is ignored. The SMARTS are interpreted in order and are used to set the corresponding bit in the fingerprint, starting with bit zero.
Qwerty: Say FILTER_FILE.
Returns the filename which is currently being used to create the fingerprints. The value returned will be the same as was given when the filter file is set.
Qwerty: Say FILTER_COUNT.
Returns a number which is the count of patterns successfully read from the filter file.
Qwerty: Say FP_SIZE.
Returns the number of bits in the current fingerprint size. The current fingerprint size will be the next power-of-two larger than the filter count, or number of SMARTS patterns being searched.
Qwerty: Say PADDING.
Returns the number of zero bits in the current fingerprint. This value is FP_SIZE - FILTER_COUNT.
Qwerty: Say ERRORS.
Returns the error strings from the previous operations. This can include SMARTS parsing errors during interpretation of the filter file, SMILES parsing errors from the input, or other errors.

Return Value

The program interacts via stdin/stdout. In general the program creates ASCII fingerprints from structures or other binary input. When complete, it returns zero for a normal exit or one for abnormal exit.

Files

$DY_ROOT/bin/filter_fingertalk

Daylight License

programs: fingerprint

Related Topics

fingerprint(1) licensing(5)
Daylight Theory Manual

Bugs

None known.