<?xml version='1.0'?>
<charmm>
    <residue>
        <name>WAT</name>
        <useresname>TP3M</useresname>
        <atom>
            <name>O</name>
            <useatomname>OH2</useatomname>
        </atom>
    </residue>
    <residue>
        <name>[NC]?...$</name>
        <atom>
            <name>H</name>
            <useatomname>HN</useatomname>
        </atom>
        <atom>
            <name>HA3</name>
            <useatomname>HA1</useatomname>
        </atom> 
        <atom>
            <name>HG3</name>
            <useatomname>HG1</useatomname>
        </atom>
        <atom>
            <name>HG</name>
            <useatomname>HG1</useatomname>
        </atom>
    </residue>
    <residue>
        <name>[NC]?(?!ALA$)...$</name> <!-- ALA has HB1, HB2, HB3 -->
        <exclud>ALA</exclud>
        <atom>   
            <name>HB3</name>
            <useatomname>HB1</useatomname>
        </atom>
    </residue>
    <residue>
        <name>[NC]?(?!ILE$)...$</name> <!-- ILE has HD11, HD12, HD13 -->
        <atom>   
            <name>HD3</name>
            <useatomname>HD1</useatomname>
        </atom>
    </residue>
    <residue>
        <name>[NC]?(?!MET$|TRP$)...$</name> <!-- both have HE1/HE3 -->
        <atom>   
            <name>HE3</name>
            <useatomname>HE1</useatomname>
        </atom>
    </residue>
    <residue>
        <name>ASH</name>
        <useresname>ASP</useresname>
    </residue>
     <residue>
        <name>ASH</name>
        <useresname>ASPP</useresname>
    </residue>
    <residue>
        <name>GLH</name>
        <useresname>GLU</useresname>
    </residue>
    <residue>
        <name>GLH</name>
        <useresname>GLUP</useresname>
    </residue>
    <residue>
        <name>ILE</name>
        <atom>
            <name>CD1</name>
            <useatomname>CD</useatomname>
        </atom>
        <atom>
            <name>HD11</name>
            <useatomname>HD1</useatomname>
        </atom>
        <atom>
            <name>HD12</name>
            <useatomname>HD2</useatomname>
        </atom>
        <atom>
            <name>HD13</name>
            <useatomname>HD3</useatomname>
        </atom>
        <atom>
            <name>HG13</name>
            <useatomname>HG11</useatomname>
        </atom>
    </residue>
    <residue>
        <name>CYX</name>
        <useresname>CYS</useresname>
    </residue>
    <residue>
        <name>CYX</name>
        <useresname>DISU</useresname>
        <atom>
            <name>CB</name>
            <useatomname>1CB</useatomname>
        </atom>
        <atom>
            <name>SG</name>
            <useatomname>1SG</useatomname>
        </atom>
    </residue>
    <residue>
        <name>HI([PDE])$</name>
        <useresname>HS$group</useresname>
    </residue>
    <residue>
        <name>C(...)$</name>
        <useresname>$group</useresname>
    </residue>
    <residue>
        <name>C...$</name>
        <useresname>CTER</useresname>
        <atom>
            <name>O</name>
            <useatomname>OT1</useatomname>
        </atom>
        <atom>
            <name>OXT</name>
            <useatomname>OT2</useatomname>
        </atom>
    </residue>
    <residue>
        <name>N(...)$</name>
        <useresname>$group</useresname>
    </residue>
    <residue>
        <name>N(?!GLY$|PRO$)...$</name>   <!-- See NGLY, NPRO -->
        <useresname>NTER</useresname>
        <atom>
            <name>H</name>
            <useatomname>HT1</useatomname>
        </atom>
        <atom>
            <name>H2</name>
            <useatomname>HT2</useatomname>
        </atom>
        <atom>
            <name>H3</name>
            <useatomname>HT3</useatomname>
        </atom>
    </residue>
    <residue>
        <name>NGLY</name>
        <useresname>GLYP</useresname>
        <atom>
            <name>H</name>
            <useatomname>HT1</useatomname>
        </atom>
        <atom>
            <name>H2</name>
            <useatomname>HT2</useatomname>
        </atom>
        <atom>
            <name>H3</name>
            <useatomname>HT3</useatomname>
        </atom>
    </residue>
    <residue>
        <name>NPRO</name>
        <useresname>PROP</useresname>
        <atom>
            <name>H</name>
            <useatomname>HN1</useatomname>
        </atom>
        <atom>
            <name>H2</name>
            <useatomname>HN2</useatomname>
        </atom>
    </residue>

<!-- Nucleic Acid Subtitutions -->
   
    <residue>
       <name>[RD]A[35]?$</name>
       <useresname>ADE</useresname>
    </residue>
    <residue>
       <name>[RD]C[35]?$</name>
       <useresname>CYT</useresname>
    </residue>
    <residue>
       <name>[RD]G[35]?$</name>
       <useresname>GUA</useresname>
    </residue>
    <residue>
       <name>DT[35]?$</name>
       <useresname>THY</useresname>
    </residue>
    <residue>
       <name>RU[35]?$</name>
       <useresname>URA</useresname>
    </residue>
    <residue>
       <name>D[ACGT][35]?$</name>
       <useresname>DEO1</useresname>
    </residue>
    <residue>
       <name>[RD][ACGTU]3$</name>
       <useresname>3TER</useresname>
    </residue>
    <residue>
       <name>[RD][ACGTU]5$</name>
       <useresname>5TER</useresname>
    </residue>
    <residue>
       <name>DT[35]?$</name>
       <atom>
          <name>C7</name>
          <useatomname>C5M</useatomname>
       </atom>
       <atom>
          <name>H71</name>
          <useatomname>H51</useatomname>
       </atom>
       <atom>
          <name>H72</name>
          <useatomname>H52</useatomname>
       </atom>
       <atom>
          <name>H73</name>
          <useatomname>H53</useatomname>
       </atom>
    </residue>
</charmm>
