From f60fcf3e16b12098c699e00c46f830bb2073f772 Mon Sep 17 00:00:00 2001 From: Jaron Krogel Date: Fri, 23 Jun 2023 16:51:27 -0400 Subject: [PATCH] nexus: fix qdens for batched estimators --- nexus/bin/qdens | 9 +++++++++ nexus/lib/qmcpack_input.py | 16 ++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/nexus/bin/qdens b/nexus/bin/qdens index 2711ffd5e4..55e219fed7 100755 --- a/nexus/bin/qdens +++ b/nexus/bin/qdens @@ -1023,6 +1023,15 @@ class QMCDensityProcessor(QDBase): #end if #end if #end if + if 'estimators' in qi.simulation: + ests = qi.simulation.estimators.estimators + est_sources.append(ests) + #end if + qsys = qi.get('qmcsystem') + if qsys is not None and 'estimators' in qsys: + ests = qsys.estimators.estimators + est_sources.append(ests) + #end if calcs = qi.get('calculations') if calcs is not None: for series in sorted(calcs.keys()): diff --git a/nexus/lib/qmcpack_input.py b/nexus/lib/qmcpack_input.py index c834528413..d6f9786b24 100644 --- a/nexus/lib/qmcpack_input.py +++ b/nexus/lib/qmcpack_input.py @@ -1752,8 +1752,8 @@ class simulation(QIxml): attributes = ['method'] # rsqmc elements = ['project','random','include','qmcsystem','particleset', - 'wavefunction','hamiltonian','init','traces','qmc','loop', - 'mcwalkerset','cmc']+\ + 'wavefunction','hamiltonian','estimators','init','traces', + 'qmc','loop','mcwalkerset','cmc']+\ ['afqmcinfo','walkerset','propagator','execute'] # afqmc afqmc_order = ['project','random','afqmcinfo','hamiltonian', 'wavefunction','walkerset','propagator','execute'] @@ -1799,7 +1799,7 @@ class mcwalkerset(QIxml): class qmcsystem(QIxml): attributes = ['dim'] #,'wavefunction','hamiltonian'] # breaks QmcpackInput - elements = ['simulationcell','particleset','wavefunction','hamiltonian','random','init','mcwalkerset'] + elements = ['simulationcell','particleset','wavefunction','hamiltonian','random','init','mcwalkerset','estimators'] #end class qmcsystem @@ -2085,6 +2085,10 @@ class override_variational_parameters(QIxml): +class estimators(QIxml): + elements = ['estimator'] +#end class estimators + class hamiltonian(QIxml): # rsqmc afqmc attributes = ['name','type','target','default']+['info'] @@ -2580,7 +2584,7 @@ class vmc_batch(QIxml): # batched driver compatible inputs have yet not been listed anywhere. collection_id = 'qmc' tag = 'qmc' - attributes = ['method','move','profiling','kdelay'] + attributes = ['method','move','profiling','kdelay','checkpoint'] elements = ['estimator'] parameters = ['total_walkers','walkers_per_rank','crowds','warmupsteps','blocks','steps','substeps','timestep','maxcpusecs','rewind','storeconfigs','checkproperties','recordconfigs','current','stepsbetweensamples','samplesperthread','samples','usedrift'] write_types = obj(usedrift=yesno,profiling=yesno) @@ -2592,7 +2596,7 @@ class dmc_batch(QIxml): # batched driver compatible inputs have yet not been listed anywhere. collection_id = 'qmc' tag = 'qmc' - attributes = ['method','move','profiling','kdelay'] + attributes = ['method','move','profiling','kdelay','checkpoint'] elements = ['estimator'] parameters = ['total_walkers','walkers_per_rank','crowds','warmupsteps','blocks','steps','substeps','timestep','maxcpusecs','rewind','storeconfigs','checkproperties','recordconfigs','current','stepsbetweensamples','samplesperthread','samples','reconfiguration','nonlocalmoves','maxage','alpha','gamma','reserve','use_nonblocking','branching_cutoff_scheme','feedback','sigmabound'] write_types = obj(usedrift=yesno,profiling=yesno,reconfiguration=yesno,nonlocalmoves=yesnostr,use_nonblocking=yesno) @@ -2710,7 +2714,7 @@ class gen(QIxml): nofk,mpc_est,flux,distancetable,cpp,element,spline,setparams, backflow,transformation,cubicgrid,molecular_orbital_builder,cmc,sk,skall,gofr, host,date,user,rpa_jastrow,momentum,override_variational_parameters, - momentumdistribution,onebodydensitymatrices, + momentumdistribution,onebodydensitymatrices,estimators, # afqmc classes afqmcinfo,walkerset,propagator,execute,back_propagation,onerdm ]