<div dir="ltr"><div><div>Dear Users,<br><br></div>Recently, I started using ALPS for Classical Monte Carlo with Python interface. I would like to do calculations for square-lattice with 1st (vertical), 2nd (horizantal) and 3rd (diagonal) nearest neighbours interactions J0, J1, J2. For the I have created a square-lattice.xml for 4x4 lattice. <br><br>If I run the code in jupyter notebook, i am getting following error:<br><br>parsing task files ... <br>could not find graph/lattice specified in parameters: name was: 'Square_lattice'<br><br></div><div>Please help me to find the error (I mean the xmal file written properly?), Do I need to do before I have to use my own xml file?<br></div><div><br></div>My code is as follows:<br>--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>import pyalps<br>import matplotlib.pyplot as plt<br>import pyalps.plot<br><br>parms = []<br>for l in [16]: <br>    for t in [1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 11, 12, 13, 14, 15]:<br>        parms.append(<br>            { <br>             'LATTICE_LIBRARY' : "./Square-lattice.xml",<br>              'LATTICE'        : "Square_lattice",                 <br>              'T'              : t,<br>              'S'              : 2.62,<br>              'J0'              : 0.52 ,<br>              'J1'              : -0.09 , <br>              'J2'              : 0.86 ,                 <br>              'THERMALIZATION' : 1000,<br>              'SWEEPS'         : 400000,<br>              'UPDATE'         : "local",<br>              'MODEL'          : "Ising",<br>              'L'              : l<br>            }<br>    )<br><br>input_file = pyalps.writeInputFiles('Square_isg',parms)<br>pyalps.runApplication('spinmc',input_file,Tmin=10)<br>pyalps.evaluateSpinMC(pyalps.getResultFiles(prefix='Square_isg'))<br>data = pyalps.loadMeasurements(pyalps.getResultFiles(prefix='Square_isg'),['|Magnetization|', 'Specific Heat'])<br>magnetization_abs = pyalps.collectXY(data,x='T',y='|Magnetization|',foreach=['L'])<br>spec_heat = pyalps.collectXY(data,x='T',y='Specific Heat',foreach=['L'])<br><br>#make plots<br>plt.figure()<br>pyalps.plot.plot(magnetization_abs)<br>plt.xlabel('Temperature $T$')<br>plt.ylabel('Magnetization $|m|$')<br>plt.legend()<br>plt.title('2D Ising model')<br><br>plt.figure()<br>pyalps.plot.plot(spec_heat)<br>plt.xlabel('Temperature $T$')<br>plt.ylabel('Specific Heat $c_v$')<br>plt.legend()<br>plt.title('2D Ising model')<br>plt.show()<br><div>------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br></div><div>my xml file is below:<br>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br><LATTICES><br><br><LATTICE name="Square_lattice" dimension="2"><br>  <PARAMETER name="a" default="1"/><br>  <PARAMETER name="b" default="1"/><br>  <BASIS><br>    <VECTOR>a   0</VECTOR><br>    <VECTOR>0   b</VECTOR><br>  </BASIS><br>  <RECIPROCALBASIS><br>    <VECTOR>2*pi/a 0</VECTOR><br>    <VECTOR>0 2*pi/b</VECTOR><br>  </RECIPROCALBASIS><br></LATTICE><br><br><UNITCELL name="simple2d" dimension="2" vertices = "4"><br> <VERTEX><COORDINATE>  0.0 0.0</COORDINATE></VERTEX><br>  <VERTEX><COORDINATE> 0.5 0.0</COORDINATE></VERTEX><br> <VERTEX><COORDINATE>  0.0 0.5</COORDINATE></VERTEX><br>  <VERTEX><COORDINATE> 0.5 0.5</COORDINATE></VERTEX><br><br>  <EDGE type="0"><SOURCE vertex="1" offset="0 0"/><TARGET vertex="2" offset="0.5 0"/></EDGE><br>  <EDGE type="1"><SOURCE vertex="1" offset="0 0"/><TARGET vertex="3" offset="0 0.5"/></EDGE><br>  <EDGE type="2"><SOURCE vertex="1" offset="0 0"/><TARGET vertex="4" offset="0.5 0.5"/></EDGE><br></UNITCELL><br><br><LATTICEGRAPH name = "Square_lattice 4x4" ><br>  <FINITELATTICE><br>    <LATTICE ref="Square_lattice"/><br>    <EXTENT dimension="1" size="4"/><br>    <EXTENT dimension="2" size="4"/><br>    <BOUNDARY type="periodic"/><br>  </FINITELATTICE><br>  <UNITCELL ref="simple2d"/><br></LATTICEGRAPH><br><br></LATTICES><br>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br clear="all"></div><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br>Thank you in advance<br>Dr. Bheema Lingam Chittari<br>Post Doctoral Researcher,<br>Room No:14-115,<br>Department of Physics, <br>University of Seoul,<br></div><div>163 Seoulsiripdae-ro,<br></div><div>Dongdumen-gu,<br></div>Seoul, South Korea</div></div></div></div></div></div></div></div>
</div></div></div></div>