-
Notifications
You must be signed in to change notification settings - Fork 5
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
Atomic fraction as float #1
Comments
…errors with large numbers of atoms - resolves #1
…ctive electronic ff, etc.) for memory efficiency/speed. Avoid doing calculations for every atom and use counts for each species instead. Addresses issue #1
…lism. Added composition validation and error messages etc. Fixes #1
This has now been added as of v1.2.4 and will be included in the next release version. For Faber-Ziman S(Q) this is fine as the normalisation to total number of atoms makes e.g. Ga0.915,Sn0.085 identical to Ga915,Sn85. I have simply allowed float input in the composition input table. Ashcroft-Langreth structure factors are normalised in a different way, and really only work for molecular materials, so if using this mode the input is restricted to integers. |
@bjheinen Currently atomic fraction n must be an integer. Can this be made a float? For example, I have GaSn alloy with 8.5 at. % Sn. To get around this, if I multiply atomic fractions by 100 I get the following error:
Traceback (most recent call last):
File "C:\Users\James\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\LiquidDiffract\gui\optim_ui.py", line 197, in on_click_calc_sq
self.data['sq_y'] = core.calc_structure_factor(self.data['cor_x_cut'],
File "C:\Users\James\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\LiquidDiffract\core\core.py", line 562, in calc_structure_factor
avg_scattering_f = calc_average_scattering(composition, Q_cor)
File "C:\Users\James\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\LiquidDiffract\core\core.py", line 224, in calc_average_scattering
np.sum(np.asarray([x*y for x in atomic_ff for y in atomic_ff]), 0)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 11.7 GiB for an array with shape (1000000, 1570) and data type float64
The text was updated successfully, but these errors were encountered: