[lammps-users] dumping the neighbor list

Hi all.

I have a Dump class, DumpNeighbors, which used to (as of major version 1Oct2006) be capable of dumping the state of the neighbor list.

e.g.:

… More specific question.

I am now looking at compute_centro and compute_coord to get an idea about how to dump the neighbor list.

Can I just inherit from Pointers in my Dump class to get access to neighbor and list as in the compute and pair classes?

Do I need to do anything other than make a request in my Dump’s init routine like:

Neighbor doesn't really have logic to process requests from any class
(e.g. dump)
in the optimal way. You're better off just accessing an existing neighbor list
from dump. Most simulations just have one, but you could have several,
so the question is which one to access. Once you access it, it's easy to print
out the neighbors as you did previously.

Steve

Hi Steve.

Neighbor doesn't really have logic to process requests from any class
(e.g. dump)
in the optimal way. You're better off just accessing an existing neighbor list
from dump.

Fine by me.

Most simulations just have one, but you could have several,
so the question is which one to access.
Once you access it, it's easy to print
out the neighbors as you did previously.

So my dump should inherit from Pointers, then MyDump::list will give me the singleton list in a simulation if there is only one?

Thanks.
--Craig

All classes in LAMMPS see Pointers. It just gives any
class access to the one neighbor class, so you can
write this in your dump class:

NeighList *list = neighbor->lists[i]
int *numneigh = list->numneigh;

The question (in my earlier email) is what to use for i,
since there may be multiple lists (neighbor->nlist of them).
You could examine their attributes to see which one you
want, but in general there are several kinds, so it's unclear
what you mean by "dump a neighbor list".

Steve

All classes in LAMMPS see Pointers. It just gives any
class access to the one neighbor class, so you can
write this in your dump class:

NeighList *list = neighbor->lists[i]
int *numneigh = list->numneigh;

I see.

The question (in my earlier email) is what to use for i,

For now, I'll just dump them all. I don't define any other computes (centro or coord) which might create redundant lists, so I think that should be what I'm after.

Thanks.

--Craig

Is there anything else which needs to be done other than adding an appropriate DumpStyle line in style.h to add a new dump?

It compiles, but the input parser gives a "ERROR: Illegal dump command"

Thanks,
Craig

You have to add 2 lines to style.h to add a class. See the
doc/Section_modify.html file.

Steve