How to "minimize" a group but not all?

Dear LAMMPS users,

As described in the manual, the “minimize” command applies to the system, and “fix move” and other fixes does not take effect during the minimization. But is there any way to minimize only a selected group of atoms, while fixing the positions of the other atoms?

Thanks.

Jiayi Yan
Materials Science, KTH, Sweden

Dear LAMMPS users,

As described in the manual, the “minimize” command applies to the system, and “fix move” and other fixes does not take effect during the minimization. But is there any way to minimize only a selected group of atoms, while fixing the positions of the other atoms?

Simply set the forces of atoms that you want to keep immobile to zero with fix setforce.

Axel

You can use fix setforce 0.0 on atoms that you don’t
want to move.

Steve

Hello Jiayi
   The ability to minimize degrees of freedom for subsets of atoms
would be useful.

   I have a closely related suggestion: Commands and fixes which add
particles or alter the topology during the simulation (like "fix
bond/create" and "fix gcmc") would be more robust if there was a way
to subsequently minimize only the set of atoms which were directly
effected by the most recent change (or within a certain distance of
these atoms).

    In answer to your question, I use damped motion to relax the
positions of the atoms for a group (implemented with a combination of
"fix langevin" and "fix nve")

fix 1 GROUPNAME langevin 0.0 0.0 100.0 12345 # 48279
fix 2 GROUPNAME nve

Cheers

Andrew

LAMMPS documentation:
http://lammps.sandia.gov/doc/fix_langevin.html

Hello Jiayi
   The ability to minimize degrees of freedom for subsets of atoms
would be useful.

You can use fix setforce 0.0 on atoms that you don't
want to move.
Steve

Cool!

Anyway, to elaborate on Steve's suggestion, given the group you want
to minimize (eg "GROUPNAME"), you can create the group of immobilized
atoms using a command like this:

group IMMOBILE_GROUP subtract all GROUPNAME

Then you can use fix setforce 0.0 on that group:

fix freeze IMMOBILE_GROUP setforce 0.0 0.0 0.0

Cheers
Andrew