coeff() versus init_one()

Dear Lammps-users,

I working on some potential code, and I wanted to ask a question regarding
the coeff() and init_one() sections in the pair_potentials.

I noticed that if I define a parameter in the coeff() it gets passed
around to all the processors. However if I define a parameter in the
init_one section, it is only defined on the one processor.

I would greatly appreciate a brief comment on the purpose of the init_one
section. And also is there a good reference that I could look at on how
lammps communicates arrays from one processor to the rest via MPI_Bcast
function?

Thanks for your help,
John

Dear Lammps-users,

I working on some potential code, and I wanted to ask a question regarding
the coeff() and init_one() sections in the pair_potentials.

I noticed that if I define a parameter in the coeff() it gets passed
around to all the processors. However if I define a parameter in the
init_one section, it is only defined on the one processor.

this doesn't make a lot of sense given the limited
context of information that you are providing.

I would greatly appreciate a brief comment on the purpose of the init_one

Pair::coeff() is a required function for a pair style and invoked upon reading
pair_coeff commands in the input or the Coeff section in a data file.
Pair::init_one() is an optional function that is invoke internally by the base
Pair class for each pair of atom types i,j during the "init" phase of
a simulation.
the purpose is to (pre-)compute) properties that can be inferred from
the parameters in the pair_coeff or pair_style commands. it also is supposed
to return the cutoff for this pair of atom types, which is used to determine
the largest cutoff overall, for the neighbor list.

section. And also is there a good reference that I could look at on how
lammps communicates arrays from one processor to the rest via MPI_Bcast
function?

there is no need for that.

axel.