Skip to content

User guide

Nitish Garg edited this page Aug 31, 2017 · 2 revisions

Setting it up

Once you have setup the project on your machine, you might be ready to try it out by building your own data repository of computational chemistry log files.

In case you are not having these files and still want to try out the project, go ahead and download a sample collection of files from cclib-data repository

In case you are using docker to run the project, make sure that you have made the .env file. Now, if you are seeding your data repository with some files, set the variable SETUP_DB as 1 and DATA_FOLDER_PATH as the folder path to the files in your local machine. With this configuration, when you run the sudo docker-compose up command, the docker instance so created parses data from files in the provided folder, seeds MongoDB database of the docker instance with this data and then starts the flask server. Next time onwards, keep SETUP_DB as 0 to directly run flask application without resetting the database in docker instance.

Or, when using virtual environment, set the value of variables in config.py accordingly. Then, run the application using python run.py along with necessary parameters. Again, you might want to seed the data repository when running for the first time and hence give command as python run.py 1 in order to seed MongoDB database on your local machine with data from the parsed files.

Finally, irrespective of whether database setup was run or not, the flask application will be available in browser at 5000 port (flexibility to change app port is yet to be implemented in the project).

Using the web interface

Here are the features available in web front-end as of now:

  • Any computational chemistry log file (of format supported by cclib) can be uploaded on the webpage to view the parsed data from it
  • A 3D rendering of the molecule if atom coordinates information is available
  • Browse menu listing the various molecular formulas for which documents are available in the deployed instance's data repository
  • Listing of documents corresponding to a molecular formula
  • Search page supporting filtering with various attributes of logfiles
  • Displaying details of a document selected from browsing menu or search results
  • Download data of a particular document
  • Page to upload and add a log file to the data repository

API documentation

Following APIs are available:

  • /api/browse/molecules (GET, POST)
    Fetch all molecular formulas
  • /api/browse/files (GET, POST)
    Fetch all parsed files
  • /api/browse/<formula> (GET, POST)
    Fetch documents corresponding to a molecular formula
  • /api/file/<doc_id> (GET, POST)
    Get details of a particular parsed file (specified with MongoDB document id)
  • /api/search/<search_params> (GET, POST) (unavailable)
    Search API which supports filtering by various attributes available in parsed files
  • /api/upload (POST)
    Upload a log file
  • /api/addfile (POST)
    Add a log file to data repository
Clone this wiki locally