Possible inconsistency in "atom_style dipole"

Hi!

After converting a binary restart file to an ASCII data file using the restart2data tool, I got the error message "ERROR: Incorrect velocity format in data file (atom.cpp:881)" when trying to read the generated ASCII file using the read_data command. I traced this error back to the fact that read_data needs angular velocities printed in the Velocities section when using atom_style dipole, while restart2data only prints the linear velocities. However, the inconsistency seems to be slightly deeper, since angular velocities are not even included in the style definition of dipoles (see, for example, atom_vec_dipole.cpp), so it doesn't really make sense for read_data to ask for them. On the other hand, running MD with point dipoles without any rotational degrees of freedom doesn't really make sense either, but I guess this would work fine for MC or when having point dipoles included in a larger molecule. Either way, I was able to circumvent the problem by changing "size_data_vel" from 7 to 4 in atom_vec_dipole.cpp (I'm running "atom_style hybrid sphere dipole", so the omegas are printed anyway, but only once instead of twice). For a permanent fix I think the check for angular velocities for dipoles in read_data should be removed, or alternatively they should be included in the definition of the dipole atom style. Could someone else please give me some input on this issue? Thank you!

Kind regards,

Joakim Stenhammar

yes - it sounds inconsistent - I'll check next week
when I'm back in the office. The atom_style dipole
certainly keeps track of angular velocity or momentum
to do time integration, e.g. via fix nve/sphere dipole.

Steve

Hi Steve!

And thanks for the quick response! However, the dipole style itself actually does not keep track of omegas or angmoms (or radii for that matter) on its own, but seems to be meant as an "add-on" to be used together with either atom style sphere or fix rigid, in order to get the rotational DOF's relevant to the specific problem being considered. Of course, if the dipole style is supposed to be used as an atom style per se, with the rotational DOF's "automatically" included, one should change it from describing point particles to extended ones. Which one of the solutions that makes most sense is mostly a matter of taste, I guess. Thanks, and Happy new year!

Joakim

Steve Plimpton skrev 2012-12-28 15:47:

Either way, I was able to circumvent the problem by changing
"size_data_vel" from 7 to 4 in atom_vec_dipole.cpp (I'm running
"atom_style hybrid sphere dipole"

yes, I think this is the correct change. Does this fix the entire problem
you are seeing - i.e. no changes are needed in restart2data.cpp?

The 7 in that file was a holdover (i.e. a bug) from when dipole was a
stand-alone
atom style, i.e. it could be used w/out atom_style sphere, so that
it included angular velocities as part of the style. Now it is just
a dipole, and the sphere style should be used for something like
a Stockmeyer model. You might use dipole w/out the sphere style
if you wanted to add point dipoles to atoms in a molecule (with bonds)
or to atoms in a rigid body.

Steve

The change from 7 -> 4 is in the most recent version (6Jan patch)
so you can try out your workflow (run, restart2data, rerun) with
that version and see if it all works ...

Steve