end-to-end distance in a molecule

Hello,

Is it possible to compute on the fly the average (over molecules and time) of the end-to-end distance of a molecule given that the terminal atoms have a distinguishing type? I started trying to use a compute property/molecule command but I don’t seem to be able to take advantage of it.

I guess another way of doing it would be computing the distance between two atoms of terminal type if they belong to the same molecule.

Thanks for suggestions.

Hello,

Is it possible to compute on the fly the average (over molecules and time)
of the end-to-end distance of a molecule given that the terminal atoms have
a distinguishing type? I started trying to use a compute property/molecule
command but I don't seem to be able to take advantage of it.

I guess another way of doing it would be computing the distance between two
atoms of terminal type if they belong to the same molecule.

do you need this information during the simulation?

it would be extremely easy to do this kind of analysis in post-processing.

axel.

I would like very much to be able to time average, hence take
advantage of a fix ave/time command. This is why I am trying to get
the information on the fly. Otherwise, yes, an off-line calculation
can be done easily but on lots of configuration files.

Thanks,

Have a look at compute gyration and gyration/molecule.
I imagine they could be modified to calculate what you want.

Steve

Thanks; will consider. I was looking at extending

  compute property/molecule command

would this be a more generic alternative?

One additional question. In thinking about whether extend/modify code
or create new code for lammps, I have the impression that lammps
"fixes" are actually "computes" and "computes" are actually
"definitions." Is this another way to look at them?

Thanks,

Comments below.

Steve

Have a look at compute gyration and gyration/molecule.
I imagine they could be modified to calculate what you want.

Steve

Thanks; will consider. I was looking at extending

compute property/molecule command

would this be a more generic alternative?

No - I think you are better off with a new compute.

One additional question. In thinking about whether extend/modify code
or create new code for lammps, I have the impression that lammps
"fixes" are actually "computes" and "computes" are actually
"definitions." Is this another way to look at them?

If you are asking an English language question, I don't think
it matters what you call them. They are what they are. I would
read the fix.html and compute.html doc pages to get a sense of what
they do in a LAMMPS context.