# [gmx-users] Positive potential energy

Justin Lemkul jalemkul at vt.edu
Sun Feb 25 17:54:01 CET 2018

```
On 2/25/18 10:15 AM, Mahsa wrote:
> Dear Justin,
>
>
> In general, is it a good approach to first use steep algorithm for EM and
> then to further minimize do EM with cg algorithm, on the output structure?

I usually don't find multiple steps of EM needed in most cases, but
occasionally. The purpose of EM is to find a plausible starting point
for the simulation - you can never know if you're in the global minimum
so it's a bit of working in the dark, anyway. But the gradient (max
force) reports on that.

> Could you please comment on my question about the mdp files and pbc as
> well? Actually, you mentioned here:
>
> https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users
> /2017-February/111219.html
>
> that for one chain of polymer in vacuum, pbc should not be considered. So,
> for my simulation, in the first step I have one chain in vaccum and
> eventually I want to pack the whole box with polymer chains and ions,
> should I use pbc or not and which of the mdp files in my first post is
> correct?

If you're working in the condensed phase, you need finite cutoffs, PME,
and PBC.

-Justin

> Regards,
> Mahsa
>
> On Sun, Feb 25, 2018 at 3:39 PM, Justin Lemkul <jalemkul at vt.edu> wrote:
>
>>
>> On 2/25/18 9:26 AM, Mahsa wrote:
>>
>>> Dear Mark,
>>>
>>> Thank you for your reply. However, this is not clear for me yet since I
>>> read this in the tutorial from Justin:
>>>
>>> "There are two very important factors to evaluate and determine if EM was
>>> successful. The first is the potential energy (printed at the end of the
>>> EM
>>> process, even without -v). Epot should be negative. The second important
>>> feature is the maximum force, Fmax, the target for which was set in
>>> minim.mdp - "emtol = 1000.0" - indicating a target Fmax of no greater than
>>> 1000 kJ mol-1 nm-1."
>>>
>>> So I don't know whether it is correct to continue a simulation which gives
>>> positive potential energy after the energy minimisation or not?
>>>
>>> And also as I mentioned in my first post (the two different mdp files), I
>>> don't know if I should consider pbc or not, in my simulation.
>>>
>>> Do
>>> you mean that the steep integrator is not good to do energy minimization
>>> for this type of simulation?
>>>
>>>
>> There is no problem. You're just comparing apples and oranges.
>>
>> The tutorial system is a simple protein solvated by lots of water. The
>> potential energy function is the sum of bonded and nonbonded terms. In an
>> aqueous protein system, the nonbonded terms (particularly water-water
>> electrostatics) dominate the potential energy via favorable hydrogen bond
>> interactions. The internal (bonded) parameters for all the other species
>> are small in magnitude, by comparison, so the nonbonded terms dominate and
>> you get a negative potential energy.
>>
>> In your case, you have comparatively weak nonbonded terms and larger
>> bonded terms, such that the potential energy function is dominated by
>> internal energy, which is by definition, positive.
>>
>> This is not an indication that anything is wrong with the algorithms used.
>>
>> -Justin
>>
>>
>> Regards,
>>> Mahsa
>>>
>>> On Sat, Feb 24, 2018 at 8:54 AM, Mark Abraham <mark.j.abraham at gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>> Even if there are minima on the surface that have negative energy (which
>>>> will depend how the model was developed, which you should look into)
>>>> there's no reason to expect an arbitrary starting configuration will find
>>>> one after a steepest descent search. A tangled pile of strings will stay
>>>> tangled.
>>>>
>>>> Mark
>>>>
>>>> On Fri, Feb 23, 2018, 23:28 Mahsa E <ebadi.mahsa at gmail.com> wrote:
>>>>
>>>> Hello,
>>>>> I want to simulate a box of polymer (32 chains) with salt. I started
>>>>> with
>>>>> one chain of the polymer in the box. However, after the energy
>>>>> minimisation, the energy is still positive. I found the discussion in
>>>>> the
>>>>> link below very similar to the problem I have:
>>>>>
>>>>> https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users
>>>>> /2017-February/111219.html
>>>>>
>>>>> and tried the tips from Justin in the link but I still get positive
>>>>>
>>>> energy.
>>>>
>>>>> This is my first MDP file:
>>>>>
>>>>> define                   =
>>>>> integrator               = steep
>>>>> nsteps                   = -1
>>>>> nstcgsteep               = 10
>>>>> constraints              = none
>>>>> lincs_order              = 8
>>>>> emtol                    = 20
>>>>> emstep                   = 0.01
>>>>> comm-mode                = Linear
>>>>> nstcomm                  = 1
>>>>> nstcalcenergy            = 1
>>>>> ; Output frequency for energies to log file and energy file
>>>>> nstlog                   = 1
>>>>> nstenergy                = 1
>>>>> ns_type                  = grid
>>>>> cutoff-scheme            = verlet
>>>>> coulombtype              = PME
>>>>> nstlist                  = 10
>>>>> rlist                    = 1.0
>>>>> rcoulomb                 = 1.0
>>>>> rvdw                     = 1.0
>>>>> Tcoupl                   = no
>>>>> Pcoupl                   = no
>>>>> gen_vel                  = no
>>>>> nstxout                  = 1
>>>>> pbc                      = xyz
>>>>>
>>>>> and this is the second one which I tried to follow the tips from the
>>>>> mentioned  above:
>>>>>
>>>>> define                   =
>>>>> integrator               = steep
>>>>> nsteps                   = -1
>>>>> nstcgsteep               = 10
>>>>> constraints              = none
>>>>> lincs_order              = 8
>>>>> emtol                    = 20
>>>>> emstep                   = 0.01
>>>>> comm-mode                = Linear
>>>>> nstcomm                  = 1
>>>>> nstcalcenergy            = 1
>>>>> ; Output frequency for energies to log file and energy file
>>>>> nstlog                   = 1
>>>>> nstenergy                = 1
>>>>> ns_type                  = grid
>>>>> cutoff-scheme            = group
>>>>> coulombtype              = cut-off
>>>>> nstlist                  = 0
>>>>> rlist                    = 0
>>>>> rcoulomb                 = 0
>>>>> rvdw                     = 0
>>>>> Tcoupl                   = no
>>>>> Pcoupl                   = no
>>>>> gen_vel                  = no
>>>>> nstxout                  = 1
>>>>> pbc                      = no
>>>>>
>>>>> My questions are:
>>>>>
>>>>> - I'm not sure if either of these MDP files are correct for the system
>>>>>
>>>> I'm
>>>>
>>>>> trying to simulate?
>>>>>
>>>>> - Why energy is positive in this simulation? Is there something
>>>>> fundamentally wrong in the simulation which I'm not aware of?
>>>>>
>>>>> Regards,
>>>>> Mahsa
>>>>> --
>>>>> Gromacs Users mailing list
>>>>>
>>>>> * Please search the archive at
>>>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
>>>>> posting!
>>>>>
>>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>>
>>>>> * For (un)subscribe requests visit
>>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>>>> send a mail to gmx-users-request at gromacs.org.
>>>>>
>>>>> --
>>>> Gromacs Users mailing list
>>>>
>>>> * Please search the archive at http://www.gromacs.org/
>>>> Support/Mailing_Lists/GMX-Users_List before posting!
>>>>
>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>
>>>> * For (un)subscribe requests visit
>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>>> send a mail to gmx-users-request at gromacs.org.
>>>>
>>>>
>> --
>> ==================================================
>>
>> Justin A. Lemkul, Ph.D.
>> Assistant Professor
>> Virginia Tech Department of Biochemistry
>>
>> 303 Engel Hall
>> 340 West Campus Dr.
>> Blacksburg, VA 24061
>>
>> jalemkul at vt.edu | (540) 231-3129
>> http://www.biochem.vt.edu/people/faculty/JustinLemkul.html
>>
>> ==================================================
>>
>>
>> --
>> Gromacs Users mailing list
>>
>> * Please search the archive at http://www.gromacs.org/Support
>> /Mailing_Lists/GMX-Users_List before posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>> send a mail to gmx-users-request at gromacs.org.
>>

--
==================================================

Justin A. Lemkul, Ph.D.
Assistant Professor
Virginia Tech Department of Biochemistry

303 Engel Hall
340 West Campus Dr.
Blacksburg, VA 24061

jalemkul at vt.edu | (540) 231-3129
http://www.biochem.vt.edu/people/faculty/JustinLemkul.html

==================================================

```