XML format

General notes

The latest versions of CoSMo code use xml format for most input and output. XML is an ideal human and machine-readable language for storing and interchanging data. XML files are regular ascii files that can be open with any text editor, users may also program their own style files and display results using web browsers.  Most CoSMo programs read and write data into xml file; thus the resulting xml file contains full information about the system. Below is an example of cosmo file

<cosmo>
<!-- This valence space tag is required, defines valence space -->
<!-- n,l,j are quantum number of an orbital, type=n, p, or pn-->
<!-- index is used to identify this orbital in int file -->
<valencespace name="f7">
        <orbital name="0f7" n="0" l="3" j="7/2" type="pn" index="1"/>
</valencespace>
<!-- Interaction Hamiltonian  -->
<hamiltonian name="f7p" valencespace="f7">
        <file format="ascii">
                <name>f7example.int</name>
        </file>
        <comment>Example interaction</comment>
</hamiltonian>
<!-- System identified by particle number Av (valence), and quantum numbers P, Tz, Jz  -->
<system name="51V" Av="3" Tz="3/2" P="-" Jz="1/2">
</system>
</cosmo>

The xml format has tags and attributes. For example tag  <hamiltonian> ... </hamiltonian> defines everything related to the Hamiltonian of the system. Attribute such as name in  <hamiltonian name="f7p" valencespace="f7"> names the hamiltoinan. The comments are shown in small fonts and are placed between  <!-- ... --> in xml standard. 

Generally, tags and attributes can appear in any order, and codes read only what is needed for a particular task. Thus, programs used to make many-body states (configurations) would not read anything in <hamiltonian> tag; moreover in the above example computer will not read attribute "n" in the <orbital> tag, since main quantum number is irrelevant for making basis states. 

<valencespace>

The valence space is defined under this tag, it contains a list of orbit tags end each orbit contains various attributes. Orbits can be proton, neutron, or proton-neutron. 

<hamiltonian>

The hamiltonian is defined under this tag, here the system is instructed to read file f7example.int. This file should be in current directory or in path defined by environment variable SMINTPATH. Here is example 

! Example interaction
4 -9.827
1 1 1 1 0 1 -2.033
1 1 1 1 2 1 -0.587
1 1 1 1 4 1 0.443
1 1 1 1 6 1 0.887

In this example the interaction file is of OXBASH format, comments start with "!" mark, first read line starts with number of two-body matrix elements (here 4) followd by the single-particle energy (here  -9.827). Note if number of two-body matrix elements is shown as negative then scaling of two-body matrix elements is used which is also defined in the first line. The two body matrix elements are each defined by a line  "id1 id2, id3 id4 J T value" where id is the orbit index (index attribute in <orbit> tag of <valencespace>).  

<system>

This tag identifies the actual system to be studied. The systme implies particular projections Jz and Tz and fixed parity. There could be several systems in the same xml file (commonly one cound do different parities or different Jz). In this example we request system with Av=3 (three valence particles) of net isospin projection 3/2 and spin projection 1/2, the parity is negative.

 Most ouput is also stored under <system> tag. For the example above if one creates many-body states (run Xsysmbs,...), creates Hamiltonian (run XHH+JJ,...), diagonalizes (davidson_file ...) it and examines eigenstates (XSHLJT) the codes will modify the <system> tag in the above xml to look like:

<system name="51V" Av="3" Tz="3/2" P="-" Jz="1/2">
                <ManyBodyStates name="51V.mbs" size="6" creator="MakeMBS2"/>
                <matrix name="51V.HH" format="pp"/>
                <state J="7/2" P="-" T="3/2" E="-29.9572" dE="0" name="7/2-(1)" Ex="0">
                        <wavefunction Jz="1/2" Tz="3/2" file="51V.HH.EE" id="0"/>
                </state>
                <state J="5/2" P="-" T="3/2" E="-29.6031" dE="0" name="5/2-(1)" Ex="0.3541">
                        <wavefunction Jz="1/2" Tz="3/2" file="51V.HH.EE" id="1"/>
                </state>
                <state J="3/2" P="-" T="3/2" E="-28.8141" dE="0" name="3/2-(1)" Ex="1.1431">
                        <wavefunction Jz="1/2" Tz="3/2" file="51V.HH.EE" id="2"/>
                </state>
                <state J="11/2" P="-" T="3/2" E="-28.3107" dE="0" name="11/2-(1)" Ex="1.6465">
                        <wavefunction Jz="1/2" Tz="3/2" file="51V.HH.EE" id="3"/>
                </state>
                <state J="9/2" P="-" T="3/2" E="-28.1412" dE="0" name="9/2-(1)" Ex="1.816">
                        <wavefunction Jz="1/2" Tz="3/2" file="51V.HH.EE" id="4"/>
                </state>
                <state J="15/2" P="-" T="3/2" E="-27.1227" dE="0" name="15/2-(1)" Ex="2.8345">
                        <wavefunction Jz="1/2" Tz="3/2" file="51V.HH.EE" id="5"/>
                </state>
        </system>

 

<system><rejections>

Often one would like to place various additional limits on many-body configurations being created (stored in .mbs file). CoSMo package has various ways and programs to do that. The simples approach is using <rejections> tag which is read by Xsysmbs code. 

Suppose we would like to do the same problem of 51V in the extended space 

<valencespace name="d3f7">
                <core name="32S" N="16" Z="16"/>
                <orbital name="0d3" n="0" l="2" j="3/2" type="pn" index="1"/>
                <orbital name="0f7" n="0" l="3" j="7/2" type="pn" index="2"/>
                <outercore name="56Ni" N="28" Z="28"/>
        </valencespace>

Here, in order to repreoduce previous results one would need to force d3/2 orbit to be completely occupied with 8 nucleons. This can be done with the following <rejection> tag in <system>

<rejection NMIN="8" NMAX="8">
                        <orbital name="0d3" n="0" l="2" j="3/2" index="1" type="pn"/>
                </rejection>

This tag requires system to keep only those configurations where d3/2 orbit has minimum 8 and maximum 8 nucleons, everything else is rejected.

Equivalently one could have two rejections for protons and neutrons separately

<rejection NMIN="4" NMAX="4">
                        <orbital name="0d3" n="0" l="2" j="3/2" index="1" type="p"/>
                </rejection>
<rejection NMIN="4" NMAX="4">
                        <orbital name="0d3" n="0" l="2" j="3/2" index="1" type="n"/>
                </rejection>

Or one could also require f7/2 orbit to have exactly 3 nucleons

<rejection NMIN="3" NMAX="3">
                       <orbital name="0f7" n="0" l="3" j="7/2" type="pn" index="2"/>
                </rejection>

Published on  July 27th, 2015