-
Notifications
You must be signed in to change notification settings - Fork 3
New Recipe schema ideas
Saurabh Mogre edited this page Mar 2, 2023
·
12 revisions
- pull out config options into a separate file (remove from the recipe file and also add our new command line options)
"config": {
"place_method": "RAPID",
"overwrite_place_method": true,
"live_packing": false,
"inner_grid_method": "bhtree",
"spacing": 12,
"out": "", // if provided, saveResult is
"periodic_boundary": false,
}- new recipe:
{
"version": "1.6",
"format_version": "2",
"name": "HIV",
"bounding_box": [
[
-2482,
-2389,
100
],
[
2495,
2466,
2181
]
],
"gradients": [
{
"name": "gradRadSPIKE",
"direction": [
-480,
-480,
0
],
"radius": 1380,
"description": "",
"weight_mode": "linear",
"pick_mode": "rnd",
"gblob": 4,
"mode": "radial",
"active": true
},
{
"name": "gradRadMA",
"direction": [
480,
480,
0
],
"radius": 1380,
"description": "",
"weight_mode": "linear",
"pick_mode": "rnd",
"gblob": 4,
"mode": "radial",
"active": true
}
],
"objects": {
"id-high-conc": {
...settings
},
"HIV1_envelope_Pack_145_0_2_0": {
...settings
},
"HIV1_envelope_inside": {
is_container: true,
...settings,
"name": "Blood Plasma",
"geometry": {
"path": "",
"name": "",
"format": ""
},
"available_regions": {
"inner-leaflet": {
...settings,
}
}
},
"HIV1_VPU_Hyb_0_1_0":{
"version": 1,
"jitter_attempts": 10,
"orient_bias_range": [-3.1415927, 3.1415927],
"rotation_range": 6.2831,
"gradient": "",
"representations": {
"mesh": {
"path": "",
"name": "",
"format": "",
"coordinate_system": "left"
},
"atomic": {
"id": "",
"format": "pdb"
},
"packing": {
"path": "autoPACKserver/collisionTrees/",
"name": "HIV1_VPU_Hyb_0_1_0.sph",
"format": "",
"radii": [],
"positions": []
}
},
"cutoff_boundary": 0,
"jitter_max": [
0.2,
0.2,
0.01
],
"perturb_axis_amplitude": 0.1,
"encapsulating_radius": 42,
"partners": {
"names": [],
"probability_binding": 0.5,
"positions": [], // what is this used for? is it a relative position?
"excluded_names": [],
"probability_repelled": 0.5,
"weight": 0.2,
},
"principal_vector": [
0,
0,
1
],
"packing_mode": "random",
"type": "multi_sphere",
"rejection_threshold": 50,
"place_type": "panda_bullet",
"cutoff_surface": 42,
"use_mesh_rb": false,
"rotation_axis": []
},
// use this format to over write specific keys while using the database defaults for everything else
"database_ingredient": {
"mesh": "new_mesh",
"inherit": [path_to_database]
},
"composition": [
{ "id": "top_level", // this is the root of the tree (ie holds all other containers), it will get the bounding box as it's geo
"regions: {
"interior": ["HIV1_envelope_inside", "HIV1_envelope_Pack_145_0_2_0", "result_file.json"]
{
"id": "HIV1_envelope_inside",
"regions": {
"inner-leaflet": [],
"surface": [{"id": "HIV1_envelope_Pack_145_0_2_0", "count": 0, "priority": -1, version: "1"}],
"interior": ["HIV1_envelope_Pack_145_0_2_0"]
}
},
{
"id": "HIV1_envelope_Pack_145_0_2_0",
"regions": {
"inner-leaflet": [],
"surface": [
"HIV1_envelope_Pack_145_0_2_0"
],
"interior": [
"HIV1_envelope_Pack_145_0_2_0"
]
}
}
]
}Schema v1 example:
"gR": {
"direction": [
0,
0,
0
],
"radius": 1412.2,
"description": "",
"weight_mode": "square",
"pick_mode": "rnd",
"gblob": 4,
"mode": "radial"
} Available options:
"mode": {
"name": "mode",
"values": ["X","Y","Z","-X","-Y","-Z","direction","radial","surface"],
"default": "X",
"type": "list",
"description": "gradient direction",
"min": 0,
"max": 0,
},
"weight_mode": {
"name": "weight_mode",
"values": ["linear", "square", "cube", "gauss", "half-gauss"],
"default": "linear",
"type": "list",
"description": "calcul of the weight method",
"min": 0,
"max": 0,
},
"pick_mode": {
"name": "weight_mode",
"values": self.list_weight_mode,
"default": "linear",
"type": "list",
"description": "picking random weighted method",
"min": 0,
"max": 0,
},
"direction": { // Only for X, Y, Z direction gradients
"name": "direction",
"value": [0.5, 0.5, 0.5],
"default": [0.5, 0.5, 0.5],
"type": "vector",
"description": "gradient custom direction",
"min": -2000.0,
"max": 2000.0,
},
"description": {
"name": "description",
"value": self.description,
"default": "a gradient",
"type": "label",
"description": None,
"min": 0,
"max": 0,
},
"radius": { // Only for radial gradient mode
"name": "radius",
"value": self.radius,
"default": 100.0,
"type": "float",
"description": "radius for the radial mode",
"min": 0,
"max": 2000.0,
},
"gblob": { // Only for gaussian weight modes
"name": "gblob",
"value": self.gblob,
"default": 4.0,
"type": "float",
"description": "bobliness the gaussian mode",
"min": 0.1,
"max": 2000.0,
},
"surface_name": { // Only for surface gradient mode
"value": name of mesh to calculate surface distance from
},
"scale_to_next_surface": { // Only for surface gradient mode
"value": boolean, whether to scale distances
}Proposed changes:
- Add a key in the gradient called
mode_settingswhich contains all the settings specific to that gradient mode - Validate the
mode_settingsat the time of gradient creation, and check if there are missing or incorrect values - Example for gradient surface mode:
{
"gradient": {
"mode": "surface"
"mode_settings":{
"object": "nucleus",
"scale_distances_between": [
"name_of_end_surface_1",
"nucleus", // if the object itself is in this list, scale to object center
"name_of_end_surface_2",
"..."
] // If only one value is provided, just scale to that surface, all other grid points get 0 weight
}
}
}- Do the extra scaling calculations while initializing gradients instead of in
Compartment.py?- Consider pulling in gradient options into
Compartment.pyto calculate distances accordingly.
- Consider pulling in gradient options into
- Validate surfaces before creating weights. We currently don't have a system for superimposing gradients.
03/02/2023 Note in directional gradient:
- This mode creates a plane using the
centeranddirection. Perpendicular distance of the grid points from this plane are used to calculate weights.