Skip to content

Commit

Permalink
Merge pull request #2128 from jtkrogel/nx_opt_nlpp
Browse files Browse the repository at this point in the history
Nexus: optimize with NLPP derivatives by default
  • Loading branch information
prckent authored Jan 6, 2020
2 parents 6406aa3 + 5741cae commit 569f657
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions nexus/lib/qmcpack_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2458,12 +2458,12 @@ class linear(QIxml):
elements = ['estimator']
parameters = ['walkers','warmupsteps','blocks','steps','substeps','timestep',
'usedrift','stepsbetweensamples','samples','minmethod',
'minwalkers','maxweight','nonlocalpp','usebuffer',
'alloweddifference','gevmethod','beta','exp0','bigchange',
'stepsize','stabilizerscale','nstabilizers','max_its',
'cgsteps','eigcg','stabilizermethod','rnwarmupsteps',
'walkersperthread','minke','gradtol','alpha','tries',
'min_walkers','samplesperthread','use_nonlocalpp_deriv',
'minwalkers','maxweight','nonlocalpp','use_nonlocalpp_deriv',
'usebuffer','alloweddifference','gevmethod','beta','exp0',
'bigchange','stepsize','stabilizerscale','nstabilizers',
'max_its','cgsteps','eigcg','stabilizermethod',
'rnwarmupsteps','walkersperthread','minke','gradtol','alpha',
'tries','min_walkers','samplesperthread',
'shift_i','shift_s','max_relative_change','max_param_change',
'chase_lowest','chase_closest','block_lm','nblocks','nolds',
'nkept',
Expand All @@ -2483,9 +2483,9 @@ class cslinear(QIxml):
'alloweddifference','gevmethod','beta','exp0','bigchange',
'stepsize','stabilizerscale','nstabilizers','max_its',
'stabilizermethod','cswarmupsteps','alpha_error','gevsplit',
'beta_error']
'beta_error','use_nonlocalpp_deriv']
costs = ['energy','unreweightedvariance','reweightedvariance']
write_types = obj(gpu=yesno,usedrift=yesno,nonlocalpp=yesno,usebuffer=yesno)
write_types = obj(gpu=yesno,usedrift=yesno,nonlocalpp=yesno,use_nonlocalpp_deriv=yesno,usebuffer=yesno)
#end class cslinear

class vmc(QIxml):
Expand Down Expand Up @@ -5851,14 +5851,15 @@ def generate_opts(opt_reqs,**kwargs):
)

shared_opt_defaults = obj(
samples = 204800,
nonlocalpp = True,
warmupsteps = 300,
blocks = 100,
steps = 1,
substeps = 10,
timestep = 0.3,
usedrift = False,
samples = 204800,
nonlocalpp = True,
use_nonlocalpp_deriv = True,
warmupsteps = 300,
blocks = 100,
steps = 1,
substeps = 10,
timestep = 0.3,
usedrift = False,
)

linear_quartic_defaults = obj(
Expand Down Expand Up @@ -6526,6 +6527,16 @@ def generate_basic_input(**kwargs):
qi.remove_physical_system()
#end if

for calc in sim.calculations:
if isinstance(calc,loop):
calc = calc.qmc
#end if
if isinstance(calc,(linear,cslinear)) and 'nonlocalpp' not in calc:
calc.nonlocalpp = True
calc.use_nonlocalpp_deriv = True
#end if
#end for

return qi
#end def generate_basic_input

Expand Down

0 comments on commit 569f657

Please sign in to comment.