Thanks for the message. I know the process_dedr scheme is complicated and confusing. Your notes on the process would be a great addition to the available documentation.
Could you please answer the following question, again related to
process_dedr. I am currently using the EAM driver, and I have a question
regarding process_dedr when using padding particles. I am comparing the
results of the following scenarios:
1. Construct the half neighbor list as is, and in the test give the number
of contributing particles, and the model takes care of the computation from
2. In the test give the number of contributing particles, and at the same
time construct only the half list of the first numberContributionParticles
particles. I don't see why you will need to construct the half list of
I agree, you shouldn't need to list any neighbors in a half list for particles numbered greater than the numberContributingParticles value.
I'm not completely clear in what you say here. Just to clarify, in the half-lists for the first numberContributingParticles, do you include entries for particles numbered with value greater than numberContributingParticles? (i.e., are padding particles included in the half list for contributing particles?)
3. For a full list, construct the full list neighbors of the first
numberContributingParticles particles, and the neighbor lists of the
padding atoms are empty.
All the above three give me different results. I initially thought 1 and 3
are the way to go, and they should give me same results. But I am not sure
why in the case of 1, process_dedr in the test receives the derivatives of
the energy w.r.t distances between padding particles very far away from the
domain of interest. So I tried 2, but the results of 2 and 3 also don't
I agree 1 and 3 should work and give the same answer.
I'm not sure what is going on.
Maybe the best way to make quick progress is if you send me a set of examples that I could test, compare, and debug...
I think I am going to document my whole experience with process_dedr
because I feel it is non-trivial. I also think that while writing models,
there is a paradigm you are following, which is think about "particle
contributions" and not about "bond contributions" because this is how you
are building up the derivatives. This logic flows smoothly when extending
to padding particles. I think if this is not clear, then there exists a
pitfall of writing a model which works correctly in the absence of padding
particles, but not so in their presence.
That's right, the KIM API starts with a basic assumption of a individual particle-energy function E_i and builds up total energies from there. This is most important for the process_dE* mechanism, as it if a fundamental requirement of that approach. (Elsewhere, the existence of a particle-energy function is not so critical.)
As I said, any notes you want to provide would be great. I'll also be happy to have any submissions that contribute to improvements in the official documentation...