QMCPACK / qmcpack

Main repository for QMCPACK, an open-source production level many-body ab initio Quantum Monte Carlo code for computing the electronic structure of atoms, molecules, and solids with full performance portable GPU support
http://www.qmcpack.org
Other
297 stars 139 forks source link

Nexus needs to randomize electron positions by ions by default #2123

Open ye-luo opened 4 years ago

ye-luo commented 4 years ago

Nexus currently put <particleset name="e" random="yes"> namely uniformly distributing the electron in the box. I found this took extremely long equilibration time in VMC, >100 steps. Instead <particleset name="e" random="yes" random_source="ions"> will generate much better initial electron positions by putting valence electrons proportionally around ions. It never took more than 10 steps.

jtkrogel commented 4 years ago

Shouldn't this be random_source="ion0"? Do all the converters use "ion0"? At some point, both "ion0" and "i" showed up frequently.

prckent commented 4 years ago

This is a broader question than Nexus - what do the converters do? We need to keep a consistent approach for all the converters and Nexus. And is one choice more brittle than another?

Charged systems also need to be catered for. The converter can't know where to add/remove the electrons in these cases and long equilibration times can certainly result. I suggest a note in the manual and issuing some warnings in the converters that equilibration should be checked carefully.

prckent commented 4 years ago

@jtkrogel Do you think that we are missing a check in random_source that the specified source actually exists?

ye-luo commented 4 years ago

@jtkrogel for nexus, it should be ion0 I believe. @prckent

  1. I think all the converters put random_source. @jtkrogel told me it was the case for nexus but he changed it for some reason.
  2. random_source are allowed to be empty and means putting electrons uniformly in the box. in an HEG run, there are no ions and electrons should be distributed uniformly at the beginning.
ye-luo commented 4 years ago

@jtkrogel has this been changed in nexus as today?

jtkrogel commented 4 years ago

No change so far. Wouldn't it be better if QMCPACK handled default randomization appropriately itself?

In that case, we could drop it from converters, etc.

ye-luo commented 4 years ago

randomsrc is resolved by name. QMCPACK side can make a guess using the default ion name. However, the input file can choose whatever name it wants for the ion particle set. It still needs the input generator the handle the name properly to prevent errors.

jtkrogel commented 4 years ago

I know. I just don't think a feature like this should require any user input to get it right. Given that electrons and ions share a distance table, I don't think the association is any kind of a mystery to the internals of the code.