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

Remove the dependence on vise.yaml in make_efnv_correction #19

Open
goodwilling opened this issue May 5, 2024 · 5 comments
Open

Remove the dependence on vise.yaml in make_efnv_correction #19

goodwilling opened this issue May 5, 2024 · 5 comments

Comments

@goodwilling
Copy link

I am very interested in pydefect and I make some tests following the implementation in test_kumagai as in pymatgen.analysis.defects:
https://github.com/materialsproject/pymatgen-analysis-defects/blob/main/tests/test_corrections.py
(the test_kumagai part is presently commented out)

Unfortunately, my tests are always running forever and never end. If terminated forcibly, the process will return a message with vise.yaml not found, and also other messages regarding the defaults.

In my case, I make my own script to construct CalcResult, not from VASP output. If structure, charge, dielectric tensors, and atom-site potentials are available, it is desired that vise.yaml is not necessary anymore. Thank you very much.

*vise and pydefect are installed before my tests.

pip install vise
pip install pydefect

@goodwilling
Copy link
Author

To be more specific, the above problem can be simply described as an importing problem. The importing of make_efnv_correction just hangs and never ends.
pydefect

@yuuukuma
Copy link
Contributor

yuuukuma commented May 5, 2024

Thank you for contacting me.
I will try not to import vise in the make_efnv_correction.py file.

@yuuukuma
Copy link
Contributor

yuuukuma commented May 7, 2024

Unfortunately, DefaultsBase cannot be removed for the command line tools.

@yuuukuma
Copy link
Contributor

yuuukuma commented May 7, 2024

I upgrade pydefect to 0.9.4. Please try it.

@goodwilling
Copy link
Author

Thank you for your quick response.

In my case, I do not have vise.yaml and pydefect.yaml used for VASP calculations.
Therefore, I still cannot get make_efnv_correction imported in pydefect 0.9.4.

For my purpose, I make the following naive modification in pydefect/defaults.py:

#from vise.defaults import DefaultsBase

@singleton
class Defaults(): #(DefaultsBase):
...

 #self.set_user_settings(yaml_filename="pydefect.yaml")

...

With the above change my python script runs and give expected results.
The results (correction energy of charged defects) by extended FNV
agree very well with those by FNV.

As you commented out, the above change will not be good for pydefect as a whole.
I will keep this in mind in later tests. Thank you very much.

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

No branches or pull requests

2 participants