<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 4/21/2011 10:33 AM, Mark Abraham wrote:
    <blockquote cite="mid:4DAF7B66.7020504@anu.edu.au" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      On 4/21/2011 10:17 AM, Sanku M wrote:
      <blockquote
        cite="mid:511424.66866.qm@web114202.mail.gq1.yahoo.com"
        type="cite">
        <style type="text/css"><!-- DIV {margin:0px;} --></style>
        <div style="font-family: 'times new roman','new
          york',times,serif; font-size: 12pt;">
          <div><span class="Apple-style-span" style="font-family:
              times,serif;">
              <div style="margin: 0px;">Hi,</div>
              <div style="margin: 0px;">&nbsp;&nbsp;I was trying to calculate the&nbsp;<span
                  class="yshortcuts" id="lw_1303345020_0">dipole moment</span>&nbsp;of

                part of my peptide. In other words, if I have a
                10-residue peptide, I was interested in calculating the
                dipole-moment contribution of the backbone. So, I made
                an index file which have a group containing backbone
                atoms. But, if I try to use g_dipoles to get the dipole
                moment contribution from the backbone atoms, using
                following command:</div>
              <div style="margin: 0px;">g_dipoles &nbsp;-s &nbsp;-f &nbsp;traj -n
                index.ndx</div>
              <div style="margin: 0px;">I get an error :</div>
              <div style="margin: 0px;">
                <div style="margin: 0px;">-------------------------------------------------------</div>
                <div style="margin: 0px;">Program g_dipoles_mod_4mpi,
                  VERSION 4.0.5</div>
                <div style="margin: 0px;">Source code file:
                  gmx_dipoles.c, line: 1173</div>
                <div style="margin: 0px;"><br>
                </div>
                <div style="margin: 0px;"><span class="yshortcuts"
                    id="lw_1303345020_1">Fatal error</span>:</div>
                <div style="margin: 0px;">index[1]=197 does not
                  correspond to the first atom of a molecule</div>
                <div style="margin: 0px;">-------------------------------------------------------</div>
              </div>
            </span></div>
        </div>
      </blockquote>
      <br>
      Calculating a dipole moment of a possibly-charged species requires
      that there be a reference point, which is conventionally the
      center of mass of the molecule. This means all the atoms of the
      molecule have to be known, and g_dipoles assumes the index group
      consists of whole molecules.<br>
      <br>
      So to do the partition you want, you will need to provide the same
      molecules, but with zero charges on the non-backbone atoms. That
      will mean making a copy of your .top and hacking those charges to
      zero to generate a new such .tpr.<br>
    </blockquote>
    <br>
    Actually, tpbconv has the ability to set the charges of a group in a
    .tpr to zero.<br>
    <br>
    Mark<br>
  
</body>
</html>