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

CGCNN can't run on certain CIF files #20

Open
noortitan opened this issue Jun 30, 2020 · 4 comments
Open

CGCNN can't run on certain CIF files #20

noortitan opened this issue Jun 30, 2020 · 4 comments

Comments

@noortitan
Copy link

Hello,

Great work with the project. I have been using CGCNN for perovskites, with the CIF files taken from ICSD database. However, I found out that it only works with certain CIF files, but not the others. Does it only take a certain "type" of CIF files? If so, how do I change the CIF files which don't work to the format that can be inputted into CGCNN?

As a reference, here are some of the ICSD collection codes:

  • Working: 110630, 243861, 252316, 255885, 255886, 432089
  • Not working: 252317, 252318, 252319, 252320, 254340, 254341, 434118, 432090, 254288

The error that comes out:

Traceback (most recent call last):
  File "main.py", line 513, in <module>
    main()
  File "main.py", line 119, in main
    sample_data_list = [dataset[i] for i in range(len(dataset))]
  File "main.py", line 119, in <listcomp>
    sample_data_list = [dataset[i] for i in range(len(dataset))]
  File "/run/user/1000/gvfs/user/cgcnn-ubuntu/cgcnn-master/cgcnn/data.py", line 326, in __getitem__
    print("Specie number: ",crystal[0].specie.number)
  File "/home/user/miniconda3/envs/cgcnn/lib/python3.7/site-packages/pymatgen/core/sites.py", line 79, in __getattr__
    raise AttributeError(a)
AttributeError: specie

Thank you!

@Andrew-S-Rosen
Copy link

Andrew-S-Rosen commented Jul 19, 2020

This is an issue with the Pymatgen CIF parser. I recommend reading in each of your CIFs with ASE and writing them back out again with ASE, which will result in a CIF format that Pymatgen can read.

@noortitan
Copy link
Author

I have tried using both Pymatgen CIF parser, as well as reading and rewriting the CIFs with ASE, but it's still not working. The same error still appears.

@txie-93
Copy link
Owner

txie-93 commented Jan 3, 2021

Perhaps the CIF file itself has problems. Sometimes I saw CIF files that include invalid elements like Wa. It cannot be parsed by the pymatgen, so you see an error with the specie.

@Amadeus-System
Copy link

I have experienced same problem. so I didn't use cif files directly. I have used pymatgen MPRester and directly accessed to a material-project without using cif file and extract it to a 'structure'.

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

4 participants