Perfect ! sound wonderful.
The second approach (fix property atom) seems to be bit less cumbersome at
my end. Would you be comfortable sharing a patch (hack to fix property
atom) if this is looks like a promising approach.
the changes now exported in the LAMMPS-ICMS tree:
http://git.lammps.org/git/?p=lammps-icms.git;a=summary
i'll forward them to steve now and hopefully they can get released in the
next patch.
before using it, you need to have a working input deck with a matching data
file for regular H2O, where there is only one atom type for water hydrogens
and one for water oxygens.
to convert this input for using per-atom masses (but still simulating
regular H2O), you add the following lines to your input, assuming tip4p
oxygens are type 1 and hydrogens are type 2:
# this adds the storage for per-atom masses
fix Isotopes all property/atom rmass ghost yes
# this initializes the per atom masses (per type masses will be ignored)
set type 1 mass 15.9994
set type 2 mass 1.008
# this writes out a new data file with the new data included
write_data new.data
if you look at the new.data file, you will find that it contains a new
section "Isotopes" (named after the fix id), which contains the the masses
in the format <atom id> <atom mass>.
this file can be read in including the masses with:
fix Isotopes all property/atom rmass ghost yes
read_data new.data fix Isotopes NULL Isotopes
to set other masses, you have two options:
1) you replace the masses in the Isotopes section of you data file
2) you use a more complex set command. here is an example, that converts
the first 100 water molecules to heavy water
set type 1 mass 15.9994
set type 2 mass 1.008
group hwat id 2:300:3 # first hydrogen of the first 100 water molecules
group hwat id 3:300:3 # second hydrogen of the first 100 water molecules
set group hwat mass 2.0141018
write_data 100-heavy.data
please see the documentation for fix property/atom and read data for more
details.
axel.