-
Notifications
You must be signed in to change notification settings - Fork 46
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
Why POTCAR hash from mp_api doesn't match local POTCAR file hash: explained by md5_header_hash
vs md5_computed_file_hash
.
#944
Comments
That's a good question but it's better asked on our forum for the benefit of the whole community. Please search for existing explanations/solutions on the forum before posting your question there. Thanks! |
See here for the related discussion. |
I understand the issue now. There is no problem with potcar. The # The `MD5 hash of the metadata defining the PotcarSingle`:
werner@x13dai-t:~/Public/repo/github.com/materialsproject/pymatgen.git$ ug 'a604ea3c6a9cc23c739b762f625cf449' -l
tests/files/surfaces/ucell_entries.txt
docs/pymatgen.io.vasp.html
docs/searchindex.js
src/pymatgen/io/vasp/MITRelaxSet.yaml
src/pymatgen/io/vasp/vasp_potcar_pymatgen_hashes.json
tests/files/io/vasp/fixtures/grid_data_files/vasp_inputs_for_grid_check.json
# The `MD5 hash of the entire PotcarSingle`:
werner@x13dai-t:~/Public/repo/github.com/materialsproject/pymatgen.git$ ug 'b1f52f99a6ad883e9383660a9fc1eebf' -l
src/pymatgen/io/vasp/vasp_potcar_file_hashes.json
werner@x13dai-t:~/Public/repo/github.com/materialsproject/pymatgen.git$ ug '079fdad3df93dbceac18c56a69852e29' -l
src/pymatgen/io/vasp/vasp_potcar_file_hashes.json The In [15]: from pymatgen.io.vasp import Potcar
...: from collections import namedtuple
...: import os
...:
...: PotcarSpec = namedtuple('PotcarSpec', ['titel', 'hash', 'summary_stats'])
...:
...: # Expand the ~ in the path
...: filepath = os.path.expanduser("~/Public/hpc/vasp/pot/pmg_potcar/POT_GGA_PAW_PBE/POTCAR.Pt.gz")
...:
...: # Read POTCAR and create specs
...: potcar = Potcar.from_file(filepath)
...:
...: specs = [
...: PotcarSpec(
...: titel=p.titel,
...: hash=p.md5_header_hash,
...: summary_stats=p._summary_stats
...: )
...: for p in potcar
...: ]
...:
...: print(f"POTCAR specifications: {specs}")
POTCAR specifications: [PotcarSpec(titel='PAW_PBE Pt 05Jan2001', hash='a604ea3c6a9cc23c739b762f625cf449', summary_stats={'keywords': {'header': ['dexc', 'eatom', 'eaug', 'enmax', 'enmin', 'iunscr', 'lcor', 'lexch', 'lpaw', 'lultra', 'ndata', 'orbitaldescriptions', 'pomass', 'qcut', 'qgam', 'raug', 'rcloc', 'rcore', 'rdep', 'rmax', 'rpacor', 'rrkj', 'rwigs', 'step', 'titel', 'vrhfin', 'zval'], 'data': ['localpart', 'gradientcorrectionsusedforxc', 'corecharge-density(partial)', 'atomicpseudocharge-density', 'nonlocalpart', 'reciprocalspacepart', 'realspacepart', 'reciprocalspacepart', 'realspacepart', 'nonlocalpart', 'reciprocalspacepart', 'realspacepart', 'reciprocalspacepart', 'realspacepart', 'nonlocalpart', 'reciprocalspacepart', 'realspacepart', 'reciprocalspacepart', 'realspacepart', 'pawradialsets', '(5e20.12)', 'augmentationcharges(nonsperical)', 'uccopanciesinatom', 'grid', 'aepotential', 'corecharge-density', 'kineticenergy-density', 'pspotential', 'corecharge-density(pseudized)', 'pseudowavefunction', 'aewavefunction', 'pseudowavefunction', 'aewavefunction', 'pseudowavefunction', 'aewavefunction', 'pseudowavefunction', 'aewavefunction', 'pseudowavefunction', 'aewavefunction', 'pseudowavefunction', 'aewavefunction', 'endofdataset']}, 'stats': {'header': {'MEAN': 49.75002565203251, 'ABSMEAN': 49.81755410731707, 'VAR': 11430.679203375377, 'MIN': -4.114, 'MAX': 729.1171}, 'data': {'MEAN': 101824.1204566872, 'ABSMEAN': 101837.40806970962, 'VAR': 565262541893.0613, 'MIN': -175.707504926, 'MAX': 7968615.30025}}})] The following code snippet can be used to compute the two hashes mentioned above: In [31]: from pymatgen.io.vasp.inputs import PotcarSingle
In [32]: psingle = PotcarSingle.from_file('/home/werner/Desktop/pot/potpaw_PBE/Pt/POTCAR')
In [33]: psingle.md5_header_hash
Out[33]: 'a604ea3c6a9cc23c739b762f625cf449'
In [34]: psingle.md5_computed_file_hash
Out[34]: '079fdad3df93dbceac18c56a69852e29'
In [35]: psingle
Out[35]: PotcarSingle(symbol='Pt', functional='PBE', TITEL='PAW_PBE Pt 05Jan2001', VRHFIN='Pt: s1d9', n_valence_elec=10) See here for the corresponding source code implementation. See here and here for the related discussion. |
Thanks for following up! |
md5_header_hash
vs md5_computed_file_hash
.
See my following checking:
The potcar on my machine:
As you can see, the hash doesn't match. So, what's the exact potcar version used by MP?
Regards,
Zhao
The text was updated successfully, but these errors were encountered: