Skip to content

residue.pointer ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceAmber topology residue pointer section
idresidue.pointer
nameAmber topology residue pointer section
pattern\s*%FLAG\sRESIDUE_POINTER.*
endPattern.*[0-9]\s*$%.*
endPattern2~
endOffset1
xml:basesections/residue.pointer.xml

Input ​

%FLAG RESIDUE_POINTER                                                           
%FORMAT(10I8)                                                                   
       1       2      84      87      90      93      96      99     102     105
     108     111     114     117     120     123     126     129     132     135
     138     141     144     147     150     153     156     159     162     165
     168     171     174     177     180     183     186     189     192     195
     198     201     204     207     210     213     216     219     222     225
     228     231     234     237     240     243     246     249     252     255
     258     261     264     267     270     273     276     279     282     285
     288     291     294     297     300     303     306     309     312     315
    7548    7551    7554    7557    7560    7563    7566    7569    7572    7575
    7578    7581    7584    7587    7590    7593    7596    7599    7602    7605
    7608    7611    7614    7617    7620    7623    7626
%FLAG BOND_FORCE_CONSTANT

Output text ​

xml
<comment class="example.output" id="residue.pointer">
         <module cmlx:templateRef="residue.pointer">
            <array dataType="xsd:integer" dictRef="am:residue.pointer" size="2517">1 2 84 87 90 93 96 99 102 105 108 111 114 117 120 123 126 129 132 135 138 141 144 147 150 153 156 159 7584 7587 7590 7593 7596 7599 7602 7605 7608 7611 7614 7617 7620 7623 7626</array>
            <scalar dictRef="residue.count">3</scalar>
            <scalar dictRef="residue.atom.index">84</scalar>
         </module>
    </comment>

Template definition ​

xml
<record repeat="2" />
<record repeat="*">&#123;1_20I,am:residue.pointer&#125;</record>
<transform process="joinArrays" xpath=".//cml:array" />
<transform process="pullup" xpath=".//cml:array" />
<transform process="delete" xpath=".//cml:list" />
<transform process="addChild" xpath="." elementName="cml:scalar" dictRef="residue.count" />
<transform process="setValue" xpath=".//cml:scalar[@dictRef='residue.count']" value="$number(count(tokenize(replace(//cml:array [@dictRef='am:residue']/text(), '(\|HOH|\|WAT|\|H20|\|TIP|\|SOL|\|Cl[A-Za-z\+\-]*|\|CIO|\|Cs\+|\|IB|\|K[A-Za-z\+\-]*|\|Li\+|\|MG[A-Za-z\+\-]*|\|Na\+|\|Rb\+|\|CS|\|RB|\|NA|\|F|\|CL)', ''), '\|')) + 1)" />
<transform process="addChild" xpath="." elementName="cml:scalar" dictRef="residue.atom.index" />
<transform process="setValue" xpath="//cml:scalar[@dictRef='residue.atom.index']" value="$number(subsequence(tokenize(//cml:array[@dictRef='am:residue.pointer']/text(), '\s+'), //cml:scalar[@dictRef='residue.count'], 1))" />
<transform process="setValue" xpath="//cml:scalar[@dictRef='residue.atom.index' and not(exists(text()))]" value="9999999999" />