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

Update ppconvert #874

Merged
merged 9 commits into from
May 30, 2018
Merged

Update ppconvert #874

merged 9 commits into from
May 30, 2018

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented May 25, 2018

  1. allows changing density mixing parameter via command line.
  2. update ppconvert manual section

@ghost ghost assigned ye-luo May 25, 2018
@ghost ghost added the in progress label May 25, 2018
@Paul-St-Young
Copy link
Contributor

@ye-luo thanks for adding more details on ppconvert to the manual!

Could you add a few sentences on how a "reference state" should be chosen?
A few examples would be greatly appreciated.

@ye-luo
Copy link
Contributor Author

ye-luo commented May 25, 2018

@Paul-St-Young I added my limited knowledge of how to set the reference states.

@Paul-St-Young
Copy link
Contributor

@ye-luo thanks a lot! the reference state should include only the valence electrons this is what I missed. I can now get ppconvert to run through. Checking results.

@Paul-St-Young
Copy link
Contributor

The following script seems to produce a reasonable upf for silicon
`wget http://www.tcm.phy.cam.ac.uk/~mdt26/pseudo_lib/si/1/summary.txt
wget http://www.tcm.phy.cam.ac.uk/~mdt26/pseudo_lib/si/1/pp.data
wget http://www.tcm.phy.cam.ac.uk/~mdt26/pseudo_lib/si/1/awfn.data_s2p2_3P

BIN=ppconvert

pot=Si.TN
ref="1s(2)2p(2)"
loc=2

cmd="$BIN --local_channel $loc --casino_pot pp.data --s_ref $ref --p_ref $ref --d_ref $ref"

$cmd --upf $pot.upf >& convert_upf.out
$cmd --xml $pot.xml >& convert_xml.out`

@Paul-St-Young
Copy link
Contributor

The local part of potential agree very well with the tabulated data.
However, there seem to be some small differences in the pseudized orbitals.

si_pp

@Paul-St-Young
Copy link
Contributor

I should mention that my first instinct was to use 3s(2)3p(2), because Wikipedia says Si [Ne] 3s(2)3p(2). However, this naive first attempted failed miserably because ppconvert puts nodes into the pseudized orbitals. i.e. RadialWF::Solve uses int TotalNodes = n-l-1; Perhaps this is something that should be explicitly warned against in the manual.

ref33_si_pp

@ye-luo
Copy link
Contributor Author

ye-luo commented May 26, 2018

The difference in orbitals may be caused by using a different XC functional or HF or DF.

@Paul-St-Young
Copy link
Contributor

The converted pseudopotential can reproduce the Si band structure compared to the standard quantum espresso example (PP/examples/example01). I also tried manually replacing the <PP_PSWFC> and <PP_RHOATOM> entries in the UPF with data from awfn.data (<PP_R> and <PP_LOCAL> already exactly matches pp.data). I saw no change to the band structure. I think the small difference we saw is insignificant.

tn-si-bands

@prckent
Copy link
Contributor

prckent commented May 29, 2018

@Paul-St-Young The incorrect number of nodes clearly indicates the wrong states are being solved for by ppconvert. You need to change the specification of the reference state. From an archived page (google search):

Note that the reference state should include only the valence electrons. For example, for a sodium atom with a neon core, the reference state would be "1s(1)". Note that the "s_ref" needs to include a 1s state (potentially with 0 occupancy), the "p_ref" needs to include a 2p state, and the "d_ref" needs to include a 3d state. One reference state should be included for each channel in the pseudopotential.

@prckent
Copy link
Contributor

prckent commented May 29, 2018

@Paul-St-Young Do you have enough information to convert the potentials that you need? Clearly (i) a set of converted potentials would avoid this problem and (ii) a better write up is needed for ppconvert to be useful or an alternative found.

@ye-luo
Copy link
Contributor Author

ye-luo commented May 29, 2018

@prckent I looked at the archived page when I wrote my guidance for reference states. The following requirement is no more needed.

Note that the "s_ref" needs to include a 1s state (potentially with 0 occupancy), the "p_ref" needs to include a 2p state, and the "d_ref" needs to include a 3d state.

@Paul-St-Young
Copy link
Contributor

@prckent yes, I was able to obtain the pseudopotential I needed using the bash script I posted above. i.e. ref="1s(2)2p(2)". I understand that orbitals with nodes are wrong. I was just trying to point out a gatcha for new users.

@Paul-St-Young
Copy link
Contributor

I also noticed that the starting charge in QE is off by 4pi
starting charge 20.36910, renormalised to 256.00000.

If I scale the <PP_RHOATOM> entry in the generated UPF by 4pi, then the starting charge is almost correct starting charge 255.96560, renormalised to 256.00000.

The QE description of the UPF file says <PP_RHOATOM> should hold 4pi r^2* true charge. Is this a new update since ppconvert was made?

@ye-luo
Copy link
Contributor Author

ye-luo commented May 29, 2018

If all the pseudopotential files are created by ppconvert, this is not a big issue since QE will rescale them all. If mixed pseudopotential files (from OPIUM and BFD) are used, the starting density may be pretty bad. So fixing the density normalization is needed.

@ghost ghost assigned prckent May 29, 2018
@prckent prckent self-requested a review May 29, 2018 21:59
Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the ghost instructions.

@prckent prckent merged commit ee65237 into QMCPACK:develop May 30, 2018
@ghost ghost removed the in progress label May 30, 2018
@ye-luo ye-luo deleted the update-ppconvert branch July 2, 2018 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants