|
From: | Ulf Schiller |
Subject: | Re: [ESPResSo-users] time dependent force |
Date: | Thu, 21 Jul 2011 08:16:03 +0200 |
User-agent: | Thunderbird 2.0.0.9 (X11/20071031) |
Jiajia Zhou wrote:
I mean if I use "integrate 1", then the forces have to be calculated before the first step of vv scheme and also at the third step.
This is true for the first call to "integrate". In successive calls, the forces in the first step are the same as in the third step of the previous integration. So unless you make changes to your system that affect the forces between calls to integrate, the forces will be reused and not recalculated.
Nevertheless, there lies the reason why you _have_ to implement a time dependent external force on the C-level, because the two occurrences of the forces within the integration are forces at different times - f(t) and f(t+dt), respectively. Therefore, setting the force at the TCL level will not give you the correct result.
Best regards, Ulf
The potential I used is just a sinusoidal potential. I am running some tests right now. If they are fine then I will be happy to send the relative codes. Thanks for your help! Jiajia On Wed, Jul 20, 2011 at 5:35 PM, Axel Arnold <address@hidden> wrote:On Wednesday 20 July 2011 16:02:41 Jiajia Zhou wrote:Thanks for the reply. I would like to change the force every single time step. To do this in the tcl level, I think the force are calculated twice for every time step (am I correct?), so I can save some time by implementing in the c level.Hi, no, the forces are normally calculated only once per time step, but twice used in the propagation. Nevertheless, if you have e.g. a periodically oscillating force, you definitely want to implement it as an constraint. Btw, if your external potential is not very exotic, such as e.g. a simple sinusoidal potential sin(kx + wt) or so, it would be nice if you could send us the code for integration with the next release, since that might be of general interest. Axel -- JP Dr. Axel Arnold ICP, Universität Stuttgart Pfaffenwaldring 27 70569 Stuttgart, Germany Email: address@hidden Tel: +49 711 685 67609
-- Dr. Ulf D. Schiller Building 04.16, Room 3006 Institute of Complex Systems (ICS-2) Phone: +49 2461 61-6144 Forschungszentrum Jülich, Germany Fax: +49 2461 61-2850
smime.p7s
Description: S/MIME Cryptographic Signature
[Prev in Thread] | Current Thread | [Next in Thread] |