Progress for Tersoff model driver


I had some time to work on the Tersoff_LAMMPS__MD_077075034781 code. I believe I fixed the forces on ghost atoms, which should hopefully give the correct virial in all circumstances. LAMMPS pressure calculation with this model driver seems to work (global and per-atom).

Furthermore, model parameters are published and can be changed via the KIM API in a sensible way now.

Code currently available at

Before I upload the new version, I have some concerns about quality control. I would like to do more than the very simple, disorganized testing I performed myself:

* Are there more automated tests than "vc_forces_numer_deriv"? This one is pretty limited. One could imagine testing more crystal structures, defects, multiple species, periodic boundaries on/off, etc. One could also do virial/pressure calculations to check the output of the model. If nothing like this exists, I might try to cobble something together.

* For the models using this Tersoff driver, very few test results are listed on the KIM website. Is there a reason for this? Something I could do?

I have some further questions/input on performance and some tiny bugs in the KIM API that I will send as separate messages to keep the discussions focused.



Great to hear from you and thanks for putting new effort into the Tersoff_LAMMPS models in openKIM.

The best suggestion for further testing that I can make, at this time, would be to try running various tests locally with your new version. To do this you would want to use our Virtual Machine (VM) system. We're currently in the mist of a major refactoring project for the processing pipeline backend of our system. So, at this point we only have an alpha version of the updated VM. If you would be interested in trying to work with this to do the testing you are interested in, we would be happy to have you try it out and get feedback from you. Contact me directly and I can arrange to get you setup.



I see. If I find some time I will try to make some extended version of the vc_forces_numer_deriv code. Maybe it would be good to include such a thing in the examples directory of KIM?

If I find some more time, I'll get back to you about the VM.



Dear Tobias,

Great to hear that you've been working on KIM! As Ryan said we're in the midst of a major effort to upgrade our pipeline system. We expect the new version to go live very soon. Part of that effort integrates the verification checks (VCs) into the pipeline system, so that every model is run against a set of VCs and the results are reported on the model page. We had a student working on this who developed a dozen or so different VCs that check many aspects of model performance.

It would be great to extend the numerical derivative VC to include other structures and cases not considered. We'll be glad to coordinate with you on this if you are interested in leading this effort. A new VC for testing the virial is also of interest. That was on our list and I need to check whether it's one of the VCs the student completed.

One thing to keep in mind is that we are also working on a major refactoring of the KIM API that will greatly simplify it. This will make it much easier to write VCs that will work with all models. Let us know if you decide to work on VCs and will give you more details.



Tobias-- I checked, and the virial VC has not been worked on. So it's all yours if you're interested. Also if you haven't noticed, check out the wiki on the Tersoff model driver page:

We have students adding documentation. You can edit if you have any additions/corrections. We also added plots of functional forms on some pages, like:


Hi Ellad,

Tobias-- I checked, and the virial VC has not been worked on. So it's
all yours if you're interested.

I updated some old C++ code of mine. I reimplemented the numerical force derivation and added tests like:

* do the particle energies add up to the total energy

* is the global virial calculated from F dot r the same as the one from the model

* do the particle virials add up to the total virial

It can currently do several crystal lattices and both periodic and open boundaries.

The code is rather flexible, but it misses some parts to make it easily usable with arbitrary KIM models (discovery of features, atomic species, and so on). The output is also not super well suited to automated parsing.

I'm going to be busy for a few weeks(?) but the code is on github:

If somebody is working on checks, they can feel free to contact me about the code. Also feel free to use it however you want, it's MIT licensed.