-
Notifications
You must be signed in to change notification settings - Fork 80
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
Question about radius in BOWSR readme example #467
Comments
@JiQi535 Pls fix and respond. |
@JiQi535 In case you rename the function, I think it can also be simplified from this: def expected_radius(struct):
element_list = struct.composition.chemical_system.split("-")
element_list = [get_el_sp(e) for e in element_list]
ele1, ele2 = sorted(element_list, key=lambda x: x.atomic_radius)[:2]
return ele1.atomic_radius + ele2.atomic_radius to this: def expected_diameter(structure: Structure) -> float:
elem_1, elem_2, *_ = sorted(structure.composition.elements, key=lambda x: x.atomic_radius)
return elem_1.atomic_radius + elem_2.atomic_radius |
Btw, this function fails for unary structures.
|
@JiQi535 I suggest you fix these problems and submit a PR. We shouldn't let this issue fester for so long. This is not a difficult fix. |
After checking through the codes, I believe this 0.6 factor is just a customizable factor to define the minimum allowed atomic distance in an optimized structure. It provides a reasonable guess of the shortest bond length in a structure that is not unphysical. As in the example of README, we provide a cutoff value for the minimum allowed atomic distance as argument to the method To make it more clear, I can change the name of the "radius" variable to "cutoff_distance". @YunxingZuo @shyuep Please kindly correct me if my understanding is not correct. Thanks! |
@JiQi535 The bigger issue is the unary structure failure. That can be easily fixed? |
@shyuep The BOWSER optimizer doesn't have this kind of limitation. The previous example function |
This might be a dumb question. In the BOWSR readme example, why the rounding? And is the 0.6 factor an approximation for getting the larger element's radius?
expected_radius()
might be better namedexpected_diameter()
since it gives the sum of 2 radii.maml/maml/apps/bowsr/README.md
Lines 75 to 81 in a37f78a
The text was updated successfully, but these errors were encountered: