Along with the coordinates of O, H and H atoms of water molecules, is there a way of dumping the coordinates of M site as well in the dump file? Seems there isn’t, just wanted to confirm.
Thanks,
Chaitanya
Along with the coordinates of O, H and H atoms of water molecules, is there a way of dumping the coordinates of M site as well in the dump file? Seems there isn’t, just wanted to confirm.
Thanks,
Chaitanya
I suppose that if you need the M site to be saved in the dump file so very badly to avoid recreating its position at each microstate based on the position of the other atoms in the molecule, you can always create an initial microstate where the dummy atom exists together with the rest of the atoms of the water molecules and naturally assign it a given atom type. Then you set up the force-field by yourself manually and just include the atom type of the dummy atom in the group-ID of the dump command.
That would be a very nice way to do it actually. Thanks a lot!
Chaitanya
Indeed, if you use the tip4p pair styles in LAMMPS, the M point does not really exist during the simulation. Its position is only calculated when needed based on the positions of H-O-H.
Therefore if what you want is the position of the M point, you can either recalculate it yourself based on H-O-H during post-mortem analysis (for instance using Python-MDAnalysis), or create an explicit 4 points water model as suggested by Cecilia, but you will probably loose in computational efficiency. In that case I think that you will need to assign a small (e.g. 1e-10) mass to the M point.
Best,
Simon
I mean, it’s possible, and here is an elaborately over-engineered solution for doing so:
extra/atom/types 1
which we will assign to the charge sites, and set its pair_coeff
s to zero and mass
to whatevercreate_atoms random ${typeM} ${nH2O} NULL
to register those sites, set type ${typeM} mol v_molnum
to register them with the TIP4P molecules, and neigh_modify
to remove them from neighbour lists, where molnum
is crafted to give them the right molecule numberscompute chunk/atom
. Get the oxygen position for each molecule by masking (such as variable xO atom (type==${typeO})*x
and the orientation of each molecule by using compute dipole/chunk
. Then propagate all six numbers throughout each molecule using compute spread/chunk/atom
, and now each atom can calculate the position of its molecule’s M site (which is the oxygen position plus molecular dipole times some scaling factor).variable xM atom (type==${typeM})*v_xM+(type!=${typeM})*x
). Then you can use dump custom
to dump type-M and non-type-M positions together, and then use something like sed
afterwards to rewrite the column names.Or, I guess, you can just be boring and use fix rigid
with explicit sites.