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

More robust bond sanity check #170

Open
eahenle opened this issue Aug 8, 2022 · 1 comment
Open

More robust bond sanity check #170

eahenle opened this issue Aug 8, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@eahenle
Copy link
Collaborator

eahenle commented Aug 8, 2022

Existing bond sanity check looks at 3 things:

  • Are there zero-valent atoms?
  • Are there multivalent hydrogens?
  • Are there hypervalent carbons?

Good start, but I think we can do better. First, not all structures need all of these checks; e.g. COFs may be halide salts, or some structures may include hydrogen-bonded moieties. It would be good to be able to flag off any individual check. Second, there are other possible checks that could be made, such as minimum/maximum valency for various atoms.

Idea: dictionary of sanity check rules. rules::Dict{Symbol, Union{Vector{Int},UnitRange{Int}}) So, e.g., :H => [1], :C => 1:4
Then the bond_sanity_check signature could be: bond_sanity_check(crystal::Crystal; rules=rc[:bond_sanity], add_rules=Dict())

If the user wants to provide a complete set of rules, they use the rules kwarg. If the user wants to just modify some rules without changing the global set, they use add_rules. The sanity check is performed using rules = merge(rules, add_rules)

@eahenle
Copy link
Collaborator Author

eahenle commented Sep 16, 2022

Could also take some inspiration from the ARC-MOF bond checks

@eahenle eahenle added the enhancement New feature or request label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant