12.07.2015 Views

The Computational Materials Repository

The Computational Materials Repository

The Computational Materials Repository

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.3 System Components and Processes 61difference is that the DirectoryReader is slower because it has to load all db-filesinto memory before being able to execute queries.<strong>The</strong> last access option for the PUI is to combine an agent and a DBReader.Agents can be used by regular users, as long as they don’t write to the database.Usage examples: How to use a DBReader: Fig. 2.19How to use a DirectoryReader: Fig. 2.20Agent: How to use a GroupingAgent Fig. 2.6PHP/HTML interface download: Fig. 2.16, item 8 will retrieve a script thatdownloads the selected item from the PHP/HTML interface using the DBReader.3.3.1.3 PHP/HTML User Interface (PHPUI)Purpose: <strong>The</strong> purpose of the PHPUI is to provide quick access to the data inthe database, similar to a state of the art search engine. A query is intuitivelywritten by adding keywords and restrictions on fields. <strong>The</strong> PHP/HTML interfaceallows to download data in various formats (JSON, xyz) and provides as well ascript that performs the current query in the PUI (3.3.1.2).Usage: <strong>The</strong> PHPUI is used to find and view data. Special views are available tovisualize runs of the genetic algorithm (Fig. 2.17) or a heat map for the solarlight capture[19], Fig. 1.3). <strong>The</strong> strength of this interface is that queries can bebookmarked, columns of table view chosen according to need and that the querycan be composed manually or with assistance and prefilled fields as shown insection 2.3.Usage examples: <strong>The</strong> PHPUI is accessed with a web browser. Find a keyword inthe list of keywords in the query box (Fig. 2.7) and click execute. <strong>The</strong> result isdisplayed as in Fig. 2.16. Now the interface suggests related keywords in the boxmarked with (3) in the figure which can be used to restrict the results further. Ifnecessary more filters can be added with the help of the tabs in the query box..When the sought data (set) is found it can download as (8) xyz or JSON file, orby clicking on the ASE-link a script is provided that opens the calculation withthe ASE[27] tool ag. When the browser is configured to execute the Pythonscript directly then a click one the ASE icon opens ag 1 directly. <strong>The</strong> CMRdownload link provides a script that retrieves the result as a db-file or allowsto modify the content of that db-file. Alternatively, if you’d like to downloadthe whole result set or process it with the PUI, the highlighted link in Fig. 2.18provides a PUI script enables to do so. (An example of such a script is shown inappendix 4.2.Implementation: <strong>The</strong> PHP/HTML interface runs on a web server and translatesthe requests from the web browser into database language and returns them asHTML back to the web browser. To avoid delays when loading the web page, therelated keywords and pre-filled field names in the query box are updated usingAJAX[28] (Asynchronous JavaScript and XML) a conglomerate of techniques tosend asynchronous requests to the web server and update the web page in thebrowser dynamically upon arrival of the answer.1 ag is an ASE tool to visualize atomic data(-files), can calculate inter-atomic distances andcreate new calculations.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!