Cellpack Recipe Schema 1.0¶
Recipe definition properties¶
name¶
Required string.
Unique recipe name
version¶
Required string.
Version of the recipe
example:¶
"recipe": {
"version": "1.0",
"name": "NM_Analysis_FigureA"
},
Options properties¶
saveResult¶
*Optional boolean
*. Default: false
.
Save packing result to .apr file.
result_file¶
Location of publicly hosted packing result
EnviroOnly¶
*Optional boolean
*. Default: false
.
Expect no compartments, only a bounding box volume
cancelDialog¶
pickWeightedIngr¶
*Optional boolean
*. Default: true
.
Prioritize ingredient selection by packingWeight.
pickRandPt¶
*Optional boolean
*. Default: true
.
Pick drop position point randomly. If false
, recipe packs in order from origin to opposite corner.
ingrLookForNeighbours¶
*Optional boolean
*. Default: false
.
Look for ingredients attractor and partner.
overwritePlaceMethod¶
*Optional boolean
*. Default: true
.
If true
, the Enviro-level place_method will overwrite all of the ingredient-level place method in a recipe
boundingBox¶
*Optional [[number, number, number], [number, number, number]]
*. Default: [0, 0, 0], [0.1, 0.1, 0.1]
.
An array of two points that define the corners of the bounding box.
smallestProteinSize¶
*Optional number
*. Default: 15
.
Smallest ingredient packing radius override (low=accurate | high=fast). As with largestProteinSize, if not defined, this value will be calculated by the algorithm based on the spheretree input file (packing radius) or the packingRadius calculated from ingredients that use primitives for their geometries.
largestProteinSize¶
*Optional number
*
As with smallestProteinSize, if not defined, this value will be calculated by the algorithm based on the spheretree input file (packing radius) or the packingRadius calculated from ingredients that use primitives for their geometries.
computeGridParams¶
windowsSize¶
runTimeDisplay¶
*Optional boolean
*. Default: false
.
Display packing in realtime (slow)
place_method¶
*Optional enum
*. One of "jitter"
, "spheresSST"
.. Default: "jitter"
.
Will be use if place_method isn’t in an ingredient setup
"jitter"
uses a simple algorithm developed by GJ, M-A-A, MS, and LA to test if a single sphere, sphere-tree, or other primative (box and cylinder) are colliding with masked/unallowed points on the grid… I can’t recall all of the allowed types, but check the input parameters that it accepts. I believe there is also an option to perform simple collisions directly between primatives, e.g. sphere-sphere, sphere-box, sphere-cylinder, cylinder-box, and spheretree-others
"spheresSST"
gets the sphereTrees of the potential colliding neighbors, and does an efficient sphereTree-sphereTree collision detection of the sphereTree for the object being packed against the sphereTrees of each neighbor- returns false if a collision is detected
use_gradient¶
*Optional boolean
*. Default: false
.
Use gradients if they are defined.
gradients¶
*Optional string[]
*
An array that defines the names of directional gradients to use.
innerGridMethod¶
Optional enum. One of "bhtree"
, "raytrace"
, "sdf"
, "pyray"
, "floodfill"
, "binvox"
, "trimesh"
, "scanline"
. Default: "raytrace"
.
"bhtree"
builds the compartment grid ie surface and inside point using bhtree.
"raytrace"
builds the compartment grid ie surface and inside point using raytrace
"sdf"
builds the compartment grid ie surface and inside point using signed distance fieldsfrom the UT package.
"pyray"
"floodfill"
builds the compartment grid ie surface and inside point using flood filling algo from kevin. Takes a polyhedron, and builds a grid. In this grid:
- Projects the polyhedron to the grid.
- Determines which points are inside/outside the polyhedron
- Determines point's distance to the polyhedron.
superFine provides the option doing a super leakproof test when determining
which points are inside or outside. Instead of raycasting to nearby faces to
determine inside/outside, setting this setting to true will force the algorithm
to raycast to the entire polyhedron. This usually not necessary, because the
built-in algorithm has no known leakage cases, even in extreme edge cases.
It is simply there as a safeguard.
``"binvox"``
``"trimesh"`` uses trimesh voxelize to find surface points
``"scanline"`` builds the compartment grid ie surface and inside point using scanline.
freePtsUpdateThreshold¶
*Optional number
*. Default: 0.0
.
Mask grid while packing (0=always | 1=never)
use_periodicity¶
*Optional boolean
*. Default: false
.
Whether to consider periodicity when packing objects. If true
a packed object at the edge of the bounding will wrap to the other side of the bounding box.
_timer¶
*Optional boolean
*. Default: false
.
Evaluate time per function.
_hackFreepts¶
*Optional boolean
*. Default: false
.
no free point update
example Options
:¶
"options": {
"cancelDialog": false,
"\_hackFreepts": false,
"windowsSize": 10,
"use_gradient": false,
"place_method": "jitter",
"saveResult": false,
"runTimeDisplay": false,
"overwritePlaceMethod": true,
"innerGridMethod": "bhtree",
"boundingBox": [[0, 0, 0],[1000, 1000, 1]],
"gradients": [],
"smallestProteinSize": 0,
"computeGridParams": true,
"freePtsUpdateThreshold": 0,
"pickWeightedIngr": true,
"\_timer": false,
"ingrLookForNeighbours": false,
"pickRandPt": false,
"largestProteinSize": 200,
"result_file": "autoPACKserver/results/NM_Analysis_FigureA1.0.apr.json",
"use_periodicity": false,
"EnviroOnly": false
},
Ingredient Properties¶
name¶
*Required string
*
Name of the ingredient.
molarity¶
*Optional number
*. Default: 0
.
Concentration of the ingredient.
count¶
*Optional number
*
Number to pack, additive with molarity.. Default: 0
.
encapsulating_radius¶
*Optional number
*. Default: 5
.
Smallest radius that completely includes all the geometry.
radii¶
*Optional number[][]
*
Property of a primitive sphere.
positions¶
*Optional [number, number, number][]
*
positions2¶
*Optional [number, number, number][]
*
sphereFile¶
*Optional string
*
Location of sphere file
priority¶
*Optional number
* Default to 0.0
.
Order to pack, largest negative number gets packed first.
pdb¶
*Optional string
*
PDB id in the protein database
color¶
[number, number, number]
meshFile¶
*Optional string
*
Location of mesh file
meshName¶
*Optional string
*
Name of the mesh file.
coordsystem¶
principal_vector¶
*Optional [number, number, number]
*. Default: [0.0, 0.0, 0.0]
.
type¶
*Optional enum
. One of "SingleSphere"
,"SingleCube"
,"MultiSphere"
,"MultiCylinder"
,"Grow"
,"Mesh"
*
"SingleSphere"
"SingleCube"
"MultiSphere"
"MultiCylinder"
"Grow"
: A spline ingredient
"Mesh"
offset¶
*Optional [number, number, number]
*. Default: [0.0, 0.0, 0.0]
.
max_jitter¶
jitter_attempts¶
*Required number
* . Default: 5
.
How many times it will attempts to pack before rejecting the ingredient.
perturb_axis_amplitude¶
use_rotation_axis¶
rotation_axis¶
Optional [number, number, number]. Default: [0.0, 0.0, 0.0]
.
rotation_range¶
use_orient_bias¶
orientBiasRotRangeMin¶
orientBiasRotRangeMax¶
cutoff_boundary¶
*Optional number
*. Default: 1.0
.
The amount this ingredient can move in x, y and z. If z is set to 0, will be a 2D packing.
cutoff_surface¶
place_method¶
*Optional enum. One of "jitter"
, "spheresSST"
*. Default: "jitter"
.
"jitter"
uses a simple algorithm developed by GJ, M-A-A, MS, and LA to test if a single sphere, sphere-tree, or other primative (box and cylinder) are colliding with masked/unallowed points on the grid… I can’t recall all of the allowed types, but check the input parameters that it accepts. I believe there is also an option to perform simple collisions directly between primatives, e.g. sphere-sphere, sphere-box, sphere-cylinder, cylinder-box, and spheretree-others
"spheresSST"
gets the sphereTrees of the potential colliding neighbors, and does an efficient sphereTree-sphereTree collision detection of the sphereTree for the object being packed against the sphereTrees of each neighbor- returns false if a collision is detected
rejection_threshold¶
packing_mode¶
*Optional enum. One of "random"
, "close"
, "closePartner"
, "randomPartner"
, "gradient"
, "hexatile"
, "squaretile"
, "triangletile"
*. Default: "random"
.
gradient¶
Optional
Gradient name to use if use_gradient
is true
.
proba_binding¶
proba_not_binding¶
*number
*
is_attractor¶
weight¶
partners_name¶
*Optional string[]
*
excluded_partners_name¶
*Optional string[]
*
partners_position¶
*Optional number[][]
*
partners_weight¶
properties¶
Optional object. Default: {}
.
score¶
*Optional string
*
organism¶
*Optional string
*
example ingredient¶
"Sphere_radius_100": {
"jitter_attempts": 6,
"molarity": 0,
"partners_position": [],
"rotation_range": 6.2831,
"color": [ 0.498, 0.498, 0.498 ],
"meshFile": null,
"sphereFile": null,
"weight": 0.2,
"orientBiasRotRangeMin": -3.1415927,
"radii": [[100]],
"cutoff_boundary": 0,
"coordsystem": "left",
"max_jitter": [ 1, 1, 0],
"perturb_axis_amplitude": 0.1,
"encapsulating_radius": 100,
"positions2": null,
"use_orient_bias": false,
"gradient": "",
"is_attractor": false,
"principal_vector": [ 1, 0, 0 ],
"properties": {},
"partners_name": [],
"count": 6,
"name": "Sphere_radius_100",
"orientBiasRotRangeMax": -3.1415927,
"packing_mode": "random",
"type": "SingleSphere",
"excluded_partners_name": [],
"rejection_threshold": 60,
"place_method": "jitter",
"cutoff_surface": 100,
"priority": 0,
"proba_binding": 0.5,
"rotation_axis": null,
"positions": [ [ [ 0, 0, 0] ] ],
"proba_not_binding": 0.5,
"pdb": null,
"use_rotation_axis": false
},