<!--                                                              -->
<!-- GROMACS Data type description (DTD). 

                This source code is part of
 
                 G   R   O   M   A   C   S
 
          GROningen MAchine for Chemical Simulations
 
                        VERSION 3.1
 
 Copyright (c) 1991-2002
 BIOSON Research Institute, Dept. of Biophysical Chemistry
 University of Groningen, The Netherlands
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.
 
 If you want to redistribute modifications, please consider that
 scientific software is very special. Version control is crucial -
 bugs must be traceable. We will be happy to consider code for
 inclusion in the official distribution, but derived work must not
 be called official GROMACS. Details are found in the README & COPYING
 files - if they are missing, get the official version at www.gromacs.org.
 
 To help us fund GROMACS development, we humbly ask that you cite
 the papers on the package - you can find them in the top README file.
 
 Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
 
 And Hey:
 GROningen Mixture of Alchemy and Childrens' Stories

 $Id: gromacs.dtd,v 1.19 2002/07/14 07:59:32 spoel Exp $      
                                                            
 David van der Spoel 07/2001, 03/2002                        
 The authorative version of this document can be found at    
 http://www.gromacs.org/gromacs3.1.dtd                       
 and also in the library directory of your local GROMACS     
 installation.                                                
 
 Please use the following formal public identifier to identify it:
     "-//GROMACS//DTD Gromacs XML V1.0//EN"

 <!DOCTYPE gromacs PUBLIC "-//GROMACS//DTD Gromacs XML V3.1.0//EN"
                   "http://www.gromacs.org/gromacs3.1.dtd"
                   [...]>
-->

<!ELEMENT model   (molecules*)>

<!ELEMENT gromacs (units,parameters,system,atomtypes,forcefield,cell,
                   coordinates,velocities?,forces?)>
<!ATTLIST gromacs
          title     CDATA #REQUIRED>

<!-- Units -->
<!ELEMENT units EMPTY>
<!ATTLIST units
          length      ( nm | Angstrom ) "nm"
	  time        ( fs | ps | ns | us ) "ps"
	  temperature ( Kelvin | Celsius | Fahrenheit ) "Kelvin"
	  energy      ( kJ | kcal ) "kJ"
	  angle       ( degree | radian ) "degree">

<!-- Input parameters -->		   
<!ELEMENT parameters (output,coupling,cutoff)>
<!ATTLIST parameters
          algorithm ( md | steep | cg | bd | sd ) "md"
	  nsteps    CDATA "1"
	  init-t    CDATA "0"
	  delta-t   CDATA "0.002">

<!-- Output frequency in number of steps -->	  
<!ELEMENT output EMPTY>
<!ATTLIST output
          log           CDATA "1"
	  energy        CDATA "1"
	  x-trr         CDATA "1"
	  v-trr         CDATA "1"
	  f-trr         CDATA "0"
	  xtc           CDATA "1"
	  xtc-precision CDATA "1000">
	    	 
<!-- Coupling algorithm parameters -->		 
<!ELEMENT coupling (tcoupling,pcoupling)>

<!-- Temperature coupling -->
<!ELEMENT tcoupling (tcparm*)>
<!ATTLIST tcoupling
          algorithm  ( None | Berendsen | NoseHoover ) "None"
	  annealing  ( No | Yes ) "No"
          annealtime CDATA "0">
<!ELEMENT tcparm EMPTY>
<!ATTLIST tcparm
          groupname CDATA ""
	  t-ref     CDATA "300"
	  tau-t     CDATA "0.1">

<!-- Pressure coupling -->	  
<!ELEMENT pcoupling (p-ref,compressibility)>
<!ATTLIST pcoupling
          algorithm ( None | Berendsen | ParinelloRahman ) "None"
	  type      ( Isotropic | SemiIsotropic | Anisotropic | SurfaceTension ) "Isotropic"
          tau-p     CDATA "1.0">
<!ELEMENT p-ref            (tensor)>
<!ELEMENT compressibility  (tensor)>
<!-- End of coupling stuff -->

<!ELEMENT cutoff (pmeparm?)>
<!ATTLIST cutoff
          rneighbourlist       CDATA "1.0"
	  rvdw                 CDATA "1.0"
	  rcoulomb             CDATA "1.0"
	  rcoulswitch          CDATA "0.0"
	  rvdwswitch           CDATA "0.0"
	  relative-permitivity CDATA "1.0"
	  nstlist              CDATA "1"
	  nstype      ( Grid | Simple ) "Grid"
	  domdecomp   ( No | Yes ) "No"
	  decompdir   ( X | Y | Z ) "Z"
	  coulombtype ( CutQQ | RF | GRF | PME | Ewald | SwitchQQ | ShiftQQ | UserQQ ) "CutQQ"
	  vdwtype     ( CutLJ | SwitchLJ | ShiftLJ | UserLJ ) "CutLJ">

<!ELEMENT pmeparm EMPTY>
<!ATTLIST pmeparm
          nkx         CDATA "8"
	  nky         CDATA "8"
	  nkz         CDATA "8"
	  pmeorder    CDATA "4"
	  ewaldrtol   CDATA "1e-4"
	  epssurface  CDATA "0"
	  optfft      ( No | Yes ) "No">
	  
<!-- Description of the simulation system -->	  
<!ELEMENT system (compound+,molecule+)>

<!-- What do have in the system today ? -->
<!ELEMENT compound EMPTY>
<!ATTLIST compound
          molname IDREF #REQUIRED
	  number  CDATA #REQUIRED>
	  	  
<!-- Description of a molecule holds the list of atoms, the topology  -->
<!-- which means the connectivity. One attribute, the molname         -->
<!-- At least one atom is necessary, topology is optional (ions etc.) -->
<!ELEMENT molecule (atoms+,topology?)>
<!ATTLIST molecule 
          molname ID #REQUIRED>

<!-- There should one or two atoms (the latter in case of free energy -->
<!-- perturbation (FEP) calculations).                                -->
<!ELEMENT atoms (atom+)>
<!ATTLIST atoms
	  ptype    ( atom | dummy | shell ) "atom">
<!ELEMENT atom EMPTY>	  
<!ATTLIST atom
          aname    ID    #REQUIRED
	  nbtype   IDREF #REQUIRED
	  bondtype IDREF #REQUIRED
	  charge   CDATA #REQUIRED>

<!ELEMENT topology (bonds*,angles*,dihedrals*)>

<!ELEMENT bonds (bond*)>
<!ELEMENT bond EMPTY>
<!-- aname should refer to *two* atoms -->
<!-- harmonic-type should refer to one or two types (in case of FEP) -->
<!ATTLIST bond
          aname         IDREFS #REQUIRED
	  harmonic-type IDREFS #REQUIRED>

<!ELEMENT angles (angle*)>
<!ELEMENT angle EMPTY>
<!-- aname should refer to *three* atoms -->
<!-- harmonic-type should refer to one or two types (in case of FEP) -->
<!ATTLIST angle
          aname         IDREFS #REQUIRED
	  harmonic-type IDREFS #REQUIRED>
		    
<!ELEMENT dihedrals EMPTY>
<!-- aname should refer to *four* atoms -->
<!-- proper-type should refer to one or two types (in case of FEP) -->
<!ATTLIST dihedrals
          aname       IDREFS #REQUIRED
	  proper-type IDREFS #REQUIRED>

<!ELEMENT forcefield (nonbonded*,bonded*,special*)>
<!ELEMENT nonbonded (lennardjones | buckingham)>
<!ATTLIST nonbonded
          combinationrule ( arithmetic | geometric | epsilon-sigma ) "geometric">

<!ELEMENT lennardjones EMPTY>
<!-- IDREFS is referring to *two* atomtypes -->
<!ATTLIST lennardjones
          atype IDREFS #REQUIRED
	  cn    CDATA  #REQUIRED
	  c6    CDATA  #REQUIRED>
	  
<!ELEMENT buckingham EMPTY>
<!-- IDREF is referring to *two* atomtypes -->
<!ATTLIST buckingham
          atype IDREFS #REQUIRED
	  A     CDATA  #REQUIRED
	  B     CDATA  #REQUIRED
	  C     CDATA  #REQUIRED>

<!-- Definitions for bondeds: this is the most complex bit   -->
<!-- and the one that will most likely be extended first     -->	  
<!ELEMENT bonded (bondtype | angletype | dihedraltype)>

<!-- A few different bond types, and I may have forgotten some.  -->
<!-- The harmonic element is reused by angles and dihedrals      -->
<!-- in the hope to be able to save some coding (and checking!)  -->
<!ELEMENT bondtype (harmonic | g96bond | morse)>
<!ELEMENT harmonic EMPTY>	  
<!ATTLIST harmonic
          harmonic-type ID    #REQUIRED
          a0            CDATA #REQUIRED
	  ka            CDATA #REQUIRED>
<!ELEMENT g96bond EMPTY>
<!ATTLIST g96bond
          g96bond-type  ID    #REQUIRED
          b0            CDATA #REQUIRED
	  kb            CDATA #REQUIRED>
<!ELEMENT morse EMPTY>
<!ATTLIST morse
          morse-type    ID    #REQUIRED
          b0            CDATA #REQUIRED
	  cb            CDATA #REQUIRED
	  D             CDATA #REQUIRED>
<!-- End of bondtypes -->

<!-- A few different angle types, and I may have forgotten some -->
<!ELEMENT angletype (harmonic | g96angle)>
<!ELEMENT g96angle EMPTY>
<!ATTLIST g96angle
          harmonic-type ID    #REQUIRED
          ct0           CDATA #REQUIRED
	  kct           CDATA #REQUIRED>
<!-- End of angletypes -->

<!-- A number of different types are available for dihedrals -->	 
<!ELEMENT dihedraltype (proper | harmonic | ryckaertbellemans | cosineseries)>
<!ELEMENT proper EMPTY>
<!ATTLIST proper
          ph0   CDATA #REQUIRED
	  kph   CDATA #REQUIRED
	  nmult CDATA #REQUIRED>
<!ELEMENT ryckaertbellemans EMPTY>
<!ATTLIST ryckaertbellemans
          c0 CDATA #REQUIRED
	  c1 CDATA #REQUIRED
	  c2 CDATA #REQUIRED
	  c3 CDATA #REQUIRED
	  c4 CDATA #REQUIRED
	  c5 CDATA #REQUIRED>
<!ELEMENT cosineseries EMPTY>
<!ATTLIST cosineseries
          c0 CDATA #REQUIRED
	  c1 CDATA #REQUIRED
	  c2 CDATA #REQUIRED
	  c3 CDATA #REQUIRED>
<!-- End of dihedraltypes -->

<!-- The specials -->
<!ELEMENT special EMPTY>
<!--ELEMENT special (position_restraint | distance_restraint | dihedral_restraint)-->

<!-- Mass types for the atoms, to avoid repeating data and to enable e.g. -->
<!-- a quick modification of masses towards heavy hydrogens               -->
<!ELEMENT atomtypes (atomtype*)>
<!ELEMENT atomtype EMPTY>
<!ATTLIST atomtype
          atype ID    #REQUIRED
	  ptype CDATA #REQUIRED
	  mass  CDATA #REQUIRED>

<!-- Computational cell (box) -->  
<!ELEMENT cell        (tensor)>

<!-- Coordinates and such: this is clear hopefully -->
<!ELEMENT coordinates (vector*)>
<!ELEMENT velocities  (vector*)>
<!ELEMENT forces      (vector*)>
<!ELEMENT vector EMPTY>
<!ATTLIST vector 
          id IDREF #REQUIRED
          x  CDATA #REQUIRED
          y  CDATA #REQUIRED
          z  CDATA #REQUIRED>
<!ELEMENT tensor EMPTY>
<!ATTLIST tensor
          xx  CDATA #REQUIRED
          yy  CDATA #REQUIRED
          zz  CDATA #REQUIRED
	  xy  CDATA "0"
	  xz  CDATA "0"
	  yx  CDATA "0"
	  yz  CDATA "0"
	  zx  CDATA "0"
	  zy  CDATA "0">
	 
<!-- End of GROMACS DTD -->
