Daylight v4.9
Release Date: 1 February 2008

Name

dt_parent - retrieve the parent object of an object

Generic Prototype

dt_parent(dt_Handle) => dt_Handle

C Prototype

#include "dt_smiles.h"

dt_Handle dt_parent(dt_Handle object)

FORTRAN Prototype

include 'dt_f_smiles.inc'

integer*4 dt_f_parent(object)

integer*4 object

Description

Gets the parent object of the specified object 'object'. An object has a parent only if it is a constituent part of that object. It is possible for an object to have both a base and parent object (see dt_base(3)).

If an object has a parent object, its existence depends upon its parent. If the parent object is destroyed, the child objects are also destroyed.

For atoms, bonds, and cycles, their parents are the molecule in which it is contained.

For a database, its parent is the server. For a TDT, its parent is either another TDT (if it is a subtree) or the database (for a root tree). A datatype's parent is the database to which it belongs. A dataitem's parent is its TDT. A datafields parent is the dataitem which contains it.

For a column or hitlist, its parent is the Merlin database from which the column or hitlist was created.

Molecules are the only objects which may optionally have a parent object. If a molecule is a component part of a reaction (either created as part of a reaction with dt_smilin(3) or added to a reaction with dt_addcomponent(3)), its parent is the reaction object. If the molecule is not a component of a reaction, then it will not have a parent (NULL_OB).

Return Value

Returns the handle of the parent object or the NULL_OB if 'object' does not have a parent or if an error is detected.

Related Topics

dt_adjunct(3) dt_base(3) dt_molecule(3) dt_setadjunct(3)