fail to write gofr in QMCpack-4.1.0

7 views
Skip to first unread message

Ch-Y Wang

unread,
Aug 6, 2025, 12:19:37 PMAug 6
to qmcpack
Dear developers,

I am using qmcpack-4.1.0 and have a problem of writing estimators such as gofr and density to *stat.h5. I used nexus to generate estimators (using examples given by https://github.com/QMCPACK/qmcpack/tree/develop/nexus/examples/qmcpack/rsqmc_misc/estimators):

from qmcpack_input import spindensity
sdens = spindensity(
   # dr = (0.05, 0.05, 0.05),   # Bohr units
    grid = (120,120,120),     # Alternative to dr, an NxNxN grid can be specified
    )

from qmcpack_input import gofr
gofr = gofr(type='gofr',
        name='gofr',
        num_bin = 1000,
        rmax = 10,
        )


and the corresponding dmc section is

  qmc = generate_qmcpack(
    identifier      = 'dmc',
    path            = 'silicon_est2/twist_conv/n' + str(nk),
    job             = job(nodes=4,
                          threads=1,
                          hours=1,
                          app=qmc_bin),
    input_type      = 'basic',
    system          = supercell,
    pseudos         = ['Si.ccECP.xml'],
    estimators      = [sdens,gofr],
    qmc             = 'dmc',

      # Initial VMC stuff
    vmc_warmupsteps = 8,      # Number of Equilibration steps
    vmc_blocks      = 200,    # Number of VMC blocks (To generate the DMC samples)
    vmc_steps       = 1,      # Number of VMC steps (To generate DMC samples)
    vmc_timestep    = 0.1,    # VMC Timestep (To Generate DMC samples)

      # DMC stuff
    timestep        = 0.01,   # DMC timestep
    steps           = 1,      # start with small number for large timesteps [autocorrelation]
    blocks          = 300,    # Number of DMC blocks
    total_walkers   = 512,
    dependencies    = [(convk,'orbitals'),
                         (optJ12,'jastrow')],
  )


This nexus setting output the in.xml file with estimators:
<hamiltonian>
...
</hamiltonian>
      <estimators>
         <estimator type="spindensity" name="SpinDensity">
            <parameter name="grid">
               120 120 120
            </parameter>
         </estimator>
         <estimator type="gofr" name="gofr" num_bin="1000" rmax="10"/>
      </estimators>
   </qmcsystem>
   <qmc method="vmc" move="pbyp">
---
</qmc>

If I run this dmc.in.xml file generated by nexus, I get an error message of "Fatal Error. Aborting at EstimatorManager input:unparsable <estimator> node, name: gofr type: gofr in Estimators input." I guess it is because qmcpack somehow fail to recognize gofr which defined in QMCHamiltonian. Spin density is fine since it is well defined in EstimatorManager.

Thank you for your help.

Reply all
Reply to author
Forward
0 new messages