Daylight v4.9
Release Date: 1 February 2008


dt_xtransform - apply a transform to a molecule or sequence

Generic Prototype

dt_xtransform(dt_Handle, dt_Handle, dt_Integer, dt_Integer) => dt_Handle

C Prototype

#include "dt_smarts.h"

dt_Handle dt_xtransform(dt_Handle transform, dt_Handle som, dt_Integer direction, dt_Integer limit)

FORTRAN Prototype

include ''

integer*4 dt_f_xtransform(transform, som, direction, limit)

integer*4 transform
integer*4 som
integer*4 direction
integer*4 limit


Applies the given transform to the molecule or sequence of molecules 'som'. If 'som' is a sequence of molecules, the molecules are combined before the transform is applied.

Makes a sequence containing a reaction, where the given molecule(s) form one side of the reaction, and the molecules resulting from the application of the transform form the other side. If 'som' is a sequence of molecules, all of the molecules in the sequence will appear in the reaction which results from the transform.

The 'direction' can be either of DX_FORWARD or DX_REVERSE. If DX_FORWARD, the given molecules are reactants and the transformed molecules are products in the resulting reactions. If DX_REVERSE, the given molecules are products and the transformed molecules are reactants in the resulting reactions.

In all cases, this function returns a single newly-created reaction. the parameter 'limit' defines the number of times the transformation is applied to that reaction: if 'limit' is 0, the transform is applied for every non-overlapping match. If 'limit' is a positive integer, the transform is applied up to 'limit' times.

Return Value

Returns a sequence containing a single reaction or NULL_OB if an error is detected. Each reaction will have a complete atom map, except for atoms which are added or deleted during the reaction. The atoms in the reactions have an the integer properties "tmap" and "torder" set (see dt_integer(3)) for any atom which was matched by the transform atom expressions. The property "tmap" is the atom map class of the SMIRKS for the matching atomic expression. The property "torder" is the match order of nodes from the original transform, numbered from 1.

Related Topics

dt_match(3) dt_pattern(3) dt_smirkin(3) dt_transform(3) dt_xmatch(3)