Dear Alps users,
I'm running a simulation with loop application and an 1D Chain of Heisenberg spins. I'm interested in the correlation study between two of these spins as a function of the temperature and the interaction parameters.
I need to run the simulation to 300 parameters (temperature + parameters) I really need to write in the parameter file 300 lines? Or is it possible to do it in another way?
After I ran the simulation the param.task*.out.xml files have different sizes:
. Files with 2.3 M:
<SCALAR_AVERAGE name="Energy^2"> <COUNT>1007616</COUNT> <MEAN method="jackknife">445.73115</MEAN> <ERROR converged="yes" method="jackknife">0.00979</ERROR> <VARIANCE method="simple">58.8</VARIANCE> <AUTOCORR method="jackknife">0.321</AUTOCORR> </SCALAR_AVERAGE>
. Files with 20 M
<SCALAR_AVERAGE name="Energy^2"> <COUNT>1004771</COUNT> <MEAN method="simple">444.9879</MEAN> <ERROR converged="yes" method="binning">0.0233</ERROR> <VARIANCE method="simple">292</VARIANCE> <AUTOCORR method="binning">0.43</AUTOCORR> <BINNED size="1"><COUNT>1004771</COUNT><MEAN method="simple">444.9879</MEAN><ERROR method="simple">0.017</ERROR></ BINNED> <BINNED size="2"><COUNT>502385</COUNT><MEAN method="simple">444.98789</MEAN><ERROR method="simple">0.0191</ ERROR></BINNED> <BINNED size="4"><COUNT>251192</COUNT><MEAN method="simple">444.98793</MEAN><ERROR method="simple">0.021</ERROR></ BINNED> <BINNED size="8"><COUNT>125596</COUNT><MEAN method="simple">444.98793</MEAN><ERROR method="simple">0.0222</ ERROR></BINNED> <BINNED size="16"><COUNT>62798</COUNT><MEAN method="simple">444.98793</MEAN><ERROR method="simple">0.0227</ ERROR></BINNED> <BINNED size="32"><COUNT>31399</COUNT><MEAN method="simple">444.98793</MEAN><ERROR method="simple">0.023</ERROR></ BINNED> <BINNED size="64"><COUNT>15699</COUNT><MEAN method="simple">444.98792</MEAN><ERROR method="simple">0.023</ERROR></ BINNED> <BINNED size="128"><COUNT>7849</COUNT><MEAN method="simple">444.98769</MEAN><ERROR method="simple">0.0232</ ERROR></BINNED> <BINNED size="256"><COUNT>3924</COUNT><MEAN method="simple">444.98744</MEAN><ERROR method="simple">0.0232</ ERROR></BINNED> <BINNED size="512"><COUNT>1962</COUNT><MEAN method="simple">444.98744</MEAN><ERROR method="simple">0.0232</ ERROR></BINNED> <BINNED size="1024"><COUNT>981</COUNT><MEAN method="simple">444.98744</MEAN><ERROR method="simple">0.0234</ ERROR></BINNED> <BINNED size="2048"><COUNT>490</COUNT><MEAN method="simple">444.98712</MEAN><ERROR method="simple">0.0234</ ERROR></BINNED> <BINNED size="4096"><COUNT>245</COUNT><MEAN method="simple">444.98712</MEAN><ERROR method="simple">0.0233</ ERROR></BINNED> </SCALAR_AVERAGE>
Is it normal to have these diversity of output? Can I choose any option to just have the first kind of files? Is there any way to select that I just want the correlation between two given spins?
The output of "Spin Correlations" is the average of the whole component: Sx_i Sx_j + Sy_i Sy_j + Sz_i Sz_j or just the Sz_i Sz_j ?
Thanks in advance for your kind support
João Lopes
Dear João Lopes,
Sorry for this late reply.
From: João Manuel Viana Parente Lopes jvianalopes@gmail.com Date: Tue, 23 Sep 2008 12:43:30 +0100
I need to run the simulation to 300 parameters (temperature + parameters) I really need to write in the parameter file 300 lines? Or is it possible to do it in another way?
No other ways currently.
After I ran the simulation the param.task*.out.xml files have different sizes: Is it normal to have these diversity of output? Can I choose any option to just have the first kind of files?
This depends on the number of 'runs' of each parameter set. You can specify '--Nmin=2' options to force multiple runs. It reduces the size of XML as a side-effect (but it approximately doubles the total amount of CPU time).
Is there any way to select that I just want the correlation between two given spins?
Currently No. But it is rather easy to modify looper/correlation.h to measure correlation between two specific spins. I could help you if you inform me the detail of your lattice and spin pairs on which you want to measure the correlation.
The output of "Spin Correlations" is the average of the whole component: Sx_i Sx_j + Sy_i Sy_j + Sz_i Sz_j or just the Sz_i Sz_j ?
Just the longitudinal correlations, Sz_i Sz_j. The transverse component is measured by "Green Function".
Best, Synge
Dear Synge Todo Thanks for your kind answer!
After I ran the simulation the param.task*.out.xml files have different sizes: Is it normal to have these diversity of output? Can I choose any option to just have the first kind of files?
This depends on the number of 'runs' of each parameter set. You can specify '--Nmin=2' options to force multiple runs. It reduces the size of XML as a side-effect (but it approximately doubles the total amount of CPU time).
I'm not sure if I understood your answer... For example I noticed that the difference between the param.task88.out.xml and param.task89.out.xml files generated are related with the method to calculate the error bars: - param.task88.out.xml (2.3M) uses <MEAN method="jackknife"> - param.task.89.out.xml (20M) uses <MEAN method="simple">
I don't understand why this difference... the only difference between two different param.task*.in.xml files is the temperature value... Could it be related to running with mpi? With the way that the parallelization is implemented? Can I choose the method to be used to calculate the error bars?
Is there any way to select that I just want the correlation between two given spins?
Currently No. But it is rather easy to modify looper/correlation.h to measure correlation between two specific spins. I could help you if you inform me the detail of your lattice and spin pairs on which you want to measure the correlation.
It's a very simple thing, I have a open lattice with with 50 1/2- spins that interact with the isotropic Heisenberg Hamiltonean. The only special issue is that the interaction constant is not uniform in the lattice. I am measuring the correlation between the spins in the boundaries ("Spin Correlations" type="VECTOR_AVERAGE" index="( 0 ) -- ( 49 )") .
Thanks for your time and help
The best João Lopes
Dear João,
From: João Manuel Viana Parente Lopes jvianalopes@gmail.com Date: Wed, 24 Sep 2008 12:32:08 +0100
I'm not sure if I understood your answer... For example I noticed that the difference between the param.task88.out.xml and param.task89.out.xml files generated are related with the method to calculate the error bars:
- param.task88.out.xml (2.3M) uses <MEAN method="jackknife">
- param.task.89.out.xml (20M) uses <MEAN method="simple">
I don't understand why this difference... the only difference between two different param.task*.in.xml files is the temperature value... Could it be related to running with mpi? With the way that the parallelization is implemented?
If you look at the log of your simulation carefully, you will find a line like
Adding 1 processes to simulation 88
which means the ALPS scheduler executed an additional run to fill the spare time. If a task has two or more runs, the overall errorbar will be calculated via jackknife and the binning information of each run will be dropped from the output XML file.
Can I choose the method to be used to calculate the error bars?
In both cases, the method is essentially the same (binning), but the output differs. Currently there's no way to prevent the scheduler from printing detailed binning information for tasks with only one run.
It's a very simple thing, I have a open lattice with with 50 1/2-spins that interact with the isotropic Heisenberg Hamiltonean. The only special issue is that the interaction constant is not uniform in the lattice. I am measuring the correlation between the spins in the boundaries ("Spin Correlations" type="VECTOR_AVERAGE" index="( 0 ) -- ( 49 )") .
Please try the attached patch for qmc/looper/looper/correlation.h together with an additional parameter:
MEASURE[Edge Correlation] = true
which calculate the spin correlation (Sz component) between two edge spins ("Edge Spin Correlation"). Please be aware that this estimator is based on the assumption that the edge spins have smallest (0) and largest (num_sites-1) site indices, respectively.
Best, Synge
*** qmc/looper/looper/correlation.h.orig Tue Jan 8 16:07:57 2008 --- qmc/looper/looper/correlation.h Thu Sep 25 11:44:27 2008 *************** *** 50,56 **** const typename lattice_t::real_graph_type, coordinate_type>::type coordinate_map_t;
! bool measure_correlation, measure_green_function, measure_structure_factor; bool improved; real_site_map_t real_site; --- 50,56 ---- const typename lattice_t::real_graph_type, coordinate_type>::type coordinate_map_t;
! bool measure_correlation, measure_edge_correlation, measure_green_function, measure_structure_factor; bool improved; real_site_map_t real_site; *************** *** 67,72 **** --- 67,74 ---- bool is_signed, bool use_improved_estimator) { measure_correlation = params.value_or_default("MEASURE[Correlations]", false); + measure_edge_correlation = + params.value_or_default("MEASURE[Edge Correlation]", false); measure_green_function = params.value_or_default("MEASURE[Green Function]", false); measure_structure_factor = *************** *** 116,121 **** --- 118,126 ---- if (measure_green_function) add_vector_obs(m, "Green's Function", label, is_signed); } + if (measure_edge_correlation) { + add_scalar_obs(m, "Edge Spin Correlation"); + }
if (measure_structure_factor) { coordinate = alps::get_or_default(coordinate_t(), lat.rg(), 0); *************** *** 204,209 **** --- 209,226 ---- } } } + if (measure_edge_correlation && improved) { + double ecorr = 0; + typename virtual_site_iterator<lattice_t>::type si0, si0_end; + for (boost::tie(si0, si0_end) = sites(lat, 0); si0 != si0_end; ++si0) { + typename virtual_site_iterator<lattice_t>::type si1, si1_end; + for (boost::tie(si1, si1_end) = sites(lat, num_sites(lat.rg())-1); si1 != si1_end; ++si1) { + if (fragments[*si0].id() == fragments[*si1].id()) + ecorr += (1-2*spins[*si0]) * (1-2*spins[*si1]); + } + } + m["Edge Spin Correlation"] << 0.25 * ecorr; + } }
template<typename M, typename OP> *************** *** 252,257 **** --- 269,285 ---- if (is_bipartite(lat)) m["Staggered Spin Correlations"] << scorr; } + if (measure_edge_correlation && !improved) { + double ecorr = 0; + typename virtual_site_iterator<lattice_t>::type si0, si0_end; + for (boost::tie(si0, si0_end) = sites(lat, 0); si0 != si0_end; ++si0) { + typename virtual_site_iterator<lattice_t>::type si1, si1_end; + for (boost::tie(si1, si1_end) = sites(lat, num_sites(lat.rg())-1); si1 != si1_end; ++si1) { + ecorr += (1-2*spins[*si0]) * (1-2*spins[*si1]); + } + } + m["Edge Spin Correlation"] << 0.25 * ecorr; + }
if (measure_structure_factor) { sfac = 0;
comp-phys-alps-users@lists.phys.ethz.ch