Daylight v4.9
Release Date: 1 February 2008


dt_getrole - get the role an object plays in a reaction

Generic Prototype

dt_getrole(dt_Handle, dt_Handle) => dt_Integer

C Prototype

#include "dt_smiles.h"

dt_Integer dt_getrole(dt_Handle object, dt_Handle reaction)

FORTRAN Prototype

include ''

integer*4 dt_f_getrole(object, reaction)

integer*4 object
integer*4 reaction


Gets the 'role' which the given object plays in the reaction. The valid roles are DX_ROLE_REACTANT, DX_ROLE_AGENT, and DX_ROLE_PRODUCT. The role is set using dt_addcomponent(3) or automatically during dt_smilin(3). Object may be an atom, bond, cycle, or molecule. It is not possible to change the role of an object once it is part of a reaction.

Return Value

Returns the role or -1 if an error is detected or if the object is not a component of the reaction.

Related Topics

dt_addcomponent(3) dt_base(3) dt_parent(3) dt_smilin(3)