Fix SMD with variable velocity

Dear LAMMPS user,
I want to put variable velocity in fix smd command. For the first 18000 timestep, I want to apply constant velocity and after that zero velocity. I was thinking of removing the numerical value of velocity and replace with variable. How can I do that?

To do that I have declared the variable by if command, after that I have recalled that variable in fix smd, my approach to accomplishing this task is as follows:

"

variable mytime equal time
if \${mytime}<=18000 then “variable vl equal -0.0005” else “variable vl equal 0.00”

fix pull nterm smd cvel 20.0 v_vl tether -195 NULL NULL 0

"
however, every time I am getting the following error "Expected floating point parameter in input script or data file "

My full script is attached herewith.

Thank you!

step2_solvator.in (2.64 KB)

Why not just run for 18000 steps, stop the simulation update the fix, and start again? Is that not the most straightforward way? I feel like this approach is highly underutilized… See the run documentation.

The error message is self explanatory.

-Best,
Dylan

Dear LAMMPS user,
I want to put variable velocity in fix smd command. For the first 18000 timestep, I want to apply constant velocity and after that zero velocity. I was thinking of removing the numerical value of velocity and replace with variable. How can I do that?

To do that I have declared the variable by if command, after that I have recalled that variable in fix smd, my approach to accomplishing this task is as follows:

"

variable mytime equal time
if \${mytime}<=18000 then “variable vl equal -0.0005” else “variable vl equal 0.00”

that won’t work as you think it would. this will evaluate the current state of mytime and then assign vl accordingly. if you want an equal style formula change its value depending on some property changing over time, you have to include this as a logical in the formula itself.

fix pull nterm smd cvel 20.0 v_vl tether -195 NULL NULL 0

"
however, every time I am getting the following error "Expected floating point parameter in input script or data file "

you can only replace a number with a variable reference, if the documentation of the corresponding command explicitly states that variables are supported for the specific keyword. the documentation for fix smd doesn’t and hence the error.

axel.

Hi DYLAN,
Your suggestion is appreciated. I have tried that way. However, the force value I am getting (after editing the fix smd) not the same as the previous run. That’s why I want to continue the simulation in a single run.

Dear Dr. Axel Kohlmeyer,
Thank you so much for pointing out the reason for the error message. The goal of my simulation is to evaluate the pulling force value for step velocity. I am planning to apply velocity to one terminal of the protein chain while the other terminal is fixed. The protein molecule is surrounded by explicit water. In short, I want to measure the force required to pull the protein chain for 0.05% strain, after that while fixing the strain at 0.05% I want to evaluate the value of force at a different time (As it is done for stress relaxation taste).

I have tried different techniques, however, nothing worked so far. Can you please suggest me the techniques I should follow?

Thank you!

Dear Dr. Axel Kohlmeyer,
Thank you so much for pointing out the reason for the error message. The goal of my simulation is to evaluate the pulling force value for step velocity. I am planning to apply velocity to one terminal of the protein chain while the other terminal is fixed. The protein molecule is surrounded by explicit water. In short, I want to measure the force required to pull the protein chain for 0.05% strain, after that while fixing the strain at 0.05% I want to evaluate the value of force at a different time (As it is done for stress relaxation taste).

i don’t really understand what you are saying here. also, it is not clear to me, how you would define strain under your conditions.

I have tried different techniques, however, nothing worked so far. Can you please suggest me the techniques I should follow?

this is a discussion you should have with your adviser. i don’t have the time to figure out everybody’s research and then suggest them how to do it.

axel.