-
Notifications
You must be signed in to change notification settings - Fork 2
storing packing results in memory
Megan Riel-Mehan edited this page Sep 22, 2023
·
3 revisions
cellPack results data structures BEFORE
env
.molecules # array of [(x,y,z), rotation, ingredient, radius]
.result # array of [numpy.array(jtrans).flatten().tolist(), numpy.array(rotMatj),ingredient,ptInd]
## used for search tree lookup, all ingredients regardless of container :
.rTrans # array of positions
.rRot # array of rotations
.rIngr # array of ingredients
containers
.molecules # array of [(x,y,z), rotation, ingredient, radius]
ingredient
.results # an array of [position, rotation]
- is it important to store results on the containers?
- do we need to actually store the whole ingredient object each time? could we just store the id?
- what's the best structure? the group of flat arrays (rTrans, rRot etc), or one array of objects
[{p: , r:, id: pt_id: etc}]
or array or arrays as we have in .result? - Should we store everything as np arrays?
- we should have one "store" function that stores the data (right now each place function updates .rTrans for example
- we should have one way we're storing the data that we then use in all downstream results
AFTER:
env
.packed_objects # a class that holds an array of PackedObject, and has helper functions for getting things like all the positions or all the radii of the currently packed objects
containers
.packed_objects # a subset of all packed objects, and only the ones that are in this container
ingredient
.results # an array of [position, rotation]