Code in Fix_qeq_point

Dear All,

I’m currently reading code of fix_qeq_point. I don’t quiet understand line 107 and line 108 in fix_qeq_point.cpp. Could anyone explain it? Thanks

Luo

These simply are quadratic and cubic extrapolation for t and s, respectively, from previous solutions.

Ray

Thanks, Ray. I’m sorry to trouble you again. I have some questions with fix_qeq_dynamic.cpp

  1. I check the function FixQEqDynamic:compute_eneg() and think the variable qf[i] is the toal force on site i. I wonder if line 224 and line 225:

qf[i] +=q[j] * rinv;

qf[j] +=q[i] * rinv;

should be multiplied by 0.5. Otherwise, the Coulumb force between i and j will be calculated twice.

2)I don’t quite understand line 155: q1[i] += qf[i]dtq2-qdampq1[i]. What scheme do you use to solve the extended Larangian equation? It looks like 2nd order central scheme but I don’t understand the 0.5 factor in dtq2 and the damping term. By the way, I think line 119-125 and line 152-155 are duplicated.

3)Could you please tell me when I should use comm->forward_fix and comm->reverse_fix? I checked the definition of comm->forward_comm_fix in comm_tiled.cpp. The main problem is how recvproc and sendproc are set.

Thank you very much!

Thanks, Ray. I'm sorry to trouble you again. I have some questions with
fix_qeq_dynamic.cpp

1) I check the function FixQEqDynamic:compute_eneg() and think the
variable qf[i] is the toal force on site i. I wonder if line 224 and line
225:
                 qf[i] +=q[j] * rinv;
                 qf[j] +=q[i] * rinv;
   should be multiplied by 0.5. Otherwise, the Coulumb force between i and
j will be calculated twice.

A half neighbor list is requested so there is no double counting. By the
way, these are charge forces, not conventional coulomb forces.

2)I don't quite understand line 155: q1[i] += qf[i]*dtq2-qdamp*q1[i]. What
scheme do you use to solve the extended Larangian equation? It looks like
2nd order central scheme but I don't understand the 0.5 factor in dtq2 and
the damping term. By the way, I think line 119-125 and line 152-155 are
duplicated.

It is a velocity verlet with two half steps on the velocity and one full
step on the charge. Duplicated lines are two half steps.

3)Could you please tell me when I should use comm->forward_fix and
comm->reverse_fix? I checked the definition of comm->forward_comm_fix in
comm_tiled.cpp. The main problem is how recvproc and sendproc are set.

Forward comm copies info from local to ghost atoms, while reverse comm does
the opposite. What is copied is defined in
(un)/pack_forward/reverse_comm().

Ray