21 Dec
2012
21 Dec
'12
3:28 p.m.
A. Ok. Right. Thank you very much. Regards, Mateusz Lacki 2012/12/21 Matthias Troyer <troyer@phys.ethz.ch> > Why don't you try to load each file separately and catch exceptions? > > On Dec 21, 2012, at 3:08 PM, Mateusz Łącki <mateusz.lacki@gmail.com> > wrote: > > > Dear All > > I am using Worm to make some easy simulation with > > RESTRICT_MEASUREMENTS[N]=30 > > > > I understand that: > > > > If I set up the chemical potential correctly, then the MC algorithm > encounters enough trajectories with N=30 and > > the output files contain resuls averagen only over trajectories with > N=30 - approximation of the canonical ensemble. > > > > This is confirmed by user-experience and my weak recollecion of advide I > have received here about oen year ago. > > > > But if I set the chemical potential wrongly then the average number of > particles from the Grand canonical point of view is for example 45, and > there are not enough (maybe even 0) trajectories to sample with N=30. > > > > In this case the output files contain somethink that makes the following > python "result getter": > > > > ********************** get.py *********************** > > import pyalps > > import sys > > > > rf=pyalps.getResultFiles(prefix=sys.argv[1]) > > data = pyalps.loadMeasurements(rf) > > obl=pyalps.loadObservableList(rf) > > > > ******************************************************* > > > > behave rude: it says Floating point exception. and quits (even if only > one of let say 500 output files is corrupt). > > > > Of course adjusting the chemical pontential is the key, but this seems > to be complicated in a case where the phase diagram is complicated (I would > have to > > do some form of extrapolation or binary search to get the right mu). On > the other hand I see no other way to solve it. > > > > Another way to deal with that is to generate input files containing only > one set of input parameters - this way each datapoint has its own prefix. > It is not complicated, but somehow contrary to the idea behind the current > format of the input data. Morover it is likely to make a bookkeeping mess. > > > > I have two questions: > > 1. is there a way to read these "faulty", "undersampled" ouput files > without "Floating point exception." (I could then set up calculations for > let say 10 different values of mu an choose mu that gave the closes answer > - the simplest to code). > > 2. is there some easy way to make the MC autoadjust the chemical > potential ? > > > > > > Regards, > > Mateusz Lacki > >