Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus: update qdens to handle batched driver input/output #4645

Merged
merged 3 commits into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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