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

Long time for generation #232

Closed
qzhu2017 opened this issue Sep 7, 2023 · 2 comments
Closed

Long time for generation #232

qzhu2017 opened this issue Sep 7, 2023 · 2 comments

Comments

@qzhu2017
Copy link
Owner

qzhu2017 commented Sep 7, 2023

from pyxtal import pyxtal

iters = 100
for i in range(iters):
    c = pyxtal()
    #c.from_random(3, 191, ['C'], [18], sites=[['6j', '6j', '6k']], factor=1.0)
    c.from_random(3, 204, ['C'], [90], sites=[['16f', '16f', '16f', '16f', '16f', '8c', '2a']], factor=1.2)
    print(i, c.lattice)

Takes long time to find the wp for the given sites.

@qzhu2017
Copy link
Owner Author

qzhu2017 commented Sep 7, 2023

set_sites(self, sites)
If site info is provided, call it only once.

134     def set_sites(self, sites):
135         """
136         initialize Wyckoff sites
137 
138         Args:
139             sites: list
140         """
141         # Symmetry sites
142         self.sites = {}
143         for i, specie in enumerate(self.species):
144             if sites is not None and sites[i] is not None and len(sites[i])>0:
145                 self._check_consistency(sites[i], self.numIons[i])
146                 if type(sites[i]) is dict:
147                     self.sites[specie] = []
148                     for item in sites[i].items():
149                         self.sites[specie].append({item[0]: item[1]})
150                 else:
151                     self.sites[specie] = sites[i]
152             else:
153                 self.sites[specie] = None

@qzhu2017
Copy link
Owner Author

qzhu2017 commented Sep 8, 2023

Largely fixed. May improve merge function later if necessary.

@qzhu2017 qzhu2017 closed this as completed Sep 8, 2023
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

1 participant