Skip to content

Commit

Permalink
Merge pull request #79 from ccdc-opensource/MMH-124_MMHub_In_House_Dbs
Browse files Browse the repository at this point in the history
MMH-124 Add in-house protein database support
  • Loading branch information
AlexRajya authored Nov 12, 2024
2 parents 51aea28 + 7bfd75e commit 80b4f2e
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 76 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ For details please see [Access Control To In-House Databases](https://github.com

### In-house Database Configuration

:warning: **OnSite WebCSD assumes structure identifiers are unique across all registered in-house databases.
You will likely encounter unexpected behaviour if this is not the case.**

On-Site Lattice and WebCSD can be configured to read from in-house databases.

Provided within the installation is a sample database `teaching-subset.csdsql` which can be found in the `sample-data` folder in the root of the installation.
Expand All @@ -193,6 +196,27 @@ To enable in-house databases:

More information is given in the notes & example sections of the sample file. This acts as an [override file](https://docs.docker.com/compose/extends/) which you will have to include in the startup command.

### In-house Protein Database Creation and Configuration

If you have a Macromolecule Hub licence, you can also create and register in-house protein databases for use within OnSite WebCSD.

To create an In-house Protein Database, you will need the Python Utilities. These can be downloaded from the [CCDC Downloads page](https://www.ccdc.cam.ac.uk/support-and-resources/csdsdownloads/)
under `CSD Python API > Python CSD Python API Utilities`. If you do not see the CSD Python API listed in the available downloads, you may need to sign in.
The relevant script can be found under `ccdc > utitities > create_protein_database`.
You can run the script using the CSD Python API version 3.3.0 or later.

Once you have created your protein database, you can register it by adding to your `docker-compose.db-config.yml` file following the instructions above.
You must then mark the database as a protein database. Your database config should look something like this:

```yml
volumes:
- /path/to/ExampleProteinDb.csdsqlx:/csd-data/ExampleProteinDb.csdsqlx
environment:
- ServiceSettings__Databases__2__Name=Example Protein DB
- ServiceSettings__Databases__2__ConnectionString=/csd-data/ExampleProteinDb.csdsqlx
- ServiceSettings__Databases__2__Speciality__0=Protein
```
### CSD-Theory Web Database Configuration
Instructions on setting up CSD-Theory Web can be found in the [wiki](https://github.com/ccdc-opensource/on-site-webcsd/wiki/Setting-up-CSD%E2%80%90Theory-Web).
Expand Down
10 changes: 7 additions & 3 deletions docker-compose.disable-user-access.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# On-Site Version 4.0
# To disable User Access Control include this file in the startup command with -f docker-compose.disable-user-access.yml
version: '3.6'
# To disable User Access Control include this file in the startup command with -f docker-compose.disable-user-access.yml
version: "3.6"

services:
csd-platform:
environment:
- DisableUserAccessControl=true

webcsd:
environment:
- ApplicationOnSiteSettings__DisableUserAccessControl=true
- ApplicationOnSiteSettings__DisableUserAccessControl=true
20 changes: 9 additions & 11 deletions docker-compose.macromolecule-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,33 @@ services:
webcsd:
environment:
- CsdRepository__SketcherFeatures__1=Proteins

webcsdbackend:
environment:
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION}
- ServiceSettings__Databases__1__Name=PDB Database
- ServiceSettings__Databases__1__DbeName=pdb
- ServiceSettings__Databases__1__ConnectionString=dbe

ccdc-csd-substructuresearch:
environment:
- PdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=structure_optimisation;Database=${CSD_DATABASE}
- SubstructureSearchDatabaseConfiguration__Databases__1__Name=pdb
- SubstructureSearchDatabaseConfiguration__Databases__1__SettingsKey=PdbReadConnection
- SubstructureSearchDatabaseConfiguration__Databases__1__ReadConnectionString=${DB_CONNECTIONSTRING};SearchPath=structure_optimisation;Database=${CSD_DATABASE}
- SubstructureSearchDatabaseConfiguration__Databases__1__WriteConnectionString=${DB_CONNECTIONSTRING};SearchPath=structure_optimisation;Database=${CSD_DATABASE}

ccdc-csd-deposition:
environment:
- DepositionPdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}
- DatabaseConfiguration__Databases__1__Name=pdb
- DatabaseConfiguration__Databases__1__SettingsKey=DepositionPdbReadConnection
- DepositionDatabaseConfiguration__Databases__1__Name=pdb
- DepositionDatabaseConfiguration__Databases__1__ReadConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}
- DepositionDatabaseConfiguration__Databases__1__WriteConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}

ccdc-csd-textnumericsearch:
environment:
- PdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}
- DatabaseConfiguration__Databases__1__Name=pdb
- DatabaseConfiguration__Databases__1__SettingsKey=PdbReadConnection


ccdc-csd-unitcellsearch:
environment:
- UnitCellPdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=pdb_cell_optimisation;Database=${CSD_DATABASE}
- DatabaseConfiguration__Databases__1__Name=pdb
- DatabaseConfiguration__Databases__1__SettingsKey=UnitCellPdbReadConnection
- UnitCellDatabaseConfiguration__Databases__1__Name=pdb
- UnitCellDatabaseConfiguration__Databases__1__ReadConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_cell_optimisation;Database=${CSD_DATABASE}
- UnitCellDatabaseConfiguration__Databases__1__WriteConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_cell_optimisation;Database=${CSD_DATABASE}
2 changes: 1 addition & 1 deletion docker-compose.sample-csd-theory-db-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
ports:
- ${PLATFORM_PORT}:8443
# This is required for csd theory ingestion python script to work
#- 80:8080
- 80:8080

webcsdbackend:
volumes:
Expand Down
Loading

0 comments on commit 80b4f2e

Please sign in to comment.