Daylight v4.9
Release Date: 1 February 2008


dt_addcomponent - add a component object to a reaction object

Generic Prototype

dt_addcomponent(dt_Handle, dt_Handle, dt_Integer) => dt_Handle

C Prototype

#include "dt_smiles.h"

dt_Handle dt_addcomponent(dt_Handle reaction, dt_Handle mol, dt_Integer role)

FORTRAN Prototype

include ''

integer*4 dt_f_addcomponent(reaction, mol, role)

integer*4 reaction
integer*4 mol
integer*4 role


Add a component molecule to a reaction object. 'role' sets the role property of the molecule which is added. A copy of the given molecule is added to the reaction. The copy will be added to the appropriate molecule in the reaction based on the role or, if no component in the reaction with the appropriate role exists, the copy will be added to a new molecule.

The reaction must be in mod-on state otherwise this operation will fail.

Note that the molecule added may be any valid molecule, including dot-separated molecules, and note that any number of molecules may be added to a reaction. In all cases, the given molecule 'mol' remains unchanged.


Return Value

Returns the handle of a molecule object on success or NULL_OB on failure. The returned molecule object will be the molecule within the reaction to which the new component was added.

Related Topics

dt_alloc_reaction(3) dt_dealloc(3) dt_getrole(3) dt_smilin(3)