My molecular dynamics simulations are being contrary. As in "contrary to what is known about molecular dynamics".
Suppose you have a particle (or two, or n) and you set it loose under some classical set of forces. You do this by calculating the position, velocity, and acceleration of the particle(s) at regular intervals (timesteps) iteratively: use the previous set of information to calculate the next one (basically, think Taylor series; that's pretty much all it is). Things like average energy can be derived from all this.
I'm pretty sure that the following are true:
1. smaller timesteps = better simulation, in the sense that standard deviations tend to be smaller and you catch "fast" events, but it also means the simulation is slow in some sense
2. the longer the simulation runs, the less it represents reality. Slow events are hard to simulate because of this.
Of course, *my* simulations flew in the face of all this: the larger the time step (until divergence), the smaller the standard deviation. Long simulations (say 2-3 orders of magnitude longer) behave practically the same as short ones.
The worst part is, the code isn't mine. It's given as part of the assignment. Which means it well ought to work, dammit!
Grrr.
Sunday, October 18, 2009
This is why you shouldn't do homework two days before it's due
Posted by
Echiral
at
7:20 PM
Labels: University Life
Subscribe to:
Post Comments (Atom)
2 comments:
actually with both of those statements are not quite clear:
1. if your timesteps are too small you may run into numerical problems. for every time step you have an additional error on the order of your working precision. especially if you use only real*4 variables that will be important
2. at least if you have a proper thermostat the simulation should not become worse with time. in many simulations people actually wait an equilibration time before they start collecting the data
enjoy your simulations :)
1. Yes you are right - apparently that was what happened to me, yay.
2. It happened to be a NVE simulation, so no thermostats. But I'll keep that in mind when I run my NVT simulation, which (probably) would be sometime today.
If by "enjoy" you mean "refrain from banging one's head beside the laptop", sure :P
Post a Comment