LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Fwd: Creating a bond list within a pair style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Fwd: Creating a bond list within a pair style


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Tue, 19 Sep 2017 14:08:53 -0400



On Tue, Sep 19, 2017 at 1:26 PM, Matthew Wander <mcfwander@...92......> wrote:
Since my "bonds" are actually generated within the pair style I don't think I can use that. I want to do something like the special bonds command, but only have it remove it from consideration of charge. How do I set those weights from within a pair style? or can I?

​the simplest approach i can think of quickly, is probably to add two integers as per-atom properties​ via fix property/atom as 1-2 and 1-3 pair label. you can initialize these to 0 and then when you loop over the neighbor list for the first time and determine an atom is in a 1-2 or 1-3 pair set the corresponding property to 1 for both atoms in the pair (make sure that communication of ghost atom data is enabled with "ghost yes"). afterwards and after a reverse communication, you can do one pass over all atoms to consolidate that data, followed by a forward communication before you process charge and other interactions as usual, but testing for the extra properties as needed.

axel



 


matthew


On Tue, Sep 19, 2017 at 10:48 AM, Steve Plimpton <sjplimp@...24...> wrote:
I'm not following all your details.  But the special_bonds
command will remove 1-2 and 1--3 neighbors from the
neighbor list before the pair style ever sees it.  Just use
values of 0.0 for those weights.

Steve

On Tue, Sep 19, 2017 at 7:06 AM, Matthew Wander <mcfwander@...24...> wrote:
Hi

While this my seem like a strange question it is the final problem we are having before we can submit our new reactive model to lammps so I would be very grateful for some help here as I am completely stuck. 

I need to create some sort of bond list within my code to screen out charges. Specifically, I need to remove 1-2 and 1-3 bonded neighbors from the computation of charge. At first I thought this would be a straightforward task make the list, create a correction, and match the forces (and energy).  However, in each of the ways I tried there seems to be a problem with the way my code interacts with the larger lammps code. 

First I tried a direct subtraction removing the charge and force components from the bond energy. This produced a very strange and uncorrectable behavior in the computation of pressure. 
Second, I tried implementing coul/cut directly in my pair style. This worked best of everything but was far too slow requiring cutoffs greater than 15Å for reasonable results.  
Then I tried a direct computation using wolf charges first as a contribution to my forces and energy, which produced the same pressure problem as in step 1. 
Fourth I tried using it is a separate unit operating independently (its own evtally) but this altered the energy and the forces calculated.  The pressures were actually calculating reasonably. 

In all these cases the dynamics is problematic, the error in the pressure does seem to reflect a real problem with the computation of forces, even though when I output them in a dump command they appear correct. 

So given these are all in retrospect bad ideas, what is a good way to go about this?

In particular does it make sense to access sbmask? If so where in the code that I could find its particulars? 

Or does it make sense to go through the bond creation and destruction routines that can be referenced from the input? Is there a way to access them internally (i.e. from within my pair style)?  

Clearly I am missing some basic understanding of the operation of the code.

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@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users





------------------------------------------------------------------------------
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@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




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