You can send Aidan an email and ask him about what he did (athomps at sandia.gov).
For the example you give, I would write a fix that tested distances
(via the neighbor list) and changed the atom types.
Do you know if I can find any example fix scripts with similar functionality
(i.e. going through all the atoms and performing some operations on their
neighbors)?
This isn't exactly what you want, but if you look at any of the
pair code you'll see a framework for iterating through all of a
processors atoms, getting the neighbor list and computing a pairwise
interaction. But you could use this same code structure in a fix.
I have a question about the kinetic energy calculation.
Lammps has in update.cpp :
force->mvv2e = 48.88821 * 48.88821 ~ 2390
Should it be:
force->mvv2e = NA*AU*(10^3)/4 = 2500 ?
I must be missing something really simple but when I calculate
the kinetic energy by hand I overestimate it somehow by
around 1.166 while for all the other energies I get exact values.
I found my mistake. It was not the units I had wrong
but the degrees of freedom. I forgot to take one degree
of freedom out and that is the reason I was
finding the energy higher. I said the Kinetic energy is
1.166 higher because I had 7 test atoms
and so 7/6=1.166 overestimation of the kin energy.
I am sorry for taking your time.
Thank you for your help,
In my system, there are two very different particles by size. I think I
should use "multi" as the neighbor style. When I put
neighbor 0.3 multi
in my input script file, LAMMPS always complain that "Illegal neighbor
command". Could anyone tell me how to use "multi" style in "neighbor"
command?
Are you running the most current version of LAMMPS?
In the set() routine of neighbor.cpp you should see a reference
to "multi", else you will get the error message you indicate.