LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Coul/cut gradients question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Coul/cut gradients question


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 6 Jul 2017 15:38:40 -0400

On Thu, Jul 6, 2017 at 12:51 PM, Matthew Wander <mcfwander@...24...> wrote:
> 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.




>
> thank you very much in advance for any ideas
>
> matthew
>
>
> On Thu, Jul 6, 2017 at 10:17 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:
>>
>> On Thu, Jul 6, 2017 at 10:08 AM, Matthew Wander <mcfwander@...24...>
>> wrote:
>> > 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.
>>
>> >
>> > thanks
>> > matthew
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > lammps-users mailing list
>> > lammps-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/lammps-users
>> >
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
>> College of Science & Technology, Temple University, Philadelphia PA, USA
>> International Centre for Theoretical Physics, Trieste. Italy.
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
>



-- 
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.