Obtaining diameter of a particle type from the information loaded by a read_data

Hi all,
apologize for insisting but I want to do the following and still do not get
: dynamically resolve the diameter of the particles found in the
colloid.data file and pass this as an argument to pair_coeff diameter
command. Colloid.data have many files and need to automate this process.

to me this looks like a serious case of "premature optimization". how
many hundreds of input files are you going to run? does the time you
expect to save really warrant such an effort? probably not.

in addition, you seem to have been misled yourself about how
information is passed on for colloid pair styles. this may be in part
due to the bundled example, which seems to be using atom style sphere
for some obscure (probably historical or visualization related)
reasons without need. the documentation for pair style colloid
explicitly explains, that the diameter information is not at all used.
so you can just as well use atom style atomic.

if you want to encode the diameter information in your data file, the
logical choice is to store the pair_coeff settings in the data file
(not you need to use the PairIJ Coeff section, not Pair Coeff). but
just as easily, you can put the pair_coeff settings in a small
separate file, generated alongside the data file and just read them in
via include.

what you are trying to do is the most convoluted, impractical and
confusing way to achieve this, and it also seems that you are
confusing many aspects of per-atom vs. global data and how such data
is accessed in LAMMPS inputs. it is just a bad idea to do something
this complex without having the prerequisite experience. furthermore,
you problem solving strategy of just trying random things, most of
which make no sense, is just contributing to your confusion and thus
making matters worse than they need to be.

in other words: do not try to optimize/automate something unless you
have practical experience and have verified that there is an actual
benefit to it. often doing less is better.