code_notes.txt 3.4 KB

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