<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 9/09/2011 4:21 PM, Yun Shi wrote:
    <blockquote
cite="mid:CAHktH276VJqEfwcz0+1_W5Pmh=oqsDDnhLqgtJfiXjuD7b_eyw@mail.gmail.com"
      type="cite">Hi all,<br>
      <br>
      I understand this problem has been discussed before, but it seems
      no conclusion has been drawn.<br>
    </blockquote>
    <br>
    Someone needs to do some work and report back :-)<br>
    <br>
    <blockquote
cite="mid:CAHktH276VJqEfwcz0+1_W5Pmh=oqsDDnhLqgtJfiXjuD7b_eyw@mail.gmail.com"
      type="cite"><br>
      GLYCAM force field assigns negative force constants to some
      dihedrals, and when <a moz-do-not-send="true"
        href="http://amb2gmx.pl">amb2gmx.pl</a> was used to convert
      prmtop file to gromacs top file, these negative values seem to be
      ignored. Some people proposed that we change the code in <a
        moz-do-not-send="true" href="http://amb2gmx.pl">amb2gmx.pl</a>,
      that is:<br>
      <br>
      ...........................<br>
      <br>
      &nbsp; # get all force constants for each line of a dihedral #<br>
      &nbsp; my $lines = $i -1 +$numijkl;<br>
      &nbsp; for(my $j=$i;$j&lt;=$lines;$j++){<br>
      &nbsp;&nbsp;&nbsp; my $period = abs($pn{$j});<br>
      &nbsp;&nbsp;&nbsp; if($pk{$j}&gt;0) {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $V[$period] = 2*$pk{$j}*$cal/$idivf{$j};<br>
      &nbsp;&nbsp;&nbsp; }<br>
      <br>
      ...........................<br>
      <br>
      the "$pk{$j}&gt;0" is modified to "$pk{$j}!=0".<br>
      <br>
      Others suggest to modify the original prmtop file, that is, to
      remove the negative signs, and correspondingly, change the phase
      shift from 0 to 180. Then <a moz-do-not-send="true"
        href="http://amb2gmx.pl">amb2gmx.pl</a> could be used to
      correctly convert the topology.<br>
      <br>
      I am wondering if the first approach has been validated, since the
      second one seems complicated and laborious to carry out.<br>
    </blockquote>
    <br>
    Seems like a straightforward job for regular expression replacement
    using sed/perl/python/whatever. It might even be a one-liner.<br>
    <br>
    Mark<br>
  </body>
</html>