add charge to atoms

Hello everone;
I want to add charge to atoms using the commands as below:
variable charge atomfile charge.profile
set atom *1000 charge v_charge
but when I searching the dump.lammps document found all of
the atoms were not charged. Please help me. Thank you.

Are you running the current version of LAMMPS?

If I add these lines to bench/in.rhodo:

variable charge atom 1.1
set atom *1000 charge v_charge
dump 1 all custom 100 tmp.dump id type x y z q
run 0

I get a dump file with the first 1000 atoms charge set to 1.1

Steve