LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] box/relax vs. enthalpy minimization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] box/relax vs. enthalpy minimization


From: Majid Mosayebi <mosayebi@gmail.com>
Date: Tue, 8 Jun 2010 17:44:01 +0200

Dear all,

adding the possibility to be able to have total pressure in box/relax fix is very useful, since it enables the user to minimize the true enthalpy (H=E_total + V*P_total) and to study enthalpy landscape of the system.
Currently it is only possible to minimize the configurational part of enthalpy via box/relax (configurational is not a good phrase here. because in enthalpy, kinetic part of pressure and volume are coupled).  The resulting configuration does not always corresponds to the minimum enthalpy. So one has to consider the kinetic part in optimization procedure which involves volume changes in addition to particle displacements.

Best,
Majid.




Since enthalpy is given by the total pressure (H=E+PV). So in order to be able to minimize

On Tue, Jun 8, 2010 at 4:40 PM, Thompson, Aidan <athomps@sandia.gov> wrote:
Majid,

It would be pretty easy to do what you are requesting, but I am having a
hard time seeing why it is useful. Also, I am confident that it including
that as an option would make the documentation more confusing to novice
users. Without getting in to a big discussion about the "true" definition of
enthalpy for a minimized structure (I doubt that argument will ever be
settled), can you explain why it is useful to include the kinetic part of
the pressure in fix box/relax.

Aidan

--
     Aidan P. Thompson
     01435 Multiscale Dynamic Materials Modeling
     Sandia National Laboratories
     PO Box 5800, MS 1322      Phone: 505-844-9702
     Albuquerque, NM 87185     Fax  : 505-845-7442
     E-mail:athomps@sandia.gov Cell : 505-550-2614



> From: Majid Mosayebi <mosayebi@gmail.com>
> Date: Tue, 8 Jun 2010 05:35:54 -0600
> To: Aidan Thompson <athomps@sandia.gov>
> Cc: Harold Hatch <hhatch@princeton.edu>, Steve Plimpton <sjplimp@gmail.com>,
> <lammps-users@lists.sourceforge.net>
> Subject: Re: [lammps-users] box/relax vs. enthalpy minimization
>
> Dear Aidan,
>
> regarding enthalpy minimization, we know that
>
> H=E_pot + E_kin + (P_virial + P_kin)V = H_pot + H_kin
>
> E_kin is a constant and does not play any role in minimization of H. But we
> cannot forget the kinetic part of pressure and just minimize H_pot (box/relax
> does this exactly).
>
> in other words,
> for H_min we should have,
> dE_pot/dr = -F = 0
> dE_pot/dV = - (P_virial + P_kin).
>
> if you plot H_pot during minimization, you'll see that it always decreases.
> However H is not monotonically decreasing (see the attached plot for a soft
> sphere system.) and as a result the converged configuration is not necessarily
> in local enthalpy minimum. 
>
> adding an option to the box/relax fix to optimize total pressure instead of
> virial pressure would be an easy way to have enthalpy minimizer (maybe not the
> best way).
>
> Best,
> Majid.  
>
>
>
>
> On Thu, Mar 25, 2010 at 6:18 PM, Thompson, Aidan <athomps@sandia.gov> wrote:
>> Harold,
>>
>> For the xyz style, which you are using, the LAMMPS formulation corresponds
>> to the enthalpy-minimization equations you wrote in your original e-mail.
>> So, the minimize command will try to converge to a local energy minimum with
>> the following properties:
>>
>> dU/dr = -F = 0
>> dU/dV = -p = p_target
>>
>> Because the linesearch prohibits uphill moves, this state will also be a
>> minimum of U+p_target*V.
>>
>> I am not surprised that the default linesearch style failed for you.
>> However, I think you were too quick to reject the quadratic linesearch
>> style. You may need to tryo harder and play with the parameters,
>> particularly vmax.
>>
>>>>>> Attempting to use quadratic line search led to increases in U, which
>>>> isn¹t
>>>>>> acceptable.
>>
>> The potential energy may increase, but this is to be expected, if you are
>> converging to a high-pressure state. I have found that for many crystalline
>> systems, the quadratic linesearch works very well.
>>
>> Aidan
>>
>>
>> --
>>       Aidan P. Thompson
>>       01435 Multiscale Dynamic Materials Modeling
>>       Sandia National Laboratories
>>       PO Box 5800, MS 1322      Phone: 505-844-9702
>>       Albuquerque, NM 87185     Fax  : 505-845-7442
>>       E-mail:athomps@sandia.gov <mailto:E-mail%3Aathomps@sandia.gov>  Cell :
>> 505-550-2614
>>
>>
>>
>>>> From: Harold Hatch <hhatch@princeton.edu>
>>>> Date: Tue, 23 Mar 2010 09:52:25 -0600
>>>> To: Steve Plimpton <sjplimp@gmail.com>, Aidan Thompson <athomps@sandia.gov>
>>>> Cc: <lammps-users@lists.sourceforge.net>
>>>> Subject: RE: [lammps-users] box/relax vs. enthalpy minimization
>>>>
>>>> Dear Steve,
>>>>
>>>> Thank you for your informative and timely reply.  I see that the analytical
>>>> form of dH/dL can get very tricky, and I was only considering a cubic box.
>>>> I was also only considering isotropic pressure.  So box/relax must be
>>> easier
>>>> to implement for more general box relaxations.  Although dH/dL could be
>>>> approximated by finite difference from calculating enthalpy change upon a
>>>> small contraction/expansion, which may be slower.  But Middleton and Wales
>>>> (JCP vol 118, pg 4583, 2003) say the analytic derivatives didn't speed-up
>>>> the calculation.
>>>>
>>>> Still, I do not understand how the pressure is constrained with box/relax,
>>>> and I eagerly await any help Dr. Thompson may offer.
>>>>
>>>> Regards,
>>>> Harold Hatch
>>>>
>>>> P.S. I haven't forgotten about our discussion of the stress tensor, which I
>>>> am still working out.  Thank you for the help you both have offered in this
>>>> regard.
>>>>
>>>> -----Original Message-----
>>>> From: Steve Plimpton [mailto:sjplimp@gmail.com]
>>>> Sent: Tuesday, March 23, 2010 11:03 AM
>>>> To: Harold Hatch; Thompson, Aidan
>>>> Cc: lammps-users@lists.sourceforge.net
>>>> Subject: Re: [lammps-users] box/relax vs. enthalpy minimization
>>>>
>>>> Aidan can answer this better, but the issue is that for various kinds of
>>>> box relaxations there is no formulation (mathematically) of the min problem
>>>> that satisfies all the constraints exactly at the energy min.  Except when
>>>> your starting point is the right answer. So iterating, as you are doing, is
>>>> not a bad approach, if you want a hi-precision answer.
>>>>
>>>> Steve
>>>>
>>>> On Tue, Mar 23, 2010 at 7:23 AM, Harold Hatch <hhatch@princeton.edu> wrote:
>>>>>> Dear LAMMPS users,
>>>>>>
>>>>>>
>>>>>>
>>>>>> Conceptually, is the use of box/relax equivalent to enthalpy
>>>> minimization?
>>>>>> From how I understand fix box/relax, it allows you to minimize energy
>>>> while
>>>>>> allowing V as a degree of freedom, and constraining P.  Enthalpy
>>>>>> minimization, on the other hand, minimizes H = U + PV, so that the
>>>> condition
>>>>>> dH/dV = dU/dV + P = 0 sets the pressure, dH/dr_i = - forces, H ~= U for
>>>>>> incompressible liquid.  What I don¹t understand is how box/relax
>>>> constrains
>>>>>> the pressure.  With enthalpy minimization, dH/dL can be derived
>>>> analytically
>>>>>> or approximated with finite differences.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I have run into some trouble using box/relax because the line search
>>>> alpha
>>>>>> -> 0 with default minimization settings far before a minimum is reached.
>>>>>> Attempting to use quadratic line search led to increases in U, which
>>>> isn¹t
>>>>>> acceptable.  In order to get a decent minimum with box/relax, I wrote a
>>>>>> script (following the note in the manual) which alternately minimizes >>>
>>>>>> with
>>>>>> box/relax to decent energy tolerance (1e-8), then minimizes constant
>>>> volume
>>>>>> for 1 step.  After alternating this several hundred times, I can finally
>>>>>> reach a state where minimizing for both box/relax and constant volume get
>>>>>> zero line search alpha.  Why does box/relax lose steam before reaching a
>>>>>> minimum, and has anyone found a better way to overcome this problem?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thank you,
>>>>>>
>>>>>> Harold Hatch
>>>>>>
>>>>>>
>>>>
>>> ----------------------------------------------------------------------------
>>>> --
>>>>>> Download Intel&#174; Parallel Studio Eval
>>>>>> Try the new software tools for yourself. Speed compiling, find bugs
>>>>>> proactively, and fine-tune applications for parallel performance.
>>>>>> See why Intel Parallel Studio got high marks during beta.
>>>>>> http://p.sf.net/sfu/intel-sw-dev
>>>>>> _______________________________________________
>>>>>> lammps-users mailing list
>>>>>> lammps-users@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>>
>>
----------------------------------------------------------------------------->>
-
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> lammps-users mailing list
>> lammps-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>