A few possible issues with fix_gcmc

Hello,

I am using the 27-Nov13 lammps version to study adsorption on carbon
surfaces via fix_gcmc. I have come across two issues:

1.) When using the molecule and region options with multiple
processors, it seems that molecules are moving far outside of the
defined region.
This does not occur when an atomistic adsorbate is used or when the
simulation is run in serial. By dumping the appropriate data every
timestep,
I was able to conclude that this movement outside of the defined
region occurs after a successful rotation. An input script (gcmc_mol),
coordinate
file (graphene_data), dumpfile (dump_mol) and logfile (log_mol) is
attached that reproduces this issue. In the log.lammps file at time
step 5, the only
successful move was that of rotation. Comparing timesteps 4 and 5 in
the dumpfile, you can see that molecule 1 moves outside of the defined
region by
about 4 angstroms. I haven’t been able to locate the origin of this
bug in the attempt_molecule_rotation() portion of the fix_gcmc.cpp
source code yet.

2.) The documentation for the fix_gcmc command states that
translational moves must start within the specified region, but may
move the atom or molecule
slightly outside of the region. If many inserted atoms are eventually
moved slightly outside of the defined region, an unphysical
equilibrium configuration can arise
because those atoms outside of the defined region are no longer
considered in deletion or translation moves. I’ve attached an example
script (gcmc_atom) and output
(log_atom, dump_atom) which illustrates this effect. Atoms are moved
to the boundary of the defined region where they stay indefinitely.
This occurs in parallel or serial
and with molecules. I guess a fix for this would be to only accept
translation and rotation moves that remain inside of the defined
region.

Thanks for your time,

CBL

dump_atom (152 KB)

dump_mol (2.38 KB)

gcmc_atom (1.33 KB)

gcmc_mol (1.26 KB)

graphene_data (52.4 KB)

log_atom (4.34 KB)

log_mol (4.24 KB)

Paul can answer these Qs.

Steve

1.) When using the molecule and region options with multiple

processors, it seems that molecules are moving far outside of the
defined region.
This does not occur when an atomistic adsorbate is used or when the
simulation is run in serial. By dumping the appropriate data every
timestep,
I was able to conclude that this movement outside of the defined
region occurs after a successful rotation. An input script (gcmc_mol),
coordinate
file (graphene_data), dumpfile (dump_mol) and logfile (log_mol) is
attached that reproduces this issue. In the log.lammps file at time
step 5, the only
successful move was that of rotation. Comparing timesteps 4 and 5 in
the dumpfile, you can see that molecule 1 moves outside of the defined
region by
about 4 angstroms. I haven't been able to locate the origin of this
bug in the attempt_molecule_rotation() portion of the fix_gcmc.cpp
source code yet.

Movement outside the defined region doesn't sound like a bug since that is allowed, but I agree that getting different results in parallel vs serial would not be correct. I'll take a look at this.

2.) The documentation for the fix_gcmc command states that

translational moves must start within the specified region, but may
move the atom or molecule
slightly outside of the region. If many inserted atoms are eventually
moved slightly outside of the defined region, an unphysical
equilibrium configuration can arise
because those atoms outside of the defined region are no longer
considered in deletion or translation moves. I've attached an example
script (gcmc_atom) and output
(log_atom, dump_atom) which illustrates this effect. Atoms are moved
to the boundary of the defined region where they stay indefinitely.
This occurs in parallel or serial
and with molecules. I guess a fix for this would be to only accept
translation and rotation moves that remain inside of the defined
region.

Yes, it would be possible to make an option that would preclude moves that move any atoms outside the region. We haven't added such an option, but this would probably be useful for some scenarios as you point out. On the other hand, allowing moves from the inside to the outside of the region may be the desired behavior in some cases such as hybrid MD+GCMC simulations where the MD part can move stranded atoms away.

Paul

Paul,

Thanks for your reply. Just to reiterate, movement outside of the
define region occurs after a successful rotation. I understand that a
rotation could take a portion of the molecule outside of the region,
but it should not move the COM over 4 angstroms outside the region
(especially when the maximum displacement is defined as 0.1
angstroms).

Now that you mentioned the hybrid MD+GCMC capabilities, I see that
there are certain situations where allowing moves from inside to
outside could be desired.

-CBL

Charles,

Yes, there was indeed a bug with the way fix GCMC was handling rotations in parallel: the molecular mass of the exchange molecule was being computed incorrectly when running in parallel. The fix is to add the following at line 1159 of fix_gcmc.cpp

  gas_mass /= comm->nprocs;

(or use the attached file, which I've also added to the svn repository).

Thanks for flagging this.

Paul

fix_gcmc.cpp (40.5 KB)