To use chroma to generate hadron spectroscopy you need a XML input
file which specifies what calculation you want to do and how you want
to do it. The input
file, hadspec.ini.xml, is a
basic, simple, example. You can download the file by right clicking
the mouse on the link and choosing the option "Save link target
as".
XML is easily viewed with a browser of the Mozilla family (using "open file" in the "File menu") - firefox/iceape/iceweasel/icecat: you can contract or expand the XML by clicking on the "+"'s or "-"'s, respectively, next to the tags (XML tags are explained below).
Chroma is designed so that the input files are modular and follow the structure of a lattice calculation. We will do the following:
Compute the meson and baryon spectrum for degenerate quarks using point sources and sinks and the Wilson fermion action. The conjugate gradient algorithm (CG) will be used for the inversions to generate the propagator.The steps necessary for this calculation are:
Step 3 is in fact unnecessary as point smearing leaves the propagator unchanged. However, chroma expects this step whether the smearing is trivial or more complicated. Note that since we are using degenerate quarks we only need to generate one propagator.
A configuration is required for this calculation. Initially, we will use a small test configuration of lattice size 4x4x4x8 with a gauge field close to free field. This configuration can be generated by chroma on the fly. How we specify this in the input file is described below. How to read in a previously generated configuration will be dealt with in section Modifying the input file.
Now let us look at the input
file, hadspec.ini.xml. We will
see that it contains the steps of the calculation above. The file
begins with the line,
<?xml version="1.0"?>
which just specifies that this is a file written in XML and states the XML version number. This line is not displayed if you view the file with a browser. What follows is the input information wrapped up in "tags". A tag is comprised of a name within a set of <> . The first tag we see is
<chroma>
Tags always come in pairs, a beginning tag, like the one shown above and an end tag, which is the same but with a / in front of the name. If you look at the end of the input file you will see the end tag.
</chroma>
Between the tags can be text, numbers etc or more tags, i.e. tags can be nested. However, any content must be enclosed within tags. The tags you can use and in what ordering are defined within chroma.
The next line illustrates the use of the annotation tag which allows you to add comments to your input file:
<annotation>Hadron spectrum input file.</annotation>
Next we have the "Param" tag, after which the inline measurements are defined.
<Param>
The inline measurements are the modules or tasks you need
for the calculation. Each measurement is enclosed by an
<elem>, </elem> pair. An inline measurement has
<Name></Name> tags),<Param> </Param>),<NamedObject>
</NamedObject>). Named objects are a way of referring to objects that are created by inline measurements while chroma is running and that are stored in memory.
The inline measurements in the input file, in order, are
MAKE_SOURCEPROPAGATORSINK_SMEARHADRON_SPECTRUMLet us look at the first inline measurement:
<elem>
<Name>MAKE_SOURCE</Name>
<Frequency>1</Frequency>
<Param>
<version>6</version>
<Source>
<version>2</version>
<SourceType>POINT_SOURCE</SourceType>
<j_decay>3</j_decay>
<t_srce>0 0 0 0</t_srce>
</Source>
</Param>
<NamedObject>
<gauge_id>default_gauge_field</gauge_id>
<source_id>pt_source</source_id>
</NamedObject>
</elem>
What do these tags mean?
<Frequency> <Frequency> tag then specifies how
often to perform the measurement. Here the frequency is set to 1 and the measurement is always performed.<Param>MAKE_SOURCE inline measurement are given within this tag.<version><Source> <SourceType> <j_decay><t_srce><NamedObject>default_gauge_field. The propagator source object produced by this
inline measurement is given the id pt_source.
Continuing through the rest of the input file, the three inline
measurements which follow have a similar structure to MAKE_SOURCE and
most tags are designed to be self explanatory.
<elem>
<Name>PROPAGATOR</Name>
<Frequency>1</Frequency>
<Param>
<version>10</version>
<quarkSpinType>FULL</quarkSpinType>
<obsvP>false</obsvP>
<FermionAction>
<FermAct>WILSON</FermAct>
<Kappa>0.11</Kappa>
<AnisoParam>
<anisoP>false</anisoP>
<t_dir>3</t_dir>
<xi_0>1.0</xi_0>
<nu>1.0</nu>
</AnisoParam>
<FermionBC>
<FermBC>SIMPLE_FERMBC</FermBC>
<boundary>1 1 1 -1</boundary>
</FermionBC>
</FermionAction>
<InvertParam>
<invType>CG_INVERTER</invType>
<RsdCG>1.0e-8</RsdCG>
<MaxCG>1000</MaxCG>
</InvertParam>
</Param>
<NamedObject>
<gauge_id>default_gauge_field</gauge_id>
<source_id>pt_source</source_id>
<prop_id>pt_src_prop</prop_id>
</NamedObject>
</elem>
<quarkSpinType>FULL)
or whether we use a non-relativistic projection onto the upper 2 components (use UPPER)
or the lower 2 components (use LOWER)<obsvP><FermionAction><AnisoParam>t_dir, (which has a different lattice
spacing compared to the spatial direction), the bare gauge anisotropy,
xi_0, and the fermion anisotropy nu. Since we have an isotropic lattice
the anisotropy, anisoP, is set to false and xi_0=nu=1.0. In our case
<AnisoParam> is redundant and in fact we could delete the XML
between (and including) <AnisoParam> </AnisoParam>. <FermionBC>SIMPLE_FERMBC) which are defined within an array using the <boundary> tag.
(1 1 1 -1) corresponds to anti-periodic BCs (in time), (1 1 1 1) to periodic and
(1 1 1 0) to Dirichlet BCs.<InvertParam><invType>
gives the type of inverter, here, conjugate gradient is used.
<RsdCG> specifies the residual for the inversion, while
<MaxCG> is the maximum number of iterations you want the
inverter to use before deciding to stop (i.e. failing to obtain convergence).<NamedObject>
<elem>
<Name>SINK_SMEAR</Name>
<Frequency>1</Frequency>
<Param>
<version>5</version>
<Sink>
<version>2</version>
<SinkType>POINT_SINK</SinkType>
<j_decay>3</j_decay>
</Sink>
</Param>
<NamedObject>
<gauge_id>default_gauge_field</gauge_id>
<prop_id>pt_src_prop</prop_id>
<smeared_prop_id>pt_src_pt_sink_prop</smeared_prop_id>
</NamedObject>
</elem>
The tags for SINK_SMEAR are very similar
to MAKE_SOURCE. Remember that this inline measurement is
required by chroma before passing the propagator
to HADRON_SPECTRUM even if it is a trivial step.
<elem>
<Name>HADRON_SPECTRUM</Name>
<Frequency>1</Frequency>
<Param>
<version>1</version>
<MesonP>true</MesonP>
<CurrentP>true</CurrentP>
<BaryonP>true</BaryonP>
<time_rev>false</time_rev>
<mom2_max>3</mom2_max>
<avg_equiv_mom>true</avg_equiv_mom>
</Param>
<NamedObject>
<gauge_id>default_gauge_field</gauge_id>
<sink_pairs>
<elem>
<first_id>pt_src_pt_sink_prop</first_id>
<second_id>pt_src_pt_sink_prop</second_id>
</elem>
</sink_pairs>
</NamedObject>
<xml_file>hadspec.dat.xml</xml_file>
</elem>
<MesonP>,<CurrentP>,<BaryonP>true for
<CurrentP> these correlators will only be calculated if you have
point smearing for the sink.<time_rev><time_rev> to true. <mom2_max>, <avg_equiv_mom><mom2_max>. Correlators with equivalent momenta will be averaged if
<avg_equiv_mom> is set to true. <sink_pairs><elem></elem> tags. In our
example file only one combination is given. For each combination two
propagators are expected, specified in the <first_id> and
<second_id> (for HADRON_SPECTRUM the
baryons are of the type q1q1q2). In
our case all the quarks have the same mass and so we give
the same propagator id in both cases.<xml_file>We are now almost at the end of the input file. There are just a few comments to make before we run chroma.
</InlineMeasurements> <annotation>Lattice dimensions.</annotation> <nrow>4 4 4 8</nrow> </Param> <annotation>Configuration file information.</annotation> <Cfg> <cfg_type>WEAK_FIELD</cfg_type> <cfg_file>dummy</cfg_file> </Cfg> </chroma>
The list of inline measurements is complete so the end tag
</InlineMeasurements> is used. The dimensions of the lattice
are now defined and then the end </Param> tag is needed. Finally, the
configuration is specified. As mentioned above we are using a
configuration which will be generated by chroma itself, which is close
to a free field. We specify this using the key WEAK_FIELD in the
<cfg_type> tag. As we don't need to read in a configuration any
name can be put within the tags <cfg_file></cfg_file>.