Release Date: 1 February 2008
Namedt_add - add an object to a set object
Generic Prototypedt_add(dt_Handle, dt_Handle) => dt_Handle
C Prototype#include "dt_smiles.h"
dt_Handle dt_add(dt_Handle set, dt_Handle object)
FORTRAN Prototypeinclude 'dt_f_smiles.inc'
integer*4 dt_f_add(set, object)
DescriptionAdd the given object 'object' to 'set', where 'set is a substructure, path, or pathset. The object 'object' must be the handle of an atom or bond from the base molecule of 'set'.
Adding an object to a substructure simply adds it if it is not already present in the substructure; the order in which objects are added to a substructure is not remembered. Adding an object to a path adds it to the end of the path unless the object is already present in the path. In either case, if the object is already present, the request is silently ignored.
In the case of adding a path to a pathset, the path object is copied and the copy is added to the pathset. Note that in this case, one does not directly get the handle of the new path object. When a pathset is deallocated, all of the paths within it are also deallocated. Note also that paths can not be removed from a pathset.
This function modifies 'set', so streams over the object are revoked, even if the object being added is already present in the 'set'.
Return ValueThe object 'set' is returned if the operation succeeds (even if 'object' is already present in the path or substructure), and NULL_OB is returned if the operation fails.
Related Topicsdt_alloc_path(3) dt_alloc_substruct(3) dt_member(3) dt_remove(3)