Skip to content

Commit 80b4f2e

Browse files
authored
Merge pull request #79 from ccdc-opensource/MMH-124_MMHub_In_House_Dbs
MMH-124 Add in-house protein database support
2 parents 51aea28 + 7bfd75e commit 80b4f2e

5 files changed

+203
-76
lines changed

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ For details please see [Access Control To In-House Databases](https://github.com
182182

183183
### In-house Database Configuration
184184

185+
:warning: **OnSite WebCSD assumes structure identifiers are unique across all registered in-house databases.
186+
You will likely encounter unexpected behaviour if this is not the case.**
187+
185188
On-Site Lattice and WebCSD can be configured to read from in-house databases.
186189

187190
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.
@@ -193,6 +196,27 @@ To enable in-house databases:
193196

194197
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.
195198

199+
### In-house Protein Database Creation and Configuration
200+
201+
If you have a Macromolecule Hub licence, you can also create and register in-house protein databases for use within OnSite WebCSD.
202+
203+
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/)
204+
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.
205+
The relevant script can be found under `ccdc > utitities > create_protein_database`.
206+
You can run the script using the CSD Python API version 3.3.0 or later.
207+
208+
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.
209+
You must then mark the database as a protein database. Your database config should look something like this:
210+
211+
```yml
212+
volumes:
213+
- /path/to/ExampleProteinDb.csdsqlx:/csd-data/ExampleProteinDb.csdsqlx
214+
environment:
215+
- ServiceSettings__Databases__2__Name=Example Protein DB
216+
- ServiceSettings__Databases__2__ConnectionString=/csd-data/ExampleProteinDb.csdsqlx
217+
- ServiceSettings__Databases__2__Speciality__0=Protein
218+
```
219+
196220
### CSD-Theory Web Database Configuration
197221
198222
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).
+7-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# On-Site Version 4.0
2-
# To disable User Access Control include this file in the startup command with -f docker-compose.disable-user-access.yml
3-
version: '3.6'
2+
# To disable User Access Control include this file in the startup command with -f docker-compose.disable-user-access.yml
3+
version: "3.6"
44

55
services:
6+
csd-platform:
7+
environment:
8+
- DisableUserAccessControl=true
9+
610
webcsd:
711
environment:
8-
- ApplicationOnSiteSettings__DisableUserAccessControl=true
12+
- ApplicationOnSiteSettings__DisableUserAccessControl=true

docker-compose.macromolecule-hub.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,33 @@ services:
55
webcsd:
66
environment:
77
- CsdRepository__SketcherFeatures__1=Proteins
8-
8+
99
webcsdbackend:
1010
environment:
11-
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION}
1211
- ServiceSettings__Databases__1__Name=PDB Database
1312
- ServiceSettings__Databases__1__DbeName=pdb
1413
- ServiceSettings__Databases__1__ConnectionString=dbe
1514

1615
ccdc-csd-substructuresearch:
1716
environment:
18-
- PdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=structure_optimisation;Database=${CSD_DATABASE}
1917
- SubstructureSearchDatabaseConfiguration__Databases__1__Name=pdb
20-
- SubstructureSearchDatabaseConfiguration__Databases__1__SettingsKey=PdbReadConnection
18+
- SubstructureSearchDatabaseConfiguration__Databases__1__ReadConnectionString=${DB_CONNECTIONSTRING};SearchPath=structure_optimisation;Database=${CSD_DATABASE}
19+
- SubstructureSearchDatabaseConfiguration__Databases__1__WriteConnectionString=${DB_CONNECTIONSTRING};SearchPath=structure_optimisation;Database=${CSD_DATABASE}
2120

2221
ccdc-csd-deposition:
2322
environment:
24-
- DepositionPdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}
25-
- DatabaseConfiguration__Databases__1__Name=pdb
26-
- DatabaseConfiguration__Databases__1__SettingsKey=DepositionPdbReadConnection
23+
- DepositionDatabaseConfiguration__Databases__1__Name=pdb
24+
- DepositionDatabaseConfiguration__Databases__1__ReadConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}
25+
- DepositionDatabaseConfiguration__Databases__1__WriteConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}
2726

2827
ccdc-csd-textnumericsearch:
2928
environment:
3029
- PdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=pdb_schema;Database=${CSD_DATABASE}
3130
- DatabaseConfiguration__Databases__1__Name=pdb
3231
- DatabaseConfiguration__Databases__1__SettingsKey=PdbReadConnection
3332

34-
3533
ccdc-csd-unitcellsearch:
3634
environment:
37-
- UnitCellPdbReadConnection=${DB_CONNECTIONSTRING};SearchPath=pdb_cell_optimisation;Database=${CSD_DATABASE}
38-
- DatabaseConfiguration__Databases__1__Name=pdb
39-
- DatabaseConfiguration__Databases__1__SettingsKey=UnitCellPdbReadConnection
35+
- UnitCellDatabaseConfiguration__Databases__1__Name=pdb
36+
- UnitCellDatabaseConfiguration__Databases__1__ReadConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_cell_optimisation;Database=${CSD_DATABASE}
37+
- UnitCellDatabaseConfiguration__Databases__1__WriteConnectionString=${DB_CONNECTIONSTRING};SearchPath=pdb_cell_optimisation;Database=${CSD_DATABASE}

docker-compose.sample-csd-theory-db-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
ports:
99
- ${PLATFORM_PORT}:8443
1010
# This is required for csd theory ingestion python script to work
11-
#- 80:8080
11+
- 80:8080
1212

1313
webcsdbackend:
1414
volumes:

0 commit comments

Comments
 (0)