code_notes.txt 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. Notes on MCell3
  2. By convention "time" means time in internal simulation time units and "real
  3. time" means time in seconds.
  4. Grep for "FIXME", "XXX", or "TODO" for things to fix in the code.
  5. Check on usage of struct species->species_id in viz_output.c when we get
  6. there... how do we use it, do we need it etc...
  7. In react_cond.c, check_probs(), fix printfs (should they be fprintfs or
  8. deleted?)
  9. In struct rxn, fix comment on rxn->next according to actual usage in
  10. prepare_reactions().
  11. Label subset of species flags that pertain to counting as "Count Flags".
  12. Check how we handle the lack of struct surface_grid->binding_factor during a
  13. reaction between a volume molecule and a surface species. Surface_grid is NULL
  14. until a surface molecule is placed on the wall, but we need struct
  15. surface_grid->binding_factor to calculate reaction probability.
  16. Check how we initialize struct surface_grid->subvol (which subvol owns
  17. surface_grid?).
  18. It would save ~40% of struct subvolume memory usage if we got rid of BSP trees
  19. and therefore did not need struct subvolume->neighbor. As the code is now
  20. written we don't actually allocate a single struct bsp_tree anywhere.
  21. Use struct volume->speed_limit to set safe time step.
  22. Change viz output to use scheduler.
  23. Comment struct volume viz_*
  24. Write a proper information message for "mcell3 -info", i.e. struct
  25. volume->info_opt
  26. Add comments to members of struct notifications (if needed, pretty
  27. self-explanatory)
  28. Add code to ensure that each COUNT set outputs to a unique file.
  29. Switch notation on struct frame_data_list->viz_iterationll to not include "ll"
  30. Note: viz_output.c uses local variables both with and without the "ll",
  31. confusing.
  32. Change name of struct abstract_molecule->properties (which is a species) to
  33. something more sensible.
  34. Make sure that prepare_reactions always puts molecules before surfaces in
  35. reactant array. If it does then we can delete TODO comment in trigger_intersect
  36. function.
  37. Might be able to make which_unimolecular() faster by avoiding unnecessary rng
  38. usage when rx->npathways == 1.
  39. Change test_many_bimolecular() to return a data structure rather than a packed
  40. long long containing the result. C99 apparently now supports functions that
  41. return data structures.
  42. Make sure that rx->n_occurred is properly updated when test_bimolecular() and
  43. test_intersect()succeed but outcome_products() fails due to lack of space for
  44. products.
  45. Check logic of "if (reac_g==NULL || sg->mol[j]!=reac_g) sg->n_occupied++;" in
  46. outcome_products() of react_outc.c
  47. Look at src of libc's strdup and determine if we can use it instead of
  48. my_strdup.
  49. Add comment to poisson_dist() which points at detailed description of
  50. mathematical derivation of algorithm. Also write such a description.
  51. Bimolecular reactions between two surface molecules of the same species that
  52. preserve only one of the two reactants will always destroy the second reactant
  53. even if orientation marks suggest otherwise (this is because the "NULL" keyword
  54. does not act as a product placeholder in the parser). The orientation mark on
  55. the product is respected, however.
  56. Rate constants for reactions between volume molecules and surfaces (I mean
  57. surfaces, not surface molecules!) are currently in units of M^-1*s^-1 just like
  58. bimolecular reactions. This probably doesn't make sense so we should look into
  59. things like permeability and partitioning into membranes for a more sensible
  60. way to think about this.