Daylight v4.9
Release Date: 1 February 2008


dt_mod_on - specify than an object may be modified

Generic Prototype

dt_mod_on(dt_Handle) => dt_Boolean

C Prototype

#include "dt_smiles.h"

dt_Boolean dt_mod_on(dt_Handle object)

FORTRAN Prototype

include ''

logical dt_f_mod_on(object)

integer*4 object


Puts the given object in the modify-on state. If 'object' is a molecule, it is set to the mod-on state, which allows modification. If 'object' is a reaction, the reaction and all of its component molecules are set to the mod-on state. If the molecule or reaction is already in the modify-on state, this function has no effect and is silently ignored.

Note that if a molecule which is a component of a reaction is set to mod-on, both the molecule and its parent reaction will be set to mod-on state. In effect, a reaction and its component molecules are treated as a single unit for structural modification; setting mod-on for any part sets mod-on for the whole.

The following functions may be applied only to molecules and reactions in the modify-on state: dt_addatom(3), dt_addbond(3), dt_addcomponent(3), dt_dealloc(3), dt_setaromatic(3), dt_setbondorder(3), dt_setbondtype(3), dt_setcharge(3), dt_setchival(3), dt_setdbo(3), dt_setimp_hcount(3), dt_setnumber(3), dt_setweight(3).

One exception is that an entire molecule may be deallocated from a reaction which is not in mod-on state.

Return Value

Returns the success (TRUE) or failure (FALSE) of the operation.

Related Topics

dt_mod_is_on(3) dt_mod_off(3)