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

(Bug Report)Calculated Orbital Frame Matrix is always 0. #260

Open
Shunichirou-Watanabe opened this issue Jun 6, 2022 · 0 comments
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Shunichirou-Watanabe
Copy link

Bug details

I calculate OFM by referring to the tutorial on the web page, all will be 0.
https://xenonpy.readthedocs.io/en/latest/tutorials/2-descriptor.html
(F14_f14 of mp-1017582 should be 0.3851, but it is 0)

The combination of v2020.10.9 for pymatgen and 0.6.5 for xenonpy is NG
The combination of v2020.3.13 for pymatgen and 0.6.5 for xenonpy is OK

Environment

Windows10 21H2
Python 3.7.13 (default, Mar 28 2022, 08:03:21) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

Verification program

import xenonpy
import os
from xenonpy.descriptor import Structures
import pymatgen
from xenonpy.datatools import preset
from pymatgen.ext.matproj import MPRester
import pandas as pd

print(f"xenonpy version = {xenonpy.version}")
print(f"pymatgen version = {pymatgen.version}")

API_key = "use your own api key"
preset.build('mp_samples',api_key=API_key)
samples = preset.mp_samples

with MPRester(api_key=API_key) as m:
model = m.query(criteria='mp-1017582',properties=list(samples.columns))
print(model)
model_df = pd.DataFrame(model,columns=samples.columns)

cal = Structures()
part_desc = cal.transform(model_df)
print(f"f14_f14 = {part_desc.loc[0,'f14_f14']:1.4f}")

Probable cause

A method was added to the master branch of pymatgen to remove HTML tags in electronic_structure with the changes committed on May 13, 2020.
materialsproject/pymatgen@632a79a

Therefore, the method on lines 214-215 of xenonpy's structure.py becomes superfluous.No matter which element is input, the output result is an empty list.

''.join(pair) for pair in re.findall(r"\.\d(\w+)<sup>(\d+)</sup>", element.electronic_structure)

@stewu5 stewu5 added the bug Something isn't working label Jul 20, 2022
@stewu5 stewu5 added this to the v0.7.0 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants