Skip to content

Instantly share code, notes, and snippets.

@alphaville
Forked from anonymous/aspirin.json
Last active August 29, 2015 14:13
Show Gist options
  • Save alphaville/933c436153961416c667 to your computer and use it in GitHub Desktop.
Save alphaville/933c436153961416c667 to your computer and use it in GitHub Desktop.
{
"father_compound": 55,
"name": "aspirin",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"inchi_key": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
"sdf_representation": "http://server.com/compound/2/sdf",
"comment": [
"this is a comment",
"analogue of rdfs:comment"
],
"identifier": "http://opentox.ntua.gr:8080/compound/55/conformer/2",
"feature/10":{"title":"average_mass", "value":180.157},
"feature/83":{"title":"monoisotropic_mass","value":180.042252},
"feature/62":{"title":"iupac_name", "value":"2-Acetoxybenzoic acid"}
}
{
"title":"Dataset-04",
"features": [
"feature/405",
"feature/98",
"feature/4515",
"feature/8901"
],
"compounds": [
{
"_id" : ObjectId("77f8f5fedee9871fd62717993")
},
{
"_id" : ObjectId("a3092cfedc8243efd644901bb")
}
]
}
// Mongodb code to add a feature value pair to
// the above document:
db.compounds.update(
{"_id" : ObjectId("54b46dedee9871fd62716680")},
{ $set:
{ "feature/32":{"title":"inflammability", "value":-39.21} }
}
);
// and yet another example:
db.compounds.update(
{"_id" : ObjectId("54b46dedee9871fd62716680")},
{ $addToSet:
{ "tags":"anti-inflammatory" }
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment