Code Monkey home page Code Monkey logo

refl-database's Introduction

Reflectometry Database

A mongodb database containing parameters for materials used in reflectometry, and their reflectivity parameters. The values used to create informed and uniform priors are included for the relevant parameters. The following parameters are currently included (with the italic parameters having prior values available):

Molecular parameters:

  • CAS number
  • Molecular volume
  • Molecular weight
  • Molecular scattering length density
  • Area per molecule

Amphiphile parameters:

  • Head volume
  • Tail volume
  • Head scattering length
  • Tail scattering length

Phospholipid parameters:

  • Natural or synthetic?

Reflectivity parameters:

  • Tail thickness
  • Head thickness
  • Roughness
  • phi_h (check what this is?)
  • phi_t (check what this is?)

Examples of using the database:

To build the database, type in the terminal (not a mongo shell):

cd refl-database-main

mongorestore --db refl_database db/dump/refl_database

To check whether the collections were imported successfully:

mongo

show dbs

use refl_database

show collections 

To show the entries in a collection, for example in the amphiphiles collection:

db.amphiphiles.find({})

To show how many entries there are in a collection, e.g. how many phospholipids there are:

db.phospholipids.count()

To get all of the parameters for a single molecule, such as DMPC:

db.getCollection('molecules').aggregate([

{$match : {name : "DMPC"}},

{$lookup: {from: "amphiphiles",localField: "name",foreignField: "name",as: "amphiphiles"}}, 
{$unwind:"$amphiphiles"},
{$project:{"amphiphiles.name":0,"amphiphiles.cas_no":0,"amphiphiles._id":0}}, 

{$lookup: {from: "phospholipids", localField: "name", foreignField: "name", as:"phospholipids"}},
{$unwind:"$phospholipids"}, 
{$project:{"phospholipids.name":0,"phospholipids.cas_no":0,"phospholipids._id":0}}, 

{$lookup: {from: "reflectivity_parameters", localField: "name", foreignField: "name", as: "reflectivity_parameters"}}, 
{$unwind: "$reflectivity_parameters"}, 
{$project:{"reflectivity_parameters.name":0,"reflectivity_parameters.cas_no":0,"reflectivity_parameters._id":0}}

]).pretty()

To find the values to use for priors for a parameter, e.g. the head volume for DMPC:

db.Gaussian.find({"name":"DMPC","parameter":"v_h"},{"_id":0,"name":0,"parameter":0}).pretty()  

refl-database's People

Watchers

Tim Snow avatar Andrew McCluskey avatar Nicola Farmer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.