forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13461 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
09581bb143
commit
29746678ff
|
@ -9,15 +9,15 @@
|
||||||
|
|
||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
<H3>fix atom_swap command
|
<H3>fix atom/swap command
|
||||||
</H3>
|
</H3>
|
||||||
<P><B>Syntax:</B>
|
<P><B>Syntax:</B>
|
||||||
</P>
|
</P>
|
||||||
<PRE>fix ID group-ID atom_swap N X seed T keyword values ...
|
<PRE>fix ID group-ID atom/swap N X seed T keyword values ...
|
||||||
</PRE>
|
</PRE>
|
||||||
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
||||||
|
|
||||||
<LI>atom_swap = style name of this fix command
|
<LI>atom/swap = style name of this fix command
|
||||||
|
|
||||||
<LI>N = invoke this fix every N steps
|
<LI>N = invoke this fix every N steps
|
||||||
|
|
||||||
|
@ -47,66 +47,72 @@
|
||||||
<P><B>Examples:</B>
|
<P><B>Examples:</B>
|
||||||
</P>
|
</P>
|
||||||
<PRE>fix 2 all atom/swap 1 1 29494 300.0 ke no types 1 2
|
<PRE>fix 2 all atom/swap 1 1 29494 300.0 ke no types 1 2
|
||||||
fix atom_swap_fix all atom/swap 100 1 12345 298.0 region my_swap_region types 5 6
|
fix myFix all atom/swap 100 1 12345 298.0 region my_swap_region types 5 6
|
||||||
fix SGMC all atom/swap 1 100 345 1.0 semi-grand yes types 1 2 3 delta_mu 4.3 -5.0
|
fix SGMC all atom/swap 1 100 345 1.0 semi-grand yes types 1 2 3 delta_mu 4.3 -5.0
|
||||||
</PRE>
|
</PRE>
|
||||||
<P><B>Description:</B>
|
<P><B>Description:</B>
|
||||||
</P>
|
</P>
|
||||||
<P>This fix performs Monte Carlo swaps of atoms of one given atom type with atoms
|
<P>This fix performs Monte Carlo swaps of atoms of one given atom type
|
||||||
of the other given atom types. The specified T is used in the Metropolis criterion
|
with atoms of the other given atom types. The specified T is used in
|
||||||
dictating swap probabilities.
|
the Metropolis criterion dictating swap probabilities.
|
||||||
</P>
|
</P>
|
||||||
<P>Perform X swaps of atoms of one type with atoms of another type according to a
|
<P>Perform X swaps of atoms of one type with atoms of another type
|
||||||
Monte Carlo probability. Swap candidates must be in the fix group, must be in
|
according to a Monte Carlo probability. Swap candidates must be in the
|
||||||
the region (if specified), and must be of one of the listed types. Swaps are
|
fix group, must be in the region (if specified), and must be of one of
|
||||||
attempted between candidates that are chosen randomly with equal probability
|
the listed types. Swaps are attempted between candidates that are
|
||||||
among the candidate atoms. Swaps are not attempted between atoms of the same
|
chosen randomly with equal probability among the candidate
|
||||||
type since nothing would happen.
|
atoms. Swaps are not attempted between atoms of the same type since
|
||||||
|
nothing would happen.
|
||||||
</P>
|
</P>
|
||||||
<P>All atoms in the simulation domain can be moved using regular time
|
<P>All atoms in the simulation domain can be moved using regular time
|
||||||
integration displacements, e.g. via <A HREF = "fix_nvt.html">fix_nvt</A>, resulting
|
integration displacements, e.g. via <A HREF = "fix_nvt.html">fix_nvt</A>, resulting
|
||||||
in a hybrid MC+MD simulation. A smaller-than-usual timestep size
|
in a hybrid MC+MD simulation. A smaller-than-usual timestep size may
|
||||||
may be needed when running such a hybrid simulation, especially if
|
be needed when running such a hybrid simulation, especially if the
|
||||||
the swapped atoms are not well equilibrated.
|
swapped atoms are not well equilibrated.
|
||||||
</P>
|
</P>
|
||||||
<P>The <I>types</I> keyword is required. At least two atom types must be specified.
|
<P>The <I>types</I> keyword is required. At least two atom types must be
|
||||||
|
specified.
|
||||||
</P>
|
</P>
|
||||||
<P>The <I>ke</I> keyword can be set to <I>no</I> to turn off kinetic energy conservation
|
<P>The <I>ke</I> keyword can be set to <I>no</I> to turn off kinetic energy
|
||||||
for swaps. The default is <I>yes</I>, which means that swapped atoms have their
|
conservation for swaps. The default is <I>yes</I>, which means that swapped
|
||||||
velocities scaled by the ratio of the masses of the swapped atom types. This
|
atoms have their velocities scaled by the ratio of the masses of the
|
||||||
ensures that the kinetic energy of each atom is the same after the swap as it
|
swapped atom types. This ensures that the kinetic energy of each atom
|
||||||
was before the swap, even though the atom masses have changed.
|
is the same after the swap as it was before the swap, even though the
|
||||||
|
atom masses have changed.
|
||||||
</P>
|
</P>
|
||||||
<P>The <I>semi-grand</I> keyword can be set to <I>yes</I> to switch to the semi-grand
|
<P>The <I>semi-grand</I> keyword can be set to <I>yes</I> to switch to the
|
||||||
canonical ensemble as discussed in <A HREF = "#Sadigh">(Sadigh)</A>. This means that the
|
semi-grand canonical ensemble as discussed in <A HREF = "#Sadigh">(Sadigh)</A>. This
|
||||||
total number of each particle type does not need to be conserved. The default
|
means that the total number of each particle type does not need to be
|
||||||
is <I>no</I>, which means that the only kind of swap allowed exchanges an atom of
|
conserved. The default is <I>no</I>, which means that the only kind of swap
|
||||||
one type with an atom of a different given type. In other words, the relative
|
allowed exchanges an atom of one type with an atom of a different
|
||||||
mole fractions of the swapped atoms remains constant. Whereas in the
|
given type. In other words, the relative mole fractions of the swapped
|
||||||
semi-grand canonical ensemble, the composition of the system can change. Note
|
atoms remains constant. Whereas in the semi-grand canonical ensemble,
|
||||||
that when using <I>semi-grand</I>, all atoms in the fix group are eligible for
|
the composition of the system can change. Note that when using
|
||||||
attempted conversion to one of the given types, even if its current type is
|
<I>semi-grand</I>, all atoms in the fix group are eligible for attempted
|
||||||
not one of the given types. An attempt is made to switch the selected atom to
|
conversion to one of the given types, even if its current type is not
|
||||||
one of the listed <I>types</I> with equal probability. Acceptance of each attempt
|
one of the given types. An attempt is made to switch the selected atom
|
||||||
depends upon the Metropolis criterion.
|
to one of the listed <I>types</I> with equal probability. Acceptance of
|
||||||
|
each attempt depends upon the Metropolis criterion.
|
||||||
</P>
|
</P>
|
||||||
<P>The <I>delta_mu</I> keyword allows users to specify non-zero chemical potentials
|
<P>The <I>delta_mu</I> keyword allows users to specify non-zero chemical
|
||||||
for each of the atom types. All chemical potentials are relative to the first
|
potentials for each of the atom types. All chemical potentials are
|
||||||
atom type, so no value is given for the first atom type. These parameters are
|
relative to the first atom type, so no value is given for the first
|
||||||
useful for semi-grand canonical ensemble simulations where it may be
|
atom type. These parameters are useful for semi-grand canonical
|
||||||
desirable to actively control the composition of the system. When given,
|
ensemble simulations where it may be desirable to actively control the
|
||||||
there must be ntypes-1 values given, where ntypes is the number of atom
|
composition of the system. When given, there must be ntypes-1 values
|
||||||
types in the simulated system. Note that a value for delta_mu is required for
|
given, where ntypes is the number of atom types in the simulated
|
||||||
all atom types when using <I>semi-grand</I>, even for atom types not listed
|
system. Note that a value for delta_mu is required for all atom types
|
||||||
following the <I>types</I> keyword. This is because when using <I>semi-grand</I>, it is
|
when using <I>semi-grand</I>, even for atom types not listed following the
|
||||||
possible that any of the atom types in the system could be part of the fix
|
<I>types</I> keyword. This is because when using <I>semi-grand</I>, it is
|
||||||
group and therefore are eligible for swapping to one of the listed atom types.
|
possible that any of the atom types in the system could be part of the
|
||||||
|
fix group and therefore are eligible for swapping to one of the listed
|
||||||
|
atom types.
|
||||||
</P>
|
</P>
|
||||||
<P>This command may optionally use the <I>region</I> keyword to define
|
<P>This command may optionally use the <I>region</I> keyword to define swap
|
||||||
swap volume. The specified region must have been
|
volume. The specified region must have been previously defined with a
|
||||||
previously defined with a <A HREF = "region.html">region</A> command. It must be
|
<A HREF = "region.html">region</A> command. It must be defined with side = <I>in</I>.
|
||||||
defined with side = <I>in</I>. Swap attempts occur only between atoms that
|
Swap attempts occur only between atoms that are both within the
|
||||||
are both within the specified region. Swaps are not otherwise attempted.
|
specified region. Swaps are not otherwise attempted.
|
||||||
</P>
|
</P>
|
||||||
<P>You should ensure you do not swap atoms belonging to a molecule, or
|
<P>You should ensure you do not swap atoms belonging to a molecule, or
|
||||||
LAMMPS will soon generate an error when it tries to find those atoms.
|
LAMMPS will soon generate an error when it tries to find those atoms.
|
||||||
|
@ -115,12 +121,12 @@ non-zero molecule ID, but does not check for this at the time of
|
||||||
swapping.
|
swapping.
|
||||||
</P>
|
</P>
|
||||||
<P>This fix checks to ensure all atoms of the given types have the same
|
<P>This fix checks to ensure all atoms of the given types have the same
|
||||||
atomic charge. LAMMPS doesn't enforce this in general, but it is
|
atomic charge. LAMMPS doesn't enforce this in general, but it is
|
||||||
needed for this fix to simplify the swapping procedure. Successful swaps
|
needed for this fix to simplify the swapping procedure. Successful
|
||||||
will swap the atom type and charge of the swapped atoms.
|
swaps will swap the atom type and charge of the swapped atoms.
|
||||||
</P>
|
</P>
|
||||||
<P>Since this fix computes total potential energies before and after
|
<P>Since this fix computes total potential energies before and after
|
||||||
proposed swaps, so even complicated potential energy calculations are
|
proposed swaps, so even complicated potential energy calculations are
|
||||||
OK, including the following:
|
OK, including the following:
|
||||||
</P>
|
</P>
|
||||||
<UL><LI> long-range electrostatics (kspace)
|
<UL><LI> long-range electrostatics (kspace)
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
|
|
||||||
:line
|
:line
|
||||||
|
|
||||||
fix atom_swap command :h3
|
fix atom/swap command :h3
|
||||||
|
|
||||||
[Syntax:]
|
[Syntax:]
|
||||||
|
|
||||||
fix ID group-ID atom_swap N X seed T keyword values ... :pre
|
fix ID group-ID atom/swap N X seed T keyword values ... :pre
|
||||||
|
|
||||||
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
||||||
atom_swap = style name of this fix command :l
|
atom/swap = style name of this fix command :l
|
||||||
N = invoke this fix every N steps :l
|
N = invoke this fix every N steps :l
|
||||||
X = number of swaps to attempt every N steps :l
|
X = number of swaps to attempt every N steps :l
|
||||||
seed = random # seed (positive integer) :l
|
seed = random # seed (positive integer) :l
|
||||||
|
@ -35,66 +35,72 @@ keyword = {types} or {delta_mu} or {ke} or {semi-grand} or {region} :l
|
||||||
[Examples:]
|
[Examples:]
|
||||||
|
|
||||||
fix 2 all atom/swap 1 1 29494 300.0 ke no types 1 2
|
fix 2 all atom/swap 1 1 29494 300.0 ke no types 1 2
|
||||||
fix atom_swap_fix all atom/swap 100 1 12345 298.0 region my_swap_region types 5 6
|
fix myFix all atom/swap 100 1 12345 298.0 region my_swap_region types 5 6
|
||||||
fix SGMC all atom/swap 1 100 345 1.0 semi-grand yes types 1 2 3 delta_mu 4.3 -5.0 :pre
|
fix SGMC all atom/swap 1 100 345 1.0 semi-grand yes types 1 2 3 delta_mu 4.3 -5.0 :pre
|
||||||
|
|
||||||
[Description:]
|
[Description:]
|
||||||
|
|
||||||
This fix performs Monte Carlo swaps of atoms of one given atom type with atoms
|
This fix performs Monte Carlo swaps of atoms of one given atom type
|
||||||
of the other given atom types. The specified T is used in the Metropolis criterion
|
with atoms of the other given atom types. The specified T is used in
|
||||||
dictating swap probabilities.
|
the Metropolis criterion dictating swap probabilities.
|
||||||
|
|
||||||
Perform X swaps of atoms of one type with atoms of another type according to a
|
Perform X swaps of atoms of one type with atoms of another type
|
||||||
Monte Carlo probability. Swap candidates must be in the fix group, must be in
|
according to a Monte Carlo probability. Swap candidates must be in the
|
||||||
the region (if specified), and must be of one of the listed types. Swaps are
|
fix group, must be in the region (if specified), and must be of one of
|
||||||
attempted between candidates that are chosen randomly with equal probability
|
the listed types. Swaps are attempted between candidates that are
|
||||||
among the candidate atoms. Swaps are not attempted between atoms of the same
|
chosen randomly with equal probability among the candidate
|
||||||
type since nothing would happen.
|
atoms. Swaps are not attempted between atoms of the same type since
|
||||||
|
nothing would happen.
|
||||||
|
|
||||||
All atoms in the simulation domain can be moved using regular time
|
All atoms in the simulation domain can be moved using regular time
|
||||||
integration displacements, e.g. via "fix_nvt"_fix_nvt.html, resulting
|
integration displacements, e.g. via "fix_nvt"_fix_nvt.html, resulting
|
||||||
in a hybrid MC+MD simulation. A smaller-than-usual timestep size
|
in a hybrid MC+MD simulation. A smaller-than-usual timestep size may
|
||||||
may be needed when running such a hybrid simulation, especially if
|
be needed when running such a hybrid simulation, especially if the
|
||||||
the swapped atoms are not well equilibrated.
|
swapped atoms are not well equilibrated.
|
||||||
|
|
||||||
The {types} keyword is required. At least two atom types must be specified.
|
The {types} keyword is required. At least two atom types must be
|
||||||
|
specified.
|
||||||
|
|
||||||
The {ke} keyword can be set to {no} to turn off kinetic energy conservation
|
The {ke} keyword can be set to {no} to turn off kinetic energy
|
||||||
for swaps. The default is {yes}, which means that swapped atoms have their
|
conservation for swaps. The default is {yes}, which means that swapped
|
||||||
velocities scaled by the ratio of the masses of the swapped atom types. This
|
atoms have their velocities scaled by the ratio of the masses of the
|
||||||
ensures that the kinetic energy of each atom is the same after the swap as it
|
swapped atom types. This ensures that the kinetic energy of each atom
|
||||||
was before the swap, even though the atom masses have changed.
|
is the same after the swap as it was before the swap, even though the
|
||||||
|
atom masses have changed.
|
||||||
|
|
||||||
The {semi-grand} keyword can be set to {yes} to switch to the semi-grand
|
The {semi-grand} keyword can be set to {yes} to switch to the
|
||||||
canonical ensemble as discussed in "(Sadigh)"_#Sadigh. This means that the
|
semi-grand canonical ensemble as discussed in "(Sadigh)"_#Sadigh. This
|
||||||
total number of each particle type does not need to be conserved. The default
|
means that the total number of each particle type does not need to be
|
||||||
is {no}, which means that the only kind of swap allowed exchanges an atom of
|
conserved. The default is {no}, which means that the only kind of swap
|
||||||
one type with an atom of a different given type. In other words, the relative
|
allowed exchanges an atom of one type with an atom of a different
|
||||||
mole fractions of the swapped atoms remains constant. Whereas in the
|
given type. In other words, the relative mole fractions of the swapped
|
||||||
semi-grand canonical ensemble, the composition of the system can change. Note
|
atoms remains constant. Whereas in the semi-grand canonical ensemble,
|
||||||
that when using {semi-grand}, all atoms in the fix group are eligible for
|
the composition of the system can change. Note that when using
|
||||||
attempted conversion to one of the given types, even if its current type is
|
{semi-grand}, all atoms in the fix group are eligible for attempted
|
||||||
not one of the given types. An attempt is made to switch the selected atom to
|
conversion to one of the given types, even if its current type is not
|
||||||
one of the listed {types} with equal probability. Acceptance of each attempt
|
one of the given types. An attempt is made to switch the selected atom
|
||||||
depends upon the Metropolis criterion.
|
to one of the listed {types} with equal probability. Acceptance of
|
||||||
|
each attempt depends upon the Metropolis criterion.
|
||||||
|
|
||||||
The {delta_mu} keyword allows users to specify non-zero chemical potentials
|
The {delta_mu} keyword allows users to specify non-zero chemical
|
||||||
for each of the atom types. All chemical potentials are relative to the first
|
potentials for each of the atom types. All chemical potentials are
|
||||||
atom type, so no value is given for the first atom type. These parameters are
|
relative to the first atom type, so no value is given for the first
|
||||||
useful for semi-grand canonical ensemble simulations where it may be
|
atom type. These parameters are useful for semi-grand canonical
|
||||||
desirable to actively control the composition of the system. When given,
|
ensemble simulations where it may be desirable to actively control the
|
||||||
there must be ntypes-1 values given, where ntypes is the number of atom
|
composition of the system. When given, there must be ntypes-1 values
|
||||||
types in the simulated system. Note that a value for delta_mu is required for
|
given, where ntypes is the number of atom types in the simulated
|
||||||
all atom types when using {semi-grand}, even for atom types not listed
|
system. Note that a value for delta_mu is required for all atom types
|
||||||
following the {types} keyword. This is because when using {semi-grand}, it is
|
when using {semi-grand}, even for atom types not listed following the
|
||||||
possible that any of the atom types in the system could be part of the fix
|
{types} keyword. This is because when using {semi-grand}, it is
|
||||||
group and therefore are eligible for swapping to one of the listed atom types.
|
possible that any of the atom types in the system could be part of the
|
||||||
|
fix group and therefore are eligible for swapping to one of the listed
|
||||||
|
atom types.
|
||||||
|
|
||||||
This command may optionally use the {region} keyword to define
|
This command may optionally use the {region} keyword to define swap
|
||||||
swap volume. The specified region must have been
|
volume. The specified region must have been previously defined with a
|
||||||
previously defined with a "region"_region.html command. It must be
|
"region"_region.html command. It must be defined with side = {in}.
|
||||||
defined with side = {in}. Swap attempts occur only between atoms that
|
Swap attempts occur only between atoms that are both within the
|
||||||
are both within the specified region. Swaps are not otherwise attempted.
|
specified region. Swaps are not otherwise attempted.
|
||||||
|
|
||||||
You should ensure you do not swap atoms belonging to a molecule, or
|
You should ensure you do not swap atoms belonging to a molecule, or
|
||||||
LAMMPS will soon generate an error when it tries to find those atoms.
|
LAMMPS will soon generate an error when it tries to find those atoms.
|
||||||
|
@ -103,12 +109,12 @@ non-zero molecule ID, but does not check for this at the time of
|
||||||
swapping.
|
swapping.
|
||||||
|
|
||||||
This fix checks to ensure all atoms of the given types have the same
|
This fix checks to ensure all atoms of the given types have the same
|
||||||
atomic charge. LAMMPS doesn't enforce this in general, but it is
|
atomic charge. LAMMPS doesn't enforce this in general, but it is
|
||||||
needed for this fix to simplify the swapping procedure. Successful swaps
|
needed for this fix to simplify the swapping procedure. Successful
|
||||||
will swap the atom type and charge of the swapped atoms.
|
swaps will swap the atom type and charge of the swapped atoms.
|
||||||
|
|
||||||
Since this fix computes total potential energies before and after
|
Since this fix computes total potential energies before and after
|
||||||
proposed swaps, so even complicated potential energy calculations are
|
proposed swaps, so even complicated potential energy calculations are
|
||||||
OK, including the following:
|
OK, including the following:
|
||||||
|
|
||||||
long-range electrostatics (kspace)
|
long-range electrostatics (kspace)
|
||||||
|
|
Loading…
Reference in New Issue