Force Calculation

Dear all

I am using fix aveforce to apply a constant force rate on upper layer of atoms. what I am doing is in the following:

variable FRT equal 0.5 # Force rate
variable SR equal “v_FRT0.001step” # timestep = 0.001

velocity lower set 0.0 0.0 0.0
fix 1 lower setforce 0.0 0.0 0.0 # to fix lower layer fixed

fix 2 upper aveforce 0.0 v_SR 0.0 # apply force rate in y direction

fix 3 all nve

compute fupper upper reduce sum fy # Fupper

I am using this formulation for calculting force on upper layer. F = c_fupper + N Force_ratetime; ( N is number of atoms in upper layer) .Is it true?

Samaneh

Is it true?

No one can tell you that, or is likely to look into your model

carefully enough to give you an answer you can trust.

Writing a complex input script is like writing a computer program.

You have to debug it (yourself) one stage at a time. You can

dump forces, sum forces (compute reduce), compare forces with and without certain input

commands, etc. To convince yourself that you are doing what

you want.

Steve

Dear Steve,

Thanks for your answer. My question is when I apply force with fix aveforce, What does “compute reduce fyy” calculate?

Thanks,

Samaneh

Dear Steve,

Thanks for your answer. My question is when I apply force with fix
aveforce, What does "compute reduce fyy" calculate?

​try being a proper scientist for a moment, and set up a simple test input
with just a small number of atoms and output all coordinates and forces in
a dump.
now run once without the fix and compare what you get from compute reduce
with what you compute manually from the dump file, and then a second time
with the fix enabled and compare what you get with what the documentation
says you should.

there should be no more mystery left and no more asking of questions, that
are already explained in the docs.

axel.