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

Include "None" when when polyhedron cannot be formde #21

Closed
bobleesj opened this issue Jul 18, 2024 · 1 comment
Closed

Include "None" when when polyhedron cannot be formde #21

bobleesj opened this issue Jul 18, 2024 · 1 comment
Labels
1.0.3 bug Something isn't working

Comments

@bobleesj
Copy link
Owner

For CN below 4, make sure you assign "None" in coordination.py for the method before computing the geometric data.

            except Exception:
                print(f"Error in determining polyhedron for {label} using {method} - skipped")
                site_data[label][method] = None
                continue  # Move to the next method

And when you find the avg, min, max, make sure you have

@bobleesj bobleesj added bug Something isn't working 1.0.3 labels Jul 18, 2024
@bobleesj
Copy link
Owner Author

Closing -

           if len(connection_data) > 3:
                for connection in connection_data:
                    polyhedron_points.append(connection[3])
            else:
                continue

Only when the connections_data > 3, the function polyhedron points are calculated. Then,

            # Try to make a polyhedron
            try:
                hull = ConvexHull(polyhedron_points)

            except Exception:
                print(
                    f"Error in determining polyhedron for {label} using {method} - skipped"
                )
                continue  # Move to the next method

That particular polyhedron will be caught.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.3 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant