outputting per-atom values from the code

Hi everybody,

I'm calculating per-atom-values in a fix within the LAMMPS-code. Now I'm wondering how I can output them. Right now they are stored within a fix in an array like that:
peratom_prop = (double*)memory->create_1d_double_array(0, nlocal, "peratom_prop");

I can imagine two ways, which are kind of similar:
1.: Outputting the per-atom-vector by the fix, which then could be stored in a per-atom variable of the input script and which then also could be used within the dump custom command?
  - Which steps should I do to make them accessable as output-values of the fix? I think it should work somehow with return-values of a function within the fix, right?

2.: directly access this per-atom-vector by the dump-custom-command.
  - Which steps have to be taken herefore?

Unfortunately I don't have a clue for both ways how to proceed...

Can you give me a hint?

Thanks very much and kind regards,
Sebastian

See the header file fix.h, which defines
the per-atom vector and array that things
like dump custom access. And find another
fix that produces per-atom values, like fix store/state
and see how it does it.

Steve