Previous Thread
Next Thread
Print Thread
How to increase external force linearly with time
#38059 08/21/20 12:23 PM
Joined: Nov 2019
Posts: 46
A
Forum Member
OP Offline
Forum Member
A
Joined: Nov 2019
Posts: 46
Hello all,

I noticed that there is an option in pull force command to increase force linearly with respect to time. The issue is that if I invoke the command ' pull force 50 xdir 0 ydir 0 zdir -1 switch 3 sfor 0' before dynamic command, then simulation ceased with 'Linearly time-varying switching has to be invoked'. I understand that the pull has to be invoked with dynamics if I want to increase force linearly, but I just don't know how to do it. I tried:

DYNA cpt leap reSTRT NSTEP 200000 TIMESTEP 0.001 -
IPRFRQ -1 IHTFRQ 0 IEQFRQ 0 NTRFRQ 10000 -
IUNREA 91 IUNCRD 92 iunwrite 93 IASVEL 1 KUNIT 20 -
NPRINT 1000 NSAVC 5000 IHBFRQ -1 imgfrq -1 INBFRQ -1 -
PCONst pmass 1000 pgamma 20 PREFerence 1.0 -
ILBFRQ 1000 RBUFFER 0.0 TBATH 298.15 -
langevin FIRSTT 298.15 FINALT 298.15 TSTRUCT 298.15 TWINDH 0.0 TWINDL 0.0 -
pull force 50 xdir 0 ydir 0 zdir -1 switch 3 sfor 0

Is this the correct way?

Last edited by Allen_123; 08/21/20 12:25 PM.
Re: How to increase external force linearly with time
Allen_123 #38061 08/21/20 12:41 PM
Joined: Sep 2003
Posts: 8,522
Likes: 2
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,522
Likes: 2
I've always used PULL prior to dynamics, but have not tried the time varying option.

What does CHARMM tell you when try that?

Why use Langevin when Hoover is a superior thermostat?


Rick Venable
computational chemist

Re: How to increase external force linearly with time
rmv #38063 08/21/20 03:43 PM
Joined: Nov 2019
Posts: 46
A
Forum Member
OP Offline
Forum Member
A
Joined: Nov 2019
Posts: 46
Thanks for reply. I'm using c42b2 version. I used Langevin because I intended to reproduce a literature result simulated by Langevin dynamics. Since force is large for my system, I tried time varying option as suggested in doc. By merging pull command with dyna command, I did not get any error or warning. But PULL energy term is missing in the output.


DYNA> 190000 20390.00000 -969.14465 1835.64860 -2804.79325 298.36576
DYNA PROP> 40.51937 -953.41268 1873.69964 15.73197 -353.24357
DYNA INTERN> 765.31161 818.62664 141.14061 1112.67421 43.24865
DYNA EXTERN> 661.86294 -661.57667 0.00000 0.00000 0.00000
DYNA IMAGES> -338.54527 -1362.13148 0.00000 0.00000 0.00000
DYNA EWALD> 209.44001 -8243.52481 4078.55425 0.00000 0.00000
DYNA PRESS> 1084.60823 -849.11251 -3500.04955 1040.83874 22418.48166
DYNA XTLE> -953.88994 47.32859 0.32697 599.81947
DYNA LRCor> -29.87394 -59.73750

missing (DYNA POLAR: EPOLAR PULL)

Last edited by Allen_123; 08/21/20 03:49 PM.
Re: How to increase external force linearly with time
Allen_123 #38064 08/21/20 08:28 PM
Joined: Sep 2003
Posts: 4,801
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,801
Likes: 2
PULL is a separate command (ie, it is not an option to the dynamics command).
Usage:
PULL ....
DYNA ....

Several pull-commands may be given prior to the dynamics command:
PULL ...
PULL ...
DYNA ...

See cons.info (or cons.doc), and testcases c25test/pull.inp, c34test/pull_switch.inp


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: How to increase external force linearly with time
Allen_123 #38066 08/22/20 02:02 AM
Joined: Nov 2019
Posts: 46
A
Forum Member
OP Offline
Forum Member
A
Joined: Nov 2019
Posts: 46
Thank you for your help. I found energy command after the pull command is the issue.

Re: How to increase external force linearly with time
Allen_123 #38067 08/24/20 07:10 AM
Joined: Sep 2003
Posts: 4,801
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,801
Likes: 2
In what way is the energy command an issue?


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: How to increase external force linearly with time
Allen_123 #38068 08/26/20 07:07 AM
Joined: Nov 2019
Posts: 46
A
Forum Member
OP Offline
Forum Member
A
Joined: Nov 2019
Posts: 46
The energy command (putting after pull command with time varying option) will cause 'Linearly time-varying switching has to be invoked' error.

Is it possible to self-define a time varying force, and implement it in the pull command. For instance, if a force has time dependence of (t^2-2000*t), then:

calc force= (@MDstep)E2-2000*(@MDstep)E2

pull force @force xdir ydir zdir select all end

dynamic command
.....

Re: How to increase external force linearly with time
Allen_123 #38071 08/27/20 05:15 PM
Joined: Sep 2003
Posts: 4,801
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,801
Likes: 2
OK, but a time-dependent force is not so meaningful for the time-independent energy command.
You would have to implement a new functional form in the source code, energy/epull.F90.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Moderated by  BRBrooks, lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.017s Queries: 30 (0.010s) Memory: 0.9522 MB (Peak: 1.0674 MB) Data Comp: Off Server Time: 2021-01-17 12:56:17 UTC
Valid HTML 5 and Valid CSS