-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bond completion (or saturation) #202
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #202 +/- ##
==========================================
- Coverage 85.23% 85.10% -0.14%
==========================================
Files 121 121
Lines 19367 19398 +31
==========================================
+ Hits 16507 16508 +1
- Misses 2860 2890 +30
Continue to review full report at Codecov.
|
2561929
to
a5f5d11
Compare
Thanks for the MR! Sorry for the late return. However, your request spawned an idea I would like some feedback on. Once that is in, your saturation feature could be generalized based on atomic categories ;-) and thus work for any system, including bulk surfaces etc. ;) |
Hey! Can I update this PR to use categories so that it can be merged? It would help me with something that I need to do and I'd rather do it with an implementation in sisl than with some script in my computer that I won't be able to find in the future :) (Also, I'm sure it can be very useful for other people) |
Now that we are updating things in categories, I think for this (and maybe other cases) it could be very useful that categories had an Any ideas how this could be made efficient? |
Yes, please try out this :)
I think this should be carefully thought through. Problem is that if you start changing the |
@tfrederiksen I hope it is ok if Pol takes a shot at this? Otherwise, chip in ;) |
No problem! :) |
Why do you need to change the state of the geometry? I was thinking something like: def saturate(...):
new_ats = []
new_xyz = []
def get_saturating_ats(...):
...calculate the new positions # this will only run for those atoms that fall in the defined category
new_ats.append(...)
new_xyz.append(...)
AtomCategory(neighbours=2).apply(get_saturating_ats)
return geom + Geometry(new_xyz, new_ats) However it's hard to figure out what to do when you want to apply on a composite category, because you may need the information that comes from all the categories, and that's probably where you need this
😕 |
@tfrederiksen I need permission to push to the branch to be able to update the PR :) |
Create a new one :) Much easier, just write it superseeds this one in the PR |
Ok! |
I don't think it should be like this, probably it would be nice if the Something like: cA = AtomCategory(...) # first category
cB = AtomCategory(...) # second category
cC = AtomCategory(...) # third category
c = cA | cB | cC
saturate_atoms = dict(cA={"distance": 1.4, "atom": Atom[3]}, cB={"distance": 1.5, "atom": Atom[4]}, cC=callback_function)
saturate(geometry, atoms=c, saturate_atoms=saturate_atoms) or something similar? |
The proposal of a
nanoribbon
geometry (#201) with edge-saturated atoms opened the idea to have more generally a method to complete bonds in geometries by adding extra atoms. This branch strives to achieve this.