Skip to content

Commit

Permalink
Merge pull request #4645 from jtkrogel/nx_fix_qdens_batched
Browse files Browse the repository at this point in the history
Nexus: update qdens to handle batched driver input/output
  • Loading branch information
ye-luo authored Jun 24, 2023
2 parents 4224793 + 0884676 commit 4d29208
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
9 changes: 9 additions & 0 deletions nexus/bin/qdens
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,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()):
Expand Down
16 changes: 10 additions & 6 deletions nexus/lib/qmcpack_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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']
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
]
Expand Down

0 comments on commit 4d29208

Please sign in to comment.