Re: Re: want to modify NDSolve--molecular dynamics with mathematica

• To: mathgroup at smc.vnet.net
• Subject: [mg26375] Re: [mg26365] Re: want to modify NDSolve--molecular dynamics with mathematica
• From: Richard Gass <gass at physics.uc.edu>
• Date: Sat, 16 Dec 2000 02:40:08 -0500 (EST)
• References: <90v82t\$79m@smc.vnet.net> <200012130741.CAA17214@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,
There is a little known option to NDSolve called "StoppingTest". Rob
developers conference. I believe that you can use StoppingTest to
stop the solution when x[t]>a0 . You can then restart NDSolve after
you have moved the atom.
Jens-Peer Kuska wrote:
>Hi,
>
>you can write your equation with Mod[x[t],a0]
>but it will make the InterpolatingFunction[]s
>returned by NDSolve[] unusable. Because
>x[t] will jump back to for x>a0 and the
>interpolation is useless.
>
>You must write your own initial value solver.
>
>Regards
>   Jens
>
>
>"Toshiyuki (Toshi) Meshii" wrote:
>>
>>  Hello,
>>
>>  I was wondering whether I can apply NDSolve to molecular dynamics, on the
>>  standpoint of periodical boundary condition.
>>
>>  The eqation I want to solve is the simple Newton equation (Let me simplify
>>  the problem).
>>    m D[x, {x,2}] == F
>>  However, periodical boundary condition makes it difficult to apply NDSolve.
>>  That is, once
>>    0<x[t]<a0
>>  is not satisfied (a0 is a constant), I have to move the atom so that this
>>  condition is satisfied.
>>  In concrete,
>>    if x[t]<0  --->  x[t]=x[t]+a0
>  >   if x[t]>a0  --->  x[t]=x[t]-a0
>>  and then restart to solve the equation.
>>
>>  Is there any way to realize this by directly applying NDSolve?
>>  If not, how can I modify NDSolve?
>>
>>  -Toshi

--
Richard Gass
Department of Physics
University of Cincinnati
Cincinnati, OH 45221
phone- 513-556-0519
E-Mail gass at physics.uc.edu

```

• Prev by Date: bug with Compile ?
• Next by Date: Re: "?" to find symbols
• Previous by thread: Re: want to modify NDSolve--molecular dynamics with mathematica
• Next by thread: Re: Re: want to modify NDSolve--molecular dynamics with mathematica