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

Some random generations take long time #224

Closed
qzhu2017 opened this issue Jul 23, 2023 · 1 comment
Closed

Some random generations take long time #224

qzhu2017 opened this issue Jul 23, 2023 · 1 comment

Comments

@qzhu2017
Copy link
Owner

from pyxtal import pyxtal
from time import time
xtal = pyxtal()
for i in range(10):
    t0 = time()
    xtal.from_random(3, 208, ['C'], [36], sites=[['12j', '12j', '6f', '6e']], factor=1.5)
    print(xtal.valid, time()-t0)
qzhu2017 added a commit that referenced this issue Jul 23, 2023
@qzhu2017
Copy link
Owner Author

from pyxtal import pyxtal
from time import time
pairs = [
(223, [36], [['12g', '12g', '6c', '6b']]),
(223, [36], [['12h', '12h', '6d', '6b']]),
(218, [38], [['12g', '12g', '6c', '6b', '2a']]),
(218, [38], [['12h', '12h', '6d', '6b', '2a']]),
(208, [42], [['12i', '12i', '6f', '6e', '6d']]),
(223, [42], [['12h', '12h', '6d', '6c', '6b']]),
(208, [46], [['12j', '12j', '6f', '6e', '6d', '4c']]),
(223, [44], [['12g', '12g', '8e', '6c', '6b']]),
(223, [36], [['12h', '12h', '12h']]),
(218, [36], [['12g', '12g', '12g']]),
(208, [36], [['12i', '12i', '12i']]),
(223, [36], [['12g', '12g', '12g']]),
(223, [38], [['12g', '12g', '12g', '2a']]),
(208, [40], [['12i', '12i', '12i', '4c']]),
(218, [42], [['12h', '12h', '12h', '6c']]),
(229, [86], [['24g', '24g', '24g', '8c', '6b']]),
]
for pair in pairs:
    (spg, numIons, sites) = pair
    for i in range(10):
        t0 = time()
        try:
            xtal = pyxtal()
            xtal.from_random(3, spg, ['C'], numIons, sites=sites, factor=1.5)
            print(i, sites, xtal.valid, xtal.lattice.volume, time()-t0)
            print(xtal)
        except:
            print("Error", i, sites, xtal.valid, time()-t0)

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