From: Peter Freddolino (petefred_at_umich.edu)
Date: Fri Jan 05 2018 - 11:56:31 CST

Hi Brian,
Yes, the sequence definitely does matter. In particular, going back to the
plane-based definition of the improper, having the central atom of the
improper in one of the two middle positions of the IMPR statement would
cause both of the calculated planes defining the angle to include it,
whereas having it on either end means only one of the two planes includes
it. I believe it is only a direct reversal of the ordering that would be
safe (and even then, only with zero phase shift).
Thanks,
Peter

On Fri, Jan 5, 2018 at 11:40 AM, Brian Radak <brian.radak_at_gmail.com> wrote:

> The order may not matter, but I'm pretty sure the sequence does. I don't
> have the test case in front of me, but I recall changing the improper
> definition and getting different energies for the same structure. This was
> especially annoying with CGenFF because many of the old carboxylate force
> fields use different atoms in the protonated and deprotonated states.
> Defining correct alchemical topologies became a bit of a chore.
>
> HTH,
> Brian
>
> On Wed, Jan 3, 2018 at 4:15 AM, Jadzia Dax <jadziadax30_at_gmail.com> wrote:
>
>> Dear Peter,
>>
>> Thank you very much for your detailed answer, it has been extremely
>> insightful.
>>
>> Since I guess one cannot change the behavior of psfgen in this regard the
>> most simple solution might to be write a script which corrects the atom
>> ordering in the psf-files to the default CHARMM format (central atom first)
>> so that programs like CP2K are able to use it along with the original
>> parameter files.
>>
>> Best wishes,
>> Jadzia
>>
>>
>>
>>
>> On Tue, Jan 2, 2018 at 4:31 PM, Peter Freddolino <petefred_at_umich.edu>
>> wrote:
>>
>>> Dear Jadzia,
>>> The reason that the order is reversible is that the way the improper
>>> potential is defined is based on the angle between the plane containing the
>>> first three atoms, and the plane containing the second three atoms (see
>>> Fig. 2 of http://onlinelibrary.wiley.com/doi/10.1002/jcc.540040211/epdf).
>>> Those planes are not changed by reversing the order of the atom list (since
>>> the first three simply become the second three and vice versa).
>>>
>>> I am not sure, though, whether the implementation of the improper angle
>>> calculation used by all programs compatible with charmm-style psf files is
>>> the same. Some aspects of the charmm documentation strongly suggests that
>>> it requires the central atom to be listed first, and cp2k may be the same
>>> way. This may reflect different implementations of how to calculate the
>>> angles, or may be due to the valid concern that the reversibility does not
>>> hold except under special cases of the improper potential (it is only true
>>> for the harmonic potential with a phase angle of 0, but that condition is
>>> satisfied for all cases in the charmm parameter sets). For the harmonic
>>> version of the improper potential with that phase angle condition
>>> satisfied, I don't see why they should not ultimately work out the same
>>> under strict reversal of the atom list.
>>>
>>> Best,
>>> Peter
>>>
>>>
>>> On Tue, Jan 2, 2018 at 2:29 AM, Jadzia Dax <jadziadax30_at_gmail.com>
>>> wrote:
>>>
>>>> Hi Everyone, and a happy new.
>>>>
>>>> On this
>>>> <http://www.ks.uiuc.edu/Training/Tutorials/namd/namd-tutorial-unix-html/node24.html>
>>>> NAMD/VMD page here is written:
>>>>
>>>> *As with dihedrals, the order of atoms within an ​​improper may be
>>>>> reversed. As shown below, impropers are specified by the IMPR statement
>>>>> followed by sets of four atoms, with the central atom to which the other
>>>>> three are bonded typically listed first.​*
>>>>
>>>>
>>>> Why can the direction be reversed with impropers? As far as I can see
>>>> this would change the central atom. The three orbital atoms should be
>>>> exchangable of course, but this would rather be any permutation of the last
>>>> three atoms.
>>>>
>>>> The reason why I am concerned with this topic is that I have rtf/prm
>>>> files for a ligand prepared with CGenFF. The rtf file has one Improper. And
>>>> when I create the psf file with VMD/psfgen then the psf file has the atoms
>>>> in reversed order than in the rtf-file. But the prm-file still has the
>>>> original order. Thus my simulations (not with NAMD but with CP2K) fail
>>>> immediately because the it cannot find the parameters for this improper.
>>>>
>>>> Any help or comment is appreciated.
>>>>
>>>> Best wishes,
>>>> Jadzia
>>>>
>>>
>>>
>>
>