structure optimization under pressure

Hi, Lammps users,
I have a question about the structure optimization under pressure.

My system contains three regions. As shown in the following plot, target region is in the middle of upper and lower region. I am trying to optimize the structures of target region under uniaxial compression while keeping the upper and lower region rigid. The compression is applied in the direction along which the boundary of the system is non-periodic.


------------------------------------- s

upper_region | /|
------------------------------------- |
target_region | |_____ p
------------------------------------- /
lower_region | /
------------------------------------- p

Here are the commands used for this optimization:

fix f1 lower setforce 0.0 0.0 0.0
fix f2 upper aveforce 0.0 0.0 0.0
fix pull upper addforce 0 0 -1500
fix_modify pull energy yes

Do these commands make sense? Thank you very much!

It looks like it might work, but here are a few comments:

  1. The aveforce fix means that the force will be the same for every upper atom. This may not be such a great idea.
  2. The upper atoms can still move sideways, which you may not want, although because of 1, they will move sideways together.
  3. Possibly 1 and 2 together is a good thing.
  4. You should check that lower atoms remain fixed and that upper atoms remain fixed, except for sideways movement.
  5. Any time you relax a structure while freezing part of it, you should be concerned. Better to relax the whole thing, or at least keep the frozen part far removed from the interesting part.

It very hard to prove that something complicated is correct by just looking at the inputs. It is much easier to figure out why something is wrong, if you know it is wrong. Examine the output carefully: structures, energies, forces, etc.