Kspace and compute stress

Dear lammps users,

I checked the lammps mailling list Archives and this topic has already been discussed that lammps can not compute stress in long range K-space. So I have a question, if we use compute stress/atom , does this stress still include the short range coulombic interaction which is controled by pair_style?

Thank you in advance

Kaimin

Dear lammps users,

I checked the lammps mailling list Archives and this topic has already been
discussed that lammps can not compute stress in long range K-space. So I
have a question, if we use compute stress/atom , does this stress
still include the short range coulombic interaction which is controled by
pair_style?

yes. but it is effectively useless, since the stress component
depends on added coulomb screening that is determined by
the kspace settings.

the cleanest way to handle this scenario would be to first run
a trajectory _with_ long-range electrostatics included using either
pppm or ewald and then due a "re-run" of the frames in the recorded
trajectory with cutoff coulomb instead using a very long cutoff.
however, this is currently not implemented in lammps.

cheers,
      axel.

If you want long-range per atom electrostatics, you could basicly use the code German Samolyuk posted awhile back. With some very minor changes it can work with current lammps (see attached -the ewald portion now goes to the stress tensor instead of heat flux). German, I hope you don’t mind my “reposting” of this…

I have only checked with water but the energies and pressure tensor looked good.

Tim

ewald.tar (50 KB)

We are planning to release German's version of straight Ewald (not
PPPM) with per-atom stress/energy soon. Someone else
was looking into it - I'll forward this version of Tim's to him.

Thanks,
Steve

Axel, do you imagine ‘rerun’ as an integrator that reads positions? So for electrostatics, this would work by using “rerun” integrator and dropping all the other pair_styles, bond_styles, etc except “coul/cut with big cutoff” or “coul/long + per_atom_virial ewald”.

Tim

Axel, do you imagine ‘rerun’ as an integrator that reads positions? So

Exactly.

for electrostatics, this would work by using “rerun” integrator and dropping all the other pair_styles, bond_styles, etc except “coul/cut with big cutoff” or “coul/long + per_atom_virial ewald”.

No. The integrator would be more similar to the regular verlet, but would advance positions from files and run fixes and computes just as in verlet so that one can do all kinds of analysis, too. To analyze per atom with long range coulomb one would remove pppm and use coul/cut with a long cutoff instead of coul/long.

Axel

Tim,
Sure, I don't mind.
German

I can work on this in the next couple weeks as I have time… seems like it would be confined (mostly) to a new integrator. It might also be good to have a class that hides the trajectory format from the integrator.

Tim

No - I think it can just be a new command "rerun".
Tim - I will send you some initial code for this I wrote
a while back, but didn't get far enough with. You can
take a look at it ... Probably also needs a read_dump class
or command to do the reading/searching of the dump
file(s).

Actually I think the first thing to do is decide on the
syntax/functionality of the rerun and read_dump commands
so everyone is clear on what a rerun capability would
actually support. There are some tricky issues to think
about. I.e. write the doc page first.

Steve