Skip to main content

Creating a Search Query for an Advanced Search

The Advanced Search option within the PSDI Cross Data Search service allows you to construct a very specific search using Optimade's filter language syntax. The grammar for this language enables you to use various operators such as boolean and comparison operators, to build complex queries. This feature is recommended for advanced users only as it requires you to understand Optimade's property name conventions and also how to select the most appropriate properties from the data sources you want to search. Searching for an unsupported property name will generate an error from a data source when you attempt to perform a search with an inappropriate property name. You can use our Property Explorer to find out about the property names supported by each data source, and to see which of these may be shared across multiple data sources.

You can click Advanced Search, to open the Advanced Search page in the PSDI Cross Data Search Service in a new tab.

The following are examples of the format of queries that can be used in the Query in Optimade filter language syntax field:

  • elements HAS "Si", "Al", "O" AND (nelements>=2 AND nelements<=7)
  • NOT ( chemical_formula_hill = "Al" AND chemical_formula_anonymous = "A" OR chemical_formula_anonymous = "H2O" AND NOT chemical_formula_hill = "Ti" )
  • elements HAS ANY "C", "Si", "Ge", "Sn" AND NOT elements HAS "Pb" AND nelements = 3
  • elements:elements_ratios HAS ALL "Al":>0.3333, "Al":<0.3334
  • chemical_formula_descriptive CONTAINS "H2O"
  • chemical_formula_reduced="H2NaO"
  • chemical_formula_hill="H2O2"
  • chemical_formula_anonymous="A2B"
  • nsites>=2 AND nsites<=7

Once you have entered your search query into the Query in Optimade filter language syntax, you can choose the data sources that you want to search. By default all of the data sources are selected and therefore you should ensure that you choose only those data sources that are applicable to the property names that you have chosen in your search query.

To change, add or remove data sources from the search:

  1. Click on the Select data sources to search button. A list of the available data sources to search is displayed with descriptions. All the available data sources are selected by default. Selected data sources are indicated with a tick icon to the left of the data source name.
  2. Optional: If you want to know more about a particular data source, you can click on the View resource catalogue link to read more about it.
  3. Optional: You can select or deselect all of the available data sources by clicking on the All or None buttons near the top of the list.
  4. Select the data sources that you want to search. You can search for specific data sources by scrolling through the list or by entering the name of the data source in the Filter data sources text field at the top of the list.
  5. When you have finished selecting the data sources for your search, click the cross (X) symbol at the top left of the list.

Once you have configured the constraints for your search query and selected the data sources you can click on the Search button to perform the search.

Search and Search Results

When you click on the Search button to perform your search, the list of data sources you selected to search is displayed with the progress in retrieving the results for each one. A tick symbol next to the data source name indicates results were retrieved successfully. You can cancel the search if you want to stop and view the retrieved results by clicking the Cancel button. If all the data sources returned results successfully, the list of data sources is replaced by the list of results.

If a cross appears next to a data source, this indicates an error was returned from that data source. The list of data sources will remain on screen so that you can see which data sources returned an error. To view more details about the cause of the errors and to view successful results, click the Results button.

For each result returned by the search query, a 'result card' is displayed. The content of the result cards is determined by the fields that are returned by each data source, so not all information is available for every record. At the top right of each result card you can see from which data source the result originates.

You can configure the number of results that are displayed per page using the per page dropdown at the top left of the page. You can also configure how many results for each database are displayed using the per database dropdown at the top left of the page.

Some data sources enable you to view more information about the data or to download the data. For example, the Crystallographic Open Database (COD) allows you to view a visualisation of the molecule and to download the data associated with the publication reference information. The controls for these additional functions can be found at the top right of the result card.

The Source tab in the result card provides the contents of the result record in JSON format.

What to do next

There are multiple ways to search the data sources accessible through PSDI, find out how to use our other search methods:

Related links:

PSDI offers other ways to search for data that are not included in our Cross Data Search service. Explore these links to access additional data sources offered by PSDI:


About this page

If you would like to contribute content to the PSDI Knowledge Base or have feedback you would like to give on this guidance, please contact us.