Coul/cut gradients question

Hi

I am using hybrid overlay to conduct a two body potential energy scan using pair_coul_cut and my pair style vmm. However, when I check my dump file I only see the forces computed by my pair style not the contribution from coul/cut. Coul/cut is correctly contributing to the energy but somehow the contributions to f[i] are not, or if they are they are not being dumped correctly.

Any ideas?

thanks
matthew

Hi

I am using hybrid overlay to conduct a two body potential energy scan using
pair_coul_cut and my pair style vmm. However, when I check my dump file I
only see the forces computed by my pair style not the contribution from
coul/cut. Coul/cut is correctly contributing to the energy but somehow the
contributions to f[i] are not, or if they are they are not being dumped
correctly.

Any ideas?

there is not much information to go on. you are missing even the most
basic required information (e.g. LAMMPS version, platform, compiler,
example input).

have you tried running with pair style coul/cut alone?

axel.

Okay. Since I don’t actually understand the problem it will be challenging but I have determined more of the issue. Here is what additional information I have. I am running a series of two body scans to check the gradients of my pair style. Attached is one sample input. There are actually several hundred of these and the problem exists in all of them regardless of bonds or atom types or charges or distances or anything else that I can think of. You can see clearly in the output that there is an energy contribution from the charge which there should be. However when one checks the dump file the forces on the atom are zero which is definitely not correct. I tried using hybrid overlay and two standard pair styles and that does give the correct dumping of gradients and energies.

The only thing I can think of, and I have no idea if it is correct, is that somehow the problem is in the invocation of evtally. I use evtally_xyz_full and I know that could/cut uses the much simple could/cut. Or maybe I have a flag set correctly? All I know is that my pair style is producing the correct information for its part, but somehow is overriding the other pair style for charge but I have no idea how that is possible.

thank you very much in advance for any ideas

matthew

pair_vmm.cpp (59 KB)

pair_vmm.h (5.05 KB)

hh_020_vmm.data (508 Bytes)

hh_020_vmm.inp (654 Bytes)

hh_020_vmm.log (1.64 KB)

hh_020_vmm.xyz (176 Bytes)

Okay. Since I don't actually understand the problem it will be challenging
but I have determined more of the issue. Here is what additional information
I have. I am running a series of two body scans to check the gradients of my
pair style. Attached is one sample input. There are actually several hundred
of these and the problem exists in all of them regardless of bonds or atom
types or charges or distances or anything else that I can think of. You can
see clearly in the output that there is an energy contribution from the
charge which there should be. However when one checks the dump file the
forces on the atom are zero which is definitely not correct. I tried using
hybrid overlay and two standard pair styles and that does give the correct
dumping of gradients and energies.

when i run coul/cut without your vmm style, i.e. change the input like this:

pair_style hybrid/overlay coul/cut 9.00 #vmm
pair_coeff * * coul/cut
#pair_coeff * * vmm h.vmm H

then the result for coul/cut alone is correct and reasonable. there is
an energy contribution and a force in z-direction.

The only thing I can think of, and I have no idea if it is correct, is that
somehow the problem is in the invocation of evtally. I use evtally_xyz_full
and I know that could/cut uses the much simple could/cut. Or maybe I have a
flag set correctly? All I know is that my pair style is producing the
correct information for its part, but somehow is overriding the other pair
style for charge but I have no idea how that is possible.

that is *very* easily possible, in your code you have:

    f[i][0] = 0.0;
    f[i][1] = 0.0;
    f[i][2] = 0.0;

with this you wipe out all previous force contributions. per atom
forces are zeroed in the integrator, pair styles may only add to them.

axel.