Open DhairyaLGandhi opened 2 years ago
Another piece of good news is that there is very little involved for AD, for the most part we have refactored some functions and added a couple methods that would be good for Xtals.jl to have anyway.
It seems like some of the additional tests are failing on this at the moment?
Yeah I'm not sure what's changed here. The weights_cutoff
function is the same as before.
The way things are getting reorganized, this code will probably end up belonging in AtomGraphs (should be registered in a couple days) rather than here, JFYI
ref #111
x-ref: https://github.com/Chemellia/ChemistryFeaturization.jl/pull/111#issuecomment-922109332, #10
Okay, so we have the following working.
which are the gradients for the crystal and graph AD 🎉
Couple of notes:
replicate
is written with a lot of mutation, and I figured we could write a simpler version, so I did. How do we want to handle this? We could propose this change to Xtals.jl ~(the performance is roughly same, but of course this allocates)~ (this implementation is roughly 3x faster)Also, we might have some performance on the table if we optimise this further going by the number of allocations.