Daylight v4.9
Release Date: 1 February 2008

Name

dt_setorient - specify the orient attribute of a depiction

Generic Prototype

dt_setorient(dt_Handle, dt_Integer) => dt_Boolean

C Prototype

#include "dt_depict.h"

dt_Boolean dt_setorient(dt_Handle depiction, dt_Integer value)

FORTRAN Prototype

include 'dt_f_depict.inc'

logical dt_f_setorient(depiction, value)

integer*4 depiction
integer*4 value

Description

Sets the value of the orient attribute of the depiction to 'value'. Valid values are DX_ORIENT_NONE, DX_ORIENT_AUTO, and DX_ORIENT_WILD.

DX_ORIENT_NONE

Performs no orientation of the depiction.
DX_ORIENT_AUTO
Performs automatic portrait/landscape orientation of the depiction. (Operates like pre-4.4 versions).
DX_ORIENT_WILD
Uses the special atoms [*-1] and [*-2] to orient the depiction from left to right. The depiction is oriented by finding two "wildcard" atoms (the SMILES "*", i.e. atomic number zero), one with a charge of -1, and one with charge -2. The depiction is oriented then so that an imaginary line drawn between [*-1] and [*-2] is horizontal, [*-1] is to the left, and [*-2] to the right. Then, the atom that is farthest from this imaginary line is found; if it is below the line, the depiction is flipped around the line, orienting the picture so that the largest portion is above the imaginary line.

In addition to these orientations, labeling of atoms is affected: The [*-1] and [*-2] atoms are labeled "From" and "To", respectively, and any "*" atom with a positive charge is labeled "Xn" where "n" is the charge (e.g. "[*+3]" would be labeled "X3").

Return Value

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

Related Topics

dt_alloc_depiction(3) dt_orient(3)