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

ClusterSubspace fails on prim derived from CIF file #415

Closed
dmebane opened this issue Sep 15, 2023 · 5 comments
Closed

ClusterSubspace fails on prim derived from CIF file #415

dmebane opened this issue Sep 15, 2023 · 5 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@dmebane
Copy link

dmebane commented Sep 15, 2023

heyo -- trying to generate a subspace from a CIF (attached -- .txt extension appended)

"
s = Structure.from_file('Li0.3La0.57TiO3.cif')
prim = s.get_primitive_structure()
subspace = ClusterSubspace.from_cutoffs(prim, cutoffs={2: 1}, basis='indicator', supercell_size='O')
Traceback (most recent call last):

Cell In[21], line 1
subspace = ClusterSubspace.from_cutoffs(prim, cutoffs={2: 1}, basis='indicator', supercell_size='O')

File ~/anaconda3/lib/python3.10/site-packages/smol/cofe/space/clusterspace.py:303 in from_cutoffs
orbits = cls._gen_orbits_from_cutoffs(

File ~/anaconda3/lib/python3.10/site-packages/smol/cofe/space/clusterspace.py:1325 in _gen_orbits_from_cutoffs
site_spaces = get_site_spaces(exp_struct, include_measure=use_conc)

File ~/anaconda3/lib/python3.10/site-packages/smol/cofe/space/domain.py:78 in get_site_spaces
site_space = SiteSpace(

File ~/anaconda3/lib/python3.10/site-packages/smol/cofe/space/domain.py:161 in init
self._data[Vacancy()] = 1 - composition.num_atoms

File ~/anaconda3/lib/python3.10/site-packages/smol/cofe/space/domain.py:262 in init
super().init(

TypeError: DummySpecies.init() got an unexpected keyword argument 'properties'
"

here's the prim for reference:

"
print(prim)
Full Formula (Li1.2 La2.268 Ti4 O12)
Reduced Formula: Li1.2La2.268Ti4O12
abc : 5.505110 5.505110 7.785450
angles: 90.000000 90.000000 90.000000
pbc : True True True
Sites (28)

SP a b c


0 Li:0.150 0.108 0.892 0.007
1 Li:0.150 0.608 0.108 0.007
2 Li:0.150 0.392 0.608 0.007
3 Li:0.150 0.892 0.392 0.007
4 Li:0.150 0.892 0.108 0.993
5 Li:0.150 0.392 0.892 0.993
6 Li:0.150 0.608 0.392 0.993
7 Li:0.150 0.108 0.608 0.993
8 La:0.382 0.25 0.75 0
9 La:0.382 0.75 0.25 0
10 La:0.752 0.25 0.75 0.5
11 La:0.752 0.75 0.25 0.5
12 Ti 0.25 0.25 0.2487
13 Ti 0.75 0.75 0.2487
14 Ti 0.75 0.75 0.7513
15 Ti 0.25 0.25 0.7513
16 O 0.5182 0.4818 0.2656
17 O 0.0182 0.5182 0.2656
18 O 0.9818 0.0182 0.2656
19 O 0.4818 0.9818 0.2656
20 O 0.4818 0.5182 0.7344
21 O 0.9818 0.4818 0.7344
22 O 0.0182 0.9818 0.7344
23 O 0.5182 0.0182 0.7344
24 O 0.25 0.25 0
25 O 0.75 0.75 0
26 O 0.25 0.25 0.5
27 O 0.75 0.75 0.5
"

any help / ideas appreciated thank you!

Li0.3La0.57TiO3.cif.txt

@lbluque
Copy link
Collaborator

lbluque commented Sep 15, 2023

Hi @dmebane, what version of smol and pymatgen are you using?

This is probably related to a recent deprecation of the properties attributed in pymatgen Species.

@lbluque lbluque added the dependencies Pull requests that update a dependency file label Sep 15, 2023
@dmebane
Copy link
Author

dmebane commented Sep 15, 2023

aha, ok

smol 0.5.1
pymatgen 2023.9.10

@lbluque
Copy link
Collaborator

lbluque commented Sep 15, 2023

Ah, that is probably the reason. We have just pushed a fix for this in #412 but I have not made a release. I will aim to create a release with this fix today.

Before then, you can get it to work by installing directly from the repo (instead of PyPI) or downgrading pymatgen.

@dmebane
Copy link
Author

dmebane commented Sep 15, 2023

sounds great thank you!

@lbluque
Copy link
Collaborator

lbluque commented Sep 18, 2023

version 0.5.2 which has a fix for this is available on PyPI now.

Feel free to reopen if there are still any related issues.

@lbluque lbluque closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants