Skip to content

CCD is a web application that facilitates protein crystallography experiments. In this repository you can find the core of the application.

Notifications You must be signed in to change notification settings

gdamaskos/flask_with_ajax_and_matrix_visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CCD

CCD stands for Crystallisation Construct Designer.

CCD is a web application that facilitates protein crystallography experiments. In this repository you can find the core of the application.

You can visit the complete site https://ccd.rhpc.nki.nl

Basic web software used in this project:

  • Flask
  • JQuery
  • AJAX
  • Google Material Design
  • Bootstrap

Docker image run

If you do not have Docker you can install it in Ubuntu following these steps:

https://docs.docker.com/engine/install/ubuntu/

You can run the Docker image from the Docker Hub like this:

docker run -d -p 8888:5000 --name ccd_container gdamaskos/ccdimg

Then visit the address:

http://localhost:8888

Enjoy! You can also find the Dockerfile in this repository's root directory.

Installation for development on your computer

Prerequisites

First of all, you must be running a Debian Operating System like Ubuntu.

The following prerequisites are required by CCD and must be installed manually if not present:

Steps for setting up the development environment

Clone the repository from github and go to the ccd directory:

git clone https://github.com/gdamaskos/flask_with_ajax_and_matrix_visualization.git

cd flask_with_ajax_and_matrix_visualization

Create a python3.8 virtual environment containing the dependences found in requirements.txt:

python3 -m venv ~/virtual_environments/ccd3
source ~/virtual_environments/ccd3/bin/activate

Install python dependencies:

pip install wheel
pip install -r requirements.txt

Modify the settings in config/settings.example to your needs and rename the file to config/ccd_settings.cfg. Make sure you generate a new secret key, and fill in a valid email to allow Uniprot to notify you in case of problems.

The secret key can be generated using a python shell, for example:

$ python
>>> import os
>>> os.urandom(96)

Run the tests

./test.sh

Start the app!

./run_autoreload.sh

Visit the address:

http://localhost:5000

Further options for deployment

If you would like to create systemd services to run CCD automatically see the config/celery.service and config.ccd3.service.

As an alternative, you can use python supervisor and use the config/supervisor.conf to make a system service ccd managed by supervisor (edit where necessary).

If you need to configure a reverse proxy with apache check config/xxx-ccd.conf to see an example.

The contact page (available only on developer versions for ccd.rhpc.nki.nl) requires a working Google maps API. (see https://developers.google.com/maps/api-key-best-practices for how to obtain and configure one) In short:

  1. Generate an API key
  2. Restrict it by HTML referrer to the website you are running CCD from + /contact (e.g. ccd.rhpc.nki.nl/contact)
  3. Enable "Map Javascript API".
  4. Add your API key to contact.html template in the place of the current key.

About

CCD is a web application that facilitates protein crystallography experiments. In this repository you can find the core of the application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published