Appendix G: SpinXML infrastructure

From Spinach Documentation Wiki
Jump to: navigation, search


SpinXML is simple and general XML format for spin system description that is the result of broad consultations within NMR and EPR communities. The format does not attempt to introduce or change any of the current interaction specification conventions, but instead incorporates them as special cases and options into a common framework. SpinXML format is human-readable, extensible and easy to edit, both manually and automatically. The format is described in

SpinXML class schematic

Spinxml schematic.png

XML schema file

The schema file can be downloaded from


Coordinates are in Angstrom, angles in radians. Interactions must be specified in:

  1. ppm for chemical shielding and chemical shift
  2. Bohr magneton units for g-tensors
  3. Hz, kHz, MHz or GHz for all other interactions

Example file

<?xml version="1.0" encoding="utf-8"?> 


  <spin id="1" isotope="13C" label="">
    <coordinates x="-3.76367" y="0.27069"  z="0.00000" />

  <spin id="2" isotope="13C" label=""/>

  <spin id="3" isotope="14N" label="">
    <coordinates x="-1.39936" y="-0.37548" z="0.00000" />

  <interaction kind="shift" id="1" units="ppm" spin_a="1">
    <tensor xx="1.9539"  xy="-0.3771" xz="-0.041"
            yx="-0.3771" yy="1.587"   yz="0.8151" 
            zx="-0.041"  zy="0.8151"  zz="2.4592" />

  <interaction kind="shift" id="2" units="ppm" spin_a="2">
    <eigenvalues xx="1.0" yy="2.0" zz="3.0"/>
      <euler_angles alpha="0.1" beta="0.2" gamma="0.3"/>

  <interaction kind="shift" id="3" units="ppm" spin_a="3">
    <scalar iso="12.0" />

  <interaction kind="dipolar" id="4" units="kHz" spin_a="2" spin_b="1">
    <aniso_asymm iso="0.0" aniso="2.0" asymm="0.0"/>
      <dcm xx="0.1038"  xy="0.4229"  xz="0.9002"
           yx="0.8648"  yy="-0.4855" yz="0.1283" 
           zx="0.4913"  zy="0.7651"  zz="-0.4161" />

  <interaction kind="dipolar" id="5" units="kHz" spin_a="2" spin_b="3">
    <axiality_rhombicity iso="0.0" ax="2.0" rh="0.0"/>
      <quaternion re="0.4360" i="-0.7183" j="0.3106" k="0.4444" />

  <interaction kind="quadrupolar" id="6" units="kHz" spin_a="3">
    <span_skew iso="0.0" span="2.0" skew="0.1"/>
        <angle phi="0.5" />
        <axis x="0.1" y="0.2" z="0.3" />


Import into Spinach

Versions 1.9 and later import SpinXML files and convert them into sys and inter input structures using x2spinach.m function.

Version 2.1, authors: Ilya Kuprov