Volume 2 Chapter 3 3D-Constrain Sub-menu SYMM-CHECK

Back to Table of Contents

TRANSFORM

Function

TRANSFORM is used to combine or alter one or more old parameters <oldpar> to form a new parameter <newpar> by the action of one or more operators.

Previous versions of QUEST3D and GSTAT only allowed a single operator in each TRANSFORM instruction. All but the simplest of expressions required repeated use of "hidden" parameters, i.e. intermediate values that were calculated, one at a time, and then combined to form the final expression.

For example, formerly, to determine the mean of 6 values would have required 5 intermediate parameters to sum the values, one at a time.

Example

Old Parameters

The old parameters <oldpar> can be any of the following:

a parameter already defined by the DEFINE PARAMETER command

a parameter already defined by an earlier TRANSFORM command

a real numerical constant eg. 2.0 (for use only with binary operators)

New Parameter

By default the new parameter <newpar> is named Mn.

QUEST3D allows the user to replace the default name by an alternative, with a maximum of six characters.

If the new parameter is to be further transformed and its value is not required in the output parameter table then its name should begin with ?.

Using the Graphical Interface to TRANSFORM

The TRANSFORM command in the 3D-CONSTRAIN sub-menu now provides a calculator-style interface, complete with a numerical keypad, shown here:

The right hand side of the equation is first built, by clicking on any of the buttons in the calculator, and by clicking on the names of parameters displayed in the scrolling summary area at the left of the screen.

When the right hand side has been completed, you may either click on the "=" sign in the calculator or on the TRANSFORM command a second time. The calculator is then removed from the screen. QUEST3D then prompts for a name for the newly-defined parameter.

The "C" button cancels the last item selected, and the "AC" clears the entire expression, allowing you to start again.

Numeric constants may be built by clicking on the "numeric keypad". PI is provided as a pre-defined constant, and is stored as 3.1415927.

Brackets may be nested indefinitely. (Although there is a theoretical limit to the nesting of brackets, it is not possible to reach this limit in the 80 characters allowed on each QUEST/GSTAT instruction line.)

Thus, the mean of six bond lengths D1 to D6 is now obtained by a single QUEST3D as, for example,

MEAN = (D1 + D2 + D3 + D4 + D5 + D6) / 6.0

Operators

Three types of operator are available :

Unary : an operator acting on a single argument <oldpar>

ie. <unop> <oldpar>

eg. SQRT ( DELTA )

Binary type 1 an operator acting on two arguments which follow the operator

ie. <binop1> <oldpar1> <oldpar2>

eg. MAX ( DELTA1 , DELTA2)

Binary type 2 an operator acting on two arguments which flank the operator

ie. <oldpar1> <binop2> <oldpar2>

eg. DELTA1 + DELTA2

The complete list of operators is as follows :

Unary

SIN COS TAN EXP LOG LOG10

ABS SQRT ATAN ACOS ASIN POSTOR

POSTOR forces a torsion angle to lie in the range 0 to 360 degrees.

SIN, COS, TAN expect arguments in degrees.

ASIN, ACOS, ATAN yield angles in degrees.

Binary type 1

MOD <newpar> = remainder (<oldpar1> / <oldpar2)>

ATAN2 <newpar> = arctan (<oldpar1> / <oldpar2>)

RSIN <newpar> = <oldpar1> * sin(<oldpar2>)

RCOS <newpar> = <oldpar1> * cos(<oldpar2>)

SIGN <newpar> = <oldpar1> if <oldpar2> .ge. 0

-<oldpar1> if <oldpar2> .lt. 0

MAX <newpar> = maximum of <oldpar1> and <oldpar2>

MIN <newpar> = minimum of <oldpar1> and <oldpar2>

In fact, MAX and MIN have now been modified to take two or more parameters, for example,

TRANSFORM MAXB = MAX (B1,B2,B3,B4,B5,B6)

TRANSFORM MINB = MIN (B1,B2,B3,B4,B5,B6)

Binary type 2

+ - / * ^

Note that ^ is the operator for exponentiation.

Back to Table of Contents

Volume 2 Chapter 4 Display Menus CONTENTS.