-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.mongo4coconut
70 lines (51 loc) · 2.32 KB
/
README.mongo4coconut
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@Author: Maria Sorokina ([email protected])
@Creation: 2020-06-01
@Last modified: 2021-03-15
# Restore COCONUT in MongoDB
1. ensure that MongoDB is installed and is running on your system. For more information:
2. Unzip the downloaded file and move in the created directory (until seing BSON files):
$ unzip COCONUTlatest.zip
$ cd COCONUTlatest
3. Restore COCONUT as MongoDB database:
$ mongorestore --db=COCONUTlatest .
4. (optiona) Restore without indexes and add them later (faster and safer):
mongorestore --db=COCONUTlatest --noIndexRestore .
mongo
use COCONUTlatest
db.sourceNaturalProduct.createIndex( {source:1})
db.sourceNaturalProduct.createIndex( {simpleInchi:"hashed"})
db.sourceNaturalProduct.createIndex( {simpleInchiKey:1})
db.sourceNaturalProduct.createIndex( {originalInchiKey:1})
db.sourceNaturalProduct.createIndex( {originalSmiles:"hashed"})
db.sourceNaturalProduct.createIndex( {absoluteSmiles:"hashed"})
db.sourceNaturalProduct.createIndex( {idInSource:1})
db.uniqueNaturalProduct.createIndex( {inchi:"hashed"})
db.uniqueNaturalProduct.createIndex( {inchikey:1})
db.uniqueNaturalProduct.createIndex( {clean_smiles: "hashed"})
db.uniqueNaturalProduct.createIndex( {molecular_formula:1})
db.uniqueNaturalProduct.createIndex( {coconut_id:1})
db.uniqueNaturalProduct.createIndex( {fragmentsWithSugar:"hashed"})
db.uniqueNaturalProduct.createIndex( {fragments:"hashed"})
db.runCommand(
{
createIndexes: 'uniqueNaturalProduct',
indexes: [
{
key: {
synonyms:"text", name:"text", chemicalClass:"text", chemicalSubClass:"text", chemicalSuperClass:"text", directParentClassification:"text", pass_bioactivity_searcheable:"text"
},
name: "superTextIndex",
weights: { name:10, synonyms:5 }
}
]
}
)
db.uniqueNaturalProduct.createIndex( {chemicalSuperClass: "hashed"})
db.uniqueNaturalProduct.createIndex( {chemicalClass: "hashed"})
db.uniqueNaturalProduct.createIndex( {chemicalSubClass: "hashed"})
db.uniqueNaturalProduct.createIndex( {directParentClassification: "hashed"})
db.uniqueNaturalProduct.createIndex( {deep_smiles: "hashed"})
db.uniqueNaturalProduct.createIndex( { "pfCounts.bits" :1} )
db.uniqueNaturalProduct.createIndex( { "pfCounts.count" : 1 })
db.fragment.createIndex({signature:1})
db.fragment.createIndex({signature:1, withsugar:-1})