extending/modifying compute_property_atom.cpp + read in data

Hello everybody,

I think LAMMPS is not yet capable to do exactly what I want to, so I'll try to extend it a little bit. I'm not a C++-Expert, but because - like Axel always says - "there ain't no escape from the blues" I'll try it, also I think it's not that a big issue and I like blues. My problem is, that I don't exactly know where to start and I hope you could give me some hints.

The basic simulation-problem for me is, to give particles in a bulk a specific radius, which alters in time and z-coord of the particle.

Which steps should I do?

I tried to modify the compute_property_atom.cpp like that

if (mask[i] & groupbit) {
else buf[n]=0.0;

but the radius did not change during the simulation... Isn't that the right place to modify the radius?

The second step I want to try - after modifying the radius was successful - is reading in a 2D-data-array, which determines the radius dependent on time and z-coord.

I hope someone can help me a little bit and my question is not too specific!

Thanks in advance,
kind regards


I would look at fix adapt which is designed to alter
parameters over time during a simulation. There is a atom
diameter setting which currently resets the diameter of
all atoms in the group to a variable value, which
can be a function of time. It would be fairly simple
to extend that to use per-atom variables, in which
case the new diameter could also be a function of z position.