diff --git a/org/qmckl_sherman_morrison_woodbury.org b/org/qmckl_sherman_morrison_woodbury.org index 6fb9db0..1732fa1 100644 --- a/org/qmckl_sherman_morrison_woodbury.org +++ b/org/qmckl_sherman_morrison_woodbury.org @@ -243,7 +243,7 @@ const double Updates1[21] = {-0.0068946573883295389, -0.024496730417013196, -0.2 const double Slater1[441] = {-2.8945870399475102, 3.5455725193023699, 2.0470812320709202, -3.5464441776275599, -2.0474903583526598, -2.89596366882324, -0.61329728364944502, 0.70991641283035301, 0.45664468407630898, 0.59523195028305098, 0.26079276204109197, -0.027727147564291999, -0.35093706846237199, -0.095610238611698206, -0.130077064037323, 0.10946778208017301, 0.021800471469759899, 0.048480678349733401, -0.092234551906585693, -0.0160505045205355, 0.0065372241660952603, -0.78021097183227495, -0.95558542013168302, -0.55174458026885997, -0.95579683780670199, -0.55179446935653698, 0.78044348955154397, -0.115299895405769, -0.11754634231329, -0.0318448171019554, -0.00082233443390577999, 0.064001239836216001, 0.12740932404995001, -0.049412809312343597, -0.074464745819568606, 0.19851659238338501, -0.088878795504569993, 0.135610401630402, -0.13736967742443101, -0.101879440248013, 0.102390937507153, 0.061368178576231003, -0.00527230883017182, 0.00029381641070358499, 0.0072919740341603799, -0.00026352208806201799, 0.0068838247098028703, 0.0047294595278799499, 0.11728889495134399, -0.062190085649490398, -0.15969239175319699, -0.10645916312933, 0.112943567335606, -0.0015487050404772199, -0.045737843960523598, 0.13196058571338701, 0.038660705089569099, -0.050266433507204097, -0.13745591044426, -0.037740666419267703, 0.11781705915927899, 0.19417031109332999, -0.0186148826032877, -0.30874741077423101, -0.37815779447555498, 0.218254208564758, 0.378139227628708, -0.21839827299118, -0.30879178643226601, 0.025539221242070202, 0.112043909728527, 0.037676706910133403, 0.025347150862216901, -0.19991625845432301, 0.14163509011268599, 0.13326919078826899, 0.213842943310738, 0.131471157073975, 0.14626120030879999, -0.0118067460134625, 0.093547157943248693, 0.22439678013324699, 0.0082425400614738499, -0.00068585784174501896, -1.52881526947021, -1.9163775505148799e-05, -2.1623263359069802, -1.5540548702119799e-05, 2.16284847259521, -1.52953028678894, -0.26402890682220498, 0.024944067001342801, -0.37140902876853898, -0.044071510434150703, -0.29843890666961698, -0.043834518641233403, -0.177285701036453, -0.058585006743669503, -0.0183692276477814, -0.026075478643178902, -0.15623773634433699, -0.011319605633616401, 0.054057534784078598, -0.23151709139347099, 0.10071966797113401, -0.067333526909351293, 0.00043256155913695698, 0.095035225152969402, -0.00043632232700474598, 0.094624765217304202, 0.066768139600753798, 0.14448715746402699, -0.12090456485748299, -0.203432962298393, -0.21472349762916601, 0.154288679361343, 0.017385326325893399, -0.071518480777740506, 0.27918133139610302, 0.080454014241695404, -0.0361245274543762, 0.0566458702087402, -0.030157707631588, 0.25150132179260298, -0.082445412874221802, -0.017144737765192999, -2.2779068946838401, -2.3393469746224599e-05, -3.2218937873840301, -1.7939200915861899e-05, 3.22278833389282, -2.2791447639465301, -0.47945570945739702, 0.045197278261184699, -0.64478874206543002, -0.080234304070472703, -0.47389149665832497, 0.024908870458602898, -0.23455648124218001, -0.10695217549800901, -0.033054649829864502, -0.195749551057816, -0.040076982229948002, 0.094596333801746396, 0.098401188850402804, -0.059563819319009802, 0.028169330209493599, -0.0025739683769643298, -0.0020174346864223502, -0.0024467820767313199, -0.00204527890309691, 0.00013988610589876801, 0.00073755031917244196, 0.17339251935482, 0.099962860345840496, 0.14622049033641801, -0.088966980576515198, 0.040044382214546197, -0.14437201619148299, -1.5416861060657501e-05, -0.081159926950931494, -0.11909016221761699, 0.170753449201584, 0.031124599277973199, -0.052109345793724102, 0.121445283293724, 0.0289684906601906, 0.0189813487231731, -0.0043673445470631097, -0.00014539182302542001, 0.0061219600029289696, 0.000189467871678062, 0.0060523007996380303, 0.00425094133242965, 0.0905451029539108, 0.058540407568216303, -0.15191346406936601, 0.11511342227459, 0.15016922354698201, 0.10024280846118901, -0.11066282540559801, -0.15089659392833699, -0.021995550021529201, 0.10021472722291901, 0.019932290539145501, 0.070281185209751101, -0.120184391736984, -0.030551897361874601, -0.023023990914225599, -0.0097634727135300602, 0.0119331693276763, -0.0068263513967394803, 0.011701960116624799, -0.0068089049309492103, 0.0095072658732533507, 0.133816182613373, -0.15090283751487699, 0.070243604481220204, 0.077758952975273105, -0.071993313729763003, -0.0526336021721363, -0.033549431711435297, -0.029018172994255999, 0.10475520789623299, 0.047332767397165298, 0.17077720165252699, 0.057527918368577999, -0.043988067656755399, 0.11077278107404701, -0.0581490993499756, -0.71565270423889205, 2.80283820757177e-05, 1.0121610164642301, -2.41986454057042e-05, 1.0123220682144201, 0.71586799621581998, -0.045286595821380601, -0.0269623268395662, 0.0683262273669243, -0.047560662031173699, -0.062597043812274905, -0.0278066452592611, 0.045772761106491103, 0.063010454177856404, 0.0197743345052004, -0.025724532082676901, -0.20542661845684099, -0.0248414911329746, 0.058127623051405002, 0.30385830998420699, 0.12407322973012901, -0.00073456991231069001, 0.000104061764432117, -0.0010063005611300501, 0.00014142321015242501, 0.00095045292982831597, -0.00064003589795902404, 0.056538689881563201, -0.038196403533220298, 0.095246985554695102, 0.077704243361949907, 0.089713566005229894, 0.071932643651962294, 0.058404259383678402, 0.097089007496833801, -1.8242251826450202e-05, -0.070699930191039997, 0.0231548044830561, 0.036239527165889698, -0.064700096845626803, 0.035663921386003501, -0.0192963760346174, -0.0285779368132353, 2.2119384368579599e-07, -0.0404084548354149, 4.62594880445977e-06, 0.040473498404025997, -0.028664523735642398, 0.0818745791912079, -0.0072916029021143896, 0.171691119670868, 0.0142411412671208, 0.227563425898552, 0.20764905214309701, 0.23875248432159399, 0.019401129335165, 0.0041248365305364097, -0.273390233516693, 0.031942136585712398, 0.24207504093647, -0.016599044203758202, 0.0499182641506195, -0.067969180643558502, -0.083720728754997295, -0.102523192763329, -0.059237916022539097, -0.10253403335809699, -0.0591498985886574, 0.083691440522670704, 0.093738317489623996, 0.118414394557476, 0.119053602218628, -0.19025875627994501, -0.017257452011108398, 0.111288614571095, -0.14737996459007299, -0.106449924409389, 0.119639433920383, -0.0358475148677826, 0.16083629429340399, -0.135845571756363, -0.045223556458950001, 0.129632458090782, 0.134273305535316, -0.0016409500967711199, 0.0020083498675376199, 0.0011536112288013101, -0.0019761291332542901, -0.0011378186754882301, -0.0015965295024216199, 0.062009602785110501, -0.085591755807399694, -0.073869466781616197, -0.129948750138283, -0.025633471086621298, 0.092304252088069902, 0.11476875841617599, 0.0570255033671856, -0.098354063928127303, 0.048130486160516697, -0.075562968850135803, -0.087558984756469699, -0.061446368694305399, 0.073952160775661496, -0.16332066059112499, -0.086937576532363905, -5.2227896958356703e-05, -0.12295132130384399, -5.67086790397298e-05, 0.122932203114033, -0.086922481656074496, 0.092386581003665896, 0.0563923679292202, 0.16267444193363201, -0.103307262063026, 0.177027583122253, 0.119934171438217, 0.15235325694084201, -0.13730293512344399, -0.036718469113111503, -0.13380806148052199, -0.14056211709976199, 0.11525499820709199, 0.122316166758537, -0.211628392338753, 0.13097538053989399, -0.71328485012054399, -0.87364697456359897, -0.50431287288665805, -0.87368428707122803, -0.50450080633163497, 0.71341556310653698, -0.0728774294257164, -0.0137394573539495, -0.131415024399757, 0.120499663054943, -0.15048809349536901, 0.067258194088935894, -0.016238121315836899, 0.25341770052909901, 0.061544414609670597, -0.124150305986404, -0.023104058578610399, 0.161576017737389, -0.18417926132678999, -0.016373874619603199, -0.0025253379717469198, -0.00358590018004179, -3.1569013572152501e-06, 0.00505110481753945, -1.33700987134944e-05, 0.0050756097771227403, 0.0036168387159705201, 0.076649472117423997, -0.0148532707244158, -0.15424914658069599, -0.031277053058147403, 0.20174449682235701, 0.17827098071575201, -0.21435502171516399, 0.043405968695879003, 0.0060502337291836704, 0.23922684788703899, 0.022777535021305102, 0.22072769701480899, 0.035028267651796299, -0.037091828882694203, -0.088090680539608002, -0.0137155568227172, -0.00072690693195909305, 0.019026592373848, 0.00073597067967057196, 0.018235495314001999, 0.012611641548574, 0.14907942712307001, 0.10721461474895499, -0.205590710043907, 0.18899101018905601, 0.14405034482479101, 0.0080890702083706908, -0.049517802894115399, -0.23817741870880099, -0.062822751700878102, -0.056222390383482, 0.079762905836105305, -0.057780988514423398, -0.208331778645515, -0.11229432374239, 0.015691248700022701, -0.13207408785819999, -0.00012266315752640399, -0.18668732047080999, -0.000116608949610963, 0.18647037446498901, -0.13181127607822399, 0.17992316186428101, 0.0310163982212543, 0.194987177848816, -0.051282022148370701, 0.079243704676628099, -0.16229276359081299, -0.029616238549351699, -0.065854735672473894, -0.025143278762698201, 0.277732163667679, -0.117880158126354, -0.184251189231873, 0.0632317289710045, -0.16761179268360099, 0.0069939070381224199, -0.0068073021247982996, -0.0083365431055426598, 0.0048150913789868398, 0.0083073899149894697, -0.0047997133806347804, -0.0067770029418170504, 0.077614806592464405, 0.12953585386276201, -0.063416801393032102, 0.138088583946228, -0.10224375873804099, 0.130568191409111, 0.164952263236046, 0.026345754042267799, 0.13718618452549, 0.084768116474151597, 0.096043966710567502, -0.054612904787063599, 0.138456135988235, -0.071488708257675199, 0.070078171789646093}; double Slater_inv1[441] = {-0.0525082963130096, -192.960477122746, -167.343357271998, 1.69063377058866, -1378.4882402189, 239.360652372684, 874.40192183061697, -513.31846478968203, 807.35483045933495, -19.026422090297299, -17.824591748935202, 165.6645926386, -332.909289060628, -18.6107453916377, -11.6439930601979, 317.18559450822198, 214.12532640356201, -430.80943299473, -344.65005510575799, 740.81014093255203, -84.923325284754696, 0.064335245989650805, 234.71397330210399, 205.1186636226, -3.4153770027768502, 1680.13890084581, -293.40065007215702, -1065.8419078679401, 624.86259814866003, -989.76729197131897, 23.298249286417001, 21.573213707404399, -202.41174445438401, 405.86421806904502, 22.922945938042901, 14.236362125535999, -386.65825218682801, -261.06337565261498, 528.20337075570103, 421.94063881187702, -902.75507799084596, 105.03985525163, 0.044200668381308601, -138.85152101714399, -121.27002019292, 2.0061662585667599, -992.69022926063894, 173.24384564131401, 629.63518796071799, -369.68832373377103, 582.99742710801104, -13.474468953452901, -12.4187314531643, 119.002229516372, -239.76386110607999, -13.4968690647037, -8.1499663302329708, 228.499936475189, 154.09732894897101, -311.21651724011002, -248.26815844269399, 533.37480106787098, -61.991136485706697, -0.0765497914729725, 240.772681546397, 209.115172008988, -2.12401058528051, 1722.15420882834, -299.07379390801702, -1092.4670851015201, 641.09661184520598, -1007.44097957056, 23.333413806919001, 21.9897514440317, -206.53257016044699, 415.81861108697302, 23.3743606050752, 14.107639254523001, -396.52477956346598, -267.77854087146301, 537.68662188870303, 429.83533323670702, -925.65731644586003, 106.070284414301, -0.037109975520249097, -136.738457148886, -118.917063549582, 1.19704609156923, -977.22998951029899, 169.63000196416201, 620.01253859081601, -364.02043006288699, 570.85982682561803, -13.451266756380299, -12.146454471873501, 117.435790064483, -235.687342903548, -13.183975346097, -8.2288378293500593, 224.66974233421601, 151.73703725446899, -304.613662218336, -243.40661913323399, 525.55077671846004, -60.142862384234697, -0.062476778936209301, 195.74640208908301, 170.54051550313201, -2.8328765312753998, 1399.12576024585, -244.28628529648901, -887.63077081451104, 520.884480704167, -823.92607500410702, 19.0479002693959, 18.195743596123101, -168.030291787452, 337.586201042798, 18.991146825575299, 11.5224539224244, -321.78784999564101, -217.23371709456501, 439.82292557372398, 351.28300986264401, -752.091241883468, 87.457548717202599, 4.3572379528639997e-05, -23.790404094575401, -19.504220922406098, 0.26595531593048999, -161.34910319146201, 30.163156787264001, 102.337776116854, -58.672051676794297, 103.227708063905, -0.22802366652163999, -2.2306129106953398, 21.778747237132102, -40.783330246607299, -1.38732280869919, -0.75357165711863805, 39.269880423319599, 26.312297182321299, -55.061514171221297, -43.569942636118199, 85.973367077774896, -10.016061028885201, 4.0427159001010801e-05, 28.392374743152502, 26.373254860492299, -0.36980926031100297, 209.22398819265001, -37.9473984838014, -132.76472733653301, 77.720615205630693, -127.924723556082, 0.29745864731730998, 2.7793514223195599, -29.019189334306802, 53.826499495808498, 4.2582570650914597, 0.51526747227423098, -50.914050124737102, -31.724328055085401, 68.0683646567051, 55.266627392249198, -110.63482872154501, 14.1152956761065, 0.00055720168222872903, -2.6345228739497299, -3.4087974363069198, 0.048641237778327802, -18.3623844122964, 3.8195276251277801, 11.6411523542838, -5.8812824661877396, 15.735088038012799, -0.058858662594294599, -0.23845780430312999, 6.5124119812799099, -6.1494099868393697, 0.340564236694477, -0.880332042883611, 5.7252222161672197, 2.8545094725865199, -8.3447036743893506, -8.0497901808946395, 9.3503553819376606, -1.76541796469797, 0.00098753020434672305, -4.6360828892267198, -4.7638931470942598, 0.052453544062221497, -34.4916331053766, 7.7511206271403301, 21.997597399118899, -10.6934789694381, 32.345600850876203, -0.10706305963427901, -0.54284354835464799, 12.037079682564, -12.6961140374279, -1.7388931639227301, -1.8407110220006899, 10.3197626100112, 5.2986332905796001, -16.735105713526099, -14.146077371772099, 15.8344011098352, -1.6714914906603899, -4.8622590537520702e-05, 21.991930004831101, 18.4929481874854, -0.23309077760739899, 151.30678790823001, -25.711826077506299, -96.044580982176896, 55.801793853982701, -88.373121372798394, 0.202838254384864, 1.86718437434255, -20.278044655055201, 40.151563308198597, 1.3977678891012399, 0.324629892441265, -37.6766500842932, -24.340233848932201, 47.6840523743628, 38.2032083073968, -79.164159949210401, 8.7548536140586801, -0.00061993571816668601, -0.395895385274183, -1.4644468265008701, -0.0046318612148825598, -4.9913109472233304, 1.48540197873744, 3.26672618350988, -0.95752411931703396, 8.9569370743490193, -0.062041348029879102, -0.080157437015122804, 8.0102582504767295, -5.9688675669055504, 0.67530938859376199, 1.27437097858607, 5.0084164430027203, 0.35632315612076498, -3.3504197552733501, -4.6662276852701501, -0.607157596121083, 0.48644342530280699, -0.00097211385626449695, 4.8383102174293198, 5.4067550135312503, -0.10295717451613901, 29.4184191533957, -9.4450875338250793, -18.800441303291901, 8.5840933132932609, -37.118301659976296, 0.106267952523929, 0.66461896188866798, -11.4398182377096, 13.0631130369628, -0.68992479801260798, 1.9745973431694701, -10.3210596342876, -5.2304303953711804, 18.385374172705902, 17.020178998151501, -12.315621520081001, 3.7778248703987298, -0.00031338187670125201, 12.870239622711001, 12.0022872209785, -0.16605346741786001, 96.046941246958397, -16.9389614709639, -60.935799758442698, 35.1352737141356, -61.591085318216102, 0.111297136966112, 1.23095348877198, -10.067914675180299, 24.0397569908422, 1.55026659084186, 0.71351574089035996, -23.902604464805101, -14.335678342218401, 32.573495764200203, 25.978026199263301, -50.506323253986302, 6.2999821545807402, 0.00078010309855064104, -5.4500389454791298, -2.8881970061941198, 0.034137151949219097, -36.693158530832299, 5.3229408635849698, 23.065511761726999, -18.654750377009499, 16.655427409154399, 0.0120347437456702, -0.40190064848770302, -4.3952667136196499, -3.2283315530947299, 0.535114819933451, -1.6695636399303999, 4.8387109899640901, 5.9387464984757097, -9.2525260067921593, -7.0534068376986703, 24.6079478080533, -1.24249543569277, -0.00048592251459139902, 2.8352295963632699, 2.97576788056818, -0.061903426111554402, 15.662499828725799, -6.3594611155842697, -10.0297611955082, 4.4512302388898801, -22.9014624835775, 0.0522795583755256, 0.46237084970893699, -5.9599628993498204, 6.3134697655201197, -0.35523986461548501, 1.1938822885348901, -6.1222818696018599, -3.0697099757554498, 13.1385066502153, 10.0165667609847, -5.6534055293581504, 2.2982459946613698, 5.71641932114923e-05, -1.95937881355126, -3.1686710464991501, 0.0078900256254279908, -20.7802266137845, 1.9052049215289899, 13.243728372567, -7.2010122960325198, -1.78569599703996, -0.0023099999984344298, -0.181452511231602, 1.49235850994062, -3.4781928086271598, -0.25097197027097001, 0.034267435208927201, 2.9589361689912899, 2.1880246525605398, 0.40946783452396801, 1.85119165819145, 10.9769363093921, -0.49737197226351498, 0.00057014015696656801, -11.992703942957201, -9.1707599397024797, 0.13131957021746299, -80.913738884742898, 12.2802670275716, 51.275110674413497, -30.8846663544597, 40.768216707846101, -0.056350552707040001, -0.906909874969271, 4.5662724440002496, -16.493313057723601, -1.3954832548549501, -1.1309540462973, 17.671878079289101, 13.348292143643, -21.057182826114602, -17.2839203520208, 44.417018731905799, -5.1700529859646398, 0.00070585484241785499, -3.84393110623766, -3.8217546887026601, 0.042692631956155899, -33.103657623136797, 7.29987823117549, 21.1351246026951, -8.9046379168685696, 25.840620537279499, -0.077726091155589205, -0.51813471867742, 9.6014602253082906, -12.721891663249099, -1.51539376366047, -1.54216689848713, 11.448584843886, 4.4017938077693604, -13.490798207962101, -12.3088359993453, 13.904387711973399, -1.27899798343336, -4.8529590100271397e-05, 1.5144453784960501, 2.3396824932439499, -0.0087660084169081508, 9.4873136503254205, -1.65331055509645, -5.9367044032646401, 5.0146643904078898, -0.269092370588084, 0.0089905796176170498, 0.14805840549764701, -0.89101366694270501, 3.0317998491567302, 0.22142707740346401, 0.0064304970181167601, -3.4235077646052301, -1.69328028781498, 0.48844632252065601, -0.57157344288643996, -5.8659323559885497, 0.45402791645044299, 3.1177001030445297e-05, -2.4386266852651501, -0.31040563209251798, 0.0039504037521311498, -21.849203607580201, -0.45787097219896, 13.8161508224212, -9.4311122174081508, -5.4786114733527702, -0.0069717560537701602, 0.0049075772339915403, 1.65968311111433, -4.9313027452898597, -0.39825841496395797, 0.056303363068839998, 4.9803632483141103, 2.7343202713150898, 2.3452757571679799, 3.3498732374241098, 12.4790131924658, -0.41615992378439798}; -const uint64_t N_updates2 = 2; +//const uint64_t N_updates2 = 2; const uint64_t Updates_index2[2] = {20, 21}; const double Updates2[42] = {-0.012056605890393198, 0.072118259966373, -0.14986032247543299, -0.023892195895314251, 0.2306191368843431, 0.070976656861603302, 0.059228850266663378, -0.0081594046205282003, 0.03775668889284136, -0.32248186320066397, -0.30175055470317586, -0.048578753136098399, -0.050512738234829151, 0.074964269995690003, 0.022375471889972701, 0.20063611492514641, -0.013817949220538101, 0.034675425849854905, 0.14269321411848099, 0.16303040878847203, 0.20520395040512121, 0.027209745720028898, -0.019752152264117806, 0.24686626344919221, 0.021544795483350802, 0.0053255971870385145, -0.074287162162363515, 0.0020896954229101539, -0.0015901625156403004, 0.045653678011149175, -0.095019596163183437, 0.015724316006526361, 0.057632524985820083, 0.0043175870669074383, -0.075611688196659296, -0.2787729352712634, 0.071667610667645931, -0.0016040895134210986, -0.018613442778587338, 0.16365851461887351, 0.018654582090675831, -0.43227782845497098}; const double Slater2[441] = {-2.8945870399475102, 3.5455725193023699, 2.0470812320709202, -3.5464441776275599, -2.0474903583526598, -2.89596366882324, -0.61329728364944502, 0.70991641283035301, 0.45664468407630898, 0.59523195028305098, 0.26079276204109197, -0.027727147564291999, -0.35093706846237199, -0.095610238611698206, -0.130077064037323, 0.10946778208017301, 0.021800471469759899, 0.048480678349733401, -0.092234551906585693, -0.028107110410928698, 0.013431881554424799, -0.78021097183227495, -0.95558542013168302, -0.55174458026885997, -0.95579683780670199, -0.55179446935653698, 0.78044348955154397, -0.115299895405769, -0.11754634231329, -0.0318448171019554, -0.00082233443390577999, 0.064001239836216001, 0.12740932404995001, -0.049412809312343597, -0.074464745819568606, 0.19851659238338501, -0.088878795504569993, 0.135610401630402, -0.13736967742443101, -0.101879440248013, 0.174509197473526, 0.085864908993244199, -0.00527230883017182, 0.00029381641070358499, 0.0072919740341603799, -0.00026352208806201799, 0.0068838247098028703, 0.0047294595278799499, 0.11728889495134399, -0.062190085649490398, -0.15969239175319699, -0.10645916312933, 0.112943567335606, -0.0015487050404772199, -0.045737843960523598, 0.13196058571338701, 0.038660705089569099, -0.050266433507204097, -0.13745591044426, -0.037740666419267703, 0.11781705915927899, 0.044309988617896999, 0.215069741010666, -0.30874741077423101, -0.37815779447555498, 0.218254208564758, 0.378139227628708, -0.21839827299118, -0.30879178643226601, 0.025539221242070202, 0.112043909728527, 0.037676706910133403, 0.025347150862216901, -0.19991625845432301, 0.14163509011268599, 0.13326919078826899, 0.213842943310738, 0.131471157073975, 0.14626120030879999, -0.0118067460134625, 0.093547157943248693, 0.22439678013324699, -0.015649655833840401, 0.011034868657589, -1.52881526947021, -1.9163775505148799e-05, -2.1623263359069802, -1.5540548702119799e-05, 2.16284847259521, -1.52953028678894, -0.26402890682220498, 0.024944067001342801, -0.37140902876853898, -0.044071510434150703, -0.29843890666961698, -0.043834518641233403, -0.177285701036453, -0.058585006743669503, -0.0183692276477814, -0.026075478643178902, -0.15623773634433699, -0.011319605633616401, 0.054057534784078598, -0.00089795450912788499, 0.0060455044731497799, -0.067333526909351293, 0.00043256155913695698, 0.095035225152969402, -0.00043632232700474598, 0.094624765217304202, 0.066768139600753798, 0.14448715746402699, -0.12090456485748299, -0.203432962298393, -0.21472349762916601, 0.154288679361343, 0.017385326325893399, -0.071518480777740506, 0.27918133139610302, 0.080454014241695404, -0.0361245274543762, 0.0566458702087402, -0.030157707631588, 0.25150132179260298, -0.0114687560126185, -0.066873423755168901, -2.2779068946838401, -2.3393469746224599e-05, -3.2218937873840301, -1.7939200915861899e-05, 3.22278833389282, -2.2791447639465301, -0.47945570945739702, 0.045197278261184699, -0.64478874206543002, -0.080234304070472703, -0.47389149665832497, 0.024908870458602898, -0.23455648124218001, -0.10695217549800901, -0.033054649829864502, -0.195749551057816, -0.040076982229948002, 0.094596333801746396, 0.098401188850402804, -0.000334969052346423, 0.0023343940265476699, -0.0025739683769643298, -0.0020174346864223502, -0.0024467820767313199, -0.00204527890309691, 0.00013988610589876801, 0.00073755031917244196, 0.17339251935482, 0.099962860345840496, 0.14622049033641801, -0.088966980576515198, 0.040044382214546197, -0.14437201619148299, -1.5416861060657501e-05, -0.081159926950931494, -0.11909016221761699, 0.170753449201584, 0.031124599277973199, -0.052109345793724102, 0.121445283293724, 0.020809086039662399, -0.039619617164135, -0.0043673445470631097, -0.00014539182302542001, 0.0061219600029289696, 0.000189467871678062, 0.0060523007996380303, 0.00425094133242965, 0.0905451029539108, 0.058540407568216303, -0.15191346406936601, 0.11511342227459, 0.15016922354698201, 0.10024280846118901, -0.11066282540559801, -0.15089659392833699, -0.021995550021529201, 0.10021472722291901, 0.019932290539145501, 0.070281185209751101, -0.120184391736984, 0.0072047915309667596, 0.043619588017463698, -0.0097634727135300602, 0.0119331693276763, -0.0068263513967394803, 0.011701960116624799, -0.0068089049309492103, 0.0095072658732533507, 0.133816182613373, -0.15090283751487699, 0.070243604481220204, 0.077758952975273105, -0.071993313729763003, -0.0526336021721363, -0.033549431711435297, -0.029018172994255999, 0.10475520789623299, 0.047332767397165298, 0.17077720165252699, 0.057527918368577999, -0.043988067656755399, -0.21170908212661699, 0.0024762949906289599, -0.71565270423889205, 2.80283820757177e-05, 1.0121610164642301, -2.41986454057042e-05, 1.0123220682144201, 0.71586799621581998, -0.045286595821380601, -0.0269623268395662, 0.0683262273669243, -0.047560662031173699, -0.062597043812274905, -0.0278066452592611, 0.045772761106491103, 0.063010454177856404, 0.0197743345052004, -0.025724532082676901, -0.20542661845684099, -0.0248414911329746, 0.058127623051405002, 0.00210775528103113, 0.0140155302360654, -0.00073456991231069001, 0.000104061764432117, -0.0010063005611300501, 0.00014142321015242501, 0.00095045292982831597, -0.00064003589795902404, 0.056538689881563201, -0.038196403533220298, 0.095246985554695102, 0.077704243361949907, 0.089713566005229894, 0.071932643651962294, 0.058404259383678402, 0.097089007496833801, -1.8242251826450202e-05, -0.070699930191039997, 0.0231548044830561, 0.036239527165889698, -0.064700096845626803, -0.012914831750094899, 0.058629415929317502, -0.0285779368132353, 2.2119384368579599e-07, -0.0404084548354149, 4.62594880445977e-06, 0.040473498404025997, -0.028664523735642398, 0.0818745791912079, -0.0072916029021143896, 0.171691119670868, 0.0142411412671208, 0.227563425898552, 0.20764905214309701, 0.23875248432159399, 0.019401129335165, 0.0041248365305364097, -0.273390233516693, 0.031942136585712398, 0.24207504093647, -0.016599044203758202, -0.00059447408420965097, 0.00458275340497494, -0.083720728754997295, -0.102523192763329, -0.059237916022539097, -0.10253403335809699, -0.0591498985886574, 0.083691440522670704, 0.093738317489623996, 0.118414394557476, 0.119053602218628, -0.19025875627994501, -0.017257452011108398, 0.111288614571095, -0.14737996459007299, -0.106449924409389, 0.119639433920383, -0.0358475148677826, 0.16083629429340399, -0.135845571756363, -0.045223556458950001, 0.204596728086472, 0.091698803007602706, -0.0016409500967711199, 0.0020083498675376199, 0.0011536112288013101, -0.0019761291332542901, -0.0011378186754882301, -0.0015965295024216199, 0.062009602785110501, -0.085591755807399694, -0.073869466781616197, -0.129948750138283, -0.025633471086621298, 0.092304252088069902, 0.11476875841617599, 0.0570255033671856, -0.098354063928127303, 0.048130486160516697, -0.075562968850135803, -0.087558984756469699, -0.061446368694305399, 0.096327632665634197, -0.084247380495071397, -0.086937576532363905, -5.2227896958356703e-05, -0.12295132130384399, -5.67086790397298e-05, 0.122932203114033, -0.086922481656074496, 0.092386581003665896, 0.0563923679292202, 0.16267444193363201, -0.103307262063026, 0.177027583122253, 0.119934171438217, 0.15235325694084201, -0.13730293512344399, -0.036718469113111503, -0.13380806148052199, -0.14056211709976199, 0.11525499820709199, 0.122316166758537, -0.0109922774136066, 0.077829994261264801, -0.71328485012054399, -0.87364697456359897, -0.50431287288665805, -0.87368428707122803, -0.50450080633163497, 0.71341556310653698, -0.0728774294257164, -0.0137394573539495, -0.131415024399757, 0.120499663054943, -0.15048809349536901, 0.067258194088935894, -0.016238121315836899, 0.25341770052909901, 0.061544414609670597, -0.124150305986404, -0.023104058578610399, 0.161576017737389, -0.18417926132678999, -0.0301918238401413, -0.017013777047395699, -0.00358590018004179, -3.1569013572152501e-06, 0.00505110481753945, -1.33700987134944e-05, 0.0050756097771227403, 0.0036168387159705201, 0.076649472117423997, -0.0148532707244158, -0.15424914658069599, -0.031277053058147403, 0.20174449682235701, 0.17827098071575201, -0.21435502171516399, 0.043405968695879003, 0.0060502337291836704, 0.23922684788703899, 0.022777535021305102, 0.22072769701480899, 0.035028267651796299, -0.0024164030328393, -0.017579320818185799, -0.0137155568227172, -0.00072690693195909305, 0.019026592373848, 0.00073597067967057196, 0.018235495314001999, 0.012611641548574, 0.14907942712307001, 0.10721461474895499, -0.205590710043907, 0.18899101018905601, 0.14405034482479101, 0.0080890702083706908, -0.049517802894115399, -0.23817741870880099, -0.062822751700878102, -0.056222390383482, 0.079762905836105305, -0.057780988514423398, -0.208331778645515, 0.030398890376091, 0.14741712808609, -0.13207408785819999, -0.00012266315752640399, -0.18668732047080999, -0.000116608949610963, 0.18647037446498901, -0.13181127607822399, 0.17992316186428101, 0.0310163982212543, 0.194987177848816, -0.051282022148370701, 0.079243704676628099, -0.16229276359081299, -0.029616238549351699, -0.065854735672473894, -0.025143278762698201, 0.277732163667679, -0.117880158126354, -0.184251189231873, 0.0632317289710045, -0.0045813838951289697, 0.024331344291567799, -0.0068073021247982996, -0.0083365431055426598, 0.0048150913789868398, 0.0083073899149894697, -0.0047997133806347804, -0.0067770029418170504, 0.077614806592464405, 0.12953585386276201, -0.063416801393032102, 0.138088583946228, -0.10224375873804099, 0.130568191409111, 0.164952263236046, 0.026345754042267799, 0.13718618452549, 0.084768116474151597, 0.096043966710567502, -0.054612904787063599, 0.138456135988235, 0.13371524214744601, -0.19178953766822801}; @@ -272,6 +272,7 @@ assert(Updates_index1 != NULL); assert(breakdown_p != NULL); assert(Slater_inv1 != NULL); rc = qmckl_sherman_morrison(context, Dim_p, N_updates_p, Updates1, Updates_index1, breakdown_p, Slater_inv1); +assert(rc == QMCKL_SUCCESS); for (unsigned int i = 0; i < Dim; i++) { for (unsigned int j = 0; j < Dim; j++) { res[i * Dim + j] = 0; @@ -499,6 +500,7 @@ assert(Updates_index2 != NULL); assert(breakdown_p != NULL); assert(Slater_inv2 != NULL); rc = qmckl_woodbury_2(context, Dim_p, Updates2, Updates_index2, breakdown_p, Slater_inv2); +assert(rc == QMCKL_SUCCESS); for (unsigned int i = 0; i < Dim; i++) { for (unsigned int j = 0; j < Dim; j++) { res[i * Dim + j] = 0; @@ -735,6 +737,7 @@ assert(Updates_index3 != NULL); assert(breakdown_p != NULL); assert(Slater_inv3_1 != NULL); rc = qmckl_woodbury_3(context, Dim_p, Updates3, Updates_index3, breakdown_p, Slater_inv3_1); +assert(rc == QMCKL_SUCCESS); for (unsigned int i = 0; i < Dim; i++) { for (unsigned int j = 0; j < Dim; j++) { res[i * Dim + j] = 0; @@ -919,6 +922,7 @@ assert(Updates_index3 != NULL); assert(breakdown_p != NULL); assert(Slater_inv3_2 != NULL); rc = qmckl_sherman_morrison_splitting(context, Dim_p, N_updates_p, Updates3, Updates_index3, breakdown_p, Slater_inv3_2); +assert(rc == QMCKL_SUCCESS); for (unsigned int i = 0; i < Dim; i++) { for (unsigned int j = 0; j < Dim; j++) { res[i * Dim + j] = 0; @@ -1140,6 +1144,7 @@ assert(Updates_index5 != NULL); assert(breakdown_p != NULL); assert(Slater_inv5 != NULL); rc = qmckl_sherman_morrison_smw32s(context, Dim_p, N_updates_p, Updates5, Updates_index5, breakdown_p, Slater_inv5); +assert(rc == QMCKL_SUCCESS); for (unsigned int i = 0; i < Dim; i++) { for (unsigned int j = 0; j < Dim; j++) { res[i * Dim + j] = 0; diff --git a/org/qmckl_trexio.org b/org/qmckl_trexio.org index 9ff0df8..8a6d564 100644 --- a/org/qmckl_trexio.org +++ b/org/qmckl_trexio.org @@ -21,6 +21,7 @@ to prepare the context by reading the required data from a TREXIO file. #endif #include "chbrclf.h" +#include int main() { qmckl_context context; @@ -52,12 +53,14 @@ int main() { #include #include "qmckl.h" +#include "qmckl_memory_private_type.h" +#include "qmckl_memory_private_func.h" #+end_src * Local functions Functions defined in this section are all local: they should not be - exposed in the API. To identify them, we append an underscore to + exposed in the API. To identify them, we append ~_X~ to their name. @@ -71,7 +74,7 @@ int main() { #+begin_src c :tangle (eval c) #ifdef HAVE_TREXIO -trexio_t* qmckl_trexio_open_(const char* file_name, qmckl_exit_code* rc) +trexio_t* qmckl_trexio_open_X(const char* file_name, qmckl_exit_code* rc) { *rc = QMCKL_SUCCESS; trexio_t* file = NULL; @@ -95,7 +98,7 @@ trexio_t* qmckl_trexio_open_(const char* file_name, qmckl_exit_code* rc) #+begin_src c :tangle (eval c) #ifdef HAVE_TREXIO qmckl_exit_code -qmckl_trexio_read_electron_(qmckl_context context, trexio_t* const file) +qmckl_trexio_read_electron_X(qmckl_context context, trexio_t* const file) { // Should not be possible by construction. assert (context != (qmckl_context) 0); @@ -134,6 +137,110 @@ qmckl_trexio_read_electron_(qmckl_context context, trexio_t* const file) #endif #+end_src +** Nucleus + + In this section we read the molecular geometry and nuclear charges. + + #+begin_src c :tangle (eval c) +#ifdef HAVE_TREXIO +qmckl_exit_code +qmckl_trexio_read_nucleus_X(qmckl_context context, trexio_t* const file) +{ + // Should not be possible by construction. + assert (context != (qmckl_context) 0); + assert (file != NULL); + + qmckl_exit_code rc; + int rcio = 0; + + // Nucleus num + int64_t num = 0; + + rcio = trexio_read_nucleus_num_64(file, &num); + if (rcio != TREXIO_SUCCESS) { + return qmckl_failwith( context, + QMCKL_FAILURE, + "trexio_read_nucleus_num", + trexio_string_of_error(rcio)); + } + + assert (num > 0); + rc = qmckl_set_nucleus_num(context, num); + + + // Nuclear charges + { + qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero; + mem_info.size = num * sizeof(double); + + double* nucl_charge = (double*) qmckl_malloc(context, mem_info); + + if (nucl_charge == NULL) { + return qmckl_failwith( context, + QMCKL_ALLOCATION_FAILED, + "qmckl_trexio_read_nucleus_X", + NULL); + } + + assert (nucl_charge != NULL); + + rcio = trexio_read_nucleus_charge_64(file, nucl_charge); + if (rcio != TREXIO_SUCCESS) { + return qmckl_failwith( context, + QMCKL_FAILURE, + "trexio_read_nucleus_charge", + trexio_string_of_error(rcio)); + } + + rc = qmckl_set_nucleus_charge(context, nucl_charge); + + qmckl_free(context, nucl_charge); + nucl_charge = NULL; + + if (rc != QMCKL_SUCCESS) { + return rc; + } + } + + // Nuclear coordinates + { + qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero; + mem_info.size = num * 3 * sizeof(double); + + double* nucl_coord = (double*) qmckl_malloc(context, mem_info); + + if (nucl_coord == NULL) { + return qmckl_failwith( context, + QMCKL_ALLOCATION_FAILED, + "qmckl_trexio_read_nucleus_X", + NULL); + } + + assert (nucl_coord != NULL); + + rcio = trexio_read_nucleus_coord_64(file, nucl_coord); + if (rcio != TREXIO_SUCCESS) { + return qmckl_failwith( context, + QMCKL_FAILURE, + "trexio_read_nucleus_charge", + trexio_string_of_error(rcio)); + } + + rc = qmckl_set_nucleus_coord(context, 'N', nucl_coord); + + qmckl_free(context, nucl_coord); + nucl_coord = NULL; + + if (rc != QMCKL_SUCCESS) { + return rc; + } + } + + return QMCKL_SUCCESS; +} +#endif + #+end_src + * Read everything #+begin_src c :tangle (eval h_func) @@ -151,7 +258,7 @@ qmckl_trexio_read(const qmckl_context context, const char* file_name) qmckl_exit_code rc; #ifdef HAVE_TREXIO - trexio_t* file = qmckl_trexio_open_(file_name, &rc); + trexio_t* file = qmckl_trexio_open_X(file_name, &rc); if (file == NULL) { trexio_close(file); return qmckl_failwith( context, @@ -162,8 +269,7 @@ qmckl_trexio_read(const qmckl_context context, const char* file_name) assert (file != NULL); - rc = qmckl_trexio_read_electron_(context, file); - printf("%d %d\n", rc, QMCKL_SUCCESS); + rc = qmckl_trexio_read_electron_X(context, file); if (rc != QMCKL_SUCCESS) { trexio_close(file); return qmckl_failwith( context, @@ -172,6 +278,15 @@ qmckl_trexio_read(const qmckl_context context, const char* file_name) "Error reading electron"); } + rc = qmckl_trexio_read_nucleus_X(context, file); + if (rc != QMCKL_SUCCESS) { + trexio_close(file); + return qmckl_failwith( context, + QMCKL_FAILURE, + "qmckl_trexio_read", + "Error reading nucleus"); + } + trexio_close(file); file = NULL; #else @@ -203,13 +318,46 @@ if (rc != QMCKL_SUCCESS) { assert ( rc == QMCKL_SUCCESS ); +printf("Electrons"); int64_t num; rc = qmckl_get_electron_up_num(context, &num); +assert (rc == QMCKL_SUCCESS); assert (num == chbrclf_elec_up_num); rc = qmckl_get_electron_down_num(context, &num); +assert (rc == QMCKL_SUCCESS); assert (num == chbrclf_elec_dn_num); + +rc = qmckl_get_nucleus_num(context, &num); +assert (rc == QMCKL_SUCCESS); +assert (num == chbrclf_nucl_num); + +printf("Nuclear charges"); +double * charge = (double*) malloc (num * sizeof(double)); +rc = qmckl_get_nucleus_charge(context, charge); +assert (rc == QMCKL_SUCCESS); +for (int i=0 ; i