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;