Volume 1 Chapter 8 Use of Control Instructions

Back to Table of Contents

9.1 Graphics QUEST3D

There are three modes of search initiation:
by use of the QUEST command
by use of the FASTQUEST command
by use of the START command

9.1.1 The QUEST Command

The QUEST command defines a search query in terms of:

QUEST will be executed after any SCREEN instructions and only if the SCREEN tests succeed.

The logical operators .AND. .OR. .NOT. can be replaced by the symbols + , - respectively.

If parentheses are used then:

A search question with one test requires neither logical operators nor parentheses, eg. QUEST T1

Note, however, that the following two instructions are equivalent:

QUEST .AND. T1

QUEST (T1)

Two or more tests may be combined with the logical operators, eg.

QUEST3D will evaluate such logical expressions according to the order of precedence: Operators of equal rank will be evaluated from left to right. Unnecessary tests will never be performed and this means that care should be taken to ensure that the most efficiently executed tests are executed first.

Consider QUEST (T1 .OR. T2) .AND. (T3)

T1 will be tested first. If it succeeds T2 will not be executed and the program will skip to test T3.

If T1 and T2 both fail then T3 will not be executed.

A suggested order of tests to achieve maximum efficiency is:

If in doubt regarding the logical combination of tests it is safest to use parentheses:

Thus:

QUEST (T1) .AND. (T2 .OR. T3)

is equivalent to:

QUEST T1 .AND. T2 .OR. T3

and

QUEST (.NOT.T4) .AND. (T1 .AND. T2)

is equivalent to:

QUEST T1 .NOT. T4 .AND. T2

9.1.2 The FASTQUEST Command

The FASTQUEST command is located in the BUILD and SEARCH menus (see chapters 1 and 10 of Vol.2).

Selection of this command combines already defined tests with the .AND. operator.

A warning is displayed in case you do not wish automatic use of .AND.

If you accept the .AND. combination of tests then the search process is initiated.

Note that the use of FASTQUEST rather than QUEST does not result in a faster search process - it simply speeds the assignment of the question logic.

Ex.1 Suppose that only one test has been defined.

Ex.2 Suppose that two tests have been defined - one connectivity test and one non-connectivity test.

9.1.3 The START Command

The START command is located in the SEARCH menu (see chapter 10 of Vol.2).

The START command must be used:

Most similarity searches are conducted using HITALL so that all database entries are considered as potential target structures. These searches are then initiated by START.

However, as noted in chapter 6, a similarity search can be restricted to a subset of database entries on the basis of defined tests. In this case the QUEST command would be used to initiate the search.

Ex.1 Suppose you have selected screen 49 (neutron study) and not defined any tests.

Ex.2 Suppose you wish to browse through the entries at the start of the database.


9.2 Basic QUEST

There are two modes of search initiation: by use of the QUESTION instruction

by use of the START instruction

9.2.1 The QUESTION Instruction

The QUES instruction defines a search query in terms of:

QUES must occur only once and must be the last line in the instruction document.

Pressing <RETURN> at the end of the QUES line initiates the search process.

QUES will be executed after any SCREEN instructions and only if the SCREEN tests succeed.

The logical operators .AND. .OR. .NOT. can be replaced by the symbols + , - respectively.

If parentheses are used then:

A search question with one test requires neither logical operators nor parentheses, eg.

QUES T1

Note, however, that the following two instructions are equivalent:

QUES .AND. T1

QUES (T1)

Two or more tests may be combined with the logical operators, eg.

QUEST will evaluate such logical expressions according to the order of precedence: Operators of equal rank will be evaluated from left to right. Unnecessary tests will never be performed and this means that care should be taken to ensure that the most efficiently executed tests are executed first.

Consider QUES (T1 .OR. T2) .AND. (T3)

T1 will be tested first. If it succeeds T2 will not be executed and the program will skip to test T3.

If T1 and T2 both fail then T3 will not be executed.

A suggested order of tests to achieve maximum efficiency is:

If in doubt regarding the logical combination of tests it is safest to use parentheses.

Thus:

QUES (T1) .AND. (T2 .OR. T3)

is equivalent to:

QUES T1 .AND. T2 .OR. T3

and

QUES (.NOT.T4) .AND. (T1 .AND. T2)

is equivalent to:

QUES T1 .NOT. T4 .AND. T2

Ex.

SAVE FDAT
SCRE  90
T1  *YEAR  .GT.  1988
T2  *BCLA  52-57
T3  *AUTH W.H.WATSON
QUES  T1  .AND.  T2  .AND.  T3

In this example we have specified one control instruction, one screen and three tests.

The final line, the question line, combines the three tests with the .AND. operator.

When the question line is typed and <RETURN> is pressed the search process is initiated.

9.2.2 The START Instruction

The STAR instruction is used to initiate a database search: Pressing <RETURN> after STAR (or START) initiates the search.

It is important to note that if tests have been defined and screens assigned then if you specify START the search will proceed but only the screens will be used in determining hits - the tests will be ignored.

Most similarity searches are conducted using HITALL so that all database entries are considered as potential target structures. These searches are then initiated by START.

However, as noted in chapter 6, a similarity search can be restricted to a subset of database entries on the basis of defined tests. In this case the QUESTION instruction would be used to initiate the search.

Ex.1 Find neutron studies for which atomic coordinates are available.

SCRE  49  153
STAR

Ex.2 Suppose we wish to browse through the database beginning at refcode IJKLMN.

BEGI  IJKLMN
HITA
STAR

Back to Table of Contents

Volume 1 Chapter 10 Display of Hits in Graphics QUEST 2D-3D and 1D Menus.