Skip to content

zmahnoor14/C4B

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

@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})







About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published