Background:
Popular solid-state Nuclear Magnetic Resonance (NMR) techniques measure inter-atomic distances by observing the rate of transfer of magnetization between two spins by a spin diffusion mechanism. Plots of normalized magnetization vs spin diffusion mixing time are matched with simulated spin diffusion buildup curves for various inter-atomic distances (r) to find the best fit.
For some interesting biomolecular problems, such as the distance from membrane lipids chains to a site on a protein, the following 1D lattice simulation procedure is implemented:
- Arrange (r+1) points i along a 1D grid with width equal to your “guess” distance r.
- Set initial magnetization: M1,t=0 = 1 and Mi=/=1, t=0 = 0
- Evolve magnetization for all points by ∆Mi/∆t = D/a2[(Mi+1 - Mi) - (Mi - Mi-1)] (where D and a2 are constants) for some # of steps.
- Repeat for different simulation times and make a buildup curve; determine fit with data.
Question How do I implement Step 3 above in the law argument of the NBodySimulation function?
Follow-up question if this is impossible: Should I be going a SystemModelParametricSimulate direction instead?
Note: this Mathematica Stack Exchange thread ends with a similar unanswered query: https://mathematica.stackexchange.com/questions/105342/how-best-to-simulate-n-body-systems-in-a-functional-way

