computing vacancy clusters

Hi -

I’d like to do a cluster/atom compute on vacancies. I defined vacancies as when the occupancy property of a voronoi analysis is 0. Then I have a dynamic group of those atoms, and I dump the coordinates of the vacancies using a fix store/state at time 0. How can I do a cluster analysis on those original coordinates of my vacancy group? Do I need to use another per-atom variable?

FYI here’s what I currently have:

store original atom coords to get coords of vacancies

fix cell_coords all store/state 0 x y z

compute voronoi occupation

compute defects all voronoi/atom occupation

identify vacancies and dump coords

variable vac_sites atom c_defects[1]==0
group vac_sites dynamic all every 100 var vac_sites
dump vac_dump vac_sites custom 100 vacs/dump.vacs.*.txt id f_cell_coords[1] f_cell_coords[2] f_cell_coords[3]

I assume you mean you want to do the cluster analysis every N steps (i.e. when you
write the dump file), using the current coords of the atoms and the current
Voronoi results. I’m not clear what the fix store/state command is doing for you.

I think you just need to define a compute cluster/atom command that uses
the dynamic group as its 2nd arg. Then if you augment the dump columns to
include a column that is the output of compute cluster/atom, you would have
what you want (a cluster label in the dump file). You could also just
output x,y,z for the current coords.

You would also need to use a dynamic group command with N (dump freq) as
the update param. It’s possible compute cluster/atom does not currently
allow a dynamic group as a param, but I don’t see a conceptual
problem with allowing it, i.e. for your use case.


Steve -

I am identifying vacancies as voronoi sites that are currently empty,
and I access the coordinates of those sites through the fix
store/state command that I called at the same time as the voronoi
compute. Vacancies aren't really a "thing" that LAMMPS tracks, so I
have to use the original atoms of those sites as a "pointer".

From what I can tell, the cluster command only takes an atom group as

an input, but you can't make a group of "vacancies", only atoms whose
original sites are empty. But if you try to do cluster analysis on
those atoms, the compute uses the atoms' current coordinates. That's
why I want to pass in the original coords and not the current coords
to the cluster compute. It seems like I need to create a fictitious
group of atoms at those empty coordinates and turn off all forces on
them. The group would need to be dynamically updated too.

I have had luck doing vacancy cluster analysis through post-processing
with OVITO. I found you can also send those vacancy dump files back in
to LAMMPS, which will treat the vacancies as atoms and then I can make
a group and look for clusters. However I'm curious if this can be all
be done on-the-fly as it can be I/O intensive after-the-fact when I
have long-running simulations with lots of timesteps. However, doing
this requires me to a priori decide my cluster cutoff radius, which is
not ideal. I think I may have talked myself out of this :slight_smile:

   - Jesse

Hmm - that’s different than I was thinking, but I understand
the issue better now. So at a later time, invoking the
variable will tell you which atom’s original Voronoi cell
is now a vacancy (occupation value). And you have that
atoms original coords (in fix store/state) which are effectively
the “position” of the vacancy.

The problem with trying to use compute cluster/atom on
on-the-fly on that info is that the current atom coords may be far
from the original coords. So the compute cannot
create and use a neighbor list to search for nearby
vacancy coords.

What might work is the following 2-step procedure.
Create the dump file from the first run
on the dynamic group, as in your original email.
That should be a list (at each snapshot) of the
coords of vacancies (from fix store/state).

Then you can do a. rerun command on that
dump file (you might have to relabel the columns
of coords to be x,y,z). For each snapshot
you can now invoke compute cluster/atom
on those coords to cluster the vacancies and
do further output (count of clusters, histogram, re-dump
with cluster ID, etc).