Page tree

Query overview

Instant JChem provides powerful query capabilities.

Form based query vs. Query panel

Instant JChem provides two alternative approaches to querying, form based query (introduced in IJC 2.2) and the query panel (available from the first version).

Form based query provides an approach that should be familiar to ISIS/Base or ChemFinder users. The Form View (or Grid View) has a Query mode which can be activated by clicking on the 'Query' mode button in the view toolbar which causes the form/table to switch to a mode that allows you to enter query criteria into the form widgets or cells of the table.

The Query Panel provides an alternative approach to defining queries. It is more like a query builder, and provides a more powerful and controlled approach to querying, but can be more complex to use. In earlier versions of IJC the query panel had two modes, standard and advanced. These modes have now been removed making the query panel simpler to use and understand.

Form based query is probably best for simple data structures and simple queries, whilst the query panel is probably better for more complex queries. However, both mechanisms can be used in combination, as a query that is built with one mechanism is also visible in the other. For instance as you build a query using form based query the components of the query will also appear in the query panel, and the query could be executed through either mechanism.

Some limitations of form based query

Form based query does have a number of limitations compared to the query panel:

  • It only allows simple queries to be built, as it does not provide means of specifying nested AND and OR logic (simple AND logic is always applied).
  • It does not allow a query to be defined that contain fields that are not currently present on the form.
  • A field can only be represented in a query once.
  • Not all advanced options are available e.g. structure query options or the ability to pick values from a list where the field is defined as containing distinct values.

Queries with these more complex features that have been built using the query panel (or queries that might have been build using a different view that contains a different set of fields) cannot be fully represented in form based query. Those parts of the query that can be displayed are displayed, but in these circumstances this will not be a complete representation of the query, and only the elements that are displayed can be edited. In these cases using the query builder is the only way to see and define the complete query.

Query as text window

In addition to the query builder and form based query a query can also be viewed using the Query as Text window. By default this is shown below the query builder window. This window shows the query that is currently being built (the working query) in a simple human readable representation. The window also diplays any validation errors for the query, and the title bar of the window indicates whether the query has been applied or is in the process of being defined.

You cannot edit the query using the query as text window. It is only for informational purposes. If you do not want to see this information you can close the window. To bring it back use the appropriate item from the Window menu.

Structures in queries are displayed in smiles or smarts representation (or ChemAxon extended smiles or smarts if it is not possible to represent in Daylight smiles or smarts) as appropriate depending on the search type. e.g. for substructure searches the structure is represented in smarts.

Structure query features

Instant JChem has powerful structure query features. These are mostly provided by the Marvin and JChem toolkits. Please see the following documentation for full details of the structure query features:

Detailed information