Skip to content

input.file ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceAmber log
idinput.file
nameAmber input file section
pattern\s*Here\sis\sthe\sinput\sfile:.*
endPattern\s*$\s*
endPattern2\s*\/\s*$\s*
endOffset1
xml:baseinputfile.xml

Input ​

 Here is the input file:

Production
 &cntrl
  imin=0,
  ntx=5,
  irest=1,
  nstlim=50000000,
  dt=0.002,
  ntf=2,
  ntc=2,
  temp0=300.0,
  ntpr=100000,
  ntwx=100000,
  cut=10.0,    
  ntb=2,                                       
  ntp=1,                                                      
  barostat=2,                                                                  
  ntt=3,              
  gamma_ln=2.0,                               
  ig=-1,                                  
 /                             

Output text ​

xml
<comment class="example.output" id="input.file">
        <module cmlx:templateRef="input.file">
           <list cmlx:templateRef="lines">
              <scalar dataType="xsd:string" dictRef="cc:inputLine">Production</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">&cntrl</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">imin=0,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntx=5,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">irest=1,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">nstlim=50000000,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">dt=0.002,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntf=2,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntc=2,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">temp0=300.0,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntpr=100000,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntwx=100000,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">cut=10.0,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntb=2,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntp=1,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">barostat=2,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ntt=3,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">gamma_ln=2.0,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">ig=-1,</scalar>
              <scalar dataType="xsd:string" dictRef="cc:inputLine">/</scalar>
           </list>
        </module>
    </comment>

Template definition ​

xml
<record repeat="2" />
<record id="lines" repeat="*">&#123;X,cc:inputLine&#125;</record>
<transform process="delete" xpath=".//cml:list[count(*) = 0]" />
<transform process="delete" xpath=".//cml:list[count(*) = 0]" />